diff options
Diffstat (limited to 'arch/arm/mach-mx3/mach-mx35_3ds.c')
-rw-r--r-- | arch/arm/mach-mx3/mach-mx35_3ds.c | 51 |
1 files changed, 48 insertions, 3 deletions
diff --git a/arch/arm/mach-mx3/mach-mx35_3ds.c b/arch/arm/mach-mx3/mach-mx35_3ds.c index 1c30d7212f17..91bb06552af1 100644 --- a/arch/arm/mach-mx3/mach-mx35_3ds.c +++ b/arch/arm/mach-mx3/mach-mx35_3ds.c | |||
@@ -1,5 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright 2009 Freescale Semiconductor, Inc. All Rights Reserved. | 2 | * Copyright 2009 Freescale Semiconductor, Inc. All Rights Reserved. |
3 | * Copyright (C) 2009 Marc Kleine-Budde, Pengutronix | ||
3 | * | 4 | * |
4 | * Author: Fabio Estevam <fabio.estevam@freescale.com> | 5 | * Author: Fabio Estevam <fabio.estevam@freescale.com> |
5 | * | 6 | * |
@@ -27,6 +28,8 @@ | |||
27 | #include <linux/gpio.h> | 28 | #include <linux/gpio.h> |
28 | #include <linux/fsl_devices.h> | 29 | #include <linux/fsl_devices.h> |
29 | 30 | ||
31 | #include <linux/mtd/physmap.h> | ||
32 | |||
30 | #include <asm/mach-types.h> | 33 | #include <asm/mach-types.h> |
31 | #include <asm/mach/arch.h> | 34 | #include <asm/mach/arch.h> |
32 | #include <asm/mach/time.h> | 35 | #include <asm/mach/time.h> |
@@ -35,6 +38,7 @@ | |||
35 | #include <mach/hardware.h> | 38 | #include <mach/hardware.h> |
36 | #include <mach/common.h> | 39 | #include <mach/common.h> |
37 | #include <mach/iomux-mx35.h> | 40 | #include <mach/iomux-mx35.h> |
41 | #include <mach/mxc_ehci.h> | ||
38 | 42 | ||
39 | #include "devices-imx35.h" | 43 | #include "devices-imx35.h" |
40 | #include "devices.h" | 44 | #include "devices.h" |
@@ -43,8 +47,34 @@ static const struct imxuart_platform_data uart_pdata __initconst = { | |||
43 | .flags = IMXUART_HAVE_RTSCTS, | 47 | .flags = IMXUART_HAVE_RTSCTS, |
44 | }; | 48 | }; |
45 | 49 | ||
50 | static struct physmap_flash_data mx35pdk_flash_data = { | ||
51 | .width = 2, | ||
52 | }; | ||
53 | |||
54 | static struct resource mx35pdk_flash_resource = { | ||
55 | .start = MX35_CS0_BASE_ADDR, | ||
56 | .end = MX35_CS0_BASE_ADDR + SZ_64M - 1, | ||
57 | .flags = IORESOURCE_MEM, | ||
58 | }; | ||
59 | |||
60 | static struct platform_device mx35pdk_flash = { | ||
61 | .name = "physmap-flash", | ||
62 | .id = 0, | ||
63 | .dev = { | ||
64 | .platform_data = &mx35pdk_flash_data, | ||
65 | }, | ||
66 | .resource = &mx35pdk_flash_resource, | ||
67 | .num_resources = 1, | ||
68 | }; | ||
69 | |||
70 | static const struct mxc_nand_platform_data mx35pdk_nand_board_info __initconst = { | ||
71 | .width = 1, | ||
72 | .hw_ecc = 1, | ||
73 | .flash_bbt = 1, | ||
74 | }; | ||
75 | |||
46 | static struct platform_device *devices[] __initdata = { | 76 | static struct platform_device *devices[] __initdata = { |
47 | &mxc_fec_device, | 77 | &mx35pdk_flash, |
48 | }; | 78 | }; |
49 | 79 | ||
50 | static struct pad_desc mx35pdk_pads[] = { | 80 | static struct pad_desc mx35pdk_pads[] = { |
@@ -75,14 +105,24 @@ static struct pad_desc mx35pdk_pads[] = { | |||
75 | /* USBOTG */ | 105 | /* USBOTG */ |
76 | MX35_PAD_USBOTG_PWR__USB_TOP_USBOTG_PWR, | 106 | MX35_PAD_USBOTG_PWR__USB_TOP_USBOTG_PWR, |
77 | MX35_PAD_USBOTG_OC__USB_TOP_USBOTG_OC, | 107 | MX35_PAD_USBOTG_OC__USB_TOP_USBOTG_OC, |
108 | /* USBH1 */ | ||
109 | MX35_PAD_I2C2_CLK__USB_TOP_USBH2_PWR, | ||
110 | MX35_PAD_I2C2_DAT__USB_TOP_USBH2_OC, | ||
78 | }; | 111 | }; |
79 | 112 | ||
80 | /* OTG config */ | 113 | /* OTG config */ |
81 | static struct fsl_usb2_platform_data usb_pdata = { | 114 | static struct fsl_usb2_platform_data usb_otg_pdata = { |
82 | .operating_mode = FSL_USB2_DR_DEVICE, | 115 | .operating_mode = FSL_USB2_DR_DEVICE, |
83 | .phy_mode = FSL_USB2_PHY_UTMI_WIDE, | 116 | .phy_mode = FSL_USB2_PHY_UTMI_WIDE, |
84 | }; | 117 | }; |
85 | 118 | ||
119 | /* USB HOST config */ | ||
120 | static struct mxc_usbh_platform_data usb_host_pdata = { | ||
121 | .portsc = MXC_EHCI_MODE_SERIAL, | ||
122 | .flags = MXC_EHCI_INTERFACE_SINGLE_UNI | | ||
123 | MXC_EHCI_INTERNAL_PHY, | ||
124 | }; | ||
125 | |||
86 | /* | 126 | /* |
87 | * Board specific initialization. | 127 | * Board specific initialization. |
88 | */ | 128 | */ |
@@ -90,11 +130,16 @@ static void __init mxc_board_init(void) | |||
90 | { | 130 | { |
91 | mxc_iomux_v3_setup_multiple_pads(mx35pdk_pads, ARRAY_SIZE(mx35pdk_pads)); | 131 | mxc_iomux_v3_setup_multiple_pads(mx35pdk_pads, ARRAY_SIZE(mx35pdk_pads)); |
92 | 132 | ||
133 | imx35_add_fec(NULL); | ||
93 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 134 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
94 | 135 | ||
95 | imx35_add_imx_uart0(&uart_pdata); | 136 | imx35_add_imx_uart0(&uart_pdata); |
96 | 137 | ||
97 | mxc_register_device(&mxc_otg_udc_device, &usb_pdata); | 138 | mxc_register_device(&mxc_otg_udc_device, &usb_otg_pdata); |
139 | |||
140 | mxc_register_device(&mxc_usbh1, &usb_host_pdata); | ||
141 | |||
142 | imx35_add_mxc_nand(&mx35pdk_nand_board_info); | ||
98 | } | 143 | } |
99 | 144 | ||
100 | static void __init mx35pdk_timer_init(void) | 145 | static void __init mx35pdk_timer_init(void) |