memory: omap-gpmc: Prevent GPMC_STATUS from being accessed via gpmc_regs
authorRoger Quadros <rogerq@ti.com>
Fri, 7 Aug 2015 07:38:13 +0000 (10:38 +0300)
committerRoger Quadros <rogerq@ti.com>
Fri, 15 Apr 2016 08:55:28 +0000 (11:55 +0300)
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@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
drivers/memory/omap-gpmc.c
include/linux/platform_data/mtd-nand-omap2.h

index ea9c8974795043e21129116a9d799b747c9076e2..33d69b1e4c31ebd970f0bd359c9397d51fddcb44 100644 (file)
@@ -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 +
index ff27e5a77e034295565ed9f7a0da03a4541d89ca..7f6de5377f803b87efbbffcecaa909a9e2b385e7 100644 (file)
@@ -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 {