[RFC] [PATCH 4/5] usb: ohci: omap: Initialize resources for OMAP4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Update resources (IRQ number, base addresses) for OHCI on OMAP4.
This patch should be replaced when the driver is converted to
take advantage of hwmod (hardware mode).

Signed-off-by: Keshava Munegowda <keshava_mgowda@xxxxxx>
Signed-off-by: Anand Gadiyar <gadiyar@xxxxxx>
---
 arch/arm/mach-omap2/usb-ehci.c |   26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)

Index: linux-2.6/arch/arm/mach-omap2/usb-ehci.c
===================================================================
--- linux-2.6.orig/arch/arm/mach-omap2/usb-ehci.c
+++ linux-2.6/arch/arm/mach-omap2/usb-ehci.c
@@ -360,22 +360,15 @@ void __init usb_ehci_init(const struct e
 
 static struct resource ohci_resources[] = {
 	{
-		.start	= OMAP34XX_OHCI_BASE,
-		.end	= OMAP34XX_OHCI_BASE + SZ_1K - 1,
 		.flags	= IORESOURCE_MEM,
 	},
 	{
-		.start	= OMAP34XX_UHH_CONFIG_BASE,
-		.end	= OMAP34XX_UHH_CONFIG_BASE + SZ_1K - 1,
 		.flags	= IORESOURCE_MEM,
 	},
 	{
-		.start	= OMAP34XX_USBTLL_BASE,
-		.end	= OMAP34XX_USBTLL_BASE + SZ_4K - 1,
 		.flags	= IORESOURCE_MEM,
 	},
 	{	/* general IRQ */
-		.start	= INT_34XX_OHCI_IRQ,
 		.flags	= IORESOURCE_IRQ,
 	}
 };
@@ -580,8 +573,25 @@ void __init usb_ohci_init(const struct o
 	platform_device_add_data(&ohci_device, pdata, sizeof(*pdata));
 
 	/* Setup Pin IO MUX for OHCI */
-	if (cpu_is_omap34xx())
+	if (cpu_is_omap34xx()) {
+		ohci_resources[0].start	= OMAP34XX_OHCI_BASE;
+		ohci_resources[0].end	= OMAP34XX_OHCI_BASE + SZ_1K - 1;
+		ohci_resources[1].start	= OMAP34XX_UHH_CONFIG_BASE;
+		ohci_resources[1].end	= OMAP34XX_UHH_CONFIG_BASE + SZ_1K - 1;
+		ohci_resources[2].start	= OMAP34XX_USBTLL_BASE;
+		ohci_resources[2].end	= OMAP34XX_USBTLL_BASE + SZ_4K - 1;
+		ohci_resources[3].start = INT_34XX_OHCI_IRQ;
 		setup_ohci_io_mux(pdata->port_mode);
+	} else if (cpu_is_omap44xx()) {
+		ohci_resources[0].start	= OMAP44XX_HSUSB_OHCI_BASE;
+		ohci_resources[0].end	= OMAP44XX_HSUSB_OHCI_BASE + SZ_1K - 1;
+		ohci_resources[1].start	= OMAP44XX_UHH_CONFIG_BASE;
+		ohci_resources[1].end	= OMAP44XX_UHH_CONFIG_BASE + SZ_1K - 1;
+		ohci_resources[2].start	= OMAP44XX_USBTLL_BASE;
+		ohci_resources[2].end	= OMAP44XX_USBTLL_BASE + SZ_4K - 1;
+		ohci_resources[3].start = OMAP44XX_IRQ_OHCI;
+		setup_4430ohci_io_mux(pdata->port_mode);
+	}
 
 	if (platform_device_register(&ohci_device) < 0) {
 		pr_err("Unable to register FS-USB (OHCI) device\n");
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux