linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd/gpmi : move the __mxs_setl()/__mxs_clrl() to gpmi-lib.c
@ 2012-03-03 20:40 Huang Shijie
  2012-03-04  1:11 ` Huang Shijie
  0 siblings, 1 reply; 2+ messages in thread
From: Huang Shijie @ 2012-03-03 20:40 UTC (permalink / raw)
  To: linux-arm-kernel

We will meet the compiler error in mx6q, since there is no mxs.h header anymore.
So move these two helper functions to gpmi-lib.c.

Signed-off-by: Huang Shijie <shijie8@gmail.com>
---
 drivers/mtd/nand/gpmi-nand/gpmi-lib.c |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-lib.c b/drivers/mtd/nand/gpmi-nand/gpmi-lib.c
index 5e3c505..9a208cb 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,19 @@ struct timing_threshod timing_default_threshold = {
 	.max_dll_delay_in_ns         = 16,
 };
 
+#define MXS_SET_ADDR		0x4
+#define MXS_CLR_ADDR		0x8
+
+static inline void __mxs_setl(u32 mask, void __iomem *reg)
+{
+	writel(mask, reg + MXS_SET_ADDR);
+}
+
+static inline void __mxs_clrl(u32 mask, void __iomem *reg)
+{
+	writel(mask, reg + MXS_CLR_ADDR);
+}
+
 /*
  * Clear the bit and poll it cleared.  This is usually called with
  * a reset address and mask being either SFTRST(bit 31) or CLKGATE
-- 
1.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] mtd/gpmi : move the __mxs_setl()/__mxs_clrl() to gpmi-lib.c
  2012-03-03 20:40 [PATCH] mtd/gpmi : move the __mxs_setl()/__mxs_clrl() to gpmi-lib.c Huang Shijie
@ 2012-03-04  1:11 ` Huang Shijie
  0 siblings, 0 replies; 2+ messages in thread
From: Huang Shijie @ 2012-03-04  1:11 UTC (permalink / raw)
  To: linux-arm-kernel

please ignore this patch.

mxs-dma and some other module also have the same problem.
A more powerful patch is needed.

BR
Huang Shijie


On Sat, Mar 3, 2012 at 3:40 PM, Huang Shijie <shijie8@gmail.com> wrote:
> We will meet the compiler error in mx6q, since there is no mxs.h header anymore.
> So move these two helper functions to gpmi-lib.c.
>
> Signed-off-by: Huang Shijie <shijie8@gmail.com>
> ---
> ?drivers/mtd/nand/gpmi-nand/gpmi-lib.c | ? 14 +++++++++++++-
> ?1 files changed, 13 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-lib.c b/drivers/mtd/nand/gpmi-nand/gpmi-lib.c
> index 5e3c505..9a208cb 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,19 @@ struct timing_threshod timing_default_threshold = {
> ? ? ? ?.max_dll_delay_in_ns ? ? ? ? = 16,
> ?};
>
> +#define MXS_SET_ADDR ? ? ? ? ? 0x4
> +#define MXS_CLR_ADDR ? ? ? ? ? 0x8
> +
> +static inline void __mxs_setl(u32 mask, void __iomem *reg)
> +{
> + ? ? ? writel(mask, reg + MXS_SET_ADDR);
> +}
> +
> +static inline void __mxs_clrl(u32 mask, void __iomem *reg)
> +{
> + ? ? ? writel(mask, reg + MXS_CLR_ADDR);
> +}
> +
> ?/*
> ?* Clear the bit and poll it cleared. ?This is usually called with
> ?* a reset address and mask being either SFTRST(bit 31) or CLKGATE
> --
> 1.7.4
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-03-04  1:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-03 20:40 [PATCH] mtd/gpmi : move the __mxs_setl()/__mxs_clrl() to gpmi-lib.c Huang Shijie
2012-03-04  1:11 ` Huang Shijie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).