diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2012-03-14 21:48:23 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2012-03-14 21:48:23 +0000 |
commit | 7fee567dc04fe5614504e0d33f7c8aa46718ce2e (patch) | |
tree | 759f9d91a7405b67f98bd71876d3c815fa54d3d2 /target/linux/brcm47xx/patches-3.2/046-bcma-add-extra-sprom-check.patch | |
parent | fab5be9b4fe6132f474b302d5a5eace1f08497f9 (diff) | |
download | upstream-7fee567dc04fe5614504e0d33f7c8aa46718ce2e.tar.gz upstream-7fee567dc04fe5614504e0d33f7c8aa46718ce2e.tar.bz2 upstream-7fee567dc04fe5614504e0d33f7c8aa46718ce2e.zip |
brcm47xx: move and rename the patches
The patches are now grouped by the part what they are doing and are using three digest numbers.
This does not remove or adds anything
SVN-Revision: 30942
Diffstat (limited to 'target/linux/brcm47xx/patches-3.2/046-bcma-add-extra-sprom-check.patch')
-rw-r--r-- | target/linux/brcm47xx/patches-3.2/046-bcma-add-extra-sprom-check.patch | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/target/linux/brcm47xx/patches-3.2/046-bcma-add-extra-sprom-check.patch b/target/linux/brcm47xx/patches-3.2/046-bcma-add-extra-sprom-check.patch new file mode 100644 index 0000000000..3ae5711535 --- /dev/null +++ b/target/linux/brcm47xx/patches-3.2/046-bcma-add-extra-sprom-check.patch @@ -0,0 +1,62 @@ +From 1cd3d0de72e42161fe0df355c5429459265aeef0 Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens <hauke@hauke-m.de> +Date: Sat, 14 Jan 2012 16:11:17 +0100 +Subject: [PATCH 30/32] bcma: add extra sprom check + +This check is needed on the BCM43224 device as it says in the +capabilities it has an sprom but is extra check says it has not. + +Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> +--- + drivers/bcma/sprom.c | 8 ++++++++ + include/linux/bcma/bcma_driver_chipcommon.h | 16 ++++++++++++++++ + 2 files changed, 24 insertions(+), 0 deletions(-) + +--- a/drivers/bcma/sprom.c ++++ b/drivers/bcma/sprom.c +@@ -209,6 +209,7 @@ int bcma_sprom_get(struct bcma_bus *bus) + { + u16 offset; + u16 *sprom; ++ u32 sromctrl; + int err = 0; + + if (!bus->drv_cc.core) +@@ -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)) ++ return -ENOENT; ++ } ++ + sprom = kcalloc(SSB_SPROMSIZE_WORDS_R4, sizeof(u16), + GFP_KERNEL); + if (!sprom) +--- a/include/linux/bcma/bcma_driver_chipcommon.h ++++ b/include/linux/bcma/bcma_driver_chipcommon.h +@@ -239,6 +239,22 @@ + #define BCMA_CC_FLASH_CFG 0x0128 + #define BCMA_CC_FLASH_CFG_DS 0x0010 /* Data size, 0=8bit, 1=16bit */ + #define BCMA_CC_FLASH_WAITCNT 0x012C ++#define BCMA_CC_SROM_CONTROL 0x0190 ++#define BCMA_CC_SROM_CONTROL_START 0x80000000 ++#define BCMA_CC_SROM_CONTROL_BUSY 0x80000000 ++#define BCMA_CC_SROM_CONTROL_OPCODE 0x60000000 ++#define BCMA_CC_SROM_CONTROL_OP_READ 0x00000000 ++#define BCMA_CC_SROM_CONTROL_OP_WRITE 0x20000000 ++#define BCMA_CC_SROM_CONTROL_OP_WRDIS 0x40000000 ++#define BCMA_CC_SROM_CONTROL_OP_WREN 0x60000000 ++#define BCMA_CC_SROM_CONTROL_OTPSEL 0x00000010 ++#define BCMA_CC_SROM_CONTROL_LOCK 0x00000008 ++#define BCMA_CC_SROM_CONTROL_SIZE_MASK 0x00000006 ++#define BCMA_CC_SROM_CONTROL_SIZE_1K 0x00000000 ++#define BCMA_CC_SROM_CONTROL_SIZE_4K 0x00000002 ++#define BCMA_CC_SROM_CONTROL_SIZE_16K 0x00000004 ++#define BCMA_CC_SROM_CONTROL_SIZE_SHIFT 1 ++#define BCMA_CC_SROM_CONTROL_PRESENT 0x00000001 + /* 0x1E0 is defined as shared BCMA_CLKCTLST */ + #define BCMA_CC_HW_WORKAROUND 0x01E4 /* Hardware workaround (rev >= 20) */ + #define BCMA_CC_UART0_DATA 0x0300 |