aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx5/board-mx51_babbage.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-mx5/board-mx51_babbage.c')
-rw-r--r--arch/arm/mach-mx5/board-mx51_babbage.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/arch/arm/mach-mx5/board-mx51_babbage.c b/arch/arm/mach-mx5/board-mx51_babbage.c
index 11b0ff67f89d..622b2de7d0e8 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
179static struct imxi2c_platform_data babbage_hsi2c_data = { 177static 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
291static struct mxc_usbh_platform_data dr_utmi_config = { 289static 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
296static struct fsl_usb2_platform_data usb_pdata = { 294static 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
301static struct mxc_usbh_platform_data usbh1_config = { 299static 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};
@@ -357,8 +355,8 @@ static const struct esdhc_platform_data mx51_babbage_sd2_data __initconst = {
357static void __init mx51_babbage_init(void) 355static void __init mx51_babbage_init(void)
358{ 356{
359 iomux_v3_cfg_t usbh1stp = MX51_PAD_USBH1_STP__USBH1_STP; 357 iomux_v3_cfg_t usbh1stp = MX51_PAD_USBH1_STP__USBH1_STP;
360 iomux_v3_cfg_t power_key = _MX51_PAD_EIM_A27__GPIO2_21 | 358 iomux_v3_cfg_t power_key = NEW_PAD_CTRL(MX51_PAD_EIM_A27__GPIO2_21,
361 MUX_PAD_CTRL(PAD_CTL_SRE_FAST | PAD_CTL_DSE_HIGH | PAD_CTL_PUS_100K_UP); 359 PAD_CTL_SRE_FAST | PAD_CTL_DSE_HIGH | PAD_CTL_PUS_100K_UP);
362 360
363 imx51_soc_init(); 361 imx51_soc_init();
364 362
@@ -381,17 +379,17 @@ static void __init mx51_babbage_init(void)
381 379
382 imx51_add_imx_i2c(0, &babbage_i2c_data); 380 imx51_add_imx_i2c(0, &babbage_i2c_data);
383 imx51_add_imx_i2c(1, &babbage_i2c_data); 381 imx51_add_imx_i2c(1, &babbage_i2c_data);
384 mxc_register_device(&mxc_hsi2c_device, &babbage_hsi2c_data); 382 imx51_add_hsi2c(&babbage_hsi2c_data);
385 383
386 if (otg_mode_host) 384 if (otg_mode_host)
387 mxc_register_device(&mxc_usbdr_host_device, &dr_utmi_config); 385 imx51_add_mxc_ehci_otg(&dr_utmi_config);
388 else { 386 else {
389 initialize_otg_port(NULL); 387 initialize_otg_port(NULL);
390 mxc_register_device(&mxc_usbdr_udc_device, &usb_pdata); 388 imx51_add_fsl_usb2_udc(&usb_pdata);
391 } 389 }
392 390
393 gpio_usbh1_active(); 391 gpio_usbh1_active();
394 mxc_register_device(&mxc_usbh1_device, &usbh1_config); 392 imx51_add_mxc_ehci_hs(1, &usbh1_config);
395 /* setback USBH1_STP to be function */ 393 /* setback USBH1_STP to be function */
396 mxc_iomux_v3_setup_pad(usbh1stp); 394 mxc_iomux_v3_setup_pad(usbh1stp);
397 babbage_usbhub_reset(); 395 babbage_usbhub_reset();
@@ -416,7 +414,7 @@ static struct sys_timer mx51_babbage_timer = {
416 414
417MACHINE_START(MX51_BABBAGE, "Freescale MX51 Babbage Board") 415MACHINE_START(MX51_BABBAGE, "Freescale MX51 Babbage Board")
418 /* Maintainer: Amit Kucheria <amit.kucheria@canonical.com> */ 416 /* Maintainer: Amit Kucheria <amit.kucheria@canonical.com> */
419 .boot_params = MX51_PHYS_OFFSET + 0x100, 417 .atag_offset = 0x100,
420 .map_io = mx51_map_io, 418 .map_io = mx51_map_io,
421 .init_early = imx51_init_early, 419 .init_early = imx51_init_early,
422 .init_irq = mx51_init_irq, 420 .init_irq = mx51_init_irq,