summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget
diff options
context:
space:
mode:
authorRob Herring <r.herring@freescale.com>2009-10-14 14:09:27 -0500
committerAlejandro Gonzalez <alex.gonzalez@digi.com>2010-02-12 17:19:20 +0100
commitc23b14cd9138fc2c96dfdb74e6443cec608ce9ae (patch)
tree245b39733059182d0f91716628b0607f59493f36 /drivers/usb/gadget
parent130f57083126c182f61cea73282fb486a433e010 (diff)
ENGR00116558: MX233: USB pin detect
MX233: Restructure the STMP378xxx USB Host and Gadget device structures to be similar to MXC structures. Enable fsl_otg_arc driver to work on MX233 platform. Remove FSL_USB2_DONT_REMAP requirement. Signed-off-by: Dinh Nguyen <Dinh.Nguyen@freescale.com> Conflicts: arch/arm/mach-stmp3xxx/Kconfig arch/arm/mach-stmp3xxx/Makefile arch/arm/mach-stmp3xxx/devices.c arch/arm/mach-stmp3xxx/include/mach/stmp3xxx.h arch/arm/mach-stmp3xxx/stmp378x_devb.c
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r--drivers/usb/gadget/Kconfig2
-rw-r--r--drivers/usb/gadget/arcotg_udc.c20
-rw-r--r--drivers/usb/gadget/arcotg_udc.h1
3 files changed, 7 insertions, 16 deletions
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index 83d395de165c..0c89ffbcb93a 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -609,7 +609,7 @@ endchoice
config USB_OTG
boolean "OTG Support"
depends on (USB_GADGET_OMAP && ARCH_OMAP_OTG && USB_OHCI_HCD) || \
- (USB_GADGET_ARC && ARCH_MXC && USB_EHCI_HCD)
+ (USB_GADGET_ARC && (ARCH_MXC || ARCH_STMP3XXX) && USB_EHCI_HCD)
help
The most notable feature of USB OTG is support for a
"Dual-Role" device, which can act as either a device
diff --git a/drivers/usb/gadget/arcotg_udc.c b/drivers/usb/gadget/arcotg_udc.c
index 64a62158b2a4..acc1b9508da9 100644
--- a/drivers/usb/gadget/arcotg_udc.c
+++ b/drivers/usb/gadget/arcotg_udc.c
@@ -2713,16 +2713,10 @@ static int __init fsl_udc_probe(struct platform_device *pdev)
}
#endif
- if ((pdata->port_enables & FSL_USB2_DONT_REMAP) == 0) {
- dr_regs = ioremap(res->start, resource_size(res));
- if (!dr_regs) {
- ret = -ENOMEM;
- goto err1;
- }
- udc_controller->dr_remapped = !0;
- } else {
- dr_regs = (void *)res->start;
- dev_warn(&pdev->dev, "does not remap its address space\n");
+ dr_regs = ioremap(res->start, resource_size(res));
+ if (!dr_regs) {
+ ret = -ENOMEM;
+ goto err1;
}
pdata->regs = (void *)dr_regs;
/*
@@ -2859,8 +2853,7 @@ err2:
if (pdata->platform_uninit)
pdata->platform_uninit(pdata);
err2a:
- if (udc_controller->dr_remapped)
- iounmap((u8 __iomem *)dr_regs);
+ iounmap((u8 __iomem *)dr_regs);
err1:
if (!udc_controller->transceiver)
release_mem_region(res->start, resource_size(res));
@@ -2902,8 +2895,7 @@ static int __exit fsl_udc_remove(struct platform_device *pdev)
#endif
dma_pool_destroy(udc_controller->td_pool);
free_irq(udc_controller->irq, udc_controller);
- if (udc_controller->dr_remapped)
- iounmap((u8 __iomem *)dr_regs);
+ iounmap((u8 __iomem *)dr_regs);
#ifndef CONFIG_USB_OTG
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
diff --git a/drivers/usb/gadget/arcotg_udc.h b/drivers/usb/gadget/arcotg_udc.h
index 82bde01db428..d8d33eb7156e 100644
--- a/drivers/usb/gadget/arcotg_udc.h
+++ b/drivers/usb/gadget/arcotg_udc.h
@@ -594,7 +594,6 @@ struct fsl_udc {
unsigned stopped:1;
unsigned remote_wakeup:1;
unsigned already_stopped:1;
- unsigned dr_remapped:1;
struct ep_queue_head *ep_qh; /* Endpoints Queue-Head */
struct fsl_req *status_req; /* ep0 status request */