From 3df714f995b0895e905090760482194233f66a1d Mon Sep 17 00:00:00 2001
Message-Id: <3df714f995b0895e905090760482194233f66a1d.1274570700.git.amit.kucheria@canonical.com>
From: Amit Kucheria <amit.kucheria@canonical.com>
Date: Sun, 23 May 2010 01:35:00 +0300
Subject: [PATCH] omap: remove calls to usb_nop_xceiv_register from board files
This will allow the OMAP USB drivers to be compiled in as modules. At the
moment, CONFIG_NOP_USB_XCEIV cannot be a module.
Signed-off-by: Amit Kucheria <amit.kucheria@canonical.com>
---
arch/arm/mach-omap2/board-4430sdp.c | 10 ++++++++--
arch/arm/mach-omap2/board-omap3evm.c | 11 ++++++++---
2 files changed, 16 insertions(+), 5 deletions(-)
@@ -110,8 +110,16 @@ static struct platform_device sdp4430_lcd_device = {
.id = -1,
};
+static struct platform_device sdp4430_nop_usb_device = {
+ .name = "nop_usb_xceiv",
+ .id = -1,
+ .resource = NULL,
+ .num_resources = 0,
+};
+
static struct platform_device *sdp4430_devices[] __initdata = {
&sdp4430_lcd_device,
+ &sdp4430_nop_usb_device,
};
static struct omap_lcd_config sdp4430_lcd_config __initdata = {
@@ -374,8 +382,6 @@ static void __init omap_4430sdp_init(void)
platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices));
omap_serial_init();
omap4_twl6030_hsmmc_init(mmc);
- /* OMAP4 SDP uses internal transceiver so register nop transceiver */
- usb_nop_xceiv_register();
/* FIXME: allow multi-omap to boot until musb is updated for omap4 */
if (!cpu_is_omap44xx())
usb_musb_init(&musb_board_data);
@@ -620,6 +620,13 @@ struct spi_board_info omap3evm_spi_board_info[] = {
},
};
+static struct platform_device omap3_evm_nop_usb_device = {
+ .name = "nop_usb_xceiv",
+ .id = -1,
+ .resource = NULL,
+ .num_resources = 0,
+};
+
static struct omap_board_config_kernel omap3_evm_config[] __initdata = {
};
@@ -634,6 +641,7 @@ static void __init omap3_evm_init_irq(void)
static struct platform_device *omap3_evm_devices[] __initdata = {
&omap3_evm_dss_device,
+ &omap3_evm_nop_usb_device,
};
static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = {
@@ -682,9 +690,6 @@ static void __init omap3_evm_init(void)
omap_serial_init();
- /* OMAP3EVM uses ISP1504 phy and so register nop transceiver */
- usb_nop_xceiv_register();
-
if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) {
/* enable EHCI VBUS using GPIO22 */
omap_mux_init_gpio(22, OMAP_PIN_INPUT_PULLUP);
--
1.7.0.4