From: Felipe Balbi <balbi@ti.com>
To: Greg KH <greg@kroah.com>
Cc: Linux USB Mailing List <linux-usb@vger.kernel.org>,
Linux OMAP Mailing List <linux-omap@vger.kernel.org>,
Anand Gadiyar <gadiyar@ti.com>,
Keshava Munegowda <keshava_mgowda@ti.com>,
Felipe Balbi <balbi@ti.com>
Subject: [patch-v2.6.39 17/19] arm: omap: usb: cleanup ehci and ohci resources and devices
Date: Tue, 1 Mar 2011 17:15:38 +0200 [thread overview]
Message-ID: <1298992540-5984-18-git-send-email-balbi@ti.com> (raw)
In-Reply-To: <1298992540-5984-1-git-send-email-balbi@ti.com>
From: Keshava Munegowda <keshava_mgowda@ti.com>
The prototype and defination of functions usb_ehci_init and
usb_ohci_init are removed. The ehci and ohci devices are
removed since usbhs device contains both ehci and ohci details.
Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
---
arch/arm/mach-omap2/usb-host.c | 176 +++++----------------------------
arch/arm/plat-omap/include/plat/usb.h | 4 -
2 files changed, 26 insertions(+), 154 deletions(-)
diff --git a/arch/arm/mach-omap2/usb-host.c b/arch/arm/mach-omap2/usb-host.c
index ab06382..89ae298 100644
--- a/arch/arm/mach-omap2/usb-host.c
+++ b/arch/arm/mach-omap2/usb-host.c
@@ -33,34 +33,46 @@
#ifdef CONFIG_MFD_OMAP_USB_HOST
-static struct resource ehci_resources[] = {
+#define OMAP_USBHS_DEVICE "usbhs-omap"
+
+static struct resource usbhs_resources[] = {
+ {
+ .name = "uhh",
+ .flags = IORESOURCE_MEM,
+ },
{
+ .name = "tll",
.flags = IORESOURCE_MEM,
},
{
+ .name = "ehci",
.flags = IORESOURCE_MEM,
},
{
+ .name = "ehci-irq",
+ .flags = IORESOURCE_IRQ,
+ },
+ {
+ .name = "ohci",
.flags = IORESOURCE_MEM,
},
- { /* general IRQ */
- .flags = IORESOURCE_IRQ,
+ {
+ .name = "ohci-irq",
+ .flags = IORESOURCE_IRQ,
}
};
-static u64 ehci_dmamask = ~(u32)0;
-static struct platform_device ehci_device = {
- .name = "ehci-omap",
- .id = 0,
- .dev = {
- .dma_mask = &ehci_dmamask,
- .coherent_dma_mask = 0xffffffff,
- .platform_data = NULL,
- },
- .num_resources = ARRAY_SIZE(ehci_resources),
- .resource = ehci_resources,
+static struct platform_device usbhs_device = {
+ .name = OMAP_USBHS_DEVICE,
+ .id = 0,
+ .num_resources = ARRAY_SIZE(usbhs_resources),
+ .resource = usbhs_resources,
};
+static struct usbhs_omap_platform_data usbhs_data;
+static struct ehci_hcd_omap_platform_data ehci_data;
+static struct ohci_hcd_omap_platform_data ohci_data;
+
/* MUX settings for EHCI pins */
/*
* setup_ehci_io_mux - initialize IO pad mux for USBHOST
@@ -326,81 +338,6 @@ static void setup_4430ehci_io_mux(const enum usbhs_omap_port_mode *port_mode)
}
}
-void __init usb_ehci_init(const struct usbhs_omap_board_data *pdata)
-{
- platform_device_add_data(&ehci_device, pdata, sizeof(*pdata));
-
- /* Setup Pin IO MUX for EHCI */
- if (cpu_is_omap34xx()) {
- ehci_resources[0].start = OMAP34XX_EHCI_BASE;
- ehci_resources[0].end = OMAP34XX_EHCI_BASE + SZ_1K - 1;
- ehci_resources[1].start = OMAP34XX_UHH_CONFIG_BASE;
- ehci_resources[1].end = OMAP34XX_UHH_CONFIG_BASE + SZ_1K - 1;
- ehci_resources[2].start = OMAP34XX_USBTLL_BASE;
- ehci_resources[2].end = OMAP34XX_USBTLL_BASE + SZ_4K - 1;
- ehci_resources[3].start = INT_34XX_EHCI_IRQ;
- setup_ehci_io_mux(pdata->port_mode);
- } else if (cpu_is_omap44xx()) {
- ehci_resources[0].start = OMAP44XX_HSUSB_EHCI_BASE;
- ehci_resources[0].end = OMAP44XX_HSUSB_EHCI_BASE + SZ_1K - 1;
- ehci_resources[1].start = OMAP44XX_UHH_CONFIG_BASE;
- ehci_resources[1].end = OMAP44XX_UHH_CONFIG_BASE + SZ_2K - 1;
- ehci_resources[2].start = OMAP44XX_USBTLL_BASE;
- ehci_resources[2].end = OMAP44XX_USBTLL_BASE + SZ_4K - 1;
- ehci_resources[3].start = OMAP44XX_IRQ_EHCI;
- setup_4430ehci_io_mux(pdata->port_mode);
- }
-
- ehci_resources[0].name = "ehci";
- ehci_resources[1].name = "uhh";
- ehci_resources[2].name = "tll";
- ehci_resources[3].name = "irq";
-
- if (platform_device_register(&ehci_device) < 0) {
- printk(KERN_ERR "Unable to register HS-USB (EHCI) device\n");
- return;
- }
-}
-
-static struct resource ohci_resources[] = {
- {
- .name = "ohci",
- .start = OMAP34XX_OHCI_BASE,
- .end = OMAP34XX_OHCI_BASE + SZ_1K - 1,
- .flags = IORESOURCE_MEM,
- },
- {
- .name = "uhh",
- .start = OMAP34XX_UHH_CONFIG_BASE,
- .end = OMAP34XX_UHH_CONFIG_BASE + SZ_1K - 1,
- .flags = IORESOURCE_MEM,
- },
- {
- .name = "tll",
- .start = OMAP34XX_USBTLL_BASE,
- .end = OMAP34XX_USBTLL_BASE + SZ_4K - 1,
- .flags = IORESOURCE_MEM,
- },
- { /* general IRQ */
- .name = "irq",
- .start = INT_34XX_OHCI_IRQ,
- .flags = IORESOURCE_IRQ,
- }
-};
-
-static u64 ohci_dmamask = DMA_BIT_MASK(32);
-
-static struct platform_device ohci_device = {
- .name = "ohci-omap3",
- .id = 0,
- .dev = {
- .dma_mask = &ohci_dmamask,
- .coherent_dma_mask = 0xffffffff,
- },
- .num_resources = ARRAY_SIZE(ohci_resources),
- .resource = ohci_resources,
-};
-
static void setup_ohci_io_mux(const enum usbhs_omap_port_mode *port_mode)
{
switch (port_mode[0]) {
@@ -569,60 +506,6 @@ static void setup_4430ohci_io_mux(const enum usbhs_omap_port_mode *port_mode)
}
}
-void __init usb_ohci_init(const struct usbhs_omap_board_data *pdata)
-{
- platform_device_add_data(&ohci_device, pdata, sizeof(*pdata));
-
- /* Setup Pin IO MUX for OHCI */
- if (cpu_is_omap34xx())
- setup_ohci_io_mux(pdata->port_mode);
-
- if (platform_device_register(&ohci_device) < 0) {
- pr_err("Unable to register FS-USB (OHCI) device\n");
- return;
- }
-}
-
-#define OMAP_USBHS_DEVICE "usbhs-omap"
-
-static struct resource usbhs_resources[] = {
- {
- .name = "uhh",
- .flags = IORESOURCE_MEM,
- },
- {
- .name = "tll",
- .flags = IORESOURCE_MEM,
- },
- {
- .name = "ehci",
- .flags = IORESOURCE_MEM,
- },
- {
- .name = "ehci-irq",
- .flags = IORESOURCE_IRQ,
- },
- {
- .name = "ohci",
- .flags = IORESOURCE_MEM,
- },
- {
- .name = "ohci-irq",
- .flags = IORESOURCE_IRQ,
- }
-};
-
-static struct platform_device usbhs_device = {
- .name = OMAP_USBHS_DEVICE,
- .id = 0,
- .num_resources = ARRAY_SIZE(usbhs_resources),
- .resource = usbhs_resources,
-};
-
-static struct usbhs_omap_platform_data usbhs_data;
-static struct ehci_hcd_omap_platform_data ehci_data;
-static struct ohci_hcd_omap_platform_data ohci_data;
-
void __init usbhs_init(const struct usbhs_omap_board_data *pdata)
{
int i;
@@ -686,13 +569,6 @@ void __init usbhs_init(const struct usbhs_omap_board_data *pdata)
{
}
-void __init usb_ohci_init(const struct usbhs_omap_board_data *pdata)
-{
-}
-
-void __init usb_ehci_init(const struct usbhs_omap_board_data *pdata)
-{
-}
#endif
diff --git a/arch/arm/plat-omap/include/plat/usb.h b/arch/arm/plat-omap/include/plat/usb.h
index 4c8bdb8..fe449f1 100644
--- a/arch/arm/plat-omap/include/plat/usb.h
+++ b/arch/arm/plat-omap/include/plat/usb.h
@@ -98,10 +98,6 @@ enum musb_interface {MUSB_INTERFACE_ULPI, MUSB_INTERFACE_UTMI};
extern void usb_musb_init(struct omap_musb_board_data *board_data);
-extern void usb_ehci_init(const struct usbhs_omap_board_data *pdata);
-
-extern void usb_ohci_init(const struct usbhs_omap_board_data *pdata);
-
extern void usbhs_init(const struct usbhs_omap_board_data *pdata);
extern int omap_usbhs_enable(struct device *dev);
--
1.7.4.rc2
next prev parent reply other threads:[~2011-03-01 15:16 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-01 15:15 [patch-v2.6.39 00/19] OMAP USB + MUSB patches Felipe Balbi
2011-03-01 15:15 ` [patch-v2.6.39 03/19] usb: musb: Idle path retention and offmode support for OMAP3 Felipe Balbi
2011-03-01 15:15 ` [patch-v2.6.39 04/19] usb: otg: TWL4030: Update the last_event variable Felipe Balbi
2011-03-01 15:15 ` [patch-v2.6.39 05/19] usb: otg: OMAP4430: Save/restore the context Felipe Balbi
[not found] ` <1298992540-5984-1-git-send-email-balbi-l0cyMroinI0@public.gmane.org>
2011-03-01 15:15 ` [patch-v2.6.39 01/19] usb: musb: gadget: fix list_head usage Felipe Balbi
2011-03-01 15:15 ` [patch-v2.6.39 02/19] usb: musb: Remove platform context save/restore API Felipe Balbi
2011-03-01 15:15 ` [patch-v2.6.39 06/19] usb: musb: OMAP4430: Power down the PHY during board init Felipe Balbi
2011-03-01 15:15 ` [patch-v2.6.39 07/19] usb: musb: OMAP3xxx: Fix device detection in otg & host mode Felipe Balbi
2011-03-01 15:15 ` [patch-v2.6.39 10/19] arm: omap: usb: host: add names to resources Felipe Balbi
2011-03-01 15:15 ` [patch-v2.6.39 11/19] usb: host: omap: switch to platform_get_resource_byname Felipe Balbi
2011-03-01 15:15 ` [patch-v2.6.39 13/19] arm: omap: usb: create common enums and structures for ehci and ohci Felipe Balbi
2011-03-01 15:15 ` [patch-v2.6.39 14/19] usb: host: omap: common usb host core driver Felipe Balbi
2011-03-01 15:15 ` [patch-v2.6.39 15/19] arm: omap: usb: usbhs core device initialization Felipe Balbi
2011-03-01 15:15 ` [patch-v2.6.39 16/19] arm: omap: usb: Invoke " Felipe Balbi
2011-03-01 15:15 ` [patch-v2.6.39 18/19] usb: host: omap: ehci and ohci simplification Felipe Balbi
2011-03-01 15:15 ` [patch-v2.6.39 08/19] usb: musb: tusb: Fix possible null pointer dereference in tusb6010_omap.c Felipe Balbi
2011-03-01 15:15 ` [patch-v2.6.39 09/19] usb: ehci: omap: add support for TLL mode on OMAP4 Felipe Balbi
2011-03-01 15:15 ` [patch-v2.6.39 12/19] arm: omap2: usb: rename usb-ehci.c to usb-host.c Felipe Balbi
2011-03-01 15:15 ` Felipe Balbi [this message]
2011-03-01 15:15 ` [patch-v2.6.39 19/19] arm: omap: usb: clock entries for omap3 and omap4 Felipe Balbi
2011-03-01 15:41 ` [patch-v2.6.39 00/19] OMAP USB + MUSB patches Greg KH
2011-03-01 15:42 ` Felipe Balbi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1298992540-5984-18-git-send-email-balbi@ti.com \
--to=balbi@ti.com \
--cc=gadiyar@ti.com \
--cc=greg@kroah.com \
--cc=keshava_mgowda@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox