From d5aad481bbdf187e7c9bcc788dbca08fbdc6ef53 Mon Sep 17 00:00:00 2001 From: Jonas Gorski Date: Mon, 13 Jan 2014 12:14:12 +0000 Subject: 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 git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39273 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'target/linux/brcm63xx/patches-3.10/411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch') 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 #include #include -@@ -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 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 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 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 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 #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 -- cgit v1.2.3