Skip to content

Commit 07cdbae

Browse files
committed
mtd: spinand: Use more specific naming for the (single) program load op
SPI operations have been initially described through macros implicitly implying the use of a single SPI SDR bus. Macros for supporting dual and quad I/O transfers have been added on top, generally inspired by vendor naming, followed by DTR operations. Soon we might see octal and even octal DTR operations as well (including the opcode byte). Let's clarify what the macro really means by describing the expected bus topology in the (single) program load macro name. While at modifying it, better add the missing_ OP suffix to align with all the other macros of the same kind. Acked-by: Tudor Ambarus <[email protected]> Signed-off-by: Miquel Raynal <[email protected]>
1 parent 36e4618 commit 07cdbae

File tree

13 files changed

+29
-29
lines changed

13 files changed

+29
-29
lines changed

drivers/mtd/nand/spi/alliancememory.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ static SPINAND_OP_VARIANTS(read_cache_variants,
2626

2727
static SPINAND_OP_VARIANTS(write_cache_variants,
2828
SPINAND_PROG_LOAD_X4(true, 0, NULL, 0),
29-
SPINAND_PROG_LOAD(true, 0, NULL, 0));
29+
SPINAND_PROG_LOAD_1S_1S_1S_OP(true, 0, NULL, 0));
3030

3131
static SPINAND_OP_VARIANTS(update_cache_variants,
3232
SPINAND_PROG_LOAD_X4(false, 0, NULL, 0),
33-
SPINAND_PROG_LOAD(false, 0, NULL, 0));
33+
SPINAND_PROG_LOAD_1S_1S_1S_OP(false, 0, NULL, 0));
3434

3535
static int am_get_eccsize(struct mtd_info *mtd)
3636
{

drivers/mtd/nand/spi/ato.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ static SPINAND_OP_VARIANTS(read_cache_variants,
2020

2121
static SPINAND_OP_VARIANTS(write_cache_variants,
2222
SPINAND_PROG_LOAD_X4(true, 0, NULL, 0),
23-
SPINAND_PROG_LOAD(true, 0, NULL, 0));
23+
SPINAND_PROG_LOAD_1S_1S_1S_OP(true, 0, NULL, 0));
2424

2525
static SPINAND_OP_VARIANTS(update_cache_variants,
2626
SPINAND_PROG_LOAD_X4(false, 0, NULL, 0),
27-
SPINAND_PROG_LOAD(false, 0, NULL, 0));
27+
SPINAND_PROG_LOAD_1S_1S_1S_OP(false, 0, NULL, 0));
2828

2929

3030
static int ato25d1ga_ooblayout_ecc(struct mtd_info *mtd, int section,

drivers/mtd/nand/spi/esmt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ static SPINAND_OP_VARIANTS(read_cache_variants,
2525

2626
static SPINAND_OP_VARIANTS(write_cache_variants,
2727
SPINAND_PROG_LOAD_X4(true, 0, NULL, 0),
28-
SPINAND_PROG_LOAD(true, 0, NULL, 0));
28+
SPINAND_PROG_LOAD_1S_1S_1S_OP(true, 0, NULL, 0));
2929

3030
static SPINAND_OP_VARIANTS(update_cache_variants,
3131
SPINAND_PROG_LOAD_X4(false, 0, NULL, 0),
32-
SPINAND_PROG_LOAD(false, 0, NULL, 0));
32+
SPINAND_PROG_LOAD_1S_1S_1S_OP(false, 0, NULL, 0));
3333

3434
/*
3535
* OOB spare area map (64 bytes)

drivers/mtd/nand/spi/foresee.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ static SPINAND_OP_VARIANTS(read_cache_variants,
1919

2020
static SPINAND_OP_VARIANTS(write_cache_variants,
2121
SPINAND_PROG_LOAD_X4(true, 0, NULL, 0),
22-
SPINAND_PROG_LOAD(true, 0, NULL, 0));
22+
SPINAND_PROG_LOAD_1S_1S_1S_OP(true, 0, NULL, 0));
2323

2424
static SPINAND_OP_VARIANTS(update_cache_variants,
2525
SPINAND_PROG_LOAD_X4(false, 0, NULL, 0),
26-
SPINAND_PROG_LOAD(false, 0, NULL, 0));
26+
SPINAND_PROG_LOAD_1S_1S_1S_OP(false, 0, NULL, 0));
2727

2828
static int f35sqa002g_ooblayout_ecc(struct mtd_info *mtd, int section,
2929
struct mtd_oob_region *region)

drivers/mtd/nand/spi/gigadevice.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ static SPINAND_OP_VARIANTS(read_cache_variants_2gq5,
5757

5858
static SPINAND_OP_VARIANTS(write_cache_variants,
5959
SPINAND_PROG_LOAD_X4(true, 0, NULL, 0),
60-
SPINAND_PROG_LOAD(true, 0, NULL, 0));
60+
SPINAND_PROG_LOAD_1S_1S_1S_OP(true, 0, NULL, 0));
6161

6262
static SPINAND_OP_VARIANTS(update_cache_variants,
6363
SPINAND_PROG_LOAD_X4(false, 0, NULL, 0),
64-
SPINAND_PROG_LOAD(false, 0, NULL, 0));
64+
SPINAND_PROG_LOAD_1S_1S_1S_OP(false, 0, NULL, 0));
6565

6666
static int gd5fxgq4xa_ooblayout_ecc(struct mtd_info *mtd, int section,
6767
struct mtd_oob_region *region)

drivers/mtd/nand/spi/macronix.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ static SPINAND_OP_VARIANTS(read_cache_variants,
3535

3636
static SPINAND_OP_VARIANTS(write_cache_variants,
3737
SPINAND_PROG_LOAD_X4(true, 0, NULL, 0),
38-
SPINAND_PROG_LOAD(false, 0, NULL, 0));
38+
SPINAND_PROG_LOAD_1S_1S_1S_OP(false, 0, NULL, 0));
3939

4040
static SPINAND_OP_VARIANTS(update_cache_variants,
4141
SPINAND_PROG_LOAD_X4(false, 0, NULL, 0),
42-
SPINAND_PROG_LOAD(false, 0, NULL, 0));
42+
SPINAND_PROG_LOAD_1S_1S_1S_OP(false, 0, NULL, 0));
4343

4444
static int mx35lfxge4ab_ooblayout_ecc(struct mtd_info *mtd, int section,
4545
struct mtd_oob_region *region)

drivers/mtd/nand/spi/micron.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ static SPINAND_OP_VARIANTS(quadio_read_cache_variants,
4444

4545
static SPINAND_OP_VARIANTS(x4_write_cache_variants,
4646
SPINAND_PROG_LOAD_X4(true, 0, NULL, 0),
47-
SPINAND_PROG_LOAD(true, 0, NULL, 0));
47+
SPINAND_PROG_LOAD_1S_1S_1S_OP(true, 0, NULL, 0));
4848

4949
static SPINAND_OP_VARIANTS(x4_update_cache_variants,
5050
SPINAND_PROG_LOAD_X4(false, 0, NULL, 0),
51-
SPINAND_PROG_LOAD(false, 0, NULL, 0));
51+
SPINAND_PROG_LOAD_1S_1S_1S_OP(false, 0, NULL, 0));
5252

5353
/* Micron MT29F2G01AAAED Device */
5454
static SPINAND_OP_VARIANTS(x4_read_cache_variants,
@@ -58,10 +58,10 @@ static SPINAND_OP_VARIANTS(x4_read_cache_variants,
5858
SPINAND_PAGE_READ_FROM_CACHE_1S_1S_1S_OP(0, 1, NULL, 0));
5959

6060
static SPINAND_OP_VARIANTS(x1_write_cache_variants,
61-
SPINAND_PROG_LOAD(true, 0, NULL, 0));
61+
SPINAND_PROG_LOAD_1S_1S_1S_OP(true, 0, NULL, 0));
6262

6363
static SPINAND_OP_VARIANTS(x1_update_cache_variants,
64-
SPINAND_PROG_LOAD(false, 0, NULL, 0));
64+
SPINAND_PROG_LOAD_1S_1S_1S_OP(false, 0, NULL, 0));
6565

6666
static int micron_8_ooblayout_ecc(struct mtd_info *mtd, int section,
6767
struct mtd_oob_region *region)

drivers/mtd/nand/spi/paragon.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ static SPINAND_OP_VARIANTS(read_cache_variants,
3131

3232
static SPINAND_OP_VARIANTS(write_cache_variants,
3333
SPINAND_PROG_LOAD_X4(true, 0, NULL, 0),
34-
SPINAND_PROG_LOAD(true, 0, NULL, 0));
34+
SPINAND_PROG_LOAD_1S_1S_1S_OP(true, 0, NULL, 0));
3535

3636
static SPINAND_OP_VARIANTS(update_cache_variants,
3737
SPINAND_PROG_LOAD_X4(false, 0, NULL, 0),
38-
SPINAND_PROG_LOAD(false, 0, NULL, 0));
38+
SPINAND_PROG_LOAD_1S_1S_1S_OP(false, 0, NULL, 0));
3939

4040

4141
static int pn26g0xa_ooblayout_ecc(struct mtd_info *mtd, int section,

drivers/mtd/nand/spi/skyhigh.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ static SPINAND_OP_VARIANTS(read_cache_variants,
2626

2727
static SPINAND_OP_VARIANTS(write_cache_variants,
2828
SPINAND_PROG_LOAD_X4(true, 0, NULL, 0),
29-
SPINAND_PROG_LOAD(true, 0, NULL, 0));
29+
SPINAND_PROG_LOAD_1S_1S_1S_OP(true, 0, NULL, 0));
3030

3131
static SPINAND_OP_VARIANTS(update_cache_variants,
3232
SPINAND_PROG_LOAD_X4(false, 0, NULL, 0),
33-
SPINAND_PROG_LOAD(false, 0, NULL, 0));
33+
SPINAND_PROG_LOAD_1S_1S_1S_OP(false, 0, NULL, 0));
3434

3535
static int skyhigh_spinand_ooblayout_ecc(struct mtd_info *mtd, int section,
3636
struct mtd_oob_region *region)

drivers/mtd/nand/spi/toshiba.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,21 @@ static SPINAND_OP_VARIANTS(read_cache_variants,
2222

2323
static SPINAND_OP_VARIANTS(write_cache_x4_variants,
2424
SPINAND_PROG_LOAD_X4(true, 0, NULL, 0),
25-
SPINAND_PROG_LOAD(true, 0, NULL, 0));
25+
SPINAND_PROG_LOAD_1S_1S_1S_OP(true, 0, NULL, 0));
2626

2727
static SPINAND_OP_VARIANTS(update_cache_x4_variants,
2828
SPINAND_PROG_LOAD_X4(false, 0, NULL, 0),
29-
SPINAND_PROG_LOAD(false, 0, NULL, 0));
29+
SPINAND_PROG_LOAD_1S_1S_1S_OP(false, 0, NULL, 0));
3030

3131
/*
3232
* Backward compatibility for 1st generation Serial NAND devices
3333
* which don't support Quad Program Load operation.
3434
*/
3535
static SPINAND_OP_VARIANTS(write_cache_variants,
36-
SPINAND_PROG_LOAD(true, 0, NULL, 0));
36+
SPINAND_PROG_LOAD_1S_1S_1S_OP(true, 0, NULL, 0));
3737

3838
static SPINAND_OP_VARIANTS(update_cache_variants,
39-
SPINAND_PROG_LOAD(false, 0, NULL, 0));
39+
SPINAND_PROG_LOAD_1S_1S_1S_OP(false, 0, NULL, 0));
4040

4141
static int tx58cxgxsxraix_ooblayout_ecc(struct mtd_info *mtd, int section,
4242
struct mtd_oob_region *region)

0 commit comments

Comments
 (0)