diff options
author | Jonas Gorski <jogo@openwrt.org> | 2014-01-13 12:12:50 +0000 |
---|---|---|
committer | Jonas Gorski <jogo@openwrt.org> | 2014-01-13 12:12:50 +0000 |
commit | d9d3c108635c56d2b3e3e88a0f2fc037d8e43917 (patch) | |
tree | 8f7668d5a1e51e5983451b658a42fa4958080dc0 | |
parent | 02c8d6aa273b56ea0991e4c7340468dcab1bf66c (diff) | |
download | master-187ad058-d9d3c108635c56d2b3e3e88a0f2fc037d8e43917.tar.gz master-187ad058-d9d3c108635c56d2b3e3e88a0f2fc037d8e43917.tar.bz2 master-187ad058-d9d3c108635c56d2b3e3e88a0f2fc037d8e43917.zip |
brcm63xx: spi flash on legacy spi controller needs the workaround
Fixes generic SPI flash accesses on BCM6358/BCM6368. BCM6338 still needs
additional fixes for M25P80, so it remains broken for now.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39266 3c298f89-4303-0410-b956-a3cf2f4a3e73
2 files changed, 5 insertions, 2 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 9f4e25d18a..516becdece 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 @@ -68,7 +68,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; -@@ -117,8 +143,11 @@ int __init bcm63xx_flash_register(void) +@@ -117,8 +143,14 @@ int __init bcm63xx_flash_register(void) return platform_device_register(&mtd_dev); case BCM63XX_FLASH_TYPE_SERIAL: @@ -77,6 +77,9 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com> + if (BCMCPU_IS_6328() || BCMCPU_IS_6362()) + bcm63xx_spi_flash_info[0].bus_num = 1; + ++ if (BCMCPU_IS_6358() || BCMCPU_IS_6368()) ++ bcm63xx_flash_data.max_transfer_len = SPI_6358_MSG_DATA_SIZE; ++ + return spi_register_board_info(bcm63xx_spi_flash_info, + ARRAY_SIZE(bcm63xx_spi_flash_info)); case BCM63XX_FLASH_TYPE_NAND: diff --git a/target/linux/brcm63xx/patches-3.10/415-MIPS-BCM63XX-store-the-flash-type-in-global-variable.patch b/target/linux/brcm63xx/patches-3.10/415-MIPS-BCM63XX-store-the-flash-type-in-global-variable.patch index a6cc6a111f..e7f8bf0f27 100644 --- a/target/linux/brcm63xx/patches-3.10/415-MIPS-BCM63XX-store-the-flash-type-in-global-variable.patch +++ b/target/linux/brcm63xx/patches-3.10/415-MIPS-BCM63XX-store-the-flash-type-in-global-variable.patch @@ -97,7 +97,7 @@ Subject: [PATCH 38/59] MIPS: BCM63XX: store the flash type in global variable case BCM63XX_FLASH_TYPE_PARALLEL: /* read base address of boot chip select (0) */ val = bcm_mpi_readl(MPI_CSBASE_REG(0)); -@@ -153,7 +166,7 @@ int __init bcm63xx_flash_register(void) +@@ -156,7 +169,7 @@ int __init bcm63xx_flash_register(void) return -ENODEV; default: pr_err("flash detection failed for BCM%x: %d\n", |