diff options
author | Alexander Shishkin <alexander.shishkin@linux.intel.com> | 2012-05-11 17:25:54 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-05-11 16:56:15 -0700 |
commit | eb70e5ab8f95a81283623c03d2c99dfc59fcb319 (patch) | |
tree | fc20c9d10484171490cf6b69f7f5b6f934803366 /drivers/usb/chipidea/ci.h | |
parent | 758fc9860c19eceb56e5886a5225db623c521971 (diff) | |
download | kernel_goldelico_gta04-eb70e5ab8f95a81283623c03d2c99dfc59fcb319.zip kernel_goldelico_gta04-eb70e5ab8f95a81283623c03d2c99dfc59fcb319.tar.gz kernel_goldelico_gta04-eb70e5ab8f95a81283623c03d2c99dfc59fcb319.tar.bz2 |
usb: chipidea: add host role
This adds EHCI host support to the chipidea driver. We want it to be
part of the hdrc driver and not a standalone (sub-)driver module, as
the structure of ehci-hcd.c suggests, so for chipidea controller we
hack it to not provide platform-related code, but only the ehci hcd.
The ehci-platform driver won't work for us here too, because the
controller uses the same registers for both device and host mode and
also otg-related bits, so it's not really possible to put ehci registers
into a separate resource.
This is not a pretty solution, but the alternative is exporting symbols
from the chipidea driver to a ehci-chipidea driver and doing all the
module refcounting.
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/chipidea/ci.h')
-rw-r--r-- | drivers/usb/chipidea/ci.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/usb/chipidea/ci.h b/drivers/usb/chipidea/ci.h index 0ab8341..c605acc 100644 --- a/drivers/usb/chipidea/ci.h +++ b/drivers/usb/chipidea/ci.h @@ -15,6 +15,7 @@ #include <linux/list.h> #include <linux/irqreturn.h> +#include <linux/usb.h> #include <linux/usb/gadget.h> /****************************************************************************** @@ -84,6 +85,7 @@ struct ci_role_driver { /** * struct hw_bank - hardware register mapping representation * @lpm: set if the device is LPM capable + * @phys: physical address of the controller's registers * @abs: absolute address of the beginning of register window * @cap: capability registers * @op: operational registers @@ -92,6 +94,7 @@ struct ci_role_driver { */ struct hw_bank { unsigned lpm; + resource_size_t phys; void __iomem *abs; void __iomem *cap; void __iomem *op; @@ -128,6 +131,7 @@ struct hw_bank { * @udc_driver: platform specific information supplied by parent device * @vbus_active: is VBUS active * @transceiver: pointer to USB PHY, if any + * @hcd: pointer to usb_hcd for ehci host driver */ struct ci13xxx { struct device *dev; @@ -160,6 +164,7 @@ struct ci13xxx { struct ci13xxx_udc_driver *udc_driver; int vbus_active; struct usb_phy *transceiver; + struct usb_hcd *hcd; }; static inline struct ci_role_driver *ci_role(struct ci13xxx *ci) @@ -302,7 +307,7 @@ static inline u32 hw_test_and_write(struct ci13xxx *udc, enum ci13xxx_regs reg, return (val & mask) >> ffs_nr(mask); } -int hw_device_reset(struct ci13xxx *ci); +int hw_device_reset(struct ci13xxx *ci, u32 mode); int hw_port_test_set(struct ci13xxx *ci, u8 mode); |