aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/include/plat/usb.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-omap/include/plat/usb.h')
-rw-r--r--arch/arm/plat-omap/include/plat/usb.h42
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);
81 81
82#endif 82#endif
83 83
84
85/*
86 * FIXME correct answer depends on hmc_mode,
87 * as does (on omap1) any nonzero value for config->otg port number
88 */
89#ifdef CONFIG_USB_GADGET_OMAP
90#define is_usb0_device(config) 1
91#else
92#define is_usb0_device(config) 0
93#endif
94
84void omap_otg_init(struct omap_usb_config *config); 95void omap_otg_init(struct omap_usb_config *config);
85void omap_usb_init(struct omap_usb_config *pdata); 96
97#if defined(CONFIG_USB) || defined(CONFIG_USB_MODULE)
98void omap1_usb_init(struct omap_usb_config *pdata);
99#else
100static inline void omap1_usb_init(struct omap_usb_config *pdata)
101{
102}
103#endif
104
105#if defined(CONFIG_ARCH_OMAP_OTG) || defined(CONFIG_ARCH_OMAP_OTG_MODULE)
86void omap2_usbfs_init(struct omap_usb_config *pdata); 106void omap2_usbfs_init(struct omap_usb_config *pdata);
87#else 107#else
88static inline omap2_usbfs_init(struct omap_usb_config *pdata) 108static inline omap2_usbfs_init(struct omap_usb_config *pdata)
@@ -199,4 +219,24 @@ static inline omap2_usbfs_init(struct omap_usb_config *pdata)
199# define USB0PUENACTLOI (1 << 16) 219# define USB0PUENACTLOI (1 << 16)
200# define USBSTANDBYCTRL (1 << 15) 220# define USBSTANDBYCTRL (1 << 15)
201 221
222#if defined(CONFIG_ARCH_OMAP1) && defined(CONFIG_USB)
223u32 omap1_usb0_init(unsigned nwires, unsigned is_device);
224u32 omap1_usb1_init(unsigned nwires);
225u32 omap1_usb2_init(unsigned nwires, unsigned alt_pingroup);
226#else
227static inline u32 omap1_usb0_init(unsigned nwires, unsigned is_device)
228{
229 return 0;
230}
231static inline u32 omap1_usb1_init(unsigned nwires)
232{
233 return 0;
234
235}
236static inline u32 omap1_usb2_init(unsigned nwires, unsigned alt_pingroup)
237{
238 return 0;
239}
240#endif
241
202#endif /* __ASM_ARCH_OMAP_USB_H */ 242#endif /* __ASM_ARCH_OMAP_USB_H */