aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm63xx/patches-4.1/411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch
diff options
context:
space:
mode:
authorJonas Gorski <jogo@openwrt.org>2015-08-23 09:35:56 +0000
committerJonas Gorski <jogo@openwrt.org>2015-08-23 09:35:56 +0000
commitecdce239a54b7a4c4aa760a659c13642e1817326 (patch)
tree83539a5e69d1d9b9dddad0f3ad5f66aeb8cb02ed /target/linux/brcm63xx/patches-4.1/411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch
parent0d54d4434978a616ac76ba7893e52b32385c4575 (diff)
downloadupstream-ecdce239a54b7a4c4aa760a659c13642e1817326.tar.gz
upstream-ecdce239a54b7a4c4aa760a659c13642e1817326.tar.bz2
upstream-ecdce239a54b7a4c4aa760a659c13642e1817326.zip
brcm63xx: ensure dummy byte is set for mapped spi flash with fast read
Some CFEs seem to misconfigure the mapped memory flash access with fast read but without a dummy byte, causing all accesses to be prefixed with 0xff. This of course breaks reading out the nvram, so do not just move back to single i/o accessors, but also ensure that the dummy byte is correctly set. Signed-off-by: Jonas Gorski <jogo@openwrt.org> SVN-Revision: 46707
Diffstat (limited to 'target/linux/brcm63xx/patches-4.1/411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch')
-rw-r--r--target/linux/brcm63xx/patches-4.1/411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch14
1 files changed, 7 insertions, 7 deletions
diff --git a/target/linux/brcm63xx/patches-4.1/411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch b/target/linux/brcm63xx/patches-4.1/411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch
index 20453709c2..3a09563427 100644
--- a/target/linux/brcm63xx/patches-4.1/411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch
+++ b/target/linux/brcm63xx/patches-4.1/411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch
@@ -11,10 +11,10 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
--- a/arch/mips/bcm63xx/dev-flash.c
+++ b/arch/mips/bcm63xx/dev-flash.c
-@@ -16,9 +16,12 @@
- #include <linux/mtd/mtd.h>
+@@ -17,9 +17,12 @@
#include <linux/mtd/partitions.h>
#include <linux/mtd/physmap.h>
+ #include <linux/mtd/spi-nor.h>
+#include <linux/spi/spi.h>
+#include <linux/spi/flash.h>
@@ -24,7 +24,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
#include <bcm63xx_regs.h>
#include <bcm63xx_io.h>
-@@ -65,6 +68,21 @@ void __init bcm63xx_flash_force_phys_bas
+@@ -66,6 +69,21 @@ void __init bcm63xx_flash_force_phys_bas
mtd_resources[0].end = end;
}
@@ -46,7 +46,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
static int __init bcm63xx_detect_flash_type(void)
{
u32 val;
-@@ -72,9 +90,15 @@ static int __init bcm63xx_detect_flash_t
+@@ -73,9 +91,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
-@@ -93,12 +117,20 @@ static int __init bcm63xx_detect_flash_t
+@@ -94,12 +118,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;
-@@ -109,6 +141,11 @@ static int __init bcm63xx_detect_flash_t
+@@ -110,6 +142,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
-@@ -181,8 +218,15 @@ int __init bcm63xx_flash_register(void)
+@@ -195,8 +232,15 @@ int __init bcm63xx_flash_register(void)
return platform_device_register(&mtd_dev);
case BCM63XX_FLASH_TYPE_SERIAL: