mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 0/2] ARM i.MX31: define fix, IOMUX GPR setup fix for pcm037
@ 2013-05-06 21:21 Andreas Pretzsch
  2013-05-06 21:21 ` [PATCH 1/2] ARM i.MX31: cleanup MX31_ prefix: fix leftover IOMUXC_BASE defines Andreas Pretzsch
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Andreas Pretzsch @ 2013-05-06 21:21 UTC (permalink / raw)
  To: barebox

Patches against tag v2013.05.0.
Functionality tested on customer-specific pcm037 variant with 2013.03.0.
Compile-tested against pcm037_defconfig with 2013.05.0.
Relevant code base is unchanged between versions, no issues expected.

Andreas Pretzsch (2):
  ARM i.MX31: cleanup MX31_ prefix: fix leftover IOMUXC_BASE defines
  ARM i.MX31 pcm037: fix erroneous IOMUX GPR setup in pcm037_usb_init()

 arch/arm/boards/pcm037/pcm037.c             |    6 +++---
 arch/arm/mach-imx/include/mach/imx31-regs.h |    6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH 1/2] ARM i.MX31: cleanup MX31_ prefix: fix leftover IOMUXC_BASE defines
  2013-05-06 21:21 [PATCH 0/2] ARM i.MX31: define fix, IOMUX GPR setup fix for pcm037 Andreas Pretzsch
@ 2013-05-06 21:21 ` Andreas Pretzsch
  2013-05-06 21:21 ` [PATCH 2/2] ARM i.MX31 pcm037: fix erroneous IOMUX GPR setup in pcm037_usb_init() Andreas Pretzsch
  2013-05-07  6:37 ` [PATCH 0/2] ARM i.MX31: define fix, IOMUX GPR setup fix for pcm037 Sascha Hauer
  2 siblings, 0 replies; 4+ messages in thread
From: Andreas Pretzsch @ 2013-05-06 21:21 UTC (permalink / raw)
  To: barebox

The prefix/cleanup series
	ad09b59f8bb58c27e3872b41f41beb1b9eb1aeb1
	a8c6359667704ffc3bd2249dd76f3fbbb2134b55
	4c53af062b38f15f6bc40c586e5760e640f5b8b1
missed a few unprefixed IOMUXC_BASE define users. Fix these.

Signed-off-by: Andreas Pretzsch <apr@cn-eng.de>
---
 arch/arm/mach-imx/include/mach/imx31-regs.h |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-imx/include/mach/imx31-regs.h b/arch/arm/mach-imx/include/mach/imx31-regs.h
index be3e4c1..599f800 100644
--- a/arch/arm/mach-imx/include/mach/imx31-regs.h
+++ b/arch/arm/mach-imx/include/mach/imx31-regs.h
@@ -162,9 +162,9 @@
 #define MX31_PDR0_MAX_PODF(x)	(((x) & 0x7) << 3)
 #define MX31_PDR0_MCU_PODF(x)	((x) & 0x7)
 
-#define MX31_IOMUXC_GPR	(IOMUXC_BASE + 0x8)
-#define MX31_IOMUXC_SW_MUX_CTL(x)	(IOMUXC_BASE + 0xc + (x) * 4)
-#define MX31_IOMUXC_SW_PAD_CTL(x)	(IOMUXC_BASE + 0x154 + (x) * 4)
+#define MX31_IOMUXC_GPR	(MX31_IOMUXC_BASE_ADDR + 0x8)
+#define MX31_IOMUXC_SW_MUX_CTL(x)	(MX31_IOMUXC_BASE_ADDR + 0xc + (x) * 4)
+#define MX31_IOMUXC_SW_PAD_CTL(x)	(MX31_IOMUXC_BASE_ADDR + 0x154 + (x) * 4)
 
 /*
  * Signal Multiplexing (IOMUX)
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH 2/2] ARM i.MX31 pcm037: fix erroneous IOMUX GPR setup in pcm037_usb_init()
  2013-05-06 21:21 [PATCH 0/2] ARM i.MX31: define fix, IOMUX GPR setup fix for pcm037 Andreas Pretzsch
  2013-05-06 21:21 ` [PATCH 1/2] ARM i.MX31: cleanup MX31_ prefix: fix leftover IOMUXC_BASE defines Andreas Pretzsch
@ 2013-05-06 21:21 ` Andreas Pretzsch
  2013-05-07  6:37 ` [PATCH 0/2] ARM i.MX31: define fix, IOMUX GPR setup fix for pcm037 Sascha Hauer
  2 siblings, 0 replies; 4+ messages in thread
From: Andreas Pretzsch @ 2013-05-06 21:21 UTC (permalink / raw)
  To: barebox

In commit ad09b59f8bb58c27e3872b41f41beb1b9eb1aeb1 "ARM i.MX31: give
register base addresses a proper MX31_ prefix", the IOMUX GPR setup
to enable USBH2 was replaced with an incorrect source register.
Instead of reading the GPR register, USBOTG HWHOST is used as rmw source,
which contains 0x10020001.
Beside the intended GPR[11] setup ("Enable USBH2 signals on AudioPort 3 and
AudioPort6"), this erroneously also sets
	GPR[28] enable USBOTG loopback
	GPR[17] override DSR_DCE1 with USBOTG_DATA4
	GPR[0]  select FIR DMA requests instead of UART2 DMA

Beside breaking UART2, it probably also broke some UART1 and USB OTG setups.
Fix this and replace the address with the appropriate defines.

Signed-off-by: Andreas Pretzsch <apr@cn-eng.de>
---
 arch/arm/boards/pcm037/pcm037.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/boards/pcm037/pcm037.c b/arch/arm/boards/pcm037/pcm037.c
index 276f9cd..9361a9d 100644
--- a/arch/arm/boards/pcm037/pcm037.c
+++ b/arch/arm/boards/pcm037/pcm037.c
@@ -83,9 +83,9 @@ static void pcm037_usb_init(void)
 	ulpi_setup((void *)(MX31_USB_OTG_BASE_ADDR + 0x170), 1);
 
 	/* Host 2 */
-	tmp = readl(MX31_USB_OTG_BASE_ADDR + 0x8);
-	tmp |= 1 << 11;
-	writel(tmp, MX31_IOMUXC_BASE_ADDR + 0x8);
+	tmp = readl(MX31_IOMUXC_GPR);
+	tmp |= 1 << 11;	/* IOMUX GPR: enable USBH2 signals */
+	writel(tmp, MX31_IOMUXC_GPR);
 
 	imx_iomux_mode(IOMUX_MODE(MX31_PIN_USBH2_CLK, IOMUX_CONFIG_FUNC));
 	imx_iomux_mode(IOMUX_MODE(MX31_PIN_USBH2_DIR, IOMUX_CONFIG_FUNC));
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH 0/2] ARM i.MX31: define fix, IOMUX GPR setup fix for pcm037
  2013-05-06 21:21 [PATCH 0/2] ARM i.MX31: define fix, IOMUX GPR setup fix for pcm037 Andreas Pretzsch
  2013-05-06 21:21 ` [PATCH 1/2] ARM i.MX31: cleanup MX31_ prefix: fix leftover IOMUXC_BASE defines Andreas Pretzsch
  2013-05-06 21:21 ` [PATCH 2/2] ARM i.MX31 pcm037: fix erroneous IOMUX GPR setup in pcm037_usb_init() Andreas Pretzsch
@ 2013-05-07  6:37 ` Sascha Hauer
  2 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2013-05-07  6:37 UTC (permalink / raw)
  To: Andreas Pretzsch; +Cc: barebox

On Mon, May 06, 2013 at 11:21:26PM +0200, Andreas Pretzsch wrote:
> Patches against tag v2013.05.0.
> Functionality tested on customer-specific pcm037 variant with 2013.03.0.
> Compile-tested against pcm037_defconfig with 2013.05.0.
> Relevant code base is unchanged between versions, no issues expected.
> 
> Andreas Pretzsch (2):
>   ARM i.MX31: cleanup MX31_ prefix: fix leftover IOMUXC_BASE defines
>   ARM i.MX31 pcm037: fix erroneous IOMUX GPR setup in pcm037_usb_init()

Applied both.

Thanks
 Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2013-05-07  6:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-06 21:21 [PATCH 0/2] ARM i.MX31: define fix, IOMUX GPR setup fix for pcm037 Andreas Pretzsch
2013-05-06 21:21 ` [PATCH 1/2] ARM i.MX31: cleanup MX31_ prefix: fix leftover IOMUXC_BASE defines Andreas Pretzsch
2013-05-06 21:21 ` [PATCH 2/2] ARM i.MX31 pcm037: fix erroneous IOMUX GPR setup in pcm037_usb_init() Andreas Pretzsch
2013-05-07  6:37 ` [PATCH 0/2] ARM i.MX31: define fix, IOMUX GPR setup fix for pcm037 Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox