Commit 5546ad0734bb5eed2b3cd6333dbcec51ae45185a

Authored by Ye.Li
Committed by Stefano Babic
1 parent 9293d7fd50

usb: ehci-mx6: Rename the USB register base address

The mx6sl/mx6sx has 2 OTG and 1 host. So they have name
"USBO2H_USB_BASE_ADDR" in imx-regs.h. The driver hard codes
the USB base address name to "USBOH3", which causes the driver
failed to build for mx6sl/mx6sx.

This patch uniform the address name to "USB_BASE_ADDR" for all
mx6 series.

Signed-off-by: Ye.Li <B37916@freescale.com>

Showing 2 changed files with 4 additions and 9 deletions Side-by-side Diff

arch/arm/include/asm/arch-mx6/imx-regs.h
... ... @@ -215,13 +215,8 @@
215 215 #define AIPS2_OFF_BASE_ADDR (ATZ2_BASE_ADDR + 0x80000)
216 216 #define CAAM_BASE_ADDR (ATZ2_BASE_ADDR)
217 217 #define ARM_BASE_ADDR (ATZ2_BASE_ADDR + 0x40000)
218   -#ifdef CONFIG_MX6SL
219   -#define USBO2H_PL301_IPS_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x0000)
220   -#define USBO2H_USB_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x4000)
221   -#else
222   -#define USBOH3_PL301_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x0000)
223   -#define USBOH3_USB_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x4000)
224   -#endif
  218 +#define USB_PL301_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x0000)
  219 +#define USB_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x4000)
225 220  
226 221 #define ENET_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x8000)
227 222 #ifdef CONFIG_MX6SL
drivers/usb/host/ehci-mx6.c
... ... @@ -174,7 +174,7 @@
174 174  
175 175 static void usb_oc_config(int index)
176 176 {
177   - struct usbnc_regs *usbnc = (struct usbnc_regs *)(USBOH3_USB_BASE_ADDR +
  177 + struct usbnc_regs *usbnc = (struct usbnc_regs *)(USB_BASE_ADDR +
178 178 USB_OTHERREGS_OFFSET);
179 179 void __iomem *ctrl = (void __iomem *)(&usbnc->ctrl[index]);
180 180 u32 val;
... ... @@ -207,7 +207,7 @@
207 207 struct ehci_hccr **hccr, struct ehci_hcor **hcor)
208 208 {
209 209 enum usb_init_type type;
210   - struct usb_ehci *ehci = (struct usb_ehci *)(USBOH3_USB_BASE_ADDR +
  210 + struct usb_ehci *ehci = (struct usb_ehci *)(USB_BASE_ADDR +
211 211 (0x200 * index));
212 212  
213 213 if (index > 3)