summaryrefslogtreecommitdiff
path: root/target/linux/brcm63xx/patches-3.10/418-MIPS-BCM63XX-pass-caldata-info-to-flash.patch
diff options
context:
space:
mode:
authorJonas Gorski <jogo@openwrt.org>2014-01-13 12:14:12 +0000
committerJonas Gorski <jogo@openwrt.org>2014-01-13 12:14:12 +0000
commit1315058bda5b83bbb7f5a08319b69240dc957f14 (patch)
treeaf1dd5b1e3d09785cd1a38eab91126fd7013197b /target/linux/brcm63xx/patches-3.10/418-MIPS-BCM63XX-pass-caldata-info-to-flash.patch
parent4aa92df0d84d7e0bbafb15111bb3baa1ae3bf1de (diff)
downloadmtk-20170518-1315058bda5b83bbb7f5a08319b69240dc957f14.zip
mtk-20170518-1315058bda5b83bbb7f5a08319b69240dc957f14.tar.gz
mtk-20170518-1315058bda5b83bbb7f5a08319b69240dc957f14.tar.bz2
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/418-MIPS-BCM63XX-pass-caldata-info-to-flash.patch')
-rw-r--r--target/linux/brcm63xx/patches-3.10/418-MIPS-BCM63XX-pass-caldata-info-to-flash.patch17
1 files changed, 9 insertions, 8 deletions
diff --git a/target/linux/brcm63xx/patches-3.10/418-MIPS-BCM63XX-pass-caldata-info-to-flash.patch b/target/linux/brcm63xx/patches-3.10/418-MIPS-BCM63XX-pass-caldata-info-to-flash.patch
index 4b07060..e6f4800 100644
--- a/target/linux/brcm63xx/patches-3.10/418-MIPS-BCM63XX-pass-caldata-info-to-flash.patch
+++ b/target/linux/brcm63xx/patches-3.10/418-MIPS-BCM63XX-pass-caldata-info-to-flash.patch
@@ -46,8 +46,8 @@ Subject: [PATCH 69/80] MIPS: BCM63XX: pass caldata info to flash
};
static struct spi_board_info bcm63xx_spi_flash_info[] = {
-@@ -159,10 +163,13 @@ static int __init bcm63xx_detect_flash_t
- return 0;
+@@ -189,9 +193,13 @@ void __init bcm63xx_flash_detect(void)
+ }
}
-int __init bcm63xx_flash_register(void)
@@ -55,12 +55,12 @@ Subject: [PATCH 69/80] MIPS: BCM63XX: pass caldata info to flash
{
u32 val;
+ unsigned int i;
-
++
+ for (i = 0; i < num_caldata; i++)
+ bcm63xx_parser_data.caldata[i] = caldata[i].caldata_offset;
- bcm63xx_detect_flash_type();
-
+ switch (flash_type) {
+ case BCM63XX_FLASH_TYPE_PARALLEL:
--- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_flash.h
+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_flash.h
@@ -1,6 +1,8 @@
@@ -72,11 +72,12 @@ Subject: [PATCH 69/80] MIPS: BCM63XX: pass caldata info to flash
enum {
BCM63XX_FLASH_TYPE_PARALLEL,
BCM63XX_FLASH_TYPE_SERIAL,
-@@ -9,6 +11,6 @@ enum {
+@@ -9,7 +11,7 @@ enum {
- extern int bcm63xx_attached_flash;
+ void bcm63xx_flash_detect(void);
-int __init bcm63xx_flash_register(void);
+int __init bcm63xx_flash_register(int num_caldata, struct ath9k_caldata *caldata);
- #endif /* __BCM63XX_FLASH_H */
+ int bcm63xx_flash_get_type(void);
+