Skip to contentSkip to conversation

mtd/gpmi : do not include the mxs.h

PATCH New Huang Shijie 3 participants 6 messages Apr 1, 2012 – Apr 13, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/mtd/nand/gpmi-nand/gpmi-lib.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
drivers/mtd/nand/gpmi-nand/gpmi-lib.c +5 -4
index 85e6071..649d459 100644
@@ -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 */
Signature · 1 line
1.7.4.4
#1 lore raw

PATCH 1/1 mtd/gpmi : do not include the mxs.h

Quoted 4 lines · Huang Shijie

The mxs.h does not exit in the mx6q.
So rewrite the __mxs_clrl()/__mxs_setl() and remove the mxs.h.

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

Signature · 9 lines
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>
#2 lore raw

PATCH 1/1 mtd/gpmi : do not include the mxs.h

Hi Wolfram:

Quoted 7 lines · Wolfram Sang
Quoted 4 lines · Huang Shijie

The mxs.h does not exit in the mx6q.
So rewrite the __mxs_clrl()/__mxs_setl() and remove the mxs.h.

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

Quoted 9 lines

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/ ?|
#3 lore raw

PATCH 1/1 mtd/gpmi : do not include the mxs.h

Hi,

Quoted 2 lines

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.

Quoted 2 lines

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

Signature · 9 lines
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>
#4 lore raw

PATCH 1/1 mtd/gpmi : do not include the mxs.h

Quoted 7 lines · Wolfram Sang

Hi,

Quoted 2 lines

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

Quoted 6 lines
Quoted 3 lines

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

Quoted 8 lines

Regards,

? Wolfram

--

Pengutronix e.K. ? ? ? ? ? ? ? ? ? ? ? ? ? | Wolfram Sang ? ? ? ? ? ? ? ?|
Industrial Linux Solutions ? ? ? ? ? ? ? ? | http://www.pengutronix.de/ ?|
#5 lore raw

PATCH 1/1 mtd/gpmi : do not include the mxs.h

In reply to Huang Shijie
Quoted 4 lines · Huang Shijie

The mxs.h does not exit in the mx6q.
So rewrite the __mxs_clrl()/__mxs_setl() and remove the mxs.h.

Pushed to l2-mtd.git, thanks!

Signature · 9 lines
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>