@@ -139,7 +139,7 @@ config USB_EHCI_FSL
config USB_EHCI_MXC
bool "Support for Freescale on-chip EHCI USB controller"
- depends on USB_EHCI_HCD && ARCH_MXC
+ depends on USB_EHCI_HCD && (ARCH_MXC || ARCH_MXS)
select USB_EHCI_ROOT_HUB_TT
---help---
Variation of ARC USB block used in some Freescale chips.
@@ -64,6 +64,17 @@ static int ehci_mxc_setup(struct usb_hcd *hcd)
return 0;
}
+static irqreturn_t mxc_ehci_irq(struct usb_hcd *hcd)
+{
+ struct mxc_usbh_platform_data *pdata;
+
+ pdata = hcd->self.controller->platform_data;
+ if (pdata->plt_irq_handler)
+ pdata->plt_irq_handler(pdata);
+
+ return ehci_irq(hcd);
+}
+
static const struct hc_driver ehci_mxc_hc_driver = {
.description = hcd_name,
.product_desc = "Freescale On-Chip EHCI Host Controller",
@@ -72,7 +83,7 @@ static const struct hc_driver ehci_mxc_hc_driver = {
/*
* generic hardware linkage
*/
- .irq = ehci_irq,
+ .irq = mxc_ehci_irq,
.flags = HCD_USB2 | HCD_MEMORY,
/*
@@ -120,6 +120,8 @@ struct mxc_usbh_platform_data {
unsigned int portsc;
struct otg_transceiver *otg;
+ void (*plt_irq_handler)(struct mxc_usbh_platform_data *pdata);
+ void *priv;
};
struct spi_device;
change ehci_irq to mxc_ehci_irq to give chance do some platform specific actions in irq handler for different platforms. add void pointer in the last of mxc_usbh_platform_data structure so that additional information could be added to that field if needed. Signed-off-by: Tony Lin <tony.lin@freescale.com> --- drivers/usb/host/Kconfig | 2 +- drivers/usb/host/ehci-mxc.c | 13 ++++++++++++- include/linux/fsl_devices.h | 2 ++ 3 files changed, 15 insertions(+), 2 deletions(-)