diff options
author | Philippe Rétornaz <philippe.retornaz@epfl.ch> | 2010-05-11 10:57:50 -0400 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2010-05-17 04:05:50 -0400 |
commit | 66c202ad9a58905e0e6a0fa3976020a7ab0fa6df (patch) | |
tree | c8559ce3f8e34002228844a21172f499935f291f /arch/arm/mach-mx3 | |
parent | 25783602050600b294086d6a0be9a0c2cfe8a3e3 (diff) |
mx31moboard: Move usb OTG device registration
In preparation for a new robot which needs the
OTG port as host.
This moves the OTG device registration into board
initialisation.
Signed-off-by: Philippe Rétornaz <philippe.retornaz@epfl.ch>
Acked-by: Valentin Longchamp <valentin.longchamp@epfl.ch>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx3')
-rw-r--r-- | arch/arm/mach-mx3/mach-mx31moboard.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-mx3/mx31moboard-devboard.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-mx3/mx31moboard-marxbot.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-mx3/mx31moboard-smartbot.c | 8 |
4 files changed, 25 insertions, 7 deletions
diff --git a/arch/arm/mach-mx3/mach-mx31moboard.c b/arch/arm/mach-mx3/mach-mx31moboard.c index 5c4448947d78..4bb011afc2a3 100644 --- a/arch/arm/mach-mx3/mach-mx31moboard.c +++ b/arch/arm/mach-mx3/mach-mx31moboard.c | |||
@@ -18,7 +18,6 @@ | |||
18 | 18 | ||
19 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
20 | #include <linux/dma-mapping.h> | 20 | #include <linux/dma-mapping.h> |
21 | #include <linux/fsl_devices.h> | ||
22 | #include <linux/gfp.h> | 21 | #include <linux/gfp.h> |
23 | #include <linux/gpio.h> | 22 | #include <linux/gpio.h> |
24 | #include <linux/init.h> | 23 | #include <linux/init.h> |
@@ -353,11 +352,6 @@ static void usb_xcvr_reset(void) | |||
353 | mdelay(1); | 352 | mdelay(1); |
354 | } | 353 | } |
355 | 354 | ||
356 | static struct fsl_usb2_platform_data usb_pdata = { | ||
357 | .operating_mode = FSL_USB2_DR_DEVICE, | ||
358 | .phy_mode = FSL_USB2_PHY_ULPI, | ||
359 | }; | ||
360 | |||
361 | #if defined(CONFIG_USB_ULPI) | 355 | #if defined(CONFIG_USB_ULPI) |
362 | 356 | ||
363 | static struct mxc_usbh_platform_data usbh2_pdata = { | 357 | static struct mxc_usbh_platform_data usbh2_pdata = { |
@@ -485,7 +479,6 @@ static void __init mxc_board_init(void) | |||
485 | 479 | ||
486 | usb_xcvr_reset(); | 480 | usb_xcvr_reset(); |
487 | 481 | ||
488 | mxc_register_device(&mxc_otg_udc_device, &usb_pdata); | ||
489 | moboard_usbh2_init(); | 482 | moboard_usbh2_init(); |
490 | 483 | ||
491 | switch (mx31moboard_baseboard) { | 484 | switch (mx31moboard_baseboard) { |
diff --git a/arch/arm/mach-mx3/mx31moboard-devboard.c b/arch/arm/mach-mx3/mx31moboard-devboard.c index 11b906ce7eae..582299cb2c08 100644 --- a/arch/arm/mach-mx3/mx31moboard-devboard.c +++ b/arch/arm/mach-mx3/mx31moboard-devboard.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
24 | #include <linux/types.h> | 24 | #include <linux/types.h> |
25 | #include <linux/fsl_devices.h> | ||
25 | 26 | ||
26 | #include <linux/usb/otg.h> | 27 | #include <linux/usb/otg.h> |
27 | 28 | ||
@@ -213,6 +214,12 @@ static int __init devboard_usbh1_init(void) | |||
213 | return mxc_register_device(&mxc_usbh1, &usbh1_pdata); | 214 | return mxc_register_device(&mxc_usbh1, &usbh1_pdata); |
214 | } | 215 | } |
215 | 216 | ||
217 | |||
218 | static struct fsl_usb2_platform_data usb_pdata = { | ||
219 | .operating_mode = FSL_USB2_DR_DEVICE, | ||
220 | .phy_mode = FSL_USB2_PHY_ULPI, | ||
221 | }; | ||
222 | |||
216 | /* | 223 | /* |
217 | * system init for baseboard usage. Will be called by mx31moboard init. | 224 | * system init for baseboard usage. Will be called by mx31moboard init. |
218 | */ | 225 | */ |
@@ -229,5 +236,7 @@ void __init mx31moboard_devboard_init(void) | |||
229 | 236 | ||
230 | devboard_init_sel_gpios(); | 237 | devboard_init_sel_gpios(); |
231 | 238 | ||
239 | mxc_register_device(&mxc_otg_udc_device, &usb_pdata); | ||
240 | |||
232 | devboard_usbh1_init(); | 241 | devboard_usbh1_init(); |
233 | } | 242 | } |
diff --git a/arch/arm/mach-mx3/mx31moboard-marxbot.c b/arch/arm/mach-mx3/mx31moboard-marxbot.c index ffb105e14d88..4930f8c27e66 100644 --- a/arch/arm/mach-mx3/mx31moboard-marxbot.c +++ b/arch/arm/mach-mx3/mx31moboard-marxbot.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | #include <linux/platform_device.h> | 26 | #include <linux/platform_device.h> |
27 | #include <linux/types.h> | 27 | #include <linux/types.h> |
28 | #include <linux/fsl_devices.h> | ||
28 | 29 | ||
29 | #include <linux/usb/otg.h> | 30 | #include <linux/usb/otg.h> |
30 | 31 | ||
@@ -329,6 +330,11 @@ static int __init marxbot_usbh1_init(void) | |||
329 | return mxc_register_device(&mxc_usbh1, &usbh1_pdata); | 330 | return mxc_register_device(&mxc_usbh1, &usbh1_pdata); |
330 | } | 331 | } |
331 | 332 | ||
333 | static struct fsl_usb2_platform_data usb_pdata = { | ||
334 | .operating_mode = FSL_USB2_DR_DEVICE, | ||
335 | .phy_mode = FSL_USB2_PHY_ULPI, | ||
336 | }; | ||
337 | |||
332 | /* | 338 | /* |
333 | * system init for baseboard usage. Will be called by mx31moboard init. | 339 | * system init for baseboard usage. Will be called by mx31moboard init. |
334 | */ | 340 | */ |
@@ -356,5 +362,7 @@ void __init mx31moboard_marxbot_init(void) | |||
356 | gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_LCS0)); | 362 | gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_LCS0)); |
357 | gpio_export(IOMUX_TO_GPIO(MX31_PIN_LCS0), false); | 363 | gpio_export(IOMUX_TO_GPIO(MX31_PIN_LCS0), false); |
358 | 364 | ||
365 | mxc_register_device(&mxc_otg_udc_device, &usb_pdata); | ||
366 | |||
359 | marxbot_usbh1_init(); | 367 | marxbot_usbh1_init(); |
360 | } | 368 | } |
diff --git a/arch/arm/mach-mx3/mx31moboard-smartbot.c b/arch/arm/mach-mx3/mx31moboard-smartbot.c index 83d2b9f42cec..ac1a163a5b78 100644 --- a/arch/arm/mach-mx3/mx31moboard-smartbot.c +++ b/arch/arm/mach-mx3/mx31moboard-smartbot.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/i2c.h> | 23 | #include <linux/i2c.h> |
24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
25 | #include <linux/types.h> | 25 | #include <linux/types.h> |
26 | #include <linux/fsl_devices.h> | ||
26 | 27 | ||
27 | #include <mach/common.h> | 28 | #include <mach/common.h> |
28 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
@@ -116,6 +117,11 @@ static int __init smartbot_cam_init(void) | |||
116 | return 0; | 117 | return 0; |
117 | } | 118 | } |
118 | 119 | ||
120 | static struct fsl_usb2_platform_data usb_pdata = { | ||
121 | .operating_mode = FSL_USB2_DR_DEVICE, | ||
122 | .phy_mode = FSL_USB2_PHY_ULPI, | ||
123 | }; | ||
124 | |||
119 | #define POWER_EN IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1) | 125 | #define POWER_EN IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1) |
120 | #define DSPIC_RST_B IOMUX_TO_GPIO(MX31_PIN_DSR_DCE1) | 126 | #define DSPIC_RST_B IOMUX_TO_GPIO(MX31_PIN_DSR_DCE1) |
121 | #define TRSLAT_RST_B IOMUX_TO_GPIO(MX31_PIN_RI_DCE1) | 127 | #define TRSLAT_RST_B IOMUX_TO_GPIO(MX31_PIN_RI_DCE1) |
@@ -155,6 +161,8 @@ void __init mx31moboard_smartbot_init(void) | |||
155 | 161 | ||
156 | mxc_register_device(&mxc_uart_device1, &uart_pdata); | 162 | mxc_register_device(&mxc_uart_device1, &uart_pdata); |
157 | 163 | ||
164 | mxc_register_device(&mxc_otg_udc_device, &usb_pdata); | ||
165 | |||
158 | smartbot_resets_init(); | 166 | smartbot_resets_init(); |
159 | 167 | ||
160 | smartbot_cam_init(); | 168 | smartbot_cam_init(); |