summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2020-10-30 12:30:31 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2020-11-10 08:42:26 +0100
commitb6bcd96de5a75bdc5d06a06f2efffc2d89e346ec (patch)
tree3d6f1260487b7c2fd9cfef201203b9dbc933a31c /arch
parent18a8bfd6a7ea8e93b88fba49b73348b943713076 (diff)
downloadbarebox-b6bcd96de5a75bdc5d06a06f2efffc2d89e346ec.tar.gz
barebox-b6bcd96de5a75bdc5d06a06f2efffc2d89e346ec.tar.xz
mtd: nand: Update to Linux-5.9
This updates the barebox NAND layer and parts of the mtd layer to Linux-5.9. This patch is huge, but the barebox NAND layer is so far away from the Linux NAND layer that a step by step update would have taken ages. Unlike Linux barebox has functions to mark a block as good. This feature has been preserved. Also barebox used to make NAND write support optional, this feature is lost during the update for the sake of better compatibility to the Linux NAND layer. This patch has been tested: - GPMI aka nand_mxs on i.MX6 - nand_imx on i.MX25 - nand_omap_gpmc on AM335x - atmel_nand on Atmel sama5d3 - nand_denali on SoCFPGA Currently untested: - nand_orion - nand_mrvl_nfc - nand_s3c24xx The nand_denali driver is tested with the update of that driver to Linux-5.9 following in the next patch. I could only test the drivers with the NAND chips found on my boards, so there's still enough room for regressions, especially given that the NAND drivers themselves are mostly not updated. With the NAND layer being up-to-date with Linux it should hopefully be easy to update drivers to their Linux counterpart as well if necessary. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/boards/animeo_ip/init.c1
-rw-r--r--arch/arm/boards/at91sam9260ek/init.c1
-rw-r--r--arch/arm/boards/at91sam9261ek/init.c1
-rw-r--r--arch/arm/boards/at91sam9m10g45ek/init.c1
-rw-r--r--arch/arm/boards/at91sam9m10ihd/init.c1
-rw-r--r--arch/arm/boards/at91sam9n12ek/init.c1
-rw-r--r--arch/arm/boards/dss11/init.c1
-rw-r--r--arch/arm/boards/haba-knx/init.c1
-rw-r--r--arch/arm/boards/pm9261/init.c1
-rw-r--r--arch/arm/boards/pm9263/init.c1
-rw-r--r--arch/arm/boards/pm9g45/init.c1
-rw-r--r--arch/arm/boards/qil-a926x/init.c1
-rw-r--r--arch/arm/boards/sama5d3_xplained/init.c1
-rw-r--r--arch/arm/boards/sama5d3xek/init.c1
-rw-r--r--arch/arm/boards/sama5d4_xplained/sama5d4_xplained.c1
-rw-r--r--arch/arm/boards/sama5d4ek/sama5d4ek.c1
-rw-r--r--arch/arm/boards/telit-evk-pro3/init.c1
-rw-r--r--arch/arm/boards/tny-a926x/init.c1
-rw-r--r--arch/arm/boards/usb-a926x/init.c1
-rw-r--r--arch/arm/configs/nhk8815_defconfig2
-rw-r--r--arch/arm/mach-imx/external-nand-boot.c1
-rw-r--r--arch/arm/mach-imx/xload-imx-nand.c1
22 files changed, 22 insertions, 1 deletions
diff --git a/arch/arm/boards/animeo_ip/init.c b/arch/arm/boards/animeo_ip/init.c
index 07daaf4ffd..ed0b9b7f87 100644
--- a/arch/arm/boards/animeo_ip/init.c
+++ b/arch/arm/boards/animeo_ip/init.c
@@ -19,6 +19,7 @@
#include <nand.h>
#include <linux/sizes.h>
#include <linux/mtd/nand.h>
+#include <linux/mtd/rawnand.h>
#include <linux/clk.h>
#include <mach/board.h>
#include <mach/at91sam9_smc.h>
diff --git a/arch/arm/boards/at91sam9260ek/init.c b/arch/arm/boards/at91sam9260ek/init.c
index a1b283a25a..92526c072a 100644
--- a/arch/arm/boards/at91sam9260ek/init.c
+++ b/arch/arm/boards/at91sam9260ek/init.c
@@ -9,6 +9,7 @@
#include <generated/mach-types.h>
#include <nand.h>
#include <linux/mtd/nand.h>
+#include <linux/mtd/rawnand.h>
#include <linux/sizes.h>
#include <mach/board.h>
#include <mach/at91sam9_smc.h>
diff --git a/arch/arm/boards/at91sam9261ek/init.c b/arch/arm/boards/at91sam9261ek/init.c
index 0ae5381af5..3904cbf9ca 100644
--- a/arch/arm/boards/at91sam9261ek/init.c
+++ b/arch/arm/boards/at91sam9261ek/init.c
@@ -16,6 +16,7 @@
#include <nand.h>
#include <linux/sizes.h>
#include <linux/mtd/nand.h>
+#include <linux/mtd/rawnand.h>
#include <mach/at91_pmc.h>
#include <mach/board.h>
#include <gpio.h>
diff --git a/arch/arm/boards/at91sam9m10g45ek/init.c b/arch/arm/boards/at91sam9m10g45ek/init.c
index 409e3cfeee..dcb8f9b17f 100644
--- a/arch/arm/boards/at91sam9m10g45ek/init.c
+++ b/arch/arm/boards/at91sam9m10g45ek/init.c
@@ -19,6 +19,7 @@
#include <nand.h>
#include <linux/sizes.h>
#include <linux/mtd/nand.h>
+#include <linux/mtd/rawnand.h>
#include <mach/at91_pmc.h>
#include <mach/board.h>
#include <mach/iomux.h>
diff --git a/arch/arm/boards/at91sam9m10ihd/init.c b/arch/arm/boards/at91sam9m10ihd/init.c
index 5008e0f67e..e629900d5a 100644
--- a/arch/arm/boards/at91sam9m10ihd/init.c
+++ b/arch/arm/boards/at91sam9m10ihd/init.c
@@ -19,6 +19,7 @@
#include <nand.h>
#include <linux/sizes.h>
#include <linux/mtd/nand.h>
+#include <linux/mtd/rawnand.h>
#include <mach/board.h>
#include <gpio.h>
#include <mach/iomux.h>
diff --git a/arch/arm/boards/at91sam9n12ek/init.c b/arch/arm/boards/at91sam9n12ek/init.c
index 921f9fe5d8..edc45819b2 100644
--- a/arch/arm/boards/at91sam9n12ek/init.c
+++ b/arch/arm/boards/at91sam9n12ek/init.c
@@ -16,6 +16,7 @@
#include <nand.h>
#include <linux/sizes.h>
#include <linux/mtd/nand.h>
+#include <linux/mtd/rawnand.h>
#include <mach/board.h>
#include <mach/at91sam9_smc.h>
#include <gpio.h>
diff --git a/arch/arm/boards/dss11/init.c b/arch/arm/boards/dss11/init.c
index 53168acb98..6ce986fc39 100644
--- a/arch/arm/boards/dss11/init.c
+++ b/arch/arm/boards/dss11/init.c
@@ -14,6 +14,7 @@
#include <asm/io.h>
#include <mach/hardware.h>
#include <nand.h>
+#include <linux/mtd/rawnand.h>
#include <linux/mtd/nand.h>
#include <mach/board.h>
#include <mach/at91sam9_smc.h>
diff --git a/arch/arm/boards/haba-knx/init.c b/arch/arm/boards/haba-knx/init.c
index 21ae63a64f..d55739ee2a 100644
--- a/arch/arm/boards/haba-knx/init.c
+++ b/arch/arm/boards/haba-knx/init.c
@@ -17,6 +17,7 @@
#include <nand.h>
#include <linux/sizes.h>
#include <linux/mtd/nand.h>
+#include <linux/mtd/rawnand.h>
#include <linux/clk.h>
#include <mach/board.h>
#include <mach/at91sam9_smc.h>
diff --git a/arch/arm/boards/pm9261/init.c b/arch/arm/boards/pm9261/init.c
index 816635a23a..b316b85d7d 100644
--- a/arch/arm/boards/pm9261/init.c
+++ b/arch/arm/boards/pm9261/init.c
@@ -17,6 +17,7 @@
#include <mach/hardware.h>
#include <nand.h>
#include <linux/mtd/nand.h>
+#include <linux/mtd/rawnand.h>
#include <mach/at91_pmc.h>
#include <mach/board.h>
#include <mach/iomux.h>
diff --git a/arch/arm/boards/pm9263/init.c b/arch/arm/boards/pm9263/init.c
index f9552b5bd2..bce612d001 100644
--- a/arch/arm/boards/pm9263/init.c
+++ b/arch/arm/boards/pm9263/init.c
@@ -16,6 +16,7 @@
#include <mach/hardware.h>
#include <nand.h>
#include <linux/mtd/nand.h>
+#include <linux/mtd/rawnand.h>
#include <mach/at91_pmc.h>
#include <mach/board.h>
#include <mach/iomux.h>
diff --git a/arch/arm/boards/pm9g45/init.c b/arch/arm/boards/pm9g45/init.c
index 48138558dd..b347de4157 100644
--- a/arch/arm/boards/pm9g45/init.c
+++ b/arch/arm/boards/pm9g45/init.c
@@ -17,6 +17,7 @@
#include <mach/hardware.h>
#include <nand.h>
#include <linux/mtd/nand.h>
+#include <linux/mtd/rawnand.h>
#include <mach/at91_pmc.h>
#include <mach/board.h>
#include <mach/iomux.h>
diff --git a/arch/arm/boards/qil-a926x/init.c b/arch/arm/boards/qil-a926x/init.c
index fa7575d270..63c7089d7d 100644
--- a/arch/arm/boards/qil-a926x/init.c
+++ b/arch/arm/boards/qil-a926x/init.c
@@ -20,6 +20,7 @@
#include <nand.h>
#include <linux/sizes.h>
#include <linux/mtd/nand.h>
+#include <linux/mtd/rawnand.h>
#include <linux/clk.h>
#include <mach/board.h>
#include <mach/at91sam9_smc.h>
diff --git a/arch/arm/boards/sama5d3_xplained/init.c b/arch/arm/boards/sama5d3_xplained/init.c
index ccddd01dea..b648d71722 100644
--- a/arch/arm/boards/sama5d3_xplained/init.c
+++ b/arch/arm/boards/sama5d3_xplained/init.c
@@ -23,6 +23,7 @@
#include <mach/at91_pmc.h>
#include <mach/at91_rstc.h>
#include <mach/at91sam9x5_matrix.h>
+#include <linux/mtd/rawnand.h>
#include <readkey.h>
#include <poller.h>
#include <linux/clk.h>
diff --git a/arch/arm/boards/sama5d3xek/init.c b/arch/arm/boards/sama5d3xek/init.c
index 4892c09b2f..6e8fbea4c8 100644
--- a/arch/arm/boards/sama5d3xek/init.c
+++ b/arch/arm/boards/sama5d3xek/init.c
@@ -16,6 +16,7 @@
#include <nand.h>
#include <linux/sizes.h>
#include <linux/mtd/nand.h>
+#include <linux/mtd/rawnand.h>
#include <mach/board.h>
#include <mach/at91sam9_smc.h>
#include <gpio.h>
diff --git a/arch/arm/boards/sama5d4_xplained/sama5d4_xplained.c b/arch/arm/boards/sama5d4_xplained/sama5d4_xplained.c
index f5b885ce0d..b7c9c49ded 100644
--- a/arch/arm/boards/sama5d4_xplained/sama5d4_xplained.c
+++ b/arch/arm/boards/sama5d4_xplained/sama5d4_xplained.c
@@ -20,6 +20,7 @@
#include <nand.h>
#include <linux/sizes.h>
#include <linux/mtd/nand.h>
+#include <linux/mtd/rawnand.h>
#include <mach/board.h>
#include <mach/at91sam9_smc.h>
#include <gpio.h>
diff --git a/arch/arm/boards/sama5d4ek/sama5d4ek.c b/arch/arm/boards/sama5d4ek/sama5d4ek.c
index 790a063266..3673d4816b 100644
--- a/arch/arm/boards/sama5d4ek/sama5d4ek.c
+++ b/arch/arm/boards/sama5d4ek/sama5d4ek.c
@@ -20,6 +20,7 @@
#include <nand.h>
#include <linux/sizes.h>
#include <linux/mtd/nand.h>
+#include <linux/mtd/rawnand.h>
#include <mach/board.h>
#include <mach/at91sam9_smc.h>
#include <gpio.h>
diff --git a/arch/arm/boards/telit-evk-pro3/init.c b/arch/arm/boards/telit-evk-pro3/init.c
index be0973dcd9..4c853c647c 100644
--- a/arch/arm/boards/telit-evk-pro3/init.c
+++ b/arch/arm/boards/telit-evk-pro3/init.c
@@ -8,6 +8,7 @@
#include <init.h>
#include <linux/clk.h>
#include <linux/mtd/nand.h>
+#include <linux/mtd/rawnand.h>
#include <mach/at91_rstc.h>
#include <mach/at91sam9_smc.h>
#include <mach/board.h>
diff --git a/arch/arm/boards/tny-a926x/init.c b/arch/arm/boards/tny-a926x/init.c
index 0598fe74da..2df8efd448 100644
--- a/arch/arm/boards/tny-a926x/init.c
+++ b/arch/arm/boards/tny-a926x/init.c
@@ -16,6 +16,7 @@
#include <nand.h>
#include <linux/sizes.h>
#include <linux/mtd/nand.h>
+#include <linux/mtd/rawnand.h>
#include <linux/clk.h>
#include <mach/board.h>
#include <mach/at91sam9_smc.h>
diff --git a/arch/arm/boards/usb-a926x/init.c b/arch/arm/boards/usb-a926x/init.c
index fd99de2ffc..c39992c91b 100644
--- a/arch/arm/boards/usb-a926x/init.c
+++ b/arch/arm/boards/usb-a926x/init.c
@@ -17,6 +17,7 @@
#include <nand.h>
#include <linux/sizes.h>
#include <linux/mtd/nand.h>
+#include <linux/mtd/rawnand.h>
#include <linux/clk.h>
#include <mach/board.h>
#include <mach/at91sam9_smc.h>
diff --git a/arch/arm/configs/nhk8815_defconfig b/arch/arm/configs/nhk8815_defconfig
index a29e38fad9..bc19301249 100644
--- a/arch/arm/configs/nhk8815_defconfig
+++ b/arch/arm/configs/nhk8815_defconfig
@@ -44,7 +44,7 @@ CONFIG_DRIVER_NET_SMC91111=y
# CONFIG_SPI is not set
CONFIG_MTD=y
CONFIG_NAND=y
-CONFIG_MTD_NAND_ECC_SMC=y
+CONFIG_MTD_NAND_ECC_SW_HAMMING_SMC=y
CONFIG_MTD_NAND_NOMADIK=y
CONFIG_FS_CRAMFS=y
CONFIG_FS_TFTP=y
diff --git a/arch/arm/mach-imx/external-nand-boot.c b/arch/arm/mach-imx/external-nand-boot.c
index 123589c071..893bfdb77f 100644
--- a/arch/arm/mach-imx/external-nand-boot.c
+++ b/arch/arm/mach-imx/external-nand-boot.c
@@ -15,6 +15,7 @@
#include <init.h>
#include <io.h>
#include <linux/mtd/nand.h>
+#include <linux/mtd/rawnand.h>
#include <asm/cache.h>
#include <asm/sections.h>
#include <asm/barebox-arm.h>
diff --git a/arch/arm/mach-imx/xload-imx-nand.c b/arch/arm/mach-imx/xload-imx-nand.c
index 22e41fac77..ff54941a0c 100644
--- a/arch/arm/mach-imx/xload-imx-nand.c
+++ b/arch/arm/mach-imx/xload-imx-nand.c
@@ -15,6 +15,7 @@
#include <common.h>
#include <init.h>
#include <io.h>
+#include <linux/mtd/rawnand.h>
#include <linux/mtd/nand.h>
#include <mach/imx-nand.h>
#include <mach/generic.h>