mtd: rawnand: Use more recent ONFI specification wording
authorMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 5 May 2021 21:37:34 +0000 (23:37 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 26 May 2021 08:43:40 +0000 (10:43 +0200)
In particular, first ONFI specifications referred to SDR modes as
asynchronous modes, which is not the term we usually have in mind. The
spec has then been updated, so do the same here in the NAND subsystem to
avoid any possible confusion.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20210505213750.257417-7-miquel.raynal@bootlin.com
drivers/mtd/nand/raw/cadence-nand-controller.c
drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.h
drivers/mtd/nand/raw/nand_base.c
drivers/mtd/nand/raw/nand_onfi.c
include/linux/mtd/onfi.h

index b46786c..7eec60e 100644 (file)
@@ -2348,9 +2348,9 @@ cadence_nand_setup_interface(struct nand_chip *chip, int chipnr,
         * for tRP and tRH timings. If it is NOT possible to sample data
         * with optimal tRP/tRH settings, the parameters will be extended.
         * If clk_period is 50ns (the lowest value) this condition is met
-        * for asynchronous timing modes 1, 2, 3, 4 and 5.
-        * If clk_period is 20ns the condition is met only
-        * for asynchronous timing mode 5.
+        * for SDR timing modes 1, 2, 3, 4 and 5.
+        * If clk_period is 20ns the condition is met only for SDR timing
+        * mode 5.
         */
        if (sdr->tRC_min <= clk_period &&
            sdr->tRP_min <= (clk_period / 2) &&
index fdc5ed7..5e1c3dd 100644 (file)
@@ -79,7 +79,7 @@ enum gpmi_type {
 struct gpmi_devdata {
        enum gpmi_type type;
        int bch_max_ecc_strength;
-       int max_chain_delay; /* See the async EDO mode */
+       int max_chain_delay; /* See the SDR EDO mode */
        const char * const *clks;
        const int clks_count;
 };
index e29e5b3..f4b287b 100644 (file)
@@ -936,7 +936,7 @@ int nand_choose_best_sdr_timings(struct nand_chip *chip,
                /* Fallback to slower modes */
                best_mode = iface->timings.mode;
        } else if (chip->parameters.onfi) {
-               best_mode = fls(chip->parameters.onfi->async_timing_mode) - 1;
+               best_mode = fls(chip->parameters.onfi->sdr_timing_modes) - 1;
        }
 
        for (mode = best_mode; mode >= 0; mode--) {
index 45649e0..0230345 100644 (file)
@@ -315,7 +315,7 @@ int nand_onfi_detect(struct nand_chip *chip)
        onfi->tBERS = le16_to_cpu(p->t_bers);
        onfi->tR = le16_to_cpu(p->t_r);
        onfi->tCCS = le16_to_cpu(p->t_ccs);
-       onfi->async_timing_mode = le16_to_cpu(p->async_timing_mode);
+       onfi->sdr_timing_modes = le16_to_cpu(p->sdr_timing_modes);
        onfi->vendor_revision = le16_to_cpu(p->vendor_revision);
        memcpy(onfi->vendor, p->vendor, sizeof(p->vendor));
        chip->parameters.onfi = onfi;
index cf14474..2ade563 100644 (file)
@@ -93,7 +93,7 @@ struct nand_onfi_params {
 
        /* electrical parameter block */
        u8 io_pin_capacitance_max;
-       __le16 async_timing_mode;
+       __le16 sdr_timing_modes;
        __le16 program_cache_timing_mode;
        __le16 t_prog;
        __le16 t_bers;
@@ -160,7 +160,7 @@ struct onfi_ext_param_page {
  * @tBERS: Block erase time
  * @tR: Page read time
  * @tCCS: Change column setup time
- * @async_timing_mode: Supported asynchronous timing mode
+ * @sdr_timing_modes: Supported asynchronous/SDR timing modes
  * @vendor_revision: Vendor specific revision number
  * @vendor: Vendor specific data
  */
@@ -170,7 +170,7 @@ struct onfi_params {
        u16 tBERS;
        u16 tR;
        u16 tCCS;
-       u16 async_timing_mode;
+       u16 sdr_timing_modes;
        u16 vendor_revision;
        u8 vendor[88];
 };