diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-01-06 17:33:32 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-01-06 17:33:32 -0500 |
commit | 404a02cbd2ae8bf256a2fa1169bdfe86bb5ebb34 (patch) | |
tree | 99119edc53fdca73ed7586829b8ee736e09440b3 /arch/arm/mach-mx3 | |
parent | 28cdac6690cb113856293bf79b40de33dbd8f974 (diff) | |
parent | 1051b9f0f9eab8091fe3bf98320741adf36b4cfa (diff) |
Merge branch 'devel-stable' into devel
Conflicts:
arch/arm/mach-pxa/clock.c
arch/arm/mach-pxa/clock.h
Diffstat (limited to 'arch/arm/mach-mx3')
26 files changed, 450 insertions, 496 deletions
diff --git a/arch/arm/mach-mx3/Kconfig b/arch/arm/mach-mx3/Kconfig index 5000ac1f93e3..0717f887cba0 100644 --- a/arch/arm/mach-mx3/Kconfig +++ b/arch/arm/mach-mx3/Kconfig | |||
@@ -1,21 +1,35 @@ | |||
1 | if ARCH_MX3 | 1 | if ARCH_MX3 |
2 | 2 | ||
3 | # ARCH_MX31 and ARCH_MX35 are left for compatibility | ||
4 | # Some usages assume that having one of them implies not having (e.g.) ARCH_MX2. | ||
5 | # To easily distinguish good and reviewed from unreviewed usages new (and IMHO | ||
6 | # more sensible) names are used: SOC_IMX31 and SOC_IMX35 | ||
3 | config ARCH_MX31 | 7 | config ARCH_MX31 |
4 | select ARCH_HAS_RNGA | ||
5 | select ARCH_MXC_AUDMUX_V2 | ||
6 | bool | 8 | bool |
7 | 9 | ||
8 | config ARCH_MX35 | 10 | config ARCH_MX35 |
9 | bool | 11 | bool |
12 | |||
13 | config SOC_IMX31 | ||
14 | bool | ||
15 | select IMX_HAVE_PLATFORM_MXC_RNGA | ||
16 | select ARCH_MXC_AUDMUX_V2 | ||
17 | select ARCH_MX31 | ||
18 | select MXC_AVIC | ||
19 | |||
20 | config SOC_IMX35 | ||
21 | bool | ||
10 | select ARCH_MXC_IOMUX_V3 | 22 | select ARCH_MXC_IOMUX_V3 |
11 | select ARCH_MXC_AUDMUX_V2 | 23 | select ARCH_MXC_AUDMUX_V2 |
12 | select HAVE_EPIT | 24 | select HAVE_EPIT |
25 | select ARCH_MX35 | ||
26 | select MXC_AVIC | ||
13 | 27 | ||
14 | comment "MX3 platforms:" | 28 | comment "MX3 platforms:" |
15 | 29 | ||
16 | config MACH_MX31ADS | 30 | config MACH_MX31ADS |
17 | bool "Support MX31ADS platforms" | 31 | bool "Support MX31ADS platforms" |
18 | select ARCH_MX31 | 32 | select SOC_IMX31 |
19 | select IMX_HAVE_PLATFORM_IMX_I2C | 33 | select IMX_HAVE_PLATFORM_IMX_I2C |
20 | select IMX_HAVE_PLATFORM_IMX_SSI | 34 | select IMX_HAVE_PLATFORM_IMX_SSI |
21 | select IMX_HAVE_PLATFORM_IMX_UART | 35 | select IMX_HAVE_PLATFORM_IMX_UART |
@@ -37,10 +51,15 @@ config MACH_MX31ADS_WM1133_EV1 | |||
37 | 51 | ||
38 | config MACH_PCM037 | 52 | config MACH_PCM037 |
39 | bool "Support Phytec pcm037 (i.MX31) platforms" | 53 | bool "Support Phytec pcm037 (i.MX31) platforms" |
40 | select ARCH_MX31 | 54 | select SOC_IMX31 |
55 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | ||
56 | select IMX_HAVE_PLATFORM_IMX2_WDT | ||
41 | select IMX_HAVE_PLATFORM_IMX_I2C | 57 | select IMX_HAVE_PLATFORM_IMX_I2C |
42 | select IMX_HAVE_PLATFORM_IMX_UART | 58 | select IMX_HAVE_PLATFORM_IMX_UART |
59 | select IMX_HAVE_PLATFORM_MXC_EHCI | ||
60 | select IMX_HAVE_PLATFORM_MXC_MMC | ||
43 | select IMX_HAVE_PLATFORM_MXC_NAND | 61 | select IMX_HAVE_PLATFORM_MXC_NAND |
62 | select IMX_HAVE_PLATFORM_MXC_W1 | ||
44 | select MXC_ULPI if USB_ULPI | 63 | select MXC_ULPI if USB_ULPI |
45 | help | 64 | help |
46 | Include support for Phytec pcm037 platform. This includes | 65 | Include support for Phytec pcm037 platform. This includes |
@@ -57,9 +76,12 @@ config MACH_PCM037_EET | |||
57 | 76 | ||
58 | config MACH_MX31LITE | 77 | config MACH_MX31LITE |
59 | bool "Support MX31 LITEKIT (LogicPD)" | 78 | bool "Support MX31 LITEKIT (LogicPD)" |
60 | select ARCH_MX31 | 79 | select SOC_IMX31 |
61 | select MXC_ULPI if USB_ULPI | 80 | select MXC_ULPI if USB_ULPI |
81 | select IMX_HAVE_PLATFORM_IMX2_WDT | ||
62 | select IMX_HAVE_PLATFORM_IMX_UART | 82 | select IMX_HAVE_PLATFORM_IMX_UART |
83 | select IMX_HAVE_PLATFORM_MXC_EHCI | ||
84 | select IMX_HAVE_PLATFORM_MXC_MMC | ||
63 | select IMX_HAVE_PLATFORM_MXC_NAND | 85 | select IMX_HAVE_PLATFORM_MXC_NAND |
64 | select IMX_HAVE_PLATFORM_SPI_IMX | 86 | select IMX_HAVE_PLATFORM_SPI_IMX |
65 | help | 87 | help |
@@ -68,11 +90,16 @@ config MACH_MX31LITE | |||
68 | 90 | ||
69 | config MACH_MX31_3DS | 91 | config MACH_MX31_3DS |
70 | bool "Support MX31PDK (3DS)" | 92 | bool "Support MX31PDK (3DS)" |
71 | select ARCH_MX31 | 93 | select SOC_IMX31 |
72 | select MXC_DEBUG_BOARD | 94 | select MXC_DEBUG_BOARD |
95 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | ||
96 | select IMX_HAVE_PLATFORM_IMX2_WDT | ||
97 | select IMX_HAVE_PLATFORM_IMX_KEYPAD | ||
73 | select IMX_HAVE_PLATFORM_IMX_UART | 98 | select IMX_HAVE_PLATFORM_IMX_UART |
99 | select IMX_HAVE_PLATFORM_MXC_EHCI | ||
74 | select IMX_HAVE_PLATFORM_MXC_NAND | 100 | select IMX_HAVE_PLATFORM_MXC_NAND |
75 | select IMX_HAVE_PLATFORM_SPI_IMX | 101 | select IMX_HAVE_PLATFORM_SPI_IMX |
102 | select MXC_ULPI if USB_ULPI | ||
76 | help | 103 | help |
77 | Include support for MX31PDK (3DS) platform. This includes specific | 104 | Include support for MX31PDK (3DS) platform. This includes specific |
78 | configurations for the board and its peripherals. | 105 | configurations for the board and its peripherals. |
@@ -88,9 +115,12 @@ config MACH_MX31_3DS_MXC_NAND_USE_BBT | |||
88 | 115 | ||
89 | config MACH_MX31MOBOARD | 116 | config MACH_MX31MOBOARD |
90 | bool "Support mx31moboard platforms (EPFL Mobots group)" | 117 | bool "Support mx31moboard platforms (EPFL Mobots group)" |
91 | select ARCH_MX31 | 118 | select SOC_IMX31 |
119 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | ||
92 | select IMX_HAVE_PLATFORM_IMX_I2C | 120 | select IMX_HAVE_PLATFORM_IMX_I2C |
93 | select IMX_HAVE_PLATFORM_IMX_UART | 121 | select IMX_HAVE_PLATFORM_IMX_UART |
122 | select IMX_HAVE_PLATFORM_MXC_EHCI | ||
123 | select IMX_HAVE_PLATFORM_MXC_MMC | ||
94 | select IMX_HAVE_PLATFORM_SPI_IMX | 124 | select IMX_HAVE_PLATFORM_SPI_IMX |
95 | select MXC_ULPI if USB_ULPI | 125 | select MXC_ULPI if USB_ULPI |
96 | help | 126 | help |
@@ -99,8 +129,10 @@ config MACH_MX31MOBOARD | |||
99 | 129 | ||
100 | config MACH_MX31LILLY | 130 | config MACH_MX31LILLY |
101 | bool "Support MX31 LILLY-1131 platforms (INCO startec)" | 131 | bool "Support MX31 LILLY-1131 platforms (INCO startec)" |
102 | select ARCH_MX31 | 132 | select SOC_IMX31 |
103 | select IMX_HAVE_PLATFORM_IMX_UART | 133 | select IMX_HAVE_PLATFORM_IMX_UART |
134 | select IMX_HAVE_PLATFORM_MXC_EHCI | ||
135 | select IMX_HAVE_PLATFORM_MXC_MMC | ||
104 | select IMX_HAVE_PLATFORM_SPI_IMX | 136 | select IMX_HAVE_PLATFORM_SPI_IMX |
105 | select MXC_ULPI if USB_ULPI | 137 | select MXC_ULPI if USB_ULPI |
106 | help | 138 | help |
@@ -109,7 +141,7 @@ config MACH_MX31LILLY | |||
109 | 141 | ||
110 | config MACH_QONG | 142 | config MACH_QONG |
111 | bool "Support Dave/DENX QongEVB-LITE platform" | 143 | bool "Support Dave/DENX QongEVB-LITE platform" |
112 | select ARCH_MX31 | 144 | select SOC_IMX31 |
113 | select IMX_HAVE_PLATFORM_IMX_UART | 145 | select IMX_HAVE_PLATFORM_IMX_UART |
114 | help | 146 | help |
115 | Include support for Dave/DENX QongEVB-LITE platform. This includes | 147 | Include support for Dave/DENX QongEVB-LITE platform. This includes |
@@ -117,13 +149,16 @@ config MACH_QONG | |||
117 | 149 | ||
118 | config MACH_PCM043 | 150 | config MACH_PCM043 |
119 | bool "Support Phytec pcm043 (i.MX35) platforms" | 151 | bool "Support Phytec pcm043 (i.MX35) platforms" |
120 | select ARCH_MX35 | 152 | select SOC_IMX35 |
153 | select IMX_HAVE_PLATFORM_FLEXCAN | ||
154 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | ||
155 | select IMX_HAVE_PLATFORM_IMX2_WDT | ||
121 | select IMX_HAVE_PLATFORM_IMX_I2C | 156 | select IMX_HAVE_PLATFORM_IMX_I2C |
122 | select IMX_HAVE_PLATFORM_IMX_SSI | 157 | select IMX_HAVE_PLATFORM_IMX_SSI |
123 | select IMX_HAVE_PLATFORM_IMX_UART | 158 | select IMX_HAVE_PLATFORM_IMX_UART |
159 | select IMX_HAVE_PLATFORM_MXC_EHCI | ||
124 | select IMX_HAVE_PLATFORM_MXC_NAND | 160 | select IMX_HAVE_PLATFORM_MXC_NAND |
125 | select IMX_HAVE_PLATFORM_FLEXCAN | 161 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX |
126 | select IMX_HAVE_PLATFORM_ESDHC | ||
127 | select MXC_ULPI if USB_ULPI | 162 | select MXC_ULPI if USB_ULPI |
128 | help | 163 | help |
129 | Include support for Phytec pcm043 platform. This includes | 164 | Include support for Phytec pcm043 platform. This includes |
@@ -131,9 +166,11 @@ config MACH_PCM043 | |||
131 | 166 | ||
132 | config MACH_ARMADILLO5X0 | 167 | config MACH_ARMADILLO5X0 |
133 | bool "Support Atmark Armadillo-500 Development Base Board" | 168 | bool "Support Atmark Armadillo-500 Development Base Board" |
134 | select ARCH_MX31 | 169 | select SOC_IMX31 |
135 | select IMX_HAVE_PLATFORM_IMX_I2C | 170 | select IMX_HAVE_PLATFORM_IMX_I2C |
136 | select IMX_HAVE_PLATFORM_IMX_UART | 171 | select IMX_HAVE_PLATFORM_IMX_UART |
172 | select IMX_HAVE_PLATFORM_MXC_EHCI | ||
173 | select IMX_HAVE_PLATFORM_MXC_MMC | ||
137 | select IMX_HAVE_PLATFORM_MXC_NAND | 174 | select IMX_HAVE_PLATFORM_MXC_NAND |
138 | select MXC_ULPI if USB_ULPI | 175 | select MXC_ULPI if USB_ULPI |
139 | help | 176 | help |
@@ -142,19 +179,21 @@ config MACH_ARMADILLO5X0 | |||
142 | 179 | ||
143 | config MACH_MX35_3DS | 180 | config MACH_MX35_3DS |
144 | bool "Support MX35PDK platform" | 181 | bool "Support MX35PDK platform" |
145 | select ARCH_MX35 | 182 | select SOC_IMX35 |
146 | select MXC_DEBUG_BOARD | 183 | select MXC_DEBUG_BOARD |
184 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | ||
185 | select IMX_HAVE_PLATFORM_IMX2_WDT | ||
147 | select IMX_HAVE_PLATFORM_IMX_UART | 186 | select IMX_HAVE_PLATFORM_IMX_UART |
187 | select IMX_HAVE_PLATFORM_MXC_EHCI | ||
148 | select IMX_HAVE_PLATFORM_MXC_NAND | 188 | select IMX_HAVE_PLATFORM_MXC_NAND |
149 | select IMX_HAVE_PLATFORM_ESDHC | 189 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX |
150 | default n | ||
151 | help | 190 | help |
152 | Include support for MX35PDK platform. This includes specific | 191 | Include support for MX35PDK platform. This includes specific |
153 | configurations for the board and its peripherals. | 192 | configurations for the board and its peripherals. |
154 | 193 | ||
155 | config MACH_KZM_ARM11_01 | 194 | config MACH_KZM_ARM11_01 |
156 | bool "Support KZM-ARM11-01(Kyoto Microcomputer)" | 195 | bool "Support KZM-ARM11-01(Kyoto Microcomputer)" |
157 | select ARCH_MX31 | 196 | select SOC_IMX31 |
158 | select IMX_HAVE_PLATFORM_IMX_UART | 197 | select IMX_HAVE_PLATFORM_IMX_UART |
159 | help | 198 | help |
160 | Include support for KZM-ARM11-01. This includes specific | 199 | Include support for KZM-ARM11-01. This includes specific |
@@ -162,12 +201,15 @@ config MACH_KZM_ARM11_01 | |||
162 | 201 | ||
163 | config MACH_EUKREA_CPUIMX35 | 202 | config MACH_EUKREA_CPUIMX35 |
164 | bool "Support Eukrea CPUIMX35 Platform" | 203 | bool "Support Eukrea CPUIMX35 Platform" |
165 | select ARCH_MX35 | 204 | select SOC_IMX35 |
166 | select IMX_HAVE_PLATFORM_IMX_UART | 205 | select IMX_HAVE_PLATFORM_FLEXCAN |
206 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | ||
207 | select IMX_HAVE_PLATFORM_IMX2_WDT | ||
167 | select IMX_HAVE_PLATFORM_IMX_I2C | 208 | select IMX_HAVE_PLATFORM_IMX_I2C |
209 | select IMX_HAVE_PLATFORM_IMX_UART | ||
210 | select IMX_HAVE_PLATFORM_MXC_EHCI | ||
168 | select IMX_HAVE_PLATFORM_MXC_NAND | 211 | select IMX_HAVE_PLATFORM_MXC_NAND |
169 | select IMX_HAVE_PLATFORM_FLEXCAN | 212 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX |
170 | select IMX_HAVE_PLATFORM_ESDHC | ||
171 | select MXC_ULPI if USB_ULPI | 213 | select MXC_ULPI if USB_ULPI |
172 | help | 214 | help |
173 | Include support for Eukrea CPUIMX35 platform. This includes | 215 | Include support for Eukrea CPUIMX35 platform. This includes |
diff --git a/arch/arm/mach-mx3/Makefile b/arch/arm/mach-mx3/Makefile index 8a182d0a3fcf..8db13294ad27 100644 --- a/arch/arm/mach-mx3/Makefile +++ b/arch/arm/mach-mx3/Makefile | |||
@@ -5,17 +5,14 @@ | |||
5 | # Object file lists. | 5 | # Object file lists. |
6 | 6 | ||
7 | obj-y := mm.o devices.o cpu.o | 7 | obj-y := mm.o devices.o cpu.o |
8 | CFLAGS_mm.o = -DIMX_NEEDS_DEPRECATED_SYMBOLS | 8 | obj-$(CONFIG_SOC_IMX31) += clock-imx31.o iomux-imx31.o |
9 | CFLAGS_devices.o = -DIMX_NEEDS_DEPRECATED_SYMBOLS | 9 | obj-$(CONFIG_SOC_IMX35) += clock-imx35.o |
10 | obj-$(CONFIG_ARCH_MX31) += clock-imx31.o iomux-imx31.o | ||
11 | obj-$(CONFIG_ARCH_MX35) += clock-imx35.o | ||
12 | obj-$(CONFIG_MACH_MX31ADS) += mach-mx31ads.o | 10 | obj-$(CONFIG_MACH_MX31ADS) += mach-mx31ads.o |
13 | obj-$(CONFIG_MACH_MX31LILLY) += mach-mx31lilly.o mx31lilly-db.o | 11 | obj-$(CONFIG_MACH_MX31LILLY) += mach-mx31lilly.o mx31lilly-db.o |
14 | obj-$(CONFIG_MACH_MX31LITE) += mach-mx31lite.o mx31lite-db.o | 12 | obj-$(CONFIG_MACH_MX31LITE) += mach-mx31lite.o mx31lite-db.o |
15 | obj-$(CONFIG_MACH_PCM037) += mach-pcm037.o | 13 | obj-$(CONFIG_MACH_PCM037) += mach-pcm037.o |
16 | obj-$(CONFIG_MACH_PCM037_EET) += mach-pcm037_eet.o | 14 | obj-$(CONFIG_MACH_PCM037_EET) += mach-pcm037_eet.o |
17 | obj-$(CONFIG_MACH_MX31_3DS) += mach-mx31_3ds.o | 15 | obj-$(CONFIG_MACH_MX31_3DS) += mach-mx31_3ds.o |
18 | CFLAGS_mach-mx31_3ds.o = -DIMX_NEEDS_DEPRECATED_SYMBOLS | ||
19 | obj-$(CONFIG_MACH_MX31MOBOARD) += mach-mx31moboard.o mx31moboard-devboard.o \ | 16 | obj-$(CONFIG_MACH_MX31MOBOARD) += mach-mx31moboard.o mx31moboard-devboard.o \ |
20 | mx31moboard-marxbot.o mx31moboard-smartbot.o | 17 | mx31moboard-marxbot.o mx31moboard-smartbot.o |
21 | obj-$(CONFIG_MACH_QONG) += mach-qong.o | 18 | obj-$(CONFIG_MACH_QONG) += mach-qong.o |
diff --git a/arch/arm/mach-mx3/clock-imx31.c b/arch/arm/mach-mx3/clock-imx31.c index 1cd8b40b7676..d423cac8cab7 100644 --- a/arch/arm/mach-mx3/clock-imx31.c +++ b/arch/arm/mach-mx3/clock-imx31.c | |||
@@ -530,7 +530,7 @@ static struct clk_lookup lookups[] = { | |||
530 | _REGISTER_CLOCK("imx31-cspi.2", NULL, cspi3_clk) | 530 | _REGISTER_CLOCK("imx31-cspi.2", NULL, cspi3_clk) |
531 | _REGISTER_CLOCK(NULL, "gpt", gpt_clk) | 531 | _REGISTER_CLOCK(NULL, "gpt", gpt_clk) |
532 | _REGISTER_CLOCK(NULL, "pwm", pwm_clk) | 532 | _REGISTER_CLOCK(NULL, "pwm", pwm_clk) |
533 | _REGISTER_CLOCK("imx-wdt.0", NULL, wdog_clk) | 533 | _REGISTER_CLOCK("imx2-wdt.0", NULL, wdog_clk) |
534 | _REGISTER_CLOCK(NULL, "rtc", rtc_clk) | 534 | _REGISTER_CLOCK(NULL, "rtc", rtc_clk) |
535 | _REGISTER_CLOCK(NULL, "epit", epit1_clk) | 535 | _REGISTER_CLOCK(NULL, "epit", epit1_clk) |
536 | _REGISTER_CLOCK(NULL, "epit", epit2_clk) | 536 | _REGISTER_CLOCK(NULL, "epit", epit2_clk) |
@@ -615,7 +615,7 @@ int __init mx31_clocks_init(unsigned long fref) | |||
615 | 615 | ||
616 | mx31_read_cpu_rev(); | 616 | mx31_read_cpu_rev(); |
617 | 617 | ||
618 | if (mx31_revision() >= MX31_CHIP_REV_2_0) { | 618 | if (mx31_revision() >= IMX_CHIP_REVISION_2_0) { |
619 | reg = __raw_readl(MXC_CCM_PMCR1); | 619 | reg = __raw_readl(MXC_CCM_PMCR1); |
620 | /* No PLL restart on DVFS switch; enable auto EMI handshake */ | 620 | /* No PLL restart on DVFS switch; enable auto EMI handshake */ |
621 | reg |= MXC_CCM_PMCR1_PLLRDIS | MXC_CCM_PMCR1_EMIRQ_EN; | 621 | reg |= MXC_CCM_PMCR1_PLLRDIS | MXC_CCM_PMCR1_EMIRQ_EN; |
diff --git a/arch/arm/mach-mx3/clock-imx35.c b/arch/arm/mach-mx3/clock-imx35.c index 819dd809615a..448a038cd1ec 100644 --- a/arch/arm/mach-mx3/clock-imx35.c +++ b/arch/arm/mach-mx3/clock-imx35.c | |||
@@ -494,7 +494,7 @@ static struct clk_lookup lookups[] = { | |||
494 | _REGISTER_CLOCK("mxc-ehci.2", "usb", usbotg_clk) | 494 | _REGISTER_CLOCK("mxc-ehci.2", "usb", usbotg_clk) |
495 | _REGISTER_CLOCK("fsl-usb2-udc", "usb", usbotg_clk) | 495 | _REGISTER_CLOCK("fsl-usb2-udc", "usb", usbotg_clk) |
496 | _REGISTER_CLOCK("fsl-usb2-udc", "usb_ahb", usbahb_clk) | 496 | _REGISTER_CLOCK("fsl-usb2-udc", "usb_ahb", usbahb_clk) |
497 | _REGISTER_CLOCK("imx-wdt.0", NULL, wdog_clk) | 497 | _REGISTER_CLOCK("imx2-wdt.0", NULL, wdog_clk) |
498 | _REGISTER_CLOCK(NULL, "max", max_clk) | 498 | _REGISTER_CLOCK(NULL, "max", max_clk) |
499 | _REGISTER_CLOCK(NULL, "audmux", audmux_clk) | 499 | _REGISTER_CLOCK(NULL, "audmux", audmux_clk) |
500 | _REGISTER_CLOCK(NULL, "csi", csi_clk) | 500 | _REGISTER_CLOCK(NULL, "csi", csi_clk) |
diff --git a/arch/arm/mach-mx3/cpu.c b/arch/arm/mach-mx3/cpu.c index d00a75457812..d1d339576fdf 100644 --- a/arch/arm/mach-mx3/cpu.c +++ b/arch/arm/mach-mx3/cpu.c | |||
@@ -25,15 +25,15 @@ struct mx3_cpu_type { | |||
25 | }; | 25 | }; |
26 | 26 | ||
27 | static struct mx3_cpu_type mx31_cpu_type[] __initdata = { | 27 | static struct mx3_cpu_type mx31_cpu_type[] __initdata = { |
28 | { .srev = 0x00, .name = "i.MX31(L)", .v = "1.0", .rev = MX3x_CHIP_REV_1_0 }, | 28 | { .srev = 0x00, .name = "i.MX31(L)", .v = "1.0", .rev = IMX_CHIP_REVISION_1_0 }, |
29 | { .srev = 0x10, .name = "i.MX31", .v = "1.1", .rev = MX3x_CHIP_REV_1_1 }, | 29 | { .srev = 0x10, .name = "i.MX31", .v = "1.1", .rev = IMX_CHIP_REVISION_1_1 }, |
30 | { .srev = 0x11, .name = "i.MX31L", .v = "1.1", .rev = MX3x_CHIP_REV_1_1 }, | 30 | { .srev = 0x11, .name = "i.MX31L", .v = "1.1", .rev = IMX_CHIP_REVISION_1_1 }, |
31 | { .srev = 0x12, .name = "i.MX31", .v = "1.15", .rev = MX3x_CHIP_REV_1_1 }, | 31 | { .srev = 0x12, .name = "i.MX31", .v = "1.15", .rev = IMX_CHIP_REVISION_1_1 }, |
32 | { .srev = 0x13, .name = "i.MX31L", .v = "1.15", .rev = MX3x_CHIP_REV_1_1 }, | 32 | { .srev = 0x13, .name = "i.MX31L", .v = "1.15", .rev = IMX_CHIP_REVISION_1_1 }, |
33 | { .srev = 0x14, .name = "i.MX31", .v = "1.2", .rev = MX3x_CHIP_REV_1_2 }, | 33 | { .srev = 0x14, .name = "i.MX31", .v = "1.2", .rev = IMX_CHIP_REVISION_1_2 }, |
34 | { .srev = 0x15, .name = "i.MX31L", .v = "1.2", .rev = MX3x_CHIP_REV_1_2 }, | 34 | { .srev = 0x15, .name = "i.MX31L", .v = "1.2", .rev = IMX_CHIP_REVISION_1_2 }, |
35 | { .srev = 0x28, .name = "i.MX31", .v = "2.0", .rev = MX3x_CHIP_REV_2_0 }, | 35 | { .srev = 0x28, .name = "i.MX31", .v = "2.0", .rev = IMX_CHIP_REVISION_2_0 }, |
36 | { .srev = 0x29, .name = "i.MX31L", .v = "2.0", .rev = MX3x_CHIP_REV_2_0 }, | 36 | { .srev = 0x29, .name = "i.MX31L", .v = "2.0", .rev = IMX_CHIP_REVISION_2_0 }, |
37 | }; | 37 | }; |
38 | 38 | ||
39 | void __init mx31_read_cpu_rev(void) | 39 | void __init mx31_read_cpu_rev(void) |
@@ -53,6 +53,8 @@ void __init mx31_read_cpu_rev(void) | |||
53 | return; | 53 | return; |
54 | } | 54 | } |
55 | 55 | ||
56 | mx31_cpu_rev = IMX_CHIP_REVISION_UNKNOWN; | ||
57 | |||
56 | printk(KERN_WARNING "Unknown CPU identifier. srev = %02x\n", srev); | 58 | printk(KERN_WARNING "Unknown CPU identifier. srev = %02x\n", srev); |
57 | } | 59 | } |
58 | 60 | ||
@@ -62,22 +64,25 @@ EXPORT_SYMBOL(mx35_cpu_rev); | |||
62 | void __init mx35_read_cpu_rev(void) | 64 | void __init mx35_read_cpu_rev(void) |
63 | { | 65 | { |
64 | u32 rev; | 66 | u32 rev; |
65 | char *srev = "unknown"; | 67 | char *srev; |
66 | 68 | ||
67 | rev = __raw_readl(MX35_IO_ADDRESS(MX35_IIM_BASE_ADDR + MXC_IIMSREV)); | 69 | rev = __raw_readl(MX35_IO_ADDRESS(MX35_IIM_BASE_ADDR + MXC_IIMSREV)); |
68 | switch (rev) { | 70 | switch (rev) { |
69 | case 0x00: | 71 | case 0x00: |
70 | mx35_cpu_rev = MX3x_CHIP_REV_1_0; | 72 | mx35_cpu_rev = IMX_CHIP_REVISION_1_0; |
71 | srev = "1.0"; | 73 | srev = "1.0"; |
72 | break; | 74 | break; |
73 | case 0x10: | 75 | case 0x10: |
74 | mx35_cpu_rev = MX3x_CHIP_REV_2_0; | 76 | mx35_cpu_rev = IMX_CHIP_REVISION_2_0; |
75 | srev = "2.0"; | 77 | srev = "2.0"; |
76 | break; | 78 | break; |
77 | case 0x11: | 79 | case 0x11: |
78 | mx35_cpu_rev = MX3x_CHIP_REV_2_1; | 80 | mx35_cpu_rev = IMX_CHIP_REVISION_2_1; |
79 | srev = "2.1"; | 81 | srev = "2.1"; |
80 | break; | 82 | break; |
83 | default: | ||
84 | mx35_cpu_rev = IMX_CHIP_REVISION_UNKNOWN; | ||
85 | srev = "unknown"; | ||
81 | } | 86 | } |
82 | 87 | ||
83 | printk(KERN_INFO "CPU identified as i.MX35, silicon rev %s\n", srev); | 88 | printk(KERN_INFO "CPU identified as i.MX35, silicon rev %s\n", srev); |
diff --git a/arch/arm/mach-mx3/devices-imx31.h b/arch/arm/mach-mx3/devices-imx31.h index de9598590eba..40f4e848a671 100644 --- a/arch/arm/mach-mx3/devices-imx31.h +++ b/arch/arm/mach-mx3/devices-imx31.h | |||
@@ -9,6 +9,14 @@ | |||
9 | #include <mach/mx31.h> | 9 | #include <mach/mx31.h> |
10 | #include <mach/devices-common.h> | 10 | #include <mach/devices-common.h> |
11 | 11 | ||
12 | extern const struct imx_fsl_usb2_udc_data imx31_fsl_usb2_udc_data __initconst; | ||
13 | #define imx31_add_fsl_usb2_udc(pdata) \ | ||
14 | imx_add_fsl_usb2_udc(&imx31_fsl_usb2_udc_data, pdata) | ||
15 | |||
16 | extern const struct imx_imx2_wdt_data imx31_imx2_wdt_data __initconst; | ||
17 | #define imx31_add_imx2_wdt(pdata) \ | ||
18 | imx_add_imx2_wdt(&imx31_imx2_wdt_data) | ||
19 | |||
12 | extern const struct imx_imx_i2c_data imx31_imx_i2c_data[] __initconst; | 20 | extern const struct imx_imx_i2c_data imx31_imx_i2c_data[] __initconst; |
13 | #define imx31_add_imx_i2c(id, pdata) \ | 21 | #define imx31_add_imx_i2c(id, pdata) \ |
14 | imx_add_imx_i2c(&imx31_imx_i2c_data[id], pdata) | 22 | imx_add_imx_i2c(&imx31_imx_i2c_data[id], pdata) |
@@ -16,6 +24,10 @@ extern const struct imx_imx_i2c_data imx31_imx_i2c_data[] __initconst; | |||
16 | #define imx31_add_imx_i2c1(pdata) imx31_add_imx_i2c(1, pdata) | 24 | #define imx31_add_imx_i2c1(pdata) imx31_add_imx_i2c(1, pdata) |
17 | #define imx31_add_imx_i2c2(pdata) imx31_add_imx_i2c(2, pdata) | 25 | #define imx31_add_imx_i2c2(pdata) imx31_add_imx_i2c(2, pdata) |
18 | 26 | ||
27 | extern const struct imx_imx_keypad_data imx31_imx_keypad_data __initconst; | ||
28 | #define imx31_add_imx_keypad(pdata) \ | ||
29 | imx_add_imx_keypad(&imx31_imx_keypad_data, pdata) | ||
30 | |||
19 | extern const struct imx_imx_ssi_data imx31_imx_ssi_data[] __initconst; | 31 | extern const struct imx_imx_ssi_data imx31_imx_ssi_data[] __initconst; |
20 | #define imx31_add_imx_ssi(id, pdata) \ | 32 | #define imx31_add_imx_ssi(id, pdata) \ |
21 | imx_add_imx_ssi(&imx31_imx_ssi_data[id], pdata) | 33 | imx_add_imx_ssi(&imx31_imx_ssi_data[id], pdata) |
@@ -29,10 +41,25 @@ extern const struct imx_imx_uart_1irq_data imx31_imx_uart_data[] __initconst; | |||
29 | #define imx31_add_imx_uart3(pdata) imx31_add_imx_uart(3, pdata) | 41 | #define imx31_add_imx_uart3(pdata) imx31_add_imx_uart(3, pdata) |
30 | #define imx31_add_imx_uart4(pdata) imx31_add_imx_uart(4, pdata) | 42 | #define imx31_add_imx_uart4(pdata) imx31_add_imx_uart(4, pdata) |
31 | 43 | ||
44 | extern const struct imx_mxc_ehci_data imx31_mxc_ehci_otg_data __initconst; | ||
45 | #define imx31_add_mxc_ehci_otg(pdata) \ | ||
46 | imx_add_mxc_ehci(&imx31_mxc_ehci_otg_data, pdata) | ||
47 | extern const struct imx_mxc_ehci_data imx31_mxc_ehci_hs_data[] __initconst; | ||
48 | #define imx31_add_mxc_ehci_hs(id, pdata) \ | ||
49 | imx_add_mxc_ehci(&imx31_mxc_ehci_hs_data[id - 1], pdata) | ||
50 | |||
51 | extern const struct imx_mxc_mmc_data imx31_mxc_mmc_data[] __initconst; | ||
52 | #define imx31_add_mxc_mmc(id, pdata) \ | ||
53 | imx_add_mxc_mmc(&imx31_mxc_mmc_data[id], pdata) | ||
54 | |||
32 | extern const struct imx_mxc_nand_data imx31_mxc_nand_data __initconst; | 55 | extern const struct imx_mxc_nand_data imx31_mxc_nand_data __initconst; |
33 | #define imx31_add_mxc_nand(pdata) \ | 56 | #define imx31_add_mxc_nand(pdata) \ |
34 | imx_add_mxc_nand(&imx31_mxc_nand_data, pdata) | 57 | imx_add_mxc_nand(&imx31_mxc_nand_data, pdata) |
35 | 58 | ||
59 | extern const struct imx_mxc_w1_data imx31_mxc_w1_data __initconst; | ||
60 | #define imx31_add_mxc_w1(pdata) \ | ||
61 | imx_add_mxc_w1(&imx31_mxc_w1_data) | ||
62 | |||
36 | extern const struct imx_spi_imx_data imx31_cspi_data[] __initconst; | 63 | extern const struct imx_spi_imx_data imx31_cspi_data[] __initconst; |
37 | #define imx31_add_cspi(id, pdata) \ | 64 | #define imx31_add_cspi(id, pdata) \ |
38 | imx_add_spi_imx(&imx31_cspi_data[id], pdata) | 65 | imx_add_spi_imx(&imx31_cspi_data[id], pdata) |
diff --git a/arch/arm/mach-mx3/devices-imx35.h b/arch/arm/mach-mx3/devices-imx35.h index 5eb917b638d0..677b18aa7ae6 100644 --- a/arch/arm/mach-mx3/devices-imx35.h +++ b/arch/arm/mach-mx3/devices-imx35.h | |||
@@ -13,10 +13,19 @@ extern const struct imx_fec_data imx35_fec_data __initconst; | |||
13 | #define imx35_add_fec(pdata) \ | 13 | #define imx35_add_fec(pdata) \ |
14 | imx_add_fec(&imx35_fec_data, pdata) | 14 | imx_add_fec(&imx35_fec_data, pdata) |
15 | 15 | ||
16 | #define imx35_add_flexcan0(pdata) \ | 16 | extern const struct imx_fsl_usb2_udc_data imx35_fsl_usb2_udc_data __initconst; |
17 | imx_add_flexcan(0, MX35_CAN1_BASE_ADDR, SZ_16K, MX35_INT_CAN1, pdata) | 17 | #define imx35_add_fsl_usb2_udc(pdata) \ |
18 | #define imx35_add_flexcan1(pdata) \ | 18 | imx_add_fsl_usb2_udc(&imx35_fsl_usb2_udc_data, pdata) |
19 | imx_add_flexcan(1, MX35_CAN2_BASE_ADDR, SZ_16K, MX35_INT_CAN2, pdata) | 19 | |
20 | extern const struct imx_flexcan_data imx35_flexcan_data[] __initconst; | ||
21 | #define imx35_add_flexcan(id, pdata) \ | ||
22 | imx_add_flexcan(&imx35_flexcan_data[id], pdata) | ||
23 | #define imx35_add_flexcan0(pdata) imx35_add_flexcan(0, pdata) | ||
24 | #define imx35_add_flexcan1(pdata) imx35_add_flexcan(1, pdata) | ||
25 | |||
26 | extern const struct imx_imx2_wdt_data imx35_imx2_wdt_data __initconst; | ||
27 | #define imx35_add_imx2_wdt(pdata) \ | ||
28 | imx_add_imx2_wdt(&imx35_imx2_wdt_data) | ||
20 | 29 | ||
21 | extern const struct imx_imx_i2c_data imx35_imx_i2c_data[] __initconst; | 30 | extern const struct imx_imx_i2c_data imx35_imx_i2c_data[] __initconst; |
22 | #define imx35_add_imx_i2c(id, pdata) \ | 31 | #define imx35_add_imx_i2c(id, pdata) \ |
@@ -25,6 +34,10 @@ extern const struct imx_imx_i2c_data imx35_imx_i2c_data[] __initconst; | |||
25 | #define imx35_add_imx_i2c1(pdata) imx35_add_imx_i2c(1, pdata) | 34 | #define imx35_add_imx_i2c1(pdata) imx35_add_imx_i2c(1, pdata) |
26 | #define imx35_add_imx_i2c2(pdata) imx35_add_imx_i2c(2, pdata) | 35 | #define imx35_add_imx_i2c2(pdata) imx35_add_imx_i2c(2, pdata) |
27 | 36 | ||
37 | extern const struct imx_imx_keypad_data imx35_imx_keypad_data __initconst; | ||
38 | #define imx31_add_imx_keypad(pdata) \ | ||
39 | imx_add_imx_keypad(&imx35_imx_keypad_data, pdata) | ||
40 | |||
28 | extern const struct imx_imx_ssi_data imx35_imx_ssi_data[] __initconst; | 41 | extern const struct imx_imx_ssi_data imx35_imx_ssi_data[] __initconst; |
29 | #define imx35_add_imx_ssi(id, pdata) \ | 42 | #define imx35_add_imx_ssi(id, pdata) \ |
30 | imx_add_imx_ssi(&imx35_imx_ssi_data[id], pdata) | 43 | imx_add_imx_ssi(&imx35_imx_ssi_data[id], pdata) |
@@ -36,16 +49,28 @@ extern const struct imx_imx_uart_1irq_data imx35_imx_uart_data[] __initconst; | |||
36 | #define imx35_add_imx_uart1(pdata) imx35_add_imx_uart(1, pdata) | 49 | #define imx35_add_imx_uart1(pdata) imx35_add_imx_uart(1, pdata) |
37 | #define imx35_add_imx_uart2(pdata) imx35_add_imx_uart(2, pdata) | 50 | #define imx35_add_imx_uart2(pdata) imx35_add_imx_uart(2, pdata) |
38 | 51 | ||
52 | extern const struct imx_mxc_ehci_data imx35_mxc_ehci_otg_data __initconst; | ||
53 | #define imx35_add_mxc_ehci_otg(pdata) \ | ||
54 | imx_add_mxc_ehci(&imx35_mxc_ehci_otg_data, pdata) | ||
55 | extern const struct imx_mxc_ehci_data imx35_mxc_ehci_hs_data __initconst; | ||
56 | #define imx35_add_mxc_ehci_hs(pdata) \ | ||
57 | imx_add_mxc_ehci(&imx35_mxc_ehci_hs_data, pdata) | ||
58 | |||
39 | extern const struct imx_mxc_nand_data imx35_mxc_nand_data __initconst; | 59 | extern const struct imx_mxc_nand_data imx35_mxc_nand_data __initconst; |
40 | #define imx35_add_mxc_nand(pdata) \ | 60 | #define imx35_add_mxc_nand(pdata) \ |
41 | imx_add_mxc_nand(&imx35_mxc_nand_data, pdata) | 61 | imx_add_mxc_nand(&imx35_mxc_nand_data, pdata) |
42 | 62 | ||
63 | extern const struct imx_mxc_w1_data imx35_mxc_w1_data __initconst; | ||
64 | #define imx35_add_mxc_w1(pdata) \ | ||
65 | imx_add_mxc_w1(&imx35_mxc_w1_data) | ||
66 | |||
67 | extern const struct imx_sdhci_esdhc_imx_data | ||
68 | imx35_sdhci_esdhc_imx_data[] __initconst; | ||
69 | #define imx35_add_sdhci_esdhc_imx(id, pdata) \ | ||
70 | imx_add_sdhci_esdhc_imx(&imx35_sdhci_esdhc_imx_data[id], pdata) | ||
71 | |||
43 | extern const struct imx_spi_imx_data imx35_cspi_data[] __initconst; | 72 | extern const struct imx_spi_imx_data imx35_cspi_data[] __initconst; |
44 | #define imx35_add_cspi(id, pdata) \ | 73 | #define imx35_add_cspi(id, pdata) \ |
45 | imx_add_spi_imx(&imx35_cspi_data[id], pdata) | 74 | imx_add_spi_imx(&imx35_cspi_data[id], pdata) |
46 | #define imx35_add_spi_imx0(pdata) imx35_add_cspi(0, pdata) | 75 | #define imx35_add_spi_imx0(pdata) imx35_add_cspi(0, pdata) |
47 | #define imx35_add_spi_imx1(pdata) imx35_add_cspi(1, pdata) | 76 | #define imx35_add_spi_imx1(pdata) imx35_add_cspi(1, pdata) |
48 | |||
49 | extern const struct imx_esdhc_imx_data imx35_esdhc_data[] __initconst; | ||
50 | #define imx35_add_esdhc(id, pdata) \ | ||
51 | imx_add_esdhc(&imx35_esdhc_data[id], pdata) | ||
diff --git a/arch/arm/mach-mx3/devices.c b/arch/arm/mach-mx3/devices.c index d4da9496089a..b6672db788fb 100644 --- a/arch/arm/mach-mx3/devices.c +++ b/arch/arm/mach-mx3/devices.c | |||
@@ -29,120 +29,25 @@ | |||
29 | 29 | ||
30 | #include "devices.h" | 30 | #include "devices.h" |
31 | 31 | ||
32 | /* GPIO port description */ | ||
33 | static struct mxc_gpio_port imx_gpio_ports[] = { | ||
34 | { | ||
35 | .chip.label = "gpio-0", | ||
36 | .base = IO_ADDRESS(GPIO1_BASE_ADDR), | ||
37 | .irq = MXC_INT_GPIO1, | ||
38 | .virtual_irq_start = MXC_GPIO_IRQ_START, | ||
39 | }, { | ||
40 | .chip.label = "gpio-1", | ||
41 | .base = IO_ADDRESS(GPIO2_BASE_ADDR), | ||
42 | .irq = MXC_INT_GPIO2, | ||
43 | .virtual_irq_start = MXC_GPIO_IRQ_START + 32, | ||
44 | }, { | ||
45 | .chip.label = "gpio-2", | ||
46 | .base = IO_ADDRESS(GPIO3_BASE_ADDR), | ||
47 | .irq = MXC_INT_GPIO3, | ||
48 | .virtual_irq_start = MXC_GPIO_IRQ_START + 64, | ||
49 | } | ||
50 | }; | ||
51 | |||
52 | int __init imx3x_register_gpios(void) | ||
53 | { | ||
54 | return mxc_gpio_init(imx_gpio_ports, ARRAY_SIZE(imx_gpio_ports)); | ||
55 | } | ||
56 | |||
57 | static struct resource mxc_w1_master_resources[] = { | ||
58 | { | ||
59 | .start = OWIRE_BASE_ADDR, | ||
60 | .end = OWIRE_BASE_ADDR + SZ_4K - 1, | ||
61 | .flags = IORESOURCE_MEM, | ||
62 | }, | ||
63 | }; | ||
64 | |||
65 | struct platform_device mxc_w1_master_device = { | ||
66 | .name = "mxc_w1", | ||
67 | .id = 0, | ||
68 | .num_resources = ARRAY_SIZE(mxc_w1_master_resources), | ||
69 | .resource = mxc_w1_master_resources, | ||
70 | }; | ||
71 | |||
72 | #ifdef CONFIG_ARCH_MX31 | ||
73 | static struct resource mxcsdhc0_resources[] = { | ||
74 | { | ||
75 | .start = MX31_MMC_SDHC1_BASE_ADDR, | ||
76 | .end = MX31_MMC_SDHC1_BASE_ADDR + SZ_16K - 1, | ||
77 | .flags = IORESOURCE_MEM, | ||
78 | }, { | ||
79 | .start = MX31_INT_MMC_SDHC1, | ||
80 | .end = MX31_INT_MMC_SDHC1, | ||
81 | .flags = IORESOURCE_IRQ, | ||
82 | }, | ||
83 | }; | ||
84 | |||
85 | static struct resource mxcsdhc1_resources[] = { | ||
86 | { | ||
87 | .start = MX31_MMC_SDHC2_BASE_ADDR, | ||
88 | .end = MX31_MMC_SDHC2_BASE_ADDR + SZ_16K - 1, | ||
89 | .flags = IORESOURCE_MEM, | ||
90 | }, { | ||
91 | .start = MX31_INT_MMC_SDHC2, | ||
92 | .end = MX31_INT_MMC_SDHC2, | ||
93 | .flags = IORESOURCE_IRQ, | ||
94 | }, | ||
95 | }; | ||
96 | |||
97 | struct platform_device mxcsdhc_device0 = { | ||
98 | .name = "mxc-mmc", | ||
99 | .id = 0, | ||
100 | .num_resources = ARRAY_SIZE(mxcsdhc0_resources), | ||
101 | .resource = mxcsdhc0_resources, | ||
102 | }; | ||
103 | |||
104 | struct platform_device mxcsdhc_device1 = { | ||
105 | .name = "mxc-mmc", | ||
106 | .id = 1, | ||
107 | .num_resources = ARRAY_SIZE(mxcsdhc1_resources), | ||
108 | .resource = mxcsdhc1_resources, | ||
109 | }; | ||
110 | |||
111 | static struct resource rnga_resources[] = { | ||
112 | { | ||
113 | .start = RNGA_BASE_ADDR, | ||
114 | .end = RNGA_BASE_ADDR + 0x28, | ||
115 | .flags = IORESOURCE_MEM, | ||
116 | }, | ||
117 | }; | ||
118 | |||
119 | struct platform_device mxc_rnga_device = { | ||
120 | .name = "mxc_rnga", | ||
121 | .id = -1, | ||
122 | .num_resources = 1, | ||
123 | .resource = rnga_resources, | ||
124 | }; | ||
125 | #endif /* CONFIG_ARCH_MX31 */ | ||
126 | |||
127 | /* i.MX31 Image Processing Unit */ | 32 | /* i.MX31 Image Processing Unit */ |
128 | 33 | ||
129 | /* The resource order is important! */ | 34 | /* The resource order is important! */ |
130 | static struct resource mx3_ipu_rsrc[] = { | 35 | static struct resource mx3_ipu_rsrc[] = { |
131 | { | 36 | { |
132 | .start = IPU_CTRL_BASE_ADDR, | 37 | .start = MX3x_IPU_CTRL_BASE_ADDR, |
133 | .end = IPU_CTRL_BASE_ADDR + 0x5F, | 38 | .end = MX3x_IPU_CTRL_BASE_ADDR + 0x5F, |
134 | .flags = IORESOURCE_MEM, | 39 | .flags = IORESOURCE_MEM, |
135 | }, { | 40 | }, { |
136 | .start = IPU_CTRL_BASE_ADDR + 0x88, | 41 | .start = MX3x_IPU_CTRL_BASE_ADDR + 0x88, |
137 | .end = IPU_CTRL_BASE_ADDR + 0xB3, | 42 | .end = MX3x_IPU_CTRL_BASE_ADDR + 0xB3, |
138 | .flags = IORESOURCE_MEM, | 43 | .flags = IORESOURCE_MEM, |
139 | }, { | 44 | }, { |
140 | .start = MXC_INT_IPU_SYN, | 45 | .start = MX3x_INT_IPU_SYN, |
141 | .end = MXC_INT_IPU_SYN, | 46 | .end = MX3x_INT_IPU_SYN, |
142 | .flags = IORESOURCE_IRQ, | 47 | .flags = IORESOURCE_IRQ, |
143 | }, { | 48 | }, { |
144 | .start = MXC_INT_IPU_ERR, | 49 | .start = MX3x_INT_IPU_ERR, |
145 | .end = MXC_INT_IPU_ERR, | 50 | .end = MX3x_INT_IPU_ERR, |
146 | .flags = IORESOURCE_IRQ, | 51 | .flags = IORESOURCE_IRQ, |
147 | }, | 52 | }, |
148 | }; | 53 | }; |
@@ -156,8 +61,8 @@ struct platform_device mx3_ipu = { | |||
156 | 61 | ||
157 | static struct resource fb_resources[] = { | 62 | static struct resource fb_resources[] = { |
158 | { | 63 | { |
159 | .start = IPU_CTRL_BASE_ADDR + 0xB4, | 64 | .start = MX3x_IPU_CTRL_BASE_ADDR + 0xB4, |
160 | .end = IPU_CTRL_BASE_ADDR + 0x1BF, | 65 | .end = MX3x_IPU_CTRL_BASE_ADDR + 0x1BF, |
161 | .flags = IORESOURCE_MEM, | 66 | .flags = IORESOURCE_MEM, |
162 | }, | 67 | }, |
163 | }; | 68 | }; |
@@ -174,8 +79,8 @@ struct platform_device mx3_fb = { | |||
174 | 79 | ||
175 | static struct resource camera_resources[] = { | 80 | static struct resource camera_resources[] = { |
176 | { | 81 | { |
177 | .start = IPU_CTRL_BASE_ADDR + 0x60, | 82 | .start = MX3x_IPU_CTRL_BASE_ADDR + 0x60, |
178 | .end = IPU_CTRL_BASE_ADDR + 0x87, | 83 | .end = MX3x_IPU_CTRL_BASE_ADDR + 0x87, |
179 | .flags = IORESOURCE_MEM, | 84 | .flags = IORESOURCE_MEM, |
180 | }, | 85 | }, |
181 | }; | 86 | }; |
@@ -190,110 +95,6 @@ struct platform_device mx3_camera = { | |||
190 | }, | 95 | }, |
191 | }; | 96 | }; |
192 | 97 | ||
193 | static struct resource otg_resources[] = { | ||
194 | { | ||
195 | .start = MX31_OTG_BASE_ADDR, | ||
196 | .end = MX31_OTG_BASE_ADDR + 0x1ff, | ||
197 | .flags = IORESOURCE_MEM, | ||
198 | }, { | ||
199 | .start = MXC_INT_USB3, | ||
200 | .end = MXC_INT_USB3, | ||
201 | .flags = IORESOURCE_IRQ, | ||
202 | }, | ||
203 | }; | ||
204 | |||
205 | static u64 otg_dmamask = DMA_BIT_MASK(32); | ||
206 | |||
207 | /* OTG gadget device */ | ||
208 | struct platform_device mxc_otg_udc_device = { | ||
209 | .name = "fsl-usb2-udc", | ||
210 | .id = -1, | ||
211 | .dev = { | ||
212 | .dma_mask = &otg_dmamask, | ||
213 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
214 | }, | ||
215 | .resource = otg_resources, | ||
216 | .num_resources = ARRAY_SIZE(otg_resources), | ||
217 | }; | ||
218 | |||
219 | /* OTG host */ | ||
220 | struct platform_device mxc_otg_host = { | ||
221 | .name = "mxc-ehci", | ||
222 | .id = 0, | ||
223 | .dev = { | ||
224 | .coherent_dma_mask = 0xffffffff, | ||
225 | .dma_mask = &otg_dmamask, | ||
226 | }, | ||
227 | .resource = otg_resources, | ||
228 | .num_resources = ARRAY_SIZE(otg_resources), | ||
229 | }; | ||
230 | |||
231 | /* USB host 1 */ | ||
232 | |||
233 | static u64 usbh1_dmamask = ~(u32)0; | ||
234 | |||
235 | static struct resource mxc_usbh1_resources[] = { | ||
236 | { | ||
237 | .start = MX31_OTG_BASE_ADDR + 0x200, | ||
238 | .end = MX31_OTG_BASE_ADDR + 0x3ff, | ||
239 | .flags = IORESOURCE_MEM, | ||
240 | }, { | ||
241 | .start = MXC_INT_USB1, | ||
242 | .end = MXC_INT_USB1, | ||
243 | .flags = IORESOURCE_IRQ, | ||
244 | }, | ||
245 | }; | ||
246 | |||
247 | struct platform_device mxc_usbh1 = { | ||
248 | .name = "mxc-ehci", | ||
249 | .id = 1, | ||
250 | .dev = { | ||
251 | .coherent_dma_mask = 0xffffffff, | ||
252 | .dma_mask = &usbh1_dmamask, | ||
253 | }, | ||
254 | .resource = mxc_usbh1_resources, | ||
255 | .num_resources = ARRAY_SIZE(mxc_usbh1_resources), | ||
256 | }; | ||
257 | |||
258 | /* USB host 2 */ | ||
259 | static u64 usbh2_dmamask = ~(u32)0; | ||
260 | |||
261 | static struct resource mxc_usbh2_resources[] = { | ||
262 | { | ||
263 | .start = MX31_OTG_BASE_ADDR + 0x400, | ||
264 | .end = MX31_OTG_BASE_ADDR + 0x5ff, | ||
265 | .flags = IORESOURCE_MEM, | ||
266 | }, { | ||
267 | .start = MXC_INT_USB2, | ||
268 | .end = MXC_INT_USB2, | ||
269 | .flags = IORESOURCE_IRQ, | ||
270 | }, | ||
271 | }; | ||
272 | |||
273 | struct platform_device mxc_usbh2 = { | ||
274 | .name = "mxc-ehci", | ||
275 | .id = 2, | ||
276 | .dev = { | ||
277 | .coherent_dma_mask = 0xffffffff, | ||
278 | .dma_mask = &usbh2_dmamask, | ||
279 | }, | ||
280 | .resource = mxc_usbh2_resources, | ||
281 | .num_resources = ARRAY_SIZE(mxc_usbh2_resources), | ||
282 | }; | ||
283 | |||
284 | static struct resource imx_wdt_resources[] = { | ||
285 | { | ||
286 | .flags = IORESOURCE_MEM, | ||
287 | }, | ||
288 | }; | ||
289 | |||
290 | struct platform_device imx_wdt_device0 = { | ||
291 | .name = "imx2-wdt", | ||
292 | .id = 0, | ||
293 | .num_resources = ARRAY_SIZE(imx_wdt_resources), | ||
294 | .resource = imx_wdt_resources, | ||
295 | }; | ||
296 | |||
297 | static struct resource imx_rtc_resources[] = { | 98 | static struct resource imx_rtc_resources[] = { |
298 | { | 99 | { |
299 | .start = MX31_RTC_BASE_ADDR, | 100 | .start = MX31_RTC_BASE_ADDR, |
@@ -312,51 +113,3 @@ struct platform_device imx_rtc_device0 = { | |||
312 | .num_resources = ARRAY_SIZE(imx_rtc_resources), | 113 | .num_resources = ARRAY_SIZE(imx_rtc_resources), |
313 | .resource = imx_rtc_resources, | 114 | .resource = imx_rtc_resources, |
314 | }; | 115 | }; |
315 | |||
316 | static struct resource imx_kpp_resources[] = { | ||
317 | { | ||
318 | .start = MX3x_KPP_BASE_ADDR, | ||
319 | .end = MX3x_KPP_BASE_ADDR + 0xf, | ||
320 | .flags = IORESOURCE_MEM | ||
321 | }, { | ||
322 | .start = MX3x_INT_KPP, | ||
323 | .end = MX3x_INT_KPP, | ||
324 | .flags = IORESOURCE_IRQ, | ||
325 | }, | ||
326 | }; | ||
327 | |||
328 | struct platform_device imx_kpp_device = { | ||
329 | .name = "imx-keypad", | ||
330 | .id = -1, | ||
331 | .num_resources = ARRAY_SIZE(imx_kpp_resources), | ||
332 | .resource = imx_kpp_resources, | ||
333 | }; | ||
334 | |||
335 | static int __init mx3_devices_init(void) | ||
336 | { | ||
337 | #if defined(CONFIG_ARCH_MX31) | ||
338 | if (cpu_is_mx31()) { | ||
339 | imx_wdt_resources[0].start = MX31_WDOG_BASE_ADDR; | ||
340 | imx_wdt_resources[0].end = MX31_WDOG_BASE_ADDR + 0x3fff; | ||
341 | mxc_register_device(&mxc_rnga_device, NULL); | ||
342 | } | ||
343 | #endif | ||
344 | #if defined(CONFIG_ARCH_MX35) | ||
345 | if (cpu_is_mx35()) { | ||
346 | otg_resources[0].start = MX35_OTG_BASE_ADDR; | ||
347 | otg_resources[0].end = MX35_OTG_BASE_ADDR + 0x1ff; | ||
348 | otg_resources[1].start = MXC_INT_USBOTG; | ||
349 | otg_resources[1].end = MXC_INT_USBOTG; | ||
350 | mxc_usbh1_resources[0].start = MX35_OTG_BASE_ADDR + 0x400; | ||
351 | mxc_usbh1_resources[0].end = MX35_OTG_BASE_ADDR + 0x5ff; | ||
352 | mxc_usbh1_resources[1].start = MXC_INT_USBHS; | ||
353 | mxc_usbh1_resources[1].end = MXC_INT_USBHS; | ||
354 | imx_wdt_resources[0].start = MX35_WDOG_BASE_ADDR; | ||
355 | imx_wdt_resources[0].end = MX35_WDOG_BASE_ADDR + 0x3fff; | ||
356 | } | ||
357 | #endif | ||
358 | |||
359 | return 0; | ||
360 | } | ||
361 | |||
362 | subsys_initcall(mx3_devices_init); | ||
diff --git a/arch/arm/mach-mx3/devices.h b/arch/arm/mach-mx3/devices.h index 585f814473d5..121962c568d1 100644 --- a/arch/arm/mach-mx3/devices.h +++ b/arch/arm/mach-mx3/devices.h | |||
@@ -1,14 +1,4 @@ | |||
1 | extern struct platform_device mxc_w1_master_device; | ||
2 | extern struct platform_device mx3_ipu; | 1 | extern struct platform_device mx3_ipu; |
3 | extern struct platform_device mx3_fb; | 2 | extern struct platform_device mx3_fb; |
4 | extern struct platform_device mx3_camera; | 3 | extern struct platform_device mx3_camera; |
5 | extern struct platform_device mxcsdhc_device0; | ||
6 | extern struct platform_device mxcsdhc_device1; | ||
7 | extern struct platform_device mxc_otg_udc_device; | ||
8 | extern struct platform_device mxc_otg_host; | ||
9 | extern struct platform_device mxc_usbh1; | ||
10 | extern struct platform_device mxc_usbh2; | ||
11 | extern struct platform_device mxc_rnga_device; | ||
12 | extern struct platform_device imx_wdt_device0; | ||
13 | extern struct platform_device imx_rtc_device0; | 4 | extern struct platform_device imx_rtc_device0; |
14 | extern struct platform_device imx_kpp_device; | ||
diff --git a/arch/arm/mach-mx3/eukrea_mbimxsd-baseboard.c b/arch/arm/mach-mx3/eukrea_mbimxsd-baseboard.c index 1abc10d52922..14a5ffc939ad 100644 --- a/arch/arm/mach-mx3/eukrea_mbimxsd-baseboard.c +++ b/arch/arm/mach-mx3/eukrea_mbimxsd-baseboard.c | |||
@@ -111,7 +111,7 @@ static struct mx3fb_platform_data mx3fb_pdata = { | |||
111 | .num_modes = ARRAY_SIZE(fb_modedb), | 111 | .num_modes = ARRAY_SIZE(fb_modedb), |
112 | }; | 112 | }; |
113 | 113 | ||
114 | static struct pad_desc eukrea_mbimxsd_pads[] = { | 114 | static iomux_v3_cfg_t eukrea_mbimxsd_pads[] = { |
115 | /* LCD */ | 115 | /* LCD */ |
116 | MX35_PAD_LD0__IPU_DISPB_DAT_0, | 116 | MX35_PAD_LD0__IPU_DISPB_DAT_0, |
117 | MX35_PAD_LD1__IPU_DISPB_DAT_1, | 117 | MX35_PAD_LD1__IPU_DISPB_DAT_1, |
@@ -289,7 +289,7 @@ void __init eukrea_mbimxsd35_baseboard_init(void) | |||
289 | imx35_add_imx_ssi(0, &eukrea_mbimxsd_ssi_pdata); | 289 | imx35_add_imx_ssi(0, &eukrea_mbimxsd_ssi_pdata); |
290 | 290 | ||
291 | imx35_add_flexcan1(NULL); | 291 | imx35_add_flexcan1(NULL); |
292 | imx35_add_esdhc(0, NULL); | 292 | imx35_add_sdhci_esdhc_imx(0, NULL); |
293 | 293 | ||
294 | gpio_request(GPIO_LED1, "LED1"); | 294 | gpio_request(GPIO_LED1, "LED1"); |
295 | gpio_direction_output(GPIO_LED1, 1); | 295 | gpio_direction_output(GPIO_LED1, 1); |
diff --git a/arch/arm/mach-mx3/mach-armadillo5x0.c b/arch/arm/mach-mx3/mach-armadillo5x0.c index aaa30fe18f85..28b6f414b5d5 100644 --- a/arch/arm/mach-mx3/mach-armadillo5x0.c +++ b/arch/arm/mach-mx3/mach-armadillo5x0.c | |||
@@ -49,10 +49,8 @@ | |||
49 | 49 | ||
50 | #include <mach/common.h> | 50 | #include <mach/common.h> |
51 | #include <mach/iomux-mx3.h> | 51 | #include <mach/iomux-mx3.h> |
52 | #include <mach/mmc.h> | ||
53 | #include <mach/ipu.h> | 52 | #include <mach/ipu.h> |
54 | #include <mach/mx3fb.h> | 53 | #include <mach/mx3fb.h> |
55 | #include <mach/mxc_ehci.h> | ||
56 | #include <mach/ulpi.h> | 54 | #include <mach/ulpi.h> |
57 | 55 | ||
58 | #include "devices-imx31.h" | 56 | #include "devices-imx31.h" |
@@ -245,13 +243,13 @@ h2_free_cs: | |||
245 | return err; | 243 | return err; |
246 | } | 244 | } |
247 | 245 | ||
248 | static struct mxc_usbh_platform_data usbotg_pdata = { | 246 | static struct mxc_usbh_platform_data usbotg_pdata __initdata = { |
249 | .init = usbotg_init, | 247 | .init = usbotg_init, |
250 | .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, | 248 | .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, |
251 | .flags = MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_INTERFACE_DIFF_UNI, | 249 | .flags = MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_INTERFACE_DIFF_UNI, |
252 | }; | 250 | }; |
253 | 251 | ||
254 | static struct mxc_usbh_platform_data usbh2_pdata = { | 252 | static struct mxc_usbh_platform_data usbh2_pdata __initdata = { |
255 | .init = usbh2_init, | 253 | .init = usbh2_init, |
256 | .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, | 254 | .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, |
257 | .flags = MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_INTERFACE_DIFF_UNI, | 255 | .flags = MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_INTERFACE_DIFF_UNI, |
@@ -453,7 +451,7 @@ static void armadillo5x0_sdhc1_exit(struct device *dev, void *data) | |||
453 | gpio_free(IOMUX_TO_GPIO(MX31_PIN_ATA_RESET_B)); | 451 | gpio_free(IOMUX_TO_GPIO(MX31_PIN_ATA_RESET_B)); |
454 | } | 452 | } |
455 | 453 | ||
456 | static struct imxmmc_platform_data sdhc_pdata = { | 454 | static const struct imxmmc_platform_data sdhc_pdata __initconst = { |
457 | .get_ro = armadillo5x0_sdhc1_get_ro, | 455 | .get_ro = armadillo5x0_sdhc1_get_ro, |
458 | .init = armadillo5x0_sdhc1_init, | 456 | .init = armadillo5x0_sdhc1_init, |
459 | .exit = armadillo5x0_sdhc1_exit, | 457 | .exit = armadillo5x0_sdhc1_exit, |
@@ -520,7 +518,7 @@ static void __init armadillo5x0_init(void) | |||
520 | gpio_direction_input(MX31_PIN_GPIO1_0); | 518 | gpio_direction_input(MX31_PIN_GPIO1_0); |
521 | 519 | ||
522 | /* Register SDHC */ | 520 | /* Register SDHC */ |
523 | mxc_register_device(&mxcsdhc_device0, &sdhc_pdata); | 521 | imx31_add_mxc_mmc(0, &sdhc_pdata); |
524 | 522 | ||
525 | /* Register FB */ | 523 | /* Register FB */ |
526 | mxc_register_device(&mx3_ipu, &mx3_ipu_data); | 524 | mxc_register_device(&mx3_ipu, &mx3_ipu_data); |
@@ -555,8 +553,8 @@ static void __init armadillo5x0_init(void) | |||
555 | usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, | 553 | usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, |
556 | ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); | 554 | ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); |
557 | 555 | ||
558 | mxc_register_device(&mxc_otg_host, &usbotg_pdata); | 556 | imx31_add_mxc_ehci_otg(&usbotg_pdata); |
559 | mxc_register_device(&mxc_usbh2, &usbh2_pdata); | 557 | imx31_add_mxc_ehci_hs(2, &usbh2_pdata); |
560 | #endif | 558 | #endif |
561 | } | 559 | } |
562 | 560 | ||
diff --git a/arch/arm/mach-mx3/mach-cpuimx35.c b/arch/arm/mach-mx3/mach-cpuimx35.c index 9fde873f5889..26ae90f02582 100644 --- a/arch/arm/mach-mx3/mach-cpuimx35.c +++ b/arch/arm/mach-mx3/mach-cpuimx35.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <linux/i2c/tsc2007.h> | 30 | #include <linux/i2c/tsc2007.h> |
31 | #include <linux/usb/otg.h> | 31 | #include <linux/usb/otg.h> |
32 | #include <linux/usb/ulpi.h> | 32 | #include <linux/usb/ulpi.h> |
33 | #include <linux/fsl_devices.h> | ||
34 | #include <linux/i2c-gpio.h> | 33 | #include <linux/i2c-gpio.h> |
35 | 34 | ||
36 | #include <asm/mach-types.h> | 35 | #include <asm/mach-types.h> |
@@ -43,7 +42,6 @@ | |||
43 | #include <mach/common.h> | 42 | #include <mach/common.h> |
44 | #include <mach/iomux-mx35.h> | 43 | #include <mach/iomux-mx35.h> |
45 | #include <mach/mxc_nand.h> | 44 | #include <mach/mxc_nand.h> |
46 | #include <mach/mxc_ehci.h> | ||
47 | 45 | ||
48 | #include "devices-imx35.h" | 46 | #include "devices-imx35.h" |
49 | #include "devices.h" | 47 | #include "devices.h" |
@@ -74,11 +72,7 @@ static struct i2c_board_info eukrea_cpuimx35_i2c_devices[] = { | |||
74 | }, | 72 | }, |
75 | }; | 73 | }; |
76 | 74 | ||
77 | static struct platform_device *devices[] __initdata = { | 75 | static iomux_v3_cfg_t eukrea_cpuimx35_pads[] = { |
78 | &imx_wdt_device0, | ||
79 | }; | ||
80 | |||
81 | static struct pad_desc eukrea_cpuimx35_pads[] = { | ||
82 | /* UART1 */ | 76 | /* UART1 */ |
83 | MX35_PAD_CTS1__UART1_CTS, | 77 | MX35_PAD_CTS1__UART1_CTS, |
84 | MX35_PAD_RTS1__UART1_RTS, | 78 | MX35_PAD_RTS1__UART1_RTS, |
@@ -117,18 +111,18 @@ static const struct mxc_nand_platform_data | |||
117 | .flash_bbt = 1, | 111 | .flash_bbt = 1, |
118 | }; | 112 | }; |
119 | 113 | ||
120 | static struct mxc_usbh_platform_data __maybe_unused otg_pdata = { | 114 | static const struct mxc_usbh_platform_data otg_pdata __initconst = { |
121 | .portsc = MXC_EHCI_MODE_UTMI, | 115 | .portsc = MXC_EHCI_MODE_UTMI, |
122 | .flags = MXC_EHCI_INTERFACE_DIFF_UNI, | 116 | .flags = MXC_EHCI_INTERFACE_DIFF_UNI, |
123 | }; | 117 | }; |
124 | 118 | ||
125 | static struct mxc_usbh_platform_data __maybe_unused usbh1_pdata = { | 119 | static const struct mxc_usbh_platform_data usbh1_pdata __initconst = { |
126 | .portsc = MXC_EHCI_MODE_SERIAL, | 120 | .portsc = MXC_EHCI_MODE_SERIAL, |
127 | .flags = MXC_EHCI_INTERFACE_SINGLE_UNI | MXC_EHCI_INTERNAL_PHY | | 121 | .flags = MXC_EHCI_INTERFACE_SINGLE_UNI | MXC_EHCI_INTERNAL_PHY | |
128 | MXC_EHCI_IPPUE_DOWN, | 122 | MXC_EHCI_IPPUE_DOWN, |
129 | }; | 123 | }; |
130 | 124 | ||
131 | static struct fsl_usb2_platform_data otg_device_pdata = { | 125 | static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { |
132 | .operating_mode = FSL_USB2_DR_DEVICE, | 126 | .operating_mode = FSL_USB2_DR_DEVICE, |
133 | .phy_mode = FSL_USB2_PHY_UTMI, | 127 | .phy_mode = FSL_USB2_PHY_UTMI, |
134 | .workaround = FLS_USB2_WORKAROUND_ENGCM09152, | 128 | .workaround = FLS_USB2_WORKAROUND_ENGCM09152, |
@@ -158,7 +152,7 @@ static void __init mxc_board_init(void) | |||
158 | ARRAY_SIZE(eukrea_cpuimx35_pads)); | 152 | ARRAY_SIZE(eukrea_cpuimx35_pads)); |
159 | 153 | ||
160 | imx35_add_fec(NULL); | 154 | imx35_add_fec(NULL); |
161 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 155 | imx35_add_imx2_wdt(NULL); |
162 | 156 | ||
163 | imx35_add_imx_uart0(&uart_pdata); | 157 | imx35_add_imx_uart0(&uart_pdata); |
164 | imx35_add_mxc_nand(&eukrea_cpuimx35_nand_board_info); | 158 | imx35_add_mxc_nand(&eukrea_cpuimx35_nand_board_info); |
@@ -168,11 +162,11 @@ static void __init mxc_board_init(void) | |||
168 | imx35_add_imx_i2c0(&eukrea_cpuimx35_i2c0_data); | 162 | imx35_add_imx_i2c0(&eukrea_cpuimx35_i2c0_data); |
169 | 163 | ||
170 | if (otg_mode_host) | 164 | if (otg_mode_host) |
171 | mxc_register_device(&mxc_otg_host, &otg_pdata); | 165 | imx35_add_mxc_ehci_otg(&otg_pdata); |
172 | else | 166 | else |
173 | mxc_register_device(&mxc_otg_udc_device, &otg_device_pdata); | 167 | imx35_add_fsl_usb2_udc(&otg_device_pdata); |
174 | 168 | ||
175 | mxc_register_device(&mxc_usbh1, &usbh1_pdata); | 169 | imx35_add_mxc_ehci_hs(&usbh1_pdata); |
176 | 170 | ||
177 | #ifdef CONFIG_MACH_EUKREA_MBIMXSD35_BASEBOARD | 171 | #ifdef CONFIG_MACH_EUKREA_MBIMXSD35_BASEBOARD |
178 | eukrea_mbimxsd35_baseboard_init(); | 172 | eukrea_mbimxsd35_baseboard_init(); |
diff --git a/arch/arm/mach-mx3/mach-kzm_arm11_01.c b/arch/arm/mach-mx3/mach-kzm_arm11_01.c index 042cd5655e17..a5f3eb24e4d5 100644 --- a/arch/arm/mach-mx3/mach-kzm_arm11_01.c +++ b/arch/arm/mach-mx3/mach-kzm_arm11_01.c | |||
@@ -41,9 +41,9 @@ | |||
41 | #include "devices-imx31.h" | 41 | #include "devices-imx31.h" |
42 | #include "devices.h" | 42 | #include "devices.h" |
43 | 43 | ||
44 | #define KZM_ARM11_IO_ADDRESS(x) ( \ | 44 | #define KZM_ARM11_IO_ADDRESS(x) (IOMEM( \ |
45 | IMX_IO_ADDRESS(x, MX31_CS4) ?: \ | 45 | IMX_IO_P2V_MODULE(x, MX31_CS4) ?: \ |
46 | IMX_IO_ADDRESS(x, MX31_CS5) ?: \ | 46 | IMX_IO_P2V_MODULE(x, MX31_CS5)) ?: \ |
47 | MX31_IO_ADDRESS(x)) | 47 | MX31_IO_ADDRESS(x)) |
48 | 48 | ||
49 | /* | 49 | /* |
diff --git a/arch/arm/mach-mx3/mach-mx31_3ds.c b/arch/arm/mach-mx3/mach-mx31_3ds.c index 0ad9e7821082..4e516b49a901 100644 --- a/arch/arm/mach-mx3/mach-mx31_3ds.c +++ b/arch/arm/mach-mx3/mach-mx31_3ds.c | |||
@@ -22,8 +22,8 @@ | |||
22 | #include <linux/mfd/mc13783.h> | 22 | #include <linux/mfd/mc13783.h> |
23 | #include <linux/spi/spi.h> | 23 | #include <linux/spi/spi.h> |
24 | #include <linux/regulator/machine.h> | 24 | #include <linux/regulator/machine.h> |
25 | #include <linux/fsl_devices.h> | 25 | #include <linux/usb/otg.h> |
26 | #include <linux/input/matrix_keypad.h> | 26 | #include <linux/usb/ulpi.h> |
27 | 27 | ||
28 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
29 | #include <asm/mach-types.h> | 29 | #include <asm/mach-types.h> |
@@ -34,6 +34,7 @@ | |||
34 | #include <mach/common.h> | 34 | #include <mach/common.h> |
35 | #include <mach/iomux-mx3.h> | 35 | #include <mach/iomux-mx3.h> |
36 | #include <mach/3ds_debugboard.h> | 36 | #include <mach/3ds_debugboard.h> |
37 | #include <mach/ulpi.h> | ||
37 | 38 | ||
38 | #include "devices-imx31.h" | 39 | #include "devices-imx31.h" |
39 | #include "devices.h" | 40 | #include "devices.h" |
@@ -84,6 +85,21 @@ static int mx31_3ds_pins[] = { | |||
84 | MX31_PIN_KEY_COL1_KEY_COL1, | 85 | MX31_PIN_KEY_COL1_KEY_COL1, |
85 | MX31_PIN_KEY_COL2_KEY_COL2, | 86 | MX31_PIN_KEY_COL2_KEY_COL2, |
86 | MX31_PIN_KEY_COL3_KEY_COL3, | 87 | MX31_PIN_KEY_COL3_KEY_COL3, |
88 | /* USB Host 2 */ | ||
89 | IOMUX_MODE(MX31_PIN_USBH2_CLK, IOMUX_CONFIG_FUNC), | ||
90 | IOMUX_MODE(MX31_PIN_USBH2_DIR, IOMUX_CONFIG_FUNC), | ||
91 | IOMUX_MODE(MX31_PIN_USBH2_NXT, IOMUX_CONFIG_FUNC), | ||
92 | IOMUX_MODE(MX31_PIN_USBH2_STP, IOMUX_CONFIG_FUNC), | ||
93 | IOMUX_MODE(MX31_PIN_USBH2_DATA0, IOMUX_CONFIG_FUNC), | ||
94 | IOMUX_MODE(MX31_PIN_USBH2_DATA1, IOMUX_CONFIG_FUNC), | ||
95 | IOMUX_MODE(MX31_PIN_PC_VS2, IOMUX_CONFIG_ALT1), | ||
96 | IOMUX_MODE(MX31_PIN_PC_BVD1, IOMUX_CONFIG_ALT1), | ||
97 | IOMUX_MODE(MX31_PIN_PC_BVD2, IOMUX_CONFIG_ALT1), | ||
98 | IOMUX_MODE(MX31_PIN_PC_RST, IOMUX_CONFIG_ALT1), | ||
99 | IOMUX_MODE(MX31_PIN_IOIS16, IOMUX_CONFIG_ALT1), | ||
100 | IOMUX_MODE(MX31_PIN_PC_RW_B, IOMUX_CONFIG_ALT1), | ||
101 | /* USB Host2 reset */ | ||
102 | IOMUX_MODE(MX31_PIN_USB_BYP, IOMUX_CONFIG_GPIO), | ||
87 | }; | 103 | }; |
88 | 104 | ||
89 | /* | 105 | /* |
@@ -102,7 +118,7 @@ static const uint32_t mx31_3ds_keymap[] = { | |||
102 | KEY(2, 3, KEY_F10), | 118 | KEY(2, 3, KEY_F10), |
103 | }; | 119 | }; |
104 | 120 | ||
105 | static struct matrix_keymap_data mx31_3ds_keymap_data = { | 121 | static const struct matrix_keymap_data mx31_3ds_keymap_data __initconst = { |
106 | .keymap = mx31_3ds_keymap, | 122 | .keymap = mx31_3ds_keymap, |
107 | .keymap_size = ARRAY_SIZE(mx31_3ds_keymap), | 123 | .keymap_size = ARRAY_SIZE(mx31_3ds_keymap), |
108 | }; | 124 | }; |
@@ -115,6 +131,13 @@ static struct regulator_init_data pwgtx_init = { | |||
115 | }, | 131 | }, |
116 | }; | 132 | }; |
117 | 133 | ||
134 | static struct regulator_init_data gpo_init = { | ||
135 | .constraints = { | ||
136 | .boot_on = 1, | ||
137 | .always_on = 1, | ||
138 | } | ||
139 | }; | ||
140 | |||
118 | static struct mc13783_regulator_init_data mx31_3ds_regulators[] = { | 141 | static struct mc13783_regulator_init_data mx31_3ds_regulators[] = { |
119 | { | 142 | { |
120 | .id = MC13783_REGU_PWGT1SPI, /* Power Gate for ARM core. */ | 143 | .id = MC13783_REGU_PWGT1SPI, /* Power Gate for ARM core. */ |
@@ -122,6 +145,13 @@ static struct mc13783_regulator_init_data mx31_3ds_regulators[] = { | |||
122 | }, { | 145 | }, { |
123 | .id = MC13783_REGU_PWGT2SPI, /* Power Gate for L2 Cache. */ | 146 | .id = MC13783_REGU_PWGT2SPI, /* Power Gate for L2 Cache. */ |
124 | .init_data = &pwgtx_init, | 147 | .init_data = &pwgtx_init, |
148 | }, { | ||
149 | |||
150 | .id = MC13783_REGU_GPO1, /* Turn on 1.8V */ | ||
151 | .init_data = &gpo_init, | ||
152 | }, { | ||
153 | .id = MC13783_REGU_GPO3, /* Turn on 3.3V */ | ||
154 | .init_data = &gpo_init, | ||
125 | }, | 155 | }, |
126 | }; | 156 | }; |
127 | 157 | ||
@@ -129,7 +159,7 @@ static struct mc13783_regulator_init_data mx31_3ds_regulators[] = { | |||
129 | static struct mc13783_platform_data mc13783_pdata __initdata = { | 159 | static struct mc13783_platform_data mc13783_pdata __initdata = { |
130 | .regulators = mx31_3ds_regulators, | 160 | .regulators = mx31_3ds_regulators, |
131 | .num_regulators = ARRAY_SIZE(mx31_3ds_regulators), | 161 | .num_regulators = ARRAY_SIZE(mx31_3ds_regulators), |
132 | .flags = MC13783_USE_REGULATOR, | 162 | .flags = MC13783_USE_REGULATOR | MC13783_USE_TOUCHSCREEN, |
133 | }; | 163 | }; |
134 | 164 | ||
135 | /* SPI */ | 165 | /* SPI */ |
@@ -175,6 +205,7 @@ mx31_3ds_nand_board_info __initconst = { | |||
175 | PAD_CTL_ODE_CMOS | PAD_CTL_100K_PU) | 205 | PAD_CTL_ODE_CMOS | PAD_CTL_100K_PU) |
176 | 206 | ||
177 | #define USBOTG_RST_B IOMUX_TO_GPIO(MX31_PIN_USB_PWR) | 207 | #define USBOTG_RST_B IOMUX_TO_GPIO(MX31_PIN_USB_PWR) |
208 | #define USBH2_RST_B IOMUX_TO_GPIO(MX31_PIN_USB_BYP) | ||
178 | 209 | ||
179 | static int mx31_3ds_usbotg_init(void) | 210 | static int mx31_3ds_usbotg_init(void) |
180 | { | 211 | { |
@@ -214,11 +245,77 @@ usbotg_free_reset: | |||
214 | return err; | 245 | return err; |
215 | } | 246 | } |
216 | 247 | ||
217 | static struct fsl_usb2_platform_data usbotg_pdata = { | 248 | static int mx31_3ds_host2_init(struct platform_device *pdev) |
249 | { | ||
250 | int err; | ||
251 | |||
252 | mxc_iomux_set_pad(MX31_PIN_USBH2_CLK, USB_PAD_CFG); | ||
253 | mxc_iomux_set_pad(MX31_PIN_USBH2_DIR, USB_PAD_CFG); | ||
254 | mxc_iomux_set_pad(MX31_PIN_USBH2_NXT, USB_PAD_CFG); | ||
255 | mxc_iomux_set_pad(MX31_PIN_USBH2_STP, USB_PAD_CFG); | ||
256 | mxc_iomux_set_pad(MX31_PIN_USBH2_DATA0, USB_PAD_CFG); | ||
257 | mxc_iomux_set_pad(MX31_PIN_USBH2_DATA1, USB_PAD_CFG); | ||
258 | mxc_iomux_set_pad(MX31_PIN_PC_VS2, USB_PAD_CFG); | ||
259 | mxc_iomux_set_pad(MX31_PIN_PC_BVD1, USB_PAD_CFG); | ||
260 | mxc_iomux_set_pad(MX31_PIN_PC_BVD2, USB_PAD_CFG); | ||
261 | mxc_iomux_set_pad(MX31_PIN_PC_RST, USB_PAD_CFG); | ||
262 | mxc_iomux_set_pad(MX31_PIN_IOIS16, USB_PAD_CFG); | ||
263 | mxc_iomux_set_pad(MX31_PIN_PC_RW_B, USB_PAD_CFG); | ||
264 | |||
265 | err = gpio_request(USBH2_RST_B, "usbh2-reset"); | ||
266 | if (err) { | ||
267 | pr_err("Failed to request the USB Host 2 reset gpio\n"); | ||
268 | return err; | ||
269 | } | ||
270 | |||
271 | err = gpio_direction_output(USBH2_RST_B, 0); | ||
272 | if (err) { | ||
273 | pr_err("Failed to drive the USB Host 2 reset gpio\n"); | ||
274 | goto usbotg_free_reset; | ||
275 | } | ||
276 | |||
277 | mdelay(1); | ||
278 | gpio_set_value(USBH2_RST_B, 1); | ||
279 | return 0; | ||
280 | |||
281 | usbotg_free_reset: | ||
282 | gpio_free(USBH2_RST_B); | ||
283 | return err; | ||
284 | } | ||
285 | |||
286 | #if defined(CONFIG_USB_ULPI) | ||
287 | static struct mxc_usbh_platform_data otg_pdata __initdata = { | ||
288 | .portsc = MXC_EHCI_MODE_ULPI, | ||
289 | .flags = MXC_EHCI_POWER_PINS_ENABLED, | ||
290 | }; | ||
291 | |||
292 | static struct mxc_usbh_platform_data usbh2_pdata __initdata = { | ||
293 | .init = mx31_3ds_host2_init, | ||
294 | .portsc = MXC_EHCI_MODE_ULPI, | ||
295 | .flags = MXC_EHCI_POWER_PINS_ENABLED, | ||
296 | }; | ||
297 | #endif | ||
298 | |||
299 | static const struct fsl_usb2_platform_data usbotg_pdata __initconst = { | ||
218 | .operating_mode = FSL_USB2_DR_DEVICE, | 300 | .operating_mode = FSL_USB2_DR_DEVICE, |
219 | .phy_mode = FSL_USB2_PHY_ULPI, | 301 | .phy_mode = FSL_USB2_PHY_ULPI, |
220 | }; | 302 | }; |
221 | 303 | ||
304 | static int otg_mode_host; | ||
305 | |||
306 | static int __init mx31_3ds_otg_mode(char *options) | ||
307 | { | ||
308 | if (!strcmp(options, "host")) | ||
309 | otg_mode_host = 1; | ||
310 | else if (!strcmp(options, "device")) | ||
311 | otg_mode_host = 0; | ||
312 | else | ||
313 | pr_info("otg_mode neither \"host\" nor \"device\". " | ||
314 | "Defaulting to device\n"); | ||
315 | return 0; | ||
316 | } | ||
317 | __setup("otg_mode=", mx31_3ds_otg_mode); | ||
318 | |||
222 | static const struct imxuart_platform_data uart_pdata __initconst = { | 319 | static const struct imxuart_platform_data uart_pdata __initconst = { |
223 | .flags = IMXUART_HAVE_RTSCTS, | 320 | .flags = IMXUART_HAVE_RTSCTS, |
224 | }; | 321 | }; |
@@ -246,14 +343,27 @@ static void __init mxc_board_init(void) | |||
246 | spi_register_board_info(mx31_3ds_spi_devs, | 343 | spi_register_board_info(mx31_3ds_spi_devs, |
247 | ARRAY_SIZE(mx31_3ds_spi_devs)); | 344 | ARRAY_SIZE(mx31_3ds_spi_devs)); |
248 | 345 | ||
249 | mxc_register_device(&imx_kpp_device, &mx31_3ds_keymap_data); | 346 | imx31_add_imx_keypad(&mx31_3ds_keymap_data); |
250 | 347 | ||
251 | mx31_3ds_usbotg_init(); | 348 | mx31_3ds_usbotg_init(); |
252 | mxc_register_device(&mxc_otg_udc_device, &usbotg_pdata); | 349 | #if defined(CONFIG_USB_ULPI) |
350 | if (otg_mode_host) { | ||
351 | otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, | ||
352 | ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); | ||
353 | |||
354 | imx31_add_mxc_ehci_otg(&otg_pdata); | ||
355 | } | ||
356 | usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, | ||
357 | ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); | ||
358 | imx31_add_mxc_ehci_hs(2, &usbh2_pdata); | ||
359 | #endif | ||
360 | if (!otg_mode_host) | ||
361 | imx31_add_fsl_usb2_udc(&usbotg_pdata); | ||
253 | 362 | ||
254 | if (mxc_expio_init(MX31_CS5_BASE_ADDR, EXPIO_PARENT_INT)) | 363 | if (mxc_expio_init(MX31_CS5_BASE_ADDR, EXPIO_PARENT_INT)) |
255 | printk(KERN_WARNING "Init of the debug board failed, all " | 364 | printk(KERN_WARNING "Init of the debug board failed, all " |
256 | "devices on the debug board are unusable.\n"); | 365 | "devices on the debug board are unusable.\n"); |
366 | imx31_add_imx2_wdt(NULL); | ||
257 | } | 367 | } |
258 | 368 | ||
259 | static void __init mx31_3ds_timer_init(void) | 369 | static void __init mx31_3ds_timer_init(void) |
diff --git a/arch/arm/mach-mx3/mach-mx31lilly.c b/arch/arm/mach-mx3/mach-mx31lilly.c index 42f47faa6fd6..2c595483f356 100644 --- a/arch/arm/mach-mx3/mach-mx31lilly.c +++ b/arch/arm/mach-mx3/mach-mx31lilly.c | |||
@@ -42,7 +42,6 @@ | |||
42 | #include <mach/common.h> | 42 | #include <mach/common.h> |
43 | #include <mach/iomux-mx3.h> | 43 | #include <mach/iomux-mx3.h> |
44 | #include <mach/board-mx31lilly.h> | 44 | #include <mach/board-mx31lilly.h> |
45 | #include <mach/mxc_ehci.h> | ||
46 | #include <mach/ulpi.h> | 45 | #include <mach/ulpi.h> |
47 | 46 | ||
48 | #include "devices-imx31.h" | 47 | #include "devices-imx31.h" |
@@ -230,13 +229,13 @@ static struct mxc_usbh_platform_data usbotg_pdata = { | |||
230 | .flags = MXC_EHCI_POWER_PINS_ENABLED, | 229 | .flags = MXC_EHCI_POWER_PINS_ENABLED, |
231 | }; | 230 | }; |
232 | 231 | ||
233 | static struct mxc_usbh_platform_data usbh1_pdata = { | 232 | static const struct mxc_usbh_platform_data usbh1_pdata __initconst = { |
234 | .init = usbh1_init, | 233 | .init = usbh1_init, |
235 | .portsc = MXC_EHCI_MODE_UTMI | MXC_EHCI_SERIAL, | 234 | .portsc = MXC_EHCI_MODE_UTMI | MXC_EHCI_SERIAL, |
236 | .flags = MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_INTERFACE_SINGLE_UNI, | 235 | .flags = MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_INTERFACE_SINGLE_UNI, |
237 | }; | 236 | }; |
238 | 237 | ||
239 | static struct mxc_usbh_platform_data usbh2_pdata = { | 238 | static struct mxc_usbh_platform_data usbh2_pdata __initdata = { |
240 | .init = usbh2_init, | 239 | .init = usbh2_init, |
241 | .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, | 240 | .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, |
242 | .flags = MXC_EHCI_POWER_PINS_ENABLED, | 241 | .flags = MXC_EHCI_POWER_PINS_ENABLED, |
@@ -249,8 +248,8 @@ static void lilly1131_usb_init(void) | |||
249 | usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, | 248 | usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, |
250 | ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); | 249 | ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); |
251 | 250 | ||
252 | mxc_register_device(&mxc_usbh1, &usbh1_pdata); | 251 | imx31_add_mxc_ehci_hs(1, &usbh1_pdata); |
253 | mxc_register_device(&mxc_usbh2, &usbh2_pdata); | 252 | imx31_add_mxc_ehci_hs(2, &usbh2_pdata); |
254 | } | 253 | } |
255 | 254 | ||
256 | #else | 255 | #else |
diff --git a/arch/arm/mach-mx3/mach-mx31lite.c b/arch/arm/mach-mx3/mach-mx31lite.c index b93895814cdf..9e64c66396e0 100644 --- a/arch/arm/mach-mx3/mach-mx31lite.c +++ b/arch/arm/mach-mx3/mach-mx31lite.c | |||
@@ -40,7 +40,6 @@ | |||
40 | #include <mach/board-mx31lite.h> | 40 | #include <mach/board-mx31lite.h> |
41 | #include <mach/iomux-mx3.h> | 41 | #include <mach/iomux-mx3.h> |
42 | #include <mach/irqs.h> | 42 | #include <mach/irqs.h> |
43 | #include <mach/mxc_ehci.h> | ||
44 | #include <mach/ulpi.h> | 43 | #include <mach/ulpi.h> |
45 | 44 | ||
46 | #include "devices-imx31.h" | 45 | #include "devices-imx31.h" |
@@ -171,7 +170,7 @@ static int usbh2_init(struct platform_device *pdev) | |||
171 | return 0; | 170 | return 0; |
172 | } | 171 | } |
173 | 172 | ||
174 | static struct mxc_usbh_platform_data usbh2_pdata = { | 173 | static struct mxc_usbh_platform_data usbh2_pdata __initdata = { |
175 | .init = usbh2_init, | 174 | .init = usbh2_init, |
176 | .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, | 175 | .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, |
177 | .flags = MXC_EHCI_POWER_PINS_ENABLED, | 176 | .flags = MXC_EHCI_POWER_PINS_ENABLED, |
@@ -258,7 +257,7 @@ static void __init mxc_board_init(void) | |||
258 | usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, | 257 | usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, |
259 | ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); | 258 | ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); |
260 | 259 | ||
261 | mxc_register_device(&mxc_usbh2, &usbh2_pdata); | 260 | imx31_add_mxc_ehci_hs(2, &usbh2_pdata); |
262 | #endif | 261 | #endif |
263 | 262 | ||
264 | /* SMSC9117 IRQ pin */ | 263 | /* SMSC9117 IRQ pin */ |
diff --git a/arch/arm/mach-mx3/mach-mx31moboard.c b/arch/arm/mach-mx3/mach-mx31moboard.c index eb5f426df224..203d21a510aa 100644 --- a/arch/arm/mach-mx3/mach-mx31moboard.c +++ b/arch/arm/mach-mx3/mach-mx31moboard.c | |||
@@ -40,8 +40,6 @@ | |||
40 | #include <mach/hardware.h> | 40 | #include <mach/hardware.h> |
41 | #include <mach/iomux-mx3.h> | 41 | #include <mach/iomux-mx3.h> |
42 | #include <mach/ipu.h> | 42 | #include <mach/ipu.h> |
43 | #include <mach/mmc.h> | ||
44 | #include <mach/mxc_ehci.h> | ||
45 | #include <mach/mx3_camera.h> | 43 | #include <mach/mx3_camera.h> |
46 | #include <mach/spi.h> | 44 | #include <mach/spi.h> |
47 | #include <mach/ulpi.h> | 45 | #include <mach/ulpi.h> |
@@ -170,11 +168,11 @@ static const struct spi_imx_master moboard_spi1_pdata __initconst = { | |||
170 | 168 | ||
171 | static struct regulator_consumer_supply sdhc_consumers[] = { | 169 | static struct regulator_consumer_supply sdhc_consumers[] = { |
172 | { | 170 | { |
173 | .dev = &mxcsdhc_device0.dev, | 171 | .dev_name = "mxc-mmc.0", |
174 | .supply = "sdhc0_vcc", | 172 | .supply = "sdhc0_vcc", |
175 | }, | 173 | }, |
176 | { | 174 | { |
177 | .dev = &mxcsdhc_device1.dev, | 175 | .dev_name = "mxc-mmc.1", |
178 | .supply = "sdhc1_vcc", | 176 | .supply = "sdhc1_vcc", |
179 | }, | 177 | }, |
180 | }; | 178 | }; |
@@ -345,7 +343,7 @@ static void moboard_sdhc1_exit(struct device *dev, void *data) | |||
345 | gpio_free(SDHC1_CD); | 343 | gpio_free(SDHC1_CD); |
346 | } | 344 | } |
347 | 345 | ||
348 | static struct imxmmc_platform_data sdhc1_pdata = { | 346 | static const struct imxmmc_platform_data sdhc1_pdata __initconst = { |
349 | .get_ro = moboard_sdhc1_get_ro, | 347 | .get_ro = moboard_sdhc1_get_ro, |
350 | .init = moboard_sdhc1_init, | 348 | .init = moboard_sdhc1_init, |
351 | .exit = moboard_sdhc1_exit, | 349 | .exit = moboard_sdhc1_exit, |
@@ -404,17 +402,23 @@ static void usb_xcvr_reset(void) | |||
404 | 402 | ||
405 | #if defined(CONFIG_USB_ULPI) | 403 | #if defined(CONFIG_USB_ULPI) |
406 | 404 | ||
407 | static struct mxc_usbh_platform_data usbh2_pdata = { | 405 | static struct mxc_usbh_platform_data usbh2_pdata __initdata = { |
408 | .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, | 406 | .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, |
409 | .flags = MXC_EHCI_POWER_PINS_ENABLED, | 407 | .flags = MXC_EHCI_POWER_PINS_ENABLED, |
410 | }; | 408 | }; |
411 | 409 | ||
412 | static int __init moboard_usbh2_init(void) | 410 | static int __init moboard_usbh2_init(void) |
413 | { | 411 | { |
412 | struct platform_device *pdev; | ||
413 | |||
414 | usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, | 414 | usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, |
415 | ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); | 415 | ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); |
416 | 416 | ||
417 | return mxc_register_device(&mxc_usbh2, &usbh2_pdata); | 417 | pdev = imx31_add_mxc_ehci_hs(2, &usbh2_pdata); |
418 | if (IS_ERR(pdev)) | ||
419 | return PTR_ERR(pdev); | ||
420 | |||
421 | return 0; | ||
418 | } | 422 | } |
419 | #else | 423 | #else |
420 | static inline int moboard_usbh2_init(void) { return 0; } | 424 | static inline int moboard_usbh2_init(void) { return 0; } |
@@ -520,7 +524,7 @@ static void __init mxc_board_init(void) | |||
520 | spi_register_board_info(moboard_spi_board_info, | 524 | spi_register_board_info(moboard_spi_board_info, |
521 | ARRAY_SIZE(moboard_spi_board_info)); | 525 | ARRAY_SIZE(moboard_spi_board_info)); |
522 | 526 | ||
523 | mxc_register_device(&mxcsdhc_device0, &sdhc1_pdata); | 527 | imx31_add_mxc_mmc(0, &sdhc1_pdata); |
524 | 528 | ||
525 | mxc_register_device(&mx3_ipu, &mx3_ipu_data); | 529 | mxc_register_device(&mx3_ipu, &mx3_ipu_data); |
526 | if (!mx31moboard_cam_alloc_dma(CAMERA_BUF_SIZE)) | 530 | if (!mx31moboard_cam_alloc_dma(CAMERA_BUF_SIZE)) |
diff --git a/arch/arm/mach-mx3/mach-mx35_3ds.c b/arch/arm/mach-mx3/mach-mx35_3ds.c index b66a75aa2e88..b1963f257c20 100644 --- a/arch/arm/mach-mx3/mach-mx35_3ds.c +++ b/arch/arm/mach-mx3/mach-mx35_3ds.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include <linux/platform_device.h> | 26 | #include <linux/platform_device.h> |
27 | #include <linux/memory.h> | 27 | #include <linux/memory.h> |
28 | #include <linux/gpio.h> | 28 | #include <linux/gpio.h> |
29 | #include <linux/fsl_devices.h> | 29 | #include <linux/usb/otg.h> |
30 | 30 | ||
31 | #include <linux/mtd/physmap.h> | 31 | #include <linux/mtd/physmap.h> |
32 | 32 | ||
@@ -40,7 +40,6 @@ | |||
40 | #include <mach/iomux-mx35.h> | 40 | #include <mach/iomux-mx35.h> |
41 | #include <mach/irqs.h> | 41 | #include <mach/irqs.h> |
42 | #include <mach/3ds_debugboard.h> | 42 | #include <mach/3ds_debugboard.h> |
43 | #include <mach/mxc_ehci.h> | ||
44 | 43 | ||
45 | #include "devices-imx35.h" | 44 | #include "devices-imx35.h" |
46 | #include "devices.h" | 45 | #include "devices.h" |
@@ -81,7 +80,7 @@ static struct platform_device *devices[] __initdata = { | |||
81 | &mx35pdk_flash, | 80 | &mx35pdk_flash, |
82 | }; | 81 | }; |
83 | 82 | ||
84 | static struct pad_desc mx35pdk_pads[] = { | 83 | static iomux_v3_cfg_t mx35pdk_pads[] = { |
85 | /* UART1 */ | 84 | /* UART1 */ |
86 | MX35_PAD_CTS1__UART1_CTS, | 85 | MX35_PAD_CTS1__UART1_CTS, |
87 | MX35_PAD_RTS1__UART1_RTS, | 86 | MX35_PAD_RTS1__UART1_RTS, |
@@ -122,18 +121,38 @@ static struct pad_desc mx35pdk_pads[] = { | |||
122 | }; | 121 | }; |
123 | 122 | ||
124 | /* OTG config */ | 123 | /* OTG config */ |
125 | static struct fsl_usb2_platform_data usb_otg_pdata = { | 124 | static const struct fsl_usb2_platform_data usb_otg_pdata __initconst = { |
126 | .operating_mode = FSL_USB2_DR_DEVICE, | 125 | .operating_mode = FSL_USB2_DR_DEVICE, |
127 | .phy_mode = FSL_USB2_PHY_UTMI_WIDE, | 126 | .phy_mode = FSL_USB2_PHY_UTMI_WIDE, |
128 | }; | 127 | }; |
129 | 128 | ||
129 | static struct mxc_usbh_platform_data otg_pdata __initdata = { | ||
130 | .portsc = MXC_EHCI_MODE_UTMI, | ||
131 | .flags = MXC_EHCI_INTERNAL_PHY, | ||
132 | }; | ||
133 | |||
130 | /* USB HOST config */ | 134 | /* USB HOST config */ |
131 | static struct mxc_usbh_platform_data usb_host_pdata = { | 135 | static const struct mxc_usbh_platform_data usb_host_pdata __initconst = { |
132 | .portsc = MXC_EHCI_MODE_SERIAL, | 136 | .portsc = MXC_EHCI_MODE_SERIAL, |
133 | .flags = MXC_EHCI_INTERFACE_SINGLE_UNI | | 137 | .flags = MXC_EHCI_INTERFACE_SINGLE_UNI | |
134 | MXC_EHCI_INTERNAL_PHY, | 138 | MXC_EHCI_INTERNAL_PHY, |
135 | }; | 139 | }; |
136 | 140 | ||
141 | static int otg_mode_host; | ||
142 | |||
143 | static int __init mx35_3ds_otg_mode(char *options) | ||
144 | { | ||
145 | if (!strcmp(options, "host")) | ||
146 | otg_mode_host = 1; | ||
147 | else if (!strcmp(options, "device")) | ||
148 | otg_mode_host = 0; | ||
149 | else | ||
150 | pr_info("otg_mode neither \"host\" nor \"device\". " | ||
151 | "Defaulting to device\n"); | ||
152 | return 0; | ||
153 | } | ||
154 | __setup("otg_mode=", mx35_3ds_otg_mode); | ||
155 | |||
137 | /* | 156 | /* |
138 | * Board specific initialization. | 157 | * Board specific initialization. |
139 | */ | 158 | */ |
@@ -142,16 +161,21 @@ static void __init mxc_board_init(void) | |||
142 | mxc_iomux_v3_setup_multiple_pads(mx35pdk_pads, ARRAY_SIZE(mx35pdk_pads)); | 161 | mxc_iomux_v3_setup_multiple_pads(mx35pdk_pads, ARRAY_SIZE(mx35pdk_pads)); |
143 | 162 | ||
144 | imx35_add_fec(NULL); | 163 | imx35_add_fec(NULL); |
164 | imx35_add_imx2_wdt(NULL); | ||
145 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 165 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
146 | 166 | ||
147 | imx35_add_imx_uart0(&uart_pdata); | 167 | imx35_add_imx_uart0(&uart_pdata); |
148 | 168 | ||
149 | mxc_register_device(&mxc_otg_udc_device, &usb_otg_pdata); | 169 | if (otg_mode_host) |
170 | imx35_add_mxc_ehci_otg(&otg_pdata); | ||
171 | |||
172 | imx35_add_mxc_ehci_hs(&usb_host_pdata); | ||
150 | 173 | ||
151 | mxc_register_device(&mxc_usbh1, &usb_host_pdata); | 174 | if (!otg_mode_host) |
175 | imx35_add_fsl_usb2_udc(&usb_otg_pdata); | ||
152 | 176 | ||
153 | imx35_add_mxc_nand(&mx35pdk_nand_board_info); | 177 | imx35_add_mxc_nand(&mx35pdk_nand_board_info); |
154 | imx35_add_esdhc(0, NULL); | 178 | imx35_add_sdhci_esdhc_imx(0, NULL); |
155 | 179 | ||
156 | if (mxc_expio_init(MX35_CS5_BASE_ADDR, EXPIO_PARENT_INT)) | 180 | if (mxc_expio_init(MX35_CS5_BASE_ADDR, EXPIO_PARENT_INT)) |
157 | pr_warn("Init of the debugboard failed, all " | 181 | pr_warn("Init of the debugboard failed, all " |
diff --git a/arch/arm/mach-mx3/mach-pcm037.c b/arch/arm/mach-mx3/mach-pcm037.c index 2ff3f661a48e..b752f6bc20a2 100644 --- a/arch/arm/mach-mx3/mach-pcm037.c +++ b/arch/arm/mach-mx3/mach-pcm037.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
28 | #include <linux/spi/spi.h> | 28 | #include <linux/spi/spi.h> |
29 | #include <linux/irq.h> | 29 | #include <linux/irq.h> |
30 | #include <linux/fsl_devices.h> | ||
31 | #include <linux/can/platform/sja1000.h> | 30 | #include <linux/can/platform/sja1000.h> |
32 | #include <linux/usb/otg.h> | 31 | #include <linux/usb/otg.h> |
33 | #include <linux/usb/ulpi.h> | 32 | #include <linux/usb/ulpi.h> |
@@ -43,10 +42,8 @@ | |||
43 | #include <mach/hardware.h> | 42 | #include <mach/hardware.h> |
44 | #include <mach/iomux-mx3.h> | 43 | #include <mach/iomux-mx3.h> |
45 | #include <mach/ipu.h> | 44 | #include <mach/ipu.h> |
46 | #include <mach/mmc.h> | ||
47 | #include <mach/mx3_camera.h> | 45 | #include <mach/mx3_camera.h> |
48 | #include <mach/mx3fb.h> | 46 | #include <mach/mx3fb.h> |
49 | #include <mach/mxc_ehci.h> | ||
50 | #include <mach/ulpi.h> | 47 | #include <mach/ulpi.h> |
51 | 48 | ||
52 | #include "devices-imx31.h" | 49 | #include "devices-imx31.h" |
@@ -399,7 +396,7 @@ static void pcm970_sdhc1_exit(struct device *dev, void *data) | |||
399 | gpio_free(SDHC1_GPIO_WP); | 396 | gpio_free(SDHC1_GPIO_WP); |
400 | } | 397 | } |
401 | 398 | ||
402 | static struct imxmmc_platform_data sdhc_pdata = { | 399 | static const struct imxmmc_platform_data sdhc_pdata __initconst = { |
403 | #ifdef PCM970_SDHC_RW_SWITCH | 400 | #ifdef PCM970_SDHC_RW_SWITCH |
404 | .get_ro = pcm970_sdhc1_get_ro, | 401 | .get_ro = pcm970_sdhc1_get_ro, |
405 | #endif | 402 | #endif |
@@ -441,7 +438,6 @@ static int __init pcm037_camera_alloc_dma(const size_t buf_size) | |||
441 | static struct platform_device *devices[] __initdata = { | 438 | static struct platform_device *devices[] __initdata = { |
442 | &pcm037_flash, | 439 | &pcm037_flash, |
443 | &pcm037_sram_device, | 440 | &pcm037_sram_device, |
444 | &imx_wdt_device0, | ||
445 | &pcm037_mt9t031, | 441 | &pcm037_mt9t031, |
446 | &pcm037_mt9v022, | 442 | &pcm037_mt9v022, |
447 | }; | 443 | }; |
@@ -538,18 +534,18 @@ static struct platform_device pcm970_sja1000 = { | |||
538 | }; | 534 | }; |
539 | 535 | ||
540 | #if defined(CONFIG_USB_ULPI) | 536 | #if defined(CONFIG_USB_ULPI) |
541 | static struct mxc_usbh_platform_data otg_pdata = { | 537 | static struct mxc_usbh_platform_data otg_pdata __initdata = { |
542 | .portsc = MXC_EHCI_MODE_ULPI, | 538 | .portsc = MXC_EHCI_MODE_ULPI, |
543 | .flags = MXC_EHCI_INTERFACE_DIFF_UNI, | 539 | .flags = MXC_EHCI_INTERFACE_DIFF_UNI, |
544 | }; | 540 | }; |
545 | 541 | ||
546 | static struct mxc_usbh_platform_data usbh2_pdata = { | 542 | static struct mxc_usbh_platform_data usbh2_pdata __initdata = { |
547 | .portsc = MXC_EHCI_MODE_ULPI, | 543 | .portsc = MXC_EHCI_MODE_ULPI, |
548 | .flags = MXC_EHCI_INTERFACE_DIFF_UNI, | 544 | .flags = MXC_EHCI_INTERFACE_DIFF_UNI, |
549 | }; | 545 | }; |
550 | #endif | 546 | #endif |
551 | 547 | ||
552 | static struct fsl_usb2_platform_data otg_device_pdata = { | 548 | static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { |
553 | .operating_mode = FSL_USB2_DR_DEVICE, | 549 | .operating_mode = FSL_USB2_DR_DEVICE, |
554 | .phy_mode = FSL_USB2_PHY_ULPI, | 550 | .phy_mode = FSL_USB2_PHY_ULPI, |
555 | }; | 551 | }; |
@@ -607,12 +603,13 @@ static void __init mxc_board_init(void) | |||
607 | 603 | ||
608 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 604 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
609 | 605 | ||
606 | imx31_add_imx2_wdt(NULL); | ||
610 | imx31_add_imx_uart0(&uart_pdata); | 607 | imx31_add_imx_uart0(&uart_pdata); |
611 | /* XXX: should't this have .flags = 0 (i.e. no RTSCTS) on PCM037_EET? */ | 608 | /* XXX: should't this have .flags = 0 (i.e. no RTSCTS) on PCM037_EET? */ |
612 | imx31_add_imx_uart1(&uart_pdata); | 609 | imx31_add_imx_uart1(&uart_pdata); |
613 | imx31_add_imx_uart2(&uart_pdata); | 610 | imx31_add_imx_uart2(&uart_pdata); |
614 | 611 | ||
615 | mxc_register_device(&mxc_w1_master_device, NULL); | 612 | imx31_add_mxc_w1(NULL); |
616 | 613 | ||
617 | /* LAN9217 IRQ pin */ | 614 | /* LAN9217 IRQ pin */ |
618 | ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1), "lan9217-irq"); | 615 | ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1), "lan9217-irq"); |
@@ -632,7 +629,7 @@ static void __init mxc_board_init(void) | |||
632 | imx31_add_imx_i2c2(&pcm037_i2c2_data); | 629 | imx31_add_imx_i2c2(&pcm037_i2c2_data); |
633 | 630 | ||
634 | imx31_add_mxc_nand(&pcm037_nand_board_info); | 631 | imx31_add_mxc_nand(&pcm037_nand_board_info); |
635 | mxc_register_device(&mxcsdhc_device0, &sdhc_pdata); | 632 | imx31_add_mxc_mmc(0, &sdhc_pdata); |
636 | mxc_register_device(&mx3_ipu, &mx3_ipu_data); | 633 | mxc_register_device(&mx3_ipu, &mx3_ipu_data); |
637 | mxc_register_device(&mx3_fb, &mx3fb_pdata); | 634 | mxc_register_device(&mx3_fb, &mx3fb_pdata); |
638 | 635 | ||
@@ -654,16 +651,16 @@ static void __init mxc_board_init(void) | |||
654 | otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, | 651 | otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, |
655 | ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); | 652 | ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); |
656 | 653 | ||
657 | mxc_register_device(&mxc_otg_host, &otg_pdata); | 654 | imx31_add_mxc_ehci_otg(&otg_pdata); |
658 | } | 655 | } |
659 | 656 | ||
660 | usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, | 657 | usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, |
661 | ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); | 658 | ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); |
662 | 659 | ||
663 | mxc_register_device(&mxc_usbh2, &usbh2_pdata); | 660 | imx31_add_mxc_ehci_hs(2, &usbh2_pdata); |
664 | #endif | 661 | #endif |
665 | if (!otg_mode_host) | 662 | if (!otg_mode_host) |
666 | mxc_register_device(&mxc_otg_udc_device, &otg_device_pdata); | 663 | imx31_add_fsl_usb2_udc(&otg_device_pdata); |
667 | 664 | ||
668 | } | 665 | } |
669 | 666 | ||
diff --git a/arch/arm/mach-mx3/mach-pcm043.c b/arch/arm/mach-mx3/mach-pcm043.c index 4e1de87995d4..bcf83fc7e701 100644 --- a/arch/arm/mach-mx3/mach-pcm043.c +++ b/arch/arm/mach-mx3/mach-pcm043.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/i2c/at24.h> | 27 | #include <linux/i2c/at24.h> |
28 | #include <linux/usb/otg.h> | 28 | #include <linux/usb/otg.h> |
29 | #include <linux/usb/ulpi.h> | 29 | #include <linux/usb/ulpi.h> |
30 | #include <linux/fsl_devices.h> | ||
31 | 30 | ||
32 | #include <asm/mach-types.h> | 31 | #include <asm/mach-types.h> |
33 | #include <asm/mach/arch.h> | 32 | #include <asm/mach/arch.h> |
@@ -39,7 +38,6 @@ | |||
39 | #include <mach/iomux-mx35.h> | 38 | #include <mach/iomux-mx35.h> |
40 | #include <mach/ipu.h> | 39 | #include <mach/ipu.h> |
41 | #include <mach/mx3fb.h> | 40 | #include <mach/mx3fb.h> |
42 | #include <mach/mxc_ehci.h> | ||
43 | #include <mach/ulpi.h> | 41 | #include <mach/ulpi.h> |
44 | #include <mach/audmux.h> | 42 | #include <mach/audmux.h> |
45 | 43 | ||
@@ -140,10 +138,9 @@ static struct i2c_board_info pcm043_i2c_devices[] = { | |||
140 | 138 | ||
141 | static struct platform_device *devices[] __initdata = { | 139 | static struct platform_device *devices[] __initdata = { |
142 | &pcm043_flash, | 140 | &pcm043_flash, |
143 | &imx_wdt_device0, | ||
144 | }; | 141 | }; |
145 | 142 | ||
146 | static struct pad_desc pcm043_pads[] = { | 143 | static iomux_v3_cfg_t pcm043_pads[] = { |
147 | /* UART1 */ | 144 | /* UART1 */ |
148 | MX35_PAD_CTS1__UART1_CTS, | 145 | MX35_PAD_CTS1__UART1_CTS, |
149 | MX35_PAD_RTS1__UART1_RTS, | 146 | MX35_PAD_RTS1__UART1_RTS, |
@@ -230,8 +227,8 @@ static struct pad_desc pcm043_pads[] = { | |||
230 | 227 | ||
231 | static void pcm043_ac97_warm_reset(struct snd_ac97 *ac97) | 228 | static void pcm043_ac97_warm_reset(struct snd_ac97 *ac97) |
232 | { | 229 | { |
233 | struct pad_desc txfs_gpio = MX35_PAD_STXFS4__GPIO2_31; | 230 | iomux_v3_cfg_t txfs_gpio = MX35_PAD_STXFS4__GPIO2_31; |
234 | struct pad_desc txfs = MX35_PAD_STXFS4__AUDMUX_AUD4_TXFS; | 231 | iomux_v3_cfg_t txfs = MX35_PAD_STXFS4__AUDMUX_AUD4_TXFS; |
235 | int ret; | 232 | int ret; |
236 | 233 | ||
237 | ret = gpio_request(AC97_GPIO_TXFS, "SSI"); | 234 | ret = gpio_request(AC97_GPIO_TXFS, "SSI"); |
@@ -240,7 +237,7 @@ static void pcm043_ac97_warm_reset(struct snd_ac97 *ac97) | |||
240 | return; | 237 | return; |
241 | } | 238 | } |
242 | 239 | ||
243 | mxc_iomux_v3_setup_pad(&txfs_gpio); | 240 | mxc_iomux_v3_setup_pad(txfs_gpio); |
244 | 241 | ||
245 | /* warm reset */ | 242 | /* warm reset */ |
246 | gpio_direction_output(AC97_GPIO_TXFS, 1); | 243 | gpio_direction_output(AC97_GPIO_TXFS, 1); |
@@ -248,16 +245,16 @@ static void pcm043_ac97_warm_reset(struct snd_ac97 *ac97) | |||
248 | gpio_set_value(AC97_GPIO_TXFS, 0); | 245 | gpio_set_value(AC97_GPIO_TXFS, 0); |
249 | 246 | ||
250 | gpio_free(AC97_GPIO_TXFS); | 247 | gpio_free(AC97_GPIO_TXFS); |
251 | mxc_iomux_v3_setup_pad(&txfs); | 248 | mxc_iomux_v3_setup_pad(txfs); |
252 | } | 249 | } |
253 | 250 | ||
254 | static void pcm043_ac97_cold_reset(struct snd_ac97 *ac97) | 251 | static void pcm043_ac97_cold_reset(struct snd_ac97 *ac97) |
255 | { | 252 | { |
256 | struct pad_desc txfs_gpio = MX35_PAD_STXFS4__GPIO2_31; | 253 | iomux_v3_cfg_t txfs_gpio = MX35_PAD_STXFS4__GPIO2_31; |
257 | struct pad_desc txfs = MX35_PAD_STXFS4__AUDMUX_AUD4_TXFS; | 254 | iomux_v3_cfg_t txfs = MX35_PAD_STXFS4__AUDMUX_AUD4_TXFS; |
258 | struct pad_desc txd_gpio = MX35_PAD_STXD4__GPIO2_28; | 255 | iomux_v3_cfg_t txd_gpio = MX35_PAD_STXD4__GPIO2_28; |
259 | struct pad_desc txd = MX35_PAD_STXD4__AUDMUX_AUD4_TXD; | 256 | iomux_v3_cfg_t txd = MX35_PAD_STXD4__AUDMUX_AUD4_TXD; |
260 | struct pad_desc reset_gpio = MX35_PAD_SD2_CMD__GPIO2_0; | 257 | iomux_v3_cfg_t reset_gpio = MX35_PAD_SD2_CMD__GPIO2_0; |
261 | int ret; | 258 | int ret; |
262 | 259 | ||
263 | ret = gpio_request(AC97_GPIO_TXFS, "SSI"); | 260 | ret = gpio_request(AC97_GPIO_TXFS, "SSI"); |
@@ -272,9 +269,9 @@ static void pcm043_ac97_cold_reset(struct snd_ac97 *ac97) | |||
272 | if (ret) | 269 | if (ret) |
273 | goto err3; | 270 | goto err3; |
274 | 271 | ||
275 | mxc_iomux_v3_setup_pad(&txfs_gpio); | 272 | mxc_iomux_v3_setup_pad(txfs_gpio); |
276 | mxc_iomux_v3_setup_pad(&txd_gpio); | 273 | mxc_iomux_v3_setup_pad(txd_gpio); |
277 | mxc_iomux_v3_setup_pad(&reset_gpio); | 274 | mxc_iomux_v3_setup_pad(reset_gpio); |
278 | 275 | ||
279 | gpio_direction_output(AC97_GPIO_TXFS, 0); | 276 | gpio_direction_output(AC97_GPIO_TXFS, 0); |
280 | gpio_direction_output(AC97_GPIO_TXD, 0); | 277 | gpio_direction_output(AC97_GPIO_TXD, 0); |
@@ -284,8 +281,8 @@ static void pcm043_ac97_cold_reset(struct snd_ac97 *ac97) | |||
284 | udelay(10); | 281 | udelay(10); |
285 | gpio_direction_output(AC97_GPIO_RESET, 1); | 282 | gpio_direction_output(AC97_GPIO_RESET, 1); |
286 | 283 | ||
287 | mxc_iomux_v3_setup_pad(&txd); | 284 | mxc_iomux_v3_setup_pad(txd); |
288 | mxc_iomux_v3_setup_pad(&txfs); | 285 | mxc_iomux_v3_setup_pad(txfs); |
289 | 286 | ||
290 | gpio_free(AC97_GPIO_RESET); | 287 | gpio_free(AC97_GPIO_RESET); |
291 | err3: | 288 | err3: |
@@ -311,19 +308,19 @@ pcm037_nand_board_info __initconst = { | |||
311 | }; | 308 | }; |
312 | 309 | ||
313 | #if defined(CONFIG_USB_ULPI) | 310 | #if defined(CONFIG_USB_ULPI) |
314 | static struct mxc_usbh_platform_data otg_pdata = { | 311 | static struct mxc_usbh_platform_data otg_pdata __initdata = { |
315 | .portsc = MXC_EHCI_MODE_UTMI, | 312 | .portsc = MXC_EHCI_MODE_UTMI, |
316 | .flags = MXC_EHCI_INTERFACE_DIFF_UNI, | 313 | .flags = MXC_EHCI_INTERFACE_DIFF_UNI, |
317 | }; | 314 | }; |
318 | 315 | ||
319 | static struct mxc_usbh_platform_data usbh1_pdata = { | 316 | static const struct mxc_usbh_platform_data usbh1_pdata __initconst = { |
320 | .portsc = MXC_EHCI_MODE_SERIAL, | 317 | .portsc = MXC_EHCI_MODE_SERIAL, |
321 | .flags = MXC_EHCI_INTERFACE_SINGLE_UNI | MXC_EHCI_INTERNAL_PHY | | 318 | .flags = MXC_EHCI_INTERFACE_SINGLE_UNI | MXC_EHCI_INTERNAL_PHY | |
322 | MXC_EHCI_IPPUE_DOWN, | 319 | MXC_EHCI_IPPUE_DOWN, |
323 | }; | 320 | }; |
324 | #endif | 321 | #endif |
325 | 322 | ||
326 | static struct fsl_usb2_platform_data otg_device_pdata = { | 323 | static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { |
327 | .operating_mode = FSL_USB2_DR_DEVICE, | 324 | .operating_mode = FSL_USB2_DR_DEVICE, |
328 | .phy_mode = FSL_USB2_PHY_UTMI, | 325 | .phy_mode = FSL_USB2_PHY_UTMI, |
329 | }; | 326 | }; |
@@ -364,6 +361,7 @@ static void __init mxc_board_init(void) | |||
364 | 361 | ||
365 | imx35_add_fec(NULL); | 362 | imx35_add_fec(NULL); |
366 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 363 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
364 | imx35_add_imx2_wdt(NULL); | ||
367 | 365 | ||
368 | imx35_add_imx_uart0(&uart_pdata); | 366 | imx35_add_imx_uart0(&uart_pdata); |
369 | imx35_add_mxc_nand(&pcm037_nand_board_info); | 367 | imx35_add_mxc_nand(&pcm037_nand_board_info); |
@@ -386,16 +384,16 @@ static void __init mxc_board_init(void) | |||
386 | otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, | 384 | otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, |
387 | ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); | 385 | ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); |
388 | 386 | ||
389 | mxc_register_device(&mxc_otg_host, &otg_pdata); | 387 | imx35_add_mxc_ehci_otg(&otg_pdata); |
390 | } | 388 | } |
391 | 389 | ||
392 | mxc_register_device(&mxc_usbh1, &usbh1_pdata); | 390 | imx35_add_mxc_ehci_hs(&usbh1_pdata); |
393 | #endif | 391 | #endif |
394 | if (!otg_mode_host) | 392 | if (!otg_mode_host) |
395 | mxc_register_device(&mxc_otg_udc_device, &otg_device_pdata); | 393 | imx35_add_fsl_usb2_udc(&otg_device_pdata); |
396 | 394 | ||
397 | imx35_add_flexcan1(NULL); | 395 | imx35_add_flexcan1(NULL); |
398 | imx35_add_esdhc(0, NULL); | 396 | imx35_add_sdhci_esdhc_imx(0, NULL); |
399 | } | 397 | } |
400 | 398 | ||
401 | static void __init pcm043_timer_init(void) | 399 | static void __init pcm043_timer_init(void) |
diff --git a/arch/arm/mach-mx3/mm.c b/arch/arm/mach-mx3/mm.c index b4ffc531a82c..47118f760244 100644 --- a/arch/arm/mach-mx3/mm.c +++ b/arch/arm/mach-mx3/mm.c | |||
@@ -36,40 +36,16 @@ | |||
36 | * @ingroup Memory | 36 | * @ingroup Memory |
37 | */ | 37 | */ |
38 | 38 | ||
39 | /*! | 39 | #ifdef CONFIG_SOC_IMX31 |
40 | * This table defines static virtual address mappings for I/O regions. | 40 | static struct map_desc mx31_io_desc[] __initdata = { |
41 | * These are the mappings common across all MX3 boards. | 41 | imx_map_entry(MX31, X_MEMC, MT_DEVICE), |
42 | */ | 42 | imx_map_entry(MX31, AVIC, MT_DEVICE_NONSHARED), |
43 | static struct map_desc mxc_io_desc[] __initdata = { | 43 | imx_map_entry(MX31, AIPS1, MT_DEVICE_NONSHARED), |
44 | { | 44 | imx_map_entry(MX31, AIPS2, MT_DEVICE_NONSHARED), |
45 | .virtual = X_MEMC_BASE_ADDR_VIRT, | 45 | imx_map_entry(MX31, SPBA0, MT_DEVICE_NONSHARED), |
46 | .pfn = __phys_to_pfn(X_MEMC_BASE_ADDR), | ||
47 | .length = X_MEMC_SIZE, | ||
48 | .type = MT_DEVICE | ||
49 | }, { | ||
50 | .virtual = AVIC_BASE_ADDR_VIRT, | ||
51 | .pfn = __phys_to_pfn(AVIC_BASE_ADDR), | ||
52 | .length = AVIC_SIZE, | ||
53 | .type = MT_DEVICE_NONSHARED | ||
54 | }, { | ||
55 | .virtual = AIPS1_BASE_ADDR_VIRT, | ||
56 | .pfn = __phys_to_pfn(AIPS1_BASE_ADDR), | ||
57 | .length = AIPS1_SIZE, | ||
58 | .type = MT_DEVICE_NONSHARED | ||
59 | }, { | ||
60 | .virtual = AIPS2_BASE_ADDR_VIRT, | ||
61 | .pfn = __phys_to_pfn(AIPS2_BASE_ADDR), | ||
62 | .length = AIPS2_SIZE, | ||
63 | .type = MT_DEVICE_NONSHARED | ||
64 | }, { | ||
65 | .virtual = SPBA0_BASE_ADDR_VIRT, | ||
66 | .pfn = __phys_to_pfn(SPBA0_BASE_ADDR), | ||
67 | .length = SPBA0_SIZE, | ||
68 | .type = MT_DEVICE_NONSHARED | ||
69 | }, | ||
70 | }; | 46 | }; |
71 | 47 | ||
72 | /*! | 48 | /* |
73 | * This function initializes the memory map. It is called during the | 49 | * This function initializes the memory map. It is called during the |
74 | * system startup to create static physical to virtual memory mappings | 50 | * system startup to create static physical to virtual memory mappings |
75 | * for the IO modules. | 51 | * for the IO modules. |
@@ -77,34 +53,44 @@ static struct map_desc mxc_io_desc[] __initdata = { | |||
77 | void __init mx31_map_io(void) | 53 | void __init mx31_map_io(void) |
78 | { | 54 | { |
79 | mxc_set_cpu_type(MXC_CPU_MX31); | 55 | mxc_set_cpu_type(MXC_CPU_MX31); |
80 | mxc_arch_reset_init(IO_ADDRESS(WDOG_BASE_ADDR)); | 56 | mxc_arch_reset_init(MX31_IO_ADDRESS(MX31_WDOG_BASE_ADDR)); |
81 | 57 | ||
82 | iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc)); | 58 | iotable_init(mx31_io_desc, ARRAY_SIZE(mx31_io_desc)); |
83 | } | 59 | } |
84 | 60 | ||
85 | #ifdef CONFIG_ARCH_MX35 | 61 | int imx31_register_gpios(void); |
86 | void __init mx35_map_io(void) | 62 | void __init mx31_init_irq(void) |
87 | { | 63 | { |
88 | mxc_set_cpu_type(MXC_CPU_MX35); | 64 | mxc_init_irq(MX31_IO_ADDRESS(MX31_AVIC_BASE_ADDR)); |
89 | mxc_iomux_v3_init(IO_ADDRESS(IOMUXC_BASE_ADDR)); | 65 | imx31_register_gpios(); |
90 | mxc_arch_reset_init(IO_ADDRESS(WDOG_BASE_ADDR)); | ||
91 | |||
92 | iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc)); | ||
93 | } | 66 | } |
94 | #endif | 67 | #endif /* ifdef CONFIG_SOC_IMX31 */ |
95 | 68 | ||
96 | int imx3x_register_gpios(void); | 69 | #ifdef CONFIG_SOC_IMX35 |
70 | static struct map_desc mx35_io_desc[] __initdata = { | ||
71 | imx_map_entry(MX35, X_MEMC, MT_DEVICE), | ||
72 | imx_map_entry(MX35, AVIC, MT_DEVICE_NONSHARED), | ||
73 | imx_map_entry(MX35, AIPS1, MT_DEVICE_NONSHARED), | ||
74 | imx_map_entry(MX35, AIPS2, MT_DEVICE_NONSHARED), | ||
75 | imx_map_entry(MX35, SPBA0, MT_DEVICE_NONSHARED), | ||
76 | }; | ||
97 | 77 | ||
98 | void __init mx31_init_irq(void) | 78 | void __init mx35_map_io(void) |
99 | { | 79 | { |
100 | mxc_init_irq(IO_ADDRESS(AVIC_BASE_ADDR)); | 80 | mxc_set_cpu_type(MXC_CPU_MX35); |
101 | imx3x_register_gpios(); | 81 | mxc_iomux_v3_init(MX35_IO_ADDRESS(MX35_IOMUXC_BASE_ADDR)); |
82 | mxc_arch_reset_init(MX35_IO_ADDRESS(MX35_WDOG_BASE_ADDR)); | ||
83 | |||
84 | iotable_init(mx35_io_desc, ARRAY_SIZE(mx35_io_desc)); | ||
102 | } | 85 | } |
103 | 86 | ||
87 | int imx35_register_gpios(void); | ||
104 | void __init mx35_init_irq(void) | 88 | void __init mx35_init_irq(void) |
105 | { | 89 | { |
106 | mx31_init_irq(); | 90 | mxc_init_irq(MX35_IO_ADDRESS(MX35_AVIC_BASE_ADDR)); |
91 | imx35_register_gpios(); | ||
107 | } | 92 | } |
93 | #endif /* ifdef CONFIG_SOC_IMX35 */ | ||
108 | 94 | ||
109 | #ifdef CONFIG_CACHE_L2X0 | 95 | #ifdef CONFIG_CACHE_L2X0 |
110 | static int mxc_init_l2x0(void) | 96 | static int mxc_init_l2x0(void) |
@@ -129,7 +115,7 @@ static int mxc_init_l2x0(void) | |||
129 | pr_err("L2 cache: Cannot fix timing. Trying to continue without\n"); | 115 | pr_err("L2 cache: Cannot fix timing. Trying to continue without\n"); |
130 | } | 116 | } |
131 | 117 | ||
132 | l2x0_base = ioremap(L2CC_BASE_ADDR, 4096); | 118 | l2x0_base = ioremap(MX3x_L2CC_BASE_ADDR, 4096); |
133 | if (IS_ERR(l2x0_base)) { | 119 | if (IS_ERR(l2x0_base)) { |
134 | printk(KERN_ERR "remapping L2 cache area failed with %ld\n", | 120 | printk(KERN_ERR "remapping L2 cache area failed with %ld\n", |
135 | PTR_ERR(l2x0_base)); | 121 | PTR_ERR(l2x0_base)); |
diff --git a/arch/arm/mach-mx3/mx31lilly-db.c b/arch/arm/mach-mx3/mx31lilly-db.c index 827fd3c80201..8f1a38ebf5c8 100644 --- a/arch/arm/mach-mx3/mx31lilly-db.c +++ b/arch/arm/mach-mx3/mx31lilly-db.c | |||
@@ -34,7 +34,6 @@ | |||
34 | #include <mach/common.h> | 34 | #include <mach/common.h> |
35 | #include <mach/iomux-mx3.h> | 35 | #include <mach/iomux-mx3.h> |
36 | #include <mach/board-mx31lilly.h> | 36 | #include <mach/board-mx31lilly.h> |
37 | #include <mach/mmc.h> | ||
38 | #include <mach/mx3fb.h> | 37 | #include <mach/mx3fb.h> |
39 | #include <mach/ipu.h> | 38 | #include <mach/ipu.h> |
40 | 39 | ||
@@ -158,7 +157,7 @@ static void mxc_mmc1_exit(struct device *dev, void *data) | |||
158 | free_irq(IOMUX_TO_IRQ(MX31_PIN_GPIO1_1), data); | 157 | free_irq(IOMUX_TO_IRQ(MX31_PIN_GPIO1_1), data); |
159 | } | 158 | } |
160 | 159 | ||
161 | static struct imxmmc_platform_data mmc_pdata = { | 160 | static const struct imxmmc_platform_data mmc_pdata __initconst = { |
162 | .get_ro = mxc_mmc1_get_ro, | 161 | .get_ro = mxc_mmc1_get_ro, |
163 | .init = mxc_mmc1_init, | 162 | .init = mxc_mmc1_init, |
164 | .exit = mxc_mmc1_exit, | 163 | .exit = mxc_mmc1_exit, |
@@ -216,7 +215,7 @@ void __init mx31lilly_db_init(void) | |||
216 | imx31_add_imx_uart0(&uart_pdata); | 215 | imx31_add_imx_uart0(&uart_pdata); |
217 | imx31_add_imx_uart1(&uart_pdata); | 216 | imx31_add_imx_uart1(&uart_pdata); |
218 | imx31_add_imx_uart2(&uart_pdata); | 217 | imx31_add_imx_uart2(&uart_pdata); |
219 | mxc_register_device(&mxcsdhc_device0, &mmc_pdata); | 218 | imx31_add_mxc_mmc(0, &mmc_pdata); |
220 | mx31lilly_init_fb(); | 219 | mx31lilly_init_fb(); |
221 | } | 220 | } |
222 | 221 | ||
diff --git a/arch/arm/mach-mx3/mx31lite-db.c b/arch/arm/mach-mx3/mx31lite-db.c index 7b0e74e275ba..3124ea837ac7 100644 --- a/arch/arm/mach-mx3/mx31lite-db.c +++ b/arch/arm/mach-mx3/mx31lite-db.c | |||
@@ -35,7 +35,6 @@ | |||
35 | #include <mach/common.h> | 35 | #include <mach/common.h> |
36 | #include <mach/iomux-mx3.h> | 36 | #include <mach/iomux-mx3.h> |
37 | #include <mach/board-mx31lite.h> | 37 | #include <mach/board-mx31lite.h> |
38 | #include <mach/mmc.h> | ||
39 | 38 | ||
40 | #include "devices-imx31.h" | 39 | #include "devices-imx31.h" |
41 | #include "devices.h" | 40 | #include "devices.h" |
@@ -142,7 +141,7 @@ static void mxc_mmc1_exit(struct device *dev, void *data) | |||
142 | free_irq(IOMUX_TO_IRQ(MX31_PIN_DCD_DCE1), data); | 141 | free_irq(IOMUX_TO_IRQ(MX31_PIN_DCD_DCE1), data); |
143 | } | 142 | } |
144 | 143 | ||
145 | static struct imxmmc_platform_data mmc_pdata = { | 144 | static const struct imxmmc_platform_data mmc_pdata __initconst = { |
146 | .get_ro = mxc_mmc1_get_ro, | 145 | .get_ro = mxc_mmc1_get_ro, |
147 | .init = mxc_mmc1_init, | 146 | .init = mxc_mmc1_init, |
148 | .exit = mxc_mmc1_exit, | 147 | .exit = mxc_mmc1_exit, |
@@ -197,10 +196,9 @@ void __init mx31lite_db_init(void) | |||
197 | ARRAY_SIZE(litekit_db_board_pins), | 196 | ARRAY_SIZE(litekit_db_board_pins), |
198 | "development board pins"); | 197 | "development board pins"); |
199 | imx31_add_imx_uart0(&uart_pdata); | 198 | imx31_add_imx_uart0(&uart_pdata); |
200 | mxc_register_device(&mxcsdhc_device0, &mmc_pdata); | 199 | imx31_add_mxc_mmc(0, &mmc_pdata); |
201 | imx31_add_spi_imx0(&spi0_pdata); | 200 | imx31_add_spi_imx0(&spi0_pdata); |
202 | platform_device_register(&litekit_led_device); | 201 | platform_device_register(&litekit_led_device); |
203 | mxc_register_device(&imx_wdt_device0, NULL); | 202 | imx31_add_imx2_wdt(NULL); |
204 | mxc_register_device(&imx_rtc_device0, NULL); | 203 | mxc_register_device(&imx_rtc_device0, NULL); |
205 | } | 204 | } |
206 | |||
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 | ||
106 | static struct imxmmc_platform_data sdhc2_pdata = { | 103 | static 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 | ||
190 | static struct mxc_usbh_platform_data usbh1_pdata = { | 187 | static 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 = { | |||
196 | static int __init devboard_usbh1_init(void) | 193 | static 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 | ||
214 | static struct fsl_usb2_platform_data usb_pdata = { | 216 | static 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 | } |
diff --git a/arch/arm/mach-mx3/mx31moboard-marxbot.c b/arch/arm/mach-mx3/mx31moboard-marxbot.c index 18069cb7d068..f449a97ae1a2 100644 --- a/arch/arm/mach-mx3/mx31moboard-marxbot.c +++ b/arch/arm/mach-mx3/mx31moboard-marxbot.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/types.h> | 23 | #include <linux/types.h> |
24 | #include <linux/fsl_devices.h> | ||
25 | 24 | ||
26 | #include <linux/usb/otg.h> | 25 | #include <linux/usb/otg.h> |
27 | 26 | ||
@@ -29,12 +28,11 @@ | |||
29 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
30 | #include <mach/imx-uart.h> | 29 | #include <mach/imx-uart.h> |
31 | #include <mach/iomux-mx3.h> | 30 | #include <mach/iomux-mx3.h> |
32 | #include <mach/mmc.h> | ||
33 | #include <mach/mxc_ehci.h> | ||
34 | #include <mach/ulpi.h> | 31 | #include <mach/ulpi.h> |
35 | 32 | ||
36 | #include <media/soc_camera.h> | 33 | #include <media/soc_camera.h> |
37 | 34 | ||
35 | #include "devices-imx31.h" | ||
38 | #include "devices.h" | 36 | #include "devices.h" |
39 | 37 | ||
40 | static unsigned int marxbot_pins[] = { | 38 | static unsigned int marxbot_pins[] = { |
@@ -116,7 +114,7 @@ static void marxbot_sdhc2_exit(struct device *dev, void *data) | |||
116 | gpio_free(SDHC2_CD); | 114 | gpio_free(SDHC2_CD); |
117 | } | 115 | } |
118 | 116 | ||
119 | static struct imxmmc_platform_data sdhc2_pdata = { | 117 | static const struct imxmmc_platform_data sdhc2_pdata __initconst = { |
120 | .get_ro = marxbot_sdhc2_get_ro, | 118 | .get_ro = marxbot_sdhc2_get_ro, |
121 | .init = marxbot_sdhc2_init, | 119 | .init = marxbot_sdhc2_init, |
122 | .exit = marxbot_sdhc2_exit, | 120 | .exit = marxbot_sdhc2_exit, |
@@ -302,7 +300,7 @@ static int marxbot_isp1105_set_vbus(struct otg_transceiver *otg, bool on) | |||
302 | return 0; | 300 | return 0; |
303 | } | 301 | } |
304 | 302 | ||
305 | static struct mxc_usbh_platform_data usbh1_pdata = { | 303 | static struct mxc_usbh_platform_data usbh1_pdata __initdata = { |
306 | .init = marxbot_usbh1_hw_init, | 304 | .init = marxbot_usbh1_hw_init, |
307 | .portsc = MXC_EHCI_MODE_UTMI | MXC_EHCI_SERIAL, | 305 | .portsc = MXC_EHCI_MODE_UTMI | MXC_EHCI_SERIAL, |
308 | .flags = MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_INTERFACE_SINGLE_UNI, | 306 | .flags = MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_INTERFACE_SINGLE_UNI, |
@@ -311,6 +309,7 @@ static struct mxc_usbh_platform_data usbh1_pdata = { | |||
311 | static int __init marxbot_usbh1_init(void) | 309 | static int __init marxbot_usbh1_init(void) |
312 | { | 310 | { |
313 | struct otg_transceiver *otg; | 311 | struct otg_transceiver *otg; |
312 | struct platform_device *pdev; | ||
314 | 313 | ||
315 | otg = kzalloc(sizeof(*otg), GFP_KERNEL); | 314 | otg = kzalloc(sizeof(*otg), GFP_KERNEL); |
316 | if (!otg) | 315 | if (!otg) |
@@ -322,10 +321,14 @@ static int __init marxbot_usbh1_init(void) | |||
322 | 321 | ||
323 | usbh1_pdata.otg = otg; | 322 | usbh1_pdata.otg = otg; |
324 | 323 | ||
325 | return mxc_register_device(&mxc_usbh1, &usbh1_pdata); | 324 | pdev = imx31_add_mxc_ehci_hs(1, &usbh1_pdata); |
325 | if (IS_ERR(pdev)) | ||
326 | return PTR_ERR(pdev); | ||
327 | |||
328 | return 0; | ||
326 | } | 329 | } |
327 | 330 | ||
328 | static struct fsl_usb2_platform_data usb_pdata = { | 331 | static const struct fsl_usb2_platform_data usb_pdata __initconst = { |
329 | .operating_mode = FSL_USB2_DR_DEVICE, | 332 | .operating_mode = FSL_USB2_DR_DEVICE, |
330 | .phy_mode = FSL_USB2_PHY_ULPI, | 333 | .phy_mode = FSL_USB2_PHY_ULPI, |
331 | }; | 334 | }; |
@@ -344,7 +347,7 @@ void __init mx31moboard_marxbot_init(void) | |||
344 | 347 | ||
345 | dspics_resets_init(); | 348 | dspics_resets_init(); |
346 | 349 | ||
347 | mxc_register_device(&mxcsdhc_device1, &sdhc2_pdata); | 350 | imx31_add_mxc_mmc(1, &sdhc2_pdata); |
348 | 351 | ||
349 | spi_register_board_info(marxbot_spi_board_info, | 352 | spi_register_board_info(marxbot_spi_board_info, |
350 | ARRAY_SIZE(marxbot_spi_board_info)); | 353 | ARRAY_SIZE(marxbot_spi_board_info)); |
@@ -357,7 +360,7 @@ void __init mx31moboard_marxbot_init(void) | |||
357 | gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_LCS0)); | 360 | gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_LCS0)); |
358 | gpio_export(IOMUX_TO_GPIO(MX31_PIN_LCS0), false); | 361 | gpio_export(IOMUX_TO_GPIO(MX31_PIN_LCS0), false); |
359 | 362 | ||
360 | mxc_register_device(&mxc_otg_udc_device, &usb_pdata); | 363 | imx31_add_fsl_usb2_udc(&usb_pdata); |
361 | 364 | ||
362 | marxbot_usbh1_init(); | 365 | marxbot_usbh1_init(); |
363 | } | 366 | } |
diff --git a/arch/arm/mach-mx3/mx31moboard-smartbot.c b/arch/arm/mach-mx3/mx31moboard-smartbot.c index 04760a53005a..bbec3c82264a 100644 --- a/arch/arm/mach-mx3/mx31moboard-smartbot.c +++ b/arch/arm/mach-mx3/mx31moboard-smartbot.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/i2c.h> | 19 | #include <linux/i2c.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/types.h> | 21 | #include <linux/types.h> |
22 | #include <linux/fsl_devices.h> | ||
23 | 22 | ||
24 | #include <linux/usb/otg.h> | 23 | #include <linux/usb/otg.h> |
25 | #include <linux/usb/ulpi.h> | 24 | #include <linux/usb/ulpi.h> |
@@ -28,7 +27,6 @@ | |||
28 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
29 | #include <mach/iomux-mx3.h> | 28 | #include <mach/iomux-mx3.h> |
30 | #include <mach/board-mx31moboard.h> | 29 | #include <mach/board-mx31moboard.h> |
31 | #include <mach/mxc_ehci.h> | ||
32 | #include <mach/ulpi.h> | 30 | #include <mach/ulpi.h> |
33 | 31 | ||
34 | #include <media/soc_camera.h> | 32 | #include <media/soc_camera.h> |
@@ -118,24 +116,30 @@ static int __init smartbot_cam_init(void) | |||
118 | return 0; | 116 | return 0; |
119 | } | 117 | } |
120 | 118 | ||
121 | static struct fsl_usb2_platform_data usb_pdata = { | 119 | static const struct fsl_usb2_platform_data usb_pdata __initconst = { |
122 | .operating_mode = FSL_USB2_DR_DEVICE, | 120 | .operating_mode = FSL_USB2_DR_DEVICE, |
123 | .phy_mode = FSL_USB2_PHY_ULPI, | 121 | .phy_mode = FSL_USB2_PHY_ULPI, |
124 | }; | 122 | }; |
125 | 123 | ||
126 | #if defined(CONFIG_USB_ULPI) | 124 | #if defined(CONFIG_USB_ULPI) |
127 | 125 | ||
128 | static struct mxc_usbh_platform_data otg_host_pdata = { | 126 | static struct mxc_usbh_platform_data otg_host_pdata __initdata = { |
129 | .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, | 127 | .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, |
130 | .flags = MXC_EHCI_POWER_PINS_ENABLED, | 128 | .flags = MXC_EHCI_POWER_PINS_ENABLED, |
131 | }; | 129 | }; |
132 | 130 | ||
133 | static int __init smartbot_otg_host_init(void) | 131 | static int __init smartbot_otg_host_init(void) |
134 | { | 132 | { |
133 | struct platform_device *pdev; | ||
134 | |||
135 | otg_host_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, | 135 | otg_host_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, |
136 | ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); | 136 | ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); |
137 | 137 | ||
138 | return mxc_register_device(&mxc_otg_host, &otg_host_pdata); | 138 | pdev = imx31_add_mxc_ehci_otg(&otg_host_pdata); |
139 | if (IS_ERR(pdev)) | ||
140 | return PTR_ERR(pdev); | ||
141 | |||
142 | return 0; | ||
139 | } | 143 | } |
140 | #else | 144 | #else |
141 | static inline int smartbot_otg_host_init(void) { return 0; } | 145 | static inline int smartbot_otg_host_init(void) { return 0; } |
@@ -182,7 +186,7 @@ void __init mx31moboard_smartbot_init(int board) | |||
182 | 186 | ||
183 | switch (board) { | 187 | switch (board) { |
184 | case MX31SMARTBOT: | 188 | case MX31SMARTBOT: |
185 | mxc_register_device(&mxc_otg_udc_device, &usb_pdata); | 189 | imx31_add_fsl_usb2_udc(&usb_pdata); |
186 | break; | 190 | break; |
187 | case MX31EYEBOT: | 191 | case MX31EYEBOT: |
188 | smartbot_otg_host_init(); | 192 | smartbot_otg_host_init(); |