brcm63xx: add initial support for BCM6318
[openwrt.git] / target / linux / brcm63xx / patches-3.10 / 415-MIPS-BCM63XX-store-the-flash-type-in-global-variable.patch
index 18f60332f5f21c204ee5a4fcdbed1dfc1aa0cc2e..31071f99b5f86a63b56f286018eac90a89e1c528 100644 (file)
@@ -19,7 +19,17 @@ Subject: [PATCH 38/59] MIPS: BCM63XX: store the flash type in global variable
  static struct mtd_partition mtd_partitions[] = {
        {
                .name           = "cfe",
-@@ -86,21 +88,24 @@ static int __init bcm63xx_detect_flash_t
+@@ -81,7 +83,8 @@ static int __init bcm63xx_detect_flash_t
+       case BCM6318_CPU_ID:
+               /* only support serial flash */
+               bcm63xx_spi_flash_info[0].max_speed_hz = 62500000;
+-              return BCM63XX_FLASH_TYPE_SERIAL;
++              bcm63xx_attached_flash = BCM63XX_FLASH_TYPE_SERIAL;
++              break;
+       case BCM6328_CPU_ID:
+               val = bcm_misc_readl(MISC_STRAPBUS_6328_REG);
+               if (val & STRAPBUS_6328_HSSPI_CLK_FAST)
+@@ -90,21 +93,24 @@ static int __init bcm63xx_detect_flash_t
                        bcm63xx_spi_flash_info[0].max_speed_hz = 16666667;
  
                if (val & STRAPBUS_6328_BOOT_SEL_SERIAL)
@@ -49,7 +59,7 @@ Subject: [PATCH 38/59] MIPS: BCM63XX: store the flash type in global variable
        case BCM6362_CPU_ID:
                val = bcm_misc_readl(MISC_STRAPBUS_6362_REG);
                if (val & STRAPBUS_6362_HSSPI_CLK_FAST)
-@@ -109,9 +114,10 @@ static int __init bcm63xx_detect_flash_t
+@@ -113,9 +119,10 @@ static int __init bcm63xx_detect_flash_t
                        bcm63xx_spi_flash_info[0].max_speed_hz = 20000000;
  
                if (val & STRAPBUS_6362_BOOT_SEL_SERIAL)
@@ -62,7 +72,7 @@ Subject: [PATCH 38/59] MIPS: BCM63XX: store the flash type in global variable
        case BCM6368_CPU_ID:
                val = bcm_gpio_readl(GPIO_STRAPBUS_REG);
                if (val & STRAPBUS_6368_SPI_CLK_FAST)
-@@ -119,11 +125,16 @@ static int __init bcm63xx_detect_flash_t
+@@ -123,11 +130,16 @@ static int __init bcm63xx_detect_flash_t
  
                switch (val & STRAPBUS_6368_BOOT_SEL_MASK) {
                case STRAPBUS_6368_BOOT_SEL_NAND:
@@ -82,7 +92,7 @@ Subject: [PATCH 38/59] MIPS: BCM63XX: store the flash type in global variable
                }
        case BCM63268_CPU_ID:
                val = bcm_misc_readl(MISC_STRAPBUS_63268_REG);
-@@ -133,22 +144,24 @@ static int __init bcm63xx_detect_flash_t
+@@ -137,22 +149,24 @@ static int __init bcm63xx_detect_flash_t
                        bcm63xx_spi_flash_info[0].max_speed_hz = 20000000;
  
                if (val & STRAPBUS_63268_BOOT_SEL_SERIAL)
@@ -112,7 +122,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));
-@@ -172,7 +185,7 @@ int __init bcm63xx_flash_register(void)
+@@ -177,7 +191,7 @@ int __init bcm63xx_flash_register(void)
                return -ENODEV;
        default:
                pr_err("flash detection failed for BCM%x: %d\n",