]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ehci-mxc: Define host offsets
authorBenoît Thébaudeau <benoit.thebaudeau@advansee.com>
Tue, 13 Nov 2012 09:57:59 +0000 (09:57 +0000)
committerStefano Babic <sbabic@denx.de>
Fri, 16 Nov 2012 08:16:45 +0000 (09:16 +0100)
Some MXC SoCs like the i.MX35 have hosts located at unusual offsets, so prepare
to the introduction of i.MX35 support by defining the ehci-mxc hosts offsets at
SoC level.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
arch/arm/include/asm/arch-mx25/imx-regs.h
arch/arm/include/asm/arch-mx31/imx-regs.h
drivers/usb/host/ehci-mxc.c

index 738d4115e9e8046c034b25fdbccdf7c18a870c88..5f4b543823470e037b6828ca99ff3876382c3b6f 100644 (file)
@@ -241,6 +241,7 @@ struct aips_regs {
 #define IMX_RTIC_BASE          (0x53FEC000)
 #define IMX_IIM_BASE           (0x53FF0000)
 #define IMX_USB_BASE           (0x53FF4000)
+#define IMX_USB_PORT_OFFSET    0x200
 #define IMX_CSI_BASE           (0x53FF8000)
 #define IMX_DRYICE_BASE                (0x53FFC000)
 
index 01a849dd8a00d64e8a5e6c95c9437d171840ab80..ae3658b6393e4ade9155d7afd14026289c24ea33 100644 (file)
@@ -895,6 +895,7 @@ struct esdc_regs {
 
 #define MX31_AIPS1_BASE_ADDR   0x43f00000
 #define IMX_USB_BASE           (MX31_AIPS1_BASE_ADDR + 0x88000)
+#define IMX_USB_PORT_OFFSET    0x200
 
 /*
  * CSPI register definitions
index 846aa3b7c9b540667fc4283b427c9e44136acc70..6260a8c939d495ad37074dce4ef625468afe9bf4 100644 (file)
@@ -169,7 +169,7 @@ int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor)
        udelay(80);
 
        ehci = (struct usb_ehci *)(IMX_USB_BASE +
-               (0x200 * CONFIG_MXC_USB_PORT));
+                       IMX_USB_PORT_OFFSET * CONFIG_MXC_USB_PORT);
        *hccr = (struct ehci_hccr *)((uint32_t)&ehci->caplength);
        *hcor = (struct ehci_hcor *)((uint32_t) *hccr +
                        HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase)));