aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx3/mx31moboard-devboard.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-mx3/mx31moboard-devboard.c')
-rw-r--r--arch/arm/mach-mx3/mx31moboard-devboard.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/arch/arm/mach-mx3/mx31moboard-devboard.c b/arch/arm/mach-mx3/mx31moboard-devboard.c
index fc395a7a8599..94a0b9e4b7f3 100644
--- a/arch/arm/mach-mx3/mx31moboard-devboard.c
+++ b/arch/arm/mach-mx3/mx31moboard-devboard.c
@@ -18,15 +18,12 @@
18#include <linux/platform_device.h> 18#include <linux/platform_device.h>
19#include <linux/slab.h> 19#include <linux/slab.h>
20#include <linux/types.h> 20#include <linux/types.h>
21#include <linux/fsl_devices.h>
22 21
23#include <linux/usb/otg.h> 22#include <linux/usb/otg.h>
24 23
25#include <mach/common.h> 24#include <mach/common.h>
26#include <mach/iomux-mx3.h> 25#include <mach/iomux-mx3.h>
27#include <mach/hardware.h> 26#include <mach/hardware.h>
28#include <mach/mmc.h>
29#include <mach/mxc_ehci.h>
30#include <mach/ulpi.h> 27#include <mach/ulpi.h>
31 28
32#include "devices-imx31.h" 29#include "devices-imx31.h"
@@ -103,7 +100,7 @@ static void devboard_sdhc2_exit(struct device *dev, void *data)
103 gpio_free(SDHC2_CD); 100 gpio_free(SDHC2_CD);
104} 101}
105 102
106static struct imxmmc_platform_data sdhc2_pdata = { 103static const struct imxmmc_platform_data sdhc2_pdata __initconst = {
107 .get_ro = devboard_sdhc2_get_ro, 104 .get_ro = devboard_sdhc2_get_ro,
108 .init = devboard_sdhc2_init, 105 .init = devboard_sdhc2_init,
109 .exit = devboard_sdhc2_exit, 106 .exit = devboard_sdhc2_exit,
@@ -187,7 +184,7 @@ static int devboard_isp1105_set_vbus(struct otg_transceiver *otg, bool on)
187 return 0; 184 return 0;
188} 185}
189 186
190static struct mxc_usbh_platform_data usbh1_pdata = { 187static struct mxc_usbh_platform_data usbh1_pdata __initdata = {
191 .init = devboard_usbh1_hw_init, 188 .init = devboard_usbh1_hw_init,
192 .portsc = MXC_EHCI_MODE_UTMI | MXC_EHCI_SERIAL, 189 .portsc = MXC_EHCI_MODE_UTMI | MXC_EHCI_SERIAL,
193 .flags = MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_INTERFACE_SINGLE_UNI, 190 .flags = MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_INTERFACE_SINGLE_UNI,
@@ -196,6 +193,7 @@ static struct mxc_usbh_platform_data usbh1_pdata = {
196static int __init devboard_usbh1_init(void) 193static int __init devboard_usbh1_init(void)
197{ 194{
198 struct otg_transceiver *otg; 195 struct otg_transceiver *otg;
196 struct platform_device *pdev;
199 197
200 otg = kzalloc(sizeof(*otg), GFP_KERNEL); 198 otg = kzalloc(sizeof(*otg), GFP_KERNEL);
201 if (!otg) 199 if (!otg)
@@ -207,11 +205,15 @@ static int __init devboard_usbh1_init(void)
207 205
208 usbh1_pdata.otg = otg; 206 usbh1_pdata.otg = otg;
209 207
210 return mxc_register_device(&mxc_usbh1, &usbh1_pdata); 208 pdev = imx31_add_mxc_ehci_hs(1, &usbh1_pdata);
209 if (IS_ERR(pdev))
210 return PTR_ERR(pdev);
211
212 return 0;
211} 213}
212 214
213 215
214static struct fsl_usb2_platform_data usb_pdata = { 216static const struct fsl_usb2_platform_data usb_pdata __initconst = {
215 .operating_mode = FSL_USB2_DR_DEVICE, 217 .operating_mode = FSL_USB2_DR_DEVICE,
216 .phy_mode = FSL_USB2_PHY_ULPI, 218 .phy_mode = FSL_USB2_PHY_ULPI,
217}; 219};
@@ -228,11 +230,11 @@ void __init mx31moboard_devboard_init(void)
228 230
229 imx31_add_imx_uart1(&uart_pdata); 231 imx31_add_imx_uart1(&uart_pdata);
230 232
231 mxc_register_device(&mxcsdhc_device1, &sdhc2_pdata); 233 imx31_add_mxc_mmc(1, &sdhc2_pdata);
232 234
233 devboard_init_sel_gpios(); 235 devboard_init_sel_gpios();
234 236
235 mxc_register_device(&mxc_otg_udc_device, &usb_pdata); 237 imx31_add_fsl_usb2_udc(&usb_pdata);
236 238
237 devboard_usbh1_init(); 239 devboard_usbh1_init();
238} 240}