diff options
107 files changed, 5738 insertions, 4595 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index e60ec54df334..c52f6909f65d 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -253,6 +253,14 @@ config ARCH_CLPS711X | |||
253 | help | 253 | help |
254 | Support for Cirrus Logic 711x/721x based boards. | 254 | Support for Cirrus Logic 711x/721x based boards. |
255 | 255 | ||
256 | config ARCH_GEMINI | ||
257 | bool "Cortina Systems Gemini" | ||
258 | select CPU_FA526 | ||
259 | select GENERIC_GPIO | ||
260 | select ARCH_REQUIRE_GPIOLIB | ||
261 | help | ||
262 | Support for the Cortina Systems Gemini family SoCs | ||
263 | |||
256 | config ARCH_EBSA110 | 264 | config ARCH_EBSA110 |
257 | bool "EBSA-110" | 265 | bool "EBSA-110" |
258 | select CPU_SA110 | 266 | select CPU_SA110 |
@@ -276,14 +284,6 @@ config ARCH_EP93XX | |||
276 | help | 284 | help |
277 | This enables support for the Cirrus EP93xx series of CPUs. | 285 | This enables support for the Cirrus EP93xx series of CPUs. |
278 | 286 | ||
279 | config ARCH_GEMINI | ||
280 | bool "Cortina Systems Gemini" | ||
281 | select CPU_FA526 | ||
282 | select GENERIC_GPIO | ||
283 | select ARCH_REQUIRE_GPIOLIB | ||
284 | help | ||
285 | Support for the Cortina Systems Gemini family SoCs | ||
286 | |||
287 | config ARCH_FOOTBRIDGE | 287 | config ARCH_FOOTBRIDGE |
288 | bool "FootBridge" | 288 | bool "FootBridge" |
289 | select CPU_SA110 | 289 | select CPU_SA110 |
@@ -292,6 +292,17 @@ config ARCH_FOOTBRIDGE | |||
292 | Support for systems based on the DC21285 companion chip | 292 | Support for systems based on the DC21285 companion chip |
293 | ("FootBridge"), such as the Simtec CATS and the Rebel NetWinder. | 293 | ("FootBridge"), such as the Simtec CATS and the Rebel NetWinder. |
294 | 294 | ||
295 | config ARCH_MXC | ||
296 | bool "Freescale MXC/iMX-based" | ||
297 | select GENERIC_TIME | ||
298 | select GENERIC_CLOCKEVENTS | ||
299 | select ARCH_MTD_XIP | ||
300 | select GENERIC_GPIO | ||
301 | select ARCH_REQUIRE_GPIOLIB | ||
302 | select HAVE_CLK | ||
303 | help | ||
304 | Support for Freescale MXC/iMX-based family of processors | ||
305 | |||
295 | config ARCH_NETX | 306 | config ARCH_NETX |
296 | bool "Hilscher NetX based" | 307 | bool "Hilscher NetX based" |
297 | select CPU_ARM926T | 308 | select CPU_ARM926T |
@@ -308,15 +319,6 @@ config ARCH_H720X | |||
308 | help | 319 | help |
309 | This enables support for systems based on the Hynix HMS720x | 320 | This enables support for systems based on the Hynix HMS720x |
310 | 321 | ||
311 | config ARCH_IMX | ||
312 | bool "IMX" | ||
313 | select CPU_ARM920T | ||
314 | select GENERIC_GPIO | ||
315 | select GENERIC_TIME | ||
316 | select GENERIC_CLOCKEVENTS | ||
317 | help | ||
318 | Support for Motorola's i.MX family of processors (MX1, MXL). | ||
319 | |||
320 | config ARCH_IOP13XX | 322 | config ARCH_IOP13XX |
321 | bool "IOP13xx-based" | 323 | bool "IOP13xx-based" |
322 | depends on MMU | 324 | depends on MMU |
@@ -404,28 +406,6 @@ config ARCH_KIRKWOOD | |||
404 | Support for the following Marvell Kirkwood series SoCs: | 406 | Support for the following Marvell Kirkwood series SoCs: |
405 | 88F6180, 88F6192 and 88F6281. | 407 | 88F6180, 88F6192 and 88F6281. |
406 | 408 | ||
407 | config ARCH_KS8695 | ||
408 | bool "Micrel/Kendin KS8695" | ||
409 | select CPU_ARM922T | ||
410 | select GENERIC_GPIO | ||
411 | select ARCH_REQUIRE_GPIOLIB | ||
412 | help | ||
413 | Support for Micrel/Kendin KS8695 "Centaur" (ARM922T) based | ||
414 | System-on-Chip devices. | ||
415 | |||
416 | config ARCH_NS9XXX | ||
417 | bool "NetSilicon NS9xxx" | ||
418 | select CPU_ARM926T | ||
419 | select GENERIC_GPIO | ||
420 | select GENERIC_TIME | ||
421 | select GENERIC_CLOCKEVENTS | ||
422 | select HAVE_CLK | ||
423 | help | ||
424 | Say Y here if you intend to run this kernel on a NetSilicon NS9xxx | ||
425 | System. | ||
426 | |||
427 | <http://www.digi.com/products/microprocessors/index.jsp> | ||
428 | |||
429 | config ARCH_LOKI | 409 | config ARCH_LOKI |
430 | bool "Marvell Loki (88RC8480)" | 410 | bool "Marvell Loki (88RC8480)" |
431 | select CPU_FEROCEON | 411 | select CPU_FEROCEON |
@@ -447,17 +427,6 @@ config ARCH_MV78XX0 | |||
447 | Support for the following Marvell MV78xx0 series SoCs: | 427 | Support for the following Marvell MV78xx0 series SoCs: |
448 | MV781x0, MV782x0. | 428 | MV781x0, MV782x0. |
449 | 429 | ||
450 | config ARCH_MXC | ||
451 | bool "Freescale MXC/iMX-based" | ||
452 | select GENERIC_TIME | ||
453 | select GENERIC_CLOCKEVENTS | ||
454 | select ARCH_MTD_XIP | ||
455 | select GENERIC_GPIO | ||
456 | select ARCH_REQUIRE_GPIOLIB | ||
457 | select HAVE_CLK | ||
458 | help | ||
459 | Support for Freescale MXC/iMX-based family of processors | ||
460 | |||
461 | config ARCH_ORION5X | 430 | config ARCH_ORION5X |
462 | bool "Marvell Orion" | 431 | bool "Marvell Orion" |
463 | depends on MMU | 432 | depends on MMU |
@@ -472,6 +441,49 @@ config ARCH_ORION5X | |||
472 | Orion-1 (5181), Orion-VoIP (5181L), Orion-NAS (5182), | 441 | Orion-1 (5181), Orion-VoIP (5181L), Orion-NAS (5182), |
473 | Orion-2 (5281), Orion-1-90 (6183). | 442 | Orion-2 (5281), Orion-1-90 (6183). |
474 | 443 | ||
444 | config ARCH_MMP | ||
445 | bool "Marvell PXA168/910" | ||
446 | depends on MMU | ||
447 | select GENERIC_GPIO | ||
448 | select ARCH_REQUIRE_GPIOLIB | ||
449 | select HAVE_CLK | ||
450 | select COMMON_CLKDEV | ||
451 | select GENERIC_TIME | ||
452 | select GENERIC_CLOCKEVENTS | ||
453 | select TICK_ONESHOT | ||
454 | select PLAT_PXA | ||
455 | help | ||
456 | Support for Marvell's PXA168/910 processor line. | ||
457 | |||
458 | config ARCH_KS8695 | ||
459 | bool "Micrel/Kendin KS8695" | ||
460 | select CPU_ARM922T | ||
461 | select GENERIC_GPIO | ||
462 | select ARCH_REQUIRE_GPIOLIB | ||
463 | help | ||
464 | Support for Micrel/Kendin KS8695 "Centaur" (ARM922T) based | ||
465 | System-on-Chip devices. | ||
466 | |||
467 | config ARCH_NS9XXX | ||
468 | bool "NetSilicon NS9xxx" | ||
469 | select CPU_ARM926T | ||
470 | select GENERIC_GPIO | ||
471 | select GENERIC_TIME | ||
472 | select GENERIC_CLOCKEVENTS | ||
473 | select HAVE_CLK | ||
474 | help | ||
475 | Say Y here if you intend to run this kernel on a NetSilicon NS9xxx | ||
476 | System. | ||
477 | |||
478 | <http://www.digi.com/products/microprocessors/index.jsp> | ||
479 | |||
480 | config ARCH_W90X900 | ||
481 | bool "Nuvoton W90X900 CPU" | ||
482 | select CPU_ARM926T | ||
483 | help | ||
484 | Support for Nuvoton (Winbond logic dept.) ARM9 processor,You | ||
485 | can login www.mcuos.com or www.nuvoton.com to know more. | ||
486 | |||
475 | config ARCH_PNX4008 | 487 | config ARCH_PNX4008 |
476 | bool "Philips Nexperia PNX4008 Mobile" | 488 | bool "Philips Nexperia PNX4008 Mobile" |
477 | select CPU_ARM926T | 489 | select CPU_ARM926T |
@@ -494,19 +506,16 @@ config ARCH_PXA | |||
494 | help | 506 | help |
495 | Support for Intel/Marvell's PXA2xx/PXA3xx processor line. | 507 | Support for Intel/Marvell's PXA2xx/PXA3xx processor line. |
496 | 508 | ||
497 | config ARCH_MMP | 509 | config ARCH_MSM |
498 | bool "Marvell PXA168/910" | 510 | bool "Qualcomm MSM" |
499 | depends on MMU | 511 | select CPU_V6 |
500 | select GENERIC_GPIO | ||
501 | select ARCH_REQUIRE_GPIOLIB | ||
502 | select HAVE_CLK | ||
503 | select COMMON_CLKDEV | ||
504 | select GENERIC_TIME | 512 | select GENERIC_TIME |
505 | select GENERIC_CLOCKEVENTS | 513 | select GENERIC_CLOCKEVENTS |
506 | select TICK_ONESHOT | ||
507 | select PLAT_PXA | ||
508 | help | 514 | help |
509 | Support for Marvell's PXA168/910 processor line. | 515 | Support for Qualcomm MSM7K based systems. This runs on the ARM11 |
516 | apps processor of the MSM7K and depends on a shared memory | ||
517 | interface to the ARM9 modem processor which runs the baseband stack | ||
518 | and controls some vital subsystems (clock and power control, etc). | ||
510 | 519 | ||
511 | config ARCH_RPC | 520 | config ARCH_RPC |
512 | bool "RiscPC" | 521 | bool "RiscPC" |
@@ -599,24 +608,6 @@ config ARCH_OMAP | |||
599 | help | 608 | help |
600 | Support for TI's OMAP platform (OMAP1 and OMAP2). | 609 | Support for TI's OMAP platform (OMAP1 and OMAP2). |
601 | 610 | ||
602 | config ARCH_MSM | ||
603 | bool "Qualcomm MSM" | ||
604 | select CPU_V6 | ||
605 | select GENERIC_TIME | ||
606 | select GENERIC_CLOCKEVENTS | ||
607 | help | ||
608 | Support for Qualcomm MSM7K based systems. This runs on the ARM11 | ||
609 | apps processor of the MSM7K and depends on a shared memory | ||
610 | interface to the ARM9 modem processor which runs the baseband stack | ||
611 | and controls some vital subsystems (clock and power control, etc). | ||
612 | |||
613 | config ARCH_W90X900 | ||
614 | bool "Nuvoton W90X900 CPU" | ||
615 | select CPU_ARM926T | ||
616 | help | ||
617 | Support for Nuvoton (Winbond logic dept.) ARM9 processor,You | ||
618 | can login www.mcuos.com or www.nuvoton.com to know more. | ||
619 | |||
620 | endchoice | 611 | endchoice |
621 | 612 | ||
622 | source "arch/arm/mach-clps711x/Kconfig" | 613 | source "arch/arm/mach-clps711x/Kconfig" |
@@ -682,8 +673,6 @@ endif | |||
682 | 673 | ||
683 | source "arch/arm/mach-lh7a40x/Kconfig" | 674 | source "arch/arm/mach-lh7a40x/Kconfig" |
684 | 675 | ||
685 | source "arch/arm/mach-imx/Kconfig" | ||
686 | |||
687 | source "arch/arm/mach-h720x/Kconfig" | 676 | source "arch/arm/mach-h720x/Kconfig" |
688 | 677 | ||
689 | source "arch/arm/mach-versatile/Kconfig" | 678 | source "arch/arm/mach-versatile/Kconfig" |
@@ -1022,7 +1011,7 @@ source "mm/Kconfig" | |||
1022 | config LEDS | 1011 | config LEDS |
1023 | bool "Timer and CPU usage LEDs" | 1012 | bool "Timer and CPU usage LEDs" |
1024 | depends on ARCH_CDB89712 || ARCH_EBSA110 || \ | 1013 | depends on ARCH_CDB89712 || ARCH_EBSA110 || \ |
1025 | ARCH_EBSA285 || ARCH_IMX || ARCH_INTEGRATOR || \ | 1014 | ARCH_EBSA285 || ARCH_INTEGRATOR || \ |
1026 | ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_NETWINDER || \ | 1015 | ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_NETWINDER || \ |
1027 | ARCH_OMAP || ARCH_P720T || ARCH_PXA_IDP || \ | 1016 | ARCH_OMAP || ARCH_P720T || ARCH_PXA_IDP || \ |
1028 | ARCH_SA1100 || ARCH_SHARK || ARCH_VERSATILE || \ | 1017 | ARCH_SA1100 || ARCH_SHARK || ARCH_VERSATILE || \ |
@@ -1188,7 +1177,7 @@ endmenu | |||
1188 | 1177 | ||
1189 | menu "CPU Power Management" | 1178 | menu "CPU Power Management" |
1190 | 1179 | ||
1191 | if (ARCH_SA1100 || ARCH_INTEGRATOR || ARCH_OMAP || ARCH_IMX || ARCH_PXA) | 1180 | if (ARCH_SA1100 || ARCH_INTEGRATOR || ARCH_OMAP || ARCH_PXA) |
1192 | 1181 | ||
1193 | source "drivers/cpufreq/Kconfig" | 1182 | source "drivers/cpufreq/Kconfig" |
1194 | 1183 | ||
@@ -1213,14 +1202,11 @@ config CPU_FREQ_INTEGRATOR | |||
1213 | 1202 | ||
1214 | If in doubt, say Y. | 1203 | If in doubt, say Y. |
1215 | 1204 | ||
1216 | config CPU_FREQ_IMX | 1205 | config CPU_FREQ_PXA |
1217 | tristate "CPUfreq driver for i.MX CPUs" | 1206 | bool |
1218 | depends on ARCH_IMX && CPU_FREQ | 1207 | depends on CPU_FREQ && ARCH_PXA && PXA25x |
1219 | default n | 1208 | default y |
1220 | help | 1209 | select CPU_FREQ_DEFAULT_GOV_USERSPACE |
1221 | This enables the CPUfreq driver for i.MX CPUs. | ||
1222 | |||
1223 | If in doubt, say N. | ||
1224 | 1210 | ||
1225 | endif | 1211 | endif |
1226 | 1212 | ||
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index e84729bf13d4..b6b9f6ee467b 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -99,64 +99,68 @@ CHECKFLAGS += -D__arm__ | |||
99 | #Default value | 99 | #Default value |
100 | head-y := arch/arm/kernel/head$(MMUEXT).o arch/arm/kernel/init_task.o | 100 | head-y := arch/arm/kernel/head$(MMUEXT).o arch/arm/kernel/init_task.o |
101 | textofs-y := 0x00008000 | 101 | textofs-y := 0x00008000 |
102 | 102 | textofs-$(CONFIG_ARCH_CLPS711X) := 0x00028000 | |
103 | machine-$(CONFIG_ARCH_RPC) := rpc | ||
104 | machine-$(CONFIG_ARCH_EBSA110) := ebsa110 | ||
105 | machine-$(CONFIG_FOOTBRIDGE) := footbridge | ||
106 | machine-$(CONFIG_ARCH_SHARK) := shark | ||
107 | machine-$(CONFIG_ARCH_SA1100) := sa1100 | ||
108 | ifeq ($(CONFIG_ARCH_SA1100),y) | ||
109 | # SA1111 DMA bug: we don't want the kernel to live in precious DMA-able memory | 103 | # SA1111 DMA bug: we don't want the kernel to live in precious DMA-able memory |
110 | textofs-$(CONFIG_SA1111) := 0x00208000 | 104 | ifeq ($(CONFIG_ARCH_SA1100),y) |
105 | textofs-$(CONFIG_SA1111) := 0x00208000 | ||
111 | endif | 106 | endif |
112 | machine-$(CONFIG_ARCH_PXA) := pxa | 107 | |
113 | machine-$(CONFIG_ARCH_MMP) := mmp | 108 | # Machine directory name. This list is sorted alphanumerically |
114 | plat-$(CONFIG_PLAT_PXA) := pxa | 109 | # by CONFIG_* macro name. |
115 | machine-$(CONFIG_ARCH_L7200) := l7200 | 110 | machine-$(CONFIG_ARCH_AAEC2000) := aaec2000 |
116 | machine-$(CONFIG_ARCH_INTEGRATOR) := integrator | 111 | machine-$(CONFIG_ARCH_AT91) := at91 |
117 | machine-$(CONFIG_ARCH_GEMINI) := gemini | 112 | machine-$(CONFIG_ARCH_CLPS711X) := clps711x |
118 | textofs-$(CONFIG_ARCH_CLPS711X) := 0x00028000 | 113 | machine-$(CONFIG_ARCH_DAVINCI) := davinci |
119 | machine-$(CONFIG_ARCH_CLPS711X) := clps711x | 114 | machine-$(CONFIG_ARCH_EBSA110) := ebsa110 |
120 | machine-$(CONFIG_ARCH_IOP32X) := iop32x | 115 | machine-$(CONFIG_ARCH_EP93XX) := ep93xx |
121 | machine-$(CONFIG_ARCH_IOP33X) := iop33x | 116 | machine-$(CONFIG_ARCH_GEMINI) := gemini |
122 | machine-$(CONFIG_ARCH_IOP13XX) := iop13xx | 117 | machine-$(CONFIG_ARCH_H720X) := h720x |
123 | plat-$(CONFIG_PLAT_IOP) := iop | 118 | machine-$(CONFIG_ARCH_INTEGRATOR) := integrator |
124 | machine-$(CONFIG_ARCH_IXP4XX) := ixp4xx | 119 | machine-$(CONFIG_ARCH_IOP13XX) := iop13xx |
125 | machine-$(CONFIG_ARCH_IXP2000) := ixp2000 | 120 | machine-$(CONFIG_ARCH_IOP32X) := iop32x |
126 | machine-$(CONFIG_ARCH_IXP23XX) := ixp23xx | 121 | machine-$(CONFIG_ARCH_IOP33X) := iop33x |
127 | machine-$(CONFIG_ARCH_OMAP1) := omap1 | 122 | machine-$(CONFIG_ARCH_IXP2000) := ixp2000 |
128 | machine-$(CONFIG_ARCH_OMAP2) := omap2 | 123 | machine-$(CONFIG_ARCH_IXP23XX) := ixp23xx |
129 | machine-$(CONFIG_ARCH_OMAP3) := omap2 | 124 | machine-$(CONFIG_ARCH_IXP4XX) := ixp4xx |
130 | plat-$(CONFIG_ARCH_OMAP) := omap | 125 | machine-$(CONFIG_ARCH_KIRKWOOD) := kirkwood |
131 | machine-$(CONFIG_ARCH_S3C2410) := s3c2410 s3c2400 s3c2412 s3c2440 s3c2442 s3c2443 | 126 | machine-$(CONFIG_ARCH_KS8695) := ks8695 |
132 | machine-$(CONFIG_ARCH_S3C24A0) := s3c24a0 | 127 | machine-$(CONFIG_ARCH_L7200) := l7200 |
133 | plat-$(CONFIG_PLAT_S3C24XX) := s3c24xx s3c | 128 | machine-$(CONFIG_ARCH_LH7A40X) := lh7a40x |
134 | machine-$(CONFIG_ARCH_S3C64XX) := s3c6400 s3c6410 | 129 | machine-$(CONFIG_ARCH_LOKI) := loki |
135 | plat-$(CONFIG_PLAT_S3C64XX) := s3c64xx s3c | 130 | machine-$(CONFIG_ARCH_MMP) := mmp |
136 | machine-$(CONFIG_ARCH_LH7A40X) := lh7a40x | 131 | machine-$(CONFIG_ARCH_MSM) := msm |
137 | machine-$(CONFIG_ARCH_VERSATILE) := versatile | 132 | machine-$(CONFIG_ARCH_MV78XX0) := mv78xx0 |
138 | machine-$(CONFIG_ARCH_IMX) := imx | 133 | machine-$(CONFIG_ARCH_MX1) := mx1 |
139 | machine-$(CONFIG_ARCH_H720X) := h720x | 134 | machine-$(CONFIG_ARCH_MX2) := mx2 |
140 | machine-$(CONFIG_ARCH_AAEC2000) := aaec2000 | 135 | machine-$(CONFIG_ARCH_MX3) := mx3 |
141 | machine-$(CONFIG_ARCH_REALVIEW) := realview | 136 | machine-$(CONFIG_ARCH_NETX) := netx |
142 | machine-$(CONFIG_ARCH_AT91) := at91 | 137 | machine-$(CONFIG_ARCH_NS9XXX) := ns9xxx |
143 | machine-$(CONFIG_ARCH_EP93XX) := ep93xx | 138 | machine-$(CONFIG_ARCH_OMAP1) := omap1 |
144 | machine-$(CONFIG_ARCH_PNX4008) := pnx4008 | 139 | machine-$(CONFIG_ARCH_OMAP2) := omap2 |
145 | machine-$(CONFIG_ARCH_NETX) := netx | 140 | machine-$(CONFIG_ARCH_OMAP3) := omap2 |
146 | machine-$(CONFIG_ARCH_NS9XXX) := ns9xxx | 141 | machine-$(CONFIG_ARCH_ORION5X) := orion5x |
147 | machine-$(CONFIG_ARCH_DAVINCI) := davinci | 142 | machine-$(CONFIG_ARCH_PNX4008) := pnx4008 |
148 | machine-$(CONFIG_ARCH_KIRKWOOD) := kirkwood | 143 | machine-$(CONFIG_ARCH_PXA) := pxa |
149 | machine-$(CONFIG_ARCH_KS8695) := ks8695 | 144 | machine-$(CONFIG_ARCH_REALVIEW) := realview |
150 | plat-$(CONFIG_ARCH_MXC) := mxc | 145 | machine-$(CONFIG_ARCH_RPC) := rpc |
151 | machine-$(CONFIG_ARCH_MX2) := mx2 | 146 | machine-$(CONFIG_ARCH_S3C2410) := s3c2410 s3c2400 s3c2412 s3c2440 s3c2442 s3c2443 |
152 | machine-$(CONFIG_ARCH_MX3) := mx3 | 147 | machine-$(CONFIG_ARCH_S3C24A0) := s3c24a0 |
153 | machine-$(CONFIG_ARCH_MX1) := mx1 | 148 | machine-$(CONFIG_ARCH_S3C64XX) := s3c6400 s3c6410 |
154 | machine-$(CONFIG_ARCH_ORION5X) := orion5x | 149 | machine-$(CONFIG_ARCH_SA1100) := sa1100 |
155 | plat-$(CONFIG_PLAT_ORION) := orion | 150 | machine-$(CONFIG_ARCH_SHARK) := shark |
156 | machine-$(CONFIG_ARCH_MSM) := msm | 151 | machine-$(CONFIG_ARCH_VERSATILE) := versatile |
157 | machine-$(CONFIG_ARCH_LOKI) := loki | 152 | machine-$(CONFIG_ARCH_W90X900) := w90x900 |
158 | machine-$(CONFIG_ARCH_MV78XX0) := mv78xx0 | 153 | machine-$(CONFIG_FOOTBRIDGE) := footbridge |
159 | machine-$(CONFIG_ARCH_W90X900) := w90x900 | 154 | |
155 | # Platform directory name. This list is sorted alphanumerically | ||
156 | # by CONFIG_* macro name. | ||
157 | plat-$(CONFIG_ARCH_MXC) := mxc | ||
158 | plat-$(CONFIG_ARCH_OMAP) := omap | ||
159 | plat-$(CONFIG_PLAT_IOP) := iop | ||
160 | plat-$(CONFIG_PLAT_ORION) := orion | ||
161 | plat-$(CONFIG_PLAT_PXA) := pxa | ||
162 | plat-$(CONFIG_PLAT_S3C24XX) := s3c24xx s3c | ||
163 | plat-$(CONFIG_PLAT_S3C64XX) := s3c64xx s3c | ||
160 | 164 | ||
161 | ifeq ($(CONFIG_ARCH_EBSA110),y) | 165 | ifeq ($(CONFIG_ARCH_EBSA110),y) |
162 | # This is what happens if you forget the IOCS16 line. | 166 | # This is what happens if you forget the IOCS16 line. |
diff --git a/arch/arm/configs/mx21_defconfig b/arch/arm/configs/mx21_defconfig new file mode 100644 index 000000000000..4b04290d8e81 --- /dev/null +++ b/arch/arm/configs/mx21_defconfig | |||
@@ -0,0 +1,1170 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.30-rc1 | ||
4 | # Tue Apr 14 16:58:09 2009 | ||
5 | # | ||
6 | CONFIG_ARM=y | ||
7 | CONFIG_HAVE_PWM=y | ||
8 | CONFIG_SYS_SUPPORTS_APM_EMULATION=y | ||
9 | CONFIG_GENERIC_GPIO=y | ||
10 | CONFIG_GENERIC_TIME=y | ||
11 | CONFIG_GENERIC_CLOCKEVENTS=y | ||
12 | CONFIG_MMU=y | ||
13 | # CONFIG_NO_IOPORT is not set | ||
14 | CONFIG_GENERIC_HARDIRQS=y | ||
15 | CONFIG_STACKTRACE_SUPPORT=y | ||
16 | CONFIG_HAVE_LATENCYTOP_SUPPORT=y | ||
17 | CONFIG_LOCKDEP_SUPPORT=y | ||
18 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
19 | CONFIG_HARDIRQS_SW_RESEND=y | ||
20 | CONFIG_GENERIC_IRQ_PROBE=y | ||
21 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
22 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | ||
23 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | ||
24 | CONFIG_GENERIC_HWEIGHT=y | ||
25 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
26 | CONFIG_ARCH_MTD_XIP=y | ||
27 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y | ||
28 | CONFIG_VECTORS_BASE=0xffff0000 | ||
29 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
30 | |||
31 | # | ||
32 | # General setup | ||
33 | # | ||
34 | CONFIG_EXPERIMENTAL=y | ||
35 | CONFIG_BROKEN_ON_SMP=y | ||
36 | CONFIG_LOCK_KERNEL=y | ||
37 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
38 | CONFIG_LOCALVERSION="" | ||
39 | CONFIG_LOCALVERSION_AUTO=y | ||
40 | # CONFIG_SWAP is not set | ||
41 | CONFIG_SYSVIPC=y | ||
42 | CONFIG_SYSVIPC_SYSCTL=y | ||
43 | # CONFIG_POSIX_MQUEUE is not set | ||
44 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
45 | # CONFIG_TASKSTATS is not set | ||
46 | # CONFIG_AUDIT is not set | ||
47 | |||
48 | # | ||
49 | # RCU Subsystem | ||
50 | # | ||
51 | CONFIG_CLASSIC_RCU=y | ||
52 | # CONFIG_TREE_RCU is not set | ||
53 | # CONFIG_PREEMPT_RCU is not set | ||
54 | # CONFIG_TREE_RCU_TRACE is not set | ||
55 | # CONFIG_PREEMPT_RCU_TRACE is not set | ||
56 | # CONFIG_IKCONFIG is not set | ||
57 | CONFIG_LOG_BUF_SHIFT=14 | ||
58 | # CONFIG_GROUP_SCHED is not set | ||
59 | # CONFIG_CGROUPS is not set | ||
60 | CONFIG_SYSFS_DEPRECATED=y | ||
61 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
62 | # CONFIG_RELAY is not set | ||
63 | # CONFIG_NAMESPACES is not set | ||
64 | # CONFIG_BLK_DEV_INITRD is not set | ||
65 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
66 | CONFIG_SYSCTL=y | ||
67 | CONFIG_ANON_INODES=y | ||
68 | CONFIG_EMBEDDED=y | ||
69 | CONFIG_UID16=y | ||
70 | CONFIG_SYSCTL_SYSCALL=y | ||
71 | CONFIG_KALLSYMS=y | ||
72 | CONFIG_KALLSYMS_EXTRA_PASS=y | ||
73 | CONFIG_HOTPLUG=y | ||
74 | CONFIG_PRINTK=y | ||
75 | CONFIG_BUG=y | ||
76 | CONFIG_ELF_CORE=y | ||
77 | CONFIG_BASE_FULL=y | ||
78 | CONFIG_FUTEX=y | ||
79 | CONFIG_EPOLL=y | ||
80 | CONFIG_SIGNALFD=y | ||
81 | CONFIG_TIMERFD=y | ||
82 | CONFIG_EVENTFD=y | ||
83 | CONFIG_SHMEM=y | ||
84 | CONFIG_AIO=y | ||
85 | CONFIG_VM_EVENT_COUNTERS=y | ||
86 | CONFIG_COMPAT_BRK=y | ||
87 | CONFIG_SLAB=y | ||
88 | # CONFIG_SLUB is not set | ||
89 | # CONFIG_SLOB is not set | ||
90 | # CONFIG_PROFILING is not set | ||
91 | # CONFIG_MARKERS is not set | ||
92 | CONFIG_HAVE_OPROFILE=y | ||
93 | # CONFIG_KPROBES is not set | ||
94 | CONFIG_HAVE_KPROBES=y | ||
95 | CONFIG_HAVE_KRETPROBES=y | ||
96 | # CONFIG_SLOW_WORK is not set | ||
97 | CONFIG_HAVE_GENERIC_DMA_COHERENT=y | ||
98 | CONFIG_SLABINFO=y | ||
99 | CONFIG_RT_MUTEXES=y | ||
100 | CONFIG_BASE_SMALL=0 | ||
101 | CONFIG_MODULES=y | ||
102 | # CONFIG_MODULE_FORCE_LOAD is not set | ||
103 | CONFIG_MODULE_UNLOAD=y | ||
104 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
105 | # CONFIG_MODVERSIONS is not set | ||
106 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
107 | CONFIG_BLOCK=y | ||
108 | # CONFIG_LBD is not set | ||
109 | # CONFIG_BLK_DEV_BSG is not set | ||
110 | # CONFIG_BLK_DEV_INTEGRITY is not set | ||
111 | |||
112 | # | ||
113 | # IO Schedulers | ||
114 | # | ||
115 | CONFIG_IOSCHED_NOOP=y | ||
116 | # CONFIG_IOSCHED_AS is not set | ||
117 | # CONFIG_IOSCHED_DEADLINE is not set | ||
118 | # CONFIG_IOSCHED_CFQ is not set | ||
119 | # CONFIG_DEFAULT_AS is not set | ||
120 | # CONFIG_DEFAULT_DEADLINE is not set | ||
121 | # CONFIG_DEFAULT_CFQ is not set | ||
122 | CONFIG_DEFAULT_NOOP=y | ||
123 | CONFIG_DEFAULT_IOSCHED="noop" | ||
124 | # CONFIG_FREEZER is not set | ||
125 | |||
126 | # | ||
127 | # System Type | ||
128 | # | ||
129 | # CONFIG_ARCH_AAEC2000 is not set | ||
130 | # CONFIG_ARCH_INTEGRATOR is not set | ||
131 | # CONFIG_ARCH_REALVIEW is not set | ||
132 | # CONFIG_ARCH_VERSATILE is not set | ||
133 | # CONFIG_ARCH_AT91 is not set | ||
134 | # CONFIG_ARCH_CLPS711X is not set | ||
135 | # CONFIG_ARCH_EBSA110 is not set | ||
136 | # CONFIG_ARCH_EP93XX is not set | ||
137 | # CONFIG_ARCH_GEMINI is not set | ||
138 | # CONFIG_ARCH_FOOTBRIDGE is not set | ||
139 | # CONFIG_ARCH_NETX is not set | ||
140 | # CONFIG_ARCH_H720X is not set | ||
141 | # CONFIG_ARCH_IOP13XX is not set | ||
142 | # CONFIG_ARCH_IOP32X is not set | ||
143 | # CONFIG_ARCH_IOP33X is not set | ||
144 | # CONFIG_ARCH_IXP23XX is not set | ||
145 | # CONFIG_ARCH_IXP2000 is not set | ||
146 | # CONFIG_ARCH_IXP4XX is not set | ||
147 | # CONFIG_ARCH_L7200 is not set | ||
148 | # CONFIG_ARCH_KIRKWOOD is not set | ||
149 | # CONFIG_ARCH_KS8695 is not set | ||
150 | # CONFIG_ARCH_NS9XXX is not set | ||
151 | # CONFIG_ARCH_LOKI is not set | ||
152 | # CONFIG_ARCH_MV78XX0 is not set | ||
153 | CONFIG_ARCH_MXC=y | ||
154 | # CONFIG_ARCH_ORION5X is not set | ||
155 | # CONFIG_ARCH_PNX4008 is not set | ||
156 | # CONFIG_ARCH_PXA is not set | ||
157 | # CONFIG_ARCH_MMP is not set | ||
158 | # CONFIG_ARCH_RPC is not set | ||
159 | # CONFIG_ARCH_SA1100 is not set | ||
160 | # CONFIG_ARCH_S3C2410 is not set | ||
161 | # CONFIG_ARCH_S3C64XX is not set | ||
162 | # CONFIG_ARCH_SHARK is not set | ||
163 | # CONFIG_ARCH_LH7A40X is not set | ||
164 | # CONFIG_ARCH_DAVINCI is not set | ||
165 | # CONFIG_ARCH_OMAP is not set | ||
166 | # CONFIG_ARCH_MSM is not set | ||
167 | # CONFIG_ARCH_W90X900 is not set | ||
168 | |||
169 | # | ||
170 | # Freescale MXC Implementations | ||
171 | # | ||
172 | # CONFIG_ARCH_MX1 is not set | ||
173 | CONFIG_ARCH_MX2=y | ||
174 | # CONFIG_ARCH_MX3 is not set | ||
175 | CONFIG_MACH_MX21=y | ||
176 | # CONFIG_MACH_MX27 is not set | ||
177 | |||
178 | # | ||
179 | # MX2 platforms: | ||
180 | # | ||
181 | CONFIG_MACH_MX21ADS=y | ||
182 | # CONFIG_MXC_IRQ_PRIOR is not set | ||
183 | CONFIG_MXC_PWM=y | ||
184 | |||
185 | # | ||
186 | # Processor Type | ||
187 | # | ||
188 | CONFIG_CPU_32=y | ||
189 | CONFIG_CPU_ARM926T=y | ||
190 | CONFIG_CPU_32v5=y | ||
191 | CONFIG_CPU_ABRT_EV5TJ=y | ||
192 | CONFIG_CPU_PABRT_NOIFAR=y | ||
193 | CONFIG_CPU_CACHE_VIVT=y | ||
194 | CONFIG_CPU_COPY_V4WB=y | ||
195 | CONFIG_CPU_TLB_V4WBI=y | ||
196 | CONFIG_CPU_CP15=y | ||
197 | CONFIG_CPU_CP15_MMU=y | ||
198 | |||
199 | # | ||
200 | # Processor Features | ||
201 | # | ||
202 | CONFIG_ARM_THUMB=y | ||
203 | # CONFIG_CPU_ICACHE_DISABLE is not set | ||
204 | # CONFIG_CPU_DCACHE_DISABLE is not set | ||
205 | # CONFIG_CPU_DCACHE_WRITETHROUGH is not set | ||
206 | # CONFIG_CPU_CACHE_ROUND_ROBIN is not set | ||
207 | # CONFIG_OUTER_CACHE is not set | ||
208 | CONFIG_COMMON_CLKDEV=y | ||
209 | |||
210 | # | ||
211 | # Bus support | ||
212 | # | ||
213 | # CONFIG_PCI_SYSCALL is not set | ||
214 | # CONFIG_ARCH_SUPPORTS_MSI is not set | ||
215 | # CONFIG_PCCARD is not set | ||
216 | |||
217 | # | ||
218 | # Kernel Features | ||
219 | # | ||
220 | CONFIG_TICK_ONESHOT=y | ||
221 | CONFIG_NO_HZ=y | ||
222 | CONFIG_HIGH_RES_TIMERS=y | ||
223 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
224 | CONFIG_VMSPLIT_3G=y | ||
225 | # CONFIG_VMSPLIT_2G is not set | ||
226 | # CONFIG_VMSPLIT_1G is not set | ||
227 | CONFIG_PAGE_OFFSET=0xC0000000 | ||
228 | CONFIG_PREEMPT=y | ||
229 | CONFIG_HZ=100 | ||
230 | CONFIG_AEABI=y | ||
231 | CONFIG_OABI_COMPAT=y | ||
232 | CONFIG_ARCH_FLATMEM_HAS_HOLES=y | ||
233 | # CONFIG_ARCH_SPARSEMEM_DEFAULT is not set | ||
234 | # CONFIG_ARCH_SELECT_MEMORY_MODEL is not set | ||
235 | # CONFIG_HIGHMEM is not set | ||
236 | CONFIG_SELECT_MEMORY_MODEL=y | ||
237 | CONFIG_FLATMEM_MANUAL=y | ||
238 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
239 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
240 | CONFIG_FLATMEM=y | ||
241 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
242 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
243 | CONFIG_SPLIT_PTLOCK_CPUS=4096 | ||
244 | # CONFIG_PHYS_ADDR_T_64BIT is not set | ||
245 | CONFIG_ZONE_DMA_FLAG=0 | ||
246 | CONFIG_VIRT_TO_BUS=y | ||
247 | CONFIG_UNEVICTABLE_LRU=y | ||
248 | CONFIG_HAVE_MLOCK=y | ||
249 | CONFIG_HAVE_MLOCKED_PAGE_BIT=y | ||
250 | CONFIG_ALIGNMENT_TRAP=y | ||
251 | |||
252 | # | ||
253 | # Boot options | ||
254 | # | ||
255 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
256 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
257 | CONFIG_CMDLINE="" | ||
258 | # CONFIG_XIP_KERNEL is not set | ||
259 | # CONFIG_KEXEC is not set | ||
260 | |||
261 | # | ||
262 | # CPU Power Management | ||
263 | # | ||
264 | # CONFIG_CPU_IDLE is not set | ||
265 | |||
266 | # | ||
267 | # Floating point emulation | ||
268 | # | ||
269 | |||
270 | # | ||
271 | # At least one emulation must be selected | ||
272 | # | ||
273 | # CONFIG_FPE_NWFPE is not set | ||
274 | # CONFIG_FPE_FASTFPE is not set | ||
275 | # CONFIG_VFP is not set | ||
276 | |||
277 | # | ||
278 | # Userspace binary formats | ||
279 | # | ||
280 | CONFIG_BINFMT_ELF=y | ||
281 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | ||
282 | CONFIG_HAVE_AOUT=y | ||
283 | # CONFIG_BINFMT_AOUT is not set | ||
284 | # CONFIG_BINFMT_MISC is not set | ||
285 | |||
286 | # | ||
287 | # Power management options | ||
288 | # | ||
289 | # CONFIG_PM is not set | ||
290 | CONFIG_ARCH_SUSPEND_POSSIBLE=y | ||
291 | CONFIG_NET=y | ||
292 | |||
293 | # | ||
294 | # Networking options | ||
295 | # | ||
296 | # CONFIG_PACKET is not set | ||
297 | # CONFIG_UNIX is not set | ||
298 | CONFIG_XFRM=y | ||
299 | # CONFIG_XFRM_USER is not set | ||
300 | # CONFIG_XFRM_SUB_POLICY is not set | ||
301 | # CONFIG_XFRM_MIGRATE is not set | ||
302 | # CONFIG_XFRM_STATISTICS is not set | ||
303 | # CONFIG_NET_KEY is not set | ||
304 | CONFIG_INET=y | ||
305 | # CONFIG_IP_MULTICAST is not set | ||
306 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
307 | CONFIG_IP_FIB_HASH=y | ||
308 | CONFIG_IP_PNP=y | ||
309 | CONFIG_IP_PNP_DHCP=y | ||
310 | CONFIG_IP_PNP_BOOTP=y | ||
311 | # CONFIG_IP_PNP_RARP is not set | ||
312 | # CONFIG_NET_IPIP is not set | ||
313 | # CONFIG_NET_IPGRE is not set | ||
314 | # CONFIG_ARPD is not set | ||
315 | # CONFIG_SYN_COOKIES is not set | ||
316 | # CONFIG_INET_AH is not set | ||
317 | # CONFIG_INET_ESP is not set | ||
318 | # CONFIG_INET_IPCOMP is not set | ||
319 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
320 | # CONFIG_INET_TUNNEL is not set | ||
321 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | ||
322 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
323 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
324 | # CONFIG_INET_LRO is not set | ||
325 | # CONFIG_INET_DIAG is not set | ||
326 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
327 | CONFIG_TCP_CONG_CUBIC=y | ||
328 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
329 | # CONFIG_TCP_MD5SIG is not set | ||
330 | # CONFIG_IPV6 is not set | ||
331 | # CONFIG_NETWORK_SECMARK is not set | ||
332 | # CONFIG_NETFILTER is not set | ||
333 | # CONFIG_IP_DCCP is not set | ||
334 | # CONFIG_IP_SCTP is not set | ||
335 | # CONFIG_TIPC is not set | ||
336 | # CONFIG_ATM is not set | ||
337 | # CONFIG_BRIDGE is not set | ||
338 | # CONFIG_NET_DSA is not set | ||
339 | # CONFIG_VLAN_8021Q is not set | ||
340 | # CONFIG_DECNET is not set | ||
341 | # CONFIG_LLC2 is not set | ||
342 | # CONFIG_IPX is not set | ||
343 | # CONFIG_ATALK is not set | ||
344 | # CONFIG_X25 is not set | ||
345 | # CONFIG_LAPB is not set | ||
346 | # CONFIG_ECONET is not set | ||
347 | # CONFIG_WAN_ROUTER is not set | ||
348 | # CONFIG_PHONET is not set | ||
349 | # CONFIG_NET_SCHED is not set | ||
350 | # CONFIG_DCB is not set | ||
351 | |||
352 | # | ||
353 | # Network testing | ||
354 | # | ||
355 | # CONFIG_NET_PKTGEN is not set | ||
356 | # CONFIG_HAMRADIO is not set | ||
357 | # CONFIG_CAN is not set | ||
358 | # CONFIG_IRDA is not set | ||
359 | # CONFIG_BT is not set | ||
360 | # CONFIG_AF_RXRPC is not set | ||
361 | CONFIG_WIRELESS=y | ||
362 | # CONFIG_CFG80211 is not set | ||
363 | # CONFIG_WIRELESS_OLD_REGULATORY is not set | ||
364 | # CONFIG_WIRELESS_EXT is not set | ||
365 | # CONFIG_LIB80211 is not set | ||
366 | # CONFIG_MAC80211 is not set | ||
367 | # CONFIG_WIMAX is not set | ||
368 | # CONFIG_RFKILL is not set | ||
369 | # CONFIG_NET_9P is not set | ||
370 | |||
371 | # | ||
372 | # Device Drivers | ||
373 | # | ||
374 | |||
375 | # | ||
376 | # Generic Driver Options | ||
377 | # | ||
378 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
379 | CONFIG_STANDALONE=y | ||
380 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
381 | # CONFIG_FW_LOADER is not set | ||
382 | # CONFIG_SYS_HYPERVISOR is not set | ||
383 | # CONFIG_CONNECTOR is not set | ||
384 | CONFIG_MTD=y | ||
385 | CONFIG_MTD_DEBUG=y | ||
386 | CONFIG_MTD_DEBUG_VERBOSE=3 | ||
387 | # CONFIG_MTD_CONCAT is not set | ||
388 | CONFIG_MTD_PARTITIONS=y | ||
389 | # CONFIG_MTD_TESTS is not set | ||
390 | CONFIG_MTD_REDBOOT_PARTS=y | ||
391 | CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 | ||
392 | # CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set | ||
393 | # CONFIG_MTD_REDBOOT_PARTS_READONLY is not set | ||
394 | CONFIG_MTD_CMDLINE_PARTS=y | ||
395 | # CONFIG_MTD_AFS_PARTS is not set | ||
396 | # CONFIG_MTD_AR7_PARTS is not set | ||
397 | |||
398 | # | ||
399 | # User Modules And Translation Layers | ||
400 | # | ||
401 | CONFIG_MTD_CHAR=y | ||
402 | CONFIG_MTD_BLKDEVS=y | ||
403 | CONFIG_MTD_BLOCK=y | ||
404 | # CONFIG_FTL is not set | ||
405 | # CONFIG_NFTL is not set | ||
406 | # CONFIG_INFTL is not set | ||
407 | # CONFIG_RFD_FTL is not set | ||
408 | # CONFIG_SSFDC is not set | ||
409 | # CONFIG_MTD_OOPS is not set | ||
410 | |||
411 | # | ||
412 | # RAM/ROM/Flash chip drivers | ||
413 | # | ||
414 | CONFIG_MTD_CFI=y | ||
415 | # CONFIG_MTD_JEDECPROBE is not set | ||
416 | CONFIG_MTD_GEN_PROBE=y | ||
417 | CONFIG_MTD_CFI_ADV_OPTIONS=y | ||
418 | CONFIG_MTD_CFI_NOSWAP=y | ||
419 | # CONFIG_MTD_CFI_BE_BYTE_SWAP is not set | ||
420 | # CONFIG_MTD_CFI_LE_BYTE_SWAP is not set | ||
421 | CONFIG_MTD_CFI_GEOMETRY=y | ||
422 | # CONFIG_MTD_MAP_BANK_WIDTH_1 is not set | ||
423 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
424 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
425 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
426 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
427 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
428 | CONFIG_MTD_CFI_I1=y | ||
429 | CONFIG_MTD_CFI_I2=y | ||
430 | # CONFIG_MTD_CFI_I4 is not set | ||
431 | # CONFIG_MTD_CFI_I8 is not set | ||
432 | # CONFIG_MTD_OTP is not set | ||
433 | # CONFIG_MTD_CFI_INTELEXT is not set | ||
434 | CONFIG_MTD_CFI_AMDSTD=y | ||
435 | # CONFIG_MTD_CFI_STAA is not set | ||
436 | CONFIG_MTD_CFI_UTIL=y | ||
437 | # CONFIG_MTD_RAM is not set | ||
438 | # CONFIG_MTD_ROM is not set | ||
439 | # CONFIG_MTD_ABSENT is not set | ||
440 | # CONFIG_MTD_XIP is not set | ||
441 | |||
442 | # | ||
443 | # Mapping drivers for chip access | ||
444 | # | ||
445 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
446 | CONFIG_MTD_PHYSMAP=y | ||
447 | # CONFIG_MTD_PHYSMAP_COMPAT is not set | ||
448 | # CONFIG_MTD_ARM_INTEGRATOR is not set | ||
449 | # CONFIG_MTD_PLATRAM is not set | ||
450 | |||
451 | # | ||
452 | # Self-contained MTD device drivers | ||
453 | # | ||
454 | # CONFIG_MTD_DATAFLASH is not set | ||
455 | # CONFIG_MTD_M25P80 is not set | ||
456 | # CONFIG_MTD_SLRAM is not set | ||
457 | # CONFIG_MTD_PHRAM is not set | ||
458 | # CONFIG_MTD_MTDRAM is not set | ||
459 | # CONFIG_MTD_BLOCK2MTD is not set | ||
460 | |||
461 | # | ||
462 | # Disk-On-Chip Device Drivers | ||
463 | # | ||
464 | # CONFIG_MTD_DOC2000 is not set | ||
465 | # CONFIG_MTD_DOC2001 is not set | ||
466 | # CONFIG_MTD_DOC2001PLUS is not set | ||
467 | CONFIG_MTD_NAND=y | ||
468 | # CONFIG_MTD_NAND_VERIFY_WRITE is not set | ||
469 | # CONFIG_MTD_NAND_ECC_SMC is not set | ||
470 | # CONFIG_MTD_NAND_MUSEUM_IDS is not set | ||
471 | # CONFIG_MTD_NAND_GPIO is not set | ||
472 | CONFIG_MTD_NAND_IDS=y | ||
473 | # CONFIG_MTD_NAND_DISKONCHIP is not set | ||
474 | # CONFIG_MTD_NAND_NANDSIM is not set | ||
475 | # CONFIG_MTD_NAND_PLATFORM is not set | ||
476 | CONFIG_MTD_NAND_MXC=y | ||
477 | # CONFIG_MTD_ONENAND is not set | ||
478 | |||
479 | # | ||
480 | # LPDDR flash memory drivers | ||
481 | # | ||
482 | # CONFIG_MTD_LPDDR is not set | ||
483 | |||
484 | # | ||
485 | # UBI - Unsorted block images | ||
486 | # | ||
487 | # CONFIG_MTD_UBI is not set | ||
488 | # CONFIG_PARPORT is not set | ||
489 | CONFIG_BLK_DEV=y | ||
490 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
491 | # CONFIG_BLK_DEV_LOOP is not set | ||
492 | # CONFIG_BLK_DEV_NBD is not set | ||
493 | # CONFIG_BLK_DEV_RAM is not set | ||
494 | # CONFIG_CDROM_PKTCDVD is not set | ||
495 | # CONFIG_ATA_OVER_ETH is not set | ||
496 | CONFIG_MISC_DEVICES=y | ||
497 | # CONFIG_ICS932S401 is not set | ||
498 | # CONFIG_ENCLOSURE_SERVICES is not set | ||
499 | # CONFIG_ISL29003 is not set | ||
500 | # CONFIG_C2PORT is not set | ||
501 | |||
502 | # | ||
503 | # EEPROM support | ||
504 | # | ||
505 | # CONFIG_EEPROM_AT24 is not set | ||
506 | # CONFIG_EEPROM_AT25 is not set | ||
507 | # CONFIG_EEPROM_LEGACY is not set | ||
508 | # CONFIG_EEPROM_93CX6 is not set | ||
509 | CONFIG_HAVE_IDE=y | ||
510 | # CONFIG_IDE is not set | ||
511 | |||
512 | # | ||
513 | # SCSI device support | ||
514 | # | ||
515 | # CONFIG_RAID_ATTRS is not set | ||
516 | # CONFIG_SCSI is not set | ||
517 | # CONFIG_SCSI_DMA is not set | ||
518 | # CONFIG_SCSI_NETLINK is not set | ||
519 | # CONFIG_ATA is not set | ||
520 | # CONFIG_MD is not set | ||
521 | CONFIG_NETDEVICES=y | ||
522 | CONFIG_COMPAT_NET_DEV_OPS=y | ||
523 | # CONFIG_DUMMY is not set | ||
524 | # CONFIG_BONDING is not set | ||
525 | # CONFIG_MACVLAN is not set | ||
526 | # CONFIG_EQUALIZER is not set | ||
527 | # CONFIG_TUN is not set | ||
528 | # CONFIG_VETH is not set | ||
529 | # CONFIG_PHYLIB is not set | ||
530 | CONFIG_NET_ETHERNET=y | ||
531 | CONFIG_MII=y | ||
532 | # CONFIG_AX88796 is not set | ||
533 | # CONFIG_SMC91X is not set | ||
534 | # CONFIG_DM9000 is not set | ||
535 | # CONFIG_ENC28J60 is not set | ||
536 | # CONFIG_ETHOC is not set | ||
537 | # CONFIG_SMC911X is not set | ||
538 | # CONFIG_SMSC911X is not set | ||
539 | # CONFIG_DNET is not set | ||
540 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | ||
541 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | ||
542 | # CONFIG_IBM_NEW_EMAC_TAH is not set | ||
543 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | ||
544 | # CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set | ||
545 | # CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set | ||
546 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set | ||
547 | # CONFIG_B44 is not set | ||
548 | CONFIG_CS89x0=y | ||
549 | CONFIG_CS89x0_NONISA_IRQ=y | ||
550 | # CONFIG_NETDEV_1000 is not set | ||
551 | # CONFIG_NETDEV_10000 is not set | ||
552 | |||
553 | # | ||
554 | # Wireless LAN | ||
555 | # | ||
556 | # CONFIG_WLAN_PRE80211 is not set | ||
557 | # CONFIG_WLAN_80211 is not set | ||
558 | |||
559 | # | ||
560 | # Enable WiMAX (Networking options) to see the WiMAX drivers | ||
561 | # | ||
562 | # CONFIG_WAN is not set | ||
563 | # CONFIG_PPP is not set | ||
564 | # CONFIG_SLIP is not set | ||
565 | # CONFIG_NETCONSOLE is not set | ||
566 | # CONFIG_NETPOLL is not set | ||
567 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
568 | # CONFIG_ISDN is not set | ||
569 | |||
570 | # | ||
571 | # Input device support | ||
572 | # | ||
573 | CONFIG_INPUT=y | ||
574 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
575 | # CONFIG_INPUT_POLLDEV is not set | ||
576 | |||
577 | # | ||
578 | # Userland interfaces | ||
579 | # | ||
580 | # CONFIG_INPUT_MOUSEDEV is not set | ||
581 | # CONFIG_INPUT_JOYDEV is not set | ||
582 | CONFIG_INPUT_EVDEV=y | ||
583 | # CONFIG_INPUT_EVBUG is not set | ||
584 | |||
585 | # | ||
586 | # Input Device Drivers | ||
587 | # | ||
588 | # CONFIG_INPUT_KEYBOARD is not set | ||
589 | # CONFIG_INPUT_MOUSE is not set | ||
590 | # CONFIG_INPUT_JOYSTICK is not set | ||
591 | # CONFIG_INPUT_TABLET is not set | ||
592 | CONFIG_INPUT_TOUCHSCREEN=y | ||
593 | # CONFIG_TOUCHSCREEN_ADS7846 is not set | ||
594 | # CONFIG_TOUCHSCREEN_FUJITSU is not set | ||
595 | # CONFIG_TOUCHSCREEN_GUNZE is not set | ||
596 | # CONFIG_TOUCHSCREEN_ELO is not set | ||
597 | # CONFIG_TOUCHSCREEN_WACOM_W8001 is not set | ||
598 | # CONFIG_TOUCHSCREEN_MTOUCH is not set | ||
599 | # CONFIG_TOUCHSCREEN_INEXIO is not set | ||
600 | # CONFIG_TOUCHSCREEN_MK712 is not set | ||
601 | # CONFIG_TOUCHSCREEN_PENMOUNT is not set | ||
602 | # CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set | ||
603 | # CONFIG_TOUCHSCREEN_TOUCHWIN is not set | ||
604 | # CONFIG_TOUCHSCREEN_TOUCHIT213 is not set | ||
605 | # CONFIG_TOUCHSCREEN_TSC2007 is not set | ||
606 | # CONFIG_INPUT_MISC is not set | ||
607 | |||
608 | # | ||
609 | # Hardware I/O ports | ||
610 | # | ||
611 | # CONFIG_SERIO is not set | ||
612 | # CONFIG_GAMEPORT is not set | ||
613 | |||
614 | # | ||
615 | # Character devices | ||
616 | # | ||
617 | CONFIG_VT=y | ||
618 | # CONFIG_CONSOLE_TRANSLATIONS is not set | ||
619 | CONFIG_VT_CONSOLE=y | ||
620 | CONFIG_HW_CONSOLE=y | ||
621 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | ||
622 | CONFIG_DEVKMEM=y | ||
623 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
624 | |||
625 | # | ||
626 | # Serial drivers | ||
627 | # | ||
628 | CONFIG_SERIAL_8250=y | ||
629 | CONFIG_SERIAL_8250_CONSOLE=y | ||
630 | CONFIG_SERIAL_8250_NR_UARTS=1 | ||
631 | CONFIG_SERIAL_8250_RUNTIME_UARTS=1 | ||
632 | # CONFIG_SERIAL_8250_EXTENDED is not set | ||
633 | |||
634 | # | ||
635 | # Non-8250 serial port support | ||
636 | # | ||
637 | # CONFIG_SERIAL_MAX3100 is not set | ||
638 | CONFIG_SERIAL_IMX=y | ||
639 | CONFIG_SERIAL_IMX_CONSOLE=y | ||
640 | CONFIG_SERIAL_CORE=y | ||
641 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
642 | CONFIG_UNIX98_PTYS=y | ||
643 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set | ||
644 | # CONFIG_LEGACY_PTYS is not set | ||
645 | # CONFIG_IPMI_HANDLER is not set | ||
646 | # CONFIG_HW_RANDOM is not set | ||
647 | # CONFIG_R3964 is not set | ||
648 | # CONFIG_RAW_DRIVER is not set | ||
649 | # CONFIG_TCG_TPM is not set | ||
650 | CONFIG_I2C=y | ||
651 | CONFIG_I2C_BOARDINFO=y | ||
652 | CONFIG_I2C_CHARDEV=y | ||
653 | CONFIG_I2C_HELPER_AUTO=y | ||
654 | |||
655 | # | ||
656 | # I2C Hardware Bus support | ||
657 | # | ||
658 | |||
659 | # | ||
660 | # I2C system bus drivers (mostly embedded / system-on-chip) | ||
661 | # | ||
662 | # CONFIG_I2C_GPIO is not set | ||
663 | CONFIG_I2C_IMX=y | ||
664 | # CONFIG_I2C_OCORES is not set | ||
665 | # CONFIG_I2C_SIMTEC is not set | ||
666 | |||
667 | # | ||
668 | # External I2C/SMBus adapter drivers | ||
669 | # | ||
670 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
671 | # CONFIG_I2C_TAOS_EVM is not set | ||
672 | |||
673 | # | ||
674 | # Other I2C/SMBus bus drivers | ||
675 | # | ||
676 | # CONFIG_I2C_PCA_PLATFORM is not set | ||
677 | # CONFIG_I2C_STUB is not set | ||
678 | |||
679 | # | ||
680 | # Miscellaneous I2C Chip support | ||
681 | # | ||
682 | # CONFIG_DS1682 is not set | ||
683 | # CONFIG_SENSORS_PCF8574 is not set | ||
684 | # CONFIG_PCF8575 is not set | ||
685 | # CONFIG_SENSORS_PCA9539 is not set | ||
686 | # CONFIG_SENSORS_MAX6875 is not set | ||
687 | # CONFIG_SENSORS_TSL2550 is not set | ||
688 | # CONFIG_I2C_DEBUG_CORE is not set | ||
689 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
690 | # CONFIG_I2C_DEBUG_BUS is not set | ||
691 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
692 | CONFIG_SPI=y | ||
693 | CONFIG_SPI_MASTER=y | ||
694 | |||
695 | # | ||
696 | # SPI Master Controller Drivers | ||
697 | # | ||
698 | # CONFIG_SPI_BITBANG is not set | ||
699 | # CONFIG_SPI_GPIO is not set | ||
700 | |||
701 | # | ||
702 | # SPI Protocol Masters | ||
703 | # | ||
704 | # CONFIG_SPI_SPIDEV is not set | ||
705 | # CONFIG_SPI_TLE62X0 is not set | ||
706 | CONFIG_ARCH_REQUIRE_GPIOLIB=y | ||
707 | CONFIG_GPIOLIB=y | ||
708 | # CONFIG_GPIO_SYSFS is not set | ||
709 | |||
710 | # | ||
711 | # Memory mapped GPIO expanders: | ||
712 | # | ||
713 | |||
714 | # | ||
715 | # I2C GPIO expanders: | ||
716 | # | ||
717 | # CONFIG_GPIO_MAX732X is not set | ||
718 | # CONFIG_GPIO_PCA953X is not set | ||
719 | # CONFIG_GPIO_PCF857X is not set | ||
720 | |||
721 | # | ||
722 | # PCI GPIO expanders: | ||
723 | # | ||
724 | |||
725 | # | ||
726 | # SPI GPIO expanders: | ||
727 | # | ||
728 | # CONFIG_GPIO_MAX7301 is not set | ||
729 | # CONFIG_GPIO_MCP23S08 is not set | ||
730 | # CONFIG_W1 is not set | ||
731 | # CONFIG_POWER_SUPPLY is not set | ||
732 | # CONFIG_HWMON is not set | ||
733 | # CONFIG_THERMAL is not set | ||
734 | # CONFIG_THERMAL_HWMON is not set | ||
735 | # CONFIG_WATCHDOG is not set | ||
736 | CONFIG_SSB_POSSIBLE=y | ||
737 | |||
738 | # | ||
739 | # Sonics Silicon Backplane | ||
740 | # | ||
741 | # CONFIG_SSB is not set | ||
742 | |||
743 | # | ||
744 | # Multifunction device drivers | ||
745 | # | ||
746 | # CONFIG_MFD_CORE is not set | ||
747 | # CONFIG_MFD_SM501 is not set | ||
748 | # CONFIG_MFD_ASIC3 is not set | ||
749 | # CONFIG_HTC_EGPIO is not set | ||
750 | # CONFIG_HTC_PASIC3 is not set | ||
751 | # CONFIG_TPS65010 is not set | ||
752 | # CONFIG_TWL4030_CORE is not set | ||
753 | # CONFIG_MFD_TMIO is not set | ||
754 | # CONFIG_MFD_TC6393XB is not set | ||
755 | # CONFIG_PMIC_DA903X is not set | ||
756 | # CONFIG_MFD_WM8400 is not set | ||
757 | # CONFIG_MFD_WM8350_I2C is not set | ||
758 | # CONFIG_MFD_PCF50633 is not set | ||
759 | |||
760 | # | ||
761 | # Multimedia devices | ||
762 | # | ||
763 | |||
764 | # | ||
765 | # Multimedia core support | ||
766 | # | ||
767 | # CONFIG_VIDEO_DEV is not set | ||
768 | # CONFIG_DVB_CORE is not set | ||
769 | # CONFIG_VIDEO_MEDIA is not set | ||
770 | |||
771 | # | ||
772 | # Multimedia drivers | ||
773 | # | ||
774 | # CONFIG_DAB is not set | ||
775 | |||
776 | # | ||
777 | # Graphics support | ||
778 | # | ||
779 | # CONFIG_VGASTATE is not set | ||
780 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
781 | CONFIG_FB=y | ||
782 | # CONFIG_FIRMWARE_EDID is not set | ||
783 | # CONFIG_FB_DDC is not set | ||
784 | # CONFIG_FB_BOOT_VESA_SUPPORT is not set | ||
785 | CONFIG_FB_CFB_FILLRECT=y | ||
786 | CONFIG_FB_CFB_COPYAREA=y | ||
787 | CONFIG_FB_CFB_IMAGEBLIT=y | ||
788 | # CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set | ||
789 | # CONFIG_FB_SYS_FILLRECT is not set | ||
790 | # CONFIG_FB_SYS_COPYAREA is not set | ||
791 | # CONFIG_FB_SYS_IMAGEBLIT is not set | ||
792 | # CONFIG_FB_FOREIGN_ENDIAN is not set | ||
793 | # CONFIG_FB_SYS_FOPS is not set | ||
794 | # CONFIG_FB_SVGALIB is not set | ||
795 | # CONFIG_FB_MACMODES is not set | ||
796 | # CONFIG_FB_BACKLIGHT is not set | ||
797 | # CONFIG_FB_MODE_HELPERS is not set | ||
798 | # CONFIG_FB_TILEBLITTING is not set | ||
799 | |||
800 | # | ||
801 | # Frame buffer hardware drivers | ||
802 | # | ||
803 | CONFIG_FB_IMX=y | ||
804 | # CONFIG_FB_S1D13XXX is not set | ||
805 | # CONFIG_FB_VIRTUAL is not set | ||
806 | # CONFIG_FB_METRONOME is not set | ||
807 | # CONFIG_FB_MB862XX is not set | ||
808 | # CONFIG_FB_BROADSHEET is not set | ||
809 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
810 | |||
811 | # | ||
812 | # Display device support | ||
813 | # | ||
814 | # CONFIG_DISPLAY_SUPPORT is not set | ||
815 | |||
816 | # | ||
817 | # Console display driver support | ||
818 | # | ||
819 | # CONFIG_VGA_CONSOLE is not set | ||
820 | CONFIG_DUMMY_CONSOLE=y | ||
821 | CONFIG_FRAMEBUFFER_CONSOLE=y | ||
822 | # CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set | ||
823 | # CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set | ||
824 | CONFIG_FONTS=y | ||
825 | CONFIG_FONT_8x8=y | ||
826 | # CONFIG_FONT_8x16 is not set | ||
827 | # CONFIG_FONT_6x11 is not set | ||
828 | # CONFIG_FONT_7x14 is not set | ||
829 | # CONFIG_FONT_PEARL_8x8 is not set | ||
830 | # CONFIG_FONT_ACORN_8x8 is not set | ||
831 | # CONFIG_FONT_MINI_4x6 is not set | ||
832 | # CONFIG_FONT_SUN8x16 is not set | ||
833 | # CONFIG_FONT_SUN12x22 is not set | ||
834 | # CONFIG_FONT_10x18 is not set | ||
835 | CONFIG_LOGO=y | ||
836 | CONFIG_LOGO_LINUX_MONO=y | ||
837 | CONFIG_LOGO_LINUX_VGA16=y | ||
838 | CONFIG_LOGO_LINUX_CLUT224=y | ||
839 | # CONFIG_SOUND is not set | ||
840 | # CONFIG_HID_SUPPORT is not set | ||
841 | # CONFIG_USB_SUPPORT is not set | ||
842 | CONFIG_MMC=y | ||
843 | # CONFIG_MMC_DEBUG is not set | ||
844 | # CONFIG_MMC_UNSAFE_RESUME is not set | ||
845 | |||
846 | # | ||
847 | # MMC/SD/SDIO Card Drivers | ||
848 | # | ||
849 | CONFIG_MMC_BLOCK=y | ||
850 | CONFIG_MMC_BLOCK_BOUNCE=y | ||
851 | # CONFIG_SDIO_UART is not set | ||
852 | # CONFIG_MMC_TEST is not set | ||
853 | |||
854 | # | ||
855 | # MMC/SD/SDIO Host Controller Drivers | ||
856 | # | ||
857 | # CONFIG_MMC_SDHCI is not set | ||
858 | CONFIG_MMC_MXC=y | ||
859 | # CONFIG_MMC_SPI is not set | ||
860 | # CONFIG_MEMSTICK is not set | ||
861 | # CONFIG_ACCESSIBILITY is not set | ||
862 | # CONFIG_NEW_LEDS is not set | ||
863 | CONFIG_RTC_LIB=y | ||
864 | # CONFIG_RTC_CLASS is not set | ||
865 | # CONFIG_DMADEVICES is not set | ||
866 | # CONFIG_AUXDISPLAY is not set | ||
867 | # CONFIG_REGULATOR is not set | ||
868 | # CONFIG_UIO is not set | ||
869 | # CONFIG_STAGING is not set | ||
870 | |||
871 | # | ||
872 | # File systems | ||
873 | # | ||
874 | # CONFIG_EXT2_FS is not set | ||
875 | # CONFIG_EXT3_FS is not set | ||
876 | # CONFIG_EXT4_FS is not set | ||
877 | # CONFIG_REISERFS_FS is not set | ||
878 | # CONFIG_JFS_FS is not set | ||
879 | # CONFIG_FS_POSIX_ACL is not set | ||
880 | CONFIG_FILE_LOCKING=y | ||
881 | # CONFIG_XFS_FS is not set | ||
882 | # CONFIG_OCFS2_FS is not set | ||
883 | # CONFIG_BTRFS_FS is not set | ||
884 | # CONFIG_DNOTIFY is not set | ||
885 | # CONFIG_INOTIFY is not set | ||
886 | # CONFIG_QUOTA is not set | ||
887 | # CONFIG_AUTOFS_FS is not set | ||
888 | # CONFIG_AUTOFS4_FS is not set | ||
889 | # CONFIG_FUSE_FS is not set | ||
890 | |||
891 | # | ||
892 | # Caches | ||
893 | # | ||
894 | # CONFIG_FSCACHE is not set | ||
895 | |||
896 | # | ||
897 | # CD-ROM/DVD Filesystems | ||
898 | # | ||
899 | # CONFIG_ISO9660_FS is not set | ||
900 | # CONFIG_UDF_FS is not set | ||
901 | |||
902 | # | ||
903 | # DOS/FAT/NT Filesystems | ||
904 | # | ||
905 | CONFIG_FAT_FS=y | ||
906 | CONFIG_MSDOS_FS=y | ||
907 | # CONFIG_VFAT_FS is not set | ||
908 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
909 | # CONFIG_NTFS_FS is not set | ||
910 | |||
911 | # | ||
912 | # Pseudo filesystems | ||
913 | # | ||
914 | CONFIG_PROC_FS=y | ||
915 | CONFIG_PROC_SYSCTL=y | ||
916 | CONFIG_PROC_PAGE_MONITOR=y | ||
917 | CONFIG_SYSFS=y | ||
918 | CONFIG_TMPFS=y | ||
919 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
920 | # CONFIG_HUGETLB_PAGE is not set | ||
921 | # CONFIG_CONFIGFS_FS is not set | ||
922 | CONFIG_MISC_FILESYSTEMS=y | ||
923 | # CONFIG_ADFS_FS is not set | ||
924 | # CONFIG_AFFS_FS is not set | ||
925 | # CONFIG_HFS_FS is not set | ||
926 | # CONFIG_HFSPLUS_FS is not set | ||
927 | # CONFIG_BEFS_FS is not set | ||
928 | # CONFIG_BFS_FS is not set | ||
929 | # CONFIG_EFS_FS is not set | ||
930 | CONFIG_JFFS2_FS=y | ||
931 | CONFIG_JFFS2_FS_DEBUG=0 | ||
932 | CONFIG_JFFS2_FS_WRITEBUFFER=y | ||
933 | # CONFIG_JFFS2_FS_WBUF_VERIFY is not set | ||
934 | # CONFIG_JFFS2_SUMMARY is not set | ||
935 | # CONFIG_JFFS2_FS_XATTR is not set | ||
936 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set | ||
937 | CONFIG_JFFS2_ZLIB=y | ||
938 | # CONFIG_JFFS2_LZO is not set | ||
939 | CONFIG_JFFS2_RTIME=y | ||
940 | # CONFIG_JFFS2_RUBIN is not set | ||
941 | # CONFIG_CRAMFS is not set | ||
942 | # CONFIG_SQUASHFS is not set | ||
943 | # CONFIG_VXFS_FS is not set | ||
944 | # CONFIG_MINIX_FS is not set | ||
945 | # CONFIG_OMFS_FS is not set | ||
946 | # CONFIG_HPFS_FS is not set | ||
947 | # CONFIG_QNX4FS_FS is not set | ||
948 | # CONFIG_ROMFS_FS is not set | ||
949 | # CONFIG_SYSV_FS is not set | ||
950 | # CONFIG_UFS_FS is not set | ||
951 | # CONFIG_NILFS2_FS is not set | ||
952 | CONFIG_NETWORK_FILESYSTEMS=y | ||
953 | CONFIG_NFS_FS=y | ||
954 | CONFIG_NFS_V3=y | ||
955 | # CONFIG_NFS_V3_ACL is not set | ||
956 | # CONFIG_NFS_V4 is not set | ||
957 | CONFIG_ROOT_NFS=y | ||
958 | # CONFIG_NFSD is not set | ||
959 | CONFIG_LOCKD=y | ||
960 | CONFIG_LOCKD_V4=y | ||
961 | CONFIG_NFS_COMMON=y | ||
962 | CONFIG_SUNRPC=y | ||
963 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
964 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
965 | # CONFIG_SMB_FS is not set | ||
966 | # CONFIG_CIFS is not set | ||
967 | # CONFIG_NCP_FS is not set | ||
968 | # CONFIG_CODA_FS is not set | ||
969 | # CONFIG_AFS_FS is not set | ||
970 | |||
971 | # | ||
972 | # Partition Types | ||
973 | # | ||
974 | # CONFIG_PARTITION_ADVANCED is not set | ||
975 | CONFIG_MSDOS_PARTITION=y | ||
976 | CONFIG_NLS=y | ||
977 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
978 | # CONFIG_NLS_CODEPAGE_437 is not set | ||
979 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
980 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
981 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
982 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
983 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
984 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
985 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
986 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
987 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
988 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
989 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
990 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
991 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
992 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
993 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
994 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
995 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
996 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
997 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
998 | # CONFIG_NLS_ISO8859_8 is not set | ||
999 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
1000 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
1001 | # CONFIG_NLS_ASCII is not set | ||
1002 | # CONFIG_NLS_ISO8859_1 is not set | ||
1003 | # CONFIG_NLS_ISO8859_2 is not set | ||
1004 | # CONFIG_NLS_ISO8859_3 is not set | ||
1005 | # CONFIG_NLS_ISO8859_4 is not set | ||
1006 | # CONFIG_NLS_ISO8859_5 is not set | ||
1007 | # CONFIG_NLS_ISO8859_6 is not set | ||
1008 | # CONFIG_NLS_ISO8859_7 is not set | ||
1009 | # CONFIG_NLS_ISO8859_9 is not set | ||
1010 | # CONFIG_NLS_ISO8859_13 is not set | ||
1011 | # CONFIG_NLS_ISO8859_14 is not set | ||
1012 | # CONFIG_NLS_ISO8859_15 is not set | ||
1013 | # CONFIG_NLS_KOI8_R is not set | ||
1014 | # CONFIG_NLS_KOI8_U is not set | ||
1015 | # CONFIG_NLS_UTF8 is not set | ||
1016 | # CONFIG_DLM is not set | ||
1017 | |||
1018 | # | ||
1019 | # Kernel hacking | ||
1020 | # | ||
1021 | # CONFIG_PRINTK_TIME is not set | ||
1022 | CONFIG_ENABLE_WARN_DEPRECATED=y | ||
1023 | CONFIG_ENABLE_MUST_CHECK=y | ||
1024 | CONFIG_FRAME_WARN=1024 | ||
1025 | # CONFIG_MAGIC_SYSRQ is not set | ||
1026 | # CONFIG_UNUSED_SYMBOLS is not set | ||
1027 | # CONFIG_DEBUG_FS is not set | ||
1028 | # CONFIG_HEADERS_CHECK is not set | ||
1029 | # CONFIG_DEBUG_KERNEL is not set | ||
1030 | # CONFIG_DEBUG_BUGVERBOSE is not set | ||
1031 | # CONFIG_DEBUG_MEMORY_INIT is not set | ||
1032 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
1033 | # CONFIG_LATENCYTOP is not set | ||
1034 | CONFIG_SYSCTL_SYSCALL_CHECK=y | ||
1035 | CONFIG_HAVE_FUNCTION_TRACER=y | ||
1036 | CONFIG_TRACING_SUPPORT=y | ||
1037 | |||
1038 | # | ||
1039 | # Tracers | ||
1040 | # | ||
1041 | # CONFIG_FUNCTION_TRACER is not set | ||
1042 | # CONFIG_IRQSOFF_TRACER is not set | ||
1043 | # CONFIG_PREEMPT_TRACER is not set | ||
1044 | # CONFIG_SCHED_TRACER is not set | ||
1045 | # CONFIG_CONTEXT_SWITCH_TRACER is not set | ||
1046 | # CONFIG_EVENT_TRACER is not set | ||
1047 | # CONFIG_BOOT_TRACER is not set | ||
1048 | # CONFIG_TRACE_BRANCH_PROFILING is not set | ||
1049 | # CONFIG_STACK_TRACER is not set | ||
1050 | # CONFIG_KMEMTRACE is not set | ||
1051 | # CONFIG_WORKQUEUE_TRACER is not set | ||
1052 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
1053 | # CONFIG_SAMPLES is not set | ||
1054 | CONFIG_HAVE_ARCH_KGDB=y | ||
1055 | CONFIG_ARM_UNWIND=y | ||
1056 | # CONFIG_DEBUG_USER is not set | ||
1057 | |||
1058 | # | ||
1059 | # Security options | ||
1060 | # | ||
1061 | # CONFIG_KEYS is not set | ||
1062 | # CONFIG_SECURITY is not set | ||
1063 | # CONFIG_SECURITYFS is not set | ||
1064 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | ||
1065 | CONFIG_CRYPTO=y | ||
1066 | |||
1067 | # | ||
1068 | # Crypto core or helper | ||
1069 | # | ||
1070 | # CONFIG_CRYPTO_FIPS is not set | ||
1071 | # CONFIG_CRYPTO_MANAGER is not set | ||
1072 | # CONFIG_CRYPTO_MANAGER2 is not set | ||
1073 | # CONFIG_CRYPTO_GF128MUL is not set | ||
1074 | # CONFIG_CRYPTO_NULL is not set | ||
1075 | # CONFIG_CRYPTO_CRYPTD is not set | ||
1076 | # CONFIG_CRYPTO_AUTHENC is not set | ||
1077 | # CONFIG_CRYPTO_TEST is not set | ||
1078 | |||
1079 | # | ||
1080 | # Authenticated Encryption with Associated Data | ||
1081 | # | ||
1082 | # CONFIG_CRYPTO_CCM is not set | ||
1083 | # CONFIG_CRYPTO_GCM is not set | ||
1084 | # CONFIG_CRYPTO_SEQIV is not set | ||
1085 | |||
1086 | # | ||
1087 | # Block modes | ||
1088 | # | ||
1089 | # CONFIG_CRYPTO_CBC is not set | ||
1090 | # CONFIG_CRYPTO_CTR is not set | ||
1091 | # CONFIG_CRYPTO_CTS is not set | ||
1092 | # CONFIG_CRYPTO_ECB is not set | ||
1093 | # CONFIG_CRYPTO_LRW is not set | ||
1094 | # CONFIG_CRYPTO_PCBC is not set | ||
1095 | # CONFIG_CRYPTO_XTS is not set | ||
1096 | |||
1097 | # | ||
1098 | # Hash modes | ||
1099 | # | ||
1100 | # CONFIG_CRYPTO_HMAC is not set | ||
1101 | # CONFIG_CRYPTO_XCBC is not set | ||
1102 | |||
1103 | # | ||
1104 | # Digest | ||
1105 | # | ||
1106 | # CONFIG_CRYPTO_CRC32C is not set | ||
1107 | # CONFIG_CRYPTO_MD4 is not set | ||
1108 | # CONFIG_CRYPTO_MD5 is not set | ||
1109 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
1110 | # CONFIG_CRYPTO_RMD128 is not set | ||
1111 | # CONFIG_CRYPTO_RMD160 is not set | ||
1112 | # CONFIG_CRYPTO_RMD256 is not set | ||
1113 | # CONFIG_CRYPTO_RMD320 is not set | ||
1114 | # CONFIG_CRYPTO_SHA1 is not set | ||
1115 | # CONFIG_CRYPTO_SHA256 is not set | ||
1116 | # CONFIG_CRYPTO_SHA512 is not set | ||
1117 | # CONFIG_CRYPTO_TGR192 is not set | ||
1118 | # CONFIG_CRYPTO_WP512 is not set | ||
1119 | |||
1120 | # | ||
1121 | # Ciphers | ||
1122 | # | ||
1123 | # CONFIG_CRYPTO_AES is not set | ||
1124 | # CONFIG_CRYPTO_ANUBIS is not set | ||
1125 | # CONFIG_CRYPTO_ARC4 is not set | ||
1126 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
1127 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
1128 | # CONFIG_CRYPTO_CAST5 is not set | ||
1129 | # CONFIG_CRYPTO_CAST6 is not set | ||
1130 | # CONFIG_CRYPTO_DES is not set | ||
1131 | # CONFIG_CRYPTO_FCRYPT is not set | ||
1132 | # CONFIG_CRYPTO_KHAZAD is not set | ||
1133 | # CONFIG_CRYPTO_SALSA20 is not set | ||
1134 | # CONFIG_CRYPTO_SEED is not set | ||
1135 | # CONFIG_CRYPTO_SERPENT is not set | ||
1136 | # CONFIG_CRYPTO_TEA is not set | ||
1137 | # CONFIG_CRYPTO_TWOFISH is not set | ||
1138 | |||
1139 | # | ||
1140 | # Compression | ||
1141 | # | ||
1142 | # CONFIG_CRYPTO_DEFLATE is not set | ||
1143 | # CONFIG_CRYPTO_ZLIB is not set | ||
1144 | # CONFIG_CRYPTO_LZO is not set | ||
1145 | |||
1146 | # | ||
1147 | # Random Number Generation | ||
1148 | # | ||
1149 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | ||
1150 | CONFIG_CRYPTO_HW=y | ||
1151 | # CONFIG_BINARY_PRINTF is not set | ||
1152 | |||
1153 | # | ||
1154 | # Library routines | ||
1155 | # | ||
1156 | CONFIG_BITREVERSE=y | ||
1157 | CONFIG_GENERIC_FIND_LAST_BIT=y | ||
1158 | # CONFIG_CRC_CCITT is not set | ||
1159 | # CONFIG_CRC16 is not set | ||
1160 | # CONFIG_CRC_T10DIF is not set | ||
1161 | # CONFIG_CRC_ITU_T is not set | ||
1162 | CONFIG_CRC32=y | ||
1163 | # CONFIG_CRC7 is not set | ||
1164 | # CONFIG_LIBCRC32C is not set | ||
1165 | CONFIG_ZLIB_INFLATE=y | ||
1166 | CONFIG_ZLIB_DEFLATE=y | ||
1167 | CONFIG_HAS_IOMEM=y | ||
1168 | CONFIG_HAS_IOPORT=y | ||
1169 | CONFIG_HAS_DMA=y | ||
1170 | CONFIG_NLATTR=y | ||
diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h index 110295c5461d..1cd2d6416bda 100644 --- a/arch/arm/include/asm/pgtable.h +++ b/arch/arm/include/asm/pgtable.h | |||
@@ -342,7 +342,7 @@ static inline pte_t *pmd_page_vaddr(pmd_t pmd) | |||
342 | return __va(ptr); | 342 | return __va(ptr); |
343 | } | 343 | } |
344 | 344 | ||
345 | #define pmd_page(pmd) virt_to_page(__va(pmd_val(pmd))) | 345 | #define pmd_page(pmd) pfn_to_page(__phys_to_pfn(pmd_val(pmd))) |
346 | 346 | ||
347 | /* | 347 | /* |
348 | * Conversion functions: convert a page and protection to a page entry, | 348 | * Conversion functions: convert a page and protection to a page entry, |
diff --git a/arch/arm/mach-at91/clock.c b/arch/arm/mach-at91/clock.c index e4345106ee57..bac578fe0d3d 100644 --- a/arch/arm/mach-at91/clock.c +++ b/arch/arm/mach-at91/clock.c | |||
@@ -43,6 +43,25 @@ | |||
43 | #define clk_is_sys(x) ((x)->type & CLK_TYPE_SYSTEM) | 43 | #define clk_is_sys(x) ((x)->type & CLK_TYPE_SYSTEM) |
44 | 44 | ||
45 | 45 | ||
46 | /* | ||
47 | * Chips have some kind of clocks : group them by functionality | ||
48 | */ | ||
49 | #define cpu_has_utmi() ( cpu_is_at91cap9() \ | ||
50 | || cpu_is_at91sam9rl()) | ||
51 | |||
52 | #define cpu_has_800M_plla() (cpu_is_at91sam9g20()) | ||
53 | |||
54 | #define cpu_has_pllb() (!cpu_is_at91sam9rl()) | ||
55 | |||
56 | #define cpu_has_upll() (0) | ||
57 | |||
58 | /* USB host HS & FS */ | ||
59 | #define cpu_has_uhp() (!cpu_is_at91sam9rl()) | ||
60 | |||
61 | /* USB device FS only */ | ||
62 | #define cpu_has_udpfs() (!cpu_is_at91sam9rl()) | ||
63 | |||
64 | |||
46 | static LIST_HEAD(clocks); | 65 | static LIST_HEAD(clocks); |
47 | static DEFINE_SPINLOCK(clk_lock); | 66 | static DEFINE_SPINLOCK(clk_lock); |
48 | 67 | ||
@@ -140,7 +159,7 @@ static struct clk utmi_clk = { | |||
140 | }; | 159 | }; |
141 | static struct clk uhpck = { | 160 | static struct clk uhpck = { |
142 | .name = "uhpck", | 161 | .name = "uhpck", |
143 | .parent = &pllb, | 162 | /*.parent = ... we choose parent at runtime */ |
144 | .mode = pmc_sys_mode, | 163 | .mode = pmc_sys_mode, |
145 | }; | 164 | }; |
146 | 165 | ||
@@ -173,7 +192,11 @@ static struct clk __init *at91_css_to_clk(unsigned long css) | |||
173 | case AT91_PMC_CSS_PLLA: | 192 | case AT91_PMC_CSS_PLLA: |
174 | return &plla; | 193 | return &plla; |
175 | case AT91_PMC_CSS_PLLB: | 194 | case AT91_PMC_CSS_PLLB: |
176 | return &pllb; | 195 | if (cpu_has_upll()) |
196 | /* CSS_PLLB == CSS_UPLL */ | ||
197 | return &utmi_clk; | ||
198 | else if (cpu_has_pllb()) | ||
199 | return &pllb; | ||
177 | } | 200 | } |
178 | 201 | ||
179 | return NULL; | 202 | return NULL; |
@@ -322,7 +345,7 @@ int clk_set_rate(struct clk *clk, unsigned long rate) | |||
322 | u32 pckr; | 345 | u32 pckr; |
323 | 346 | ||
324 | pckr = at91_sys_read(AT91_PMC_PCKR(clk->id)); | 347 | pckr = at91_sys_read(AT91_PMC_PCKR(clk->id)); |
325 | pckr &= AT91_PMC_CSS_PLLB; /* clock selection */ | 348 | pckr &= AT91_PMC_CSS; /* clock selection */ |
326 | pckr |= prescale << 2; | 349 | pckr |= prescale << 2; |
327 | at91_sys_write(AT91_PMC_PCKR(clk->id), pckr); | 350 | at91_sys_write(AT91_PMC_PCKR(clk->id), pckr); |
328 | clk->rate_hz = actual; | 351 | clk->rate_hz = actual; |
@@ -361,7 +384,7 @@ int clk_set_parent(struct clk *clk, struct clk *parent) | |||
361 | } | 384 | } |
362 | EXPORT_SYMBOL(clk_set_parent); | 385 | EXPORT_SYMBOL(clk_set_parent); |
363 | 386 | ||
364 | /* establish PCK0..PCK3 parentage and rate */ | 387 | /* establish PCK0..PCKN parentage and rate */ |
365 | static void __init init_programmable_clock(struct clk *clk) | 388 | static void __init init_programmable_clock(struct clk *clk) |
366 | { | 389 | { |
367 | struct clk *parent; | 390 | struct clk *parent; |
@@ -389,11 +412,13 @@ static int at91_clk_show(struct seq_file *s, void *unused) | |||
389 | seq_printf(s, "MOR = %8x\n", at91_sys_read(AT91_CKGR_MOR)); | 412 | seq_printf(s, "MOR = %8x\n", at91_sys_read(AT91_CKGR_MOR)); |
390 | seq_printf(s, "MCFR = %8x\n", at91_sys_read(AT91_CKGR_MCFR)); | 413 | seq_printf(s, "MCFR = %8x\n", at91_sys_read(AT91_CKGR_MCFR)); |
391 | seq_printf(s, "PLLA = %8x\n", at91_sys_read(AT91_CKGR_PLLAR)); | 414 | seq_printf(s, "PLLA = %8x\n", at91_sys_read(AT91_CKGR_PLLAR)); |
392 | if (!cpu_is_at91sam9rl()) | 415 | if (cpu_has_pllb()) |
393 | seq_printf(s, "PLLB = %8x\n", at91_sys_read(AT91_CKGR_PLLBR)); | 416 | seq_printf(s, "PLLB = %8x\n", at91_sys_read(AT91_CKGR_PLLBR)); |
394 | if (cpu_is_at91cap9() || cpu_is_at91sam9rl()) | 417 | if (cpu_has_utmi()) |
395 | seq_printf(s, "UCKR = %8x\n", uckr = at91_sys_read(AT91_CKGR_UCKR)); | 418 | seq_printf(s, "UCKR = %8x\n", uckr = at91_sys_read(AT91_CKGR_UCKR)); |
396 | seq_printf(s, "MCKR = %8x\n", at91_sys_read(AT91_PMC_MCKR)); | 419 | seq_printf(s, "MCKR = %8x\n", at91_sys_read(AT91_PMC_MCKR)); |
420 | if (cpu_has_upll()) | ||
421 | seq_printf(s, "USB = %8x\n", at91_sys_read(AT91_PMC_USB)); | ||
397 | seq_printf(s, "SR = %8x\n", sr = at91_sys_read(AT91_PMC_SR)); | 422 | seq_printf(s, "SR = %8x\n", sr = at91_sys_read(AT91_PMC_SR)); |
398 | 423 | ||
399 | seq_printf(s, "\n"); | 424 | seq_printf(s, "\n"); |
@@ -554,16 +579,60 @@ static struct clk *const standard_pmc_clocks[] __initdata = { | |||
554 | &clk32k, | 579 | &clk32k, |
555 | &main_clk, | 580 | &main_clk, |
556 | &plla, | 581 | &plla, |
557 | &pllb, | ||
558 | |||
559 | /* PLLB children (USB) */ | ||
560 | &udpck, | ||
561 | &uhpck, | ||
562 | 582 | ||
563 | /* MCK */ | 583 | /* MCK */ |
564 | &mck | 584 | &mck |
565 | }; | 585 | }; |
566 | 586 | ||
587 | /* PLLB generated USB full speed clock init */ | ||
588 | static void __init at91_pllb_usbfs_clock_init(unsigned long main_clock) | ||
589 | { | ||
590 | /* | ||
591 | * USB clock init: choose 48 MHz PLLB value, | ||
592 | * disable 48MHz clock during usb peripheral suspend. | ||
593 | * | ||
594 | * REVISIT: assumes MCK doesn't derive from PLLB! | ||
595 | */ | ||
596 | uhpck.parent = &pllb; | ||
597 | |||
598 | at91_pllb_usb_init = at91_pll_calc(main_clock, 48000000 * 2) | AT91_PMC_USB96M; | ||
599 | pllb.rate_hz = at91_pll_rate(&pllb, main_clock, at91_pllb_usb_init); | ||
600 | if (cpu_is_at91rm9200()) { | ||
601 | uhpck.pmc_mask = AT91RM9200_PMC_UHP; | ||
602 | udpck.pmc_mask = AT91RM9200_PMC_UDP; | ||
603 | at91_sys_write(AT91_PMC_SCER, AT91RM9200_PMC_MCKUDP); | ||
604 | } else if (cpu_is_at91sam9260() || cpu_is_at91sam9261() || cpu_is_at91sam9263() || cpu_is_at91sam9g20()) { | ||
605 | uhpck.pmc_mask = AT91SAM926x_PMC_UHP; | ||
606 | udpck.pmc_mask = AT91SAM926x_PMC_UDP; | ||
607 | } else if (cpu_is_at91cap9()) { | ||
608 | uhpck.pmc_mask = AT91CAP9_PMC_UHP; | ||
609 | } | ||
610 | at91_sys_write(AT91_CKGR_PLLBR, 0); | ||
611 | |||
612 | udpck.rate_hz = at91_usb_rate(&pllb, pllb.rate_hz, at91_pllb_usb_init); | ||
613 | uhpck.rate_hz = at91_usb_rate(&pllb, pllb.rate_hz, at91_pllb_usb_init); | ||
614 | } | ||
615 | |||
616 | /* UPLL generated USB full speed clock init */ | ||
617 | static void __init at91_upll_usbfs_clock_init(unsigned long main_clock) | ||
618 | { | ||
619 | /* | ||
620 | * USB clock init: choose 480 MHz from UPLL, | ||
621 | */ | ||
622 | unsigned int usbr = AT91_PMC_USBS_UPLL; | ||
623 | |||
624 | /* Setup divider by 10 to reach 48 MHz */ | ||
625 | usbr |= ((10 - 1) << 8) & AT91_PMC_OHCIUSBDIV; | ||
626 | |||
627 | at91_sys_write(AT91_PMC_USB, usbr); | ||
628 | |||
629 | /* Now set uhpck values */ | ||
630 | uhpck.parent = &utmi_clk; | ||
631 | uhpck.pmc_mask = AT91SAM926x_PMC_UHP; | ||
632 | uhpck.rate_hz = utmi_clk.parent->rate_hz; | ||
633 | uhpck.rate_hz /= 1 + ((at91_sys_read(AT91_PMC_USB) & AT91_PMC_OHCIUSBDIV) >> 8); | ||
634 | } | ||
635 | |||
567 | int __init at91_clock_init(unsigned long main_clock) | 636 | int __init at91_clock_init(unsigned long main_clock) |
568 | { | 637 | { |
569 | unsigned tmp, freq, mckr; | 638 | unsigned tmp, freq, mckr; |
@@ -585,43 +654,37 @@ int __init at91_clock_init(unsigned long main_clock) | |||
585 | 654 | ||
586 | /* report if PLLA is more than mildly overclocked */ | 655 | /* report if PLLA is more than mildly overclocked */ |
587 | plla.rate_hz = at91_pll_rate(&plla, main_clock, at91_sys_read(AT91_CKGR_PLLAR)); | 656 | plla.rate_hz = at91_pll_rate(&plla, main_clock, at91_sys_read(AT91_CKGR_PLLAR)); |
588 | if ((!cpu_is_at91sam9g20() && plla.rate_hz > 209000000) | 657 | if ((!cpu_has_800M_plla() && plla.rate_hz > 209000000) |
589 | || (cpu_is_at91sam9g20() && plla.rate_hz > 800000000)) | 658 | || (cpu_has_800M_plla() && plla.rate_hz > 800000000)) |
590 | pr_info("Clocks: PLLA overclocked, %ld MHz\n", plla.rate_hz / 1000000); | 659 | pr_info("Clocks: PLLA overclocked, %ld MHz\n", plla.rate_hz / 1000000); |
591 | 660 | ||
592 | /* | 661 | |
593 | * USB clock init: choose 48 MHz PLLB value, | 662 | if (cpu_has_upll() && !cpu_has_pllb()) { |
594 | * disable 48MHz clock during usb peripheral suspend. | 663 | /* setup UTMI clock as the fourth primary clock |
595 | * | 664 | * (instead of pllb) */ |
596 | * REVISIT: assumes MCK doesn't derive from PLLB! | 665 | utmi_clk.type |= CLK_TYPE_PRIMARY; |
597 | */ | 666 | utmi_clk.id = 3; |
598 | at91_pllb_usb_init = at91_pll_calc(main_clock, 48000000 * 2) | AT91_PMC_USB96M; | ||
599 | pllb.rate_hz = at91_pll_rate(&pllb, main_clock, at91_pllb_usb_init); | ||
600 | if (cpu_is_at91rm9200()) { | ||
601 | uhpck.pmc_mask = AT91RM9200_PMC_UHP; | ||
602 | udpck.pmc_mask = AT91RM9200_PMC_UDP; | ||
603 | at91_sys_write(AT91_PMC_SCER, AT91RM9200_PMC_MCKUDP); | ||
604 | } else if (cpu_is_at91sam9260() || cpu_is_at91sam9261() || cpu_is_at91sam9263() || cpu_is_at91sam9g20()) { | ||
605 | uhpck.pmc_mask = AT91SAM926x_PMC_UHP; | ||
606 | udpck.pmc_mask = AT91SAM926x_PMC_UDP; | ||
607 | } else if (cpu_is_at91cap9()) { | ||
608 | uhpck.pmc_mask = AT91CAP9_PMC_UHP; | ||
609 | } | 667 | } |
610 | at91_sys_write(AT91_CKGR_PLLBR, 0); | ||
611 | 668 | ||
612 | udpck.rate_hz = at91_usb_rate(&pllb, pllb.rate_hz, at91_pllb_usb_init); | ||
613 | uhpck.rate_hz = at91_usb_rate(&pllb, pllb.rate_hz, at91_pllb_usb_init); | ||
614 | 669 | ||
615 | /* | 670 | /* |
616 | * USB HS clock init | 671 | * USB HS clock init |
617 | */ | 672 | */ |
618 | if (cpu_is_at91cap9() || cpu_is_at91sam9rl()) { | 673 | if (cpu_has_utmi()) |
619 | /* | 674 | /* |
620 | * multiplier is hard-wired to 40 | 675 | * multiplier is hard-wired to 40 |
621 | * (obtain the USB High Speed 480 MHz when input is 12 MHz) | 676 | * (obtain the USB High Speed 480 MHz when input is 12 MHz) |
622 | */ | 677 | */ |
623 | utmi_clk.rate_hz = 40 * utmi_clk.parent->rate_hz; | 678 | utmi_clk.rate_hz = 40 * utmi_clk.parent->rate_hz; |
624 | } | 679 | |
680 | /* | ||
681 | * USB FS clock init | ||
682 | */ | ||
683 | if (cpu_has_pllb()) | ||
684 | at91_pllb_usbfs_clock_init(main_clock); | ||
685 | if (cpu_has_upll()) | ||
686 | /* assumes that we choose UPLL for USB and not PLLA */ | ||
687 | at91_upll_usbfs_clock_init(main_clock); | ||
625 | 688 | ||
626 | /* | 689 | /* |
627 | * MCK and CPU derive from one of those primary clocks. | 690 | * MCK and CPU derive from one of those primary clocks. |
@@ -631,21 +694,31 @@ int __init at91_clock_init(unsigned long main_clock) | |||
631 | mck.parent = at91_css_to_clk(mckr & AT91_PMC_CSS); | 694 | mck.parent = at91_css_to_clk(mckr & AT91_PMC_CSS); |
632 | freq = mck.parent->rate_hz; | 695 | freq = mck.parent->rate_hz; |
633 | freq /= (1 << ((mckr & AT91_PMC_PRES) >> 2)); /* prescale */ | 696 | freq /= (1 << ((mckr & AT91_PMC_PRES) >> 2)); /* prescale */ |
634 | if (cpu_is_at91rm9200()) | 697 | if (cpu_is_at91rm9200()) { |
635 | mck.rate_hz = freq / (1 + ((mckr & AT91_PMC_MDIV) >> 8)); /* mdiv */ | 698 | mck.rate_hz = freq / (1 + ((mckr & AT91_PMC_MDIV) >> 8)); /* mdiv */ |
636 | else if (cpu_is_at91sam9g20()) { | 699 | } else if (cpu_is_at91sam9g20()) { |
637 | mck.rate_hz = (mckr & AT91_PMC_MDIV) ? | 700 | mck.rate_hz = (mckr & AT91_PMC_MDIV) ? |
638 | freq / ((mckr & AT91_PMC_MDIV) >> 7) : freq; /* mdiv ; (x >> 7) = ((x >> 8) * 2) */ | 701 | freq / ((mckr & AT91_PMC_MDIV) >> 7) : freq; /* mdiv ; (x >> 7) = ((x >> 8) * 2) */ |
639 | if (mckr & AT91_PMC_PDIV) | 702 | if (mckr & AT91_PMC_PDIV) |
640 | freq /= 2; /* processor clock division */ | 703 | freq /= 2; /* processor clock division */ |
641 | } else | 704 | } else { |
642 | mck.rate_hz = freq / (1 << ((mckr & AT91_PMC_MDIV) >> 8)); /* mdiv */ | 705 | mck.rate_hz = freq / (1 << ((mckr & AT91_PMC_MDIV) >> 8)); /* mdiv */ |
706 | } | ||
643 | 707 | ||
644 | /* Register the PMC's standard clocks */ | 708 | /* Register the PMC's standard clocks */ |
645 | for (i = 0; i < ARRAY_SIZE(standard_pmc_clocks); i++) | 709 | for (i = 0; i < ARRAY_SIZE(standard_pmc_clocks); i++) |
646 | list_add_tail(&standard_pmc_clocks[i]->node, &clocks); | 710 | list_add_tail(&standard_pmc_clocks[i]->node, &clocks); |
647 | 711 | ||
648 | if (cpu_is_at91cap9() || cpu_is_at91sam9rl()) | 712 | if (cpu_has_pllb()) |
713 | list_add_tail(&pllb.node, &clocks); | ||
714 | |||
715 | if (cpu_has_uhp()) | ||
716 | list_add_tail(&uhpck.node, &clocks); | ||
717 | |||
718 | if (cpu_has_udpfs()) | ||
719 | list_add_tail(&udpck.node, &clocks); | ||
720 | |||
721 | if (cpu_has_utmi()) | ||
649 | list_add_tail(&utmi_clk.node, &clocks); | 722 | list_add_tail(&utmi_clk.node, &clocks); |
650 | 723 | ||
651 | /* MCK and CPU clock are "always on" */ | 724 | /* MCK and CPU clock are "always on" */ |
diff --git a/arch/arm/mach-at91/include/mach/at91_pmc.h b/arch/arm/mach-at91/include/mach/at91_pmc.h index 9561e33b8a9a..64589eaaaee8 100644 --- a/arch/arm/mach-at91/include/mach/at91_pmc.h +++ b/arch/arm/mach-at91/include/mach/at91_pmc.h | |||
@@ -23,7 +23,7 @@ | |||
23 | #define AT91_PMC_PCK (1 << 0) /* Processor Clock */ | 23 | #define AT91_PMC_PCK (1 << 0) /* Processor Clock */ |
24 | #define AT91RM9200_PMC_UDP (1 << 1) /* USB Devcice Port Clock [AT91RM9200 only] */ | 24 | #define AT91RM9200_PMC_UDP (1 << 1) /* USB Devcice Port Clock [AT91RM9200 only] */ |
25 | #define AT91RM9200_PMC_MCKUDP (1 << 2) /* USB Device Port Master Clock Automatic Disable on Suspend [AT91RM9200 only] */ | 25 | #define AT91RM9200_PMC_MCKUDP (1 << 2) /* USB Device Port Master Clock Automatic Disable on Suspend [AT91RM9200 only] */ |
26 | #define AT91CAP9_PMC_DDR (1 << 2) /* DDR Clock [AT91CAP9 revC only] */ | 26 | #define AT91CAP9_PMC_DDR (1 << 2) /* DDR Clock [CAP9 revC & some SAM9 only] */ |
27 | #define AT91RM9200_PMC_UHP (1 << 4) /* USB Host Port Clock [AT91RM9200 only] */ | 27 | #define AT91RM9200_PMC_UHP (1 << 4) /* USB Host Port Clock [AT91RM9200 only] */ |
28 | #define AT91SAM926x_PMC_UHP (1 << 6) /* USB Host Port Clock [AT91SAM926x only] */ | 28 | #define AT91SAM926x_PMC_UHP (1 << 6) /* USB Host Port Clock [AT91SAM926x only] */ |
29 | #define AT91CAP9_PMC_UHP (1 << 6) /* USB Host Port Clock [AT91CAP9 only] */ | 29 | #define AT91CAP9_PMC_UHP (1 << 6) /* USB Host Port Clock [AT91CAP9 only] */ |
@@ -39,11 +39,11 @@ | |||
39 | #define AT91_PMC_PCDR (AT91_PMC + 0x14) /* Peripheral Clock Disable Register */ | 39 | #define AT91_PMC_PCDR (AT91_PMC + 0x14) /* Peripheral Clock Disable Register */ |
40 | #define AT91_PMC_PCSR (AT91_PMC + 0x18) /* Peripheral Clock Status Register */ | 40 | #define AT91_PMC_PCSR (AT91_PMC + 0x18) /* Peripheral Clock Status Register */ |
41 | 41 | ||
42 | #define AT91_CKGR_UCKR (AT91_PMC + 0x1C) /* UTMI Clock Register [SAM9RL, CAP9] */ | 42 | #define AT91_CKGR_UCKR (AT91_PMC + 0x1C) /* UTMI Clock Register [some SAM9, CAP9] */ |
43 | #define AT91_PMC_UPLLEN (1 << 16) /* UTMI PLL Enable */ | 43 | #define AT91_PMC_UPLLEN (1 << 16) /* UTMI PLL Enable */ |
44 | #define AT91_PMC_UPLLCOUNT (0xf << 20) /* UTMI PLL Start-up Time */ | 44 | #define AT91_PMC_UPLLCOUNT (0xf << 20) /* UTMI PLL Start-up Time */ |
45 | #define AT91_PMC_BIASEN (1 << 24) /* UTMI BIAS Enable */ | 45 | #define AT91_PMC_BIASEN (1 << 24) /* UTMI BIAS Enable */ |
46 | #define AT91_PMC_BIASCOUNT (0xf << 28) /* UTMI PLL Start-up Time */ | 46 | #define AT91_PMC_BIASCOUNT (0xf << 28) /* UTMI BIAS Start-up Time */ |
47 | 47 | ||
48 | #define AT91_CKGR_MOR (AT91_PMC + 0x20) /* Main Oscillator Register [not on SAM9RL] */ | 48 | #define AT91_CKGR_MOR (AT91_PMC + 0x20) /* Main Oscillator Register [not on SAM9RL] */ |
49 | #define AT91_PMC_MOSCEN (1 << 0) /* Main Oscillator Enable */ | 49 | #define AT91_PMC_MOSCEN (1 << 0) /* Main Oscillator Enable */ |
@@ -72,6 +72,7 @@ | |||
72 | #define AT91_PMC_CSS_MAIN (1 << 0) | 72 | #define AT91_PMC_CSS_MAIN (1 << 0) |
73 | #define AT91_PMC_CSS_PLLA (2 << 0) | 73 | #define AT91_PMC_CSS_PLLA (2 << 0) |
74 | #define AT91_PMC_CSS_PLLB (3 << 0) | 74 | #define AT91_PMC_CSS_PLLB (3 << 0) |
75 | #define AT91_PMC_CSS_UPLL (3 << 0) /* [some SAM9 only] */ | ||
75 | #define AT91_PMC_PRES (7 << 2) /* Master Clock Prescaler */ | 76 | #define AT91_PMC_PRES (7 << 2) /* Master Clock Prescaler */ |
76 | #define AT91_PMC_PRES_1 (0 << 2) | 77 | #define AT91_PMC_PRES_1 (0 << 2) |
77 | #define AT91_PMC_PRES_2 (1 << 2) | 78 | #define AT91_PMC_PRES_2 (1 << 2) |
@@ -88,12 +89,25 @@ | |||
88 | #define AT91SAM9_PMC_MDIV_1 (0 << 8) /* [SAM9,CAP9 only] */ | 89 | #define AT91SAM9_PMC_MDIV_1 (0 << 8) /* [SAM9,CAP9 only] */ |
89 | #define AT91SAM9_PMC_MDIV_2 (1 << 8) | 90 | #define AT91SAM9_PMC_MDIV_2 (1 << 8) |
90 | #define AT91SAM9_PMC_MDIV_4 (2 << 8) | 91 | #define AT91SAM9_PMC_MDIV_4 (2 << 8) |
91 | #define AT91SAM9_PMC_MDIV_6 (3 << 8) | 92 | #define AT91SAM9_PMC_MDIV_6 (3 << 8) /* [some SAM9 only] */ |
93 | #define AT91SAM9_PMC_MDIV_3 (3 << 8) /* [some SAM9 only] */ | ||
92 | #define AT91_PMC_PDIV (1 << 12) /* Processor Clock Division [some SAM9 only] */ | 94 | #define AT91_PMC_PDIV (1 << 12) /* Processor Clock Division [some SAM9 only] */ |
93 | #define AT91_PMC_PDIV_1 (0 << 12) | 95 | #define AT91_PMC_PDIV_1 (0 << 12) |
94 | #define AT91_PMC_PDIV_2 (1 << 12) | 96 | #define AT91_PMC_PDIV_2 (1 << 12) |
97 | #define AT91_PMC_PLLADIV2 (1 << 12) /* PLLA divisor by 2 [some SAM9 only] */ | ||
98 | #define AT91_PMC_PLLADIV2_OFF (0 << 12) | ||
99 | #define AT91_PMC_PLLADIV2_ON (1 << 12) | ||
95 | 100 | ||
96 | #define AT91_PMC_PCKR(n) (AT91_PMC + 0x40 + ((n) * 4)) /* Programmable Clock 0-3 Registers */ | 101 | #define AT91_PMC_USB (AT91_PMC + 0x38) /* USB Clock Register [some SAM9 only] */ |
102 | #define AT91_PMC_USBS (0x1 << 0) /* USB OHCI Input clock selection */ | ||
103 | #define AT91_PMC_USBS_PLLA (0 << 0) | ||
104 | #define AT91_PMC_USBS_UPLL (1 << 0) | ||
105 | #define AT91_PMC_OHCIUSBDIV (0xF << 8) /* Divider for USB OHCI Clock */ | ||
106 | |||
107 | #define AT91_PMC_PCKR(n) (AT91_PMC + 0x40 + ((n) * 4)) /* Programmable Clock 0-N Registers */ | ||
108 | #define AT91_PMC_CSSMCK (0x1 << 8) /* CSS or Master Clock Selection */ | ||
109 | #define AT91_PMC_CSSMCK_CSS (0 << 8) | ||
110 | #define AT91_PMC_CSSMCK_MCK (1 << 8) | ||
97 | 111 | ||
98 | #define AT91_PMC_IER (AT91_PMC + 0x60) /* Interrupt Enable Register */ | 112 | #define AT91_PMC_IER (AT91_PMC + 0x60) /* Interrupt Enable Register */ |
99 | #define AT91_PMC_IDR (AT91_PMC + 0x64) /* Interrupt Disable Register */ | 113 | #define AT91_PMC_IDR (AT91_PMC + 0x64) /* Interrupt Disable Register */ |
@@ -102,7 +116,7 @@ | |||
102 | #define AT91_PMC_LOCKA (1 << 1) /* PLLA Lock */ | 116 | #define AT91_PMC_LOCKA (1 << 1) /* PLLA Lock */ |
103 | #define AT91_PMC_LOCKB (1 << 2) /* PLLB Lock */ | 117 | #define AT91_PMC_LOCKB (1 << 2) /* PLLB Lock */ |
104 | #define AT91_PMC_MCKRDY (1 << 3) /* Master Clock */ | 118 | #define AT91_PMC_MCKRDY (1 << 3) /* Master Clock */ |
105 | #define AT91_PMC_LOCKU (1 << 6) /* UPLL Lock [AT91CAP9 only] */ | 119 | #define AT91_PMC_LOCKU (1 << 6) /* UPLL Lock [some SAM9, AT91CAP9 only] */ |
106 | #define AT91_PMC_OSCSEL (1 << 7) /* Slow Clock Oscillator [AT91CAP9 revC only] */ | 120 | #define AT91_PMC_OSCSEL (1 << 7) /* Slow Clock Oscillator [AT91CAP9 revC only] */ |
107 | #define AT91_PMC_PCK0RDY (1 << 8) /* Programmable Clock 0 */ | 121 | #define AT91_PMC_PCK0RDY (1 << 8) /* Programmable Clock 0 */ |
108 | #define AT91_PMC_PCK1RDY (1 << 9) /* Programmable Clock 1 */ | 122 | #define AT91_PMC_PCK1RDY (1 << 9) /* Programmable Clock 1 */ |
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index ae24486f858a..c535e8805a3b 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c | |||
@@ -450,10 +450,19 @@ static struct amba_device uart3_device = { | |||
450 | }; | 450 | }; |
451 | 451 | ||
452 | 452 | ||
453 | static struct resource ep93xx_rtc_resource[] = { | ||
454 | { | ||
455 | .start = EP93XX_RTC_PHYS_BASE, | ||
456 | .end = EP93XX_RTC_PHYS_BASE + 0x10c - 1, | ||
457 | .flags = IORESOURCE_MEM, | ||
458 | }, | ||
459 | }; | ||
460 | |||
453 | static struct platform_device ep93xx_rtc_device = { | 461 | static struct platform_device ep93xx_rtc_device = { |
454 | .name = "ep93xx-rtc", | 462 | .name = "ep93xx-rtc", |
455 | .id = -1, | 463 | .id = -1, |
456 | .num_resources = 0, | 464 | .num_resources = ARRAY_SIZE(ep93xx_rtc_resource), |
465 | .resource = ep93xx_rtc_resource, | ||
457 | }; | 466 | }; |
458 | 467 | ||
459 | 468 | ||
diff --git a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h index f66be12b856e..78ac1bddc8bc 100644 --- a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h +++ b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h | |||
@@ -147,6 +147,7 @@ | |||
147 | #define EP93XX_PWM_BASE (EP93XX_APB_VIRT_BASE + 0x00110000) | 147 | #define EP93XX_PWM_BASE (EP93XX_APB_VIRT_BASE + 0x00110000) |
148 | 148 | ||
149 | #define EP93XX_RTC_BASE (EP93XX_APB_VIRT_BASE + 0x00120000) | 149 | #define EP93XX_RTC_BASE (EP93XX_APB_VIRT_BASE + 0x00120000) |
150 | #define EP93XX_RTC_PHYS_BASE (EP93XX_APB_PHYS_BASE + 0x00120000) | ||
150 | 151 | ||
151 | #define EP93XX_SYSCON_BASE (EP93XX_APB_VIRT_BASE + 0x00130000) | 152 | #define EP93XX_SYSCON_BASE (EP93XX_APB_VIRT_BASE + 0x00130000) |
152 | #define EP93XX_SYSCON_REG(x) (EP93XX_SYSCON_BASE + (x)) | 153 | #define EP93XX_SYSCON_REG(x) (EP93XX_SYSCON_BASE + (x)) |
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig deleted file mode 100644 index cddd194ac6eb..000000000000 --- a/arch/arm/mach-imx/Kconfig +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | menu "IMX Implementations" | ||
2 | depends on ARCH_IMX | ||
3 | |||
4 | config ARCH_MX1ADS | ||
5 | bool "mx1ads" | ||
6 | depends on ARCH_IMX | ||
7 | select ISA | ||
8 | help | ||
9 | Say Y here if you are using the Motorola MX1ADS board | ||
10 | |||
11 | endmenu | ||
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile deleted file mode 100644 index b047c7e795a9..000000000000 --- a/arch/arm/mach-imx/Makefile +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | # | ||
2 | # Makefile for the linux kernel. | ||
3 | # | ||
4 | |||
5 | # Object file lists. | ||
6 | |||
7 | obj-y += irq.o time.o dma.o generic.o clock.o | ||
8 | |||
9 | obj-$(CONFIG_CPU_FREQ_IMX) += cpufreq.o | ||
10 | |||
11 | # Specific board support | ||
12 | obj-$(CONFIG_ARCH_MX1ADS) += mx1ads.o | ||
13 | |||
14 | # Support for blinky lights | ||
15 | led-y := leds.o | ||
16 | |||
17 | obj-$(CONFIG_LEDS) += $(led-y) | ||
18 | led-$(CONFIG_ARCH_MX1ADS) += leds-mx1ads.o | ||
diff --git a/arch/arm/mach-imx/Makefile.boot b/arch/arm/mach-imx/Makefile.boot deleted file mode 100644 index fd72ce5b8081..000000000000 --- a/arch/arm/mach-imx/Makefile.boot +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | zreladdr-$(CONFIG_ARCH_MX1ADS) := 0x08008000 | ||
2 | |||
diff --git a/arch/arm/mach-imx/clock.c b/arch/arm/mach-imx/clock.c deleted file mode 100644 index cf332aeb942e..000000000000 --- a/arch/arm/mach-imx/clock.c +++ /dev/null | |||
@@ -1,210 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2008 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | ||
18 | |||
19 | #include <linux/kernel.h> | ||
20 | #include <linux/device.h> | ||
21 | #include <linux/list.h> | ||
22 | #include <linux/math64.h> | ||
23 | #include <linux/err.h> | ||
24 | #include <linux/io.h> | ||
25 | |||
26 | #include <mach/hardware.h> | ||
27 | |||
28 | /* | ||
29 | * Very simple approach: We can't disable clocks, so we do | ||
30 | * not need refcounting | ||
31 | */ | ||
32 | |||
33 | struct clk { | ||
34 | struct list_head node; | ||
35 | const char *name; | ||
36 | unsigned long (*get_rate)(void); | ||
37 | }; | ||
38 | |||
39 | /* | ||
40 | * get the system pll clock in Hz | ||
41 | * | ||
42 | * mfi + mfn / (mfd +1) | ||
43 | * f = 2 * f_ref * -------------------- | ||
44 | * pd + 1 | ||
45 | */ | ||
46 | static unsigned long imx_decode_pll(unsigned int pll, u32 f_ref) | ||
47 | { | ||
48 | unsigned long long ll; | ||
49 | unsigned long quot; | ||
50 | |||
51 | u32 mfi = (pll >> 10) & 0xf; | ||
52 | u32 mfn = pll & 0x3ff; | ||
53 | u32 mfd = (pll >> 16) & 0x3ff; | ||
54 | u32 pd = (pll >> 26) & 0xf; | ||
55 | |||
56 | mfi = mfi <= 5 ? 5 : mfi; | ||
57 | |||
58 | ll = 2 * (unsigned long long)f_ref * | ||
59 | ((mfi << 16) + (mfn << 16) / (mfd + 1)); | ||
60 | quot = (pd + 1) * (1 << 16); | ||
61 | ll += quot / 2; | ||
62 | do_div(ll, quot); | ||
63 | return (unsigned long)ll; | ||
64 | } | ||
65 | |||
66 | static unsigned long imx_get_system_clk(void) | ||
67 | { | ||
68 | u32 f_ref = (CSCR & CSCR_SYSTEM_SEL) ? 16000000 : (CLK32 * 512); | ||
69 | |||
70 | return imx_decode_pll(SPCTL0, f_ref); | ||
71 | } | ||
72 | |||
73 | static unsigned long imx_get_mcu_clk(void) | ||
74 | { | ||
75 | return imx_decode_pll(MPCTL0, CLK32 * 512); | ||
76 | } | ||
77 | |||
78 | /* | ||
79 | * get peripheral clock 1 ( UART[12], Timer[12], PWM ) | ||
80 | */ | ||
81 | static unsigned long imx_get_perclk1(void) | ||
82 | { | ||
83 | return imx_get_system_clk() / (((PCDR) & 0xf)+1); | ||
84 | } | ||
85 | |||
86 | /* | ||
87 | * get peripheral clock 2 ( LCD, SD, SPI[12] ) | ||
88 | */ | ||
89 | static unsigned long imx_get_perclk2(void) | ||
90 | { | ||
91 | return imx_get_system_clk() / (((PCDR>>4) & 0xf)+1); | ||
92 | } | ||
93 | |||
94 | /* | ||
95 | * get peripheral clock 3 ( SSI ) | ||
96 | */ | ||
97 | static unsigned long imx_get_perclk3(void) | ||
98 | { | ||
99 | return imx_get_system_clk() / (((PCDR>>16) & 0x7f)+1); | ||
100 | } | ||
101 | |||
102 | /* | ||
103 | * get hclk ( SDRAM, CSI, Memory Stick, I2C, DMA ) | ||
104 | */ | ||
105 | static unsigned long imx_get_hclk(void) | ||
106 | { | ||
107 | return imx_get_system_clk() / (((CSCR>>10) & 0xf)+1); | ||
108 | } | ||
109 | |||
110 | static struct clk clk_system_clk = { | ||
111 | .name = "system_clk", | ||
112 | .get_rate = imx_get_system_clk, | ||
113 | }; | ||
114 | |||
115 | static struct clk clk_hclk = { | ||
116 | .name = "hclk", | ||
117 | .get_rate = imx_get_hclk, | ||
118 | }; | ||
119 | |||
120 | static struct clk clk_mcu_clk = { | ||
121 | .name = "mcu_clk", | ||
122 | .get_rate = imx_get_mcu_clk, | ||
123 | }; | ||
124 | |||
125 | static struct clk clk_perclk1 = { | ||
126 | .name = "perclk1", | ||
127 | .get_rate = imx_get_perclk1, | ||
128 | }; | ||
129 | |||
130 | static struct clk clk_uart_clk = { | ||
131 | .name = "uart_clk", | ||
132 | .get_rate = imx_get_perclk1, | ||
133 | }; | ||
134 | |||
135 | static struct clk clk_perclk2 = { | ||
136 | .name = "perclk2", | ||
137 | .get_rate = imx_get_perclk2, | ||
138 | }; | ||
139 | |||
140 | static struct clk clk_perclk3 = { | ||
141 | .name = "perclk3", | ||
142 | .get_rate = imx_get_perclk3, | ||
143 | }; | ||
144 | |||
145 | static struct clk *clks[] = { | ||
146 | &clk_perclk1, | ||
147 | &clk_perclk2, | ||
148 | &clk_perclk3, | ||
149 | &clk_system_clk, | ||
150 | &clk_hclk, | ||
151 | &clk_mcu_clk, | ||
152 | &clk_uart_clk, | ||
153 | }; | ||
154 | |||
155 | static LIST_HEAD(clocks); | ||
156 | static DEFINE_MUTEX(clocks_mutex); | ||
157 | |||
158 | struct clk *clk_get(struct device *dev, const char *id) | ||
159 | { | ||
160 | struct clk *p, *clk = ERR_PTR(-ENOENT); | ||
161 | |||
162 | mutex_lock(&clocks_mutex); | ||
163 | list_for_each_entry(p, &clocks, node) { | ||
164 | if (!strcmp(p->name, id)) { | ||
165 | clk = p; | ||
166 | goto found; | ||
167 | } | ||
168 | } | ||
169 | |||
170 | found: | ||
171 | mutex_unlock(&clocks_mutex); | ||
172 | |||
173 | return clk; | ||
174 | } | ||
175 | EXPORT_SYMBOL(clk_get); | ||
176 | |||
177 | void clk_put(struct clk *clk) | ||
178 | { | ||
179 | } | ||
180 | EXPORT_SYMBOL(clk_put); | ||
181 | |||
182 | int clk_enable(struct clk *clk) | ||
183 | { | ||
184 | return 0; | ||
185 | } | ||
186 | EXPORT_SYMBOL(clk_enable); | ||
187 | |||
188 | void clk_disable(struct clk *clk) | ||
189 | { | ||
190 | } | ||
191 | EXPORT_SYMBOL(clk_disable); | ||
192 | |||
193 | unsigned long clk_get_rate(struct clk *clk) | ||
194 | { | ||
195 | return clk->get_rate(); | ||
196 | } | ||
197 | EXPORT_SYMBOL(clk_get_rate); | ||
198 | |||
199 | int imx_clocks_init(void) | ||
200 | { | ||
201 | int i; | ||
202 | |||
203 | mutex_lock(&clocks_mutex); | ||
204 | for (i = 0; i < ARRAY_SIZE(clks); i++) | ||
205 | list_add(&clks[i]->node, &clocks); | ||
206 | mutex_unlock(&clocks_mutex); | ||
207 | |||
208 | return 0; | ||
209 | } | ||
210 | |||
diff --git a/arch/arm/mach-imx/cpufreq.c b/arch/arm/mach-imx/cpufreq.c deleted file mode 100644 index 434b4ca0af67..000000000000 --- a/arch/arm/mach-imx/cpufreq.c +++ /dev/null | |||
@@ -1,315 +0,0 @@ | |||
1 | /* | ||
2 | * cpu.c: clock scaling for the iMX | ||
3 | * | ||
4 | * Copyright (C) 2000 2001, The Delft University of Technology | ||
5 | * Copyright (c) 2004 Sascha Hauer <sascha@saschahauer.de> | ||
6 | * Copyright (C) 2006 Inky Lung <ilung@cwlinux.com> | ||
7 | * Copyright (C) 2006 Pavel Pisa, PiKRON <ppisa@pikron.com> | ||
8 | * | ||
9 | * Based on SA1100 version written by: | ||
10 | * - Johan Pouwelse (J.A.Pouwelse@its.tudelft.nl): initial version | ||
11 | * - Erik Mouw (J.A.K.Mouw@its.tudelft.nl): | ||
12 | * | ||
13 | * This program is free software; you can redistribute it and/or modify | ||
14 | * it under the terms of the GNU General Public License as published by | ||
15 | * the Free Software Foundation; either version 2 of the License, or | ||
16 | * (at your option) any later version. | ||
17 | * | ||
18 | * This program is distributed in the hope that it will be useful, | ||
19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
21 | * GNU General Public License for more details. | ||
22 | * | ||
23 | * You should have received a copy of the GNU General Public License | ||
24 | * along with this program; if not, write to the Free Software | ||
25 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
26 | * | ||
27 | */ | ||
28 | |||
29 | /*#define DEBUG*/ | ||
30 | |||
31 | #include <linux/kernel.h> | ||
32 | #include <linux/types.h> | ||
33 | #include <linux/init.h> | ||
34 | #include <linux/cpufreq.h> | ||
35 | #include <linux/clk.h> | ||
36 | #include <linux/err.h> | ||
37 | #include <asm/system.h> | ||
38 | |||
39 | #include <mach/hardware.h> | ||
40 | |||
41 | #include "generic.h" | ||
42 | |||
43 | #ifndef __val2mfld | ||
44 | #define __val2mfld(mask,val) (((mask)&~((mask)<<1))*(val)&(mask)) | ||
45 | #endif | ||
46 | #ifndef __mfld2val | ||
47 | #define __mfld2val(mask,val) (((val)&(mask))/((mask)&~((mask)<<1))) | ||
48 | #endif | ||
49 | |||
50 | #define CR_920T_CLOCK_MODE 0xC0000000 | ||
51 | #define CR_920T_FASTBUS_MODE 0x00000000 | ||
52 | #define CR_920T_ASYNC_MODE 0xC0000000 | ||
53 | |||
54 | static u32 mpctl0_at_boot; | ||
55 | static u32 bclk_div_at_boot; | ||
56 | |||
57 | static struct clk *system_clk, *mcu_clk; | ||
58 | |||
59 | static void imx_set_async_mode(void) | ||
60 | { | ||
61 | adjust_cr(CR_920T_CLOCK_MODE, CR_920T_ASYNC_MODE); | ||
62 | } | ||
63 | |||
64 | static void imx_set_fastbus_mode(void) | ||
65 | { | ||
66 | adjust_cr(CR_920T_CLOCK_MODE, CR_920T_FASTBUS_MODE); | ||
67 | } | ||
68 | |||
69 | static void imx_set_mpctl0(u32 mpctl0) | ||
70 | { | ||
71 | unsigned long flags; | ||
72 | |||
73 | if (mpctl0 == 0) { | ||
74 | local_irq_save(flags); | ||
75 | CSCR &= ~CSCR_MPEN; | ||
76 | local_irq_restore(flags); | ||
77 | return; | ||
78 | } | ||
79 | |||
80 | local_irq_save(flags); | ||
81 | MPCTL0 = mpctl0; | ||
82 | CSCR |= CSCR_MPEN; | ||
83 | local_irq_restore(flags); | ||
84 | } | ||
85 | |||
86 | /** | ||
87 | * imx_compute_mpctl - compute new PLL parameters | ||
88 | * @new_mpctl: pointer to location assigned by new PLL control register value | ||
89 | * @cur_mpctl: current PLL control register parameters | ||
90 | * @f_ref: reference source frequency Hz | ||
91 | * @freq: required frequency in Hz | ||
92 | * @relation: is one of %CPUFREQ_RELATION_L (supremum) | ||
93 | * and %CPUFREQ_RELATION_H (infimum) | ||
94 | */ | ||
95 | long imx_compute_mpctl(u32 *new_mpctl, u32 cur_mpctl, u32 f_ref, unsigned long freq, int relation) | ||
96 | { | ||
97 | u32 mfi; | ||
98 | u32 mfn; | ||
99 | u32 mfd; | ||
100 | u32 pd; | ||
101 | unsigned long long ll; | ||
102 | long l; | ||
103 | long quot; | ||
104 | |||
105 | /* Fdppl=2*Fref*(MFI+MFN/(MFD+1))/(PD+1) */ | ||
106 | /* PD=<0,15>, MFD=<1,1023>, MFI=<5,15> MFN=<0,1022> */ | ||
107 | |||
108 | if (cur_mpctl) { | ||
109 | mfd = ((cur_mpctl >> 16) & 0x3ff) + 1; | ||
110 | pd = ((cur_mpctl >> 26) & 0xf) + 1; | ||
111 | } else { | ||
112 | pd=2; mfd=313; | ||
113 | } | ||
114 | |||
115 | /* pd=2; mfd=313; mfi=8; mfn=183; */ | ||
116 | /* (MFI+MFN/(MFD)) = Fdppl / (2*Fref) * (PD); */ | ||
117 | |||
118 | quot = (f_ref + (1 << 9)) >> 10; | ||
119 | l = (freq * pd + quot) / (2 * quot); | ||
120 | mfi = l >> 10; | ||
121 | mfn = ((l & ((1 << 10) - 1)) * mfd + (1 << 9)) >> 10; | ||
122 | |||
123 | mfd -= 1; | ||
124 | pd -= 1; | ||
125 | |||
126 | *new_mpctl = ((mfi & 0xf) << 10) | (mfn & 0x3ff) | ((mfd & 0x3ff) << 16) | ||
127 | | ((pd & 0xf) << 26); | ||
128 | |||
129 | ll = 2 * (unsigned long long)f_ref * ( (mfi<<16) + (mfn<<16) / (mfd+1) ); | ||
130 | quot = (pd+1) * (1<<16); | ||
131 | ll += quot / 2; | ||
132 | do_div(ll, quot); | ||
133 | freq = ll; | ||
134 | |||
135 | pr_debug(KERN_DEBUG "imx: new PLL parameters pd=%d mfd=%d mfi=%d mfn=%d, freq=%ld\n", | ||
136 | pd, mfd, mfi, mfn, freq); | ||
137 | |||
138 | return freq; | ||
139 | } | ||
140 | |||
141 | |||
142 | static int imx_verify_speed(struct cpufreq_policy *policy) | ||
143 | { | ||
144 | if (policy->cpu != 0) | ||
145 | return -EINVAL; | ||
146 | |||
147 | cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq, policy->cpuinfo.max_freq); | ||
148 | |||
149 | return 0; | ||
150 | } | ||
151 | |||
152 | static unsigned int imx_get_speed(unsigned int cpu) | ||
153 | { | ||
154 | unsigned int freq; | ||
155 | unsigned int cr; | ||
156 | unsigned int cscr; | ||
157 | unsigned int bclk_div; | ||
158 | |||
159 | if (cpu) | ||
160 | return 0; | ||
161 | |||
162 | cscr = CSCR; | ||
163 | bclk_div = __mfld2val(CSCR_BCLK_DIV, cscr) + 1; | ||
164 | cr = get_cr(); | ||
165 | |||
166 | if((cr & CR_920T_CLOCK_MODE) == CR_920T_FASTBUS_MODE) { | ||
167 | freq = clk_get_rate(system_clk); | ||
168 | freq = (freq + bclk_div/2) / bclk_div; | ||
169 | } else { | ||
170 | freq = clk_get_rate(mcu_clk); | ||
171 | if (cscr & CSCR_MPU_PRESC) | ||
172 | freq /= 2; | ||
173 | } | ||
174 | |||
175 | freq = (freq + 500) / 1000; | ||
176 | |||
177 | return freq; | ||
178 | } | ||
179 | |||
180 | static int imx_set_target(struct cpufreq_policy *policy, | ||
181 | unsigned int target_freq, | ||
182 | unsigned int relation) | ||
183 | { | ||
184 | struct cpufreq_freqs freqs; | ||
185 | u32 mpctl0 = 0; | ||
186 | u32 cscr; | ||
187 | unsigned long flags; | ||
188 | long freq; | ||
189 | long sysclk; | ||
190 | unsigned int bclk_div = bclk_div_at_boot; | ||
191 | |||
192 | /* | ||
193 | * Some governors do not respects CPU and policy lower limits | ||
194 | * which leads to bad things (division by zero etc), ensure | ||
195 | * that such things do not happen. | ||
196 | */ | ||
197 | if(target_freq < policy->cpuinfo.min_freq) | ||
198 | target_freq = policy->cpuinfo.min_freq; | ||
199 | |||
200 | if(target_freq < policy->min) | ||
201 | target_freq = policy->min; | ||
202 | |||
203 | freq = target_freq * 1000; | ||
204 | |||
205 | pr_debug(KERN_DEBUG "imx: requested frequency %ld Hz, mpctl0 at boot 0x%08x\n", | ||
206 | freq, mpctl0_at_boot); | ||
207 | |||
208 | sysclk = clk_get_rate(system_clk); | ||
209 | |||
210 | if (freq > sysclk / bclk_div_at_boot + 1000000) { | ||
211 | freq = imx_compute_mpctl(&mpctl0, mpctl0_at_boot, CLK32 * 512, freq, relation); | ||
212 | if (freq < 0) { | ||
213 | printk(KERN_WARNING "imx: target frequency %ld Hz cannot be set\n", freq); | ||
214 | return -EINVAL; | ||
215 | } | ||
216 | } else { | ||
217 | if(freq + 1000 < sysclk) { | ||
218 | if (relation == CPUFREQ_RELATION_L) | ||
219 | bclk_div = (sysclk - 1000) / freq; | ||
220 | else | ||
221 | bclk_div = (sysclk + freq + 1000) / freq; | ||
222 | |||
223 | if(bclk_div > 16) | ||
224 | bclk_div = 16; | ||
225 | if(bclk_div < bclk_div_at_boot) | ||
226 | bclk_div = bclk_div_at_boot; | ||
227 | } | ||
228 | freq = (sysclk + bclk_div / 2) / bclk_div; | ||
229 | } | ||
230 | |||
231 | freqs.old = imx_get_speed(0); | ||
232 | freqs.new = (freq + 500) / 1000; | ||
233 | freqs.cpu = 0; | ||
234 | freqs.flags = 0; | ||
235 | |||
236 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); | ||
237 | |||
238 | local_irq_save(flags); | ||
239 | |||
240 | imx_set_fastbus_mode(); | ||
241 | |||
242 | imx_set_mpctl0(mpctl0); | ||
243 | |||
244 | cscr = CSCR; | ||
245 | cscr &= ~CSCR_BCLK_DIV; | ||
246 | cscr |= __val2mfld(CSCR_BCLK_DIV, bclk_div - 1); | ||
247 | CSCR = cscr; | ||
248 | |||
249 | if(mpctl0) { | ||
250 | CSCR |= CSCR_MPLL_RESTART; | ||
251 | |||
252 | /* Wait until MPLL is stabilized */ | ||
253 | while( CSCR & CSCR_MPLL_RESTART ); | ||
254 | |||
255 | imx_set_async_mode(); | ||
256 | } | ||
257 | |||
258 | local_irq_restore(flags); | ||
259 | |||
260 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); | ||
261 | |||
262 | pr_debug(KERN_INFO "imx: set frequency %ld Hz, running from %s\n", | ||
263 | freq, mpctl0? "MPLL": "SPLL"); | ||
264 | |||
265 | return 0; | ||
266 | } | ||
267 | |||
268 | static int __init imx_cpufreq_driver_init(struct cpufreq_policy *policy) | ||
269 | { | ||
270 | printk(KERN_INFO "i.MX cpu freq change driver v1.0\n"); | ||
271 | |||
272 | if (policy->cpu != 0) | ||
273 | return -EINVAL; | ||
274 | |||
275 | policy->cur = policy->min = policy->max = imx_get_speed(0); | ||
276 | policy->cpuinfo.min_freq = 8000; | ||
277 | policy->cpuinfo.max_freq = 200000; | ||
278 | /* Manual states, that PLL stabilizes in two CLK32 periods */ | ||
279 | policy->cpuinfo.transition_latency = 4 * 1000000000LL / CLK32; | ||
280 | return 0; | ||
281 | } | ||
282 | |||
283 | static struct cpufreq_driver imx_driver = { | ||
284 | .flags = CPUFREQ_STICKY, | ||
285 | .verify = imx_verify_speed, | ||
286 | .target = imx_set_target, | ||
287 | .get = imx_get_speed, | ||
288 | .init = imx_cpufreq_driver_init, | ||
289 | .name = "imx", | ||
290 | }; | ||
291 | |||
292 | static int __init imx_cpufreq_init(void) | ||
293 | { | ||
294 | bclk_div_at_boot = __mfld2val(CSCR_BCLK_DIV, CSCR) + 1; | ||
295 | mpctl0_at_boot = 0; | ||
296 | |||
297 | system_clk = clk_get(NULL, "system_clk"); | ||
298 | if (IS_ERR(system_clk)) | ||
299 | return PTR_ERR(system_clk); | ||
300 | |||
301 | mcu_clk = clk_get(NULL, "mcu_clk"); | ||
302 | if (IS_ERR(mcu_clk)) { | ||
303 | clk_put(system_clk); | ||
304 | return PTR_ERR(mcu_clk); | ||
305 | } | ||
306 | |||
307 | if((CSCR & CSCR_MPEN) && | ||
308 | ((get_cr() & CR_920T_CLOCK_MODE) != CR_920T_FASTBUS_MODE)) | ||
309 | mpctl0_at_boot = MPCTL0; | ||
310 | |||
311 | return cpufreq_register_driver(&imx_driver); | ||
312 | } | ||
313 | |||
314 | arch_initcall(imx_cpufreq_init); | ||
315 | |||
diff --git a/arch/arm/mach-imx/dma.c b/arch/arm/mach-imx/dma.c deleted file mode 100644 index 1536583eece0..000000000000 --- a/arch/arm/mach-imx/dma.c +++ /dev/null | |||
@@ -1,597 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-imx/dma.c | ||
3 | * | ||
4 | * imx DMA registration and IRQ dispatching | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * 2004-03-03 Sascha Hauer <sascha@saschahauer.de> | ||
11 | * initial version heavily inspired by | ||
12 | * linux/arch/arm/mach-pxa/dma.c | ||
13 | * | ||
14 | * 2005-04-17 Pavel Pisa <pisa@cmp.felk.cvut.cz> | ||
15 | * Changed to support scatter gather DMA | ||
16 | * by taking Russell's code from RiscPC | ||
17 | * | ||
18 | * 2006-05-31 Pavel Pisa <pisa@cmp.felk.cvut.cz> | ||
19 | * Corrected error handling code. | ||
20 | * | ||
21 | */ | ||
22 | |||
23 | #undef DEBUG | ||
24 | |||
25 | #include <linux/module.h> | ||
26 | #include <linux/init.h> | ||
27 | #include <linux/kernel.h> | ||
28 | #include <linux/interrupt.h> | ||
29 | #include <linux/errno.h> | ||
30 | |||
31 | #include <asm/scatterlist.h> | ||
32 | #include <asm/system.h> | ||
33 | #include <asm/irq.h> | ||
34 | #include <mach/hardware.h> | ||
35 | #include <mach/dma.h> | ||
36 | #include <mach/imx-dma.h> | ||
37 | |||
38 | struct imx_dma_channel imx_dma_channels[IMX_DMA_CHANNELS]; | ||
39 | |||
40 | /* | ||
41 | * imx_dma_sg_next - prepare next chunk for scatter-gather DMA emulation | ||
42 | * @dma_ch: i.MX DMA channel number | ||
43 | * @lastcount: number of bytes transferred during last transfer | ||
44 | * | ||
45 | * Functions prepares DMA controller for next sg data chunk transfer. | ||
46 | * The @lastcount argument informs function about number of bytes transferred | ||
47 | * during last block. Zero value can be used for @lastcount to setup DMA | ||
48 | * for the first chunk. | ||
49 | */ | ||
50 | static inline int imx_dma_sg_next(imx_dmach_t dma_ch, unsigned int lastcount) | ||
51 | { | ||
52 | struct imx_dma_channel *imxdma = &imx_dma_channels[dma_ch]; | ||
53 | unsigned int nextcount; | ||
54 | unsigned int nextaddr; | ||
55 | |||
56 | if (!imxdma->name) { | ||
57 | printk(KERN_CRIT "%s: called for not allocated channel %d\n", | ||
58 | __func__, dma_ch); | ||
59 | return 0; | ||
60 | } | ||
61 | |||
62 | imxdma->resbytes -= lastcount; | ||
63 | |||
64 | if (!imxdma->sg) { | ||
65 | pr_debug("imxdma%d: no sg data\n", dma_ch); | ||
66 | return 0; | ||
67 | } | ||
68 | |||
69 | imxdma->sgbc += lastcount; | ||
70 | if ((imxdma->sgbc >= imxdma->sg->length) || !imxdma->resbytes) { | ||
71 | if ((imxdma->sgcount <= 1) || !imxdma->resbytes) { | ||
72 | pr_debug("imxdma%d: sg transfer limit reached\n", | ||
73 | dma_ch); | ||
74 | imxdma->sgcount=0; | ||
75 | imxdma->sg = NULL; | ||
76 | return 0; | ||
77 | } else { | ||
78 | imxdma->sgcount--; | ||
79 | imxdma->sg++; | ||
80 | imxdma->sgbc = 0; | ||
81 | } | ||
82 | } | ||
83 | nextcount = imxdma->sg->length - imxdma->sgbc; | ||
84 | nextaddr = imxdma->sg->dma_address + imxdma->sgbc; | ||
85 | |||
86 | if(imxdma->resbytes < nextcount) | ||
87 | nextcount = imxdma->resbytes; | ||
88 | |||
89 | if ((imxdma->dma_mode & DMA_MODE_MASK) == DMA_MODE_READ) | ||
90 | DAR(dma_ch) = nextaddr; | ||
91 | else | ||
92 | SAR(dma_ch) = nextaddr; | ||
93 | |||
94 | CNTR(dma_ch) = nextcount; | ||
95 | pr_debug("imxdma%d: next sg chunk dst 0x%08x, src 0x%08x, size 0x%08x\n", | ||
96 | dma_ch, DAR(dma_ch), SAR(dma_ch), CNTR(dma_ch)); | ||
97 | |||
98 | return nextcount; | ||
99 | } | ||
100 | |||
101 | /* | ||
102 | * imx_dma_setup_sg_base - scatter-gather DMA emulation | ||
103 | * @dma_ch: i.MX DMA channel number | ||
104 | * @sg: pointer to the scatter-gather list/vector | ||
105 | * @sgcount: scatter-gather list hungs count | ||
106 | * | ||
107 | * Functions sets up i.MX DMA state for emulated scatter-gather transfer | ||
108 | * and sets up channel registers to be ready for the first chunk | ||
109 | */ | ||
110 | static int | ||
111 | imx_dma_setup_sg_base(imx_dmach_t dma_ch, | ||
112 | struct scatterlist *sg, unsigned int sgcount) | ||
113 | { | ||
114 | struct imx_dma_channel *imxdma = &imx_dma_channels[dma_ch]; | ||
115 | |||
116 | imxdma->sg = sg; | ||
117 | imxdma->sgcount = sgcount; | ||
118 | imxdma->sgbc = 0; | ||
119 | return imx_dma_sg_next(dma_ch, 0); | ||
120 | } | ||
121 | |||
122 | /** | ||
123 | * imx_dma_setup_single - setup i.MX DMA channel for linear memory to/from device transfer | ||
124 | * @dma_ch: i.MX DMA channel number | ||
125 | * @dma_address: the DMA/physical memory address of the linear data block | ||
126 | * to transfer | ||
127 | * @dma_length: length of the data block in bytes | ||
128 | * @dev_addr: physical device port address | ||
129 | * @dmamode: DMA transfer mode, %DMA_MODE_READ from the device to the memory | ||
130 | * or %DMA_MODE_WRITE from memory to the device | ||
131 | * | ||
132 | * The function setups DMA channel source and destination addresses for transfer | ||
133 | * specified by provided parameters. The scatter-gather emulation is disabled, | ||
134 | * because linear data block | ||
135 | * form the physical address range is transferred. | ||
136 | * Return value: if incorrect parameters are provided -%EINVAL. | ||
137 | * Zero indicates success. | ||
138 | */ | ||
139 | int | ||
140 | imx_dma_setup_single(imx_dmach_t dma_ch, dma_addr_t dma_address, | ||
141 | unsigned int dma_length, unsigned int dev_addr, | ||
142 | unsigned int dmamode) | ||
143 | { | ||
144 | struct imx_dma_channel *imxdma = &imx_dma_channels[dma_ch]; | ||
145 | |||
146 | imxdma->sg = NULL; | ||
147 | imxdma->sgcount = 0; | ||
148 | imxdma->dma_mode = dmamode; | ||
149 | imxdma->resbytes = dma_length; | ||
150 | |||
151 | if (!dma_address) { | ||
152 | printk(KERN_ERR "imxdma%d: imx_dma_setup_single null address\n", | ||
153 | dma_ch); | ||
154 | return -EINVAL; | ||
155 | } | ||
156 | |||
157 | if (!dma_length) { | ||
158 | printk(KERN_ERR "imxdma%d: imx_dma_setup_single zero length\n", | ||
159 | dma_ch); | ||
160 | return -EINVAL; | ||
161 | } | ||
162 | |||
163 | if ((dmamode & DMA_MODE_MASK) == DMA_MODE_READ) { | ||
164 | pr_debug("imxdma%d: mx_dma_setup_single2dev dma_addressg=0x%08x dma_length=%d dev_addr=0x%08x for read\n", | ||
165 | dma_ch, (unsigned int)dma_address, dma_length, | ||
166 | dev_addr); | ||
167 | SAR(dma_ch) = dev_addr; | ||
168 | DAR(dma_ch) = (unsigned int)dma_address; | ||
169 | } else if ((dmamode & DMA_MODE_MASK) == DMA_MODE_WRITE) { | ||
170 | pr_debug("imxdma%d: mx_dma_setup_single2dev dma_addressg=0x%08x dma_length=%d dev_addr=0x%08x for write\n", | ||
171 | dma_ch, (unsigned int)dma_address, dma_length, | ||
172 | dev_addr); | ||
173 | SAR(dma_ch) = (unsigned int)dma_address; | ||
174 | DAR(dma_ch) = dev_addr; | ||
175 | } else { | ||
176 | printk(KERN_ERR "imxdma%d: imx_dma_setup_single bad dmamode\n", | ||
177 | dma_ch); | ||
178 | return -EINVAL; | ||
179 | } | ||
180 | |||
181 | CNTR(dma_ch) = dma_length; | ||
182 | |||
183 | return 0; | ||
184 | } | ||
185 | |||
186 | /** | ||
187 | * imx_dma_setup_sg - setup i.MX DMA channel SG list to/from device transfer | ||
188 | * @dma_ch: i.MX DMA channel number | ||
189 | * @sg: pointer to the scatter-gather list/vector | ||
190 | * @sgcount: scatter-gather list hungs count | ||
191 | * @dma_length: total length of the transfer request in bytes | ||
192 | * @dev_addr: physical device port address | ||
193 | * @dmamode: DMA transfer mode, %DMA_MODE_READ from the device to the memory | ||
194 | * or %DMA_MODE_WRITE from memory to the device | ||
195 | * | ||
196 | * The function sets up DMA channel state and registers to be ready for transfer | ||
197 | * specified by provided parameters. The scatter-gather emulation is set up | ||
198 | * according to the parameters. | ||
199 | * | ||
200 | * The full preparation of the transfer requires setup of more register | ||
201 | * by the caller before imx_dma_enable() can be called. | ||
202 | * | ||
203 | * %BLR(dma_ch) holds transfer burst length in bytes, 0 means 64 bytes | ||
204 | * | ||
205 | * %RSSR(dma_ch) has to be set to the DMA request line source %DMA_REQ_xxx | ||
206 | * | ||
207 | * %CCR(dma_ch) has to specify transfer parameters, the next settings is typical | ||
208 | * for linear or simple scatter-gather transfers if %DMA_MODE_READ is specified | ||
209 | * | ||
210 | * %CCR_DMOD_LINEAR | %CCR_DSIZ_32 | %CCR_SMOD_FIFO | %CCR_SSIZ_x | ||
211 | * | ||
212 | * The typical setup for %DMA_MODE_WRITE is specified by next options combination | ||
213 | * | ||
214 | * %CCR_SMOD_LINEAR | %CCR_SSIZ_32 | %CCR_DMOD_FIFO | %CCR_DSIZ_x | ||
215 | * | ||
216 | * Be careful here and do not mistakenly mix source and target device | ||
217 | * port sizes constants, they are really different: | ||
218 | * %CCR_SSIZ_8, %CCR_SSIZ_16, %CCR_SSIZ_32, | ||
219 | * %CCR_DSIZ_8, %CCR_DSIZ_16, %CCR_DSIZ_32 | ||
220 | * | ||
221 | * Return value: if incorrect parameters are provided -%EINVAL. | ||
222 | * Zero indicates success. | ||
223 | */ | ||
224 | int | ||
225 | imx_dma_setup_sg(imx_dmach_t dma_ch, | ||
226 | struct scatterlist *sg, unsigned int sgcount, unsigned int dma_length, | ||
227 | unsigned int dev_addr, unsigned int dmamode) | ||
228 | { | ||
229 | int res; | ||
230 | struct imx_dma_channel *imxdma = &imx_dma_channels[dma_ch]; | ||
231 | |||
232 | imxdma->sg = NULL; | ||
233 | imxdma->sgcount = 0; | ||
234 | imxdma->dma_mode = dmamode; | ||
235 | imxdma->resbytes = dma_length; | ||
236 | |||
237 | if (!sg || !sgcount) { | ||
238 | printk(KERN_ERR "imxdma%d: imx_dma_setup_sg epty sg list\n", | ||
239 | dma_ch); | ||
240 | return -EINVAL; | ||
241 | } | ||
242 | |||
243 | if (!sg->length) { | ||
244 | printk(KERN_ERR "imxdma%d: imx_dma_setup_sg zero length\n", | ||
245 | dma_ch); | ||
246 | return -EINVAL; | ||
247 | } | ||
248 | |||
249 | if ((dmamode & DMA_MODE_MASK) == DMA_MODE_READ) { | ||
250 | pr_debug("imxdma%d: mx_dma_setup_sg2dev sg=%p sgcount=%d total length=%d dev_addr=0x%08x for read\n", | ||
251 | dma_ch, sg, sgcount, dma_length, dev_addr); | ||
252 | SAR(dma_ch) = dev_addr; | ||
253 | } else if ((dmamode & DMA_MODE_MASK) == DMA_MODE_WRITE) { | ||
254 | pr_debug("imxdma%d: mx_dma_setup_sg2dev sg=%p sgcount=%d total length=%d dev_addr=0x%08x for write\n", | ||
255 | dma_ch, sg, sgcount, dma_length, dev_addr); | ||
256 | DAR(dma_ch) = dev_addr; | ||
257 | } else { | ||
258 | printk(KERN_ERR "imxdma%d: imx_dma_setup_sg bad dmamode\n", | ||
259 | dma_ch); | ||
260 | return -EINVAL; | ||
261 | } | ||
262 | |||
263 | res = imx_dma_setup_sg_base(dma_ch, sg, sgcount); | ||
264 | if (res <= 0) { | ||
265 | printk(KERN_ERR "imxdma%d: no sg chunk ready\n", dma_ch); | ||
266 | return -EINVAL; | ||
267 | } | ||
268 | |||
269 | return 0; | ||
270 | } | ||
271 | |||
272 | /** | ||
273 | * imx_dma_setup_handlers - setup i.MX DMA channel end and error notification handlers | ||
274 | * @dma_ch: i.MX DMA channel number | ||
275 | * @irq_handler: the pointer to the function called if the transfer | ||
276 | * ends successfully | ||
277 | * @err_handler: the pointer to the function called if the premature | ||
278 | * end caused by error occurs | ||
279 | * @data: user specified value to be passed to the handlers | ||
280 | */ | ||
281 | int | ||
282 | imx_dma_setup_handlers(imx_dmach_t dma_ch, | ||
283 | void (*irq_handler) (int, void *), | ||
284 | void (*err_handler) (int, void *, int), | ||
285 | void *data) | ||
286 | { | ||
287 | struct imx_dma_channel *imxdma = &imx_dma_channels[dma_ch]; | ||
288 | unsigned long flags; | ||
289 | |||
290 | if (!imxdma->name) { | ||
291 | printk(KERN_CRIT "%s: called for not allocated channel %d\n", | ||
292 | __func__, dma_ch); | ||
293 | return -ENODEV; | ||
294 | } | ||
295 | |||
296 | local_irq_save(flags); | ||
297 | DISR = (1 << dma_ch); | ||
298 | imxdma->irq_handler = irq_handler; | ||
299 | imxdma->err_handler = err_handler; | ||
300 | imxdma->data = data; | ||
301 | local_irq_restore(flags); | ||
302 | return 0; | ||
303 | } | ||
304 | |||
305 | /** | ||
306 | * imx_dma_enable - function to start i.MX DMA channel operation | ||
307 | * @dma_ch: i.MX DMA channel number | ||
308 | * | ||
309 | * The channel has to be allocated by driver through imx_dma_request() | ||
310 | * or imx_dma_request_by_prio() function. | ||
311 | * The transfer parameters has to be set to the channel registers through | ||
312 | * call of the imx_dma_setup_single() or imx_dma_setup_sg() function | ||
313 | * and registers %BLR(dma_ch), %RSSR(dma_ch) and %CCR(dma_ch) has to | ||
314 | * be set prior this function call by the channel user. | ||
315 | */ | ||
316 | void imx_dma_enable(imx_dmach_t dma_ch) | ||
317 | { | ||
318 | struct imx_dma_channel *imxdma = &imx_dma_channels[dma_ch]; | ||
319 | unsigned long flags; | ||
320 | |||
321 | pr_debug("imxdma%d: imx_dma_enable\n", dma_ch); | ||
322 | |||
323 | if (!imxdma->name) { | ||
324 | printk(KERN_CRIT "%s: called for not allocated channel %d\n", | ||
325 | __func__, dma_ch); | ||
326 | return; | ||
327 | } | ||
328 | |||
329 | local_irq_save(flags); | ||
330 | DISR = (1 << dma_ch); | ||
331 | DIMR &= ~(1 << dma_ch); | ||
332 | CCR(dma_ch) |= CCR_CEN; | ||
333 | local_irq_restore(flags); | ||
334 | } | ||
335 | |||
336 | /** | ||
337 | * imx_dma_disable - stop, finish i.MX DMA channel operatin | ||
338 | * @dma_ch: i.MX DMA channel number | ||
339 | */ | ||
340 | void imx_dma_disable(imx_dmach_t dma_ch) | ||
341 | { | ||
342 | unsigned long flags; | ||
343 | |||
344 | pr_debug("imxdma%d: imx_dma_disable\n", dma_ch); | ||
345 | |||
346 | local_irq_save(flags); | ||
347 | DIMR |= (1 << dma_ch); | ||
348 | CCR(dma_ch) &= ~CCR_CEN; | ||
349 | DISR = (1 << dma_ch); | ||
350 | local_irq_restore(flags); | ||
351 | } | ||
352 | |||
353 | /** | ||
354 | * imx_dma_request - request/allocate specified channel number | ||
355 | * @dma_ch: i.MX DMA channel number | ||
356 | * @name: the driver/caller own non-%NULL identification | ||
357 | */ | ||
358 | int imx_dma_request(imx_dmach_t dma_ch, const char *name) | ||
359 | { | ||
360 | struct imx_dma_channel *imxdma = &imx_dma_channels[dma_ch]; | ||
361 | unsigned long flags; | ||
362 | |||
363 | /* basic sanity checks */ | ||
364 | if (!name) | ||
365 | return -EINVAL; | ||
366 | |||
367 | if (dma_ch >= IMX_DMA_CHANNELS) { | ||
368 | printk(KERN_CRIT "%s: called for non-existed channel %d\n", | ||
369 | __func__, dma_ch); | ||
370 | return -EINVAL; | ||
371 | } | ||
372 | |||
373 | local_irq_save(flags); | ||
374 | if (imxdma->name) { | ||
375 | local_irq_restore(flags); | ||
376 | return -ENODEV; | ||
377 | } | ||
378 | |||
379 | imxdma->name = name; | ||
380 | imxdma->irq_handler = NULL; | ||
381 | imxdma->err_handler = NULL; | ||
382 | imxdma->data = NULL; | ||
383 | imxdma->sg = NULL; | ||
384 | local_irq_restore(flags); | ||
385 | return 0; | ||
386 | } | ||
387 | |||
388 | /** | ||
389 | * imx_dma_free - release previously acquired channel | ||
390 | * @dma_ch: i.MX DMA channel number | ||
391 | */ | ||
392 | void imx_dma_free(imx_dmach_t dma_ch) | ||
393 | { | ||
394 | unsigned long flags; | ||
395 | struct imx_dma_channel *imxdma = &imx_dma_channels[dma_ch]; | ||
396 | |||
397 | if (!imxdma->name) { | ||
398 | printk(KERN_CRIT | ||
399 | "%s: trying to free channel %d which is already freed\n", | ||
400 | __func__, dma_ch); | ||
401 | return; | ||
402 | } | ||
403 | |||
404 | local_irq_save(flags); | ||
405 | /* Disable interrupts */ | ||
406 | DIMR |= (1 << dma_ch); | ||
407 | CCR(dma_ch) &= ~CCR_CEN; | ||
408 | imxdma->name = NULL; | ||
409 | local_irq_restore(flags); | ||
410 | } | ||
411 | |||
412 | /** | ||
413 | * imx_dma_request_by_prio - find and request some of free channels best suiting requested priority | ||
414 | * @name: the driver/caller own non-%NULL identification | ||
415 | * @prio: one of the hardware distinguished priority level: | ||
416 | * %DMA_PRIO_HIGH, %DMA_PRIO_MEDIUM, %DMA_PRIO_LOW | ||
417 | * | ||
418 | * This function tries to find free channel in the specified priority group | ||
419 | * if the priority cannot be achieved it tries to look for free channel | ||
420 | * in the higher and then even lower priority groups. | ||
421 | * | ||
422 | * Return value: If there is no free channel to allocate, -%ENODEV is returned. | ||
423 | * On successful allocation channel is returned. | ||
424 | */ | ||
425 | imx_dmach_t imx_dma_request_by_prio(const char *name, imx_dma_prio prio) | ||
426 | { | ||
427 | int i; | ||
428 | int best; | ||
429 | |||
430 | switch (prio) { | ||
431 | case (DMA_PRIO_HIGH): | ||
432 | best = 8; | ||
433 | break; | ||
434 | case (DMA_PRIO_MEDIUM): | ||
435 | best = 4; | ||
436 | break; | ||
437 | case (DMA_PRIO_LOW): | ||
438 | default: | ||
439 | best = 0; | ||
440 | break; | ||
441 | } | ||
442 | |||
443 | for (i = best; i < IMX_DMA_CHANNELS; i++) { | ||
444 | if (!imx_dma_request(i, name)) { | ||
445 | return i; | ||
446 | } | ||
447 | } | ||
448 | |||
449 | for (i = best - 1; i >= 0; i--) { | ||
450 | if (!imx_dma_request(i, name)) { | ||
451 | return i; | ||
452 | } | ||
453 | } | ||
454 | |||
455 | printk(KERN_ERR "%s: no free DMA channel found\n", __func__); | ||
456 | |||
457 | return -ENODEV; | ||
458 | } | ||
459 | |||
460 | static irqreturn_t dma_err_handler(int irq, void *dev_id) | ||
461 | { | ||
462 | int i, disr = DISR; | ||
463 | struct imx_dma_channel *channel; | ||
464 | unsigned int err_mask = DBTOSR | DRTOSR | DSESR | DBOSR; | ||
465 | int errcode; | ||
466 | |||
467 | DISR = disr & err_mask; | ||
468 | for (i = 0; i < IMX_DMA_CHANNELS; i++) { | ||
469 | if(!(err_mask & (1 << i))) | ||
470 | continue; | ||
471 | channel = &imx_dma_channels[i]; | ||
472 | errcode = 0; | ||
473 | |||
474 | if (DBTOSR & (1 << i)) { | ||
475 | DBTOSR = (1 << i); | ||
476 | errcode |= IMX_DMA_ERR_BURST; | ||
477 | } | ||
478 | if (DRTOSR & (1 << i)) { | ||
479 | DRTOSR = (1 << i); | ||
480 | errcode |= IMX_DMA_ERR_REQUEST; | ||
481 | } | ||
482 | if (DSESR & (1 << i)) { | ||
483 | DSESR = (1 << i); | ||
484 | errcode |= IMX_DMA_ERR_TRANSFER; | ||
485 | } | ||
486 | if (DBOSR & (1 << i)) { | ||
487 | DBOSR = (1 << i); | ||
488 | errcode |= IMX_DMA_ERR_BUFFER; | ||
489 | } | ||
490 | |||
491 | /* | ||
492 | * The cleaning of @sg field would be questionable | ||
493 | * there, because its value can help to compute | ||
494 | * remaining/transferred bytes count in the handler | ||
495 | */ | ||
496 | /*imx_dma_channels[i].sg = NULL;*/ | ||
497 | |||
498 | if (channel->name && channel->err_handler) { | ||
499 | channel->err_handler(i, channel->data, errcode); | ||
500 | continue; | ||
501 | } | ||
502 | |||
503 | imx_dma_channels[i].sg = NULL; | ||
504 | |||
505 | printk(KERN_WARNING | ||
506 | "DMA timeout on channel %d (%s) -%s%s%s%s\n", | ||
507 | i, channel->name, | ||
508 | errcode&IMX_DMA_ERR_BURST? " burst":"", | ||
509 | errcode&IMX_DMA_ERR_REQUEST? " request":"", | ||
510 | errcode&IMX_DMA_ERR_TRANSFER? " transfer":"", | ||
511 | errcode&IMX_DMA_ERR_BUFFER? " buffer":""); | ||
512 | } | ||
513 | return IRQ_HANDLED; | ||
514 | } | ||
515 | |||
516 | static irqreturn_t dma_irq_handler(int irq, void *dev_id) | ||
517 | { | ||
518 | int i, disr = DISR; | ||
519 | |||
520 | pr_debug("imxdma: dma_irq_handler called, disr=0x%08x\n", | ||
521 | disr); | ||
522 | |||
523 | DISR = disr; | ||
524 | for (i = 0; i < IMX_DMA_CHANNELS; i++) { | ||
525 | if (disr & (1 << i)) { | ||
526 | struct imx_dma_channel *channel = &imx_dma_channels[i]; | ||
527 | if (channel->name) { | ||
528 | if (imx_dma_sg_next(i, CNTR(i))) { | ||
529 | CCR(i) &= ~CCR_CEN; | ||
530 | mb(); | ||
531 | CCR(i) |= CCR_CEN; | ||
532 | } else { | ||
533 | if (channel->irq_handler) | ||
534 | channel->irq_handler(i, | ||
535 | channel->data); | ||
536 | } | ||
537 | } else { | ||
538 | /* | ||
539 | * IRQ for an unregistered DMA channel: | ||
540 | * let's clear the interrupts and disable it. | ||
541 | */ | ||
542 | printk(KERN_WARNING | ||
543 | "spurious IRQ for DMA channel %d\n", i); | ||
544 | } | ||
545 | } | ||
546 | } | ||
547 | return IRQ_HANDLED; | ||
548 | } | ||
549 | |||
550 | static int __init imx_dma_init(void) | ||
551 | { | ||
552 | int ret; | ||
553 | int i; | ||
554 | |||
555 | /* reset DMA module */ | ||
556 | DCR = DCR_DRST; | ||
557 | |||
558 | ret = request_irq(DMA_INT, dma_irq_handler, 0, "DMA", NULL); | ||
559 | if (ret) { | ||
560 | printk(KERN_CRIT "Wow! Can't register IRQ for DMA\n"); | ||
561 | return ret; | ||
562 | } | ||
563 | |||
564 | ret = request_irq(DMA_ERR, dma_err_handler, 0, "DMA", NULL); | ||
565 | if (ret) { | ||
566 | printk(KERN_CRIT "Wow! Can't register ERRIRQ for DMA\n"); | ||
567 | free_irq(DMA_INT, NULL); | ||
568 | } | ||
569 | |||
570 | /* enable DMA module */ | ||
571 | DCR = DCR_DEN; | ||
572 | |||
573 | /* clear all interrupts */ | ||
574 | DISR = (1 << IMX_DMA_CHANNELS) - 1; | ||
575 | |||
576 | /* enable interrupts */ | ||
577 | DIMR = (1 << IMX_DMA_CHANNELS) - 1; | ||
578 | |||
579 | for (i = 0; i < IMX_DMA_CHANNELS; i++) { | ||
580 | imx_dma_channels[i].sg = NULL; | ||
581 | imx_dma_channels[i].dma_num = i; | ||
582 | } | ||
583 | |||
584 | return ret; | ||
585 | } | ||
586 | |||
587 | arch_initcall(imx_dma_init); | ||
588 | |||
589 | EXPORT_SYMBOL(imx_dma_setup_single); | ||
590 | EXPORT_SYMBOL(imx_dma_setup_sg); | ||
591 | EXPORT_SYMBOL(imx_dma_setup_handlers); | ||
592 | EXPORT_SYMBOL(imx_dma_enable); | ||
593 | EXPORT_SYMBOL(imx_dma_disable); | ||
594 | EXPORT_SYMBOL(imx_dma_request); | ||
595 | EXPORT_SYMBOL(imx_dma_free); | ||
596 | EXPORT_SYMBOL(imx_dma_request_by_prio); | ||
597 | EXPORT_SYMBOL(imx_dma_channels); | ||
diff --git a/arch/arm/mach-imx/generic.c b/arch/arm/mach-imx/generic.c deleted file mode 100644 index 05f1739ee127..000000000000 --- a/arch/arm/mach-imx/generic.c +++ /dev/null | |||
@@ -1,271 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-imx/generic.c | ||
3 | * | ||
4 | * author: Sascha Hauer | ||
5 | * Created: april 20th, 2004 | ||
6 | * Copyright: Synertronixx GmbH | ||
7 | * | ||
8 | * Common code for i.MX machines | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or | ||
13 | * (at your option) any later version. | ||
14 | * | ||
15 | * This program is distributed in the hope that it will be useful, | ||
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | * GNU General Public License for more details. | ||
19 | * | ||
20 | * You should have received a copy of the GNU General Public License | ||
21 | * along with this program; if not, write to the Free Software | ||
22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
23 | * | ||
24 | */ | ||
25 | #include <linux/platform_device.h> | ||
26 | #include <linux/init.h> | ||
27 | #include <linux/kernel.h> | ||
28 | #include <linux/module.h> | ||
29 | #include <linux/string.h> | ||
30 | |||
31 | #include <asm/errno.h> | ||
32 | #include <mach/hardware.h> | ||
33 | #include <mach/imx-regs.h> | ||
34 | |||
35 | #include <asm/mach/map.h> | ||
36 | #include <mach/mmc.h> | ||
37 | #include <mach/gpio.h> | ||
38 | |||
39 | unsigned long imx_gpio_alloc_map[(GPIO_PORT_MAX + 1) * 32 / BITS_PER_LONG]; | ||
40 | |||
41 | void imx_gpio_mode(int gpio_mode) | ||
42 | { | ||
43 | unsigned int pin = gpio_mode & GPIO_PIN_MASK; | ||
44 | unsigned int port = (gpio_mode & GPIO_PORT_MASK) >> GPIO_PORT_SHIFT; | ||
45 | unsigned int ocr = (gpio_mode & GPIO_OCR_MASK) >> GPIO_OCR_SHIFT; | ||
46 | unsigned int tmp; | ||
47 | |||
48 | /* Pullup enable */ | ||
49 | if(gpio_mode & GPIO_PUEN) | ||
50 | PUEN(port) |= (1<<pin); | ||
51 | else | ||
52 | PUEN(port) &= ~(1<<pin); | ||
53 | |||
54 | /* Data direction */ | ||
55 | if(gpio_mode & GPIO_OUT) | ||
56 | DDIR(port) |= 1<<pin; | ||
57 | else | ||
58 | DDIR(port) &= ~(1<<pin); | ||
59 | |||
60 | /* Primary / alternate function */ | ||
61 | if(gpio_mode & GPIO_AF) | ||
62 | GPR(port) |= (1<<pin); | ||
63 | else | ||
64 | GPR(port) &= ~(1<<pin); | ||
65 | |||
66 | /* use as gpio? */ | ||
67 | if(gpio_mode & GPIO_GIUS) | ||
68 | GIUS(port) |= (1<<pin); | ||
69 | else | ||
70 | GIUS(port) &= ~(1<<pin); | ||
71 | |||
72 | /* Output / input configuration */ | ||
73 | /* FIXME: I'm not very sure about OCR and ICONF, someone | ||
74 | * should have a look over it | ||
75 | */ | ||
76 | if(pin<16) { | ||
77 | tmp = OCR1(port); | ||
78 | tmp &= ~( 3<<(pin*2)); | ||
79 | tmp |= (ocr << (pin*2)); | ||
80 | OCR1(port) = tmp; | ||
81 | |||
82 | ICONFA1(port) &= ~( 3<<(pin*2)); | ||
83 | ICONFA1(port) |= ((gpio_mode >> GPIO_AOUT_SHIFT) & 3) << (pin * 2); | ||
84 | ICONFB1(port) &= ~( 3<<(pin*2)); | ||
85 | ICONFB1(port) |= ((gpio_mode >> GPIO_BOUT_SHIFT) & 3) << (pin * 2); | ||
86 | } else { | ||
87 | tmp = OCR2(port); | ||
88 | tmp &= ~( 3<<((pin-16)*2)); | ||
89 | tmp |= (ocr << ((pin-16)*2)); | ||
90 | OCR2(port) = tmp; | ||
91 | |||
92 | ICONFA2(port) &= ~( 3<<((pin-16)*2)); | ||
93 | ICONFA2(port) |= ((gpio_mode >> GPIO_AOUT_SHIFT) & 3) << ((pin-16) * 2); | ||
94 | ICONFB2(port) &= ~( 3<<((pin-16)*2)); | ||
95 | ICONFB2(port) |= ((gpio_mode >> GPIO_BOUT_SHIFT) & 3) << ((pin-16) * 2); | ||
96 | } | ||
97 | } | ||
98 | |||
99 | EXPORT_SYMBOL(imx_gpio_mode); | ||
100 | |||
101 | int imx_gpio_request(unsigned gpio, const char *label) | ||
102 | { | ||
103 | if(gpio >= (GPIO_PORT_MAX + 1) * 32) { | ||
104 | printk(KERN_ERR "imx_gpio: Attempt to request nonexistent GPIO %d for \"%s\"\n", | ||
105 | gpio, label ? label : "?"); | ||
106 | return -EINVAL; | ||
107 | } | ||
108 | |||
109 | if(test_and_set_bit(gpio, imx_gpio_alloc_map)) { | ||
110 | printk(KERN_ERR "imx_gpio: GPIO %d already used. Allocation for \"%s\" failed\n", | ||
111 | gpio, label ? label : "?"); | ||
112 | return -EBUSY; | ||
113 | } | ||
114 | |||
115 | return 0; | ||
116 | } | ||
117 | |||
118 | EXPORT_SYMBOL(imx_gpio_request); | ||
119 | |||
120 | void imx_gpio_free(unsigned gpio) | ||
121 | { | ||
122 | if(gpio >= (GPIO_PORT_MAX + 1) * 32) | ||
123 | return; | ||
124 | |||
125 | clear_bit(gpio, imx_gpio_alloc_map); | ||
126 | } | ||
127 | |||
128 | EXPORT_SYMBOL(imx_gpio_free); | ||
129 | |||
130 | int imx_gpio_direction_input(unsigned gpio) | ||
131 | { | ||
132 | imx_gpio_mode(gpio | GPIO_IN | GPIO_GIUS | GPIO_DR); | ||
133 | return 0; | ||
134 | } | ||
135 | |||
136 | EXPORT_SYMBOL(imx_gpio_direction_input); | ||
137 | |||
138 | int imx_gpio_direction_output(unsigned gpio, int value) | ||
139 | { | ||
140 | imx_gpio_set_value(gpio, value); | ||
141 | imx_gpio_mode(gpio | GPIO_OUT | GPIO_GIUS | GPIO_DR); | ||
142 | return 0; | ||
143 | } | ||
144 | |||
145 | EXPORT_SYMBOL(imx_gpio_direction_output); | ||
146 | |||
147 | int imx_gpio_setup_multiple_pins(const int *pin_list, unsigned count, | ||
148 | int alloc_mode, const char *label) | ||
149 | { | ||
150 | const int *p = pin_list; | ||
151 | int i; | ||
152 | unsigned gpio; | ||
153 | unsigned mode; | ||
154 | |||
155 | for (i = 0; i < count; i++) { | ||
156 | gpio = *p & (GPIO_PIN_MASK | GPIO_PORT_MASK); | ||
157 | mode = *p & ~(GPIO_PIN_MASK | GPIO_PORT_MASK); | ||
158 | |||
159 | if (gpio >= (GPIO_PORT_MAX + 1) * 32) | ||
160 | goto setup_error; | ||
161 | |||
162 | if (alloc_mode & IMX_GPIO_ALLOC_MODE_RELEASE) | ||
163 | imx_gpio_free(gpio); | ||
164 | else if (!(alloc_mode & IMX_GPIO_ALLOC_MODE_NO_ALLOC)) | ||
165 | if (imx_gpio_request(gpio, label)) | ||
166 | if (!(alloc_mode & IMX_GPIO_ALLOC_MODE_TRY_ALLOC)) | ||
167 | goto setup_error; | ||
168 | |||
169 | if (!(alloc_mode & (IMX_GPIO_ALLOC_MODE_ALLOC_ONLY | | ||
170 | IMX_GPIO_ALLOC_MODE_RELEASE))) | ||
171 | imx_gpio_mode(gpio | mode); | ||
172 | |||
173 | p++; | ||
174 | } | ||
175 | return 0; | ||
176 | |||
177 | setup_error: | ||
178 | if(alloc_mode & (IMX_GPIO_ALLOC_MODE_NO_ALLOC | | ||
179 | IMX_GPIO_ALLOC_MODE_TRY_ALLOC)) | ||
180 | return -EINVAL; | ||
181 | |||
182 | while (p != pin_list) { | ||
183 | p--; | ||
184 | gpio = *p & (GPIO_PIN_MASK | GPIO_PORT_MASK); | ||
185 | imx_gpio_free(gpio); | ||
186 | } | ||
187 | |||
188 | return -EINVAL; | ||
189 | } | ||
190 | |||
191 | EXPORT_SYMBOL(imx_gpio_setup_multiple_pins); | ||
192 | |||
193 | void __imx_gpio_set_value(unsigned gpio, int value) | ||
194 | { | ||
195 | imx_gpio_set_value_inline(gpio, value); | ||
196 | } | ||
197 | |||
198 | EXPORT_SYMBOL(__imx_gpio_set_value); | ||
199 | |||
200 | int imx_gpio_to_irq(unsigned gpio) | ||
201 | { | ||
202 | return IRQ_GPIOA(0) + gpio; | ||
203 | } | ||
204 | |||
205 | EXPORT_SYMBOL(imx_gpio_to_irq); | ||
206 | |||
207 | int imx_irq_to_gpio(unsigned irq) | ||
208 | { | ||
209 | if (irq < IRQ_GPIOA(0)) | ||
210 | return -EINVAL; | ||
211 | return irq - IRQ_GPIOA(0); | ||
212 | } | ||
213 | |||
214 | EXPORT_SYMBOL(imx_irq_to_gpio); | ||
215 | |||
216 | static struct resource imx_mmc_resources[] = { | ||
217 | [0] = { | ||
218 | .start = 0x00214000, | ||
219 | .end = 0x002140FF, | ||
220 | .flags = IORESOURCE_MEM, | ||
221 | }, | ||
222 | [1] = { | ||
223 | .start = (SDHC_INT), | ||
224 | .end = (SDHC_INT), | ||
225 | .flags = IORESOURCE_IRQ, | ||
226 | }, | ||
227 | }; | ||
228 | |||
229 | static u64 imxmmmc_dmamask = 0xffffffffUL; | ||
230 | |||
231 | static struct platform_device imx_mmc_device = { | ||
232 | .name = "imx-mmc", | ||
233 | .id = 0, | ||
234 | .dev = { | ||
235 | .dma_mask = &imxmmmc_dmamask, | ||
236 | .coherent_dma_mask = 0xffffffff, | ||
237 | }, | ||
238 | .num_resources = ARRAY_SIZE(imx_mmc_resources), | ||
239 | .resource = imx_mmc_resources, | ||
240 | }; | ||
241 | |||
242 | void __init imx_set_mmc_info(struct imxmmc_platform_data *info) | ||
243 | { | ||
244 | imx_mmc_device.dev.platform_data = info; | ||
245 | } | ||
246 | |||
247 | static struct platform_device *devices[] __initdata = { | ||
248 | &imx_mmc_device, | ||
249 | }; | ||
250 | |||
251 | static struct map_desc imx_io_desc[] __initdata = { | ||
252 | { | ||
253 | .virtual = IMX_IO_BASE, | ||
254 | .pfn = __phys_to_pfn(IMX_IO_PHYS), | ||
255 | .length = IMX_IO_SIZE, | ||
256 | .type = MT_DEVICE | ||
257 | } | ||
258 | }; | ||
259 | |||
260 | void __init | ||
261 | imx_map_io(void) | ||
262 | { | ||
263 | iotable_init(imx_io_desc, ARRAY_SIZE(imx_io_desc)); | ||
264 | } | ||
265 | |||
266 | static int __init imx_init(void) | ||
267 | { | ||
268 | return platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
269 | } | ||
270 | |||
271 | subsys_initcall(imx_init); | ||
diff --git a/arch/arm/mach-imx/generic.h b/arch/arm/mach-imx/generic.h deleted file mode 100644 index e91003e4bef3..000000000000 --- a/arch/arm/mach-imx/generic.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-imx/generic.h | ||
3 | * | ||
4 | * Author: Sascha Hauer <sascha@saschahauer.de> | ||
5 | * Copyright: Synertronixx GmbH | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | extern void __init imx_map_io(void); | ||
13 | extern void __init imx_init_irq(void); | ||
14 | |||
15 | struct sys_timer; | ||
16 | extern struct sys_timer imx_timer; | ||
diff --git a/arch/arm/mach-imx/include/mach/debug-macro.S b/arch/arm/mach-imx/include/mach/debug-macro.S deleted file mode 100644 index 87802bbfe633..000000000000 --- a/arch/arm/mach-imx/include/mach/debug-macro.S +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | /* arch/arm/mach-imx/include/mach/debug-macro.S | ||
2 | * | ||
3 | * Debugging macro include header | ||
4 | * | ||
5 | * Copyright (C) 1994-1999 Russell King | ||
6 | * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | * | ||
12 | */ | ||
13 | |||
14 | .macro addruart,rx | ||
15 | mrc p15, 0, \rx, c1, c0 | ||
16 | tst \rx, #1 @ MMU enabled? | ||
17 | moveq \rx, #0x00000000 @ physical | ||
18 | movne \rx, #0xe0000000 @ virtual | ||
19 | orreq \rx, \rx, #0x00200000 @ physical | ||
20 | orr \rx, \rx, #0x00006000 @ UART1 offset | ||
21 | .endm | ||
22 | |||
23 | .macro senduart,rd,rx | ||
24 | str \rd, [\rx, #0x40] @ TXDATA | ||
25 | .endm | ||
26 | |||
27 | .macro waituart,rd,rx | ||
28 | .endm | ||
29 | |||
30 | .macro busyuart,rd,rx | ||
31 | 1002: ldr \rd, [\rx, #0x98] @ SR2 | ||
32 | tst \rd, #1 << 3 @ TXDC | ||
33 | beq 1002b @ wait until transmit done | ||
34 | .endm | ||
diff --git a/arch/arm/mach-imx/include/mach/dma.h b/arch/arm/mach-imx/include/mach/dma.h deleted file mode 100644 index 621ff2c730f2..000000000000 --- a/arch/arm/mach-imx/include/mach/dma.h +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/imxads/dma.h | ||
3 | * | ||
4 | * Copyright (C) 1997,1998 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | |||
21 | #ifndef __ASM_ARCH_DMA_H | ||
22 | #define __ASM_ARCH_DMA_H | ||
23 | |||
24 | typedef enum { | ||
25 | DMA_PRIO_HIGH = 0, | ||
26 | DMA_PRIO_MEDIUM = 1, | ||
27 | DMA_PRIO_LOW = 2 | ||
28 | } imx_dma_prio; | ||
29 | |||
30 | #define DMA_REQ_UART3_T 2 | ||
31 | #define DMA_REQ_UART3_R 3 | ||
32 | #define DMA_REQ_SSI2_T 4 | ||
33 | #define DMA_REQ_SSI2_R 5 | ||
34 | #define DMA_REQ_CSI_STAT 6 | ||
35 | #define DMA_REQ_CSI_R 7 | ||
36 | #define DMA_REQ_MSHC 8 | ||
37 | #define DMA_REQ_DSPA_DCT_DOUT 9 | ||
38 | #define DMA_REQ_DSPA_DCT_DIN 10 | ||
39 | #define DMA_REQ_DSPA_MAC 11 | ||
40 | #define DMA_REQ_EXT 12 | ||
41 | #define DMA_REQ_SDHC 13 | ||
42 | #define DMA_REQ_SPI1_R 14 | ||
43 | #define DMA_REQ_SPI1_T 15 | ||
44 | #define DMA_REQ_SSI_T 16 | ||
45 | #define DMA_REQ_SSI_R 17 | ||
46 | #define DMA_REQ_ASP_DAC 18 | ||
47 | #define DMA_REQ_ASP_ADC 19 | ||
48 | #define DMA_REQ_USP_EP(x) (20+(x)) | ||
49 | #define DMA_REQ_SPI2_R 26 | ||
50 | #define DMA_REQ_SPI2_T 27 | ||
51 | #define DMA_REQ_UART2_T 28 | ||
52 | #define DMA_REQ_UART2_R 29 | ||
53 | #define DMA_REQ_UART1_T 30 | ||
54 | #define DMA_REQ_UART1_R 31 | ||
55 | |||
56 | #endif /* _ASM_ARCH_DMA_H */ | ||
diff --git a/arch/arm/mach-imx/include/mach/entry-macro.S b/arch/arm/mach-imx/include/mach/entry-macro.S deleted file mode 100644 index e4db679f7766..000000000000 --- a/arch/arm/mach-imx/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-imx/include/mach/entry-macro.S | ||
3 | * | ||
4 | * Low-level IRQ helper macros for iMX-based platforms | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | #include <mach/hardware.h> | ||
11 | |||
12 | .macro disable_fiq | ||
13 | .endm | ||
14 | |||
15 | .macro get_irqnr_preamble, base, tmp | ||
16 | .endm | ||
17 | |||
18 | .macro arch_ret_to_user, tmp1, tmp2 | ||
19 | .endm | ||
20 | |||
21 | #define AITC_NIVECSR 0x40 | ||
22 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
23 | ldr \base, =IO_ADDRESS(IMX_AITC_BASE) | ||
24 | @ Load offset & priority of the highest priority | ||
25 | @ interrupt pending. | ||
26 | ldr \irqstat, [\base, #AITC_NIVECSR] | ||
27 | @ Shift off the priority leaving the offset or | ||
28 | @ "interrupt number", use arithmetic shift to | ||
29 | @ transform illegal source (0xffff) as -1 | ||
30 | mov \irqnr, \irqstat, asr #16 | ||
31 | adds \tmp, \irqnr, #1 | ||
32 | .endm | ||
diff --git a/arch/arm/mach-imx/include/mach/gpio.h b/arch/arm/mach-imx/include/mach/gpio.h deleted file mode 100644 index 6c2942f82922..000000000000 --- a/arch/arm/mach-imx/include/mach/gpio.h +++ /dev/null | |||
@@ -1,106 +0,0 @@ | |||
1 | #ifndef _IMX_GPIO_H | ||
2 | |||
3 | #include <linux/kernel.h> | ||
4 | #include <mach/hardware.h> | ||
5 | #include <mach/imx-regs.h> | ||
6 | |||
7 | #define IMX_GPIO_ALLOC_MODE_NORMAL 0 | ||
8 | #define IMX_GPIO_ALLOC_MODE_NO_ALLOC 1 | ||
9 | #define IMX_GPIO_ALLOC_MODE_TRY_ALLOC 2 | ||
10 | #define IMX_GPIO_ALLOC_MODE_ALLOC_ONLY 4 | ||
11 | #define IMX_GPIO_ALLOC_MODE_RELEASE 8 | ||
12 | |||
13 | extern int imx_gpio_request(unsigned gpio, const char *label); | ||
14 | |||
15 | extern void imx_gpio_free(unsigned gpio); | ||
16 | |||
17 | extern int imx_gpio_setup_multiple_pins(const int *pin_list, unsigned count, | ||
18 | int alloc_mode, const char *label); | ||
19 | |||
20 | extern int imx_gpio_direction_input(unsigned gpio); | ||
21 | |||
22 | extern int imx_gpio_direction_output(unsigned gpio, int value); | ||
23 | |||
24 | extern void __imx_gpio_set_value(unsigned gpio, int value); | ||
25 | |||
26 | static inline int imx_gpio_get_value(unsigned gpio) | ||
27 | { | ||
28 | return SSR(gpio >> GPIO_PORT_SHIFT) & (1 << (gpio & GPIO_PIN_MASK)); | ||
29 | } | ||
30 | |||
31 | static inline void imx_gpio_set_value_inline(unsigned gpio, int value) | ||
32 | { | ||
33 | unsigned long flags; | ||
34 | |||
35 | raw_local_irq_save(flags); | ||
36 | if(value) | ||
37 | DR(gpio >> GPIO_PORT_SHIFT) |= (1 << (gpio & GPIO_PIN_MASK)); | ||
38 | else | ||
39 | DR(gpio >> GPIO_PORT_SHIFT) &= ~(1 << (gpio & GPIO_PIN_MASK)); | ||
40 | raw_local_irq_restore(flags); | ||
41 | } | ||
42 | |||
43 | static inline void imx_gpio_set_value(unsigned gpio, int value) | ||
44 | { | ||
45 | if(__builtin_constant_p(gpio)) | ||
46 | imx_gpio_set_value_inline(gpio, value); | ||
47 | else | ||
48 | __imx_gpio_set_value(gpio, value); | ||
49 | } | ||
50 | |||
51 | extern int imx_gpio_to_irq(unsigned gpio); | ||
52 | |||
53 | extern int imx_irq_to_gpio(unsigned irq); | ||
54 | |||
55 | /*-------------------------------------------------------------------------*/ | ||
56 | |||
57 | /* Wrappers for "new style" GPIO calls. These calls i.MX specific versions | ||
58 | * to allow future extension of GPIO logic. | ||
59 | */ | ||
60 | |||
61 | static inline int gpio_request(unsigned gpio, const char *label) | ||
62 | { | ||
63 | return imx_gpio_request(gpio, label); | ||
64 | } | ||
65 | |||
66 | static inline void gpio_free(unsigned gpio) | ||
67 | { | ||
68 | might_sleep(); | ||
69 | |||
70 | imx_gpio_free(gpio); | ||
71 | } | ||
72 | |||
73 | static inline int gpio_direction_input(unsigned gpio) | ||
74 | { | ||
75 | return imx_gpio_direction_input(gpio); | ||
76 | } | ||
77 | |||
78 | static inline int gpio_direction_output(unsigned gpio, int value) | ||
79 | { | ||
80 | return imx_gpio_direction_output(gpio, value); | ||
81 | } | ||
82 | |||
83 | static inline int gpio_get_value(unsigned gpio) | ||
84 | { | ||
85 | return imx_gpio_get_value(gpio); | ||
86 | } | ||
87 | |||
88 | static inline void gpio_set_value(unsigned gpio, int value) | ||
89 | { | ||
90 | imx_gpio_set_value(gpio, value); | ||
91 | } | ||
92 | |||
93 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | ||
94 | |||
95 | static inline int gpio_to_irq(unsigned gpio) | ||
96 | { | ||
97 | return imx_gpio_to_irq(gpio); | ||
98 | } | ||
99 | |||
100 | static inline int irq_to_gpio(unsigned irq) | ||
101 | { | ||
102 | return imx_irq_to_gpio(irq); | ||
103 | } | ||
104 | |||
105 | |||
106 | #endif | ||
diff --git a/arch/arm/mach-imx/include/mach/hardware.h b/arch/arm/mach-imx/include/mach/hardware.h deleted file mode 100644 index c73e9e724c75..000000000000 --- a/arch/arm/mach-imx/include/mach/hardware.h +++ /dev/null | |||
@@ -1,91 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-imx/include/mach/hardware.h | ||
3 | * | ||
4 | * Copyright (C) 1999 ARM Limited. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #ifndef __ASM_ARCH_HARDWARE_H | ||
21 | #define __ASM_ARCH_HARDWARE_H | ||
22 | |||
23 | #include <asm/sizes.h> | ||
24 | #include "imx-regs.h" | ||
25 | |||
26 | #ifndef __ASSEMBLY__ | ||
27 | # define __REG(x) (*((volatile u32 *)IO_ADDRESS(x))) | ||
28 | |||
29 | # define __REG2(x,y) (*(volatile u32 *)((u32)&__REG(x) + (y))) | ||
30 | #endif | ||
31 | |||
32 | /* | ||
33 | * Memory map | ||
34 | */ | ||
35 | |||
36 | #define IMX_IO_PHYS 0x00200000 | ||
37 | #define IMX_IO_SIZE 0x00100000 | ||
38 | #define IMX_IO_BASE 0xe0000000 | ||
39 | |||
40 | #define IMX_CS0_PHYS 0x10000000 | ||
41 | #define IMX_CS0_SIZE 0x02000000 | ||
42 | #define IMX_CS0_VIRT 0xe8000000 | ||
43 | |||
44 | #define IMX_CS1_PHYS 0x12000000 | ||
45 | #define IMX_CS1_SIZE 0x01000000 | ||
46 | #define IMX_CS1_VIRT 0xea000000 | ||
47 | |||
48 | #define IMX_CS2_PHYS 0x13000000 | ||
49 | #define IMX_CS2_SIZE 0x01000000 | ||
50 | #define IMX_CS2_VIRT 0xeb000000 | ||
51 | |||
52 | #define IMX_CS3_PHYS 0x14000000 | ||
53 | #define IMX_CS3_SIZE 0x01000000 | ||
54 | #define IMX_CS3_VIRT 0xec000000 | ||
55 | |||
56 | #define IMX_CS4_PHYS 0x15000000 | ||
57 | #define IMX_CS4_SIZE 0x01000000 | ||
58 | #define IMX_CS4_VIRT 0xed000000 | ||
59 | |||
60 | #define IMX_CS5_PHYS 0x16000000 | ||
61 | #define IMX_CS5_SIZE 0x01000000 | ||
62 | #define IMX_CS5_VIRT 0xee000000 | ||
63 | |||
64 | #define IMX_FB_VIRT 0xF1000000 | ||
65 | #define IMX_FB_SIZE (256*1024) | ||
66 | |||
67 | /* macro to get at IO space when running virtually */ | ||
68 | #define IO_ADDRESS(x) ((x) | IMX_IO_BASE) | ||
69 | |||
70 | #ifndef __ASSEMBLY__ | ||
71 | /* | ||
72 | * Handy routine to set GPIO functions | ||
73 | */ | ||
74 | extern void imx_gpio_mode( int gpio_mode ); | ||
75 | |||
76 | #endif | ||
77 | |||
78 | #define MAXIRQNUM 62 | ||
79 | #define MAXFIQNUM 62 | ||
80 | #define MAXSWINUM 62 | ||
81 | |||
82 | /* | ||
83 | * Use SDRAM for memory | ||
84 | */ | ||
85 | #define MEM_SIZE 0x01000000 | ||
86 | |||
87 | #ifdef CONFIG_ARCH_MX1ADS | ||
88 | #include "mx1ads.h" | ||
89 | #endif | ||
90 | |||
91 | #endif | ||
diff --git a/arch/arm/mach-imx/include/mach/imx-dma.h b/arch/arm/mach-imx/include/mach/imx-dma.h deleted file mode 100644 index bbe54df7f0de..000000000000 --- a/arch/arm/mach-imx/include/mach/imx-dma.h +++ /dev/null | |||
@@ -1,98 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/imxads/dma.h | ||
3 | * | ||
4 | * Copyright (C) 1997,1998 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | |||
21 | #include <mach/dma.h> | ||
22 | |||
23 | #ifndef __ASM_ARCH_IMX_DMA_H | ||
24 | #define __ASM_ARCH_IMX_DMA_H | ||
25 | |||
26 | #define IMX_DMA_CHANNELS 11 | ||
27 | |||
28 | /* | ||
29 | * struct imx_dma_channel - i.MX specific DMA extension | ||
30 | * @name: name specified by DMA client | ||
31 | * @irq_handler: client callback for end of transfer | ||
32 | * @err_handler: client callback for error condition | ||
33 | * @data: clients context data for callbacks | ||
34 | * @dma_mode: direction of the transfer %DMA_MODE_READ or %DMA_MODE_WRITE | ||
35 | * @sg: pointer to the actual read/written chunk for scatter-gather emulation | ||
36 | * @sgbc: counter of processed bytes in the actual read/written chunk | ||
37 | * @resbytes: total residual number of bytes to transfer | ||
38 | * (it can be lower or same as sum of SG mapped chunk sizes) | ||
39 | * @sgcount: number of chunks to be read/written | ||
40 | * | ||
41 | * Structure is used for IMX DMA processing. It would be probably good | ||
42 | * @struct dma_struct in the future for external interfacing and use | ||
43 | * @struct imx_dma_channel only as extension to it. | ||
44 | */ | ||
45 | |||
46 | struct imx_dma_channel { | ||
47 | const char *name; | ||
48 | void (*irq_handler) (int, void *); | ||
49 | void (*err_handler) (int, void *, int errcode); | ||
50 | void *data; | ||
51 | unsigned int dma_mode; | ||
52 | struct scatterlist *sg; | ||
53 | unsigned int sgbc; | ||
54 | unsigned int sgcount; | ||
55 | unsigned int resbytes; | ||
56 | int dma_num; | ||
57 | }; | ||
58 | |||
59 | extern struct imx_dma_channel imx_dma_channels[IMX_DMA_CHANNELS]; | ||
60 | |||
61 | #define IMX_DMA_ERR_BURST 1 | ||
62 | #define IMX_DMA_ERR_REQUEST 2 | ||
63 | #define IMX_DMA_ERR_TRANSFER 4 | ||
64 | #define IMX_DMA_ERR_BUFFER 8 | ||
65 | |||
66 | /* The type to distinguish channel numbers parameter from ordinal int type */ | ||
67 | typedef int imx_dmach_t; | ||
68 | |||
69 | #define DMA_MODE_READ 0 | ||
70 | #define DMA_MODE_WRITE 1 | ||
71 | #define DMA_MODE_MASK 1 | ||
72 | |||
73 | int | ||
74 | imx_dma_setup_single(imx_dmach_t dma_ch, dma_addr_t dma_address, | ||
75 | unsigned int dma_length, unsigned int dev_addr, unsigned int dmamode); | ||
76 | |||
77 | int | ||
78 | imx_dma_setup_sg(imx_dmach_t dma_ch, | ||
79 | struct scatterlist *sg, unsigned int sgcount, unsigned int dma_length, | ||
80 | unsigned int dev_addr, unsigned int dmamode); | ||
81 | |||
82 | int | ||
83 | imx_dma_setup_handlers(imx_dmach_t dma_ch, | ||
84 | void (*irq_handler) (int, void *), | ||
85 | void (*err_handler) (int, void *, int), void *data); | ||
86 | |||
87 | void imx_dma_enable(imx_dmach_t dma_ch); | ||
88 | |||
89 | void imx_dma_disable(imx_dmach_t dma_ch); | ||
90 | |||
91 | int imx_dma_request(imx_dmach_t dma_ch, const char *name); | ||
92 | |||
93 | void imx_dma_free(imx_dmach_t dma_ch); | ||
94 | |||
95 | imx_dmach_t imx_dma_request_by_prio(const char *name, imx_dma_prio prio); | ||
96 | |||
97 | |||
98 | #endif /* _ASM_ARCH_IMX_DMA_H */ | ||
diff --git a/arch/arm/mach-imx/include/mach/imx-regs.h b/arch/arm/mach-imx/include/mach/imx-regs.h deleted file mode 100644 index 490297fc0e38..000000000000 --- a/arch/arm/mach-imx/include/mach/imx-regs.h +++ /dev/null | |||
@@ -1,376 +0,0 @@ | |||
1 | #ifndef _IMX_REGS_H | ||
2 | #define _IMX_REGS_H | ||
3 | /* ------------------------------------------------------------------------ | ||
4 | * Motorola IMX system registers | ||
5 | * ------------------------------------------------------------------------ | ||
6 | * | ||
7 | */ | ||
8 | |||
9 | /* | ||
10 | * Register BASEs, based on OFFSETs | ||
11 | * | ||
12 | */ | ||
13 | #define IMX_AIPI1_BASE (0x00000 + IMX_IO_BASE) | ||
14 | #define IMX_WDT_BASE (0x01000 + IMX_IO_BASE) | ||
15 | #define IMX_TIM1_BASE (0x02000 + IMX_IO_BASE) | ||
16 | #define IMX_TIM2_BASE (0x03000 + IMX_IO_BASE) | ||
17 | #define IMX_RTC_BASE (0x04000 + IMX_IO_BASE) | ||
18 | #define IMX_LCDC_BASE (0x05000 + IMX_IO_BASE) | ||
19 | #define IMX_UART1_BASE (0x06000 + IMX_IO_BASE) | ||
20 | #define IMX_UART2_BASE (0x07000 + IMX_IO_BASE) | ||
21 | #define IMX_PWM_BASE (0x08000 + IMX_IO_BASE) | ||
22 | #define IMX_DMAC_BASE (0x09000 + IMX_IO_BASE) | ||
23 | #define IMX_AIPI2_BASE (0x10000 + IMX_IO_BASE) | ||
24 | #define IMX_SIM_BASE (0x11000 + IMX_IO_BASE) | ||
25 | #define IMX_USBD_BASE (0x12000 + IMX_IO_BASE) | ||
26 | #define IMX_SPI1_BASE (0x13000 + IMX_IO_BASE) | ||
27 | #define IMX_MMC_BASE (0x14000 + IMX_IO_BASE) | ||
28 | #define IMX_ASP_BASE (0x15000 + IMX_IO_BASE) | ||
29 | #define IMX_BTA_BASE (0x16000 + IMX_IO_BASE) | ||
30 | #define IMX_I2C_BASE (0x17000 + IMX_IO_BASE) | ||
31 | #define IMX_SSI_BASE (0x18000 + IMX_IO_BASE) | ||
32 | #define IMX_SPI2_BASE (0x19000 + IMX_IO_BASE) | ||
33 | #define IMX_MSHC_BASE (0x1A000 + IMX_IO_BASE) | ||
34 | #define IMX_PLL_BASE (0x1B000 + IMX_IO_BASE) | ||
35 | #define IMX_GPIO_BASE (0x1C000 + IMX_IO_BASE) | ||
36 | #define IMX_EIM_BASE (0x20000 + IMX_IO_BASE) | ||
37 | #define IMX_SDRAMC_BASE (0x21000 + IMX_IO_BASE) | ||
38 | #define IMX_MMA_BASE (0x22000 + IMX_IO_BASE) | ||
39 | #define IMX_AITC_BASE (0x23000 + IMX_IO_BASE) | ||
40 | #define IMX_CSI_BASE (0x24000 + IMX_IO_BASE) | ||
41 | |||
42 | /* PLL registers */ | ||
43 | #define CSCR __REG(IMX_PLL_BASE) /* Clock Source Control Register */ | ||
44 | #define CSCR_SPLL_RESTART (1<<22) | ||
45 | #define CSCR_MPLL_RESTART (1<<21) | ||
46 | #define CSCR_SYSTEM_SEL (1<<16) | ||
47 | #define CSCR_BCLK_DIV (0xf<<10) | ||
48 | #define CSCR_MPU_PRESC (1<<15) | ||
49 | #define CSCR_SPEN (1<<1) | ||
50 | #define CSCR_MPEN (1<<0) | ||
51 | |||
52 | #define MPCTL0 __REG(IMX_PLL_BASE + 0x4) /* MCU PLL Control Register 0 */ | ||
53 | #define MPCTL1 __REG(IMX_PLL_BASE + 0x8) /* MCU PLL and System Clock Register 1 */ | ||
54 | #define SPCTL0 __REG(IMX_PLL_BASE + 0xc) /* System PLL Control Register 0 */ | ||
55 | #define SPCTL1 __REG(IMX_PLL_BASE + 0x10) /* System PLL Control Register 1 */ | ||
56 | #define PCDR __REG(IMX_PLL_BASE + 0x20) /* Peripheral Clock Divider Register */ | ||
57 | |||
58 | /* | ||
59 | * GPIO Module and I/O Multiplexer | ||
60 | * x = 0..3 for reg_A, reg_B, reg_C, reg_D | ||
61 | */ | ||
62 | #define DDIR(x) __REG2(IMX_GPIO_BASE + 0x00, ((x) & 3) << 8) | ||
63 | #define OCR1(x) __REG2(IMX_GPIO_BASE + 0x04, ((x) & 3) << 8) | ||
64 | #define OCR2(x) __REG2(IMX_GPIO_BASE + 0x08, ((x) & 3) << 8) | ||
65 | #define ICONFA1(x) __REG2(IMX_GPIO_BASE + 0x0c, ((x) & 3) << 8) | ||
66 | #define ICONFA2(x) __REG2(IMX_GPIO_BASE + 0x10, ((x) & 3) << 8) | ||
67 | #define ICONFB1(x) __REG2(IMX_GPIO_BASE + 0x14, ((x) & 3) << 8) | ||
68 | #define ICONFB2(x) __REG2(IMX_GPIO_BASE + 0x18, ((x) & 3) << 8) | ||
69 | #define DR(x) __REG2(IMX_GPIO_BASE + 0x1c, ((x) & 3) << 8) | ||
70 | #define GIUS(x) __REG2(IMX_GPIO_BASE + 0x20, ((x) & 3) << 8) | ||
71 | #define SSR(x) __REG2(IMX_GPIO_BASE + 0x24, ((x) & 3) << 8) | ||
72 | #define ICR1(x) __REG2(IMX_GPIO_BASE + 0x28, ((x) & 3) << 8) | ||
73 | #define ICR2(x) __REG2(IMX_GPIO_BASE + 0x2c, ((x) & 3) << 8) | ||
74 | #define IMR(x) __REG2(IMX_GPIO_BASE + 0x30, ((x) & 3) << 8) | ||
75 | #define ISR(x) __REG2(IMX_GPIO_BASE + 0x34, ((x) & 3) << 8) | ||
76 | #define GPR(x) __REG2(IMX_GPIO_BASE + 0x38, ((x) & 3) << 8) | ||
77 | #define SWR(x) __REG2(IMX_GPIO_BASE + 0x3c, ((x) & 3) << 8) | ||
78 | #define PUEN(x) __REG2(IMX_GPIO_BASE + 0x40, ((x) & 3) << 8) | ||
79 | |||
80 | #define GPIO_PORT_MAX 3 | ||
81 | |||
82 | #define GPIO_PIN_MASK 0x1f | ||
83 | #define GPIO_PORT_MASK (0x3 << 5) | ||
84 | |||
85 | #define GPIO_PORT_SHIFT 5 | ||
86 | #define GPIO_PORTA (0<<5) | ||
87 | #define GPIO_PORTB (1<<5) | ||
88 | #define GPIO_PORTC (2<<5) | ||
89 | #define GPIO_PORTD (3<<5) | ||
90 | |||
91 | #define GPIO_OUT (1<<7) | ||
92 | #define GPIO_IN (0<<7) | ||
93 | #define GPIO_PUEN (1<<8) | ||
94 | |||
95 | #define GPIO_PF (0<<9) | ||
96 | #define GPIO_AF (1<<9) | ||
97 | |||
98 | #define GPIO_OCR_SHIFT 10 | ||
99 | #define GPIO_OCR_MASK (3<<10) | ||
100 | #define GPIO_AIN (0<<10) | ||
101 | #define GPIO_BIN (1<<10) | ||
102 | #define GPIO_CIN (2<<10) | ||
103 | #define GPIO_DR (3<<10) | ||
104 | |||
105 | #define GPIO_AOUT_SHIFT 12 | ||
106 | #define GPIO_AOUT_MASK (3<<12) | ||
107 | #define GPIO_AOUT (0<<12) | ||
108 | #define GPIO_AOUT_ISR (1<<12) | ||
109 | #define GPIO_AOUT_0 (2<<12) | ||
110 | #define GPIO_AOUT_1 (3<<12) | ||
111 | |||
112 | #define GPIO_BOUT_SHIFT 14 | ||
113 | #define GPIO_BOUT_MASK (3<<14) | ||
114 | #define GPIO_BOUT (0<<14) | ||
115 | #define GPIO_BOUT_ISR (1<<14) | ||
116 | #define GPIO_BOUT_0 (2<<14) | ||
117 | #define GPIO_BOUT_1 (3<<14) | ||
118 | |||
119 | #define GPIO_GIUS (1<<16) | ||
120 | |||
121 | /* assignements for GPIO alternate/primary functions */ | ||
122 | |||
123 | /* FIXME: This list is not completed. The correct directions are | ||
124 | * missing on some (many) pins | ||
125 | */ | ||
126 | #define PA0_AIN_SPI2_CLK ( GPIO_GIUS | GPIO_PORTA | GPIO_OUT | 0 ) | ||
127 | #define PA0_AF_ETMTRACESYNC ( GPIO_PORTA | GPIO_AF | 0 ) | ||
128 | #define PA1_AOUT_SPI2_RXD ( GPIO_GIUS | GPIO_PORTA | GPIO_IN | 1 ) | ||
129 | #define PA1_PF_TIN ( GPIO_PORTA | GPIO_PF | 1 ) | ||
130 | #define PA2_PF_PWM0 ( GPIO_PORTA | GPIO_OUT | GPIO_PF | 2 ) | ||
131 | #define PA3_PF_CSI_MCLK ( GPIO_PORTA | GPIO_PF | 3 ) | ||
132 | #define PA4_PF_CSI_D0 ( GPIO_PORTA | GPIO_PF | 4 ) | ||
133 | #define PA5_PF_CSI_D1 ( GPIO_PORTA | GPIO_PF | 5 ) | ||
134 | #define PA6_PF_CSI_D2 ( GPIO_PORTA | GPIO_PF | 6 ) | ||
135 | #define PA7_PF_CSI_D3 ( GPIO_PORTA | GPIO_PF | 7 ) | ||
136 | #define PA8_PF_CSI_D4 ( GPIO_PORTA | GPIO_PF | 8 ) | ||
137 | #define PA9_PF_CSI_D5 ( GPIO_PORTA | GPIO_PF | 9 ) | ||
138 | #define PA10_PF_CSI_D6 ( GPIO_PORTA | GPIO_PF | 10 ) | ||
139 | #define PA11_PF_CSI_D7 ( GPIO_PORTA | GPIO_PF | 11 ) | ||
140 | #define PA12_PF_CSI_VSYNC ( GPIO_PORTA | GPIO_PF | 12 ) | ||
141 | #define PA13_PF_CSI_HSYNC ( GPIO_PORTA | GPIO_PF | 13 ) | ||
142 | #define PA14_PF_CSI_PIXCLK ( GPIO_PORTA | GPIO_PF | 14 ) | ||
143 | #define PA15_PF_I2C_SDA ( GPIO_PORTA | GPIO_OUT | GPIO_PF | 15 ) | ||
144 | #define PA16_PF_I2C_SCL ( GPIO_PORTA | GPIO_OUT | GPIO_PF | 16 ) | ||
145 | #define PA17_AF_ETMTRACEPKT4 ( GPIO_PORTA | GPIO_AF | 17 ) | ||
146 | #define PA17_AIN_SPI2_SS ( GPIO_GIUS | GPIO_PORTA | GPIO_OUT | 17 ) | ||
147 | #define PA18_AF_ETMTRACEPKT5 ( GPIO_PORTA | GPIO_AF | 18 ) | ||
148 | #define PA19_AF_ETMTRACEPKT6 ( GPIO_PORTA | GPIO_AF | 19 ) | ||
149 | #define PA20_AF_ETMTRACEPKT7 ( GPIO_PORTA | GPIO_AF | 20 ) | ||
150 | #define PA21_PF_A0 ( GPIO_PORTA | GPIO_PF | 21 ) | ||
151 | #define PA22_PF_CS4 ( GPIO_PORTA | GPIO_PF | 22 ) | ||
152 | #define PA23_PF_CS5 ( GPIO_PORTA | GPIO_PF | 23 ) | ||
153 | #define PA24_PF_A16 ( GPIO_PORTA | GPIO_PF | 24 ) | ||
154 | #define PA24_AF_ETMTRACEPKT0 ( GPIO_PORTA | GPIO_AF | 24 ) | ||
155 | #define PA25_PF_A17 ( GPIO_PORTA | GPIO_PF | 25 ) | ||
156 | #define PA25_AF_ETMTRACEPKT1 ( GPIO_PORTA | GPIO_AF | 25 ) | ||
157 | #define PA26_PF_A18 ( GPIO_PORTA | GPIO_PF | 26 ) | ||
158 | #define PA26_AF_ETMTRACEPKT2 ( GPIO_PORTA | GPIO_AF | 26 ) | ||
159 | #define PA27_PF_A19 ( GPIO_PORTA | GPIO_PF | 27 ) | ||
160 | #define PA27_AF_ETMTRACEPKT3 ( GPIO_PORTA | GPIO_AF | 27 ) | ||
161 | #define PA28_PF_A20 ( GPIO_PORTA | GPIO_PF | 28 ) | ||
162 | #define PA28_AF_ETMPIPESTAT0 ( GPIO_PORTA | GPIO_AF | 28 ) | ||
163 | #define PA29_PF_A21 ( GPIO_PORTA | GPIO_PF | 29 ) | ||
164 | #define PA29_AF_ETMPIPESTAT1 ( GPIO_PORTA | GPIO_AF | 29 ) | ||
165 | #define PA30_PF_A22 ( GPIO_PORTA | GPIO_PF | 30 ) | ||
166 | #define PA30_AF_ETMPIPESTAT2 ( GPIO_PORTA | GPIO_AF | 30 ) | ||
167 | #define PA31_PF_A23 ( GPIO_PORTA | GPIO_PF | 31 ) | ||
168 | #define PA31_AF_ETMTRACECLK ( GPIO_PORTA | GPIO_AF | 31 ) | ||
169 | #define PB8_PF_SD_DAT0 ( GPIO_PORTB | GPIO_PF | GPIO_PUEN | 8 ) | ||
170 | #define PB8_AF_MS_PIO ( GPIO_PORTB | GPIO_AF | 8 ) | ||
171 | #define PB9_PF_SD_DAT1 ( GPIO_PORTB | GPIO_PF | GPIO_PUEN | 9 ) | ||
172 | #define PB9_AF_MS_PI1 ( GPIO_PORTB | GPIO_AF | 9 ) | ||
173 | #define PB10_PF_SD_DAT2 ( GPIO_PORTB | GPIO_PF | GPIO_PUEN | 10 ) | ||
174 | #define PB10_AF_MS_SCLKI ( GPIO_PORTB | GPIO_AF | 10 ) | ||
175 | #define PB11_PF_SD_DAT3 ( GPIO_PORTB | GPIO_PF | 11 ) | ||
176 | #define PB11_AF_MS_SDIO ( GPIO_PORTB | GPIO_AF | 11 ) | ||
177 | #define PB12_PF_SD_CLK ( GPIO_PORTB | GPIO_PF | 12 ) | ||
178 | #define PB12_AF_MS_SCLK0 ( GPIO_PORTB | GPIO_AF | 12 ) | ||
179 | #define PB13_PF_SD_CMD ( GPIO_PORTB | GPIO_PF | GPIO_PUEN | 13 ) | ||
180 | #define PB13_AF_MS_BS ( GPIO_PORTB | GPIO_AF | 13 ) | ||
181 | #define PB14_AF_SSI_RXFS ( GPIO_PORTB | GPIO_AF | 14 ) | ||
182 | #define PB15_AF_SSI_RXCLK ( GPIO_PORTB | GPIO_AF | 15 ) | ||
183 | #define PB16_AF_SSI_RXDAT ( GPIO_PORTB | GPIO_IN | GPIO_AF | 16 ) | ||
184 | #define PB17_AF_SSI_TXDAT ( GPIO_PORTB | GPIO_OUT | GPIO_AF | 17 ) | ||
185 | #define PB18_AF_SSI_TXFS ( GPIO_PORTB | GPIO_AF | 18 ) | ||
186 | #define PB19_AF_SSI_TXCLK ( GPIO_PORTB | GPIO_AF | 19 ) | ||
187 | #define PB20_PF_USBD_AFE ( GPIO_PORTB | GPIO_PF | 20 ) | ||
188 | #define PB21_PF_USBD_OE ( GPIO_PORTB | GPIO_PF | 21 ) | ||
189 | #define PB22_PFUSBD_RCV ( GPIO_PORTB | GPIO_PF | 22 ) | ||
190 | #define PB23_PF_USBD_SUSPND ( GPIO_PORTB | GPIO_PF | 23 ) | ||
191 | #define PB24_PF_USBD_VP ( GPIO_PORTB | GPIO_PF | 24 ) | ||
192 | #define PB25_PF_USBD_VM ( GPIO_PORTB | GPIO_PF | 25 ) | ||
193 | #define PB26_PF_USBD_VPO ( GPIO_PORTB | GPIO_PF | 26 ) | ||
194 | #define PB27_PF_USBD_VMO ( GPIO_PORTB | GPIO_PF | 27 ) | ||
195 | #define PB28_PF_UART2_CTS ( GPIO_PORTB | GPIO_OUT | GPIO_PF | 28 ) | ||
196 | #define PB29_PF_UART2_RTS ( GPIO_PORTB | GPIO_IN | GPIO_PF | 29 ) | ||
197 | #define PB30_PF_UART2_TXD ( GPIO_PORTB | GPIO_OUT | GPIO_PF | 30 ) | ||
198 | #define PB31_PF_UART2_RXD ( GPIO_PORTB | GPIO_IN | GPIO_PF | 31 ) | ||
199 | #define PC3_PF_SSI_RXFS ( GPIO_PORTC | GPIO_PF | 3 ) | ||
200 | #define PC4_PF_SSI_RXCLK ( GPIO_PORTC | GPIO_PF | 4 ) | ||
201 | #define PC5_PF_SSI_RXDAT ( GPIO_PORTC | GPIO_IN | GPIO_PF | 5 ) | ||
202 | #define PC6_PF_SSI_TXDAT ( GPIO_PORTC | GPIO_OUT | GPIO_PF | 6 ) | ||
203 | #define PC7_PF_SSI_TXFS ( GPIO_PORTC | GPIO_PF | 7 ) | ||
204 | #define PC8_PF_SSI_TXCLK ( GPIO_PORTC | GPIO_PF | 8 ) | ||
205 | #define PC9_PF_UART1_CTS ( GPIO_PORTC | GPIO_OUT | GPIO_PF | 9 ) | ||
206 | #define PC10_PF_UART1_RTS ( GPIO_PORTC | GPIO_IN | GPIO_PF | 10 ) | ||
207 | #define PC11_PF_UART1_TXD ( GPIO_PORTC | GPIO_OUT | GPIO_PF | 11 ) | ||
208 | #define PC12_PF_UART1_RXD ( GPIO_PORTC | GPIO_IN | GPIO_PF | 12 ) | ||
209 | #define PC13_PF_SPI1_SPI_RDY ( GPIO_PORTC | GPIO_PF | 13 ) | ||
210 | #define PC14_PF_SPI1_SCLK ( GPIO_PORTC | GPIO_PF | 14 ) | ||
211 | #define PC15_PF_SPI1_SS ( GPIO_PORTC | GPIO_PF | 15 ) | ||
212 | #define PC16_PF_SPI1_MISO ( GPIO_PORTC | GPIO_PF | 16 ) | ||
213 | #define PC17_PF_SPI1_MOSI ( GPIO_PORTC | GPIO_PF | 17 ) | ||
214 | #define PC24_BIN_UART3_RI ( GPIO_GIUS | GPIO_PORTC | GPIO_OUT | GPIO_BIN | 24 ) | ||
215 | #define PC25_BIN_UART3_DSR ( GPIO_GIUS | GPIO_PORTC | GPIO_OUT | GPIO_BIN | 25 ) | ||
216 | #define PC26_AOUT_UART3_DTR ( GPIO_GIUS | GPIO_PORTC | GPIO_IN | 26 ) | ||
217 | #define PC27_BIN_UART3_DCD ( GPIO_GIUS | GPIO_PORTC | GPIO_OUT | GPIO_BIN | 27 ) | ||
218 | #define PC28_BIN_UART3_CTS ( GPIO_GIUS | GPIO_PORTC | GPIO_OUT | GPIO_BIN | 28 ) | ||
219 | #define PC29_AOUT_UART3_RTS ( GPIO_GIUS | GPIO_PORTC | GPIO_IN | 29 ) | ||
220 | #define PC30_BIN_UART3_TX ( GPIO_GIUS | GPIO_PORTC | GPIO_BIN | 30 ) | ||
221 | #define PC31_AOUT_UART3_RX ( GPIO_GIUS | GPIO_PORTC | GPIO_IN | 31) | ||
222 | #define PD6_PF_LSCLK ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 6 ) | ||
223 | #define PD7_PF_REV ( GPIO_PORTD | GPIO_PF | 7 ) | ||
224 | #define PD7_AF_UART2_DTR ( GPIO_GIUS | GPIO_PORTD | GPIO_IN | GPIO_AF | 7 ) | ||
225 | #define PD7_AIN_SPI2_SCLK ( GPIO_GIUS | GPIO_PORTD | GPIO_AIN | 7 ) | ||
226 | #define PD8_PF_CLS ( GPIO_PORTD | GPIO_PF | 8 ) | ||
227 | #define PD8_AF_UART2_DCD ( GPIO_PORTD | GPIO_OUT | GPIO_AF | 8 ) | ||
228 | #define PD8_AIN_SPI2_SS ( GPIO_GIUS | GPIO_PORTD | GPIO_AIN | 8 ) | ||
229 | #define PD9_PF_PS ( GPIO_PORTD | GPIO_PF | 9 ) | ||
230 | #define PD9_AF_UART2_RI ( GPIO_PORTD | GPIO_OUT | GPIO_AF | 9 ) | ||
231 | #define PD9_AOUT_SPI2_RXD ( GPIO_GIUS | GPIO_PORTD | GPIO_IN | 9 ) | ||
232 | #define PD10_PF_SPL_SPR ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 10 ) | ||
233 | #define PD10_AF_UART2_DSR ( GPIO_PORTD | GPIO_OUT | GPIO_AF | 10 ) | ||
234 | #define PD10_AIN_SPI2_TXD ( GPIO_GIUS | GPIO_PORTD | GPIO_OUT | 10 ) | ||
235 | #define PD11_PF_CONTRAST ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 11 ) | ||
236 | #define PD12_PF_ACD_OE ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 12 ) | ||
237 | #define PD13_PF_LP_HSYNC ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 13 ) | ||
238 | #define PD14_PF_FLM_VSYNC ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 14 ) | ||
239 | #define PD15_PF_LD0 ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 15 ) | ||
240 | #define PD16_PF_LD1 ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 16 ) | ||
241 | #define PD17_PF_LD2 ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 17 ) | ||
242 | #define PD18_PF_LD3 ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 18 ) | ||
243 | #define PD19_PF_LD4 ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 19 ) | ||
244 | #define PD20_PF_LD5 ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 20 ) | ||
245 | #define PD21_PF_LD6 ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 21 ) | ||
246 | #define PD22_PF_LD7 ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 22 ) | ||
247 | #define PD23_PF_LD8 ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 23 ) | ||
248 | #define PD24_PF_LD9 ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 24 ) | ||
249 | #define PD25_PF_LD10 ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 25 ) | ||
250 | #define PD26_PF_LD11 ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 26 ) | ||
251 | #define PD27_PF_LD12 ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 27 ) | ||
252 | #define PD28_PF_LD13 ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 28 ) | ||
253 | #define PD29_PF_LD14 ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 29 ) | ||
254 | #define PD30_PF_LD15 ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 30 ) | ||
255 | #define PD31_PF_TMR2OUT ( GPIO_PORTD | GPIO_PF | 31 ) | ||
256 | #define PD31_BIN_SPI2_TXD ( GPIO_GIUS | GPIO_PORTD | GPIO_BIN | 31 ) | ||
257 | |||
258 | /* | ||
259 | * PWM controller | ||
260 | */ | ||
261 | #define PWMC __REG(IMX_PWM_BASE + 0x00) /* PWM Control Register */ | ||
262 | #define PWMS __REG(IMX_PWM_BASE + 0x04) /* PWM Sample Register */ | ||
263 | #define PWMP __REG(IMX_PWM_BASE + 0x08) /* PWM Period Register */ | ||
264 | #define PWMCNT __REG(IMX_PWM_BASE + 0x0C) /* PWM Counter Register */ | ||
265 | |||
266 | #define PWMC_HCTR (0x01<<18) /* Halfword FIFO Data Swapping */ | ||
267 | #define PWMC_BCTR (0x01<<17) /* Byte FIFO Data Swapping */ | ||
268 | #define PWMC_SWR (0x01<<16) /* Software Reset */ | ||
269 | #define PWMC_CLKSRC (0x01<<15) /* Clock Source */ | ||
270 | #define PWMC_PRESCALER(x) (((x-1) & 0x7F) << 8) /* PRESCALER */ | ||
271 | #define PWMC_IRQ (0x01<< 7) /* Interrupt Request */ | ||
272 | #define PWMC_IRQEN (0x01<< 6) /* Interrupt Request Enable */ | ||
273 | #define PWMC_FIFOAV (0x01<< 5) /* FIFO Available */ | ||
274 | #define PWMC_EN (0x01<< 4) /* Enables/Disables the PWM */ | ||
275 | #define PWMC_REPEAT(x) (((x) & 0x03) << 2) /* Sample Repeats */ | ||
276 | #define PWMC_CLKSEL(x) (((x) & 0x03) << 0) /* Clock Selection */ | ||
277 | |||
278 | #define PWMS_SAMPLE(x) ((x) & 0xFFFF) /* Contains a two-sample word */ | ||
279 | #define PWMP_PERIOD(x) ((x) & 0xFFFF) /* Represents the PWM's period */ | ||
280 | #define PWMC_COUNTER(x) ((x) & 0xFFFF) /* Represents the current count value */ | ||
281 | |||
282 | /* | ||
283 | * DMA Controller | ||
284 | */ | ||
285 | #define DCR __REG(IMX_DMAC_BASE +0x00) /* DMA Control Register */ | ||
286 | #define DISR __REG(IMX_DMAC_BASE +0x04) /* DMA Interrupt status Register */ | ||
287 | #define DIMR __REG(IMX_DMAC_BASE +0x08) /* DMA Interrupt mask Register */ | ||
288 | #define DBTOSR __REG(IMX_DMAC_BASE +0x0c) /* DMA Burst timeout status Register */ | ||
289 | #define DRTOSR __REG(IMX_DMAC_BASE +0x10) /* DMA Request timeout Register */ | ||
290 | #define DSESR __REG(IMX_DMAC_BASE +0x14) /* DMA Transfer Error Status Register */ | ||
291 | #define DBOSR __REG(IMX_DMAC_BASE +0x18) /* DMA Buffer overflow status Register */ | ||
292 | #define DBTOCR __REG(IMX_DMAC_BASE +0x1c) /* DMA Burst timeout control Register */ | ||
293 | #define WSRA __REG(IMX_DMAC_BASE +0x40) /* W-Size Register A */ | ||
294 | #define XSRA __REG(IMX_DMAC_BASE +0x44) /* X-Size Register A */ | ||
295 | #define YSRA __REG(IMX_DMAC_BASE +0x48) /* Y-Size Register A */ | ||
296 | #define WSRB __REG(IMX_DMAC_BASE +0x4c) /* W-Size Register B */ | ||
297 | #define XSRB __REG(IMX_DMAC_BASE +0x50) /* X-Size Register B */ | ||
298 | #define YSRB __REG(IMX_DMAC_BASE +0x54) /* Y-Size Register B */ | ||
299 | #define SAR(x) __REG2( IMX_DMAC_BASE + 0x80, (x) << 6) /* Source Address Registers */ | ||
300 | #define DAR(x) __REG2( IMX_DMAC_BASE + 0x84, (x) << 6) /* Destination Address Registers */ | ||
301 | #define CNTR(x) __REG2( IMX_DMAC_BASE + 0x88, (x) << 6) /* Count Registers */ | ||
302 | #define CCR(x) __REG2( IMX_DMAC_BASE + 0x8c, (x) << 6) /* Control Registers */ | ||
303 | #define RSSR(x) __REG2( IMX_DMAC_BASE + 0x90, (x) << 6) /* Request source select Registers */ | ||
304 | #define BLR(x) __REG2( IMX_DMAC_BASE + 0x94, (x) << 6) /* Burst length Registers */ | ||
305 | #define RTOR(x) __REG2( IMX_DMAC_BASE + 0x98, (x) << 6) /* Request timeout Registers */ | ||
306 | #define BUCR(x) __REG2( IMX_DMAC_BASE + 0x98, (x) << 6) /* Bus Utilization Registers */ | ||
307 | |||
308 | #define DCR_DRST (1<<1) | ||
309 | #define DCR_DEN (1<<0) | ||
310 | #define DBTOCR_EN (1<<15) | ||
311 | #define DBTOCR_CNT(x) ((x) & 0x7fff ) | ||
312 | #define CNTR_CNT(x) ((x) & 0xffffff ) | ||
313 | #define CCR_DMOD_LINEAR ( 0x0 << 12 ) | ||
314 | #define CCR_DMOD_2D ( 0x1 << 12 ) | ||
315 | #define CCR_DMOD_FIFO ( 0x2 << 12 ) | ||
316 | #define CCR_DMOD_EOBFIFO ( 0x3 << 12 ) | ||
317 | #define CCR_SMOD_LINEAR ( 0x0 << 10 ) | ||
318 | #define CCR_SMOD_2D ( 0x1 << 10 ) | ||
319 | #define CCR_SMOD_FIFO ( 0x2 << 10 ) | ||
320 | #define CCR_SMOD_EOBFIFO ( 0x3 << 10 ) | ||
321 | #define CCR_MDIR_DEC (1<<9) | ||
322 | #define CCR_MSEL_B (1<<8) | ||
323 | #define CCR_DSIZ_32 ( 0x0 << 6 ) | ||
324 | #define CCR_DSIZ_8 ( 0x1 << 6 ) | ||
325 | #define CCR_DSIZ_16 ( 0x2 << 6 ) | ||
326 | #define CCR_SSIZ_32 ( 0x0 << 4 ) | ||
327 | #define CCR_SSIZ_8 ( 0x1 << 4 ) | ||
328 | #define CCR_SSIZ_16 ( 0x2 << 4 ) | ||
329 | #define CCR_REN (1<<3) | ||
330 | #define CCR_RPT (1<<2) | ||
331 | #define CCR_FRC (1<<1) | ||
332 | #define CCR_CEN (1<<0) | ||
333 | #define RTOR_EN (1<<15) | ||
334 | #define RTOR_CLK (1<<14) | ||
335 | #define RTOR_PSC (1<<13) | ||
336 | |||
337 | /* | ||
338 | * Interrupt controller | ||
339 | */ | ||
340 | |||
341 | #define IMX_INTCNTL __REG(IMX_AITC_BASE+0x00) | ||
342 | #define INTCNTL_FIAD (1<<19) | ||
343 | #define INTCNTL_NIAD (1<<20) | ||
344 | |||
345 | #define IMX_NIMASK __REG(IMX_AITC_BASE+0x04) | ||
346 | #define IMX_INTENNUM __REG(IMX_AITC_BASE+0x08) | ||
347 | #define IMX_INTDISNUM __REG(IMX_AITC_BASE+0x0c) | ||
348 | #define IMX_INTENABLEH __REG(IMX_AITC_BASE+0x10) | ||
349 | #define IMX_INTENABLEL __REG(IMX_AITC_BASE+0x14) | ||
350 | |||
351 | /* | ||
352 | * General purpose timers | ||
353 | */ | ||
354 | #define IMX_TCTL(x) __REG( 0x00 + (x)) | ||
355 | #define TCTL_SWR (1<<15) | ||
356 | #define TCTL_FRR (1<<8) | ||
357 | #define TCTL_CAP_RIS (1<<6) | ||
358 | #define TCTL_CAP_FAL (2<<6) | ||
359 | #define TCTL_CAP_RIS_FAL (3<<6) | ||
360 | #define TCTL_OM (1<<5) | ||
361 | #define TCTL_IRQEN (1<<4) | ||
362 | #define TCTL_CLK_PCLK1 (1<<1) | ||
363 | #define TCTL_CLK_PCLK1_16 (2<<1) | ||
364 | #define TCTL_CLK_TIN (3<<1) | ||
365 | #define TCTL_CLK_32 (4<<1) | ||
366 | #define TCTL_TEN (1<<0) | ||
367 | |||
368 | #define IMX_TPRER(x) __REG( 0x04 + (x)) | ||
369 | #define IMX_TCMP(x) __REG( 0x08 + (x)) | ||
370 | #define IMX_TCR(x) __REG( 0x0C + (x)) | ||
371 | #define IMX_TCN(x) __REG( 0x10 + (x)) | ||
372 | #define IMX_TSTAT(x) __REG( 0x14 + (x)) | ||
373 | #define TSTAT_CAPT (1<<1) | ||
374 | #define TSTAT_COMP (1<<0) | ||
375 | |||
376 | #endif // _IMX_REGS_H | ||
diff --git a/arch/arm/mach-imx/include/mach/imx-uart.h b/arch/arm/mach-imx/include/mach/imx-uart.h deleted file mode 100644 index d54eb1d48026..000000000000 --- a/arch/arm/mach-imx/include/mach/imx-uart.h +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | #ifndef ASMARM_ARCH_UART_H | ||
2 | #define ASMARM_ARCH_UART_H | ||
3 | |||
4 | #define IMXUART_HAVE_RTSCTS (1<<0) | ||
5 | |||
6 | struct imxuart_platform_data { | ||
7 | int (*init)(struct platform_device *pdev); | ||
8 | void (*exit)(struct platform_device *pdev); | ||
9 | unsigned int flags; | ||
10 | }; | ||
11 | |||
12 | #endif | ||
diff --git a/arch/arm/mach-imx/include/mach/io.h b/arch/arm/mach-imx/include/mach/io.h deleted file mode 100644 index 9e197ae4590f..000000000000 --- a/arch/arm/mach-imx/include/mach/io.h +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-imxads/include/mach/io.h | ||
3 | * | ||
4 | * Copyright (C) 1999 ARM Limited | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #ifndef __ASM_ARM_ARCH_IO_H | ||
21 | #define __ASM_ARM_ARCH_IO_H | ||
22 | |||
23 | #define IO_SPACE_LIMIT 0xffffffff | ||
24 | |||
25 | #define __io(a) __typesafe_io(a) | ||
26 | #define __mem_pci(a) (a) | ||
27 | |||
28 | #endif | ||
diff --git a/arch/arm/mach-imx/include/mach/irqs.h b/arch/arm/mach-imx/include/mach/irqs.h deleted file mode 100644 index 67812c5ac1f9..000000000000 --- a/arch/arm/mach-imx/include/mach/irqs.h +++ /dev/null | |||
@@ -1,121 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-imxads/include/mach/irqs.h | ||
3 | * | ||
4 | * Copyright (C) 1999 ARM Limited | ||
5 | * Copyright (C) 2000 Deep Blue Solutions Ltd. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | */ | ||
21 | |||
22 | #ifndef __ARM_IRQS_H__ | ||
23 | #define __ARM_IRQS_H__ | ||
24 | |||
25 | /* Use the imx definitions */ | ||
26 | #include <mach/hardware.h> | ||
27 | |||
28 | /* | ||
29 | * IMX Interrupt numbers | ||
30 | * | ||
31 | */ | ||
32 | #define INT_SOFTINT 0 | ||
33 | #define CSI_INT 6 | ||
34 | #define DSPA_MAC_INT 7 | ||
35 | #define DSPA_INT 8 | ||
36 | #define COMP_INT 9 | ||
37 | #define MSHC_XINT 10 | ||
38 | #define GPIO_INT_PORTA 11 | ||
39 | #define GPIO_INT_PORTB 12 | ||
40 | #define GPIO_INT_PORTC 13 | ||
41 | #define LCDC_INT 14 | ||
42 | #define SIM_INT 15 | ||
43 | #define SIM_DATA_INT 16 | ||
44 | #define RTC_INT 17 | ||
45 | #define RTC_SAMINT 18 | ||
46 | #define UART2_MINT_PFERR 19 | ||
47 | #define UART2_MINT_RTS 20 | ||
48 | #define UART2_MINT_DTR 21 | ||
49 | #define UART2_MINT_UARTC 22 | ||
50 | #define UART2_MINT_TX 23 | ||
51 | #define UART2_MINT_RX 24 | ||
52 | #define UART1_MINT_PFERR 25 | ||
53 | #define UART1_MINT_RTS 26 | ||
54 | #define UART1_MINT_DTR 27 | ||
55 | #define UART1_MINT_UARTC 28 | ||
56 | #define UART1_MINT_TX 29 | ||
57 | #define UART1_MINT_RX 30 | ||
58 | #define VOICE_DAC_INT 31 | ||
59 | #define VOICE_ADC_INT 32 | ||
60 | #define PEN_DATA_INT 33 | ||
61 | #define PWM_INT 34 | ||
62 | #define SDHC_INT 35 | ||
63 | #define I2C_INT 39 | ||
64 | #define CSPI_INT 41 | ||
65 | #define SSI_TX_INT 42 | ||
66 | #define SSI_TX_ERR_INT 43 | ||
67 | #define SSI_RX_INT 44 | ||
68 | #define SSI_RX_ERR_INT 45 | ||
69 | #define TOUCH_INT 46 | ||
70 | #define USBD_INT0 47 | ||
71 | #define USBD_INT1 48 | ||
72 | #define USBD_INT2 49 | ||
73 | #define USBD_INT3 50 | ||
74 | #define USBD_INT4 51 | ||
75 | #define USBD_INT5 52 | ||
76 | #define USBD_INT6 53 | ||
77 | #define BTSYS_INT 55 | ||
78 | #define BTTIM_INT 56 | ||
79 | #define BTWUI_INT 57 | ||
80 | #define TIM2_INT 58 | ||
81 | #define TIM1_INT 59 | ||
82 | #define DMA_ERR 60 | ||
83 | #define DMA_INT 61 | ||
84 | #define GPIO_INT_PORTD 62 | ||
85 | |||
86 | #define IMX_IRQS (64) | ||
87 | |||
88 | /* note: the IMX has four gpio ports (A-D), but only | ||
89 | * the following pins are connected to the outside | ||
90 | * world: | ||
91 | * | ||
92 | * PORT A: bits 0-31 | ||
93 | * PORT B: bits 8-31 | ||
94 | * PORT C: bits 3-17 | ||
95 | * PORT D: bits 6-31 | ||
96 | * | ||
97 | * We map these interrupts straight on. As a result we have | ||
98 | * several holes in the interrupt mapping. We do this for two | ||
99 | * reasons: | ||
100 | * - mapping the interrupts without holes would get | ||
101 | * far more complicated | ||
102 | * - Motorola could well decide to bring some processor | ||
103 | * with more pins connected | ||
104 | */ | ||
105 | |||
106 | #define IRQ_GPIOA(x) (IMX_IRQS + x) | ||
107 | #define IRQ_GPIOB(x) (IRQ_GPIOA(32) + x) | ||
108 | #define IRQ_GPIOC(x) (IRQ_GPIOB(32) + x) | ||
109 | #define IRQ_GPIOD(x) (IRQ_GPIOC(32) + x) | ||
110 | |||
111 | /* decode irq number to use with IMR(x), ISR(x) and friends */ | ||
112 | #define IRQ_TO_REG(irq) ((irq - IMX_IRQS) >> 5) | ||
113 | |||
114 | /* all normal IRQs can be FIQs */ | ||
115 | #define FIQ_START 0 | ||
116 | /* switch betwean IRQ and FIQ */ | ||
117 | extern int imx_set_irq_fiq(unsigned int irq, unsigned int type); | ||
118 | |||
119 | #define NR_IRQS (IRQ_GPIOD(32) + 1) | ||
120 | #define IRQ_GPIO(x) | ||
121 | #endif | ||
diff --git a/arch/arm/mach-imx/include/mach/memory.h b/arch/arm/mach-imx/include/mach/memory.h deleted file mode 100644 index a93df7cba694..000000000000 --- a/arch/arm/mach-imx/include/mach/memory.h +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-imx/include/mach/memory.h | ||
3 | * | ||
4 | * Copyright (C) 1999 ARM Limited | ||
5 | * Copyright (C) 2002 Shane Nay (shane@minirl.com) | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | */ | ||
21 | #ifndef __ASM_ARCH_MMU_H | ||
22 | #define __ASM_ARCH_MMU_H | ||
23 | |||
24 | #define PHYS_OFFSET UL(0x08000000) | ||
25 | |||
26 | #endif | ||
diff --git a/arch/arm/mach-imx/include/mach/mmc.h b/arch/arm/mach-imx/include/mach/mmc.h deleted file mode 100644 index 4712f354dcca..000000000000 --- a/arch/arm/mach-imx/include/mach/mmc.h +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | #ifndef ASMARM_ARCH_MMC_H | ||
2 | #define ASMARM_ARCH_MMC_H | ||
3 | |||
4 | #include <linux/mmc/host.h> | ||
5 | |||
6 | struct device; | ||
7 | |||
8 | struct imxmmc_platform_data { | ||
9 | int (*card_present)(struct device *); | ||
10 | int (*get_ro)(struct device *); | ||
11 | }; | ||
12 | |||
13 | extern void imx_set_mmc_info(struct imxmmc_platform_data *info); | ||
14 | |||
15 | #endif | ||
diff --git a/arch/arm/mach-imx/include/mach/mx1ads.h b/arch/arm/mach-imx/include/mach/mx1ads.h deleted file mode 100644 index def05d510eb3..000000000000 --- a/arch/arm/mach-imx/include/mach/mx1ads.h +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-imx/include/mach/mx1ads.h | ||
3 | * | ||
4 | * Copyright (C) 2004 Robert Schwebel, Pengutronix | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | * | ||
20 | */ | ||
21 | |||
22 | #ifndef __ASM_ARCH_MX1ADS_H | ||
23 | #define __ASM_ARCH_MX1ADS_H | ||
24 | |||
25 | /* ------------------------------------------------------------------------ */ | ||
26 | /* Memory Map for the M9328MX1ADS (MX1ADS) Board */ | ||
27 | /* ------------------------------------------------------------------------ */ | ||
28 | |||
29 | #define MX1ADS_FLASH_PHYS 0x10000000 | ||
30 | #define MX1ADS_FLASH_SIZE (16*1024*1024) | ||
31 | |||
32 | #define IMX_FB_PHYS (0x0C000000 - 0x40000) | ||
33 | |||
34 | #define CLK32 32000 | ||
35 | |||
36 | #endif /* __ASM_ARCH_MX1ADS_H */ | ||
diff --git a/arch/arm/mach-imx/include/mach/spi_imx.h b/arch/arm/mach-imx/include/mach/spi_imx.h deleted file mode 100644 index 4186430feecf..000000000000 --- a/arch/arm/mach-imx/include/mach/spi_imx.h +++ /dev/null | |||
@@ -1,72 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-imx/include/mach/spi_imx.h | ||
3 | * | ||
4 | * Copyright (C) 2006 SWAPP | ||
5 | * Andrea Paterniani <a.paterniani@swapp-eng.it> | ||
6 | * | ||
7 | * Initial version inspired by: | ||
8 | * linux-2.6.17-rc3-mm1/arch/arm/mach-pxa/include/mach/pxa2xx_spi.h | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or | ||
13 | * (at your option) any later version. | ||
14 | * | ||
15 | * This program is distributed in the hope that it will be useful, | ||
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | * GNU General Public License for more details. | ||
19 | * | ||
20 | * You should have received a copy of the GNU General Public License | ||
21 | * along with this program; if not, write to the Free Software | ||
22 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
23 | */ | ||
24 | |||
25 | #ifndef SPI_IMX_H_ | ||
26 | #define SPI_IMX_H_ | ||
27 | |||
28 | |||
29 | /*-------------------------------------------------------------------------*/ | ||
30 | /** | ||
31 | * struct spi_imx_master - device.platform_data for SPI controller devices. | ||
32 | * @num_chipselect: chipselects are used to distinguish individual | ||
33 | * SPI slaves, and are numbered from zero to num_chipselects - 1. | ||
34 | * each slave has a chipselect signal, but it's common that not | ||
35 | * every chipselect is connected to a slave. | ||
36 | * @enable_dma: if true enables DMA driven transfers. | ||
37 | */ | ||
38 | struct spi_imx_master { | ||
39 | u8 num_chipselect; | ||
40 | u8 enable_dma:1; | ||
41 | }; | ||
42 | /*-------------------------------------------------------------------------*/ | ||
43 | |||
44 | |||
45 | /*-------------------------------------------------------------------------*/ | ||
46 | /** | ||
47 | * struct spi_imx_chip - spi_board_info.controller_data for SPI | ||
48 | * slave devices, copied to spi_device.controller_data. | ||
49 | * @enable_loopback : used for test purpouse to internally connect RX and TX | ||
50 | * sections. | ||
51 | * @enable_dma : enables dma transfer (provided that controller driver has | ||
52 | * dma enabled too). | ||
53 | * @ins_ss_pulse : enable /SS pulse insertion between SPI burst. | ||
54 | * @bclk_wait : number of bclk waits between each bits_per_word SPI burst. | ||
55 | * @cs_control : function pointer to board-specific function to assert/deassert | ||
56 | * I/O port to control HW generation of devices chip-select. | ||
57 | */ | ||
58 | struct spi_imx_chip { | ||
59 | u8 enable_loopback:1; | ||
60 | u8 enable_dma:1; | ||
61 | u8 ins_ss_pulse:1; | ||
62 | u16 bclk_wait:15; | ||
63 | void (*cs_control)(u32 control); | ||
64 | }; | ||
65 | |||
66 | /* Chip-select state */ | ||
67 | #define SPI_CS_ASSERT (1 << 0) | ||
68 | #define SPI_CS_DEASSERT (1 << 1) | ||
69 | /*-------------------------------------------------------------------------*/ | ||
70 | |||
71 | |||
72 | #endif /* SPI_IMX_H_*/ | ||
diff --git a/arch/arm/mach-imx/include/mach/system.h b/arch/arm/mach-imx/include/mach/system.h deleted file mode 100644 index 46d4ca91af79..000000000000 --- a/arch/arm/mach-imx/include/mach/system.h +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-imxads/include/mach/system.h | ||
3 | * | ||
4 | * Copyright (C) 1999 ARM Limited | ||
5 | * Copyright (C) 2000 Deep Blue Solutions Ltd | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | */ | ||
21 | #ifndef __ASM_ARCH_SYSTEM_H | ||
22 | #define __ASM_ARCH_SYSTEM_H | ||
23 | |||
24 | static void | ||
25 | arch_idle(void) | ||
26 | { | ||
27 | /* | ||
28 | * This should do all the clock switching | ||
29 | * and wait for interrupt tricks | ||
30 | */ | ||
31 | cpu_do_idle(); | ||
32 | } | ||
33 | |||
34 | static inline void | ||
35 | arch_reset(char mode, const char *cmd) | ||
36 | { | ||
37 | cpu_reset(0); | ||
38 | } | ||
39 | |||
40 | #endif | ||
diff --git a/arch/arm/mach-imx/include/mach/uncompress.h b/arch/arm/mach-imx/include/mach/uncompress.h deleted file mode 100644 index 70523e67a8f6..000000000000 --- a/arch/arm/mach-imx/include/mach/uncompress.h +++ /dev/null | |||
@@ -1,71 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-imxads/include/mach/uncompress.h | ||
3 | * | ||
4 | * | ||
5 | * | ||
6 | * Copyright (C) 1999 ARM Limited | ||
7 | * Copyright (C) Shane Nay (shane@minirl.com) | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License as published by | ||
11 | * the Free Software Foundation; either version 2 of the License, or | ||
12 | * (at your option) any later version. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, | ||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | * GNU General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to the Free Software | ||
21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
22 | */ | ||
23 | |||
24 | #define UART(x) (*(volatile unsigned long *)(serial_port + (x))) | ||
25 | |||
26 | #define UART1_BASE 0x206000 | ||
27 | #define UART2_BASE 0x207000 | ||
28 | #define USR2 0x98 | ||
29 | #define USR2_TXFE (1<<14) | ||
30 | #define TXR 0x40 | ||
31 | #define UCR1 0x80 | ||
32 | #define UCR1_UARTEN 1 | ||
33 | |||
34 | /* | ||
35 | * The following code assumes the serial port has already been | ||
36 | * initialized by the bootloader. We search for the first enabled | ||
37 | * port in the most probable order. If you didn't setup a port in | ||
38 | * your bootloader then nothing will appear (which might be desired). | ||
39 | * | ||
40 | * This does not append a newline | ||
41 | */ | ||
42 | static void putc(int c) | ||
43 | { | ||
44 | unsigned long serial_port; | ||
45 | |||
46 | do { | ||
47 | serial_port = UART1_BASE; | ||
48 | if ( UART(UCR1) & UCR1_UARTEN ) | ||
49 | break; | ||
50 | serial_port = UART2_BASE; | ||
51 | if ( UART(UCR1) & UCR1_UARTEN ) | ||
52 | break; | ||
53 | return; | ||
54 | } while(0); | ||
55 | |||
56 | while (!(UART(USR2) & USR2_TXFE)) | ||
57 | barrier(); | ||
58 | |||
59 | UART(TXR) = c; | ||
60 | } | ||
61 | |||
62 | static inline void flush(void) | ||
63 | { | ||
64 | } | ||
65 | |||
66 | /* | ||
67 | * nothing to do | ||
68 | */ | ||
69 | #define arch_decomp_setup() | ||
70 | |||
71 | #define arch_decomp_wdog() | ||
diff --git a/arch/arm/mach-imx/include/mach/vmalloc.h b/arch/arm/mach-imx/include/mach/vmalloc.h deleted file mode 100644 index 7d7cb0bde3e8..000000000000 --- a/arch/arm/mach-imx/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-imx/include/mach/vmalloc.h | ||
3 | * | ||
4 | * Copyright (C) 2000 Russell King. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #define VMALLOC_END (PAGE_OFFSET + 0x10000000) | ||
diff --git a/arch/arm/mach-imx/irq.c b/arch/arm/mach-imx/irq.c deleted file mode 100644 index 531b95deadc0..000000000000 --- a/arch/arm/mach-imx/irq.c +++ /dev/null | |||
@@ -1,311 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-imx/irq.c | ||
3 | * | ||
4 | * Copyright (C) 1999 ARM Limited | ||
5 | * Copyright (C) 2002 Shane Nay (shane@minirl.com) | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | * | ||
21 | * 03/03/2004 Sascha Hauer <sascha@saschahauer.de> | ||
22 | * Copied from the motorola bsp package and added gpio demux | ||
23 | * interrupt handler | ||
24 | */ | ||
25 | |||
26 | #include <linux/init.h> | ||
27 | #include <linux/list.h> | ||
28 | #include <linux/timer.h> | ||
29 | #include <linux/io.h> | ||
30 | |||
31 | #include <mach/hardware.h> | ||
32 | #include <asm/irq.h> | ||
33 | |||
34 | #include <asm/mach/irq.h> | ||
35 | |||
36 | /* | ||
37 | * | ||
38 | * We simply use the ENABLE DISABLE registers inside of the IMX | ||
39 | * to turn on/off specific interrupts. | ||
40 | * | ||
41 | */ | ||
42 | |||
43 | #define INTCNTL_OFF 0x00 | ||
44 | #define NIMASK_OFF 0x04 | ||
45 | #define INTENNUM_OFF 0x08 | ||
46 | #define INTDISNUM_OFF 0x0C | ||
47 | #define INTENABLEH_OFF 0x10 | ||
48 | #define INTENABLEL_OFF 0x14 | ||
49 | #define INTTYPEH_OFF 0x18 | ||
50 | #define INTTYPEL_OFF 0x1C | ||
51 | #define NIPRIORITY_OFF(x) (0x20+4*(7-(x))) | ||
52 | #define NIVECSR_OFF 0x40 | ||
53 | #define FIVECSR_OFF 0x44 | ||
54 | #define INTSRCH_OFF 0x48 | ||
55 | #define INTSRCL_OFF 0x4C | ||
56 | #define INTFRCH_OFF 0x50 | ||
57 | #define INTFRCL_OFF 0x54 | ||
58 | #define NIPNDH_OFF 0x58 | ||
59 | #define NIPNDL_OFF 0x5C | ||
60 | #define FIPNDH_OFF 0x60 | ||
61 | #define FIPNDL_OFF 0x64 | ||
62 | |||
63 | #define VA_AITC_BASE IO_ADDRESS(IMX_AITC_BASE) | ||
64 | #define IMX_AITC_INTCNTL (VA_AITC_BASE + INTCNTL_OFF) | ||
65 | #define IMX_AITC_NIMASK (VA_AITC_BASE + NIMASK_OFF) | ||
66 | #define IMX_AITC_INTENNUM (VA_AITC_BASE + INTENNUM_OFF) | ||
67 | #define IMX_AITC_INTDISNUM (VA_AITC_BASE + INTDISNUM_OFF) | ||
68 | #define IMX_AITC_INTENABLEH (VA_AITC_BASE + INTENABLEH_OFF) | ||
69 | #define IMX_AITC_INTENABLEL (VA_AITC_BASE + INTENABLEL_OFF) | ||
70 | #define IMX_AITC_INTTYPEH (VA_AITC_BASE + INTTYPEH_OFF) | ||
71 | #define IMX_AITC_INTTYPEL (VA_AITC_BASE + INTTYPEL_OFF) | ||
72 | #define IMX_AITC_NIPRIORITY(x) (VA_AITC_BASE + NIPRIORITY_OFF(x)) | ||
73 | #define IMX_AITC_NIVECSR (VA_AITC_BASE + NIVECSR_OFF) | ||
74 | #define IMX_AITC_FIVECSR (VA_AITC_BASE + FIVECSR_OFF) | ||
75 | #define IMX_AITC_INTSRCH (VA_AITC_BASE + INTSRCH_OFF) | ||
76 | #define IMX_AITC_INTSRCL (VA_AITC_BASE + INTSRCL_OFF) | ||
77 | #define IMX_AITC_INTFRCH (VA_AITC_BASE + INTFRCH_OFF) | ||
78 | #define IMX_AITC_INTFRCL (VA_AITC_BASE + INTFRCL_OFF) | ||
79 | #define IMX_AITC_NIPNDH (VA_AITC_BASE + NIPNDH_OFF) | ||
80 | #define IMX_AITC_NIPNDL (VA_AITC_BASE + NIPNDL_OFF) | ||
81 | #define IMX_AITC_FIPNDH (VA_AITC_BASE + FIPNDH_OFF) | ||
82 | #define IMX_AITC_FIPNDL (VA_AITC_BASE + FIPNDL_OFF) | ||
83 | |||
84 | #if 0 | ||
85 | #define DEBUG_IRQ(fmt...) printk(fmt) | ||
86 | #else | ||
87 | #define DEBUG_IRQ(fmt...) do { } while (0) | ||
88 | #endif | ||
89 | |||
90 | static void | ||
91 | imx_mask_irq(unsigned int irq) | ||
92 | { | ||
93 | __raw_writel(irq, IMX_AITC_INTDISNUM); | ||
94 | } | ||
95 | |||
96 | static void | ||
97 | imx_unmask_irq(unsigned int irq) | ||
98 | { | ||
99 | __raw_writel(irq, IMX_AITC_INTENNUM); | ||
100 | } | ||
101 | |||
102 | #ifdef CONFIG_FIQ | ||
103 | int imx_set_irq_fiq(unsigned int irq, unsigned int type) | ||
104 | { | ||
105 | unsigned int irqt; | ||
106 | |||
107 | if (irq >= IMX_IRQS) | ||
108 | return -EINVAL; | ||
109 | |||
110 | if (irq < IMX_IRQS / 2) { | ||
111 | irqt = __raw_readl(IMX_AITC_INTTYPEL) & ~(1 << irq); | ||
112 | __raw_writel(irqt | (!!type << irq), IMX_AITC_INTTYPEL); | ||
113 | } else { | ||
114 | irq -= IMX_IRQS / 2; | ||
115 | irqt = __raw_readl(IMX_AITC_INTTYPEH) & ~(1 << irq); | ||
116 | __raw_writel(irqt | (!!type << irq), IMX_AITC_INTTYPEH); | ||
117 | } | ||
118 | |||
119 | return 0; | ||
120 | } | ||
121 | EXPORT_SYMBOL(imx_set_irq_fiq); | ||
122 | #endif /* CONFIG_FIQ */ | ||
123 | |||
124 | static int | ||
125 | imx_gpio_irq_type(unsigned int _irq, unsigned int type) | ||
126 | { | ||
127 | unsigned int irq_type = 0, irq, reg, bit; | ||
128 | |||
129 | irq = _irq - IRQ_GPIOA(0); | ||
130 | reg = irq >> 5; | ||
131 | bit = 1 << (irq % 32); | ||
132 | |||
133 | if (type == IRQ_TYPE_PROBE) { | ||
134 | /* Don't mess with enabled GPIOs using preconfigured edges or | ||
135 | GPIOs set to alternate function during probe */ | ||
136 | /* TODO: support probe */ | ||
137 | // if ((GPIO_IRQ_rising_edge[idx] | GPIO_IRQ_falling_edge[idx]) & | ||
138 | // GPIO_bit(gpio)) | ||
139 | // return 0; | ||
140 | // if (GAFR(gpio) & (0x3 << (((gpio) & 0xf)*2))) | ||
141 | // return 0; | ||
142 | // type = IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING; | ||
143 | } | ||
144 | |||
145 | GIUS(reg) |= bit; | ||
146 | DDIR(reg) &= ~(bit); | ||
147 | |||
148 | DEBUG_IRQ("setting type of irq %d to ", _irq); | ||
149 | |||
150 | if (type & IRQ_TYPE_EDGE_RISING) { | ||
151 | DEBUG_IRQ("rising edges\n"); | ||
152 | irq_type = 0x0; | ||
153 | } | ||
154 | if (type & IRQ_TYPE_EDGE_FALLING) { | ||
155 | DEBUG_IRQ("falling edges\n"); | ||
156 | irq_type = 0x1; | ||
157 | } | ||
158 | if (type & IRQ_TYPE_LEVEL_LOW) { | ||
159 | DEBUG_IRQ("low level\n"); | ||
160 | irq_type = 0x3; | ||
161 | } | ||
162 | if (type & IRQ_TYPE_LEVEL_HIGH) { | ||
163 | DEBUG_IRQ("high level\n"); | ||
164 | irq_type = 0x2; | ||
165 | } | ||
166 | |||
167 | if (irq % 32 < 16) { | ||
168 | ICR1(reg) = (ICR1(reg) & ~(0x3 << ((irq % 16) * 2))) | | ||
169 | (irq_type << ((irq % 16) * 2)); | ||
170 | } else { | ||
171 | ICR2(reg) = (ICR2(reg) & ~(0x3 << ((irq % 16) * 2))) | | ||
172 | (irq_type << ((irq % 16) * 2)); | ||
173 | } | ||
174 | |||
175 | return 0; | ||
176 | |||
177 | } | ||
178 | |||
179 | static void | ||
180 | imx_gpio_ack_irq(unsigned int irq) | ||
181 | { | ||
182 | DEBUG_IRQ("%s: irq %d\n", __func__, irq); | ||
183 | ISR(IRQ_TO_REG(irq)) = 1 << ((irq - IRQ_GPIOA(0)) % 32); | ||
184 | } | ||
185 | |||
186 | static void | ||
187 | imx_gpio_mask_irq(unsigned int irq) | ||
188 | { | ||
189 | DEBUG_IRQ("%s: irq %d\n", __func__, irq); | ||
190 | IMR(IRQ_TO_REG(irq)) &= ~( 1 << ((irq - IRQ_GPIOA(0)) % 32)); | ||
191 | } | ||
192 | |||
193 | static void | ||
194 | imx_gpio_unmask_irq(unsigned int irq) | ||
195 | { | ||
196 | DEBUG_IRQ("%s: irq %d\n", __func__, irq); | ||
197 | IMR(IRQ_TO_REG(irq)) |= 1 << ((irq - IRQ_GPIOA(0)) % 32); | ||
198 | } | ||
199 | |||
200 | static void | ||
201 | imx_gpio_handler(unsigned int mask, unsigned int irq, | ||
202 | struct irq_desc *desc) | ||
203 | { | ||
204 | while (mask) { | ||
205 | if (mask & 1) { | ||
206 | DEBUG_IRQ("handling irq %d\n", irq); | ||
207 | generic_handle_irq(irq); | ||
208 | } | ||
209 | irq++; | ||
210 | mask >>= 1; | ||
211 | } | ||
212 | } | ||
213 | |||
214 | static void | ||
215 | imx_gpioa_demux_handler(unsigned int irq_unused, struct irq_desc *desc) | ||
216 | { | ||
217 | unsigned int mask, irq; | ||
218 | |||
219 | mask = ISR(0); | ||
220 | irq = IRQ_GPIOA(0); | ||
221 | imx_gpio_handler(mask, irq, desc); | ||
222 | } | ||
223 | |||
224 | static void | ||
225 | imx_gpiob_demux_handler(unsigned int irq_unused, struct irq_desc *desc) | ||
226 | { | ||
227 | unsigned int mask, irq; | ||
228 | |||
229 | mask = ISR(1); | ||
230 | irq = IRQ_GPIOB(0); | ||
231 | imx_gpio_handler(mask, irq, desc); | ||
232 | } | ||
233 | |||
234 | static void | ||
235 | imx_gpioc_demux_handler(unsigned int irq_unused, struct irq_desc *desc) | ||
236 | { | ||
237 | unsigned int mask, irq; | ||
238 | |||
239 | mask = ISR(2); | ||
240 | irq = IRQ_GPIOC(0); | ||
241 | imx_gpio_handler(mask, irq, desc); | ||
242 | } | ||
243 | |||
244 | static void | ||
245 | imx_gpiod_demux_handler(unsigned int irq_unused, struct irq_desc *desc) | ||
246 | { | ||
247 | unsigned int mask, irq; | ||
248 | |||
249 | mask = ISR(3); | ||
250 | irq = IRQ_GPIOD(0); | ||
251 | imx_gpio_handler(mask, irq, desc); | ||
252 | } | ||
253 | |||
254 | static struct irq_chip imx_internal_chip = { | ||
255 | .name = "MPU", | ||
256 | .ack = imx_mask_irq, | ||
257 | .mask = imx_mask_irq, | ||
258 | .unmask = imx_unmask_irq, | ||
259 | }; | ||
260 | |||
261 | static struct irq_chip imx_gpio_chip = { | ||
262 | .name = "GPIO", | ||
263 | .ack = imx_gpio_ack_irq, | ||
264 | .mask = imx_gpio_mask_irq, | ||
265 | .unmask = imx_gpio_unmask_irq, | ||
266 | .set_type = imx_gpio_irq_type, | ||
267 | }; | ||
268 | |||
269 | void __init | ||
270 | imx_init_irq(void) | ||
271 | { | ||
272 | unsigned int irq; | ||
273 | |||
274 | DEBUG_IRQ("Initializing imx interrupts\n"); | ||
275 | |||
276 | /* Disable all interrupts initially. */ | ||
277 | /* Do not rely on the bootloader. */ | ||
278 | __raw_writel(0, IMX_AITC_INTENABLEH); | ||
279 | __raw_writel(0, IMX_AITC_INTENABLEL); | ||
280 | |||
281 | /* Mask all GPIO interrupts as well */ | ||
282 | IMR(0) = 0; | ||
283 | IMR(1) = 0; | ||
284 | IMR(2) = 0; | ||
285 | IMR(3) = 0; | ||
286 | |||
287 | for (irq = 0; irq < IMX_IRQS; irq++) { | ||
288 | set_irq_chip(irq, &imx_internal_chip); | ||
289 | set_irq_handler(irq, handle_level_irq); | ||
290 | set_irq_flags(irq, IRQF_VALID); | ||
291 | } | ||
292 | |||
293 | for (irq = IRQ_GPIOA(0); irq < IRQ_GPIOD(32); irq++) { | ||
294 | set_irq_chip(irq, &imx_gpio_chip); | ||
295 | set_irq_handler(irq, handle_edge_irq); | ||
296 | set_irq_flags(irq, IRQF_VALID); | ||
297 | } | ||
298 | |||
299 | set_irq_chained_handler(GPIO_INT_PORTA, imx_gpioa_demux_handler); | ||
300 | set_irq_chained_handler(GPIO_INT_PORTB, imx_gpiob_demux_handler); | ||
301 | set_irq_chained_handler(GPIO_INT_PORTC, imx_gpioc_demux_handler); | ||
302 | set_irq_chained_handler(GPIO_INT_PORTD, imx_gpiod_demux_handler); | ||
303 | |||
304 | /* Release masking of interrupts according to priority */ | ||
305 | __raw_writel(-1, IMX_AITC_NIMASK); | ||
306 | |||
307 | #ifdef CONFIG_FIQ | ||
308 | /* Initialize FIQ */ | ||
309 | init_FIQ(); | ||
310 | #endif | ||
311 | } | ||
diff --git a/arch/arm/mach-imx/leds-mx1ads.c b/arch/arm/mach-imx/leds-mx1ads.c deleted file mode 100644 index 1d48f2762cbc..000000000000 --- a/arch/arm/mach-imx/leds-mx1ads.c +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-imx/leds-mx1ads.c | ||
3 | * | ||
4 | * Copyright (c) 2004 Sascha Hauer <sascha@saschahauer.de> | ||
5 | * | ||
6 | * Original (leds-footbridge.c) by Russell King | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | * | ||
12 | */ | ||
13 | |||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/io.h> | ||
17 | #include <mach/hardware.h> | ||
18 | #include <asm/system.h> | ||
19 | #include <asm/leds.h> | ||
20 | #include "leds.h" | ||
21 | |||
22 | /* | ||
23 | * The MX1ADS Board has only one usable LED, | ||
24 | * so select only the timer led or the | ||
25 | * cpu usage led | ||
26 | */ | ||
27 | void | ||
28 | mx1ads_leds_event(led_event_t ledevt) | ||
29 | { | ||
30 | unsigned long flags; | ||
31 | |||
32 | local_irq_save(flags); | ||
33 | |||
34 | switch (ledevt) { | ||
35 | #ifdef CONFIG_LEDS_CPU | ||
36 | case led_idle_start: | ||
37 | DR(0) &= ~(1<<2); | ||
38 | break; | ||
39 | |||
40 | case led_idle_end: | ||
41 | DR(0) |= 1<<2; | ||
42 | break; | ||
43 | #endif | ||
44 | |||
45 | #ifdef CONFIG_LEDS_TIMER | ||
46 | case led_timer: | ||
47 | DR(0) ^= 1<<2; | ||
48 | #endif | ||
49 | default: | ||
50 | break; | ||
51 | } | ||
52 | local_irq_restore(flags); | ||
53 | } | ||
diff --git a/arch/arm/mach-imx/leds.c b/arch/arm/mach-imx/leds.c deleted file mode 100644 index cf30803e019b..000000000000 --- a/arch/arm/mach-imx/leds.c +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-imx/leds.c | ||
3 | * | ||
4 | * Copyright (C) 2004 Sascha Hauer <sascha@saschahauer.de> | ||
5 | * | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | */ | ||
12 | |||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/init.h> | ||
15 | |||
16 | #include <asm/leds.h> | ||
17 | #include <asm/mach-types.h> | ||
18 | |||
19 | #include "leds.h" | ||
20 | |||
21 | static int __init | ||
22 | leds_init(void) | ||
23 | { | ||
24 | if (machine_is_mx1ads()) { | ||
25 | leds_event = mx1ads_leds_event; | ||
26 | } | ||
27 | |||
28 | return 0; | ||
29 | } | ||
30 | |||
31 | __initcall(leds_init); | ||
diff --git a/arch/arm/mach-imx/leds.h b/arch/arm/mach-imx/leds.h deleted file mode 100644 index 49dc1c1da338..000000000000 --- a/arch/arm/mach-imx/leds.h +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-imx/leds.h | ||
3 | * | ||
4 | * Copyright (c) 2004 Sascha Hauer <sascha@saschahauer.de> | ||
5 | * | ||
6 | * blinky lights for IMX-based systems | ||
7 | * | ||
8 | */ | ||
9 | extern void mx1ads_leds_event(led_event_t evt); | ||
diff --git a/arch/arm/mach-imx/mx1ads.c b/arch/arm/mach-imx/mx1ads.c deleted file mode 100644 index 87fa1ff43b0b..000000000000 --- a/arch/arm/mach-imx/mx1ads.c +++ /dev/null | |||
@@ -1,180 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-imx/mx1ads.c | ||
3 | * | ||
4 | * Initially based on: | ||
5 | * linux-2.6.7-imx/arch/arm/mach-imx/scb9328.c | ||
6 | * Copyright (c) 2004 Sascha Hauer <sascha@saschahauer.de> | ||
7 | * | ||
8 | * 2004 (c) MontaVista Software, Inc. | ||
9 | * | ||
10 | * This file is licensed under the terms of the GNU General Public | ||
11 | * License version 2. This program is licensed "as is" without any | ||
12 | * warranty of any kind, whether express or implied. | ||
13 | */ | ||
14 | |||
15 | #include <linux/device.h> | ||
16 | #include <linux/init.h> | ||
17 | #include <linux/platform_device.h> | ||
18 | #include <asm/system.h> | ||
19 | #include <mach/hardware.h> | ||
20 | #include <asm/irq.h> | ||
21 | #include <asm/pgtable.h> | ||
22 | #include <asm/page.h> | ||
23 | |||
24 | #include <asm/mach/map.h> | ||
25 | #include <asm/mach-types.h> | ||
26 | |||
27 | #include <asm/mach/arch.h> | ||
28 | #include <mach/mmc.h> | ||
29 | #include <mach/imx-uart.h> | ||
30 | #include <linux/interrupt.h> | ||
31 | #include "generic.h" | ||
32 | |||
33 | static struct resource cs89x0_resources[] = { | ||
34 | [0] = { | ||
35 | .start = IMX_CS4_PHYS + 0x300, | ||
36 | .end = IMX_CS4_PHYS + 0x300 + 16, | ||
37 | .flags = IORESOURCE_MEM, | ||
38 | }, | ||
39 | [1] = { | ||
40 | .start = IRQ_GPIOC(17), | ||
41 | .end = IRQ_GPIOC(17), | ||
42 | .flags = IORESOURCE_IRQ, | ||
43 | }, | ||
44 | }; | ||
45 | |||
46 | static struct platform_device cs89x0_device = { | ||
47 | .name = "cirrus-cs89x0", | ||
48 | .num_resources = ARRAY_SIZE(cs89x0_resources), | ||
49 | .resource = cs89x0_resources, | ||
50 | }; | ||
51 | |||
52 | static struct imxuart_platform_data uart_pdata = { | ||
53 | .flags = IMXUART_HAVE_RTSCTS, | ||
54 | }; | ||
55 | |||
56 | static struct resource imx_uart1_resources[] = { | ||
57 | [0] = { | ||
58 | .start = 0x00206000, | ||
59 | .end = 0x002060FF, | ||
60 | .flags = IORESOURCE_MEM, | ||
61 | }, | ||
62 | [1] = { | ||
63 | .start = (UART1_MINT_RX), | ||
64 | .end = (UART1_MINT_RX), | ||
65 | .flags = IORESOURCE_IRQ, | ||
66 | }, | ||
67 | [2] = { | ||
68 | .start = (UART1_MINT_TX), | ||
69 | .end = (UART1_MINT_TX), | ||
70 | .flags = IORESOURCE_IRQ, | ||
71 | }, | ||
72 | [3] = { | ||
73 | .start = UART1_MINT_RTS, | ||
74 | .end = UART1_MINT_RTS, | ||
75 | .flags = IORESOURCE_IRQ, | ||
76 | }, | ||
77 | }; | ||
78 | |||
79 | static struct platform_device imx_uart1_device = { | ||
80 | .name = "imx-uart", | ||
81 | .id = 0, | ||
82 | .num_resources = ARRAY_SIZE(imx_uart1_resources), | ||
83 | .resource = imx_uart1_resources, | ||
84 | .dev = { | ||
85 | .platform_data = &uart_pdata, | ||
86 | } | ||
87 | }; | ||
88 | |||
89 | static struct resource imx_uart2_resources[] = { | ||
90 | [0] = { | ||
91 | .start = 0x00207000, | ||
92 | .end = 0x002070FF, | ||
93 | .flags = IORESOURCE_MEM, | ||
94 | }, | ||
95 | [1] = { | ||
96 | .start = (UART2_MINT_RX), | ||
97 | .end = (UART2_MINT_RX), | ||
98 | .flags = IORESOURCE_IRQ, | ||
99 | }, | ||
100 | [2] = { | ||
101 | .start = (UART2_MINT_TX), | ||
102 | .end = (UART2_MINT_TX), | ||
103 | .flags = IORESOURCE_IRQ, | ||
104 | }, | ||
105 | [3] = { | ||
106 | .start = UART2_MINT_RTS, | ||
107 | .end = UART2_MINT_RTS, | ||
108 | .flags = IORESOURCE_IRQ, | ||
109 | }, | ||
110 | }; | ||
111 | |||
112 | static struct platform_device imx_uart2_device = { | ||
113 | .name = "imx-uart", | ||
114 | .id = 1, | ||
115 | .num_resources = ARRAY_SIZE(imx_uart2_resources), | ||
116 | .resource = imx_uart2_resources, | ||
117 | .dev = { | ||
118 | .platform_data = &uart_pdata, | ||
119 | } | ||
120 | }; | ||
121 | |||
122 | static struct platform_device *devices[] __initdata = { | ||
123 | &cs89x0_device, | ||
124 | &imx_uart1_device, | ||
125 | &imx_uart2_device, | ||
126 | }; | ||
127 | |||
128 | #if defined(CONFIG_MMC_IMX) || defined(CONFIG_MMC_IMX_MODULE) | ||
129 | static int mx1ads_mmc_card_present(struct device *dev) | ||
130 | { | ||
131 | /* MMC/SD Card Detect is PB 20 on MX1ADS V1.0.7 */ | ||
132 | return (SSR(1) & (1 << 20) ? 0 : 1); | ||
133 | } | ||
134 | |||
135 | static struct imxmmc_platform_data mx1ads_mmc_info = { | ||
136 | .card_present = mx1ads_mmc_card_present, | ||
137 | }; | ||
138 | #endif | ||
139 | |||
140 | static void __init | ||
141 | mx1ads_init(void) | ||
142 | { | ||
143 | #ifdef CONFIG_LEDS | ||
144 | imx_gpio_mode(GPIO_PORTA | GPIO_OUT | 2); | ||
145 | #endif | ||
146 | #if defined(CONFIG_MMC_IMX) || defined(CONFIG_MMC_IMX_MODULE) | ||
147 | /* SD/MMC card detect */ | ||
148 | imx_gpio_mode(GPIO_PORTB | GPIO_GIUS | GPIO_IN | 20); | ||
149 | imx_set_mmc_info(&mx1ads_mmc_info); | ||
150 | #endif | ||
151 | |||
152 | imx_gpio_mode(PC9_PF_UART1_CTS); | ||
153 | imx_gpio_mode(PC10_PF_UART1_RTS); | ||
154 | imx_gpio_mode(PC11_PF_UART1_TXD); | ||
155 | imx_gpio_mode(PC12_PF_UART1_RXD); | ||
156 | |||
157 | imx_gpio_mode(PB28_PF_UART2_CTS); | ||
158 | imx_gpio_mode(PB29_PF_UART2_RTS); | ||
159 | imx_gpio_mode(PB30_PF_UART2_TXD); | ||
160 | imx_gpio_mode(PB31_PF_UART2_RXD); | ||
161 | |||
162 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
163 | } | ||
164 | |||
165 | static void __init | ||
166 | mx1ads_map_io(void) | ||
167 | { | ||
168 | imx_map_io(); | ||
169 | } | ||
170 | |||
171 | MACHINE_START(MX1ADS, "Motorola MX1ADS") | ||
172 | /* Maintainer: Sascha Hauer, Pengutronix */ | ||
173 | .phys_io = 0x00200000, | ||
174 | .io_pg_offst = ((0xe0000000) >> 18) & 0xfffc, | ||
175 | .boot_params = 0x08000100, | ||
176 | .map_io = mx1ads_map_io, | ||
177 | .init_irq = imx_init_irq, | ||
178 | .timer = &imx_timer, | ||
179 | .init_machine = mx1ads_init, | ||
180 | MACHINE_END | ||
diff --git a/arch/arm/mach-imx/time.c b/arch/arm/mach-imx/time.c deleted file mode 100644 index 5aef18b599e5..000000000000 --- a/arch/arm/mach-imx/time.c +++ /dev/null | |||
@@ -1,220 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-imx/time.c | ||
3 | * | ||
4 | * Copyright (C) 2000-2001 Deep Blue Solutions | ||
5 | * Copyright (C) 2002 Shane Nay (shane@minirl.com) | ||
6 | * Copyright (C) 2006-2007 Pavel Pisa (ppisa@pikron.com) | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | #include <linux/kernel.h> | ||
13 | #include <linux/sched.h> | ||
14 | #include <linux/init.h> | ||
15 | #include <linux/interrupt.h> | ||
16 | #include <linux/irq.h> | ||
17 | #include <linux/time.h> | ||
18 | #include <linux/clocksource.h> | ||
19 | #include <linux/clockchips.h> | ||
20 | #include <linux/clk.h> | ||
21 | #include <linux/io.h> | ||
22 | |||
23 | #include <mach/hardware.h> | ||
24 | #include <asm/leds.h> | ||
25 | #include <asm/irq.h> | ||
26 | #include <asm/mach/time.h> | ||
27 | |||
28 | /* Use timer 1 as system timer */ | ||
29 | #define TIMER_BASE IMX_TIM1_BASE | ||
30 | |||
31 | static struct clock_event_device clockevent_imx; | ||
32 | static enum clock_event_mode clockevent_mode = CLOCK_EVT_MODE_UNUSED; | ||
33 | |||
34 | /* | ||
35 | * IRQ handler for the timer | ||
36 | */ | ||
37 | static irqreturn_t | ||
38 | imx_timer_interrupt(int irq, void *dev_id) | ||
39 | { | ||
40 | struct clock_event_device *evt = &clockevent_imx; | ||
41 | uint32_t tstat; | ||
42 | irqreturn_t ret = IRQ_NONE; | ||
43 | |||
44 | /* clear the interrupt */ | ||
45 | tstat = IMX_TSTAT(TIMER_BASE); | ||
46 | IMX_TSTAT(TIMER_BASE) = 0; | ||
47 | |||
48 | if (tstat & TSTAT_COMP) { | ||
49 | evt->event_handler(evt); | ||
50 | ret = IRQ_HANDLED; | ||
51 | } | ||
52 | |||
53 | return ret; | ||
54 | } | ||
55 | |||
56 | static struct irqaction imx_timer_irq = { | ||
57 | .name = "i.MX Timer Tick", | ||
58 | .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, | ||
59 | .handler = imx_timer_interrupt, | ||
60 | }; | ||
61 | |||
62 | /* | ||
63 | * Set up timer hardware into expected mode and state. | ||
64 | */ | ||
65 | static void __init imx_timer_hardware_init(void) | ||
66 | { | ||
67 | /* | ||
68 | * Initialise to a known state (all timers off, and timing reset) | ||
69 | */ | ||
70 | IMX_TCTL(TIMER_BASE) = 0; | ||
71 | IMX_TPRER(TIMER_BASE) = 0; | ||
72 | |||
73 | IMX_TCTL(TIMER_BASE) = TCTL_FRR | TCTL_CLK_PCLK1 | TCTL_TEN; | ||
74 | } | ||
75 | |||
76 | cycle_t imx_get_cycles(struct clocksource *cs) | ||
77 | { | ||
78 | return IMX_TCN(TIMER_BASE); | ||
79 | } | ||
80 | |||
81 | static struct clocksource clocksource_imx = { | ||
82 | .name = "imx_timer1", | ||
83 | .rating = 200, | ||
84 | .read = imx_get_cycles, | ||
85 | .mask = 0xFFFFFFFF, | ||
86 | .shift = 20, | ||
87 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | ||
88 | }; | ||
89 | |||
90 | static int __init imx_clocksource_init(unsigned long rate) | ||
91 | { | ||
92 | clocksource_imx.mult = | ||
93 | clocksource_hz2mult(rate, clocksource_imx.shift); | ||
94 | clocksource_register(&clocksource_imx); | ||
95 | |||
96 | return 0; | ||
97 | } | ||
98 | |||
99 | static int imx_set_next_event(unsigned long evt, | ||
100 | struct clock_event_device *unused) | ||
101 | { | ||
102 | unsigned long tcmp; | ||
103 | |||
104 | tcmp = IMX_TCN(TIMER_BASE) + evt; | ||
105 | IMX_TCMP(TIMER_BASE) = tcmp; | ||
106 | |||
107 | return (int32_t)(tcmp - IMX_TCN(TIMER_BASE)) < 0 ? -ETIME : 0; | ||
108 | } | ||
109 | |||
110 | #ifdef DEBUG | ||
111 | static const char *clock_event_mode_label[]={ | ||
112 | [CLOCK_EVT_MODE_PERIODIC] = "CLOCK_EVT_MODE_PERIODIC", | ||
113 | [CLOCK_EVT_MODE_ONESHOT] = "CLOCK_EVT_MODE_ONESHOT", | ||
114 | [CLOCK_EVT_MODE_SHUTDOWN] = "CLOCK_EVT_MODE_SHUTDOWN", | ||
115 | [CLOCK_EVT_MODE_UNUSED] = "CLOCK_EVT_MODE_UNUSED" | ||
116 | }; | ||
117 | #endif /*DEBUG*/ | ||
118 | |||
119 | static void imx_set_mode(enum clock_event_mode mode, struct clock_event_device *evt) | ||
120 | { | ||
121 | unsigned long flags; | ||
122 | |||
123 | /* | ||
124 | * The timer interrupt generation is disabled at least | ||
125 | * for enough time to call imx_set_next_event() | ||
126 | */ | ||
127 | local_irq_save(flags); | ||
128 | /* Disable interrupt in GPT module */ | ||
129 | IMX_TCTL(TIMER_BASE) &= ~TCTL_IRQEN; | ||
130 | if (mode != clockevent_mode) { | ||
131 | /* Set event time into far-far future */ | ||
132 | IMX_TCMP(TIMER_BASE) = IMX_TCN(TIMER_BASE) - 3; | ||
133 | /* Clear pending interrupt */ | ||
134 | IMX_TSTAT(TIMER_BASE) &= ~TSTAT_COMP; | ||
135 | } | ||
136 | |||
137 | #ifdef DEBUG | ||
138 | printk(KERN_INFO "imx_set_mode: changing mode from %s to %s\n", | ||
139 | clock_event_mode_label[clockevent_mode], clock_event_mode_label[mode]); | ||
140 | #endif /*DEBUG*/ | ||
141 | |||
142 | /* Remember timer mode */ | ||
143 | clockevent_mode = mode; | ||
144 | local_irq_restore(flags); | ||
145 | |||
146 | switch (mode) { | ||
147 | case CLOCK_EVT_MODE_PERIODIC: | ||
148 | printk(KERN_ERR "imx_set_mode: Periodic mode is not supported for i.MX\n"); | ||
149 | break; | ||
150 | case CLOCK_EVT_MODE_ONESHOT: | ||
151 | /* | ||
152 | * Do not put overhead of interrupt enable/disable into | ||
153 | * imx_set_next_event(), the core has about 4 minutes | ||
154 | * to call imx_set_next_event() or shutdown clock after | ||
155 | * mode switching | ||
156 | */ | ||
157 | local_irq_save(flags); | ||
158 | IMX_TCTL(TIMER_BASE) |= TCTL_IRQEN; | ||
159 | local_irq_restore(flags); | ||
160 | break; | ||
161 | case CLOCK_EVT_MODE_SHUTDOWN: | ||
162 | case CLOCK_EVT_MODE_UNUSED: | ||
163 | case CLOCK_EVT_MODE_RESUME: | ||
164 | /* Left event sources disabled, no more interrupts appears */ | ||
165 | break; | ||
166 | } | ||
167 | } | ||
168 | |||
169 | static struct clock_event_device clockevent_imx = { | ||
170 | .name = "imx_timer1", | ||
171 | .features = CLOCK_EVT_FEAT_ONESHOT, | ||
172 | .shift = 32, | ||
173 | .set_mode = imx_set_mode, | ||
174 | .set_next_event = imx_set_next_event, | ||
175 | .rating = 200, | ||
176 | }; | ||
177 | |||
178 | static int __init imx_clockevent_init(unsigned long rate) | ||
179 | { | ||
180 | clockevent_imx.mult = div_sc(rate, NSEC_PER_SEC, | ||
181 | clockevent_imx.shift); | ||
182 | clockevent_imx.max_delta_ns = | ||
183 | clockevent_delta2ns(0xfffffffe, &clockevent_imx); | ||
184 | clockevent_imx.min_delta_ns = | ||
185 | clockevent_delta2ns(0xf, &clockevent_imx); | ||
186 | |||
187 | clockevent_imx.cpumask = cpumask_of(0); | ||
188 | |||
189 | clockevents_register_device(&clockevent_imx); | ||
190 | |||
191 | return 0; | ||
192 | } | ||
193 | |||
194 | extern int imx_clocks_init(void); | ||
195 | |||
196 | static void __init imx_timer_init(void) | ||
197 | { | ||
198 | struct clk *clk; | ||
199 | unsigned long rate; | ||
200 | |||
201 | imx_clocks_init(); | ||
202 | |||
203 | clk = clk_get(NULL, "perclk1"); | ||
204 | clk_enable(clk); | ||
205 | rate = clk_get_rate(clk); | ||
206 | |||
207 | imx_timer_hardware_init(); | ||
208 | imx_clocksource_init(rate); | ||
209 | |||
210 | imx_clockevent_init(rate); | ||
211 | |||
212 | /* | ||
213 | * Make irqs happen for the system timer | ||
214 | */ | ||
215 | setup_irq(TIM1_INT, &imx_timer_irq); | ||
216 | } | ||
217 | |||
218 | struct sys_timer imx_timer = { | ||
219 | .init = imx_timer_init, | ||
220 | }; | ||
diff --git a/arch/arm/mach-mx1/generic.c b/arch/arm/mach-mx1/generic.c index 0dec6f300ffc..7622c9b38c97 100644 --- a/arch/arm/mach-mx1/generic.c +++ b/arch/arm/mach-mx1/generic.c | |||
@@ -26,6 +26,7 @@ | |||
26 | 26 | ||
27 | #include <asm/mach/map.h> | 27 | #include <asm/mach/map.h> |
28 | 28 | ||
29 | #include <mach/common.h> | ||
29 | #include <mach/hardware.h> | 30 | #include <mach/hardware.h> |
30 | 31 | ||
31 | static struct map_desc imx_io_desc[] __initdata = { | 32 | static struct map_desc imx_io_desc[] __initdata = { |
@@ -37,7 +38,9 @@ static struct map_desc imx_io_desc[] __initdata = { | |||
37 | } | 38 | } |
38 | }; | 39 | }; |
39 | 40 | ||
40 | void __init mxc_map_io(void) | 41 | void __init mx1_map_io(void) |
41 | { | 42 | { |
43 | mxc_set_cpu_type(MXC_CPU_MX1); | ||
44 | |||
42 | iotable_init(imx_io_desc, ARRAY_SIZE(imx_io_desc)); | 45 | iotable_init(imx_io_desc, ARRAY_SIZE(imx_io_desc)); |
43 | } | 46 | } |
diff --git a/arch/arm/mach-mx1/mx1ads.c b/arch/arm/mach-mx1/mx1ads.c index e54057fb855b..e5b0c0a83c3b 100644 --- a/arch/arm/mach-mx1/mx1ads.c +++ b/arch/arm/mach-mx1/mx1ads.c | |||
@@ -12,77 +12,56 @@ | |||
12 | * warranty of any kind, whether express or implied. | 12 | * warranty of any kind, whether express or implied. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/kernel.h> | 15 | #include <linux/i2c.h> |
16 | #include <linux/i2c/pcf857x.h> | ||
16 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/kernel.h> | ||
17 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
18 | #include <linux/mtd/physmap.h> | 20 | #include <linux/mtd/physmap.h> |
19 | #include <linux/i2c.h> | ||
20 | #include <linux/i2c/pcf857x.h> | ||
21 | 21 | ||
22 | #include <asm/mach-types.h> | 22 | #include <asm/mach-types.h> |
23 | #include <asm/mach/arch.h> | 23 | #include <asm/mach/arch.h> |
24 | #include <asm/mach/time.h> | 24 | #include <asm/mach/time.h> |
25 | 25 | ||
26 | #include <mach/irqs.h> | ||
27 | #include <mach/hardware.h> | ||
28 | #include <mach/common.h> | 26 | #include <mach/common.h> |
29 | #include <mach/imx-uart.h> | 27 | #include <mach/hardware.h> |
30 | #include <mach/irqs.h> | ||
31 | #include <mach/i2c.h> | 28 | #include <mach/i2c.h> |
29 | #include <mach/imx-uart.h> | ||
32 | #include <mach/iomux.h> | 30 | #include <mach/iomux.h> |
31 | #include <mach/irqs.h> | ||
32 | |||
33 | #include "devices.h" | 33 | #include "devices.h" |
34 | 34 | ||
35 | /* | 35 | static int mx1ads_pins[] = { |
36 | * UARTs platform data | 36 | /* UART1 */ |
37 | */ | ||
38 | static int mxc_uart1_pins[] = { | ||
39 | PC9_PF_UART1_CTS, | 37 | PC9_PF_UART1_CTS, |
40 | PC10_PF_UART1_RTS, | 38 | PC10_PF_UART1_RTS, |
41 | PC11_PF_UART1_TXD, | 39 | PC11_PF_UART1_TXD, |
42 | PC12_PF_UART1_RXD, | 40 | PC12_PF_UART1_RXD, |
43 | }; | 41 | /* UART2 */ |
44 | |||
45 | static int uart1_mxc_init(struct platform_device *pdev) | ||
46 | { | ||
47 | return mxc_gpio_setup_multiple_pins(mxc_uart1_pins, | ||
48 | ARRAY_SIZE(mxc_uart1_pins), "UART1"); | ||
49 | } | ||
50 | |||
51 | static int uart1_mxc_exit(struct platform_device *pdev) | ||
52 | { | ||
53 | mxc_gpio_release_multiple_pins(mxc_uart1_pins, | ||
54 | ARRAY_SIZE(mxc_uart1_pins)); | ||
55 | return 0; | ||
56 | } | ||
57 | |||
58 | static int mxc_uart2_pins[] = { | ||
59 | PB28_PF_UART2_CTS, | 42 | PB28_PF_UART2_CTS, |
60 | PB29_PF_UART2_RTS, | 43 | PB29_PF_UART2_RTS, |
61 | PB30_PF_UART2_TXD, | 44 | PB30_PF_UART2_TXD, |
62 | PB31_PF_UART2_RXD, | 45 | PB31_PF_UART2_RXD, |
46 | /* I2C */ | ||
47 | PA15_PF_I2C_SDA, | ||
48 | PA16_PF_I2C_SCL, | ||
49 | /* SPI */ | ||
50 | PC13_PF_SPI1_SPI_RDY, | ||
51 | PC14_PF_SPI1_SCLK, | ||
52 | PC15_PF_SPI1_SS, | ||
53 | PC16_PF_SPI1_MISO, | ||
54 | PC17_PF_SPI1_MOSI, | ||
63 | }; | 55 | }; |
64 | 56 | ||
65 | static int uart2_mxc_init(struct platform_device *pdev) | 57 | /* |
66 | { | 58 | * UARTs platform data |
67 | return mxc_gpio_setup_multiple_pins(mxc_uart2_pins, | 59 | */ |
68 | ARRAY_SIZE(mxc_uart2_pins), "UART2"); | ||
69 | } | ||
70 | |||
71 | static int uart2_mxc_exit(struct platform_device *pdev) | ||
72 | { | ||
73 | mxc_gpio_release_multiple_pins(mxc_uart2_pins, | ||
74 | ARRAY_SIZE(mxc_uart2_pins)); | ||
75 | return 0; | ||
76 | } | ||
77 | 60 | ||
78 | static struct imxuart_platform_data uart_pdata[] = { | 61 | static struct imxuart_platform_data uart_pdata[] = { |
79 | { | 62 | { |
80 | .init = uart1_mxc_init, | ||
81 | .exit = uart1_mxc_exit, | ||
82 | .flags = IMXUART_HAVE_RTSCTS, | 63 | .flags = IMXUART_HAVE_RTSCTS, |
83 | }, { | 64 | }, { |
84 | .init = uart2_mxc_init, | ||
85 | .exit = uart2_mxc_exit, | ||
86 | .flags = IMXUART_HAVE_RTSCTS, | 65 | .flags = IMXUART_HAVE_RTSCTS, |
87 | }, | 66 | }, |
88 | }; | 67 | }; |
@@ -111,24 +90,6 @@ static struct platform_device flash_device = { | |||
111 | /* | 90 | /* |
112 | * I2C | 91 | * I2C |
113 | */ | 92 | */ |
114 | |||
115 | static int i2c_pins[] = { | ||
116 | PA15_PF_I2C_SDA, | ||
117 | PA16_PF_I2C_SCL, | ||
118 | }; | ||
119 | |||
120 | static int i2c_init(struct device *dev) | ||
121 | { | ||
122 | return mxc_gpio_setup_multiple_pins(i2c_pins, | ||
123 | ARRAY_SIZE(i2c_pins), "I2C"); | ||
124 | } | ||
125 | |||
126 | static void i2c_exit(struct device *dev) | ||
127 | { | ||
128 | mxc_gpio_release_multiple_pins(i2c_pins, | ||
129 | ARRAY_SIZE(i2c_pins)); | ||
130 | } | ||
131 | |||
132 | static struct pcf857x_platform_data pcf857x_data[] = { | 93 | static struct pcf857x_platform_data pcf857x_data[] = { |
133 | { | 94 | { |
134 | .gpio_base = 4 * 32, | 95 | .gpio_base = 4 * 32, |
@@ -139,8 +100,6 @@ static struct pcf857x_platform_data pcf857x_data[] = { | |||
139 | 100 | ||
140 | static struct imxi2c_platform_data mx1ads_i2c_data = { | 101 | static struct imxi2c_platform_data mx1ads_i2c_data = { |
141 | .bitrate = 100000, | 102 | .bitrate = 100000, |
142 | .init = i2c_init, | ||
143 | .exit = i2c_exit, | ||
144 | }; | 103 | }; |
145 | 104 | ||
146 | static struct i2c_board_info mx1ads_i2c_devices[] = { | 105 | static struct i2c_board_info mx1ads_i2c_devices[] = { |
@@ -160,6 +119,9 @@ static struct i2c_board_info mx1ads_i2c_devices[] = { | |||
160 | */ | 119 | */ |
161 | static void __init mx1ads_init(void) | 120 | static void __init mx1ads_init(void) |
162 | { | 121 | { |
122 | mxc_gpio_setup_multiple_pins(mx1ads_pins, | ||
123 | ARRAY_SIZE(mx1ads_pins), "mx1ads"); | ||
124 | |||
163 | /* UART */ | 125 | /* UART */ |
164 | mxc_register_device(&imx_uart1_device, &uart_pdata[0]); | 126 | mxc_register_device(&imx_uart1_device, &uart_pdata[0]); |
165 | mxc_register_device(&imx_uart2_device, &uart_pdata[1]); | 127 | mxc_register_device(&imx_uart2_device, &uart_pdata[1]); |
@@ -188,7 +150,7 @@ MACHINE_START(MX1ADS, "Freescale MX1ADS") | |||
188 | .phys_io = IMX_IO_PHYS, | 150 | .phys_io = IMX_IO_PHYS, |
189 | .io_pg_offst = (IMX_IO_BASE >> 18) & 0xfffc, | 151 | .io_pg_offst = (IMX_IO_BASE >> 18) & 0xfffc, |
190 | .boot_params = PHYS_OFFSET + 0x100, | 152 | .boot_params = PHYS_OFFSET + 0x100, |
191 | .map_io = mxc_map_io, | 153 | .map_io = mx1_map_io, |
192 | .init_irq = mxc_init_irq, | 154 | .init_irq = mxc_init_irq, |
193 | .timer = &mx1ads_timer, | 155 | .timer = &mx1ads_timer, |
194 | .init_machine = mx1ads_init, | 156 | .init_machine = mx1ads_init, |
@@ -198,7 +160,7 @@ MACHINE_START(MXLADS, "Freescale MXLADS") | |||
198 | .phys_io = IMX_IO_PHYS, | 160 | .phys_io = IMX_IO_PHYS, |
199 | .io_pg_offst = (IMX_IO_BASE >> 18) & 0xfffc, | 161 | .io_pg_offst = (IMX_IO_BASE >> 18) & 0xfffc, |
200 | .boot_params = PHYS_OFFSET + 0x100, | 162 | .boot_params = PHYS_OFFSET + 0x100, |
201 | .map_io = mxc_map_io, | 163 | .map_io = mx1_map_io, |
202 | .init_irq = mxc_init_irq, | 164 | .init_irq = mxc_init_irq, |
203 | .timer = &mx1ads_timer, | 165 | .timer = &mx1ads_timer, |
204 | .init_machine = mx1ads_init, | 166 | .init_machine = mx1ads_init, |
diff --git a/arch/arm/mach-mx1/scb9328.c b/arch/arm/mach-mx1/scb9328.c index 0e71f3fa28bf..20e0b5bcdffc 100644 --- a/arch/arm/mach-mx1/scb9328.c +++ b/arch/arm/mach-mx1/scb9328.c | |||
@@ -153,7 +153,7 @@ MACHINE_START(SCB9328, "Synertronixx scb9328") | |||
153 | .phys_io = 0x00200000, | 153 | .phys_io = 0x00200000, |
154 | .io_pg_offst = ((0xe0200000) >> 18) & 0xfffc, | 154 | .io_pg_offst = ((0xe0200000) >> 18) & 0xfffc, |
155 | .boot_params = 0x08000100, | 155 | .boot_params = 0x08000100, |
156 | .map_io = mxc_map_io, | 156 | .map_io = mx1_map_io, |
157 | .init_irq = mxc_init_irq, | 157 | .init_irq = mxc_init_irq, |
158 | .timer = &scb9328_timer, | 158 | .timer = &scb9328_timer, |
159 | .init_machine = scb9328_init, | 159 | .init_machine = scb9328_init, |
diff --git a/arch/arm/mach-mx2/Kconfig b/arch/arm/mach-mx2/Kconfig index 42a788842f49..61550443a233 100644 --- a/arch/arm/mach-mx2/Kconfig +++ b/arch/arm/mach-mx2/Kconfig | |||
@@ -18,6 +18,13 @@ endchoice | |||
18 | 18 | ||
19 | comment "MX2 platforms:" | 19 | comment "MX2 platforms:" |
20 | 20 | ||
21 | config MACH_MX21ADS | ||
22 | bool "MX21ADS platform" | ||
23 | depends on MACH_MX21 | ||
24 | help | ||
25 | Include support for MX21ADS platform. This includes specific | ||
26 | configurations for the board and its peripherals. | ||
27 | |||
21 | config MACH_MX27ADS | 28 | config MACH_MX27ADS |
22 | bool "MX27ADS platform" | 29 | bool "MX27ADS platform" |
23 | depends on MACH_MX27 | 30 | depends on MACH_MX27 |
@@ -46,4 +53,10 @@ config MACH_PCM970_BASEBOARD | |||
46 | 53 | ||
47 | endchoice | 54 | endchoice |
48 | 55 | ||
56 | config MACH_MX27_3DS | ||
57 | bool "MX27PDK platform" | ||
58 | depends on MACH_MX27 | ||
59 | help | ||
60 | Include support for MX27PDK platform. This includes specific | ||
61 | configurations for the board and its peripherals. | ||
49 | endif | 62 | endif |
diff --git a/arch/arm/mach-mx2/Makefile b/arch/arm/mach-mx2/Makefile index 950649a91540..d140e2dcf942 100644 --- a/arch/arm/mach-mx2/Makefile +++ b/arch/arm/mach-mx2/Makefile | |||
@@ -11,6 +11,8 @@ obj-$(CONFIG_MACH_MX21) += clock_imx21.o | |||
11 | obj-$(CONFIG_MACH_MX27) += cpu_imx27.o | 11 | obj-$(CONFIG_MACH_MX27) += cpu_imx27.o |
12 | obj-$(CONFIG_MACH_MX27) += clock_imx27.o | 12 | obj-$(CONFIG_MACH_MX27) += clock_imx27.o |
13 | 13 | ||
14 | obj-$(CONFIG_MACH_MX21ADS) += mx21ads.o | ||
14 | obj-$(CONFIG_MACH_MX27ADS) += mx27ads.o | 15 | obj-$(CONFIG_MACH_MX27ADS) += mx27ads.o |
15 | obj-$(CONFIG_MACH_PCM038) += pcm038.o | 16 | obj-$(CONFIG_MACH_PCM038) += pcm038.o |
16 | obj-$(CONFIG_MACH_PCM970_BASEBOARD) += pcm970-baseboard.o | 17 | obj-$(CONFIG_MACH_PCM970_BASEBOARD) += pcm970-baseboard.o |
18 | obj-$(CONFIG_MACH_MX27_3DS) += mx27pdk.o | ||
diff --git a/arch/arm/mach-mx2/generic.c b/arch/arm/mach-mx2/generic.c index bd51dd04948e..169372f69d8f 100644 --- a/arch/arm/mach-mx2/generic.c +++ b/arch/arm/mach-mx2/generic.c | |||
@@ -69,7 +69,17 @@ static struct map_desc mxc_io_desc[] __initdata = { | |||
69 | * system startup to create static physical to virtual | 69 | * system startup to create static physical to virtual |
70 | * memory map for the IO modules. | 70 | * memory map for the IO modules. |
71 | */ | 71 | */ |
72 | void __init mxc_map_io(void) | 72 | void __init mx21_map_io(void) |
73 | { | 73 | { |
74 | mxc_set_cpu_type(MXC_CPU_MX21); | ||
75 | |||
74 | iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc)); | 76 | iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc)); |
75 | } | 77 | } |
78 | |||
79 | void __init mx27_map_io(void) | ||
80 | { | ||
81 | mxc_set_cpu_type(MXC_CPU_MX27); | ||
82 | |||
83 | iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc)); | ||
84 | } | ||
85 | |||
diff --git a/arch/arm/mach-mx2/mx21ads.c b/arch/arm/mach-mx2/mx21ads.c new file mode 100644 index 000000000000..a5ee461cb405 --- /dev/null +++ b/arch/arm/mach-mx2/mx21ads.c | |||
@@ -0,0 +1,286 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2000 Deep Blue Solutions Ltd | ||
3 | * Copyright (C) 2002 Shane Nay (shane@minirl.com) | ||
4 | * Copyright 2006-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | |||
21 | #include <linux/platform_device.h> | ||
22 | #include <linux/mtd/mtd.h> | ||
23 | #include <linux/mtd/physmap.h> | ||
24 | #include <linux/gpio.h> | ||
25 | #include <mach/common.h> | ||
26 | #include <mach/hardware.h> | ||
27 | #include <asm/mach-types.h> | ||
28 | #include <asm/mach/arch.h> | ||
29 | #include <asm/mach/time.h> | ||
30 | #include <asm/mach/map.h> | ||
31 | #include <mach/imx-uart.h> | ||
32 | #include <mach/imxfb.h> | ||
33 | #include <mach/iomux.h> | ||
34 | #include <mach/mxc_nand.h> | ||
35 | #include <mach/mmc.h> | ||
36 | #include <mach/board-mx21ads.h> | ||
37 | |||
38 | #include "devices.h" | ||
39 | |||
40 | static unsigned int mx21ads_pins[] = { | ||
41 | |||
42 | /* CS8900A */ | ||
43 | (GPIO_PORTE | GPIO_GPIO | GPIO_IN | 11), | ||
44 | |||
45 | /* UART1 */ | ||
46 | PE12_PF_UART1_TXD, | ||
47 | PE13_PF_UART1_RXD, | ||
48 | PE14_PF_UART1_CTS, | ||
49 | PE15_PF_UART1_RTS, | ||
50 | |||
51 | /* UART3 (IrDA) - only TXD and RXD */ | ||
52 | PE8_PF_UART3_TXD, | ||
53 | PE9_PF_UART3_RXD, | ||
54 | |||
55 | /* UART4 */ | ||
56 | PB26_AF_UART4_RTS, | ||
57 | PB28_AF_UART4_TXD, | ||
58 | PB29_AF_UART4_CTS, | ||
59 | PB31_AF_UART4_RXD, | ||
60 | |||
61 | /* LCDC */ | ||
62 | PA5_PF_LSCLK, | ||
63 | PA6_PF_LD0, | ||
64 | PA7_PF_LD1, | ||
65 | PA8_PF_LD2, | ||
66 | PA9_PF_LD3, | ||
67 | PA10_PF_LD4, | ||
68 | PA11_PF_LD5, | ||
69 | PA12_PF_LD6, | ||
70 | PA13_PF_LD7, | ||
71 | PA14_PF_LD8, | ||
72 | PA15_PF_LD9, | ||
73 | PA16_PF_LD10, | ||
74 | PA17_PF_LD11, | ||
75 | PA18_PF_LD12, | ||
76 | PA19_PF_LD13, | ||
77 | PA20_PF_LD14, | ||
78 | PA21_PF_LD15, | ||
79 | PA22_PF_LD16, | ||
80 | PA24_PF_REV, /* Sharp panel dedicated signal */ | ||
81 | PA25_PF_CLS, /* Sharp panel dedicated signal */ | ||
82 | PA26_PF_PS, /* Sharp panel dedicated signal */ | ||
83 | PA27_PF_SPL_SPR, /* Sharp panel dedicated signal */ | ||
84 | PA28_PF_HSYNC, | ||
85 | PA29_PF_VSYNC, | ||
86 | PA30_PF_CONTRAST, | ||
87 | PA31_PF_OE_ACD, | ||
88 | |||
89 | /* MMC/SDHC */ | ||
90 | PE18_PF_SD1_D0, | ||
91 | PE19_PF_SD1_D1, | ||
92 | PE20_PF_SD1_D2, | ||
93 | PE21_PF_SD1_D3, | ||
94 | PE22_PF_SD1_CMD, | ||
95 | PE23_PF_SD1_CLK, | ||
96 | |||
97 | /* NFC */ | ||
98 | PF0_PF_NRFB, | ||
99 | PF1_PF_NFCE, | ||
100 | PF2_PF_NFWP, | ||
101 | PF3_PF_NFCLE, | ||
102 | PF4_PF_NFALE, | ||
103 | PF5_PF_NFRE, | ||
104 | PF6_PF_NFWE, | ||
105 | PF7_PF_NFIO0, | ||
106 | PF8_PF_NFIO1, | ||
107 | PF9_PF_NFIO2, | ||
108 | PF10_PF_NFIO3, | ||
109 | PF11_PF_NFIO4, | ||
110 | PF12_PF_NFIO5, | ||
111 | PF13_PF_NFIO6, | ||
112 | PF14_PF_NFIO7, | ||
113 | }; | ||
114 | |||
115 | /* ADS's NOR flash: 2x AM29BDS128HE9VKI on 32-bit bus */ | ||
116 | static struct physmap_flash_data mx21ads_flash_data = { | ||
117 | .width = 4, | ||
118 | }; | ||
119 | |||
120 | static struct resource mx21ads_flash_resource = { | ||
121 | .start = CS0_BASE_ADDR, | ||
122 | .end = CS0_BASE_ADDR + 0x02000000 - 1, | ||
123 | .flags = IORESOURCE_MEM, | ||
124 | }; | ||
125 | |||
126 | static struct platform_device mx21ads_nor_mtd_device = { | ||
127 | .name = "physmap-flash", | ||
128 | .id = 0, | ||
129 | .dev = { | ||
130 | .platform_data = &mx21ads_flash_data, | ||
131 | }, | ||
132 | .num_resources = 1, | ||
133 | .resource = &mx21ads_flash_resource, | ||
134 | }; | ||
135 | |||
136 | static struct imxuart_platform_data uart_pdata = { | ||
137 | .flags = IMXUART_HAVE_RTSCTS, | ||
138 | }; | ||
139 | |||
140 | static struct imxuart_platform_data uart_norts_pdata = { | ||
141 | }; | ||
142 | |||
143 | |||
144 | static int mx21ads_fb_init(struct platform_device *pdev) | ||
145 | { | ||
146 | u16 tmp; | ||
147 | |||
148 | tmp = __raw_readw(MX21ADS_IO_REG); | ||
149 | tmp |= MX21ADS_IO_LCDON; | ||
150 | __raw_writew(tmp, MX21ADS_IO_REG); | ||
151 | return 0; | ||
152 | } | ||
153 | |||
154 | static void mx21ads_fb_exit(struct platform_device *pdev) | ||
155 | { | ||
156 | u16 tmp; | ||
157 | |||
158 | tmp = __raw_readw(MX21ADS_IO_REG); | ||
159 | tmp &= ~MX21ADS_IO_LCDON; | ||
160 | __raw_writew(tmp, MX21ADS_IO_REG); | ||
161 | } | ||
162 | |||
163 | /* | ||
164 | * Connected is a portrait Sharp-QVGA display | ||
165 | * of type: LQ035Q7DB02 | ||
166 | */ | ||
167 | static struct imx_fb_platform_data mx21ads_fb_data = { | ||
168 | .pixclock = 188679, /* in ps */ | ||
169 | .xres = 240, | ||
170 | .yres = 320, | ||
171 | |||
172 | .bpp = 16, | ||
173 | .hsync_len = 2, | ||
174 | .left_margin = 6, | ||
175 | .right_margin = 16, | ||
176 | |||
177 | .vsync_len = 1, | ||
178 | .upper_margin = 8, | ||
179 | .lower_margin = 10, | ||
180 | .fixed_screen_cpu = 0, | ||
181 | |||
182 | .pcr = 0xFB108BC7, | ||
183 | .pwmr = 0x00A901ff, | ||
184 | .lscr1 = 0x00120300, | ||
185 | .dmacr = 0x00020008, | ||
186 | |||
187 | .init = mx21ads_fb_init, | ||
188 | .exit = mx21ads_fb_exit, | ||
189 | }; | ||
190 | |||
191 | static int mx21ads_sdhc_get_ro(struct device *dev) | ||
192 | { | ||
193 | return (__raw_readw(MX21ADS_IO_REG) & MX21ADS_IO_SD_WP) ? 1 : 0; | ||
194 | } | ||
195 | |||
196 | static int mx21ads_sdhc_init(struct device *dev, irq_handler_t detect_irq, | ||
197 | void *data) | ||
198 | { | ||
199 | int ret; | ||
200 | |||
201 | ret = request_irq(IRQ_GPIOD(25), detect_irq, | ||
202 | IRQF_TRIGGER_FALLING, "mmc-detect", data); | ||
203 | if (ret) | ||
204 | goto out; | ||
205 | return 0; | ||
206 | out: | ||
207 | return ret; | ||
208 | } | ||
209 | |||
210 | static void mx21ads_sdhc_exit(struct device *dev, void *data) | ||
211 | { | ||
212 | free_irq(IRQ_GPIOD(25), data); | ||
213 | } | ||
214 | |||
215 | static struct imxmmc_platform_data mx21ads_sdhc_pdata = { | ||
216 | .ocr_avail = MMC_VDD_29_30 | MMC_VDD_30_31, /* 3.0V */ | ||
217 | .get_ro = mx21ads_sdhc_get_ro, | ||
218 | .init = mx21ads_sdhc_init, | ||
219 | .exit = mx21ads_sdhc_exit, | ||
220 | }; | ||
221 | |||
222 | static struct mxc_nand_platform_data mx21ads_nand_board_info = { | ||
223 | .width = 1, | ||
224 | .hw_ecc = 1, | ||
225 | }; | ||
226 | |||
227 | static struct map_desc mx21ads_io_desc[] __initdata = { | ||
228 | /* | ||
229 | * Memory-mapped I/O on MX21ADS Base board: | ||
230 | * - CS8900A Ethernet controller | ||
231 | * - ST16C2552CJ UART | ||
232 | * - CPU and Base board version | ||
233 | * - Base board I/O register | ||
234 | */ | ||
235 | { | ||
236 | .virtual = MX21ADS_MMIO_BASE_ADDR, | ||
237 | .pfn = __phys_to_pfn(CS1_BASE_ADDR), | ||
238 | .length = MX21ADS_MMIO_SIZE, | ||
239 | .type = MT_DEVICE, | ||
240 | }, | ||
241 | }; | ||
242 | |||
243 | static void __init mx21ads_map_io(void) | ||
244 | { | ||
245 | mx21_map_io(); | ||
246 | iotable_init(mx21ads_io_desc, ARRAY_SIZE(mx21ads_io_desc)); | ||
247 | } | ||
248 | |||
249 | static struct platform_device *platform_devices[] __initdata = { | ||
250 | &mx21ads_nor_mtd_device, | ||
251 | }; | ||
252 | |||
253 | static void __init mx21ads_board_init(void) | ||
254 | { | ||
255 | mxc_gpio_setup_multiple_pins(mx21ads_pins, ARRAY_SIZE(mx21ads_pins), | ||
256 | "mx21ads"); | ||
257 | |||
258 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | ||
259 | mxc_register_device(&mxc_uart_device2, &uart_norts_pdata); | ||
260 | mxc_register_device(&mxc_uart_device3, &uart_pdata); | ||
261 | mxc_register_device(&mxc_fb_device, &mx21ads_fb_data); | ||
262 | mxc_register_device(&mxc_sdhc_device0, &mx21ads_sdhc_pdata); | ||
263 | mxc_register_device(&mxc_nand_device, &mx21ads_nand_board_info); | ||
264 | |||
265 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | ||
266 | } | ||
267 | |||
268 | static void __init mx21ads_timer_init(void) | ||
269 | { | ||
270 | mx21_clocks_init(32768, 26000000); | ||
271 | } | ||
272 | |||
273 | static struct sys_timer mx21ads_timer = { | ||
274 | .init = mx21ads_timer_init, | ||
275 | }; | ||
276 | |||
277 | MACHINE_START(MX21ADS, "Freescale i.MX21ADS") | ||
278 | /* maintainer: Freescale Semiconductor, Inc. */ | ||
279 | .phys_io = AIPI_BASE_ADDR, | ||
280 | .io_pg_offst = ((AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc, | ||
281 | .boot_params = PHYS_OFFSET + 0x100, | ||
282 | .map_io = mx21ads_map_io, | ||
283 | .init_irq = mxc_init_irq, | ||
284 | .init_machine = mx21ads_board_init, | ||
285 | .timer = &mx21ads_timer, | ||
286 | MACHINE_END | ||
diff --git a/arch/arm/mach-mx2/mx27ads.c b/arch/arm/mach-mx2/mx27ads.c index 4a3b097adc12..02daddac6995 100644 --- a/arch/arm/mach-mx2/mx27ads.c +++ b/arch/arm/mach-mx2/mx27ads.c | |||
@@ -23,6 +23,8 @@ | |||
23 | #include <linux/mtd/map.h> | 23 | #include <linux/mtd/map.h> |
24 | #include <linux/mtd/partitions.h> | 24 | #include <linux/mtd/partitions.h> |
25 | #include <linux/mtd/physmap.h> | 25 | #include <linux/mtd/physmap.h> |
26 | #include <linux/i2c.h> | ||
27 | #include <linux/irq.h> | ||
26 | #include <mach/common.h> | 28 | #include <mach/common.h> |
27 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
28 | #include <asm/mach-types.h> | 30 | #include <asm/mach-types.h> |
@@ -33,9 +35,117 @@ | |||
33 | #include <mach/imx-uart.h> | 35 | #include <mach/imx-uart.h> |
34 | #include <mach/iomux.h> | 36 | #include <mach/iomux.h> |
35 | #include <mach/board-mx27ads.h> | 37 | #include <mach/board-mx27ads.h> |
38 | #include <mach/mxc_nand.h> | ||
39 | #include <mach/i2c.h> | ||
40 | #include <mach/imxfb.h> | ||
41 | #include <mach/mmc.h> | ||
36 | 42 | ||
37 | #include "devices.h" | 43 | #include "devices.h" |
38 | 44 | ||
45 | static unsigned int mx27ads_pins[] = { | ||
46 | /* UART0 */ | ||
47 | PE12_PF_UART1_TXD, | ||
48 | PE13_PF_UART1_RXD, | ||
49 | PE14_PF_UART1_CTS, | ||
50 | PE15_PF_UART1_RTS, | ||
51 | /* UART1 */ | ||
52 | PE3_PF_UART2_CTS, | ||
53 | PE4_PF_UART2_RTS, | ||
54 | PE6_PF_UART2_TXD, | ||
55 | PE7_PF_UART2_RXD, | ||
56 | /* UART2 */ | ||
57 | PE8_PF_UART3_TXD, | ||
58 | PE9_PF_UART3_RXD, | ||
59 | PE10_PF_UART3_CTS, | ||
60 | PE11_PF_UART3_RTS, | ||
61 | /* UART3 */ | ||
62 | PB26_AF_UART4_RTS, | ||
63 | PB28_AF_UART4_TXD, | ||
64 | PB29_AF_UART4_CTS, | ||
65 | PB31_AF_UART4_RXD, | ||
66 | /* UART4 */ | ||
67 | PB18_AF_UART5_TXD, | ||
68 | PB19_AF_UART5_RXD, | ||
69 | PB20_AF_UART5_CTS, | ||
70 | PB21_AF_UART5_RTS, | ||
71 | /* UART5 */ | ||
72 | PB10_AF_UART6_TXD, | ||
73 | PB12_AF_UART6_CTS, | ||
74 | PB11_AF_UART6_RXD, | ||
75 | PB13_AF_UART6_RTS, | ||
76 | /* FEC */ | ||
77 | PD0_AIN_FEC_TXD0, | ||
78 | PD1_AIN_FEC_TXD1, | ||
79 | PD2_AIN_FEC_TXD2, | ||
80 | PD3_AIN_FEC_TXD3, | ||
81 | PD4_AOUT_FEC_RX_ER, | ||
82 | PD5_AOUT_FEC_RXD1, | ||
83 | PD6_AOUT_FEC_RXD2, | ||
84 | PD7_AOUT_FEC_RXD3, | ||
85 | PD8_AF_FEC_MDIO, | ||
86 | PD9_AIN_FEC_MDC, | ||
87 | PD10_AOUT_FEC_CRS, | ||
88 | PD11_AOUT_FEC_TX_CLK, | ||
89 | PD12_AOUT_FEC_RXD0, | ||
90 | PD13_AOUT_FEC_RX_DV, | ||
91 | PD14_AOUT_FEC_RX_CLK, | ||
92 | PD15_AOUT_FEC_COL, | ||
93 | PD16_AIN_FEC_TX_ER, | ||
94 | PF23_AIN_FEC_TX_EN, | ||
95 | /* I2C2 */ | ||
96 | PC5_PF_I2C2_SDA, | ||
97 | PC6_PF_I2C2_SCL, | ||
98 | /* FB */ | ||
99 | PA5_PF_LSCLK, | ||
100 | PA6_PF_LD0, | ||
101 | PA7_PF_LD1, | ||
102 | PA8_PF_LD2, | ||
103 | PA9_PF_LD3, | ||
104 | PA10_PF_LD4, | ||
105 | PA11_PF_LD5, | ||
106 | PA12_PF_LD6, | ||
107 | PA13_PF_LD7, | ||
108 | PA14_PF_LD8, | ||
109 | PA15_PF_LD9, | ||
110 | PA16_PF_LD10, | ||
111 | PA17_PF_LD11, | ||
112 | PA18_PF_LD12, | ||
113 | PA19_PF_LD13, | ||
114 | PA20_PF_LD14, | ||
115 | PA21_PF_LD15, | ||
116 | PA22_PF_LD16, | ||
117 | PA23_PF_LD17, | ||
118 | PA24_PF_REV, | ||
119 | PA25_PF_CLS, | ||
120 | PA26_PF_PS, | ||
121 | PA27_PF_SPL_SPR, | ||
122 | PA28_PF_HSYNC, | ||
123 | PA29_PF_VSYNC, | ||
124 | PA30_PF_CONTRAST, | ||
125 | PA31_PF_OE_ACD, | ||
126 | /* OWIRE */ | ||
127 | PE16_AF_OWIRE, | ||
128 | /* SDHC1*/ | ||
129 | PE18_PF_SD1_D0, | ||
130 | PE19_PF_SD1_D1, | ||
131 | PE20_PF_SD1_D2, | ||
132 | PE21_PF_SD1_D3, | ||
133 | PE22_PF_SD1_CMD, | ||
134 | PE23_PF_SD1_CLK, | ||
135 | /* SDHC2*/ | ||
136 | PB4_PF_SD2_D0, | ||
137 | PB5_PF_SD2_D1, | ||
138 | PB6_PF_SD2_D2, | ||
139 | PB7_PF_SD2_D3, | ||
140 | PB8_PF_SD2_CMD, | ||
141 | PB9_PF_SD2_CLK, | ||
142 | }; | ||
143 | |||
144 | static struct mxc_nand_platform_data mx27ads_nand_board_info = { | ||
145 | .width = 1, | ||
146 | .hw_ecc = 1, | ||
147 | }; | ||
148 | |||
39 | /* ADS's NOR flash */ | 149 | /* ADS's NOR flash */ |
40 | static struct physmap_flash_data mx27ads_flash_data = { | 150 | static struct physmap_flash_data mx27ads_flash_data = { |
41 | .width = 2, | 151 | .width = 2, |
@@ -58,189 +168,113 @@ static struct platform_device mx27ads_nor_mtd_device = { | |||
58 | .resource = &mx27ads_flash_resource, | 168 | .resource = &mx27ads_flash_resource, |
59 | }; | 169 | }; |
60 | 170 | ||
61 | static int mxc_uart0_pins[] = { | 171 | static struct imxi2c_platform_data mx27ads_i2c_data = { |
62 | PE12_PF_UART1_TXD, | 172 | .bitrate = 100000, |
63 | PE13_PF_UART1_RXD, | ||
64 | PE14_PF_UART1_CTS, | ||
65 | PE15_PF_UART1_RTS | ||
66 | }; | 173 | }; |
67 | 174 | ||
68 | static int uart_mxc_port0_init(struct platform_device *pdev) | 175 | static struct i2c_board_info mx27ads_i2c_devices[] = { |
69 | { | ||
70 | return mxc_gpio_setup_multiple_pins(mxc_uart0_pins, | ||
71 | ARRAY_SIZE(mxc_uart0_pins), "UART0"); | ||
72 | } | ||
73 | |||
74 | static int uart_mxc_port0_exit(struct platform_device *pdev) | ||
75 | { | ||
76 | mxc_gpio_release_multiple_pins(mxc_uart0_pins, | ||
77 | ARRAY_SIZE(mxc_uart0_pins)); | ||
78 | return 0; | ||
79 | } | ||
80 | |||
81 | static int mxc_uart1_pins[] = { | ||
82 | PE3_PF_UART2_CTS, | ||
83 | PE4_PF_UART2_RTS, | ||
84 | PE6_PF_UART2_TXD, | ||
85 | PE7_PF_UART2_RXD | ||
86 | }; | 176 | }; |
87 | 177 | ||
88 | static int uart_mxc_port1_init(struct platform_device *pdev) | 178 | void lcd_power(int on) |
89 | { | 179 | { |
90 | return mxc_gpio_setup_multiple_pins(mxc_uart1_pins, | 180 | if (on) |
91 | ARRAY_SIZE(mxc_uart1_pins), "UART1"); | 181 | __raw_writew(PBC_BCTRL1_LCDON, PBC_BCTRL1_SET_REG); |
182 | else | ||
183 | __raw_writew(PBC_BCTRL1_LCDON, PBC_BCTRL1_CLEAR_REG); | ||
92 | } | 184 | } |
93 | 185 | ||
94 | static int uart_mxc_port1_exit(struct platform_device *pdev) | 186 | static struct imx_fb_platform_data mx27ads_fb_data = { |
95 | { | 187 | .pixclock = 188679, |
96 | mxc_gpio_release_multiple_pins(mxc_uart1_pins, | 188 | .xres = 240, |
97 | ARRAY_SIZE(mxc_uart1_pins)); | 189 | .yres = 320, |
98 | return 0; | 190 | |
99 | } | 191 | .bpp = 16, |
100 | 192 | .hsync_len = 1, | |
101 | static int mxc_uart2_pins[] = { | 193 | .left_margin = 9, |
102 | PE8_PF_UART3_TXD, | 194 | .right_margin = 16, |
103 | PE9_PF_UART3_RXD, | 195 | |
104 | PE10_PF_UART3_CTS, | 196 | .vsync_len = 1, |
105 | PE11_PF_UART3_RTS | 197 | .upper_margin = 7, |
198 | .lower_margin = 9, | ||
199 | .fixed_screen_cpu = 0, | ||
200 | |||
201 | /* | ||
202 | * - HSYNC active high | ||
203 | * - VSYNC active high | ||
204 | * - clk notenabled while idle | ||
205 | * - clock inverted | ||
206 | * - data not inverted | ||
207 | * - data enable low active | ||
208 | * - enable sharp mode | ||
209 | */ | ||
210 | .pcr = 0xFB008BC0, | ||
211 | .pwmr = 0x00A903FF, | ||
212 | .lscr1 = 0x00120300, | ||
213 | .dmacr = 0x00020010, | ||
214 | |||
215 | .lcd_power = lcd_power, | ||
106 | }; | 216 | }; |
107 | 217 | ||
108 | static int uart_mxc_port2_init(struct platform_device *pdev) | 218 | static int mx27ads_sdhc1_init(struct device *dev, irq_handler_t detect_irq, |
219 | void *data) | ||
109 | { | 220 | { |
110 | return mxc_gpio_setup_multiple_pins(mxc_uart2_pins, | 221 | return request_irq(IRQ_GPIOE(21), detect_irq, IRQF_TRIGGER_RISING, |
111 | ARRAY_SIZE(mxc_uart2_pins), "UART2"); | 222 | "sdhc1-card-detect", data); |
112 | } | 223 | } |
113 | 224 | ||
114 | static int uart_mxc_port2_exit(struct platform_device *pdev) | 225 | static int mx27ads_sdhc2_init(struct device *dev, irq_handler_t detect_irq, |
226 | void *data) | ||
115 | { | 227 | { |
116 | mxc_gpio_release_multiple_pins(mxc_uart2_pins, | 228 | return request_irq(IRQ_GPIOB(7), detect_irq, IRQF_TRIGGER_RISING, |
117 | ARRAY_SIZE(mxc_uart2_pins)); | 229 | "sdhc2-card-detect", data); |
118 | return 0; | ||
119 | } | 230 | } |
120 | 231 | ||
121 | static int mxc_uart3_pins[] = { | 232 | static void mx27ads_sdhc1_exit(struct device *dev, void *data) |
122 | PB26_AF_UART4_RTS, | ||
123 | PB28_AF_UART4_TXD, | ||
124 | PB29_AF_UART4_CTS, | ||
125 | PB31_AF_UART4_RXD | ||
126 | }; | ||
127 | |||
128 | static int uart_mxc_port3_init(struct platform_device *pdev) | ||
129 | { | 233 | { |
130 | return mxc_gpio_setup_multiple_pins(mxc_uart3_pins, | 234 | free_irq(IRQ_GPIOE(21), data); |
131 | ARRAY_SIZE(mxc_uart3_pins), "UART3"); | ||
132 | } | 235 | } |
133 | 236 | ||
134 | static int uart_mxc_port3_exit(struct platform_device *pdev) | 237 | static void mx27ads_sdhc2_exit(struct device *dev, void *data) |
135 | { | 238 | { |
136 | mxc_gpio_release_multiple_pins(mxc_uart3_pins, | 239 | free_irq(IRQ_GPIOB(7), data); |
137 | ARRAY_SIZE(mxc_uart3_pins)); | ||
138 | return 0; | ||
139 | } | 240 | } |
140 | 241 | ||
141 | static int mxc_uart4_pins[] = { | 242 | static struct imxmmc_platform_data sdhc1_pdata = { |
142 | PB18_AF_UART5_TXD, | 243 | .init = mx27ads_sdhc1_init, |
143 | PB19_AF_UART5_RXD, | 244 | .exit = mx27ads_sdhc1_exit, |
144 | PB20_AF_UART5_CTS, | ||
145 | PB21_AF_UART5_RTS | ||
146 | }; | 245 | }; |
147 | 246 | ||
148 | static int uart_mxc_port4_init(struct platform_device *pdev) | 247 | static struct imxmmc_platform_data sdhc2_pdata = { |
149 | { | 248 | .init = mx27ads_sdhc2_init, |
150 | return mxc_gpio_setup_multiple_pins(mxc_uart4_pins, | 249 | .exit = mx27ads_sdhc2_exit, |
151 | ARRAY_SIZE(mxc_uart4_pins), "UART4"); | ||
152 | } | ||
153 | |||
154 | static int uart_mxc_port4_exit(struct platform_device *pdev) | ||
155 | { | ||
156 | mxc_gpio_release_multiple_pins(mxc_uart4_pins, | ||
157 | ARRAY_SIZE(mxc_uart4_pins)); | ||
158 | return 0; | ||
159 | } | ||
160 | |||
161 | static int mxc_uart5_pins[] = { | ||
162 | PB10_AF_UART6_TXD, | ||
163 | PB12_AF_UART6_CTS, | ||
164 | PB11_AF_UART6_RXD, | ||
165 | PB13_AF_UART6_RTS | ||
166 | }; | 250 | }; |
167 | 251 | ||
168 | static int uart_mxc_port5_init(struct platform_device *pdev) | ||
169 | { | ||
170 | return mxc_gpio_setup_multiple_pins(mxc_uart5_pins, | ||
171 | ARRAY_SIZE(mxc_uart5_pins), "UART5"); | ||
172 | } | ||
173 | |||
174 | static int uart_mxc_port5_exit(struct platform_device *pdev) | ||
175 | { | ||
176 | mxc_gpio_release_multiple_pins(mxc_uart5_pins, | ||
177 | ARRAY_SIZE(mxc_uart5_pins)); | ||
178 | return 0; | ||
179 | } | ||
180 | |||
181 | static struct platform_device *platform_devices[] __initdata = { | 252 | static struct platform_device *platform_devices[] __initdata = { |
182 | &mx27ads_nor_mtd_device, | 253 | &mx27ads_nor_mtd_device, |
183 | &mxc_fec_device, | 254 | &mxc_fec_device, |
255 | &mxc_w1_master_device, | ||
184 | }; | 256 | }; |
185 | 257 | ||
186 | static int mxc_fec_pins[] = { | ||
187 | PD0_AIN_FEC_TXD0, | ||
188 | PD1_AIN_FEC_TXD1, | ||
189 | PD2_AIN_FEC_TXD2, | ||
190 | PD3_AIN_FEC_TXD3, | ||
191 | PD4_AOUT_FEC_RX_ER, | ||
192 | PD5_AOUT_FEC_RXD1, | ||
193 | PD6_AOUT_FEC_RXD2, | ||
194 | PD7_AOUT_FEC_RXD3, | ||
195 | PD8_AF_FEC_MDIO, | ||
196 | PD9_AIN_FEC_MDC, | ||
197 | PD10_AOUT_FEC_CRS, | ||
198 | PD11_AOUT_FEC_TX_CLK, | ||
199 | PD12_AOUT_FEC_RXD0, | ||
200 | PD13_AOUT_FEC_RX_DV, | ||
201 | PD14_AOUT_FEC_RX_CLK, | ||
202 | PD15_AOUT_FEC_COL, | ||
203 | PD16_AIN_FEC_TX_ER, | ||
204 | PF23_AIN_FEC_TX_EN | ||
205 | }; | ||
206 | |||
207 | static void gpio_fec_active(void) | ||
208 | { | ||
209 | mxc_gpio_setup_multiple_pins(mxc_fec_pins, | ||
210 | ARRAY_SIZE(mxc_fec_pins), "FEC"); | ||
211 | } | ||
212 | |||
213 | static struct imxuart_platform_data uart_pdata[] = { | 258 | static struct imxuart_platform_data uart_pdata[] = { |
214 | { | 259 | { |
215 | .init = uart_mxc_port0_init, | ||
216 | .exit = uart_mxc_port0_exit, | ||
217 | .flags = IMXUART_HAVE_RTSCTS, | 260 | .flags = IMXUART_HAVE_RTSCTS, |
218 | }, { | 261 | }, { |
219 | .init = uart_mxc_port1_init, | ||
220 | .exit = uart_mxc_port1_exit, | ||
221 | .flags = IMXUART_HAVE_RTSCTS, | 262 | .flags = IMXUART_HAVE_RTSCTS, |
222 | }, { | 263 | }, { |
223 | .init = uart_mxc_port2_init, | ||
224 | .exit = uart_mxc_port2_exit, | ||
225 | .flags = IMXUART_HAVE_RTSCTS, | 264 | .flags = IMXUART_HAVE_RTSCTS, |
226 | }, { | 265 | }, { |
227 | .init = uart_mxc_port3_init, | ||
228 | .exit = uart_mxc_port3_exit, | ||
229 | .flags = IMXUART_HAVE_RTSCTS, | 266 | .flags = IMXUART_HAVE_RTSCTS, |
230 | }, { | 267 | }, { |
231 | .init = uart_mxc_port4_init, | ||
232 | .exit = uart_mxc_port4_exit, | ||
233 | .flags = IMXUART_HAVE_RTSCTS, | 268 | .flags = IMXUART_HAVE_RTSCTS, |
234 | }, { | 269 | }, { |
235 | .init = uart_mxc_port5_init, | ||
236 | .exit = uart_mxc_port5_exit, | ||
237 | .flags = IMXUART_HAVE_RTSCTS, | 270 | .flags = IMXUART_HAVE_RTSCTS, |
238 | }, | 271 | }, |
239 | }; | 272 | }; |
240 | 273 | ||
241 | static void __init mx27ads_board_init(void) | 274 | static void __init mx27ads_board_init(void) |
242 | { | 275 | { |
243 | gpio_fec_active(); | 276 | mxc_gpio_setup_multiple_pins(mx27ads_pins, ARRAY_SIZE(mx27ads_pins), |
277 | "mx27ads"); | ||
244 | 278 | ||
245 | mxc_register_device(&mxc_uart_device0, &uart_pdata[0]); | 279 | mxc_register_device(&mxc_uart_device0, &uart_pdata[0]); |
246 | mxc_register_device(&mxc_uart_device1, &uart_pdata[1]); | 280 | mxc_register_device(&mxc_uart_device1, &uart_pdata[1]); |
@@ -248,6 +282,15 @@ static void __init mx27ads_board_init(void) | |||
248 | mxc_register_device(&mxc_uart_device3, &uart_pdata[3]); | 282 | mxc_register_device(&mxc_uart_device3, &uart_pdata[3]); |
249 | mxc_register_device(&mxc_uart_device4, &uart_pdata[4]); | 283 | mxc_register_device(&mxc_uart_device4, &uart_pdata[4]); |
250 | mxc_register_device(&mxc_uart_device5, &uart_pdata[5]); | 284 | mxc_register_device(&mxc_uart_device5, &uart_pdata[5]); |
285 | mxc_register_device(&mxc_nand_device, &mx27ads_nand_board_info); | ||
286 | |||
287 | /* only the i2c master 1 is used on this CPU card */ | ||
288 | i2c_register_board_info(1, mx27ads_i2c_devices, | ||
289 | ARRAY_SIZE(mx27ads_i2c_devices)); | ||
290 | mxc_register_device(&mxc_i2c_device1, &mx27ads_i2c_data); | ||
291 | mxc_register_device(&mxc_fb_device, &mx27ads_fb_data); | ||
292 | mxc_register_device(&mxc_sdhc_device0, &sdhc1_pdata); | ||
293 | mxc_register_device(&mxc_sdhc_device1, &sdhc2_pdata); | ||
251 | 294 | ||
252 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 295 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
253 | } | 296 | } |
@@ -277,7 +320,7 @@ static struct map_desc mx27ads_io_desc[] __initdata = { | |||
277 | 320 | ||
278 | static void __init mx27ads_map_io(void) | 321 | static void __init mx27ads_map_io(void) |
279 | { | 322 | { |
280 | mxc_map_io(); | 323 | mx27_map_io(); |
281 | iotable_init(mx27ads_io_desc, ARRAY_SIZE(mx27ads_io_desc)); | 324 | iotable_init(mx27ads_io_desc, ARRAY_SIZE(mx27ads_io_desc)); |
282 | } | 325 | } |
283 | 326 | ||
diff --git a/arch/arm/mach-mx2/mx27pdk.c b/arch/arm/mach-mx2/mx27pdk.c new file mode 100644 index 000000000000..90b1fa5d1849 --- /dev/null +++ b/arch/arm/mach-mx2/mx27pdk.c | |||
@@ -0,0 +1,95 @@ | |||
1 | /* | ||
2 | * Copyright 2009 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * | ||
4 | * Author: Fabio Estevam <fabio.estevam@freescale.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | |||
21 | #include <linux/platform_device.h> | ||
22 | #include <linux/gpio.h> | ||
23 | #include <asm/mach-types.h> | ||
24 | #include <asm/mach/arch.h> | ||
25 | #include <asm/mach/time.h> | ||
26 | #include <mach/hardware.h> | ||
27 | #include <mach/common.h> | ||
28 | #include <mach/imx-uart.h> | ||
29 | #include <mach/iomux.h> | ||
30 | #include <mach/board-mx27pdk.h> | ||
31 | |||
32 | #include "devices.h" | ||
33 | |||
34 | static unsigned int mx27pdk_pins[] = { | ||
35 | /* UART1 */ | ||
36 | PE12_PF_UART1_TXD, | ||
37 | PE13_PF_UART1_RXD, | ||
38 | PE14_PF_UART1_CTS, | ||
39 | PE15_PF_UART1_RTS, | ||
40 | /* FEC */ | ||
41 | PD0_AIN_FEC_TXD0, | ||
42 | PD1_AIN_FEC_TXD1, | ||
43 | PD2_AIN_FEC_TXD2, | ||
44 | PD3_AIN_FEC_TXD3, | ||
45 | PD4_AOUT_FEC_RX_ER, | ||
46 | PD5_AOUT_FEC_RXD1, | ||
47 | PD6_AOUT_FEC_RXD2, | ||
48 | PD7_AOUT_FEC_RXD3, | ||
49 | PD8_AF_FEC_MDIO, | ||
50 | PD9_AIN_FEC_MDC, | ||
51 | PD10_AOUT_FEC_CRS, | ||
52 | PD11_AOUT_FEC_TX_CLK, | ||
53 | PD12_AOUT_FEC_RXD0, | ||
54 | PD13_AOUT_FEC_RX_DV, | ||
55 | PD14_AOUT_FEC_RX_CLK, | ||
56 | PD15_AOUT_FEC_COL, | ||
57 | PD16_AIN_FEC_TX_ER, | ||
58 | PF23_AIN_FEC_TX_EN, | ||
59 | }; | ||
60 | |||
61 | static struct imxuart_platform_data uart_pdata = { | ||
62 | .flags = IMXUART_HAVE_RTSCTS, | ||
63 | }; | ||
64 | |||
65 | static struct platform_device *platform_devices[] __initdata = { | ||
66 | &mxc_fec_device, | ||
67 | }; | ||
68 | |||
69 | static void __init mx27pdk_init(void) | ||
70 | { | ||
71 | mxc_gpio_setup_multiple_pins(mx27pdk_pins, ARRAY_SIZE(mx27pdk_pins), | ||
72 | "mx27pdk"); | ||
73 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | ||
74 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | ||
75 | } | ||
76 | |||
77 | static void __init mx27pdk_timer_init(void) | ||
78 | { | ||
79 | mx27_clocks_init(26000000); | ||
80 | } | ||
81 | |||
82 | static struct sys_timer mx27pdk_timer = { | ||
83 | .init = mx27pdk_timer_init, | ||
84 | }; | ||
85 | |||
86 | MACHINE_START(MX27_3DS, "Freescale MX27PDK") | ||
87 | /* maintainer: Freescale Semiconductor, Inc. */ | ||
88 | .phys_io = AIPI_BASE_ADDR, | ||
89 | .io_pg_offst = ((AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc, | ||
90 | .boot_params = PHYS_OFFSET + 0x100, | ||
91 | .map_io = mxc_map_io, | ||
92 | .init_irq = mxc_init_irq, | ||
93 | .init_machine = mx27pdk_init, | ||
94 | .timer = &mx27pdk_timer, | ||
95 | MACHINE_END | ||
diff --git a/arch/arm/mach-mx2/pcm038.c b/arch/arm/mach-mx2/pcm038.c index aa4eaa61d1b5..a4628d004343 100644 --- a/arch/arm/mach-mx2/pcm038.c +++ b/arch/arm/mach-mx2/pcm038.c | |||
@@ -17,28 +17,84 @@ | |||
17 | * MA 02110-1301, USA. | 17 | * MA 02110-1301, USA. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/platform_device.h> | ||
21 | #include <linux/mtd/physmap.h> | ||
22 | #include <linux/mtd/plat-ram.h> | ||
23 | #include <linux/io.h> | ||
24 | #include <linux/i2c.h> | 20 | #include <linux/i2c.h> |
25 | #include <linux/i2c/at24.h> | 21 | #include <linux/i2c/at24.h> |
22 | #include <linux/io.h> | ||
23 | #include <linux/mtd/plat-ram.h> | ||
24 | #include <linux/mtd/physmap.h> | ||
25 | #include <linux/platform_device.h> | ||
26 | 26 | ||
27 | #include <asm/mach/arch.h> | ||
28 | #include <asm/mach-types.h> | 27 | #include <asm/mach-types.h> |
28 | #include <asm/mach/arch.h> | ||
29 | #include <asm/mach/time.h> | ||
30 | |||
31 | #include <mach/board-pcm038.h> | ||
29 | #include <mach/common.h> | 32 | #include <mach/common.h> |
30 | #include <mach/hardware.h> | 33 | #include <mach/hardware.h> |
31 | #include <mach/iomux.h> | ||
32 | #ifdef CONFIG_I2C_IMX | ||
33 | #include <mach/i2c.h> | 34 | #include <mach/i2c.h> |
34 | #endif | 35 | #include <mach/iomux.h> |
35 | #include <asm/mach/time.h> | ||
36 | #include <mach/imx-uart.h> | 36 | #include <mach/imx-uart.h> |
37 | #include <mach/board-pcm038.h> | ||
38 | #include <mach/mxc_nand.h> | 37 | #include <mach/mxc_nand.h> |
39 | 38 | ||
40 | #include "devices.h" | 39 | #include "devices.h" |
41 | 40 | ||
41 | static int pcm038_pins[] = { | ||
42 | /* UART1 */ | ||
43 | PE12_PF_UART1_TXD, | ||
44 | PE13_PF_UART1_RXD, | ||
45 | PE14_PF_UART1_CTS, | ||
46 | PE15_PF_UART1_RTS, | ||
47 | /* UART2 */ | ||
48 | PE3_PF_UART2_CTS, | ||
49 | PE4_PF_UART2_RTS, | ||
50 | PE6_PF_UART2_TXD, | ||
51 | PE7_PF_UART2_RXD, | ||
52 | /* UART3 */ | ||
53 | PE8_PF_UART3_TXD, | ||
54 | PE9_PF_UART3_RXD, | ||
55 | PE10_PF_UART3_CTS, | ||
56 | PE11_PF_UART3_RTS, | ||
57 | /* FEC */ | ||
58 | PD0_AIN_FEC_TXD0, | ||
59 | PD1_AIN_FEC_TXD1, | ||
60 | PD2_AIN_FEC_TXD2, | ||
61 | PD3_AIN_FEC_TXD3, | ||
62 | PD4_AOUT_FEC_RX_ER, | ||
63 | PD5_AOUT_FEC_RXD1, | ||
64 | PD6_AOUT_FEC_RXD2, | ||
65 | PD7_AOUT_FEC_RXD3, | ||
66 | PD8_AF_FEC_MDIO, | ||
67 | PD9_AIN_FEC_MDC, | ||
68 | PD10_AOUT_FEC_CRS, | ||
69 | PD11_AOUT_FEC_TX_CLK, | ||
70 | PD12_AOUT_FEC_RXD0, | ||
71 | PD13_AOUT_FEC_RX_DV, | ||
72 | PD14_AOUT_FEC_RX_CLK, | ||
73 | PD15_AOUT_FEC_COL, | ||
74 | PD16_AIN_FEC_TX_ER, | ||
75 | PF23_AIN_FEC_TX_EN, | ||
76 | /* I2C2 */ | ||
77 | PC5_PF_I2C2_SDA, | ||
78 | PC6_PF_I2C2_SCL, | ||
79 | /* SPI1 */ | ||
80 | PD25_PF_CSPI1_RDY, | ||
81 | PD27_PF_CSPI1_SS1, | ||
82 | PD28_PF_CSPI1_SS0, | ||
83 | PD29_PF_CSPI1_SCLK, | ||
84 | PD30_PF_CSPI1_MISO, | ||
85 | PD31_PF_CSPI1_MOSI, | ||
86 | /* SSI1 */ | ||
87 | PC20_PF_SSI1_FS, | ||
88 | PC21_PF_SSI1_RXD, | ||
89 | PC22_PF_SSI1_TXD, | ||
90 | PC23_PF_SSI1_CLK, | ||
91 | /* SSI4 */ | ||
92 | PC16_PF_SSI4_FS, | ||
93 | PC17_PF_SSI4_RXD, | ||
94 | PC18_PF_SSI4_TXD, | ||
95 | PC19_PF_SSI4_CLK, | ||
96 | }; | ||
97 | |||
42 | /* | 98 | /* |
43 | * Phytec's PCM038 comes with 2MiB battery buffered SRAM, | 99 | * Phytec's PCM038 comes with 2MiB battery buffered SRAM, |
44 | * 16 bit width | 100 | * 16 bit width |
@@ -88,107 +144,16 @@ static struct platform_device pcm038_nor_mtd_device = { | |||
88 | .resource = &pcm038_flash_resource, | 144 | .resource = &pcm038_flash_resource, |
89 | }; | 145 | }; |
90 | 146 | ||
91 | static int mxc_uart0_pins[] = { | ||
92 | PE12_PF_UART1_TXD, | ||
93 | PE13_PF_UART1_RXD, | ||
94 | PE14_PF_UART1_CTS, | ||
95 | PE15_PF_UART1_RTS | ||
96 | }; | ||
97 | |||
98 | static int uart_mxc_port0_init(struct platform_device *pdev) | ||
99 | { | ||
100 | return mxc_gpio_setup_multiple_pins(mxc_uart0_pins, | ||
101 | ARRAY_SIZE(mxc_uart0_pins), "UART0"); | ||
102 | } | ||
103 | |||
104 | static int uart_mxc_port0_exit(struct platform_device *pdev) | ||
105 | { | ||
106 | mxc_gpio_release_multiple_pins(mxc_uart0_pins, | ||
107 | ARRAY_SIZE(mxc_uart0_pins)); | ||
108 | return 0; | ||
109 | } | ||
110 | |||
111 | static int mxc_uart1_pins[] = { | ||
112 | PE3_PF_UART2_CTS, | ||
113 | PE4_PF_UART2_RTS, | ||
114 | PE6_PF_UART2_TXD, | ||
115 | PE7_PF_UART2_RXD | ||
116 | }; | ||
117 | |||
118 | static int uart_mxc_port1_init(struct platform_device *pdev) | ||
119 | { | ||
120 | return mxc_gpio_setup_multiple_pins(mxc_uart1_pins, | ||
121 | ARRAY_SIZE(mxc_uart1_pins), "UART1"); | ||
122 | } | ||
123 | |||
124 | static int uart_mxc_port1_exit(struct platform_device *pdev) | ||
125 | { | ||
126 | mxc_gpio_release_multiple_pins(mxc_uart1_pins, | ||
127 | ARRAY_SIZE(mxc_uart1_pins)); | ||
128 | return 0; | ||
129 | } | ||
130 | |||
131 | static int mxc_uart2_pins[] = { PE8_PF_UART3_TXD, | ||
132 | PE9_PF_UART3_RXD, | ||
133 | PE10_PF_UART3_CTS, | ||
134 | PE11_PF_UART3_RTS }; | ||
135 | |||
136 | static int uart_mxc_port2_init(struct platform_device *pdev) | ||
137 | { | ||
138 | return mxc_gpio_setup_multiple_pins(mxc_uart2_pins, | ||
139 | ARRAY_SIZE(mxc_uart2_pins), "UART2"); | ||
140 | } | ||
141 | |||
142 | static int uart_mxc_port2_exit(struct platform_device *pdev) | ||
143 | { | ||
144 | mxc_gpio_release_multiple_pins(mxc_uart2_pins, | ||
145 | ARRAY_SIZE(mxc_uart2_pins)); | ||
146 | return 0; | ||
147 | } | ||
148 | |||
149 | static struct imxuart_platform_data uart_pdata[] = { | 147 | static struct imxuart_platform_data uart_pdata[] = { |
150 | { | 148 | { |
151 | .init = uart_mxc_port0_init, | ||
152 | .exit = uart_mxc_port0_exit, | ||
153 | .flags = IMXUART_HAVE_RTSCTS, | 149 | .flags = IMXUART_HAVE_RTSCTS, |
154 | }, { | 150 | }, { |
155 | .init = uart_mxc_port1_init, | ||
156 | .exit = uart_mxc_port1_exit, | ||
157 | .flags = IMXUART_HAVE_RTSCTS, | 151 | .flags = IMXUART_HAVE_RTSCTS, |
158 | }, { | 152 | }, { |
159 | .init = uart_mxc_port2_init, | ||
160 | .exit = uart_mxc_port2_exit, | ||
161 | .flags = IMXUART_HAVE_RTSCTS, | 153 | .flags = IMXUART_HAVE_RTSCTS, |
162 | }, | 154 | }, |
163 | }; | 155 | }; |
164 | 156 | ||
165 | static int mxc_fec_pins[] = { | ||
166 | PD0_AIN_FEC_TXD0, | ||
167 | PD1_AIN_FEC_TXD1, | ||
168 | PD2_AIN_FEC_TXD2, | ||
169 | PD3_AIN_FEC_TXD3, | ||
170 | PD4_AOUT_FEC_RX_ER, | ||
171 | PD5_AOUT_FEC_RXD1, | ||
172 | PD6_AOUT_FEC_RXD2, | ||
173 | PD7_AOUT_FEC_RXD3, | ||
174 | PD8_AF_FEC_MDIO, | ||
175 | PD9_AIN_FEC_MDC, | ||
176 | PD10_AOUT_FEC_CRS, | ||
177 | PD11_AOUT_FEC_TX_CLK, | ||
178 | PD12_AOUT_FEC_RXD0, | ||
179 | PD13_AOUT_FEC_RX_DV, | ||
180 | PD14_AOUT_FEC_RX_CLK, | ||
181 | PD15_AOUT_FEC_COL, | ||
182 | PD16_AIN_FEC_TX_ER, | ||
183 | PF23_AIN_FEC_TX_EN | ||
184 | }; | ||
185 | |||
186 | static void gpio_fec_active(void) | ||
187 | { | ||
188 | mxc_gpio_setup_multiple_pins(mxc_fec_pins, | ||
189 | ARRAY_SIZE(mxc_fec_pins), "FEC"); | ||
190 | } | ||
191 | |||
192 | static struct mxc_nand_platform_data pcm038_nand_board_info = { | 157 | static struct mxc_nand_platform_data pcm038_nand_board_info = { |
193 | .width = 1, | 158 | .width = 1, |
194 | .hw_ecc = 1, | 159 | .hw_ecc = 1, |
@@ -210,27 +175,8 @@ static void __init pcm038_init_sram(void) | |||
210 | __raw_writel(0x22220a00, CSCR_A(1)); | 175 | __raw_writel(0x22220a00, CSCR_A(1)); |
211 | } | 176 | } |
212 | 177 | ||
213 | #ifdef CONFIG_I2C_IMX | ||
214 | static int mxc_i2c1_pins[] = { | ||
215 | PC5_PF_I2C2_SDA, | ||
216 | PC6_PF_I2C2_SCL | ||
217 | }; | ||
218 | |||
219 | static int pcm038_i2c_1_init(struct device *dev) | ||
220 | { | ||
221 | return mxc_gpio_setup_multiple_pins(mxc_i2c1_pins, ARRAY_SIZE(mxc_i2c1_pins), | ||
222 | "I2C1"); | ||
223 | } | ||
224 | |||
225 | static void pcm038_i2c_1_exit(struct device *dev) | ||
226 | { | ||
227 | mxc_gpio_release_multiple_pins(mxc_i2c1_pins, ARRAY_SIZE(mxc_i2c1_pins)); | ||
228 | } | ||
229 | |||
230 | static struct imxi2c_platform_data pcm038_i2c_1_data = { | 178 | static struct imxi2c_platform_data pcm038_i2c_1_data = { |
231 | .bitrate = 100000, | 179 | .bitrate = 100000, |
232 | .init = pcm038_i2c_1_init, | ||
233 | .exit = pcm038_i2c_1_exit, | ||
234 | }; | 180 | }; |
235 | 181 | ||
236 | static struct at24_platform_data board_eeprom = { | 182 | static struct at24_platform_data board_eeprom = { |
@@ -253,11 +199,12 @@ static struct i2c_board_info pcm038_i2c_devices[] = { | |||
253 | .type = "lm75" | 199 | .type = "lm75" |
254 | } | 200 | } |
255 | }; | 201 | }; |
256 | #endif | ||
257 | 202 | ||
258 | static void __init pcm038_init(void) | 203 | static void __init pcm038_init(void) |
259 | { | 204 | { |
260 | gpio_fec_active(); | 205 | mxc_gpio_setup_multiple_pins(pcm038_pins, ARRAY_SIZE(pcm038_pins), |
206 | "PCM038"); | ||
207 | |||
261 | pcm038_init_sram(); | 208 | pcm038_init_sram(); |
262 | 209 | ||
263 | mxc_register_device(&mxc_uart_device0, &uart_pdata[0]); | 210 | mxc_register_device(&mxc_uart_device0, &uart_pdata[0]); |
@@ -267,13 +214,11 @@ static void __init pcm038_init(void) | |||
267 | mxc_gpio_mode(PE16_AF_OWIRE); | 214 | mxc_gpio_mode(PE16_AF_OWIRE); |
268 | mxc_register_device(&mxc_nand_device, &pcm038_nand_board_info); | 215 | mxc_register_device(&mxc_nand_device, &pcm038_nand_board_info); |
269 | 216 | ||
270 | #ifdef CONFIG_I2C_IMX | ||
271 | /* only the i2c master 1 is used on this CPU card */ | 217 | /* only the i2c master 1 is used on this CPU card */ |
272 | i2c_register_board_info(1, pcm038_i2c_devices, | 218 | i2c_register_board_info(1, pcm038_i2c_devices, |
273 | ARRAY_SIZE(pcm038_i2c_devices)); | 219 | ARRAY_SIZE(pcm038_i2c_devices)); |
274 | 220 | ||
275 | mxc_register_device(&mxc_i2c_device1, &pcm038_i2c_1_data); | 221 | mxc_register_device(&mxc_i2c_device1, &pcm038_i2c_1_data); |
276 | #endif | ||
277 | 222 | ||
278 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 223 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
279 | 224 | ||
@@ -295,7 +240,7 @@ MACHINE_START(PCM038, "phyCORE-i.MX27") | |||
295 | .phys_io = AIPI_BASE_ADDR, | 240 | .phys_io = AIPI_BASE_ADDR, |
296 | .io_pg_offst = ((AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc, | 241 | .io_pg_offst = ((AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc, |
297 | .boot_params = PHYS_OFFSET + 0x100, | 242 | .boot_params = PHYS_OFFSET + 0x100, |
298 | .map_io = mxc_map_io, | 243 | .map_io = mx27_map_io, |
299 | .init_irq = mxc_init_irq, | 244 | .init_irq = mxc_init_irq, |
300 | .init_machine = pcm038_init, | 245 | .init_machine = pcm038_init, |
301 | .timer = &pcm038_timer, | 246 | .timer = &pcm038_timer, |
diff --git a/arch/arm/mach-mx2/pcm970-baseboard.c b/arch/arm/mach-mx2/pcm970-baseboard.c index bf4e520bc1bc..6a3acaf57dd4 100644 --- a/arch/arm/mach-mx2/pcm970-baseboard.c +++ b/arch/arm/mach-mx2/pcm970-baseboard.c | |||
@@ -16,71 +16,107 @@ | |||
16 | * MA 02110-1301, USA. | 16 | * MA 02110-1301, USA. |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/platform_device.h> | ||
20 | #include <linux/gpio.h> | 19 | #include <linux/gpio.h> |
21 | #include <linux/irq.h> | 20 | #include <linux/irq.h> |
21 | #include <linux/platform_device.h> | ||
22 | 22 | ||
23 | #include <asm/mach/arch.h> | 23 | #include <asm/mach/arch.h> |
24 | 24 | ||
25 | #include <mach/hardware.h> | ||
26 | #include <mach/common.h> | 25 | #include <mach/common.h> |
27 | #include <mach/mmc.h> | ||
28 | #include <mach/imxfb.h> | ||
29 | #include <mach/iomux.h> | 26 | #include <mach/iomux.h> |
27 | #include <mach/imxfb.h> | ||
28 | #include <mach/hardware.h> | ||
29 | #include <mach/mmc.h> | ||
30 | 30 | ||
31 | #include "devices.h" | 31 | #include "devices.h" |
32 | 32 | ||
33 | static int pcm970_sdhc2_get_ro(struct device *dev) | 33 | static int pcm970_pins[] = { |
34 | { | 34 | /* SDHC */ |
35 | return gpio_get_value(GPIO_PORTC + 28); | ||
36 | } | ||
37 | |||
38 | static int pcm970_sdhc2_pins[] = { | ||
39 | PB4_PF_SD2_D0, | 35 | PB4_PF_SD2_D0, |
40 | PB5_PF_SD2_D1, | 36 | PB5_PF_SD2_D1, |
41 | PB6_PF_SD2_D2, | 37 | PB6_PF_SD2_D2, |
42 | PB7_PF_SD2_D3, | 38 | PB7_PF_SD2_D3, |
43 | PB8_PF_SD2_CMD, | 39 | PB8_PF_SD2_CMD, |
44 | PB9_PF_SD2_CLK, | 40 | PB9_PF_SD2_CLK, |
41 | GPIO_PORTC | 28 | GPIO_GPIO | GPIO_IN, /* card detect */ | ||
42 | /* display */ | ||
43 | PA5_PF_LSCLK, | ||
44 | PA6_PF_LD0, | ||
45 | PA7_PF_LD1, | ||
46 | PA8_PF_LD2, | ||
47 | PA9_PF_LD3, | ||
48 | PA10_PF_LD4, | ||
49 | PA11_PF_LD5, | ||
50 | PA12_PF_LD6, | ||
51 | PA13_PF_LD7, | ||
52 | PA14_PF_LD8, | ||
53 | PA15_PF_LD9, | ||
54 | PA16_PF_LD10, | ||
55 | PA17_PF_LD11, | ||
56 | PA18_PF_LD12, | ||
57 | PA19_PF_LD13, | ||
58 | PA20_PF_LD14, | ||
59 | PA21_PF_LD15, | ||
60 | PA22_PF_LD16, | ||
61 | PA23_PF_LD17, | ||
62 | PA24_PF_REV, | ||
63 | PA25_PF_CLS, | ||
64 | PA26_PF_PS, | ||
65 | PA27_PF_SPL_SPR, | ||
66 | PA28_PF_HSYNC, | ||
67 | PA29_PF_VSYNC, | ||
68 | PA30_PF_CONTRAST, | ||
69 | PA31_PF_OE_ACD, | ||
70 | /* | ||
71 | * it seems the data line misses a pullup, so we must enable | ||
72 | * the internal pullup as a local workaround | ||
73 | */ | ||
74 | PD17_PF_I2C_DATA | GPIO_PUEN, | ||
75 | PD18_PF_I2C_CLK, | ||
76 | /* Camera */ | ||
77 | PB10_PF_CSI_D0, | ||
78 | PB11_PF_CSI_D1, | ||
79 | PB12_PF_CSI_D2, | ||
80 | PB13_PF_CSI_D3, | ||
81 | PB14_PF_CSI_D4, | ||
82 | PB15_PF_CSI_MCLK, | ||
83 | PB16_PF_CSI_PIXCLK, | ||
84 | PB17_PF_CSI_D5, | ||
85 | PB18_PF_CSI_D6, | ||
86 | PB19_PF_CSI_D7, | ||
87 | PB20_PF_CSI_VSYNC, | ||
88 | PB21_PF_CSI_HSYNC, | ||
45 | }; | 89 | }; |
46 | 90 | ||
91 | static int pcm970_sdhc2_get_ro(struct device *dev) | ||
92 | { | ||
93 | return gpio_get_value(GPIO_PORTC + 28); | ||
94 | } | ||
95 | |||
47 | static int pcm970_sdhc2_init(struct device *dev, irq_handler_t detect_irq, void *data) | 96 | static int pcm970_sdhc2_init(struct device *dev, irq_handler_t detect_irq, void *data) |
48 | { | 97 | { |
49 | int ret; | 98 | int ret; |
50 | 99 | ||
51 | ret = mxc_gpio_setup_multiple_pins(pcm970_sdhc2_pins, | 100 | ret = request_irq(IRQ_GPIOC(29), detect_irq, IRQF_TRIGGER_FALLING, |
52 | ARRAY_SIZE(pcm970_sdhc2_pins), "sdhc2"); | ||
53 | if(ret) | ||
54 | return ret; | ||
55 | |||
56 | ret = request_irq(IRQ_GPIOC(29), detect_irq, 0, | ||
57 | "imx-mmc-detect", data); | 101 | "imx-mmc-detect", data); |
58 | if (ret) | 102 | if (ret) |
59 | goto out_release_gpio; | 103 | return ret; |
60 | |||
61 | set_irq_type(IRQ_GPIOC(29), IRQF_TRIGGER_FALLING); | ||
62 | 104 | ||
63 | ret = gpio_request(GPIO_PORTC + 28, "imx-mmc-ro"); | 105 | ret = gpio_request(GPIO_PORTC + 28, "imx-mmc-ro"); |
64 | if (ret) | 106 | if (ret) { |
65 | goto out_release_gpio; | 107 | free_irq(IRQ_GPIOC(29), data); |
108 | return ret; | ||
109 | } | ||
66 | 110 | ||
67 | mxc_gpio_mode((GPIO_PORTC | 28) | GPIO_GPIO | GPIO_IN); | ||
68 | gpio_direction_input(GPIO_PORTC + 28); | 111 | gpio_direction_input(GPIO_PORTC + 28); |
69 | 112 | ||
70 | return 0; | 113 | return 0; |
71 | |||
72 | out_release_gpio: | ||
73 | mxc_gpio_release_multiple_pins(pcm970_sdhc2_pins, | ||
74 | ARRAY_SIZE(pcm970_sdhc2_pins)); | ||
75 | return ret; | ||
76 | } | 114 | } |
77 | 115 | ||
78 | static void pcm970_sdhc2_exit(struct device *dev, void *data) | 116 | static void pcm970_sdhc2_exit(struct device *dev, void *data) |
79 | { | 117 | { |
80 | free_irq(IRQ_GPIOC(29), data); | 118 | free_irq(IRQ_GPIOC(29), data); |
81 | gpio_free(GPIO_PORTC + 28); | 119 | gpio_free(GPIO_PORTC + 28); |
82 | mxc_gpio_release_multiple_pins(pcm970_sdhc2_pins, | ||
83 | ARRAY_SIZE(pcm970_sdhc2_pins)); | ||
84 | } | 120 | } |
85 | 121 | ||
86 | static struct imxmmc_platform_data sdhc_pdata = { | 122 | static struct imxmmc_platform_data sdhc_pdata = { |
@@ -89,29 +125,6 @@ static struct imxmmc_platform_data sdhc_pdata = { | |||
89 | .exit = pcm970_sdhc2_exit, | 125 | .exit = pcm970_sdhc2_exit, |
90 | }; | 126 | }; |
91 | 127 | ||
92 | static int mxc_fb_pins[] = { | ||
93 | PA5_PF_LSCLK, PA6_PF_LD0, PA7_PF_LD1, PA8_PF_LD2, | ||
94 | PA9_PF_LD3, PA10_PF_LD4, PA11_PF_LD5, PA12_PF_LD6, | ||
95 | PA13_PF_LD7, PA14_PF_LD8, PA15_PF_LD9, PA16_PF_LD10, | ||
96 | PA17_PF_LD11, PA18_PF_LD12, PA19_PF_LD13, PA20_PF_LD14, | ||
97 | PA21_PF_LD15, PA22_PF_LD16, PA23_PF_LD17, PA24_PF_REV, | ||
98 | PA25_PF_CLS, PA26_PF_PS, PA27_PF_SPL_SPR, PA28_PF_HSYNC, | ||
99 | PA29_PF_VSYNC, PA30_PF_CONTRAST, PA31_PF_OE_ACD | ||
100 | }; | ||
101 | |||
102 | static int pcm038_fb_init(struct platform_device *pdev) | ||
103 | { | ||
104 | return mxc_gpio_setup_multiple_pins(mxc_fb_pins, | ||
105 | ARRAY_SIZE(mxc_fb_pins), "FB"); | ||
106 | } | ||
107 | |||
108 | static int pcm038_fb_exit(struct platform_device *pdev) | ||
109 | { | ||
110 | mxc_gpio_release_multiple_pins(mxc_fb_pins, ARRAY_SIZE(mxc_fb_pins)); | ||
111 | |||
112 | return 0; | ||
113 | } | ||
114 | |||
115 | /* | 128 | /* |
116 | * Connected is a portrait Sharp-QVGA display | 129 | * Connected is a portrait Sharp-QVGA display |
117 | * of type: LQ035Q7DH06 | 130 | * of type: LQ035Q7DH06 |
@@ -144,9 +157,6 @@ static struct imx_fb_platform_data pcm038_fb_data = { | |||
144 | .pwmr = 0x00A903FF, | 157 | .pwmr = 0x00A903FF, |
145 | .lscr1 = 0x00120300, | 158 | .lscr1 = 0x00120300, |
146 | .dmacr = 0x00020010, | 159 | .dmacr = 0x00020010, |
147 | |||
148 | .init = pcm038_fb_init, | ||
149 | .exit = pcm038_fb_exit, | ||
150 | }; | 160 | }; |
151 | 161 | ||
152 | /* | 162 | /* |
@@ -157,6 +167,9 @@ static struct imx_fb_platform_data pcm038_fb_data = { | |||
157 | */ | 167 | */ |
158 | void __init pcm970_baseboard_init(void) | 168 | void __init pcm970_baseboard_init(void) |
159 | { | 169 | { |
170 | mxc_gpio_setup_multiple_pins(pcm970_pins, ARRAY_SIZE(pcm970_pins), | ||
171 | "PCM970"); | ||
172 | |||
160 | mxc_register_device(&mxc_fb_device, &pcm038_fb_data); | 173 | mxc_register_device(&mxc_fb_device, &pcm038_fb_data); |
161 | mxc_register_device(&mxc_sdhc_device1, &sdhc_pdata); | 174 | mxc_register_device(&mxc_sdhc_device1, &sdhc_pdata); |
162 | } | 175 | } |
diff --git a/arch/arm/mach-mx3/Kconfig b/arch/arm/mach-mx3/Kconfig index 194b8428bba4..32e45155089a 100644 --- a/arch/arm/mach-mx3/Kconfig +++ b/arch/arm/mach-mx3/Kconfig | |||
@@ -1,10 +1,12 @@ | |||
1 | if ARCH_MX3 | 1 | if ARCH_MX3 |
2 | 2 | ||
3 | config ARCH_MX31 | 3 | config ARCH_MX31 |
4 | select ARCH_HAS_RNGA | ||
4 | bool | 5 | bool |
5 | 6 | ||
6 | config ARCH_MX35 | 7 | config ARCH_MX35 |
7 | bool | 8 | bool |
9 | select ARCH_MXC_IOMUX_V3 | ||
8 | 10 | ||
9 | comment "MX3 platforms:" | 11 | comment "MX3 platforms:" |
10 | 12 | ||
@@ -66,4 +68,11 @@ config MACH_QONG | |||
66 | Include support for Dave/DENX QongEVB-LITE platform. This includes | 68 | Include support for Dave/DENX QongEVB-LITE platform. This includes |
67 | specific configurations for the board and its peripherals. | 69 | specific configurations for the board and its peripherals. |
68 | 70 | ||
71 | config MACH_PCM043 | ||
72 | bool "Support Phytec pcm043 (i.MX35) platforms" | ||
73 | select ARCH_MX35 | ||
74 | help | ||
75 | Include support for Phytec pcm043 platform. This includes | ||
76 | specific configurations for the board and its peripherals. | ||
77 | |||
69 | endif | 78 | endif |
diff --git a/arch/arm/mach-mx3/Makefile b/arch/arm/mach-mx3/Makefile index 272c8a953b30..cd6547b61b1e 100644 --- a/arch/arm/mach-mx3/Makefile +++ b/arch/arm/mach-mx3/Makefile | |||
@@ -14,3 +14,4 @@ obj-$(CONFIG_MACH_MX31_3DS) += mx31pdk.o | |||
14 | obj-$(CONFIG_MACH_MX31MOBOARD) += mx31moboard.o mx31moboard-devboard.o \ | 14 | obj-$(CONFIG_MACH_MX31MOBOARD) += mx31moboard.o mx31moboard-devboard.o \ |
15 | mx31moboard-marxbot.o | 15 | mx31moboard-marxbot.o |
16 | obj-$(CONFIG_MACH_QONG) += qong.o | 16 | obj-$(CONFIG_MACH_QONG) += qong.o |
17 | obj-$(CONFIG_MACH_PCM043) += pcm043.o | ||
diff --git a/arch/arm/mach-mx3/clock-imx35.c b/arch/arm/mach-mx3/clock-imx35.c index 53a112d4e04a..0d76521cb491 100644 --- a/arch/arm/mach-mx3/clock-imx35.c +++ b/arch/arm/mach-mx3/clock-imx35.c | |||
@@ -147,34 +147,16 @@ static struct arm_ahb_div clk_consumer[] = { | |||
147 | { .arm = 0, .ahb = 0, .sel = 0}, | 147 | { .arm = 0, .ahb = 0, .sel = 0}, |
148 | }; | 148 | }; |
149 | 149 | ||
150 | static struct arm_ahb_div clk_automotive[] = { | ||
151 | { .arm = 1, .ahb = 3, .sel = 0}, | ||
152 | { .arm = 1, .ahb = 2, .sel = 1}, | ||
153 | { .arm = 2, .ahb = 1, .sel = 1}, | ||
154 | { .arm = 0, .ahb = 0, .sel = 0}, | ||
155 | { .arm = 1, .ahb = 6, .sel = 0}, | ||
156 | { .arm = 1, .ahb = 4, .sel = 1}, | ||
157 | { .arm = 2, .ahb = 2, .sel = 1}, | ||
158 | { .arm = 0, .ahb = 0, .sel = 0}, | ||
159 | }; | ||
160 | |||
161 | static unsigned long get_rate_arm(void) | 150 | static unsigned long get_rate_arm(void) |
162 | { | 151 | { |
163 | unsigned long pdr0 = __raw_readl(CCM_BASE + CCM_PDR0); | 152 | unsigned long pdr0 = __raw_readl(CCM_BASE + CCM_PDR0); |
164 | struct arm_ahb_div *aad; | 153 | struct arm_ahb_div *aad; |
165 | unsigned long fref = get_rate_mpll(); | 154 | unsigned long fref = get_rate_mpll(); |
166 | 155 | ||
167 | if (pdr0 & 1) { | 156 | aad = &clk_consumer[(pdr0 >> 16) & 0xf]; |
168 | /* consumer path */ | 157 | if (aad->sel) |
169 | aad = &clk_consumer[(pdr0 >> 16) & 0xf]; | 158 | fref = fref * 2 / 3; |
170 | if (aad->sel) | 159 | |
171 | fref = fref * 2 / 3; | ||
172 | } else { | ||
173 | /* auto path */ | ||
174 | aad = &clk_automotive[(pdr0 >> 9) & 0x7]; | ||
175 | if (aad->sel) | ||
176 | fref = fref * 3 / 4; | ||
177 | } | ||
178 | return fref / aad->arm; | 160 | return fref / aad->arm; |
179 | } | 161 | } |
180 | 162 | ||
@@ -184,12 +166,7 @@ static unsigned long get_rate_ahb(struct clk *clk) | |||
184 | struct arm_ahb_div *aad; | 166 | struct arm_ahb_div *aad; |
185 | unsigned long fref = get_rate_mpll(); | 167 | unsigned long fref = get_rate_mpll(); |
186 | 168 | ||
187 | if (pdr0 & 1) | 169 | aad = &clk_consumer[(pdr0 >> 16) & 0xf]; |
188 | /* consumer path */ | ||
189 | aad = &clk_consumer[(pdr0 >> 16) & 0xf]; | ||
190 | else | ||
191 | /* auto path */ | ||
192 | aad = &clk_automotive[(pdr0 >> 9) & 0x7]; | ||
193 | 170 | ||
194 | return fref / aad->ahb; | 171 | return fref / aad->ahb; |
195 | } | 172 | } |
@@ -430,7 +407,8 @@ static struct clk_lookup lookups[] __initdata = { | |||
430 | _REGISTER_CLOCK("imx-i2c.1", NULL, i2c2_clk) | 407 | _REGISTER_CLOCK("imx-i2c.1", NULL, i2c2_clk) |
431 | _REGISTER_CLOCK("imx-i2c.2", NULL, i2c3_clk) | 408 | _REGISTER_CLOCK("imx-i2c.2", NULL, i2c3_clk) |
432 | _REGISTER_CLOCK(NULL, "iomuxc", iomuxc_clk) | 409 | _REGISTER_CLOCK(NULL, "iomuxc", iomuxc_clk) |
433 | _REGISTER_CLOCK(NULL, "ipu", ipu_clk) | 410 | _REGISTER_CLOCK("ipu-core", NULL, ipu_clk) |
411 | _REGISTER_CLOCK("mx3_sdc_fb", NULL, ipu_clk) | ||
434 | _REGISTER_CLOCK(NULL, "kpp", kpp_clk) | 412 | _REGISTER_CLOCK(NULL, "kpp", kpp_clk) |
435 | _REGISTER_CLOCK(NULL, "mlb", mlb_clk) | 413 | _REGISTER_CLOCK(NULL, "mlb", mlb_clk) |
436 | _REGISTER_CLOCK(NULL, "mshc", mshc_clk) | 414 | _REGISTER_CLOCK(NULL, "mshc", mshc_clk) |
@@ -462,8 +440,6 @@ int __init mx35_clocks_init() | |||
462 | int i; | 440 | int i; |
463 | unsigned int ll = 0; | 441 | unsigned int ll = 0; |
464 | 442 | ||
465 | mxc_set_cpu_type(MXC_CPU_MX35); | ||
466 | |||
467 | #ifdef CONFIG_DEBUG_LL_CONSOLE | 443 | #ifdef CONFIG_DEBUG_LL_CONSOLE |
468 | ll = (3 << 16); | 444 | ll = (3 << 16); |
469 | #endif | 445 | #endif |
diff --git a/arch/arm/mach-mx3/clock.c b/arch/arm/mach-mx3/clock.c index 9957a11533a4..28bd11dc89b8 100644 --- a/arch/arm/mach-mx3/clock.c +++ b/arch/arm/mach-mx3/clock.c | |||
@@ -566,8 +566,6 @@ int __init mx31_clocks_init(unsigned long fref) | |||
566 | u32 reg; | 566 | u32 reg; |
567 | int i; | 567 | int i; |
568 | 568 | ||
569 | mxc_set_cpu_type(MXC_CPU_MX31); | ||
570 | |||
571 | ckih_rate = fref; | 569 | ckih_rate = fref; |
572 | 570 | ||
573 | for (i = 0; i < ARRAY_SIZE(lookups); i++) | 571 | for (i = 0; i < ARRAY_SIZE(lookups); i++) |
@@ -581,6 +579,12 @@ int __init mx31_clocks_init(unsigned long fref) | |||
581 | MX32, but still required to be set */ | 579 | MX32, but still required to be set */ |
582 | MXC_CCM_CGR2); | 580 | MXC_CCM_CGR2); |
583 | 581 | ||
582 | /* | ||
583 | * Before turning off usb_pll make sure ipg_per_clk is generated | ||
584 | * by ipg_clk and not usb_pll. | ||
585 | */ | ||
586 | __raw_writel(__raw_readl(MXC_CCM_CCMR) | (1 << 24), MXC_CCM_CCMR); | ||
587 | |||
584 | usb_pll_disable(&usb_pll_clk); | 588 | usb_pll_disable(&usb_pll_clk); |
585 | 589 | ||
586 | pr_info("Clock input source is %ld\n", clk_get_rate(&ckih_clk)); | 590 | pr_info("Clock input source is %ld\n", clk_get_rate(&ckih_clk)); |
diff --git a/arch/arm/mach-mx3/devices.c b/arch/arm/mach-mx3/devices.c index 380be0c9b213..d927eddcad46 100644 --- a/arch/arm/mach-mx3/devices.c +++ b/arch/arm/mach-mx3/devices.c | |||
@@ -17,13 +17,17 @@ | |||
17 | * Boston, MA 02110-1301, USA. | 17 | * Boston, MA 02110-1301, USA. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/dma-mapping.h> | ||
20 | #include <linux/module.h> | 21 | #include <linux/module.h> |
21 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
22 | #include <linux/serial.h> | 23 | #include <linux/serial.h> |
23 | #include <linux/gpio.h> | 24 | #include <linux/gpio.h> |
25 | #include <linux/dma-mapping.h> | ||
24 | #include <mach/hardware.h> | 26 | #include <mach/hardware.h> |
25 | #include <mach/irqs.h> | 27 | #include <mach/irqs.h> |
28 | #include <mach/common.h> | ||
26 | #include <mach/imx-uart.h> | 29 | #include <mach/imx-uart.h> |
30 | #include <mach/mx3_camera.h> | ||
27 | 31 | ||
28 | #include "devices.h" | 32 | #include "devices.h" |
29 | 33 | ||
@@ -283,6 +287,21 @@ struct platform_device mxcsdhc_device1 = { | |||
283 | .num_resources = ARRAY_SIZE(mxcsdhc1_resources), | 287 | .num_resources = ARRAY_SIZE(mxcsdhc1_resources), |
284 | .resource = mxcsdhc1_resources, | 288 | .resource = mxcsdhc1_resources, |
285 | }; | 289 | }; |
290 | |||
291 | static struct resource rnga_resources[] = { | ||
292 | { | ||
293 | .start = RNGA_BASE_ADDR, | ||
294 | .end = RNGA_BASE_ADDR + 0x28, | ||
295 | .flags = IORESOURCE_MEM, | ||
296 | }, | ||
297 | }; | ||
298 | |||
299 | struct platform_device mxc_rnga_device = { | ||
300 | .name = "mxc_rnga", | ||
301 | .id = -1, | ||
302 | .num_resources = 1, | ||
303 | .resource = rnga_resources, | ||
304 | }; | ||
286 | #endif /* CONFIG_ARCH_MX31 */ | 305 | #endif /* CONFIG_ARCH_MX31 */ |
287 | 306 | ||
288 | /* i.MX31 Image Processing Unit */ | 307 | /* i.MX31 Image Processing Unit */ |
@@ -329,10 +348,54 @@ struct platform_device mx3_fb = { | |||
329 | .num_resources = ARRAY_SIZE(fb_resources), | 348 | .num_resources = ARRAY_SIZE(fb_resources), |
330 | .resource = fb_resources, | 349 | .resource = fb_resources, |
331 | .dev = { | 350 | .dev = { |
332 | .coherent_dma_mask = 0xffffffff, | 351 | .coherent_dma_mask = DMA_BIT_MASK(32), |
333 | }, | 352 | }, |
334 | }; | 353 | }; |
335 | 354 | ||
355 | static struct resource camera_resources[] = { | ||
356 | { | ||
357 | .start = IPU_CTRL_BASE_ADDR + 0x60, | ||
358 | .end = IPU_CTRL_BASE_ADDR + 0x87, | ||
359 | .flags = IORESOURCE_MEM, | ||
360 | }, | ||
361 | }; | ||
362 | |||
363 | struct platform_device mx3_camera = { | ||
364 | .name = "mx3-camera", | ||
365 | .id = 0, | ||
366 | .num_resources = ARRAY_SIZE(camera_resources), | ||
367 | .resource = camera_resources, | ||
368 | .dev = { | ||
369 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
370 | }, | ||
371 | }; | ||
372 | |||
373 | static struct resource otg_resources[] = { | ||
374 | { | ||
375 | .start = OTG_BASE_ADDR, | ||
376 | .end = OTG_BASE_ADDR + 0x1ff, | ||
377 | .flags = IORESOURCE_MEM, | ||
378 | }, { | ||
379 | .start = MXC_INT_USB3, | ||
380 | .end = MXC_INT_USB3, | ||
381 | .flags = IORESOURCE_IRQ, | ||
382 | }, | ||
383 | }; | ||
384 | |||
385 | static u64 otg_dmamask = DMA_BIT_MASK(32); | ||
386 | |||
387 | /* OTG gadget device */ | ||
388 | struct platform_device mxc_otg_udc_device = { | ||
389 | .name = "fsl-usb2-udc", | ||
390 | .id = -1, | ||
391 | .dev = { | ||
392 | .dma_mask = &otg_dmamask, | ||
393 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
394 | }, | ||
395 | .resource = otg_resources, | ||
396 | .num_resources = ARRAY_SIZE(otg_resources), | ||
397 | }; | ||
398 | |||
336 | #ifdef CONFIG_ARCH_MX35 | 399 | #ifdef CONFIG_ARCH_MX35 |
337 | static struct resource mxc_fec_resources[] = { | 400 | static struct resource mxc_fec_resources[] = { |
338 | { | 401 | { |
@@ -359,6 +422,7 @@ static int mx3_devices_init(void) | |||
359 | if (cpu_is_mx31()) { | 422 | if (cpu_is_mx31()) { |
360 | mxc_nand_resources[0].start = MX31_NFC_BASE_ADDR; | 423 | mxc_nand_resources[0].start = MX31_NFC_BASE_ADDR; |
361 | mxc_nand_resources[0].end = MX31_NFC_BASE_ADDR + 0xfff; | 424 | mxc_nand_resources[0].end = MX31_NFC_BASE_ADDR + 0xfff; |
425 | mxc_register_device(&mxc_rnga_device, NULL); | ||
362 | } | 426 | } |
363 | if (cpu_is_mx35()) { | 427 | if (cpu_is_mx35()) { |
364 | mxc_nand_resources[0].start = MX35_NFC_BASE_ADDR; | 428 | mxc_nand_resources[0].start = MX35_NFC_BASE_ADDR; |
diff --git a/arch/arm/mach-mx3/devices.h b/arch/arm/mach-mx3/devices.h index 88c04b296fab..475410ada60a 100644 --- a/arch/arm/mach-mx3/devices.h +++ b/arch/arm/mach-mx3/devices.h | |||
@@ -11,6 +11,8 @@ extern struct platform_device mxc_i2c_device1; | |||
11 | extern struct platform_device mxc_i2c_device2; | 11 | extern struct platform_device mxc_i2c_device2; |
12 | extern struct platform_device mx3_ipu; | 12 | extern struct platform_device mx3_ipu; |
13 | extern struct platform_device mx3_fb; | 13 | extern struct platform_device mx3_fb; |
14 | extern struct platform_device mx3_camera; | ||
14 | extern struct platform_device mxc_fec_device; | 15 | extern struct platform_device mxc_fec_device; |
15 | extern struct platform_device mxcsdhc_device0; | 16 | extern struct platform_device mxcsdhc_device0; |
16 | extern struct platform_device mxcsdhc_device1; | 17 | extern struct platform_device mxcsdhc_device1; |
18 | extern struct platform_device mxc_otg_udc_device; | ||
diff --git a/arch/arm/mach-mx3/iomux.c b/arch/arm/mach-mx3/iomux.c index 40ffc5a664d9..c66ccbcdc11b 100644 --- a/arch/arm/mach-mx3/iomux.c +++ b/arch/arm/mach-mx3/iomux.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/spinlock.h> | 22 | #include <linux/spinlock.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <linux/gpio.h> | ||
25 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
26 | #include <mach/hardware.h> | 25 | #include <mach/hardware.h> |
27 | #include <mach/gpio.h> | 26 | #include <mach/gpio.h> |
@@ -94,15 +93,13 @@ void mxc_iomux_set_pad(enum iomux_pins pin, u32 config) | |||
94 | EXPORT_SYMBOL(mxc_iomux_set_pad); | 93 | EXPORT_SYMBOL(mxc_iomux_set_pad); |
95 | 94 | ||
96 | /* | 95 | /* |
97 | * setups a single pin: | 96 | * allocs a single pin: |
98 | * - reserves the pin so that it is not claimed by another driver | 97 | * - reserves the pin so that it is not claimed by another driver |
99 | * - setups the iomux according to the configuration | 98 | * - setups the iomux according to the configuration |
100 | * - if the pin is configured as a GPIO, we claim it through kernel gpiolib | ||
101 | */ | 99 | */ |
102 | int mxc_iomux_setup_pin(const unsigned int pin, const char *label) | 100 | int mxc_iomux_alloc_pin(const unsigned int pin, const char *label) |
103 | { | 101 | { |
104 | unsigned pad = pin & IOMUX_PADNUM_MASK; | 102 | unsigned pad = pin & IOMUX_PADNUM_MASK; |
105 | unsigned gpio; | ||
106 | 103 | ||
107 | if (pad >= (PIN_MAX + 1)) { | 104 | if (pad >= (PIN_MAX + 1)) { |
108 | printk(KERN_ERR "mxc_iomux: Attempt to request nonexistant pin %u for \"%s\"\n", | 105 | printk(KERN_ERR "mxc_iomux: Attempt to request nonexistant pin %u for \"%s\"\n", |
@@ -113,19 +110,13 @@ int mxc_iomux_setup_pin(const unsigned int pin, const char *label) | |||
113 | if (test_and_set_bit(pad, mxc_pin_alloc_map)) { | 110 | if (test_and_set_bit(pad, mxc_pin_alloc_map)) { |
114 | printk(KERN_ERR "mxc_iomux: pin %u already used. Allocation for \"%s\" failed\n", | 111 | printk(KERN_ERR "mxc_iomux: pin %u already used. Allocation for \"%s\" failed\n", |
115 | pad, label ? label : "?"); | 112 | pad, label ? label : "?"); |
116 | return -EINVAL; | 113 | return -EBUSY; |
117 | } | 114 | } |
118 | mxc_iomux_mode(pin); | 115 | mxc_iomux_mode(pin); |
119 | 116 | ||
120 | /* if we have a gpio, we can allocate it */ | ||
121 | gpio = (pin & IOMUX_GPIONUM_MASK) >> IOMUX_GPIONUM_SHIFT; | ||
122 | if (gpio < (GPIO_PORT_MAX + 1) * 32) | ||
123 | if (gpio_request(gpio, label)) | ||
124 | return -EINVAL; | ||
125 | |||
126 | return 0; | 117 | return 0; |
127 | } | 118 | } |
128 | EXPORT_SYMBOL(mxc_iomux_setup_pin); | 119 | EXPORT_SYMBOL(mxc_iomux_alloc_pin); |
129 | 120 | ||
130 | int mxc_iomux_setup_multiple_pins(unsigned int *pin_list, unsigned count, | 121 | int mxc_iomux_setup_multiple_pins(unsigned int *pin_list, unsigned count, |
131 | const char *label) | 122 | const char *label) |
@@ -135,7 +126,8 @@ int mxc_iomux_setup_multiple_pins(unsigned int *pin_list, unsigned count, | |||
135 | int ret = -EINVAL; | 126 | int ret = -EINVAL; |
136 | 127 | ||
137 | for (i = 0; i < count; i++) { | 128 | for (i = 0; i < count; i++) { |
138 | if (mxc_iomux_setup_pin(*p, label)) | 129 | ret = mxc_iomux_alloc_pin(*p, label); |
130 | if (ret) | ||
139 | goto setup_error; | 131 | goto setup_error; |
140 | p++; | 132 | p++; |
141 | } | 133 | } |
@@ -150,14 +142,9 @@ EXPORT_SYMBOL(mxc_iomux_setup_multiple_pins); | |||
150 | void mxc_iomux_release_pin(const unsigned int pin) | 142 | void mxc_iomux_release_pin(const unsigned int pin) |
151 | { | 143 | { |
152 | unsigned pad = pin & IOMUX_PADNUM_MASK; | 144 | unsigned pad = pin & IOMUX_PADNUM_MASK; |
153 | unsigned gpio; | ||
154 | 145 | ||
155 | if (pad < (PIN_MAX + 1)) | 146 | if (pad < (PIN_MAX + 1)) |
156 | clear_bit(pad, mxc_pin_alloc_map); | 147 | clear_bit(pad, mxc_pin_alloc_map); |
157 | |||
158 | gpio = (pin & IOMUX_GPIONUM_MASK) >> IOMUX_GPIONUM_SHIFT; | ||
159 | if (gpio < (GPIO_PORT_MAX + 1) * 32) | ||
160 | gpio_free(gpio); | ||
161 | } | 148 | } |
162 | EXPORT_SYMBOL(mxc_iomux_release_pin); | 149 | EXPORT_SYMBOL(mxc_iomux_release_pin); |
163 | 150 | ||
diff --git a/arch/arm/mach-mx3/mm.c b/arch/arm/mach-mx3/mm.c index 9e1459cb4b74..1f5fdd456cb9 100644 --- a/arch/arm/mach-mx3/mm.c +++ b/arch/arm/mach-mx3/mm.c | |||
@@ -72,8 +72,17 @@ static struct map_desc mxc_io_desc[] __initdata = { | |||
72 | * system startup to create static physical to virtual memory mappings | 72 | * system startup to create static physical to virtual memory mappings |
73 | * for the IO modules. | 73 | * for the IO modules. |
74 | */ | 74 | */ |
75 | void __init mxc_map_io(void) | 75 | void __init mx31_map_io(void) |
76 | { | 76 | { |
77 | mxc_set_cpu_type(MXC_CPU_MX31); | ||
78 | |||
79 | iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc)); | ||
80 | } | ||
81 | |||
82 | void __init mx35_map_io(void) | ||
83 | { | ||
84 | mxc_set_cpu_type(MXC_CPU_MX35); | ||
85 | |||
77 | iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc)); | 86 | iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc)); |
78 | } | 87 | } |
79 | 88 | ||
diff --git a/arch/arm/mach-mx3/mx31ads.c b/arch/arm/mach-mx3/mx31ads.c index a6d6efefa6aa..30e2767a78ae 100644 --- a/arch/arm/mach-mx3/mx31ads.c +++ b/arch/arm/mach-mx3/mx31ads.c | |||
@@ -187,7 +187,7 @@ static void __init mx31ads_init_expio(void) | |||
187 | /* | 187 | /* |
188 | * Configure INT line as GPIO input | 188 | * Configure INT line as GPIO input |
189 | */ | 189 | */ |
190 | mxc_iomux_setup_pin(IOMUX_MODE(MX31_PIN_GPIO1_4, IOMUX_CONFIG_GPIO), "expio"); | 190 | mxc_iomux_alloc_pin(IOMUX_MODE(MX31_PIN_GPIO1_4, IOMUX_CONFIG_GPIO), "expio"); |
191 | 191 | ||
192 | /* disable the interrupt and clear the status */ | 192 | /* disable the interrupt and clear the status */ |
193 | __raw_writew(0xFFFF, PBC_INTMASK_CLEAR_REG); | 193 | __raw_writew(0xFFFF, PBC_INTMASK_CLEAR_REG); |
@@ -511,7 +511,7 @@ static struct map_desc mx31ads_io_desc[] __initdata = { | |||
511 | */ | 511 | */ |
512 | static void __init mx31ads_map_io(void) | 512 | static void __init mx31ads_map_io(void) |
513 | { | 513 | { |
514 | mxc_map_io(); | 514 | mx31_map_io(); |
515 | iotable_init(mx31ads_io_desc, ARRAY_SIZE(mx31ads_io_desc)); | 515 | iotable_init(mx31ads_io_desc, ARRAY_SIZE(mx31ads_io_desc)); |
516 | } | 516 | } |
517 | 517 | ||
diff --git a/arch/arm/mach-mx3/mx31lite.c b/arch/arm/mach-mx3/mx31lite.c index 894d98cd9941..86fe70fa3e13 100644 --- a/arch/arm/mach-mx3/mx31lite.c +++ b/arch/arm/mach-mx3/mx31lite.c | |||
@@ -22,6 +22,9 @@ | |||
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/memory.h> | 24 | #include <linux/memory.h> |
25 | #include <linux/platform_device.h> | ||
26 | #include <linux/gpio.h> | ||
27 | #include <linux/smsc911x.h> | ||
25 | 28 | ||
26 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
27 | #include <asm/mach-types.h> | 30 | #include <asm/mach-types.h> |
@@ -32,11 +35,64 @@ | |||
32 | #include <asm/page.h> | 35 | #include <asm/page.h> |
33 | #include <asm/setup.h> | 36 | #include <asm/setup.h> |
34 | #include <mach/board-mx31lite.h> | 37 | #include <mach/board-mx31lite.h> |
38 | #include <mach/imx-uart.h> | ||
39 | #include <mach/iomux-mx3.h> | ||
40 | #include <mach/irqs.h> | ||
41 | #include <mach/mxc_nand.h> | ||
42 | #include "devices.h" | ||
35 | 43 | ||
36 | /* | 44 | /* |
37 | * This file contains the board-specific initialization routines. | 45 | * This file contains the board-specific initialization routines. |
38 | */ | 46 | */ |
39 | 47 | ||
48 | static unsigned int mx31lite_pins[] = { | ||
49 | /* UART1 */ | ||
50 | MX31_PIN_CTS1__CTS1, | ||
51 | MX31_PIN_RTS1__RTS1, | ||
52 | MX31_PIN_TXD1__TXD1, | ||
53 | MX31_PIN_RXD1__RXD1, | ||
54 | /* LAN9117 IRQ pin */ | ||
55 | IOMUX_MODE(MX31_PIN_SFS6, IOMUX_CONFIG_GPIO), | ||
56 | }; | ||
57 | |||
58 | static struct imxuart_platform_data uart_pdata = { | ||
59 | .flags = IMXUART_HAVE_RTSCTS, | ||
60 | }; | ||
61 | |||
62 | static struct mxc_nand_platform_data mx31lite_nand_board_info = { | ||
63 | .width = 1, | ||
64 | .hw_ecc = 1, | ||
65 | }; | ||
66 | |||
67 | static struct smsc911x_platform_config smsc911x_config = { | ||
68 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, | ||
69 | .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, | ||
70 | .flags = SMSC911X_USE_16BIT, | ||
71 | }; | ||
72 | |||
73 | static struct resource smsc911x_resources[] = { | ||
74 | [0] = { | ||
75 | .start = CS4_BASE_ADDR, | ||
76 | .end = CS4_BASE_ADDR + 0x100, | ||
77 | .flags = IORESOURCE_MEM, | ||
78 | }, | ||
79 | [1] = { | ||
80 | .start = IOMUX_TO_IRQ(MX31_PIN_SFS6), | ||
81 | .end = IOMUX_TO_IRQ(MX31_PIN_SFS6), | ||
82 | .flags = IORESOURCE_IRQ, | ||
83 | }, | ||
84 | }; | ||
85 | |||
86 | static struct platform_device smsc911x_device = { | ||
87 | .name = "smsc911x", | ||
88 | .id = -1, | ||
89 | .num_resources = ARRAY_SIZE(smsc911x_resources), | ||
90 | .resource = smsc911x_resources, | ||
91 | .dev = { | ||
92 | .platform_data = &smsc911x_config, | ||
93 | }, | ||
94 | }; | ||
95 | |||
40 | /* | 96 | /* |
41 | * This structure defines the MX31 memory map. | 97 | * This structure defines the MX31 memory map. |
42 | */ | 98 | */ |
@@ -59,7 +115,7 @@ static struct map_desc mx31lite_io_desc[] __initdata = { | |||
59 | */ | 115 | */ |
60 | void __init mx31lite_map_io(void) | 116 | void __init mx31lite_map_io(void) |
61 | { | 117 | { |
62 | mxc_map_io(); | 118 | mx31_map_io(); |
63 | iotable_init(mx31lite_io_desc, ARRAY_SIZE(mx31lite_io_desc)); | 119 | iotable_init(mx31lite_io_desc, ARRAY_SIZE(mx31lite_io_desc)); |
64 | } | 120 | } |
65 | 121 | ||
@@ -68,6 +124,22 @@ void __init mx31lite_map_io(void) | |||
68 | */ | 124 | */ |
69 | static void __init mxc_board_init(void) | 125 | static void __init mxc_board_init(void) |
70 | { | 126 | { |
127 | int ret; | ||
128 | |||
129 | mxc_iomux_setup_multiple_pins(mx31lite_pins, ARRAY_SIZE(mx31lite_pins), | ||
130 | "mx31lite"); | ||
131 | |||
132 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | ||
133 | mxc_register_device(&mxc_nand_device, &mx31lite_nand_board_info); | ||
134 | |||
135 | /* SMSC9117 IRQ pin */ | ||
136 | ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_SFS6), "sms9117-irq"); | ||
137 | if (ret) | ||
138 | pr_warning("could not get LAN irq gpio\n"); | ||
139 | else { | ||
140 | gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_SFS6)); | ||
141 | platform_device_register(&smsc911x_device); | ||
142 | } | ||
71 | } | 143 | } |
72 | 144 | ||
73 | static void __init mx31lite_timer_init(void) | 145 | static void __init mx31lite_timer_init(void) |
diff --git a/arch/arm/mach-mx3/mx31moboard-devboard.c b/arch/arm/mach-mx3/mx31moboard-devboard.c index d080b4add79c..4704405165a1 100644 --- a/arch/arm/mach-mx3/mx31moboard-devboard.c +++ b/arch/arm/mach-mx3/mx31moboard-devboard.c | |||
@@ -16,33 +16,142 @@ | |||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/types.h> | 19 | #include <linux/fsl_devices.h> |
20 | #include <linux/gpio.h> | ||
20 | #include <linux/init.h> | 21 | #include <linux/init.h> |
21 | 22 | #include <linux/interrupt.h> | |
22 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
24 | #include <linux/types.h> | ||
23 | 25 | ||
24 | #include <mach/hardware.h> | ||
25 | #include <mach/common.h> | 26 | #include <mach/common.h> |
26 | #include <mach/imx-uart.h> | 27 | #include <mach/imx-uart.h> |
27 | #include <mach/iomux-mx3.h> | 28 | #include <mach/iomux-mx3.h> |
29 | #include <mach/hardware.h> | ||
30 | #include <mach/mmc.h> | ||
28 | 31 | ||
29 | #include "devices.h" | 32 | #include "devices.h" |
30 | 33 | ||
34 | static unsigned int devboard_pins[] = { | ||
35 | /* UART1 */ | ||
36 | MX31_PIN_CTS2__CTS2, MX31_PIN_RTS2__RTS2, | ||
37 | MX31_PIN_TXD2__TXD2, MX31_PIN_RXD2__RXD2, | ||
38 | /* SDHC2 */ | ||
39 | MX31_PIN_PC_PWRON__SD2_DATA3, MX31_PIN_PC_VS1__SD2_DATA2, | ||
40 | MX31_PIN_PC_READY__SD2_DATA1, MX31_PIN_PC_WAIT_B__SD2_DATA0, | ||
41 | MX31_PIN_PC_CD2_B__SD2_CLK, MX31_PIN_PC_CD1_B__SD2_CMD, | ||
42 | MX31_PIN_ATA_DIOR__GPIO3_28, MX31_PIN_ATA_DIOW__GPIO3_29, | ||
43 | /* USB OTG */ | ||
44 | MX31_PIN_USBOTG_DATA0__USBOTG_DATA0, | ||
45 | MX31_PIN_USBOTG_DATA1__USBOTG_DATA1, | ||
46 | MX31_PIN_USBOTG_DATA2__USBOTG_DATA2, | ||
47 | MX31_PIN_USBOTG_DATA3__USBOTG_DATA3, | ||
48 | MX31_PIN_USBOTG_DATA4__USBOTG_DATA4, | ||
49 | MX31_PIN_USBOTG_DATA5__USBOTG_DATA5, | ||
50 | MX31_PIN_USBOTG_DATA6__USBOTG_DATA6, | ||
51 | MX31_PIN_USBOTG_DATA7__USBOTG_DATA7, | ||
52 | MX31_PIN_USBOTG_CLK__USBOTG_CLK, MX31_PIN_USBOTG_DIR__USBOTG_DIR, | ||
53 | MX31_PIN_USBOTG_NXT__USBOTG_NXT, MX31_PIN_USBOTG_STP__USBOTG_STP, | ||
54 | MX31_PIN_USB_OC__GPIO1_30, | ||
55 | }; | ||
56 | |||
31 | static struct imxuart_platform_data uart_pdata = { | 57 | static struct imxuart_platform_data uart_pdata = { |
32 | .flags = IMXUART_HAVE_RTSCTS, | 58 | .flags = IMXUART_HAVE_RTSCTS, |
33 | }; | 59 | }; |
34 | 60 | ||
35 | static int mxc_uart1_pins[] = { | 61 | #define SDHC2_CD IOMUX_TO_GPIO(MX31_PIN_ATA_DIOR) |
36 | MX31_PIN_CTS2__CTS2, MX31_PIN_RTS2__RTS2, | 62 | #define SDHC2_WP IOMUX_TO_GPIO(MX31_PIN_ATA_DIOW) |
37 | MX31_PIN_TXD2__TXD2, MX31_PIN_RXD2__RXD2, | 63 | |
64 | static int devboard_sdhc2_get_ro(struct device *dev) | ||
65 | { | ||
66 | return gpio_get_value(SDHC2_WP); | ||
67 | } | ||
68 | |||
69 | static int devboard_sdhc2_init(struct device *dev, irq_handler_t detect_irq, | ||
70 | void *data) | ||
71 | { | ||
72 | int ret; | ||
73 | |||
74 | ret = gpio_request(SDHC2_CD, "sdhc-detect"); | ||
75 | if (ret) | ||
76 | return ret; | ||
77 | |||
78 | gpio_direction_input(SDHC2_CD); | ||
79 | |||
80 | ret = gpio_request(SDHC2_WP, "sdhc-wp"); | ||
81 | if (ret) | ||
82 | goto err_gpio_free; | ||
83 | gpio_direction_input(SDHC2_WP); | ||
84 | |||
85 | ret = request_irq(gpio_to_irq(SDHC2_CD), detect_irq, | ||
86 | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, | ||
87 | "sdhc2-card-detect", data); | ||
88 | if (ret) | ||
89 | goto err_gpio_free_2; | ||
90 | |||
91 | return 0; | ||
92 | |||
93 | err_gpio_free_2: | ||
94 | gpio_free(SDHC2_WP); | ||
95 | err_gpio_free: | ||
96 | gpio_free(SDHC2_CD); | ||
97 | |||
98 | return ret; | ||
99 | } | ||
100 | |||
101 | static void devboard_sdhc2_exit(struct device *dev, void *data) | ||
102 | { | ||
103 | free_irq(gpio_to_irq(SDHC2_CD), data); | ||
104 | gpio_free(SDHC2_WP); | ||
105 | gpio_free(SDHC2_CD); | ||
106 | } | ||
107 | |||
108 | static struct imxmmc_platform_data sdhc2_pdata = { | ||
109 | .get_ro = devboard_sdhc2_get_ro, | ||
110 | .init = devboard_sdhc2_init, | ||
111 | .exit = devboard_sdhc2_exit, | ||
112 | }; | ||
113 | |||
114 | static struct fsl_usb2_platform_data usb_pdata = { | ||
115 | .operating_mode = FSL_USB2_DR_DEVICE, | ||
116 | .phy_mode = FSL_USB2_PHY_ULPI, | ||
38 | }; | 117 | }; |
39 | 118 | ||
119 | #define OTG_PAD_CFG (PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST) | ||
120 | #define OTG_EN_B IOMUX_TO_GPIO(MX31_PIN_USB_OC) | ||
121 | |||
122 | static void devboard_usbotg_init(void) | ||
123 | { | ||
124 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA0, OTG_PAD_CFG); | ||
125 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA1, OTG_PAD_CFG); | ||
126 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA2, OTG_PAD_CFG); | ||
127 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA3, OTG_PAD_CFG); | ||
128 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA4, OTG_PAD_CFG); | ||
129 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA5, OTG_PAD_CFG); | ||
130 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA6, OTG_PAD_CFG); | ||
131 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA7, OTG_PAD_CFG); | ||
132 | mxc_iomux_set_pad(MX31_PIN_USBOTG_CLK, OTG_PAD_CFG); | ||
133 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DIR, OTG_PAD_CFG); | ||
134 | mxc_iomux_set_pad(MX31_PIN_USBOTG_NXT, OTG_PAD_CFG); | ||
135 | mxc_iomux_set_pad(MX31_PIN_USBOTG_STP, OTG_PAD_CFG); | ||
136 | |||
137 | gpio_request(OTG_EN_B, "usb-udc-en"); | ||
138 | gpio_direction_output(OTG_EN_B, 0); | ||
139 | } | ||
140 | |||
40 | /* | 141 | /* |
41 | * system init for baseboard usage. Will be called by mx31moboard init. | 142 | * system init for baseboard usage. Will be called by mx31moboard init. |
42 | */ | 143 | */ |
43 | void __init mx31moboard_devboard_init(void) | 144 | void __init mx31moboard_devboard_init(void) |
44 | { | 145 | { |
45 | printk(KERN_INFO "Initializing mx31devboard peripherals\n"); | 146 | printk(KERN_INFO "Initializing mx31devboard peripherals\n"); |
46 | mxc_iomux_setup_multiple_pins(mxc_uart1_pins, ARRAY_SIZE(mxc_uart1_pins), "uart1"); | 147 | |
148 | mxc_iomux_setup_multiple_pins(devboard_pins, ARRAY_SIZE(devboard_pins), | ||
149 | "devboard"); | ||
150 | |||
47 | mxc_register_device(&mxc_uart_device1, &uart_pdata); | 151 | mxc_register_device(&mxc_uart_device1, &uart_pdata); |
152 | |||
153 | mxc_register_device(&mxcsdhc_device1, &sdhc2_pdata); | ||
154 | |||
155 | devboard_usbotg_init(); | ||
156 | mxc_register_device(&mxc_otg_udc_device, &usb_pdata); | ||
48 | } | 157 | } |
diff --git a/arch/arm/mach-mx3/mx31moboard-marxbot.c b/arch/arm/mach-mx3/mx31moboard-marxbot.c index 9ef9566823fb..641c3d6153ae 100644 --- a/arch/arm/mach-mx3/mx31moboard-marxbot.c +++ b/arch/arm/mach-mx3/mx31moboard-marxbot.c | |||
@@ -16,22 +16,144 @@ | |||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/types.h> | 19 | #include <linux/fsl_devices.h> |
20 | #include <linux/gpio.h> | ||
20 | #include <linux/init.h> | 21 | #include <linux/init.h> |
21 | 22 | #include <linux/interrupt.h> | |
22 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
24 | #include <linux/types.h> | ||
23 | 25 | ||
24 | #include <mach/hardware.h> | ||
25 | #include <mach/common.h> | 26 | #include <mach/common.h> |
27 | #include <mach/hardware.h> | ||
26 | #include <mach/imx-uart.h> | 28 | #include <mach/imx-uart.h> |
27 | #include <mach/iomux-mx3.h> | 29 | #include <mach/iomux-mx3.h> |
30 | #include <mach/mmc.h> | ||
28 | 31 | ||
29 | #include "devices.h" | 32 | #include "devices.h" |
30 | 33 | ||
34 | static unsigned int marxbot_pins[] = { | ||
35 | /* SDHC2 */ | ||
36 | MX31_PIN_PC_PWRON__SD2_DATA3, MX31_PIN_PC_VS1__SD2_DATA2, | ||
37 | MX31_PIN_PC_READY__SD2_DATA1, MX31_PIN_PC_WAIT_B__SD2_DATA0, | ||
38 | MX31_PIN_PC_CD2_B__SD2_CLK, MX31_PIN_PC_CD1_B__SD2_CMD, | ||
39 | MX31_PIN_ATA_DIOR__GPIO3_28, MX31_PIN_ATA_DIOW__GPIO3_29, | ||
40 | /* CSI */ | ||
41 | MX31_PIN_CSI_D4__CSI_D4, MX31_PIN_CSI_D5__CSI_D5, | ||
42 | MX31_PIN_CSI_D6__CSI_D6, MX31_PIN_CSI_D7__CSI_D7, | ||
43 | MX31_PIN_CSI_D8__CSI_D8, MX31_PIN_CSI_D9__CSI_D9, | ||
44 | MX31_PIN_CSI_D10__CSI_D10, MX31_PIN_CSI_D11__CSI_D11, | ||
45 | MX31_PIN_CSI_D12__CSI_D12, MX31_PIN_CSI_D13__CSI_D13, | ||
46 | MX31_PIN_CSI_D14__CSI_D14, MX31_PIN_CSI_D15__CSI_D15, | ||
47 | MX31_PIN_CSI_HSYNC__CSI_HSYNC, MX31_PIN_CSI_MCLK__CSI_MCLK, | ||
48 | MX31_PIN_CSI_PIXCLK__CSI_PIXCLK, MX31_PIN_CSI_VSYNC__CSI_VSYNC, | ||
49 | MX31_PIN_GPIO3_0__GPIO3_0, MX31_PIN_GPIO3_1__GPIO3_1, | ||
50 | MX31_PIN_TXD2__GPIO1_28, | ||
51 | /* USB OTG */ | ||
52 | MX31_PIN_USBOTG_DATA0__USBOTG_DATA0, | ||
53 | MX31_PIN_USBOTG_DATA1__USBOTG_DATA1, | ||
54 | MX31_PIN_USBOTG_DATA2__USBOTG_DATA2, | ||
55 | MX31_PIN_USBOTG_DATA3__USBOTG_DATA3, | ||
56 | MX31_PIN_USBOTG_DATA4__USBOTG_DATA4, | ||
57 | MX31_PIN_USBOTG_DATA5__USBOTG_DATA5, | ||
58 | MX31_PIN_USBOTG_DATA6__USBOTG_DATA6, | ||
59 | MX31_PIN_USBOTG_DATA7__USBOTG_DATA7, | ||
60 | MX31_PIN_USBOTG_CLK__USBOTG_CLK, MX31_PIN_USBOTG_DIR__USBOTG_DIR, | ||
61 | MX31_PIN_USBOTG_NXT__USBOTG_NXT, MX31_PIN_USBOTG_STP__USBOTG_STP, | ||
62 | MX31_PIN_USB_OC__GPIO1_30, | ||
63 | }; | ||
64 | |||
65 | #define SDHC2_CD IOMUX_TO_GPIO(MX31_PIN_ATA_DIOR) | ||
66 | #define SDHC2_WP IOMUX_TO_GPIO(MX31_PIN_ATA_DIOW) | ||
67 | |||
68 | static int marxbot_sdhc2_get_ro(struct device *dev) | ||
69 | { | ||
70 | return gpio_get_value(SDHC2_WP); | ||
71 | } | ||
72 | |||
73 | static int marxbot_sdhc2_init(struct device *dev, irq_handler_t detect_irq, | ||
74 | void *data) | ||
75 | { | ||
76 | int ret; | ||
77 | |||
78 | ret = gpio_request(SDHC2_CD, "sdhc-detect"); | ||
79 | if (ret) | ||
80 | return ret; | ||
81 | |||
82 | gpio_direction_input(SDHC2_CD); | ||
83 | |||
84 | ret = gpio_request(SDHC2_WP, "sdhc-wp"); | ||
85 | if (ret) | ||
86 | goto err_gpio_free; | ||
87 | gpio_direction_input(SDHC2_WP); | ||
88 | |||
89 | ret = request_irq(gpio_to_irq(SDHC2_CD), detect_irq, | ||
90 | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, | ||
91 | "sdhc2-card-detect", data); | ||
92 | if (ret) | ||
93 | goto err_gpio_free_2; | ||
94 | |||
95 | return 0; | ||
96 | |||
97 | err_gpio_free_2: | ||
98 | gpio_free(SDHC2_WP); | ||
99 | err_gpio_free: | ||
100 | gpio_free(SDHC2_CD); | ||
101 | |||
102 | return ret; | ||
103 | } | ||
104 | |||
105 | static void marxbot_sdhc2_exit(struct device *dev, void *data) | ||
106 | { | ||
107 | free_irq(gpio_to_irq(SDHC2_CD), data); | ||
108 | gpio_free(SDHC2_WP); | ||
109 | gpio_free(SDHC2_CD); | ||
110 | } | ||
111 | |||
112 | static struct imxmmc_platform_data sdhc2_pdata = { | ||
113 | .get_ro = marxbot_sdhc2_get_ro, | ||
114 | .init = marxbot_sdhc2_init, | ||
115 | .exit = marxbot_sdhc2_exit, | ||
116 | }; | ||
117 | |||
118 | static struct fsl_usb2_platform_data usb_pdata = { | ||
119 | .operating_mode = FSL_USB2_DR_DEVICE, | ||
120 | .phy_mode = FSL_USB2_PHY_ULPI, | ||
121 | }; | ||
122 | |||
123 | #define OTG_PAD_CFG (PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST) | ||
124 | #define OTG_EN_B IOMUX_TO_GPIO(MX31_PIN_USB_OC) | ||
125 | |||
126 | static void marxbot_usbotg_init(void) | ||
127 | { | ||
128 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA0, OTG_PAD_CFG); | ||
129 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA1, OTG_PAD_CFG); | ||
130 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA2, OTG_PAD_CFG); | ||
131 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA3, OTG_PAD_CFG); | ||
132 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA4, OTG_PAD_CFG); | ||
133 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA5, OTG_PAD_CFG); | ||
134 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA6, OTG_PAD_CFG); | ||
135 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA7, OTG_PAD_CFG); | ||
136 | mxc_iomux_set_pad(MX31_PIN_USBOTG_CLK, OTG_PAD_CFG); | ||
137 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DIR, OTG_PAD_CFG); | ||
138 | mxc_iomux_set_pad(MX31_PIN_USBOTG_NXT, OTG_PAD_CFG); | ||
139 | mxc_iomux_set_pad(MX31_PIN_USBOTG_STP, OTG_PAD_CFG); | ||
140 | |||
141 | gpio_request(OTG_EN_B, "usb-udc-en"); | ||
142 | gpio_direction_output(OTG_EN_B, 0); | ||
143 | } | ||
144 | |||
31 | /* | 145 | /* |
32 | * system init for baseboard usage. Will be called by mx31moboard init. | 146 | * system init for baseboard usage. Will be called by mx31moboard init. |
33 | */ | 147 | */ |
34 | void __init mx31moboard_marxbot_init(void) | 148 | void __init mx31moboard_marxbot_init(void) |
35 | { | 149 | { |
36 | printk(KERN_INFO "Initializing mx31marxbot peripherals\n"); | 150 | printk(KERN_INFO "Initializing mx31marxbot peripherals\n"); |
151 | |||
152 | mxc_iomux_setup_multiple_pins(marxbot_pins, ARRAY_SIZE(marxbot_pins), | ||
153 | "marxbot"); | ||
154 | |||
155 | mxc_register_device(&mxcsdhc_device1, &sdhc2_pdata); | ||
156 | |||
157 | marxbot_usbotg_init(); | ||
158 | mxc_register_device(&mxc_otg_udc_device, &usb_pdata); | ||
37 | } | 159 | } |
diff --git a/arch/arm/mach-mx3/mx31moboard.c b/arch/arm/mach-mx3/mx31moboard.c index 34c2a1b99d4f..a17f2e411609 100644 --- a/arch/arm/mach-mx3/mx31moboard.c +++ b/arch/arm/mach-mx3/mx31moboard.c | |||
@@ -16,26 +16,47 @@ | |||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/types.h> | 19 | #include <linux/gpio.h> |
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | 21 | #include <linux/interrupt.h> | |
22 | #include <linux/platform_device.h> | 22 | #include <linux/memory.h> |
23 | #include <linux/mtd/physmap.h> | 23 | #include <linux/mtd/physmap.h> |
24 | #include <linux/mtd/partitions.h> | 24 | #include <linux/mtd/partitions.h> |
25 | #include <linux/memory.h> | 25 | #include <linux/platform_device.h> |
26 | #include <linux/types.h> | ||
26 | 27 | ||
27 | #include <mach/hardware.h> | ||
28 | #include <asm/mach-types.h> | 28 | #include <asm/mach-types.h> |
29 | #include <asm/mach/arch.h> | 29 | #include <asm/mach/arch.h> |
30 | #include <asm/mach/time.h> | 30 | #include <asm/mach/time.h> |
31 | #include <asm/mach/map.h> | 31 | #include <asm/mach/map.h> |
32 | #include <mach/board-mx31moboard.h> | ||
32 | #include <mach/common.h> | 33 | #include <mach/common.h> |
34 | #include <mach/hardware.h> | ||
33 | #include <mach/imx-uart.h> | 35 | #include <mach/imx-uart.h> |
34 | #include <mach/iomux-mx3.h> | 36 | #include <mach/iomux-mx3.h> |
35 | #include <mach/board-mx31moboard.h> | 37 | #include <mach/i2c.h> |
38 | #include <mach/mmc.h> | ||
36 | 39 | ||
37 | #include "devices.h" | 40 | #include "devices.h" |
38 | 41 | ||
42 | static unsigned int moboard_pins[] = { | ||
43 | /* UART0 */ | ||
44 | MX31_PIN_CTS1__CTS1, MX31_PIN_RTS1__RTS1, | ||
45 | MX31_PIN_TXD1__TXD1, MX31_PIN_RXD1__RXD1, | ||
46 | /* UART4 */ | ||
47 | MX31_PIN_PC_RST__CTS5, MX31_PIN_PC_VS2__RTS5, | ||
48 | MX31_PIN_PC_BVD2__TXD5, MX31_PIN_PC_BVD1__RXD5, | ||
49 | /* I2C0 */ | ||
50 | MX31_PIN_I2C_DAT__I2C1_SDA, MX31_PIN_I2C_CLK__I2C1_SCL, | ||
51 | /* I2C1 */ | ||
52 | MX31_PIN_DCD_DTE1__I2C2_SDA, MX31_PIN_RI_DTE1__I2C2_SCL, | ||
53 | /* SDHC1 */ | ||
54 | MX31_PIN_SD1_DATA3__SD1_DATA3, MX31_PIN_SD1_DATA2__SD1_DATA2, | ||
55 | MX31_PIN_SD1_DATA1__SD1_DATA1, MX31_PIN_SD1_DATA0__SD1_DATA0, | ||
56 | MX31_PIN_SD1_CLK__SD1_CLK, MX31_PIN_SD1_CMD__SD1_CMD, | ||
57 | MX31_PIN_ATA_CS0__GPIO3_26, MX31_PIN_ATA_CS1__GPIO3_27, | ||
58 | }; | ||
59 | |||
39 | static struct physmap_flash_data mx31moboard_flash_data = { | 60 | static struct physmap_flash_data mx31moboard_flash_data = { |
40 | .width = 2, | 61 | .width = 2, |
41 | }; | 62 | }; |
@@ -60,17 +81,69 @@ static struct imxuart_platform_data uart_pdata = { | |||
60 | .flags = IMXUART_HAVE_RTSCTS, | 81 | .flags = IMXUART_HAVE_RTSCTS, |
61 | }; | 82 | }; |
62 | 83 | ||
63 | static struct platform_device *devices[] __initdata = { | 84 | static struct imxi2c_platform_data moboard_i2c0_pdata = { |
64 | &mx31moboard_flash, | 85 | .bitrate = 400000, |
65 | }; | 86 | }; |
66 | 87 | ||
67 | static int mxc_uart0_pins[] = { | 88 | static struct imxi2c_platform_data moboard_i2c1_pdata = { |
68 | MX31_PIN_CTS1__CTS1, MX31_PIN_RTS1__RTS1, | 89 | .bitrate = 100000, |
69 | MX31_PIN_TXD1__TXD1, MX31_PIN_RXD1__RXD1, | ||
70 | }; | 90 | }; |
71 | static int mxc_uart4_pins[] = { | 91 | |
72 | MX31_PIN_PC_RST__CTS5, MX31_PIN_PC_VS2__RTS5, | 92 | #define SDHC1_CD IOMUX_TO_GPIO(MX31_PIN_ATA_CS0) |
73 | MX31_PIN_PC_BVD2__TXD5, MX31_PIN_PC_BVD1__RXD5, | 93 | #define SDHC1_WP IOMUX_TO_GPIO(MX31_PIN_ATA_CS1) |
94 | |||
95 | static int moboard_sdhc1_get_ro(struct device *dev) | ||
96 | { | ||
97 | return gpio_get_value(SDHC1_WP); | ||
98 | } | ||
99 | |||
100 | static int moboard_sdhc1_init(struct device *dev, irq_handler_t detect_irq, | ||
101 | void *data) | ||
102 | { | ||
103 | int ret; | ||
104 | |||
105 | ret = gpio_request(SDHC1_CD, "sdhc-detect"); | ||
106 | if (ret) | ||
107 | return ret; | ||
108 | |||
109 | gpio_direction_input(SDHC1_CD); | ||
110 | |||
111 | ret = gpio_request(SDHC1_WP, "sdhc-wp"); | ||
112 | if (ret) | ||
113 | goto err_gpio_free; | ||
114 | gpio_direction_input(SDHC1_WP); | ||
115 | |||
116 | ret = request_irq(gpio_to_irq(SDHC1_CD), detect_irq, | ||
117 | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, | ||
118 | "sdhc1-card-detect", data); | ||
119 | if (ret) | ||
120 | goto err_gpio_free_2; | ||
121 | |||
122 | return 0; | ||
123 | |||
124 | err_gpio_free_2: | ||
125 | gpio_free(SDHC1_WP); | ||
126 | err_gpio_free: | ||
127 | gpio_free(SDHC1_CD); | ||
128 | |||
129 | return ret; | ||
130 | } | ||
131 | |||
132 | static void moboard_sdhc1_exit(struct device *dev, void *data) | ||
133 | { | ||
134 | free_irq(gpio_to_irq(SDHC1_CD), data); | ||
135 | gpio_free(SDHC1_WP); | ||
136 | gpio_free(SDHC1_CD); | ||
137 | } | ||
138 | |||
139 | static struct imxmmc_platform_data sdhc1_pdata = { | ||
140 | .get_ro = moboard_sdhc1_get_ro, | ||
141 | .init = moboard_sdhc1_init, | ||
142 | .exit = moboard_sdhc1_exit, | ||
143 | }; | ||
144 | |||
145 | static struct platform_device *devices[] __initdata = { | ||
146 | &mx31moboard_flash, | ||
74 | }; | 147 | }; |
75 | 148 | ||
76 | static int mx31moboard_baseboard; | 149 | static int mx31moboard_baseboard; |
@@ -81,14 +154,19 @@ core_param(mx31moboard_baseboard, mx31moboard_baseboard, int, 0444); | |||
81 | */ | 154 | */ |
82 | static void __init mxc_board_init(void) | 155 | static void __init mxc_board_init(void) |
83 | { | 156 | { |
157 | mxc_iomux_setup_multiple_pins(moboard_pins, ARRAY_SIZE(moboard_pins), | ||
158 | "moboard"); | ||
159 | |||
84 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 160 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
85 | 161 | ||
86 | mxc_iomux_setup_multiple_pins(mxc_uart0_pins, ARRAY_SIZE(mxc_uart0_pins), "uart0"); | ||
87 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 162 | mxc_register_device(&mxc_uart_device0, &uart_pdata); |
88 | |||
89 | mxc_iomux_setup_multiple_pins(mxc_uart4_pins, ARRAY_SIZE(mxc_uart4_pins), "uart4"); | ||
90 | mxc_register_device(&mxc_uart_device4, &uart_pdata); | 163 | mxc_register_device(&mxc_uart_device4, &uart_pdata); |
91 | 164 | ||
165 | mxc_register_device(&mxc_i2c_device0, &moboard_i2c0_pdata); | ||
166 | mxc_register_device(&mxc_i2c_device1, &moboard_i2c1_pdata); | ||
167 | |||
168 | mxc_register_device(&mxcsdhc_device0, &sdhc1_pdata); | ||
169 | |||
92 | switch (mx31moboard_baseboard) { | 170 | switch (mx31moboard_baseboard) { |
93 | case MX31NOBOARD: | 171 | case MX31NOBOARD: |
94 | break; | 172 | break; |
@@ -99,7 +177,8 @@ static void __init mxc_board_init(void) | |||
99 | mx31moboard_marxbot_init(); | 177 | mx31moboard_marxbot_init(); |
100 | break; | 178 | break; |
101 | default: | 179 | default: |
102 | printk(KERN_ERR "Illegal mx31moboard_baseboard type %d\n", mx31moboard_baseboard); | 180 | printk(KERN_ERR "Illegal mx31moboard_baseboard type %d\n", |
181 | mx31moboard_baseboard); | ||
103 | } | 182 | } |
104 | } | 183 | } |
105 | 184 | ||
@@ -117,7 +196,7 @@ MACHINE_START(MX31MOBOARD, "EPFL Mobots mx31moboard") | |||
117 | .phys_io = AIPS1_BASE_ADDR, | 196 | .phys_io = AIPS1_BASE_ADDR, |
118 | .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, | 197 | .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, |
119 | .boot_params = PHYS_OFFSET + 0x100, | 198 | .boot_params = PHYS_OFFSET + 0x100, |
120 | .map_io = mxc_map_io, | 199 | .map_io = mx31_map_io, |
121 | .init_irq = mxc_init_irq, | 200 | .init_irq = mxc_init_irq, |
122 | .init_machine = mxc_board_init, | 201 | .init_machine = mxc_board_init, |
123 | .timer = &mx31moboard_timer, | 202 | .timer = &mx31moboard_timer, |
diff --git a/arch/arm/mach-mx3/mx31pdk.c b/arch/arm/mach-mx3/mx31pdk.c index bc63f1785691..32599e507534 100644 --- a/arch/arm/mach-mx3/mx31pdk.c +++ b/arch/arm/mach-mx3/mx31pdk.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/clk.h> | 21 | #include <linux/clk.h> |
22 | #include <linux/irq.h> | 22 | #include <linux/irq.h> |
23 | #include <linux/gpio.h> | ||
23 | 24 | ||
24 | #include <mach/hardware.h> | 25 | #include <mach/hardware.h> |
25 | #include <asm/mach-types.h> | 26 | #include <asm/mach-types.h> |
@@ -41,21 +42,159 @@ | |||
41 | * @ingroup System | 42 | * @ingroup System |
42 | */ | 43 | */ |
43 | 44 | ||
45 | static int mx31pdk_pins[] = { | ||
46 | /* UART1 */ | ||
47 | MX31_PIN_CTS1__CTS1, | ||
48 | MX31_PIN_RTS1__RTS1, | ||
49 | MX31_PIN_TXD1__TXD1, | ||
50 | MX31_PIN_RXD1__RXD1, | ||
51 | IOMUX_MODE(MX31_PIN_GPIO1_1, IOMUX_CONFIG_GPIO), | ||
52 | }; | ||
53 | |||
44 | static struct imxuart_platform_data uart_pdata = { | 54 | static struct imxuart_platform_data uart_pdata = { |
45 | .flags = IMXUART_HAVE_RTSCTS, | 55 | .flags = IMXUART_HAVE_RTSCTS, |
46 | }; | 56 | }; |
47 | 57 | ||
48 | static int uart_pins[] = { | 58 | /* |
49 | MX31_PIN_CTS1__CTS1, | 59 | * Routines for the CPLD on the debug board. It contains a CPLD handling |
50 | MX31_PIN_RTS1__RTS1, | 60 | * LEDs, switches, interrupts for Ethernet. |
51 | MX31_PIN_TXD1__TXD1, | 61 | */ |
52 | MX31_PIN_RXD1__RXD1 | 62 | |
63 | static void mx31pdk_expio_irq_handler(uint32_t irq, struct irq_desc *desc) | ||
64 | { | ||
65 | uint32_t imr_val; | ||
66 | uint32_t int_valid; | ||
67 | uint32_t expio_irq; | ||
68 | |||
69 | imr_val = __raw_readw(CPLD_INT_MASK_REG); | ||
70 | int_valid = __raw_readw(CPLD_INT_STATUS_REG) & ~imr_val; | ||
71 | |||
72 | expio_irq = MXC_EXP_IO_BASE; | ||
73 | for (; int_valid != 0; int_valid >>= 1, expio_irq++) { | ||
74 | if ((int_valid & 1) == 0) | ||
75 | continue; | ||
76 | generic_handle_irq(expio_irq); | ||
77 | } | ||
78 | } | ||
79 | |||
80 | /* | ||
81 | * Disable an expio pin's interrupt by setting the bit in the imr. | ||
82 | * @param irq an expio virtual irq number | ||
83 | */ | ||
84 | static void expio_mask_irq(uint32_t irq) | ||
85 | { | ||
86 | uint16_t reg; | ||
87 | uint32_t expio = MXC_IRQ_TO_EXPIO(irq); | ||
88 | |||
89 | /* mask the interrupt */ | ||
90 | reg = __raw_readw(CPLD_INT_MASK_REG); | ||
91 | reg |= 1 << expio; | ||
92 | __raw_writew(reg, CPLD_INT_MASK_REG); | ||
93 | } | ||
94 | |||
95 | /* | ||
96 | * Acknowledge an expanded io pin's interrupt by clearing the bit in the isr. | ||
97 | * @param irq an expanded io virtual irq number | ||
98 | */ | ||
99 | static void expio_ack_irq(uint32_t irq) | ||
100 | { | ||
101 | uint32_t expio = MXC_IRQ_TO_EXPIO(irq); | ||
102 | |||
103 | /* clear the interrupt status */ | ||
104 | __raw_writew(1 << expio, CPLD_INT_RESET_REG); | ||
105 | __raw_writew(0, CPLD_INT_RESET_REG); | ||
106 | /* mask the interrupt */ | ||
107 | expio_mask_irq(irq); | ||
108 | } | ||
109 | |||
110 | /* | ||
111 | * Enable a expio pin's interrupt by clearing the bit in the imr. | ||
112 | * @param irq a expio virtual irq number | ||
113 | */ | ||
114 | static void expio_unmask_irq(uint32_t irq) | ||
115 | { | ||
116 | uint16_t reg; | ||
117 | uint32_t expio = MXC_IRQ_TO_EXPIO(irq); | ||
118 | |||
119 | /* unmask the interrupt */ | ||
120 | reg = __raw_readw(CPLD_INT_MASK_REG); | ||
121 | reg &= ~(1 << expio); | ||
122 | __raw_writew(reg, CPLD_INT_MASK_REG); | ||
123 | } | ||
124 | |||
125 | static struct irq_chip expio_irq_chip = { | ||
126 | .ack = expio_ack_irq, | ||
127 | .mask = expio_mask_irq, | ||
128 | .unmask = expio_unmask_irq, | ||
53 | }; | 129 | }; |
54 | 130 | ||
55 | static inline void mxc_init_imx_uart(void) | 131 | static int __init mx31pdk_init_expio(void) |
56 | { | 132 | { |
57 | mxc_iomux_setup_multiple_pins(uart_pins, ARRAY_SIZE(uart_pins), "uart-0"); | 133 | int i; |
58 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 134 | int ret; |
135 | |||
136 | /* Check if there's a debug board connected */ | ||
137 | if ((__raw_readw(CPLD_MAGIC_NUMBER1_REG) != 0xAAAA) || | ||
138 | (__raw_readw(CPLD_MAGIC_NUMBER2_REG) != 0x5555) || | ||
139 | (__raw_readw(CPLD_MAGIC_NUMBER3_REG) != 0xCAFE)) { | ||
140 | /* No Debug board found */ | ||
141 | return -ENODEV; | ||
142 | } | ||
143 | |||
144 | pr_info("i.MX31PDK Debug board detected, rev = 0x%04X\n", | ||
145 | __raw_readw(CPLD_CODE_VER_REG)); | ||
146 | |||
147 | /* | ||
148 | * Configure INT line as GPIO input | ||
149 | */ | ||
150 | ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_GPIO1_1), "sms9217-irq"); | ||
151 | if (ret) | ||
152 | pr_warning("could not get LAN irq gpio\n"); | ||
153 | else | ||
154 | gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_GPIO1_1)); | ||
155 | |||
156 | /* Disable the interrupts and clear the status */ | ||
157 | __raw_writew(0, CPLD_INT_MASK_REG); | ||
158 | __raw_writew(0xFFFF, CPLD_INT_RESET_REG); | ||
159 | __raw_writew(0, CPLD_INT_RESET_REG); | ||
160 | __raw_writew(0x1F, CPLD_INT_MASK_REG); | ||
161 | for (i = MXC_EXP_IO_BASE; | ||
162 | i < (MXC_EXP_IO_BASE + MXC_MAX_EXP_IO_LINES); | ||
163 | i++) { | ||
164 | set_irq_chip(i, &expio_irq_chip); | ||
165 | set_irq_handler(i, handle_level_irq); | ||
166 | set_irq_flags(i, IRQF_VALID); | ||
167 | } | ||
168 | set_irq_type(EXPIO_PARENT_INT, IRQ_TYPE_LEVEL_LOW); | ||
169 | set_irq_chained_handler(EXPIO_PARENT_INT, mx31pdk_expio_irq_handler); | ||
170 | |||
171 | return 0; | ||
172 | } | ||
173 | |||
174 | /* | ||
175 | * This structure defines the MX31 memory map. | ||
176 | */ | ||
177 | static struct map_desc mx31pdk_io_desc[] __initdata = { | ||
178 | { | ||
179 | .virtual = SPBA0_BASE_ADDR_VIRT, | ||
180 | .pfn = __phys_to_pfn(SPBA0_BASE_ADDR), | ||
181 | .length = SPBA0_SIZE, | ||
182 | .type = MT_DEVICE_NONSHARED, | ||
183 | }, { | ||
184 | .virtual = CS5_BASE_ADDR_VIRT, | ||
185 | .pfn = __phys_to_pfn(CS5_BASE_ADDR), | ||
186 | .length = CS5_SIZE, | ||
187 | .type = MT_DEVICE, | ||
188 | }, | ||
189 | }; | ||
190 | |||
191 | /* | ||
192 | * Set up static virtual mappings. | ||
193 | */ | ||
194 | static void __init mx31pdk_map_io(void) | ||
195 | { | ||
196 | mx31_map_io(); | ||
197 | iotable_init(mx31pdk_io_desc, ARRAY_SIZE(mx31pdk_io_desc)); | ||
59 | } | 198 | } |
60 | 199 | ||
61 | /*! | 200 | /*! |
@@ -63,7 +202,12 @@ static inline void mxc_init_imx_uart(void) | |||
63 | */ | 202 | */ |
64 | static void __init mxc_board_init(void) | 203 | static void __init mxc_board_init(void) |
65 | { | 204 | { |
66 | mxc_init_imx_uart(); | 205 | mxc_iomux_setup_multiple_pins(mx31pdk_pins, ARRAY_SIZE(mx31pdk_pins), |
206 | "mx31pdk"); | ||
207 | |||
208 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | ||
209 | |||
210 | mx31pdk_init_expio(); | ||
67 | } | 211 | } |
68 | 212 | ||
69 | static void __init mx31pdk_timer_init(void) | 213 | static void __init mx31pdk_timer_init(void) |
@@ -84,7 +228,7 @@ MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)") | |||
84 | .phys_io = AIPS1_BASE_ADDR, | 228 | .phys_io = AIPS1_BASE_ADDR, |
85 | .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, | 229 | .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, |
86 | .boot_params = PHYS_OFFSET + 0x100, | 230 | .boot_params = PHYS_OFFSET + 0x100, |
87 | .map_io = mxc_map_io, | 231 | .map_io = mx31pdk_map_io, |
88 | .init_irq = mxc_init_irq, | 232 | .init_irq = mxc_init_irq, |
89 | .init_machine = mxc_board_init, | 233 | .init_machine = mxc_board_init, |
90 | .timer = &mx31pdk_timer, | 234 | .timer = &mx31pdk_timer, |
diff --git a/arch/arm/mach-mx3/pcm037.c b/arch/arm/mach-mx3/pcm037.c index b5227d837b2f..c6f61a1f06c8 100644 --- a/arch/arm/mach-mx3/pcm037.c +++ b/arch/arm/mach-mx3/pcm037.c | |||
@@ -28,6 +28,10 @@ | |||
28 | #include <linux/interrupt.h> | 28 | #include <linux/interrupt.h> |
29 | #include <linux/i2c.h> | 29 | #include <linux/i2c.h> |
30 | #include <linux/i2c/at24.h> | 30 | #include <linux/i2c/at24.h> |
31 | #include <linux/delay.h> | ||
32 | #include <linux/spi/spi.h> | ||
33 | #include <linux/irq.h> | ||
34 | #include <linux/fsl_devices.h> | ||
31 | 35 | ||
32 | #include <mach/hardware.h> | 36 | #include <mach/hardware.h> |
33 | #include <asm/mach-types.h> | 37 | #include <asm/mach-types.h> |
@@ -37,7 +41,9 @@ | |||
37 | #include <mach/common.h> | 41 | #include <mach/common.h> |
38 | #include <mach/imx-uart.h> | 42 | #include <mach/imx-uart.h> |
39 | #include <mach/iomux-mx3.h> | 43 | #include <mach/iomux-mx3.h> |
44 | #include <mach/ipu.h> | ||
40 | #include <mach/board-pcm037.h> | 45 | #include <mach/board-pcm037.h> |
46 | #include <mach/mx3fb.h> | ||
41 | #include <mach/mxc_nand.h> | 47 | #include <mach/mxc_nand.h> |
42 | #include <mach/mmc.h> | 48 | #include <mach/mmc.h> |
43 | #ifdef CONFIG_I2C_IMX | 49 | #ifdef CONFIG_I2C_IMX |
@@ -46,6 +52,76 @@ | |||
46 | 52 | ||
47 | #include "devices.h" | 53 | #include "devices.h" |
48 | 54 | ||
55 | static unsigned int pcm037_pins[] = { | ||
56 | /* I2C */ | ||
57 | MX31_PIN_CSPI2_MOSI__SCL, | ||
58 | MX31_PIN_CSPI2_MISO__SDA, | ||
59 | /* SDHC1 */ | ||
60 | MX31_PIN_SD1_DATA3__SD1_DATA3, | ||
61 | MX31_PIN_SD1_DATA2__SD1_DATA2, | ||
62 | MX31_PIN_SD1_DATA1__SD1_DATA1, | ||
63 | MX31_PIN_SD1_DATA0__SD1_DATA0, | ||
64 | MX31_PIN_SD1_CLK__SD1_CLK, | ||
65 | MX31_PIN_SD1_CMD__SD1_CMD, | ||
66 | IOMUX_MODE(MX31_PIN_SCK6, IOMUX_CONFIG_GPIO), /* card detect */ | ||
67 | IOMUX_MODE(MX31_PIN_SFS6, IOMUX_CONFIG_GPIO), /* write protect */ | ||
68 | /* SPI1 */ | ||
69 | MX31_PIN_CSPI1_MOSI__MOSI, | ||
70 | MX31_PIN_CSPI1_MISO__MISO, | ||
71 | MX31_PIN_CSPI1_SCLK__SCLK, | ||
72 | MX31_PIN_CSPI1_SPI_RDY__SPI_RDY, | ||
73 | MX31_PIN_CSPI1_SS0__SS0, | ||
74 | MX31_PIN_CSPI1_SS1__SS1, | ||
75 | MX31_PIN_CSPI1_SS2__SS2, | ||
76 | /* UART1 */ | ||
77 | MX31_PIN_CTS1__CTS1, | ||
78 | MX31_PIN_RTS1__RTS1, | ||
79 | MX31_PIN_TXD1__TXD1, | ||
80 | MX31_PIN_RXD1__RXD1, | ||
81 | /* UART2 */ | ||
82 | MX31_PIN_TXD2__TXD2, | ||
83 | MX31_PIN_RXD2__RXD2, | ||
84 | MX31_PIN_CTS2__CTS2, | ||
85 | MX31_PIN_RTS2__RTS2, | ||
86 | /* UART3 */ | ||
87 | MX31_PIN_CSPI3_MOSI__RXD3, | ||
88 | MX31_PIN_CSPI3_MISO__TXD3, | ||
89 | MX31_PIN_CSPI3_SCLK__RTS3, | ||
90 | MX31_PIN_CSPI3_SPI_RDY__CTS3, | ||
91 | /* LAN9217 irq pin */ | ||
92 | IOMUX_MODE(MX31_PIN_GPIO3_1, IOMUX_CONFIG_GPIO), | ||
93 | /* Onewire */ | ||
94 | MX31_PIN_BATT_LINE__OWIRE, | ||
95 | /* Framebuffer */ | ||
96 | MX31_PIN_LD0__LD0, | ||
97 | MX31_PIN_LD1__LD1, | ||
98 | MX31_PIN_LD2__LD2, | ||
99 | MX31_PIN_LD3__LD3, | ||
100 | MX31_PIN_LD4__LD4, | ||
101 | MX31_PIN_LD5__LD5, | ||
102 | MX31_PIN_LD6__LD6, | ||
103 | MX31_PIN_LD7__LD7, | ||
104 | MX31_PIN_LD8__LD8, | ||
105 | MX31_PIN_LD9__LD9, | ||
106 | MX31_PIN_LD10__LD10, | ||
107 | MX31_PIN_LD11__LD11, | ||
108 | MX31_PIN_LD12__LD12, | ||
109 | MX31_PIN_LD13__LD13, | ||
110 | MX31_PIN_LD14__LD14, | ||
111 | MX31_PIN_LD15__LD15, | ||
112 | MX31_PIN_LD16__LD16, | ||
113 | MX31_PIN_LD17__LD17, | ||
114 | MX31_PIN_VSYNC3__VSYNC3, | ||
115 | MX31_PIN_HSYNC__HSYNC, | ||
116 | MX31_PIN_FPSHIFT__FPSHIFT, | ||
117 | MX31_PIN_DRDY0__DRDY0, | ||
118 | MX31_PIN_D3_REV__D3_REV, | ||
119 | MX31_PIN_CONTRAST__CONTRAST, | ||
120 | MX31_PIN_D3_SPL__D3_SPL, | ||
121 | MX31_PIN_D3_CLS__D3_CLS, | ||
122 | MX31_PIN_LCS0__GPI03_23, | ||
123 | }; | ||
124 | |||
49 | static struct physmap_flash_data pcm037_flash_data = { | 125 | static struct physmap_flash_data pcm037_flash_data = { |
50 | .width = 2, | 126 | .width = 2, |
51 | }; | 127 | }; |
@@ -56,6 +132,54 @@ static struct resource pcm037_flash_resource = { | |||
56 | .flags = IORESOURCE_MEM, | 132 | .flags = IORESOURCE_MEM, |
57 | }; | 133 | }; |
58 | 134 | ||
135 | static int usbotg_pins[] = { | ||
136 | MX31_PIN_USBOTG_DATA0__USBOTG_DATA0, | ||
137 | MX31_PIN_USBOTG_DATA1__USBOTG_DATA1, | ||
138 | MX31_PIN_USBOTG_DATA2__USBOTG_DATA2, | ||
139 | MX31_PIN_USBOTG_DATA3__USBOTG_DATA3, | ||
140 | MX31_PIN_USBOTG_DATA4__USBOTG_DATA4, | ||
141 | MX31_PIN_USBOTG_DATA5__USBOTG_DATA5, | ||
142 | MX31_PIN_USBOTG_DATA6__USBOTG_DATA6, | ||
143 | MX31_PIN_USBOTG_DATA7__USBOTG_DATA7, | ||
144 | MX31_PIN_USBOTG_CLK__USBOTG_CLK, | ||
145 | MX31_PIN_USBOTG_DIR__USBOTG_DIR, | ||
146 | MX31_PIN_USBOTG_NXT__USBOTG_NXT, | ||
147 | MX31_PIN_USBOTG_STP__USBOTG_STP, | ||
148 | }; | ||
149 | |||
150 | /* USB OTG HS port */ | ||
151 | static int __init gpio_usbotg_hs_activate(void) | ||
152 | { | ||
153 | int ret = mxc_iomux_setup_multiple_pins(usbotg_pins, | ||
154 | ARRAY_SIZE(usbotg_pins), "usbotg"); | ||
155 | |||
156 | if (ret < 0) { | ||
157 | printk(KERN_ERR "Cannot set up OTG pins\n"); | ||
158 | return ret; | ||
159 | } | ||
160 | |||
161 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA0, PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST); | ||
162 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA1, PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST); | ||
163 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA2, PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST); | ||
164 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA3, PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST); | ||
165 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA4, PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST); | ||
166 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA5, PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST); | ||
167 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA6, PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST); | ||
168 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA7, PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST); | ||
169 | mxc_iomux_set_pad(MX31_PIN_USBOTG_CLK, PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST); | ||
170 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DIR, PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST); | ||
171 | mxc_iomux_set_pad(MX31_PIN_USBOTG_NXT, PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST); | ||
172 | mxc_iomux_set_pad(MX31_PIN_USBOTG_STP, PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST); | ||
173 | |||
174 | return 0; | ||
175 | } | ||
176 | |||
177 | /* OTG config */ | ||
178 | static struct fsl_usb2_platform_data usb_pdata = { | ||
179 | .operating_mode = FSL_USB2_DR_DEVICE, | ||
180 | .phy_mode = FSL_USB2_PHY_ULPI, | ||
181 | }; | ||
182 | |||
59 | static struct platform_device pcm037_flash = { | 183 | static struct platform_device pcm037_flash = { |
60 | .name = "physmap-flash", | 184 | .name = "physmap-flash", |
61 | .id = 0, | 185 | .id = 0, |
@@ -127,26 +251,8 @@ static struct mxc_nand_platform_data pcm037_nand_board_info = { | |||
127 | }; | 251 | }; |
128 | 252 | ||
129 | #ifdef CONFIG_I2C_IMX | 253 | #ifdef CONFIG_I2C_IMX |
130 | static int i2c_1_pins[] = { | ||
131 | MX31_PIN_CSPI2_MOSI__SCL, | ||
132 | MX31_PIN_CSPI2_MISO__SDA, | ||
133 | }; | ||
134 | |||
135 | static int pcm037_i2c_1_init(struct device *dev) | ||
136 | { | ||
137 | return mxc_iomux_setup_multiple_pins(i2c_1_pins, ARRAY_SIZE(i2c_1_pins), | ||
138 | "i2c-1"); | ||
139 | } | ||
140 | |||
141 | static void pcm037_i2c_1_exit(struct device *dev) | ||
142 | { | ||
143 | mxc_iomux_release_multiple_pins(i2c_1_pins, ARRAY_SIZE(i2c_1_pins)); | ||
144 | } | ||
145 | |||
146 | static struct imxi2c_platform_data pcm037_i2c_1_data = { | 254 | static struct imxi2c_platform_data pcm037_i2c_1_data = { |
147 | .bitrate = 100000, | 255 | .bitrate = 100000, |
148 | .init = pcm037_i2c_1_init, | ||
149 | .exit = pcm037_i2c_1_exit, | ||
150 | }; | 256 | }; |
151 | 257 | ||
152 | static struct at24_platform_data board_eeprom = { | 258 | static struct at24_platform_data board_eeprom = { |
@@ -166,48 +272,119 @@ static struct i2c_board_info pcm037_i2c_devices[] = { | |||
166 | }; | 272 | }; |
167 | #endif | 273 | #endif |
168 | 274 | ||
169 | static int sdhc1_pins[] = { | 275 | /* Not connected by default */ |
170 | MX31_PIN_SD1_DATA3__SD1_DATA3, | 276 | #ifdef PCM970_SDHC_RW_SWITCH |
171 | MX31_PIN_SD1_DATA2__SD1_DATA2, | 277 | static int pcm970_sdhc1_get_ro(struct device *dev) |
172 | MX31_PIN_SD1_DATA1__SD1_DATA1, | 278 | { |
173 | MX31_PIN_SD1_DATA0__SD1_DATA0, | 279 | return gpio_get_value(IOMUX_TO_GPIO(MX31_PIN_SFS6)); |
174 | MX31_PIN_SD1_CLK__SD1_CLK, | 280 | } |
175 | MX31_PIN_SD1_CMD__SD1_CMD, | 281 | #endif |
176 | }; | 282 | |
283 | #define SDHC1_GPIO_WP IOMUX_TO_GPIO(MX31_PIN_SFS6) | ||
284 | #define SDHC1_GPIO_DET IOMUX_TO_GPIO(MX31_PIN_SCK6) | ||
177 | 285 | ||
178 | static int pcm970_sdhc1_init(struct device *dev, irq_handler_t h, void *data) | 286 | static int pcm970_sdhc1_init(struct device *dev, irq_handler_t detect_irq, |
287 | void *data) | ||
179 | { | 288 | { |
180 | return mxc_iomux_setup_multiple_pins(sdhc1_pins, ARRAY_SIZE(sdhc1_pins), | 289 | int ret; |
181 | "sdhc-1"); | 290 | |
291 | ret = gpio_request(SDHC1_GPIO_DET, "sdhc-detect"); | ||
292 | if (ret) | ||
293 | return ret; | ||
294 | |||
295 | gpio_direction_input(SDHC1_GPIO_DET); | ||
296 | |||
297 | #ifdef PCM970_SDHC_RW_SWITCH | ||
298 | ret = gpio_request(SDHC1_GPIO_WP, "sdhc-wp"); | ||
299 | if (ret) | ||
300 | goto err_gpio_free; | ||
301 | gpio_direction_input(SDHC1_GPIO_WP); | ||
302 | #endif | ||
303 | |||
304 | ret = request_irq(IOMUX_TO_IRQ(MX31_PIN_SCK6), detect_irq, | ||
305 | IRQF_DISABLED | IRQF_TRIGGER_FALLING, | ||
306 | "sdhc-detect", data); | ||
307 | if (ret) | ||
308 | goto err_gpio_free_2; | ||
309 | |||
310 | return 0; | ||
311 | |||
312 | err_gpio_free_2: | ||
313 | #ifdef PCM970_SDHC_RW_SWITCH | ||
314 | gpio_free(SDHC1_GPIO_WP); | ||
315 | err_gpio_free: | ||
316 | #endif | ||
317 | gpio_free(SDHC1_GPIO_DET); | ||
318 | |||
319 | return ret; | ||
182 | } | 320 | } |
183 | 321 | ||
184 | static void pcm970_sdhc1_exit(struct device *dev, void *data) | 322 | static void pcm970_sdhc1_exit(struct device *dev, void *data) |
185 | { | 323 | { |
186 | mxc_iomux_release_multiple_pins(sdhc1_pins, ARRAY_SIZE(sdhc1_pins)); | 324 | free_irq(IOMUX_TO_IRQ(MX31_PIN_SCK6), data); |
325 | gpio_free(SDHC1_GPIO_DET); | ||
326 | gpio_free(SDHC1_GPIO_WP); | ||
187 | } | 327 | } |
188 | 328 | ||
189 | /* No card and rw detection at the moment */ | ||
190 | static struct imxmmc_platform_data sdhc_pdata = { | 329 | static struct imxmmc_platform_data sdhc_pdata = { |
330 | #ifdef PCM970_SDHC_RW_SWITCH | ||
331 | .get_ro = pcm970_sdhc1_get_ro, | ||
332 | #endif | ||
191 | .init = pcm970_sdhc1_init, | 333 | .init = pcm970_sdhc1_init, |
192 | .exit = pcm970_sdhc1_exit, | 334 | .exit = pcm970_sdhc1_exit, |
193 | }; | 335 | }; |
194 | 336 | ||
195 | static struct platform_device *devices[] __initdata = { | 337 | static struct platform_device *devices[] __initdata = { |
196 | &pcm037_flash, | 338 | &pcm037_flash, |
197 | &pcm037_eth, | ||
198 | &pcm037_sram_device, | 339 | &pcm037_sram_device, |
199 | }; | 340 | }; |
200 | 341 | ||
201 | static int uart0_pins[] = { | 342 | static struct ipu_platform_data mx3_ipu_data = { |
202 | MX31_PIN_CTS1__CTS1, | 343 | .irq_base = MXC_IPU_IRQ_START, |
203 | MX31_PIN_RTS1__RTS1, | ||
204 | MX31_PIN_TXD1__TXD1, | ||
205 | MX31_PIN_RXD1__RXD1 | ||
206 | }; | 344 | }; |
207 | 345 | ||
208 | static int uart2_pins[] = { | 346 | static const struct fb_videomode fb_modedb[] = { |
209 | MX31_PIN_CSPI3_MOSI__RXD3, | 347 | { |
210 | MX31_PIN_CSPI3_MISO__TXD3 | 348 | /* 240x320 @ 60 Hz Sharp */ |
349 | .name = "Sharp-LQ035Q7DH06-QVGA", | ||
350 | .refresh = 60, | ||
351 | .xres = 240, | ||
352 | .yres = 320, | ||
353 | .pixclock = 185925, | ||
354 | .left_margin = 9, | ||
355 | .right_margin = 16, | ||
356 | .upper_margin = 7, | ||
357 | .lower_margin = 9, | ||
358 | .hsync_len = 1, | ||
359 | .vsync_len = 1, | ||
360 | .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_SHARP_MODE | | ||
361 | FB_SYNC_CLK_INVERT | FB_SYNC_CLK_IDLE_EN, | ||
362 | .vmode = FB_VMODE_NONINTERLACED, | ||
363 | .flag = 0, | ||
364 | }, { | ||
365 | /* 240x320 @ 60 Hz */ | ||
366 | .name = "TX090", | ||
367 | .refresh = 60, | ||
368 | .xres = 240, | ||
369 | .yres = 320, | ||
370 | .pixclock = 38255, | ||
371 | .left_margin = 144, | ||
372 | .right_margin = 0, | ||
373 | .upper_margin = 7, | ||
374 | .lower_margin = 40, | ||
375 | .hsync_len = 96, | ||
376 | .vsync_len = 1, | ||
377 | .sync = FB_SYNC_VERT_HIGH_ACT | FB_SYNC_OE_ACT_HIGH, | ||
378 | .vmode = FB_VMODE_NONINTERLACED, | ||
379 | .flag = 0, | ||
380 | }, | ||
381 | }; | ||
382 | |||
383 | static struct mx3fb_platform_data mx3fb_pdata = { | ||
384 | .dma_dev = &mx3_ipu.dev, | ||
385 | .name = "Sharp-LQ035Q7DH06-QVGA", | ||
386 | .mode = fb_modedb, | ||
387 | .num_modes = ARRAY_SIZE(fb_modedb), | ||
211 | }; | 388 | }; |
212 | 389 | ||
213 | /* | 390 | /* |
@@ -215,21 +392,28 @@ static int uart2_pins[] = { | |||
215 | */ | 392 | */ |
216 | static void __init mxc_board_init(void) | 393 | static void __init mxc_board_init(void) |
217 | { | 394 | { |
395 | int ret; | ||
396 | |||
397 | mxc_iomux_setup_multiple_pins(pcm037_pins, ARRAY_SIZE(pcm037_pins), | ||
398 | "pcm037"); | ||
399 | |||
218 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 400 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
219 | 401 | ||
220 | mxc_iomux_setup_multiple_pins(uart0_pins, ARRAY_SIZE(uart0_pins), "uart-0"); | ||
221 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 402 | mxc_register_device(&mxc_uart_device0, &uart_pdata); |
222 | 403 | mxc_register_device(&mxc_uart_device1, &uart_pdata); | |
223 | mxc_iomux_setup_multiple_pins(uart2_pins, ARRAY_SIZE(uart2_pins), "uart-2"); | ||
224 | mxc_register_device(&mxc_uart_device2, &uart_pdata); | 404 | mxc_register_device(&mxc_uart_device2, &uart_pdata); |
225 | 405 | ||
226 | mxc_iomux_setup_pin(MX31_PIN_BATT_LINE__OWIRE, "batt-0wire"); | ||
227 | mxc_register_device(&mxc_w1_master_device, NULL); | 406 | mxc_register_device(&mxc_w1_master_device, NULL); |
228 | 407 | ||
229 | /* LAN9217 IRQ pin */ | 408 | /* LAN9217 IRQ pin */ |
230 | if (!mxc_iomux_setup_pin(IOMUX_MODE(MX31_PIN_GPIO3_1, IOMUX_CONFIG_GPIO), | 409 | ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1), "lan9217-irq"); |
231 | "pcm037-eth")) | 410 | if (ret) |
411 | pr_warning("could not get LAN irq gpio\n"); | ||
412 | else { | ||
232 | gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1)); | 413 | gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1)); |
414 | platform_device_register(&pcm037_eth); | ||
415 | } | ||
416 | |||
233 | 417 | ||
234 | #ifdef CONFIG_I2C_IMX | 418 | #ifdef CONFIG_I2C_IMX |
235 | i2c_register_board_info(1, pcm037_i2c_devices, | 419 | i2c_register_board_info(1, pcm037_i2c_devices, |
@@ -239,6 +423,10 @@ static void __init mxc_board_init(void) | |||
239 | #endif | 423 | #endif |
240 | mxc_register_device(&mxc_nand_device, &pcm037_nand_board_info); | 424 | mxc_register_device(&mxc_nand_device, &pcm037_nand_board_info); |
241 | mxc_register_device(&mxcsdhc_device0, &sdhc_pdata); | 425 | mxc_register_device(&mxcsdhc_device0, &sdhc_pdata); |
426 | mxc_register_device(&mx3_ipu, &mx3_ipu_data); | ||
427 | mxc_register_device(&mx3_fb, &mx3fb_pdata); | ||
428 | if (!gpio_usbotg_hs_activate()) | ||
429 | mxc_register_device(&mxc_otg_udc_device, &usb_pdata); | ||
242 | } | 430 | } |
243 | 431 | ||
244 | static void __init pcm037_timer_init(void) | 432 | static void __init pcm037_timer_init(void) |
@@ -255,7 +443,7 @@ MACHINE_START(PCM037, "Phytec Phycore pcm037") | |||
255 | .phys_io = AIPS1_BASE_ADDR, | 443 | .phys_io = AIPS1_BASE_ADDR, |
256 | .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, | 444 | .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, |
257 | .boot_params = PHYS_OFFSET + 0x100, | 445 | .boot_params = PHYS_OFFSET + 0x100, |
258 | .map_io = mxc_map_io, | 446 | .map_io = mx31_map_io, |
259 | .init_irq = mxc_init_irq, | 447 | .init_irq = mxc_init_irq, |
260 | .init_machine = mxc_board_init, | 448 | .init_machine = mxc_board_init, |
261 | .timer = &pcm037_timer, | 449 | .timer = &pcm037_timer, |
diff --git a/arch/arm/mach-mx3/pcm043.c b/arch/arm/mach-mx3/pcm043.c new file mode 100644 index 000000000000..8d27c324abf2 --- /dev/null +++ b/arch/arm/mach-mx3/pcm043.c | |||
@@ -0,0 +1,252 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009 Sascha Hauer, Pengutronix | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | ||
18 | |||
19 | #include <linux/types.h> | ||
20 | #include <linux/init.h> | ||
21 | |||
22 | #include <linux/platform_device.h> | ||
23 | #include <linux/mtd/physmap.h> | ||
24 | #include <linux/mtd/plat-ram.h> | ||
25 | #include <linux/memory.h> | ||
26 | #include <linux/gpio.h> | ||
27 | #include <linux/smc911x.h> | ||
28 | #include <linux/interrupt.h> | ||
29 | #include <linux/i2c.h> | ||
30 | #include <linux/i2c/at24.h> | ||
31 | |||
32 | #include <asm/mach-types.h> | ||
33 | #include <asm/mach/arch.h> | ||
34 | #include <asm/mach/time.h> | ||
35 | #include <asm/mach/map.h> | ||
36 | |||
37 | #include <mach/hardware.h> | ||
38 | #include <mach/common.h> | ||
39 | #include <mach/imx-uart.h> | ||
40 | #if defined CONFIG_I2C_IMX || defined CONFIG_I2C_IMX_MODULE | ||
41 | #include <mach/i2c.h> | ||
42 | #endif | ||
43 | #include <mach/iomux-mx35.h> | ||
44 | #include <mach/ipu.h> | ||
45 | #include <mach/mx3fb.h> | ||
46 | |||
47 | #include "devices.h" | ||
48 | |||
49 | static const struct fb_videomode fb_modedb[] = { | ||
50 | { | ||
51 | /* 240x320 @ 60 Hz */ | ||
52 | .name = "Sharp-LQ035Q7", | ||
53 | .refresh = 60, | ||
54 | .xres = 240, | ||
55 | .yres = 320, | ||
56 | .pixclock = 185925, | ||
57 | .left_margin = 9, | ||
58 | .right_margin = 16, | ||
59 | .upper_margin = 7, | ||
60 | .lower_margin = 9, | ||
61 | .hsync_len = 1, | ||
62 | .vsync_len = 1, | ||
63 | .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_SHARP_MODE | FB_SYNC_CLK_INVERT | FB_SYNC_CLK_IDLE_EN, | ||
64 | .vmode = FB_VMODE_NONINTERLACED, | ||
65 | .flag = 0, | ||
66 | }, { | ||
67 | /* 240x320 @ 60 Hz */ | ||
68 | .name = "TX090", | ||
69 | .refresh = 60, | ||
70 | .xres = 240, | ||
71 | .yres = 320, | ||
72 | .pixclock = 38255, | ||
73 | .left_margin = 144, | ||
74 | .right_margin = 0, | ||
75 | .upper_margin = 7, | ||
76 | .lower_margin = 40, | ||
77 | .hsync_len = 96, | ||
78 | .vsync_len = 1, | ||
79 | .sync = FB_SYNC_VERT_HIGH_ACT | FB_SYNC_OE_ACT_HIGH, | ||
80 | .vmode = FB_VMODE_NONINTERLACED, | ||
81 | .flag = 0, | ||
82 | }, | ||
83 | }; | ||
84 | |||
85 | static struct ipu_platform_data mx3_ipu_data = { | ||
86 | .irq_base = MXC_IPU_IRQ_START, | ||
87 | }; | ||
88 | |||
89 | static struct mx3fb_platform_data mx3fb_pdata = { | ||
90 | .dma_dev = &mx3_ipu.dev, | ||
91 | .name = "Sharp-LQ035Q7", | ||
92 | .mode = fb_modedb, | ||
93 | .num_modes = ARRAY_SIZE(fb_modedb), | ||
94 | }; | ||
95 | |||
96 | static struct physmap_flash_data pcm043_flash_data = { | ||
97 | .width = 2, | ||
98 | }; | ||
99 | |||
100 | static struct resource pcm043_flash_resource = { | ||
101 | .start = 0xa0000000, | ||
102 | .end = 0xa1ffffff, | ||
103 | .flags = IORESOURCE_MEM, | ||
104 | }; | ||
105 | |||
106 | static struct platform_device pcm043_flash = { | ||
107 | .name = "physmap-flash", | ||
108 | .id = 0, | ||
109 | .dev = { | ||
110 | .platform_data = &pcm043_flash_data, | ||
111 | }, | ||
112 | .resource = &pcm043_flash_resource, | ||
113 | .num_resources = 1, | ||
114 | }; | ||
115 | |||
116 | static struct imxuart_platform_data uart_pdata = { | ||
117 | .flags = IMXUART_HAVE_RTSCTS, | ||
118 | }; | ||
119 | |||
120 | #if defined CONFIG_I2C_IMX || defined CONFIG_I2C_IMX_MODULE | ||
121 | static struct imxi2c_platform_data pcm043_i2c_1_data = { | ||
122 | .bitrate = 50000, | ||
123 | }; | ||
124 | |||
125 | static struct at24_platform_data board_eeprom = { | ||
126 | .byte_len = 4096, | ||
127 | .page_size = 32, | ||
128 | .flags = AT24_FLAG_ADDR16, | ||
129 | }; | ||
130 | |||
131 | static struct i2c_board_info pcm043_i2c_devices[] = { | ||
132 | { | ||
133 | I2C_BOARD_INFO("at24", 0x52), /* E0=0, E1=1, E2=0 */ | ||
134 | .platform_data = &board_eeprom, | ||
135 | }, { | ||
136 | I2C_BOARD_INFO("rtc-pcf8563", 0x51), | ||
137 | .type = "pcf8563", | ||
138 | } | ||
139 | }; | ||
140 | #endif | ||
141 | |||
142 | static struct platform_device *devices[] __initdata = { | ||
143 | &pcm043_flash, | ||
144 | &mxc_fec_device, | ||
145 | }; | ||
146 | |||
147 | static struct pad_desc pcm043_pads[] = { | ||
148 | /* UART1 */ | ||
149 | MX35_PAD_CTS1__UART1_CTS, | ||
150 | MX35_PAD_RTS1__UART1_RTS, | ||
151 | MX35_PAD_TXD1__UART1_TXD_MUX, | ||
152 | MX35_PAD_RXD1__UART1_RXD_MUX, | ||
153 | /* UART2 */ | ||
154 | MX35_PAD_CTS2__UART2_CTS, | ||
155 | MX35_PAD_RTS2__UART2_RTS, | ||
156 | MX35_PAD_TXD2__UART2_TXD_MUX, | ||
157 | MX35_PAD_RXD2__UART2_RXD_MUX, | ||
158 | /* FEC */ | ||
159 | MX35_PAD_FEC_TX_CLK__FEC_TX_CLK, | ||
160 | MX35_PAD_FEC_RX_CLK__FEC_RX_CLK, | ||
161 | MX35_PAD_FEC_RX_DV__FEC_RX_DV, | ||
162 | MX35_PAD_FEC_COL__FEC_COL, | ||
163 | MX35_PAD_FEC_RDATA0__FEC_RDATA_0, | ||
164 | MX35_PAD_FEC_TDATA0__FEC_TDATA_0, | ||
165 | MX35_PAD_FEC_TX_EN__FEC_TX_EN, | ||
166 | MX35_PAD_FEC_MDC__FEC_MDC, | ||
167 | MX35_PAD_FEC_MDIO__FEC_MDIO, | ||
168 | MX35_PAD_FEC_TX_ERR__FEC_TX_ERR, | ||
169 | MX35_PAD_FEC_RX_ERR__FEC_RX_ERR, | ||
170 | MX35_PAD_FEC_CRS__FEC_CRS, | ||
171 | MX35_PAD_FEC_RDATA1__FEC_RDATA_1, | ||
172 | MX35_PAD_FEC_TDATA1__FEC_TDATA_1, | ||
173 | MX35_PAD_FEC_RDATA2__FEC_RDATA_2, | ||
174 | MX35_PAD_FEC_TDATA2__FEC_TDATA_2, | ||
175 | MX35_PAD_FEC_RDATA3__FEC_RDATA_3, | ||
176 | MX35_PAD_FEC_TDATA3__FEC_TDATA_3, | ||
177 | /* I2C1 */ | ||
178 | MX35_PAD_I2C1_CLK__I2C1_SCL, | ||
179 | MX35_PAD_I2C1_DAT__I2C1_SDA, | ||
180 | /* Display */ | ||
181 | MX35_PAD_LD0__IPU_DISPB_DAT_0, | ||
182 | MX35_PAD_LD1__IPU_DISPB_DAT_1, | ||
183 | MX35_PAD_LD2__IPU_DISPB_DAT_2, | ||
184 | MX35_PAD_LD3__IPU_DISPB_DAT_3, | ||
185 | MX35_PAD_LD4__IPU_DISPB_DAT_4, | ||
186 | MX35_PAD_LD5__IPU_DISPB_DAT_5, | ||
187 | MX35_PAD_LD6__IPU_DISPB_DAT_6, | ||
188 | MX35_PAD_LD7__IPU_DISPB_DAT_7, | ||
189 | MX35_PAD_LD8__IPU_DISPB_DAT_8, | ||
190 | MX35_PAD_LD9__IPU_DISPB_DAT_9, | ||
191 | MX35_PAD_LD10__IPU_DISPB_DAT_10, | ||
192 | MX35_PAD_LD11__IPU_DISPB_DAT_11, | ||
193 | MX35_PAD_LD12__IPU_DISPB_DAT_12, | ||
194 | MX35_PAD_LD13__IPU_DISPB_DAT_13, | ||
195 | MX35_PAD_LD14__IPU_DISPB_DAT_14, | ||
196 | MX35_PAD_LD15__IPU_DISPB_DAT_15, | ||
197 | MX35_PAD_LD16__IPU_DISPB_DAT_16, | ||
198 | MX35_PAD_LD17__IPU_DISPB_DAT_17, | ||
199 | MX35_PAD_D3_HSYNC__IPU_DISPB_D3_HSYNC, | ||
200 | MX35_PAD_D3_FPSHIFT__IPU_DISPB_D3_CLK, | ||
201 | MX35_PAD_D3_DRDY__IPU_DISPB_D3_DRDY, | ||
202 | MX35_PAD_CONTRAST__IPU_DISPB_CONTR, | ||
203 | MX35_PAD_D3_VSYNC__IPU_DISPB_D3_VSYNC, | ||
204 | MX35_PAD_D3_REV__IPU_DISPB_D3_REV, | ||
205 | MX35_PAD_D3_CLS__IPU_DISPB_D3_CLS, | ||
206 | MX35_PAD_D3_SPL__IPU_DISPB_D3_SPL | ||
207 | }; | ||
208 | |||
209 | /* | ||
210 | * Board specific initialization. | ||
211 | */ | ||
212 | static void __init mxc_board_init(void) | ||
213 | { | ||
214 | mxc_iomux_v3_setup_multiple_pads(pcm043_pads, ARRAY_SIZE(pcm043_pads)); | ||
215 | |||
216 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
217 | |||
218 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | ||
219 | |||
220 | mxc_register_device(&mxc_uart_device1, &uart_pdata); | ||
221 | |||
222 | #if defined CONFIG_I2C_IMX || defined CONFIG_I2C_IMX_MODULE | ||
223 | i2c_register_board_info(0, pcm043_i2c_devices, | ||
224 | ARRAY_SIZE(pcm043_i2c_devices)); | ||
225 | |||
226 | mxc_register_device(&mxc_i2c_device0, &pcm043_i2c_1_data); | ||
227 | #endif | ||
228 | |||
229 | mxc_register_device(&mx3_ipu, &mx3_ipu_data); | ||
230 | mxc_register_device(&mx3_fb, &mx3fb_pdata); | ||
231 | } | ||
232 | |||
233 | static void __init pcm043_timer_init(void) | ||
234 | { | ||
235 | mx35_clocks_init(); | ||
236 | } | ||
237 | |||
238 | struct sys_timer pcm043_timer = { | ||
239 | .init = pcm043_timer_init, | ||
240 | }; | ||
241 | |||
242 | MACHINE_START(PCM043, "Phytec Phycore pcm043") | ||
243 | /* Maintainer: Pengutronix */ | ||
244 | .phys_io = AIPS1_BASE_ADDR, | ||
245 | .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, | ||
246 | .boot_params = PHYS_OFFSET + 0x100, | ||
247 | .map_io = mx35_map_io, | ||
248 | .init_irq = mxc_init_irq, | ||
249 | .init_machine = mxc_board_init, | ||
250 | .timer = &pcm043_timer, | ||
251 | MACHINE_END | ||
252 | |||
diff --git a/arch/arm/mach-mx3/qong.c b/arch/arm/mach-mx3/qong.c index 5a01e48fd8f1..82b31c4ab11f 100644 --- a/arch/arm/mach-mx3/qong.c +++ b/arch/arm/mach-mx3/qong.c | |||
@@ -279,7 +279,7 @@ MACHINE_START(QONG, "Dave/DENX QongEVB-LITE") | |||
279 | .phys_io = AIPS1_BASE_ADDR, | 279 | .phys_io = AIPS1_BASE_ADDR, |
280 | .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, | 280 | .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, |
281 | .boot_params = PHYS_OFFSET + 0x100, | 281 | .boot_params = PHYS_OFFSET + 0x100, |
282 | .map_io = mxc_map_io, | 282 | .map_io = mx31_map_io, |
283 | .init_irq = mxc_init_irq, | 283 | .init_irq = mxc_init_irq, |
284 | .init_machine = mxc_board_init, | 284 | .init_machine = mxc_board_init, |
285 | .timer = &qong_timer, | 285 | .timer = &qong_timer, |
diff --git a/arch/arm/plat-mxc/Kconfig b/arch/arm/plat-mxc/Kconfig index 17d0e9906d5f..8986b7412235 100644 --- a/arch/arm/plat-mxc/Kconfig +++ b/arch/arm/plat-mxc/Kconfig | |||
@@ -48,7 +48,14 @@ config MXC_IRQ_PRIOR | |||
48 | config MXC_PWM | 48 | config MXC_PWM |
49 | tristate "Enable PWM driver" | 49 | tristate "Enable PWM driver" |
50 | depends on ARCH_MXC | 50 | depends on ARCH_MXC |
51 | select HAVE_PWM | ||
51 | help | 52 | help |
52 | Enable support for the i.MX PWM controller(s). | 53 | Enable support for the i.MX PWM controller(s). |
53 | 54 | ||
55 | config ARCH_HAS_RNGA | ||
56 | bool | ||
57 | depends on ARCH_MXC | ||
58 | |||
59 | config ARCH_MXC_IOMUX_V3 | ||
60 | bool | ||
54 | endif | 61 | endif |
diff --git a/arch/arm/plat-mxc/Makefile b/arch/arm/plat-mxc/Makefile index 055406312b69..e3212c8ff421 100644 --- a/arch/arm/plat-mxc/Makefile +++ b/arch/arm/plat-mxc/Makefile | |||
@@ -7,4 +7,5 @@ obj-y := irq.o clock.o gpio.o time.o devices.o cpu.o system.o | |||
7 | 7 | ||
8 | obj-$(CONFIG_ARCH_MX1) += iomux-mx1-mx2.o dma-mx1-mx2.o | 8 | obj-$(CONFIG_ARCH_MX1) += iomux-mx1-mx2.o dma-mx1-mx2.o |
9 | obj-$(CONFIG_ARCH_MX2) += iomux-mx1-mx2.o dma-mx1-mx2.o | 9 | obj-$(CONFIG_ARCH_MX2) += iomux-mx1-mx2.o dma-mx1-mx2.o |
10 | obj-$(CONFIG_ARCH_MXC_IOMUX_V3) += iomux-v3.o | ||
10 | obj-$(CONFIG_MXC_PWM) += pwm.o | 11 | obj-$(CONFIG_MXC_PWM) += pwm.o |
diff --git a/arch/arm/plat-mxc/gpio.c b/arch/arm/plat-mxc/gpio.c index 89e95798cc3b..7506d963be4b 100644 --- a/arch/arm/plat-mxc/gpio.c +++ b/arch/arm/plat-mxc/gpio.c | |||
@@ -64,6 +64,8 @@ static void gpio_unmask_irq(u32 irq) | |||
64 | _set_gpio_irqenable(&mxc_gpio_ports[gpio / 32], gpio & 0x1f, 1); | 64 | _set_gpio_irqenable(&mxc_gpio_ports[gpio / 32], gpio & 0x1f, 1); |
65 | } | 65 | } |
66 | 66 | ||
67 | static int mxc_gpio_get(struct gpio_chip *chip, unsigned offset); | ||
68 | |||
67 | static int gpio_set_irq_type(u32 irq, u32 type) | 69 | static int gpio_set_irq_type(u32 irq, u32 type) |
68 | { | 70 | { |
69 | u32 gpio = irq_to_gpio(irq); | 71 | u32 gpio = irq_to_gpio(irq); |
@@ -72,6 +74,7 @@ static int gpio_set_irq_type(u32 irq, u32 type) | |||
72 | int edge; | 74 | int edge; |
73 | void __iomem *reg = port->base; | 75 | void __iomem *reg = port->base; |
74 | 76 | ||
77 | port->both_edges &= ~(1 << (gpio & 31)); | ||
75 | switch (type) { | 78 | switch (type) { |
76 | case IRQ_TYPE_EDGE_RISING: | 79 | case IRQ_TYPE_EDGE_RISING: |
77 | edge = GPIO_INT_RISE_EDGE; | 80 | edge = GPIO_INT_RISE_EDGE; |
@@ -79,13 +82,24 @@ static int gpio_set_irq_type(u32 irq, u32 type) | |||
79 | case IRQ_TYPE_EDGE_FALLING: | 82 | case IRQ_TYPE_EDGE_FALLING: |
80 | edge = GPIO_INT_FALL_EDGE; | 83 | edge = GPIO_INT_FALL_EDGE; |
81 | break; | 84 | break; |
85 | case IRQ_TYPE_EDGE_BOTH: | ||
86 | val = mxc_gpio_get(&port->chip, gpio & 31); | ||
87 | if (val) { | ||
88 | edge = GPIO_INT_LOW_LEV; | ||
89 | pr_debug("mxc: set GPIO %d to low trigger\n", gpio); | ||
90 | } else { | ||
91 | edge = GPIO_INT_HIGH_LEV; | ||
92 | pr_debug("mxc: set GPIO %d to high trigger\n", gpio); | ||
93 | } | ||
94 | port->both_edges |= 1 << (gpio & 31); | ||
95 | break; | ||
82 | case IRQ_TYPE_LEVEL_LOW: | 96 | case IRQ_TYPE_LEVEL_LOW: |
83 | edge = GPIO_INT_LOW_LEV; | 97 | edge = GPIO_INT_LOW_LEV; |
84 | break; | 98 | break; |
85 | case IRQ_TYPE_LEVEL_HIGH: | 99 | case IRQ_TYPE_LEVEL_HIGH: |
86 | edge = GPIO_INT_HIGH_LEV; | 100 | edge = GPIO_INT_HIGH_LEV; |
87 | break; | 101 | break; |
88 | default: /* this includes IRQ_TYPE_EDGE_BOTH */ | 102 | default: |
89 | return -EINVAL; | 103 | return -EINVAL; |
90 | } | 104 | } |
91 | 105 | ||
@@ -98,6 +112,34 @@ static int gpio_set_irq_type(u32 irq, u32 type) | |||
98 | return 0; | 112 | return 0; |
99 | } | 113 | } |
100 | 114 | ||
115 | static void mxc_flip_edge(struct mxc_gpio_port *port, u32 gpio) | ||
116 | { | ||
117 | void __iomem *reg = port->base; | ||
118 | u32 bit, val; | ||
119 | int edge; | ||
120 | |||
121 | reg += GPIO_ICR1 + ((gpio & 0x10) >> 2); /* lower or upper register */ | ||
122 | bit = gpio & 0xf; | ||
123 | val = __raw_readl(reg); | ||
124 | edge = (val >> (bit << 1)) & 3; | ||
125 | val &= ~(0x3 << (bit << 1)); | ||
126 | switch (edge) { | ||
127 | case GPIO_INT_HIGH_LEV: | ||
128 | edge = GPIO_INT_LOW_LEV; | ||
129 | pr_debug("mxc: switch GPIO %d to low trigger\n", gpio); | ||
130 | break; | ||
131 | case GPIO_INT_LOW_LEV: | ||
132 | edge = GPIO_INT_HIGH_LEV; | ||
133 | pr_debug("mxc: switch GPIO %d to high trigger\n", gpio); | ||
134 | break; | ||
135 | default: | ||
136 | pr_err("mxc: invalid configuration for GPIO %d: %x\n", | ||
137 | gpio, edge); | ||
138 | return; | ||
139 | } | ||
140 | __raw_writel(val | (edge << (bit << 1)), reg); | ||
141 | } | ||
142 | |||
101 | /* handle n interrupts in one status register */ | 143 | /* handle n interrupts in one status register */ |
102 | static void mxc_gpio_irq_handler(struct mxc_gpio_port *port, u32 irq_stat) | 144 | static void mxc_gpio_irq_handler(struct mxc_gpio_port *port, u32 irq_stat) |
103 | { | 145 | { |
@@ -105,11 +147,16 @@ static void mxc_gpio_irq_handler(struct mxc_gpio_port *port, u32 irq_stat) | |||
105 | 147 | ||
106 | gpio_irq_no = port->virtual_irq_start; | 148 | gpio_irq_no = port->virtual_irq_start; |
107 | for (; irq_stat != 0; irq_stat >>= 1, gpio_irq_no++) { | 149 | for (; irq_stat != 0; irq_stat >>= 1, gpio_irq_no++) { |
150 | u32 gpio = irq_to_gpio(gpio_irq_no); | ||
108 | 151 | ||
109 | if ((irq_stat & 1) == 0) | 152 | if ((irq_stat & 1) == 0) |
110 | continue; | 153 | continue; |
111 | 154 | ||
112 | BUG_ON(!(irq_desc[gpio_irq_no].handle_irq)); | 155 | BUG_ON(!(irq_desc[gpio_irq_no].handle_irq)); |
156 | |||
157 | if (port->both_edges & (1 << (gpio & 31))) | ||
158 | mxc_flip_edge(port, gpio); | ||
159 | |||
113 | irq_desc[gpio_irq_no].handle_irq(gpio_irq_no, | 160 | irq_desc[gpio_irq_no].handle_irq(gpio_irq_no, |
114 | &irq_desc[gpio_irq_no]); | 161 | &irq_desc[gpio_irq_no]); |
115 | } | 162 | } |
diff --git a/arch/arm/plat-mxc/include/mach/board-mx21ads.h b/arch/arm/plat-mxc/include/mach/board-mx21ads.h new file mode 100644 index 000000000000..06701df74c42 --- /dev/null +++ b/arch/arm/plat-mxc/include/mach/board-mx21ads.h | |||
@@ -0,0 +1,58 @@ | |||
1 | /* | ||
2 | * Copyright 2005-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | */ | ||
4 | |||
5 | /* | ||
6 | * The code contained herein is licensed under the GNU General Public | ||
7 | * License. You may obtain a copy of the GNU General Public License | ||
8 | * Version 2 or later at the following locations: | ||
9 | * | ||
10 | * http://www.opensource.org/licenses/gpl-license.html | ||
11 | * http://www.gnu.org/copyleft/gpl.html | ||
12 | */ | ||
13 | |||
14 | #ifndef __ASM_ARCH_MXC_BOARD_MX21ADS_H__ | ||
15 | #define __ASM_ARCH_MXC_BOARD_MX21ADS_H__ | ||
16 | |||
17 | /* | ||
18 | * MXC UART EVB board level configurations | ||
19 | */ | ||
20 | #define MXC_LL_UART_PADDR UART1_BASE_ADDR | ||
21 | #define MXC_LL_UART_VADDR AIPI_IO_ADDRESS(UART1_BASE_ADDR) | ||
22 | |||
23 | /* | ||
24 | * Memory-mapped I/O on MX21ADS base board | ||
25 | */ | ||
26 | #define MX21ADS_MMIO_BASE_ADDR 0xF5000000 | ||
27 | #define MX21ADS_MMIO_SIZE SZ_16M | ||
28 | |||
29 | #define MX21ADS_REG_ADDR(offset) (void __force __iomem *) \ | ||
30 | (MX21ADS_MMIO_BASE_ADDR + (offset)) | ||
31 | |||
32 | #define MX21ADS_CS8900A_IRQ IRQ_GPIOE(11) | ||
33 | #define MX21ADS_CS8900A_IOBASE_REG MX21ADS_REG_ADDR(0x000000) | ||
34 | #define MX21ADS_ST16C255_IOBASE_REG MX21ADS_REG_ADDR(0x200000) | ||
35 | #define MX21ADS_VERSION_REG MX21ADS_REG_ADDR(0x400000) | ||
36 | #define MX21ADS_IO_REG MX21ADS_REG_ADDR(0x800000) | ||
37 | |||
38 | /* MX21ADS_IO_REG bit definitions */ | ||
39 | #define MX21ADS_IO_SD_WP 0x0001 /* read */ | ||
40 | #define MX21ADS_IO_TP6 0x0001 /* write */ | ||
41 | #define MX21ADS_IO_SW_SEL 0x0002 /* read */ | ||
42 | #define MX21ADS_IO_TP7 0x0002 /* write */ | ||
43 | #define MX21ADS_IO_RESET_E_UART 0x0004 | ||
44 | #define MX21ADS_IO_RESET_BASE 0x0008 | ||
45 | #define MX21ADS_IO_CSI_CTL2 0x0010 | ||
46 | #define MX21ADS_IO_CSI_CTL1 0x0020 | ||
47 | #define MX21ADS_IO_CSI_CTL0 0x0040 | ||
48 | #define MX21ADS_IO_UART1_EN 0x0080 | ||
49 | #define MX21ADS_IO_UART4_EN 0x0100 | ||
50 | #define MX21ADS_IO_LCDON 0x0200 | ||
51 | #define MX21ADS_IO_IRDA_EN 0x0400 | ||
52 | #define MX21ADS_IO_IRDA_FIR_SEL 0x0800 | ||
53 | #define MX21ADS_IO_IRDA_MD0_B 0x1000 | ||
54 | #define MX21ADS_IO_IRDA_MD1 0x2000 | ||
55 | #define MX21ADS_IO_LED4_ON 0x4000 | ||
56 | #define MX21ADS_IO_LED3_ON 0x8000 | ||
57 | |||
58 | #endif /* __ASM_ARCH_MXC_BOARD_MX21ADS_H__ */ | ||
diff --git a/arch/arm/plat-mxc/include/mach/board-mx27pdk.h b/arch/arm/plat-mxc/include/mach/board-mx27pdk.h new file mode 100644 index 000000000000..552b55d714d8 --- /dev/null +++ b/arch/arm/plat-mxc/include/mach/board-mx27pdk.h | |||
@@ -0,0 +1,19 @@ | |||
1 | /* | ||
2 | * Copyright 2009 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | */ | ||
4 | |||
5 | /* | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #ifndef __ASM_ARCH_MXC_BOARD_MX27PDK_H__ | ||
12 | #define __ASM_ARCH_MXC_BOARD_MX27PDK_H__ | ||
13 | |||
14 | /* mandatory for CONFIG_DEBUG_LL */ | ||
15 | |||
16 | #define MXC_LL_UART_PADDR UART1_BASE_ADDR | ||
17 | #define MXC_LL_UART_VADDR AIPS1_IO_ADDRESS(UART1_BASE_ADDR) | ||
18 | |||
19 | #endif /* __ASM_ARCH_MXC_BOARD_MX27PDK_H__ */ | ||
diff --git a/arch/arm/plat-mxc/include/mach/board-mx31ads.h b/arch/arm/plat-mxc/include/mach/board-mx31ads.h index 318c72ada13d..06e6895f7f65 100644 --- a/arch/arm/plat-mxc/include/mach/board-mx31ads.h +++ b/arch/arm/plat-mxc/include/mach/board-mx31ads.h | |||
@@ -114,7 +114,7 @@ | |||
114 | 114 | ||
115 | #define MXC_MAX_EXP_IO_LINES 16 | 115 | #define MXC_MAX_EXP_IO_LINES 16 |
116 | 116 | ||
117 | /* mandatory for CONFIG_LL_DEBUG */ | 117 | /* mandatory for CONFIG_DEBUG_LL */ |
118 | 118 | ||
119 | #define MXC_LL_UART_PADDR UART1_BASE_ADDR | 119 | #define MXC_LL_UART_PADDR UART1_BASE_ADDR |
120 | #define MXC_LL_UART_VADDR AIPS1_IO_ADDRESS(UART1_BASE_ADDR) | 120 | #define MXC_LL_UART_VADDR AIPS1_IO_ADDRESS(UART1_BASE_ADDR) |
diff --git a/arch/arm/plat-mxc/include/mach/board-mx31lite.h b/arch/arm/plat-mxc/include/mach/board-mx31lite.h index e4e5cf5ad7db..52fbdf2d6f26 100644 --- a/arch/arm/plat-mxc/include/mach/board-mx31lite.h +++ b/arch/arm/plat-mxc/include/mach/board-mx31lite.h | |||
@@ -11,28 +11,8 @@ | |||
11 | #ifndef __ASM_ARCH_MXC_BOARD_MX31LITE_H__ | 11 | #ifndef __ASM_ARCH_MXC_BOARD_MX31LITE_H__ |
12 | #define __ASM_ARCH_MXC_BOARD_MX31LITE_H__ | 12 | #define __ASM_ARCH_MXC_BOARD_MX31LITE_H__ |
13 | 13 | ||
14 | #define MXC_MAX_EXP_IO_LINES 16 | ||
15 | |||
16 | |||
17 | /* | ||
18 | * Memory Size parameters | ||
19 | */ | ||
20 | |||
21 | /* | ||
22 | * Size of SDRAM memory | ||
23 | */ | ||
24 | #define SDRAM_MEM_SIZE SZ_128M | ||
25 | /* | ||
26 | * Size of MBX buffer memory | ||
27 | */ | ||
28 | #define MXC_MBX_MEM_SIZE SZ_16M | ||
29 | /* | ||
30 | * Size of memory available to kernel | ||
31 | */ | ||
32 | #define MEM_SIZE (SDRAM_MEM_SIZE - MXC_MBX_MEM_SIZE) | ||
33 | |||
34 | #define MXC_LL_UART_PADDR UART1_BASE_ADDR | 14 | #define MXC_LL_UART_PADDR UART1_BASE_ADDR |
35 | #define MXC_LL_UART_VADDR AIPS1_IO_ADDRESS(UART1_BASE_ADDR) | 15 | #define MXC_LL_UART_VADDR AIPS1_IO_ADDRESS(UART1_BASE_ADDR) |
36 | 16 | ||
37 | #endif /* __ASM_ARCH_MXC_BOARD_MX31ADS_H__ */ | 17 | #endif /* __ASM_ARCH_MXC_BOARD_MX31LITE_H__ */ |
38 | 18 | ||
diff --git a/arch/arm/plat-mxc/include/mach/board-mx31moboard.h b/arch/arm/plat-mxc/include/mach/board-mx31moboard.h index f8aef1babb75..303fd2434a21 100644 --- a/arch/arm/plat-mxc/include/mach/board-mx31moboard.h +++ b/arch/arm/plat-mxc/include/mach/board-mx31moboard.h | |||
@@ -19,7 +19,7 @@ | |||
19 | #ifndef __ASM_ARCH_MXC_BOARD_MX31MOBOARD_H__ | 19 | #ifndef __ASM_ARCH_MXC_BOARD_MX31MOBOARD_H__ |
20 | #define __ASM_ARCH_MXC_BOARD_MX31MOBOARD_H__ | 20 | #define __ASM_ARCH_MXC_BOARD_MX31MOBOARD_H__ |
21 | 21 | ||
22 | /* mandatory for CONFIG_LL_DEBUG */ | 22 | /* mandatory for CONFIG_DEBUG_LL */ |
23 | 23 | ||
24 | #define MXC_LL_UART_PADDR UART1_BASE_ADDR | 24 | #define MXC_LL_UART_PADDR UART1_BASE_ADDR |
25 | #define MXC_LL_UART_VADDR (AIPI_BASE_ADDR_VIRT + 0x0A000) | 25 | #define MXC_LL_UART_VADDR (AIPI_BASE_ADDR_VIRT + 0x0A000) |
diff --git a/arch/arm/plat-mxc/include/mach/board-mx31pdk.h b/arch/arm/plat-mxc/include/mach/board-mx31pdk.h index 2b6b316d0f51..519bab3eb28b 100644 --- a/arch/arm/plat-mxc/include/mach/board-mx31pdk.h +++ b/arch/arm/plat-mxc/include/mach/board-mx31pdk.h | |||
@@ -11,9 +11,54 @@ | |||
11 | #ifndef __ASM_ARCH_MXC_BOARD_MX31PDK_H__ | 11 | #ifndef __ASM_ARCH_MXC_BOARD_MX31PDK_H__ |
12 | #define __ASM_ARCH_MXC_BOARD_MX31PDK_H__ | 12 | #define __ASM_ARCH_MXC_BOARD_MX31PDK_H__ |
13 | 13 | ||
14 | /* mandatory for CONFIG_LL_DEBUG */ | 14 | /* mandatory for CONFIG_DEBUG_LL */ |
15 | 15 | ||
16 | #define MXC_LL_UART_PADDR UART1_BASE_ADDR | 16 | #define MXC_LL_UART_PADDR UART1_BASE_ADDR |
17 | #define MXC_LL_UART_VADDR AIPS1_IO_ADDRESS(UART1_BASE_ADDR) | 17 | #define MXC_LL_UART_VADDR AIPS1_IO_ADDRESS(UART1_BASE_ADDR) |
18 | 18 | ||
19 | /* Definitions for components on the Debug board */ | ||
20 | |||
21 | /* Base address of CPLD controller on the Debug board */ | ||
22 | #define DEBUG_BASE_ADDRESS CS5_IO_ADDRESS(CS5_BASE_ADDR) | ||
23 | |||
24 | /* LAN9217 ethernet base address */ | ||
25 | #define LAN9217_BASE_ADDR CS5_BASE_ADDR | ||
26 | |||
27 | /* CPLD config and interrupt base address */ | ||
28 | #define CPLD_ADDR (DEBUG_BASE_ADDRESS + 0x20000) | ||
29 | |||
30 | /* LED switchs */ | ||
31 | #define CPLD_LED_REG (CPLD_ADDR + 0x00) | ||
32 | /* buttons */ | ||
33 | #define CPLD_SWITCH_BUTTONS_REG (EXPIO_ADDR + 0x08) | ||
34 | /* status, interrupt */ | ||
35 | #define CPLD_INT_STATUS_REG (CPLD_ADDR + 0x10) | ||
36 | #define CPLD_INT_MASK_REG (CPLD_ADDR + 0x38) | ||
37 | #define CPLD_INT_RESET_REG (CPLD_ADDR + 0x20) | ||
38 | /* magic word for debug CPLD */ | ||
39 | #define CPLD_MAGIC_NUMBER1_REG (CPLD_ADDR + 0x40) | ||
40 | #define CPLD_MAGIC_NUMBER2_REG (CPLD_ADDR + 0x48) | ||
41 | /* CPLD code version */ | ||
42 | #define CPLD_CODE_VER_REG (CPLD_ADDR + 0x50) | ||
43 | /* magic word for debug CPLD */ | ||
44 | #define CPLD_MAGIC_NUMBER3_REG (CPLD_ADDR + 0x58) | ||
45 | /* module reset register */ | ||
46 | #define CPLD_MODULE_RESET_REG (CPLD_ADDR + 0x60) | ||
47 | /* CPU ID and Personality ID */ | ||
48 | #define CPLD_MCU_BOARD_ID_REG (CPLD_ADDR + 0x68) | ||
49 | |||
50 | /* CPLD IRQ line for external uart, external ethernet etc */ | ||
51 | #define EXPIO_PARENT_INT IOMUX_TO_IRQ(MX31_PIN_GPIO1_1) | ||
52 | |||
53 | #define MXC_EXP_IO_BASE (MXC_BOARD_IRQ_START) | ||
54 | #define MXC_IRQ_TO_EXPIO(irq) ((irq) - MXC_EXP_IO_BASE) | ||
55 | |||
56 | #define EXPIO_INT_ENET (MXC_EXP_IO_BASE + 0) | ||
57 | #define EXPIO_INT_XUART_A (MXC_EXP_IO_BASE + 1) | ||
58 | #define EXPIO_INT_XUART_B (MXC_EXP_IO_BASE + 2) | ||
59 | #define EXPIO_INT_BUTTON_A (MXC_EXP_IO_BASE + 3) | ||
60 | #define EXPIO_INT_BUTTON_B (MXC_EXP_IO_BASE + 4) | ||
61 | |||
62 | #define MXC_MAX_EXP_IO_LINES 16 | ||
63 | |||
19 | #endif /* __ASM_ARCH_MXC_BOARD_MX31PDK_H__ */ | 64 | #endif /* __ASM_ARCH_MXC_BOARD_MX31PDK_H__ */ |
diff --git a/arch/arm/plat-mxc/include/mach/board-pcm037.h b/arch/arm/plat-mxc/include/mach/board-pcm037.h index 82232ba3c8fc..f0a1fa1938a2 100644 --- a/arch/arm/plat-mxc/include/mach/board-pcm037.h +++ b/arch/arm/plat-mxc/include/mach/board-pcm037.h | |||
@@ -19,7 +19,7 @@ | |||
19 | #ifndef __ASM_ARCH_MXC_BOARD_PCM037_H__ | 19 | #ifndef __ASM_ARCH_MXC_BOARD_PCM037_H__ |
20 | #define __ASM_ARCH_MXC_BOARD_PCM037_H__ | 20 | #define __ASM_ARCH_MXC_BOARD_PCM037_H__ |
21 | 21 | ||
22 | /* mandatory for CONFIG_LL_DEBUG */ | 22 | /* mandatory for CONFIG_DEBUG_LL */ |
23 | 23 | ||
24 | #define MXC_LL_UART_PADDR UART1_BASE_ADDR | 24 | #define MXC_LL_UART_PADDR UART1_BASE_ADDR |
25 | #define MXC_LL_UART_VADDR AIPS1_IO_ADDRESS(UART1_BASE_ADDR) | 25 | #define MXC_LL_UART_VADDR AIPS1_IO_ADDRESS(UART1_BASE_ADDR) |
diff --git a/arch/arm/plat-mxc/include/mach/board-pcm038.h b/arch/arm/plat-mxc/include/mach/board-pcm038.h index 750c62afd90f..4fcd7499e092 100644 --- a/arch/arm/plat-mxc/include/mach/board-pcm038.h +++ b/arch/arm/plat-mxc/include/mach/board-pcm038.h | |||
@@ -19,7 +19,7 @@ | |||
19 | #ifndef __ASM_ARCH_MXC_BOARD_PCM038_H__ | 19 | #ifndef __ASM_ARCH_MXC_BOARD_PCM038_H__ |
20 | #define __ASM_ARCH_MXC_BOARD_PCM038_H__ | 20 | #define __ASM_ARCH_MXC_BOARD_PCM038_H__ |
21 | 21 | ||
22 | /* mandatory for CONFIG_LL_DEBUG */ | 22 | /* mandatory for CONFIG_DEBUG_LL */ |
23 | 23 | ||
24 | #define MXC_LL_UART_PADDR UART1_BASE_ADDR | 24 | #define MXC_LL_UART_PADDR UART1_BASE_ADDR |
25 | #define MXC_LL_UART_VADDR (AIPI_BASE_ADDR_VIRT + 0x0A000) | 25 | #define MXC_LL_UART_VADDR (AIPI_BASE_ADDR_VIRT + 0x0A000) |
diff --git a/arch/arm/mach-imx/include/mach/timex.h b/arch/arm/plat-mxc/include/mach/board-pcm043.h index e22ba789546c..15fbdf16abcd 100644 --- a/arch/arm/mach-imx/include/mach/timex.h +++ b/arch/arm/plat-mxc/include/mach/board-pcm043.h | |||
@@ -1,7 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/imx/timex.h | 2 | * Copyright (C) 2008 Sascha Hauer, Pengutronix |
3 | * | ||
4 | * Copyright (C) 1999 ARM Limited | ||
5 | * | 3 | * |
6 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 5 | * it under the terms of the GNU General Public License as published by |
@@ -18,9 +16,12 @@ | |||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 | */ | 17 | */ |
20 | 18 | ||
21 | #ifndef __ASM_ARCH_TIMEX_H | 19 | #ifndef __ASM_ARCH_MXC_BOARD_PCM043_H__ |
22 | #define __ASM_ARCH_TIMEX_H | 20 | #define __ASM_ARCH_MXC_BOARD_PCM043_H__ |
21 | |||
22 | /* mandatory for CONFIG_LL_DEBUG */ | ||
23 | 23 | ||
24 | #define CLOCK_TICK_RATE (16000000) | 24 | #define MXC_LL_UART_PADDR UART1_BASE_ADDR |
25 | #define MXC_LL_UART_VADDR AIPS1_IO_ADDRESS(UART1_BASE_ADDR) | ||
25 | 26 | ||
26 | #endif | 27 | #endif /* __ASM_ARCH_MXC_BOARD_PCM043_H__ */ |
diff --git a/arch/arm/plat-mxc/include/mach/board-qong.h b/arch/arm/plat-mxc/include/mach/board-qong.h index 4ff762dd45cf..04033ec637d2 100644 --- a/arch/arm/plat-mxc/include/mach/board-qong.h +++ b/arch/arm/plat-mxc/include/mach/board-qong.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #ifndef __ASM_ARCH_MXC_BOARD_QONG_H__ | 11 | #ifndef __ASM_ARCH_MXC_BOARD_QONG_H__ |
12 | #define __ASM_ARCH_MXC_BOARD_QONG_H__ | 12 | #define __ASM_ARCH_MXC_BOARD_QONG_H__ |
13 | 13 | ||
14 | /* mandatory for CONFIG_LL_DEBUG */ | 14 | /* mandatory for CONFIG_DEBUG_LL */ |
15 | 15 | ||
16 | #define MXC_LL_UART_PADDR UART1_BASE_ADDR | 16 | #define MXC_LL_UART_PADDR UART1_BASE_ADDR |
17 | #define MXC_LL_UART_VADDR AIPS1_IO_ADDRESS(UART1_BASE_ADDR) | 17 | #define MXC_LL_UART_VADDR AIPS1_IO_ADDRESS(UART1_BASE_ADDR) |
diff --git a/arch/arm/plat-mxc/include/mach/common.h b/arch/arm/plat-mxc/include/mach/common.h index b2f9b72644db..02c3cd004db3 100644 --- a/arch/arm/plat-mxc/include/mach/common.h +++ b/arch/arm/plat-mxc/include/mach/common.h | |||
@@ -14,7 +14,11 @@ | |||
14 | struct platform_device; | 14 | struct platform_device; |
15 | struct clk; | 15 | struct clk; |
16 | 16 | ||
17 | extern void mxc_map_io(void); | 17 | extern void mx1_map_io(void); |
18 | extern void mx21_map_io(void); | ||
19 | extern void mx27_map_io(void); | ||
20 | extern void mx31_map_io(void); | ||
21 | extern void mx35_map_io(void); | ||
18 | extern void mxc_init_irq(void); | 22 | extern void mxc_init_irq(void); |
19 | extern void mxc_timer_init(struct clk *timer_clk); | 23 | extern void mxc_timer_init(struct clk *timer_clk); |
20 | extern int mx1_clocks_init(unsigned long fref); | 24 | extern int mx1_clocks_init(unsigned long fref); |
diff --git a/arch/arm/plat-mxc/include/mach/debug-macro.S b/arch/arm/plat-mxc/include/mach/debug-macro.S index 4f773148bc20..e6b841b15e36 100644 --- a/arch/arm/plat-mxc/include/mach/debug-macro.S +++ b/arch/arm/plat-mxc/include/mach/debug-macro.S | |||
@@ -25,6 +25,9 @@ | |||
25 | #ifdef CONFIG_MACH_MX27ADS | 25 | #ifdef CONFIG_MACH_MX27ADS |
26 | #include <mach/board-mx27ads.h> | 26 | #include <mach/board-mx27ads.h> |
27 | #endif | 27 | #endif |
28 | #ifdef CONFIG_MACH_MX21ADS | ||
29 | #include <mach/board-mx21ads.h> | ||
30 | #endif | ||
28 | #ifdef CONFIG_MACH_PCM038 | 31 | #ifdef CONFIG_MACH_PCM038 |
29 | #include <mach/board-pcm038.h> | 32 | #include <mach/board-pcm038.h> |
30 | #endif | 33 | #endif |
@@ -34,6 +37,12 @@ | |||
34 | #ifdef CONFIG_MACH_QONG | 37 | #ifdef CONFIG_MACH_QONG |
35 | #include <mach/board-qong.h> | 38 | #include <mach/board-qong.h> |
36 | #endif | 39 | #endif |
40 | #ifdef CONFIG_MACH_PCM043 | ||
41 | #include <mach/board-pcm043.h> | ||
42 | #endif | ||
43 | #ifdef CONFIG_MACH_MX27_3DS | ||
44 | #include <mach/board-mx27pdk.h> | ||
45 | #endif | ||
37 | .macro addruart,rx | 46 | .macro addruart,rx |
38 | mrc p15, 0, \rx, c1, c0 | 47 | mrc p15, 0, \rx, c1, c0 |
39 | tst \rx, #1 @ MMU enabled? | 48 | tst \rx, #1 @ MMU enabled? |
diff --git a/arch/arm/plat-mxc/include/mach/gpio.h b/arch/arm/plat-mxc/include/mach/gpio.h index ea509f1090fb..894d2f87c856 100644 --- a/arch/arm/plat-mxc/include/mach/gpio.h +++ b/arch/arm/plat-mxc/include/mach/gpio.h | |||
@@ -35,6 +35,7 @@ struct mxc_gpio_port { | |||
35 | int irq; | 35 | int irq; |
36 | int virtual_irq_start; | 36 | int virtual_irq_start; |
37 | struct gpio_chip chip; | 37 | struct gpio_chip chip; |
38 | u32 both_edges; | ||
38 | }; | 39 | }; |
39 | 40 | ||
40 | int mxc_gpio_init(struct mxc_gpio_port*, int); | 41 | int mxc_gpio_init(struct mxc_gpio_port*, int); |
diff --git a/arch/arm/plat-mxc/include/mach/imx-uart.h b/arch/arm/plat-mxc/include/mach/imx-uart.h index 599217b2e13f..90af4d9bc19e 100644 --- a/arch/arm/plat-mxc/include/mach/imx-uart.h +++ b/arch/arm/plat-mxc/include/mach/imx-uart.h | |||
@@ -23,7 +23,7 @@ | |||
23 | 23 | ||
24 | struct imxuart_platform_data { | 24 | struct imxuart_platform_data { |
25 | int (*init)(struct platform_device *pdev); | 25 | int (*init)(struct platform_device *pdev); |
26 | int (*exit)(struct platform_device *pdev); | 26 | void (*exit)(struct platform_device *pdev); |
27 | unsigned int flags; | 27 | unsigned int flags; |
28 | }; | 28 | }; |
29 | 29 | ||
diff --git a/arch/arm/plat-mxc/include/mach/imxfb.h b/arch/arm/plat-mxc/include/mach/imxfb.h index 762a7b0430e2..9f0101157ec1 100644 --- a/arch/arm/plat-mxc/include/mach/imxfb.h +++ b/arch/arm/plat-mxc/include/mach/imxfb.h | |||
@@ -76,8 +76,8 @@ struct imx_fb_platform_data { | |||
76 | u_char * fixed_screen_cpu; | 76 | u_char * fixed_screen_cpu; |
77 | dma_addr_t fixed_screen_dma; | 77 | dma_addr_t fixed_screen_dma; |
78 | 78 | ||
79 | int (*init)(struct platform_device*); | 79 | int (*init)(struct platform_device *); |
80 | int (*exit)(struct platform_device*); | 80 | void (*exit)(struct platform_device *); |
81 | 81 | ||
82 | void (*lcd_power)(int); | 82 | void (*lcd_power)(int); |
83 | void (*backlight_power)(int); | 83 | void (*backlight_power)(int); |
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx3.h b/arch/arm/plat-mxc/include/mach/iomux-mx3.h index 57e927a1fd3a..27f8d1b2bc6b 100644 --- a/arch/arm/plat-mxc/include/mach/iomux-mx3.h +++ b/arch/arm/plat-mxc/include/mach/iomux-mx3.h | |||
@@ -114,7 +114,7 @@ enum iomux_gp_func { | |||
114 | * - setups the iomux according to the configuration | 114 | * - setups the iomux according to the configuration |
115 | * - if the pin is configured as a GPIO, we claim it throug kernel gpiolib | 115 | * - if the pin is configured as a GPIO, we claim it throug kernel gpiolib |
116 | */ | 116 | */ |
117 | int mxc_iomux_setup_pin(const unsigned int pin, const char *label); | 117 | int mxc_iomux_alloc_pin(const unsigned int pin, const char *label); |
118 | /* | 118 | /* |
119 | * setups mutliple pins | 119 | * setups mutliple pins |
120 | * convenient way to call the above function with tables | 120 | * convenient way to call the above function with tables |
@@ -633,6 +633,40 @@ enum iomux_pins { | |||
633 | #define MX31_PIN_USBOTG_DIR__USBOTG_DIR IOMUX_MODE(MX31_PIN_USBOTG_DIR, IOMUX_CONFIG_FUNC) | 633 | #define MX31_PIN_USBOTG_DIR__USBOTG_DIR IOMUX_MODE(MX31_PIN_USBOTG_DIR, IOMUX_CONFIG_FUNC) |
634 | #define MX31_PIN_USBOTG_NXT__USBOTG_NXT IOMUX_MODE(MX31_PIN_USBOTG_NXT, IOMUX_CONFIG_FUNC) | 634 | #define MX31_PIN_USBOTG_NXT__USBOTG_NXT IOMUX_MODE(MX31_PIN_USBOTG_NXT, IOMUX_CONFIG_FUNC) |
635 | #define MX31_PIN_USBOTG_STP__USBOTG_STP IOMUX_MODE(MX31_PIN_USBOTG_STP, IOMUX_CONFIG_FUNC) | 635 | #define MX31_PIN_USBOTG_STP__USBOTG_STP IOMUX_MODE(MX31_PIN_USBOTG_STP, IOMUX_CONFIG_FUNC) |
636 | #define MX31_PIN_USB_OC__GPIO1_30 IOMUX_MODE(MX31_PIN_USB_OC, IOMUX_CONFIG_GPIO) | ||
637 | #define MX31_PIN_I2C_DAT__I2C1_SDA IOMUX_MODE(MX31_PIN_I2C_DAT, IOMUX_CONFIG_FUNC) | ||
638 | #define MX31_PIN_I2C_CLK__I2C1_SCL IOMUX_MODE(MX31_PIN_I2C_CLK, IOMUX_CONFIG_FUNC) | ||
639 | #define MX31_PIN_DCD_DTE1__I2C2_SDA IOMUX_MODE(MX31_PIN_DCD_DTE1, IOMUX_CONFIG_ALT2) | ||
640 | #define MX31_PIN_RI_DTE1__I2C2_SCL IOMUX_MODE(MX31_PIN_RI_DTE1, IOMUX_CONFIG_ALT2) | ||
641 | #define MX31_PIN_ATA_CS0__GPIO3_26 IOMUX_MODE(MX31_PIN_ATA_CS0, IOMUX_CONFIG_GPIO) | ||
642 | #define MX31_PIN_ATA_CS1__GPIO3_27 IOMUX_MODE(MX31_PIN_ATA_CS1, IOMUX_CONFIG_GPIO) | ||
643 | #define MX31_PIN_PC_PWRON__SD2_DATA3 IOMUX_MODE(MX31_PIN_PC_PWRON, IOMUX_CONFIG_ALT1) | ||
644 | #define MX31_PIN_PC_VS1__SD2_DATA2 IOMUX_MODE(MX31_PIN_PC_VS1, IOMUX_CONFIG_ALT1) | ||
645 | #define MX31_PIN_PC_READY__SD2_DATA1 IOMUX_MODE(MX31_PIN_PC_READY, IOMUX_CONFIG_ALT1) | ||
646 | #define MX31_PIN_PC_WAIT_B__SD2_DATA0 IOMUX_MODE(MX31_PIN_PC_WAIT_B, IOMUX_CONFIG_ALT1) | ||
647 | #define MX31_PIN_PC_CD2_B__SD2_CLK IOMUX_MODE(MX31_PIN_PC_CD2_B, IOMUX_CONFIG_ALT1) | ||
648 | #define MX31_PIN_PC_CD1_B__SD2_CMD IOMUX_MODE(MX31_PIN_PC_CD1_B, IOMUX_CONFIG_ALT1) | ||
649 | #define MX31_PIN_ATA_DIOR__GPIO3_28 IOMUX_MODE(MX31_PIN_ATA_DIOR, IOMUX_CONFIG_GPIO) | ||
650 | #define MX31_PIN_ATA_DIOW__GPIO3_29 IOMUX_MODE(MX31_PIN_ATA_DIOW, IOMUX_CONFIG_GPIO) | ||
651 | #define MX31_PIN_CSI_D4__CSI_D4 IOMUX_MODE(MX31_PIN_CSI_D4, IOMUX_CONFIG_FUNC) | ||
652 | #define MX31_PIN_CSI_D5__CSI_D5 IOMUX_MODE(MX31_PIN_CSI_D5, IOMUX_CONFIG_FUNC) | ||
653 | #define MX31_PIN_CSI_D6__CSI_D6 IOMUX_MODE(MX31_PIN_CSI_D6, IOMUX_CONFIG_FUNC) | ||
654 | #define MX31_PIN_CSI_D7__CSI_D7 IOMUX_MODE(MX31_PIN_CSI_D7, IOMUX_CONFIG_FUNC) | ||
655 | #define MX31_PIN_CSI_D8__CSI_D8 IOMUX_MODE(MX31_PIN_CSI_D8, IOMUX_CONFIG_FUNC) | ||
656 | #define MX31_PIN_CSI_D9__CSI_D9 IOMUX_MODE(MX31_PIN_CSI_D9, IOMUX_CONFIG_FUNC) | ||
657 | #define MX31_PIN_CSI_D10__CSI_D10 IOMUX_MODE(MX31_PIN_CSI_D10, IOMUX_CONFIG_FUNC) | ||
658 | #define MX31_PIN_CSI_D11__CSI_D11 IOMUX_MODE(MX31_PIN_CSI_D11, IOMUX_CONFIG_FUNC) | ||
659 | #define MX31_PIN_CSI_D12__CSI_D12 IOMUX_MODE(MX31_PIN_CSI_D12, IOMUX_CONFIG_FUNC) | ||
660 | #define MX31_PIN_CSI_D13__CSI_D13 IOMUX_MODE(MX31_PIN_CSI_D13, IOMUX_CONFIG_FUNC) | ||
661 | #define MX31_PIN_CSI_D14__CSI_D14 IOMUX_MODE(MX31_PIN_CSI_D14, IOMUX_CONFIG_FUNC) | ||
662 | #define MX31_PIN_CSI_D15__CSI_D15 IOMUX_MODE(MX31_PIN_CSI_D15, IOMUX_CONFIG_FUNC) | ||
663 | #define MX31_PIN_CSI_HSYNC__CSI_HSYNC IOMUX_MODE(MX31_PIN_CSI_HSYNC, IOMUX_CONFIG_FUNC) | ||
664 | #define MX31_PIN_CSI_MCLK__CSI_MCLK IOMUX_MODE(MX31_PIN_CSI_MCLK, IOMUX_CONFIG_FUNC) | ||
665 | #define MX31_PIN_CSI_PIXCLK__CSI_PIXCLK IOMUX_MODE(MX31_PIN_CSI_PIXCLK, IOMUX_CONFIG_FUNC) | ||
666 | #define MX31_PIN_CSI_VSYNC__CSI_VSYNC IOMUX_MODE(MX31_PIN_CSI_VSYNC, IOMUX_CONFIG_FUNC) | ||
667 | #define MX31_PIN_GPIO3_0__GPIO3_0 IOMUX_MODE(MX31_PIN_GPIO3_0, IOMUX_CONFIG_GPIO) | ||
668 | #define MX31_PIN_GPIO3_1__GPIO3_1 IOMUX_MODE(MX31_PIN_GPIO3_1, IOMUX_CONFIG_GPIO) | ||
669 | #define MX31_PIN_TXD2__GPIO1_28 IOMUX_MODE(MX31_PIN_TXD2, IOMUX_CONFIG_GPIO) | ||
636 | 670 | ||
637 | /*XXX: The SS0, SS1, SS2, SS3 lines of spi3 are multiplexed by cspi2_ss0, cspi2_ss1, cspi1_ss0 | 671 | /*XXX: The SS0, SS1, SS2, SS3 lines of spi3 are multiplexed by cspi2_ss0, cspi2_ss1, cspi1_ss0 |
638 | * cspi1_ss1*/ | 672 | * cspi1_ss1*/ |
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx35.h b/arch/arm/plat-mxc/include/mach/iomux-mx35.h new file mode 100644 index 000000000000..00b0ac1db225 --- /dev/null +++ b/arch/arm/plat-mxc/include/mach/iomux-mx35.h | |||
@@ -0,0 +1,1267 @@ | |||
1 | /* | ||
2 | * Copyright (C, NO_PAD_CTRL) 2009 by Jan Weitzel Phytec Messtechnik GmbH <armlinux@phytec.de> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version 2 | ||
7 | * of the License, or (at your option, NO_PAD_CTRL) any later version. | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program; if not, write to the Free Software | ||
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
16 | * MA 02110-1301, USA. | ||
17 | */ | ||
18 | |||
19 | #ifndef __MACH_IOMUX_MX35_H__ | ||
20 | #define __MACH_IOMUX_MX35_H__ | ||
21 | |||
22 | #include <mach/iomux-v3.h> | ||
23 | |||
24 | /* | ||
25 | * The naming convention for the pad modes is MX35_PAD_<padname>__<padmode> | ||
26 | * If <padname> or <padmode> refers to a GPIO, it is named | ||
27 | * GPIO_<unit>_<num> see also iomux-v3.h | ||
28 | */ | ||
29 | |||
30 | /* PAD MUX ALT INPSE PATH */ | ||
31 | #define MX35_PAD_CAPTURE__GPT_CAPIN1 IOMUX_PAD(0x328, 0x004, 0, 0x0, 0, NO_PAD_CTRL) | ||
32 | #define MX35_PAD_CAPTURE__GPT_CMPOUT2 IOMUX_PAD(0x328, 0x004, 1, 0x0, 0, NO_PAD_CTRL) | ||
33 | #define MX35_PAD_CAPTURE__CSPI2_SS1 IOMUX_PAD(0x328, 0x004, 2, 0x7f4, 0, NO_PAD_CTRL) | ||
34 | #define MX35_PAD_CAPTURE__EPIT1_EPITO IOMUX_PAD(0x328, 0x004, 3, 0x0, 0, NO_PAD_CTRL) | ||
35 | #define MX35_PAD_CAPTURE__CCM_CLK32K IOMUX_PAD(0x328, 0x004, 4, 0x7d0, 0, NO_PAD_CTRL) | ||
36 | #define MX35_PAD_CAPTURE__GPIO1_4 IOMUX_PAD(0x328, 0x004, 5, 0x850, 0, NO_PAD_CTRL) | ||
37 | |||
38 | #define MX35_PAD_COMPARE__GPT_CMPOUT1 IOMUX_PAD(0x32c, 0x008, 0, 0x0, 0, NO_PAD_CTRL) | ||
39 | #define MX35_PAD_COMPARE__GPT_CAPIN2 IOMUX_PAD(0x32c, 0x008, 1, 0x0, 0, NO_PAD_CTRL) | ||
40 | #define MX35_PAD_COMPARE__GPT_CMPOUT3 IOMUX_PAD(0x32c, 0x008, 2, 0x0, 0, NO_PAD_CTRL) | ||
41 | #define MX35_PAD_COMPARE__EPIT2_EPITO IOMUX_PAD(0x32c, 0x008, 3, 0x0, 0, NO_PAD_CTRL) | ||
42 | #define MX35_PAD_COMPARE__GPIO1_5 IOMUX_PAD(0x32c, 0x008, 5, 0x854, 0, NO_PAD_CTRL) | ||
43 | #define MX35_PAD_COMPARE__SDMA_EXTDMA_2 IOMUX_PAD(0x32c, 0x008, 7, 0x0, 0, NO_PAD_CTRL) | ||
44 | |||
45 | #define MX35_PAD_WDOG_RST__WDOG_WDOG_B IOMUX_PAD(0x330, 0x00c, 0, 0x0, 0, NO_PAD_CTRL) | ||
46 | #define MX35_PAD_WDOG_RST__IPU_FLASH_STROBE IOMUX_PAD(0x330, 0x00c, 3, 0x0, 0, NO_PAD_CTRL) | ||
47 | #define MX35_PAD_WDOG_RST__GPIO1_6 IOMUX_PAD(0x330, 0x00c, 5, 0x858, 0, NO_PAD_CTRL) | ||
48 | |||
49 | #define MX35_PAD_GPIO1_0__GPIO1_0 IOMUX_PAD(0x334, 0x010, 0, 0x82c, 0, NO_PAD_CTRL) | ||
50 | #define MX35_PAD_GPIO1_0__CCM_PMIC_RDY IOMUX_PAD(0x334, 0x010, 1, 0x7d4, 0, NO_PAD_CTRL) | ||
51 | #define MX35_PAD_GPIO1_0__OWIRE_LINE IOMUX_PAD(0x334, 0x010, 2, 0x990, 0, NO_PAD_CTRL) | ||
52 | #define MX35_PAD_GPIO1_0__SDMA_EXTDMA_0 IOMUX_PAD(0x334, 0x010, 7, 0x0, 0, NO_PAD_CTRL) | ||
53 | |||
54 | #define MX35_PAD_GPIO1_1__GPIO1_1 IOMUX_PAD(0x338, 0x014, 0, 0x838, 0, NO_PAD_CTRL) | ||
55 | #define MX35_PAD_GPIO1_1__PWM_PWMO IOMUX_PAD(0x338, 0x014, 2, 0x0, 0, NO_PAD_CTRL) | ||
56 | #define MX35_PAD_GPIO1_1__CSPI1_SS2 IOMUX_PAD(0x338, 0x014, 3, 0x7d8, 0, NO_PAD_CTRL) | ||
57 | #define MX35_PAD_GPIO1_1__SCC_TAMPER_DETECT IOMUX_PAD(0x338, 0x014, 6, 0x0, 0, NO_PAD_CTRL) | ||
58 | #define MX35_PAD_GPIO1_1__SDMA_EXTDMA_1 IOMUX_PAD(0x338, 0x014, 7, 0x0, 0, NO_PAD_CTRL) | ||
59 | |||
60 | #define MX35_PAD_GPIO2_0__GPIO2_0 IOMUX_PAD(0x33c, 0x018, 0, 0x868, 0, NO_PAD_CTRL) | ||
61 | #define MX35_PAD_GPIO2_0__USB_TOP_USBOTG_CLK IOMUX_PAD(0x33c, 0x018, 1, 0x0, 0, NO_PAD_CTRL) | ||
62 | |||
63 | #define MX35_PAD_GPIO3_0__GPIO3_0 IOMUX_PAD(0x340, 0x01c, 0, 0x8e8, 0, NO_PAD_CTRL) | ||
64 | #define MX35_PAD_GPIO3_0__USB_TOP_USBH2_CLK IOMUX_PAD(0x340, 0x01c, 1, 0x0, 0, NO_PAD_CTRL) | ||
65 | |||
66 | #define MX35_PAD_RESET_IN_B__CCM_RESET_IN_B IOMUX_PAD(0x344, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
67 | |||
68 | #define MX35_PAD_POR_B__CCM_POR_B IOMUX_PAD(0x348, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
69 | |||
70 | #define MX35_PAD_CLKO__CCM_CLKO IOMUX_PAD(0x34c, 0x020, 0, 0x0, 0, NO_PAD_CTRL) | ||
71 | #define MX35_PAD_CLKO__GPIO1_8 IOMUX_PAD(0x34c, 0x020, 5, 0x860, 0, NO_PAD_CTRL) | ||
72 | |||
73 | #define MX35_PAD_BOOT_MODE0__CCM_BOOT_MODE_0 IOMUX_PAD(0x350, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
74 | |||
75 | #define MX35_PAD_BOOT_MODE1__CCM_BOOT_MODE_1 IOMUX_PAD(0x354, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
76 | |||
77 | #define MX35_PAD_CLK_MODE0__CCM_CLK_MODE_0 IOMUX_PAD(0x358, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
78 | |||
79 | #define MX35_PAD_CLK_MODE1__CCM_CLK_MODE_1 IOMUX_PAD(0x35c, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
80 | |||
81 | #define MX35_PAD_POWER_FAIL__CCM_DSM_WAKEUP_INT_26 IOMUX_PAD(0x360, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
82 | |||
83 | #define MX35_PAD_VSTBY__CCM_VSTBY IOMUX_PAD(0x364, 0x024, 0, 0x0, 0, NO_PAD_CTRL) | ||
84 | #define MX35_PAD_VSTBY__GPIO1_7 IOMUX_PAD(0x364, 0x024, 5, 0x85c, 0, NO_PAD_CTRL) | ||
85 | |||
86 | #define MX35_PAD_A0__EMI_EIM_DA_L_0 IOMUX_PAD(0x368, 0x028, 0, 0x0, 0, NO_PAD_CTRL) | ||
87 | |||
88 | #define MX35_PAD_A1__EMI_EIM_DA_L_1 IOMUX_PAD(0x36c, 0x02c, 0, 0x0, 0, NO_PAD_CTRL) | ||
89 | |||
90 | #define MX35_PAD_A2__EMI_EIM_DA_L_2 IOMUX_PAD(0x370, 0x030, 0, 0x0, 0, NO_PAD_CTRL) | ||
91 | |||
92 | #define MX35_PAD_A3__EMI_EIM_DA_L_3 IOMUX_PAD(0x374, 0x034, 0, 0x0, 0, NO_PAD_CTRL) | ||
93 | |||
94 | #define MX35_PAD_A4__EMI_EIM_DA_L_4 IOMUX_PAD(0x378, 0x038, 0, 0x0, 0, NO_PAD_CTRL) | ||
95 | |||
96 | #define MX35_PAD_A5__EMI_EIM_DA_L_5 IOMUX_PAD(0x37c, 0x03c, 0, 0x0, 0, NO_PAD_CTRL) | ||
97 | |||
98 | #define MX35_PAD_A6__EMI_EIM_DA_L_6 IOMUX_PAD(0x380, 0x040, 0, 0x0, 0, NO_PAD_CTRL) | ||
99 | |||
100 | #define MX35_PAD_A7__EMI_EIM_DA_L_7 IOMUX_PAD(0x384, 0x044, 0, 0x0, 0, NO_PAD_CTRL) | ||
101 | |||
102 | #define MX35_PAD_A8__EMI_EIM_DA_H_8 IOMUX_PAD(0x388, 0x048, 0, 0x0, 0, NO_PAD_CTRL) | ||
103 | |||
104 | #define MX35_PAD_A9__EMI_EIM_DA_H_9 IOMUX_PAD(0x38c, 0x04c, 0, 0x0, 0, NO_PAD_CTRL) | ||
105 | |||
106 | #define MX35_PAD_A10__EMI_EIM_DA_H_10 IOMUX_PAD(0x390, 0x050, 0, 0x0, 0, NO_PAD_CTRL) | ||
107 | |||
108 | #define MX35_PAD_MA10__EMI_MA10 IOMUX_PAD(0x394, 0x054, 0, 0x0, 0, NO_PAD_CTRL) | ||
109 | |||
110 | #define MX35_PAD_A11__EMI_EIM_DA_H_11 IOMUX_PAD(0x398, 0x058, 0, 0x0, 0, NO_PAD_CTRL) | ||
111 | |||
112 | #define MX35_PAD_A12__EMI_EIM_DA_H_12 IOMUX_PAD(0x39c, 0x05c, 0, 0x0, 0, NO_PAD_CTRL) | ||
113 | |||
114 | #define MX35_PAD_A13__EMI_EIM_DA_H_13 IOMUX_PAD(0x3a0, 0x060, 0, 0x0, 0, NO_PAD_CTRL) | ||
115 | |||
116 | #define MX35_PAD_A14__EMI_EIM_DA_H2_14 IOMUX_PAD(0x3a4, 0x064, 0, 0x0, 0, NO_PAD_CTRL) | ||
117 | |||
118 | #define MX35_PAD_A15__EMI_EIM_DA_H2_15 IOMUX_PAD(0x3a8, 0x068, 0, 0x0, 0, NO_PAD_CTRL) | ||
119 | |||
120 | #define MX35_PAD_A16__EMI_EIM_A_16 IOMUX_PAD(0x3ac, 0x06c, 0, 0x0, 0, NO_PAD_CTRL) | ||
121 | |||
122 | #define MX35_PAD_A17__EMI_EIM_A_17 IOMUX_PAD(0x3b0, 0x070, 0, 0x0, 0, NO_PAD_CTRL) | ||
123 | |||
124 | #define MX35_PAD_A18__EMI_EIM_A_18 IOMUX_PAD(0x3b4, 0x074, 0, 0x0, 0, NO_PAD_CTRL) | ||
125 | |||
126 | #define MX35_PAD_A19__EMI_EIM_A_19 IOMUX_PAD(0x3b8, 0x078, 0, 0x0, 0, NO_PAD_CTRL) | ||
127 | |||
128 | #define MX35_PAD_A20__EMI_EIM_A_20 IOMUX_PAD(0x3bc, 0x07c, 0, 0x0, 0, NO_PAD_CTRL) | ||
129 | |||
130 | #define MX35_PAD_A21__EMI_EIM_A_21 IOMUX_PAD(0x3c0, 0x080, 0, 0x0, 0, NO_PAD_CTRL) | ||
131 | |||
132 | #define MX35_PAD_A22__EMI_EIM_A_22 IOMUX_PAD(0x3c4, 0x084, 0, 0x0, 0, NO_PAD_CTRL) | ||
133 | |||
134 | #define MX35_PAD_A23__EMI_EIM_A_23 IOMUX_PAD(0x3c8, 0x088, 0, 0x0, 0, NO_PAD_CTRL) | ||
135 | |||
136 | #define MX35_PAD_A24__EMI_EIM_A_24 IOMUX_PAD(0x3cc, 0x08c, 0, 0x0, 0, NO_PAD_CTRL) | ||
137 | |||
138 | #define MX35_PAD_A25__EMI_EIM_A_25 IOMUX_PAD(0x3d0, 0x090, 0, 0x0, 0, NO_PAD_CTRL) | ||
139 | |||
140 | #define MX35_PAD_SDBA1__EMI_EIM_SDBA1 IOMUX_PAD(0x3d4, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
141 | |||
142 | #define MX35_PAD_SDBA0__EMI_EIM_SDBA0 IOMUX_PAD(0x3d8, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
143 | |||
144 | #define MX35_PAD_SD0__EMI_DRAM_D_0 IOMUX_PAD(0x3dc, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
145 | |||
146 | #define MX35_PAD_SD1__EMI_DRAM_D_1 IOMUX_PAD(0x3e0, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
147 | |||
148 | #define MX35_PAD_SD2__EMI_DRAM_D_2 IOMUX_PAD(0x3e4, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
149 | |||
150 | #define MX35_PAD_SD3__EMI_DRAM_D_3 IOMUX_PAD(0x3e8, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
151 | |||
152 | #define MX35_PAD_SD4__EMI_DRAM_D_4 IOMUX_PAD(0x3ec, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
153 | |||
154 | #define MX35_PAD_SD5__EMI_DRAM_D_5 IOMUX_PAD(0x3f0, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
155 | |||
156 | #define MX35_PAD_SD6__EMI_DRAM_D_6 IOMUX_PAD(0x3f4, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
157 | |||
158 | #define MX35_PAD_SD7__EMI_DRAM_D_7 IOMUX_PAD(0x3f8, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
159 | |||
160 | #define MX35_PAD_SD8__EMI_DRAM_D_8 IOMUX_PAD(0x3fc, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
161 | |||
162 | #define MX35_PAD_SD9__EMI_DRAM_D_9 IOMUX_PAD(0x400, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
163 | |||
164 | #define MX35_PAD_SD10__EMI_DRAM_D_10 IOMUX_PAD(0x404, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
165 | |||
166 | #define MX35_PAD_SD11__EMI_DRAM_D_11 IOMUX_PAD(0x408, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
167 | |||
168 | #define MX35_PAD_SD12__EMI_DRAM_D_12 IOMUX_PAD(0x40c, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
169 | |||
170 | #define MX35_PAD_SD13__EMI_DRAM_D_13 IOMUX_PAD(0x410, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
171 | |||
172 | #define MX35_PAD_SD14__EMI_DRAM_D_14 IOMUX_PAD(0x414, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
173 | |||
174 | #define MX35_PAD_SD15__EMI_DRAM_D_15 IOMUX_PAD(0x418, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
175 | |||
176 | #define MX35_PAD_SD16__EMI_DRAM_D_16 IOMUX_PAD(0x41c, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
177 | |||
178 | #define MX35_PAD_SD17__EMI_DRAM_D_17 IOMUX_PAD(0x420, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
179 | |||
180 | #define MX35_PAD_SD18__EMI_DRAM_D_18 IOMUX_PAD(0x424, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
181 | |||
182 | #define MX35_PAD_SD19__EMI_DRAM_D_19 IOMUX_PAD(0x428, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
183 | |||
184 | #define MX35_PAD_SD20__EMI_DRAM_D_20 IOMUX_PAD(0x42c, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
185 | |||
186 | #define MX35_PAD_SD21__EMI_DRAM_D_21 IOMUX_PAD(0x430, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
187 | |||
188 | #define MX35_PAD_SD22__EMI_DRAM_D_22 IOMUX_PAD(0x434, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
189 | |||
190 | #define MX35_PAD_SD23__EMI_DRAM_D_23 IOMUX_PAD(0x438, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
191 | |||
192 | #define MX35_PAD_SD24__EMI_DRAM_D_24 IOMUX_PAD(0x43c, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
193 | |||
194 | #define MX35_PAD_SD25__EMI_DRAM_D_25 IOMUX_PAD(0x440, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
195 | |||
196 | #define MX35_PAD_SD26__EMI_DRAM_D_26 IOMUX_PAD(0x444, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
197 | |||
198 | #define MX35_PAD_SD27__EMI_DRAM_D_27 IOMUX_PAD(0x448, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
199 | |||
200 | #define MX35_PAD_SD28__EMI_DRAM_D_28 IOMUX_PAD(0x44c, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
201 | |||
202 | #define MX35_PAD_SD29__EMI_DRAM_D_29 IOMUX_PAD(0x450, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
203 | |||
204 | #define MX35_PAD_SD30__EMI_DRAM_D_30 IOMUX_PAD(0x454, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
205 | |||
206 | #define MX35_PAD_SD31__EMI_DRAM_D_31 IOMUX_PAD(0x458, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
207 | |||
208 | #define MX35_PAD_DQM0__EMI_DRAM_DQM_0 IOMUX_PAD(0x45c, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
209 | |||
210 | #define MX35_PAD_DQM1__EMI_DRAM_DQM_1 IOMUX_PAD(0x460, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
211 | |||
212 | #define MX35_PAD_DQM2__EMI_DRAM_DQM_2 IOMUX_PAD(0x464, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
213 | |||
214 | #define MX35_PAD_DQM3__EMI_DRAM_DQM_3 IOMUX_PAD(0x468, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
215 | |||
216 | #define MX35_PAD_EB0__EMI_EIM_EB0_B IOMUX_PAD(0x46c, 0x094, 0, 0x0, 0, NO_PAD_CTRL) | ||
217 | |||
218 | #define MX35_PAD_EB1__EMI_EIM_EB1_B IOMUX_PAD(0x470, 0x098, 0, 0x0, 0, NO_PAD_CTRL) | ||
219 | |||
220 | #define MX35_PAD_OE__EMI_EIM_OE IOMUX_PAD(0x474, 0x09c, 0, 0x0, 0, NO_PAD_CTRL) | ||
221 | |||
222 | #define MX35_PAD_CS0__EMI_EIM_CS0 IOMUX_PAD(0x478, 0x0a0, 0, 0x0, 0, NO_PAD_CTRL) | ||
223 | |||
224 | #define MX35_PAD_CS1__EMI_EIM_CS1 IOMUX_PAD(0x47c, 0x0a4, 0, 0x0, 0, NO_PAD_CTRL) | ||
225 | #define MX35_PAD_CS1__EMI_NANDF_CE3 IOMUX_PAD(0x47c, 0x0a4, 3, 0x0, 0, NO_PAD_CTRL) | ||
226 | |||
227 | #define MX35_PAD_CS2__EMI_EIM_CS2 IOMUX_PAD(0x480, 0x0a8, 0, 0x0, 0, NO_PAD_CTRL) | ||
228 | |||
229 | #define MX35_PAD_CS3__EMI_EIM_CS3 IOMUX_PAD(0x484, 0x0ac, 0, 0x0, 0, NO_PAD_CTRL) | ||
230 | |||
231 | #define MX35_PAD_CS4__EMI_EIM_CS4 IOMUX_PAD(0x488, 0x0b0, 0, 0x0, 0, NO_PAD_CTRL) | ||
232 | #define MX35_PAD_CS4__EMI_DTACK_B IOMUX_PAD(0x488, 0x0b0, 1, 0x800, 0, NO_PAD_CTRL) | ||
233 | #define MX35_PAD_CS4__EMI_NANDF_CE1 IOMUX_PAD(0x488, 0x0b0, 3, 0x0, 0, NO_PAD_CTRL) | ||
234 | #define MX35_PAD_CS4__GPIO1_20 IOMUX_PAD(0x488, 0x0b0, 5, 0x83c, 0, NO_PAD_CTRL) | ||
235 | |||
236 | #define MX35_PAD_CS5__EMI_EIM_CS5 IOMUX_PAD(0x48c, 0x0b4, 0, 0x0, 0, NO_PAD_CTRL) | ||
237 | #define MX35_PAD_CS5__CSPI2_SS2 IOMUX_PAD(0x48c, 0x0b4, 1, 0x7f8, 0, NO_PAD_CTRL) | ||
238 | #define MX35_PAD_CS5__CSPI1_SS2 IOMUX_PAD(0x48c, 0x0b4, 2, 0x7d8, 1, NO_PAD_CTRL) | ||
239 | #define MX35_PAD_CS5__EMI_NANDF_CE2 IOMUX_PAD(0x48c, 0x0b4, 3, 0x0, 0, NO_PAD_CTRL) | ||
240 | #define MX35_PAD_CS5__GPIO1_21 IOMUX_PAD(0x48c, 0x0b4, 5, 0x840, 0, NO_PAD_CTRL) | ||
241 | |||
242 | #define MX35_PAD_NF_CE0__EMI_NANDF_CE0 IOMUX_PAD(0x490, 0x0b8, 0, 0x0, 0, NO_PAD_CTRL) | ||
243 | #define MX35_PAD_NF_CE0__GPIO1_22 IOMUX_PAD(0x490, 0x0b8, 5, 0x844, 0, NO_PAD_CTRL) | ||
244 | |||
245 | #define MX35_PAD_ECB__EMI_EIM_ECB IOMUX_PAD(0x494, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
246 | |||
247 | #define MX35_PAD_LBA__EMI_EIM_LBA IOMUX_PAD(0x498, 0x0bc, 0, 0x0, 0, NO_PAD_CTRL) | ||
248 | |||
249 | #define MX35_PAD_BCLK__EMI_EIM_BCLK IOMUX_PAD(0x49c, 0x0c0, 0, 0x0, 0, NO_PAD_CTRL) | ||
250 | |||
251 | #define MX35_PAD_RW__EMI_EIM_RW IOMUX_PAD(0x4a0, 0x0c4, 0, 0x0, 0, NO_PAD_CTRL) | ||
252 | |||
253 | #define MX35_PAD_RAS__EMI_DRAM_RAS IOMUX_PAD(0x4a4, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
254 | |||
255 | #define MX35_PAD_CAS__EMI_DRAM_CAS IOMUX_PAD(0x4a8, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
256 | |||
257 | #define MX35_PAD_SDWE__EMI_DRAM_SDWE IOMUX_PAD(0x4ac, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
258 | |||
259 | #define MX35_PAD_SDCKE0__EMI_DRAM_SDCKE_0 IOMUX_PAD(0x4b0, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
260 | |||
261 | #define MX35_PAD_SDCKE1__EMI_DRAM_SDCKE_1 IOMUX_PAD(0x4b4, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
262 | |||
263 | #define MX35_PAD_SDCLK__EMI_DRAM_SDCLK IOMUX_PAD(0x4b8, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
264 | |||
265 | #define MX35_PAD_SDQS0__EMI_DRAM_SDQS_0 IOMUX_PAD(0x4bc, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
266 | |||
267 | #define MX35_PAD_SDQS1__EMI_DRAM_SDQS_1 IOMUX_PAD(0x4c0, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
268 | |||
269 | #define MX35_PAD_SDQS2__EMI_DRAM_SDQS_2 IOMUX_PAD(0x4c4, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
270 | |||
271 | #define MX35_PAD_SDQS3__EMI_DRAM_SDQS_3 IOMUX_PAD(0x4c8, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
272 | |||
273 | #define MX35_PAD_NFWE_B__EMI_NANDF_WE_B IOMUX_PAD(0x4cc, 0x0c8, 0, 0x0, 0, NO_PAD_CTRL) | ||
274 | #define MX35_PAD_NFWE_B__USB_TOP_USBH2_DATA_3 IOMUX_PAD(0x4cc, 0x0c8, 1, 0x9d8, 0, NO_PAD_CTRL) | ||
275 | #define MX35_PAD_NFWE_B__IPU_DISPB_D0_VSYNC IOMUX_PAD(0x4cc, 0x0c8, 2, 0x924, 0, NO_PAD_CTRL) | ||
276 | #define MX35_PAD_NFWE_B__GPIO2_18 IOMUX_PAD(0x4cc, 0x0c8, 5, 0x88c, 0, NO_PAD_CTRL) | ||
277 | #define MX35_PAD_NFWE_B__ARM11P_TOP_TRACE_0 IOMUX_PAD(0x4cc, 0x0c8, 7, 0x0, 0, NO_PAD_CTRL) | ||
278 | |||
279 | #define MX35_PAD_NFRE_B__EMI_NANDF_RE_B IOMUX_PAD(0x4d0, 0x0cc, 0, 0x0, 0, NO_PAD_CTRL) | ||
280 | #define MX35_PAD_NFRE_B__USB_TOP_USBH2_DIR IOMUX_PAD(0x4d0, 0x0cc, 1, 0x9ec, 0, NO_PAD_CTRL) | ||
281 | #define MX35_PAD_NFRE_B__IPU_DISPB_BCLK IOMUX_PAD(0x4d0, 0x0cc, 2, 0x0, 0, NO_PAD_CTRL) | ||
282 | #define MX35_PAD_NFRE_B__GPIO2_19 IOMUX_PAD(0x4d0, 0x0cc, 5, 0x890, 0, NO_PAD_CTRL) | ||
283 | #define MX35_PAD_NFRE_B__ARM11P_TOP_TRACE_1 IOMUX_PAD(0x4d0, 0x0cc, 7, 0x0, 0, NO_PAD_CTRL) | ||
284 | |||
285 | #define MX35_PAD_NFALE__EMI_NANDF_ALE IOMUX_PAD(0x4d4, 0x0d0, 0, 0x0, 0, NO_PAD_CTRL) | ||
286 | #define MX35_PAD_NFALE__USB_TOP_USBH2_STP IOMUX_PAD(0x4d4, 0x0d0, 1, 0x0, 0, NO_PAD_CTRL) | ||
287 | #define MX35_PAD_NFALE__IPU_DISPB_CS0 IOMUX_PAD(0x4d4, 0x0d0, 2, 0x0, 0, NO_PAD_CTRL) | ||
288 | #define MX35_PAD_NFALE__GPIO2_20 IOMUX_PAD(0x4d4, 0x0d0, 5, 0x898, 0, NO_PAD_CTRL) | ||
289 | #define MX35_PAD_NFALE__ARM11P_TOP_TRACE_2 IOMUX_PAD(0x4d4, 0x0d0, 7, 0x0, 0, NO_PAD_CTRL) | ||
290 | |||
291 | #define MX35_PAD_NFCLE__EMI_NANDF_CLE IOMUX_PAD(0x4d8, 0x0d4, 0, 0x0, 0, NO_PAD_CTRL) | ||
292 | #define MX35_PAD_NFCLE__USB_TOP_USBH2_NXT IOMUX_PAD(0x4d8, 0x0d4, 1, 0x9f0, 0, NO_PAD_CTRL) | ||
293 | #define MX35_PAD_NFCLE__IPU_DISPB_PAR_RS IOMUX_PAD(0x4d8, 0x0d4, 2, 0x0, 0, NO_PAD_CTRL) | ||
294 | #define MX35_PAD_NFCLE__GPIO2_21 IOMUX_PAD(0x4d8, 0x0d4, 5, 0x89c, 0, NO_PAD_CTRL) | ||
295 | #define MX35_PAD_NFCLE__ARM11P_TOP_TRACE_3 IOMUX_PAD(0x4d8, 0x0d4, 7, 0x0, 0, NO_PAD_CTRL) | ||
296 | |||
297 | #define MX35_PAD_NFWP_B__EMI_NANDF_WP_B IOMUX_PAD(0x4dc, 0x0d8, 0, 0x0, 0, NO_PAD_CTRL) | ||
298 | #define MX35_PAD_NFWP_B__USB_TOP_USBH2_DATA_7 IOMUX_PAD(0x4dc, 0x0d8, 1, 0x9e8, 0, NO_PAD_CTRL) | ||
299 | #define MX35_PAD_NFWP_B__IPU_DISPB_WR IOMUX_PAD(0x4dc, 0x0d8, 2, 0x0, 0, NO_PAD_CTRL) | ||
300 | #define MX35_PAD_NFWP_B__GPIO2_22 IOMUX_PAD(0x4dc, 0x0d8, 5, 0x8a0, 0, NO_PAD_CTRL) | ||
301 | #define MX35_PAD_NFWP_B__ARM11P_TOP_TRCTL IOMUX_PAD(0x4dc, 0x0d8, 7, 0x0, 0, NO_PAD_CTRL) | ||
302 | |||
303 | #define MX35_PAD_NFRB__EMI_NANDF_RB IOMUX_PAD(0x4e0, 0x0dc, 0, 0x0, 0, NO_PAD_CTRL) | ||
304 | #define MX35_PAD_NFRB__IPU_DISPB_RD IOMUX_PAD(0x4e0, 0x0dc, 2, 0x0, 0, NO_PAD_CTRL) | ||
305 | #define MX35_PAD_NFRB__GPIO2_23 IOMUX_PAD(0x4e0, 0x0dc, 5, 0x8a4, 0, NO_PAD_CTRL) | ||
306 | #define MX35_PAD_NFRB__ARM11P_TOP_TRCLK IOMUX_PAD(0x4e0, 0x0dc, 7, 0x0, 0, NO_PAD_CTRL) | ||
307 | |||
308 | #define MX35_PAD_D15__EMI_EIM_D_15 IOMUX_PAD(0x4e4, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
309 | |||
310 | #define MX35_PAD_D14__EMI_EIM_D_14 IOMUX_PAD(0x4e8, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
311 | |||
312 | #define MX35_PAD_D13__EMI_EIM_D_13 IOMUX_PAD(0x4ec, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
313 | |||
314 | #define MX35_PAD_D12__EMI_EIM_D_12 IOMUX_PAD(0x4f0, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
315 | |||
316 | #define MX35_PAD_D11__EMI_EIM_D_11 IOMUX_PAD(0x4f4, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
317 | |||
318 | #define MX35_PAD_D10__EMI_EIM_D_10 IOMUX_PAD(0x4f8, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
319 | |||
320 | #define MX35_PAD_D9__EMI_EIM_D_9 IOMUX_PAD(0x4fc, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
321 | |||
322 | #define MX35_PAD_D8__EMI_EIM_D_8 IOMUX_PAD(0x500, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
323 | |||
324 | #define MX35_PAD_D7__EMI_EIM_D_7 IOMUX_PAD(0x504, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
325 | |||
326 | #define MX35_PAD_D6__EMI_EIM_D_6 IOMUX_PAD(0x508, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
327 | |||
328 | #define MX35_PAD_D5__EMI_EIM_D_5 IOMUX_PAD(0x50c, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
329 | |||
330 | #define MX35_PAD_D4__EMI_EIM_D_4 IOMUX_PAD(0x510, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
331 | |||
332 | #define MX35_PAD_D3__EMI_EIM_D_3 IOMUX_PAD(0x514, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
333 | |||
334 | #define MX35_PAD_D2__EMI_EIM_D_2 IOMUX_PAD(0x518, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
335 | |||
336 | #define MX35_PAD_D1__EMI_EIM_D_1 IOMUX_PAD(0x51c, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
337 | |||
338 | #define MX35_PAD_D0__EMI_EIM_D_0 IOMUX_PAD(0x520, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
339 | |||
340 | #define MX35_PAD_CSI_D8__IPU_CSI_D_8 IOMUX_PAD(0x524, 0x0e0, 0, 0x0, 0, NO_PAD_CTRL) | ||
341 | #define MX35_PAD_CSI_D8__KPP_COL_0 IOMUX_PAD(0x524, 0x0e0, 1, 0x950, 0, NO_PAD_CTRL) | ||
342 | #define MX35_PAD_CSI_D8__GPIO1_20 IOMUX_PAD(0x524, 0x0e0, 5, 0x83c, 1, NO_PAD_CTRL) | ||
343 | #define MX35_PAD_CSI_D8__ARM11P_TOP_EVNTBUS_13 IOMUX_PAD(0x524, 0x0e0, 7, 0x0, 0, NO_PAD_CTRL) | ||
344 | |||
345 | #define MX35_PAD_CSI_D9__IPU_CSI_D_9 IOMUX_PAD(0x528, 0x0e4, 0, 0x0, 0, NO_PAD_CTRL) | ||
346 | #define MX35_PAD_CSI_D9__KPP_COL_1 IOMUX_PAD(0x528, 0x0e4, 1, 0x954, 0, NO_PAD_CTRL) | ||
347 | #define MX35_PAD_CSI_D9__GPIO1_21 IOMUX_PAD(0x528, 0x0e4, 5, 0x840, 1, NO_PAD_CTRL) | ||
348 | #define MX35_PAD_CSI_D9__ARM11P_TOP_EVNTBUS_14 IOMUX_PAD(0x528, 0x0e4, 7, 0x0, 0, NO_PAD_CTRL) | ||
349 | |||
350 | #define MX35_PAD_CSI_D10__IPU_CSI_D_10 IOMUX_PAD(0x52c, 0x0e8, 0, 0x0, 0, NO_PAD_CTRL) | ||
351 | #define MX35_PAD_CSI_D10__KPP_COL_2 IOMUX_PAD(0x52c, 0x0e8, 1, 0x958, 0, NO_PAD_CTRL) | ||
352 | #define MX35_PAD_CSI_D10__GPIO1_22 IOMUX_PAD(0x52c, 0x0e8, 5, 0x844, 1, NO_PAD_CTRL) | ||
353 | #define MX35_PAD_CSI_D10__ARM11P_TOP_EVNTBUS_15 IOMUX_PAD(0x52c, 0x0e8, 7, 0x0, 0, NO_PAD_CTRL) | ||
354 | |||
355 | #define MX35_PAD_CSI_D11__IPU_CSI_D_11 IOMUX_PAD(0x530, 0x0ec, 0, 0x0, 0, NO_PAD_CTRL) | ||
356 | #define MX35_PAD_CSI_D11__KPP_COL_3 IOMUX_PAD(0x530, 0x0ec, 1, 0x95c, 0, NO_PAD_CTRL) | ||
357 | #define MX35_PAD_CSI_D11__GPIO1_23 IOMUX_PAD(0x530, 0x0ec, 5, 0x0, 0, NO_PAD_CTRL) | ||
358 | |||
359 | #define MX35_PAD_CSI_D12__IPU_CSI_D_12 IOMUX_PAD(0x534, 0x0f0, 0, 0x0, 0, NO_PAD_CTRL) | ||
360 | #define MX35_PAD_CSI_D12__KPP_ROW_0 IOMUX_PAD(0x534, 0x0f0, 1, 0x970, 0, NO_PAD_CTRL) | ||
361 | #define MX35_PAD_CSI_D12__GPIO1_24 IOMUX_PAD(0x534, 0x0f0, 5, 0x0, 0, NO_PAD_CTRL) | ||
362 | |||
363 | #define MX35_PAD_CSI_D13__IPU_CSI_D_13 IOMUX_PAD(0x538, 0x0f4, 0, 0x0, 0, NO_PAD_CTRL) | ||
364 | #define MX35_PAD_CSI_D13__KPP_ROW_1 IOMUX_PAD(0x538, 0x0f4, 1, 0x974, 0, NO_PAD_CTRL) | ||
365 | #define MX35_PAD_CSI_D13__GPIO1_25 IOMUX_PAD(0x538, 0x0f4, 5, 0x0, 0, NO_PAD_CTRL) | ||
366 | |||
367 | #define MX35_PAD_CSI_D14__IPU_CSI_D_14 IOMUX_PAD(0x53c, 0x0f8, 0, 0x0, 0, NO_PAD_CTRL) | ||
368 | #define MX35_PAD_CSI_D14__KPP_ROW_2 IOMUX_PAD(0x53c, 0x0f8, 1, 0x978, 0, NO_PAD_CTRL) | ||
369 | #define MX35_PAD_CSI_D14__GPIO1_26 IOMUX_PAD(0x53c, 0x0f8, 5, 0x0, 0, NO_PAD_CTRL) | ||
370 | |||
371 | #define MX35_PAD_CSI_D15__IPU_CSI_D_15 IOMUX_PAD(0x540, 0x0fc, 0, 0x97c, 0, NO_PAD_CTRL) | ||
372 | #define MX35_PAD_CSI_D15__KPP_ROW_3 IOMUX_PAD(0x540, 0x0fc, 1, 0x0, 0, NO_PAD_CTRL) | ||
373 | #define MX35_PAD_CSI_D15__GPIO1_27 IOMUX_PAD(0x540, 0x0fc, 5, 0x0, 0, NO_PAD_CTRL) | ||
374 | |||
375 | #define MX35_PAD_CSI_MCLK__IPU_CSI_MCLK IOMUX_PAD(0x544, 0x100, 0, 0x0, 0, NO_PAD_CTRL) | ||
376 | #define MX35_PAD_CSI_MCLK__GPIO1_28 IOMUX_PAD(0x544, 0x100, 5, 0x0, 0, NO_PAD_CTRL) | ||
377 | |||
378 | #define MX35_PAD_CSI_VSYNC__IPU_CSI_VSYNC IOMUX_PAD(0x548, 0x104, 0, 0x0, 0, NO_PAD_CTRL) | ||
379 | #define MX35_PAD_CSI_VSYNC__GPIO1_29 IOMUX_PAD(0x548, 0x104, 5, 0x0, 0, NO_PAD_CTRL) | ||
380 | |||
381 | #define MX35_PAD_CSI_HSYNC__IPU_CSI_HSYNC IOMUX_PAD(0x54c, 0x108, 0, 0x0, 0, NO_PAD_CTRL) | ||
382 | #define MX35_PAD_CSI_HSYNC__GPIO1_30 IOMUX_PAD(0x54c, 0x108, 5, 0x0, 0, NO_PAD_CTRL) | ||
383 | |||
384 | #define MX35_PAD_CSI_PIXCLK__IPU_CSI_PIXCLK IOMUX_PAD(0x550, 0x10c, 0, 0x0, 0, NO_PAD_CTRL) | ||
385 | #define MX35_PAD_CSI_PIXCLK__GPIO1_31 IOMUX_PAD(0x550, 0x10c, 5, 0x0, 0, NO_PAD_CTRL) | ||
386 | |||
387 | #define MX35_PAD_I2C1_CLK__I2C1_SCL IOMUX_PAD(0x554, 0x110, 0, 0x0, 0, NO_PAD_CTRL) | ||
388 | #define MX35_PAD_I2C1_CLK__GPIO2_24 IOMUX_PAD(0x554, 0x110, 5, 0x8a8, 0, NO_PAD_CTRL) | ||
389 | #define MX35_PAD_I2C1_CLK__CCM_USB_BYP_CLK IOMUX_PAD(0x554, 0x110, 6, 0x0, 0, NO_PAD_CTRL) | ||
390 | |||
391 | #define MX35_PAD_I2C1_DAT__I2C1_SDA IOMUX_PAD(0x558, 0x114, 0, 0x0, 0, NO_PAD_CTRL) | ||
392 | #define MX35_PAD_I2C1_DAT__GPIO2_25 IOMUX_PAD(0x558, 0x114, 5, 0x8ac, 0, NO_PAD_CTRL) | ||
393 | |||
394 | #define MX35_PAD_I2C2_CLK__I2C2_SCL IOMUX_PAD(0x55c, 0x118, 0, 0x0, 0, NO_PAD_CTRL) | ||
395 | #define MX35_PAD_I2C2_CLK__CAN1_TXCAN IOMUX_PAD(0x55c, 0x118, 1, 0x0, 0, NO_PAD_CTRL) | ||
396 | #define MX35_PAD_I2C2_CLK__USB_TOP_USBH2_PWR IOMUX_PAD(0x55c, 0x118, 2, 0x0, 0, NO_PAD_CTRL) | ||
397 | #define MX35_PAD_I2C2_CLK__GPIO2_26 IOMUX_PAD(0x55c, 0x118, 5, 0x8b0, 0, NO_PAD_CTRL) | ||
398 | #define MX35_PAD_I2C2_CLK__SDMA_DEBUG_BUS_DEVICE_2 IOMUX_PAD(0x55c, 0x118, 6, 0x0, 0, NO_PAD_CTRL) | ||
399 | |||
400 | #define MX35_PAD_I2C2_DAT__I2C2_SDA IOMUX_PAD(0x560, 0x11c, 0, 0x0, 0, NO_PAD_CTRL) | ||
401 | #define MX35_PAD_I2C2_DAT__CAN1_RXCAN IOMUX_PAD(0x560, 0x11c, 1, 0x7c8, 0, NO_PAD_CTRL) | ||
402 | #define MX35_PAD_I2C2_DAT__USB_TOP_USBH2_OC IOMUX_PAD(0x560, 0x11c, 2, 0x9f4, 0, NO_PAD_CTRL) | ||
403 | #define MX35_PAD_I2C2_DAT__GPIO2_27 IOMUX_PAD(0x560, 0x11c, 5, 0x8b4, 0, NO_PAD_CTRL) | ||
404 | #define MX35_PAD_I2C2_DAT__SDMA_DEBUG_BUS_DEVICE_3 IOMUX_PAD(0x560, 0x11c, 6, 0x0, 0, NO_PAD_CTRL) | ||
405 | |||
406 | #define MX35_PAD_STXD4__AUDMUX_AUD4_TXD IOMUX_PAD(0x564, 0x120, 0, 0x0, 0, NO_PAD_CTRL) | ||
407 | #define MX35_PAD_STXD4__GPIO2_28 IOMUX_PAD(0x564, 0x120, 5, 0x8b8, 0, NO_PAD_CTRL) | ||
408 | #define MX35_PAD_STXD4__ARM11P_TOP_ARM_COREASID0 IOMUX_PAD(0x564, 0x120, 7, 0x0, 0, NO_PAD_CTRL) | ||
409 | |||
410 | #define MX35_PAD_SRXD4__AUDMUX_AUD4_RXD IOMUX_PAD(0x568, 0x124, 0, 0x0, 0, NO_PAD_CTRL) | ||
411 | #define MX35_PAD_SRXD4__GPIO2_29 IOMUX_PAD(0x568, 0x124, 5, 0x8bc, 0, NO_PAD_CTRL) | ||
412 | #define MX35_PAD_SRXD4__ARM11P_TOP_ARM_COREASID1 IOMUX_PAD(0x568, 0x124, 7, 0x0, 0, NO_PAD_CTRL) | ||
413 | |||
414 | #define MX35_PAD_SCK4__AUDMUX_AUD4_TXC IOMUX_PAD(0x56c, 0x128, 0, 0x0, 0, NO_PAD_CTRL) | ||
415 | #define MX35_PAD_SCK4__GPIO2_30 IOMUX_PAD(0x56c, 0x128, 5, 0x8c4, 0, NO_PAD_CTRL) | ||
416 | #define MX35_PAD_SCK4__ARM11P_TOP_ARM_COREASID2 IOMUX_PAD(0x56c, 0x128, 7, 0x0, 0, NO_PAD_CTRL) | ||
417 | |||
418 | #define MX35_PAD_STXFS4__AUDMUX_AUD4_TXFS IOMUX_PAD(0x570, 0x12c, 0, 0x0, 0, NO_PAD_CTRL) | ||
419 | #define MX35_PAD_STXFS4__GPIO2_31 IOMUX_PAD(0x570, 0x12c, 5, 0x8c8, 0, NO_PAD_CTRL) | ||
420 | #define MX35_PAD_STXFS4__ARM11P_TOP_ARM_COREASID3 IOMUX_PAD(0x570, 0x12c, 7, 0x0, 0, NO_PAD_CTRL) | ||
421 | |||
422 | #define MX35_PAD_STXD5__AUDMUX_AUD5_TXD IOMUX_PAD(0x574, 0x130, 0, 0x0, 0, NO_PAD_CTRL) | ||
423 | #define MX35_PAD_STXD5__SPDIF_SPDIF_OUT1 IOMUX_PAD(0x574, 0x130, 1, 0x0, 0, NO_PAD_CTRL) | ||
424 | #define MX35_PAD_STXD5__CSPI2_MOSI IOMUX_PAD(0x574, 0x130, 2, 0x7ec, 0, NO_PAD_CTRL) | ||
425 | #define MX35_PAD_STXD5__GPIO1_0 IOMUX_PAD(0x574, 0x130, 5, 0x82c, 1, NO_PAD_CTRL) | ||
426 | #define MX35_PAD_STXD5__ARM11P_TOP_ARM_COREASID4 IOMUX_PAD(0x574, 0x130, 7, 0x0, 0, NO_PAD_CTRL) | ||
427 | |||
428 | #define MX35_PAD_SRXD5__AUDMUX_AUD5_RXD IOMUX_PAD(0x578, 0x134, 0, 0x0, 0, NO_PAD_CTRL) | ||
429 | #define MX35_PAD_SRXD5__SPDIF_SPDIF_IN1 IOMUX_PAD(0x578, 0x134, 1, 0x998, 0, NO_PAD_CTRL) | ||
430 | #define MX35_PAD_SRXD5__CSPI2_MISO IOMUX_PAD(0x578, 0x134, 2, 0x7e8, 0, NO_PAD_CTRL) | ||
431 | #define MX35_PAD_SRXD5__GPIO1_1 IOMUX_PAD(0x578, 0x134, 5, 0x838, 1, NO_PAD_CTRL) | ||
432 | #define MX35_PAD_SRXD5__ARM11P_TOP_ARM_COREASID5 IOMUX_PAD(0x578, 0x134, 7, 0x0, 0, NO_PAD_CTRL) | ||
433 | |||
434 | #define MX35_PAD_SCK5__AUDMUX_AUD5_TXC IOMUX_PAD(0x57c, 0x138, 0, 0x0, 0, NO_PAD_CTRL) | ||
435 | #define MX35_PAD_SCK5__SPDIF_SPDIF_EXTCLK IOMUX_PAD(0x57c, 0x138, 1, 0x994, 0, NO_PAD_CTRL) | ||
436 | #define MX35_PAD_SCK5__CSPI2_SCLK IOMUX_PAD(0x57c, 0x138, 2, 0x7e0, 0, NO_PAD_CTRL) | ||
437 | #define MX35_PAD_SCK5__GPIO1_2 IOMUX_PAD(0x57c, 0x138, 5, 0x848, 0, NO_PAD_CTRL) | ||
438 | #define MX35_PAD_SCK5__ARM11P_TOP_ARM_COREASID6 IOMUX_PAD(0x57c, 0x138, 7, 0x0, 0, NO_PAD_CTRL) | ||
439 | |||
440 | #define MX35_PAD_STXFS5__AUDMUX_AUD5_TXFS IOMUX_PAD(0x580, 0x13c, 0, 0x0, 0, NO_PAD_CTRL) | ||
441 | #define MX35_PAD_STXFS5__CSPI2_RDY IOMUX_PAD(0x580, 0x13c, 2, 0x7e4, 0, NO_PAD_CTRL) | ||
442 | #define MX35_PAD_STXFS5__GPIO1_3 IOMUX_PAD(0x580, 0x13c, 5, 0x84c, 0, NO_PAD_CTRL) | ||
443 | #define MX35_PAD_STXFS5__ARM11P_TOP_ARM_COREASID7 IOMUX_PAD(0x580, 0x13c, 7, 0x0, 0, NO_PAD_CTRL) | ||
444 | |||
445 | #define MX35_PAD_SCKR__ESAI_SCKR IOMUX_PAD(0x584, 0x140, 0, 0x0, 0, NO_PAD_CTRL) | ||
446 | #define MX35_PAD_SCKR__GPIO1_4 IOMUX_PAD(0x584, 0x140, 5, 0x850, 1, NO_PAD_CTRL) | ||
447 | #define MX35_PAD_SCKR__ARM11P_TOP_EVNTBUS_10 IOMUX_PAD(0x584, 0x140, 7, 0x0, 0, NO_PAD_CTRL) | ||
448 | |||
449 | #define MX35_PAD_FSR__ESAI_FSR IOMUX_PAD(0x588, 0x144, 0, 0x0, 0, NO_PAD_CTRL) | ||
450 | #define MX35_PAD_FSR__GPIO1_5 IOMUX_PAD(0x588, 0x144, 5, 0x854, 1, NO_PAD_CTRL) | ||
451 | #define MX35_PAD_FSR__ARM11P_TOP_EVNTBUS_11 IOMUX_PAD(0x588, 0x144, 7, 0x0, 0, NO_PAD_CTRL) | ||
452 | |||
453 | #define MX35_PAD_HCKR__ESAI_HCKR IOMUX_PAD(0x58c, 0x148, 0, 0x0, 0, NO_PAD_CTRL) | ||
454 | #define MX35_PAD_HCKR__AUDMUX_AUD5_RXFS IOMUX_PAD(0x58c, 0x148, 1, 0x0, 0, NO_PAD_CTRL) | ||
455 | #define MX35_PAD_HCKR__CSPI2_SS0 IOMUX_PAD(0x58c, 0x148, 2, 0x7f0, 0, NO_PAD_CTRL) | ||
456 | #define MX35_PAD_HCKR__IPU_FLASH_STROBE IOMUX_PAD(0x58c, 0x148, 3, 0x0, 0, NO_PAD_CTRL) | ||
457 | #define MX35_PAD_HCKR__GPIO1_6 IOMUX_PAD(0x58c, 0x148, 5, 0x858, 1, NO_PAD_CTRL) | ||
458 | #define MX35_PAD_HCKR__ARM11P_TOP_EVNTBUS_12 IOMUX_PAD(0x58c, 0x148, 7, 0x0, 0, NO_PAD_CTRL) | ||
459 | |||
460 | #define MX35_PAD_SCKT__ESAI_SCKT IOMUX_PAD(0x590, 0x14c, 0, 0x0, 0, NO_PAD_CTRL) | ||
461 | #define MX35_PAD_SCKT__GPIO1_7 IOMUX_PAD(0x590, 0x14c, 5, 0x85c, 1, NO_PAD_CTRL) | ||
462 | #define MX35_PAD_SCKT__IPU_CSI_D_0 IOMUX_PAD(0x590, 0x14c, 6, 0x930, 0, NO_PAD_CTRL) | ||
463 | #define MX35_PAD_SCKT__KPP_ROW_2 IOMUX_PAD(0x590, 0x14c, 7, 0x978, 1, NO_PAD_CTRL) | ||
464 | |||
465 | #define MX35_PAD_FST__ESAI_FST IOMUX_PAD(0x594, 0x150, 0, 0x0, 0, NO_PAD_CTRL) | ||
466 | #define MX35_PAD_FST__GPIO1_8 IOMUX_PAD(0x594, 0x150, 5, 0x860, 1, NO_PAD_CTRL) | ||
467 | #define MX35_PAD_FST__IPU_CSI_D_1 IOMUX_PAD(0x594, 0x150, 6, 0x934, 0, NO_PAD_CTRL) | ||
468 | #define MX35_PAD_FST__KPP_ROW_3 IOMUX_PAD(0x594, 0x150, 7, 0x97c, 1, NO_PAD_CTRL) | ||
469 | |||
470 | #define MX35_PAD_HCKT__ESAI_HCKT IOMUX_PAD(0x598, 0x154, 0, 0x0, 0, NO_PAD_CTRL) | ||
471 | #define MX35_PAD_HCKT__AUDMUX_AUD5_RXC IOMUX_PAD(0x598, 0x154, 1, 0x7a8, 0, NO_PAD_CTRL) | ||
472 | #define MX35_PAD_HCKT__GPIO1_9 IOMUX_PAD(0x598, 0x154, 5, 0x864, 0, NO_PAD_CTRL) | ||
473 | #define MX35_PAD_HCKT__IPU_CSI_D_2 IOMUX_PAD(0x598, 0x154, 6, 0x938, 0, NO_PAD_CTRL) | ||
474 | #define MX35_PAD_HCKT__KPP_COL_3 IOMUX_PAD(0x598, 0x154, 7, 0x95c, 1, NO_PAD_CTRL) | ||
475 | |||
476 | #define MX35_PAD_TX5_RX0__ESAI_TX5_RX0 IOMUX_PAD(0x59c, 0x158, 0, 0x0, 0, NO_PAD_CTRL) | ||
477 | #define MX35_PAD_TX5_RX0__AUDMUX_AUD4_RXC IOMUX_PAD(0x59c, 0x158, 1, 0x0, 0, NO_PAD_CTRL) | ||
478 | #define MX35_PAD_TX5_RX0__CSPI2_SS2 IOMUX_PAD(0x59c, 0x158, 2, 0x7f8, 1, NO_PAD_CTRL) | ||
479 | #define MX35_PAD_TX5_RX0__CAN2_TXCAN IOMUX_PAD(0x59c, 0x158, 3, 0x0, 0, NO_PAD_CTRL) | ||
480 | #define MX35_PAD_TX5_RX0__UART2_DTR IOMUX_PAD(0x59c, 0x158, 4, 0x0, 0, NO_PAD_CTRL) | ||
481 | #define MX35_PAD_TX5_RX0__GPIO1_10 IOMUX_PAD(0x59c, 0x158, 5, 0x830, 0, NO_PAD_CTRL) | ||
482 | #define MX35_PAD_TX5_RX0__EMI_M3IF_CHOSEN_MASTER_0 IOMUX_PAD(0x59c, 0x158, 7, 0x0, 0, NO_PAD_CTRL) | ||
483 | |||
484 | #define MX35_PAD_TX4_RX1__ESAI_TX4_RX1 IOMUX_PAD(0x5a0, 0x15c, 0, 0x0, 0, NO_PAD_CTRL) | ||
485 | #define MX35_PAD_TX4_RX1__AUDMUX_AUD4_RXFS IOMUX_PAD(0x5a0, 0x15c, 1, 0x0, 0, NO_PAD_CTRL) | ||
486 | #define MX35_PAD_TX4_RX1__CSPI2_SS3 IOMUX_PAD(0x5a0, 0x15c, 2, 0x7fc, 0, NO_PAD_CTRL) | ||
487 | #define MX35_PAD_TX4_RX1__CAN2_RXCAN IOMUX_PAD(0x5a0, 0x15c, 3, 0x7cc, 0, NO_PAD_CTRL) | ||
488 | #define MX35_PAD_TX4_RX1__UART2_DSR IOMUX_PAD(0x5a0, 0x15c, 4, 0x0, 0, NO_PAD_CTRL) | ||
489 | #define MX35_PAD_TX4_RX1__GPIO1_11 IOMUX_PAD(0x5a0, 0x15c, 5, 0x834, 0, NO_PAD_CTRL) | ||
490 | #define MX35_PAD_TX4_RX1__IPU_CSI_D_3 IOMUX_PAD(0x5a0, 0x15c, 6, 0x93c, 0, NO_PAD_CTRL) | ||
491 | #define MX35_PAD_TX4_RX1__KPP_ROW_0 IOMUX_PAD(0x5a0, 0x15c, 7, 0x970, 1, NO_PAD_CTRL) | ||
492 | |||
493 | #define MX35_PAD_TX3_RX2__ESAI_TX3_RX2 IOMUX_PAD(0x5a4, 0x160, 0, 0x0, 0, NO_PAD_CTRL) | ||
494 | #define MX35_PAD_TX3_RX2__I2C3_SCL IOMUX_PAD(0x5a4, 0x160, 1, 0x91c, 0, NO_PAD_CTRL) | ||
495 | #define MX35_PAD_TX3_RX2__EMI_NANDF_CE1 IOMUX_PAD(0x5a4, 0x160, 3, 0x0, 0, NO_PAD_CTRL) | ||
496 | #define MX35_PAD_TX3_RX2__GPIO1_12 IOMUX_PAD(0x5a4, 0x160, 5, 0x0, 0, NO_PAD_CTRL) | ||
497 | #define MX35_PAD_TX3_RX2__IPU_CSI_D_4 IOMUX_PAD(0x5a4, 0x160, 6, 0x940, 0, NO_PAD_CTRL) | ||
498 | #define MX35_PAD_TX3_RX2__KPP_ROW_1 IOMUX_PAD(0x5a4, 0x160, 7, 0x974, 1, NO_PAD_CTRL) | ||
499 | |||
500 | #define MX35_PAD_TX2_RX3__ESAI_TX2_RX3 IOMUX_PAD(0x5a8, 0x164, 0, 0x0, 0, NO_PAD_CTRL) | ||
501 | #define MX35_PAD_TX2_RX3__I2C3_SDA IOMUX_PAD(0x5a8, 0x164, 1, 0x920, 0, NO_PAD_CTRL) | ||
502 | #define MX35_PAD_TX2_RX3__EMI_NANDF_CE2 IOMUX_PAD(0x5a8, 0x164, 3, 0x0, 0, NO_PAD_CTRL) | ||
503 | #define MX35_PAD_TX2_RX3__GPIO1_13 IOMUX_PAD(0x5a8, 0x164, 5, 0x0, 0, NO_PAD_CTRL) | ||
504 | #define MX35_PAD_TX2_RX3__IPU_CSI_D_5 IOMUX_PAD(0x5a8, 0x164, 6, 0x944, 0, NO_PAD_CTRL) | ||
505 | #define MX35_PAD_TX2_RX3__KPP_COL_0 IOMUX_PAD(0x5a8, 0x164, 7, 0x950, 1, NO_PAD_CTRL) | ||
506 | |||
507 | #define MX35_PAD_TX1__ESAI_TX1 IOMUX_PAD(0x5ac, 0x168, 0, 0x0, 0, NO_PAD_CTRL) | ||
508 | #define MX35_PAD_TX1__CCM_PMIC_RDY IOMUX_PAD(0x5ac, 0x168, 1, 0x7d4, 1, NO_PAD_CTRL) | ||
509 | #define MX35_PAD_TX1__CSPI1_SS2 IOMUX_PAD(0x5ac, 0x168, 2, 0x7d8, 2, NO_PAD_CTRL) | ||
510 | #define MX35_PAD_TX1__EMI_NANDF_CE3 IOMUX_PAD(0x5ac, 0x168, 3, 0x0, 0, NO_PAD_CTRL) | ||
511 | #define MX35_PAD_TX1__UART2_RI IOMUX_PAD(0x5ac, 0x168, 4, 0x0, 0, NO_PAD_CTRL) | ||
512 | #define MX35_PAD_TX1__GPIO1_14 IOMUX_PAD(0x5ac, 0x168, 5, 0x0, 0, NO_PAD_CTRL) | ||
513 | #define MX35_PAD_TX1__IPU_CSI_D_6 IOMUX_PAD(0x5ac, 0x168, 6, 0x948, 0, NO_PAD_CTRL) | ||
514 | #define MX35_PAD_TX1__KPP_COL_1 IOMUX_PAD(0x5ac, 0x168, 7, 0x954, 1, NO_PAD_CTRL) | ||
515 | |||
516 | #define MX35_PAD_TX0__ESAI_TX0 IOMUX_PAD(0x5b0, 0x16c, 0, 0x0, 0, NO_PAD_CTRL) | ||
517 | #define MX35_PAD_TX0__SPDIF_SPDIF_EXTCLK IOMUX_PAD(0x5b0, 0x16c, 1, 0x994, 1, NO_PAD_CTRL) | ||
518 | #define MX35_PAD_TX0__CSPI1_SS3 IOMUX_PAD(0x5b0, 0x16c, 2, 0x7dc, 0, NO_PAD_CTRL) | ||
519 | #define MX35_PAD_TX0__EMI_DTACK_B IOMUX_PAD(0x5b0, 0x16c, 3, 0x800, 1, NO_PAD_CTRL) | ||
520 | #define MX35_PAD_TX0__UART2_DCD IOMUX_PAD(0x5b0, 0x16c, 4, 0x0, 0, NO_PAD_CTRL) | ||
521 | #define MX35_PAD_TX0__GPIO1_15 IOMUX_PAD(0x5b0, 0x16c, 5, 0x0, 0, NO_PAD_CTRL) | ||
522 | #define MX35_PAD_TX0__IPU_CSI_D_7 IOMUX_PAD(0x5b0, 0x16c, 6, 0x94c, 0, NO_PAD_CTRL) | ||
523 | #define MX35_PAD_TX0__KPP_COL_2 IOMUX_PAD(0x5b0, 0x16c, 7, 0x958, 1, NO_PAD_CTRL) | ||
524 | |||
525 | #define MX35_PAD_CSPI1_MOSI__CSPI1_MOSI IOMUX_PAD(0x5b4, 0x170, 0, 0x0, 0, NO_PAD_CTRL) | ||
526 | #define MX35_PAD_CSPI1_MOSI__GPIO1_16 IOMUX_PAD(0x5b4, 0x170, 5, 0x0, 0, NO_PAD_CTRL) | ||
527 | #define MX35_PAD_CSPI1_MOSI__ECT_CTI_TRIG_OUT1_2 IOMUX_PAD(0x5b4, 0x170, 7, 0x0, 0, NO_PAD_CTRL) | ||
528 | |||
529 | #define MX35_PAD_CSPI1_MISO__CSPI1_MISO IOMUX_PAD(0x5b8, 0x174, 0, 0x0, 0, NO_PAD_CTRL) | ||
530 | #define MX35_PAD_CSPI1_MISO__GPIO1_17 IOMUX_PAD(0x5b8, 0x174, 5, 0x0, 0, NO_PAD_CTRL) | ||
531 | #define MX35_PAD_CSPI1_MISO__ECT_CTI_TRIG_OUT1_3 IOMUX_PAD(0x5b8, 0x174, 7, 0x0, 0, NO_PAD_CTRL) | ||
532 | |||
533 | #define MX35_PAD_CSPI1_SS0__CSPI1_SS0 IOMUX_PAD(0x5bc, 0x178, 0, 0x0, 0, NO_PAD_CTRL) | ||
534 | #define MX35_PAD_CSPI1_SS0__OWIRE_LINE IOMUX_PAD(0x5bc, 0x178, 1, 0x990, 1, NO_PAD_CTRL) | ||
535 | #define MX35_PAD_CSPI1_SS0__CSPI2_SS3 IOMUX_PAD(0x5bc, 0x178, 2, 0x7fc, 1, NO_PAD_CTRL) | ||
536 | #define MX35_PAD_CSPI1_SS0__GPIO1_18 IOMUX_PAD(0x5bc, 0x178, 5, 0x0, 0, NO_PAD_CTRL) | ||
537 | #define MX35_PAD_CSPI1_SS0__ECT_CTI_TRIG_OUT1_4 IOMUX_PAD(0x5bc, 0x178, 7, 0x0, 0, NO_PAD_CTRL) | ||
538 | |||
539 | #define MX35_PAD_CSPI1_SS1__CSPI1_SS1 IOMUX_PAD(0x5c0, 0x17c, 0, 0x0, 0, NO_PAD_CTRL) | ||
540 | #define MX35_PAD_CSPI1_SS1__PWM_PWMO IOMUX_PAD(0x5c0, 0x17c, 1, 0x0, 0, NO_PAD_CTRL) | ||
541 | #define MX35_PAD_CSPI1_SS1__CCM_CLK32K IOMUX_PAD(0x5c0, 0x17c, 2, 0x7d0, 1, NO_PAD_CTRL) | ||
542 | #define MX35_PAD_CSPI1_SS1__GPIO1_19 IOMUX_PAD(0x5c0, 0x17c, 5, 0x0, 0, NO_PAD_CTRL) | ||
543 | #define MX35_PAD_CSPI1_SS1__IPU_DIAGB_29 IOMUX_PAD(0x5c0, 0x17c, 6, 0x0, 0, NO_PAD_CTRL) | ||
544 | #define MX35_PAD_CSPI1_SS1__ECT_CTI_TRIG_OUT1_5 IOMUX_PAD(0x5c0, 0x17c, 7, 0x0, 0, NO_PAD_CTRL) | ||
545 | |||
546 | #define MX35_PAD_CSPI1_SCLK__CSPI1_SCLK IOMUX_PAD(0x5c4, 0x180, 0, 0x0, 0, NO_PAD_CTRL) | ||
547 | #define MX35_PAD_CSPI1_SCLK__GPIO3_4 IOMUX_PAD(0x5c4, 0x180, 5, 0x904, 0, NO_PAD_CTRL) | ||
548 | #define MX35_PAD_CSPI1_SCLK__IPU_DIAGB_30 IOMUX_PAD(0x5c4, 0x180, 6, 0x0, 0, NO_PAD_CTRL) | ||
549 | #define MX35_PAD_CSPI1_SCLK__EMI_M3IF_CHOSEN_MASTER_1 IOMUX_PAD(0x5c4, 0x180, 7, 0x0, 0, NO_PAD_CTRL) | ||
550 | |||
551 | #define MX35_PAD_CSPI1_SPI_RDY__CSPI1_RDY IOMUX_PAD(0x5c8, 0x184, 0, 0x0, 0, NO_PAD_CTRL) | ||
552 | #define MX35_PAD_CSPI1_SPI_RDY__GPIO3_5 IOMUX_PAD(0x5c8, 0x184, 5, 0x908, 0, NO_PAD_CTRL) | ||
553 | #define MX35_PAD_CSPI1_SPI_RDY__IPU_DIAGB_31 IOMUX_PAD(0x5c8, 0x184, 6, 0x0, 0, NO_PAD_CTRL) | ||
554 | #define MX35_PAD_CSPI1_SPI_RDY__EMI_M3IF_CHOSEN_MASTER_2 IOMUX_PAD(0x5c8, 0x184, 7, 0x0, 0, NO_PAD_CTRL) | ||
555 | |||
556 | #define MX35_PAD_RXD1__UART1_RXD_MUX IOMUX_PAD(0x5cc, 0x188, 0, 0x0, 0, NO_PAD_CTRL) | ||
557 | #define MX35_PAD_RXD1__CSPI2_MOSI IOMUX_PAD(0x5cc, 0x188, 1, 0x7ec, 1, NO_PAD_CTRL) | ||
558 | #define MX35_PAD_RXD1__KPP_COL_4 IOMUX_PAD(0x5cc, 0x188, 4, 0x960, 0, NO_PAD_CTRL) | ||
559 | #define MX35_PAD_RXD1__GPIO3_6 IOMUX_PAD(0x5cc, 0x188, 5, 0x90c, 0, NO_PAD_CTRL) | ||
560 | #define MX35_PAD_RXD1__ARM11P_TOP_EVNTBUS_16 IOMUX_PAD(0x5cc, 0x188, 7, 0x0, 0, NO_PAD_CTRL) | ||
561 | |||
562 | #define MX35_PAD_TXD1__UART1_TXD_MUX IOMUX_PAD(0x5d0, 0x18c, 0, 0x0, 0, NO_PAD_CTRL) | ||
563 | #define MX35_PAD_TXD1__CSPI2_MISO IOMUX_PAD(0x5d0, 0x18c, 1, 0x7e8, 1, NO_PAD_CTRL) | ||
564 | #define MX35_PAD_TXD1__KPP_COL_5 IOMUX_PAD(0x5d0, 0x18c, 4, 0x964, 0, NO_PAD_CTRL) | ||
565 | #define MX35_PAD_TXD1__GPIO3_7 IOMUX_PAD(0x5d0, 0x18c, 5, 0x910, 0, NO_PAD_CTRL) | ||
566 | #define MX35_PAD_TXD1__ARM11P_TOP_EVNTBUS_17 IOMUX_PAD(0x5d0, 0x18c, 7, 0x0, 0, NO_PAD_CTRL) | ||
567 | |||
568 | #define MX35_PAD_RTS1__UART1_RTS IOMUX_PAD(0x5d4, 0x190, 0, 0x0, 0, NO_PAD_CTRL) | ||
569 | #define MX35_PAD_RTS1__CSPI2_SCLK IOMUX_PAD(0x5d4, 0x190, 1, 0x7e0, 1, NO_PAD_CTRL) | ||
570 | #define MX35_PAD_RTS1__I2C3_SCL IOMUX_PAD(0x5d4, 0x190, 2, 0x91c, 1, NO_PAD_CTRL) | ||
571 | #define MX35_PAD_RTS1__IPU_CSI_D_0 IOMUX_PAD(0x5d4, 0x190, 3, 0x930, 1, NO_PAD_CTRL) | ||
572 | #define MX35_PAD_RTS1__KPP_COL_6 IOMUX_PAD(0x5d4, 0x190, 4, 0x968, 0, NO_PAD_CTRL) | ||
573 | #define MX35_PAD_RTS1__GPIO3_8 IOMUX_PAD(0x5d4, 0x190, 5, 0x914, 0, NO_PAD_CTRL) | ||
574 | #define MX35_PAD_RTS1__EMI_NANDF_CE1 IOMUX_PAD(0x5d4, 0x190, 6, 0x0, 0, NO_PAD_CTRL) | ||
575 | #define MX35_PAD_RTS1__ARM11P_TOP_EVNTBUS_18 IOMUX_PAD(0x5d4, 0x190, 7, 0x0, 0, NO_PAD_CTRL) | ||
576 | |||
577 | #define MX35_PAD_CTS1__UART1_CTS IOMUX_PAD(0x5d8, 0x194, 0, 0x0, 0, NO_PAD_CTRL) | ||
578 | #define MX35_PAD_CTS1__CSPI2_RDY IOMUX_PAD(0x5d8, 0x194, 1, 0x7e4, 1, NO_PAD_CTRL) | ||
579 | #define MX35_PAD_CTS1__I2C3_SDA IOMUX_PAD(0x5d8, 0x194, 2, 0x920, 1, NO_PAD_CTRL) | ||
580 | #define MX35_PAD_CTS1__IPU_CSI_D_1 IOMUX_PAD(0x5d8, 0x194, 3, 0x934, 1, NO_PAD_CTRL) | ||
581 | #define MX35_PAD_CTS1__KPP_COL_7 IOMUX_PAD(0x5d8, 0x194, 4, 0x96c, 0, NO_PAD_CTRL) | ||
582 | #define MX35_PAD_CTS1__GPIO3_9 IOMUX_PAD(0x5d8, 0x194, 5, 0x918, 0, NO_PAD_CTRL) | ||
583 | #define MX35_PAD_CTS1__EMI_NANDF_CE2 IOMUX_PAD(0x5d8, 0x194, 6, 0x0, 0, NO_PAD_CTRL) | ||
584 | #define MX35_PAD_CTS1__ARM11P_TOP_EVNTBUS_19 IOMUX_PAD(0x5d8, 0x194, 7, 0x0, 0, NO_PAD_CTRL) | ||
585 | |||
586 | #define MX35_PAD_RXD2__UART2_RXD_MUX IOMUX_PAD(0x5dc, 0x198, 0, 0x0, 0, NO_PAD_CTRL) | ||
587 | #define MX35_PAD_RXD2__KPP_ROW_4 IOMUX_PAD(0x5dc, 0x198, 4, 0x980, 0, NO_PAD_CTRL) | ||
588 | #define MX35_PAD_RXD2__GPIO3_10 IOMUX_PAD(0x5dc, 0x198, 5, 0x8ec, 0, NO_PAD_CTRL) | ||
589 | |||
590 | #define MX35_PAD_TXD2__UART2_TXD_MUX IOMUX_PAD(0x5e0, 0x19c, 0, 0x0, 0, NO_PAD_CTRL) | ||
591 | #define MX35_PAD_TXD2__SPDIF_SPDIF_EXTCLK IOMUX_PAD(0x5e0, 0x19c, 1, 0x994, 2, NO_PAD_CTRL) | ||
592 | #define MX35_PAD_TXD2__KPP_ROW_5 IOMUX_PAD(0x5e0, 0x19c, 4, 0x984, 0, NO_PAD_CTRL) | ||
593 | #define MX35_PAD_TXD2__GPIO3_11 IOMUX_PAD(0x5e0, 0x19c, 5, 0x8f0, 0, NO_PAD_CTRL) | ||
594 | |||
595 | #define MX35_PAD_RTS2__UART2_RTS IOMUX_PAD(0x5e4, 0x1a0, 0, 0x0, 0, NO_PAD_CTRL) | ||
596 | #define MX35_PAD_RTS2__SPDIF_SPDIF_IN1 IOMUX_PAD(0x5e4, 0x1a0, 1, 0x998, 1, NO_PAD_CTRL) | ||
597 | #define MX35_PAD_RTS2__CAN2_RXCAN IOMUX_PAD(0x5e4, 0x1a0, 2, 0x7cc, 1, NO_PAD_CTRL) | ||
598 | #define MX35_PAD_RTS2__IPU_CSI_D_2 IOMUX_PAD(0x5e4, 0x1a0, 3, 0x938, 1, NO_PAD_CTRL) | ||
599 | #define MX35_PAD_RTS2__KPP_ROW_6 IOMUX_PAD(0x5e4, 0x1a0, 4, 0x988, 0, NO_PAD_CTRL) | ||
600 | #define MX35_PAD_RTS2__GPIO3_12 IOMUX_PAD(0x5e4, 0x1a0, 5, 0x8f4, 0, NO_PAD_CTRL) | ||
601 | #define MX35_PAD_RTS2__AUDMUX_AUD5_RXC IOMUX_PAD(0x5e4, 0x1a0, 6, 0x0, 0, NO_PAD_CTRL) | ||
602 | #define MX35_PAD_RTS2__UART3_RXD_MUX IOMUX_PAD(0x5e4, 0x1a0, 7, 0x9a0, 0, NO_PAD_CTRL) | ||
603 | |||
604 | #define MX35_PAD_CTS2__UART2_CTS IOMUX_PAD(0x5e8, 0x1a4, 0, 0x0, 0, NO_PAD_CTRL) | ||
605 | #define MX35_PAD_CTS2__SPDIF_SPDIF_OUT1 IOMUX_PAD(0x5e8, 0x1a4, 1, 0x0, 0, NO_PAD_CTRL) | ||
606 | #define MX35_PAD_CTS2__CAN2_TXCAN IOMUX_PAD(0x5e8, 0x1a4, 2, 0x0, 0, NO_PAD_CTRL) | ||
607 | #define MX35_PAD_CTS2__IPU_CSI_D_3 IOMUX_PAD(0x5e8, 0x1a4, 3, 0x93c, 1, NO_PAD_CTRL) | ||
608 | #define MX35_PAD_CTS2__KPP_ROW_7 IOMUX_PAD(0x5e8, 0x1a4, 4, 0x98c, 0, NO_PAD_CTRL) | ||
609 | #define MX35_PAD_CTS2__GPIO3_13 IOMUX_PAD(0x5e8, 0x1a4, 5, 0x8f8, 0, NO_PAD_CTRL) | ||
610 | #define MX35_PAD_CTS2__AUDMUX_AUD5_RXFS IOMUX_PAD(0x5e8, 0x1a4, 6, 0x0, 0, NO_PAD_CTRL) | ||
611 | #define MX35_PAD_CTS2__UART3_TXD_MUX IOMUX_PAD(0x5e8, 0x1a4, 7, 0x0, 0, NO_PAD_CTRL) | ||
612 | |||
613 | #define MX35_PAD_RTCK__ARM11P_TOP_RTCK IOMUX_PAD(0x5ec, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
614 | |||
615 | #define MX35_PAD_TCK__SJC_TCK IOMUX_PAD(0x5f0, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
616 | |||
617 | #define MX35_PAD_TMS__SJC_TMS IOMUX_PAD(0x5f4, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
618 | |||
619 | #define MX35_PAD_TDI__SJC_TDI IOMUX_PAD(0x5f8, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
620 | |||
621 | #define MX35_PAD_TDO__SJC_TDO IOMUX_PAD(0x5fc, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
622 | |||
623 | #define MX35_PAD_TRSTB__SJC_TRSTB IOMUX_PAD(0x600, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
624 | |||
625 | #define MX35_PAD_DE_B__SJC_DE_B IOMUX_PAD(0x604, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
626 | |||
627 | #define MX35_PAD_SJC_MOD__SJC_MOD IOMUX_PAD(0x608, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
628 | |||
629 | #define MX35_PAD_USBOTG_PWR__USB_TOP_USBOTG_PWR IOMUX_PAD(0x60c, 0x1a8, 0, 0x0, 0, NO_PAD_CTRL) | ||
630 | #define MX35_PAD_USBOTG_PWR__USB_TOP_USBH2_PWR IOMUX_PAD(0x60c, 0x1a8, 1, 0x0, 0, NO_PAD_CTRL) | ||
631 | #define MX35_PAD_USBOTG_PWR__GPIO3_14 IOMUX_PAD(0x60c, 0x1a8, 5, 0x8fc, 0, NO_PAD_CTRL) | ||
632 | |||
633 | #define MX35_PAD_USBOTG_OC__USB_TOP_USBOTG_OC IOMUX_PAD(0x610, 0x1ac, 0, 0x0, 0, NO_PAD_CTRL) | ||
634 | #define MX35_PAD_USBOTG_OC__USB_TOP_USBH2_OC IOMUX_PAD(0x610, 0x1ac, 1, 0x9f4, 1, NO_PAD_CTRL) | ||
635 | #define MX35_PAD_USBOTG_OC__GPIO3_15 IOMUX_PAD(0x610, 0x1ac, 5, 0x900, 0, NO_PAD_CTRL) | ||
636 | |||
637 | #define MX35_PAD_LD0__IPU_DISPB_DAT_0 IOMUX_PAD(0x614, 0x1b0, 0, 0x0, 0, NO_PAD_CTRL) | ||
638 | #define MX35_PAD_LD0__GPIO2_0 IOMUX_PAD(0x614, 0x1b0, 5, 0x868, 1, NO_PAD_CTRL) | ||
639 | #define MX35_PAD_LD0__SDMA_SDMA_DEBUG_PC_0 IOMUX_PAD(0x614, 0x1b0, 6, 0x0, 0, NO_PAD_CTRL) | ||
640 | |||
641 | #define MX35_PAD_LD1__IPU_DISPB_DAT_1 IOMUX_PAD(0x618, 0x1b4, 0, 0x0, 0, NO_PAD_CTRL) | ||
642 | #define MX35_PAD_LD1__GPIO2_1 IOMUX_PAD(0x618, 0x1b4, 5, 0x894, 0, NO_PAD_CTRL) | ||
643 | #define MX35_PAD_LD1__SDMA_SDMA_DEBUG_PC_1 IOMUX_PAD(0x618, 0x1b4, 6, 0x0, 0, NO_PAD_CTRL) | ||
644 | |||
645 | #define MX35_PAD_LD2__IPU_DISPB_DAT_2 IOMUX_PAD(0x61c, 0x1b8, 0, 0x0, 0, NO_PAD_CTRL) | ||
646 | #define MX35_PAD_LD2__GPIO2_2 IOMUX_PAD(0x61c, 0x1b8, 5, 0x8c0, 0, NO_PAD_CTRL) | ||
647 | #define MX35_PAD_LD2__SDMA_SDMA_DEBUG_PC_2 IOMUX_PAD(0x61c, 0x1b8, 6, 0x0, 0, NO_PAD_CTRL) | ||
648 | |||
649 | #define MX35_PAD_LD3__IPU_DISPB_DAT_3 IOMUX_PAD(0x620, 0x1bc, 0, 0x0, 0, NO_PAD_CTRL) | ||
650 | #define MX35_PAD_LD3__GPIO2_3 IOMUX_PAD(0x620, 0x1bc, 5, 0x8cc, 0, NO_PAD_CTRL) | ||
651 | #define MX35_PAD_LD3__SDMA_SDMA_DEBUG_PC_3 IOMUX_PAD(0x620, 0x1bc, 6, 0x0, 0, NO_PAD_CTRL) | ||
652 | |||
653 | #define MX35_PAD_LD4__IPU_DISPB_DAT_4 IOMUX_PAD(0x624, 0x1c0, 0, 0x0, 0, NO_PAD_CTRL) | ||
654 | #define MX35_PAD_LD4__GPIO2_4 IOMUX_PAD(0x624, 0x1c0, 5, 0x8d0, 0, NO_PAD_CTRL) | ||
655 | #define MX35_PAD_LD4__SDMA_SDMA_DEBUG_PC_4 IOMUX_PAD(0x624, 0x1c0, 6, 0x0, 0, NO_PAD_CTRL) | ||
656 | |||
657 | #define MX35_PAD_LD5__IPU_DISPB_DAT_5 IOMUX_PAD(0x628, 0x1c4, 0, 0x0, 0, NO_PAD_CTRL) | ||
658 | #define MX35_PAD_LD5__GPIO2_5 IOMUX_PAD(0x628, 0x1c4, 5, 0x8d4, 0, NO_PAD_CTRL) | ||
659 | #define MX35_PAD_LD5__SDMA_SDMA_DEBUG_PC_5 IOMUX_PAD(0x628, 0x1c4, 6, 0x0, 0, NO_PAD_CTRL) | ||
660 | |||
661 | #define MX35_PAD_LD6__IPU_DISPB_DAT_6 IOMUX_PAD(0x62c, 0x1c8, 0, 0x0, 0, NO_PAD_CTRL) | ||
662 | #define MX35_PAD_LD6__GPIO2_6 IOMUX_PAD(0x62c, 0x1c8, 5, 0x8d8, 0, NO_PAD_CTRL) | ||
663 | #define MX35_PAD_LD6__SDMA_SDMA_DEBUG_PC_6 IOMUX_PAD(0x62c, 0x1c8, 6, 0x0, 0, NO_PAD_CTRL) | ||
664 | |||
665 | #define MX35_PAD_LD7__IPU_DISPB_DAT_7 IOMUX_PAD(0x630, 0x1cc, 0, 0x0, 0, NO_PAD_CTRL) | ||
666 | #define MX35_PAD_LD7__GPIO2_7 IOMUX_PAD(0x630, 0x1cc, 5, 0x8dc, 0, NO_PAD_CTRL) | ||
667 | #define MX35_PAD_LD7__SDMA_SDMA_DEBUG_PC_7 IOMUX_PAD(0x630, 0x1cc, 6, 0x0, 0, NO_PAD_CTRL) | ||
668 | |||
669 | #define MX35_PAD_LD8__IPU_DISPB_DAT_8 IOMUX_PAD(0x634, 0x1d0, 0, 0x0, 0, NO_PAD_CTRL) | ||
670 | #define MX35_PAD_LD8__GPIO2_8 IOMUX_PAD(0x634, 0x1d0, 5, 0x8e0, 0, NO_PAD_CTRL) | ||
671 | #define MX35_PAD_LD8__SDMA_SDMA_DEBUG_PC_8 IOMUX_PAD(0x634, 0x1d0, 6, 0x0, 0, NO_PAD_CTRL) | ||
672 | |||
673 | #define MX35_PAD_LD9__IPU_DISPB_DAT_9 IOMUX_PAD(0x638, 0x1d4, 0, 0x0, 0, NO_PAD_CTRL) | ||
674 | #define MX35_PAD_LD9__GPIO2_9 IOMUX_PAD(0x638, 0x1d4, 5, 0x8e4 0, NO_PAD_CTRL) | ||
675 | #define MX35_PAD_LD9__SDMA_SDMA_DEBUG_PC_9 IOMUX_PAD(0x638, 0x1d4, 6, 0x0, 0, NO_PAD_CTRL) | ||
676 | |||
677 | #define MX35_PAD_LD10__IPU_DISPB_DAT_10 IOMUX_PAD(0x63c, 0x1d8, 0, 0x0, 0, NO_PAD_CTRL) | ||
678 | #define MX35_PAD_LD10__GPIO2_10 IOMUX_PAD(0x63c, 0x1d8, 5, 0x86c, 0, NO_PAD_CTRL) | ||
679 | #define MX35_PAD_LD10__SDMA_SDMA_DEBUG_PC_10 IOMUX_PAD(0x63c, 0x1d8, 6, 0x0, 0, NO_PAD_CTRL) | ||
680 | |||
681 | #define MX35_PAD_LD11__IPU_DISPB_DAT_11 IOMUX_PAD(0x640, 0x1dc, 0, 0x0, 0, NO_PAD_CTRL) | ||
682 | #define MX35_PAD_LD11__GPIO2_11 IOMUX_PAD(0x640, 0x1dc, 5, 0x870, 0, NO_PAD_CTRL) | ||
683 | #define MX35_PAD_LD11__SDMA_SDMA_DEBUG_PC_11 IOMUX_PAD(0x640, 0x1dc, 6, 0x0, 0, NO_PAD_CTRL) | ||
684 | #define MX35_PAD_LD11__ARM11P_TOP_TRACE_4 IOMUX_PAD(0x640, 0x1dc, 7, 0x0, 0, NO_PAD_CTRL) | ||
685 | |||
686 | #define MX35_PAD_LD12__IPU_DISPB_DAT_12 IOMUX_PAD(0x644, 0x1e0, 0, 0x0, 0, NO_PAD_CTRL) | ||
687 | #define MX35_PAD_LD12__GPIO2_12 IOMUX_PAD(0x644, 0x1e0, 5, 0x874, 0, NO_PAD_CTRL) | ||
688 | #define MX35_PAD_LD12__SDMA_SDMA_DEBUG_PC_12 IOMUX_PAD(0x644, 0x1e0, 6, 0x0, 0, NO_PAD_CTRL) | ||
689 | #define MX35_PAD_LD12__ARM11P_TOP_TRACE_5 IOMUX_PAD(0x644, 0x1e0, 7, 0x0, 0, NO_PAD_CTRL) | ||
690 | |||
691 | #define MX35_PAD_LD13__IPU_DISPB_DAT_13 IOMUX_PAD(0x648, 0x1e4, 0, 0x0, 0, NO_PAD_CTRL) | ||
692 | #define MX35_PAD_LD13__GPIO2_13 IOMUX_PAD(0x648, 0x1e4, 5, 0x878, 0, NO_PAD_CTRL) | ||
693 | #define MX35_PAD_LD13__SDMA_SDMA_DEBUG_PC_13 IOMUX_PAD(0x648, 0x1e4, 6, 0x0, 0, NO_PAD_CTRL) | ||
694 | #define MX35_PAD_LD13__ARM11P_TOP_TRACE_6 IOMUX_PAD(0x648, 0x1e4, 7, 0x0, 0, NO_PAD_CTRL) | ||
695 | |||
696 | #define MX35_PAD_LD14__IPU_DISPB_DAT_14 IOMUX_PAD(0x64c, 0x1e8, 0, 0x0, 0, NO_PAD_CTRL) | ||
697 | #define MX35_PAD_LD14__GPIO2_14 IOMUX_PAD(0x64c, 0x1e8, 5, 0x87c, 0, NO_PAD_CTRL) | ||
698 | #define MX35_PAD_LD14__SDMA_SDMA_DEBUG_EVENT_CHANNEL_0 IOMUX_PAD(0x64c, 0x1e8, 6, 0x0, 0, NO_PAD_CTRL) | ||
699 | #define MX35_PAD_LD14__ARM11P_TOP_TRACE_7 IOMUX_PAD(0x64c, 0x1e8, 7, 0x0, 0, NO_PAD_CTRL) | ||
700 | |||
701 | #define MX35_PAD_LD15__IPU_DISPB_DAT_15 IOMUX_PAD(0x650, 0x1ec, 0, 0x0, 0, NO_PAD_CTRL) | ||
702 | #define MX35_PAD_LD15__GPIO2_15 IOMUX_PAD(0x650, 0x1ec, 5, 0x880, 0, NO_PAD_CTRL) | ||
703 | #define MX35_PAD_LD15__SDMA_SDMA_DEBUG_EVENT_CHANNEL_1 IOMUX_PAD(0x650, 0x1ec, 6, 0x0, 0, NO_PAD_CTRL) | ||
704 | #define MX35_PAD_LD15__ARM11P_TOP_TRACE_8 IOMUX_PAD(0x650, 0x1ec, 7, 0x0, 0, NO_PAD_CTRL) | ||
705 | |||
706 | #define MX35_PAD_LD16__IPU_DISPB_DAT_16 IOMUX_PAD(0x654, 0x1f0, 0, 0x0, 0, NO_PAD_CTRL) | ||
707 | #define MX35_PAD_LD16__IPU_DISPB_D12_VSYNC IOMUX_PAD(0x654, 0x1f0, 2, 0x928, 0, NO_PAD_CTRL) | ||
708 | #define MX35_PAD_LD16__GPIO2_16 IOMUX_PAD(0x654, 0x1f0, 5, 0x884, 0, NO_PAD_CTRL) | ||
709 | #define MX35_PAD_LD16__SDMA_SDMA_DEBUG_EVENT_CHANNEL_2 IOMUX_PAD(0x654, 0x1f0, 6, 0x0, 0, NO_PAD_CTRL) | ||
710 | #define MX35_PAD_LD16__ARM11P_TOP_TRACE_9 IOMUX_PAD(0x654, 0x1f0, 7, 0x0, 0, NO_PAD_CTRL) | ||
711 | |||
712 | #define MX35_PAD_LD17__IPU_DISPB_DAT_17 IOMUX_PAD(0x658, 0x1f4, 0, 0x0, 0, NO_PAD_CTRL) | ||
713 | #define MX35_PAD_LD17__IPU_DISPB_CS2 IOMUX_PAD(0x658, 0x1f4, 2, 0x0, 0, NO_PAD_CTRL) | ||
714 | #define MX35_PAD_LD17__GPIO2_17 IOMUX_PAD(0x658, 0x1f4, 5, 0x888, 0, NO_PAD_CTRL) | ||
715 | #define MX35_PAD_LD17__SDMA_SDMA_DEBUG_EVENT_CHANNEL_3 IOMUX_PAD(0x658, 0x1f4, 6, 0x0, 0, NO_PAD_CTRL) | ||
716 | #define MX35_PAD_LD17__ARM11P_TOP_TRACE_10 IOMUX_PAD(0x658, 0x1f4, 7, 0x0, 0, NO_PAD_CTRL) | ||
717 | |||
718 | #define MX35_PAD_LD18__IPU_DISPB_DAT_18 IOMUX_PAD(0x65c, 0x1f8, 0, 0x0, 0, NO_PAD_CTRL) | ||
719 | #define MX35_PAD_LD18__IPU_DISPB_D0_VSYNC IOMUX_PAD(0x65c, 0x1f8, 1, 0x924, 1, NO_PAD_CTRL) | ||
720 | #define MX35_PAD_LD18__IPU_DISPB_D12_VSYNC IOMUX_PAD(0x65c, 0x1f8, 2, 0x928, 1, NO_PAD_CTRL) | ||
721 | #define MX35_PAD_LD18__ESDHC3_CMD IOMUX_PAD(0x65c, 0x1f8, 3, 0x818, 0, NO_PAD_CTRL) | ||
722 | #define MX35_PAD_LD18__USB_TOP_USBOTG_DATA_3 IOMUX_PAD(0x65c, 0x1f8, 4, 0x9b0, 0, NO_PAD_CTRL) | ||
723 | #define MX35_PAD_LD18__GPIO3_24 IOMUX_PAD(0x65c, 0x1f8, 5, 0x0, 0, NO_PAD_CTRL) | ||
724 | #define MX35_PAD_LD18__SDMA_SDMA_DEBUG_EVENT_CHANNEL_4 IOMUX_PAD(0x65c, 0x1f8, 6, 0x0, 0, NO_PAD_CTRL) | ||
725 | #define MX35_PAD_LD18__ARM11P_TOP_TRACE_11 IOMUX_PAD(0x65c, 0x1f8, 7, 0x0, 0, NO_PAD_CTRL) | ||
726 | |||
727 | #define MX35_PAD_LD19__IPU_DISPB_DAT_19 IOMUX_PAD(0x660, 0x1fc, 0, 0x0, 0, NO_PAD_CTRL) | ||
728 | #define MX35_PAD_LD19__IPU_DISPB_BCLK IOMUX_PAD(0x660, 0x1fc, 1, 0x0, 0, NO_PAD_CTRL) | ||
729 | #define MX35_PAD_LD19__IPU_DISPB_CS1 IOMUX_PAD(0x660, 0x1fc, 2, 0x0, 0, NO_PAD_CTRL) | ||
730 | #define MX35_PAD_LD19__ESDHC3_CLK IOMUX_PAD(0x660, 0x1fc, 3, 0x814, 0, NO_PAD_CTRL) | ||
731 | #define MX35_PAD_LD19__USB_TOP_USBOTG_DIR IOMUX_PAD(0x660, 0x1fc, 4, 0x9c4, 0, NO_PAD_CTRL) | ||
732 | #define MX35_PAD_LD19__GPIO3_25 IOMUX_PAD(0x660, 0x1fc, 5, 0x0, 0, NO_PAD_CTRL) | ||
733 | #define MX35_PAD_LD19__SDMA_SDMA_DEBUG_EVENT_CHANNEL_5 IOMUX_PAD(0x660, 0x1fc, 6, 0x0, 0, NO_PAD_CTRL) | ||
734 | #define MX35_PAD_LD19__ARM11P_TOP_TRACE_12 IOMUX_PAD(0x660, 0x1fc, 7, 0x0, 0, NO_PAD_CTRL) | ||
735 | |||
736 | #define MX35_PAD_LD20__IPU_DISPB_DAT_20 IOMUX_PAD(0x664, 0x200, 0, 0x0, 0, NO_PAD_CTRL) | ||
737 | #define MX35_PAD_LD20__IPU_DISPB_CS0 IOMUX_PAD(0x664, 0x200, 1, 0x0, 0, NO_PAD_CTRL) | ||
738 | #define MX35_PAD_LD20__IPU_DISPB_SD_CLK IOMUX_PAD(0x664, 0x200, 2, 0x0, 0, NO_PAD_CTRL) | ||
739 | #define MX35_PAD_LD20__ESDHC3_DAT0 IOMUX_PAD(0x664, 0x200, 3, 0x81c, 0, NO_PAD_CTRL) | ||
740 | #define MX35_PAD_LD20__GPIO3_26 IOMUX_PAD(0x664, 0x200, 5, 0x0, 0, NO_PAD_CTRL) | ||
741 | #define MX35_PAD_LD20__SDMA_SDMA_DEBUG_CORE_STATUS_3 IOMUX_PAD(0x664, 0x200, 6, 0x0, 0, NO_PAD_CTRL) | ||
742 | #define MX35_PAD_LD20__ARM11P_TOP_TRACE_13 IOMUX_PAD(0x664, 0x200, 7, 0x0, 0, NO_PAD_CTRL) | ||
743 | |||
744 | #define MX35_PAD_LD21__IPU_DISPB_DAT_21 IOMUX_PAD(0x668, 0x204, 0, 0x0, 0, NO_PAD_CTRL) | ||
745 | #define MX35_PAD_LD21__IPU_DISPB_PAR_RS IOMUX_PAD(0x668, 0x204, 1, 0x0, 0, NO_PAD_CTRL) | ||
746 | #define MX35_PAD_LD21__IPU_DISPB_SER_RS IOMUX_PAD(0x668, 0x204, 2, 0x0, 0, NO_PAD_CTRL) | ||
747 | #define MX35_PAD_LD21__ESDHC3_DAT1 IOMUX_PAD(0x668, 0x204, 3, 0x820, 0, NO_PAD_CTRL) | ||
748 | #define MX35_PAD_LD21__USB_TOP_USBOTG_STP IOMUX_PAD(0x668, 0x204, 4, 0x0, 0, NO_PAD_CTRL) | ||
749 | #define MX35_PAD_LD21__GPIO3_27 IOMUX_PAD(0x668, 0x204, 5, 0x0, 0, NO_PAD_CTRL) | ||
750 | #define MX35_PAD_LD21__SDMA_DEBUG_EVENT_CHANNEL_SEL IOMUX_PAD(0x668, 0x204, 6, 0x0, 0, NO_PAD_CTRL) | ||
751 | #define MX35_PAD_LD21__ARM11P_TOP_TRACE_14 IOMUX_PAD(0x668, 0x204, 7, 0x0, 0, NO_PAD_CTRL) | ||
752 | |||
753 | #define MX35_PAD_LD22__IPU_DISPB_DAT_22 IOMUX_PAD(0x66c, 0x208, 0, 0x0, 0, NO_PAD_CTRL) | ||
754 | #define MX35_PAD_LD22__IPU_DISPB_WR IOMUX_PAD(0x66c, 0x208, 1, 0x0, 0, NO_PAD_CTRL) | ||
755 | #define MX35_PAD_LD22__IPU_DISPB_SD_D_I IOMUX_PAD(0x66c, 0x208, 2, 0x92c, 0, NO_PAD_CTRL) | ||
756 | #define MX35_PAD_LD22__ESDHC3_DAT2 IOMUX_PAD(0x66c, 0x208, 3, 0x824, 0, NO_PAD_CTRL) | ||
757 | #define MX35_PAD_LD22__USB_TOP_USBOTG_NXT IOMUX_PAD(0x66c, 0x208, 4, 0x9c8, 0, NO_PAD_CTRL) | ||
758 | #define MX35_PAD_LD22__GPIO3_28 IOMUX_PAD(0x66c, 0x208, 5, 0x0, 0, NO_PAD_CTRL) | ||
759 | #define MX35_PAD_LD22__SDMA_DEBUG_BUS_ERROR IOMUX_PAD(0x66c, 0x208, 6, 0x0, 0, NO_PAD_CTRL) | ||
760 | #define MX35_PAD_LD22__ARM11P_TOP_TRCTL IOMUX_PAD(0x66c, 0x208, 7, 0x0, 0, NO_PAD_CTRL) | ||
761 | |||
762 | #define MX35_PAD_LD23__IPU_DISPB_DAT_23 IOMUX_PAD(0x670, 0x20c, 0, 0x0, 0, NO_PAD_CTRL) | ||
763 | #define MX35_PAD_LD23__IPU_DISPB_RD IOMUX_PAD(0x670, 0x20c, 1, 0x0, 0, NO_PAD_CTRL) | ||
764 | #define MX35_PAD_LD23__IPU_DISPB_SD_D_IO IOMUX_PAD(0x670, 0x20c, 2, 0x92c, 1, NO_PAD_CTRL) | ||
765 | #define MX35_PAD_LD23__ESDHC3_DAT3 IOMUX_PAD(0x670, 0x20c, 3, 0x828, 0, NO_PAD_CTRL) | ||
766 | #define MX35_PAD_LD23__USB_TOP_USBOTG_DATA_7 IOMUX_PAD(0x670, 0x20c, 4, 0x9c0, 0, NO_PAD_CTRL) | ||
767 | #define MX35_PAD_LD23__GPIO3_29 IOMUX_PAD(0x670, 0x20c, 5, 0x0, 0, NO_PAD_CTRL) | ||
768 | #define MX35_PAD_LD23__SDMA_DEBUG_MATCHED_DMBUS IOMUX_PAD(0x670, 0x20c, 6, 0x0, 0, NO_PAD_CTRL) | ||
769 | #define MX35_PAD_LD23__ARM11P_TOP_TRCLK IOMUX_PAD(0x670, 0x20c, 7, 0x0, 0, NO_PAD_CTRL) | ||
770 | |||
771 | #define MX35_PAD_D3_HSYNC__IPU_DISPB_D3_HSYNC IOMUX_PAD(0x674, 0x210, 0, 0x0, 0, NO_PAD_CTRL) | ||
772 | #define MX35_PAD_D3_HSYNC__IPU_DISPB_SD_D_IO IOMUX_PAD(0x674, 0x210, 2, 0x92c, 2, NO_PAD_CTRL) | ||
773 | #define MX35_PAD_D3_HSYNC__GPIO3_30 IOMUX_PAD(0x674, 0x210, 5, 0x0, 0, NO_PAD_CTRL) | ||
774 | #define MX35_PAD_D3_HSYNC__SDMA_DEBUG_RTBUFFER_WRITE IOMUX_PAD(0x674, 0x210, 6, 0x0, 0, NO_PAD_CTRL) | ||
775 | #define MX35_PAD_D3_HSYNC__ARM11P_TOP_TRACE_15 IOMUX_PAD(0x674, 0x210, 7, 0x0, 0, NO_PAD_CTRL) | ||
776 | |||
777 | #define MX35_PAD_D3_FPSHIFT__IPU_DISPB_D3_CLK IOMUX_PAD(0x678, 0x214, 0, 0x0, 0, NO_PAD_CTRL) | ||
778 | #define MX35_PAD_D3_FPSHIFT__IPU_DISPB_SD_CLK IOMUX_PAD(0x678, 0x214, 2, 0x0, 0, NO_PAD_CTRL) | ||
779 | #define MX35_PAD_D3_FPSHIFT__GPIO3_31 IOMUX_PAD(0x678, 0x214, 5, 0x0, 0, NO_PAD_CTRL) | ||
780 | #define MX35_PAD_D3_FPSHIFT__SDMA_SDMA_DEBUG_CORE_STATUS_0 IOMUX_PAD(0x678, 0x214, 6, 0x0, 0, NO_PAD_CTRL) | ||
781 | #define MX35_PAD_D3_FPSHIFT__ARM11P_TOP_TRACE_16 IOMUX_PAD(0x678, 0x214, 7, 0x0, 0, NO_PAD_CTRL) | ||
782 | |||
783 | #define MX35_PAD_D3_DRDY__IPU_DISPB_D3_DRDY IOMUX_PAD(0x67c, 0x218, 0, 0x0, 0, NO_PAD_CTRL) | ||
784 | #define MX35_PAD_D3_DRDY__IPU_DISPB_SD_D_O IOMUX_PAD(0x67c, 0x218, 2, 0x0, 0, NO_PAD_CTRL) | ||
785 | #define MX35_PAD_D3_DRDY__GPIO1_0 IOMUX_PAD(0x67c, 0x218, 5, 0x82c, 2, NO_PAD_CTRL) | ||
786 | #define MX35_PAD_D3_DRDY__SDMA_SDMA_DEBUG_CORE_STATUS_1 IOMUX_PAD(0x67c, 0x218, 6, 0x0, 0, NO_PAD_CTRL) | ||
787 | #define MX35_PAD_D3_DRDY__ARM11P_TOP_TRACE_17 IOMUX_PAD(0x67c, 0x218, 7, 0x0, 0, NO_PAD_CTRL) | ||
788 | |||
789 | #define MX35_PAD_CONTRAST__IPU_DISPB_CONTR IOMUX_PAD(0x680, 0x21c, 0, 0x0, 0, NO_PAD_CTRL) | ||
790 | #define MX35_PAD_CONTRAST__GPIO1_1 IOMUX_PAD(0x680, 0x21c, 5, 0x838, 2, NO_PAD_CTRL) | ||
791 | #define MX35_PAD_CONTRAST__SDMA_SDMA_DEBUG_CORE_STATUS_2 IOMUX_PAD(0x680, 0x21c, 6, 0x0, 0, NO_PAD_CTRL) | ||
792 | #define MX35_PAD_CONTRAST__ARM11P_TOP_TRACE_18 IOMUX_PAD(0x680, 0x21c, 7, 0x0, 0, NO_PAD_CTRL) | ||
793 | |||
794 | #define MX35_PAD_D3_VSYNC__IPU_DISPB_D3_VSYNC IOMUX_PAD(0x684, 0x220, 0, 0x0, 0, NO_PAD_CTRL) | ||
795 | #define MX35_PAD_D3_VSYNC__IPU_DISPB_CS1 IOMUX_PAD(0x684, 0x220, 2, 0x0, 0, NO_PAD_CTRL) | ||
796 | #define MX35_PAD_D3_VSYNC__GPIO1_2 IOMUX_PAD(0x684, 0x220, 5, 0x848, 1, NO_PAD_CTRL) | ||
797 | #define MX35_PAD_D3_VSYNC__SDMA_DEBUG_YIELD IOMUX_PAD(0x684, 0x220, 6, 0x0, 0, NO_PAD_CTRL) | ||
798 | #define MX35_PAD_D3_VSYNC__ARM11P_TOP_TRACE_19 IOMUX_PAD(0x684, 0x220, 7, 0x0, 0, NO_PAD_CTRL) | ||
799 | |||
800 | #define MX35_PAD_D3_REV__IPU_DISPB_D3_REV IOMUX_PAD(0x688, 0x224, 0, 0x0, 0, NO_PAD_CTRL) | ||
801 | #define MX35_PAD_D3_REV__IPU_DISPB_SER_RS IOMUX_PAD(0x688, 0x224, 2, 0x0, 0, NO_PAD_CTRL) | ||
802 | #define MX35_PAD_D3_REV__GPIO1_3 IOMUX_PAD(0x688, 0x224, 5, 0x84c, 1, NO_PAD_CTRL) | ||
803 | #define MX35_PAD_D3_REV__SDMA_DEBUG_BUS_RWB IOMUX_PAD(0x688, 0x224, 6, 0x0, 0, NO_PAD_CTRL) | ||
804 | #define MX35_PAD_D3_REV__ARM11P_TOP_TRACE_20 IOMUX_PAD(0x688, 0x224, 7, 0x0, 0, NO_PAD_CTRL) | ||
805 | |||
806 | #define MX35_PAD_D3_CLS__IPU_DISPB_D3_CLS IOMUX_PAD(0x68c, 0x228, 0, 0x0, 0, NO_PAD_CTRL) | ||
807 | #define MX35_PAD_D3_CLS__IPU_DISPB_CS2 IOMUX_PAD(0x68c, 0x228, 2, 0x0, 0, NO_PAD_CTRL) | ||
808 | #define MX35_PAD_D3_CLS__GPIO1_4 IOMUX_PAD(0x68c, 0x228, 5, 0x850, 2, NO_PAD_CTRL) | ||
809 | #define MX35_PAD_D3_CLS__SDMA_DEBUG_BUS_DEVICE_0 IOMUX_PAD(0x68c, 0x228, 6, 0x0, 0, NO_PAD_CTRL) | ||
810 | #define MX35_PAD_D3_CLS__ARM11P_TOP_TRACE_21 IOMUX_PAD(0x68c, 0x228, 7, 0x0, 0, NO_PAD_CTRL) | ||
811 | |||
812 | #define MX35_PAD_D3_SPL__IPU_DISPB_D3_SPL IOMUX_PAD(0x690, 0x22c, 0, 0x0, 0, NO_PAD_CTRL) | ||
813 | #define MX35_PAD_D3_SPL__IPU_DISPB_D12_VSYNC IOMUX_PAD(0x690, 0x22c, 2, 0x928, 2, NO_PAD_CTRL) | ||
814 | #define MX35_PAD_D3_SPL__GPIO1_5 IOMUX_PAD(0x690, 0x22c, 5, 0x854, 2, NO_PAD_CTRL) | ||
815 | #define MX35_PAD_D3_SPL__SDMA_DEBUG_BUS_DEVICE_1 IOMUX_PAD(0x690, 0x22c, 6, 0x0, 0, NO_PAD_CTRL) | ||
816 | #define MX35_PAD_D3_SPL__ARM11P_TOP_TRACE_22 IOMUX_PAD(0x690, 0x22c, 7, 0x0, 0, NO_PAD_CTRL) | ||
817 | |||
818 | #define MX35_PAD_SD1_CMD__ESDHC1_CMD IOMUX_PAD(0x694, 0x230, 0, 0x0, 0, NO_PAD_CTRL) | ||
819 | #define MX35_PAD_SD1_CMD__MSHC_SCLK IOMUX_PAD(0x694, 0x230, 1, 0x0, 0, NO_PAD_CTRL) | ||
820 | #define MX35_PAD_SD1_CMD__IPU_DISPB_D0_VSYNC IOMUX_PAD(0x694, 0x230, 3, 0x924, 2, NO_PAD_CTRL) | ||
821 | #define MX35_PAD_SD1_CMD__USB_TOP_USBOTG_DATA_4 IOMUX_PAD(0x694, 0x230, 4, 0x9b4, 0, NO_PAD_CTRL) | ||
822 | #define MX35_PAD_SD1_CMD__GPIO1_6 IOMUX_PAD(0x694, 0x230, 5, 0x858, 2, NO_PAD_CTRL) | ||
823 | #define MX35_PAD_SD1_CMD__ARM11P_TOP_TRCTL IOMUX_PAD(0x694, 0x230, 7, 0x0, 0, NO_PAD_CTRL) | ||
824 | |||
825 | #define MX35_PAD_SD1_CLK__ESDHC1_CLK IOMUX_PAD(0x698, 0x234, 0, 0x0, 0, NO_PAD_CTRL) | ||
826 | #define MX35_PAD_SD1_CLK__MSHC_BS IOMUX_PAD(0x698, 0x234, 1, 0x0, 0, NO_PAD_CTRL) | ||
827 | #define MX35_PAD_SD1_CLK__IPU_DISPB_BCLK IOMUX_PAD(0x698, 0x234, 3, 0x0, 0, NO_PAD_CTRL) | ||
828 | #define MX35_PAD_SD1_CLK__USB_TOP_USBOTG_DATA_5 IOMUX_PAD(0x698, 0x234, 4, 0x9b8, 0, NO_PAD_CTRL) | ||
829 | #define MX35_PAD_SD1_CLK__GPIO1_7 IOMUX_PAD(0x698, 0x234, 5, 0x85c, 2, NO_PAD_CTRL) | ||
830 | #define MX35_PAD_SD1_CLK__ARM11P_TOP_TRCLK IOMUX_PAD(0x698, 0x234, 7, 0x0, 0, NO_PAD_CTRL) | ||
831 | |||
832 | #define MX35_PAD_SD1_DATA0__ESDHC1_DAT0 IOMUX_PAD(0x69c, 0x238, 0, 0x0, 0, NO_PAD_CTRL) | ||
833 | #define MX35_PAD_SD1_DATA0__MSHC_DATA_0 IOMUX_PAD(0x69c, 0x238, 1, 0x0, 0, NO_PAD_CTRL) | ||
834 | #define MX35_PAD_SD1_DATA0__IPU_DISPB_CS0 IOMUX_PAD(0x69c, 0x238, 3, 0x0, 0, NO_PAD_CTRL) | ||
835 | #define MX35_PAD_SD1_DATA0__USB_TOP_USBOTG_DATA_6 IOMUX_PAD(0x69c, 0x238, 4, 0x9bc, 0, NO_PAD_CTRL) | ||
836 | #define MX35_PAD_SD1_DATA0__GPIO1_8 IOMUX_PAD(0x69c, 0x238, 5, 0x860, 2, NO_PAD_CTRL) | ||
837 | #define MX35_PAD_SD1_DATA0__ARM11P_TOP_TRACE_23 IOMUX_PAD(0x69c, 0x238, 7, 0x0, 0, NO_PAD_CTRL) | ||
838 | |||
839 | #define MX35_PAD_SD1_DATA1__ESDHC1_DAT1 IOMUX_PAD(0x6a0, 0x23c, 0, 0x0, 0, NO_PAD_CTRL) | ||
840 | #define MX35_PAD_SD1_DATA1__MSHC_DATA_1 IOMUX_PAD(0x6a0, 0x23c, 1, 0x0, 0, NO_PAD_CTRL) | ||
841 | #define MX35_PAD_SD1_DATA1__IPU_DISPB_PAR_RS IOMUX_PAD(0x6a0, 0x23c, 3, 0x0, 0, NO_PAD_CTRL) | ||
842 | #define MX35_PAD_SD1_DATA1__USB_TOP_USBOTG_DATA_0 IOMUX_PAD(0x6a0, 0x23c, 4, 0x9a4, 0, NO_PAD_CTRL) | ||
843 | #define MX35_PAD_SD1_DATA1__GPIO1_9 IOMUX_PAD(0x6a0, 0x23c, 5, 0x864, 1, NO_PAD_CTRL) | ||
844 | #define MX35_PAD_SD1_DATA1__ARM11P_TOP_TRACE_24 IOMUX_PAD(0x6a0, 0x23c, 7, 0x0, 0, NO_PAD_CTRL) | ||
845 | |||
846 | #define MX35_PAD_SD1_DATA2__ESDHC1_DAT2 IOMUX_PAD(0x6a4, 0x240, 0, 0x0, 0, NO_PAD_CTRL) | ||
847 | #define MX35_PAD_SD1_DATA2__MSHC_DATA_2 IOMUX_PAD(0x6a4, 0x240, 1, 0x0, 0, NO_PAD_CTRL) | ||
848 | #define MX35_PAD_SD1_DATA2__IPU_DISPB_WR IOMUX_PAD(0x6a4, 0x240, 3, 0x0, 0, NO_PAD_CTRL) | ||
849 | #define MX35_PAD_SD1_DATA2__USB_TOP_USBOTG_DATA_1 IOMUX_PAD(0x6a4, 0x240, 4, 0x9a8, 0, NO_PAD_CTRL) | ||
850 | #define MX35_PAD_SD1_DATA2__GPIO1_10 IOMUX_PAD(0x6a4, 0x240, 5, 0x830, 1, NO_PAD_CTRL) | ||
851 | #define MX35_PAD_SD1_DATA2__ARM11P_TOP_TRACE_25 IOMUX_PAD(0x6a4, 0x240, 7, 0x0, 0, NO_PAD_CTRL) | ||
852 | |||
853 | #define MX35_PAD_SD1_DATA3__ESDHC1_DAT3 IOMUX_PAD(0x6a8, 0x244, 0, 0x0, 0, NO_PAD_CTRL) | ||
854 | #define MX35_PAD_SD1_DATA3__MSHC_DATA_3 IOMUX_PAD(0x6a8, 0x244, 1, 0x0, 0, NO_PAD_CTRL) | ||
855 | #define MX35_PAD_SD1_DATA3__IPU_DISPB_RD IOMUX_PAD(0x6a8, 0x244, 3, 0x0, 0, NO_PAD_CTRL) | ||
856 | #define MX35_PAD_SD1_DATA3__USB_TOP_USBOTG_DATA_2 IOMUX_PAD(0x6a8, 0x244, 4, 0x9ac, 0, NO_PAD_CTRL) | ||
857 | #define MX35_PAD_SD1_DATA3__GPIO1_11 IOMUX_PAD(0x6a8, 0x244, 5, 0x834, 1, NO_PAD_CTRL) | ||
858 | #define MX35_PAD_SD1_DATA3__ARM11P_TOP_TRACE_26 IOMUX_PAD(0x6a8, 0x244, 7, 0x0, 0, NO_PAD_CTRL) | ||
859 | |||
860 | #define MX35_PAD_SD2_CMD__ESDHC2_CMD IOMUX_PAD(0x6ac, 0x248, 0, 0x0, 0, NO_PAD_CTRL) | ||
861 | #define MX35_PAD_SD2_CMD__I2C3_SCL IOMUX_PAD(0x6ac, 0x248, 1, 0x91c, 2, NO_PAD_CTRL) | ||
862 | #define MX35_PAD_SD2_CMD__ESDHC1_DAT4 IOMUX_PAD(0x6ac, 0x248, 2, 0x804, 0, NO_PAD_CTRL) | ||
863 | #define MX35_PAD_SD2_CMD__IPU_CSI_D_2 IOMUX_PAD(0x6ac, 0x248, 3, 0x938, 2, NO_PAD_CTRL) | ||
864 | #define MX35_PAD_SD2_CMD__USB_TOP_USBH2_DATA_4 IOMUX_PAD(0x6ac, 0x248, 4, 0x9dc, 0, NO_PAD_CTRL) | ||
865 | #define MX35_PAD_SD2_CMD__GPIO2_0 IOMUX_PAD(0x6ac, 0x248, 5, 0x868, 2, NO_PAD_CTRL) | ||
866 | #define MX35_PAD_SD2_CMD__SPDIF_SPDIF_OUT1 IOMUX_PAD(0x6ac, 0x248, 6, 0x0, 0, NO_PAD_CTRL) | ||
867 | #define MX35_PAD_SD2_CMD__IPU_DISPB_D12_VSYNC IOMUX_PAD(0x6ac, 0x248, 7, 0x928, 3, NO_PAD_CTRL) | ||
868 | |||
869 | #define MX35_PAD_SD2_CLK__ESDHC2_CLK IOMUX_PAD(0x6b0, 0x24c, 0, 0x0, 0, NO_PAD_CTRL) | ||
870 | #define MX35_PAD_SD2_CLK__I2C3_SDA IOMUX_PAD(0x6b0, 0x24c, 1, 0x920, 2, NO_PAD_CTRL) | ||
871 | #define MX35_PAD_SD2_CLK__ESDHC1_DAT5 IOMUX_PAD(0x6b0, 0x24c, 2, 0x808, 0, NO_PAD_CTRL) | ||
872 | #define MX35_PAD_SD2_CLK__IPU_CSI_D_3 IOMUX_PAD(0x6b0, 0x24c, 3, 0x93c, 2, NO_PAD_CTRL) | ||
873 | #define MX35_PAD_SD2_CLK__USB_TOP_USBH2_DATA_5 IOMUX_PAD(0x6b0, 0x24c, 4, 0x9e0, 0, NO_PAD_CTRL) | ||
874 | #define MX35_PAD_SD2_CLK__GPIO2_1 IOMUX_PAD(0x6b0, 0x24c, 5, 0x894, 1, NO_PAD_CTRL) | ||
875 | #define MX35_PAD_SD2_CLK__SPDIF_SPDIF_IN1 IOMUX_PAD(0x6b0, 0x24c, 6, 0x998, 2, NO_PAD_CTRL) | ||
876 | #define MX35_PAD_SD2_CLK__IPU_DISPB_CS2 IOMUX_PAD(0x6b0, 0x24c, 7, 0x0, 0, NO_PAD_CTRL) | ||
877 | |||
878 | #define MX35_PAD_SD2_DATA0__ESDHC2_DAT0 IOMUX_PAD(0x6b4, 0x250, 0, 0x0, 0, NO_PAD_CTRL) | ||
879 | #define MX35_PAD_SD2_DATA0__UART3_RXD_MUX IOMUX_PAD(0x6b4, 0x250, 1, 0x9a0, 1, NO_PAD_CTRL) | ||
880 | #define MX35_PAD_SD2_DATA0__ESDHC1_DAT6 IOMUX_PAD(0x6b4, 0x250, 2, 0x80c, 0, NO_PAD_CTRL) | ||
881 | #define MX35_PAD_SD2_DATA0__IPU_CSI_D_4 IOMUX_PAD(0x6b4, 0x250, 3, 0x940, 1, NO_PAD_CTRL) | ||
882 | #define MX35_PAD_SD2_DATA0__USB_TOP_USBH2_DATA_6 IOMUX_PAD(0x6b4, 0x250, 4, 0x9e4, 0, NO_PAD_CTRL) | ||
883 | #define MX35_PAD_SD2_DATA0__GPIO2_2 IOMUX_PAD(0x6b4, 0x250, 5, 0x8c0, 1, NO_PAD_CTRL) | ||
884 | #define MX35_PAD_SD2_DATA0__SPDIF_SPDIF_EXTCLK IOMUX_PAD(0x6b4, 0x250, 6, 0x994, 3, NO_PAD_CTRL) | ||
885 | |||
886 | #define MX35_PAD_SD2_DATA1__ESDHC2_DAT1 IOMUX_PAD(0x6b8, 0x254, 0, 0x0, 0, NO_PAD_CTRL) | ||
887 | #define MX35_PAD_SD2_DATA1__UART3_TXD_MUX IOMUX_PAD(0x6b8, 0x254, 1, 0x0, 0, NO_PAD_CTRL) | ||
888 | #define MX35_PAD_SD2_DATA1__ESDHC1_DAT7 IOMUX_PAD(0x6b8, 0x254, 2, 0x810, 0, NO_PAD_CTRL) | ||
889 | #define MX35_PAD_SD2_DATA1__IPU_CSI_D_5 IOMUX_PAD(0x6b8, 0x254, 3, 0x944, 1, NO_PAD_CTRL) | ||
890 | #define MX35_PAD_SD2_DATA1__USB_TOP_USBH2_DATA_0 IOMUX_PAD(0x6b8, 0x254, 4, 0x9cc, 0, NO_PAD_CTRL) | ||
891 | #define MX35_PAD_SD2_DATA1__GPIO2_3 IOMUX_PAD(0x6b8, 0x254, 5, 0x8cc, 1, NO_PAD_CTRL) | ||
892 | |||
893 | #define MX35_PAD_SD2_DATA2__ESDHC2_DAT2 IOMUX_PAD(0x6bc, 0x258, 0, 0x0, 0, NO_PAD_CTRL) | ||
894 | #define MX35_PAD_SD2_DATA2__UART3_RTS IOMUX_PAD(0x6bc, 0x258, 1, 0x99c, 0, NO_PAD_CTRL) | ||
895 | #define MX35_PAD_SD2_DATA2__CAN1_RXCAN IOMUX_PAD(0x6bc, 0x258, 2, 0x7c8, 1, NO_PAD_CTRL) | ||
896 | #define MX35_PAD_SD2_DATA2__IPU_CSI_D_6 IOMUX_PAD(0x6bc, 0x258, 3, 0x948, 1, NO_PAD_CTRL) | ||
897 | #define MX35_PAD_SD2_DATA2__USB_TOP_USBH2_DATA_1 IOMUX_PAD(0x6bc, 0x258, 4, 0x9d0, 0, NO_PAD_CTRL) | ||
898 | #define MX35_PAD_SD2_DATA2__GPIO2_4 IOMUX_PAD(0x6bc, 0x258, 5, 0x8d0, 1, NO_PAD_CTRL) | ||
899 | |||
900 | #define MX35_PAD_SD2_DATA3__ESDHC2_DAT3 IOMUX_PAD(0x6c0, 0x25c, 0, 0x0, 0, NO_PAD_CTRL) | ||
901 | #define MX35_PAD_SD2_DATA3__UART3_CTS IOMUX_PAD(0x6c0, 0x25c, 1, 0x0, 0, NO_PAD_CTRL) | ||
902 | #define MX35_PAD_SD2_DATA3__CAN1_TXCAN IOMUX_PAD(0x6c0, 0x25c, 2, 0x0, 0, NO_PAD_CTRL) | ||
903 | #define MX35_PAD_SD2_DATA3__IPU_CSI_D_7 IOMUX_PAD(0x6c0, 0x25c, 3, 0x94c, 1, NO_PAD_CTRL) | ||
904 | #define MX35_PAD_SD2_DATA3__USB_TOP_USBH2_DATA_2 IOMUX_PAD(0x6c0, 0x25c, 4, 0x9d4, 0, NO_PAD_CTRL) | ||
905 | #define MX35_PAD_SD2_DATA3__GPIO2_5 IOMUX_PAD(0x6c0, 0x25c, 5, 0x8d4, 1, NO_PAD_CTRL) | ||
906 | |||
907 | #define MX35_PAD_ATA_CS0__ATA_CS0 IOMUX_PAD(0x6c4, 0x260, 0, 0x0, 0, NO_PAD_CTRL) | ||
908 | #define MX35_PAD_ATA_CS0__CSPI1_SS3 IOMUX_PAD(0x6c4, 0x260, 1, 0x7dc, 1, NO_PAD_CTRL) | ||
909 | #define MX35_PAD_ATA_CS0__IPU_DISPB_CS1 IOMUX_PAD(0x6c4, 0x260, 3, 0x0, 0, NO_PAD_CTRL) | ||
910 | #define MX35_PAD_ATA_CS0__GPIO2_6 IOMUX_PAD(0x6c4, 0x260, 5, 0x8d8, 1, NO_PAD_CTRL) | ||
911 | #define MX35_PAD_ATA_CS0__IPU_DIAGB_0 IOMUX_PAD(0x6c4, 0x260, 6, 0x0, 0, NO_PAD_CTRL) | ||
912 | #define MX35_PAD_ATA_CS0__ARM11P_TOP_MAX1_HMASTER_0 IOMUX_PAD(0x6c4, 0x260, 7, 0x0, 0, NO_PAD_CTRL) | ||
913 | |||
914 | #define MX35_PAD_ATA_CS1__ATA_CS1 IOMUX_PAD(0x6c8, 0x264, 0, 0x0, 0, NO_PAD_CTRL) | ||
915 | #define MX35_PAD_ATA_CS1__IPU_DISPB_CS2 IOMUX_PAD(0x6c8, 0x264, 3, 0x0, 0, NO_PAD_CTRL) | ||
916 | #define MX35_PAD_ATA_CS1__CSPI2_SS0 IOMUX_PAD(0x6c8, 0x264, 4, 0x7f0, 1, NO_PAD_CTRL) | ||
917 | #define MX35_PAD_ATA_CS1__GPIO2_7 IOMUX_PAD(0x6c8, 0x264, 5, 0x8dc, 1, NO_PAD_CTRL) | ||
918 | #define MX35_PAD_ATA_CS1__IPU_DIAGB_1 IOMUX_PAD(0x6c8, 0x264, 6, 0x0, 0, NO_PAD_CTRL) | ||
919 | #define MX35_PAD_ATA_CS1__ARM11P_TOP_MAX1_HMASTER_1 IOMUX_PAD(0x6c8, 0x264, 7, 0x0, 0, NO_PAD_CTRL) | ||
920 | |||
921 | #define MX35_PAD_ATA_DIOR__ATA_DIOR IOMUX_PAD(0x6cc, 0x268, 0, 0x0, 0, NO_PAD_CTRL) | ||
922 | #define MX35_PAD_ATA_DIOR__ESDHC3_DAT0 IOMUX_PAD(0x6cc, 0x268, 1, 0x81c, 1, NO_PAD_CTRL) | ||
923 | #define MX35_PAD_ATA_DIOR__USB_TOP_USBOTG_DIR IOMUX_PAD(0x6cc, 0x268, 2, 0x9c4, 1, NO_PAD_CTRL) | ||
924 | #define MX35_PAD_ATA_DIOR__IPU_DISPB_BE0 IOMUX_PAD(0x6cc, 0x268, 3, 0x0, 0, NO_PAD_CTRL) | ||
925 | #define MX35_PAD_ATA_DIOR__CSPI2_SS1 IOMUX_PAD(0x6cc, 0x268, 4, 0x7f4, 1, NO_PAD_CTRL) | ||
926 | #define MX35_PAD_ATA_DIOR__GPIO2_8 IOMUX_PAD(0x6cc, 0x268, 5, 0x8e0, 1, NO_PAD_CTRL) | ||
927 | #define MX35_PAD_ATA_DIOR__IPU_DIAGB_2 IOMUX_PAD(0x6cc, 0x268, 6, 0x0, 0, NO_PAD_CTRL) | ||
928 | #define MX35_PAD_ATA_DIOR__ARM11P_TOP_MAX1_HMASTER_2 IOMUX_PAD(0x6cc, 0x268, 7, 0x0, 0, NO_PAD_CTRL) | ||
929 | |||
930 | #define MX35_PAD_ATA_DIOW__ATA_DIOW IOMUX_PAD(0x6d0, 0x26c, 0, 0x0, 0, NO_PAD_CTRL) | ||
931 | #define MX35_PAD_ATA_DIOW__ESDHC3_DAT1 IOMUX_PAD(0x6d0, 0x26c, 1, 0x820, 1, NO_PAD_CTRL) | ||
932 | #define MX35_PAD_ATA_DIOW__USB_TOP_USBOTG_STP IOMUX_PAD(0x6d0, 0x26c, 2, 0x0, 0, NO_PAD_CTRL) | ||
933 | #define MX35_PAD_ATA_DIOW__IPU_DISPB_BE1 IOMUX_PAD(0x6d0, 0x26c, 3, 0x0, 0, NO_PAD_CTRL) | ||
934 | #define MX35_PAD_ATA_DIOW__CSPI2_MOSI IOMUX_PAD(0x6d0, 0x26c, 4, 0x7ec, 2, NO_PAD_CTRL) | ||
935 | #define MX35_PAD_ATA_DIOW__GPIO2_9 IOMUX_PAD(0x6d0, 0x26c, 5, 0x8e4, 1, NO_PAD_CTRL) | ||
936 | #define MX35_PAD_ATA_DIOW__IPU_DIAGB_3 IOMUX_PAD(0x6d0, 0x26c, 6, 0x0, 0, NO_PAD_CTRL) | ||
937 | #define MX35_PAD_ATA_DIOW__ARM11P_TOP_MAX1_HMASTER_3 IOMUX_PAD(0x6d0, 0x26c, 7, 0x0, 0, NO_PAD_CTRL) | ||
938 | |||
939 | #define MX35_PAD_ATA_DMACK__ATA_DMACK IOMUX_PAD(0x6d4, 0x270, 0, 0x0, 0, NO_PAD_CTRL) | ||
940 | #define MX35_PAD_ATA_DMACK__ESDHC3_DAT2 IOMUX_PAD(0x6d4, 0x270, 1, 0x824, 1, NO_PAD_CTRL) | ||
941 | #define MX35_PAD_ATA_DMACK__USB_TOP_USBOTG_NXT IOMUX_PAD(0x6d4, 0x270, 2, 0x9c8, 1, NO_PAD_CTRL) | ||
942 | #define MX35_PAD_ATA_DMACK__CSPI2_MISO IOMUX_PAD(0x6d4, 0x270, 4, 0x7e8, 2, NO_PAD_CTRL) | ||
943 | #define MX35_PAD_ATA_DMACK__GPIO2_10 IOMUX_PAD(0x6d4, 0x270, 5, 0x86c, 1, NO_PAD_CTRL) | ||
944 | #define MX35_PAD_ATA_DMACK__IPU_DIAGB_4 IOMUX_PAD(0x6d4, 0x270, 6, 0x0, 0, NO_PAD_CTRL) | ||
945 | #define MX35_PAD_ATA_DMACK__ARM11P_TOP_MAX0_HMASTER_0 IOMUX_PAD(0x6d4, 0x270, 7, 0x0, 0, NO_PAD_CTRL) | ||
946 | |||
947 | #define MX35_PAD_ATA_RESET_B__ATA_RESET_B IOMUX_PAD(0x6d8, 0x274, 0, 0x0, 0, NO_PAD_CTRL) | ||
948 | #define MX35_PAD_ATA_RESET_B__ESDHC3_DAT3 IOMUX_PAD(0x6d8, 0x274, 1, 0x828, 1, NO_PAD_CTRL) | ||
949 | #define MX35_PAD_ATA_RESET_B__USB_TOP_USBOTG_DATA_0 IOMUX_PAD(0x6d8, 0x274, 2, 0x9a4, 1, NO_PAD_CTRL) | ||
950 | #define MX35_PAD_ATA_RESET_B__IPU_DISPB_SD_D_O IOMUX_PAD(0x6d8, 0x274, 3, 0x0, 0, NO_PAD_CTRL) | ||
951 | #define MX35_PAD_ATA_RESET_B__CSPI2_RDY IOMUX_PAD(0x6d8, 0x274, 4, 0x7e4, 2, NO_PAD_CTRL) | ||
952 | #define MX35_PAD_ATA_RESET_B__GPIO2_11 IOMUX_PAD(0x6d8, 0x274, 5, 0x870, 1, NO_PAD_CTRL) | ||
953 | #define MX35_PAD_ATA_RESET_B__IPU_DIAGB_5 IOMUX_PAD(0x6d8, 0x274, 6, 0x0, 0, NO_PAD_CTRL) | ||
954 | #define MX35_PAD_ATA_RESET_B__ARM11P_TOP_MAX0_HMASTER_1 IOMUX_PAD(0x6d8, 0x274, 7, 0x0, 0, NO_PAD_CTRL) | ||
955 | |||
956 | #define MX35_PAD_ATA_IORDY__ATA_IORDY IOMUX_PAD(0x6dc, 0x278, 0, 0x0, 0, NO_PAD_CTRL) | ||
957 | #define MX35_PAD_ATA_IORDY__ESDHC3_DAT4 IOMUX_PAD(0x6dc, 0x278, 1, 0x0, 0, NO_PAD_CTRL) | ||
958 | #define MX35_PAD_ATA_IORDY__USB_TOP_USBOTG_DATA_1 IOMUX_PAD(0x6dc, 0x278, 2, 0x9a8, 1, NO_PAD_CTRL) | ||
959 | #define MX35_PAD_ATA_IORDY__IPU_DISPB_SD_D_IO IOMUX_PAD(0x6dc, 0x278, 3, 0x92c, 3, NO_PAD_CTRL) | ||
960 | #define MX35_PAD_ATA_IORDY__ESDHC2_DAT4 IOMUX_PAD(0x6dc, 0x278, 4, 0x0, 0, NO_PAD_CTRL) | ||
961 | #define MX35_PAD_ATA_IORDY__GPIO2_12 IOMUX_PAD(0x6dc, 0x278, 5, 0x874, 1, NO_PAD_CTRL) | ||
962 | #define MX35_PAD_ATA_IORDY__IPU_DIAGB_6 IOMUX_PAD(0x6dc, 0x278, 6, 0x0, 0, NO_PAD_CTRL) | ||
963 | #define MX35_PAD_ATA_IORDY__ARM11P_TOP_MAX0_HMASTER_2 IOMUX_PAD(0x6dc, 0x278, 7, 0x0, 0, NO_PAD_CTRL) | ||
964 | |||
965 | #define MX35_PAD_ATA_DATA0__ATA_DATA_0 IOMUX_PAD(0x6e0, 0x27c, 0, 0x0, 0, NO_PAD_CTRL) | ||
966 | #define MX35_PAD_ATA_DATA0__ESDHC3_DAT5 IOMUX_PAD(0x6e0, 0x27c, 1, 0x0, 0, NO_PAD_CTRL) | ||
967 | #define MX35_PAD_ATA_DATA0__USB_TOP_USBOTG_DATA_2 IOMUX_PAD(0x6e0, 0x27c, 2, 0x9ac, 1, NO_PAD_CTRL) | ||
968 | #define MX35_PAD_ATA_DATA0__IPU_DISPB_D12_VSYNC IOMUX_PAD(0x6e0, 0x27c, 3, 0x928, 4, NO_PAD_CTRL) | ||
969 | #define MX35_PAD_ATA_DATA0__ESDHC2_DAT5 IOMUX_PAD(0x6e0, 0x27c, 4, 0x0, 0, NO_PAD_CTRL) | ||
970 | #define MX35_PAD_ATA_DATA0__GPIO2_13 IOMUX_PAD(0x6e0, 0x27c, 5, 0x878, 1, NO_PAD_CTRL) | ||
971 | #define MX35_PAD_ATA_DATA0__IPU_DIAGB_7 IOMUX_PAD(0x6e0, 0x27c, 6, 0x0, 0, NO_PAD_CTRL) | ||
972 | #define MX35_PAD_ATA_DATA0__ARM11P_TOP_MAX0_HMASTER_3 IOMUX_PAD(0x6e0, 0x27c, 7, 0x0, 0, NO_PAD_CTRL) | ||
973 | |||
974 | #define MX35_PAD_ATA_DATA1__ATA_DATA_1 IOMUX_PAD(0x6e4, 0x280, 0, 0x0, 0, NO_PAD_CTRL) | ||
975 | #define MX35_PAD_ATA_DATA1__ESDHC3_DAT6 IOMUX_PAD(0x6e4, 0x280, 1, 0x0, 0, NO_PAD_CTRL) | ||
976 | #define MX35_PAD_ATA_DATA1__USB_TOP_USBOTG_DATA_3 IOMUX_PAD(0x6e4, 0x280, 2, 0x9b0, 1, NO_PAD_CTRL) | ||
977 | #define MX35_PAD_ATA_DATA1__IPU_DISPB_SD_CLK IOMUX_PAD(0x6e4, 0x280, 3, 0x0, 0, NO_PAD_CTRL) | ||
978 | #define MX35_PAD_ATA_DATA1__ESDHC2_DAT6 IOMUX_PAD(0x6e4, 0x280, 4, 0x0, 0, NO_PAD_CTRL) | ||
979 | #define MX35_PAD_ATA_DATA1__GPIO2_14 IOMUX_PAD(0x6e4, 0x280, 5, 0x87c, 1, NO_PAD_CTRL) | ||
980 | #define MX35_PAD_ATA_DATA1__IPU_DIAGB_8 IOMUX_PAD(0x6e4, 0x280, 6, 0x0, 0, NO_PAD_CTRL) | ||
981 | #define MX35_PAD_ATA_DATA1__ARM11P_TOP_TRACE_27 IOMUX_PAD(0x6e4, 0x280, 7, 0x0, 0, NO_PAD_CTRL) | ||
982 | |||
983 | #define MX35_PAD_ATA_DATA2__ATA_DATA_2 IOMUX_PAD(0x6e8, 0x284, 0, 0x0, 0, NO_PAD_CTRL) | ||
984 | #define MX35_PAD_ATA_DATA2__ESDHC3_DAT7 IOMUX_PAD(0x6e8, 0x284, 1, 0x0, 0, NO_PAD_CTRL) | ||
985 | #define MX35_PAD_ATA_DATA2__USB_TOP_USBOTG_DATA_4 IOMUX_PAD(0x6e8, 0x284, 2, 0x9b4, 1, NO_PAD_CTRL) | ||
986 | #define MX35_PAD_ATA_DATA2__IPU_DISPB_SER_RS IOMUX_PAD(0x6e8, 0x284, 3, 0x0, 0, NO_PAD_CTRL) | ||
987 | #define MX35_PAD_ATA_DATA2__ESDHC2_DAT7 IOMUX_PAD(0x6e8, 0x284, 4, 0x0, 0, NO_PAD_CTRL) | ||
988 | #define MX35_PAD_ATA_DATA2__GPIO2_15 IOMUX_PAD(0x6e8, 0x284, 5, 0x880, 1, NO_PAD_CTRL) | ||
989 | #define MX35_PAD_ATA_DATA2__IPU_DIAGB_9 IOMUX_PAD(0x6e8, 0x284, 6, 0x0, 0, NO_PAD_CTRL) | ||
990 | #define MX35_PAD_ATA_DATA2__ARM11P_TOP_TRACE_28 IOMUX_PAD(0x6e8, 0x284, 7, 0x0, 0, NO_PAD_CTRL) | ||
991 | |||
992 | #define MX35_PAD_ATA_DATA3__ATA_DATA_3 IOMUX_PAD(0x6e8, 0x288, 0, 0x0, 0, NO_PAD_CTRL) | ||
993 | #define MX35_PAD_ATA_DATA3__ESDHC3_CLK IOMUX_PAD(0x6e8, 0x288, 1, 0x814, 1, NO_PAD_CTRL) | ||
994 | #define MX35_PAD_ATA_DATA3__USB_TOP_USBOTG_DATA_5 IOMUX_PAD(0x6e8, 0x288, 2, 0x9b8, 1, NO_PAD_CTRL) | ||
995 | #define MX35_PAD_ATA_DATA3__CSPI2_SCLK IOMUX_PAD(0x6e8, 0x288, 4, 0x7e0, 2, NO_PAD_CTRL) | ||
996 | #define MX35_PAD_ATA_DATA3__GPIO2_16 IOMUX_PAD(0x6e8, 0x288, 5, 0x884, 1, NO_PAD_CTRL) | ||
997 | #define MX35_PAD_ATA_DATA3__IPU_DIAGB_10 IOMUX_PAD(0x6e8, 0x288, 6, 0x0, 0, NO_PAD_CTRL) | ||
998 | #define MX35_PAD_ATA_DATA3__ARM11P_TOP_TRACE_29 IOMUX_PAD(0x6e8, 0x288, 7, 0x0, 0, NO_PAD_CTRL) | ||
999 | |||
1000 | #define MX35_PAD_ATA_DATA4__ATA_DATA_4 IOMUX_PAD(0x6f0, 0x28c, 0, 0x0, 0, NO_PAD_CTRL) | ||
1001 | #define MX35_PAD_ATA_DATA4__ESDHC3_CMD IOMUX_PAD(0x6f0, 0x28c, 1, 0x818, 1, NO_PAD_CTRL) | ||
1002 | #define MX35_PAD_ATA_DATA4__USB_TOP_USBOTG_DATA_6 IOMUX_PAD(0x6f0, 0x28c, 2, 0x9bc, 1, NO_PAD_CTRL) | ||
1003 | #define MX35_PAD_ATA_DATA4__GPIO2_17 IOMUX_PAD(0x6f0, 0x28c, 5, 0x888, 1, NO_PAD_CTRL) | ||
1004 | #define MX35_PAD_ATA_DATA4__IPU_DIAGB_11 IOMUX_PAD(0x6f0, 0x28c, 6, 0x0, 0, NO_PAD_CTRL) | ||
1005 | #define MX35_PAD_ATA_DATA4__ARM11P_TOP_TRACE_30 IOMUX_PAD(0x6f0, 0x28c, 7, 0x0, 0, NO_PAD_CTRL) | ||
1006 | |||
1007 | #define MX35_PAD_ATA_DATA5__ATA_DATA_5 IOMUX_PAD(0x6f4, 0x290, 0, 0x0, 0, NO_PAD_CTRL) | ||
1008 | #define MX35_PAD_ATA_DATA5__USB_TOP_USBOTG_DATA_7 IOMUX_PAD(0x6f4, 0x290, 2, 0x9c0, 1, NO_PAD_CTRL) | ||
1009 | #define MX35_PAD_ATA_DATA5__GPIO2_18 IOMUX_PAD(0x6f4, 0x290, 5, 0x88c, 1, NO_PAD_CTRL) | ||
1010 | #define MX35_PAD_ATA_DATA5__IPU_DIAGB_12 IOMUX_PAD(0x6f4, 0x290, 6, 0x0, 0, NO_PAD_CTRL) | ||
1011 | #define MX35_PAD_ATA_DATA5__ARM11P_TOP_TRACE_31 IOMUX_PAD(0x6f4, 0x290, 7, 0x0, 0, NO_PAD_CTRL) | ||
1012 | |||
1013 | #define MX35_PAD_ATA_DATA6__ATA_DATA_6 IOMUX_PAD(0x6f8, 0x294, 0, 0x0, 0, NO_PAD_CTRL) | ||
1014 | #define MX35_PAD_ATA_DATA6__CAN1_TXCAN IOMUX_PAD(0x6f8, 0x294, 1, 0x0, 0, NO_PAD_CTRL) | ||
1015 | #define MX35_PAD_ATA_DATA6__UART1_DTR IOMUX_PAD(0x6f8, 0x294, 2, 0x0, 0, NO_PAD_CTRL) | ||
1016 | #define MX35_PAD_ATA_DATA6__AUDMUX_AUD6_TXD IOMUX_PAD(0x6f8, 0x294, 3, 0x7b4, 0, NO_PAD_CTRL) | ||
1017 | #define MX35_PAD_ATA_DATA6__GPIO2_19 IOMUX_PAD(0x6f8, 0x294, 5, 0x890, 1, NO_PAD_CTRL) | ||
1018 | #define MX35_PAD_ATA_DATA6__IPU_DIAGB_13 IOMUX_PAD(0x6f8, 0x294, 6, 0x0, 0, NO_PAD_CTRL) | ||
1019 | |||
1020 | #define MX35_PAD_ATA_DATA7__ATA_DATA_7 IOMUX_PAD(0x6fc, 0x298, 0, 0x0, 0, NO_PAD_CTRL) | ||
1021 | #define MX35_PAD_ATA_DATA7__CAN1_RXCAN IOMUX_PAD(0x6fc, 0x298, 1, 0x7c8, 2, NO_PAD_CTRL) | ||
1022 | #define MX35_PAD_ATA_DATA7__UART1_DSR IOMUX_PAD(0x6fc, 0x298, 2, 0x0, 0, NO_PAD_CTRL) | ||
1023 | #define MX35_PAD_ATA_DATA7__AUDMUX_AUD6_RXD IOMUX_PAD(0x6fc, 0x298, 3, 0x7b0, 0, NO_PAD_CTRL) | ||
1024 | #define MX35_PAD_ATA_DATA7__GPIO2_20 IOMUX_PAD(0x6fc, 0x298, 5, 0x898, 1, NO_PAD_CTRL) | ||
1025 | #define MX35_PAD_ATA_DATA7__IPU_DIAGB_14 IOMUX_PAD(0x6fc, 0x298, 6, 0x0, 0, NO_PAD_CTRL) | ||
1026 | |||
1027 | #define MX35_PAD_ATA_DATA8__ATA_DATA_8 IOMUX_PAD(0x700, 0x29c, 0, 0x0, 0, NO_PAD_CTRL) | ||
1028 | #define MX35_PAD_ATA_DATA8__UART3_RTS IOMUX_PAD(0x700, 0x29c, 1, 0x99c, 1, NO_PAD_CTRL) | ||
1029 | #define MX35_PAD_ATA_DATA8__UART1_RI IOMUX_PAD(0x700, 0x29c, 2, 0x0, 0, NO_PAD_CTRL) | ||
1030 | #define MX35_PAD_ATA_DATA8__AUDMUX_AUD6_TXC IOMUX_PAD(0x700, 0x29c, 3, 0x7c0, 0, NO_PAD_CTRL) | ||
1031 | #define MX35_PAD_ATA_DATA8__GPIO2_21 IOMUX_PAD(0x700, 0x29c, 5, 0x89c, 1, NO_PAD_CTRL) | ||
1032 | #define MX35_PAD_ATA_DATA8__IPU_DIAGB_15 IOMUX_PAD(0x700, 0x29c, 6, 0x0, 0, NO_PAD_CTRL) | ||
1033 | |||
1034 | #define MX35_PAD_ATA_DATA9__ATA_DATA_9 IOMUX_PAD(0x704, 0x2a0, 0, 0x0, 0, NO_PAD_CTRL) | ||
1035 | #define MX35_PAD_ATA_DATA9__UART3_CTS IOMUX_PAD(0x704, 0x2a0, 1, 0x0, 0, NO_PAD_CTRL) | ||
1036 | #define MX35_PAD_ATA_DATA9__UART1_DCD IOMUX_PAD(0x704, 0x2a0, 2, 0x0, 0, NO_PAD_CTRL) | ||
1037 | #define MX35_PAD_ATA_DATA9__AUDMUX_AUD6_TXFS IOMUX_PAD(0x704, 0x2a0, 3, 0x7c4, 0, NO_PAD_CTRL) | ||
1038 | #define MX35_PAD_ATA_DATA9__GPIO2_22 IOMUX_PAD(0x704, 0x2a0, 5, 0x8a0, 1, NO_PAD_CTRL) | ||
1039 | #define MX35_PAD_ATA_DATA9__IPU_DIAGB_16 IOMUX_PAD(0x704, 0x2a0, 6, 0x0, 0, NO_PAD_CTRL) | ||
1040 | |||
1041 | #define MX35_PAD_ATA_DATA10__ATA_DATA_10 IOMUX_PAD(0x708, 0x2a4, 0, 0x0, 0, NO_PAD_CTRL) | ||
1042 | #define MX35_PAD_ATA_DATA10__UART3_RXD_MUX IOMUX_PAD(0x708, 0x2a4, 1, 0x9a0, 2, NO_PAD_CTRL) | ||
1043 | #define MX35_PAD_ATA_DATA10__AUDMUX_AUD6_RXC IOMUX_PAD(0x708, 0x2a4, 3, 0x7b8, 0, NO_PAD_CTRL) | ||
1044 | #define MX35_PAD_ATA_DATA10__GPIO2_23 IOMUX_PAD(0x708, 0x2a4, 5, 0x8a4, 1, NO_PAD_CTRL) | ||
1045 | #define MX35_PAD_ATA_DATA10__IPU_DIAGB_17 IOMUX_PAD(0x708, 0x2a4, 6, 0x0, 0, NO_PAD_CTRL) | ||
1046 | |||
1047 | #define MX35_PAD_ATA_DATA11__ATA_DATA_11 IOMUX_PAD(0x70c, 0x2a8, 0, 0x0, 0, NO_PAD_CTRL) | ||
1048 | #define MX35_PAD_ATA_DATA11__UART3_TXD_MUX IOMUX_PAD(0x70c, 0x2a8, 1, 0x0, 0, NO_PAD_CTRL) | ||
1049 | #define MX35_PAD_ATA_DATA11__AUDMUX_AUD6_RXFS IOMUX_PAD(0x70c, 0x2a8, 3, 0x7bc, 0, NO_PAD_CTRL) | ||
1050 | #define MX35_PAD_ATA_DATA11__GPIO2_24 IOMUX_PAD(0x70c, 0x2a8, 5, 0x8a8, 1, NO_PAD_CTRL) | ||
1051 | #define MX35_PAD_ATA_DATA11__IPU_DIAGB_18 IOMUX_PAD(0x70c, 0x2a8, 6, 0x0, 0, NO_PAD_CTRL) | ||
1052 | |||
1053 | #define MX35_PAD_ATA_DATA12__ATA_DATA_12 IOMUX_PAD(0x710, 0x2ac, 0, 0x0, 0, NO_PAD_CTRL) | ||
1054 | #define MX35_PAD_ATA_DATA12__I2C3_SCL IOMUX_PAD(0x710, 0x2ac, 1, 0x91c, 3, NO_PAD_CTRL) | ||
1055 | #define MX35_PAD_ATA_DATA12__GPIO2_25 IOMUX_PAD(0x710, 0x2ac, 5, 0x8ac, 1, NO_PAD_CTRL) | ||
1056 | #define MX35_PAD_ATA_DATA12__IPU_DIAGB_19 IOMUX_PAD(0x710, 0x2ac, 6, 0x0, 0, NO_PAD_CTRL) | ||
1057 | |||
1058 | #define MX35_PAD_ATA_DATA13__ATA_DATA_13 IOMUX_PAD(0x714, 0x2b0, 0, 0x0, 0, NO_PAD_CTRL) | ||
1059 | #define MX35_PAD_ATA_DATA13__I2C3_SDA IOMUX_PAD(0x714, 0x2b0, 1, 0x920, 3, NO_PAD_CTRL) | ||
1060 | #define MX35_PAD_ATA_DATA13__GPIO2_26 IOMUX_PAD(0x714, 0x2b0, 5, 0x8b0, 1, NO_PAD_CTRL) | ||
1061 | #define MX35_PAD_ATA_DATA13__IPU_DIAGB_20 IOMUX_PAD(0x714, 0x2b0, 6, 0x0, 0, NO_PAD_CTRL) | ||
1062 | |||
1063 | #define MX35_PAD_ATA_DATA14__ATA_DATA_14 IOMUX_PAD(0x718, 0x2b4, 0, 0x0, 0, NO_PAD_CTRL) | ||
1064 | #define MX35_PAD_ATA_DATA14__IPU_CSI_D_0 IOMUX_PAD(0x718, 0x2b4, 1, 0x930, 2, NO_PAD_CTRL) | ||
1065 | #define MX35_PAD_ATA_DATA14__KPP_ROW_0 IOMUX_PAD(0x718, 0x2b4, 3, 0x970, 2, NO_PAD_CTRL) | ||
1066 | #define MX35_PAD_ATA_DATA14__GPIO2_27 IOMUX_PAD(0x718, 0x2b4, 5, 0x8b4, 1, NO_PAD_CTRL) | ||
1067 | #define MX35_PAD_ATA_DATA14__IPU_DIAGB_21 IOMUX_PAD(0x718, 0x2b4, 6, 0x0, 0, NO_PAD_CTRL) | ||
1068 | |||
1069 | #define MX35_PAD_ATA_DATA15__ATA_DATA_15 IOMUX_PAD(0x71c, 0x2b8, 0, 0x0, 0, NO_PAD_CTRL) | ||
1070 | #define MX35_PAD_ATA_DATA15__IPU_CSI_D_1 IOMUX_PAD(0x71c, 0x2b8, 1, 0x934, 2, NO_PAD_CTRL) | ||
1071 | #define MX35_PAD_ATA_DATA15__KPP_ROW_1 IOMUX_PAD(0x71c, 0x2b8, 3, 0x974, 2, NO_PAD_CTRL) | ||
1072 | #define MX35_PAD_ATA_DATA15__GPIO2_28 IOMUX_PAD(0x71c, 0x2b8, 5, 0x8b8, 1, NO_PAD_CTRL) | ||
1073 | #define MX35_PAD_ATA_DATA15__IPU_DIAGB_22 IOMUX_PAD(0x71c, 0x2b8, 6, 0x0, 0, NO_PAD_CTRL) | ||
1074 | |||
1075 | #define MX35_PAD_ATA_INTRQ__ATA_INTRQ IOMUX_PAD(0x720, 0x2bc, 0, 0x0, 0, NO_PAD_CTRL) | ||
1076 | #define MX35_PAD_ATA_INTRQ__IPU_CSI_D_2 IOMUX_PAD(0x720, 0x2bc, 1, 0x938, 3, NO_PAD_CTRL) | ||
1077 | #define MX35_PAD_ATA_INTRQ__KPP_ROW_2 IOMUX_PAD(0x720, 0x2bc, 3, 0x978, 2, NO_PAD_CTRL) | ||
1078 | #define MX35_PAD_ATA_INTRQ__GPIO2_29 IOMUX_PAD(0x720, 0x2bc, 5, 0x8bc, 1, NO_PAD_CTRL) | ||
1079 | #define MX35_PAD_ATA_INTRQ__IPU_DIAGB_23 IOMUX_PAD(0x720, 0x2bc, 6, 0x0, 0, NO_PAD_CTRL) | ||
1080 | |||
1081 | #define MX35_PAD_ATA_BUFF_EN__ATA_BUFFER_EN IOMUX_PAD(0x724, 0x2c0, 0, 0x0, 0, NO_PAD_CTRL) | ||
1082 | #define MX35_PAD_ATA_BUFF_EN__IPU_CSI_D_3 IOMUX_PAD(0x724, 0x2c0, 1, 0x93c, 3, NO_PAD_CTRL) | ||
1083 | #define MX35_PAD_ATA_BUFF_EN__KPP_ROW_3 IOMUX_PAD(0x724, 0x2c0, 3, 0x97c, 2, NO_PAD_CTRL) | ||
1084 | #define MX35_PAD_ATA_BUFF_EN__GPIO2_30 IOMUX_PAD(0x724, 0x2c0, 5, 0x8c4, 1, NO_PAD_CTRL) | ||
1085 | #define MX35_PAD_ATA_BUFF_EN__IPU_DIAGB_24 IOMUX_PAD(0x724, 0x2c0, 6, 0x0, 0, NO_PAD_CTRL) | ||
1086 | |||
1087 | #define MX35_PAD_ATA_DMARQ__ATA_DMARQ IOMUX_PAD(0x728, 0x2c4, 0, 0x0, 0, NO_PAD_CTRL) | ||
1088 | #define MX35_PAD_ATA_DMARQ__IPU_CSI_D_4 IOMUX_PAD(0x728, 0x2c4, 1, 0x940, 2, NO_PAD_CTRL) | ||
1089 | #define MX35_PAD_ATA_DMARQ__KPP_COL_0 IOMUX_PAD(0x728, 0x2c4, 3, 0x950, 2, NO_PAD_CTRL) | ||
1090 | #define MX35_PAD_ATA_DMARQ__GPIO2_31 IOMUX_PAD(0x728, 0x2c4, 5, 0x8c8, 1, NO_PAD_CTRL) | ||
1091 | #define MX35_PAD_ATA_DMARQ__IPU_DIAGB_25 IOMUX_PAD(0x728, 0x2c4, 6, 0x0, 0, NO_PAD_CTRL) | ||
1092 | #define MX35_PAD_ATA_DMARQ__ECT_CTI_TRIG_IN1_4 IOMUX_PAD(0x728, 0x2c4, 7, 0x0, 0, NO_PAD_CTRL) | ||
1093 | |||
1094 | #define MX35_PAD_ATA_DA0__ATA_DA_0 IOMUX_PAD(0x72c, 0x2c8, 0, 0x0, 0, NO_PAD_CTRL) | ||
1095 | #define MX35_PAD_ATA_DA0__IPU_CSI_D_5 IOMUX_PAD(0x72c, 0x2c8, 1, 0x944, 2, NO_PAD_CTRL) | ||
1096 | #define MX35_PAD_ATA_DA0__KPP_COL_1 IOMUX_PAD(0x72c, 0x2c8, 3, 0x954, 2, NO_PAD_CTRL) | ||
1097 | #define MX35_PAD_ATA_DA0__GPIO3_0 IOMUX_PAD(0x72c, 0x2c8, 5, 0x8e8, 1, NO_PAD_CTRL) | ||
1098 | #define MX35_PAD_ATA_DA0__IPU_DIAGB_26 IOMUX_PAD(0x72c, 0x2c8, 6, 0x0, 0, NO_PAD_CTRL) | ||
1099 | #define MX35_PAD_ATA_DA0__ECT_CTI_TRIG_IN1_5 IOMUX_PAD(0x72c, 0x2c8, 7, 0x0, 0, NO_PAD_CTRL) | ||
1100 | |||
1101 | #define MX35_PAD_ATA_DA1__ATA_DA_1 IOMUX_PAD(0x730, 0x2cc, 0, 0x0, 0, NO_PAD_CTRL) | ||
1102 | #define MX35_PAD_ATA_DA1__IPU_CSI_D_6 IOMUX_PAD(0x730, 0x2cc, 1, 0x948, 2, NO_PAD_CTRL) | ||
1103 | #define MX35_PAD_ATA_DA1__KPP_COL_2 IOMUX_PAD(0x730, 0x2cc, 3, 0x958, 2, NO_PAD_CTRL) | ||
1104 | #define MX35_PAD_ATA_DA1__GPIO3_1 IOMUX_PAD(0x730, 0x2cc, 5, 0x0, 0, NO_PAD_CTRL) | ||
1105 | #define MX35_PAD_ATA_DA1__IPU_DIAGB_27 IOMUX_PAD(0x730, 0x2cc, 6, 0x0, 0, NO_PAD_CTRL) | ||
1106 | #define MX35_PAD_ATA_DA1__ECT_CTI_TRIG_IN1_6 IOMUX_PAD(0x730, 0x2cc, 7, 0x0, 0, NO_PAD_CTRL) | ||
1107 | |||
1108 | #define MX35_PAD_ATA_DA2__ATA_DA_2 IOMUX_PAD(0x734, 0x2d0, 0, 0x0, 0, NO_PAD_CTRL) | ||
1109 | #define MX35_PAD_ATA_DA2__IPU_CSI_D_7 IOMUX_PAD(0x734, 0x2d0, 1, 0x94c, 2, NO_PAD_CTRL) | ||
1110 | #define MX35_PAD_ATA_DA2__KPP_COL_3 IOMUX_PAD(0x734, 0x2d0, 3, 0x95c, 2, NO_PAD_CTRL) | ||
1111 | #define MX35_PAD_ATA_DA2__GPIO3_2 IOMUX_PAD(0x734, 0x2d0, 5, 0x0, 0, NO_PAD_CTRL) | ||
1112 | #define MX35_PAD_ATA_DA2__IPU_DIAGB_28 IOMUX_PAD(0x734, 0x2d0, 6, 0x0, 0, NO_PAD_CTRL) | ||
1113 | #define MX35_PAD_ATA_DA2__ECT_CTI_TRIG_IN1_7 IOMUX_PAD(0x734, 0x2d0, 7, 0x0, 0, NO_PAD_CTRL) | ||
1114 | |||
1115 | #define MX35_PAD_MLB_CLK__MLB_MLBCLK IOMUX_PAD(0x738, 0x2d4, 0, 0x0, 0, NO_PAD_CTRL) | ||
1116 | #define MX35_PAD_MLB_CLK__GPIO3_3 IOMUX_PAD(0x738, 0x2d4, 5, 0x0, 0, NO_PAD_CTRL) | ||
1117 | |||
1118 | #define MX35_PAD_MLB_DAT__MLB_MLBDAT IOMUX_PAD(0x73c, 0x2d8, 0, 0x0, 0, NO_PAD_CTRL) | ||
1119 | #define MX35_PAD_MLB_DAT__GPIO3_4 IOMUX_PAD(0x73c, 0x2d8, 5, 0x904, 1, NO_PAD_CTRL) | ||
1120 | |||
1121 | #define MX35_PAD_MLB_SIG__MLB_MLBSIG IOMUX_PAD(0x740, 0x2dc, 0, 0x0, 0, NO_PAD_CTRL) | ||
1122 | #define MX35_PAD_MLB_SIG__GPIO3_5 IOMUX_PAD(0x740, 0x2dc, 5, 0x908, 1, NO_PAD_CTRL) | ||
1123 | |||
1124 | #define MX35_PAD_FEC_TX_CLK__FEC_TX_CLK IOMUX_PAD(0x744, 0x2e0, 0, 0x0, 0, NO_PAD_CTRL) | ||
1125 | #define MX35_PAD_FEC_TX_CLK__ESDHC1_DAT4 IOMUX_PAD(0x744, 0x2e0, 1, 0x804, 1, NO_PAD_CTRL) | ||
1126 | #define MX35_PAD_FEC_TX_CLK__UART3_RXD_MUX IOMUX_PAD(0x744, 0x2e0, 2, 0x9a0, 3, NO_PAD_CTRL) | ||
1127 | #define MX35_PAD_FEC_TX_CLK__USB_TOP_USBH2_DIR IOMUX_PAD(0x744, 0x2e0, 3, 0x9ec, 1, NO_PAD_CTRL) | ||
1128 | #define MX35_PAD_FEC_TX_CLK__CSPI2_MOSI IOMUX_PAD(0x744, 0x2e0, 4, 0x7ec, 3, NO_PAD_CTRL) | ||
1129 | #define MX35_PAD_FEC_TX_CLK__GPIO3_6 IOMUX_PAD(0x744, 0x2e0, 5, 0x90c, 1, NO_PAD_CTRL) | ||
1130 | #define MX35_PAD_FEC_TX_CLK__IPU_DISPB_D12_VSYNC IOMUX_PAD(0x744, 0x2e0, 6, 0x928, 5, NO_PAD_CTRL) | ||
1131 | #define MX35_PAD_FEC_TX_CLK__ARM11P_TOP_EVNTBUS_0 IOMUX_PAD(0x744, 0x2e0, 7, 0x0, 0, NO_PAD_CTRL) | ||
1132 | |||
1133 | #define MX35_PAD_FEC_RX_CLK__FEC_RX_CLK IOMUX_PAD(0x748, 0x2e4, 0, 0x0, 0, NO_PAD_CTRL) | ||
1134 | #define MX35_PAD_FEC_RX_CLK__ESDHC1_DAT5 IOMUX_PAD(0x748, 0x2e4, 1, 0x808, 1, NO_PAD_CTRL) | ||
1135 | #define MX35_PAD_FEC_RX_CLK__UART3_TXD_MUX IOMUX_PAD(0x748, 0x2e4, 2, 0x0, 0, NO_PAD_CTRL) | ||
1136 | #define MX35_PAD_FEC_RX_CLK__USB_TOP_USBH2_STP IOMUX_PAD(0x748, 0x2e4, 3, 0x0, 0, NO_PAD_CTRL) | ||
1137 | #define MX35_PAD_FEC_RX_CLK__CSPI2_MISO IOMUX_PAD(0x748, 0x2e4, 4, 0x7e8, 3, NO_PAD_CTRL) | ||
1138 | #define MX35_PAD_FEC_RX_CLK__GPIO3_7 IOMUX_PAD(0x748, 0x2e4, 5, 0x910, 1, NO_PAD_CTRL) | ||
1139 | #define MX35_PAD_FEC_RX_CLK__IPU_DISPB_SD_D_I IOMUX_PAD(0x748, 0x2e4, 6, 0x92c, 4, NO_PAD_CTRL) | ||
1140 | #define MX35_PAD_FEC_RX_CLK__ARM11P_TOP_EVNTBUS_1 IOMUX_PAD(0x748, 0x2e4, 7, 0x0, 0, NO_PAD_CTRL) | ||
1141 | |||
1142 | #define MX35_PAD_FEC_RX_DV__FEC_RX_DV IOMUX_PAD(0x74c, 0x2e8, 0, 0x0, 0, NO_PAD_CTRL) | ||
1143 | #define MX35_PAD_FEC_RX_DV__ESDHC1_DAT6 IOMUX_PAD(0x74c, 0x2e8, 1, 0x80c, 1, NO_PAD_CTRL) | ||
1144 | #define MX35_PAD_FEC_RX_DV__UART3_RTS IOMUX_PAD(0x74c, 0x2e8, 2, 0x99c, 2, NO_PAD_CTRL) | ||
1145 | #define MX35_PAD_FEC_RX_DV__USB_TOP_USBH2_NXT IOMUX_PAD(0x74c, 0x2e8, 3, 0x9f0, 1, NO_PAD_CTRL) | ||
1146 | #define MX35_PAD_FEC_RX_DV__CSPI2_SCLK IOMUX_PAD(0x74c, 0x2e8, 4, 0x7e0, 3, NO_PAD_CTRL) | ||
1147 | #define MX35_PAD_FEC_RX_DV__GPIO3_8 IOMUX_PAD(0x74c, 0x2e8, 5, 0x914, 1, NO_PAD_CTRL) | ||
1148 | #define MX35_PAD_FEC_RX_DV__IPU_DISPB_SD_CLK IOMUX_PAD(0x74c, 0x2e8, 6, 0x0, 0, NO_PAD_CTRL) | ||
1149 | #define MX35_PAD_FEC_RX_DV__ARM11P_TOP_EVNTBUS_2 IOMUX_PAD(0x74c, 0x2e8, 7, 0x0, 0, NO_PAD_CTRL) | ||
1150 | |||
1151 | #define MX35_PAD_FEC_COL__FEC_COL IOMUX_PAD(0x750, 0x2ec, 0, 0x0, 0, NO_PAD_CTRL) | ||
1152 | #define MX35_PAD_FEC_COL__ESDHC1_DAT7 IOMUX_PAD(0x750, 0x2ec, 1, 0x810, 1, NO_PAD_CTRL) | ||
1153 | #define MX35_PAD_FEC_COL__UART3_CTS IOMUX_PAD(0x750, 0x2ec, 2, 0x0, 0, NO_PAD_CTRL) | ||
1154 | #define MX35_PAD_FEC_COL__USB_TOP_USBH2_DATA_0 IOMUX_PAD(0x750, 0x2ec, 3, 0x9cc, 1, NO_PAD_CTRL) | ||
1155 | #define MX35_PAD_FEC_COL__CSPI2_RDY IOMUX_PAD(0x750, 0x2ec, 4, 0x7e4, 3, NO_PAD_CTRL) | ||
1156 | #define MX35_PAD_FEC_COL__GPIO3_9 IOMUX_PAD(0x750, 0x2ec, 5, 0x918, 1, NO_PAD_CTRL) | ||
1157 | #define MX35_PAD_FEC_COL__IPU_DISPB_SER_RS IOMUX_PAD(0x750, 0x2ec, 6, 0x0, 0, NO_PAD_CTRL) | ||
1158 | #define MX35_PAD_FEC_COL__ARM11P_TOP_EVNTBUS_3 IOMUX_PAD(0x750, 0x2ec, 7, 0x0, 0, NO_PAD_CTRL) | ||
1159 | |||
1160 | #define MX35_PAD_FEC_RDATA0__FEC_RDATA_0 IOMUX_PAD(0x754, 0x2f0, 0, 0x0, 0, NO_PAD_CTRL) | ||
1161 | #define MX35_PAD_FEC_RDATA0__PWM_PWMO IOMUX_PAD(0x754, 0x2f0, 1, 0x0, 0, NO_PAD_CTRL) | ||
1162 | #define MX35_PAD_FEC_RDATA0__UART3_DTR IOMUX_PAD(0x754, 0x2f0, 2, 0x0, 0, NO_PAD_CTRL) | ||
1163 | #define MX35_PAD_FEC_RDATA0__USB_TOP_USBH2_DATA_1 IOMUX_PAD(0x754, 0x2f0, 3, 0x9d0, 1, NO_PAD_CTRL) | ||
1164 | #define MX35_PAD_FEC_RDATA0__CSPI2_SS0 IOMUX_PAD(0x754, 0x2f0, 4, 0x7f0, 2, NO_PAD_CTRL) | ||
1165 | #define MX35_PAD_FEC_RDATA0__GPIO3_10 IOMUX_PAD(0x754, 0x2f0, 5, 0x8ec, 1, NO_PAD_CTRL) | ||
1166 | #define MX35_PAD_FEC_RDATA0__IPU_DISPB_CS1 IOMUX_PAD(0x754, 0x2f0, 6, 0x0, 0, NO_PAD_CTRL) | ||
1167 | #define MX35_PAD_FEC_RDATA0__ARM11P_TOP_EVNTBUS_4 IOMUX_PAD(0x754, 0x2f0, 7, 0x0, 0, NO_PAD_CTRL) | ||
1168 | |||
1169 | #define MX35_PAD_FEC_TDATA0__FEC_TDATA_0 IOMUX_PAD(0x758, 0x2f4, 0, 0x0, 0, NO_PAD_CTRL) | ||
1170 | #define MX35_PAD_FEC_TDATA0__SPDIF_SPDIF_OUT1 IOMUX_PAD(0x758, 0x2f4, 1, 0x0, 0, NO_PAD_CTRL) | ||
1171 | #define MX35_PAD_FEC_TDATA0__UART3_DSR IOMUX_PAD(0x758, 0x2f4, 2, 0x0, 0, NO_PAD_CTRL) | ||
1172 | #define MX35_PAD_FEC_TDATA0__USB_TOP_USBH2_DATA_2 IOMUX_PAD(0x758, 0x2f4, 3, 0x9d4, 1, NO_PAD_CTRL) | ||
1173 | #define MX35_PAD_FEC_TDATA0__CSPI2_SS1 IOMUX_PAD(0x758, 0x2f4, 4, 0x7f4, 2, NO_PAD_CTRL) | ||
1174 | #define MX35_PAD_FEC_TDATA0__GPIO3_11 IOMUX_PAD(0x758, 0x2f4, 5, 0x8f0, 1, NO_PAD_CTRL) | ||
1175 | #define MX35_PAD_FEC_TDATA0__IPU_DISPB_CS0 IOMUX_PAD(0x758, 0x2f4, 6, 0x0, 0, NO_PAD_CTRL) | ||
1176 | #define MX35_PAD_FEC_TDATA0__ARM11P_TOP_EVNTBUS_5 IOMUX_PAD(0x758, 0x2f4, 7, 0x0, 0, NO_PAD_CTRL) | ||
1177 | |||
1178 | #define MX35_PAD_FEC_TX_EN__FEC_TX_EN IOMUX_PAD(0x75c, 0x2f8, 0, 0x0, 0, NO_PAD_CTRL) | ||
1179 | #define MX35_PAD_FEC_TX_EN__SPDIF_SPDIF_IN1 IOMUX_PAD(0x75c, 0x2f8, 1, 0x998, 3, NO_PAD_CTRL) | ||
1180 | #define MX35_PAD_FEC_TX_EN__UART3_RI IOMUX_PAD(0x75c, 0x2f8, 2, 0x0, 0, NO_PAD_CTRL) | ||
1181 | #define MX35_PAD_FEC_TX_EN__USB_TOP_USBH2_DATA_3 IOMUX_PAD(0x75c, 0x2f8, 3, 0x9d8, 1, NO_PAD_CTRL) | ||
1182 | #define MX35_PAD_FEC_TX_EN__GPIO3_12 IOMUX_PAD(0x75c, 0x2f8, 5, 0x8f4, 1, NO_PAD_CTRL) | ||
1183 | #define MX35_PAD_FEC_TX_EN__IPU_DISPB_PAR_RS IOMUX_PAD(0x75c, 0x2f8, 6, 0x0, 0, NO_PAD_CTRL) | ||
1184 | #define MX35_PAD_FEC_TX_EN__ARM11P_TOP_EVNTBUS_6 IOMUX_PAD(0x75c, 0x2f8, 7, 0x0, 0, NO_PAD_CTRL) | ||
1185 | |||
1186 | #define MX35_PAD_FEC_MDC__FEC_MDC IOMUX_PAD(0x760, 0x2fc, 0, 0x0, 0, NO_PAD_CTRL) | ||
1187 | #define MX35_PAD_FEC_MDC__CAN2_TXCAN IOMUX_PAD(0x760, 0x2fc, 1, 0x0, 0, NO_PAD_CTRL) | ||
1188 | #define MX35_PAD_FEC_MDC__UART3_DCD IOMUX_PAD(0x760, 0x2fc, 2, 0x0, 0, NO_PAD_CTRL) | ||
1189 | #define MX35_PAD_FEC_MDC__USB_TOP_USBH2_DATA_4 IOMUX_PAD(0x760, 0x2fc, 3, 0x9dc, 1, NO_PAD_CTRL) | ||
1190 | #define MX35_PAD_FEC_MDC__GPIO3_13 IOMUX_PAD(0x760, 0x2fc, 5, 0x8f8, 1, NO_PAD_CTRL) | ||
1191 | #define MX35_PAD_FEC_MDC__IPU_DISPB_WR IOMUX_PAD(0x760, 0x2fc, 6, 0x0, 0, NO_PAD_CTRL) | ||
1192 | #define MX35_PAD_FEC_MDC__ARM11P_TOP_EVNTBUS_7 IOMUX_PAD(0x760, 0x2fc, 7, 0x0, 0, NO_PAD_CTRL) | ||
1193 | |||
1194 | #define MX35_PAD_FEC_MDIO__FEC_MDIO IOMUX_PAD(0x764, 0x300, 0, 0x0, 0, NO_PAD_CTRL) | ||
1195 | #define MX35_PAD_FEC_MDIO__CAN2_RXCAN IOMUX_PAD(0x764, 0x300, 1, 0x7cc, 2, NO_PAD_CTRL) | ||
1196 | #define MX35_PAD_FEC_MDIO__USB_TOP_USBH2_DATA_5 IOMUX_PAD(0x764, 0x300, 3, 0x9e0, 1, NO_PAD_CTRL) | ||
1197 | #define MX35_PAD_FEC_MDIO__GPIO3_14 IOMUX_PAD(0x764, 0x300, 5, 0x8fc, 1, NO_PAD_CTRL) | ||
1198 | #define MX35_PAD_FEC_MDIO__IPU_DISPB_RD IOMUX_PAD(0x764, 0x300, 6, 0x0, 0, NO_PAD_CTRL) | ||
1199 | #define MX35_PAD_FEC_MDIO__ARM11P_TOP_EVNTBUS_8 IOMUX_PAD(0x764, 0x300, 7, 0x0, 0, NO_PAD_CTRL) | ||
1200 | |||
1201 | #define MX35_PAD_FEC_TX_ERR__FEC_TX_ERR IOMUX_PAD(0x768, 0x304, 0, 0x0, 0, NO_PAD_CTRL) | ||
1202 | #define MX35_PAD_FEC_TX_ERR__OWIRE_LINE IOMUX_PAD(0x768, 0x304, 1, 0x990, 2, NO_PAD_CTRL) | ||
1203 | #define MX35_PAD_FEC_TX_ERR__SPDIF_SPDIF_EXTCLK IOMUX_PAD(0x768, 0x304, 2, 0x994, 4, NO_PAD_CTRL) | ||
1204 | #define MX35_PAD_FEC_TX_ERR__USB_TOP_USBH2_DATA_6 IOMUX_PAD(0x768, 0x304, 3, 0x9e4, 1, NO_PAD_CTRL) | ||
1205 | #define MX35_PAD_FEC_TX_ERR__GPIO3_15 IOMUX_PAD(0x768, 0x304, 5, 0x900, 1, NO_PAD_CTRL) | ||
1206 | #define MX35_PAD_FEC_TX_ERR__IPU_DISPB_D0_VSYNC IOMUX_PAD(0x768, 0x304, 6, 0x924, 3, NO_PAD_CTRL) | ||
1207 | #define MX35_PAD_FEC_TX_ERR__ARM11P_TOP_EVNTBUS_9 IOMUX_PAD(0x768, 0x304, 7, 0x0, 0, NO_PAD_CTRL) | ||
1208 | |||
1209 | #define MX35_PAD_FEC_RX_ERR__FEC_RX_ERR IOMUX_PAD(0x76c, 0x308, 0, 0x0, 0, NO_PAD_CTRL) | ||
1210 | #define MX35_PAD_FEC_RX_ERR__IPU_CSI_D_0 IOMUX_PAD(0x76c, 0x308, 1, 0x930, 3, NO_PAD_CTRL) | ||
1211 | #define MX35_PAD_FEC_RX_ERR__USB_TOP_USBH2_DATA_7 IOMUX_PAD(0x76c, 0x308, 3, 0x9e8, 1, NO_PAD_CTRL) | ||
1212 | #define MX35_PAD_FEC_RX_ERR__KPP_COL_4 IOMUX_PAD(0x76c, 0x308, 4, 0x960, 1, NO_PAD_CTRL) | ||
1213 | #define MX35_PAD_FEC_RX_ERR__GPIO3_16 IOMUX_PAD(0x76c, 0x308, 5, 0x0, 0, NO_PAD_CTRL) | ||
1214 | #define MX35_PAD_FEC_RX_ERR__IPU_DISPB_SD_D_IO IOMUX_PAD(0x76c, 0x308, 6, 0x92c, 5, NO_PAD_CTRL) | ||
1215 | |||
1216 | #define MX35_PAD_FEC_CRS__FEC_CRS IOMUX_PAD(0x770, 0x30c, 0, 0x0, 0, NO_PAD_CTRL) | ||
1217 | #define MX35_PAD_FEC_CRS__IPU_CSI_D_1 IOMUX_PAD(0x770, 0x30c, 1, 0x934, 3, NO_PAD_CTRL) | ||
1218 | #define MX35_PAD_FEC_CRS__USB_TOP_USBH2_PWR IOMUX_PAD(0x770, 0x30c, 3, 0x0, 0, NO_PAD_CTRL) | ||
1219 | #define MX35_PAD_FEC_CRS__KPP_COL_5 IOMUX_PAD(0x770, 0x30c, 4, 0x964, 1, NO_PAD_CTRL) | ||
1220 | #define MX35_PAD_FEC_CRS__GPIO3_17 IOMUX_PAD(0x770, 0x30c, 5, 0x0, 0, NO_PAD_CTRL) | ||
1221 | #define MX35_PAD_FEC_CRS__IPU_FLASH_STROBE IOMUX_PAD(0x770, 0x30c, 6, 0x0, 0, NO_PAD_CTRL) | ||
1222 | |||
1223 | #define MX35_PAD_FEC_RDATA1__FEC_RDATA_1 IOMUX_PAD(0x774, 0x310, 0, 0x0, 0, NO_PAD_CTRL) | ||
1224 | #define MX35_PAD_FEC_RDATA1__IPU_CSI_D_2 IOMUX_PAD(0x774, 0x310, 1, 0x938, 4, NO_PAD_CTRL) | ||
1225 | #define MX35_PAD_FEC_RDATA1__AUDMUX_AUD6_RXC IOMUX_PAD(0x774, 0x310, 2, 0x0, 0, NO_PAD_CTRL) | ||
1226 | #define MX35_PAD_FEC_RDATA1__USB_TOP_USBH2_OC IOMUX_PAD(0x774, 0x310, 3, 0x9f4, 2, NO_PAD_CTRL) | ||
1227 | #define MX35_PAD_FEC_RDATA1__KPP_COL_6 IOMUX_PAD(0x774, 0x310, 4, 0x968, 1, NO_PAD_CTRL) | ||
1228 | #define MX35_PAD_FEC_RDATA1__GPIO3_18 IOMUX_PAD(0x774, 0x310, 5, 0x0, 0, NO_PAD_CTRL) | ||
1229 | #define MX35_PAD_FEC_RDATA1__IPU_DISPB_BE0 IOMUX_PAD(0x774, 0x310, 6, 0x0, 0, NO_PAD_CTRL) | ||
1230 | |||
1231 | #define MX35_PAD_FEC_TDATA1__FEC_TDATA_1 IOMUX_PAD(0x778, 0x314, 0, 0x0, 0, NO_PAD_CTRL) | ||
1232 | #define MX35_PAD_FEC_TDATA1__IPU_CSI_D_3 IOMUX_PAD(0x778, 0x314, 1, 0x93c, 4, NO_PAD_CTRL) | ||
1233 | #define MX35_PAD_FEC_TDATA1__AUDMUX_AUD6_RXFS IOMUX_PAD(0x778, 0x314, 2, 0x7bc, 1, NO_PAD_CTRL) | ||
1234 | #define MX35_PAD_FEC_TDATA1__KPP_COL_7 IOMUX_PAD(0x778, 0x314, 4, 0x96c, 1, NO_PAD_CTRL) | ||
1235 | #define MX35_PAD_FEC_TDATA1__GPIO3_19 IOMUX_PAD(0x778, 0x314, 5, 0x0, 0, NO_PAD_CTRL) | ||
1236 | #define MX35_PAD_FEC_TDATA1__IPU_DISPB_BE1 IOMUX_PAD(0x778, 0x314, 6, 0x0, 0, NO_PAD_CTRL) | ||
1237 | |||
1238 | #define MX35_PAD_FEC_RDATA2__FEC_RDATA_2 IOMUX_PAD(0x77c, 0x318, 0, 0x0, 0, NO_PAD_CTRL) | ||
1239 | #define MX35_PAD_FEC_RDATA2__IPU_CSI_D_4 IOMUX_PAD(0x77c, 0x318, 1, 0x940, 3, NO_PAD_CTRL) | ||
1240 | #define MX35_PAD_FEC_RDATA2__AUDMUX_AUD6_TXD IOMUX_PAD(0x77c, 0x318, 2, 0x7b4, 1, NO_PAD_CTRL) | ||
1241 | #define MX35_PAD_FEC_RDATA2__KPP_ROW_4 IOMUX_PAD(0x77c, 0x318, 4, 0x980, 1, NO_PAD_CTRL) | ||
1242 | #define MX35_PAD_FEC_RDATA2__GPIO3_20 IOMUX_PAD(0x77c, 0x318, 5, 0x0, 0, NO_PAD_CTRL) | ||
1243 | |||
1244 | #define MX35_PAD_FEC_TDATA2__FEC_TDATA_2 IOMUX_PAD(0x780, 0x31c, 0, 0x0, 0, NO_PAD_CTRL) | ||
1245 | #define MX35_PAD_FEC_TDATA2__IPU_CSI_D_5 IOMUX_PAD(0x780, 0x31c, 1, 0x944, 3, NO_PAD_CTRL) | ||
1246 | #define MX35_PAD_FEC_TDATA2__AUDMUX_AUD6_RXD IOMUX_PAD(0x780, 0x31c, 2, 0x7b0, 1, NO_PAD_CTRL) | ||
1247 | #define MX35_PAD_FEC_TDATA2__KPP_ROW_5 IOMUX_PAD(0x780, 0x31c, 4, 0x984, 1, NO_PAD_CTRL) | ||
1248 | #define MX35_PAD_FEC_TDATA2__GPIO3_21 IOMUX_PAD(0x780, 0x31c, 5, 0x0, 0, NO_PAD_CTRL) | ||
1249 | |||
1250 | #define MX35_PAD_FEC_RDATA3__FEC_RDATA_3 IOMUX_PAD(0x784, 0x320, 0, 0x0, 0, NO_PAD_CTRL) | ||
1251 | #define MX35_PAD_FEC_RDATA3__IPU_CSI_D_6 IOMUX_PAD(0x784, 0x320, 1, 0x948, 3, NO_PAD_CTRL) | ||
1252 | #define MX35_PAD_FEC_RDATA3__AUDMUX_AUD6_TXC IOMUX_PAD(0x784, 0x320, 2, 0x7c0, 1, NO_PAD_CTRL) | ||
1253 | #define MX35_PAD_FEC_RDATA3__KPP_ROW_6 IOMUX_PAD(0x784, 0x320, 4, 0x988, 1, NO_PAD_CTRL) | ||
1254 | #define MX35_PAD_FEC_RDATA3__GPIO3_22 IOMUX_PAD(0x784, 0x320, 6, 0x0, 0, NO_PAD_CTRL) | ||
1255 | |||
1256 | #define MX35_PAD_FEC_TDATA3__FEC_TDATA_3 IOMUX_PAD(0x788, 0x324, 0, 0x0, 0, NO_PAD_CTRL) | ||
1257 | #define MX35_PAD_FEC_TDATA3__IPU_CSI_D_7 IOMUX_PAD(0x788, 0x324, 1, 0x94c, 3, NO_PAD_CTRL) | ||
1258 | #define MX35_PAD_FEC_TDATA3__AUDMUX_AUD6_TXFS IOMUX_PAD(0x788, 0x324, 2, 0x7c4, 1, NO_PAD_CTRL) | ||
1259 | #define MX35_PAD_FEC_TDATA3__KPP_ROW_7 IOMUX_PAD(0x788, 0x324, 4, 0x98c, 1, NO_PAD_CTRL) | ||
1260 | #define MX35_PAD_FEC_TDATA3__GPIO3_23 IOMUX_PAD(0x788, 0x324, 5, 0x0, 0, NO_PAD_CTRL) | ||
1261 | |||
1262 | #define MX35_PAD_EXT_ARMCLK__CCM_EXT_ARMCLK IOMUX_PAD(0x78c, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
1263 | |||
1264 | #define MX35_PAD_TEST_MODE__TCU_TEST_MODE IOMUX_PAD(0x790, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
1265 | |||
1266 | |||
1267 | #endif /* __MACH_IOMUX_MX35_H__ */ | ||
diff --git a/arch/arm/plat-mxc/include/mach/iomux-v3.h b/arch/arm/plat-mxc/include/mach/iomux-v3.h new file mode 100644 index 000000000000..7cd84547658f --- /dev/null +++ b/arch/arm/plat-mxc/include/mach/iomux-v3.h | |||
@@ -0,0 +1,121 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009 by Jan Weitzel Phytec Messtechnik GmbH, | ||
3 | * <armlinux@phytec.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or | ||
6 | * modify it under the terms of the GNU General Public License | ||
7 | * as published by the Free Software Foundation; either version 2 | ||
8 | * of the License, or (at your option) any later version. | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
17 | * MA 02110-1301, USA. | ||
18 | */ | ||
19 | |||
20 | #ifndef __MACH_IOMUX_V3_H__ | ||
21 | #define __MACH_IOMUX_V3_H__ | ||
22 | |||
23 | /* | ||
24 | * build IOMUX_PAD structure | ||
25 | * | ||
26 | * This iomux scheme is based around pads, which are the physical balls | ||
27 | * on the processor. | ||
28 | * | ||
29 | * - Each pad has a pad control register (IOMUXC_SW_PAD_CTRL_x) which controls | ||
30 | * things like driving strength and pullup/pulldown. | ||
31 | * - Each pad can have but not necessarily does have an output routing register | ||
32 | * (IOMUXC_SW_MUX_CTL_PAD_x). | ||
33 | * - Each pad can have but not necessarily does have an input routing register | ||
34 | * (IOMUXC_x_SELECT_INPUT) | ||
35 | * | ||
36 | * The three register sets do not have a fixed offset to each other, | ||
37 | * hence we order this table by pad control registers (which all pads | ||
38 | * have) and put the optional i/o routing registers into additional | ||
39 | * fields. | ||
40 | * | ||
41 | * The naming convention for the pad modes is MX35_PAD_<padname>__<padmode> | ||
42 | * If <padname> or <padmode> refers to a GPIO, it is named | ||
43 | * GPIO_<unit>_<num> | ||
44 | * | ||
45 | */ | ||
46 | |||
47 | struct pad_desc { | ||
48 | unsigned mux_ctrl_ofs:12; /* IOMUXC_SW_MUX_CTL_PAD offset */ | ||
49 | unsigned mux_mode:8; | ||
50 | unsigned pad_ctrl_ofs:12; /* IOMUXC_SW_PAD_CTRL offset */ | ||
51 | #define NO_PAD_CTRL (1 << 16) | ||
52 | unsigned pad_ctrl:17; | ||
53 | unsigned select_input_ofs:12; /* IOMUXC_SELECT_INPUT offset */ | ||
54 | unsigned select_input:3; | ||
55 | }; | ||
56 | |||
57 | #define IOMUX_PAD(_pad_ctrl_ofs, _mux_ctrl_ofs, _mux_mode, _select_input_ofs, \ | ||
58 | _select_input, _pad_ctrl) \ | ||
59 | { \ | ||
60 | .mux_ctrl_ofs = _mux_ctrl_ofs, \ | ||
61 | .mux_mode = _mux_mode, \ | ||
62 | .pad_ctrl_ofs = _pad_ctrl_ofs, \ | ||
63 | .pad_ctrl = _pad_ctrl, \ | ||
64 | .select_input_ofs = _select_input_ofs, \ | ||
65 | .select_input = _select_input, \ | ||
66 | } | ||
67 | |||
68 | /* | ||
69 | * Use to set PAD control | ||
70 | */ | ||
71 | #define PAD_CTL_DRIVE_VOLTAGE_3_3_V 0 | ||
72 | #define PAD_CTL_DRIVE_VOLTAGE_1_8_V 1 | ||
73 | |||
74 | #define PAD_CTL_NO_HYSTERESIS 0 | ||
75 | #define PAD_CTL_HYSTERESIS 1 | ||
76 | |||
77 | #define PAD_CTL_PULL_DISABLED 0x0 | ||
78 | #define PAD_CTL_PULL_KEEPER 0xa | ||
79 | #define PAD_CTL_PULL_DOWN_100K 0xc | ||
80 | #define PAD_CTL_PULL_UP_47K 0xd | ||
81 | #define PAD_CTL_PULL_UP_100K 0xe | ||
82 | #define PAD_CTL_PULL_UP_22K 0xf | ||
83 | |||
84 | #define PAD_CTL_OUTPUT_CMOS 0 | ||
85 | #define PAD_CTL_OUTPUT_OPEN_DRAIN 1 | ||
86 | |||
87 | #define PAD_CTL_DRIVE_STRENGTH_NORM 0 | ||
88 | #define PAD_CTL_DRIVE_STRENGTH_HIGH 1 | ||
89 | #define PAD_CTL_DRIVE_STRENGTH_MAX 2 | ||
90 | |||
91 | #define PAD_CTL_SLEW_RATE_SLOW 0 | ||
92 | #define PAD_CTL_SLEW_RATE_FAST 1 | ||
93 | |||
94 | /* | ||
95 | * setups a single pad: | ||
96 | * - reserves the pad so that it is not claimed by another driver | ||
97 | * - setups the iomux according to the configuration | ||
98 | */ | ||
99 | int mxc_iomux_v3_setup_pad(struct pad_desc *pad); | ||
100 | |||
101 | /* | ||
102 | * setups mutliple pads | ||
103 | * convenient way to call the above function with tables | ||
104 | */ | ||
105 | int mxc_iomux_v3_setup_multiple_pads(struct pad_desc *pad_list, unsigned count); | ||
106 | |||
107 | /* | ||
108 | * releases a single pad: | ||
109 | * - make it available for a future use by another driver | ||
110 | * - DOES NOT reconfigure the IOMUX in its reset state | ||
111 | */ | ||
112 | void mxc_iomux_v3_release_pad(struct pad_desc *pad); | ||
113 | |||
114 | /* | ||
115 | * releases multiple pads | ||
116 | * convenvient way to call the above function with tables | ||
117 | */ | ||
118 | void mxc_iomux_v3_release_multiple_pads(struct pad_desc *pad_list, int count); | ||
119 | |||
120 | #endif /* __MACH_IOMUX_V3_H__*/ | ||
121 | |||
diff --git a/arch/arm/plat-mxc/include/mach/memory.h b/arch/arm/plat-mxc/include/mach/memory.h index eca37d09f3f8..6065e00176ed 100644 --- a/arch/arm/plat-mxc/include/mach/memory.h +++ b/arch/arm/plat-mxc/include/mach/memory.h | |||
@@ -32,4 +32,12 @@ | |||
32 | #define CONSISTENT_DMA_SIZE SZ_4M | 32 | #define CONSISTENT_DMA_SIZE SZ_4M |
33 | #endif /* CONFIG_MX1_VIDEO */ | 33 | #endif /* CONFIG_MX1_VIDEO */ |
34 | 34 | ||
35 | #if defined(CONFIG_MX3_VIDEO) | ||
36 | /* | ||
37 | * Increase size of DMA-consistent memory region. | ||
38 | * This is required for mx3 camera driver to capture at least two QXGA frames. | ||
39 | */ | ||
40 | #define CONSISTENT_DMA_SIZE SZ_8M | ||
41 | #endif /* CONFIG_MX3_VIDEO */ | ||
42 | |||
35 | #endif /* __ASM_ARCH_MXC_MEMORY_H__ */ | 43 | #endif /* __ASM_ARCH_MXC_MEMORY_H__ */ |
diff --git a/arch/arm/plat-mxc/include/mach/mx1.h b/arch/arm/plat-mxc/include/mach/mx1.h index b92e02324d8e..1000bf330bcd 100644 --- a/arch/arm/plat-mxc/include/mach/mx1.h +++ b/arch/arm/plat-mxc/include/mach/mx1.h | |||
@@ -179,7 +179,7 @@ | |||
179 | #define DMA_REQ_UART1_T 30 | 179 | #define DMA_REQ_UART1_T 30 |
180 | #define DMA_REQ_UART1_R 31 | 180 | #define DMA_REQ_UART1_R 31 |
181 | 181 | ||
182 | /* mandatory for CONFIG_LL_DEBUG */ | 182 | /* mandatory for CONFIG_DEBUG_LL */ |
183 | #define MXC_LL_UART_PADDR UART1_BASE_ADDR | 183 | #define MXC_LL_UART_PADDR UART1_BASE_ADDR |
184 | #define MXC_LL_UART_VADDR IO_ADDRESS(UART1_BASE_ADDR) | 184 | #define MXC_LL_UART_VADDR IO_ADDRESS(UART1_BASE_ADDR) |
185 | 185 | ||
diff --git a/arch/arm/plat-mxc/include/mach/mx3x.h b/arch/arm/plat-mxc/include/mach/mx3x.h index 3878c6085d5c..b559a4bb5769 100644 --- a/arch/arm/plat-mxc/include/mach/mx3x.h +++ b/arch/arm/plat-mxc/include/mach/mx3x.h | |||
@@ -48,6 +48,9 @@ | |||
48 | #define CS4_SIZE SZ_32M | 48 | #define CS4_SIZE SZ_32M |
49 | 49 | ||
50 | #define CS5_BASE_ADDR 0xB6000000 | 50 | #define CS5_BASE_ADDR 0xB6000000 |
51 | #define CS5_BASE_ADDR_VIRT 0xF6000000 | ||
52 | #define CS5_SIZE SZ_32M | ||
53 | |||
51 | #define PCMCIA_MEM_BASE_ADDR 0xBC000000 | 54 | #define PCMCIA_MEM_BASE_ADDR 0xBC000000 |
52 | 55 | ||
53 | /* | 56 | /* |
@@ -191,6 +194,9 @@ | |||
191 | #define CS4_IO_ADDRESS(x) \ | 194 | #define CS4_IO_ADDRESS(x) \ |
192 | (((x) - CS4_BASE_ADDR) + CS4_BASE_ADDR_VIRT) | 195 | (((x) - CS4_BASE_ADDR) + CS4_BASE_ADDR_VIRT) |
193 | 196 | ||
197 | #define CS5_IO_ADDRESS(x) \ | ||
198 | (((x) - CS5_BASE_ADDR) + CS5_BASE_ADDR_VIRT) | ||
199 | |||
194 | #define X_MEMC_IO_ADDRESS(x) \ | 200 | #define X_MEMC_IO_ADDRESS(x) \ |
195 | (((x) - X_MEMC_BASE_ADDR) + X_MEMC_BASE_ADDR_VIRT) | 201 | (((x) - X_MEMC_BASE_ADDR) + X_MEMC_BASE_ADDR_VIRT) |
196 | 202 | ||
diff --git a/arch/arm/plat-mxc/include/mach/mxc_timer.h b/arch/arm/plat-mxc/include/mach/mxc_timer.h deleted file mode 100644 index 6c19a134744b..000000000000 --- a/arch/arm/plat-mxc/include/mach/mxc_timer.h +++ /dev/null | |||
@@ -1,158 +0,0 @@ | |||
1 | /* | ||
2 | * mxc_timer.h | ||
3 | * | ||
4 | * Copyright (C) 2008 Juergen Beisert (kernel@pengutronix.de) | ||
5 | * | ||
6 | * Platform independent (i.MX1, i.MX2, i.MX3) definition for timer handling. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public License | ||
10 | * as published by the Free Software Foundation; either version 2 | ||
11 | * of the License, or (at your option) any later version. | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
20 | * Boston, MA 02110-1301, USA. | ||
21 | */ | ||
22 | |||
23 | #ifndef __PLAT_MXC_TIMER_H | ||
24 | #define __PLAT_MXC_TIMER_H | ||
25 | |||
26 | #include <linux/clk.h> | ||
27 | #include <mach/hardware.h> | ||
28 | |||
29 | #ifdef CONFIG_ARCH_MX1 | ||
30 | #define TIMER_BASE IO_ADDRESS(TIM1_BASE_ADDR) | ||
31 | #define TIMER_INTERRUPT TIM1_INT | ||
32 | |||
33 | #define TCTL_VAL TCTL_CLK_PCLK1 | ||
34 | #define TCTL_IRQEN (1<<4) | ||
35 | #define TCTL_FRR (1<<8) | ||
36 | #define TCTL_CLK_PCLK1 (1<<1) | ||
37 | #define TCTL_CLK_PCLK1_4 (2<<1) | ||
38 | #define TCTL_CLK_TIN (3<<1) | ||
39 | #define TCTL_CLK_32 (4<<1) | ||
40 | |||
41 | #define MXC_TCTL 0x00 | ||
42 | #define MXC_TPRER 0x04 | ||
43 | #define MXC_TCMP 0x08 | ||
44 | #define MXC_TCR 0x0c | ||
45 | #define MXC_TCN 0x10 | ||
46 | #define MXC_TSTAT 0x14 | ||
47 | #define TSTAT_CAPT (1<<1) | ||
48 | #define TSTAT_COMP (1<<0) | ||
49 | |||
50 | static inline void gpt_irq_disable(void) | ||
51 | { | ||
52 | unsigned int tmp; | ||
53 | |||
54 | tmp = __raw_readl(TIMER_BASE + MXC_TCTL); | ||
55 | __raw_writel(tmp & ~TCTL_IRQEN, TIMER_BASE + MXC_TCTL); | ||
56 | } | ||
57 | |||
58 | static inline void gpt_irq_enable(void) | ||
59 | { | ||
60 | __raw_writel(__raw_readl(TIMER_BASE + MXC_TCTL) | TCTL_IRQEN, | ||
61 | TIMER_BASE + MXC_TCTL); | ||
62 | } | ||
63 | |||
64 | static void gpt_irq_acknowledge(void) | ||
65 | { | ||
66 | __raw_writel(0, TIMER_BASE + MXC_TSTAT); | ||
67 | } | ||
68 | #endif /* CONFIG_ARCH_MX1 */ | ||
69 | |||
70 | #ifdef CONFIG_ARCH_MX2 | ||
71 | #define TIMER_BASE IO_ADDRESS(GPT1_BASE_ADDR) | ||
72 | #define TIMER_INTERRUPT MXC_INT_GPT1 | ||
73 | |||
74 | #define MXC_TCTL 0x00 | ||
75 | #define TCTL_VAL TCTL_CLK_PCLK1 | ||
76 | #define TCTL_CLK_PCLK1 (1<<1) | ||
77 | #define TCTL_CLK_PCLK1_4 (2<<1) | ||
78 | #define TCTL_IRQEN (1<<4) | ||
79 | #define TCTL_FRR (1<<8) | ||
80 | #define MXC_TPRER 0x04 | ||
81 | #define MXC_TCMP 0x08 | ||
82 | #define MXC_TCR 0x0c | ||
83 | #define MXC_TCN 0x10 | ||
84 | #define MXC_TSTAT 0x14 | ||
85 | #define TSTAT_CAPT (1<<1) | ||
86 | #define TSTAT_COMP (1<<0) | ||
87 | |||
88 | static inline void gpt_irq_disable(void) | ||
89 | { | ||
90 | unsigned int tmp; | ||
91 | |||
92 | tmp = __raw_readl(TIMER_BASE + MXC_TCTL); | ||
93 | __raw_writel(tmp & ~TCTL_IRQEN, TIMER_BASE + MXC_TCTL); | ||
94 | } | ||
95 | |||
96 | static inline void gpt_irq_enable(void) | ||
97 | { | ||
98 | __raw_writel(__raw_readl(TIMER_BASE + MXC_TCTL) | TCTL_IRQEN, | ||
99 | TIMER_BASE + MXC_TCTL); | ||
100 | } | ||
101 | |||
102 | static void gpt_irq_acknowledge(void) | ||
103 | { | ||
104 | __raw_writel(TSTAT_CAPT | TSTAT_COMP, TIMER_BASE + MXC_TSTAT); | ||
105 | } | ||
106 | #endif /* CONFIG_ARCH_MX2 */ | ||
107 | |||
108 | #ifdef CONFIG_ARCH_MX3 | ||
109 | #define TIMER_BASE IO_ADDRESS(GPT1_BASE_ADDR) | ||
110 | #define TIMER_INTERRUPT MXC_INT_GPT | ||
111 | |||
112 | #define MXC_TCTL 0x00 | ||
113 | #define TCTL_VAL (TCTL_CLK_IPG | TCTL_WAITEN) | ||
114 | #define TCTL_CLK_IPG (1<<6) | ||
115 | #define TCTL_FRR (1<<9) | ||
116 | #define TCTL_WAITEN (1<<3) | ||
117 | |||
118 | #define MXC_TPRER 0x04 | ||
119 | #define MXC_TSTAT 0x08 | ||
120 | #define TSTAT_OF1 (1<<0) | ||
121 | #define TSTAT_OF2 (1<<1) | ||
122 | #define TSTAT_OF3 (1<<2) | ||
123 | #define TSTAT_IF1 (1<<3) | ||
124 | #define TSTAT_IF2 (1<<4) | ||
125 | #define TSTAT_ROV (1<<5) | ||
126 | #define MXC_IR 0x0c | ||
127 | #define MXC_TCMP 0x10 | ||
128 | #define MXC_TCMP2 0x14 | ||
129 | #define MXC_TCMP3 0x18 | ||
130 | #define MXC_TCR 0x1c | ||
131 | #define MXC_TCN 0x24 | ||
132 | |||
133 | static inline void gpt_irq_disable(void) | ||
134 | { | ||
135 | __raw_writel(0, TIMER_BASE + MXC_IR); | ||
136 | } | ||
137 | |||
138 | static inline void gpt_irq_enable(void) | ||
139 | { | ||
140 | __raw_writel(1<<0, TIMER_BASE + MXC_IR); | ||
141 | } | ||
142 | |||
143 | static inline void gpt_irq_acknowledge(void) | ||
144 | { | ||
145 | __raw_writel(TSTAT_OF1, TIMER_BASE + MXC_TSTAT); | ||
146 | } | ||
147 | #endif /* CONFIG_ARCH_MX3 */ | ||
148 | |||
149 | #define TCTL_SWR (1<<15) | ||
150 | #define TCTL_CC (1<<10) | ||
151 | #define TCTL_OM (1<<9) | ||
152 | #define TCTL_CAP_RIS (1<<6) | ||
153 | #define TCTL_CAP_FAL (2<<6) | ||
154 | #define TCTL_CAP_RIS_FAL (3<<6) | ||
155 | #define TCTL_CAP_ENA (1<<5) | ||
156 | #define TCTL_TEN (1<<0) | ||
157 | |||
158 | #endif | ||
diff --git a/arch/arm/plat-mxc/include/mach/usb.h b/arch/arm/plat-mxc/include/mach/usb.h index 2dacb3086f1c..be273371f34a 100644 --- a/arch/arm/plat-mxc/include/mach/usb.h +++ b/arch/arm/plat-mxc/include/mach/usb.h | |||
@@ -17,7 +17,7 @@ | |||
17 | 17 | ||
18 | struct imxusb_platform_data { | 18 | struct imxusb_platform_data { |
19 | int (*init)(struct device *); | 19 | int (*init)(struct device *); |
20 | int (*exit)(struct device *); | 20 | void (*exit)(struct device *); |
21 | }; | 21 | }; |
22 | 22 | ||
23 | #endif /* __ASM_ARCH_MXC_USB */ | 23 | #endif /* __ASM_ARCH_MXC_USB */ |
diff --git a/arch/arm/plat-mxc/iomux-v3.c b/arch/arm/plat-mxc/iomux-v3.c new file mode 100644 index 000000000000..77a078f9513f --- /dev/null +++ b/arch/arm/plat-mxc/iomux-v3.c | |||
@@ -0,0 +1,98 @@ | |||
1 | /* | ||
2 | * Copyright 2004-2006 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * Copyright (C) 2008 by Sascha Hauer <kernel@pengutronix.de> | ||
4 | * Copyright (C) 2009 by Jan Weitzel Phytec Messtechnik GmbH, | ||
5 | * <armlinux@phytec.de> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or | ||
8 | * modify it under the terms of the GNU General Public License | ||
9 | * as published by the Free Software Foundation; either version 2 | ||
10 | * of the License, or (at your option) any later version. | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
19 | * MA 02110-1301, USA. | ||
20 | */ | ||
21 | #include <linux/errno.h> | ||
22 | #include <linux/init.h> | ||
23 | #include <linux/kernel.h> | ||
24 | #include <linux/module.h> | ||
25 | #include <linux/string.h> | ||
26 | #include <linux/gpio.h> | ||
27 | |||
28 | #include <mach/hardware.h> | ||
29 | #include <asm/mach/map.h> | ||
30 | #include <mach/iomux-v3.h> | ||
31 | |||
32 | #define IOMUX_BASE IO_ADDRESS(IOMUXC_BASE_ADDR) | ||
33 | |||
34 | static unsigned long iomux_v3_pad_alloc_map[0x200 / BITS_PER_LONG]; | ||
35 | |||
36 | /* | ||
37 | * setups a single pin: | ||
38 | * - reserves the pin so that it is not claimed by another driver | ||
39 | * - setups the iomux according to the configuration | ||
40 | */ | ||
41 | int mxc_iomux_v3_setup_pad(struct pad_desc *pad) | ||
42 | { | ||
43 | unsigned int pad_ofs = pad->pad_ctrl_ofs; | ||
44 | |||
45 | if (test_and_set_bit(pad_ofs >> 2, iomux_v3_pad_alloc_map)) | ||
46 | return -EBUSY; | ||
47 | if (pad->mux_ctrl_ofs) | ||
48 | __raw_writel(pad->mux_mode, IOMUX_BASE + pad->mux_ctrl_ofs); | ||
49 | |||
50 | if (pad->select_input_ofs) | ||
51 | __raw_writel(pad->select_input, | ||
52 | IOMUX_BASE + pad->select_input_ofs); | ||
53 | |||
54 | if (!(pad->pad_ctrl & NO_PAD_CTRL)) | ||
55 | __raw_writel(pad->pad_ctrl, IOMUX_BASE + pad->pad_ctrl_ofs); | ||
56 | return 0; | ||
57 | } | ||
58 | EXPORT_SYMBOL(mxc_iomux_v3_setup_pad); | ||
59 | |||
60 | int mxc_iomux_v3_setup_multiple_pads(struct pad_desc *pad_list, unsigned count) | ||
61 | { | ||
62 | struct pad_desc *p = pad_list; | ||
63 | int i; | ||
64 | int ret; | ||
65 | |||
66 | for (i = 0; i < count; i++) { | ||
67 | ret = mxc_iomux_v3_setup_pad(p); | ||
68 | if (ret) | ||
69 | goto setup_error; | ||
70 | p++; | ||
71 | } | ||
72 | return 0; | ||
73 | |||
74 | setup_error: | ||
75 | mxc_iomux_v3_release_multiple_pads(pad_list, i); | ||
76 | return ret; | ||
77 | } | ||
78 | EXPORT_SYMBOL(mxc_iomux_v3_setup_multiple_pads); | ||
79 | |||
80 | void mxc_iomux_v3_release_pad(struct pad_desc *pad) | ||
81 | { | ||
82 | unsigned int pad_ofs = pad->pad_ctrl_ofs; | ||
83 | |||
84 | clear_bit(pad_ofs >> 2, iomux_v3_pad_alloc_map); | ||
85 | } | ||
86 | EXPORT_SYMBOL(mxc_iomux_v3_release_pad); | ||
87 | |||
88 | void mxc_iomux_v3_release_multiple_pads(struct pad_desc *pad_list, int count) | ||
89 | { | ||
90 | struct pad_desc *p = pad_list; | ||
91 | int i; | ||
92 | |||
93 | for (i = 0; i < count; i++) { | ||
94 | mxc_iomux_v3_release_pad(p); | ||
95 | p++; | ||
96 | } | ||
97 | } | ||
98 | EXPORT_SYMBOL(mxc_iomux_v3_release_multiple_pads); | ||
diff --git a/arch/arm/plat-mxc/irq.c b/arch/arm/plat-mxc/irq.c index 0fb68a531f55..8aee76304f8f 100644 --- a/arch/arm/plat-mxc/irq.c +++ b/arch/arm/plat-mxc/irq.c | |||
@@ -24,31 +24,27 @@ | |||
24 | #include <asm/mach/irq.h> | 24 | #include <asm/mach/irq.h> |
25 | #include <mach/hardware.h> | 25 | #include <mach/hardware.h> |
26 | 26 | ||
27 | #define AVIC_BASE IO_ADDRESS(AVIC_BASE_ADDR) | 27 | #define AVIC_INTCNTL 0x00 /* int control reg */ |
28 | #define AVIC_INTCNTL (AVIC_BASE + 0x00) /* int control reg */ | 28 | #define AVIC_NIMASK 0x04 /* int mask reg */ |
29 | #define AVIC_NIMASK (AVIC_BASE + 0x04) /* int mask reg */ | 29 | #define AVIC_INTENNUM 0x08 /* int enable number reg */ |
30 | #define AVIC_INTENNUM (AVIC_BASE + 0x08) /* int enable number reg */ | 30 | #define AVIC_INTDISNUM 0x0C /* int disable number reg */ |
31 | #define AVIC_INTDISNUM (AVIC_BASE + 0x0C) /* int disable number reg */ | 31 | #define AVIC_INTENABLEH 0x10 /* int enable reg high */ |
32 | #define AVIC_INTENABLEH (AVIC_BASE + 0x10) /* int enable reg high */ | 32 | #define AVIC_INTENABLEL 0x14 /* int enable reg low */ |
33 | #define AVIC_INTENABLEL (AVIC_BASE + 0x14) /* int enable reg low */ | 33 | #define AVIC_INTTYPEH 0x18 /* int type reg high */ |
34 | #define AVIC_INTTYPEH (AVIC_BASE + 0x18) /* int type reg high */ | 34 | #define AVIC_INTTYPEL 0x1C /* int type reg low */ |
35 | #define AVIC_INTTYPEL (AVIC_BASE + 0x1C) /* int type reg low */ | 35 | #define AVIC_NIPRIORITY(x) (0x20 + 4 * (7 - (x))) /* int priority */ |
36 | #define AVIC_NIPRIORITY(x) (AVIC_BASE + (0x20 + 4 * (7 - (x)))) /* int priority */ | 36 | #define AVIC_NIVECSR 0x40 /* norm int vector/status */ |
37 | #define AVIC_NIVECSR (AVIC_BASE + 0x40) /* norm int vector/status */ | 37 | #define AVIC_FIVECSR 0x44 /* fast int vector/status */ |
38 | #define AVIC_FIVECSR (AVIC_BASE + 0x44) /* fast int vector/status */ | 38 | #define AVIC_INTSRCH 0x48 /* int source reg high */ |
39 | #define AVIC_INTSRCH (AVIC_BASE + 0x48) /* int source reg high */ | 39 | #define AVIC_INTSRCL 0x4C /* int source reg low */ |
40 | #define AVIC_INTSRCL (AVIC_BASE + 0x4C) /* int source reg low */ | 40 | #define AVIC_INTFRCH 0x50 /* int force reg high */ |
41 | #define AVIC_INTFRCH (AVIC_BASE + 0x50) /* int force reg high */ | 41 | #define AVIC_INTFRCL 0x54 /* int force reg low */ |
42 | #define AVIC_INTFRCL (AVIC_BASE + 0x54) /* int force reg low */ | 42 | #define AVIC_NIPNDH 0x58 /* norm int pending high */ |
43 | #define AVIC_NIPNDH (AVIC_BASE + 0x58) /* norm int pending high */ | 43 | #define AVIC_NIPNDL 0x5C /* norm int pending low */ |
44 | #define AVIC_NIPNDL (AVIC_BASE + 0x5C) /* norm int pending low */ | 44 | #define AVIC_FIPNDH 0x60 /* fast int pending high */ |
45 | #define AVIC_FIPNDH (AVIC_BASE + 0x60) /* fast int pending high */ | 45 | #define AVIC_FIPNDL 0x64 /* fast int pending low */ |
46 | #define AVIC_FIPNDL (AVIC_BASE + 0x64) /* fast int pending low */ | 46 | |
47 | 47 | static void __iomem *avic_base; | |
48 | #define SYSTEM_PREV_REG IO_ADDRESS(IIM_BASE_ADDR + 0x20) | ||
49 | #define SYSTEM_SREV_REG IO_ADDRESS(IIM_BASE_ADDR + 0x24) | ||
50 | #define IIM_PROD_REV_SH 3 | ||
51 | #define IIM_PROD_REV_LEN 5 | ||
52 | 48 | ||
53 | int imx_irq_set_priority(unsigned char irq, unsigned char prio) | 49 | int imx_irq_set_priority(unsigned char irq, unsigned char prio) |
54 | { | 50 | { |
@@ -59,11 +55,11 @@ int imx_irq_set_priority(unsigned char irq, unsigned char prio) | |||
59 | if (irq >= MXC_INTERNAL_IRQS) | 55 | if (irq >= MXC_INTERNAL_IRQS) |
60 | return -EINVAL;; | 56 | return -EINVAL;; |
61 | 57 | ||
62 | temp = __raw_readl(AVIC_NIPRIORITY(irq / 8)); | 58 | temp = __raw_readl(avic_base + AVIC_NIPRIORITY(irq / 8)); |
63 | temp &= ~mask; | 59 | temp &= ~mask; |
64 | temp |= prio & mask; | 60 | temp |= prio & mask; |
65 | 61 | ||
66 | __raw_writel(temp, AVIC_NIPRIORITY(irq / 8)); | 62 | __raw_writel(temp, avic_base + AVIC_NIPRIORITY(irq / 8)); |
67 | 63 | ||
68 | return 0; | 64 | return 0; |
69 | #else | 65 | #else |
@@ -81,12 +77,12 @@ int mxc_set_irq_fiq(unsigned int irq, unsigned int type) | |||
81 | return -EINVAL; | 77 | return -EINVAL; |
82 | 78 | ||
83 | if (irq < MXC_INTERNAL_IRQS / 2) { | 79 | if (irq < MXC_INTERNAL_IRQS / 2) { |
84 | irqt = __raw_readl(AVIC_INTTYPEL) & ~(1 << irq); | 80 | irqt = __raw_readl(avic_base + AVIC_INTTYPEL) & ~(1 << irq); |
85 | __raw_writel(irqt | (!!type << irq), AVIC_INTTYPEL); | 81 | __raw_writel(irqt | (!!type << irq), avic_base + AVIC_INTTYPEL); |
86 | } else { | 82 | } else { |
87 | irq -= MXC_INTERNAL_IRQS / 2; | 83 | irq -= MXC_INTERNAL_IRQS / 2; |
88 | irqt = __raw_readl(AVIC_INTTYPEH) & ~(1 << irq); | 84 | irqt = __raw_readl(avic_base + AVIC_INTTYPEH) & ~(1 << irq); |
89 | __raw_writel(irqt | (!!type << irq), AVIC_INTTYPEH); | 85 | __raw_writel(irqt | (!!type << irq), avic_base + AVIC_INTTYPEH); |
90 | } | 86 | } |
91 | 87 | ||
92 | return 0; | 88 | return 0; |
@@ -97,13 +93,13 @@ EXPORT_SYMBOL(mxc_set_irq_fiq); | |||
97 | /* Disable interrupt number "irq" in the AVIC */ | 93 | /* Disable interrupt number "irq" in the AVIC */ |
98 | static void mxc_mask_irq(unsigned int irq) | 94 | static void mxc_mask_irq(unsigned int irq) |
99 | { | 95 | { |
100 | __raw_writel(irq, AVIC_INTDISNUM); | 96 | __raw_writel(irq, avic_base + AVIC_INTDISNUM); |
101 | } | 97 | } |
102 | 98 | ||
103 | /* Enable interrupt number "irq" in the AVIC */ | 99 | /* Enable interrupt number "irq" in the AVIC */ |
104 | static void mxc_unmask_irq(unsigned int irq) | 100 | static void mxc_unmask_irq(unsigned int irq) |
105 | { | 101 | { |
106 | __raw_writel(irq, AVIC_INTENNUM); | 102 | __raw_writel(irq, avic_base + AVIC_INTENNUM); |
107 | } | 103 | } |
108 | 104 | ||
109 | static struct irq_chip mxc_avic_chip = { | 105 | static struct irq_chip mxc_avic_chip = { |
@@ -121,19 +117,21 @@ void __init mxc_init_irq(void) | |||
121 | { | 117 | { |
122 | int i; | 118 | int i; |
123 | 119 | ||
120 | avic_base = IO_ADDRESS(AVIC_BASE_ADDR); | ||
121 | |||
124 | /* put the AVIC into the reset value with | 122 | /* put the AVIC into the reset value with |
125 | * all interrupts disabled | 123 | * all interrupts disabled |
126 | */ | 124 | */ |
127 | __raw_writel(0, AVIC_INTCNTL); | 125 | __raw_writel(0, avic_base + AVIC_INTCNTL); |
128 | __raw_writel(0x1f, AVIC_NIMASK); | 126 | __raw_writel(0x1f, avic_base + AVIC_NIMASK); |
129 | 127 | ||
130 | /* disable all interrupts */ | 128 | /* disable all interrupts */ |
131 | __raw_writel(0, AVIC_INTENABLEH); | 129 | __raw_writel(0, avic_base + AVIC_INTENABLEH); |
132 | __raw_writel(0, AVIC_INTENABLEL); | 130 | __raw_writel(0, avic_base + AVIC_INTENABLEL); |
133 | 131 | ||
134 | /* all IRQ no FIQ */ | 132 | /* all IRQ no FIQ */ |
135 | __raw_writel(0, AVIC_INTTYPEH); | 133 | __raw_writel(0, avic_base + AVIC_INTTYPEH); |
136 | __raw_writel(0, AVIC_INTTYPEL); | 134 | __raw_writel(0, avic_base + AVIC_INTTYPEL); |
137 | for (i = 0; i < MXC_INTERNAL_IRQS; i++) { | 135 | for (i = 0; i < MXC_INTERNAL_IRQS; i++) { |
138 | set_irq_chip(i, &mxc_avic_chip); | 136 | set_irq_chip(i, &mxc_avic_chip); |
139 | set_irq_handler(i, handle_level_irq); | 137 | set_irq_handler(i, handle_level_irq); |
@@ -142,7 +140,7 @@ void __init mxc_init_irq(void) | |||
142 | 140 | ||
143 | /* Set default priority value (0) for all IRQ's */ | 141 | /* Set default priority value (0) for all IRQ's */ |
144 | for (i = 0; i < 8; i++) | 142 | for (i = 0; i < 8; i++) |
145 | __raw_writel(0, AVIC_NIPRIORITY(i)); | 143 | __raw_writel(0, avic_base + AVIC_NIPRIORITY(i)); |
146 | 144 | ||
147 | /* init architectures chained interrupt handler */ | 145 | /* init architectures chained interrupt handler */ |
148 | mxc_register_gpios(); | 146 | mxc_register_gpios(); |
@@ -154,3 +152,4 @@ void __init mxc_init_irq(void) | |||
154 | 152 | ||
155 | printk(KERN_INFO "MXC IRQ initialized\n"); | 153 | printk(KERN_INFO "MXC IRQ initialized\n"); |
156 | } | 154 | } |
155 | |||
diff --git a/arch/arm/plat-mxc/pwm.c b/arch/arm/plat-mxc/pwm.c index 9bffbc507cc2..ae34198a79dd 100644 --- a/arch/arm/plat-mxc/pwm.c +++ b/arch/arm/plat-mxc/pwm.c | |||
@@ -15,65 +15,26 @@ | |||
15 | #include <linux/clk.h> | 15 | #include <linux/clk.h> |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <linux/pwm.h> | 17 | #include <linux/pwm.h> |
18 | #include <mach/hardware.h> | ||
19 | |||
20 | |||
21 | /* i.MX1 and i.MX21 share the same PWM function block: */ | ||
22 | |||
23 | #define MX1_PWMC 0x00 /* PWM Control Register */ | ||
24 | #define MX1_PWMS 0x04 /* PWM Sample Register */ | ||
25 | #define MX1_PWMP 0x08 /* PWM Period Register */ | ||
26 | |||
27 | |||
28 | /* i.MX27, i.MX31, i.MX35 share the same PWM function block: */ | ||
29 | |||
30 | #define MX3_PWMCR 0x00 /* PWM Control Register */ | ||
31 | #define MX3_PWMSAR 0x0C /* PWM Sample Register */ | ||
32 | #define MX3_PWMPR 0x10 /* PWM Period Register */ | ||
33 | #define MX3_PWMCR_PRESCALER(x) (((x - 1) & 0xFFF) << 4) | ||
34 | #define MX3_PWMCR_CLKSRC_IPG_HIGH (2 << 16) | ||
35 | #define MX3_PWMCR_EN (1 << 0) | ||
36 | |||
18 | 37 | ||
19 | #if defined CONFIG_ARCH_MX1 || defined CONFIG_ARCH_MX21 | ||
20 | #define PWM_VER_1 | ||
21 | |||
22 | #define PWMCR 0x00 /* PWM Control Register */ | ||
23 | #define PWMSR 0x04 /* PWM Sample Register */ | ||
24 | #define PWMPR 0x08 /* PWM Period Register */ | ||
25 | #define PWMCNR 0x0C /* PWM Counter Register */ | ||
26 | |||
27 | #define PWMCR_HCTR (1 << 18) /* Halfword FIFO Data Swapping */ | ||
28 | #define PWMCR_BCTR (1 << 17) /* Byte FIFO Data Swapping */ | ||
29 | #define PWMCR_SWR (1 << 16) /* Software Reset */ | ||
30 | #define PWMCR_CLKSRC_PERCLK (0 << 15) /* PERCLK Clock Source */ | ||
31 | #define PWMCR_CLKSRC_CLK32 (1 << 15) /* 32KHz Clock Source */ | ||
32 | #define PWMCR_PRESCALER(x) (((x - 1) & 0x7F) << 8) /* PRESCALER */ | ||
33 | #define PWMCR_IRQ (1 << 7) /* Interrupt Request */ | ||
34 | #define PWMCR_IRQEN (1 << 6) /* Interrupt Request Enable */ | ||
35 | #define PWMCR_FIFOAV (1 << 5) /* FIFO Available */ | ||
36 | #define PWMCR_EN (1 << 4) /* Enables/Disables the PWM */ | ||
37 | #define PWMCR_REPEAT(x) (((x) & 0x03) << 2) /* Sample Repeats */ | ||
38 | #define PWMCR_DIV(x) (((x) & 0x03) << 0) /* Clock divider 2/4/8/16 */ | ||
39 | |||
40 | #define MAX_DIV (128 * 16) | ||
41 | #endif | ||
42 | |||
43 | #if defined CONFIG_MACH_MX27 || defined CONFIG_ARCH_MX31 | ||
44 | #define PWM_VER_2 | ||
45 | |||
46 | #define PWMCR 0x00 /* PWM Control Register */ | ||
47 | #define PWMSR 0x04 /* PWM Status Register */ | ||
48 | #define PWMIR 0x08 /* PWM Interrupt Register */ | ||
49 | #define PWMSAR 0x0C /* PWM Sample Register */ | ||
50 | #define PWMPR 0x10 /* PWM Period Register */ | ||
51 | #define PWMCNR 0x14 /* PWM Counter Register */ | ||
52 | |||
53 | #define PWMCR_EN (1 << 0) /* Enables/Disables the PWM */ | ||
54 | #define PWMCR_REPEAT(x) (((x) & 0x03) << 1) /* Sample Repeats */ | ||
55 | #define PWMCR_SWR (1 << 3) /* Software Reset */ | ||
56 | #define PWMCR_PRESCALER(x) (((x - 1) & 0xFFF) << 4)/* PRESCALER */ | ||
57 | #define PWMCR_CLKSRC(x) (((x) & 0x3) << 16) | ||
58 | #define PWMCR_CLKSRC_OFF (0 << 16) | ||
59 | #define PWMCR_CLKSRC_IPG (1 << 16) | ||
60 | #define PWMCR_CLKSRC_IPG_HIGH (2 << 16) | ||
61 | #define PWMCR_CLKSRC_CLK32 (3 << 16) | ||
62 | #define PWMCR_POUTC | ||
63 | #define PWMCR_HCTR (1 << 20) /* Halfword FIFO Data Swapping */ | ||
64 | #define PWMCR_BCTR (1 << 21) /* Byte FIFO Data Swapping */ | ||
65 | #define PWMCR_DBGEN (1 << 22) /* Debug Mode */ | ||
66 | #define PWMCR_WAITEN (1 << 23) /* Wait Mode */ | ||
67 | #define PWMCR_DOZEN (1 << 24) /* Doze Mode */ | ||
68 | #define PWMCR_STOPEN (1 << 25) /* Stop Mode */ | ||
69 | #define PWMCR_FWM(x) (((x) & 0x3) << 26) /* FIFO Water Mark */ | ||
70 | |||
71 | #define MAX_DIV 4096 | ||
72 | #endif | ||
73 | |||
74 | #define PWMS_SAMPLE(x) ((x) & 0xFFFF) /* Contains a two-sample word */ | ||
75 | #define PWMP_PERIOD(x) ((x) & 0xFFFF) /* Represents the PWM's period */ | ||
76 | #define PWMC_COUNTER(x) ((x) & 0xFFFF) /* Represents the current count value */ | ||
77 | 38 | ||
78 | struct pwm_device { | 39 | struct pwm_device { |
79 | struct list_head node; | 40 | struct list_head node; |
@@ -91,32 +52,52 @@ struct pwm_device { | |||
91 | 52 | ||
92 | int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns) | 53 | int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns) |
93 | { | 54 | { |
94 | unsigned long long c; | ||
95 | unsigned long period_cycles, duty_cycles, prescale; | ||
96 | |||
97 | if (pwm == NULL || period_ns == 0 || duty_ns > period_ns) | 55 | if (pwm == NULL || period_ns == 0 || duty_ns > period_ns) |
98 | return -EINVAL; | 56 | return -EINVAL; |
99 | 57 | ||
100 | c = clk_get_rate(pwm->clk); | 58 | if (cpu_is_mx27() || cpu_is_mx3()) { |
101 | c = c * period_ns; | 59 | unsigned long long c; |
102 | do_div(c, 1000000000); | 60 | unsigned long period_cycles, duty_cycles, prescale; |
103 | period_cycles = c; | 61 | c = clk_get_rate(pwm->clk); |
104 | 62 | c = c * period_ns; | |
105 | prescale = period_cycles / 0x10000 + 1; | 63 | do_div(c, 1000000000); |
106 | 64 | period_cycles = c; | |
107 | period_cycles /= prescale; | 65 | |
108 | c = (unsigned long long)period_cycles * duty_ns; | 66 | prescale = period_cycles / 0x10000 + 1; |
109 | do_div(c, period_ns); | 67 | |
110 | duty_cycles = c; | 68 | period_cycles /= prescale; |
111 | 69 | c = (unsigned long long)period_cycles * duty_ns; | |
112 | #ifdef PWM_VER_2 | 70 | do_div(c, period_ns); |
113 | writel(duty_cycles, pwm->mmio_base + PWMSAR); | 71 | duty_cycles = c; |
114 | writel(period_cycles, pwm->mmio_base + PWMPR); | 72 | |
115 | writel(PWMCR_PRESCALER(prescale - 1) | PWMCR_CLKSRC_IPG_HIGH | PWMCR_EN, | 73 | writel(duty_cycles, pwm->mmio_base + MX3_PWMSAR); |
116 | pwm->mmio_base + PWMCR); | 74 | writel(period_cycles, pwm->mmio_base + MX3_PWMPR); |
117 | #elif defined PWM_VER_1 | 75 | writel(MX3_PWMCR_PRESCALER(prescale - 1) | |
118 | #error PWM not yet working on MX1 / MX21 | 76 | MX3_PWMCR_CLKSRC_IPG_HIGH | MX3_PWMCR_EN, |
119 | #endif | 77 | pwm->mmio_base + MX3_PWMCR); |
78 | } else if (cpu_is_mx1() || cpu_is_mx21()) { | ||
79 | /* The PWM subsystem allows for exact frequencies. However, | ||
80 | * I cannot connect a scope on my device to the PWM line and | ||
81 | * thus cannot provide the program the PWM controller | ||
82 | * exactly. Instead, I'm relying on the fact that the | ||
83 | * Bootloader (u-boot or WinCE+haret) has programmed the PWM | ||
84 | * function group already. So I'll just modify the PWM sample | ||
85 | * register to follow the ratio of duty_ns vs. period_ns | ||
86 | * accordingly. | ||
87 | * | ||
88 | * This is good enought for programming the brightness of | ||
89 | * the LCD backlight. | ||
90 | * | ||
91 | * The real implementation would divide PERCLK[0] first by | ||
92 | * both the prescaler (/1 .. /128) and then by CLKSEL | ||
93 | * (/2 .. /16). | ||
94 | */ | ||
95 | u32 max = readl(pwm->mmio_base + MX1_PWMP); | ||
96 | u32 p = max * duty_ns / period_ns; | ||
97 | writel(max - p, pwm->mmio_base + MX1_PWMS); | ||
98 | } else { | ||
99 | BUG(); | ||
100 | } | ||
120 | 101 | ||
121 | return 0; | 102 | return 0; |
122 | } | 103 | } |
@@ -297,4 +278,3 @@ module_exit(mxc_pwm_exit); | |||
297 | 278 | ||
298 | MODULE_LICENSE("GPL v2"); | 279 | MODULE_LICENSE("GPL v2"); |
299 | MODULE_AUTHOR("Sascha Hauer <s.hauer@pengutronix.de>"); | 280 | MODULE_AUTHOR("Sascha Hauer <s.hauer@pengutronix.de>"); |
300 | |||
diff --git a/arch/arm/plat-mxc/time.c b/arch/arm/plat-mxc/time.c index dab3357196fb..88fb3a57e029 100644 --- a/arch/arm/plat-mxc/time.c +++ b/arch/arm/plat-mxc/time.c | |||
@@ -29,22 +29,85 @@ | |||
29 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
30 | #include <asm/mach/time.h> | 30 | #include <asm/mach/time.h> |
31 | #include <mach/common.h> | 31 | #include <mach/common.h> |
32 | #include <mach/mxc_timer.h> | 32 | |
33 | /* defines common for all i.MX */ | ||
34 | #define MXC_TCTL 0x00 | ||
35 | #define MXC_TCTL_TEN (1 << 0) | ||
36 | #define MXC_TPRER 0x04 | ||
37 | |||
38 | /* MX1, MX21, MX27 */ | ||
39 | #define MX1_2_TCTL_CLK_PCLK1 (1 << 1) | ||
40 | #define MX1_2_TCTL_IRQEN (1 << 4) | ||
41 | #define MX1_2_TCTL_FRR (1 << 8) | ||
42 | #define MX1_2_TCMP 0x08 | ||
43 | #define MX1_2_TCN 0x10 | ||
44 | #define MX1_2_TSTAT 0x14 | ||
45 | |||
46 | /* MX21, MX27 */ | ||
47 | #define MX2_TSTAT_CAPT (1 << 1) | ||
48 | #define MX2_TSTAT_COMP (1 << 0) | ||
49 | |||
50 | /* MX31, MX35 */ | ||
51 | #define MX3_TCTL_WAITEN (1 << 3) | ||
52 | #define MX3_TCTL_CLK_IPG (1 << 6) | ||
53 | #define MX3_TCTL_FRR (1 << 9) | ||
54 | #define MX3_IR 0x0c | ||
55 | #define MX3_TSTAT 0x08 | ||
56 | #define MX3_TSTAT_OF1 (1 << 0) | ||
57 | #define MX3_TCN 0x24 | ||
58 | #define MX3_TCMP 0x10 | ||
33 | 59 | ||
34 | static struct clock_event_device clockevent_mxc; | 60 | static struct clock_event_device clockevent_mxc; |
35 | static enum clock_event_mode clockevent_mode = CLOCK_EVT_MODE_UNUSED; | 61 | static enum clock_event_mode clockevent_mode = CLOCK_EVT_MODE_UNUSED; |
36 | 62 | ||
37 | /* clock source */ | 63 | static void __iomem *timer_base; |
38 | 64 | ||
39 | static cycle_t mxc_get_cycles(struct clocksource *cs) | 65 | static inline void gpt_irq_disable(void) |
40 | { | 66 | { |
41 | return __raw_readl(TIMER_BASE + MXC_TCN); | 67 | unsigned int tmp; |
68 | |||
69 | if (cpu_is_mx3()) | ||
70 | __raw_writel(0, timer_base + MX3_IR); | ||
71 | else { | ||
72 | tmp = __raw_readl(timer_base + MXC_TCTL); | ||
73 | __raw_writel(tmp & ~MX1_2_TCTL_IRQEN, timer_base + MXC_TCTL); | ||
74 | } | ||
75 | } | ||
76 | |||
77 | static inline void gpt_irq_enable(void) | ||
78 | { | ||
79 | if (cpu_is_mx3()) | ||
80 | __raw_writel(1<<0, timer_base + MX3_IR); | ||
81 | else { | ||
82 | __raw_writel(__raw_readl(timer_base + MXC_TCTL) | MX1_2_TCTL_IRQEN, | ||
83 | timer_base + MXC_TCTL); | ||
84 | } | ||
85 | } | ||
86 | |||
87 | static void gpt_irq_acknowledge(void) | ||
88 | { | ||
89 | if (cpu_is_mx1()) | ||
90 | __raw_writel(0, timer_base + MX1_2_TSTAT); | ||
91 | if (cpu_is_mx2()) | ||
92 | __raw_writel(MX2_TSTAT_CAPT | MX2_TSTAT_COMP, timer_base + MX1_2_TSTAT); | ||
93 | if (cpu_is_mx3()) | ||
94 | __raw_writel(MX3_TSTAT_OF1, timer_base + MX3_TSTAT); | ||
95 | } | ||
96 | |||
97 | static cycle_t mx1_2_get_cycles(struct clocksource *cs) | ||
98 | { | ||
99 | return __raw_readl(timer_base + MX1_2_TCN); | ||
100 | } | ||
101 | |||
102 | static cycle_t mx3_get_cycles(struct clocksource *cs) | ||
103 | { | ||
104 | return __raw_readl(timer_base + MX3_TCN); | ||
42 | } | 105 | } |
43 | 106 | ||
44 | static struct clocksource clocksource_mxc = { | 107 | static struct clocksource clocksource_mxc = { |
45 | .name = "mxc_timer1", | 108 | .name = "mxc_timer1", |
46 | .rating = 200, | 109 | .rating = 200, |
47 | .read = mxc_get_cycles, | 110 | .read = mx1_2_get_cycles, |
48 | .mask = CLOCKSOURCE_MASK(32), | 111 | .mask = CLOCKSOURCE_MASK(32), |
49 | .shift = 20, | 112 | .shift = 20, |
50 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 113 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
@@ -54,6 +117,9 @@ static int __init mxc_clocksource_init(struct clk *timer_clk) | |||
54 | { | 117 | { |
55 | unsigned int c = clk_get_rate(timer_clk); | 118 | unsigned int c = clk_get_rate(timer_clk); |
56 | 119 | ||
120 | if (cpu_is_mx3()) | ||
121 | clocksource_mxc.read = mx3_get_cycles; | ||
122 | |||
57 | clocksource_mxc.mult = clocksource_hz2mult(c, | 123 | clocksource_mxc.mult = clocksource_hz2mult(c, |
58 | clocksource_mxc.shift); | 124 | clocksource_mxc.shift); |
59 | clocksource_register(&clocksource_mxc); | 125 | clocksource_register(&clocksource_mxc); |
@@ -63,15 +129,29 @@ static int __init mxc_clocksource_init(struct clk *timer_clk) | |||
63 | 129 | ||
64 | /* clock event */ | 130 | /* clock event */ |
65 | 131 | ||
66 | static int mxc_set_next_event(unsigned long evt, | 132 | static int mx1_2_set_next_event(unsigned long evt, |
67 | struct clock_event_device *unused) | 133 | struct clock_event_device *unused) |
68 | { | 134 | { |
69 | unsigned long tcmp; | 135 | unsigned long tcmp; |
70 | 136 | ||
71 | tcmp = __raw_readl(TIMER_BASE + MXC_TCN) + evt; | 137 | tcmp = __raw_readl(timer_base + MX1_2_TCN) + evt; |
72 | __raw_writel(tcmp, TIMER_BASE + MXC_TCMP); | ||
73 | 138 | ||
74 | return (int)(tcmp - __raw_readl(TIMER_BASE + MXC_TCN)) < 0 ? | 139 | __raw_writel(tcmp, timer_base + MX1_2_TCMP); |
140 | |||
141 | return (int)(tcmp - __raw_readl(timer_base + MX1_2_TCN)) < 0 ? | ||
142 | -ETIME : 0; | ||
143 | } | ||
144 | |||
145 | static int mx3_set_next_event(unsigned long evt, | ||
146 | struct clock_event_device *unused) | ||
147 | { | ||
148 | unsigned long tcmp; | ||
149 | |||
150 | tcmp = __raw_readl(timer_base + MX3_TCN) + evt; | ||
151 | |||
152 | __raw_writel(tcmp, timer_base + MX3_TCMP); | ||
153 | |||
154 | return (int)(tcmp - __raw_readl(timer_base + MX3_TCN)) < 0 ? | ||
75 | -ETIME : 0; | 155 | -ETIME : 0; |
76 | } | 156 | } |
77 | 157 | ||
@@ -100,8 +180,13 @@ static void mxc_set_mode(enum clock_event_mode mode, | |||
100 | 180 | ||
101 | if (mode != clockevent_mode) { | 181 | if (mode != clockevent_mode) { |
102 | /* Set event time into far-far future */ | 182 | /* Set event time into far-far future */ |
103 | __raw_writel(__raw_readl(TIMER_BASE + MXC_TCN) - 3, | 183 | if (cpu_is_mx3()) |
104 | TIMER_BASE + MXC_TCMP); | 184 | __raw_writel(__raw_readl(timer_base + MX3_TCN) - 3, |
185 | timer_base + MX3_TCMP); | ||
186 | else | ||
187 | __raw_writel(__raw_readl(timer_base + MX1_2_TCN) - 3, | ||
188 | timer_base + MX1_2_TCMP); | ||
189 | |||
105 | /* Clear pending interrupt */ | 190 | /* Clear pending interrupt */ |
106 | gpt_irq_acknowledge(); | 191 | gpt_irq_acknowledge(); |
107 | } | 192 | } |
@@ -148,7 +233,10 @@ static irqreturn_t mxc_timer_interrupt(int irq, void *dev_id) | |||
148 | struct clock_event_device *evt = &clockevent_mxc; | 233 | struct clock_event_device *evt = &clockevent_mxc; |
149 | uint32_t tstat; | 234 | uint32_t tstat; |
150 | 235 | ||
151 | tstat = __raw_readl(TIMER_BASE + MXC_TSTAT); | 236 | if (cpu_is_mx3()) |
237 | tstat = __raw_readl(timer_base + MX3_TSTAT); | ||
238 | else | ||
239 | tstat = __raw_readl(timer_base + MX1_2_TSTAT); | ||
152 | 240 | ||
153 | gpt_irq_acknowledge(); | 241 | gpt_irq_acknowledge(); |
154 | 242 | ||
@@ -168,7 +256,7 @@ static struct clock_event_device clockevent_mxc = { | |||
168 | .features = CLOCK_EVT_FEAT_ONESHOT, | 256 | .features = CLOCK_EVT_FEAT_ONESHOT, |
169 | .shift = 32, | 257 | .shift = 32, |
170 | .set_mode = mxc_set_mode, | 258 | .set_mode = mxc_set_mode, |
171 | .set_next_event = mxc_set_next_event, | 259 | .set_next_event = mx1_2_set_next_event, |
172 | .rating = 200, | 260 | .rating = 200, |
173 | }; | 261 | }; |
174 | 262 | ||
@@ -176,6 +264,9 @@ static int __init mxc_clockevent_init(struct clk *timer_clk) | |||
176 | { | 264 | { |
177 | unsigned int c = clk_get_rate(timer_clk); | 265 | unsigned int c = clk_get_rate(timer_clk); |
178 | 266 | ||
267 | if (cpu_is_mx3()) | ||
268 | clockevent_mxc.set_next_event = mx3_set_next_event; | ||
269 | |||
179 | clockevent_mxc.mult = div_sc(c, NSEC_PER_SEC, | 270 | clockevent_mxc.mult = div_sc(c, NSEC_PER_SEC, |
180 | clockevent_mxc.shift); | 271 | clockevent_mxc.shift); |
181 | clockevent_mxc.max_delta_ns = | 272 | clockevent_mxc.max_delta_ns = |
@@ -192,23 +283,47 @@ static int __init mxc_clockevent_init(struct clk *timer_clk) | |||
192 | 283 | ||
193 | void __init mxc_timer_init(struct clk *timer_clk) | 284 | void __init mxc_timer_init(struct clk *timer_clk) |
194 | { | 285 | { |
286 | uint32_t tctl_val; | ||
287 | int irq; | ||
288 | |||
195 | clk_enable(timer_clk); | 289 | clk_enable(timer_clk); |
196 | 290 | ||
291 | if (cpu_is_mx1()) { | ||
292 | #ifdef CONFIG_ARCH_MX1 | ||
293 | timer_base = IO_ADDRESS(TIM1_BASE_ADDR); | ||
294 | irq = TIM1_INT; | ||
295 | #endif | ||
296 | } else if (cpu_is_mx2()) { | ||
297 | #ifdef CONFIG_ARCH_MX2 | ||
298 | timer_base = IO_ADDRESS(GPT1_BASE_ADDR); | ||
299 | irq = MXC_INT_GPT1; | ||
300 | #endif | ||
301 | } else if (cpu_is_mx3()) { | ||
302 | #ifdef CONFIG_ARCH_MX3 | ||
303 | timer_base = IO_ADDRESS(GPT1_BASE_ADDR); | ||
304 | irq = MXC_INT_GPT; | ||
305 | #endif | ||
306 | } else | ||
307 | BUG(); | ||
308 | |||
197 | /* | 309 | /* |
198 | * Initialise to a known state (all timers off, and timing reset) | 310 | * Initialise to a known state (all timers off, and timing reset) |
199 | */ | 311 | */ |
200 | __raw_writel(0, TIMER_BASE + MXC_TCTL); | ||
201 | __raw_writel(0, TIMER_BASE + MXC_TPRER); /* see datasheet note */ | ||
202 | 312 | ||
203 | __raw_writel(TCTL_FRR | /* free running */ | 313 | __raw_writel(0, timer_base + MXC_TCTL); |
204 | TCTL_VAL | /* set clocksource and arch specific bits */ | 314 | __raw_writel(0, timer_base + MXC_TPRER); /* see datasheet note */ |
205 | TCTL_TEN, /* start the timer */ | 315 | |
206 | TIMER_BASE + MXC_TCTL); | 316 | if (cpu_is_mx3()) |
317 | tctl_val = MX3_TCTL_CLK_IPG | MX3_TCTL_FRR | MX3_TCTL_WAITEN | MXC_TCTL_TEN; | ||
318 | else | ||
319 | tctl_val = MX1_2_TCTL_FRR | MX1_2_TCTL_CLK_PCLK1 | MXC_TCTL_TEN; | ||
320 | |||
321 | __raw_writel(tctl_val, timer_base + MXC_TCTL); | ||
207 | 322 | ||
208 | /* init and register the timer to the framework */ | 323 | /* init and register the timer to the framework */ |
209 | mxc_clocksource_init(timer_clk); | 324 | mxc_clocksource_init(timer_clk); |
210 | mxc_clockevent_init(timer_clk); | 325 | mxc_clockevent_init(timer_clk); |
211 | 326 | ||
212 | /* Make irqs happen */ | 327 | /* Make irqs happen */ |
213 | setup_irq(TIMER_INTERRUPT, &mxc_timer_irq); | 328 | setup_irq(irq, &mxc_timer_irq); |
214 | } | 329 | } |
diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig index 5fab6470f4b2..26c93c75e62d 100644 --- a/drivers/char/hw_random/Kconfig +++ b/drivers/char/hw_random/Kconfig | |||
@@ -148,3 +148,15 @@ config HW_RANDOM_VIRTIO | |||
148 | 148 | ||
149 | To compile this driver as a module, choose M here: the | 149 | To compile this driver as a module, choose M here: the |
150 | module will be called virtio-rng. If unsure, say N. | 150 | module will be called virtio-rng. If unsure, say N. |
151 | |||
152 | config HW_RANDOM_MXC_RNGA | ||
153 | tristate "Freescale i.MX RNGA Random Number Generator" | ||
154 | depends on HW_RANDOM && ARCH_HAS_RNGA | ||
155 | ---help--- | ||
156 | This driver provides kernel-side support for the Random Number | ||
157 | Generator hardware found on Freescale i.MX processors. | ||
158 | |||
159 | To compile this driver as a module, choose M here: the | ||
160 | module will be called mxc-rnga. | ||
161 | |||
162 | If unsure, say Y. | ||
diff --git a/drivers/char/hw_random/Makefile b/drivers/char/hw_random/Makefile index e81d21a5f28f..fd1ecd2f6731 100644 --- a/drivers/char/hw_random/Makefile +++ b/drivers/char/hw_random/Makefile | |||
@@ -15,3 +15,4 @@ obj-$(CONFIG_HW_RANDOM_IXP4XX) += ixp4xx-rng.o | |||
15 | obj-$(CONFIG_HW_RANDOM_OMAP) += omap-rng.o | 15 | obj-$(CONFIG_HW_RANDOM_OMAP) += omap-rng.o |
16 | obj-$(CONFIG_HW_RANDOM_PASEMI) += pasemi-rng.o | 16 | obj-$(CONFIG_HW_RANDOM_PASEMI) += pasemi-rng.o |
17 | obj-$(CONFIG_HW_RANDOM_VIRTIO) += virtio-rng.o | 17 | obj-$(CONFIG_HW_RANDOM_VIRTIO) += virtio-rng.o |
18 | obj-$(CONFIG_HW_RANDOM_MXC_RNGA) += mxc-rnga.o | ||
diff --git a/drivers/char/hw_random/mxc-rnga.c b/drivers/char/hw_random/mxc-rnga.c new file mode 100644 index 000000000000..187c6be80f43 --- /dev/null +++ b/drivers/char/hw_random/mxc-rnga.c | |||
@@ -0,0 +1,247 @@ | |||
1 | /* | ||
2 | * RNG driver for Freescale RNGA | ||
3 | * | ||
4 | * Copyright 2008-2009 Freescale Semiconductor, Inc. All Rights Reserved. | ||
5 | * Author: Alan Carvalho de Assis <acassis@gmail.com> | ||
6 | */ | ||
7 | |||
8 | /* | ||
9 | * The code contained herein is licensed under the GNU General Public | ||
10 | * License. You may obtain a copy of the GNU General Public License | ||
11 | * Version 2 or later at the following locations: | ||
12 | * | ||
13 | * http://www.opensource.org/licenses/gpl-license.html | ||
14 | * http://www.gnu.org/copyleft/gpl.html | ||
15 | * | ||
16 | * This driver is based on other RNG drivers. | ||
17 | */ | ||
18 | |||
19 | #include <linux/module.h> | ||
20 | #include <linux/init.h> | ||
21 | #include <linux/kernel.h> | ||
22 | #include <linux/clk.h> | ||
23 | #include <linux/err.h> | ||
24 | #include <linux/ioport.h> | ||
25 | #include <linux/platform_device.h> | ||
26 | #include <linux/hw_random.h> | ||
27 | #include <linux/io.h> | ||
28 | |||
29 | /* RNGA Registers */ | ||
30 | #define RNGA_CONTROL 0x00 | ||
31 | #define RNGA_STATUS 0x04 | ||
32 | #define RNGA_ENTROPY 0x08 | ||
33 | #define RNGA_OUTPUT_FIFO 0x0c | ||
34 | #define RNGA_MODE 0x10 | ||
35 | #define RNGA_VERIFICATION_CONTROL 0x14 | ||
36 | #define RNGA_OSC_CONTROL_COUNTER 0x18 | ||
37 | #define RNGA_OSC1_COUNTER 0x1c | ||
38 | #define RNGA_OSC2_COUNTER 0x20 | ||
39 | #define RNGA_OSC_COUNTER_STATUS 0x24 | ||
40 | |||
41 | /* RNGA Registers Range */ | ||
42 | #define RNG_ADDR_RANGE 0x28 | ||
43 | |||
44 | /* RNGA Control Register */ | ||
45 | #define RNGA_CONTROL_SLEEP 0x00000010 | ||
46 | #define RNGA_CONTROL_CLEAR_INT 0x00000008 | ||
47 | #define RNGA_CONTROL_MASK_INTS 0x00000004 | ||
48 | #define RNGA_CONTROL_HIGH_ASSURANCE 0x00000002 | ||
49 | #define RNGA_CONTROL_GO 0x00000001 | ||
50 | |||
51 | #define RNGA_STATUS_LEVEL_MASK 0x0000ff00 | ||
52 | |||
53 | /* RNGA Status Register */ | ||
54 | #define RNGA_STATUS_OSC_DEAD 0x80000000 | ||
55 | #define RNGA_STATUS_SLEEP 0x00000010 | ||
56 | #define RNGA_STATUS_ERROR_INT 0x00000008 | ||
57 | #define RNGA_STATUS_FIFO_UNDERFLOW 0x00000004 | ||
58 | #define RNGA_STATUS_LAST_READ_STATUS 0x00000002 | ||
59 | #define RNGA_STATUS_SECURITY_VIOLATION 0x00000001 | ||
60 | |||
61 | static struct platform_device *rng_dev; | ||
62 | |||
63 | static int mxc_rnga_data_present(struct hwrng *rng) | ||
64 | { | ||
65 | int level; | ||
66 | void __iomem *rng_base = (void __iomem *)rng->priv; | ||
67 | |||
68 | /* how many random numbers is in FIFO? [0-16] */ | ||
69 | level = ((__raw_readl(rng_base + RNGA_STATUS) & | ||
70 | RNGA_STATUS_LEVEL_MASK) >> 8); | ||
71 | |||
72 | return level > 0 ? 1 : 0; | ||
73 | } | ||
74 | |||
75 | static int mxc_rnga_data_read(struct hwrng *rng, u32 * data) | ||
76 | { | ||
77 | int err; | ||
78 | u32 ctrl; | ||
79 | void __iomem *rng_base = (void __iomem *)rng->priv; | ||
80 | |||
81 | /* retrieve a random number from FIFO */ | ||
82 | *data = __raw_readl(rng_base + RNGA_OUTPUT_FIFO); | ||
83 | |||
84 | /* some error while reading this random number? */ | ||
85 | err = __raw_readl(rng_base + RNGA_STATUS) & RNGA_STATUS_ERROR_INT; | ||
86 | |||
87 | /* if error: clear error interrupt, but doesn't return random number */ | ||
88 | if (err) { | ||
89 | dev_dbg(&rng_dev->dev, "Error while reading random number!\n"); | ||
90 | ctrl = __raw_readl(rng_base + RNGA_CONTROL); | ||
91 | __raw_writel(ctrl | RNGA_CONTROL_CLEAR_INT, | ||
92 | rng_base + RNGA_CONTROL); | ||
93 | return 0; | ||
94 | } else | ||
95 | return 4; | ||
96 | } | ||
97 | |||
98 | static int mxc_rnga_init(struct hwrng *rng) | ||
99 | { | ||
100 | u32 ctrl, osc; | ||
101 | void __iomem *rng_base = (void __iomem *)rng->priv; | ||
102 | |||
103 | /* wake up */ | ||
104 | ctrl = __raw_readl(rng_base + RNGA_CONTROL); | ||
105 | __raw_writel(ctrl & ~RNGA_CONTROL_SLEEP, rng_base + RNGA_CONTROL); | ||
106 | |||
107 | /* verify if oscillator is working */ | ||
108 | osc = __raw_readl(rng_base + RNGA_STATUS); | ||
109 | if (osc & RNGA_STATUS_OSC_DEAD) { | ||
110 | dev_err(&rng_dev->dev, "RNGA Oscillator is dead!\n"); | ||
111 | return -ENODEV; | ||
112 | } | ||
113 | |||
114 | /* go running */ | ||
115 | ctrl = __raw_readl(rng_base + RNGA_CONTROL); | ||
116 | __raw_writel(ctrl | RNGA_CONTROL_GO, rng_base + RNGA_CONTROL); | ||
117 | |||
118 | return 0; | ||
119 | } | ||
120 | |||
121 | static void mxc_rnga_cleanup(struct hwrng *rng) | ||
122 | { | ||
123 | u32 ctrl; | ||
124 | void __iomem *rng_base = (void __iomem *)rng->priv; | ||
125 | |||
126 | ctrl = __raw_readl(rng_base + RNGA_CONTROL); | ||
127 | |||
128 | /* stop rnga */ | ||
129 | __raw_writel(ctrl & ~RNGA_CONTROL_GO, rng_base + RNGA_CONTROL); | ||
130 | } | ||
131 | |||
132 | static struct hwrng mxc_rnga = { | ||
133 | .name = "mxc-rnga", | ||
134 | .init = mxc_rnga_init, | ||
135 | .cleanup = mxc_rnga_cleanup, | ||
136 | .data_present = mxc_rnga_data_present, | ||
137 | .data_read = mxc_rnga_data_read | ||
138 | }; | ||
139 | |||
140 | static int __init mxc_rnga_probe(struct platform_device *pdev) | ||
141 | { | ||
142 | int err = -ENODEV; | ||
143 | struct clk *clk; | ||
144 | struct resource *res, *mem; | ||
145 | void __iomem *rng_base = NULL; | ||
146 | |||
147 | if (rng_dev) | ||
148 | return -EBUSY; | ||
149 | |||
150 | clk = clk_get(&pdev->dev, "rng"); | ||
151 | if (IS_ERR(clk)) { | ||
152 | dev_err(&pdev->dev, "Could not get rng_clk!\n"); | ||
153 | err = PTR_ERR(clk); | ||
154 | goto out; | ||
155 | } | ||
156 | |||
157 | clk_enable(clk); | ||
158 | |||
159 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
160 | if (!res) { | ||
161 | err = -ENOENT; | ||
162 | goto err_region; | ||
163 | } | ||
164 | |||
165 | mem = request_mem_region(res->start, resource_size(res), pdev->name); | ||
166 | if (mem == NULL) { | ||
167 | err = -EBUSY; | ||
168 | goto err_region; | ||
169 | } | ||
170 | |||
171 | rng_base = ioremap(res->start, resource_size(res)); | ||
172 | if (!rng_base) { | ||
173 | err = -ENOMEM; | ||
174 | goto err_ioremap; | ||
175 | } | ||
176 | |||
177 | mxc_rnga.priv = (unsigned long)rng_base; | ||
178 | |||
179 | err = hwrng_register(&mxc_rnga); | ||
180 | if (err) { | ||
181 | dev_err(&pdev->dev, "MXC RNGA registering failed (%d)\n", err); | ||
182 | goto err_register; | ||
183 | } | ||
184 | |||
185 | rng_dev = pdev; | ||
186 | |||
187 | dev_info(&pdev->dev, "MXC RNGA Registered.\n"); | ||
188 | |||
189 | return 0; | ||
190 | |||
191 | err_register: | ||
192 | iounmap(rng_base); | ||
193 | rng_base = NULL; | ||
194 | |||
195 | err_ioremap: | ||
196 | release_mem_region(res->start, resource_size(res)); | ||
197 | |||
198 | err_region: | ||
199 | clk_disable(clk); | ||
200 | clk_put(clk); | ||
201 | |||
202 | out: | ||
203 | return err; | ||
204 | } | ||
205 | |||
206 | static int __exit mxc_rnga_remove(struct platform_device *pdev) | ||
207 | { | ||
208 | struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
209 | void __iomem *rng_base = (void __iomem *)mxc_rnga.priv; | ||
210 | struct clk *clk = clk_get(&pdev->dev, "rng"); | ||
211 | |||
212 | hwrng_unregister(&mxc_rnga); | ||
213 | |||
214 | iounmap(rng_base); | ||
215 | |||
216 | release_mem_region(res->start, resource_size(res)); | ||
217 | |||
218 | clk_disable(clk); | ||
219 | clk_put(clk); | ||
220 | |||
221 | return 0; | ||
222 | } | ||
223 | |||
224 | static struct platform_driver mxc_rnga_driver = { | ||
225 | .driver = { | ||
226 | .name = "mxc_rnga", | ||
227 | .owner = THIS_MODULE, | ||
228 | }, | ||
229 | .remove = __exit_p(mxc_rnga_remove), | ||
230 | }; | ||
231 | |||
232 | static int __init mod_init(void) | ||
233 | { | ||
234 | return platform_driver_probe(&mxc_rnga_driver, mxc_rnga_probe); | ||
235 | } | ||
236 | |||
237 | static void __exit mod_exit(void) | ||
238 | { | ||
239 | platform_driver_unregister(&mxc_rnga_driver); | ||
240 | } | ||
241 | |||
242 | module_init(mod_init); | ||
243 | module_exit(mod_exit); | ||
244 | |||
245 | MODULE_AUTHOR("Freescale Semiconductor, Inc."); | ||
246 | MODULE_DESCRIPTION("H/W RNGA driver for i.MX"); | ||
247 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig index 9d48da2fb013..57835f5715fc 100644 --- a/drivers/media/video/Kconfig +++ b/drivers/media/video/Kconfig | |||
@@ -758,10 +758,14 @@ config VIDEO_MX1 | |||
758 | ---help--- | 758 | ---help--- |
759 | This is a v4l2 driver for the i.MX1/i.MXL CMOS Sensor Interface | 759 | This is a v4l2 driver for the i.MX1/i.MXL CMOS Sensor Interface |
760 | 760 | ||
761 | config MX3_VIDEO | ||
762 | bool | ||
763 | |||
761 | config VIDEO_MX3 | 764 | config VIDEO_MX3 |
762 | tristate "i.MX3x Camera Sensor Interface driver" | 765 | tristate "i.MX3x Camera Sensor Interface driver" |
763 | depends on VIDEO_DEV && MX3_IPU && SOC_CAMERA | 766 | depends on VIDEO_DEV && MX3_IPU && SOC_CAMERA |
764 | select VIDEOBUF_DMA_CONTIG | 767 | select VIDEOBUF_DMA_CONTIG |
768 | select MX3_VIDEO | ||
765 | ---help--- | 769 | ---help--- |
766 | This is a v4l2 driver for the i.MX3x Camera Sensor Interface | 770 | This is a v4l2 driver for the i.MX3x Camera Sensor Interface |
767 | 771 | ||
diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig index b4cf691f3f64..3eb87bda14f3 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig | |||
@@ -155,7 +155,7 @@ config MMC_ATMELMCI_DMA | |||
155 | 155 | ||
156 | config MMC_IMX | 156 | config MMC_IMX |
157 | tristate "Motorola i.MX Multimedia Card Interface support" | 157 | tristate "Motorola i.MX Multimedia Card Interface support" |
158 | depends on ARCH_IMX | 158 | depends on ARCH_MX1 |
159 | help | 159 | help |
160 | This selects the Motorola i.MX Multimedia card Interface. | 160 | This selects the Motorola i.MX Multimedia card Interface. |
161 | If you have a i.MX platform with a Multimedia Card slot, | 161 | If you have a i.MX platform with a Multimedia Card slot, |
diff --git a/drivers/rtc/rtc-ep93xx.c b/drivers/rtc/rtc-ep93xx.c index f7a3283dd029..551332e4ed02 100644 --- a/drivers/rtc/rtc-ep93xx.c +++ b/drivers/rtc/rtc-ep93xx.c | |||
@@ -12,32 +12,56 @@ | |||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/rtc.h> | 13 | #include <linux/rtc.h> |
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
15 | #include <mach/hardware.h> | 15 | #include <linux/io.h> |
16 | |||
17 | #define EP93XX_RTC_DATA 0x000 | ||
18 | #define EP93XX_RTC_MATCH 0x004 | ||
19 | #define EP93XX_RTC_STATUS 0x008 | ||
20 | #define EP93XX_RTC_STATUS_INTR (1<<0) | ||
21 | #define EP93XX_RTC_LOAD 0x00C | ||
22 | #define EP93XX_RTC_CONTROL 0x010 | ||
23 | #define EP93XX_RTC_CONTROL_MIE (1<<0) | ||
24 | #define EP93XX_RTC_SWCOMP 0x108 | ||
25 | #define EP93XX_RTC_SWCOMP_DEL_MASK 0x001f0000 | ||
26 | #define EP93XX_RTC_SWCOMP_DEL_SHIFT 16 | ||
27 | #define EP93XX_RTC_SWCOMP_INT_MASK 0x0000ffff | ||
28 | #define EP93XX_RTC_SWCOMP_INT_SHIFT 0 | ||
29 | |||
30 | #define DRV_VERSION "0.3" | ||
16 | 31 | ||
17 | #define EP93XX_RTC_REG(x) (EP93XX_RTC_BASE + (x)) | 32 | /* |
18 | #define EP93XX_RTC_DATA EP93XX_RTC_REG(0x0000) | 33 | * struct device dev.platform_data is used to store our private data |
19 | #define EP93XX_RTC_LOAD EP93XX_RTC_REG(0x000C) | 34 | * because struct rtc_device does not have a variable to hold it. |
20 | #define EP93XX_RTC_SWCOMP EP93XX_RTC_REG(0x0108) | 35 | */ |
21 | 36 | struct ep93xx_rtc { | |
22 | #define DRV_VERSION "0.2" | 37 | void __iomem *mmio_base; |
38 | }; | ||
23 | 39 | ||
24 | static int ep93xx_get_swcomp(struct device *dev, unsigned short *preload, | 40 | static int ep93xx_rtc_get_swcomp(struct device *dev, unsigned short *preload, |
25 | unsigned short *delete) | 41 | unsigned short *delete) |
26 | { | 42 | { |
27 | unsigned short comp = __raw_readl(EP93XX_RTC_SWCOMP); | 43 | struct ep93xx_rtc *ep93xx_rtc = dev->platform_data; |
44 | unsigned long comp; | ||
45 | |||
46 | comp = __raw_readl(ep93xx_rtc->mmio_base + EP93XX_RTC_SWCOMP); | ||
28 | 47 | ||
29 | if (preload) | 48 | if (preload) |
30 | *preload = comp & 0xffff; | 49 | *preload = (comp & EP93XX_RTC_SWCOMP_INT_MASK) |
50 | >> EP93XX_RTC_SWCOMP_INT_SHIFT; | ||
31 | 51 | ||
32 | if (delete) | 52 | if (delete) |
33 | *delete = (comp >> 16) & 0x1f; | 53 | *delete = (comp & EP93XX_RTC_SWCOMP_DEL_MASK) |
54 | >> EP93XX_RTC_SWCOMP_DEL_SHIFT; | ||
34 | 55 | ||
35 | return 0; | 56 | return 0; |
36 | } | 57 | } |
37 | 58 | ||
38 | static int ep93xx_rtc_read_time(struct device *dev, struct rtc_time *tm) | 59 | static int ep93xx_rtc_read_time(struct device *dev, struct rtc_time *tm) |
39 | { | 60 | { |
40 | unsigned long time = __raw_readl(EP93XX_RTC_DATA); | 61 | struct ep93xx_rtc *ep93xx_rtc = dev->platform_data; |
62 | unsigned long time; | ||
63 | |||
64 | time = __raw_readl(ep93xx_rtc->mmio_base + EP93XX_RTC_DATA); | ||
41 | 65 | ||
42 | rtc_time_to_tm(time, tm); | 66 | rtc_time_to_tm(time, tm); |
43 | return 0; | 67 | return 0; |
@@ -45,7 +69,9 @@ static int ep93xx_rtc_read_time(struct device *dev, struct rtc_time *tm) | |||
45 | 69 | ||
46 | static int ep93xx_rtc_set_mmss(struct device *dev, unsigned long secs) | 70 | static int ep93xx_rtc_set_mmss(struct device *dev, unsigned long secs) |
47 | { | 71 | { |
48 | __raw_writel(secs + 1, EP93XX_RTC_LOAD); | 72 | struct ep93xx_rtc *ep93xx_rtc = dev->platform_data; |
73 | |||
74 | __raw_writel(secs + 1, ep93xx_rtc->mmio_base + EP93XX_RTC_LOAD); | ||
49 | return 0; | 75 | return 0; |
50 | } | 76 | } |
51 | 77 | ||
@@ -53,7 +79,7 @@ static int ep93xx_rtc_proc(struct device *dev, struct seq_file *seq) | |||
53 | { | 79 | { |
54 | unsigned short preload, delete; | 80 | unsigned short preload, delete; |
55 | 81 | ||
56 | ep93xx_get_swcomp(dev, &preload, &delete); | 82 | ep93xx_rtc_get_swcomp(dev, &preload, &delete); |
57 | 83 | ||
58 | seq_printf(seq, "preload\t\t: %d\n", preload); | 84 | seq_printf(seq, "preload\t\t: %d\n", preload); |
59 | seq_printf(seq, "delete\t\t: %d\n", delete); | 85 | seq_printf(seq, "delete\t\t: %d\n", delete); |
@@ -67,54 +93,104 @@ static const struct rtc_class_ops ep93xx_rtc_ops = { | |||
67 | .proc = ep93xx_rtc_proc, | 93 | .proc = ep93xx_rtc_proc, |
68 | }; | 94 | }; |
69 | 95 | ||
70 | static ssize_t ep93xx_sysfs_show_comp_preload(struct device *dev, | 96 | static ssize_t ep93xx_rtc_show_comp_preload(struct device *dev, |
71 | struct device_attribute *attr, char *buf) | 97 | struct device_attribute *attr, char *buf) |
72 | { | 98 | { |
73 | unsigned short preload; | 99 | unsigned short preload; |
74 | 100 | ||
75 | ep93xx_get_swcomp(dev, &preload, NULL); | 101 | ep93xx_rtc_get_swcomp(dev, &preload, NULL); |
76 | 102 | ||
77 | return sprintf(buf, "%d\n", preload); | 103 | return sprintf(buf, "%d\n", preload); |
78 | } | 104 | } |
79 | static DEVICE_ATTR(comp_preload, S_IRUGO, ep93xx_sysfs_show_comp_preload, NULL); | 105 | static DEVICE_ATTR(comp_preload, S_IRUGO, ep93xx_rtc_show_comp_preload, NULL); |
80 | 106 | ||
81 | static ssize_t ep93xx_sysfs_show_comp_delete(struct device *dev, | 107 | static ssize_t ep93xx_rtc_show_comp_delete(struct device *dev, |
82 | struct device_attribute *attr, char *buf) | 108 | struct device_attribute *attr, char *buf) |
83 | { | 109 | { |
84 | unsigned short delete; | 110 | unsigned short delete; |
85 | 111 | ||
86 | ep93xx_get_swcomp(dev, NULL, &delete); | 112 | ep93xx_rtc_get_swcomp(dev, NULL, &delete); |
87 | 113 | ||
88 | return sprintf(buf, "%d\n", delete); | 114 | return sprintf(buf, "%d\n", delete); |
89 | } | 115 | } |
90 | static DEVICE_ATTR(comp_delete, S_IRUGO, ep93xx_sysfs_show_comp_delete, NULL); | 116 | static DEVICE_ATTR(comp_delete, S_IRUGO, ep93xx_rtc_show_comp_delete, NULL); |
91 | 117 | ||
92 | 118 | ||
93 | static int __devinit ep93xx_rtc_probe(struct platform_device *dev) | 119 | static int __init ep93xx_rtc_probe(struct platform_device *pdev) |
94 | { | 120 | { |
95 | struct rtc_device *rtc = rtc_device_register("ep93xx", | 121 | struct ep93xx_rtc *ep93xx_rtc; |
96 | &dev->dev, &ep93xx_rtc_ops, THIS_MODULE); | 122 | struct resource *res; |
123 | struct rtc_device *rtc; | ||
124 | int err; | ||
125 | |||
126 | ep93xx_rtc = kzalloc(sizeof(struct ep93xx_rtc), GFP_KERNEL); | ||
127 | if (ep93xx_rtc == NULL) | ||
128 | return -ENOMEM; | ||
129 | |||
130 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
131 | if (res == NULL) | ||
132 | return -ENXIO; | ||
133 | |||
134 | res = request_mem_region(res->start, resource_size(res), pdev->name); | ||
135 | if (res == NULL) | ||
136 | return -EBUSY; | ||
137 | |||
138 | ep93xx_rtc->mmio_base = ioremap(res->start, resource_size(res)); | ||
139 | if (ep93xx_rtc->mmio_base == NULL) { | ||
140 | err = -ENXIO; | ||
141 | goto fail; | ||
142 | } | ||
97 | 143 | ||
144 | pdev->dev.platform_data = ep93xx_rtc; | ||
145 | |||
146 | rtc = rtc_device_register(pdev->name, | ||
147 | &pdev->dev, &ep93xx_rtc_ops, THIS_MODULE); | ||
98 | if (IS_ERR(rtc)) { | 148 | if (IS_ERR(rtc)) { |
99 | return PTR_ERR(rtc); | 149 | err = PTR_ERR(rtc); |
150 | goto fail; | ||
100 | } | 151 | } |
101 | 152 | ||
102 | platform_set_drvdata(dev, rtc); | 153 | platform_set_drvdata(pdev, rtc); |
103 | 154 | ||
104 | device_create_file(&dev->dev, &dev_attr_comp_preload); | 155 | err = device_create_file(&pdev->dev, &dev_attr_comp_preload); |
105 | device_create_file(&dev->dev, &dev_attr_comp_delete); | 156 | if (err) |
157 | goto fail; | ||
158 | err = device_create_file(&pdev->dev, &dev_attr_comp_delete); | ||
159 | if (err) { | ||
160 | device_remove_file(&pdev->dev, &dev_attr_comp_preload); | ||
161 | goto fail; | ||
162 | } | ||
106 | 163 | ||
107 | return 0; | 164 | return 0; |
165 | |||
166 | fail: | ||
167 | if (ep93xx_rtc->mmio_base) { | ||
168 | iounmap(ep93xx_rtc->mmio_base); | ||
169 | pdev->dev.platform_data = NULL; | ||
170 | } | ||
171 | release_mem_region(res->start, resource_size(res)); | ||
172 | return err; | ||
108 | } | 173 | } |
109 | 174 | ||
110 | static int __devexit ep93xx_rtc_remove(struct platform_device *dev) | 175 | static int __exit ep93xx_rtc_remove(struct platform_device *pdev) |
111 | { | 176 | { |
112 | struct rtc_device *rtc = platform_get_drvdata(dev); | 177 | struct rtc_device *rtc = platform_get_drvdata(pdev); |
178 | struct ep93xx_rtc *ep93xx_rtc = pdev->dev.platform_data; | ||
179 | struct resource *res; | ||
180 | |||
181 | /* cleanup sysfs */ | ||
182 | device_remove_file(&pdev->dev, &dev_attr_comp_delete); | ||
183 | device_remove_file(&pdev->dev, &dev_attr_comp_preload); | ||
184 | |||
185 | rtc_device_unregister(rtc); | ||
186 | |||
187 | iounmap(ep93xx_rtc->mmio_base); | ||
188 | pdev->dev.platform_data = NULL; | ||
113 | 189 | ||
114 | if (rtc) | 190 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
115 | rtc_device_unregister(rtc); | 191 | release_mem_region(res->start, resource_size(res)); |
116 | 192 | ||
117 | platform_set_drvdata(dev, NULL); | 193 | platform_set_drvdata(pdev, NULL); |
118 | 194 | ||
119 | return 0; | 195 | return 0; |
120 | } | 196 | } |
@@ -122,23 +198,22 @@ static int __devexit ep93xx_rtc_remove(struct platform_device *dev) | |||
122 | /* work with hotplug and coldplug */ | 198 | /* work with hotplug and coldplug */ |
123 | MODULE_ALIAS("platform:ep93xx-rtc"); | 199 | MODULE_ALIAS("platform:ep93xx-rtc"); |
124 | 200 | ||
125 | static struct platform_driver ep93xx_rtc_platform_driver = { | 201 | static struct platform_driver ep93xx_rtc_driver = { |
126 | .driver = { | 202 | .driver = { |
127 | .name = "ep93xx-rtc", | 203 | .name = "ep93xx-rtc", |
128 | .owner = THIS_MODULE, | 204 | .owner = THIS_MODULE, |
129 | }, | 205 | }, |
130 | .probe = ep93xx_rtc_probe, | 206 | .remove = __exit_p(ep93xx_rtc_remove), |
131 | .remove = __devexit_p(ep93xx_rtc_remove), | ||
132 | }; | 207 | }; |
133 | 208 | ||
134 | static int __init ep93xx_rtc_init(void) | 209 | static int __init ep93xx_rtc_init(void) |
135 | { | 210 | { |
136 | return platform_driver_register(&ep93xx_rtc_platform_driver); | 211 | return platform_driver_probe(&ep93xx_rtc_driver, ep93xx_rtc_probe); |
137 | } | 212 | } |
138 | 213 | ||
139 | static void __exit ep93xx_rtc_exit(void) | 214 | static void __exit ep93xx_rtc_exit(void) |
140 | { | 215 | { |
141 | platform_driver_unregister(&ep93xx_rtc_platform_driver); | 216 | platform_driver_unregister(&ep93xx_rtc_driver); |
142 | } | 217 | } |
143 | 218 | ||
144 | MODULE_AUTHOR("Alessandro Zummo <a.zummo@towertech.it>"); | 219 | MODULE_AUTHOR("Alessandro Zummo <a.zummo@towertech.it>"); |
diff --git a/drivers/serial/imx.c b/drivers/serial/imx.c index 9f460b175c50..3f5d5a200481 100644 --- a/drivers/serial/imx.c +++ b/drivers/serial/imx.c | |||
@@ -66,7 +66,7 @@ | |||
66 | #define ONEMS 0xb0 /* One Millisecond register */ | 66 | #define ONEMS 0xb0 /* One Millisecond register */ |
67 | #define UTS 0xb4 /* UART Test Register */ | 67 | #define UTS 0xb4 /* UART Test Register */ |
68 | #endif | 68 | #endif |
69 | #if defined(CONFIG_ARCH_IMX) || defined(CONFIG_ARCH_MX1) | 69 | #ifdef CONFIG_ARCH_MX1 |
70 | #define BIPR1 0xb0 /* Incremental Preset Register 1 */ | 70 | #define BIPR1 0xb0 /* Incremental Preset Register 1 */ |
71 | #define BIPR2 0xb4 /* Incremental Preset Register 2 */ | 71 | #define BIPR2 0xb4 /* Incremental Preset Register 2 */ |
72 | #define BIPR3 0xb8 /* Incremental Preset Register 3 */ | 72 | #define BIPR3 0xb8 /* Incremental Preset Register 3 */ |
@@ -96,7 +96,7 @@ | |||
96 | #define UCR1_RTSDEN (1<<5) /* RTS delta interrupt enable */ | 96 | #define UCR1_RTSDEN (1<<5) /* RTS delta interrupt enable */ |
97 | #define UCR1_SNDBRK (1<<4) /* Send break */ | 97 | #define UCR1_SNDBRK (1<<4) /* Send break */ |
98 | #define UCR1_TDMAEN (1<<3) /* Transmitter ready DMA enable */ | 98 | #define UCR1_TDMAEN (1<<3) /* Transmitter ready DMA enable */ |
99 | #if defined(CONFIG_ARCH_IMX) || defined(CONFIG_ARCH_MX1) | 99 | #ifdef CONFIG_ARCH_MX1 |
100 | #define UCR1_UARTCLKEN (1<<2) /* UART clock enabled */ | 100 | #define UCR1_UARTCLKEN (1<<2) /* UART clock enabled */ |
101 | #endif | 101 | #endif |
102 | #if defined CONFIG_ARCH_MX3 || defined CONFIG_ARCH_MX2 | 102 | #if defined CONFIG_ARCH_MX3 || defined CONFIG_ARCH_MX2 |
@@ -127,7 +127,7 @@ | |||
127 | #define UCR3_RXDSEN (1<<6) /* Receive status interrupt enable */ | 127 | #define UCR3_RXDSEN (1<<6) /* Receive status interrupt enable */ |
128 | #define UCR3_AIRINTEN (1<<5) /* Async IR wake interrupt enable */ | 128 | #define UCR3_AIRINTEN (1<<5) /* Async IR wake interrupt enable */ |
129 | #define UCR3_AWAKEN (1<<4) /* Async wake interrupt enable */ | 129 | #define UCR3_AWAKEN (1<<4) /* Async wake interrupt enable */ |
130 | #ifdef CONFIG_ARCH_IMX | 130 | #ifdef CONFIG_ARCH_MX1 |
131 | #define UCR3_REF25 (1<<3) /* Ref freq 25 MHz, only on mx1 */ | 131 | #define UCR3_REF25 (1<<3) /* Ref freq 25 MHz, only on mx1 */ |
132 | #define UCR3_REF30 (1<<2) /* Ref Freq 30 MHz, only on mx1 */ | 132 | #define UCR3_REF30 (1<<2) /* Ref Freq 30 MHz, only on mx1 */ |
133 | #endif | 133 | #endif |
@@ -180,13 +180,6 @@ | |||
180 | #define UTS_SOFTRST (1<<0) /* Software reset */ | 180 | #define UTS_SOFTRST (1<<0) /* Software reset */ |
181 | 181 | ||
182 | /* We've been assigned a range on the "Low-density serial ports" major */ | 182 | /* We've been assigned a range on the "Low-density serial ports" major */ |
183 | #ifdef CONFIG_ARCH_IMX | ||
184 | #define SERIAL_IMX_MAJOR 204 | ||
185 | #define MINOR_START 41 | ||
186 | #define DEV_NAME "ttySMX" | ||
187 | #define MAX_INTERNAL_IRQ IMX_IRQS | ||
188 | #endif | ||
189 | |||
190 | #ifdef CONFIG_ARCH_MXC | 183 | #ifdef CONFIG_ARCH_MXC |
191 | #define SERIAL_IMX_MAJOR 207 | 184 | #define SERIAL_IMX_MAJOR 207 |
192 | #define MINOR_START 16 | 185 | #define MINOR_START 16 |
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index 83a185d52961..7c61251bea61 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig | |||
@@ -118,7 +118,7 @@ config SPI_GPIO | |||
118 | 118 | ||
119 | config SPI_IMX | 119 | config SPI_IMX |
120 | tristate "Freescale iMX SPI controller" | 120 | tristate "Freescale iMX SPI controller" |
121 | depends on ARCH_IMX && EXPERIMENTAL | 121 | depends on ARCH_MX1 && EXPERIMENTAL |
122 | help | 122 | help |
123 | This enables using the Freescale iMX SPI controller in master | 123 | This enables using the Freescale iMX SPI controller in master |
124 | mode. | 124 | mode. |
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 0048f1185a60..8083d862ebc5 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig | |||
@@ -397,7 +397,7 @@ config FB_SA1100 | |||
397 | 397 | ||
398 | config FB_IMX | 398 | config FB_IMX |
399 | tristate "Motorola i.MX LCD support" | 399 | tristate "Motorola i.MX LCD support" |
400 | depends on FB && (ARCH_IMX || ARCH_MX2) | 400 | depends on FB && (ARCH_MX1 || ARCH_MX2) |
401 | select FB_CFB_FILLRECT | 401 | select FB_CFB_FILLRECT |
402 | select FB_CFB_COPYAREA | 402 | select FB_CFB_COPYAREA |
403 | select FB_CFB_IMAGEBLIT | 403 | select FB_CFB_IMAGEBLIT |
diff --git a/drivers/video/mx3fb.c b/drivers/video/mx3fb.c index 9894de1c9b9f..b7af5256e887 100644 --- a/drivers/video/mx3fb.c +++ b/drivers/video/mx3fb.c | |||
@@ -706,7 +706,7 @@ static void mx3fb_dma_done(void *arg) | |||
706 | dev_dbg(mx3fb->dev, "irq %d callback\n", ichannel->eof_irq); | 706 | dev_dbg(mx3fb->dev, "irq %d callback\n", ichannel->eof_irq); |
707 | 707 | ||
708 | /* We only need one interrupt, it will be re-enabled as needed */ | 708 | /* We only need one interrupt, it will be re-enabled as needed */ |
709 | disable_irq(ichannel->eof_irq); | 709 | disable_irq_nosync(ichannel->eof_irq); |
710 | 710 | ||
711 | complete(&mx3_fbi->flip_cmpl); | 711 | complete(&mx3_fbi->flip_cmpl); |
712 | } | 712 | } |
@@ -1366,7 +1366,7 @@ static int init_fb_chan(struct mx3fb_data *mx3fb, struct idmac_channel *ichan) | |||
1366 | 1366 | ||
1367 | mx3fb_blank(FB_BLANK_UNBLANK, fbi); | 1367 | mx3fb_blank(FB_BLANK_UNBLANK, fbi); |
1368 | 1368 | ||
1369 | dev_info(dev, "mx3fb: fb registered, using mode %s\n", fb_mode); | 1369 | dev_info(dev, "registered, using mode %s\n", fb_mode); |
1370 | 1370 | ||
1371 | ret = register_framebuffer(fbi); | 1371 | ret = register_framebuffer(fbi); |
1372 | if (ret < 0) | 1372 | if (ret < 0) |