1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-10-19 14:08:17 +02:00
openwrt/target/linux/bcm63xx/patches-5.4/432-MIPS-BCM63XX-detect-nand-nvram.patch
Álvaro Fernández Rojas 86583384ff bcm63xx: smp: add NAND support
NAND controller is present on BCM6328, BCM6362, BCM6368 and BCM63268.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2020-05-18 18:24:06 +02:00

18 lines
532 B
Diff

--- a/arch/mips/bcm63xx/dev-flash.c
+++ b/arch/mips/bcm63xx/dev-flash.c
@@ -229,6 +229,14 @@ void __init bcm63xx_flash_detect(void)
}
bcm_rset_writel(RSET_HSSPI, val, HSSPI_FLASH_CTRL_REG);
+ } else if (flash_type == BCM63XX_FLASH_TYPE_NAND &&
+ (BCMCPU_IS_6328() || BCMCPU_IS_6362() || BCMCPU_IS_6368() ||
+ BCMCPU_IS_63268())) {
+ bcm_nand_writel(NAND_CS_SEL_AUTO_DEV_ID
+ | NAND_CS_SEL_EBI_CS0_USES_NAND
+ | NAND_CS_SEL_EBC_CS0_SEL,
+ NAND_CS_SEL_REG);
+ bcm_nand_writel(1, NAND_CS_XOR_REG);
}
}