Commit ab8ed982 authored by Jonas Gorski's avatar Jonas Gorski Committed by Ralf Baechle

MIPS: BCM63XX: add flash detection for BCM6362

BCM6362 support booting from SPI flash and NAND.
Signed-off-by: default avatarJonas Gorski <jogo@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/5012/Acked-by: default avatarJohn Crispin <blogic@openwrt.org>
parent a156ba61
...@@ -77,6 +77,12 @@ static int __init bcm63xx_detect_flash_type(void) ...@@ -77,6 +77,12 @@ static int __init bcm63xx_detect_flash_type(void)
return BCM63XX_FLASH_TYPE_PARALLEL; return BCM63XX_FLASH_TYPE_PARALLEL;
else else
return BCM63XX_FLASH_TYPE_SERIAL; return BCM63XX_FLASH_TYPE_SERIAL;
case BCM6362_CPU_ID:
val = bcm_misc_readl(MISC_STRAPBUS_6362_REG);
if (val & STRAPBUS_6362_BOOT_SEL_SERIAL)
return BCM63XX_FLASH_TYPE_SERIAL;
else
return BCM63XX_FLASH_TYPE_NAND;
case BCM6368_CPU_ID: case BCM6368_CPU_ID:
val = bcm_gpio_readl(GPIO_STRAPBUS_REG); val = bcm_gpio_readl(GPIO_STRAPBUS_REG);
switch (val & STRAPBUS_6368_BOOT_SEL_MASK) { switch (val & STRAPBUS_6368_BOOT_SEL_MASK) {
......
...@@ -1372,6 +1372,7 @@ ...@@ -1372,6 +1372,7 @@
#define MISC_STRAPBUS_6362_REG 0x14 #define MISC_STRAPBUS_6362_REG 0x14
#define STRAPBUS_6362_FCVO_SHIFT 1 #define STRAPBUS_6362_FCVO_SHIFT 1
#define STRAPBUS_6362_HSSPI_CLK_FAST (1 << 13)
#define STRAPBUS_6362_FCVO_MASK (0x1f << STRAPBUS_6362_FCVO_SHIFT) #define STRAPBUS_6362_FCVO_MASK (0x1f << STRAPBUS_6362_FCVO_SHIFT)
#define STRAPBUS_6362_BOOT_SEL_SERIAL (1 << 15) #define STRAPBUS_6362_BOOT_SEL_SERIAL (1 << 15)
#define STRAPBUS_6362_BOOT_SEL_NAND (0 << 15) #define STRAPBUS_6362_BOOT_SEL_NAND (0 << 15)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment