diff options
author | Arnd Bergmann <arnd@arndb.de> | 2011-11-01 12:12:22 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2011-11-01 12:12:22 -0400 |
commit | c72dbae971400e466ad9ff16c920cd6d9d8c55a1 (patch) | |
tree | 7a0ebba8b14d889a8b42edfa1272be222b908a82 /arch/arm/mach-mx5/board-mx51_babbage.c | |
parent | 7e1efcf5d2039fb7a91e21df32f4175dbca4d61c (diff) | |
parent | b4cbb8a4e602ea77b0525d06eff89c6a6070dab3 (diff) |
Merge branch 'imx/devel' into next/dt
The board changes in the imx/devel branch conflict with other changes in
the device imx/dt branch.
Conflicts:
arch/arm/mach-mx5/board-mx53_loco.c
arch/arm/mach-mx5/board-mx53_smd.c
arch/arm/plat-mxc/include/mach/common.h
arch/arm/plat-mxc/include/mach/memory.h
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-mx5/board-mx51_babbage.c')
-rw-r--r-- | arch/arm/mach-mx5/board-mx51_babbage.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/arch/arm/mach-mx5/board-mx51_babbage.c b/arch/arm/mach-mx5/board-mx51_babbage.c index 4e692dc836a8..5c837603ff0f 100644 --- a/arch/arm/mach-mx5/board-mx51_babbage.c +++ b/arch/arm/mach-mx5/board-mx51_babbage.c | |||
@@ -24,14 +24,12 @@ | |||
24 | #include <mach/hardware.h> | 24 | #include <mach/hardware.h> |
25 | #include <mach/iomux-mx51.h> | 25 | #include <mach/iomux-mx51.h> |
26 | 26 | ||
27 | #include <asm/irq.h> | ||
28 | #include <asm/setup.h> | 27 | #include <asm/setup.h> |
29 | #include <asm/mach-types.h> | 28 | #include <asm/mach-types.h> |
30 | #include <asm/mach/arch.h> | 29 | #include <asm/mach/arch.h> |
31 | #include <asm/mach/time.h> | 30 | #include <asm/mach/time.h> |
32 | 31 | ||
33 | #include "devices-imx51.h" | 32 | #include "devices-imx51.h" |
34 | #include "devices.h" | ||
35 | #include "cpu_op-mx51.h" | 33 | #include "cpu_op-mx51.h" |
36 | 34 | ||
37 | #define BABBAGE_USB_HUB_RESET IMX_GPIO_NR(1, 7) | 35 | #define BABBAGE_USB_HUB_RESET IMX_GPIO_NR(1, 7) |
@@ -176,7 +174,7 @@ static const struct imxi2c_platform_data babbage_i2c_data __initconst = { | |||
176 | .bitrate = 100000, | 174 | .bitrate = 100000, |
177 | }; | 175 | }; |
178 | 176 | ||
179 | static struct imxi2c_platform_data babbage_hsi2c_data = { | 177 | static const struct imxi2c_platform_data babbage_hsi2c_data __initconst = { |
180 | .bitrate = 400000, | 178 | .bitrate = 400000, |
181 | }; | 179 | }; |
182 | 180 | ||
@@ -249,7 +247,7 @@ static int initialize_otg_port(struct platform_device *pdev) | |||
249 | void __iomem *usb_base; | 247 | void __iomem *usb_base; |
250 | void __iomem *usbother_base; | 248 | void __iomem *usbother_base; |
251 | 249 | ||
252 | usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); | 250 | usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K); |
253 | if (!usb_base) | 251 | if (!usb_base) |
254 | return -ENOMEM; | 252 | return -ENOMEM; |
255 | usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; | 253 | usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; |
@@ -272,7 +270,7 @@ static int initialize_usbh1_port(struct platform_device *pdev) | |||
272 | void __iomem *usb_base; | 270 | void __iomem *usb_base; |
273 | void __iomem *usbother_base; | 271 | void __iomem *usbother_base; |
274 | 272 | ||
275 | usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); | 273 | usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K); |
276 | if (!usb_base) | 274 | if (!usb_base) |
277 | return -ENOMEM; | 275 | return -ENOMEM; |
278 | usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; | 276 | usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; |
@@ -288,17 +286,17 @@ static int initialize_usbh1_port(struct platform_device *pdev) | |||
288 | MXC_EHCI_ITC_NO_THRESHOLD); | 286 | MXC_EHCI_ITC_NO_THRESHOLD); |
289 | } | 287 | } |
290 | 288 | ||
291 | static struct mxc_usbh_platform_data dr_utmi_config = { | 289 | static const struct mxc_usbh_platform_data dr_utmi_config __initconst = { |
292 | .init = initialize_otg_port, | 290 | .init = initialize_otg_port, |
293 | .portsc = MXC_EHCI_UTMI_16BIT, | 291 | .portsc = MXC_EHCI_UTMI_16BIT, |
294 | }; | 292 | }; |
295 | 293 | ||
296 | static struct fsl_usb2_platform_data usb_pdata = { | 294 | static const struct fsl_usb2_platform_data usb_pdata __initconst = { |
297 | .operating_mode = FSL_USB2_DR_DEVICE, | 295 | .operating_mode = FSL_USB2_DR_DEVICE, |
298 | .phy_mode = FSL_USB2_PHY_UTMI_WIDE, | 296 | .phy_mode = FSL_USB2_PHY_UTMI_WIDE, |
299 | }; | 297 | }; |
300 | 298 | ||
301 | static struct mxc_usbh_platform_data usbh1_config = { | 299 | static const struct mxc_usbh_platform_data usbh1_config __initconst = { |
302 | .init = initialize_usbh1_port, | 300 | .init = initialize_usbh1_port, |
303 | .portsc = MXC_EHCI_MODE_ULPI, | 301 | .portsc = MXC_EHCI_MODE_ULPI, |
304 | }; | 302 | }; |
@@ -363,8 +361,8 @@ void __init imx51_babbage_common_init(void) | |||
363 | static void __init mx51_babbage_init(void) | 361 | static void __init mx51_babbage_init(void) |
364 | { | 362 | { |
365 | iomux_v3_cfg_t usbh1stp = MX51_PAD_USBH1_STP__USBH1_STP; | 363 | iomux_v3_cfg_t usbh1stp = MX51_PAD_USBH1_STP__USBH1_STP; |
366 | iomux_v3_cfg_t power_key = _MX51_PAD_EIM_A27__GPIO2_21 | | 364 | iomux_v3_cfg_t power_key = NEW_PAD_CTRL(MX51_PAD_EIM_A27__GPIO2_21, |
367 | MUX_PAD_CTRL(PAD_CTL_SRE_FAST | PAD_CTL_DSE_HIGH | PAD_CTL_PUS_100K_UP); | 365 | PAD_CTL_SRE_FAST | PAD_CTL_DSE_HIGH | PAD_CTL_PUS_100K_UP); |
368 | 366 | ||
369 | imx51_soc_init(); | 367 | imx51_soc_init(); |
370 | 368 | ||
@@ -386,17 +384,17 @@ static void __init mx51_babbage_init(void) | |||
386 | 384 | ||
387 | imx51_add_imx_i2c(0, &babbage_i2c_data); | 385 | imx51_add_imx_i2c(0, &babbage_i2c_data); |
388 | imx51_add_imx_i2c(1, &babbage_i2c_data); | 386 | imx51_add_imx_i2c(1, &babbage_i2c_data); |
389 | mxc_register_device(&mxc_hsi2c_device, &babbage_hsi2c_data); | 387 | imx51_add_hsi2c(&babbage_hsi2c_data); |
390 | 388 | ||
391 | if (otg_mode_host) | 389 | if (otg_mode_host) |
392 | mxc_register_device(&mxc_usbdr_host_device, &dr_utmi_config); | 390 | imx51_add_mxc_ehci_otg(&dr_utmi_config); |
393 | else { | 391 | else { |
394 | initialize_otg_port(NULL); | 392 | initialize_otg_port(NULL); |
395 | mxc_register_device(&mxc_usbdr_udc_device, &usb_pdata); | 393 | imx51_add_fsl_usb2_udc(&usb_pdata); |
396 | } | 394 | } |
397 | 395 | ||
398 | gpio_usbh1_active(); | 396 | gpio_usbh1_active(); |
399 | mxc_register_device(&mxc_usbh1_device, &usbh1_config); | 397 | imx51_add_mxc_ehci_hs(1, &usbh1_config); |
400 | /* setback USBH1_STP to be function */ | 398 | /* setback USBH1_STP to be function */ |
401 | mxc_iomux_v3_setup_pad(usbh1stp); | 399 | mxc_iomux_v3_setup_pad(usbh1stp); |
402 | babbage_usbhub_reset(); | 400 | babbage_usbhub_reset(); |
@@ -425,6 +423,7 @@ MACHINE_START(MX51_BABBAGE, "Freescale MX51 Babbage Board") | |||
425 | .map_io = mx51_map_io, | 423 | .map_io = mx51_map_io, |
426 | .init_early = imx51_init_early, | 424 | .init_early = imx51_init_early, |
427 | .init_irq = mx51_init_irq, | 425 | .init_irq = mx51_init_irq, |
426 | .handle_irq = imx51_handle_irq, | ||
428 | .timer = &mx51_babbage_timer, | 427 | .timer = &mx51_babbage_timer, |
429 | .init_machine = mx51_babbage_init, | 428 | .init_machine = mx51_babbage_init, |
430 | MACHINE_END | 429 | MACHINE_END |