aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm63xx/patches-5.4/433-MIPS-BCM63XX-enable-nand-support.patch
blob: 7d63ee79830ceb436275307ecf01263e9befacea (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
@@ -271,8 +271,12 @@ int __init bcm63xx_flash_register(void)
 			return -ENODEV;
 		}
 	case BCM63XX_FLASH_TYPE_NAND:
-		pr_warn("unsupported NAND flash detected\n");
-		return -ENODEV;
+		if (board_of_device_present("nflash")) {
+			return 0;
+		} else {
+			pr_warn("unsupported NAND flash detected\n");
+			return -ENODEV;
+		}
 	default:
 		pr_err("flash detection failed for BCM%x: %d\n",
 		       bcm63xx_get_cpu_id(), flash_type);