diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2012-02-18 23:08:26 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2012-02-18 23:08:26 +0000 |
commit | 1122b231f9c73fe30f3a8f270b7ef5d74a43c80b (patch) | |
tree | efeeb2d48e27286ddebc04d643f24feace440ae4 /target/linux/brcm47xx/patches-3.2/0043-bcma-add-extra-sprom-check.patch | |
parent | 990ed96a2ab91fec04dcac5b897faad74194ef2f (diff) | |
download | upstream-1122b231f9c73fe30f3a8f270b7ef5d74a43c80b.tar.gz upstream-1122b231f9c73fe30f3a8f270b7ef5d74a43c80b.tar.bz2 upstream-1122b231f9c73fe30f3a8f270b7ef5d74a43c80b.zip |
brcm47xx: sprom for nvram parsing
This adds support for parsing sprom form nvram for sprom version form 1 to 9.
It also adds sprom from nvram support for devices on the bcma bus.
SVN-Revision: 30638
Diffstat (limited to 'target/linux/brcm47xx/patches-3.2/0043-bcma-add-extra-sprom-check.patch')
-rw-r--r-- | target/linux/brcm47xx/patches-3.2/0043-bcma-add-extra-sprom-check.patch | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/target/linux/brcm47xx/patches-3.2/0043-bcma-add-extra-sprom-check.patch b/target/linux/brcm47xx/patches-3.2/0043-bcma-add-extra-sprom-check.patch index 0dd1968150..3ae5711535 100644 --- a/target/linux/brcm47xx/patches-3.2/0043-bcma-add-extra-sprom-check.patch +++ b/target/linux/brcm47xx/patches-3.2/0043-bcma-add-extra-sprom-check.patch @@ -14,7 +14,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> --- a/drivers/bcma/sprom.c +++ b/drivers/bcma/sprom.c -@@ -210,6 +210,7 @@ int bcma_sprom_get(struct bcma_bus *bus) +@@ -209,6 +209,7 @@ int bcma_sprom_get(struct bcma_bus *bus) { u16 offset; u16 *sprom; @@ -22,14 +22,13 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> int err = 0; if (!bus->drv_cc.core) -@@ -220,6 +221,13 @@ int bcma_sprom_get(struct bcma_bus *bus) +@@ -217,6 +218,12 @@ int bcma_sprom_get(struct bcma_bus *bus) + if (!(bus->drv_cc.capabilities & BCMA_CC_CAP_SPROM)) return -ENOENT; - } + if (bus->drv_cc.core->id.rev >= 32) { + sromctrl = bcma_read32(bus->drv_cc.core, BCMA_CC_SROM_CONTROL); + if (!(sromctrl & BCMA_CC_SROM_CONTROL_PRESENT)) -+ random_ether_addr(bus->sprom.il0mac); + return -ENOENT; + } + |