Skip to contentSkip to conversation

USB: ehci-mx6: Fix broken IO access

PATCH New Wolfgang Grandegger 3 participants 4 messages May 2, 2012 – May 6, 2012

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

PATCH 1/1 USB: ehci-mx6: Fix broken IO access

To get USB working again on the i.MX6, this patch fixes a bug introduced with commit 522b2a0 "Add proper IO accessors for mx6 usb registers.". At that occasion, I also added the missing __iomem directive.

---
 drivers/usb/host/ehci-mx6.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
drivers/usb/host/ehci-mx6.c +3 -2
index 5dec673..42c77fe 100644
@@ -73,7 +73,8 @@ static void usbh1_internal_phy_clock_gate(int on)
 
 static void usbh1_power_config(void)
 {
-	struct anatop_regs *anatop = (struct anatop_regs *)ANATOP_BASE_ADDR;
+	struct anatop_regs __iomem *anatop =
+		(struct anatop_regs __iomem *)ANATOP_BASE_ADDR;
 	/*
 	 * Some phy and power's special controls for host1
 	 * 1. The external charger detector needs to be disabled
@@ -87,7 +88,7 @@ static void usbh1_power_config(void)
 		     &anatop->usb2_chrg_detect);
 
 	__raw_writel(ANADIG_USB2_PLL_480_CTRL_BYPASS,
-		     &anatop->usb2_pll_480_ctrl);
+		     &anatop->usb2_pll_480_ctrl_clr);
 
 	__raw_writel(ANADIG_USB2_PLL_480_CTRL_ENABLE |
 		     ANADIG_USB2_PLL_480_CTRL_POWER |
Signature · 1 line
1.7.7.6
#1 lore raw

PATCH 1/1 USB: ehci-mx6: Fix broken IO access

Quoted 2 lines · Wolfgang Grandegger

To get USB working again on the i.MX6, this patch fixes a bug introduced with commit 522b2a0 "Add proper IO accessors for mx6 usb registers.".

Good catch on the usb register name change.

Quoted 1 line

At that occasion, I also added the missing __iomem directive.

Is this really needed?

#2 lore raw

PATCH 1/1 USB: ehci-mx6: Fix broken IO access

Hi Fabio,

Quoted 9 lines · Fabio Estevam
Quoted 2 lines · Wolfgang Grandegger

To get USB working again on the i.MX6, this patch fixes a bug introduced with commit 522b2a0 "Add proper IO accessors for mx6 usb registers.".

Good catch on the usb register name change.

Quoted 1 line

At that occasion, I also added the missing __iomem directive.

Is this really needed?

As I see it, __iomem is a dummy function in U-Boot. I just added it for consistency reasons. If we remove it, we should also remove all other __iomem's from that file. Maybe somebody else could clarify if __iomem should be used.

Wolfgang.

#3 lore raw

PATCH 1/1 USB: ehci-mx6: Fix broken IO access

In reply to Wolfgang Grandegger
Quoted 8 lines · Wolfgang Grandegger

To get USB working again on the i.MX6, this patch fixes a bug introduced with commit 522b2a0 "Add proper IO accessors for mx6 usb registers.". At that occasion, I also added the missing __iomem directive.

---

Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================