summaryrefslogtreecommitdiff
path: root/target/linux/brcm63xx/patches-3.3/501-board-NB4.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/brcm63xx/patches-3.3/501-board-NB4.patch')
-rw-r--r--target/linux/brcm63xx/patches-3.3/501-board-NB4.patch131
1 files changed, 104 insertions, 27 deletions
diff --git a/target/linux/brcm63xx/patches-3.3/501-board-NB4.patch b/target/linux/brcm63xx/patches-3.3/501-board-NB4.patch
index beb8f33b69..2f96f4b1e3 100644
--- a/target/linux/brcm63xx/patches-3.3/501-board-NB4.patch
+++ b/target/linux/brcm63xx/patches-3.3/501-board-NB4.patch
@@ -22,7 +22,7 @@
static struct board_info board;
/*
-@@ -666,6 +674,496 @@ static struct board_info __initdata boar
+@@ -666,6 +674,586 @@ static struct board_info __initdata boar
.has_ohci0 = 1,
};
@@ -139,6 +139,7 @@
+ .gpio = 34,
+ .type = EV_KEY,
+ .code = KEY_RESTART,
++ .active_low = 1,
+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
+ },
+ {
@@ -146,6 +147,23 @@
+ .gpio = 37,
+ .type = EV_KEY,
+ .code = KEY_WPS_BUTTON,
++ .active_low = 1,
++ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
++ },
++ {
++ .desc = "service",
++ .gpio = 27,
++ .type = EV_KEY,
++ .code = BTN_0,
++ .active_low = 1,
++ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
++ },
++ {
++ .desc = "clip",
++ .gpio = 31,
++ .type = EV_KEY,
++ .code = BTN_1,
++ .active_low = 1,
+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
+ },
+ },
@@ -232,6 +250,7 @@
+ .gpio = 34,
+ .type = EV_KEY,
+ .code = KEY_RESTART,
++ .active_low = 1,
+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
+ },
+ {
@@ -239,6 +258,23 @@
+ .gpio = 37,
+ .type = EV_KEY,
+ .code = KEY_WPS_BUTTON,
++ .active_low = 1,
++ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
++ },
++ {
++ .desc = "service",
++ .gpio = 27,
++ .type = EV_KEY,
++ .code = BTN_0,
++ .active_low = 1,
++ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
++ },
++ {
++ .desc = "clip",
++ .gpio = 31,
++ .type = EV_KEY,
++ .code = BTN_1,
++ .active_low = 1,
+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
+ },
+ },
@@ -325,6 +361,7 @@
+ .gpio = 34,
+ .type = EV_KEY,
+ .code = KEY_RESTART,
++ .active_low = 1,
+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
+ },
+ {
@@ -332,6 +369,23 @@
+ .gpio = 37,
+ .type = EV_KEY,
+ .code = KEY_WPS_BUTTON,
++ .active_low = 1,
++ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
++ },
++ {
++ .desc = "service",
++ .gpio = 27,
++ .type = EV_KEY,
++ .code = BTN_0,
++ .active_low = 1,
++ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
++ },
++ {
++ .desc = "clip",
++ .gpio = 31,
++ .type = EV_KEY,
++ .code = BTN_1,
++ .active_low = 1,
+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
+ },
+ },
@@ -413,6 +467,7 @@
+ .gpio = 34,
+ .type = EV_KEY,
+ .code = KEY_RESTART,
++ .active_low = 1,
+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
+ },
+ {
@@ -420,6 +475,23 @@
+ .gpio = 37,
+ .type = EV_KEY,
+ .code = KEY_WPS_BUTTON,
++ .active_low = 1,
++ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
++ },
++ {
++ .desc = "service",
++ .gpio = 27,
++ .type = EV_KEY,
++ .code = BTN_0,
++ .active_low = 1,
++ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
++ },
++ {
++ .desc = "clip",
++ .gpio = 31,
++ .type = EV_KEY,
++ .code = BTN_1,
++ .active_low = 1,
+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
+ },
+ },
@@ -501,6 +573,7 @@
+ .gpio = 34,
+ .type = EV_KEY,
+ .code = KEY_RESTART,
++ .active_low = 1,
+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
+ },
+ {
@@ -508,6 +581,23 @@
+ .gpio = 37,
+ .type = EV_KEY,
+ .code = KEY_WPS_BUTTON,
++ .active_low = 1,
++ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
++ },
++ {
++ .desc = "service",
++ .gpio = 27,
++ .type = EV_KEY,
++ .code = BTN_0,
++ .active_low = 1,
++ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
++ },
++ {
++ .desc = "clip",
++ .gpio = 31,
++ .type = EV_KEY,
++ .code = BTN_1,
++ .active_low = 1,
+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
+ },
+ },
@@ -519,7 +609,7 @@
#endif
/*
-@@ -696,9 +1194,31 @@ static const struct board_info __initdat
+@@ -696,6 +1284,11 @@ static const struct board_info __initdat
&board_96358vw2,
&board_AGPFS0,
&board_DWVS0,
@@ -531,33 +621,20 @@
#endif
};
-+static void __init nb4_nvram_fixup(void)
-+{
-+ u8 *boot_addr, *p;
-+ u32 val;
-+ char *board_name = (char *)bcm63xx_nvram_get_name();
-+
+@@ -750,6 +1343,16 @@ static void __init boardid_fixup(u8 *boo
+ struct bcm_tag *tag = (struct bcm_tag *)(boot_addr + CFE_OFFSET_64K);
+ char *board_name = (char *)bcm63xx_nvram_get_name();
+
+ if (BCMCPU_IS_6358() && (!strcmp(board_name, "96358VW"))) {
-+ val = bcm_mpi_readl(MPI_CSBASE_REG(0));
-+ val &= MPI_CSBASE_BASE_MASK;
-+ boot_addr = (u8 *)KSEG1ADDR(val);
++ u8 *p = boot_addr + NB4_PID_OFFSET;
++
+ /* Extract nb4 PID */
-+ p = boot_addr + NB4_PID_OFFSET;
-+ if (!memcmp(p, "NB4-", 4))
++ if (!memcmp(p, "NB4-", 4)) {
+ memcpy(board_name, p, sizeof("NB4-XXX-rX"));
++ return;
++ }
+ }
-+}
-+
- /*
- * Register a sane SPROMv2 to make the on-board
- * bcm4318 WLAN work
-@@ -810,6 +1330,9 @@ void __init board_prom_init(void)
- boardid_fixup(boot_addr);
- }
-
-+ /* Fixup broken nb4 board name */
-+ nb4_nvram_fixup();
+
- board_name = bcm63xx_nvram_get_name();
- /* find board by name */
- for (i = 0; i < ARRAY_SIZE(bcm963xx_boards); i++) {
+ /* check if bcm_tag is at 64k offset */
+ if (strncmp(board_name, tag->boardid, BOARDID_LEN) != 0) {
+ /* else try 128k */