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 b46786cd53e0bc20621c914305d5c91850709bff..7eec60ea90564788d47f7392ee8c613172e226de 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 fdc5ed7de083fc6f142b6627ac1ea3a7da4c0cd8..5e1c3ddae5f83ae4380534668c1ed0a4bcf8e4db 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 e29e5b3d31bf50fe32b733aa13672a0821c9e966..f4b287b706f86276574fa65bb1c1a77a5a92263b 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 45649e03797d86e1f59f91660fad41d90fa0869e..02303455c34f51035896521d9bb21bffb4bbe836 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 cf14474bc454f39dc27e0b0780feaee430a76031..2ade5632dc5b4141e5ddfbef213d56f037a07369 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];
 };