bcm63xx: fix hsspi flash registration for BCM6362
authorJonas Gorski <jogo@openwrt.org>
Thu, 2 May 2013 15:28:10 +0000 (15:28 +0000)
committerJonas Gorski <jogo@openwrt.org>
Thu, 2 May 2013 15:28:10 +0000 (15:28 +0000)
Use busnum 1 for HSSPI so it won't conflict on chips having both SPI
controllers.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 36524

target/linux/brcm63xx/patches-3.8/409-MIPS-BCM63XX-add-HS-SPI-platform-device-and-register.patch
target/linux/brcm63xx/patches-3.8/411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch

index d659d7af735bbafa26dc650f46b510755003de67..48774a3b05bd619dca7b9694270535370c05f5a2 100644 (file)
@@ -77,7 +77,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
 +};
 +
 +static struct bcm63xx_hsspi_pdata spi_pdata = {
-+      .bus_num        = 0,
++      .bus_num        = 1,
 +};
 +
 +static struct platform_device bcm63xx_hsspi_device = {
index b06213403d356e677d54ad25e76ee408713127c2..c82c409435fe06f30c2123fc211da3e50e90e848 100644 (file)
@@ -68,14 +68,16 @@ 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;
-@@ -116,8 +142,11 @@ int __init bcm63xx_flash_register(void)
+@@ -116,8 +142,13 @@ int __init bcm63xx_flash_register(void)
  
                return platform_device_register(&mtd_dev);
        case BCM63XX_FLASH_TYPE_SERIAL:
 -              pr_warn("unsupported serial flash detected\n");
 -              return -ENODEV;
-+              if (BCMCPU_IS_6328())
++              if (BCMCPU_IS_6328() || BCMCPU_IS_6362()) {
++                      bcm63xx_spi_flash_info[0].bus_num = 1;
 +                      bcm63xx_flash_data.max_transfer_len = HSSPI_BUFFER_LEN;
++              }
 +
 +              return spi_register_board_info(bcm63xx_spi_flash_info,
 +                                      ARRAY_SIZE(bcm63xx_spi_flash_info));