memory: omap-gpmc: Prevent GPMC_STATUS from being accessed via gpmc_regs

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Mon May 23 21:59:04 PDT 2016


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=9e6946215dbd9803e8b511928c9f61f3a49e2c58
Commit:     9e6946215dbd9803e8b511928c9f61f3a49e2c58
Parent:     b2bac25a4d298309bb4b2649bb1107ddaa287c47
Author:     Roger Quadros <rogerq at ti.com>
AuthorDate: Fri Aug 7 10:38:13 2015 +0300
Committer:  Roger Quadros <rogerq at ti.com>
CommitDate: Fri Apr 15 11:55:28 2016 +0300

    memory: omap-gpmc: Prevent GPMC_STATUS from being accessed via gpmc_regs
    
    GPMC_STATUS register is private to the GPMC module and must not be
    accessed directly by NAND driver through the gpmc_regs.
    
    They must use gpmc_omap_get_nand_ops() instead.
    
    Signed-off-by: Roger Quadros <rogerq at ti.com>
    Acked-by: Tony Lindgren <tony at atomide.com>
---
 drivers/memory/omap-gpmc.c                   | 2 +-
 include/linux/platform_data/mtd-nand-omap2.h | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
index ea9c897..33d69b1 100644
--- a/drivers/memory/omap-gpmc.c
+++ b/drivers/memory/omap-gpmc.c
@@ -1081,7 +1081,7 @@ void gpmc_update_nand_reg(struct gpmc_nand_regs *reg, int cs)
 {
 	int i;
 
-	reg->gpmc_status = gpmc_base + GPMC_STATUS;
+	reg->gpmc_status = NULL;	/* deprecated */
 	reg->gpmc_nand_command = gpmc_base + GPMC_CS0_OFFSET +
 				GPMC_CS_NAND_COMMAND + GPMC_CS_SIZE * cs;
 	reg->gpmc_nand_address = gpmc_base + GPMC_CS0_OFFSET +
diff --git a/include/linux/platform_data/mtd-nand-omap2.h b/include/linux/platform_data/mtd-nand-omap2.h
index ff27e5a..7f6de53 100644
--- a/include/linux/platform_data/mtd-nand-omap2.h
+++ b/include/linux/platform_data/mtd-nand-omap2.h
@@ -45,7 +45,6 @@ enum omap_ecc {
 };
 
 struct gpmc_nand_regs {
-	void __iomem	*gpmc_status;
 	void __iomem	*gpmc_nand_command;
 	void __iomem	*gpmc_nand_address;
 	void __iomem	*gpmc_nand_data;
@@ -64,6 +63,8 @@ struct gpmc_nand_regs {
 	void __iomem	*gpmc_bch_result4[GPMC_BCH_NUM_REMAINDER];
 	void __iomem	*gpmc_bch_result5[GPMC_BCH_NUM_REMAINDER];
 	void __iomem	*gpmc_bch_result6[GPMC_BCH_NUM_REMAINDER];
+	/* Deprecated. Do not use */
+	void __iomem	*gpmc_status;
 };
 
 struct omap_nand_platform_data {



More information about the linux-mtd-cvs mailing list