Commit dd0cdd88 authored by Tony Lindgren's avatar Tony Lindgren

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: default avatarTony Lindgren <tony@atomide.com>
parent 98093839
......@@ -23,6 +23,9 @@ obj-y += $(i2c-omap-m) $(i2c-omap-y)
led-y := leds.o
usb-fs-$(CONFIG_USB) := usb.o
obj-y += $(usb-fs-m) $(usb-fs-y)
# Specific board support
obj-$(CONFIG_MACH_OMAP_H2) += board-h2.o board-h2-mmc.o
obj-$(CONFIG_MACH_OMAP_INNOVATOR) += board-innovator.o
......
......@@ -235,7 +235,7 @@ static void __init ams_delta_init(void)
/* Clear latch2 (NAND, LCD, modem enable) */
ams_delta_latch2_write(~0, 0);
omap_usb_init(&ams_delta_usb_config);
omap1_usb_init(&ams_delta_usb_config);
platform_add_devices(ams_delta_devices, ARRAY_SIZE(ams_delta_devices));
#ifdef CONFIG_AMS_DELTA_FIQ
......
......@@ -72,12 +72,12 @@ static void __init omap_generic_init(void)
omap_cfg_reg(UART3_TX);
omap_cfg_reg(UART3_RX);
omap_usb_init(&generic1510_usb_config);
omap1_usb_init(&generic1510_usb_config);
}
#endif
#if defined(CONFIG_ARCH_OMAP16XX)
if (!cpu_is_omap1510()) {
omap_usb_init(&generic1610_usb_config);
omap1_usb_init(&generic1610_usb_config);
}
#endif
......
......@@ -452,7 +452,7 @@ static void __init h2_init(void)
omap_serial_init();
omap_register_i2c_bus(1, 100, h2_i2c_board_info,
ARRAY_SIZE(h2_i2c_board_info));
omap_usb_init(&h2_usb_config);
omap1_usb_init(&h2_usb_config);
h2_mmc_init();
}
......
......@@ -405,7 +405,7 @@ static void __init h3_init(void)
omap_serial_init();
omap_register_i2c_bus(1, 100, h3_i2c_board_info,
ARRAY_SIZE(h3_i2c_board_info));
omap_usb_init(&h3_usb_config);
omap1_usb_init(&h3_usb_config);
h3_mmc_init();
}
......
......@@ -287,7 +287,7 @@ static void __init htcherald_init(void)
htcherald_disable_watchdog();
htcherald_usb_enable();
omap_usb_init(&htcherald_usb_config);
omap1_usb_init(&htcherald_usb_config);
}
static void __init htcherald_init_irq(void)
......
......@@ -422,13 +422,13 @@ static void __init innovator_init(void)
#ifdef CONFIG_ARCH_OMAP15XX
if (cpu_is_omap1510()) {
omap_usb_init(&innovator1510_usb_config);
omap1_usb_init(&innovator1510_usb_config);
innovator_config[1].data = &innovator1510_lcd_config;
}
#endif
#ifdef CONFIG_ARCH_OMAP16XX
if (cpu_is_omap1610()) {
omap_usb_init(&h2_usb_config);
omap1_usb_init(&h2_usb_config);
innovator_config[1].data = &innovator1610_lcd_config;
}
#endif
......
......@@ -386,7 +386,7 @@ static void __init omap_nokia770_init(void)
hwa742_dev_init();
ads7846_dev_init();
mipid_dev_init();
omap_usb_init(&nokia770_usb_config);
omap1_usb_init(&nokia770_usb_config);
nokia770_mmc_init();
}
......
......@@ -560,7 +560,7 @@ static void __init osk_init(void)
l |= (3 << 1);
omap_writel(l, USB_TRANSCEIVER_CTRL);
omap_usb_init(&osk_usb_config);
omap1_usb_init(&osk_usb_config);
/* irq for tps65010 chip */
/* bootloader effectively does: omap_cfg_reg(U19_1610_MPUIO1); */
......
......@@ -359,7 +359,7 @@ static void __init omap_palmte_init(void)
spi_register_board_info(palmte_spi_info, ARRAY_SIZE(palmte_spi_info));
palmte_misc_gpio_setup();
omap_serial_init();
omap_usb_init(&palmte_usb_config);
omap1_usb_init(&palmte_usb_config);
omap_register_i2c_bus(1, 100, NULL, 0);
}
......
......@@ -307,7 +307,7 @@ static void __init omap_palmtt_init(void)
spi_register_board_info(palmtt_boardinfo,ARRAY_SIZE(palmtt_boardinfo));
omap_serial_init();
omap_usb_init(&palmtt_usb_config);
omap1_usb_init(&palmtt_usb_config);
omap_register_i2c_bus(1, 100, NULL, 0);
}
......
......@@ -325,7 +325,7 @@ omap_palmz71_init(void)
spi_register_board_info(palmz71_boardinfo,
ARRAY_SIZE(palmz71_boardinfo));
omap_usb_init(&palmz71_usb_config);
omap1_usb_init(&palmz71_usb_config);
omap_serial_init();
omap_register_i2c_bus(1, 100, NULL, 0);
palmz71_gpio_setup(0);
......
......@@ -392,7 +392,7 @@ static void __init omap_sx1_init(void)
omap_board_config_size = ARRAY_SIZE(sx1_config);
omap_serial_init();
omap_register_i2c_bus(1, 100, NULL, 0);
omap_usb_init(&sx1_usb_config);
omap1_usb_init(&sx1_usb_config);
sx1_mmc_init();
/* turn on USB power */
......
......@@ -198,7 +198,7 @@ static void __init voiceblue_init(void)
omap_board_config = voiceblue_config;
omap_board_config_size = ARRAY_SIZE(voiceblue_config);
omap_serial_init();
omap_usb_init(&voiceblue_usb_config);
omap1_usb_init(&voiceblue_usb_config);
omap_register_i2c_bus(1, 100, NULL, 0);
/* There is a good chance board is going up, so enable power LED
......
This diff is collapsed.
......@@ -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 */
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment