diff options
Diffstat (limited to 'arch/arm/mach-mx5/board-cpuimx51sd.c')
-rw-r--r-- | arch/arm/mach-mx5/board-cpuimx51sd.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/arch/arm/mach-mx5/board-cpuimx51sd.c b/arch/arm/mach-mx5/board-cpuimx51sd.c index 06beec10a811..5276660041ad 100644 --- a/arch/arm/mach-mx5/board-cpuimx51sd.c +++ b/arch/arm/mach-mx5/board-cpuimx51sd.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
25 | #include <linux/irq.h> | ||
26 | #include <linux/i2c-gpio.h> | 25 | #include <linux/i2c-gpio.h> |
27 | #include <linux/spi/spi.h> | 26 | #include <linux/spi/spi.h> |
28 | #include <linux/can/platform/mcp251x.h> | 27 | #include <linux/can/platform/mcp251x.h> |
@@ -32,14 +31,12 @@ | |||
32 | #include <mach/hardware.h> | 31 | #include <mach/hardware.h> |
33 | #include <mach/iomux-mx51.h> | 32 | #include <mach/iomux-mx51.h> |
34 | 33 | ||
35 | #include <asm/irq.h> | ||
36 | #include <asm/setup.h> | 34 | #include <asm/setup.h> |
37 | #include <asm/mach-types.h> | 35 | #include <asm/mach-types.h> |
38 | #include <asm/mach/arch.h> | 36 | #include <asm/mach/arch.h> |
39 | #include <asm/mach/time.h> | 37 | #include <asm/mach/time.h> |
40 | 38 | ||
41 | #include "devices-imx51.h" | 39 | #include "devices-imx51.h" |
42 | #include "devices.h" | ||
43 | #include "cpu_op-mx51.h" | 40 | #include "cpu_op-mx51.h" |
44 | 41 | ||
45 | #define USBH1_RST IMX_GPIO_NR(2, 28) | 42 | #define USBH1_RST IMX_GPIO_NR(2, 28) |
@@ -108,7 +105,7 @@ static iomux_v3_cfg_t eukrea_cpuimx51sd_pads[] = { | |||
108 | 105 | ||
109 | /* Touchscreen */ | 106 | /* Touchscreen */ |
110 | /* IRQ */ | 107 | /* IRQ */ |
111 | _MX51_PAD_GPIO_NAND__GPIO_NAND | MUX_PAD_CTRL(PAD_CTL_PUS_22K_UP | | 108 | NEW_PAD_CTRL(MX51_PAD_GPIO_NAND__GPIO_NAND, PAD_CTL_PUS_22K_UP | |
112 | PAD_CTL_PKE | PAD_CTL_SRE_FAST | | 109 | PAD_CTL_PKE | PAD_CTL_SRE_FAST | |
113 | PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS), | 110 | PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS), |
114 | }; | 111 | }; |
@@ -129,7 +126,7 @@ static struct i2c_board_info eukrea_cpuimx51sd_i2c_devices[] = { | |||
129 | I2C_BOARD_INFO("tsc2007", 0x49), | 126 | I2C_BOARD_INFO("tsc2007", 0x49), |
130 | .type = "tsc2007", | 127 | .type = "tsc2007", |
131 | .platform_data = &tsc2007_info, | 128 | .platform_data = &tsc2007_info, |
132 | .irq = gpio_to_irq(TSC2007_IRQGPIO), | 129 | .irq = IMX_GPIO_TO_IRQ(TSC2007_IRQGPIO), |
133 | }, | 130 | }, |
134 | }; | 131 | }; |
135 | 132 | ||
@@ -149,7 +146,7 @@ static int initialize_otg_port(struct platform_device *pdev) | |||
149 | void __iomem *usb_base; | 146 | void __iomem *usb_base; |
150 | void __iomem *usbother_base; | 147 | void __iomem *usbother_base; |
151 | 148 | ||
152 | usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); | 149 | usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K); |
153 | if (!usb_base) | 150 | if (!usb_base) |
154 | return -ENOMEM; | 151 | return -ENOMEM; |
155 | usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; | 152 | usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; |
@@ -172,7 +169,7 @@ static int initialize_usbh1_port(struct platform_device *pdev) | |||
172 | void __iomem *usb_base; | 169 | void __iomem *usb_base; |
173 | void __iomem *usbother_base; | 170 | void __iomem *usbother_base; |
174 | 171 | ||
175 | usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); | 172 | usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K); |
176 | if (!usb_base) | 173 | if (!usb_base) |
177 | return -ENOMEM; | 174 | return -ENOMEM; |
178 | usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; | 175 | usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; |
@@ -189,17 +186,17 @@ static int initialize_usbh1_port(struct platform_device *pdev) | |||
189 | MXC_EHCI_ITC_NO_THRESHOLD); | 186 | MXC_EHCI_ITC_NO_THRESHOLD); |
190 | } | 187 | } |
191 | 188 | ||
192 | static struct mxc_usbh_platform_data dr_utmi_config = { | 189 | static const struct mxc_usbh_platform_data dr_utmi_config __initconst = { |
193 | .init = initialize_otg_port, | 190 | .init = initialize_otg_port, |
194 | .portsc = MXC_EHCI_UTMI_16BIT, | 191 | .portsc = MXC_EHCI_UTMI_16BIT, |
195 | }; | 192 | }; |
196 | 193 | ||
197 | static struct fsl_usb2_platform_data usb_pdata = { | 194 | static const struct fsl_usb2_platform_data usb_pdata __initconst = { |
198 | .operating_mode = FSL_USB2_DR_DEVICE, | 195 | .operating_mode = FSL_USB2_DR_DEVICE, |
199 | .phy_mode = FSL_USB2_PHY_UTMI_WIDE, | 196 | .phy_mode = FSL_USB2_PHY_UTMI_WIDE, |
200 | }; | 197 | }; |
201 | 198 | ||
202 | static struct mxc_usbh_platform_data usbh1_config = { | 199 | static const struct mxc_usbh_platform_data usbh1_config __initconst = { |
203 | .init = initialize_usbh1_port, | 200 | .init = initialize_usbh1_port, |
204 | .portsc = MXC_EHCI_MODE_ULPI, | 201 | .portsc = MXC_EHCI_MODE_ULPI, |
205 | }; | 202 | }; |
@@ -245,7 +242,7 @@ static struct spi_board_info cpuimx51sd_spi_device[] = { | |||
245 | .mode = SPI_MODE_0, | 242 | .mode = SPI_MODE_0, |
246 | .chip_select = 0, | 243 | .chip_select = 0, |
247 | .platform_data = &mcp251x_info, | 244 | .platform_data = &mcp251x_info, |
248 | .irq = gpio_to_irq(CAN_IRQGPIO) | 245 | .irq = IMX_GPIO_TO_IRQ(CAN_IRQGPIO) |
249 | }, | 246 | }, |
250 | }; | 247 | }; |
251 | 248 | ||
@@ -303,17 +300,17 @@ static void __init eukrea_cpuimx51sd_init(void) | |||
303 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 300 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
304 | 301 | ||
305 | if (otg_mode_host) | 302 | if (otg_mode_host) |
306 | mxc_register_device(&mxc_usbdr_host_device, &dr_utmi_config); | 303 | imx51_add_mxc_ehci_otg(&dr_utmi_config); |
307 | else { | 304 | else { |
308 | initialize_otg_port(NULL); | 305 | initialize_otg_port(NULL); |
309 | mxc_register_device(&mxc_usbdr_udc_device, &usb_pdata); | 306 | imx51_add_fsl_usb2_udc(&usb_pdata); |
310 | } | 307 | } |
311 | 308 | ||
312 | gpio_request(USBH1_RST, "usb_rst"); | 309 | gpio_request(USBH1_RST, "usb_rst"); |
313 | gpio_direction_output(USBH1_RST, 0); | 310 | gpio_direction_output(USBH1_RST, 0); |
314 | msleep(20); | 311 | msleep(20); |
315 | gpio_set_value(USBH1_RST, 1); | 312 | gpio_set_value(USBH1_RST, 1); |
316 | mxc_register_device(&mxc_usbh1_device, &usbh1_config); | 313 | imx51_add_mxc_ehci_hs(1, &usbh1_config); |
317 | 314 | ||
318 | #ifdef CONFIG_MACH_EUKREA_MBIMXSD51_BASEBOARD | 315 | #ifdef CONFIG_MACH_EUKREA_MBIMXSD51_BASEBOARD |
319 | eukrea_mbimxsd51_baseboard_init(); | 316 | eukrea_mbimxsd51_baseboard_init(); |