aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm63xx/patches-5.10/432-MIPS-BCM63XX-detect-nand-nvram.patch
blob: 5a2a5f2489a7406ca81496149d60451a647b1abe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--- 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);
 	}
 }