mtd: denali: avoid using a magic number

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Wed Oct 15 23:59:02 PDT 2014


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=2902330e7ac16d5962f114d92bb17631e9cb49e9
Commit:     2902330e7ac16d5962f114d92bb17631e9cb49e9
Parent:     8fb7b9309c41407801958138db978eb38fd80c01
Author:     Masahiro Yamada <yamada.m at jp.panasonic.com>
AuthorDate: Fri Jul 11 11:14:05 2014 +0900
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Tue Aug 19 11:53:07 2014 -0700

    mtd: denali: avoid using a magic number
    
    MAP10 command with '0x2000' data sets up a read-ahead/write access.
    
    Signed-off-by: Masahiro Yamada <yamada.m at jp.panasonic.com>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 drivers/mtd/nand/denali.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c
index 0b071a3..da0fcc2 100644
--- a/drivers/mtd/nand/denali.c
+++ b/drivers/mtd/nand/denali.c
@@ -74,6 +74,7 @@ MODULE_PARM_DESC(onfi_timing_mode, "Overrides default ONFI setting."
 #define SPARE_ACCESS		0x41
 #define MAIN_ACCESS		0x42
 #define MAIN_SPARE_ACCESS	0x43
+#define PIPELINE_ACCESS		0x2000
 
 #define DENALI_READ	0
 #define DENALI_WRITE	0x100
@@ -765,7 +766,7 @@ static int denali_send_pipeline_cmd(struct denali_nand_info *denali,
 			iowrite32(cmd, denali->flash_mem);
 		} else {
 			index_addr(denali, (uint32_t)cmd,
-					0x2000 | op | page_count);
+					PIPELINE_ACCESS | op | page_count);
 
 			/* wait for command to be accepted
 			 * can always use status0 bit as the



More information about the linux-mtd-cvs mailing list