1 Index: linux-2.6.32.13/arch/mips/bcm63xx/boards/board_bcm963xx.c
2 ===================================================================
3 --- linux-2.6.32.13.orig/arch/mips/bcm63xx/boards/board_bcm963xx.c 2010-05-27 21:45:09.000000000 -0400
4 +++ linux-2.6.32.13/arch/mips/bcm63xx/boards/board_bcm963xx.c 2010-05-27 21:46:39.000000000 -0400
6 #include <linux/ssb/ssb.h>
7 #include <linux/gpio_buttons.h>
8 #include <linux/input.h>
9 +#include <linux/nxp_74hc164.h>
10 #include <asm/addrspace.h>
11 #include <bcm63xx_board.h>
12 #include <bcm63xx_cpu.h>
15 #define PFX "board_bcm963xx: "
17 +#define NEUFBOX4_PID_OFFSET 0xff80
18 +#define NEUFBOX4_EXP_GPIO_BASE 64
19 +#define NEUFBOX4_GPIO_74HC164_DATA 7
20 +#define NEUFBOX4_GPIO_74HC164_CLK 6
21 +#define NXP_74HC64_GPIO(X) (NEUFBOX4_EXP_GPIO_BASE + (X))
23 static struct bcm963xx_nvram nvram;
24 static unsigned int mac_addr_used;
25 static struct board_info board;
31 +static struct nxp_74hc164_platform_data neufbox4_74hc164_data = {
32 + .gpio_base = NEUFBOX4_EXP_GPIO_BASE,
33 + .gpio_pin_data = NEUFBOX4_GPIO_74HC164_DATA,
34 + .gpio_pin_clk = NEUFBOX4_GPIO_74HC164_CLK,
38 +static struct platform_device neufbox4_74hc164 = {
39 + .name = NXP_74HC164_DRIVER_NAME,
42 + .platform_data = &neufbox4_74hc164_data,
46 +static struct platform_device * __initdata neufbox4_devices[] = {
50 +static struct board_info __initdata board_nb4_ser_r0 = {
51 + .name = "NB4-SER-r0",
52 + .expected_cpu_id = 0x6358,
60 + .use_internal_phy = 1,
64 + .force_speed_100 = 1,
65 + .force_duplex_full = 1,
78 + .gpio = NXP_74HC64_GPIO(4),
88 + .gpio = NXP_74HC64_GPIO(3),
93 + .gpio = NXP_74HC64_GPIO(2),
103 + .gpio = NXP_74HC64_GPIO(0),
107 + .name = "service:red",
112 + .name = "service:green",
117 + .name = "service:blue",
127 + .code = KEY_RESTART,
134 + .code = KEY_WPS_BUTTON,
138 + .devs = neufbox4_devices,
139 + .num_devs = ARRAY_SIZE(neufbox4_devices),
142 +static struct board_info __initdata board_nb4_ser_r1 = {
143 + .name = "NB4-SER-r1",
144 + .expected_cpu_id = 0x6358,
152 + .use_internal_phy = 1,
156 + .force_speed_100 = 1,
157 + .force_duplex_full = 1,
170 + .gpio = NXP_74HC64_GPIO(4),
180 + .gpio = NXP_74HC64_GPIO(3),
185 + .gpio = NXP_74HC64_GPIO(2),
195 + .gpio = NXP_74HC64_GPIO(0),
199 + .name = "service:red",
204 + .name = "service:green",
209 + .name = "service:blue",
219 + .code = KEY_RESTART,
226 + .code = KEY_WPS_BUTTON,
230 + .devs = neufbox4_devices,
231 + .num_devs = ARRAY_SIZE(neufbox4_devices),
234 +static struct board_info __initdata board_nb4_ser_r2 = {
235 + .name = "NB4-SER-r2",
236 + .expected_cpu_id = 0x6358,
244 + .use_internal_phy = 1,
248 + .force_speed_100 = 1,
249 + .force_duplex_full = 1,
260 + .gpio = NXP_74HC64_GPIO(4),
270 + .gpio = NXP_74HC64_GPIO(3),
275 + .gpio = NXP_74HC64_GPIO(2),
285 + .gpio = NXP_74HC64_GPIO(0),
289 + .name = "service:red",
294 + .name = "service:green",
299 + .name = "service:blue",
309 + .code = KEY_RESTART,
316 + .code = KEY_WPS_BUTTON,
320 + .devs = neufbox4_devices,
321 + .num_devs = ARRAY_SIZE(neufbox4_devices),
324 +static struct board_info __initdata board_nb4_fxc_r1 = {
325 + .name = "NB4-FXC-r1",
326 + .expected_cpu_id = 0x6358,
334 + .use_internal_phy = 1,
338 + .force_speed_100 = 1,
339 + .force_duplex_full = 1,
352 + .gpio = NXP_74HC64_GPIO(4),
361 + .gpio = NXP_74HC64_GPIO(3),
366 + .gpio = NXP_74HC64_GPIO(2),
375 + .gpio = NXP_74HC64_GPIO(0),
379 + .name = "service:red",
383 + .name = "service:green",
387 + .name = "service:blue",
396 + .code = KEY_RESTART,
403 + .code = KEY_WPS_BUTTON,
407 + .devs = neufbox4_devices,
408 + .num_devs = ARRAY_SIZE(neufbox4_devices),
411 +static struct board_info __initdata board_nb4_fxc_r2 = {
412 + .name = "NB4-FXC-r2",
413 + .expected_cpu_id = 0x6358,
421 + .use_internal_phy = 1,
425 + .force_speed_100 = 1,
426 + .force_duplex_full = 1,
437 + .gpio = NXP_74HC64_GPIO(4),
446 + .gpio = NXP_74HC64_GPIO(3),
451 + .gpio = NXP_74HC64_GPIO(2),
460 + .gpio = NXP_74HC64_GPIO(0),
464 + .name = "service:red",
468 + .name = "service:green",
472 + .name = "service:blue",
481 + .code = KEY_RESTART,
488 + .code = KEY_WPS_BUTTON,
492 + .devs = neufbox4_devices,
493 + .num_devs = ARRAY_SIZE(neufbox4_devices),
498 @@ -727,9 +1199,30 @@
510 +static void __init neufbox4_nvram_fixup(void)
515 + if (BCMCPU_IS_6358() && (!strcmp(nvram.name, "96358VW"))) {
516 + val = bcm_mpi_readl(MPI_CSBASE_REG(0));
517 + val &= MPI_CSBASE_BASE_MASK;
518 + boot_addr = (u8 *)KSEG1ADDR(val);
519 + /* Extract neufbox4 PID */
520 + p = boot_addr + NEUFBOX4_PID_OFFSET;
521 + if (!memcmp(p, "NB4-", 4))
522 + memcpy(nvram.name, p, sizeof("NB4-XXX-rX"));
527 * early init callback, read nvram data from flash and checksum it
533 + /* Fixup broken neufbox4 board name */
534 + neufbox4_nvram_fixup();
536 /* find board by name */
537 for (i = 0; i < ARRAY_SIZE(bcm963xx_boards); i++) {
538 if (strncmp(nvram.name, bcm963xx_boards[i]->name,
539 Index: linux-2.6.32.13/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
540 ===================================================================
541 --- linux-2.6.32.13.orig/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h 2010-05-27 21:44:35.000000000 -0400
542 +++ linux-2.6.32.13/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h 2010-05-27 21:47:03.000000000 -0400
544 struct bcm63xx_dsp_platform_data dsp;
547 - struct gpio_led leds[5];
548 + struct gpio_led leds[9];
551 struct gpio_button buttons[2];