aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/patches-3.8/020-ssb_update.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-05-23 18:48:31 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-05-23 18:48:31 +0000
commit32d1e0ed2c3ec748bf7759a31d363e38d15b2424 (patch)
tree07e49ab1a6a3dea83b0d20c0ae08311edbd74040 /target/linux/generic/patches-3.8/020-ssb_update.patch
parent5c7713eb3a3e19e032c0ecaf6d83e73e7119b01b (diff)
downloadupstream-32d1e0ed2c3ec748bf7759a31d363e38d15b2424.tar.gz
upstream-32d1e0ed2c3ec748bf7759a31d363e38d15b2424.tar.bz2
upstream-32d1e0ed2c3ec748bf7759a31d363e38d15b2424.zip
kernel: add a ssb backport required for a new mac80211 update
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 40833
Diffstat (limited to 'target/linux/generic/patches-3.8/020-ssb_update.patch')
-rw-r--r--target/linux/generic/patches-3.8/020-ssb_update.patch33
1 files changed, 24 insertions, 9 deletions
diff --git a/target/linux/generic/patches-3.8/020-ssb_update.patch b/target/linux/generic/patches-3.8/020-ssb_update.patch
index 95a224600b..4dd5dad169 100644
--- a/target/linux/generic/patches-3.8/020-ssb_update.patch
+++ b/target/linux/generic/patches-3.8/020-ssb_update.patch
@@ -104,7 +104,7 @@
}
if (updown_tab) {
-@@ -526,8 +524,8 @@ void ssb_pmu_init(struct ssb_chipcommon
+@@ -526,8 +524,8 @@ void ssb_pmu_init(struct ssb_chipcommon
pmucap = chipco_read32(cc, SSB_CHIPCO_PMU_CAP);
cc->pmu.rev = (pmucap & SSB_CHIPCO_PMU_CAP_REVISION);
@@ -151,7 +151,7 @@
return 0;
}
}
-@@ -692,8 +687,23 @@ void ssb_pmu_spuravoid_pllupdate(struct
+@@ -692,8 +687,23 @@ void ssb_pmu_spuravoid_pllupdate(struct
pmu_ctl = SSB_CHIPCO_PMU_CTL_PLL_UPD;
break;
case 43222:
@@ -346,7 +346,7 @@
+}
--- a/drivers/ssb/driver_gpio.c
+++ b/drivers/ssb/driver_gpio.c
-@@ -74,6 +74,16 @@ static void ssb_gpio_chipco_free(struct
+@@ -74,6 +74,16 @@ static void ssb_gpio_chipco_free(struct
ssb_chipco_gpio_pullup(&bus->chipco, 1 << gpio, 0);
}
@@ -465,7 +465,7 @@
}
static void dump_irq(struct ssb_bus *bus)
-@@ -189,34 +210,43 @@ static void ssb_mips_serial_init(struct
+@@ -189,34 +210,43 @@ static void ssb_mips_serial_init(struct
static void ssb_mips_flash_detect(struct ssb_mipscore *mcore)
{
struct ssb_bus *bus = mcore->dev->bus;
@@ -993,7 +993,7 @@
SPEX(alpha2[0], SSB_SPROM8_CCODE, 0xff00, 8);
SPEX(alpha2[1], SSB_SPROM8_CCODE, 0x00ff, 0);
SPEX(boardflags_lo, SSB_SPROM8_BFLLO, 0xFFFF, 0);
-@@ -743,7 +753,7 @@ static int sprom_extract(struct ssb_bus
+@@ -743,7 +753,7 @@ static int sprom_extract(struct ssb_bus
memset(out, 0, sizeof(*out));
out->revision = in[size - 1] & 0x00FF;
@@ -1002,7 +1002,7 @@
memset(out->et0mac, 0xFF, 6); /* preset et0 and et1 mac */
memset(out->et1mac, 0xFF, 6);
-@@ -752,7 +762,7 @@ static int sprom_extract(struct ssb_bus
+@@ -752,7 +762,7 @@ static int sprom_extract(struct ssb_bus
* number stored in the SPROM.
* Always extract r1. */
out->revision = 1;
@@ -1011,7 +1011,7 @@
}
switch (out->revision) {
-@@ -769,9 +779,8 @@ static int sprom_extract(struct ssb_bus
+@@ -769,9 +779,8 @@ static int sprom_extract(struct ssb_bus
sprom_extract_r8(out, in);
break;
default:
@@ -1382,7 +1382,7 @@
extern u32 ssb_extif_watchdog_timer_set_ms(struct bcm47xx_wdt *wdt, u32 ms);
--- a/include/linux/ssb/ssb.h
+++ b/include/linux/ssb/ssb.h
-@@ -26,9 +26,9 @@ struct ssb_sprom_core_pwr_info {
+@@ -26,13 +26,14 @@ struct ssb_sprom_core_pwr_info {
struct ssb_sprom {
u8 revision;
@@ -1395,7 +1395,12 @@
u8 et0phyaddr; /* MII address for enet0 */
u8 et1phyaddr; /* MII address for enet1 */
u8 et0mdcport; /* MDIO for enet0 */
-@@ -340,13 +340,61 @@ enum ssb_bustype {
+ u8 et1mdcport; /* MDIO for enet1 */
++ u16 dev_id; /* Device ID overriding e.g. PCI ID */
+ u16 board_rev; /* Board revision number from SPROM. */
+ u16 board_num; /* Board number from SPROM. */
+ u16 board_type; /* Board type from SPROM. */
+@@ -340,13 +341,61 @@ enum ssb_bustype {
#define SSB_BOARDVENDOR_DELL 0x1028 /* Dell */
#define SSB_BOARDVENDOR_HP 0x0E11 /* HP */
/* board_type */
@@ -1572,3 +1577,13 @@
#define SSB_SPROM4_AGAIN01 0x005E /* Antenna Gain (in dBm Q5.2) */
#define SSB_SPROM4_AGAIN0 0x00FF /* Antenna 0 */
#define SSB_SPROM4_AGAIN0_SHIFT 0
+--- a/arch/mips/bcm47xx/sprom.c
++++ b/arch/mips/bcm47xx/sprom.c
+@@ -168,6 +168,7 @@ static void nvram_read_alpha2(const char
+ static void bcm47xx_fill_sprom_r1234589(struct ssb_sprom *sprom,
+ const char *prefix, bool fallback)
+ {
++ nvram_read_u16(prefix, NULL, "devid", &sprom->dev_id, 0, fallback);
+ nvram_read_u8(prefix, NULL, "ledbh0", &sprom->gpio0, 0xff, fallback);
+ nvram_read_u8(prefix, NULL, "ledbh1", &sprom->gpio1, 0xff, fallback);
+ nvram_read_u8(prefix, NULL, "ledbh2", &sprom->gpio2, 0xff, fallback);