diff options
author | Tony Lindgren <tony@atomide.com> | 2010-07-05 17:31:30 +0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-07-05 17:31:30 +0400 |
commit | dd0cdd888251d0d62df417d6859e74e57146c13f (patch) | |
tree | 1ecfce96253efc5dbcd4b96eb52ed3f359f77442 /arch/arm/plat-omap/include/plat/usb.h | |
parent | 98093839307cbf1a0d5cb50b495d14a78b755ed9 (diff) | |
download | linux-dd0cdd888251d0d62df417d6859e74e57146c13f.tar.xz |
omap: Move omap1 USB platform init code into mach-omap1/usb.c
Move omap1 FS USB platform init code into mach-omap1/usb.c
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/plat-omap/include/plat/usb.h')
-rw-r--r-- | arch/arm/plat-omap/include/plat/usb.h | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/arch/arm/plat-omap/include/plat/usb.h b/arch/arm/plat-omap/include/plat/usb.h index 9f792244e77c..2a9427c8cc48 100644 --- a/arch/arm/plat-omap/include/plat/usb.h +++ b/arch/arm/plat-omap/include/plat/usb.h @@ -81,8 +81,28 @@ extern void usb_ohci_init(const struct ohci_hcd_omap_platform_data *pdata); #endif + +/* + * FIXME correct answer depends on hmc_mode, + * as does (on omap1) any nonzero value for config->otg port number + */ +#ifdef CONFIG_USB_GADGET_OMAP +#define is_usb0_device(config) 1 +#else +#define is_usb0_device(config) 0 +#endif + void omap_otg_init(struct omap_usb_config *config); -void omap_usb_init(struct omap_usb_config *pdata); + +#if defined(CONFIG_USB) || defined(CONFIG_USB_MODULE) +void omap1_usb_init(struct omap_usb_config *pdata); +#else +static inline void omap1_usb_init(struct omap_usb_config *pdata) +{ +} +#endif + +#if defined(CONFIG_ARCH_OMAP_OTG) || defined(CONFIG_ARCH_OMAP_OTG_MODULE) void omap2_usbfs_init(struct omap_usb_config *pdata); #else static inline omap2_usbfs_init(struct omap_usb_config *pdata) @@ -199,4 +219,24 @@ static inline omap2_usbfs_init(struct omap_usb_config *pdata) # define USB0PUENACTLOI (1 << 16) # define USBSTANDBYCTRL (1 << 15) +#if defined(CONFIG_ARCH_OMAP1) && defined(CONFIG_USB) +u32 omap1_usb0_init(unsigned nwires, unsigned is_device); +u32 omap1_usb1_init(unsigned nwires); +u32 omap1_usb2_init(unsigned nwires, unsigned alt_pingroup); +#else +static inline u32 omap1_usb0_init(unsigned nwires, unsigned is_device) +{ + return 0; +} +static inline u32 omap1_usb1_init(unsigned nwires) +{ + return 0; + +} +static inline u32 omap1_usb2_init(unsigned nwires, unsigned alt_pingroup) +{ + return 0; +} +#endif + #endif /* __ASM_ARCH_OMAP_USB_H */ |