summaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
authorArseniy Krasnov <AVKrasnov@sberdevices.ru>2023-06-08 07:36:44 +0300
committerMiquel Raynal <miquel.raynal@bootlin.com>2023-06-09 18:21:10 +0300
commit30540a0d05d85ef7e6f740e62c3b44c87396e56c (patch)
tree2506cfaa9242b663049a28ec7c3caf4add9ebf63 /drivers/mtd
parent21962132044653f42ff8bbb37127c2557d6c39c2 (diff)
downloadlinux-30540a0d05d85ef7e6f740e62c3b44c87396e56c.tar.xz
mtd: rawnand: meson: replace integer consts with proper defines
Add defines for column address. It makes driver more readable, because bitwise OR with 0 looks useless. Suggested-by: Liang Yang <liang.yang@amlogic.com> Signed-off-by: Arseniy Krasnov <AVKrasnov@sberdevices.ru> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20230608043644.1271186-1-AVKrasnov@sberdevices.ru
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/raw/meson_nand.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/mtd/nand/raw/meson_nand.c b/drivers/mtd/nand/raw/meson_nand.c
index 1feea7d82252..3fe7bcd564f8 100644
--- a/drivers/mtd/nand/raw/meson_nand.c
+++ b/drivers/mtd/nand/raw/meson_nand.c
@@ -108,6 +108,9 @@
#define PER_INFO_BYTE 8
+#define NFC_COLUMN_ADDR_0 0
+#define NFC_COLUMN_ADDR_1 0
+
struct meson_nfc_nand_chip {
struct list_head node;
struct nand_chip nand;
@@ -595,12 +598,12 @@ static int meson_nfc_rw_cmd_prepare_and_execute(struct nand_chip *nand,
cmd0 = in ? NAND_CMD_READ0 : NAND_CMD_SEQIN;
nfc->cmdfifo.rw.cmd0 = cs | NFC_CMD_CLE | cmd0;
- addrs[0] = cs | NFC_CMD_ALE | 0;
+ addrs[0] = cs | NFC_CMD_ALE | NFC_COLUMN_ADDR_0;
if (mtd->writesize <= 512) {
cmd_num--;
row_start = 1;
} else {
- addrs[1] = cs | NFC_CMD_ALE | 0;
+ addrs[1] = cs | NFC_CMD_ALE | NFC_COLUMN_ADDR_1;
row_start = 2;
}