openwrt/target/linux/bcm63xx/patches-5.10/433-MIPS-BCM63XX-enable-nand-support.patch
Álvaro Fernández Rojas f323dec4f8 bcm63xx: add kernel 5.10 support
Runtime-tested on Comtrend AR-5387un.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2021-02-17 20:40:16 +01:00

18 lines
511 B
Diff

--- 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);