linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd/gpmi : do not include the mxs.h
@ 2012-04-01  2:36 Huang Shijie
  2012-04-03 19:39 ` Wolfram Sang
  2012-04-13 16:09 ` Artem Bityutskiy
  0 siblings, 2 replies; 6+ messages in thread
From: Huang Shijie @ 2012-04-01  2:36 UTC (permalink / raw)
  To: linux-arm-kernel

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@gmail.com>
---
 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 85e6071..649d459 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 */
-- 
1.7.4.4

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

* [PATCH] mtd/gpmi : do not include the mxs.h
  2012-04-01  2:36 [PATCH] mtd/gpmi : do not include the mxs.h Huang Shijie
@ 2012-04-03 19:39 ` Wolfram Sang
  2012-04-04  7:26   ` Huang Shijie
  2012-04-13 16:09 ` Artem Bityutskiy
  1 sibling, 1 reply; 6+ messages in thread
From: Wolfram Sang @ 2012-04-03 19:39 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Mar 31, 2012 at 10:36:57PM -0400, Huang Shijie wrote:
> 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@gmail.com>

I am quite sure we will have STMP devices in 3.5 which should make this patch
obsolete. If this patch is considered a bugfix for 3.4, then OK for now.

Regards,

   Wolfram

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120403/8c3aa7c5/attachment-0001.sig>

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

* [PATCH] mtd/gpmi : do not include the mxs.h
  2012-04-03 19:39 ` Wolfram Sang
@ 2012-04-04  7:26   ` Huang Shijie
  2012-04-04  7:57     ` Wolfram Sang
  0 siblings, 1 reply; 6+ messages in thread
From: Huang Shijie @ 2012-04-04  7:26 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Wolfram:

On Tue, Apr 3, 2012 at 3:39 PM, Wolfram Sang <w.sang@pengutronix.de> wrote:
> On Sat, Mar 31, 2012 at 10:36:57PM -0400, Huang Shijie wrote:
>> 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@gmail.com>
>
> I am quite sure we will have STMP devices in 3.5 which should make this patch
Do you mean your patch "lib: add support for stmp-style devices" ?
or some other patch?


Your patch "lib: add support for stmp-style devices" does not give me
the API to remove this
code as i ever wished to.


BR
Huang Shijie



> obsolete. If this patch is considered a bugfix for 3.4, then OK for now.
>
> Regards,
>
> ? Wolfram
>
> --
> Pengutronix e.K. ? ? ? ? ? ? ? ? ? ? ? ? ? | Wolfram Sang ? ? ? ? ? ? ? ?|
> Industrial Linux Solutions ? ? ? ? ? ? ? ? | http://www.pengutronix.de/ ?|

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

* [PATCH] mtd/gpmi : do not include the mxs.h
  2012-04-04  7:26   ` Huang Shijie
@ 2012-04-04  7:57     ` Wolfram Sang
  2012-04-04 11:19       ` Huang Shijie
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfram Sang @ 2012-04-04  7:57 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

> Do you mean your patch "lib: add support for stmp-style devices" ?
> or some other patch?

Yes, it adds the SET and CLR macros. writel() then need to be modified again.
Nothing major, though.

> Your patch "lib: add support for stmp-style devices" does not give me the API
> to remove this code as i ever wished to.

Then please speak up. The only comment I can find from you is the requested
move to a fsl-directory, but this is nothing about API?

Regards,

   Wolfram

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120404/d3f8f34d/attachment.sig>

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

* [PATCH] mtd/gpmi : do not include the mxs.h
  2012-04-04  7:57     ` Wolfram Sang
@ 2012-04-04 11:19       ` Huang Shijie
  0 siblings, 0 replies; 6+ messages in thread
From: Huang Shijie @ 2012-04-04 11:19 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Apr 4, 2012 at 3:57 AM, Wolfram Sang <w.sang@pengutronix.de> wrote:
> Hi,
>
>> Do you mean your patch "lib: add support for stmp-style devices" ?
>> or some other patch?
>
> Yes, it adds the SET and CLR macros. writel() then need to be modified again.
> Nothing major, though.

The two macros are not needed if you give me a two arguments API such
as gpmi_reset_block().
I wish I can remove the gpmi_reset_block(), and use your code. :)

>
>> Your patch "lib: add support for stmp-style devices" does not give me the API
>> to remove this code as i ever wished to.
>
> Then please speak up. The only comment I can find from you is the requested
> move to a fsl-directory, but this is nothing about API?
yes.
I will send new comments about your patch.


 thanks.

Huang Shijie

>
> Regards,
>
> ? Wolfram
>
> --
> Pengutronix e.K. ? ? ? ? ? ? ? ? ? ? ? ? ? | Wolfram Sang ? ? ? ? ? ? ? ?|
> Industrial Linux Solutions ? ? ? ? ? ? ? ? | http://www.pengutronix.de/ ?|

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

* [PATCH] mtd/gpmi : do not include the mxs.h
  2012-04-01  2:36 [PATCH] mtd/gpmi : do not include the mxs.h Huang Shijie
  2012-04-03 19:39 ` Wolfram Sang
@ 2012-04-13 16:09 ` Artem Bityutskiy
  1 sibling, 0 replies; 6+ messages in thread
From: Artem Bityutskiy @ 2012-04-13 16:09 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, 2012-03-31 at 22:36 -0400, Huang Shijie wrote:
> 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@gmail.com>

Pushed  to l2-mtd.git, thanks!

-- 
Best Regards,
Artem Bityutskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120413/41569744/attachment.sig>

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

end of thread, other threads:[~2012-04-13 16:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-01  2:36 [PATCH] mtd/gpmi : do not include the mxs.h Huang Shijie
2012-04-03 19:39 ` Wolfram Sang
2012-04-04  7:26   ` Huang Shijie
2012-04-04  7:57     ` Wolfram Sang
2012-04-04 11:19       ` Huang Shijie
2012-04-13 16:09 ` Artem Bityutskiy

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).