mtd: gpmi: do not include the mxs.h

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Mon May 14 15:59:02 EDT 2012


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=6f7900bec2315e0df1b485689978b06d244bc1fe
Commit:     6f7900bec2315e0df1b485689978b06d244bc1fe
Parent:     9808e4eff988174b479dcbb392edb54c9dc117b8
Author:     Huang Shijie <shijie8 at gmail.com>
AuthorDate: Sat Mar 31 22:36:57 2012 -0400
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Sun May 13 22:38:35 2012 -0500

    mtd: gpmi: do not include the mxs.h
    
    The mxs.h does not exit in the mx6q.
    So rewrite the __mxs_clrl()/__mxs_setl() and remove the mxs.h.
    
    Signed-off-by: Huang Shijie <shijie8 at gmail.com>
    Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
    (cherry picked from commit 3d09df217a9f49e2d9683ca9ca59e0b4c291d7a4)
---
 drivers/mtd/nand/gpmi-nand/gpmi-lib.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-lib.c b/drivers/mtd/nand/gpmi-nand/gpmi-lib.c
index e8ea710..fa5200b 100644
--- a/drivers/mtd/nand/gpmi-nand/gpmi-lib.c
+++ b/drivers/mtd/nand/gpmi-nand/gpmi-lib.c
@@ -21,7 +21,6 @@
 #include <linux/mtd/gpmi-nand.h>
 #include <linux/delay.h>
 #include <linux/clk.h>
-#include <mach/mxs.h>
 
 #include "gpmi-nand.h"
 #include "gpmi-regs.h"
@@ -37,6 +36,8 @@ struct timing_threshod timing_default_threshold = {
 	.max_dll_delay_in_ns         = 16,
 };
 
+#define MXS_SET_ADDR		0x4
+#define MXS_CLR_ADDR		0x8
 /*
  * Clear the bit and poll it cleared.  This is usually called with
  * a reset address and mask being either SFTRST(bit 31) or CLKGATE
@@ -47,7 +48,7 @@ static int clear_poll_bit(void __iomem *addr, u32 mask)
 	int timeout = 0x400;
 
 	/* clear the bit */
-	__mxs_clrl(mask, addr);
+	writel(mask, addr + MXS_CLR_ADDR);
 
 	/*
 	 * SFTRST needs 3 GPMI clocks to settle, the reference manual
@@ -92,11 +93,11 @@ static int gpmi_reset_block(void __iomem *reset_addr, bool just_enable)
 		goto error;
 
 	/* clear CLKGATE */
-	__mxs_clrl(MODULE_CLKGATE, reset_addr);
+	writel(MODULE_CLKGATE, reset_addr + MXS_CLR_ADDR);
 
 	if (!just_enable) {
 		/* set SFTRST to reset the block */
-		__mxs_setl(MODULE_SFTRST, reset_addr);
+		writel(MODULE_SFTRST, reset_addr + MXS_SET_ADDR);
 		udelay(1);
 
 		/* poll CLKGATE becoming set */



More information about the linux-mtd-cvs mailing list