X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=target%2Flinux%2Fbrcm63xx%2Fpatches-3.10%2F411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch;h=f5ef8a35f274e9631c022ae6c3630affb1360bc6;hb=d0ad8c00b6cc0716feae5d12c2ae5b4717c4ac29;hp=a740d4d1b59df04c16c69c5ec76545bb34d61ca8;hpb=bf4f1feb7a208c17c91011fb614a54f8f2440f26;p=oweals%2Fopenwrt.git 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 a740d4d1b5..f5ef8a35f2 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,9 +24,9 @@ Signed-off-by: Jonas Gorski #include #include -@@ -57,6 +60,21 @@ static struct platform_device mtd_dev = - }, - }; +@@ -63,6 +66,21 @@ void __init bcm63xx_flash_force_phys_bas + mtd_resources[0].end = end; + } +static struct flash_platform_data bcm63xx_flash_data = { + .part_probe_types = bcm63xx_part_types, @@ -46,7 +46,7 @@ Signed-off-by: Jonas Gorski static int __init bcm63xx_detect_flash_type(void) { u32 val; -@@ -64,9 +82,15 @@ static int __init bcm63xx_detect_flash_t +@@ -70,9 +88,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 -@@ -85,12 +109,20 @@ static int __init bcm63xx_detect_flash_t +@@ -91,12 +115,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; -@@ -101,6 +133,11 @@ static int __init bcm63xx_detect_flash_t +@@ -107,6 +139,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 -@@ -167,8 +204,15 @@ int __init bcm63xx_flash_register(void) +@@ -176,8 +213,15 @@ int __init bcm63xx_flash_register(void) return platform_device_register(&mtd_dev); case BCM63XX_FLASH_TYPE_SERIAL: @@ -115,7 +115,7 @@ Signed-off-by: Jonas Gorski return -ENODEV; --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h -@@ -824,6 +824,7 @@ +@@ -827,6 +827,7 @@ #define GPIO_STRAPBUS_REG 0x40 #define STRAPBUS_6358_BOOT_SEL_PARALLEL (1 << 1) #define STRAPBUS_6358_BOOT_SEL_SERIAL (0 << 1) @@ -123,8 +123,8 @@ 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 -@@ -1682,6 +1683,7 @@ - #define STRAPBUS_63268_FCVO_MASK (0xf << STRAPBUS_63268_FCVO_SHIFT) +@@ -1697,6 +1698,7 @@ + #define IDDQ_CTRL_63268_USBH (1 << 4) #define MISC_STRAPBUS_6328_REG 0x240 +#define STRAPBUS_6328_HSSPI_CLK_FAST (1 << 4)