[OpenWrt-Devel] [PATCH V2 1/2] brcm63xx: fix HG556a boards and remove fallback board

Álvaro Fernández Rojas noltari at gmail.com
Mon Aug 11 09:10:09 EDT 2014


This changes board info to match the Wiki http://wiki.openwrt.org/toh/huawei/hg556a, removes the no longer needed fallback board and fixes HG556 Ralink eeprom extraction.

Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
---
diff --git a/target/linux/brcm63xx/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom b/target/linux/brcm63xx/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
index 8e229d1..049da77 100644
--- a/target/linux/brcm63xx/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
+++ b/target/linux/brcm63xx/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
@@ -31,8 +31,8 @@ board=$board_name
 case "$FIRMWARE" in
 "rt2x00.eeprom" )
 	case $board in
-	HW556_A)
-		rt2x00_eeprom_extract "cal_data" 130560 512
+	HW556_C)
+		rt2x00_eeprom_extract "caldata" 130560 512
 		;;
 	*)
 		rt2x00_eeprom_die "board $board is not supported yet"
diff --git a/target/linux/brcm63xx/patches-3.14/534-board_hw556.patch b/target/linux/brcm63xx/patches-3.14/534-board_hw556.patch
index 2013b7d..72860d9 100644
--- a/target/linux/brcm63xx/patches-3.14/534-board_hw556.patch
+++ b/target/linux/brcm63xx/patches-3.14/534-board_hw556.patch
@@ -8,100 +8,10 @@
  #include <linux/platform_device.h>
  #include <linux/spi/spi.h>
  #include <linux/spi/spi_gpio.h>
-@@ -2667,6 +2668,495 @@ static struct board_info __initdata boar
+@@ -2667,6 +2668,405 @@ static struct board_info __initdata boar
  	},
  };
  
-+static struct board_info __initdata board_HW556 = {
-+	.name					= "HW556",
-+	.expected_cpu_id			= 0x6358,
-+
-+	.has_uart0				= 1,
-+	.has_pci				= 1,
-+	.has_ohci0				= 1,
-+	.has_ehci0				= 1,
-+	.num_usbh_ports				= 2,
-+
-+	.has_caldata				= 1,
-+	.caldata = {
-+		{
-+			.caldata_offset		= 0xe00000,
-+		},
-+	},
-+
-+	.has_enet1				= 1,
-+	.enet1 = {
-+		.has_phy			= 1,
-+		.phy_id				= 0,
-+		.force_speed_100		= 1,
-+		.force_duplex_full		= 1,
-+	},
-+
-+	.leds = {
-+		{
-+			.name			= "HW556:red:message",
-+			.gpio			= 0,
-+			.active_low		= 1,
-+		},
-+		{
-+			.name			= "HW556:red:hspa",
-+			.gpio			= 1,
-+			.active_low		= 1,
-+		},
-+		{
-+			.name			= "HW556:red:dsl",
-+			.gpio			= 2,
-+			.active_low		= 1,
-+		},
-+		{
-+			.name			= "HW556:red:power",
-+			.gpio			= 3,
-+			.active_low		= 1,
-+			.default_trigger	= "default-on",
-+		},
-+		{
-+			.name			= "HW556:red:all",
-+			.gpio			= 6,
-+			.active_low		= 1,
-+			.default_trigger	= "default-on",
-+		},
-+	},
-+
-+	.buttons = {
-+		{
-+			.desc			= "help",
-+			.gpio			= 8,
-+			.active_low		= 1,
-+			.type			= EV_KEY,
-+			.code			= KEY_HELP,
-+			.debounce_interval	= BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+		},
-+		{
-+			.desc			= "wlan",
-+			.gpio			= 9,
-+			.active_low		= 1,
-+			.type			= EV_KEY,
-+			.code			= KEY_WLAN,
-+			.debounce_interval	= BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+		},
-+		{
-+			.desc			= "restart",
-+			.gpio			= 10,
-+			.active_low		= 1,
-+			.type			= EV_KEY,
-+			.code			= KEY_RESTART,
-+			.debounce_interval	= BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+		},
-+		{
-+			.desc			= "reset",
-+			.gpio			= 11,
-+			.active_low		= 1,
-+			.type			= EV_KEY,
-+			.code			= KEY_CONFIG,
-+			.debounce_interval	= BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+		},
-+	},
-+};
 +static struct board_info __initdata board_HW556_A = {
 +	.name					= "HW556_A",
 +	.of_board_id				= "huawei,hg556a-a",
@@ -116,10 +26,11 @@
 +	.has_caldata				= 1,
 +	.caldata = {
 +		{
-+			.vendor			= PCI_VENDOR_ID_RALINK,
-+			.caldata_offset		= 0xeffe00,
++			.vendor			= PCI_VENDOR_ID_ATHEROS,
++			.caldata_offset		= 0xf7e000,
 +			.slot			= 1,
-+			.eeprom			= "rt2x00.eeprom",
++			.endian_check		= 1,
++			.led_pin		= 2,
 +		},
 +	},
 +
@@ -245,7 +156,7 @@
 +	.caldata = {
 +		{
 +			.vendor			= PCI_VENDOR_ID_ATHEROS,
-+			.caldata_offset		= 0xf7e000,
++			.caldata_offset		= 0xefe000,
 +			.slot			= 1,
 +			.endian_check		= 1,
 +			.led_pin		= 2,
@@ -379,11 +290,10 @@
 +	.has_caldata				= 1,
 +	.caldata = {
 +		{
-+			.vendor			= PCI_VENDOR_ID_ATHEROS,
-+			.caldata_offset		= 0xefe000,
++			.vendor			= PCI_VENDOR_ID_RALINK,
++			.caldata_offset		= 0xeffe00,
 +			.slot			= 1,
-+			.endian_check		= 1,
-+			.led_pin		= 2,
++			.eeprom			= "rt2x00.eeprom",
 +		},
 +	},
 +
@@ -504,28 +414,13 @@
   /* T-Home Speedport W 303V Typ B */
  static struct board_info __initdata board_spw303v = {
  	.name			= "96358-502V",
-@@ -3105,6 +3595,10 @@ static const struct board_info __initcon
+@@ -3105,6 +3505,9 @@ static const struct board_info __initcon
  	&board_nb4_fxc_r1,
  	&board_ct6373_1,
  	&board_HW553,
-+	&board_HW556,
 +	&board_HW556_A,
 +	&board_HW556_B,
 +	&board_HW556_C,
  	&board_spw303v,
  	&board_DVAG3810BN,
  #endif
---- a/drivers/mtd/bcm63xxpart.c
-+++ b/drivers/mtd/bcm63xxpart.c
-@@ -224,6 +224,11 @@ static int bcm63xx_parse_cfe_partitions(
- 			      BCM63XX_CFE_BLOCK_SIZE);
- 
- 	cfelen = cfe_erasesize;
-+
-+	/* Fix HW556 MX29LV128DB */
-+	if (!strncmp(bcm63xx_nvram_get_name(), "HW556", 5))
-+		cfelen = 0x20000;
-+
- 	nvramlen = bcm63xx_nvram_get_psi_size() * SZ_1K;
- 	nvramlen = roundup(nvramlen, cfe_erasesize);
- 	nvramaddr = master->size - nvramlen;
diff --git a/target/linux/brcm63xx/patches-3.14/535-board_rta770w.patch b/target/linux/brcm63xx/patches-3.14/535-board_rta770w.patch
index d63f889..455ccc4 100644
--- a/target/linux/brcm63xx/patches-3.14/535-board_rta770w.patch
+++ b/target/linux/brcm63xx/patches-3.14/535-board_rta770w.patch
@@ -61,7 +61,7 @@
  #endif /* CONFIG_BCM63XX_CPU_6345 */
  
  /*
-@@ -3560,6 +3614,7 @@ static const struct board_info __initcon
+@@ -3470,6 +3524,7 @@ static const struct board_info __initcon
  #ifdef CONFIG_BCM63XX_CPU_6345
  	&board_96345gw2,
  	&board_rta770bw,
diff --git a/target/linux/brcm63xx/patches-3.14/536-board_fast2704.patch b/target/linux/brcm63xx/patches-3.14/536-board_fast2704.patch
index 9d90dea..d082c49 100644
--- a/target/linux/brcm63xx/patches-3.14/536-board_fast2704.patch
+++ b/target/linux/brcm63xx/patches-3.14/536-board_fast2704.patch
@@ -135,7 +135,7 @@ Signed-off-by: Marcin Jurkowski <marcin1j at gmail.com>
  #endif /* CONFIG_BCM63XX_CPU_6328 */
  
  /*
-@@ -3604,6 +3720,7 @@ static const struct board_info __initcon
+@@ -3514,6 +3630,7 @@ static const struct board_info __initcon
  	&board_963281TAN,
  	&board_A4001N1,
  	&board_dsl_274xb_f1,
diff --git a/target/linux/brcm63xx/patches-3.14/537-board_fast2504n.patch b/target/linux/brcm63xx/patches-3.14/537-board_fast2504n.patch
index db66540..88a0f8f 100644
--- a/target/linux/brcm63xx/patches-3.14/537-board_fast2504n.patch
+++ b/target/linux/brcm63xx/patches-3.14/537-board_fast2504n.patch
@@ -6,7 +6,7 @@ Signed-off-by: Max Staudt <openwrt.max at enpas.org>
 ---
 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -3559,6 +3559,96 @@ static struct board_info __initdata boar
+@@ -3469,6 +3469,96 @@ static struct board_info __initdata boar
  	.devs = nb6_devices,
  	.num_devs = ARRAY_SIZE(nb6_devices),
  };
@@ -103,7 +103,7 @@ Signed-off-by: Max Staudt <openwrt.max at enpas.org>
  #endif /* CONFIG_BCM63XX_CPU_6362 */
  
  /*
-@@ -3777,6 +3867,7 @@ static const struct board_info __initcon
+@@ -3686,6 +3776,7 @@ static const struct board_info __initcon
  
  #ifdef CONFIG_BCM63XX_CPU_6362
  	&board_nb6,
diff --git a/target/linux/brcm63xx/patches-3.14/555-board_96318ref.patch b/target/linux/brcm63xx/patches-3.14/555-board_96318ref.patch
index d064e23..d28ed2f 100644
--- a/target/linux/brcm63xx/patches-3.14/555-board_96318ref.patch
+++ b/target/linux/brcm63xx/patches-3.14/555-board_96318ref.patch
@@ -94,7 +94,7 @@
   * known 6328 boards
   */
  #ifdef CONFIG_BCM63XX_CPU_6328
-@@ -4034,6 +4121,9 @@ static const struct board_info __initcon
+@@ -3944,6 +4031,9 @@ static const struct board_info __initcon
  #ifdef CONFIG_BCM63XX_CPU_3368
  	&board_cvg834g,
  #endif
diff --git a/target/linux/brcm63xx/patches-3.14/556-board_96318ref_p300.patch b/target/linux/brcm63xx/patches-3.14/556-board_96318ref_p300.patch
index 902bcab..7eff2bc 100644
--- a/target/linux/brcm63xx/patches-3.14/556-board_96318ref_p300.patch
+++ b/target/linux/brcm63xx/patches-3.14/556-board_96318ref_p300.patch
@@ -95,7 +95,7 @@
  #endif /* CONFIG_BCM63XX_CPU_6318 */
  
  /*
-@@ -4123,6 +4211,7 @@ static const struct board_info __initcon
+@@ -4033,6 +4121,7 @@ static const struct board_info __initcon
  #endif
  #ifdef CONFIG_BCM63XX_CPU_6318
  	&board_96318ref,
diff --git a/target/linux/brcm63xx/patches-3.14/557-board_bcm963269bhr.patch b/target/linux/brcm63xx/patches-3.14/557-board_bcm963269bhr.patch
index 68ebf17..9ec979c 100644
--- a/target/linux/brcm63xx/patches-3.14/557-board_bcm963269bhr.patch
+++ b/target/linux/brcm63xx/patches-3.14/557-board_bcm963269bhr.patch
@@ -1,6 +1,6 @@
 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -4203,6 +4203,75 @@ static struct board_info __initdata boar
+@@ -4113,6 +4113,75 @@ static struct board_info __initdata boar
  #endif /* CONFIG_BCM63XX_CPU_6368 */
  
  /*
@@ -76,7 +76,7 @@
   * all boards
   */
  static const struct board_info __initconst *bcm963xx_boards[] = {
-@@ -4284,6 +4353,9 @@ static const struct board_info __initcon
+@@ -4193,6 +4262,9 @@ static const struct board_info __initcon
  	&board_96368mvwg,
  	&board_96368mvngr,
  #endif
diff --git a/target/linux/brcm63xx/patches-3.14/558-board_AR1004G.patch b/target/linux/brcm63xx/patches-3.14/558-board_AR1004G.patch
index 243007b..46ea232 100644
--- a/target/linux/brcm63xx/patches-3.14/558-board_AR1004G.patch
+++ b/target/linux/brcm63xx/patches-3.14/558-board_AR1004G.patch
@@ -61,7 +61,7 @@ Signed-off-by: Adrian Feliks <mexit at o2.pl>
  
  /* BT Voyager 2110 */
  static struct board_info __initdata board_V2110 = {
-@@ -4323,6 +4369,7 @@ static const struct board_info __initcon
+@@ -4233,6 +4279,7 @@ static const struct board_info __initcon
  	&board_96348A_122,
  	&board_CPVA502plus,
  	&board_96348W3,
diff --git a/target/linux/brcm63xx/patches-3.14/559-board_vw6339gu.patch b/target/linux/brcm63xx/patches-3.14/559-board_vw6339gu.patch
index e55a003..dda02a5 100644
--- a/target/linux/brcm63xx/patches-3.14/559-board_vw6339gu.patch
+++ b/target/linux/brcm63xx/patches-3.14/559-board_vw6339gu.patch
@@ -1,6 +1,6 @@
 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -4315,6 +4315,108 @@ static struct board_info __initdata boar
+@@ -4225,6 +4225,108 @@ static struct board_info __initdata boar
  		},
  	},
  };
@@ -109,7 +109,7 @@
  #endif /* CONFIG_BCM63XX_CPU_63268 */
  
  /*
-@@ -4402,6 +4504,7 @@ static const struct board_info __initcon
+@@ -4311,6 +4413,7 @@ static const struct board_info __initcon
  #endif
  #ifdef CONFIG_BCM63XX_CPU_63268
  	&board_963269bhr,
diff --git a/target/linux/brcm63xx/patches-3.14/560-board_963268gu_p300.patch b/target/linux/brcm63xx/patches-3.14/560-board_963268gu_p300.patch
index 61528bf..e565133 100644
--- a/target/linux/brcm63xx/patches-3.14/560-board_963268gu_p300.patch
+++ b/target/linux/brcm63xx/patches-3.14/560-board_963268gu_p300.patch
@@ -1,6 +1,6 @@
 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -4252,6 +4252,131 @@ static struct board_info __initdata boar
+@@ -4162,6 +4162,131 @@ static struct board_info __initdata boar
   * known 63268/63269 boards
   */
  #ifdef CONFIG_BCM63XX_CPU_63268
@@ -132,7 +132,7 @@
  static struct board_info __initdata board_963269bhr = {
  	.name				= "963269BHR",
  	.expected_cpu_id		= 0x63268,
-@@ -4503,6 +4628,7 @@ static const struct board_info __initcon
+@@ -4412,6 +4537,7 @@ static const struct board_info __initcon
  	&board_96368mvngr,
  #endif
  #ifdef CONFIG_BCM63XX_CPU_63268
diff --git a/target/linux/brcm63xx/patches-3.14/561-board_WAP-5813n.patch b/target/linux/brcm63xx/patches-3.14/561-board_WAP-5813n.patch
index 86e6a5f..e35d775 100644
--- a/target/linux/brcm63xx/patches-3.14/561-board_WAP-5813n.patch
+++ b/target/linux/brcm63xx/patches-3.14/561-board_WAP-5813n.patch
@@ -8,7 +8,7 @@
  #include <linux/platform_device.h>
  #include <linux/spi/spi.h>
  #include <linux/spi/spi_gpio.h>
-@@ -4246,6 +4247,117 @@ static struct board_info __initdata boar
+@@ -4156,6 +4157,117 @@ static struct board_info __initdata boar
  	.has_ohci0 = 1,
  	.has_ehci0 = 1,
  };
@@ -126,7 +126,7 @@
  #endif /* CONFIG_BCM63XX_CPU_6368 */
  
  /*
-@@ -4626,6 +4738,7 @@ static const struct board_info __initcon
+@@ -4535,6 +4647,7 @@ static const struct board_info __initcon
  #ifdef CONFIG_BCM63XX_CPU_6368
  	&board_96368mvwg,
  	&board_96368mvngr,
diff --git a/target/linux/brcm63xx/patches-3.14/562-board_VR-3025u.patch b/target/linux/brcm63xx/patches-3.14/562-board_VR-3025u.patch
index 8ba638a..27f5e69 100644
--- a/target/linux/brcm63xx/patches-3.14/562-board_VR-3025u.patch
+++ b/target/linux/brcm63xx/patches-3.14/562-board_VR-3025u.patch
@@ -1,6 +1,6 @@
 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -4248,6 +4248,116 @@ static struct board_info __initdata boar
+@@ -4158,6 +4158,116 @@ static struct board_info __initdata boar
  	.has_ehci0 = 1,
  };
  
@@ -117,7 +117,7 @@
  static struct b53_platform_data WAP5813n_b53_pdata = {
  	.alias = "eth0",
  };
-@@ -4738,6 +4848,7 @@ static const struct board_info __initcon
+@@ -4647,6 +4757,7 @@ static const struct board_info __initcon
  #ifdef CONFIG_BCM63XX_CPU_6368
  	&board_96368mvwg,
  	&board_96368mvngr,
diff --git a/target/linux/brcm63xx/patches-3.14/563-board_VR-3025un.patch b/target/linux/brcm63xx/patches-3.14/563-board_VR-3025un.patch
index 36e21ab..44bd7ee 100644
--- a/target/linux/brcm63xx/patches-3.14/563-board_VR-3025un.patch
+++ b/target/linux/brcm63xx/patches-3.14/563-board_VR-3025un.patch
@@ -1,6 +1,6 @@
 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -4358,6 +4358,116 @@ static struct board_info __initdata boar
+@@ -4268,6 +4268,116 @@ static struct board_info __initdata boar
  	},
  };
  
@@ -117,7 +117,7 @@
  static struct b53_platform_data WAP5813n_b53_pdata = {
  	.alias = "eth0",
  };
-@@ -4849,6 +4959,7 @@ static const struct board_info __initcon
+@@ -4758,6 +4868,7 @@ static const struct board_info __initcon
  	&board_96368mvwg,
  	&board_96368mvngr,
  	&board_VR3025u,
diff --git a/target/linux/brcm63xx/patches-3.14/564-board_P870HW-51a_v2.patch b/target/linux/brcm63xx/patches-3.14/564-board_P870HW-51a_v2.patch
index 205c4c7..9731cb5 100644
--- a/target/linux/brcm63xx/patches-3.14/564-board_P870HW-51a_v2.patch
+++ b/target/linux/brcm63xx/patches-3.14/564-board_P870HW-51a_v2.patch
@@ -1,6 +1,6 @@
 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -4257,6 +4257,96 @@ static struct sprom_fixup __initdata vr3
+@@ -4167,6 +4167,96 @@ static struct sprom_fixup __initdata vr3
  	{ .offset = 115, .value = 0xfad9 },
  };
  
@@ -97,7 +97,7 @@
  static struct board_info __initdata board_VR3025u = {
  	.name					= "96368M-1541N",
  	.expected_cpu_id		= 0x6368,
-@@ -4958,6 +5048,7 @@ static const struct board_info __initcon
+@@ -4867,6 +4957,7 @@ static const struct board_info __initcon
  #ifdef CONFIG_BCM63XX_CPU_6368
  	&board_96368mvwg,
  	&board_96368mvngr,
diff --git a/target/linux/brcm63xx/patches-3.14/565-board_hw520.patch b/target/linux/brcm63xx/patches-3.14/565-board_hw520.patch
index 8f9a22b..4ec1326 100644
--- a/target/linux/brcm63xx/patches-3.14/565-board_hw520.patch
+++ b/target/linux/brcm63xx/patches-3.14/565-board_hw520.patch
@@ -57,11 +57,11 @@
  static struct board_info __initdata board_HW553 = {
  	.name                           = "HW553",
  	.expected_cpu_id                = 0x6358,
-@@ -5031,6 +5081,7 @@ static const struct board_info __initcon
+@@ -4941,6 +4991,7 @@ static const struct board_info __initcon
  	&board_nb4_ser_r0,
  	&board_nb4_fxc_r1,
  	&board_ct6373_1,
 +	&board_HW520,
  	&board_HW553,
- 	&board_HW556,
  	&board_HW556_A,
+ 	&board_HW556_B,
diff --git a/target/linux/brcm63xx/patches-3.14/566-board_A4001N.patch b/target/linux/brcm63xx/patches-3.14/566-board_A4001N.patch
index 2954db8..4204332 100644
--- a/target/linux/brcm63xx/patches-3.14/566-board_A4001N.patch
+++ b/target/linux/brcm63xx/patches-3.14/566-board_A4001N.patch
@@ -96,7 +96,7 @@
  static struct board_info __initdata board_A4001N1 = {
  	.name					= "963281T_TEF",
  	.expected_cpu_id			= 0x6328,
-@@ -5032,6 +5121,7 @@ static const struct board_info __initcon
+@@ -4942,6 +5031,7 @@ static const struct board_info __initcon
  	&board_AR5381u,
  	&board_AR5387un,
  	&board_963281TAN,
diff --git a/target/linux/brcm63xx/patches-3.14/567-board_dsl-2751b_e1.patch b/target/linux/brcm63xx/patches-3.14/567-board_dsl-2751b_e1.patch
index d02f4e0..55457a5 100644
--- a/target/linux/brcm63xx/patches-3.14/567-board_dsl-2751b_e1.patch
+++ b/target/linux/brcm63xx/patches-3.14/567-board_dsl-2751b_e1.patch
@@ -142,7 +142,7 @@
  #endif /* CONFIG_BCM63XX_CPU_6318 */
  
  /*
-@@ -5115,6 +5250,7 @@ static const struct board_info __initcon
+@@ -5025,6 +5160,7 @@ static const struct board_info __initcon
  #ifdef CONFIG_BCM63XX_CPU_6318
  	&board_96318ref,
  	&board_96318ref_p300,
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list