diff options
author | Jonas Gorski <jogo@openwrt.org> | 2014-01-13 12:14:12 +0000 |
---|---|---|
committer | Jonas Gorski <jogo@openwrt.org> | 2014-01-13 12:14:12 +0000 |
commit | 1315058bda5b83bbb7f5a08319b69240dc957f14 (patch) | |
tree | af1dd5b1e3d09785cd1a38eab91126fd7013197b /target/linux/brcm63xx/patches-3.10/411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch | |
parent | 4aa92df0d84d7e0bbafb15111bb3baa1ae3bf1de (diff) | |
download | upstream-1315058bda5b83bbb7f5a08319b69240dc957f14.tar.gz upstream-1315058bda5b83bbb7f5a08319b69240dc957f14.tar.bz2 upstream-1315058bda5b83bbb7f5a08319b69240dc957f14.zip |
brcm63xx: fix spi flash setup on (at least) some reference boards
CFE seems to leave the SPI flash mapping in an invalid state after
loading the kernel on some reference boards, so fix it up on boot.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 39273
Diffstat (limited to 'target/linux/brcm63xx/patches-3.10/411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch')
-rw-r--r-- | target/linux/brcm63xx/patches-3.10/411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/target/linux/brcm63xx/patches-3.10/411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch b/target/linux/brcm63xx/patches-3.10/411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch index 1c99f28ab4..696c9a884a 100644 --- a/target/linux/brcm63xx/patches-3.10/411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch +++ b/target/linux/brcm63xx/patches-3.10/411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch @@ -24,7 +24,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com> #include <bcm63xx_regs.h> #include <bcm63xx_io.h> -@@ -55,6 +58,21 @@ static struct platform_device mtd_dev = +@@ -57,6 +60,21 @@ static struct platform_device mtd_dev = }, }; @@ -46,7 +46,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com> static int __init bcm63xx_detect_flash_type(void) { u32 val; -@@ -62,9 +80,15 @@ static int __init bcm63xx_detect_flash_t +@@ -64,9 +82,15 @@ static int __init bcm63xx_detect_flash_t switch (bcm63xx_get_cpu_id()) { case BCM6318_CPU_ID: /* only support serial flash */ @@ -62,7 +62,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com> if (val & STRAPBUS_6328_BOOT_SEL_SERIAL) return BCM63XX_FLASH_TYPE_SERIAL; else -@@ -83,12 +107,20 @@ static int __init bcm63xx_detect_flash_t +@@ -85,12 +109,20 @@ static int __init bcm63xx_detect_flash_t return BCM63XX_FLASH_TYPE_SERIAL; case BCM6362_CPU_ID: val = bcm_misc_readl(MISC_STRAPBUS_6362_REG); @@ -83,7 +83,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com> switch (val & STRAPBUS_6368_BOOT_SEL_MASK) { case STRAPBUS_6368_BOOT_SEL_NAND: return BCM63XX_FLASH_TYPE_NAND; -@@ -99,6 +131,11 @@ static int __init bcm63xx_detect_flash_t +@@ -101,6 +133,11 @@ static int __init bcm63xx_detect_flash_t } case BCM63268_CPU_ID: val = bcm_misc_readl(MISC_STRAPBUS_63268_REG); @@ -95,7 +95,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com> if (val & STRAPBUS_63268_BOOT_SEL_SERIAL) return BCM63XX_FLASH_TYPE_SERIAL; else -@@ -126,8 +163,15 @@ int __init bcm63xx_flash_register(void) +@@ -167,8 +204,15 @@ int __init bcm63xx_flash_register(void) return platform_device_register(&mtd_dev); case BCM63XX_FLASH_TYPE_SERIAL: @@ -123,7 +123,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com> #define STRAPBUS_6368_BOOT_SEL_MASK 0x3 #define STRAPBUS_6368_BOOT_SEL_NAND 0 #define STRAPBUS_6368_BOOT_SEL_SERIAL 1 -@@ -1667,6 +1668,7 @@ +@@ -1668,6 +1669,7 @@ #define STRAPBUS_63268_FCVO_MASK (0xf << STRAPBUS_63268_FCVO_SHIFT) #define MISC_STRAPBUS_6328_REG 0x240 |