]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mtd: nand: raw: Port another option flag from Linux
authorAlexander Dahl <ada@thorsis.com>
Wed, 20 Mar 2024 09:02:10 +0000 (10:02 +0100)
committerDario Binacchi <dario.binacchi@amarulasolutions.com>
Sun, 14 Apr 2024 06:49:40 +0000 (08:49 +0200)
Introduced in upstream Linux with commit 7a08dbaedd365 for release v5.0.

When the new atmel nand driver was backported to U-Boot with commit
6a8dfd57220d ("nand: atmel: Add DM based NAND driver") that definition
was added to the driver instead of the header file.  Move it over to the
other definitions with the same help text it has in Linux.

Code actually using this has not been ported over to raw nand base yet.

Link: https://lore.kernel.org/all/20240320090214.40465-3-ada@thorsis.com
Signed-off-by: Alexander Dahl <ada@thorsis.com>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
drivers/mtd/nand/raw/atmel/nand-controller.c
include/linux/mtd/rawnand.h

index 0e0441472b80a6363d84071ed4cc0f7759e14a1f..e06523f3298bf2dd99b688b502e5a62edc984968 100644 (file)
@@ -1429,8 +1429,6 @@ static int atmel_nand_setup_data_interface(struct mtd_info *mtd, int csline,
        return nc->caps->ops->setup_data_interface(nand, csline, conf);
 }
 
-#define NAND_KEEP_TIMINGS       0x00800000
-
 static void atmel_nand_init(struct atmel_nand_controller *nc,
                            struct atmel_nand *nand)
 {
index fb002ae641198e2dfd30be33705f1f62a71ec6ae..4abaf4734cf4df3d8bea26368a5ce342a5ac980d 100644 (file)
@@ -249,6 +249,13 @@ enum nand_ecc_algo {
  */
 #define NAND_USE_BOUNCE_BUFFER 0x00100000
 
+/*
+ * Do not try to tweak the timings at runtime. This is needed when the
+ * controller initializes the timings on itself or when it relies on
+ * configuration done by the bootloader.
+ */
+#define NAND_KEEP_TIMINGS      0x00800000
+
 /* Options set by nand scan */
 /* bbt has already been read */
 #define NAND_BBT_SCANNED       0x40000000