diff options
123 files changed, 7603 insertions, 3235 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index de44fb6ef620..c16cce63b8ae 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -662,6 +662,12 @@ T: git://git.pengutronix.de/git/imx/linux-2.6.git | |||
662 | F: arch/arm/mach-mx*/ | 662 | F: arch/arm/mach-mx*/ |
663 | F: arch/arm/plat-mxc/ | 663 | F: arch/arm/plat-mxc/ |
664 | 664 | ||
665 | ARM/FREESCALE IMX51 | ||
666 | M: Amit Kucheria <amit.kucheria@canonical.com> | ||
667 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | ||
668 | S: Maintained | ||
669 | F: arch/arm/mach-mx5/ | ||
670 | |||
665 | ARM/GLOMATION GESBC9312SX MACHINE SUPPORT | 671 | ARM/GLOMATION GESBC9312SX MACHINE SUPPORT |
666 | M: Lennert Buytenhek <kernel@wantstofly.org> | 672 | M: Lennert Buytenhek <kernel@wantstofly.org> |
667 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 673 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index f34d462e881e..7ac8386c700c 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -310,10 +310,9 @@ config ARCH_MXC | |||
310 | bool "Freescale MXC/iMX-based" | 310 | bool "Freescale MXC/iMX-based" |
311 | select GENERIC_TIME | 311 | select GENERIC_TIME |
312 | select GENERIC_CLOCKEVENTS | 312 | select GENERIC_CLOCKEVENTS |
313 | select ARCH_MTD_XIP | ||
314 | select GENERIC_GPIO | ||
315 | select ARCH_REQUIRE_GPIOLIB | 313 | select ARCH_REQUIRE_GPIOLIB |
316 | select HAVE_CLK | 314 | select HAVE_CLK |
315 | select COMMON_CLKDEV | ||
317 | help | 316 | help |
318 | Support for Freescale MXC/iMX-based family of processors | 317 | Support for Freescale MXC/iMX-based family of processors |
319 | 318 | ||
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 215a5cdd3d7f..a99aafebdfb4 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -146,6 +146,7 @@ machine-$(CONFIG_ARCH_MX1) := mx1 | |||
146 | machine-$(CONFIG_ARCH_MX2) := mx2 | 146 | machine-$(CONFIG_ARCH_MX2) := mx2 |
147 | machine-$(CONFIG_ARCH_MX25) := mx25 | 147 | machine-$(CONFIG_ARCH_MX25) := mx25 |
148 | machine-$(CONFIG_ARCH_MX3) := mx3 | 148 | machine-$(CONFIG_ARCH_MX3) := mx3 |
149 | machine-$(CONFIG_ARCH_MX5) := mx5 | ||
149 | machine-$(CONFIG_ARCH_MXC91231) := mxc91231 | 150 | machine-$(CONFIG_ARCH_MXC91231) := mxc91231 |
150 | machine-$(CONFIG_ARCH_NETX) := netx | 151 | machine-$(CONFIG_ARCH_NETX) := netx |
151 | machine-$(CONFIG_ARCH_NOMADIK) := nomadik | 152 | machine-$(CONFIG_ARCH_NOMADIK) := nomadik |
diff --git a/arch/arm/configs/mx1ads_defconfig b/arch/arm/configs/mx1ads_defconfig deleted file mode 100644 index 3cabbb6d9276..000000000000 --- a/arch/arm/configs/mx1ads_defconfig +++ /dev/null | |||
@@ -1,742 +0,0 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.12-rc1-bk2 | ||
4 | # Sun Mar 27 02:15:46 2005 | ||
5 | # | ||
6 | CONFIG_ARM=y | ||
7 | CONFIG_MMU=y | ||
8 | CONFIG_UID16=y | ||
9 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
10 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
11 | CONFIG_GENERIC_IOMAP=y | ||
12 | |||
13 | # | ||
14 | # Code maturity level options | ||
15 | # | ||
16 | CONFIG_EXPERIMENTAL=y | ||
17 | CONFIG_CLEAN_COMPILE=y | ||
18 | CONFIG_BROKEN_ON_SMP=y | ||
19 | CONFIG_LOCK_KERNEL=y | ||
20 | |||
21 | # | ||
22 | # General setup | ||
23 | # | ||
24 | CONFIG_LOCALVERSION="" | ||
25 | CONFIG_SWAP=y | ||
26 | CONFIG_SYSVIPC=y | ||
27 | # CONFIG_POSIX_MQUEUE is not set | ||
28 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
29 | # CONFIG_SYSCTL is not set | ||
30 | # CONFIG_AUDIT is not set | ||
31 | # CONFIG_HOTPLUG is not set | ||
32 | CONFIG_KOBJECT_UEVENT=y | ||
33 | # CONFIG_IKCONFIG is not set | ||
34 | CONFIG_EMBEDDED=y | ||
35 | # CONFIG_KALLSYMS is not set | ||
36 | CONFIG_BASE_FULL=y | ||
37 | CONFIG_FUTEX=y | ||
38 | CONFIG_EPOLL=y | ||
39 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
40 | CONFIG_SHMEM=y | ||
41 | CONFIG_CC_ALIGN_FUNCTIONS=0 | ||
42 | CONFIG_CC_ALIGN_LABELS=0 | ||
43 | CONFIG_CC_ALIGN_LOOPS=0 | ||
44 | CONFIG_CC_ALIGN_JUMPS=0 | ||
45 | # CONFIG_TINY_SHMEM is not set | ||
46 | CONFIG_BASE_SMALL=0 | ||
47 | |||
48 | # | ||
49 | # Loadable module support | ||
50 | # | ||
51 | CONFIG_MODULES=y | ||
52 | CONFIG_MODULE_UNLOAD=y | ||
53 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
54 | CONFIG_OBSOLETE_MODPARM=y | ||
55 | # CONFIG_MODVERSIONS is not set | ||
56 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
57 | CONFIG_KMOD=y | ||
58 | |||
59 | # | ||
60 | # System Type | ||
61 | # | ||
62 | # CONFIG_ARCH_CLPS7500 is not set | ||
63 | # CONFIG_ARCH_CLPS711X is not set | ||
64 | # CONFIG_ARCH_CO285 is not set | ||
65 | # CONFIG_ARCH_EBSA110 is not set | ||
66 | # CONFIG_ARCH_FOOTBRIDGE is not set | ||
67 | # CONFIG_ARCH_INTEGRATOR is not set | ||
68 | # CONFIG_ARCH_IOP3XX is not set | ||
69 | # CONFIG_ARCH_IXP4XX is not set | ||
70 | # CONFIG_ARCH_IXP2000 is not set | ||
71 | # CONFIG_ARCH_L7200 is not set | ||
72 | # CONFIG_ARCH_PXA is not set | ||
73 | # CONFIG_ARCH_RPC is not set | ||
74 | # CONFIG_ARCH_SA1100 is not set | ||
75 | # CONFIG_ARCH_S3C2410 is not set | ||
76 | # CONFIG_ARCH_SHARK is not set | ||
77 | # CONFIG_ARCH_LH7A40X is not set | ||
78 | # CONFIG_ARCH_OMAP is not set | ||
79 | # CONFIG_ARCH_VERSATILE is not set | ||
80 | CONFIG_ARCH_IMX=y | ||
81 | # CONFIG_ARCH_H720X is not set | ||
82 | |||
83 | # | ||
84 | # IMX Implementations | ||
85 | # | ||
86 | CONFIG_ARCH_MX1ADS=y | ||
87 | |||
88 | # | ||
89 | # Processor Type | ||
90 | # | ||
91 | CONFIG_CPU_ARM920T=y | ||
92 | CONFIG_CPU_32v4=y | ||
93 | CONFIG_CPU_ABRT_EV4T=y | ||
94 | CONFIG_CPU_CACHE_V4WT=y | ||
95 | CONFIG_CPU_CACHE_VIVT=y | ||
96 | CONFIG_CPU_COPY_V4WB=y | ||
97 | CONFIG_CPU_TLB_V4WBI=y | ||
98 | |||
99 | # | ||
100 | # Processor Features | ||
101 | # | ||
102 | # CONFIG_ARM_THUMB is not set | ||
103 | # CONFIG_CPU_ICACHE_DISABLE is not set | ||
104 | # CONFIG_CPU_DCACHE_DISABLE is not set | ||
105 | # CONFIG_CPU_DCACHE_WRITETHROUGH is not set | ||
106 | |||
107 | # | ||
108 | # Bus support | ||
109 | # | ||
110 | CONFIG_ISA=y | ||
111 | |||
112 | # | ||
113 | # PCCARD (PCMCIA/CardBus) support | ||
114 | # | ||
115 | # CONFIG_PCCARD is not set | ||
116 | |||
117 | # | ||
118 | # Kernel Features | ||
119 | # | ||
120 | CONFIG_PREEMPT=y | ||
121 | # CONFIG_LEDS is not set | ||
122 | CONFIG_ALIGNMENT_TRAP=y | ||
123 | |||
124 | # | ||
125 | # Boot options | ||
126 | # | ||
127 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
128 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
129 | CONFIG_CMDLINE="console=ttySMX0,57600n8 ip=bootp root=/dev/nfs" | ||
130 | # CONFIG_XIP_KERNEL is not set | ||
131 | |||
132 | # | ||
133 | # Floating point emulation | ||
134 | # | ||
135 | |||
136 | # | ||
137 | # At least one emulation must be selected | ||
138 | # | ||
139 | CONFIG_FPE_NWFPE=y | ||
140 | CONFIG_FPE_NWFPE_XP=y | ||
141 | CONFIG_FPE_FASTFPE=y | ||
142 | |||
143 | # | ||
144 | # Userspace binary formats | ||
145 | # | ||
146 | CONFIG_BINFMT_ELF=y | ||
147 | # CONFIG_BINFMT_AOUT is not set | ||
148 | # CONFIG_BINFMT_MISC is not set | ||
149 | # CONFIG_ARTHUR is not set | ||
150 | |||
151 | # | ||
152 | # Power management options | ||
153 | # | ||
154 | # CONFIG_PM is not set | ||
155 | |||
156 | # | ||
157 | # Device Drivers | ||
158 | # | ||
159 | |||
160 | # | ||
161 | # Generic Driver Options | ||
162 | # | ||
163 | CONFIG_STANDALONE=y | ||
164 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
165 | # CONFIG_FW_LOADER is not set | ||
166 | # CONFIG_DEBUG_DRIVER is not set | ||
167 | |||
168 | # | ||
169 | # Memory Technology Devices (MTD) | ||
170 | # | ||
171 | CONFIG_MTD=y | ||
172 | # CONFIG_MTD_DEBUG is not set | ||
173 | # CONFIG_MTD_CONCAT is not set | ||
174 | CONFIG_MTD_PARTITIONS=y | ||
175 | # CONFIG_MTD_REDBOOT_PARTS is not set | ||
176 | # CONFIG_MTD_CMDLINE_PARTS is not set | ||
177 | # CONFIG_MTD_AFS_PARTS is not set | ||
178 | |||
179 | # | ||
180 | # User Modules And Translation Layers | ||
181 | # | ||
182 | CONFIG_MTD_CHAR=y | ||
183 | CONFIG_MTD_BLOCK=y | ||
184 | # CONFIG_FTL is not set | ||
185 | # CONFIG_NFTL is not set | ||
186 | # CONFIG_INFTL is not set | ||
187 | |||
188 | # | ||
189 | # RAM/ROM/Flash chip drivers | ||
190 | # | ||
191 | # CONFIG_MTD_CFI is not set | ||
192 | # CONFIG_MTD_JEDECPROBE is not set | ||
193 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
194 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
195 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
196 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
197 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
198 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
199 | CONFIG_MTD_CFI_I1=y | ||
200 | CONFIG_MTD_CFI_I2=y | ||
201 | # CONFIG_MTD_CFI_I4 is not set | ||
202 | # CONFIG_MTD_CFI_I8 is not set | ||
203 | # CONFIG_MTD_RAM is not set | ||
204 | CONFIG_MTD_ROM=y | ||
205 | # CONFIG_MTD_ABSENT is not set | ||
206 | |||
207 | # | ||
208 | # Mapping drivers for chip access | ||
209 | # | ||
210 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
211 | |||
212 | # | ||
213 | # Self-contained MTD device drivers | ||
214 | # | ||
215 | # CONFIG_MTD_SLRAM is not set | ||
216 | # CONFIG_MTD_PHRAM is not set | ||
217 | # CONFIG_MTD_MTDRAM is not set | ||
218 | # CONFIG_MTD_BLKMTD is not set | ||
219 | # CONFIG_MTD_BLOCK2MTD is not set | ||
220 | |||
221 | # | ||
222 | # Disk-On-Chip Device Drivers | ||
223 | # | ||
224 | # CONFIG_MTD_DOC2000 is not set | ||
225 | # CONFIG_MTD_DOC2001 is not set | ||
226 | # CONFIG_MTD_DOC2001PLUS is not set | ||
227 | |||
228 | # | ||
229 | # NAND Flash Device Drivers | ||
230 | # | ||
231 | # CONFIG_MTD_NAND is not set | ||
232 | |||
233 | # | ||
234 | # Parallel port support | ||
235 | # | ||
236 | # CONFIG_PARPORT is not set | ||
237 | |||
238 | # | ||
239 | # Plug and Play support | ||
240 | # | ||
241 | # CONFIG_PNP is not set | ||
242 | |||
243 | # | ||
244 | # Block devices | ||
245 | # | ||
246 | # CONFIG_BLK_DEV_FD is not set | ||
247 | # CONFIG_BLK_DEV_XD is not set | ||
248 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
249 | CONFIG_BLK_DEV_LOOP=y | ||
250 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | ||
251 | # CONFIG_BLK_DEV_NBD is not set | ||
252 | # CONFIG_BLK_DEV_RAM is not set | ||
253 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
254 | CONFIG_INITRAMFS_SOURCE="" | ||
255 | # CONFIG_CDROM_PKTCDVD is not set | ||
256 | |||
257 | # | ||
258 | # IO Schedulers | ||
259 | # | ||
260 | CONFIG_IOSCHED_NOOP=y | ||
261 | # CONFIG_IOSCHED_AS is not set | ||
262 | CONFIG_IOSCHED_DEADLINE=y | ||
263 | CONFIG_IOSCHED_CFQ=y | ||
264 | # CONFIG_ATA_OVER_ETH is not set | ||
265 | |||
266 | # | ||
267 | # SCSI device support | ||
268 | # | ||
269 | # CONFIG_SCSI is not set | ||
270 | |||
271 | # | ||
272 | # Multi-device support (RAID and LVM) | ||
273 | # | ||
274 | # CONFIG_MD is not set | ||
275 | |||
276 | # | ||
277 | # Fusion MPT device support | ||
278 | # | ||
279 | |||
280 | # | ||
281 | # IEEE 1394 (FireWire) support | ||
282 | # | ||
283 | |||
284 | # | ||
285 | # I2O device support | ||
286 | # | ||
287 | |||
288 | # | ||
289 | # Networking support | ||
290 | # | ||
291 | CONFIG_NET=y | ||
292 | |||
293 | # | ||
294 | # Networking options | ||
295 | # | ||
296 | CONFIG_PACKET=m | ||
297 | CONFIG_PACKET_MMAP=y | ||
298 | # CONFIG_NETLINK_DEV is not set | ||
299 | CONFIG_UNIX=y | ||
300 | # CONFIG_NET_KEY is not set | ||
301 | CONFIG_INET=y | ||
302 | # CONFIG_IP_MULTICAST is not set | ||
303 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
304 | CONFIG_IP_PNP=y | ||
305 | CONFIG_IP_PNP_DHCP=y | ||
306 | CONFIG_IP_PNP_BOOTP=y | ||
307 | # CONFIG_IP_PNP_RARP is not set | ||
308 | # CONFIG_NET_IPIP is not set | ||
309 | # CONFIG_NET_IPGRE is not set | ||
310 | # CONFIG_ARPD is not set | ||
311 | # CONFIG_SYN_COOKIES is not set | ||
312 | # CONFIG_INET_AH is not set | ||
313 | # CONFIG_INET_ESP is not set | ||
314 | # CONFIG_INET_IPCOMP is not set | ||
315 | # CONFIG_INET_TUNNEL is not set | ||
316 | CONFIG_IP_TCPDIAG=y | ||
317 | # CONFIG_IP_TCPDIAG_IPV6 is not set | ||
318 | # CONFIG_IPV6 is not set | ||
319 | # CONFIG_NETFILTER is not set | ||
320 | |||
321 | # | ||
322 | # SCTP Configuration (EXPERIMENTAL) | ||
323 | # | ||
324 | # CONFIG_IP_SCTP is not set | ||
325 | # CONFIG_ATM is not set | ||
326 | # CONFIG_BRIDGE is not set | ||
327 | # CONFIG_VLAN_8021Q is not set | ||
328 | # CONFIG_DECNET is not set | ||
329 | # CONFIG_LLC2 is not set | ||
330 | # CONFIG_IPX is not set | ||
331 | # CONFIG_ATALK is not set | ||
332 | # CONFIG_X25 is not set | ||
333 | # CONFIG_LAPB is not set | ||
334 | # CONFIG_NET_DIVERT is not set | ||
335 | # CONFIG_ECONET is not set | ||
336 | # CONFIG_WAN_ROUTER is not set | ||
337 | |||
338 | # | ||
339 | # QoS and/or fair queueing | ||
340 | # | ||
341 | # CONFIG_NET_SCHED is not set | ||
342 | # CONFIG_NET_CLS_ROUTE is not set | ||
343 | |||
344 | # | ||
345 | # Network testing | ||
346 | # | ||
347 | # CONFIG_NET_PKTGEN is not set | ||
348 | # CONFIG_NETPOLL is not set | ||
349 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
350 | # CONFIG_HAMRADIO is not set | ||
351 | # CONFIG_IRDA is not set | ||
352 | # CONFIG_BT is not set | ||
353 | CONFIG_NETDEVICES=y | ||
354 | # CONFIG_DUMMY is not set | ||
355 | # CONFIG_BONDING is not set | ||
356 | # CONFIG_EQUALIZER is not set | ||
357 | # CONFIG_TUN is not set | ||
358 | |||
359 | # | ||
360 | # ARCnet devices | ||
361 | # | ||
362 | # CONFIG_ARCNET is not set | ||
363 | |||
364 | # | ||
365 | # Ethernet (10 or 100Mbit) | ||
366 | # | ||
367 | CONFIG_NET_ETHERNET=y | ||
368 | CONFIG_MII=y | ||
369 | # CONFIG_NET_VENDOR_3COM is not set | ||
370 | # CONFIG_LANCE is not set | ||
371 | # CONFIG_NET_VENDOR_SMC is not set | ||
372 | # CONFIG_SMC91X is not set | ||
373 | # CONFIG_NET_VENDOR_RACAL is not set | ||
374 | # CONFIG_AT1700 is not set | ||
375 | # CONFIG_DEPCA is not set | ||
376 | # CONFIG_HP100 is not set | ||
377 | # CONFIG_NET_ISA is not set | ||
378 | # CONFIG_NET_PCI is not set | ||
379 | # CONFIG_NET_POCKET is not set | ||
380 | |||
381 | # | ||
382 | # Ethernet (1000 Mbit) | ||
383 | # | ||
384 | |||
385 | # | ||
386 | # Ethernet (10000 Mbit) | ||
387 | # | ||
388 | |||
389 | # | ||
390 | # Token Ring devices | ||
391 | # | ||
392 | # CONFIG_TR is not set | ||
393 | |||
394 | # | ||
395 | # Wireless LAN (non-hamradio) | ||
396 | # | ||
397 | # CONFIG_NET_RADIO is not set | ||
398 | |||
399 | # | ||
400 | # Wan interfaces | ||
401 | # | ||
402 | # CONFIG_WAN is not set | ||
403 | CONFIG_PPP=y | ||
404 | # CONFIG_PPP_MULTILINK is not set | ||
405 | CONFIG_PPP_FILTER=y | ||
406 | CONFIG_PPP_ASYNC=y | ||
407 | # CONFIG_PPP_SYNC_TTY is not set | ||
408 | CONFIG_PPP_DEFLATE=y | ||
409 | CONFIG_PPP_BSDCOMP=y | ||
410 | # CONFIG_PPPOE is not set | ||
411 | # CONFIG_SLIP is not set | ||
412 | # CONFIG_SHAPER is not set | ||
413 | # CONFIG_NETCONSOLE is not set | ||
414 | |||
415 | # | ||
416 | # ISDN subsystem | ||
417 | # | ||
418 | # CONFIG_ISDN is not set | ||
419 | |||
420 | # | ||
421 | # Input device support | ||
422 | # | ||
423 | # CONFIG_INPUT is not set | ||
424 | |||
425 | # | ||
426 | # Hardware I/O ports | ||
427 | # | ||
428 | # CONFIG_SERIO is not set | ||
429 | # CONFIG_GAMEPORT is not set | ||
430 | CONFIG_SOUND_GAMEPORT=y | ||
431 | |||
432 | # | ||
433 | # Character devices | ||
434 | # | ||
435 | # CONFIG_VT is not set | ||
436 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
437 | |||
438 | # | ||
439 | # Serial drivers | ||
440 | # | ||
441 | # CONFIG_SERIAL_8250 is not set | ||
442 | |||
443 | # | ||
444 | # Non-8250 serial port support | ||
445 | # | ||
446 | CONFIG_SERIAL_IMX=y | ||
447 | CONFIG_SERIAL_IMX_CONSOLE=y | ||
448 | CONFIG_SERIAL_CORE=y | ||
449 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
450 | CONFIG_UNIX98_PTYS=y | ||
451 | # CONFIG_LEGACY_PTYS is not set | ||
452 | |||
453 | # | ||
454 | # IPMI | ||
455 | # | ||
456 | # CONFIG_IPMI_HANDLER is not set | ||
457 | |||
458 | # | ||
459 | # Watchdog Cards | ||
460 | # | ||
461 | # CONFIG_WATCHDOG is not set | ||
462 | # CONFIG_NVRAM is not set | ||
463 | CONFIG_RTC=m | ||
464 | # CONFIG_DTLK is not set | ||
465 | # CONFIG_R3964 is not set | ||
466 | |||
467 | # | ||
468 | # Ftape, the floppy tape device driver | ||
469 | # | ||
470 | # CONFIG_DRM is not set | ||
471 | # CONFIG_RAW_DRIVER is not set | ||
472 | |||
473 | # | ||
474 | # TPM devices | ||
475 | # | ||
476 | # CONFIG_TCG_TPM is not set | ||
477 | |||
478 | # | ||
479 | # I2C support | ||
480 | # | ||
481 | # CONFIG_I2C is not set | ||
482 | |||
483 | # | ||
484 | # Misc devices | ||
485 | # | ||
486 | |||
487 | # | ||
488 | # Multimedia devices | ||
489 | # | ||
490 | # CONFIG_VIDEO_DEV is not set | ||
491 | |||
492 | # | ||
493 | # Digital Video Broadcasting Devices | ||
494 | # | ||
495 | # CONFIG_DVB is not set | ||
496 | |||
497 | # | ||
498 | # Graphics support | ||
499 | # | ||
500 | # CONFIG_FB is not set | ||
501 | |||
502 | # | ||
503 | # Sound | ||
504 | # | ||
505 | # CONFIG_SOUND is not set | ||
506 | |||
507 | # | ||
508 | # USB support | ||
509 | # | ||
510 | CONFIG_USB_ARCH_HAS_HCD=y | ||
511 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
512 | # CONFIG_USB is not set | ||
513 | |||
514 | # | ||
515 | # USB Gadget Support | ||
516 | # | ||
517 | # CONFIG_USB_GADGET is not set | ||
518 | |||
519 | # | ||
520 | # MMC/SD Card support | ||
521 | # | ||
522 | # CONFIG_MMC is not set | ||
523 | |||
524 | # | ||
525 | # File systems | ||
526 | # | ||
527 | # CONFIG_EXT2_FS is not set | ||
528 | # CONFIG_EXT3_FS is not set | ||
529 | # CONFIG_JBD is not set | ||
530 | # CONFIG_REISERFS_FS is not set | ||
531 | # CONFIG_JFS_FS is not set | ||
532 | |||
533 | # | ||
534 | # XFS support | ||
535 | # | ||
536 | # CONFIG_XFS_FS is not set | ||
537 | # CONFIG_MINIX_FS is not set | ||
538 | # CONFIG_ROMFS_FS is not set | ||
539 | # CONFIG_QUOTA is not set | ||
540 | CONFIG_DNOTIFY=y | ||
541 | # CONFIG_AUTOFS_FS is not set | ||
542 | # CONFIG_AUTOFS4_FS is not set | ||
543 | |||
544 | # | ||
545 | # CD-ROM/DVD Filesystems | ||
546 | # | ||
547 | # CONFIG_ISO9660_FS is not set | ||
548 | # CONFIG_UDF_FS is not set | ||
549 | |||
550 | # | ||
551 | # DOS/FAT/NT Filesystems | ||
552 | # | ||
553 | CONFIG_FAT_FS=y | ||
554 | CONFIG_MSDOS_FS=y | ||
555 | CONFIG_VFAT_FS=y | ||
556 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
557 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | ||
558 | # CONFIG_NTFS_FS is not set | ||
559 | |||
560 | # | ||
561 | # Pseudo filesystems | ||
562 | # | ||
563 | CONFIG_PROC_FS=y | ||
564 | CONFIG_SYSFS=y | ||
565 | CONFIG_DEVFS_FS=y | ||
566 | CONFIG_DEVFS_MOUNT=y | ||
567 | # CONFIG_DEVFS_DEBUG is not set | ||
568 | # CONFIG_DEVPTS_FS_XATTR is not set | ||
569 | CONFIG_TMPFS=y | ||
570 | # CONFIG_TMPFS_XATTR is not set | ||
571 | # CONFIG_HUGETLB_PAGE is not set | ||
572 | CONFIG_RAMFS=y | ||
573 | |||
574 | # | ||
575 | # Miscellaneous filesystems | ||
576 | # | ||
577 | # CONFIG_ADFS_FS is not set | ||
578 | # CONFIG_AFFS_FS is not set | ||
579 | # CONFIG_HFS_FS is not set | ||
580 | # CONFIG_HFSPLUS_FS is not set | ||
581 | # CONFIG_BEFS_FS is not set | ||
582 | # CONFIG_BFS_FS is not set | ||
583 | # CONFIG_EFS_FS is not set | ||
584 | # CONFIG_JFFS_FS is not set | ||
585 | CONFIG_JFFS2_FS=y | ||
586 | CONFIG_JFFS2_FS_DEBUG=0 | ||
587 | # CONFIG_JFFS2_FS_NAND is not set | ||
588 | # CONFIG_JFFS2_FS_NOR_ECC is not set | ||
589 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set | ||
590 | CONFIG_JFFS2_ZLIB=y | ||
591 | CONFIG_JFFS2_RTIME=y | ||
592 | # CONFIG_JFFS2_RUBIN is not set | ||
593 | CONFIG_CRAMFS=y | ||
594 | # CONFIG_VXFS_FS is not set | ||
595 | # CONFIG_HPFS_FS is not set | ||
596 | # CONFIG_QNX4FS_FS is not set | ||
597 | # CONFIG_SYSV_FS is not set | ||
598 | # CONFIG_UFS_FS is not set | ||
599 | |||
600 | # | ||
601 | # Network File Systems | ||
602 | # | ||
603 | CONFIG_NFS_FS=y | ||
604 | CONFIG_NFS_V3=y | ||
605 | # CONFIG_NFS_V4 is not set | ||
606 | # CONFIG_NFS_DIRECTIO is not set | ||
607 | # CONFIG_NFSD is not set | ||
608 | CONFIG_ROOT_NFS=y | ||
609 | CONFIG_LOCKD=y | ||
610 | CONFIG_LOCKD_V4=y | ||
611 | CONFIG_SUNRPC=y | ||
612 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
613 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
614 | # CONFIG_SMB_FS is not set | ||
615 | # CONFIG_CIFS is not set | ||
616 | # CONFIG_NCP_FS is not set | ||
617 | # CONFIG_CODA_FS is not set | ||
618 | # CONFIG_AFS_FS is not set | ||
619 | |||
620 | # | ||
621 | # Partition Types | ||
622 | # | ||
623 | # CONFIG_PARTITION_ADVANCED is not set | ||
624 | CONFIG_MSDOS_PARTITION=y | ||
625 | |||
626 | # | ||
627 | # Native Language Support | ||
628 | # | ||
629 | CONFIG_NLS=y | ||
630 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
631 | # CONFIG_NLS_CODEPAGE_437 is not set | ||
632 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
633 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
634 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
635 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
636 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
637 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
638 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
639 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
640 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
641 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
642 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
643 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
644 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
645 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
646 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
647 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
648 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
649 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
650 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
651 | # CONFIG_NLS_ISO8859_8 is not set | ||
652 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
653 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
654 | # CONFIG_NLS_ASCII is not set | ||
655 | # CONFIG_NLS_ISO8859_1 is not set | ||
656 | # CONFIG_NLS_ISO8859_2 is not set | ||
657 | # CONFIG_NLS_ISO8859_3 is not set | ||
658 | # CONFIG_NLS_ISO8859_4 is not set | ||
659 | # CONFIG_NLS_ISO8859_5 is not set | ||
660 | # CONFIG_NLS_ISO8859_6 is not set | ||
661 | # CONFIG_NLS_ISO8859_7 is not set | ||
662 | # CONFIG_NLS_ISO8859_9 is not set | ||
663 | # CONFIG_NLS_ISO8859_13 is not set | ||
664 | # CONFIG_NLS_ISO8859_14 is not set | ||
665 | # CONFIG_NLS_ISO8859_15 is not set | ||
666 | # CONFIG_NLS_KOI8_R is not set | ||
667 | # CONFIG_NLS_KOI8_U is not set | ||
668 | # CONFIG_NLS_UTF8 is not set | ||
669 | |||
670 | # | ||
671 | # Profiling support | ||
672 | # | ||
673 | # CONFIG_PROFILING is not set | ||
674 | |||
675 | # | ||
676 | # Kernel hacking | ||
677 | # | ||
678 | # CONFIG_PRINTK_TIME is not set | ||
679 | CONFIG_DEBUG_KERNEL=y | ||
680 | CONFIG_MAGIC_SYSRQ=y | ||
681 | CONFIG_LOG_BUF_SHIFT=14 | ||
682 | # CONFIG_SCHEDSTATS is not set | ||
683 | # CONFIG_DEBUG_SLAB is not set | ||
684 | CONFIG_DEBUG_PREEMPT=y | ||
685 | # CONFIG_DEBUG_SPINLOCK is not set | ||
686 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
687 | # CONFIG_DEBUG_KOBJECT is not set | ||
688 | CONFIG_DEBUG_BUGVERBOSE=y | ||
689 | CONFIG_DEBUG_INFO=y | ||
690 | # CONFIG_DEBUG_FS is not set | ||
691 | CONFIG_FRAME_POINTER=y | ||
692 | CONFIG_DEBUG_USER=y | ||
693 | CONFIG_DEBUG_ERRORS=y | ||
694 | # CONFIG_DEBUG_LL is not set | ||
695 | |||
696 | # | ||
697 | # Security options | ||
698 | # | ||
699 | # CONFIG_KEYS is not set | ||
700 | # CONFIG_SECURITY is not set | ||
701 | |||
702 | # | ||
703 | # Cryptographic options | ||
704 | # | ||
705 | CONFIG_CRYPTO=y | ||
706 | # CONFIG_CRYPTO_HMAC is not set | ||
707 | # CONFIG_CRYPTO_NULL is not set | ||
708 | # CONFIG_CRYPTO_MD4 is not set | ||
709 | # CONFIG_CRYPTO_MD5 is not set | ||
710 | # CONFIG_CRYPTO_SHA1 is not set | ||
711 | # CONFIG_CRYPTO_SHA256 is not set | ||
712 | # CONFIG_CRYPTO_SHA512 is not set | ||
713 | # CONFIG_CRYPTO_WP512 is not set | ||
714 | # CONFIG_CRYPTO_TGR192 is not set | ||
715 | # CONFIG_CRYPTO_DES is not set | ||
716 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
717 | # CONFIG_CRYPTO_TWOFISH is not set | ||
718 | # CONFIG_CRYPTO_SERPENT is not set | ||
719 | # CONFIG_CRYPTO_AES is not set | ||
720 | # CONFIG_CRYPTO_CAST5 is not set | ||
721 | # CONFIG_CRYPTO_CAST6 is not set | ||
722 | # CONFIG_CRYPTO_TEA is not set | ||
723 | # CONFIG_CRYPTO_ARC4 is not set | ||
724 | # CONFIG_CRYPTO_KHAZAD is not set | ||
725 | # CONFIG_CRYPTO_ANUBIS is not set | ||
726 | # CONFIG_CRYPTO_DEFLATE is not set | ||
727 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
728 | # CONFIG_CRYPTO_CRC32C is not set | ||
729 | # CONFIG_CRYPTO_TEST is not set | ||
730 | |||
731 | # | ||
732 | # Hardware crypto devices | ||
733 | # | ||
734 | |||
735 | # | ||
736 | # Library routines | ||
737 | # | ||
738 | CONFIG_CRC_CCITT=y | ||
739 | CONFIG_CRC32=y | ||
740 | # CONFIG_LIBCRC32C is not set | ||
741 | CONFIG_ZLIB_INFLATE=y | ||
742 | CONFIG_ZLIB_DEFLATE=y | ||
diff --git a/arch/arm/configs/mx27_defconfig b/arch/arm/configs/mx27_defconfig index edfdd6faf800..b4c1366e9e0d 100644 --- a/arch/arm/configs/mx27_defconfig +++ b/arch/arm/configs/mx27_defconfig | |||
@@ -200,7 +200,7 @@ CONFIG_MACH_MX27ADS=y | |||
200 | CONFIG_MACH_PCM038=y | 200 | CONFIG_MACH_PCM038=y |
201 | CONFIG_MACH_PCM970_BASEBOARD=y | 201 | CONFIG_MACH_PCM970_BASEBOARD=y |
202 | CONFIG_MACH_MX27_3DS=y | 202 | CONFIG_MACH_MX27_3DS=y |
203 | CONFIG_MACH_MX27LITE=y | 203 | CONFIG_MACH_IMX27LITE=y |
204 | CONFIG_MXC_IRQ_PRIOR=y | 204 | CONFIG_MXC_IRQ_PRIOR=y |
205 | CONFIG_MXC_PWM=y | 205 | CONFIG_MXC_PWM=y |
206 | 206 | ||
diff --git a/arch/arm/configs/mx51_defconfig b/arch/arm/configs/mx51_defconfig new file mode 100644 index 000000000000..c88e9527a8ec --- /dev/null +++ b/arch/arm/configs/mx51_defconfig | |||
@@ -0,0 +1,1286 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.33-rc6 | ||
4 | # Tue Feb 2 15:20:48 2010 | ||
5 | # | ||
6 | CONFIG_ARM=y | ||
7 | CONFIG_SYS_SUPPORTS_APM_EMULATION=y | ||
8 | CONFIG_GENERIC_GPIO=y | ||
9 | CONFIG_GENERIC_TIME=y | ||
10 | CONFIG_GENERIC_CLOCKEVENTS=y | ||
11 | CONFIG_GENERIC_HARDIRQS=y | ||
12 | CONFIG_STACKTRACE_SUPPORT=y | ||
13 | CONFIG_HAVE_LATENCYTOP_SUPPORT=y | ||
14 | CONFIG_LOCKDEP_SUPPORT=y | ||
15 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
16 | CONFIG_HARDIRQS_SW_RESEND=y | ||
17 | CONFIG_GENERIC_IRQ_PROBE=y | ||
18 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
19 | CONFIG_GENERIC_HWEIGHT=y | ||
20 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
21 | CONFIG_ARCH_MTD_XIP=y | ||
22 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y | ||
23 | CONFIG_VECTORS_BASE=0xffff0000 | ||
24 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
25 | CONFIG_CONSTRUCTORS=y | ||
26 | |||
27 | # | ||
28 | # General setup | ||
29 | # | ||
30 | CONFIG_EXPERIMENTAL=y | ||
31 | CONFIG_BROKEN_ON_SMP=y | ||
32 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
33 | CONFIG_LOCALVERSION="" | ||
34 | # CONFIG_LOCALVERSION_AUTO is not set | ||
35 | CONFIG_HAVE_KERNEL_GZIP=y | ||
36 | CONFIG_HAVE_KERNEL_LZO=y | ||
37 | CONFIG_KERNEL_GZIP=y | ||
38 | # CONFIG_KERNEL_BZIP2 is not set | ||
39 | # CONFIG_KERNEL_LZMA is not set | ||
40 | # CONFIG_KERNEL_LZO is not set | ||
41 | CONFIG_SWAP=y | ||
42 | CONFIG_SYSVIPC=y | ||
43 | CONFIG_SYSVIPC_SYSCTL=y | ||
44 | # CONFIG_POSIX_MQUEUE is not set | ||
45 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
46 | # CONFIG_TASKSTATS is not set | ||
47 | # CONFIG_AUDIT is not set | ||
48 | |||
49 | # | ||
50 | # RCU Subsystem | ||
51 | # | ||
52 | CONFIG_TREE_RCU=y | ||
53 | # CONFIG_TREE_PREEMPT_RCU is not set | ||
54 | # CONFIG_TINY_RCU is not set | ||
55 | # CONFIG_RCU_TRACE is not set | ||
56 | CONFIG_RCU_FANOUT=32 | ||
57 | # CONFIG_RCU_FANOUT_EXACT is not set | ||
58 | # CONFIG_TREE_RCU_TRACE is not set | ||
59 | # CONFIG_IKCONFIG is not set | ||
60 | CONFIG_LOG_BUF_SHIFT=18 | ||
61 | # CONFIG_GROUP_SCHED is not set | ||
62 | # CONFIG_CGROUPS is not set | ||
63 | # CONFIG_SYSFS_DEPRECATED_V2 is not set | ||
64 | CONFIG_RELAY=y | ||
65 | # CONFIG_NAMESPACES is not set | ||
66 | # CONFIG_BLK_DEV_INITRD is not set | ||
67 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
68 | CONFIG_SYSCTL=y | ||
69 | CONFIG_ANON_INODES=y | ||
70 | CONFIG_EMBEDDED=y | ||
71 | CONFIG_UID16=y | ||
72 | CONFIG_SYSCTL_SYSCALL=y | ||
73 | CONFIG_KALLSYMS=y | ||
74 | # CONFIG_KALLSYMS_ALL is not set | ||
75 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
76 | CONFIG_HOTPLUG=y | ||
77 | CONFIG_PRINTK=y | ||
78 | CONFIG_BUG=y | ||
79 | CONFIG_ELF_CORE=y | ||
80 | CONFIG_BASE_FULL=y | ||
81 | CONFIG_FUTEX=y | ||
82 | CONFIG_EPOLL=y | ||
83 | CONFIG_SIGNALFD=y | ||
84 | CONFIG_TIMERFD=y | ||
85 | CONFIG_EVENTFD=y | ||
86 | CONFIG_SHMEM=y | ||
87 | CONFIG_AIO=y | ||
88 | |||
89 | # | ||
90 | # Kernel Performance Events And Counters | ||
91 | # | ||
92 | CONFIG_VM_EVENT_COUNTERS=y | ||
93 | # CONFIG_SLUB_DEBUG is not set | ||
94 | # CONFIG_COMPAT_BRK is not set | ||
95 | # CONFIG_SLAB is not set | ||
96 | CONFIG_SLUB=y | ||
97 | # CONFIG_SLOB is not set | ||
98 | # CONFIG_PROFILING is not set | ||
99 | CONFIG_HAVE_OPROFILE=y | ||
100 | # CONFIG_KPROBES is not set | ||
101 | CONFIG_HAVE_KPROBES=y | ||
102 | CONFIG_HAVE_KRETPROBES=y | ||
103 | CONFIG_HAVE_CLK=y | ||
104 | |||
105 | # | ||
106 | # GCOV-based kernel profiling | ||
107 | # | ||
108 | # CONFIG_GCOV_KERNEL is not set | ||
109 | # CONFIG_SLOW_WORK is not set | ||
110 | CONFIG_HAVE_GENERIC_DMA_COHERENT=y | ||
111 | CONFIG_RT_MUTEXES=y | ||
112 | CONFIG_BASE_SMALL=0 | ||
113 | CONFIG_MODULES=y | ||
114 | # CONFIG_MODULE_FORCE_LOAD is not set | ||
115 | CONFIG_MODULE_UNLOAD=y | ||
116 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
117 | CONFIG_MODVERSIONS=y | ||
118 | CONFIG_MODULE_SRCVERSION_ALL=y | ||
119 | CONFIG_BLOCK=y | ||
120 | # CONFIG_LBDAF is not set | ||
121 | # CONFIG_BLK_DEV_BSG is not set | ||
122 | # CONFIG_BLK_DEV_INTEGRITY is not set | ||
123 | |||
124 | # | ||
125 | # IO Schedulers | ||
126 | # | ||
127 | CONFIG_IOSCHED_NOOP=y | ||
128 | CONFIG_IOSCHED_DEADLINE=y | ||
129 | CONFIG_IOSCHED_CFQ=y | ||
130 | # CONFIG_DEFAULT_DEADLINE is not set | ||
131 | CONFIG_DEFAULT_CFQ=y | ||
132 | # CONFIG_DEFAULT_NOOP is not set | ||
133 | CONFIG_DEFAULT_IOSCHED="cfq" | ||
134 | # CONFIG_INLINE_SPIN_TRYLOCK is not set | ||
135 | # CONFIG_INLINE_SPIN_TRYLOCK_BH is not set | ||
136 | # CONFIG_INLINE_SPIN_LOCK is not set | ||
137 | # CONFIG_INLINE_SPIN_LOCK_BH is not set | ||
138 | # CONFIG_INLINE_SPIN_LOCK_IRQ is not set | ||
139 | # CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set | ||
140 | CONFIG_INLINE_SPIN_UNLOCK=y | ||
141 | # CONFIG_INLINE_SPIN_UNLOCK_BH is not set | ||
142 | CONFIG_INLINE_SPIN_UNLOCK_IRQ=y | ||
143 | # CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set | ||
144 | # CONFIG_INLINE_READ_TRYLOCK is not set | ||
145 | # CONFIG_INLINE_READ_LOCK is not set | ||
146 | # CONFIG_INLINE_READ_LOCK_BH is not set | ||
147 | # CONFIG_INLINE_READ_LOCK_IRQ is not set | ||
148 | # CONFIG_INLINE_READ_LOCK_IRQSAVE is not set | ||
149 | CONFIG_INLINE_READ_UNLOCK=y | ||
150 | # CONFIG_INLINE_READ_UNLOCK_BH is not set | ||
151 | CONFIG_INLINE_READ_UNLOCK_IRQ=y | ||
152 | # CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set | ||
153 | # CONFIG_INLINE_WRITE_TRYLOCK is not set | ||
154 | # CONFIG_INLINE_WRITE_LOCK is not set | ||
155 | # CONFIG_INLINE_WRITE_LOCK_BH is not set | ||
156 | # CONFIG_INLINE_WRITE_LOCK_IRQ is not set | ||
157 | # CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set | ||
158 | CONFIG_INLINE_WRITE_UNLOCK=y | ||
159 | # CONFIG_INLINE_WRITE_UNLOCK_BH is not set | ||
160 | CONFIG_INLINE_WRITE_UNLOCK_IRQ=y | ||
161 | # CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set | ||
162 | # CONFIG_MUTEX_SPIN_ON_OWNER is not set | ||
163 | CONFIG_FREEZER=y | ||
164 | |||
165 | # | ||
166 | # System Type | ||
167 | # | ||
168 | CONFIG_MMU=y | ||
169 | # CONFIG_ARCH_AAEC2000 is not set | ||
170 | # CONFIG_ARCH_INTEGRATOR is not set | ||
171 | # CONFIG_ARCH_REALVIEW is not set | ||
172 | # CONFIG_ARCH_VERSATILE is not set | ||
173 | # CONFIG_ARCH_AT91 is not set | ||
174 | # CONFIG_ARCH_CLPS711X is not set | ||
175 | # CONFIG_ARCH_GEMINI is not set | ||
176 | # CONFIG_ARCH_EBSA110 is not set | ||
177 | # CONFIG_ARCH_EP93XX is not set | ||
178 | # CONFIG_ARCH_FOOTBRIDGE is not set | ||
179 | CONFIG_ARCH_MXC=y | ||
180 | # CONFIG_ARCH_STMP3XXX is not set | ||
181 | # CONFIG_ARCH_NETX is not set | ||
182 | # CONFIG_ARCH_H720X is not set | ||
183 | # CONFIG_ARCH_NOMADIK is not set | ||
184 | # CONFIG_ARCH_IOP13XX is not set | ||
185 | # CONFIG_ARCH_IOP32X is not set | ||
186 | # CONFIG_ARCH_IOP33X is not set | ||
187 | # CONFIG_ARCH_IXP23XX is not set | ||
188 | # CONFIG_ARCH_IXP2000 is not set | ||
189 | # CONFIG_ARCH_IXP4XX is not set | ||
190 | # CONFIG_ARCH_L7200 is not set | ||
191 | # CONFIG_ARCH_DOVE is not set | ||
192 | # CONFIG_ARCH_KIRKWOOD is not set | ||
193 | # CONFIG_ARCH_LOKI is not set | ||
194 | # CONFIG_ARCH_MV78XX0 is not set | ||
195 | # CONFIG_ARCH_ORION5X is not set | ||
196 | # CONFIG_ARCH_MMP is not set | ||
197 | # CONFIG_ARCH_KS8695 is not set | ||
198 | # CONFIG_ARCH_NS9XXX is not set | ||
199 | # CONFIG_ARCH_W90X900 is not set | ||
200 | # CONFIG_ARCH_PNX4008 is not set | ||
201 | # CONFIG_ARCH_PXA is not set | ||
202 | # CONFIG_ARCH_MSM is not set | ||
203 | # CONFIG_ARCH_RPC is not set | ||
204 | # CONFIG_ARCH_SA1100 is not set | ||
205 | # CONFIG_ARCH_S3C2410 is not set | ||
206 | # CONFIG_ARCH_S3C64XX is not set | ||
207 | # CONFIG_ARCH_S5PC1XX is not set | ||
208 | # CONFIG_ARCH_SHARK is not set | ||
209 | # CONFIG_ARCH_LH7A40X is not set | ||
210 | # CONFIG_ARCH_U300 is not set | ||
211 | # CONFIG_ARCH_DAVINCI is not set | ||
212 | # CONFIG_ARCH_OMAP is not set | ||
213 | # CONFIG_ARCH_BCMRING is not set | ||
214 | # CONFIG_ARCH_U8500 is not set | ||
215 | |||
216 | # | ||
217 | # Freescale MXC Implementations | ||
218 | # | ||
219 | # CONFIG_ARCH_MX1 is not set | ||
220 | # CONFIG_ARCH_MX2 is not set | ||
221 | # CONFIG_ARCH_MX25 is not set | ||
222 | # CONFIG_ARCH_MX3 is not set | ||
223 | # CONFIG_ARCH_MXC91231 is not set | ||
224 | CONFIG_ARCH_MX5=y | ||
225 | CONFIG_ARCH_MX51=y | ||
226 | |||
227 | # | ||
228 | # MX5 platforms: | ||
229 | # | ||
230 | CONFIG_MACH_MX51_BABBAGE=y | ||
231 | # CONFIG_MXC_IRQ_PRIOR is not set | ||
232 | CONFIG_MXC_TZIC=y | ||
233 | # CONFIG_MXC_PWM is not set | ||
234 | CONFIG_ARCH_MXC_IOMUX_V3=y | ||
235 | |||
236 | # | ||
237 | # Processor Type | ||
238 | # | ||
239 | CONFIG_CPU_32v6K=y | ||
240 | CONFIG_CPU_V7=y | ||
241 | CONFIG_CPU_32v7=y | ||
242 | CONFIG_CPU_ABRT_EV7=y | ||
243 | CONFIG_CPU_PABRT_V7=y | ||
244 | CONFIG_CPU_CACHE_V7=y | ||
245 | CONFIG_CPU_CACHE_VIPT=y | ||
246 | CONFIG_CPU_COPY_V6=y | ||
247 | CONFIG_CPU_TLB_V7=y | ||
248 | CONFIG_CPU_HAS_ASID=y | ||
249 | CONFIG_CPU_CP15=y | ||
250 | CONFIG_CPU_CP15_MMU=y | ||
251 | |||
252 | # | ||
253 | # Processor Features | ||
254 | # | ||
255 | CONFIG_ARM_THUMB=y | ||
256 | # CONFIG_ARM_THUMBEE is not set | ||
257 | # CONFIG_CPU_ICACHE_DISABLE is not set | ||
258 | # CONFIG_CPU_DCACHE_DISABLE is not set | ||
259 | # CONFIG_CPU_BPREDICT_DISABLE is not set | ||
260 | CONFIG_HAS_TLS_REG=y | ||
261 | CONFIG_ARM_L1_CACHE_SHIFT=5 | ||
262 | # CONFIG_ARM_ERRATA_430973 is not set | ||
263 | # CONFIG_ARM_ERRATA_458693 is not set | ||
264 | # CONFIG_ARM_ERRATA_460075 is not set | ||
265 | CONFIG_COMMON_CLKDEV=y | ||
266 | |||
267 | # | ||
268 | # Bus support | ||
269 | # | ||
270 | # CONFIG_PCI_SYSCALL is not set | ||
271 | # CONFIG_ARCH_SUPPORTS_MSI is not set | ||
272 | # CONFIG_PCCARD is not set | ||
273 | |||
274 | # | ||
275 | # Kernel Features | ||
276 | # | ||
277 | CONFIG_TICK_ONESHOT=y | ||
278 | CONFIG_NO_HZ=y | ||
279 | CONFIG_HIGH_RES_TIMERS=y | ||
280 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
281 | CONFIG_VMSPLIT_3G=y | ||
282 | # CONFIG_VMSPLIT_2G is not set | ||
283 | # CONFIG_VMSPLIT_1G is not set | ||
284 | CONFIG_PAGE_OFFSET=0xC0000000 | ||
285 | # CONFIG_PREEMPT_NONE is not set | ||
286 | CONFIG_PREEMPT_VOLUNTARY=y | ||
287 | # CONFIG_PREEMPT is not set | ||
288 | CONFIG_HZ=100 | ||
289 | # CONFIG_THUMB2_KERNEL is not set | ||
290 | CONFIG_AEABI=y | ||
291 | # CONFIG_OABI_COMPAT is not set | ||
292 | # CONFIG_ARCH_SPARSEMEM_DEFAULT is not set | ||
293 | # CONFIG_ARCH_SELECT_MEMORY_MODEL is not set | ||
294 | # CONFIG_HIGHMEM is not set | ||
295 | CONFIG_SELECT_MEMORY_MODEL=y | ||
296 | CONFIG_FLATMEM_MANUAL=y | ||
297 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
298 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
299 | CONFIG_FLATMEM=y | ||
300 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
301 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
302 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
303 | # CONFIG_PHYS_ADDR_T_64BIT is not set | ||
304 | CONFIG_ZONE_DMA_FLAG=0 | ||
305 | CONFIG_VIRT_TO_BUS=y | ||
306 | # CONFIG_KSM is not set | ||
307 | CONFIG_DEFAULT_MMAP_MIN_ADDR=32768 | ||
308 | CONFIG_ALIGNMENT_TRAP=y | ||
309 | # CONFIG_UACCESS_WITH_MEMCPY is not set | ||
310 | |||
311 | # | ||
312 | # Boot options | ||
313 | # | ||
314 | CONFIG_ZBOOT_ROM_TEXT=0 | ||
315 | CONFIG_ZBOOT_ROM_BSS=0 | ||
316 | CONFIG_CMDLINE="noinitrd console=ttymxc0,115200 root=/dev/nfs nfsroot=192.168.0.101:/shared/nfs ip=dhcp" | ||
317 | # CONFIG_XIP_KERNEL is not set | ||
318 | # CONFIG_KEXEC is not set | ||
319 | |||
320 | # | ||
321 | # CPU Power Management | ||
322 | # | ||
323 | # CONFIG_CPU_IDLE is not set | ||
324 | |||
325 | # | ||
326 | # Floating point emulation | ||
327 | # | ||
328 | |||
329 | # | ||
330 | # At least one emulation must be selected | ||
331 | # | ||
332 | CONFIG_VFP=y | ||
333 | CONFIG_VFPv3=y | ||
334 | CONFIG_NEON=y | ||
335 | |||
336 | # | ||
337 | # Userspace binary formats | ||
338 | # | ||
339 | CONFIG_BINFMT_ELF=y | ||
340 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | ||
341 | CONFIG_HAVE_AOUT=y | ||
342 | # CONFIG_BINFMT_AOUT is not set | ||
343 | CONFIG_BINFMT_MISC=m | ||
344 | |||
345 | # | ||
346 | # Power management options | ||
347 | # | ||
348 | CONFIG_PM=y | ||
349 | CONFIG_PM_DEBUG=y | ||
350 | # CONFIG_PM_VERBOSE is not set | ||
351 | CONFIG_CAN_PM_TRACE=y | ||
352 | CONFIG_PM_SLEEP=y | ||
353 | CONFIG_SUSPEND=y | ||
354 | CONFIG_PM_TEST_SUSPEND=y | ||
355 | CONFIG_SUSPEND_FREEZER=y | ||
356 | # CONFIG_APM_EMULATION is not set | ||
357 | # CONFIG_PM_RUNTIME is not set | ||
358 | CONFIG_ARCH_SUSPEND_POSSIBLE=y | ||
359 | CONFIG_NET=y | ||
360 | |||
361 | # | ||
362 | # Networking options | ||
363 | # | ||
364 | CONFIG_PACKET=y | ||
365 | CONFIG_PACKET_MMAP=y | ||
366 | CONFIG_UNIX=y | ||
367 | # CONFIG_NET_KEY is not set | ||
368 | CONFIG_INET=y | ||
369 | # CONFIG_IP_MULTICAST is not set | ||
370 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
371 | CONFIG_IP_FIB_HASH=y | ||
372 | CONFIG_IP_PNP=y | ||
373 | CONFIG_IP_PNP_DHCP=y | ||
374 | # CONFIG_IP_PNP_BOOTP is not set | ||
375 | # CONFIG_IP_PNP_RARP is not set | ||
376 | # CONFIG_NET_IPIP is not set | ||
377 | # CONFIG_NET_IPGRE is not set | ||
378 | # CONFIG_ARPD is not set | ||
379 | # CONFIG_SYN_COOKIES is not set | ||
380 | # CONFIG_INET_AH is not set | ||
381 | # CONFIG_INET_ESP is not set | ||
382 | # CONFIG_INET_IPCOMP is not set | ||
383 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
384 | # CONFIG_INET_TUNNEL is not set | ||
385 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | ||
386 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
387 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
388 | # CONFIG_INET_LRO is not set | ||
389 | CONFIG_INET_DIAG=y | ||
390 | CONFIG_INET_TCP_DIAG=y | ||
391 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
392 | CONFIG_TCP_CONG_CUBIC=y | ||
393 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
394 | # CONFIG_TCP_MD5SIG is not set | ||
395 | # CONFIG_IPV6 is not set | ||
396 | # CONFIG_NETWORK_SECMARK is not set | ||
397 | # CONFIG_NETFILTER is not set | ||
398 | # CONFIG_IP_DCCP is not set | ||
399 | # CONFIG_IP_SCTP is not set | ||
400 | # CONFIG_RDS is not set | ||
401 | # CONFIG_TIPC is not set | ||
402 | # CONFIG_ATM is not set | ||
403 | # CONFIG_BRIDGE is not set | ||
404 | # CONFIG_NET_DSA is not set | ||
405 | # CONFIG_VLAN_8021Q is not set | ||
406 | # CONFIG_DECNET is not set | ||
407 | # CONFIG_LLC2 is not set | ||
408 | # CONFIG_IPX is not set | ||
409 | # CONFIG_ATALK is not set | ||
410 | # CONFIG_X25 is not set | ||
411 | # CONFIG_LAPB is not set | ||
412 | # CONFIG_ECONET is not set | ||
413 | # CONFIG_WAN_ROUTER is not set | ||
414 | # CONFIG_PHONET is not set | ||
415 | # CONFIG_IEEE802154 is not set | ||
416 | # CONFIG_NET_SCHED is not set | ||
417 | # CONFIG_DCB is not set | ||
418 | |||
419 | # | ||
420 | # Network testing | ||
421 | # | ||
422 | # CONFIG_NET_PKTGEN is not set | ||
423 | # CONFIG_HAMRADIO is not set | ||
424 | # CONFIG_CAN is not set | ||
425 | # CONFIG_IRDA is not set | ||
426 | # CONFIG_BT is not set | ||
427 | # CONFIG_AF_RXRPC is not set | ||
428 | # CONFIG_WIRELESS is not set | ||
429 | # CONFIG_WIMAX is not set | ||
430 | # CONFIG_RFKILL is not set | ||
431 | # CONFIG_NET_9P is not set | ||
432 | |||
433 | # | ||
434 | # Device Drivers | ||
435 | # | ||
436 | |||
437 | # | ||
438 | # Generic Driver Options | ||
439 | # | ||
440 | CONFIG_UEVENT_HELPER_PATH="" | ||
441 | # CONFIG_STANDALONE is not set | ||
442 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
443 | CONFIG_FW_LOADER=y | ||
444 | CONFIG_FIRMWARE_IN_KERNEL=y | ||
445 | CONFIG_EXTRA_FIRMWARE="" | ||
446 | # CONFIG_DEBUG_DRIVER is not set | ||
447 | # CONFIG_DEBUG_DEVRES is not set | ||
448 | # CONFIG_SYS_HYPERVISOR is not set | ||
449 | CONFIG_CONNECTOR=y | ||
450 | CONFIG_PROC_EVENTS=y | ||
451 | # CONFIG_MTD is not set | ||
452 | # CONFIG_PARPORT is not set | ||
453 | CONFIG_BLK_DEV=y | ||
454 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
455 | CONFIG_BLK_DEV_LOOP=y | ||
456 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | ||
457 | # CONFIG_BLK_DEV_DRBD is not set | ||
458 | # CONFIG_BLK_DEV_NBD is not set | ||
459 | CONFIG_BLK_DEV_RAM=y | ||
460 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
461 | CONFIG_BLK_DEV_RAM_SIZE=65536 | ||
462 | # CONFIG_BLK_DEV_XIP is not set | ||
463 | # CONFIG_CDROM_PKTCDVD is not set | ||
464 | # CONFIG_ATA_OVER_ETH is not set | ||
465 | # CONFIG_MG_DISK is not set | ||
466 | # CONFIG_MISC_DEVICES is not set | ||
467 | CONFIG_HAVE_IDE=y | ||
468 | # CONFIG_IDE is not set | ||
469 | |||
470 | # | ||
471 | # SCSI device support | ||
472 | # | ||
473 | # CONFIG_RAID_ATTRS is not set | ||
474 | CONFIG_SCSI=y | ||
475 | CONFIG_SCSI_DMA=y | ||
476 | # CONFIG_SCSI_TGT is not set | ||
477 | # CONFIG_SCSI_NETLINK is not set | ||
478 | # CONFIG_SCSI_PROC_FS is not set | ||
479 | |||
480 | # | ||
481 | # SCSI support type (disk, tape, CD-ROM) | ||
482 | # | ||
483 | CONFIG_BLK_DEV_SD=y | ||
484 | # CONFIG_CHR_DEV_ST is not set | ||
485 | # CONFIG_CHR_DEV_OSST is not set | ||
486 | # CONFIG_BLK_DEV_SR is not set | ||
487 | # CONFIG_CHR_DEV_SG is not set | ||
488 | # CONFIG_CHR_DEV_SCH is not set | ||
489 | CONFIG_SCSI_MULTI_LUN=y | ||
490 | CONFIG_SCSI_CONSTANTS=y | ||
491 | CONFIG_SCSI_LOGGING=y | ||
492 | CONFIG_SCSI_SCAN_ASYNC=y | ||
493 | CONFIG_SCSI_WAIT_SCAN=m | ||
494 | |||
495 | # | ||
496 | # SCSI Transports | ||
497 | # | ||
498 | # CONFIG_SCSI_SPI_ATTRS is not set | ||
499 | # CONFIG_SCSI_FC_ATTRS is not set | ||
500 | # CONFIG_SCSI_ISCSI_ATTRS is not set | ||
501 | # CONFIG_SCSI_SAS_LIBSAS is not set | ||
502 | # CONFIG_SCSI_SRP_ATTRS is not set | ||
503 | # CONFIG_SCSI_LOWLEVEL is not set | ||
504 | # CONFIG_SCSI_DH is not set | ||
505 | # CONFIG_SCSI_OSD_INITIATOR is not set | ||
506 | CONFIG_ATA=m | ||
507 | # CONFIG_ATA_NONSTANDARD is not set | ||
508 | CONFIG_ATA_VERBOSE_ERROR=y | ||
509 | CONFIG_SATA_PMP=y | ||
510 | CONFIG_ATA_SFF=y | ||
511 | # CONFIG_SATA_MV is not set | ||
512 | # CONFIG_PATA_PLATFORM is not set | ||
513 | # CONFIG_MD is not set | ||
514 | CONFIG_NETDEVICES=y | ||
515 | # CONFIG_DUMMY is not set | ||
516 | # CONFIG_BONDING is not set | ||
517 | # CONFIG_MACVLAN is not set | ||
518 | # CONFIG_EQUALIZER is not set | ||
519 | # CONFIG_TUN is not set | ||
520 | # CONFIG_VETH is not set | ||
521 | CONFIG_PHYLIB=y | ||
522 | |||
523 | # | ||
524 | # MII PHY device drivers | ||
525 | # | ||
526 | CONFIG_MARVELL_PHY=y | ||
527 | CONFIG_DAVICOM_PHY=y | ||
528 | CONFIG_QSEMI_PHY=y | ||
529 | CONFIG_LXT_PHY=y | ||
530 | CONFIG_CICADA_PHY=y | ||
531 | CONFIG_VITESSE_PHY=y | ||
532 | CONFIG_SMSC_PHY=y | ||
533 | CONFIG_BROADCOM_PHY=y | ||
534 | CONFIG_ICPLUS_PHY=y | ||
535 | CONFIG_REALTEK_PHY=y | ||
536 | CONFIG_NATIONAL_PHY=y | ||
537 | CONFIG_STE10XP=y | ||
538 | CONFIG_LSI_ET1011C_PHY=y | ||
539 | CONFIG_FIXED_PHY=y | ||
540 | CONFIG_MDIO_BITBANG=y | ||
541 | CONFIG_MDIO_GPIO=y | ||
542 | CONFIG_NET_ETHERNET=y | ||
543 | CONFIG_MII=m | ||
544 | # CONFIG_AX88796 is not set | ||
545 | # CONFIG_SMC91X is not set | ||
546 | # CONFIG_DM9000 is not set | ||
547 | # CONFIG_ETHOC is not set | ||
548 | # CONFIG_SMC911X is not set | ||
549 | # CONFIG_SMSC911X is not set | ||
550 | # CONFIG_DNET is not set | ||
551 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | ||
552 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | ||
553 | # CONFIG_IBM_NEW_EMAC_TAH is not set | ||
554 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | ||
555 | # CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set | ||
556 | # CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set | ||
557 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set | ||
558 | # CONFIG_B44 is not set | ||
559 | # CONFIG_KS8842 is not set | ||
560 | # CONFIG_KS8851_MLL is not set | ||
561 | CONFIG_FEC=y | ||
562 | # CONFIG_FEC2 is not set | ||
563 | # CONFIG_NETDEV_1000 is not set | ||
564 | # CONFIG_NETDEV_10000 is not set | ||
565 | # CONFIG_WLAN is not set | ||
566 | |||
567 | # | ||
568 | # Enable WiMAX (Networking options) to see the WiMAX drivers | ||
569 | # | ||
570 | # CONFIG_WAN is not set | ||
571 | # CONFIG_PPP is not set | ||
572 | # CONFIG_SLIP is not set | ||
573 | # CONFIG_NETCONSOLE is not set | ||
574 | # CONFIG_NETPOLL is not set | ||
575 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
576 | # CONFIG_ISDN is not set | ||
577 | # CONFIG_PHONE is not set | ||
578 | |||
579 | # | ||
580 | # Input device support | ||
581 | # | ||
582 | CONFIG_INPUT=y | ||
583 | CONFIG_INPUT_FF_MEMLESS=m | ||
584 | # CONFIG_INPUT_POLLDEV is not set | ||
585 | # CONFIG_INPUT_SPARSEKMAP is not set | ||
586 | |||
587 | # | ||
588 | # Userland interfaces | ||
589 | # | ||
590 | CONFIG_INPUT_MOUSEDEV=y | ||
591 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
592 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
593 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
594 | # CONFIG_INPUT_JOYDEV is not set | ||
595 | CONFIG_INPUT_EVDEV=y | ||
596 | CONFIG_INPUT_EVBUG=m | ||
597 | |||
598 | # | ||
599 | # Input Device Drivers | ||
600 | # | ||
601 | CONFIG_INPUT_KEYBOARD=y | ||
602 | # CONFIG_KEYBOARD_ADP5588 is not set | ||
603 | CONFIG_KEYBOARD_ATKBD=y | ||
604 | # CONFIG_QT2160 is not set | ||
605 | # CONFIG_KEYBOARD_LKKBD is not set | ||
606 | # CONFIG_KEYBOARD_GPIO is not set | ||
607 | # CONFIG_KEYBOARD_MATRIX is not set | ||
608 | # CONFIG_KEYBOARD_LM8323 is not set | ||
609 | # CONFIG_KEYBOARD_MAX7359 is not set | ||
610 | # CONFIG_KEYBOARD_NEWTON is not set | ||
611 | # CONFIG_KEYBOARD_OPENCORES is not set | ||
612 | # CONFIG_KEYBOARD_STOWAWAY is not set | ||
613 | # CONFIG_KEYBOARD_SUNKBD is not set | ||
614 | # CONFIG_KEYBOARD_XTKBD is not set | ||
615 | CONFIG_INPUT_MOUSE=y | ||
616 | CONFIG_MOUSE_PS2=m | ||
617 | CONFIG_MOUSE_PS2_ALPS=y | ||
618 | CONFIG_MOUSE_PS2_LOGIPS2PP=y | ||
619 | CONFIG_MOUSE_PS2_SYNAPTICS=y | ||
620 | CONFIG_MOUSE_PS2_TRACKPOINT=y | ||
621 | CONFIG_MOUSE_PS2_ELANTECH=y | ||
622 | # CONFIG_MOUSE_PS2_SENTELIC is not set | ||
623 | # CONFIG_MOUSE_PS2_TOUCHKIT is not set | ||
624 | # CONFIG_MOUSE_SERIAL is not set | ||
625 | # CONFIG_MOUSE_VSXXXAA is not set | ||
626 | # CONFIG_MOUSE_GPIO is not set | ||
627 | # CONFIG_MOUSE_SYNAPTICS_I2C is not set | ||
628 | # CONFIG_INPUT_JOYSTICK is not set | ||
629 | # CONFIG_INPUT_TABLET is not set | ||
630 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
631 | # CONFIG_INPUT_MISC is not set | ||
632 | |||
633 | # | ||
634 | # Hardware I/O ports | ||
635 | # | ||
636 | CONFIG_SERIO=y | ||
637 | CONFIG_SERIO_SERPORT=m | ||
638 | CONFIG_SERIO_LIBPS2=y | ||
639 | # CONFIG_SERIO_RAW is not set | ||
640 | # CONFIG_SERIO_ALTERA_PS2 is not set | ||
641 | # CONFIG_GAMEPORT is not set | ||
642 | |||
643 | # | ||
644 | # Character devices | ||
645 | # | ||
646 | CONFIG_VT=y | ||
647 | CONFIG_CONSOLE_TRANSLATIONS=y | ||
648 | CONFIG_VT_CONSOLE=y | ||
649 | CONFIG_HW_CONSOLE=y | ||
650 | CONFIG_VT_HW_CONSOLE_BINDING=y | ||
651 | # CONFIG_DEVKMEM is not set | ||
652 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
653 | |||
654 | # | ||
655 | # Serial drivers | ||
656 | # | ||
657 | # CONFIG_SERIAL_8250 is not set | ||
658 | |||
659 | # | ||
660 | # Non-8250 serial port support | ||
661 | # | ||
662 | CONFIG_SERIAL_IMX=y | ||
663 | CONFIG_SERIAL_IMX_CONSOLE=y | ||
664 | CONFIG_SERIAL_CORE=y | ||
665 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
666 | CONFIG_UNIX98_PTYS=y | ||
667 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set | ||
668 | # CONFIG_LEGACY_PTYS is not set | ||
669 | # CONFIG_IPMI_HANDLER is not set | ||
670 | CONFIG_HW_RANDOM=y | ||
671 | # CONFIG_HW_RANDOM_TIMERIOMEM is not set | ||
672 | # CONFIG_R3964 is not set | ||
673 | # CONFIG_RAW_DRIVER is not set | ||
674 | # CONFIG_TCG_TPM is not set | ||
675 | CONFIG_I2C=y | ||
676 | CONFIG_I2C_BOARDINFO=y | ||
677 | # CONFIG_I2C_COMPAT is not set | ||
678 | CONFIG_I2C_CHARDEV=m | ||
679 | # CONFIG_I2C_HELPER_AUTO is not set | ||
680 | |||
681 | # | ||
682 | # I2C Algorithms | ||
683 | # | ||
684 | CONFIG_I2C_ALGOBIT=m | ||
685 | CONFIG_I2C_ALGOPCF=m | ||
686 | CONFIG_I2C_ALGOPCA=m | ||
687 | |||
688 | # | ||
689 | # I2C Hardware Bus support | ||
690 | # | ||
691 | |||
692 | # | ||
693 | # I2C system bus drivers (mostly embedded / system-on-chip) | ||
694 | # | ||
695 | # CONFIG_I2C_DESIGNWARE is not set | ||
696 | # CONFIG_I2C_GPIO is not set | ||
697 | # CONFIG_I2C_IMX is not set | ||
698 | # CONFIG_I2C_OCORES is not set | ||
699 | # CONFIG_I2C_SIMTEC is not set | ||
700 | |||
701 | # | ||
702 | # External I2C/SMBus adapter drivers | ||
703 | # | ||
704 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
705 | # CONFIG_I2C_TAOS_EVM is not set | ||
706 | |||
707 | # | ||
708 | # Other I2C/SMBus bus drivers | ||
709 | # | ||
710 | # CONFIG_I2C_PCA_PLATFORM is not set | ||
711 | # CONFIG_I2C_STUB is not set | ||
712 | |||
713 | # | ||
714 | # Miscellaneous I2C Chip support | ||
715 | # | ||
716 | # CONFIG_SENSORS_TSL2550 is not set | ||
717 | # CONFIG_I2C_DEBUG_CORE is not set | ||
718 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
719 | # CONFIG_I2C_DEBUG_BUS is not set | ||
720 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
721 | # CONFIG_SPI is not set | ||
722 | |||
723 | # | ||
724 | # PPS support | ||
725 | # | ||
726 | # CONFIG_PPS is not set | ||
727 | CONFIG_ARCH_REQUIRE_GPIOLIB=y | ||
728 | CONFIG_GPIOLIB=y | ||
729 | # CONFIG_DEBUG_GPIO is not set | ||
730 | CONFIG_GPIO_SYSFS=y | ||
731 | |||
732 | # | ||
733 | # Memory mapped GPIO expanders: | ||
734 | # | ||
735 | |||
736 | # | ||
737 | # I2C GPIO expanders: | ||
738 | # | ||
739 | # CONFIG_GPIO_MAX732X is not set | ||
740 | # CONFIG_GPIO_PCA953X is not set | ||
741 | # CONFIG_GPIO_PCF857X is not set | ||
742 | # CONFIG_GPIO_ADP5588 is not set | ||
743 | |||
744 | # | ||
745 | # PCI GPIO expanders: | ||
746 | # | ||
747 | |||
748 | # | ||
749 | # SPI GPIO expanders: | ||
750 | # | ||
751 | |||
752 | # | ||
753 | # AC97 GPIO expanders: | ||
754 | # | ||
755 | # CONFIG_W1 is not set | ||
756 | # CONFIG_POWER_SUPPLY is not set | ||
757 | # CONFIG_HWMON is not set | ||
758 | # CONFIG_THERMAL is not set | ||
759 | # CONFIG_WATCHDOG is not set | ||
760 | CONFIG_SSB_POSSIBLE=y | ||
761 | |||
762 | # | ||
763 | # Sonics Silicon Backplane | ||
764 | # | ||
765 | # CONFIG_SSB is not set | ||
766 | |||
767 | # | ||
768 | # Multifunction device drivers | ||
769 | # | ||
770 | # CONFIG_MFD_CORE is not set | ||
771 | # CONFIG_MFD_SM501 is not set | ||
772 | # CONFIG_MFD_ASIC3 is not set | ||
773 | # CONFIG_HTC_EGPIO is not set | ||
774 | # CONFIG_HTC_PASIC3 is not set | ||
775 | # CONFIG_TPS65010 is not set | ||
776 | # CONFIG_TWL4030_CORE is not set | ||
777 | # CONFIG_MFD_TMIO is not set | ||
778 | # CONFIG_MFD_T7L66XB is not set | ||
779 | # CONFIG_MFD_TC6387XB is not set | ||
780 | # CONFIG_MFD_TC6393XB is not set | ||
781 | # CONFIG_PMIC_DA903X is not set | ||
782 | # CONFIG_PMIC_ADP5520 is not set | ||
783 | # CONFIG_MFD_WM8400 is not set | ||
784 | # CONFIG_MFD_WM831X is not set | ||
785 | # CONFIG_MFD_WM8350_I2C is not set | ||
786 | # CONFIG_MFD_PCF50633 is not set | ||
787 | # CONFIG_AB3100_CORE is not set | ||
788 | # CONFIG_MFD_88PM8607 is not set | ||
789 | # CONFIG_REGULATOR is not set | ||
790 | # CONFIG_MEDIA_SUPPORT is not set | ||
791 | |||
792 | # | ||
793 | # Graphics support | ||
794 | # | ||
795 | # CONFIG_VGASTATE is not set | ||
796 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
797 | # CONFIG_FB is not set | ||
798 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
799 | |||
800 | # | ||
801 | # Display device support | ||
802 | # | ||
803 | # CONFIG_DISPLAY_SUPPORT is not set | ||
804 | |||
805 | # | ||
806 | # Console display driver support | ||
807 | # | ||
808 | # CONFIG_VGA_CONSOLE is not set | ||
809 | CONFIG_DUMMY_CONSOLE=y | ||
810 | # CONFIG_SOUND is not set | ||
811 | # CONFIG_HID_SUPPORT is not set | ||
812 | # CONFIG_USB_SUPPORT is not set | ||
813 | CONFIG_MMC=y | ||
814 | # CONFIG_MMC_DEBUG is not set | ||
815 | # CONFIG_MMC_UNSAFE_RESUME is not set | ||
816 | |||
817 | # | ||
818 | # MMC/SD/SDIO Card Drivers | ||
819 | # | ||
820 | CONFIG_MMC_BLOCK=m | ||
821 | CONFIG_MMC_BLOCK_BOUNCE=y | ||
822 | # CONFIG_SDIO_UART is not set | ||
823 | # CONFIG_MMC_TEST is not set | ||
824 | |||
825 | # | ||
826 | # MMC/SD/SDIO Host Controller Drivers | ||
827 | # | ||
828 | CONFIG_MMC_SDHCI=m | ||
829 | # CONFIG_MMC_SDHCI_PLTFM is not set | ||
830 | # CONFIG_MMC_AT91 is not set | ||
831 | # CONFIG_MMC_ATMELMCI is not set | ||
832 | # CONFIG_MMC_MXC is not set | ||
833 | # CONFIG_MEMSTICK is not set | ||
834 | CONFIG_NEW_LEDS=y | ||
835 | CONFIG_LEDS_CLASS=m | ||
836 | |||
837 | # | ||
838 | # LED drivers | ||
839 | # | ||
840 | # CONFIG_LEDS_PCA9532 is not set | ||
841 | # CONFIG_LEDS_GPIO is not set | ||
842 | # CONFIG_LEDS_LP3944 is not set | ||
843 | # CONFIG_LEDS_PCA955X is not set | ||
844 | # CONFIG_LEDS_BD2802 is not set | ||
845 | # CONFIG_LEDS_LT3593 is not set | ||
846 | |||
847 | # | ||
848 | # LED Triggers | ||
849 | # | ||
850 | # CONFIG_LEDS_TRIGGERS is not set | ||
851 | # CONFIG_ACCESSIBILITY is not set | ||
852 | CONFIG_RTC_LIB=y | ||
853 | CONFIG_RTC_CLASS=y | ||
854 | CONFIG_RTC_HCTOSYS=y | ||
855 | CONFIG_RTC_HCTOSYS_DEVICE="rtc0" | ||
856 | # CONFIG_RTC_DEBUG is not set | ||
857 | |||
858 | # | ||
859 | # RTC interfaces | ||
860 | # | ||
861 | CONFIG_RTC_INTF_SYSFS=y | ||
862 | CONFIG_RTC_INTF_PROC=y | ||
863 | CONFIG_RTC_INTF_DEV=y | ||
864 | CONFIG_RTC_INTF_DEV_UIE_EMUL=y | ||
865 | # CONFIG_RTC_DRV_TEST is not set | ||
866 | |||
867 | # | ||
868 | # I2C RTC drivers | ||
869 | # | ||
870 | # CONFIG_RTC_DRV_DS1307 is not set | ||
871 | # CONFIG_RTC_DRV_DS1374 is not set | ||
872 | # CONFIG_RTC_DRV_DS1672 is not set | ||
873 | # CONFIG_RTC_DRV_MAX6900 is not set | ||
874 | # CONFIG_RTC_DRV_RS5C372 is not set | ||
875 | # CONFIG_RTC_DRV_ISL1208 is not set | ||
876 | # CONFIG_RTC_DRV_X1205 is not set | ||
877 | # CONFIG_RTC_DRV_PCF8563 is not set | ||
878 | # CONFIG_RTC_DRV_PCF8583 is not set | ||
879 | # CONFIG_RTC_DRV_M41T80 is not set | ||
880 | # CONFIG_RTC_DRV_BQ32K is not set | ||
881 | # CONFIG_RTC_DRV_S35390A is not set | ||
882 | # CONFIG_RTC_DRV_FM3130 is not set | ||
883 | # CONFIG_RTC_DRV_RX8581 is not set | ||
884 | # CONFIG_RTC_DRV_RX8025 is not set | ||
885 | |||
886 | # | ||
887 | # SPI RTC drivers | ||
888 | # | ||
889 | |||
890 | # | ||
891 | # Platform RTC drivers | ||
892 | # | ||
893 | # CONFIG_RTC_DRV_CMOS is not set | ||
894 | # CONFIG_RTC_DRV_DS1286 is not set | ||
895 | # CONFIG_RTC_DRV_DS1511 is not set | ||
896 | # CONFIG_RTC_DRV_DS1553 is not set | ||
897 | # CONFIG_RTC_DRV_DS1742 is not set | ||
898 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
899 | # CONFIG_RTC_DRV_M48T86 is not set | ||
900 | # CONFIG_RTC_DRV_M48T35 is not set | ||
901 | # CONFIG_RTC_DRV_M48T59 is not set | ||
902 | # CONFIG_RTC_DRV_MSM6242 is not set | ||
903 | # CONFIG_RTC_MXC is not set | ||
904 | # CONFIG_RTC_DRV_BQ4802 is not set | ||
905 | # CONFIG_RTC_DRV_RP5C01 is not set | ||
906 | # CONFIG_RTC_DRV_V3020 is not set | ||
907 | |||
908 | # | ||
909 | # on-CPU RTC drivers | ||
910 | # | ||
911 | # CONFIG_DMADEVICES is not set | ||
912 | # CONFIG_AUXDISPLAY is not set | ||
913 | # CONFIG_UIO is not set | ||
914 | |||
915 | # | ||
916 | # TI VLYNQ | ||
917 | # | ||
918 | # CONFIG_STAGING is not set | ||
919 | |||
920 | # | ||
921 | # File systems | ||
922 | # | ||
923 | CONFIG_EXT2_FS=y | ||
924 | CONFIG_EXT2_FS_XATTR=y | ||
925 | CONFIG_EXT2_FS_POSIX_ACL=y | ||
926 | CONFIG_EXT2_FS_SECURITY=y | ||
927 | # CONFIG_EXT2_FS_XIP is not set | ||
928 | CONFIG_EXT3_FS=y | ||
929 | CONFIG_EXT3_DEFAULTS_TO_ORDERED=y | ||
930 | CONFIG_EXT3_FS_XATTR=y | ||
931 | CONFIG_EXT3_FS_POSIX_ACL=y | ||
932 | CONFIG_EXT3_FS_SECURITY=y | ||
933 | CONFIG_EXT4_FS=y | ||
934 | CONFIG_EXT4_FS_XATTR=y | ||
935 | CONFIG_EXT4_FS_POSIX_ACL=y | ||
936 | CONFIG_EXT4_FS_SECURITY=y | ||
937 | # CONFIG_EXT4_DEBUG is not set | ||
938 | CONFIG_JBD=y | ||
939 | # CONFIG_JBD_DEBUG is not set | ||
940 | CONFIG_JBD2=y | ||
941 | # CONFIG_JBD2_DEBUG is not set | ||
942 | CONFIG_FS_MBCACHE=y | ||
943 | # CONFIG_REISERFS_FS is not set | ||
944 | # CONFIG_JFS_FS is not set | ||
945 | CONFIG_FS_POSIX_ACL=y | ||
946 | # CONFIG_XFS_FS is not set | ||
947 | # CONFIG_OCFS2_FS is not set | ||
948 | # CONFIG_BTRFS_FS is not set | ||
949 | # CONFIG_NILFS2_FS is not set | ||
950 | CONFIG_FILE_LOCKING=y | ||
951 | CONFIG_FSNOTIFY=y | ||
952 | CONFIG_DNOTIFY=y | ||
953 | CONFIG_INOTIFY=y | ||
954 | CONFIG_INOTIFY_USER=y | ||
955 | CONFIG_QUOTA=y | ||
956 | CONFIG_QUOTA_NETLINK_INTERFACE=y | ||
957 | # CONFIG_PRINT_QUOTA_WARNING is not set | ||
958 | # CONFIG_QFMT_V1 is not set | ||
959 | # CONFIG_QFMT_V2 is not set | ||
960 | CONFIG_QUOTACTL=y | ||
961 | CONFIG_AUTOFS_FS=y | ||
962 | CONFIG_AUTOFS4_FS=y | ||
963 | CONFIG_FUSE_FS=y | ||
964 | # CONFIG_CUSE is not set | ||
965 | |||
966 | # | ||
967 | # Caches | ||
968 | # | ||
969 | # CONFIG_FSCACHE is not set | ||
970 | |||
971 | # | ||
972 | # CD-ROM/DVD Filesystems | ||
973 | # | ||
974 | CONFIG_ISO9660_FS=m | ||
975 | CONFIG_JOLIET=y | ||
976 | CONFIG_ZISOFS=y | ||
977 | CONFIG_UDF_FS=m | ||
978 | CONFIG_UDF_NLS=y | ||
979 | |||
980 | # | ||
981 | # DOS/FAT/NT Filesystems | ||
982 | # | ||
983 | CONFIG_FAT_FS=y | ||
984 | CONFIG_MSDOS_FS=m | ||
985 | CONFIG_VFAT_FS=y | ||
986 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
987 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | ||
988 | # CONFIG_NTFS_FS is not set | ||
989 | |||
990 | # | ||
991 | # Pseudo filesystems | ||
992 | # | ||
993 | CONFIG_PROC_FS=y | ||
994 | CONFIG_PROC_SYSCTL=y | ||
995 | CONFIG_PROC_PAGE_MONITOR=y | ||
996 | CONFIG_SYSFS=y | ||
997 | # CONFIG_TMPFS is not set | ||
998 | # CONFIG_HUGETLB_PAGE is not set | ||
999 | CONFIG_CONFIGFS_FS=m | ||
1000 | CONFIG_MISC_FILESYSTEMS=y | ||
1001 | # CONFIG_ADFS_FS is not set | ||
1002 | # CONFIG_AFFS_FS is not set | ||
1003 | # CONFIG_ECRYPT_FS is not set | ||
1004 | # CONFIG_HFS_FS is not set | ||
1005 | # CONFIG_HFSPLUS_FS is not set | ||
1006 | # CONFIG_BEFS_FS is not set | ||
1007 | # CONFIG_BFS_FS is not set | ||
1008 | # CONFIG_EFS_FS is not set | ||
1009 | # CONFIG_CRAMFS is not set | ||
1010 | # CONFIG_SQUASHFS is not set | ||
1011 | # CONFIG_VXFS_FS is not set | ||
1012 | # CONFIG_MINIX_FS is not set | ||
1013 | # CONFIG_OMFS_FS is not set | ||
1014 | # CONFIG_HPFS_FS is not set | ||
1015 | # CONFIG_QNX4FS_FS is not set | ||
1016 | # CONFIG_ROMFS_FS is not set | ||
1017 | # CONFIG_SYSV_FS is not set | ||
1018 | # CONFIG_UFS_FS is not set | ||
1019 | CONFIG_NETWORK_FILESYSTEMS=y | ||
1020 | CONFIG_NFS_FS=y | ||
1021 | CONFIG_NFS_V3=y | ||
1022 | CONFIG_NFS_V3_ACL=y | ||
1023 | CONFIG_NFS_V4=y | ||
1024 | # CONFIG_NFS_V4_1 is not set | ||
1025 | CONFIG_ROOT_NFS=y | ||
1026 | # CONFIG_NFSD is not set | ||
1027 | CONFIG_LOCKD=y | ||
1028 | CONFIG_LOCKD_V4=y | ||
1029 | CONFIG_NFS_ACL_SUPPORT=y | ||
1030 | CONFIG_NFS_COMMON=y | ||
1031 | CONFIG_SUNRPC=y | ||
1032 | CONFIG_SUNRPC_GSS=y | ||
1033 | CONFIG_RPCSEC_GSS_KRB5=y | ||
1034 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
1035 | # CONFIG_SMB_FS is not set | ||
1036 | # CONFIG_CIFS is not set | ||
1037 | # CONFIG_NCP_FS is not set | ||
1038 | # CONFIG_CODA_FS is not set | ||
1039 | # CONFIG_AFS_FS is not set | ||
1040 | |||
1041 | # | ||
1042 | # Partition Types | ||
1043 | # | ||
1044 | # CONFIG_PARTITION_ADVANCED is not set | ||
1045 | CONFIG_MSDOS_PARTITION=y | ||
1046 | CONFIG_NLS=y | ||
1047 | CONFIG_NLS_DEFAULT="cp437" | ||
1048 | CONFIG_NLS_CODEPAGE_437=y | ||
1049 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
1050 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
1051 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
1052 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
1053 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
1054 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
1055 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
1056 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
1057 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
1058 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
1059 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
1060 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
1061 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
1062 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
1063 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
1064 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
1065 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
1066 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
1067 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
1068 | # CONFIG_NLS_ISO8859_8 is not set | ||
1069 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
1070 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
1071 | CONFIG_NLS_ASCII=y | ||
1072 | CONFIG_NLS_ISO8859_1=m | ||
1073 | # CONFIG_NLS_ISO8859_2 is not set | ||
1074 | # CONFIG_NLS_ISO8859_3 is not set | ||
1075 | # CONFIG_NLS_ISO8859_4 is not set | ||
1076 | # CONFIG_NLS_ISO8859_5 is not set | ||
1077 | # CONFIG_NLS_ISO8859_6 is not set | ||
1078 | # CONFIG_NLS_ISO8859_7 is not set | ||
1079 | # CONFIG_NLS_ISO8859_9 is not set | ||
1080 | # CONFIG_NLS_ISO8859_13 is not set | ||
1081 | # CONFIG_NLS_ISO8859_14 is not set | ||
1082 | CONFIG_NLS_ISO8859_15=m | ||
1083 | # CONFIG_NLS_KOI8_R is not set | ||
1084 | # CONFIG_NLS_KOI8_U is not set | ||
1085 | CONFIG_NLS_UTF8=y | ||
1086 | # CONFIG_DLM is not set | ||
1087 | |||
1088 | # | ||
1089 | # Kernel hacking | ||
1090 | # | ||
1091 | # CONFIG_PRINTK_TIME is not set | ||
1092 | CONFIG_ENABLE_WARN_DEPRECATED=y | ||
1093 | CONFIG_ENABLE_MUST_CHECK=y | ||
1094 | CONFIG_FRAME_WARN=1024 | ||
1095 | CONFIG_MAGIC_SYSRQ=y | ||
1096 | # CONFIG_STRIP_ASM_SYMS is not set | ||
1097 | # CONFIG_UNUSED_SYMBOLS is not set | ||
1098 | CONFIG_DEBUG_FS=y | ||
1099 | # CONFIG_HEADERS_CHECK is not set | ||
1100 | CONFIG_DEBUG_KERNEL=y | ||
1101 | # CONFIG_DEBUG_SHIRQ is not set | ||
1102 | # CONFIG_DETECT_SOFTLOCKUP is not set | ||
1103 | # CONFIG_DETECT_HUNG_TASK is not set | ||
1104 | # CONFIG_SCHED_DEBUG is not set | ||
1105 | # CONFIG_SCHEDSTATS is not set | ||
1106 | # CONFIG_TIMER_STATS is not set | ||
1107 | # CONFIG_DEBUG_OBJECTS is not set | ||
1108 | # CONFIG_DEBUG_KMEMLEAK is not set | ||
1109 | # CONFIG_DEBUG_RT_MUTEXES is not set | ||
1110 | # CONFIG_RT_MUTEX_TESTER is not set | ||
1111 | # CONFIG_DEBUG_SPINLOCK is not set | ||
1112 | # CONFIG_DEBUG_MUTEXES is not set | ||
1113 | # CONFIG_DEBUG_LOCK_ALLOC is not set | ||
1114 | # CONFIG_PROVE_LOCKING is not set | ||
1115 | # CONFIG_LOCK_STAT is not set | ||
1116 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
1117 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | ||
1118 | # CONFIG_DEBUG_KOBJECT is not set | ||
1119 | # CONFIG_DEBUG_BUGVERBOSE is not set | ||
1120 | # CONFIG_DEBUG_INFO is not set | ||
1121 | # CONFIG_DEBUG_VM is not set | ||
1122 | # CONFIG_DEBUG_WRITECOUNT is not set | ||
1123 | # CONFIG_DEBUG_MEMORY_INIT is not set | ||
1124 | # CONFIG_DEBUG_LIST is not set | ||
1125 | # CONFIG_DEBUG_SG is not set | ||
1126 | # CONFIG_DEBUG_NOTIFIERS is not set | ||
1127 | # CONFIG_DEBUG_CREDENTIALS is not set | ||
1128 | CONFIG_FRAME_POINTER=y | ||
1129 | # CONFIG_BOOT_PRINTK_DELAY is not set | ||
1130 | # CONFIG_RCU_TORTURE_TEST is not set | ||
1131 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
1132 | # CONFIG_BACKTRACE_SELF_TEST is not set | ||
1133 | # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set | ||
1134 | # CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set | ||
1135 | # CONFIG_FAULT_INJECTION is not set | ||
1136 | # CONFIG_LATENCYTOP is not set | ||
1137 | # CONFIG_SYSCTL_SYSCALL_CHECK is not set | ||
1138 | # CONFIG_PAGE_POISONING is not set | ||
1139 | CONFIG_HAVE_FUNCTION_TRACER=y | ||
1140 | CONFIG_TRACING_SUPPORT=y | ||
1141 | # CONFIG_FTRACE is not set | ||
1142 | # CONFIG_DYNAMIC_DEBUG is not set | ||
1143 | # CONFIG_SAMPLES is not set | ||
1144 | CONFIG_HAVE_ARCH_KGDB=y | ||
1145 | # CONFIG_KGDB is not set | ||
1146 | # CONFIG_ARM_UNWIND is not set | ||
1147 | # CONFIG_DEBUG_USER is not set | ||
1148 | # CONFIG_DEBUG_ERRORS is not set | ||
1149 | # CONFIG_DEBUG_STACK_USAGE is not set | ||
1150 | CONFIG_DEBUG_LL=y | ||
1151 | CONFIG_EARLY_PRINTK=y | ||
1152 | # CONFIG_DEBUG_ICEDCC is not set | ||
1153 | # CONFIG_OC_ETM is not set | ||
1154 | |||
1155 | # | ||
1156 | # Security options | ||
1157 | # | ||
1158 | CONFIG_KEYS=y | ||
1159 | # CONFIG_KEYS_DEBUG_PROC_KEYS is not set | ||
1160 | # CONFIG_SECURITY is not set | ||
1161 | CONFIG_SECURITYFS=y | ||
1162 | # CONFIG_DEFAULT_SECURITY_SELINUX is not set | ||
1163 | # CONFIG_DEFAULT_SECURITY_SMACK is not set | ||
1164 | # CONFIG_DEFAULT_SECURITY_TOMOYO is not set | ||
1165 | CONFIG_DEFAULT_SECURITY_DAC=y | ||
1166 | CONFIG_DEFAULT_SECURITY="" | ||
1167 | CONFIG_CRYPTO=y | ||
1168 | |||
1169 | # | ||
1170 | # Crypto core or helper | ||
1171 | # | ||
1172 | CONFIG_CRYPTO_ALGAPI=y | ||
1173 | CONFIG_CRYPTO_ALGAPI2=y | ||
1174 | CONFIG_CRYPTO_AEAD2=y | ||
1175 | CONFIG_CRYPTO_BLKCIPHER=y | ||
1176 | CONFIG_CRYPTO_BLKCIPHER2=y | ||
1177 | CONFIG_CRYPTO_HASH=y | ||
1178 | CONFIG_CRYPTO_HASH2=y | ||
1179 | CONFIG_CRYPTO_RNG2=y | ||
1180 | CONFIG_CRYPTO_PCOMP=y | ||
1181 | CONFIG_CRYPTO_MANAGER=y | ||
1182 | CONFIG_CRYPTO_MANAGER2=y | ||
1183 | # CONFIG_CRYPTO_GF128MUL is not set | ||
1184 | # CONFIG_CRYPTO_NULL is not set | ||
1185 | CONFIG_CRYPTO_WORKQUEUE=y | ||
1186 | # CONFIG_CRYPTO_CRYPTD is not set | ||
1187 | # CONFIG_CRYPTO_AUTHENC is not set | ||
1188 | # CONFIG_CRYPTO_TEST is not set | ||
1189 | |||
1190 | # | ||
1191 | # Authenticated Encryption with Associated Data | ||
1192 | # | ||
1193 | # CONFIG_CRYPTO_CCM is not set | ||
1194 | # CONFIG_CRYPTO_GCM is not set | ||
1195 | # CONFIG_CRYPTO_SEQIV is not set | ||
1196 | |||
1197 | # | ||
1198 | # Block modes | ||
1199 | # | ||
1200 | CONFIG_CRYPTO_CBC=y | ||
1201 | # CONFIG_CRYPTO_CTR is not set | ||
1202 | # CONFIG_CRYPTO_CTS is not set | ||
1203 | # CONFIG_CRYPTO_ECB is not set | ||
1204 | # CONFIG_CRYPTO_LRW is not set | ||
1205 | # CONFIG_CRYPTO_PCBC is not set | ||
1206 | # CONFIG_CRYPTO_XTS is not set | ||
1207 | |||
1208 | # | ||
1209 | # Hash modes | ||
1210 | # | ||
1211 | # CONFIG_CRYPTO_HMAC is not set | ||
1212 | # CONFIG_CRYPTO_XCBC is not set | ||
1213 | # CONFIG_CRYPTO_VMAC is not set | ||
1214 | |||
1215 | # | ||
1216 | # Digest | ||
1217 | # | ||
1218 | CONFIG_CRYPTO_CRC32C=m | ||
1219 | # CONFIG_CRYPTO_GHASH is not set | ||
1220 | # CONFIG_CRYPTO_MD4 is not set | ||
1221 | CONFIG_CRYPTO_MD5=y | ||
1222 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
1223 | # CONFIG_CRYPTO_RMD128 is not set | ||
1224 | # CONFIG_CRYPTO_RMD160 is not set | ||
1225 | # CONFIG_CRYPTO_RMD256 is not set | ||
1226 | # CONFIG_CRYPTO_RMD320 is not set | ||
1227 | # CONFIG_CRYPTO_SHA1 is not set | ||
1228 | # CONFIG_CRYPTO_SHA256 is not set | ||
1229 | # CONFIG_CRYPTO_SHA512 is not set | ||
1230 | # CONFIG_CRYPTO_TGR192 is not set | ||
1231 | # CONFIG_CRYPTO_WP512 is not set | ||
1232 | |||
1233 | # | ||
1234 | # Ciphers | ||
1235 | # | ||
1236 | # CONFIG_CRYPTO_AES is not set | ||
1237 | # CONFIG_CRYPTO_ANUBIS is not set | ||
1238 | # CONFIG_CRYPTO_ARC4 is not set | ||
1239 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
1240 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
1241 | # CONFIG_CRYPTO_CAST5 is not set | ||
1242 | # CONFIG_CRYPTO_CAST6 is not set | ||
1243 | CONFIG_CRYPTO_DES=y | ||
1244 | # CONFIG_CRYPTO_FCRYPT is not set | ||
1245 | # CONFIG_CRYPTO_KHAZAD is not set | ||
1246 | # CONFIG_CRYPTO_SALSA20 is not set | ||
1247 | # CONFIG_CRYPTO_SEED is not set | ||
1248 | # CONFIG_CRYPTO_SERPENT is not set | ||
1249 | # CONFIG_CRYPTO_TEA is not set | ||
1250 | # CONFIG_CRYPTO_TWOFISH is not set | ||
1251 | |||
1252 | # | ||
1253 | # Compression | ||
1254 | # | ||
1255 | CONFIG_CRYPTO_DEFLATE=y | ||
1256 | # CONFIG_CRYPTO_ZLIB is not set | ||
1257 | CONFIG_CRYPTO_LZO=y | ||
1258 | |||
1259 | # | ||
1260 | # Random Number Generation | ||
1261 | # | ||
1262 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | ||
1263 | # CONFIG_CRYPTO_HW is not set | ||
1264 | # CONFIG_BINARY_PRINTF is not set | ||
1265 | |||
1266 | # | ||
1267 | # Library routines | ||
1268 | # | ||
1269 | CONFIG_BITREVERSE=y | ||
1270 | CONFIG_RATIONAL=y | ||
1271 | CONFIG_GENERIC_FIND_LAST_BIT=y | ||
1272 | CONFIG_CRC_CCITT=m | ||
1273 | CONFIG_CRC16=y | ||
1274 | CONFIG_CRC_T10DIF=y | ||
1275 | CONFIG_CRC_ITU_T=m | ||
1276 | CONFIG_CRC32=y | ||
1277 | CONFIG_CRC7=m | ||
1278 | CONFIG_LIBCRC32C=m | ||
1279 | CONFIG_ZLIB_INFLATE=y | ||
1280 | CONFIG_ZLIB_DEFLATE=y | ||
1281 | CONFIG_LZO_COMPRESS=y | ||
1282 | CONFIG_LZO_DECOMPRESS=y | ||
1283 | CONFIG_HAS_IOMEM=y | ||
1284 | CONFIG_HAS_IOPORT=y | ||
1285 | CONFIG_HAS_DMA=y | ||
1286 | CONFIG_NLATTR=y | ||
diff --git a/arch/arm/mach-mx1/Makefile b/arch/arm/mach-mx1/Makefile index 7f86fe073ec6..fc2ddf82441b 100644 --- a/arch/arm/mach-mx1/Makefile +++ b/arch/arm/mach-mx1/Makefile | |||
@@ -4,11 +4,12 @@ | |||
4 | 4 | ||
5 | # Object file lists. | 5 | # Object file lists. |
6 | 6 | ||
7 | EXTRA_CFLAGS += -DIMX_NEEDS_DEPRECATED_SYMBOLS | ||
7 | obj-y += generic.o clock.o devices.o | 8 | obj-y += generic.o clock.o devices.o |
8 | 9 | ||
9 | # Support for CMOS sensor interface | 10 | # Support for CMOS sensor interface |
10 | obj-$(CONFIG_MX1_VIDEO) += ksym_mx1.o mx1_camera_fiq.o | 11 | obj-$(CONFIG_MX1_VIDEO) += ksym_mx1.o mx1_camera_fiq.o |
11 | 12 | ||
12 | # Specific board support | 13 | # Specific board support |
13 | obj-$(CONFIG_ARCH_MX1ADS) += mx1ads.o | 14 | obj-$(CONFIG_ARCH_MX1ADS) += mach-mx1ads.o |
14 | obj-$(CONFIG_MACH_SCB9328) += scb9328.o \ No newline at end of file | 15 | obj-$(CONFIG_MACH_SCB9328) += mach-scb9328.o |
diff --git a/arch/arm/mach-mx1/mx1ads.c b/arch/arm/mach-mx1/mach-mx1ads.c index 30f04e56fafe..51f3cfd83db2 100644 --- a/arch/arm/mach-mx1/mx1ads.c +++ b/arch/arm/mach-mx1/mach-mx1ads.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * arch/arm/mach-imx/mx1ads.c | 2 | * arch/arm/mach-imx/mach-mx1ads.c |
3 | * | 3 | * |
4 | * Initially based on: | 4 | * Initially based on: |
5 | * linux-2.6.7-imx/arch/arm/mach-imx/scb9328.c | 5 | * linux-2.6.7-imx/arch/arm/mach-imx/scb9328.c |
@@ -27,7 +27,7 @@ | |||
27 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
28 | #include <mach/i2c.h> | 28 | #include <mach/i2c.h> |
29 | #include <mach/imx-uart.h> | 29 | #include <mach/imx-uart.h> |
30 | #include <mach/iomux.h> | 30 | #include <mach/iomux-mx1.h> |
31 | #include <mach/irqs.h> | 31 | #include <mach/irqs.h> |
32 | 32 | ||
33 | #include "devices.h" | 33 | #include "devices.h" |
@@ -147,7 +147,7 @@ MACHINE_START(MX1ADS, "Freescale MX1ADS") | |||
147 | /* Maintainer: Sascha Hauer, Pengutronix */ | 147 | /* Maintainer: Sascha Hauer, Pengutronix */ |
148 | .phys_io = IMX_IO_PHYS, | 148 | .phys_io = IMX_IO_PHYS, |
149 | .io_pg_offst = (IMX_IO_BASE >> 18) & 0xfffc, | 149 | .io_pg_offst = (IMX_IO_BASE >> 18) & 0xfffc, |
150 | .boot_params = PHYS_OFFSET + 0x100, | 150 | .boot_params = MX1_PHYS_OFFSET + 0x100, |
151 | .map_io = mx1_map_io, | 151 | .map_io = mx1_map_io, |
152 | .init_irq = mx1_init_irq, | 152 | .init_irq = mx1_init_irq, |
153 | .timer = &mx1ads_timer, | 153 | .timer = &mx1ads_timer, |
@@ -157,7 +157,7 @@ MACHINE_END | |||
157 | MACHINE_START(MXLADS, "Freescale MXLADS") | 157 | MACHINE_START(MXLADS, "Freescale MXLADS") |
158 | .phys_io = IMX_IO_PHYS, | 158 | .phys_io = IMX_IO_PHYS, |
159 | .io_pg_offst = (IMX_IO_BASE >> 18) & 0xfffc, | 159 | .io_pg_offst = (IMX_IO_BASE >> 18) & 0xfffc, |
160 | .boot_params = PHYS_OFFSET + 0x100, | 160 | .boot_params = MX1_PHYS_OFFSET + 0x100, |
161 | .map_io = mx1_map_io, | 161 | .map_io = mx1_map_io, |
162 | .init_irq = mx1_init_irq, | 162 | .init_irq = mx1_init_irq, |
163 | .timer = &mx1ads_timer, | 163 | .timer = &mx1ads_timer, |
diff --git a/arch/arm/mach-mx1/scb9328.c b/arch/arm/mach-mx1/mach-scb9328.c index 325d98df6053..7587a7a12460 100644 --- a/arch/arm/mach-mx1/scb9328.c +++ b/arch/arm/mach-mx1/mach-scb9328.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/arm/mach-mx1/scb9328.c | 2 | * linux/arch/arm/mach-mx1/mach-scb9328.c |
3 | * | 3 | * |
4 | * Copyright (c) 2004 Sascha Hauer <saschahauer@web.de> | 4 | * Copyright (c) 2004 Sascha Hauer <saschahauer@web.de> |
5 | * Copyright (c) 2006-2008 Juergen Beisert <jbeisert@netscape.net> | 5 | * Copyright (c) 2006-2008 Juergen Beisert <jbeisert@netscape.net> |
@@ -23,7 +23,7 @@ | |||
23 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
24 | #include <mach/irqs.h> | 24 | #include <mach/irqs.h> |
25 | #include <mach/imx-uart.h> | 25 | #include <mach/imx-uart.h> |
26 | #include <mach/iomux.h> | 26 | #include <mach/iomux-mx1.h> |
27 | 27 | ||
28 | #include "devices.h" | 28 | #include "devices.h" |
29 | 29 | ||
diff --git a/arch/arm/mach-mx2/Kconfig b/arch/arm/mach-mx2/Kconfig index b96c6a389363..742fd4e6dcb9 100644 --- a/arch/arm/mach-mx2/Kconfig +++ b/arch/arm/mach-mx2/Kconfig | |||
@@ -37,6 +37,7 @@ config MACH_MX27ADS | |||
37 | config MACH_PCM038 | 37 | config MACH_PCM038 |
38 | bool "Phytec phyCORE-i.MX27 CPU module (pcm038)" | 38 | bool "Phytec phyCORE-i.MX27 CPU module (pcm038)" |
39 | depends on MACH_MX27 | 39 | depends on MACH_MX27 |
40 | select MXC_ULPI if USB_ULPI | ||
40 | help | 41 | help |
41 | Include support for phyCORE-i.MX27 (aka pcm038) platform. This | 42 | Include support for phyCORE-i.MX27 (aka pcm038) platform. This |
42 | includes specific configurations for the module and its peripherals. | 43 | includes specific configurations for the module and its peripherals. |
@@ -55,7 +56,7 @@ config MACH_PCM970_BASEBOARD | |||
55 | 56 | ||
56 | endchoice | 57 | endchoice |
57 | 58 | ||
58 | config MACH_EUKREA_CPUIMX27 | 59 | config MACH_CPUIMX27 |
59 | bool "Eukrea CPUIMX27 module" | 60 | bool "Eukrea CPUIMX27 module" |
60 | depends on MACH_MX27 | 61 | depends on MACH_MX27 |
61 | help | 62 | help |
@@ -64,14 +65,14 @@ config MACH_EUKREA_CPUIMX27 | |||
64 | 65 | ||
65 | config MACH_EUKREA_CPUIMX27_USESDHC2 | 66 | config MACH_EUKREA_CPUIMX27_USESDHC2 |
66 | bool "CPUIMX27 integrates SDHC2 module" | 67 | bool "CPUIMX27 integrates SDHC2 module" |
67 | depends on MACH_EUKREA_CPUIMX27 | 68 | depends on MACH_CPUIMX27 |
68 | help | 69 | help |
69 | This adds support for the internal SDHC2 used on CPUIMX27 used | 70 | This adds support for the internal SDHC2 used on CPUIMX27 used |
70 | for wifi or eMMC. | 71 | for wifi or eMMC. |
71 | 72 | ||
72 | choice | 73 | choice |
73 | prompt "Baseboard" | 74 | prompt "Baseboard" |
74 | depends on MACH_EUKREA_CPUIMX27 | 75 | depends on MACH_CPUIMX27 |
75 | default MACH_EUKREA_MBIMX27_BASEBOARD | 76 | default MACH_EUKREA_MBIMX27_BASEBOARD |
76 | 77 | ||
77 | config MACH_EUKREA_MBIMX27_BASEBOARD | 78 | config MACH_EUKREA_MBIMX27_BASEBOARD |
@@ -90,7 +91,7 @@ config MACH_MX27_3DS | |||
90 | Include support for MX27PDK platform. This includes specific | 91 | Include support for MX27PDK platform. This includes specific |
91 | configurations for the board and its peripherals. | 92 | configurations for the board and its peripherals. |
92 | 93 | ||
93 | config MACH_MX27LITE | 94 | config MACH_IMX27LITE |
94 | bool "LogicPD MX27 LITEKIT platform" | 95 | bool "LogicPD MX27 LITEKIT platform" |
95 | depends on MACH_MX27 | 96 | depends on MACH_MX27 |
96 | help | 97 | help |
@@ -100,6 +101,7 @@ config MACH_MX27LITE | |||
100 | config MACH_PCA100 | 101 | config MACH_PCA100 |
101 | bool "Phytec phyCARD-s (pca100)" | 102 | bool "Phytec phyCARD-s (pca100)" |
102 | depends on MACH_MX27 | 103 | depends on MACH_MX27 |
104 | select MXC_ULPI if USB_ULPI | ||
103 | help | 105 | help |
104 | Include support for phyCARD-s (aka pca100) platform. This | 106 | Include support for phyCARD-s (aka pca100) platform. This |
105 | includes specific configurations for the module and its peripherals. | 107 | includes specific configurations for the module and its peripherals. |
diff --git a/arch/arm/mach-mx2/Makefile b/arch/arm/mach-mx2/Makefile index 52aca0aaf9b5..e3254faac828 100644 --- a/arch/arm/mach-mx2/Makefile +++ b/arch/arm/mach-mx2/Makefile | |||
@@ -4,21 +4,20 @@ | |||
4 | 4 | ||
5 | # Object file lists. | 5 | # Object file lists. |
6 | 6 | ||
7 | obj-y := generic.o devices.o serial.o | 7 | obj-y := devices.o serial.o |
8 | 8 | ||
9 | obj-$(CONFIG_MACH_MX21) += clock_imx21.o | 9 | obj-$(CONFIG_MACH_MX21) += clock_imx21.o mm-imx21.o |
10 | 10 | ||
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 mm-imx27.o |
13 | 13 | ||
14 | obj-$(CONFIG_MACH_MX21ADS) += mx21ads.o | 14 | obj-$(CONFIG_MACH_MX21ADS) += mach-mx21ads.o |
15 | obj-$(CONFIG_MACH_MX27ADS) += mx27ads.o | 15 | obj-$(CONFIG_MACH_MX27ADS) += mach-mx27ads.o |
16 | obj-$(CONFIG_MACH_PCM038) += pcm038.o | 16 | obj-$(CONFIG_MACH_PCM038) += mach-pcm038.o |
17 | 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 | 18 | obj-$(CONFIG_MACH_MX27_3DS) += mach-mx27_3ds.o |
19 | obj-$(CONFIG_MACH_MX27LITE) += mx27lite.o | 19 | obj-$(CONFIG_MACH_IMX27LITE) += mach-imx27lite.o |
20 | obj-$(CONFIG_MACH_EUKREA_CPUIMX27) += eukrea_cpuimx27.o | 20 | obj-$(CONFIG_MACH_CPUIMX27) += mach-cpuimx27.o |
21 | obj-$(CONFIG_MACH_EUKREA_MBIMX27_BASEBOARD) += eukrea_mbimx27-baseboard.o | 21 | obj-$(CONFIG_MACH_EUKREA_MBIMX27_BASEBOARD) += eukrea_mbimx27-baseboard.o |
22 | obj-$(CONFIG_MACH_PCA100) += pca100.o | 22 | obj-$(CONFIG_MACH_PCA100) += mach-pca100.o |
23 | obj-$(CONFIG_MACH_MXT_TD60) += mxt_td60.o | 23 | obj-$(CONFIG_MACH_MXT_TD60) += mach-mxt_td60.o |
24 | |||
diff --git a/arch/arm/mach-mx2/clock_imx21.c b/arch/arm/mach-mx2/clock_imx21.c index 91901b5d56c2..8974faf9cef0 100644 --- a/arch/arm/mach-mx2/clock_imx21.c +++ b/arch/arm/mach-mx2/clock_imx21.c | |||
@@ -23,11 +23,242 @@ | |||
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | 24 | ||
25 | #include <mach/clock.h> | 25 | #include <mach/clock.h> |
26 | #include <mach/hardware.h> | ||
26 | #include <mach/common.h> | 27 | #include <mach/common.h> |
27 | #include <asm/clkdev.h> | 28 | #include <asm/clkdev.h> |
28 | #include <asm/div64.h> | 29 | #include <asm/div64.h> |
29 | 30 | ||
30 | #include "crm_regs.h" | 31 | #define IO_ADDR_CCM(off) (MX21_IO_ADDRESS(MX21_CCM_BASE_ADDR + (off))) |
32 | |||
33 | /* Register offsets */ | ||
34 | #define CCM_CSCR IO_ADDR_CCM(0x0) | ||
35 | #define CCM_MPCTL0 IO_ADDR_CCM(0x4) | ||
36 | #define CCM_MPCTL1 IO_ADDR_CCM(0x8) | ||
37 | #define CCM_SPCTL0 IO_ADDR_CCM(0xc) | ||
38 | #define CCM_SPCTL1 IO_ADDR_CCM(0x10) | ||
39 | #define CCM_OSC26MCTL IO_ADDR_CCM(0x14) | ||
40 | #define CCM_PCDR0 IO_ADDR_CCM(0x18) | ||
41 | #define CCM_PCDR1 IO_ADDR_CCM(0x1c) | ||
42 | #define CCM_PCCR0 IO_ADDR_CCM(0x20) | ||
43 | #define CCM_PCCR1 IO_ADDR_CCM(0x24) | ||
44 | #define CCM_CCSR IO_ADDR_CCM(0x28) | ||
45 | #define CCM_PMCTL IO_ADDR_CCM(0x2c) | ||
46 | #define CCM_PMCOUNT IO_ADDR_CCM(0x30) | ||
47 | #define CCM_WKGDCTL IO_ADDR_CCM(0x34) | ||
48 | |||
49 | #define CCM_CSCR_PRESC_OFFSET 29 | ||
50 | #define CCM_CSCR_PRESC_MASK (0x7 << CCM_CSCR_PRESC_OFFSET) | ||
51 | |||
52 | #define CCM_CSCR_USB_OFFSET 26 | ||
53 | #define CCM_CSCR_USB_MASK (0x7 << CCM_CSCR_USB_OFFSET) | ||
54 | #define CCM_CSCR_SD_OFFSET 24 | ||
55 | #define CCM_CSCR_SD_MASK (0x3 << CCM_CSCR_SD_OFFSET) | ||
56 | #define CCM_CSCR_SPLLRES (1 << 22) | ||
57 | #define CCM_CSCR_MPLLRES (1 << 21) | ||
58 | #define CCM_CSCR_SSI2_OFFSET 20 | ||
59 | #define CCM_CSCR_SSI2 (1 << CCM_CSCR_SSI2_OFFSET) | ||
60 | #define CCM_CSCR_SSI1_OFFSET 19 | ||
61 | #define CCM_CSCR_SSI1 (1 << CCM_CSCR_SSI1_OFFSET) | ||
62 | #define CCM_CSCR_FIR_OFFSET 18 | ||
63 | #define CCM_CSCR_FIR (1 << CCM_CSCR_FIR_OFFSET) | ||
64 | #define CCM_CSCR_SP (1 << 17) | ||
65 | #define CCM_CSCR_MCU (1 << 16) | ||
66 | #define CCM_CSCR_BCLK_OFFSET 10 | ||
67 | #define CCM_CSCR_BCLK_MASK (0xf << CCM_CSCR_BCLK_OFFSET) | ||
68 | #define CCM_CSCR_IPDIV_OFFSET 9 | ||
69 | #define CCM_CSCR_IPDIV (1 << CCM_CSCR_IPDIV_OFFSET) | ||
70 | |||
71 | #define CCM_CSCR_OSC26MDIV (1 << 4) | ||
72 | #define CCM_CSCR_OSC26M (1 << 3) | ||
73 | #define CCM_CSCR_FPM (1 << 2) | ||
74 | #define CCM_CSCR_SPEN (1 << 1) | ||
75 | #define CCM_CSCR_MPEN 1 | ||
76 | |||
77 | #define CCM_MPCTL0_CPLM (1 << 31) | ||
78 | #define CCM_MPCTL0_PD_OFFSET 26 | ||
79 | #define CCM_MPCTL0_PD_MASK (0xf << 26) | ||
80 | #define CCM_MPCTL0_MFD_OFFSET 16 | ||
81 | #define CCM_MPCTL0_MFD_MASK (0x3ff << 16) | ||
82 | #define CCM_MPCTL0_MFI_OFFSET 10 | ||
83 | #define CCM_MPCTL0_MFI_MASK (0xf << 10) | ||
84 | #define CCM_MPCTL0_MFN_OFFSET 0 | ||
85 | #define CCM_MPCTL0_MFN_MASK 0x3ff | ||
86 | |||
87 | #define CCM_MPCTL1_LF (1 << 15) | ||
88 | #define CCM_MPCTL1_BRMO (1 << 6) | ||
89 | |||
90 | #define CCM_SPCTL0_CPLM (1 << 31) | ||
91 | #define CCM_SPCTL0_PD_OFFSET 26 | ||
92 | #define CCM_SPCTL0_PD_MASK (0xf << 26) | ||
93 | #define CCM_SPCTL0_MFD_OFFSET 16 | ||
94 | #define CCM_SPCTL0_MFD_MASK (0x3ff << 16) | ||
95 | #define CCM_SPCTL0_MFI_OFFSET 10 | ||
96 | #define CCM_SPCTL0_MFI_MASK (0xf << 10) | ||
97 | #define CCM_SPCTL0_MFN_OFFSET 0 | ||
98 | #define CCM_SPCTL0_MFN_MASK 0x3ff | ||
99 | |||
100 | #define CCM_SPCTL1_LF (1 << 15) | ||
101 | #define CCM_SPCTL1_BRMO (1 << 6) | ||
102 | |||
103 | #define CCM_OSC26MCTL_PEAK_OFFSET 16 | ||
104 | #define CCM_OSC26MCTL_PEAK_MASK (0x3 << 16) | ||
105 | #define CCM_OSC26MCTL_AGC_OFFSET 8 | ||
106 | #define CCM_OSC26MCTL_AGC_MASK (0x3f << 8) | ||
107 | #define CCM_OSC26MCTL_ANATEST_OFFSET 0 | ||
108 | #define CCM_OSC26MCTL_ANATEST_MASK 0x3f | ||
109 | |||
110 | #define CCM_PCDR0_SSI2BAUDDIV_OFFSET 26 | ||
111 | #define CCM_PCDR0_SSI2BAUDDIV_MASK (0x3f << 26) | ||
112 | #define CCM_PCDR0_SSI1BAUDDIV_OFFSET 16 | ||
113 | #define CCM_PCDR0_SSI1BAUDDIV_MASK (0x3f << 16) | ||
114 | #define CCM_PCDR0_NFCDIV_OFFSET 12 | ||
115 | #define CCM_PCDR0_NFCDIV_MASK (0xf << 12) | ||
116 | #define CCM_PCDR0_48MDIV_OFFSET 5 | ||
117 | #define CCM_PCDR0_48MDIV_MASK (0x7 << CCM_PCDR0_48MDIV_OFFSET) | ||
118 | #define CCM_PCDR0_FIRIDIV_OFFSET 0 | ||
119 | #define CCM_PCDR0_FIRIDIV_MASK 0x1f | ||
120 | #define CCM_PCDR1_PERDIV4_OFFSET 24 | ||
121 | #define CCM_PCDR1_PERDIV4_MASK (0x3f << 24) | ||
122 | #define CCM_PCDR1_PERDIV3_OFFSET 16 | ||
123 | #define CCM_PCDR1_PERDIV3_MASK (0x3f << 16) | ||
124 | #define CCM_PCDR1_PERDIV2_OFFSET 8 | ||
125 | #define CCM_PCDR1_PERDIV2_MASK (0x3f << 8) | ||
126 | #define CCM_PCDR1_PERDIV1_OFFSET 0 | ||
127 | #define CCM_PCDR1_PERDIV1_MASK 0x3f | ||
128 | |||
129 | #define CCM_PCCR_HCLK_CSI_OFFSET 31 | ||
130 | #define CCM_PCCR_HCLK_CSI_REG CCM_PCCR0 | ||
131 | #define CCM_PCCR_HCLK_DMA_OFFSET 30 | ||
132 | #define CCM_PCCR_HCLK_DMA_REG CCM_PCCR0 | ||
133 | #define CCM_PCCR_HCLK_BROM_OFFSET 28 | ||
134 | #define CCM_PCCR_HCLK_BROM_REG CCM_PCCR0 | ||
135 | #define CCM_PCCR_HCLK_EMMA_OFFSET 27 | ||
136 | #define CCM_PCCR_HCLK_EMMA_REG CCM_PCCR0 | ||
137 | #define CCM_PCCR_HCLK_LCDC_OFFSET 26 | ||
138 | #define CCM_PCCR_HCLK_LCDC_REG CCM_PCCR0 | ||
139 | #define CCM_PCCR_HCLK_SLCDC_OFFSET 25 | ||
140 | #define CCM_PCCR_HCLK_SLCDC_REG CCM_PCCR0 | ||
141 | #define CCM_PCCR_HCLK_USBOTG_OFFSET 24 | ||
142 | #define CCM_PCCR_HCLK_USBOTG_REG CCM_PCCR0 | ||
143 | #define CCM_PCCR_HCLK_BMI_OFFSET 23 | ||
144 | #define CCM_PCCR_BMI_MASK (1 << CCM_PCCR_BMI_MASK) | ||
145 | #define CCM_PCCR_HCLK_BMI_REG CCM_PCCR0 | ||
146 | #define CCM_PCCR_PERCLK4_OFFSET 22 | ||
147 | #define CCM_PCCR_PERCLK4_REG CCM_PCCR0 | ||
148 | #define CCM_PCCR_SLCDC_OFFSET 21 | ||
149 | #define CCM_PCCR_SLCDC_REG CCM_PCCR0 | ||
150 | #define CCM_PCCR_FIRI_BAUD_OFFSET 20 | ||
151 | #define CCM_PCCR_FIRI_BAUD_MASK (1 << CCM_PCCR_FIRI_BAUD_MASK) | ||
152 | #define CCM_PCCR_FIRI_BAUD_REG CCM_PCCR0 | ||
153 | #define CCM_PCCR_NFC_OFFSET 19 | ||
154 | #define CCM_PCCR_NFC_REG CCM_PCCR0 | ||
155 | #define CCM_PCCR_LCDC_OFFSET 18 | ||
156 | #define CCM_PCCR_LCDC_REG CCM_PCCR0 | ||
157 | #define CCM_PCCR_SSI1_BAUD_OFFSET 17 | ||
158 | #define CCM_PCCR_SSI1_BAUD_REG CCM_PCCR0 | ||
159 | #define CCM_PCCR_SSI2_BAUD_OFFSET 16 | ||
160 | #define CCM_PCCR_SSI2_BAUD_REG CCM_PCCR0 | ||
161 | #define CCM_PCCR_EMMA_OFFSET 15 | ||
162 | #define CCM_PCCR_EMMA_REG CCM_PCCR0 | ||
163 | #define CCM_PCCR_USBOTG_OFFSET 14 | ||
164 | #define CCM_PCCR_USBOTG_REG CCM_PCCR0 | ||
165 | #define CCM_PCCR_DMA_OFFSET 13 | ||
166 | #define CCM_PCCR_DMA_REG CCM_PCCR0 | ||
167 | #define CCM_PCCR_I2C1_OFFSET 12 | ||
168 | #define CCM_PCCR_I2C1_REG CCM_PCCR0 | ||
169 | #define CCM_PCCR_GPIO_OFFSET 11 | ||
170 | #define CCM_PCCR_GPIO_REG CCM_PCCR0 | ||
171 | #define CCM_PCCR_SDHC2_OFFSET 10 | ||
172 | #define CCM_PCCR_SDHC2_REG CCM_PCCR0 | ||
173 | #define CCM_PCCR_SDHC1_OFFSET 9 | ||
174 | #define CCM_PCCR_SDHC1_REG CCM_PCCR0 | ||
175 | #define CCM_PCCR_FIRI_OFFSET 8 | ||
176 | #define CCM_PCCR_FIRI_MASK (1 << CCM_PCCR_BAUD_MASK) | ||
177 | #define CCM_PCCR_FIRI_REG CCM_PCCR0 | ||
178 | #define CCM_PCCR_SSI2_IPG_OFFSET 7 | ||
179 | #define CCM_PCCR_SSI2_REG CCM_PCCR0 | ||
180 | #define CCM_PCCR_SSI1_IPG_OFFSET 6 | ||
181 | #define CCM_PCCR_SSI1_REG CCM_PCCR0 | ||
182 | #define CCM_PCCR_CSPI2_OFFSET 5 | ||
183 | #define CCM_PCCR_CSPI2_REG CCM_PCCR0 | ||
184 | #define CCM_PCCR_CSPI1_OFFSET 4 | ||
185 | #define CCM_PCCR_CSPI1_REG CCM_PCCR0 | ||
186 | #define CCM_PCCR_UART4_OFFSET 3 | ||
187 | #define CCM_PCCR_UART4_REG CCM_PCCR0 | ||
188 | #define CCM_PCCR_UART3_OFFSET 2 | ||
189 | #define CCM_PCCR_UART3_REG CCM_PCCR0 | ||
190 | #define CCM_PCCR_UART2_OFFSET 1 | ||
191 | #define CCM_PCCR_UART2_REG CCM_PCCR0 | ||
192 | #define CCM_PCCR_UART1_OFFSET 0 | ||
193 | #define CCM_PCCR_UART1_REG CCM_PCCR0 | ||
194 | |||
195 | #define CCM_PCCR_OWIRE_OFFSET 31 | ||
196 | #define CCM_PCCR_OWIRE_REG CCM_PCCR1 | ||
197 | #define CCM_PCCR_KPP_OFFSET 30 | ||
198 | #define CCM_PCCR_KPP_REG CCM_PCCR1 | ||
199 | #define CCM_PCCR_RTC_OFFSET 29 | ||
200 | #define CCM_PCCR_RTC_REG CCM_PCCR1 | ||
201 | #define CCM_PCCR_PWM_OFFSET 28 | ||
202 | #define CCM_PCCR_PWM_REG CCM_PCCR1 | ||
203 | #define CCM_PCCR_GPT3_OFFSET 27 | ||
204 | #define CCM_PCCR_GPT3_REG CCM_PCCR1 | ||
205 | #define CCM_PCCR_GPT2_OFFSET 26 | ||
206 | #define CCM_PCCR_GPT2_REG CCM_PCCR1 | ||
207 | #define CCM_PCCR_GPT1_OFFSET 25 | ||
208 | #define CCM_PCCR_GPT1_REG CCM_PCCR1 | ||
209 | #define CCM_PCCR_WDT_OFFSET 24 | ||
210 | #define CCM_PCCR_WDT_REG CCM_PCCR1 | ||
211 | #define CCM_PCCR_CSPI3_OFFSET 23 | ||
212 | #define CCM_PCCR_CSPI3_REG CCM_PCCR1 | ||
213 | |||
214 | #define CCM_PCCR_CSPI1_MASK (1 << CCM_PCCR_CSPI1_OFFSET) | ||
215 | #define CCM_PCCR_CSPI2_MASK (1 << CCM_PCCR_CSPI2_OFFSET) | ||
216 | #define CCM_PCCR_CSPI3_MASK (1 << CCM_PCCR_CSPI3_OFFSET) | ||
217 | #define CCM_PCCR_DMA_MASK (1 << CCM_PCCR_DMA_OFFSET) | ||
218 | #define CCM_PCCR_EMMA_MASK (1 << CCM_PCCR_EMMA_OFFSET) | ||
219 | #define CCM_PCCR_GPIO_MASK (1 << CCM_PCCR_GPIO_OFFSET) | ||
220 | #define CCM_PCCR_GPT1_MASK (1 << CCM_PCCR_GPT1_OFFSET) | ||
221 | #define CCM_PCCR_GPT2_MASK (1 << CCM_PCCR_GPT2_OFFSET) | ||
222 | #define CCM_PCCR_GPT3_MASK (1 << CCM_PCCR_GPT3_OFFSET) | ||
223 | #define CCM_PCCR_HCLK_BROM_MASK (1 << CCM_PCCR_HCLK_BROM_OFFSET) | ||
224 | #define CCM_PCCR_HCLK_CSI_MASK (1 << CCM_PCCR_HCLK_CSI_OFFSET) | ||
225 | #define CCM_PCCR_HCLK_DMA_MASK (1 << CCM_PCCR_HCLK_DMA_OFFSET) | ||
226 | #define CCM_PCCR_HCLK_EMMA_MASK (1 << CCM_PCCR_HCLK_EMMA_OFFSET) | ||
227 | #define CCM_PCCR_HCLK_LCDC_MASK (1 << CCM_PCCR_HCLK_LCDC_OFFSET) | ||
228 | #define CCM_PCCR_HCLK_SLCDC_MASK (1 << CCM_PCCR_HCLK_SLCDC_OFFSET) | ||
229 | #define CCM_PCCR_HCLK_USBOTG_MASK (1 << CCM_PCCR_HCLK_USBOTG_OFFSET) | ||
230 | #define CCM_PCCR_I2C1_MASK (1 << CCM_PCCR_I2C1_OFFSET) | ||
231 | #define CCM_PCCR_KPP_MASK (1 << CCM_PCCR_KPP_OFFSET) | ||
232 | #define CCM_PCCR_LCDC_MASK (1 << CCM_PCCR_LCDC_OFFSET) | ||
233 | #define CCM_PCCR_NFC_MASK (1 << CCM_PCCR_NFC_OFFSET) | ||
234 | #define CCM_PCCR_OWIRE_MASK (1 << CCM_PCCR_OWIRE_OFFSET) | ||
235 | #define CCM_PCCR_PERCLK4_MASK (1 << CCM_PCCR_PERCLK4_OFFSET) | ||
236 | #define CCM_PCCR_PWM_MASK (1 << CCM_PCCR_PWM_OFFSET) | ||
237 | #define CCM_PCCR_RTC_MASK (1 << CCM_PCCR_RTC_OFFSET) | ||
238 | #define CCM_PCCR_SDHC1_MASK (1 << CCM_PCCR_SDHC1_OFFSET) | ||
239 | #define CCM_PCCR_SDHC2_MASK (1 << CCM_PCCR_SDHC2_OFFSET) | ||
240 | #define CCM_PCCR_SLCDC_MASK (1 << CCM_PCCR_SLCDC_OFFSET) | ||
241 | #define CCM_PCCR_SSI1_BAUD_MASK (1 << CCM_PCCR_SSI1_BAUD_OFFSET) | ||
242 | #define CCM_PCCR_SSI1_IPG_MASK (1 << CCM_PCCR_SSI1_IPG_OFFSET) | ||
243 | #define CCM_PCCR_SSI2_BAUD_MASK (1 << CCM_PCCR_SSI2_BAUD_OFFSET) | ||
244 | #define CCM_PCCR_SSI2_IPG_MASK (1 << CCM_PCCR_SSI2_IPG_OFFSET) | ||
245 | #define CCM_PCCR_UART1_MASK (1 << CCM_PCCR_UART1_OFFSET) | ||
246 | #define CCM_PCCR_UART2_MASK (1 << CCM_PCCR_UART2_OFFSET) | ||
247 | #define CCM_PCCR_UART3_MASK (1 << CCM_PCCR_UART3_OFFSET) | ||
248 | #define CCM_PCCR_UART4_MASK (1 << CCM_PCCR_UART4_OFFSET) | ||
249 | #define CCM_PCCR_USBOTG_MASK (1 << CCM_PCCR_USBOTG_OFFSET) | ||
250 | #define CCM_PCCR_WDT_MASK (1 << CCM_PCCR_WDT_OFFSET) | ||
251 | |||
252 | #define CCM_CCSR_32KSR (1 << 15) | ||
253 | |||
254 | #define CCM_CCSR_CLKMODE1 (1 << 9) | ||
255 | #define CCM_CCSR_CLKMODE0 (1 << 8) | ||
256 | |||
257 | #define CCM_CCSR_CLKOSEL_OFFSET 0 | ||
258 | #define CCM_CCSR_CLKOSEL_MASK 0x1f | ||
259 | |||
260 | #define SYS_FMCR 0x14 /* Functional Muxing Control Reg */ | ||
261 | #define SYS_CHIP_ID 0x00 /* The offset of CHIP ID register */ | ||
31 | 262 | ||
32 | static int _clk_enable(struct clk *clk) | 263 | static int _clk_enable(struct clk *clk) |
33 | { | 264 | { |
@@ -1004,6 +1235,7 @@ int __init mx21_clocks_init(unsigned long lref, unsigned long href) | |||
1004 | clk_enable(&uart_clk[0]); | 1235 | clk_enable(&uart_clk[0]); |
1005 | #endif | 1236 | #endif |
1006 | 1237 | ||
1007 | mxc_timer_init(&gpt_clk[0], IO_ADDRESS(GPT1_BASE_ADDR), MXC_INT_GPT1); | 1238 | mxc_timer_init(&gpt_clk[0], MX21_IO_ADDRESS(MX21_GPT1_BASE_ADDR), |
1239 | MX21_INT_GPT1); | ||
1008 | return 0; | 1240 | return 0; |
1009 | } | 1241 | } |
diff --git a/arch/arm/mach-mx2/clock_imx27.c b/arch/arm/mach-mx2/clock_imx27.c index b010bf9ceaab..68bf93e6e907 100644 --- a/arch/arm/mach-mx2/clock_imx27.c +++ b/arch/arm/mach-mx2/clock_imx27.c | |||
@@ -29,21 +29,23 @@ | |||
29 | #include <mach/common.h> | 29 | #include <mach/common.h> |
30 | #include <mach/hardware.h> | 30 | #include <mach/hardware.h> |
31 | 31 | ||
32 | #define IO_ADDR_CCM(off) (MX27_IO_ADDRESS(MX27_CCM_BASE_ADDR + (off))) | ||
33 | |||
32 | /* Register offsets */ | 34 | /* Register offsets */ |
33 | #define CCM_CSCR (IO_ADDRESS(CCM_BASE_ADDR) + 0x0) | 35 | #define CCM_CSCR IO_ADDR_CCM(0x0) |
34 | #define CCM_MPCTL0 (IO_ADDRESS(CCM_BASE_ADDR) + 0x4) | 36 | #define CCM_MPCTL0 IO_ADDR_CCM(0x4) |
35 | #define CCM_MPCTL1 (IO_ADDRESS(CCM_BASE_ADDR) + 0x8) | 37 | #define CCM_MPCTL1 IO_ADDR_CCM(0x8) |
36 | #define CCM_SPCTL0 (IO_ADDRESS(CCM_BASE_ADDR) + 0xC) | 38 | #define CCM_SPCTL0 IO_ADDR_CCM(0xc) |
37 | #define CCM_SPCTL1 (IO_ADDRESS(CCM_BASE_ADDR) + 0x10) | 39 | #define CCM_SPCTL1 IO_ADDR_CCM(0x10) |
38 | #define CCM_OSC26MCTL (IO_ADDRESS(CCM_BASE_ADDR) + 0x14) | 40 | #define CCM_OSC26MCTL IO_ADDR_CCM(0x14) |
39 | #define CCM_PCDR0 (IO_ADDRESS(CCM_BASE_ADDR) + 0x18) | 41 | #define CCM_PCDR0 IO_ADDR_CCM(0x18) |
40 | #define CCM_PCDR1 (IO_ADDRESS(CCM_BASE_ADDR) + 0x1c) | 42 | #define CCM_PCDR1 IO_ADDR_CCM(0x1c) |
41 | #define CCM_PCCR0 (IO_ADDRESS(CCM_BASE_ADDR) + 0x20) | 43 | #define CCM_PCCR0 IO_ADDR_CCM(0x20) |
42 | #define CCM_PCCR1 (IO_ADDRESS(CCM_BASE_ADDR) + 0x24) | 44 | #define CCM_PCCR1 IO_ADDR_CCM(0x24) |
43 | #define CCM_CCSR (IO_ADDRESS(CCM_BASE_ADDR) + 0x28) | 45 | #define CCM_CCSR IO_ADDR_CCM(0x28) |
44 | #define CCM_PMCTL (IO_ADDRESS(CCM_BASE_ADDR) + 0x2c) | 46 | #define CCM_PMCTL IO_ADDR_CCM(0x2c) |
45 | #define CCM_PMCOUNT (IO_ADDRESS(CCM_BASE_ADDR) + 0x30) | 47 | #define CCM_PMCOUNT IO_ADDR_CCM(0x30) |
46 | #define CCM_WKGDCTL (IO_ADDRESS(CCM_BASE_ADDR) + 0x34) | 48 | #define CCM_WKGDCTL IO_ADDR_CCM(0x34) |
47 | 49 | ||
48 | #define CCM_CSCR_UPDATE_DIS (1 << 31) | 50 | #define CCM_CSCR_UPDATE_DIS (1 << 31) |
49 | #define CCM_CSCR_SSI2 (1 << 23) | 51 | #define CCM_CSCR_SSI2 (1 << 23) |
@@ -755,7 +757,8 @@ int __init mx27_clocks_init(unsigned long fref) | |||
755 | clk_enable(&uart1_clk); | 757 | clk_enable(&uart1_clk); |
756 | #endif | 758 | #endif |
757 | 759 | ||
758 | mxc_timer_init(&gpt1_clk, IO_ADDRESS(GPT1_BASE_ADDR), MXC_INT_GPT1); | 760 | mxc_timer_init(&gpt1_clk, MX27_IO_ADDRESS(MX27_GPT1_BASE_ADDR), |
761 | MX27_INT_GPT1); | ||
759 | 762 | ||
760 | return 0; | 763 | return 0; |
761 | } | 764 | } |
diff --git a/arch/arm/mach-mx2/cpu_imx27.c b/arch/arm/mach-mx2/cpu_imx27.c index d9e3bf9644c9..d8d3b2d84dc5 100644 --- a/arch/arm/mach-mx2/cpu_imx27.c +++ b/arch/arm/mach-mx2/cpu_imx27.c | |||
@@ -39,7 +39,8 @@ static void query_silicon_parameter(void) | |||
39 | * the silicon revision very early we read it here to | 39 | * the silicon revision very early we read it here to |
40 | * avoid any further hooks | 40 | * avoid any further hooks |
41 | */ | 41 | */ |
42 | val = __raw_readl(IO_ADDRESS(SYSCTRL_BASE_ADDR) + SYS_CHIP_ID); | 42 | val = __raw_readl(MX27_IO_ADDRESS(MX27_SYSCTRL_BASE_ADDR |
43 | + SYS_CHIP_ID)); | ||
43 | 44 | ||
44 | cpu_silicon_rev = (int)(val >> 28); | 45 | cpu_silicon_rev = (int)(val >> 28); |
45 | cpu_partnumber = (int)((val >> 12) & 0xFFFF); | 46 | cpu_partnumber = (int)((val >> 12) & 0xFFFF); |
diff --git a/arch/arm/mach-mx2/crm_regs.h b/arch/arm/mach-mx2/crm_regs.h deleted file mode 100644 index 749de76b3f95..000000000000 --- a/arch/arm/mach-mx2/crm_regs.h +++ /dev/null | |||
@@ -1,258 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * Copyright 2008 Juergen Beisert, kernel@pengutronix.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 __ARCH_ARM_MACH_MX2_CRM_REGS_H__ | ||
21 | #define __ARCH_ARM_MACH_MX2_CRM_REGS_H__ | ||
22 | |||
23 | #include <mach/hardware.h> | ||
24 | |||
25 | /* Register offsets */ | ||
26 | #define CCM_CSCR (IO_ADDRESS(CCM_BASE_ADDR) + 0x0) | ||
27 | #define CCM_MPCTL0 (IO_ADDRESS(CCM_BASE_ADDR) + 0x4) | ||
28 | #define CCM_MPCTL1 (IO_ADDRESS(CCM_BASE_ADDR) + 0x8) | ||
29 | #define CCM_SPCTL0 (IO_ADDRESS(CCM_BASE_ADDR) + 0xC) | ||
30 | #define CCM_SPCTL1 (IO_ADDRESS(CCM_BASE_ADDR) + 0x10) | ||
31 | #define CCM_OSC26MCTL (IO_ADDRESS(CCM_BASE_ADDR) + 0x14) | ||
32 | #define CCM_PCDR0 (IO_ADDRESS(CCM_BASE_ADDR) + 0x18) | ||
33 | #define CCM_PCDR1 (IO_ADDRESS(CCM_BASE_ADDR) + 0x1c) | ||
34 | #define CCM_PCCR0 (IO_ADDRESS(CCM_BASE_ADDR) + 0x20) | ||
35 | #define CCM_PCCR1 (IO_ADDRESS(CCM_BASE_ADDR) + 0x24) | ||
36 | #define CCM_CCSR (IO_ADDRESS(CCM_BASE_ADDR) + 0x28) | ||
37 | #define CCM_PMCTL (IO_ADDRESS(CCM_BASE_ADDR) + 0x2c) | ||
38 | #define CCM_PMCOUNT (IO_ADDRESS(CCM_BASE_ADDR) + 0x30) | ||
39 | #define CCM_WKGDCTL (IO_ADDRESS(CCM_BASE_ADDR) + 0x34) | ||
40 | |||
41 | #define CCM_CSCR_PRESC_OFFSET 29 | ||
42 | #define CCM_CSCR_PRESC_MASK (0x7 << CCM_CSCR_PRESC_OFFSET) | ||
43 | |||
44 | #define CCM_CSCR_USB_OFFSET 26 | ||
45 | #define CCM_CSCR_USB_MASK (0x7 << CCM_CSCR_USB_OFFSET) | ||
46 | #define CCM_CSCR_SD_OFFSET 24 | ||
47 | #define CCM_CSCR_SD_MASK (0x3 << CCM_CSCR_SD_OFFSET) | ||
48 | #define CCM_CSCR_SPLLRES (1 << 22) | ||
49 | #define CCM_CSCR_MPLLRES (1 << 21) | ||
50 | #define CCM_CSCR_SSI2_OFFSET 20 | ||
51 | #define CCM_CSCR_SSI2 (1 << CCM_CSCR_SSI2_OFFSET) | ||
52 | #define CCM_CSCR_SSI1_OFFSET 19 | ||
53 | #define CCM_CSCR_SSI1 (1 << CCM_CSCR_SSI1_OFFSET) | ||
54 | #define CCM_CSCR_FIR_OFFSET 18 | ||
55 | #define CCM_CSCR_FIR (1 << CCM_CSCR_FIR_OFFSET) | ||
56 | #define CCM_CSCR_SP (1 << 17) | ||
57 | #define CCM_CSCR_MCU (1 << 16) | ||
58 | #define CCM_CSCR_BCLK_OFFSET 10 | ||
59 | #define CCM_CSCR_BCLK_MASK (0xf << CCM_CSCR_BCLK_OFFSET) | ||
60 | #define CCM_CSCR_IPDIV_OFFSET 9 | ||
61 | #define CCM_CSCR_IPDIV (1 << CCM_CSCR_IPDIV_OFFSET) | ||
62 | |||
63 | #define CCM_CSCR_OSC26MDIV (1 << 4) | ||
64 | #define CCM_CSCR_OSC26M (1 << 3) | ||
65 | #define CCM_CSCR_FPM (1 << 2) | ||
66 | #define CCM_CSCR_SPEN (1 << 1) | ||
67 | #define CCM_CSCR_MPEN 1 | ||
68 | |||
69 | |||
70 | |||
71 | #define CCM_MPCTL0_CPLM (1 << 31) | ||
72 | #define CCM_MPCTL0_PD_OFFSET 26 | ||
73 | #define CCM_MPCTL0_PD_MASK (0xf << 26) | ||
74 | #define CCM_MPCTL0_MFD_OFFSET 16 | ||
75 | #define CCM_MPCTL0_MFD_MASK (0x3ff << 16) | ||
76 | #define CCM_MPCTL0_MFI_OFFSET 10 | ||
77 | #define CCM_MPCTL0_MFI_MASK (0xf << 10) | ||
78 | #define CCM_MPCTL0_MFN_OFFSET 0 | ||
79 | #define CCM_MPCTL0_MFN_MASK 0x3ff | ||
80 | |||
81 | #define CCM_MPCTL1_LF (1 << 15) | ||
82 | #define CCM_MPCTL1_BRMO (1 << 6) | ||
83 | |||
84 | #define CCM_SPCTL0_CPLM (1 << 31) | ||
85 | #define CCM_SPCTL0_PD_OFFSET 26 | ||
86 | #define CCM_SPCTL0_PD_MASK (0xf << 26) | ||
87 | #define CCM_SPCTL0_MFD_OFFSET 16 | ||
88 | #define CCM_SPCTL0_MFD_MASK (0x3ff << 16) | ||
89 | #define CCM_SPCTL0_MFI_OFFSET 10 | ||
90 | #define CCM_SPCTL0_MFI_MASK (0xf << 10) | ||
91 | #define CCM_SPCTL0_MFN_OFFSET 0 | ||
92 | #define CCM_SPCTL0_MFN_MASK 0x3ff | ||
93 | |||
94 | #define CCM_SPCTL1_LF (1 << 15) | ||
95 | #define CCM_SPCTL1_BRMO (1 << 6) | ||
96 | |||
97 | #define CCM_OSC26MCTL_PEAK_OFFSET 16 | ||
98 | #define CCM_OSC26MCTL_PEAK_MASK (0x3 << 16) | ||
99 | #define CCM_OSC26MCTL_AGC_OFFSET 8 | ||
100 | #define CCM_OSC26MCTL_AGC_MASK (0x3f << 8) | ||
101 | #define CCM_OSC26MCTL_ANATEST_OFFSET 0 | ||
102 | #define CCM_OSC26MCTL_ANATEST_MASK 0x3f | ||
103 | |||
104 | #define CCM_PCDR0_SSI2BAUDDIV_OFFSET 26 | ||
105 | #define CCM_PCDR0_SSI2BAUDDIV_MASK (0x3f << 26) | ||
106 | #define CCM_PCDR0_SSI1BAUDDIV_OFFSET 16 | ||
107 | #define CCM_PCDR0_SSI1BAUDDIV_MASK (0x3f << 16) | ||
108 | #define CCM_PCDR0_NFCDIV_OFFSET 12 | ||
109 | #define CCM_PCDR0_NFCDIV_MASK (0xf << 12) | ||
110 | #define CCM_PCDR0_48MDIV_OFFSET 5 | ||
111 | #define CCM_PCDR0_48MDIV_MASK (0x7 << CCM_PCDR0_48MDIV_OFFSET) | ||
112 | #define CCM_PCDR0_FIRIDIV_OFFSET 0 | ||
113 | #define CCM_PCDR0_FIRIDIV_MASK 0x1f | ||
114 | #define CCM_PCDR1_PERDIV4_OFFSET 24 | ||
115 | #define CCM_PCDR1_PERDIV4_MASK (0x3f << 24) | ||
116 | #define CCM_PCDR1_PERDIV3_OFFSET 16 | ||
117 | #define CCM_PCDR1_PERDIV3_MASK (0x3f << 16) | ||
118 | #define CCM_PCDR1_PERDIV2_OFFSET 8 | ||
119 | #define CCM_PCDR1_PERDIV2_MASK (0x3f << 8) | ||
120 | #define CCM_PCDR1_PERDIV1_OFFSET 0 | ||
121 | #define CCM_PCDR1_PERDIV1_MASK 0x3f | ||
122 | |||
123 | #define CCM_PCCR_HCLK_CSI_OFFSET 31 | ||
124 | #define CCM_PCCR_HCLK_CSI_REG CCM_PCCR0 | ||
125 | #define CCM_PCCR_HCLK_DMA_OFFSET 30 | ||
126 | #define CCM_PCCR_HCLK_DMA_REG CCM_PCCR0 | ||
127 | #define CCM_PCCR_HCLK_BROM_OFFSET 28 | ||
128 | #define CCM_PCCR_HCLK_BROM_REG CCM_PCCR0 | ||
129 | #define CCM_PCCR_HCLK_EMMA_OFFSET 27 | ||
130 | #define CCM_PCCR_HCLK_EMMA_REG CCM_PCCR0 | ||
131 | #define CCM_PCCR_HCLK_LCDC_OFFSET 26 | ||
132 | #define CCM_PCCR_HCLK_LCDC_REG CCM_PCCR0 | ||
133 | #define CCM_PCCR_HCLK_SLCDC_OFFSET 25 | ||
134 | #define CCM_PCCR_HCLK_SLCDC_REG CCM_PCCR0 | ||
135 | #define CCM_PCCR_HCLK_USBOTG_OFFSET 24 | ||
136 | #define CCM_PCCR_HCLK_USBOTG_REG CCM_PCCR0 | ||
137 | #define CCM_PCCR_HCLK_BMI_OFFSET 23 | ||
138 | #define CCM_PCCR_BMI_MASK (1 << CCM_PCCR_BMI_MASK) | ||
139 | #define CCM_PCCR_HCLK_BMI_REG CCM_PCCR0 | ||
140 | #define CCM_PCCR_PERCLK4_OFFSET 22 | ||
141 | #define CCM_PCCR_PERCLK4_REG CCM_PCCR0 | ||
142 | #define CCM_PCCR_SLCDC_OFFSET 21 | ||
143 | #define CCM_PCCR_SLCDC_REG CCM_PCCR0 | ||
144 | #define CCM_PCCR_FIRI_BAUD_OFFSET 20 | ||
145 | #define CCM_PCCR_FIRI_BAUD_MASK (1 << CCM_PCCR_FIRI_BAUD_MASK) | ||
146 | #define CCM_PCCR_FIRI_BAUD_REG CCM_PCCR0 | ||
147 | #define CCM_PCCR_NFC_OFFSET 19 | ||
148 | #define CCM_PCCR_NFC_REG CCM_PCCR0 | ||
149 | #define CCM_PCCR_LCDC_OFFSET 18 | ||
150 | #define CCM_PCCR_LCDC_REG CCM_PCCR0 | ||
151 | #define CCM_PCCR_SSI1_BAUD_OFFSET 17 | ||
152 | #define CCM_PCCR_SSI1_BAUD_REG CCM_PCCR0 | ||
153 | #define CCM_PCCR_SSI2_BAUD_OFFSET 16 | ||
154 | #define CCM_PCCR_SSI2_BAUD_REG CCM_PCCR0 | ||
155 | #define CCM_PCCR_EMMA_OFFSET 15 | ||
156 | #define CCM_PCCR_EMMA_REG CCM_PCCR0 | ||
157 | #define CCM_PCCR_USBOTG_OFFSET 14 | ||
158 | #define CCM_PCCR_USBOTG_REG CCM_PCCR0 | ||
159 | #define CCM_PCCR_DMA_OFFSET 13 | ||
160 | #define CCM_PCCR_DMA_REG CCM_PCCR0 | ||
161 | #define CCM_PCCR_I2C1_OFFSET 12 | ||
162 | #define CCM_PCCR_I2C1_REG CCM_PCCR0 | ||
163 | #define CCM_PCCR_GPIO_OFFSET 11 | ||
164 | #define CCM_PCCR_GPIO_REG CCM_PCCR0 | ||
165 | #define CCM_PCCR_SDHC2_OFFSET 10 | ||
166 | #define CCM_PCCR_SDHC2_REG CCM_PCCR0 | ||
167 | #define CCM_PCCR_SDHC1_OFFSET 9 | ||
168 | #define CCM_PCCR_SDHC1_REG CCM_PCCR0 | ||
169 | #define CCM_PCCR_FIRI_OFFSET 8 | ||
170 | #define CCM_PCCR_FIRI_MASK (1 << CCM_PCCR_BAUD_MASK) | ||
171 | #define CCM_PCCR_FIRI_REG CCM_PCCR0 | ||
172 | #define CCM_PCCR_SSI2_IPG_OFFSET 7 | ||
173 | #define CCM_PCCR_SSI2_REG CCM_PCCR0 | ||
174 | #define CCM_PCCR_SSI1_IPG_OFFSET 6 | ||
175 | #define CCM_PCCR_SSI1_REG CCM_PCCR0 | ||
176 | #define CCM_PCCR_CSPI2_OFFSET 5 | ||
177 | #define CCM_PCCR_CSPI2_REG CCM_PCCR0 | ||
178 | #define CCM_PCCR_CSPI1_OFFSET 4 | ||
179 | #define CCM_PCCR_CSPI1_REG CCM_PCCR0 | ||
180 | #define CCM_PCCR_UART4_OFFSET 3 | ||
181 | #define CCM_PCCR_UART4_REG CCM_PCCR0 | ||
182 | #define CCM_PCCR_UART3_OFFSET 2 | ||
183 | #define CCM_PCCR_UART3_REG CCM_PCCR0 | ||
184 | #define CCM_PCCR_UART2_OFFSET 1 | ||
185 | #define CCM_PCCR_UART2_REG CCM_PCCR0 | ||
186 | #define CCM_PCCR_UART1_OFFSET 0 | ||
187 | #define CCM_PCCR_UART1_REG CCM_PCCR0 | ||
188 | |||
189 | #define CCM_PCCR_OWIRE_OFFSET 31 | ||
190 | #define CCM_PCCR_OWIRE_REG CCM_PCCR1 | ||
191 | #define CCM_PCCR_KPP_OFFSET 30 | ||
192 | #define CCM_PCCR_KPP_REG CCM_PCCR1 | ||
193 | #define CCM_PCCR_RTC_OFFSET 29 | ||
194 | #define CCM_PCCR_RTC_REG CCM_PCCR1 | ||
195 | #define CCM_PCCR_PWM_OFFSET 28 | ||
196 | #define CCM_PCCR_PWM_REG CCM_PCCR1 | ||
197 | #define CCM_PCCR_GPT3_OFFSET 27 | ||
198 | #define CCM_PCCR_GPT3_REG CCM_PCCR1 | ||
199 | #define CCM_PCCR_GPT2_OFFSET 26 | ||
200 | #define CCM_PCCR_GPT2_REG CCM_PCCR1 | ||
201 | #define CCM_PCCR_GPT1_OFFSET 25 | ||
202 | #define CCM_PCCR_GPT1_REG CCM_PCCR1 | ||
203 | #define CCM_PCCR_WDT_OFFSET 24 | ||
204 | #define CCM_PCCR_WDT_REG CCM_PCCR1 | ||
205 | #define CCM_PCCR_CSPI3_OFFSET 23 | ||
206 | #define CCM_PCCR_CSPI3_REG CCM_PCCR1 | ||
207 | |||
208 | #define CCM_PCCR_CSPI1_MASK (1 << CCM_PCCR_CSPI1_OFFSET) | ||
209 | #define CCM_PCCR_CSPI2_MASK (1 << CCM_PCCR_CSPI2_OFFSET) | ||
210 | #define CCM_PCCR_CSPI3_MASK (1 << CCM_PCCR_CSPI3_OFFSET) | ||
211 | #define CCM_PCCR_DMA_MASK (1 << CCM_PCCR_DMA_OFFSET) | ||
212 | #define CCM_PCCR_EMMA_MASK (1 << CCM_PCCR_EMMA_OFFSET) | ||
213 | #define CCM_PCCR_GPIO_MASK (1 << CCM_PCCR_GPIO_OFFSET) | ||
214 | #define CCM_PCCR_GPT1_MASK (1 << CCM_PCCR_GPT1_OFFSET) | ||
215 | #define CCM_PCCR_GPT2_MASK (1 << CCM_PCCR_GPT2_OFFSET) | ||
216 | #define CCM_PCCR_GPT3_MASK (1 << CCM_PCCR_GPT3_OFFSET) | ||
217 | #define CCM_PCCR_HCLK_BROM_MASK (1 << CCM_PCCR_HCLK_BROM_OFFSET) | ||
218 | #define CCM_PCCR_HCLK_CSI_MASK (1 << CCM_PCCR_HCLK_CSI_OFFSET) | ||
219 | #define CCM_PCCR_HCLK_DMA_MASK (1 << CCM_PCCR_HCLK_DMA_OFFSET) | ||
220 | #define CCM_PCCR_HCLK_EMMA_MASK (1 << CCM_PCCR_HCLK_EMMA_OFFSET) | ||
221 | #define CCM_PCCR_HCLK_LCDC_MASK (1 << CCM_PCCR_HCLK_LCDC_OFFSET) | ||
222 | #define CCM_PCCR_HCLK_SLCDC_MASK (1 << CCM_PCCR_HCLK_SLCDC_OFFSET) | ||
223 | #define CCM_PCCR_HCLK_USBOTG_MASK (1 << CCM_PCCR_HCLK_USBOTG_OFFSET) | ||
224 | #define CCM_PCCR_I2C1_MASK (1 << CCM_PCCR_I2C1_OFFSET) | ||
225 | #define CCM_PCCR_KPP_MASK (1 << CCM_PCCR_KPP_OFFSET) | ||
226 | #define CCM_PCCR_LCDC_MASK (1 << CCM_PCCR_LCDC_OFFSET) | ||
227 | #define CCM_PCCR_NFC_MASK (1 << CCM_PCCR_NFC_OFFSET) | ||
228 | #define CCM_PCCR_OWIRE_MASK (1 << CCM_PCCR_OWIRE_OFFSET) | ||
229 | #define CCM_PCCR_PERCLK4_MASK (1 << CCM_PCCR_PERCLK4_OFFSET) | ||
230 | #define CCM_PCCR_PWM_MASK (1 << CCM_PCCR_PWM_OFFSET) | ||
231 | #define CCM_PCCR_RTC_MASK (1 << CCM_PCCR_RTC_OFFSET) | ||
232 | #define CCM_PCCR_SDHC1_MASK (1 << CCM_PCCR_SDHC1_OFFSET) | ||
233 | #define CCM_PCCR_SDHC2_MASK (1 << CCM_PCCR_SDHC2_OFFSET) | ||
234 | #define CCM_PCCR_SLCDC_MASK (1 << CCM_PCCR_SLCDC_OFFSET) | ||
235 | #define CCM_PCCR_SSI1_BAUD_MASK (1 << CCM_PCCR_SSI1_BAUD_OFFSET) | ||
236 | #define CCM_PCCR_SSI1_IPG_MASK (1 << CCM_PCCR_SSI1_IPG_OFFSET) | ||
237 | #define CCM_PCCR_SSI2_BAUD_MASK (1 << CCM_PCCR_SSI2_BAUD_OFFSET) | ||
238 | #define CCM_PCCR_SSI2_IPG_MASK (1 << CCM_PCCR_SSI2_IPG_OFFSET) | ||
239 | #define CCM_PCCR_UART1_MASK (1 << CCM_PCCR_UART1_OFFSET) | ||
240 | #define CCM_PCCR_UART2_MASK (1 << CCM_PCCR_UART2_OFFSET) | ||
241 | #define CCM_PCCR_UART3_MASK (1 << CCM_PCCR_UART3_OFFSET) | ||
242 | #define CCM_PCCR_UART4_MASK (1 << CCM_PCCR_UART4_OFFSET) | ||
243 | #define CCM_PCCR_USBOTG_MASK (1 << CCM_PCCR_USBOTG_OFFSET) | ||
244 | #define CCM_PCCR_WDT_MASK (1 << CCM_PCCR_WDT_OFFSET) | ||
245 | |||
246 | |||
247 | #define CCM_CCSR_32KSR (1 << 15) | ||
248 | |||
249 | #define CCM_CCSR_CLKMODE1 (1 << 9) | ||
250 | #define CCM_CCSR_CLKMODE0 (1 << 8) | ||
251 | |||
252 | #define CCM_CCSR_CLKOSEL_OFFSET 0 | ||
253 | #define CCM_CCSR_CLKOSEL_MASK 0x1f | ||
254 | |||
255 | #define SYS_FMCR 0x14 /* Functional Muxing Control Reg */ | ||
256 | #define SYS_CHIP_ID 0x00 /* The offset of CHIP ID register */ | ||
257 | |||
258 | #endif /* __ARCH_ARM_MACH_MX2_CRM_REGS_H__ */ | ||
diff --git a/arch/arm/mach-mx2/devices.c b/arch/arm/mach-mx2/devices.c index 3d398ce09b31..a4b809b82fa3 100644 --- a/arch/arm/mach-mx2/devices.c +++ b/arch/arm/mach-mx2/devices.c | |||
@@ -46,65 +46,31 @@ | |||
46 | * - i.MX21: 2 channel | 46 | * - i.MX21: 2 channel |
47 | * - i.MX27: 3 channel | 47 | * - i.MX27: 3 channel |
48 | */ | 48 | */ |
49 | static struct resource mxc_spi_resources0[] = { | 49 | #define DEFINE_IMX_SPI_DEVICE(n, baseaddr, irq) \ |
50 | { | 50 | static struct resource mxc_spi_resources ## n[] = { \ |
51 | .start = CSPI1_BASE_ADDR, | 51 | { \ |
52 | .end = CSPI1_BASE_ADDR + SZ_4K - 1, | 52 | .start = baseaddr, \ |
53 | .flags = IORESOURCE_MEM, | 53 | .end = baseaddr + SZ_4K - 1, \ |
54 | }, { | 54 | .flags = IORESOURCE_MEM, \ |
55 | .start = MXC_INT_CSPI1, | 55 | }, { \ |
56 | .end = MXC_INT_CSPI1, | 56 | .start = irq, \ |
57 | .flags = IORESOURCE_IRQ, | 57 | .end = irq, \ |
58 | }, | 58 | .flags = IORESOURCE_IRQ, \ |
59 | }; | 59 | }, \ |
60 | 60 | }; \ | |
61 | static struct resource mxc_spi_resources1[] = { | 61 | \ |
62 | { | 62 | struct platform_device mxc_spi_device ## n = { \ |
63 | .start = CSPI2_BASE_ADDR, | 63 | .name = "spi_imx", \ |
64 | .end = CSPI2_BASE_ADDR + SZ_4K - 1, | 64 | .id = n, \ |
65 | .flags = IORESOURCE_MEM, | 65 | .num_resources = ARRAY_SIZE(mxc_spi_resources ## n), \ |
66 | }, { | 66 | .resource = mxc_spi_resources ## n, \ |
67 | .start = MXC_INT_CSPI2, | 67 | } |
68 | .end = MXC_INT_CSPI2, | ||
69 | .flags = IORESOURCE_IRQ, | ||
70 | }, | ||
71 | }; | ||
72 | |||
73 | #ifdef CONFIG_MACH_MX27 | ||
74 | static struct resource mxc_spi_resources2[] = { | ||
75 | { | ||
76 | .start = CSPI3_BASE_ADDR, | ||
77 | .end = CSPI3_BASE_ADDR + SZ_4K - 1, | ||
78 | .flags = IORESOURCE_MEM, | ||
79 | }, { | ||
80 | .start = MXC_INT_CSPI3, | ||
81 | .end = MXC_INT_CSPI3, | ||
82 | .flags = IORESOURCE_IRQ, | ||
83 | }, | ||
84 | }; | ||
85 | #endif | ||
86 | |||
87 | struct platform_device mxc_spi_device0 = { | ||
88 | .name = "spi_imx", | ||
89 | .id = 0, | ||
90 | .num_resources = ARRAY_SIZE(mxc_spi_resources0), | ||
91 | .resource = mxc_spi_resources0, | ||
92 | }; | ||
93 | 68 | ||
94 | struct platform_device mxc_spi_device1 = { | 69 | DEFINE_IMX_SPI_DEVICE(0, MX2x_CSPI1_BASE_ADDR, MX2x_INT_CSPI1); |
95 | .name = "spi_imx", | 70 | DEFINE_IMX_SPI_DEVICE(1, MX2x_CSPI2_BASE_ADDR, MX2x_INT_CSPI2); |
96 | .id = 1, | ||
97 | .num_resources = ARRAY_SIZE(mxc_spi_resources1), | ||
98 | .resource = mxc_spi_resources1, | ||
99 | }; | ||
100 | 71 | ||
101 | #ifdef CONFIG_MACH_MX27 | 72 | #ifdef CONFIG_MACH_MX27 |
102 | struct platform_device mxc_spi_device2 = { | 73 | DEFINE_IMX_SPI_DEVICE(2, MX27_CSPI3_BASE_ADDR, MX27_INT_CSPI3); |
103 | .name = "spi_imx", | ||
104 | .id = 2, | ||
105 | .num_resources = ARRAY_SIZE(mxc_spi_resources2), | ||
106 | .resource = mxc_spi_resources2, | ||
107 | }; | ||
108 | #endif | 74 | #endif |
109 | 75 | ||
110 | /* | 76 | /* |
@@ -112,104 +78,34 @@ struct platform_device mxc_spi_device2 = { | |||
112 | * - i.MX21: 3 timers | 78 | * - i.MX21: 3 timers |
113 | * - i.MX27: 6 timers | 79 | * - i.MX27: 6 timers |
114 | */ | 80 | */ |
115 | 81 | #define DEFINE_IMX_GPT_DEVICE(n, baseaddr, irq) \ | |
116 | /* We use gpt0 as system timer, so do not add a device for this one */ | 82 | static struct resource timer ## n ##_resources[] = { \ |
117 | 83 | { \ | |
118 | static struct resource timer1_resources[] = { | 84 | .start = baseaddr, \ |
119 | { | 85 | .end = baseaddr + SZ_4K - 1, \ |
120 | .start = GPT2_BASE_ADDR, | 86 | .flags = IORESOURCE_MEM, \ |
121 | .end = GPT2_BASE_ADDR + 0x17, | 87 | }, { \ |
122 | .flags = IORESOURCE_MEM, | 88 | .start = irq, \ |
123 | }, { | 89 | .end = irq, \ |
124 | .start = MXC_INT_GPT2, | 90 | .flags = IORESOURCE_IRQ, \ |
125 | .end = MXC_INT_GPT2, | 91 | } \ |
126 | .flags = IORESOURCE_IRQ, | 92 | }; \ |
93 | \ | ||
94 | struct platform_device mxc_gpt ## n = { \ | ||
95 | .name = "imx_gpt", \ | ||
96 | .id = n, \ | ||
97 | .num_resources = ARRAY_SIZE(timer ## n ## _resources), \ | ||
98 | .resource = timer ## n ## _resources, \ | ||
127 | } | 99 | } |
128 | }; | ||
129 | |||
130 | struct platform_device mxc_gpt1 = { | ||
131 | .name = "imx_gpt", | ||
132 | .id = 1, | ||
133 | .num_resources = ARRAY_SIZE(timer1_resources), | ||
134 | .resource = timer1_resources, | ||
135 | }; | ||
136 | 100 | ||
137 | static struct resource timer2_resources[] = { | 101 | /* We use gpt1 as system timer, so do not add a device for this one */ |
138 | { | 102 | DEFINE_IMX_GPT_DEVICE(1, MX2x_GPT2_BASE_ADDR, MX2x_INT_GPT2); |
139 | .start = GPT3_BASE_ADDR, | 103 | DEFINE_IMX_GPT_DEVICE(2, MX2x_GPT3_BASE_ADDR, MX2x_INT_GPT3); |
140 | .end = GPT3_BASE_ADDR + 0x17, | ||
141 | .flags = IORESOURCE_MEM, | ||
142 | }, { | ||
143 | .start = MXC_INT_GPT3, | ||
144 | .end = MXC_INT_GPT3, | ||
145 | .flags = IORESOURCE_IRQ, | ||
146 | } | ||
147 | }; | ||
148 | |||
149 | struct platform_device mxc_gpt2 = { | ||
150 | .name = "imx_gpt", | ||
151 | .id = 2, | ||
152 | .num_resources = ARRAY_SIZE(timer2_resources), | ||
153 | .resource = timer2_resources, | ||
154 | }; | ||
155 | 104 | ||
156 | #ifdef CONFIG_MACH_MX27 | 105 | #ifdef CONFIG_MACH_MX27 |
157 | static struct resource timer3_resources[] = { | 106 | DEFINE_IMX_GPT_DEVICE(3, MX27_GPT4_BASE_ADDR, MX27_INT_GPT4); |
158 | { | 107 | DEFINE_IMX_GPT_DEVICE(4, MX27_GPT5_BASE_ADDR, MX27_INT_GPT5); |
159 | .start = GPT4_BASE_ADDR, | 108 | DEFINE_IMX_GPT_DEVICE(5, MX27_GPT6_BASE_ADDR, MX27_INT_GPT6); |
160 | .end = GPT4_BASE_ADDR + 0x17, | ||
161 | .flags = IORESOURCE_MEM, | ||
162 | }, { | ||
163 | .start = MXC_INT_GPT4, | ||
164 | .end = MXC_INT_GPT4, | ||
165 | .flags = IORESOURCE_IRQ, | ||
166 | } | ||
167 | }; | ||
168 | |||
169 | struct platform_device mxc_gpt3 = { | ||
170 | .name = "imx_gpt", | ||
171 | .id = 3, | ||
172 | .num_resources = ARRAY_SIZE(timer3_resources), | ||
173 | .resource = timer3_resources, | ||
174 | }; | ||
175 | |||
176 | static struct resource timer4_resources[] = { | ||
177 | { | ||
178 | .start = GPT5_BASE_ADDR, | ||
179 | .end = GPT5_BASE_ADDR + 0x17, | ||
180 | .flags = IORESOURCE_MEM, | ||
181 | }, { | ||
182 | .start = MXC_INT_GPT5, | ||
183 | .end = MXC_INT_GPT5, | ||
184 | .flags = IORESOURCE_IRQ, | ||
185 | } | ||
186 | }; | ||
187 | |||
188 | struct platform_device mxc_gpt4 = { | ||
189 | .name = "imx_gpt", | ||
190 | .id = 4, | ||
191 | .num_resources = ARRAY_SIZE(timer4_resources), | ||
192 | .resource = timer4_resources, | ||
193 | }; | ||
194 | |||
195 | static struct resource timer5_resources[] = { | ||
196 | { | ||
197 | .start = GPT6_BASE_ADDR, | ||
198 | .end = GPT6_BASE_ADDR + 0x17, | ||
199 | .flags = IORESOURCE_MEM, | ||
200 | }, { | ||
201 | .start = MXC_INT_GPT6, | ||
202 | .end = MXC_INT_GPT6, | ||
203 | .flags = IORESOURCE_IRQ, | ||
204 | } | ||
205 | }; | ||
206 | |||
207 | struct platform_device mxc_gpt5 = { | ||
208 | .name = "imx_gpt", | ||
209 | .id = 5, | ||
210 | .num_resources = ARRAY_SIZE(timer5_resources), | ||
211 | .resource = timer5_resources, | ||
212 | }; | ||
213 | #endif | 109 | #endif |
214 | 110 | ||
215 | /* | 111 | /* |
@@ -220,9 +116,9 @@ struct platform_device mxc_gpt5 = { | |||
220 | */ | 116 | */ |
221 | static struct resource mxc_wdt_resources[] = { | 117 | static struct resource mxc_wdt_resources[] = { |
222 | { | 118 | { |
223 | .start = WDOG_BASE_ADDR, | 119 | .start = MX2x_WDOG_BASE_ADDR, |
224 | .end = WDOG_BASE_ADDR + 0x30, | 120 | .end = MX2x_WDOG_BASE_ADDR + SZ_4K - 1, |
225 | .flags = IORESOURCE_MEM, | 121 | .flags = IORESOURCE_MEM, |
226 | }, | 122 | }, |
227 | }; | 123 | }; |
228 | 124 | ||
@@ -235,8 +131,8 @@ struct platform_device mxc_wdt = { | |||
235 | 131 | ||
236 | static struct resource mxc_w1_master_resources[] = { | 132 | static struct resource mxc_w1_master_resources[] = { |
237 | { | 133 | { |
238 | .start = OWIRE_BASE_ADDR, | 134 | .start = MX2x_OWIRE_BASE_ADDR, |
239 | .end = OWIRE_BASE_ADDR + SZ_4K - 1, | 135 | .end = MX2x_OWIRE_BASE_ADDR + SZ_4K - 1, |
240 | .flags = IORESOURCE_MEM, | 136 | .flags = IORESOURCE_MEM, |
241 | }, | 137 | }, |
242 | }; | 138 | }; |
@@ -248,24 +144,33 @@ struct platform_device mxc_w1_master_device = { | |||
248 | .resource = mxc_w1_master_resources, | 144 | .resource = mxc_w1_master_resources, |
249 | }; | 145 | }; |
250 | 146 | ||
251 | static struct resource mxc_nand_resources[] = { | 147 | #define DEFINE_MXC_NAND_DEVICE(pfx, baseaddr, irq) \ |
252 | { | 148 | static struct resource pfx ## _nand_resources[] = { \ |
253 | .start = NFC_BASE_ADDR, | 149 | { \ |
254 | .end = NFC_BASE_ADDR + 0xfff, | 150 | .start = baseaddr, \ |
255 | .flags = IORESOURCE_MEM, | 151 | .end = baseaddr + SZ_4K - 1, \ |
256 | }, { | 152 | .flags = IORESOURCE_MEM, \ |
257 | .start = MXC_INT_NANDFC, | 153 | }, { \ |
258 | .end = MXC_INT_NANDFC, | 154 | .start = irq, \ |
259 | .flags = IORESOURCE_IRQ, | 155 | .end = irq, \ |
260 | }, | 156 | .flags = IORESOURCE_IRQ, \ |
261 | }; | 157 | }, \ |
158 | }; \ | ||
159 | \ | ||
160 | struct platform_device pfx ## _nand_device = { \ | ||
161 | .name = "mxc_nand", \ | ||
162 | .id = 0, \ | ||
163 | .num_resources = ARRAY_SIZE(pfx ## _nand_resources), \ | ||
164 | .resource = pfx ## _nand_resources, \ | ||
165 | } | ||
262 | 166 | ||
263 | struct platform_device mxc_nand_device = { | 167 | #ifdef CONFIG_MACH_MX21 |
264 | .name = "mxc_nand", | 168 | DEFINE_MXC_NAND_DEVICE(imx21, MX21_NFC_BASE_ADDR, MX21_INT_NANDFC); |
265 | .id = 0, | 169 | #endif |
266 | .num_resources = ARRAY_SIZE(mxc_nand_resources), | 170 | |
267 | .resource = mxc_nand_resources, | 171 | #ifdef CONFIG_MACH_MX27 |
268 | }; | 172 | DEFINE_MXC_NAND_DEVICE(imx27, MX27_NFC_BASE_ADDR, MX27_INT_NANDFC); |
173 | #endif | ||
269 | 174 | ||
270 | /* | 175 | /* |
271 | * lcdc: | 176 | * lcdc: |
@@ -275,12 +180,12 @@ struct platform_device mxc_nand_device = { | |||
275 | */ | 180 | */ |
276 | static struct resource mxc_fb[] = { | 181 | static struct resource mxc_fb[] = { |
277 | { | 182 | { |
278 | .start = LCDC_BASE_ADDR, | 183 | .start = MX2x_LCDC_BASE_ADDR, |
279 | .end = LCDC_BASE_ADDR + 0xFFF, | 184 | .end = MX2x_LCDC_BASE_ADDR + SZ_4K - 1, |
280 | .flags = IORESOURCE_MEM, | 185 | .flags = IORESOURCE_MEM, |
281 | }, { | 186 | }, { |
282 | .start = MXC_INT_LCDC, | 187 | .start = MX2x_INT_LCDC, |
283 | .end = MXC_INT_LCDC, | 188 | .end = MX2x_INT_LCDC, |
284 | .flags = IORESOURCE_IRQ, | 189 | .flags = IORESOURCE_IRQ, |
285 | } | 190 | } |
286 | }; | 191 | }; |
@@ -299,13 +204,13 @@ struct platform_device mxc_fb_device = { | |||
299 | #ifdef CONFIG_MACH_MX27 | 204 | #ifdef CONFIG_MACH_MX27 |
300 | static struct resource mxc_fec_resources[] = { | 205 | static struct resource mxc_fec_resources[] = { |
301 | { | 206 | { |
302 | .start = FEC_BASE_ADDR, | 207 | .start = MX27_FEC_BASE_ADDR, |
303 | .end = FEC_BASE_ADDR + 0xfff, | 208 | .end = MX27_FEC_BASE_ADDR + SZ_4K - 1, |
304 | .flags = IORESOURCE_MEM, | 209 | .flags = IORESOURCE_MEM, |
305 | }, { | 210 | }, { |
306 | .start = MXC_INT_FEC, | 211 | .start = MX27_INT_FEC, |
307 | .end = MXC_INT_FEC, | 212 | .end = MX27_INT_FEC, |
308 | .flags = IORESOURCE_IRQ, | 213 | .flags = IORESOURCE_IRQ, |
309 | }, | 214 | }, |
310 | }; | 215 | }; |
311 | 216 | ||
@@ -317,55 +222,41 @@ struct platform_device mxc_fec_device = { | |||
317 | }; | 222 | }; |
318 | #endif | 223 | #endif |
319 | 224 | ||
320 | static struct resource mxc_i2c_1_resources[] = { | 225 | #define DEFINE_IMX_I2C_DEVICE(n, baseaddr, irq) \ |
321 | { | 226 | static struct resource mxc_i2c_resources ## n[] = { \ |
322 | .start = I2C_BASE_ADDR, | 227 | { \ |
323 | .end = I2C_BASE_ADDR + 0x0fff, | 228 | .start = baseaddr, \ |
324 | .flags = IORESOURCE_MEM, | 229 | .end = baseaddr + SZ_4K - 1, \ |
325 | }, { | 230 | .flags = IORESOURCE_MEM, \ |
326 | .start = MXC_INT_I2C, | 231 | }, { \ |
327 | .end = MXC_INT_I2C, | 232 | .start = irq, \ |
328 | .flags = IORESOURCE_IRQ, | 233 | .end = irq, \ |
234 | .flags = IORESOURCE_IRQ, \ | ||
235 | } \ | ||
236 | }; \ | ||
237 | \ | ||
238 | struct platform_device mxc_i2c_device ## n = { \ | ||
239 | .name = "imx-i2c", \ | ||
240 | .id = n, \ | ||
241 | .num_resources = ARRAY_SIZE(mxc_i2c_resources ## n), \ | ||
242 | .resource = mxc_i2c_resources ## n, \ | ||
329 | } | 243 | } |
330 | }; | ||
331 | 244 | ||
332 | struct platform_device mxc_i2c_device0 = { | 245 | DEFINE_IMX_I2C_DEVICE(0, MX2x_I2C_BASE_ADDR, MX2x_INT_I2C); |
333 | .name = "imx-i2c", | ||
334 | .id = 0, | ||
335 | .num_resources = ARRAY_SIZE(mxc_i2c_1_resources), | ||
336 | .resource = mxc_i2c_1_resources, | ||
337 | }; | ||
338 | 246 | ||
339 | #ifdef CONFIG_MACH_MX27 | 247 | #ifdef CONFIG_MACH_MX27 |
340 | static struct resource mxc_i2c_2_resources[] = { | 248 | DEFINE_IMX_I2C_DEVICE(1, MX27_I2C2_BASE_ADDR, MX27_INT_I2C2); |
341 | { | ||
342 | .start = I2C2_BASE_ADDR, | ||
343 | .end = I2C2_BASE_ADDR + 0x0fff, | ||
344 | .flags = IORESOURCE_MEM, | ||
345 | }, { | ||
346 | .start = MXC_INT_I2C2, | ||
347 | .end = MXC_INT_I2C2, | ||
348 | .flags = IORESOURCE_IRQ, | ||
349 | } | ||
350 | }; | ||
351 | |||
352 | struct platform_device mxc_i2c_device1 = { | ||
353 | .name = "imx-i2c", | ||
354 | .id = 1, | ||
355 | .num_resources = ARRAY_SIZE(mxc_i2c_2_resources), | ||
356 | .resource = mxc_i2c_2_resources, | ||
357 | }; | ||
358 | #endif | 249 | #endif |
359 | 250 | ||
360 | static struct resource mxc_pwm_resources[] = { | 251 | static struct resource mxc_pwm_resources[] = { |
361 | { | 252 | { |
362 | .start = PWM_BASE_ADDR, | 253 | .start = MX2x_PWM_BASE_ADDR, |
363 | .end = PWM_BASE_ADDR + 0x0fff, | 254 | .end = MX2x_PWM_BASE_ADDR + SZ_4K - 1, |
364 | .flags = IORESOURCE_MEM, | 255 | .flags = IORESOURCE_MEM, |
365 | }, { | 256 | }, { |
366 | .start = MXC_INT_PWM, | 257 | .start = MX2x_INT_PWM, |
367 | .end = MXC_INT_PWM, | 258 | .end = MX2x_INT_PWM, |
368 | .flags = IORESOURCE_IRQ, | 259 | .flags = IORESOURCE_IRQ, |
369 | } | 260 | } |
370 | }; | 261 | }; |
371 | 262 | ||
@@ -379,74 +270,49 @@ struct platform_device mxc_pwm_device = { | |||
379 | /* | 270 | /* |
380 | * Resource definition for the MXC SDHC | 271 | * Resource definition for the MXC SDHC |
381 | */ | 272 | */ |
382 | static struct resource mxc_sdhc1_resources[] = { | 273 | #define DEFINE_MXC_MMC_DEVICE(n, baseaddr, irq, dmareq) \ |
383 | { | 274 | static struct resource mxc_sdhc_resources ## n[] = { \ |
384 | .start = SDHC1_BASE_ADDR, | 275 | { \ |
385 | .end = SDHC1_BASE_ADDR + SZ_4K - 1, | 276 | .start = baseaddr, \ |
386 | .flags = IORESOURCE_MEM, | 277 | .end = baseaddr + SZ_4K - 1, \ |
387 | }, { | 278 | .flags = IORESOURCE_MEM, \ |
388 | .start = MXC_INT_SDHC1, | 279 | }, { \ |
389 | .end = MXC_INT_SDHC1, | 280 | .start = irq, \ |
390 | .flags = IORESOURCE_IRQ, | 281 | .end = irq, \ |
391 | }, { | 282 | .flags = IORESOURCE_IRQ, \ |
392 | .start = DMA_REQ_SDHC1, | 283 | }, { \ |
393 | .end = DMA_REQ_SDHC1, | 284 | .start = dmareq, \ |
394 | .flags = IORESOURCE_DMA, | 285 | .end = dmareq, \ |
395 | }, | 286 | .flags = IORESOURCE_DMA, \ |
396 | }; | 287 | }, \ |
397 | 288 | }; \ | |
398 | static u64 mxc_sdhc1_dmamask = 0xffffffffUL; | 289 | \ |
399 | 290 | static u64 mxc_sdhc ## n ## _dmamask = 0xffffffffUL; \ | |
400 | struct platform_device mxc_sdhc_device0 = { | 291 | \ |
401 | .name = "mxc-mmc", | 292 | struct platform_device mxc_sdhc_device ## n = { \ |
402 | .id = 0, | 293 | .name = "mxc-mmc", \ |
403 | .dev = { | 294 | .id = n, \ |
404 | .dma_mask = &mxc_sdhc1_dmamask, | 295 | .dev = { \ |
405 | .coherent_dma_mask = 0xffffffff, | 296 | .dma_mask = &mxc_sdhc ## n ## _dmamask, \ |
406 | }, | 297 | .coherent_dma_mask = 0xffffffff, \ |
407 | .num_resources = ARRAY_SIZE(mxc_sdhc1_resources), | 298 | }, \ |
408 | .resource = mxc_sdhc1_resources, | 299 | .num_resources = ARRAY_SIZE(mxc_sdhc_resources ## n), \ |
409 | }; | 300 | .resource = mxc_sdhc_resources ## n, \ |
410 | 301 | } | |
411 | static struct resource mxc_sdhc2_resources[] = { | ||
412 | { | ||
413 | .start = SDHC2_BASE_ADDR, | ||
414 | .end = SDHC2_BASE_ADDR + SZ_4K - 1, | ||
415 | .flags = IORESOURCE_MEM, | ||
416 | }, { | ||
417 | .start = MXC_INT_SDHC2, | ||
418 | .end = MXC_INT_SDHC2, | ||
419 | .flags = IORESOURCE_IRQ, | ||
420 | }, { | ||
421 | .start = DMA_REQ_SDHC2, | ||
422 | .end = DMA_REQ_SDHC2, | ||
423 | .flags = IORESOURCE_DMA, | ||
424 | }, | ||
425 | }; | ||
426 | 302 | ||
427 | static u64 mxc_sdhc2_dmamask = 0xffffffffUL; | 303 | DEFINE_MXC_MMC_DEVICE(0, MX2x_SDHC1_BASE_ADDR, MX2x_INT_SDHC1, MX2x_DMA_REQ_SDHC1); |
428 | 304 | DEFINE_MXC_MMC_DEVICE(1, MX2x_SDHC2_BASE_ADDR, MX2x_INT_SDHC2, MX2x_DMA_REQ_SDHC2); | |
429 | struct platform_device mxc_sdhc_device1 = { | ||
430 | .name = "mxc-mmc", | ||
431 | .id = 1, | ||
432 | .dev = { | ||
433 | .dma_mask = &mxc_sdhc2_dmamask, | ||
434 | .coherent_dma_mask = 0xffffffff, | ||
435 | }, | ||
436 | .num_resources = ARRAY_SIZE(mxc_sdhc2_resources), | ||
437 | .resource = mxc_sdhc2_resources, | ||
438 | }; | ||
439 | 305 | ||
440 | #ifdef CONFIG_MACH_MX27 | 306 | #ifdef CONFIG_MACH_MX27 |
441 | static struct resource otg_resources[] = { | 307 | static struct resource otg_resources[] = { |
442 | { | 308 | { |
443 | .start = OTG_BASE_ADDR, | 309 | .start = MX27_USBOTG_BASE_ADDR, |
444 | .end = OTG_BASE_ADDR + 0x1ff, | 310 | .end = MX27_USBOTG_BASE_ADDR + 0x1ff, |
445 | .flags = IORESOURCE_MEM, | 311 | .flags = IORESOURCE_MEM, |
446 | }, { | 312 | }, { |
447 | .start = MXC_INT_USB3, | 313 | .start = MX27_INT_USB3, |
448 | .end = MXC_INT_USB3, | 314 | .end = MX27_INT_USB3, |
449 | .flags = IORESOURCE_IRQ, | 315 | .flags = IORESOURCE_IRQ, |
450 | }, | 316 | }, |
451 | }; | 317 | }; |
452 | 318 | ||
@@ -454,14 +320,14 @@ static u64 otg_dmamask = 0xffffffffUL; | |||
454 | 320 | ||
455 | /* OTG gadget device */ | 321 | /* OTG gadget device */ |
456 | struct platform_device mxc_otg_udc_device = { | 322 | struct platform_device mxc_otg_udc_device = { |
457 | .name = "fsl-usb2-udc", | 323 | .name = "fsl-usb2-udc", |
458 | .id = -1, | 324 | .id = -1, |
459 | .dev = { | 325 | .dev = { |
460 | .dma_mask = &otg_dmamask, | 326 | .dma_mask = &otg_dmamask, |
461 | .coherent_dma_mask = 0xffffffffUL, | 327 | .coherent_dma_mask = 0xffffffffUL, |
462 | }, | 328 | }, |
463 | .resource = otg_resources, | 329 | .resource = otg_resources, |
464 | .num_resources = ARRAY_SIZE(otg_resources), | 330 | .num_resources = ARRAY_SIZE(otg_resources), |
465 | }; | 331 | }; |
466 | 332 | ||
467 | /* OTG host */ | 333 | /* OTG host */ |
@@ -482,12 +348,12 @@ static u64 usbh1_dmamask = 0xffffffffUL; | |||
482 | 348 | ||
483 | static struct resource mxc_usbh1_resources[] = { | 349 | static struct resource mxc_usbh1_resources[] = { |
484 | { | 350 | { |
485 | .start = OTG_BASE_ADDR + 0x200, | 351 | .start = MX27_USBOTG_BASE_ADDR + 0x200, |
486 | .end = OTG_BASE_ADDR + 0x3ff, | 352 | .end = MX27_USBOTG_BASE_ADDR + 0x3ff, |
487 | .flags = IORESOURCE_MEM, | 353 | .flags = IORESOURCE_MEM, |
488 | }, { | 354 | }, { |
489 | .start = MXC_INT_USB1, | 355 | .start = MX27_INT_USB1, |
490 | .end = MXC_INT_USB1, | 356 | .end = MX27_INT_USB1, |
491 | .flags = IORESOURCE_IRQ, | 357 | .flags = IORESOURCE_IRQ, |
492 | }, | 358 | }, |
493 | }; | 359 | }; |
@@ -508,12 +374,12 @@ static u64 usbh2_dmamask = 0xffffffffUL; | |||
508 | 374 | ||
509 | static struct resource mxc_usbh2_resources[] = { | 375 | static struct resource mxc_usbh2_resources[] = { |
510 | { | 376 | { |
511 | .start = OTG_BASE_ADDR + 0x400, | 377 | .start = MX27_USBOTG_BASE_ADDR + 0x400, |
512 | .end = OTG_BASE_ADDR + 0x5ff, | 378 | .end = MX27_USBOTG_BASE_ADDR + 0x5ff, |
513 | .flags = IORESOURCE_MEM, | 379 | .flags = IORESOURCE_MEM, |
514 | }, { | 380 | }, { |
515 | .start = MXC_INT_USB2, | 381 | .start = MX27_INT_USB2, |
516 | .end = MXC_INT_USB2, | 382 | .end = MX27_INT_USB2, |
517 | .flags = IORESOURCE_IRQ, | 383 | .flags = IORESOURCE_IRQ, |
518 | }, | 384 | }, |
519 | }; | 385 | }; |
@@ -530,115 +396,88 @@ struct platform_device mxc_usbh2 = { | |||
530 | }; | 396 | }; |
531 | #endif | 397 | #endif |
532 | 398 | ||
533 | static struct resource imx_ssi_resources0[] = { | 399 | #define DEFINE_IMX_SSI_DMARES(_name, ssin, suffix) \ |
534 | { | 400 | { \ |
535 | .start = SSI1_BASE_ADDR, | 401 | .name = _name, \ |
536 | .end = SSI1_BASE_ADDR + 0x6F, | 402 | .start = MX2x_DMA_REQ_SSI ## ssin ## _ ## suffix, \ |
537 | .flags = IORESOURCE_MEM, | 403 | .end = MX2x_DMA_REQ_SSI ## ssin ## _ ## suffix, \ |
538 | }, { | 404 | .flags = IORESOURCE_DMA, \ |
539 | .start = MXC_INT_SSI1, | 405 | } |
540 | .end = MXC_INT_SSI1, | ||
541 | .flags = IORESOURCE_IRQ, | ||
542 | }, { | ||
543 | .name = "tx0", | ||
544 | .start = DMA_REQ_SSI1_TX0, | ||
545 | .end = DMA_REQ_SSI1_TX0, | ||
546 | .flags = IORESOURCE_DMA, | ||
547 | }, { | ||
548 | .name = "rx0", | ||
549 | .start = DMA_REQ_SSI1_RX0, | ||
550 | .end = DMA_REQ_SSI1_RX0, | ||
551 | .flags = IORESOURCE_DMA, | ||
552 | }, { | ||
553 | .name = "tx1", | ||
554 | .start = DMA_REQ_SSI1_TX1, | ||
555 | .end = DMA_REQ_SSI1_TX1, | ||
556 | .flags = IORESOURCE_DMA, | ||
557 | }, { | ||
558 | .name = "rx1", | ||
559 | .start = DMA_REQ_SSI1_RX1, | ||
560 | .end = DMA_REQ_SSI1_RX1, | ||
561 | .flags = IORESOURCE_DMA, | ||
562 | }, | ||
563 | }; | ||
564 | |||
565 | static struct resource imx_ssi_resources1[] = { | ||
566 | { | ||
567 | .start = SSI2_BASE_ADDR, | ||
568 | .end = SSI2_BASE_ADDR + 0x6F, | ||
569 | .flags = IORESOURCE_MEM, | ||
570 | }, { | ||
571 | .start = MXC_INT_SSI2, | ||
572 | .end = MXC_INT_SSI2, | ||
573 | .flags = IORESOURCE_IRQ, | ||
574 | }, { | ||
575 | .name = "tx0", | ||
576 | .start = DMA_REQ_SSI2_TX0, | ||
577 | .end = DMA_REQ_SSI2_TX0, | ||
578 | .flags = IORESOURCE_DMA, | ||
579 | }, { | ||
580 | .name = "rx0", | ||
581 | .start = DMA_REQ_SSI2_RX0, | ||
582 | .end = DMA_REQ_SSI2_RX0, | ||
583 | .flags = IORESOURCE_DMA, | ||
584 | }, { | ||
585 | .name = "tx1", | ||
586 | .start = DMA_REQ_SSI2_TX1, | ||
587 | .end = DMA_REQ_SSI2_TX1, | ||
588 | .flags = IORESOURCE_DMA, | ||
589 | }, { | ||
590 | .name = "rx1", | ||
591 | .start = DMA_REQ_SSI2_RX1, | ||
592 | .end = DMA_REQ_SSI2_RX1, | ||
593 | .flags = IORESOURCE_DMA, | ||
594 | }, | ||
595 | }; | ||
596 | 406 | ||
597 | struct platform_device imx_ssi_device0 = { | 407 | #define DEFINE_IMX_SSI_DEVICE(n, ssin, baseaddr, irq) \ |
598 | .name = "imx-ssi", | 408 | static struct resource imx_ssi_resources ## n[] = { \ |
599 | .id = 0, | 409 | { \ |
600 | .num_resources = ARRAY_SIZE(imx_ssi_resources0), | 410 | .start = MX2x_SSI ## ssin ## _BASE_ADDR, \ |
601 | .resource = imx_ssi_resources0, | 411 | .end = MX2x_SSI ## ssin ## _BASE_ADDR + 0x6f, \ |
602 | }; | 412 | .flags = IORESOURCE_MEM, \ |
413 | }, { \ | ||
414 | .start = MX2x_INT_SSI1, \ | ||
415 | .end = MX2x_INT_SSI1, \ | ||
416 | .flags = IORESOURCE_IRQ, \ | ||
417 | }, \ | ||
418 | DEFINE_IMX_SSI_DMARES("tx0", ssin, TX0), \ | ||
419 | DEFINE_IMX_SSI_DMARES("rx0", ssin, RX0), \ | ||
420 | DEFINE_IMX_SSI_DMARES("tx1", ssin, TX1), \ | ||
421 | DEFINE_IMX_SSI_DMARES("rx1", ssin, RX1), \ | ||
422 | }; \ | ||
423 | \ | ||
424 | struct platform_device imx_ssi_device ## n = { \ | ||
425 | .name = "imx-ssi", \ | ||
426 | .id = n, \ | ||
427 | .num_resources = ARRAY_SIZE(imx_ssi_resources ## n), \ | ||
428 | .resource = imx_ssi_resources ## n, \ | ||
429 | } | ||
603 | 430 | ||
604 | struct platform_device imx_ssi_device1 = { | 431 | DEFINE_IMX_SSI_DEVICE(0, 1, MX2x_SSI1_BASE_ADDR, MX2x_INT_SSI1); |
605 | .name = "imx-ssi", | 432 | DEFINE_IMX_SSI_DEVICE(1, 2, MX2x_SSI1_BASE_ADDR, MX2x_INT_SSI1); |
606 | .id = 1, | ||
607 | .num_resources = ARRAY_SIZE(imx_ssi_resources1), | ||
608 | .resource = imx_ssi_resources1, | ||
609 | }; | ||
610 | 433 | ||
611 | /* GPIO port description */ | 434 | /* GPIO port description */ |
612 | static struct mxc_gpio_port imx_gpio_ports[] = { | 435 | #define DEFINE_MXC_GPIO_PORT_IRQ(SOC, n, _irq) \ |
613 | { | 436 | { \ |
614 | .chip.label = "gpio-0", | 437 | .chip.label = "gpio-" #n, \ |
615 | .irq = MXC_INT_GPIO, | 438 | .irq = _irq, \ |
616 | .base = IO_ADDRESS(GPIO_BASE_ADDR), | 439 | .base = SOC ## _IO_ADDRESS(MX2x_GPIO_BASE_ADDR + \ |
617 | .virtual_irq_start = MXC_GPIO_IRQ_START, | 440 | n * 0x100), \ |
618 | }, { | 441 | .virtual_irq_start = MXC_GPIO_IRQ_START + n * 32, \ |
619 | .chip.label = "gpio-1", | ||
620 | .base = IO_ADDRESS(GPIO_BASE_ADDR + 0x100), | ||
621 | .virtual_irq_start = MXC_GPIO_IRQ_START + 32, | ||
622 | }, { | ||
623 | .chip.label = "gpio-2", | ||
624 | .base = IO_ADDRESS(GPIO_BASE_ADDR + 0x200), | ||
625 | .virtual_irq_start = MXC_GPIO_IRQ_START + 64, | ||
626 | }, { | ||
627 | .chip.label = "gpio-3", | ||
628 | .base = IO_ADDRESS(GPIO_BASE_ADDR + 0x300), | ||
629 | .virtual_irq_start = MXC_GPIO_IRQ_START + 96, | ||
630 | }, { | ||
631 | .chip.label = "gpio-4", | ||
632 | .base = IO_ADDRESS(GPIO_BASE_ADDR + 0x400), | ||
633 | .virtual_irq_start = MXC_GPIO_IRQ_START + 128, | ||
634 | }, { | ||
635 | .chip.label = "gpio-5", | ||
636 | .base = IO_ADDRESS(GPIO_BASE_ADDR + 0x500), | ||
637 | .virtual_irq_start = MXC_GPIO_IRQ_START + 160, | ||
638 | } | 442 | } |
639 | }; | 443 | |
444 | #define DEFINE_MXC_GPIO_PORT(SOC, n) \ | ||
445 | { \ | ||
446 | .chip.label = "gpio-" #n, \ | ||
447 | .base = SOC ## _IO_ADDRESS(MX2x_GPIO_BASE_ADDR + \ | ||
448 | n * 0x100), \ | ||
449 | .virtual_irq_start = MXC_GPIO_IRQ_START + n * 32, \ | ||
450 | } | ||
451 | |||
452 | #define DEFINE_MXC_GPIO_PORTS(SOC, pfx) \ | ||
453 | static struct mxc_gpio_port pfx ## _gpio_ports[] = { \ | ||
454 | DEFINE_MXC_GPIO_PORT_IRQ(SOC, 0, SOC ## _INT_GPIO), \ | ||
455 | DEFINE_MXC_GPIO_PORT(SOC, 1), \ | ||
456 | DEFINE_MXC_GPIO_PORT(SOC, 2), \ | ||
457 | DEFINE_MXC_GPIO_PORT(SOC, 3), \ | ||
458 | DEFINE_MXC_GPIO_PORT(SOC, 4), \ | ||
459 | DEFINE_MXC_GPIO_PORT(SOC, 5), \ | ||
460 | } | ||
461 | |||
462 | #ifdef CONFIG_MACH_MX21 | ||
463 | DEFINE_MXC_GPIO_PORTS(MX21, imx21); | ||
464 | #endif | ||
465 | |||
466 | #ifdef CONFIG_MACH_MX27 | ||
467 | DEFINE_MXC_GPIO_PORTS(MX27, imx27); | ||
468 | #endif | ||
640 | 469 | ||
641 | int __init mxc_register_gpios(void) | 470 | int __init mxc_register_gpios(void) |
642 | { | 471 | { |
643 | return mxc_gpio_init(imx_gpio_ports, ARRAY_SIZE(imx_gpio_ports)); | 472 | #ifdef CONFIG_MACH_MX21 |
473 | if (cpu_is_mx21()) | ||
474 | return mxc_gpio_init(imx21_gpio_ports, ARRAY_SIZE(imx21_gpio_ports)); | ||
475 | else | ||
476 | #endif | ||
477 | #ifdef CONFIG_MACH_MX27 | ||
478 | if (cpu_is_mx27()) | ||
479 | return mxc_gpio_init(imx27_gpio_ports, ARRAY_SIZE(imx27_gpio_ports)); | ||
480 | else | ||
481 | #endif | ||
482 | return 0; | ||
644 | } | 483 | } |
diff --git a/arch/arm/mach-mx2/devices.h b/arch/arm/mach-mx2/devices.h index 97306aa18f1c..f15df2aaae4d 100644 --- a/arch/arm/mach-mx2/devices.h +++ b/arch/arm/mach-mx2/devices.h | |||
@@ -1,8 +1,10 @@ | |||
1 | extern struct platform_device mxc_gpt1; | 1 | extern struct platform_device mxc_gpt1; |
2 | extern struct platform_device mxc_gpt2; | 2 | extern struct platform_device mxc_gpt2; |
3 | #ifdef CONFIG_MACH_MX27 | ||
3 | extern struct platform_device mxc_gpt3; | 4 | extern struct platform_device mxc_gpt3; |
4 | extern struct platform_device mxc_gpt4; | 5 | extern struct platform_device mxc_gpt4; |
5 | extern struct platform_device mxc_gpt5; | 6 | extern struct platform_device mxc_gpt5; |
7 | #endif | ||
6 | extern struct platform_device mxc_wdt; | 8 | extern struct platform_device mxc_wdt; |
7 | extern struct platform_device mxc_uart_device0; | 9 | extern struct platform_device mxc_uart_device0; |
8 | extern struct platform_device mxc_uart_device1; | 10 | extern struct platform_device mxc_uart_device1; |
@@ -11,12 +13,19 @@ extern struct platform_device mxc_uart_device3; | |||
11 | extern struct platform_device mxc_uart_device4; | 13 | extern struct platform_device mxc_uart_device4; |
12 | extern struct platform_device mxc_uart_device5; | 14 | extern struct platform_device mxc_uart_device5; |
13 | extern struct platform_device mxc_w1_master_device; | 15 | extern struct platform_device mxc_w1_master_device; |
14 | extern struct platform_device mxc_nand_device; | 16 | #ifdef CONFIG_MACH_MX21 |
17 | extern struct platform_device imx21_nand_device; | ||
18 | #endif | ||
19 | #ifdef CONFIG_MACH_MX27 | ||
20 | extern struct platform_device imx27_nand_device; | ||
21 | #endif | ||
15 | extern struct platform_device mxc_fb_device; | 22 | extern struct platform_device mxc_fb_device; |
16 | extern struct platform_device mxc_fec_device; | 23 | extern struct platform_device mxc_fec_device; |
17 | extern struct platform_device mxc_pwm_device; | 24 | extern struct platform_device mxc_pwm_device; |
18 | extern struct platform_device mxc_i2c_device0; | 25 | extern struct platform_device mxc_i2c_device0; |
26 | #ifdef CONFIG_MACH_MX27 | ||
19 | extern struct platform_device mxc_i2c_device1; | 27 | extern struct platform_device mxc_i2c_device1; |
28 | #endif | ||
20 | extern struct platform_device mxc_sdhc_device0; | 29 | extern struct platform_device mxc_sdhc_device0; |
21 | extern struct platform_device mxc_sdhc_device1; | 30 | extern struct platform_device mxc_sdhc_device1; |
22 | extern struct platform_device mxc_otg_udc_device; | 31 | extern struct platform_device mxc_otg_udc_device; |
@@ -25,6 +34,8 @@ extern struct platform_device mxc_usbh1; | |||
25 | extern struct platform_device mxc_usbh2; | 34 | extern struct platform_device mxc_usbh2; |
26 | extern struct platform_device mxc_spi_device0; | 35 | extern struct platform_device mxc_spi_device0; |
27 | extern struct platform_device mxc_spi_device1; | 36 | extern struct platform_device mxc_spi_device1; |
37 | #ifdef CONFIG_MACH_MX27 | ||
28 | extern struct platform_device mxc_spi_device2; | 38 | extern struct platform_device mxc_spi_device2; |
39 | #endif | ||
29 | extern struct platform_device imx_ssi_device0; | 40 | extern struct platform_device imx_ssi_device0; |
30 | extern struct platform_device imx_ssi_device1; | 41 | extern struct platform_device imx_ssi_device1; |
diff --git a/arch/arm/mach-mx2/eukrea_mbimx27-baseboard.c b/arch/arm/mach-mx2/eukrea_mbimx27-baseboard.c index 7382b6d27ee1..f3b169d5245f 100644 --- a/arch/arm/mach-mx2/eukrea_mbimx27-baseboard.c +++ b/arch/arm/mach-mx2/eukrea_mbimx27-baseboard.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #include <asm/mach/arch.h> | 28 | #include <asm/mach/arch.h> |
29 | 29 | ||
30 | #include <mach/common.h> | 30 | #include <mach/common.h> |
31 | #include <mach/iomux.h> | 31 | #include <mach/iomux-mx27.h> |
32 | #include <mach/imxfb.h> | 32 | #include <mach/imxfb.h> |
33 | #include <mach/hardware.h> | 33 | #include <mach/hardware.h> |
34 | #include <mach/mmc.h> | 34 | #include <mach/mmc.h> |
diff --git a/arch/arm/mach-mx2/eukrea_cpuimx27.c b/arch/arm/mach-mx2/mach-cpuimx27.c index 7b187606682c..1f616dcaabc9 100644 --- a/arch/arm/mach-mx2/eukrea_cpuimx27.c +++ b/arch/arm/mach-mx2/mach-cpuimx27.c | |||
@@ -36,7 +36,7 @@ | |||
36 | #include <mach/common.h> | 36 | #include <mach/common.h> |
37 | #include <mach/hardware.h> | 37 | #include <mach/hardware.h> |
38 | #include <mach/i2c.h> | 38 | #include <mach/i2c.h> |
39 | #include <mach/iomux.h> | 39 | #include <mach/iomux-mx27.h> |
40 | #include <mach/imx-uart.h> | 40 | #include <mach/imx-uart.h> |
41 | #include <mach/mxc_nand.h> | 41 | #include <mach/mxc_nand.h> |
42 | 42 | ||
@@ -142,28 +142,28 @@ static struct i2c_board_info eukrea_cpuimx27_i2c_devices[] = { | |||
142 | #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) | 142 | #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) |
143 | static struct plat_serial8250_port serial_platform_data[] = { | 143 | static struct plat_serial8250_port serial_platform_data[] = { |
144 | { | 144 | { |
145 | .mapbase = (unsigned long)(CS3_BASE_ADDR + 0x200000), | 145 | .mapbase = (unsigned long)(MX27_CS3_BASE_ADDR + 0x200000), |
146 | .irq = IRQ_GPIOB(23), | 146 | .irq = IRQ_GPIOB(23), |
147 | .uartclk = 14745600, | 147 | .uartclk = 14745600, |
148 | .regshift = 1, | 148 | .regshift = 1, |
149 | .iotype = UPIO_MEM, | 149 | .iotype = UPIO_MEM, |
150 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, | 150 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, |
151 | }, { | 151 | }, { |
152 | .mapbase = (unsigned long)(CS3_BASE_ADDR + 0x400000), | 152 | .mapbase = (unsigned long)(MX27_CS3_BASE_ADDR + 0x400000), |
153 | .irq = IRQ_GPIOB(22), | 153 | .irq = IRQ_GPIOB(22), |
154 | .uartclk = 14745600, | 154 | .uartclk = 14745600, |
155 | .regshift = 1, | 155 | .regshift = 1, |
156 | .iotype = UPIO_MEM, | 156 | .iotype = UPIO_MEM, |
157 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, | 157 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, |
158 | }, { | 158 | }, { |
159 | .mapbase = (unsigned long)(CS3_BASE_ADDR + 0x800000), | 159 | .mapbase = (unsigned long)(MX27_CS3_BASE_ADDR + 0x800000), |
160 | .irq = IRQ_GPIOB(27), | 160 | .irq = IRQ_GPIOB(27), |
161 | .uartclk = 14745600, | 161 | .uartclk = 14745600, |
162 | .regshift = 1, | 162 | .regshift = 1, |
163 | .iotype = UPIO_MEM, | 163 | .iotype = UPIO_MEM, |
164 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, | 164 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, |
165 | }, { | 165 | }, { |
166 | .mapbase = (unsigned long)(CS3_BASE_ADDR + 0x1000000), | 166 | .mapbase = (unsigned long)(MX27_CS3_BASE_ADDR + 0x1000000), |
167 | .irq = IRQ_GPIOB(30), | 167 | .irq = IRQ_GPIOB(30), |
168 | .uartclk = 14745600, | 168 | .uartclk = 14745600, |
169 | .regshift = 1, | 169 | .regshift = 1, |
@@ -189,7 +189,8 @@ static void __init eukrea_cpuimx27_init(void) | |||
189 | 189 | ||
190 | mxc_register_device(&mxc_uart_device0, &uart_pdata[0]); | 190 | mxc_register_device(&mxc_uart_device0, &uart_pdata[0]); |
191 | 191 | ||
192 | mxc_register_device(&mxc_nand_device, &eukrea_cpuimx27_nand_board_info); | 192 | mxc_register_device(&imx27_nand_device, |
193 | &eukrea_cpuimx27_nand_board_info); | ||
193 | 194 | ||
194 | i2c_register_board_info(0, eukrea_cpuimx27_i2c_devices, | 195 | i2c_register_board_info(0, eukrea_cpuimx27_i2c_devices, |
195 | ARRAY_SIZE(eukrea_cpuimx27_i2c_devices)); | 196 | ARRAY_SIZE(eukrea_cpuimx27_i2c_devices)); |
@@ -224,9 +225,9 @@ static struct sys_timer eukrea_cpuimx27_timer = { | |||
224 | }; | 225 | }; |
225 | 226 | ||
226 | MACHINE_START(CPUIMX27, "EUKREA CPUIMX27") | 227 | MACHINE_START(CPUIMX27, "EUKREA CPUIMX27") |
227 | .phys_io = AIPI_BASE_ADDR, | 228 | .phys_io = MX27_AIPI_BASE_ADDR, |
228 | .io_pg_offst = ((AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc, | 229 | .io_pg_offst = ((MX27_AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc, |
229 | .boot_params = PHYS_OFFSET + 0x100, | 230 | .boot_params = MX27_PHYS_OFFSET + 0x100, |
230 | .map_io = mx27_map_io, | 231 | .map_io = mx27_map_io, |
231 | .init_irq = mx27_init_irq, | 232 | .init_irq = mx27_init_irq, |
232 | .init_machine = eukrea_cpuimx27_init, | 233 | .init_machine = eukrea_cpuimx27_init, |
diff --git a/arch/arm/mach-mx2/mx27lite.c b/arch/arm/mach-mx2/mach-imx27lite.c index 82ea227ea0cf..b5710bf18b96 100644 --- a/arch/arm/mach-mx2/mx27lite.c +++ b/arch/arm/mach-mx2/mach-imx27lite.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
28 | #include <mach/common.h> | 28 | #include <mach/common.h> |
29 | #include <mach/imx-uart.h> | 29 | #include <mach/imx-uart.h> |
30 | #include <mach/iomux.h> | 30 | #include <mach/iomux-mx27.h> |
31 | #include <mach/board-mx27lite.h> | 31 | #include <mach/board-mx27lite.h> |
32 | 32 | ||
33 | #include "devices.h" | 33 | #include "devices.h" |
@@ -85,9 +85,9 @@ static struct sys_timer mx27lite_timer = { | |||
85 | }; | 85 | }; |
86 | 86 | ||
87 | MACHINE_START(IMX27LITE, "LogicPD i.MX27LITE") | 87 | MACHINE_START(IMX27LITE, "LogicPD i.MX27LITE") |
88 | .phys_io = AIPI_BASE_ADDR, | 88 | .phys_io = MX27_AIPI_BASE_ADDR, |
89 | .io_pg_offst = ((AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc, | 89 | .io_pg_offst = ((MX27_AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc, |
90 | .boot_params = PHYS_OFFSET + 0x100, | 90 | .boot_params = MX27_PHYS_OFFSET + 0x100, |
91 | .map_io = mx27_map_io, | 91 | .map_io = mx27_map_io, |
92 | .init_irq = mx27_init_irq, | 92 | .init_irq = mx27_init_irq, |
93 | .init_machine = mx27lite_init, | 93 | .init_machine = mx27lite_init, |
diff --git a/arch/arm/mach-mx2/mx21ads.c b/arch/arm/mach-mx2/mach-mx21ads.c index cf5f77cbc2f1..113e58d7cb40 100644 --- a/arch/arm/mach-mx2/mx21ads.c +++ b/arch/arm/mach-mx2/mach-mx21ads.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #include <asm/mach/map.h> | 30 | #include <asm/mach/map.h> |
31 | #include <mach/imx-uart.h> | 31 | #include <mach/imx-uart.h> |
32 | #include <mach/imxfb.h> | 32 | #include <mach/imxfb.h> |
33 | #include <mach/iomux.h> | 33 | #include <mach/iomux-mx21.h> |
34 | #include <mach/mxc_nand.h> | 34 | #include <mach/mxc_nand.h> |
35 | #include <mach/mmc.h> | 35 | #include <mach/mmc.h> |
36 | #include <mach/board-mx21ads.h> | 36 | #include <mach/board-mx21ads.h> |
@@ -118,8 +118,8 @@ static struct physmap_flash_data mx21ads_flash_data = { | |||
118 | }; | 118 | }; |
119 | 119 | ||
120 | static struct resource mx21ads_flash_resource = { | 120 | static struct resource mx21ads_flash_resource = { |
121 | .start = CS0_BASE_ADDR, | 121 | .start = MX21_CS0_BASE_ADDR, |
122 | .end = CS0_BASE_ADDR + 0x02000000 - 1, | 122 | .end = MX21_CS0_BASE_ADDR + 0x02000000 - 1, |
123 | .flags = IORESOURCE_MEM, | 123 | .flags = IORESOURCE_MEM, |
124 | }; | 124 | }; |
125 | 125 | ||
@@ -242,7 +242,7 @@ static struct map_desc mx21ads_io_desc[] __initdata = { | |||
242 | */ | 242 | */ |
243 | { | 243 | { |
244 | .virtual = MX21ADS_MMIO_BASE_ADDR, | 244 | .virtual = MX21ADS_MMIO_BASE_ADDR, |
245 | .pfn = __phys_to_pfn(CS1_BASE_ADDR), | 245 | .pfn = __phys_to_pfn(MX21_CS1_BASE_ADDR), |
246 | .length = MX21ADS_MMIO_SIZE, | 246 | .length = MX21ADS_MMIO_SIZE, |
247 | .type = MT_DEVICE, | 247 | .type = MT_DEVICE, |
248 | }, | 248 | }, |
@@ -268,7 +268,7 @@ static void __init mx21ads_board_init(void) | |||
268 | mxc_register_device(&mxc_uart_device3, &uart_pdata); | 268 | mxc_register_device(&mxc_uart_device3, &uart_pdata); |
269 | mxc_register_device(&mxc_fb_device, &mx21ads_fb_data); | 269 | mxc_register_device(&mxc_fb_device, &mx21ads_fb_data); |
270 | mxc_register_device(&mxc_sdhc_device0, &mx21ads_sdhc_pdata); | 270 | mxc_register_device(&mxc_sdhc_device0, &mx21ads_sdhc_pdata); |
271 | mxc_register_device(&mxc_nand_device, &mx21ads_nand_board_info); | 271 | mxc_register_device(&imx21_nand_device, &mx21ads_nand_board_info); |
272 | 272 | ||
273 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 273 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
274 | } | 274 | } |
@@ -284,9 +284,9 @@ static struct sys_timer mx21ads_timer = { | |||
284 | 284 | ||
285 | MACHINE_START(MX21ADS, "Freescale i.MX21ADS") | 285 | MACHINE_START(MX21ADS, "Freescale i.MX21ADS") |
286 | /* maintainer: Freescale Semiconductor, Inc. */ | 286 | /* maintainer: Freescale Semiconductor, Inc. */ |
287 | .phys_io = AIPI_BASE_ADDR, | 287 | .phys_io = MX21_AIPI_BASE_ADDR, |
288 | .io_pg_offst = ((AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc, | 288 | .io_pg_offst = ((MX21_AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc, |
289 | .boot_params = PHYS_OFFSET + 0x100, | 289 | .boot_params = MX21_PHYS_OFFSET + 0x100, |
290 | .map_io = mx21ads_map_io, | 290 | .map_io = mx21ads_map_io, |
291 | .init_irq = mx21_init_irq, | 291 | .init_irq = mx21_init_irq, |
292 | .init_machine = mx21ads_board_init, | 292 | .init_machine = mx21ads_board_init, |
diff --git a/arch/arm/mach-mx2/mx27pdk.c b/arch/arm/mach-mx2/mach-mx27_3ds.c index 6761d1b79e43..b2f4e0db3fb3 100644 --- a/arch/arm/mach-mx2/mx27pdk.c +++ b/arch/arm/mach-mx2/mach-mx27_3ds.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include <mach/hardware.h> | 26 | #include <mach/hardware.h> |
27 | #include <mach/common.h> | 27 | #include <mach/common.h> |
28 | #include <mach/imx-uart.h> | 28 | #include <mach/imx-uart.h> |
29 | #include <mach/iomux.h> | 29 | #include <mach/iomux-mx27.h> |
30 | #include <mach/board-mx27pdk.h> | 30 | #include <mach/board-mx27pdk.h> |
31 | 31 | ||
32 | #include "devices.h" | 32 | #include "devices.h" |
@@ -85,9 +85,9 @@ static struct sys_timer mx27pdk_timer = { | |||
85 | 85 | ||
86 | MACHINE_START(MX27_3DS, "Freescale MX27PDK") | 86 | MACHINE_START(MX27_3DS, "Freescale MX27PDK") |
87 | /* maintainer: Freescale Semiconductor, Inc. */ | 87 | /* maintainer: Freescale Semiconductor, Inc. */ |
88 | .phys_io = AIPI_BASE_ADDR, | 88 | .phys_io = MX27_AIPI_BASE_ADDR, |
89 | .io_pg_offst = ((AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc, | 89 | .io_pg_offst = ((MX27_AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc, |
90 | .boot_params = PHYS_OFFSET + 0x100, | 90 | .boot_params = MX27_PHYS_OFFSET + 0x100, |
91 | .map_io = mx27_map_io, | 91 | .map_io = mx27_map_io, |
92 | .init_irq = mx27_init_irq, | 92 | .init_irq = mx27_init_irq, |
93 | .init_machine = mx27pdk_init, | 93 | .init_machine = mx27pdk_init, |
diff --git a/arch/arm/mach-mx2/mx27ads.c b/arch/arm/mach-mx2/mach-mx27ads.c index 83e412b713e6..6ce323669e58 100644 --- a/arch/arm/mach-mx2/mx27ads.c +++ b/arch/arm/mach-mx2/mach-mx27ads.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #include <asm/mach/map.h> | 33 | #include <asm/mach/map.h> |
34 | #include <mach/gpio.h> | 34 | #include <mach/gpio.h> |
35 | #include <mach/imx-uart.h> | 35 | #include <mach/imx-uart.h> |
36 | #include <mach/iomux.h> | 36 | #include <mach/iomux-mx27.h> |
37 | #include <mach/board-mx27ads.h> | 37 | #include <mach/board-mx27ads.h> |
38 | #include <mach/mxc_nand.h> | 38 | #include <mach/mxc_nand.h> |
39 | #include <mach/i2c.h> | 39 | #include <mach/i2c.h> |
@@ -290,7 +290,7 @@ static void __init mx27ads_board_init(void) | |||
290 | mxc_register_device(&mxc_uart_device3, &uart_pdata[3]); | 290 | mxc_register_device(&mxc_uart_device3, &uart_pdata[3]); |
291 | mxc_register_device(&mxc_uart_device4, &uart_pdata[4]); | 291 | mxc_register_device(&mxc_uart_device4, &uart_pdata[4]); |
292 | mxc_register_device(&mxc_uart_device5, &uart_pdata[5]); | 292 | mxc_register_device(&mxc_uart_device5, &uart_pdata[5]); |
293 | mxc_register_device(&mxc_nand_device, &mx27ads_nand_board_info); | 293 | mxc_register_device(&imx27_nand_device, &mx27ads_nand_board_info); |
294 | 294 | ||
295 | /* only the i2c master 1 is used on this CPU card */ | 295 | /* only the i2c master 1 is used on this CPU card */ |
296 | i2c_register_board_info(1, mx27ads_i2c_devices, | 296 | i2c_register_board_info(1, mx27ads_i2c_devices, |
@@ -320,7 +320,7 @@ static struct sys_timer mx27ads_timer = { | |||
320 | static struct map_desc mx27ads_io_desc[] __initdata = { | 320 | static struct map_desc mx27ads_io_desc[] __initdata = { |
321 | { | 321 | { |
322 | .virtual = PBC_BASE_ADDRESS, | 322 | .virtual = PBC_BASE_ADDRESS, |
323 | .pfn = __phys_to_pfn(CS4_BASE_ADDR), | 323 | .pfn = __phys_to_pfn(MX27_CS4_BASE_ADDR), |
324 | .length = SZ_1M, | 324 | .length = SZ_1M, |
325 | .type = MT_DEVICE, | 325 | .type = MT_DEVICE, |
326 | }, | 326 | }, |
@@ -334,9 +334,9 @@ static void __init mx27ads_map_io(void) | |||
334 | 334 | ||
335 | MACHINE_START(MX27ADS, "Freescale i.MX27ADS") | 335 | MACHINE_START(MX27ADS, "Freescale i.MX27ADS") |
336 | /* maintainer: Freescale Semiconductor, Inc. */ | 336 | /* maintainer: Freescale Semiconductor, Inc. */ |
337 | .phys_io = AIPI_BASE_ADDR, | 337 | .phys_io = MX27_AIPI_BASE_ADDR, |
338 | .io_pg_offst = ((AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc, | 338 | .io_pg_offst = ((MX27_AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc, |
339 | .boot_params = PHYS_OFFSET + 0x100, | 339 | .boot_params = MX27_PHYS_OFFSET + 0x100, |
340 | .map_io = mx27ads_map_io, | 340 | .map_io = mx27ads_map_io, |
341 | .init_irq = mx27_init_irq, | 341 | .init_irq = mx27_init_irq, |
342 | .init_machine = mx27ads_board_init, | 342 | .init_machine = mx27ads_board_init, |
diff --git a/arch/arm/mach-mx2/mxt_td60.c b/arch/arm/mach-mx2/mach-mxt_td60.c index 8bcc1a5b8829..bc3855992677 100644 --- a/arch/arm/mach-mx2/mxt_td60.c +++ b/arch/arm/mach-mx2/mach-mxt_td60.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #include <asm/mach/map.h> | 33 | #include <asm/mach/map.h> |
34 | #include <linux/gpio.h> | 34 | #include <linux/gpio.h> |
35 | #include <mach/imx-uart.h> | 35 | #include <mach/imx-uart.h> |
36 | #include <mach/iomux.h> | 36 | #include <mach/iomux-mx27.h> |
37 | #include <mach/mxc_nand.h> | 37 | #include <mach/mxc_nand.h> |
38 | #include <mach/i2c.h> | 38 | #include <mach/i2c.h> |
39 | #include <linux/i2c/pca953x.h> | 39 | #include <linux/i2c/pca953x.h> |
@@ -257,7 +257,7 @@ static void __init mxt_td60_board_init(void) | |||
257 | mxc_register_device(&mxc_uart_device0, &uart_pdata[0]); | 257 | mxc_register_device(&mxc_uart_device0, &uart_pdata[0]); |
258 | mxc_register_device(&mxc_uart_device1, &uart_pdata[1]); | 258 | mxc_register_device(&mxc_uart_device1, &uart_pdata[1]); |
259 | mxc_register_device(&mxc_uart_device2, &uart_pdata[2]); | 259 | mxc_register_device(&mxc_uart_device2, &uart_pdata[2]); |
260 | mxc_register_device(&mxc_nand_device, &mxt_td60_nand_board_info); | 260 | mxc_register_device(&imx27_nand_device, &mxt_td60_nand_board_info); |
261 | 261 | ||
262 | i2c_register_board_info(0, mxt_td60_i2c_devices, | 262 | i2c_register_board_info(0, mxt_td60_i2c_devices, |
263 | ARRAY_SIZE(mxt_td60_i2c_devices)); | 263 | ARRAY_SIZE(mxt_td60_i2c_devices)); |
@@ -284,9 +284,9 @@ static struct sys_timer mxt_td60_timer = { | |||
284 | 284 | ||
285 | MACHINE_START(MXT_TD60, "Maxtrack i-MXT TD60") | 285 | MACHINE_START(MXT_TD60, "Maxtrack i-MXT TD60") |
286 | /* maintainer: Maxtrack Industrial */ | 286 | /* maintainer: Maxtrack Industrial */ |
287 | .phys_io = AIPI_BASE_ADDR, | 287 | .phys_io = MX27_AIPI_BASE_ADDR, |
288 | .io_pg_offst = ((AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc, | 288 | .io_pg_offst = ((MX27_AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc, |
289 | .boot_params = PHYS_OFFSET + 0x100, | 289 | .boot_params = MX27_PHYS_OFFSET + 0x100, |
290 | .map_io = mx27_map_io, | 290 | .map_io = mx27_map_io, |
291 | .init_irq = mx27_init_irq, | 291 | .init_irq = mx27_init_irq, |
292 | .init_machine = mxt_td60_board_init, | 292 | .init_machine = mxt_td60_board_init, |
diff --git a/arch/arm/mach-mx2/pca100.c b/arch/arm/mach-mx2/mach-pca100.c index aea3d340d2e1..778fff230918 100644 --- a/arch/arm/mach-mx2/pca100.c +++ b/arch/arm/mach-mx2/mach-pca100.c | |||
@@ -25,25 +25,36 @@ | |||
25 | #include <linux/spi/spi.h> | 25 | #include <linux/spi/spi.h> |
26 | #include <linux/spi/eeprom.h> | 26 | #include <linux/spi/eeprom.h> |
27 | #include <linux/irq.h> | 27 | #include <linux/irq.h> |
28 | #include <linux/delay.h> | ||
28 | #include <linux/gpio.h> | 29 | #include <linux/gpio.h> |
30 | #include <linux/usb/otg.h> | ||
31 | #include <linux/usb/ulpi.h> | ||
32 | #include <linux/fsl_devices.h> | ||
29 | 33 | ||
30 | #include <asm/mach/arch.h> | 34 | #include <asm/mach/arch.h> |
31 | #include <asm/mach-types.h> | 35 | #include <asm/mach-types.h> |
32 | #include <mach/common.h> | 36 | #include <mach/common.h> |
33 | #include <mach/hardware.h> | 37 | #include <mach/hardware.h> |
34 | #include <mach/iomux.h> | 38 | #include <mach/iomux-mx27.h> |
35 | #include <mach/i2c.h> | 39 | #include <mach/i2c.h> |
36 | #include <asm/mach/time.h> | 40 | #include <asm/mach/time.h> |
37 | #if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE) | 41 | #if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE) |
38 | #include <mach/spi.h> | 42 | #include <mach/spi.h> |
39 | #endif | 43 | #endif |
40 | #include <mach/imx-uart.h> | 44 | #include <mach/imx-uart.h> |
45 | #include <mach/audmux.h> | ||
46 | #include <mach/ssi.h> | ||
41 | #include <mach/mxc_nand.h> | 47 | #include <mach/mxc_nand.h> |
42 | #include <mach/irqs.h> | 48 | #include <mach/irqs.h> |
43 | #include <mach/mmc.h> | 49 | #include <mach/mmc.h> |
50 | #include <mach/mxc_ehci.h> | ||
51 | #include <mach/ulpi.h> | ||
44 | 52 | ||
45 | #include "devices.h" | 53 | #include "devices.h" |
46 | 54 | ||
55 | #define OTG_PHY_CS_GPIO (GPIO_PORTB + 23) | ||
56 | #define USBH2_PHY_CS_GPIO (GPIO_PORTB + 24) | ||
57 | |||
47 | static int pca100_pins[] = { | 58 | static int pca100_pins[] = { |
48 | /* UART1 */ | 59 | /* UART1 */ |
49 | PE12_PF_UART1_TXD, | 60 | PE12_PF_UART1_TXD, |
@@ -92,6 +103,34 @@ static int pca100_pins[] = { | |||
92 | PD29_PF_CSPI1_SCLK, | 103 | PD29_PF_CSPI1_SCLK, |
93 | PD30_PF_CSPI1_MISO, | 104 | PD30_PF_CSPI1_MISO, |
94 | PD31_PF_CSPI1_MOSI, | 105 | PD31_PF_CSPI1_MOSI, |
106 | /* OTG */ | ||
107 | OTG_PHY_CS_GPIO | GPIO_GPIO | GPIO_OUT, | ||
108 | PC7_PF_USBOTG_DATA5, | ||
109 | PC8_PF_USBOTG_DATA6, | ||
110 | PC9_PF_USBOTG_DATA0, | ||
111 | PC10_PF_USBOTG_DATA2, | ||
112 | PC11_PF_USBOTG_DATA1, | ||
113 | PC12_PF_USBOTG_DATA4, | ||
114 | PC13_PF_USBOTG_DATA3, | ||
115 | PE0_PF_USBOTG_NXT, | ||
116 | PE1_PF_USBOTG_STP, | ||
117 | PE2_PF_USBOTG_DIR, | ||
118 | PE24_PF_USBOTG_CLK, | ||
119 | PE25_PF_USBOTG_DATA7, | ||
120 | /* USBH2 */ | ||
121 | USBH2_PHY_CS_GPIO | GPIO_GPIO | GPIO_OUT, | ||
122 | PA0_PF_USBH2_CLK, | ||
123 | PA1_PF_USBH2_DIR, | ||
124 | PA2_PF_USBH2_DATA7, | ||
125 | PA3_PF_USBH2_NXT, | ||
126 | PA4_PF_USBH2_STP, | ||
127 | PD19_AF_USBH2_DATA4, | ||
128 | PD20_AF_USBH2_DATA3, | ||
129 | PD21_AF_USBH2_DATA6, | ||
130 | PD22_AF_USBH2_DATA0, | ||
131 | PD23_AF_USBH2_DATA2, | ||
132 | PD24_AF_USBH2_DATA1, | ||
133 | PD26_AF_USBH2_DATA5, | ||
95 | }; | 134 | }; |
96 | 135 | ||
97 | static struct imxuart_platform_data uart_pdata = { | 136 | static struct imxuart_platform_data uart_pdata = { |
@@ -157,6 +196,37 @@ static struct spi_imx_master pca100_spi_0_data = { | |||
157 | }; | 196 | }; |
158 | #endif | 197 | #endif |
159 | 198 | ||
199 | static void pca100_ac97_warm_reset(struct snd_ac97 *ac97) | ||
200 | { | ||
201 | mxc_gpio_mode(GPIO_PORTC | 20 | GPIO_GPIO | GPIO_OUT); | ||
202 | gpio_set_value(GPIO_PORTC + 20, 1); | ||
203 | udelay(2); | ||
204 | gpio_set_value(GPIO_PORTC + 20, 0); | ||
205 | mxc_gpio_mode(PC20_PF_SSI1_FS); | ||
206 | msleep(2); | ||
207 | } | ||
208 | |||
209 | static void pca100_ac97_cold_reset(struct snd_ac97 *ac97) | ||
210 | { | ||
211 | mxc_gpio_mode(GPIO_PORTC | 20 | GPIO_GPIO | GPIO_OUT); /* FS */ | ||
212 | gpio_set_value(GPIO_PORTC + 20, 0); | ||
213 | mxc_gpio_mode(GPIO_PORTC | 22 | GPIO_GPIO | GPIO_OUT); /* TX */ | ||
214 | gpio_set_value(GPIO_PORTC + 22, 0); | ||
215 | mxc_gpio_mode(GPIO_PORTC | 28 | GPIO_GPIO | GPIO_OUT); /* reset */ | ||
216 | gpio_set_value(GPIO_PORTC + 28, 0); | ||
217 | udelay(10); | ||
218 | gpio_set_value(GPIO_PORTC + 28, 1); | ||
219 | mxc_gpio_mode(PC20_PF_SSI1_FS); | ||
220 | mxc_gpio_mode(PC22_PF_SSI1_TXD); | ||
221 | msleep(2); | ||
222 | } | ||
223 | |||
224 | static struct imx_ssi_platform_data pca100_ssi_pdata = { | ||
225 | .ac97_reset = pca100_ac97_cold_reset, | ||
226 | .ac97_warm_reset = pca100_ac97_warm_reset, | ||
227 | .flags = IMX_SSI_USE_AC97, | ||
228 | }; | ||
229 | |||
160 | static int pca100_sdhc2_init(struct device *dev, irq_handler_t detect_irq, | 230 | static int pca100_sdhc2_init(struct device *dev, irq_handler_t detect_irq, |
161 | void *data) | 231 | void *data) |
162 | { | 232 | { |
@@ -182,21 +252,79 @@ static struct imxmmc_platform_data sdhc_pdata = { | |||
182 | .exit = pca100_sdhc2_exit, | 252 | .exit = pca100_sdhc2_exit, |
183 | }; | 253 | }; |
184 | 254 | ||
255 | static int otg_phy_init(struct platform_device *pdev) | ||
256 | { | ||
257 | gpio_set_value(OTG_PHY_CS_GPIO, 0); | ||
258 | return 0; | ||
259 | } | ||
260 | |||
261 | static struct mxc_usbh_platform_data otg_pdata = { | ||
262 | .init = otg_phy_init, | ||
263 | .portsc = MXC_EHCI_MODE_ULPI, | ||
264 | .flags = MXC_EHCI_INTERFACE_DIFF_UNI, | ||
265 | }; | ||
266 | |||
267 | static int usbh2_phy_init(struct platform_device *pdev) | ||
268 | { | ||
269 | gpio_set_value(USBH2_PHY_CS_GPIO, 0); | ||
270 | return 0; | ||
271 | } | ||
272 | |||
273 | static struct mxc_usbh_platform_data usbh2_pdata = { | ||
274 | .init = usbh2_phy_init, | ||
275 | .portsc = MXC_EHCI_MODE_ULPI, | ||
276 | .flags = MXC_EHCI_INTERFACE_DIFF_UNI, | ||
277 | }; | ||
278 | |||
279 | static struct fsl_usb2_platform_data otg_device_pdata = { | ||
280 | .operating_mode = FSL_USB2_DR_DEVICE, | ||
281 | .phy_mode = FSL_USB2_PHY_ULPI, | ||
282 | }; | ||
283 | |||
284 | static int otg_mode_host; | ||
285 | |||
286 | static int __init pca100_otg_mode(char *options) | ||
287 | { | ||
288 | if (!strcmp(options, "host")) | ||
289 | otg_mode_host = 1; | ||
290 | else if (!strcmp(options, "device")) | ||
291 | otg_mode_host = 0; | ||
292 | else | ||
293 | pr_info("otg_mode neither \"host\" nor \"device\". " | ||
294 | "Defaulting to device\n"); | ||
295 | return 0; | ||
296 | } | ||
297 | __setup("otg_mode=", pca100_otg_mode); | ||
298 | |||
185 | static void __init pca100_init(void) | 299 | static void __init pca100_init(void) |
186 | { | 300 | { |
187 | int ret; | 301 | int ret; |
188 | 302 | ||
303 | /* SSI unit */ | ||
304 | mxc_audmux_v1_configure_port(MX27_AUDMUX_HPCR1_SSI0, | ||
305 | MXC_AUDMUX_V1_PCR_SYN | /* 4wire mode */ | ||
306 | MXC_AUDMUX_V1_PCR_TFCSEL(3) | | ||
307 | MXC_AUDMUX_V1_PCR_TCLKDIR | /* clock is output */ | ||
308 | MXC_AUDMUX_V1_PCR_RXDSEL(3)); | ||
309 | mxc_audmux_v1_configure_port(3, | ||
310 | MXC_AUDMUX_V1_PCR_SYN | /* 4wire mode */ | ||
311 | MXC_AUDMUX_V1_PCR_TFCSEL(0) | | ||
312 | MXC_AUDMUX_V1_PCR_TFSDIR | | ||
313 | MXC_AUDMUX_V1_PCR_RXDSEL(0)); | ||
314 | |||
189 | ret = mxc_gpio_setup_multiple_pins(pca100_pins, | 315 | ret = mxc_gpio_setup_multiple_pins(pca100_pins, |
190 | ARRAY_SIZE(pca100_pins), "PCA100"); | 316 | ARRAY_SIZE(pca100_pins), "PCA100"); |
191 | if (ret) | 317 | if (ret) |
192 | printk(KERN_ERR "pca100: Failed to setup pins (%d)\n", ret); | 318 | printk(KERN_ERR "pca100: Failed to setup pins (%d)\n", ret); |
193 | 319 | ||
320 | mxc_register_device(&imx_ssi_device0, &pca100_ssi_pdata); | ||
321 | |||
194 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 322 | mxc_register_device(&mxc_uart_device0, &uart_pdata); |
195 | 323 | ||
196 | mxc_gpio_mode(GPIO_PORTC | 29 | GPIO_GPIO | GPIO_IN); | 324 | mxc_gpio_mode(GPIO_PORTC | 29 | GPIO_GPIO | GPIO_IN); |
197 | mxc_register_device(&mxc_sdhc_device1, &sdhc_pdata); | 325 | mxc_register_device(&mxc_sdhc_device1, &sdhc_pdata); |
198 | 326 | ||
199 | mxc_register_device(&mxc_nand_device, &pca100_nand_board_info); | 327 | mxc_register_device(&imx27_nand_device, &pca100_nand_board_info); |
200 | 328 | ||
201 | /* only the i2c master 1 is used on this CPU card */ | 329 | /* only the i2c master 1 is used on this CPU card */ |
202 | i2c_register_board_info(1, pca100_i2c_devices, | 330 | i2c_register_board_info(1, pca100_i2c_devices, |
@@ -220,6 +348,29 @@ static void __init pca100_init(void) | |||
220 | mxc_register_device(&mxc_spi_device0, &pca100_spi_0_data); | 348 | mxc_register_device(&mxc_spi_device0, &pca100_spi_0_data); |
221 | #endif | 349 | #endif |
222 | 350 | ||
351 | gpio_request(OTG_PHY_CS_GPIO, "usb-otg-cs"); | ||
352 | gpio_direction_output(OTG_PHY_CS_GPIO, 1); | ||
353 | gpio_request(USBH2_PHY_CS_GPIO, "usb-host2-cs"); | ||
354 | gpio_direction_output(USBH2_PHY_CS_GPIO, 1); | ||
355 | |||
356 | #if defined(CONFIG_USB_ULPI) | ||
357 | if (otg_mode_host) { | ||
358 | otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, | ||
359 | USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); | ||
360 | |||
361 | mxc_register_device(&mxc_otg_host, &otg_pdata); | ||
362 | } | ||
363 | |||
364 | usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, | ||
365 | USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); | ||
366 | |||
367 | mxc_register_device(&mxc_usbh2, &usbh2_pdata); | ||
368 | #endif | ||
369 | if (!otg_mode_host) { | ||
370 | gpio_set_value(OTG_PHY_CS_GPIO, 0); | ||
371 | mxc_register_device(&mxc_otg_udc_device, &otg_device_pdata); | ||
372 | } | ||
373 | |||
223 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 374 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
224 | } | 375 | } |
225 | 376 | ||
@@ -233,9 +384,9 @@ static struct sys_timer pca100_timer = { | |||
233 | }; | 384 | }; |
234 | 385 | ||
235 | MACHINE_START(PCA100, "phyCARD-i.MX27") | 386 | MACHINE_START(PCA100, "phyCARD-i.MX27") |
236 | .phys_io = AIPI_BASE_ADDR, | 387 | .phys_io = MX27_AIPI_BASE_ADDR, |
237 | .io_pg_offst = ((AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc, | 388 | .io_pg_offst = ((MX27_AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc, |
238 | .boot_params = PHYS_OFFSET + 0x100, | 389 | .boot_params = MX27_PHYS_OFFSET + 0x100, |
239 | .map_io = mx27_map_io, | 390 | .map_io = mx27_map_io, |
240 | .init_irq = mx27_init_irq, | 391 | .init_irq = mx27_init_irq, |
241 | .init_machine = pca100_init, | 392 | .init_machine = pca100_init, |
diff --git a/arch/arm/mach-mx2/pcm038.c b/arch/arm/mach-mx2/mach-pcm038.c index 906d59b0a7aa..035fbe046ec0 100644 --- a/arch/arm/mach-mx2/pcm038.c +++ b/arch/arm/mach-mx2/mach-pcm038.c | |||
@@ -36,10 +36,12 @@ | |||
36 | #include <mach/common.h> | 36 | #include <mach/common.h> |
37 | #include <mach/hardware.h> | 37 | #include <mach/hardware.h> |
38 | #include <mach/i2c.h> | 38 | #include <mach/i2c.h> |
39 | #include <mach/iomux.h> | 39 | #include <mach/iomux-mx27.h> |
40 | #include <mach/imx-uart.h> | 40 | #include <mach/imx-uart.h> |
41 | #include <mach/mxc_nand.h> | 41 | #include <mach/mxc_nand.h> |
42 | #include <mach/spi.h> | 42 | #include <mach/spi.h> |
43 | #include <mach/mxc_ehci.h> | ||
44 | #include <mach/ulpi.h> | ||
43 | 45 | ||
44 | #include "devices.h" | 46 | #include "devices.h" |
45 | 47 | ||
@@ -96,6 +98,19 @@ static int pcm038_pins[] = { | |||
96 | PC17_PF_SSI4_RXD, | 98 | PC17_PF_SSI4_RXD, |
97 | PC18_PF_SSI4_TXD, | 99 | PC18_PF_SSI4_TXD, |
98 | PC19_PF_SSI4_CLK, | 100 | PC19_PF_SSI4_CLK, |
101 | /* USB host */ | ||
102 | PA0_PF_USBH2_CLK, | ||
103 | PA1_PF_USBH2_DIR, | ||
104 | PA2_PF_USBH2_DATA7, | ||
105 | PA3_PF_USBH2_NXT, | ||
106 | PA4_PF_USBH2_STP, | ||
107 | PD19_AF_USBH2_DATA4, | ||
108 | PD20_AF_USBH2_DATA3, | ||
109 | PD21_AF_USBH2_DATA6, | ||
110 | PD22_AF_USBH2_DATA0, | ||
111 | PD23_AF_USBH2_DATA2, | ||
112 | PD24_AF_USBH2_DATA1, | ||
113 | PD26_AF_USBH2_DATA5, | ||
99 | }; | 114 | }; |
100 | 115 | ||
101 | /* | 116 | /* |
@@ -108,8 +123,8 @@ static struct platdata_mtd_ram pcm038_sram_data = { | |||
108 | }; | 123 | }; |
109 | 124 | ||
110 | static struct resource pcm038_sram_resource = { | 125 | static struct resource pcm038_sram_resource = { |
111 | .start = CS1_BASE_ADDR, | 126 | .start = MX27_CS1_BASE_ADDR, |
112 | .end = CS1_BASE_ADDR + 512 * 1024 - 1, | 127 | .end = MX27_CS1_BASE_ADDR + 512 * 1024 - 1, |
113 | .flags = IORESOURCE_MEM, | 128 | .flags = IORESOURCE_MEM, |
114 | }; | 129 | }; |
115 | 130 | ||
@@ -173,9 +188,7 @@ static struct platform_device *platform_devices[] __initdata = { | |||
173 | * setup other stuffs to access the sram. */ | 188 | * setup other stuffs to access the sram. */ |
174 | static void __init pcm038_init_sram(void) | 189 | static void __init pcm038_init_sram(void) |
175 | { | 190 | { |
176 | __raw_writel(0x0000d843, CSCR_U(1)); | 191 | mx27_setup_weimcs(1, 0x0000d843, 0x22252521, 0x22220a00); |
177 | __raw_writel(0x22252521, CSCR_L(1)); | ||
178 | __raw_writel(0x22220a00, CSCR_A(1)); | ||
179 | } | 192 | } |
180 | 193 | ||
181 | static struct imxi2c_platform_data pcm038_i2c_1_data = { | 194 | static struct imxi2c_platform_data pcm038_i2c_1_data = { |
@@ -279,6 +292,11 @@ static struct spi_board_info pcm038_spi_board_info[] __initdata = { | |||
279 | } | 292 | } |
280 | }; | 293 | }; |
281 | 294 | ||
295 | static struct mxc_usbh_platform_data usbh2_pdata = { | ||
296 | .portsc = MXC_EHCI_MODE_ULPI, | ||
297 | .flags = MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_INTERFACE_DIFF_UNI, | ||
298 | }; | ||
299 | |||
282 | static void __init pcm038_init(void) | 300 | static void __init pcm038_init(void) |
283 | { | 301 | { |
284 | mxc_gpio_setup_multiple_pins(pcm038_pins, ARRAY_SIZE(pcm038_pins), | 302 | mxc_gpio_setup_multiple_pins(pcm038_pins, ARRAY_SIZE(pcm038_pins), |
@@ -291,7 +309,7 @@ static void __init pcm038_init(void) | |||
291 | mxc_register_device(&mxc_uart_device2, &uart_pdata[2]); | 309 | mxc_register_device(&mxc_uart_device2, &uart_pdata[2]); |
292 | 310 | ||
293 | mxc_gpio_mode(PE16_AF_OWIRE); | 311 | mxc_gpio_mode(PE16_AF_OWIRE); |
294 | mxc_register_device(&mxc_nand_device, &pcm038_nand_board_info); | 312 | mxc_register_device(&imx27_nand_device, &pcm038_nand_board_info); |
295 | 313 | ||
296 | /* only the i2c master 1 is used on this CPU card */ | 314 | /* only the i2c master 1 is used on this CPU card */ |
297 | i2c_register_board_info(1, pcm038_i2c_devices, | 315 | i2c_register_board_info(1, pcm038_i2c_devices, |
@@ -311,6 +329,8 @@ static void __init pcm038_init(void) | |||
311 | spi_register_board_info(pcm038_spi_board_info, | 329 | spi_register_board_info(pcm038_spi_board_info, |
312 | ARRAY_SIZE(pcm038_spi_board_info)); | 330 | ARRAY_SIZE(pcm038_spi_board_info)); |
313 | 331 | ||
332 | mxc_register_device(&mxc_usbh2, &usbh2_pdata); | ||
333 | |||
314 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 334 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
315 | 335 | ||
316 | #ifdef CONFIG_MACH_PCM970_BASEBOARD | 336 | #ifdef CONFIG_MACH_PCM970_BASEBOARD |
@@ -328,9 +348,9 @@ static struct sys_timer pcm038_timer = { | |||
328 | }; | 348 | }; |
329 | 349 | ||
330 | MACHINE_START(PCM038, "phyCORE-i.MX27") | 350 | MACHINE_START(PCM038, "phyCORE-i.MX27") |
331 | .phys_io = AIPI_BASE_ADDR, | 351 | .phys_io = MX27_AIPI_BASE_ADDR, |
332 | .io_pg_offst = ((AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc, | 352 | .io_pg_offst = ((MX27_AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc, |
333 | .boot_params = PHYS_OFFSET + 0x100, | 353 | .boot_params = MX27_PHYS_OFFSET + 0x100, |
334 | .map_io = mx27_map_io, | 354 | .map_io = mx27_map_io, |
335 | .init_irq = mx27_init_irq, | 355 | .init_irq = mx27_init_irq, |
336 | .init_machine = pcm038_init, | 356 | .init_machine = pcm038_init, |
diff --git a/arch/arm/mach-mx2/mm-imx21.c b/arch/arm/mach-mx2/mm-imx21.c new file mode 100644 index 000000000000..64134314d012 --- /dev/null +++ b/arch/arm/mach-mx2/mm-imx21.c | |||
@@ -0,0 +1,83 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-mx2/mm-imx21.c | ||
3 | * | ||
4 | * Copyright (C) 2008 Juergen Beisert (kernel@pengutronix.de) | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version 2 | ||
9 | * of the License, or (at your option) any later version. | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
18 | * MA 02110-1301, USA. | ||
19 | */ | ||
20 | |||
21 | #include <linux/mm.h> | ||
22 | #include <linux/init.h> | ||
23 | #include <mach/hardware.h> | ||
24 | #include <mach/common.h> | ||
25 | #include <asm/pgtable.h> | ||
26 | #include <asm/mach/map.h> | ||
27 | |||
28 | /* MX21 memory map definition */ | ||
29 | static struct map_desc imx21_io_desc[] __initdata = { | ||
30 | /* | ||
31 | * this fixed mapping covers: | ||
32 | * - AIPI1 | ||
33 | * - AIPI2 | ||
34 | * - AITC | ||
35 | * - ROM Patch | ||
36 | * - and some reserved space | ||
37 | */ | ||
38 | { | ||
39 | .virtual = MX21_AIPI_BASE_ADDR_VIRT, | ||
40 | .pfn = __phys_to_pfn(MX21_AIPI_BASE_ADDR), | ||
41 | .length = MX21_AIPI_SIZE, | ||
42 | .type = MT_DEVICE | ||
43 | }, | ||
44 | /* | ||
45 | * this fixed mapping covers: | ||
46 | * - CSI | ||
47 | * - ATA | ||
48 | */ | ||
49 | { | ||
50 | .virtual = MX21_SAHB1_BASE_ADDR_VIRT, | ||
51 | .pfn = __phys_to_pfn(MX21_SAHB1_BASE_ADDR), | ||
52 | .length = MX21_SAHB1_SIZE, | ||
53 | .type = MT_DEVICE | ||
54 | }, | ||
55 | /* | ||
56 | * this fixed mapping covers: | ||
57 | * - EMI | ||
58 | */ | ||
59 | { | ||
60 | .virtual = MX21_X_MEMC_BASE_ADDR_VIRT, | ||
61 | .pfn = __phys_to_pfn(MX21_X_MEMC_BASE_ADDR), | ||
62 | .length = MX21_X_MEMC_SIZE, | ||
63 | .type = MT_DEVICE | ||
64 | }, | ||
65 | }; | ||
66 | |||
67 | /* | ||
68 | * Initialize the memory map. It is called during the | ||
69 | * system startup to create static physical to virtual | ||
70 | * memory map for the IO modules. | ||
71 | */ | ||
72 | void __init mx21_map_io(void) | ||
73 | { | ||
74 | mxc_set_cpu_type(MXC_CPU_MX21); | ||
75 | mxc_arch_reset_init(MX21_IO_ADDRESS(MX21_WDOG_BASE_ADDR)); | ||
76 | |||
77 | iotable_init(imx21_io_desc, ARRAY_SIZE(imx21_io_desc)); | ||
78 | } | ||
79 | |||
80 | void __init mx21_init_irq(void) | ||
81 | { | ||
82 | mxc_init_irq(MX21_IO_ADDRESS(MX21_AVIC_BASE_ADDR)); | ||
83 | } | ||
diff --git a/arch/arm/mach-mx2/generic.c b/arch/arm/mach-mx2/mm-imx27.c index ae8f759134d1..3366ed44cfd5 100644 --- a/arch/arm/mach-mx2/generic.c +++ b/arch/arm/mach-mx2/mm-imx27.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * generic.c | 2 | * arch/arm/mach-mx2/mm-imx27.c |
3 | * | 3 | * |
4 | * Copyright (C) 2008 Juergen Beisert (kernel@pengutronix.de) | 4 | * Copyright (C) 2008 Juergen Beisert (kernel@pengutronix.de) |
5 | * | 5 | * |
@@ -26,7 +26,7 @@ | |||
26 | #include <asm/mach/map.h> | 26 | #include <asm/mach/map.h> |
27 | 27 | ||
28 | /* MX27 memory map definition */ | 28 | /* MX27 memory map definition */ |
29 | static struct map_desc mxc_io_desc[] __initdata = { | 29 | static struct map_desc imx27_io_desc[] __initdata = { |
30 | /* | 30 | /* |
31 | * this fixed mapping covers: | 31 | * this fixed mapping covers: |
32 | * - AIPI1 | 32 | * - AIPI1 |
@@ -36,9 +36,9 @@ static struct map_desc mxc_io_desc[] __initdata = { | |||
36 | * - and some reserved space | 36 | * - and some reserved space |
37 | */ | 37 | */ |
38 | { | 38 | { |
39 | .virtual = AIPI_BASE_ADDR_VIRT, | 39 | .virtual = MX27_AIPI_BASE_ADDR_VIRT, |
40 | .pfn = __phys_to_pfn(AIPI_BASE_ADDR), | 40 | .pfn = __phys_to_pfn(MX27_AIPI_BASE_ADDR), |
41 | .length = AIPI_SIZE, | 41 | .length = MX27_AIPI_SIZE, |
42 | .type = MT_DEVICE | 42 | .type = MT_DEVICE |
43 | }, | 43 | }, |
44 | /* | 44 | /* |
@@ -47,9 +47,9 @@ static struct map_desc mxc_io_desc[] __initdata = { | |||
47 | * - ATA | 47 | * - ATA |
48 | */ | 48 | */ |
49 | { | 49 | { |
50 | .virtual = SAHB1_BASE_ADDR_VIRT, | 50 | .virtual = MX27_SAHB1_BASE_ADDR_VIRT, |
51 | .pfn = __phys_to_pfn(SAHB1_BASE_ADDR), | 51 | .pfn = __phys_to_pfn(MX27_SAHB1_BASE_ADDR), |
52 | .length = SAHB1_SIZE, | 52 | .length = MX27_SAHB1_SIZE, |
53 | .type = MT_DEVICE | 53 | .type = MT_DEVICE |
54 | }, | 54 | }, |
55 | /* | 55 | /* |
@@ -57,11 +57,11 @@ static struct map_desc mxc_io_desc[] __initdata = { | |||
57 | * - EMI | 57 | * - EMI |
58 | */ | 58 | */ |
59 | { | 59 | { |
60 | .virtual = X_MEMC_BASE_ADDR_VIRT, | 60 | .virtual = MX27_X_MEMC_BASE_ADDR_VIRT, |
61 | .pfn = __phys_to_pfn(X_MEMC_BASE_ADDR), | 61 | .pfn = __phys_to_pfn(MX27_X_MEMC_BASE_ADDR), |
62 | .length = X_MEMC_SIZE, | 62 | .length = MX27_X_MEMC_SIZE, |
63 | .type = MT_DEVICE | 63 | .type = MT_DEVICE |
64 | } | 64 | }, |
65 | }; | 65 | }; |
66 | 66 | ||
67 | /* | 67 | /* |
@@ -69,29 +69,15 @@ 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 mx21_map_io(void) | ||
73 | { | ||
74 | mxc_set_cpu_type(MXC_CPU_MX21); | ||
75 | mxc_arch_reset_init(IO_ADDRESS(WDOG_BASE_ADDR)); | ||
76 | |||
77 | iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc)); | ||
78 | } | ||
79 | |||
80 | void __init mx27_map_io(void) | 72 | void __init mx27_map_io(void) |
81 | { | 73 | { |
82 | mxc_set_cpu_type(MXC_CPU_MX27); | 74 | mxc_set_cpu_type(MXC_CPU_MX27); |
83 | mxc_arch_reset_init(IO_ADDRESS(WDOG_BASE_ADDR)); | 75 | mxc_arch_reset_init(MX27_IO_ADDRESS(MX27_WDOG_BASE_ADDR)); |
84 | 76 | ||
85 | iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc)); | 77 | iotable_init(imx27_io_desc, ARRAY_SIZE(imx27_io_desc)); |
86 | } | 78 | } |
87 | 79 | ||
88 | void __init mx27_init_irq(void) | 80 | void __init mx27_init_irq(void) |
89 | { | 81 | { |
90 | mxc_init_irq(IO_ADDRESS(AVIC_BASE_ADDR)); | 82 | mxc_init_irq(MX27_IO_ADDRESS(MX27_AVIC_BASE_ADDR)); |
91 | } | 83 | } |
92 | |||
93 | void __init mx21_init_irq(void) | ||
94 | { | ||
95 | mx27_init_irq(); | ||
96 | } | ||
97 | |||
diff --git a/arch/arm/mach-mx2/pcm970-baseboard.c b/arch/arm/mach-mx2/pcm970-baseboard.c index 3cb7f457e5d0..4aafd5b8b85b 100644 --- a/arch/arm/mach-mx2/pcm970-baseboard.c +++ b/arch/arm/mach-mx2/pcm970-baseboard.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
25 | 25 | ||
26 | #include <mach/common.h> | 26 | #include <mach/common.h> |
27 | #include <mach/iomux.h> | 27 | #include <mach/iomux-mx27.h> |
28 | #include <mach/imxfb.h> | 28 | #include <mach/imxfb.h> |
29 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
30 | #include <mach/mmc.h> | 30 | #include <mach/mmc.h> |
@@ -190,8 +190,8 @@ static struct imx_fb_platform_data pcm038_fb_data = { | |||
190 | 190 | ||
191 | static struct resource pcm970_sja1000_resources[] = { | 191 | static struct resource pcm970_sja1000_resources[] = { |
192 | { | 192 | { |
193 | .start = CS4_BASE_ADDR, | 193 | .start = MX27_CS4_BASE_ADDR, |
194 | .end = CS4_BASE_ADDR + 0x100 - 1, | 194 | .end = MX27_CS4_BASE_ADDR + 0x100 - 1, |
195 | .flags = IORESOURCE_MEM, | 195 | .flags = IORESOURCE_MEM, |
196 | }, { | 196 | }, { |
197 | .start = IRQ_GPIOE(19), | 197 | .start = IRQ_GPIOE(19), |
diff --git a/arch/arm/mach-mx2/serial.c b/arch/arm/mach-mx2/serial.c index 40a485cdc10e..1c0c835b2252 100644 --- a/arch/arm/mach-mx2/serial.c +++ b/arch/arm/mach-mx2/serial.c | |||
@@ -26,12 +26,12 @@ | |||
26 | 26 | ||
27 | static struct resource uart0[] = { | 27 | static struct resource uart0[] = { |
28 | { | 28 | { |
29 | .start = UART1_BASE_ADDR, | 29 | .start = MX2x_UART1_BASE_ADDR, |
30 | .end = UART1_BASE_ADDR + 0x0B5, | 30 | .end = MX2x_UART1_BASE_ADDR + 0x0B5, |
31 | .flags = IORESOURCE_MEM, | 31 | .flags = IORESOURCE_MEM, |
32 | }, { | 32 | }, { |
33 | .start = MXC_INT_UART1, | 33 | .start = MX2x_INT_UART1, |
34 | .end = MXC_INT_UART1, | 34 | .end = MX2x_INT_UART1, |
35 | .flags = IORESOURCE_IRQ, | 35 | .flags = IORESOURCE_IRQ, |
36 | }, | 36 | }, |
37 | }; | 37 | }; |
@@ -45,12 +45,12 @@ struct platform_device mxc_uart_device0 = { | |||
45 | 45 | ||
46 | static struct resource uart1[] = { | 46 | static struct resource uart1[] = { |
47 | { | 47 | { |
48 | .start = UART2_BASE_ADDR, | 48 | .start = MX2x_UART2_BASE_ADDR, |
49 | .end = UART2_BASE_ADDR + 0x0B5, | 49 | .end = MX2x_UART2_BASE_ADDR + 0x0B5, |
50 | .flags = IORESOURCE_MEM, | 50 | .flags = IORESOURCE_MEM, |
51 | }, { | 51 | }, { |
52 | .start = MXC_INT_UART2, | 52 | .start = MX2x_INT_UART2, |
53 | .end = MXC_INT_UART2, | 53 | .end = MX2x_INT_UART2, |
54 | .flags = IORESOURCE_IRQ, | 54 | .flags = IORESOURCE_IRQ, |
55 | }, | 55 | }, |
56 | }; | 56 | }; |
@@ -64,12 +64,12 @@ struct platform_device mxc_uart_device1 = { | |||
64 | 64 | ||
65 | static struct resource uart2[] = { | 65 | static struct resource uart2[] = { |
66 | { | 66 | { |
67 | .start = UART3_BASE_ADDR, | 67 | .start = MX2x_UART3_BASE_ADDR, |
68 | .end = UART3_BASE_ADDR + 0x0B5, | 68 | .end = MX2x_UART3_BASE_ADDR + 0x0B5, |
69 | .flags = IORESOURCE_MEM, | 69 | .flags = IORESOURCE_MEM, |
70 | }, { | 70 | }, { |
71 | .start = MXC_INT_UART3, | 71 | .start = MX2x_INT_UART3, |
72 | .end = MXC_INT_UART3, | 72 | .end = MX2x_INT_UART3, |
73 | .flags = IORESOURCE_IRQ, | 73 | .flags = IORESOURCE_IRQ, |
74 | }, | 74 | }, |
75 | }; | 75 | }; |
@@ -83,12 +83,12 @@ struct platform_device mxc_uart_device2 = { | |||
83 | 83 | ||
84 | static struct resource uart3[] = { | 84 | static struct resource uart3[] = { |
85 | { | 85 | { |
86 | .start = UART4_BASE_ADDR, | 86 | .start = MX2x_UART4_BASE_ADDR, |
87 | .end = UART4_BASE_ADDR + 0x0B5, | 87 | .end = MX2x_UART4_BASE_ADDR + 0x0B5, |
88 | .flags = IORESOURCE_MEM, | 88 | .flags = IORESOURCE_MEM, |
89 | }, { | 89 | }, { |
90 | .start = MXC_INT_UART4, | 90 | .start = MX2x_INT_UART4, |
91 | .end = MXC_INT_UART4, | 91 | .end = MX2x_INT_UART4, |
92 | .flags = IORESOURCE_IRQ, | 92 | .flags = IORESOURCE_IRQ, |
93 | }, | 93 | }, |
94 | }; | 94 | }; |
@@ -103,12 +103,12 @@ struct platform_device mxc_uart_device3 = { | |||
103 | #ifdef CONFIG_MACH_MX27 | 103 | #ifdef CONFIG_MACH_MX27 |
104 | static struct resource uart4[] = { | 104 | static struct resource uart4[] = { |
105 | { | 105 | { |
106 | .start = UART5_BASE_ADDR, | 106 | .start = MX27_UART5_BASE_ADDR, |
107 | .end = UART5_BASE_ADDR + 0x0B5, | 107 | .end = MX27_UART5_BASE_ADDR + 0x0B5, |
108 | .flags = IORESOURCE_MEM, | 108 | .flags = IORESOURCE_MEM, |
109 | }, { | 109 | }, { |
110 | .start = MXC_INT_UART5, | 110 | .start = MX27_INT_UART5, |
111 | .end = MXC_INT_UART5, | 111 | .end = MX27_INT_UART5, |
112 | .flags = IORESOURCE_IRQ, | 112 | .flags = IORESOURCE_IRQ, |
113 | }, | 113 | }, |
114 | }; | 114 | }; |
@@ -122,12 +122,12 @@ struct platform_device mxc_uart_device4 = { | |||
122 | 122 | ||
123 | static struct resource uart5[] = { | 123 | static struct resource uart5[] = { |
124 | { | 124 | { |
125 | .start = UART6_BASE_ADDR, | 125 | .start = MX27_UART6_BASE_ADDR, |
126 | .end = UART6_BASE_ADDR + 0x0B5, | 126 | .end = MX27_UART6_BASE_ADDR + 0x0B5, |
127 | .flags = IORESOURCE_MEM, | 127 | .flags = IORESOURCE_MEM, |
128 | }, { | 128 | }, { |
129 | .start = MXC_INT_UART6, | 129 | .start = MX27_INT_UART6, |
130 | .end = MXC_INT_UART6, | 130 | .end = MX27_INT_UART6, |
131 | .flags = IORESOURCE_IRQ, | 131 | .flags = IORESOURCE_IRQ, |
132 | }, | 132 | }, |
133 | }; | 133 | }; |
diff --git a/arch/arm/mach-mx25/Kconfig b/arch/arm/mach-mx25/Kconfig index cc28f56eae80..54d217314ee9 100644 --- a/arch/arm/mach-mx25/Kconfig +++ b/arch/arm/mach-mx25/Kconfig | |||
@@ -3,7 +3,6 @@ if ARCH_MX25 | |||
3 | comment "MX25 platforms:" | 3 | comment "MX25 platforms:" |
4 | 4 | ||
5 | config MACH_MX25_3DS | 5 | config MACH_MX25_3DS |
6 | select ARCH_MXC_IOMUX_V3 | ||
7 | bool "Support MX25PDK (3DS) Platform" | 6 | bool "Support MX25PDK (3DS) Platform" |
8 | 7 | ||
9 | endif | 8 | endif |
diff --git a/arch/arm/mach-mx25/Makefile b/arch/arm/mach-mx25/Makefile index fe23836a9f3d..10cebc5ced8c 100644 --- a/arch/arm/mach-mx25/Makefile +++ b/arch/arm/mach-mx25/Makefile | |||
@@ -1,3 +1,3 @@ | |||
1 | obj-y := mm.o devices.o | 1 | obj-y := mm.o devices.o |
2 | obj-$(CONFIG_ARCH_MX25) += clock.o | 2 | obj-$(CONFIG_ARCH_MX25) += clock.o |
3 | obj-$(CONFIG_MACH_MX25_3DS) += mx25pdk.o | 3 | obj-$(CONFIG_MACH_MX25_3DS) += mach-mx25pdk.o |
diff --git a/arch/arm/mach-mx25/clock.c b/arch/arm/mach-mx25/clock.c index 6acc88bcdc40..56bf958d8c34 100644 --- a/arch/arm/mach-mx25/clock.c +++ b/arch/arm/mach-mx25/clock.c | |||
@@ -124,6 +124,11 @@ static unsigned long get_rate_gpt(struct clk *clk) | |||
124 | return get_rate_per(5); | 124 | return get_rate_per(5); |
125 | } | 125 | } |
126 | 126 | ||
127 | static unsigned long get_rate_lcdc(struct clk *clk) | ||
128 | { | ||
129 | return get_rate_per(7); | ||
130 | } | ||
131 | |||
127 | static unsigned long get_rate_otg(struct clk *clk) | 132 | static unsigned long get_rate_otg(struct clk *clk) |
128 | { | 133 | { |
129 | return 48000000; /* FIXME */ | 134 | return 48000000; /* FIXME */ |
@@ -167,6 +172,8 @@ DEFINE_CLOCK(cspi1_clk, 0, CCM_CGCR1, 5, get_rate_ipg, NULL, NULL); | |||
167 | DEFINE_CLOCK(cspi2_clk, 0, CCM_CGCR1, 6, get_rate_ipg, NULL, NULL); | 172 | DEFINE_CLOCK(cspi2_clk, 0, CCM_CGCR1, 6, get_rate_ipg, NULL, NULL); |
168 | DEFINE_CLOCK(cspi3_clk, 0, CCM_CGCR1, 7, get_rate_ipg, NULL, NULL); | 173 | DEFINE_CLOCK(cspi3_clk, 0, CCM_CGCR1, 7, get_rate_ipg, NULL, NULL); |
169 | DEFINE_CLOCK(fec_ahb_clk, 0, CCM_CGCR0, 23, NULL, NULL, NULL); | 174 | DEFINE_CLOCK(fec_ahb_clk, 0, CCM_CGCR0, 23, NULL, NULL, NULL); |
175 | DEFINE_CLOCK(lcdc_ahb_clk, 0, CCM_CGCR0, 24, NULL, NULL, NULL); | ||
176 | DEFINE_CLOCK(lcdc_per_clk, 0, CCM_CGCR0, 7, NULL, NULL, &lcdc_ahb_clk); | ||
170 | DEFINE_CLOCK(uart1_clk, 0, CCM_CGCR2, 14, get_rate_uart, NULL, &uart_per_clk); | 177 | DEFINE_CLOCK(uart1_clk, 0, CCM_CGCR2, 14, get_rate_uart, NULL, &uart_per_clk); |
171 | DEFINE_CLOCK(uart2_clk, 0, CCM_CGCR2, 15, get_rate_uart, NULL, &uart_per_clk); | 178 | DEFINE_CLOCK(uart2_clk, 0, CCM_CGCR2, 15, get_rate_uart, NULL, &uart_per_clk); |
172 | DEFINE_CLOCK(uart3_clk, 0, CCM_CGCR2, 16, get_rate_uart, NULL, &uart_per_clk); | 179 | DEFINE_CLOCK(uart3_clk, 0, CCM_CGCR2, 16, get_rate_uart, NULL, &uart_per_clk); |
@@ -182,6 +189,8 @@ DEFINE_CLOCK(kpp_clk, 0, CCM_CGCR1, 28, get_rate_ipg, NULL, NULL); | |||
182 | DEFINE_CLOCK(tsc_clk, 0, CCM_CGCR2, 13, get_rate_ipg, NULL, NULL); | 189 | DEFINE_CLOCK(tsc_clk, 0, CCM_CGCR2, 13, get_rate_ipg, NULL, NULL); |
183 | DEFINE_CLOCK(i2c_clk, 0, CCM_CGCR0, 6, get_rate_i2c, NULL, NULL); | 190 | DEFINE_CLOCK(i2c_clk, 0, CCM_CGCR0, 6, get_rate_i2c, NULL, NULL); |
184 | DEFINE_CLOCK(fec_clk, 0, CCM_CGCR1, 15, get_rate_ipg, NULL, &fec_ahb_clk); | 191 | DEFINE_CLOCK(fec_clk, 0, CCM_CGCR1, 15, get_rate_ipg, NULL, &fec_ahb_clk); |
192 | DEFINE_CLOCK(dryice_clk, 0, CCM_CGCR1, 8, get_rate_ipg, NULL, NULL); | ||
193 | DEFINE_CLOCK(lcdc_clk, 0, CCM_CGCR1, 29, get_rate_lcdc, NULL, &lcdc_per_clk); | ||
185 | 194 | ||
186 | #define _REGISTER_CLOCK(d, n, c) \ | 195 | #define _REGISTER_CLOCK(d, n, c) \ |
187 | { \ | 196 | { \ |
@@ -214,6 +223,8 @@ static struct clk_lookup lookups[] = { | |||
214 | _REGISTER_CLOCK("imx-i2c.1", NULL, i2c_clk) | 223 | _REGISTER_CLOCK("imx-i2c.1", NULL, i2c_clk) |
215 | _REGISTER_CLOCK("imx-i2c.2", NULL, i2c_clk) | 224 | _REGISTER_CLOCK("imx-i2c.2", NULL, i2c_clk) |
216 | _REGISTER_CLOCK("fec.0", NULL, fec_clk) | 225 | _REGISTER_CLOCK("fec.0", NULL, fec_clk) |
226 | _REGISTER_CLOCK("imxdi_rtc.0", NULL, dryice_clk) | ||
227 | _REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk) | ||
217 | }; | 228 | }; |
218 | 229 | ||
219 | int __init mx25_clocks_init(void) | 230 | int __init mx25_clocks_init(void) |
@@ -231,6 +242,9 @@ int __init mx25_clocks_init(void) | |||
231 | __raw_writel((0xf << 16) | (3 << 26), CRM_BASE + CCM_CGCR1); | 242 | __raw_writel((0xf << 16) | (3 << 26), CRM_BASE + CCM_CGCR1); |
232 | __raw_writel((1 << 5), CRM_BASE + CCM_CGCR2); | 243 | __raw_writel((1 << 5), CRM_BASE + CCM_CGCR2); |
233 | 244 | ||
245 | /* Clock source for lcdc is upll */ | ||
246 | __raw_writel(__raw_readl(CRM_BASE+0x64) | (1 << 7), CRM_BASE + 0x64); | ||
247 | |||
234 | mxc_timer_init(&gpt_clk, MX25_IO_ADDRESS(MX25_GPT1_BASE_ADDR), 54); | 248 | mxc_timer_init(&gpt_clk, MX25_IO_ADDRESS(MX25_GPT1_BASE_ADDR), 54); |
235 | 249 | ||
236 | return 0; | 250 | return 0; |
diff --git a/arch/arm/mach-mx25/devices.c b/arch/arm/mach-mx25/devices.c index 9fdeea1c083b..3f4b8a0b5fac 100644 --- a/arch/arm/mach-mx25/devices.c +++ b/arch/arm/mach-mx25/devices.c | |||
@@ -438,3 +438,65 @@ struct platform_device mx25_fec_device = { | |||
438 | .num_resources = ARRAY_SIZE(mx25_fec_resources), | 438 | .num_resources = ARRAY_SIZE(mx25_fec_resources), |
439 | .resource = mx25_fec_resources, | 439 | .resource = mx25_fec_resources, |
440 | }; | 440 | }; |
441 | |||
442 | static struct resource mxc_nand_resources[] = { | ||
443 | { | ||
444 | .start = MX25_NFC_BASE_ADDR, | ||
445 | .end = MX25_NFC_BASE_ADDR + 0x1fff, | ||
446 | .flags = IORESOURCE_MEM, | ||
447 | }, | ||
448 | { | ||
449 | .start = MX25_INT_NANDFC, | ||
450 | .end = MX25_INT_NANDFC, | ||
451 | .flags = IORESOURCE_IRQ, | ||
452 | }, | ||
453 | }; | ||
454 | |||
455 | struct platform_device mxc_nand_device = { | ||
456 | .name = "mxc_nand", | ||
457 | .id = 0, | ||
458 | .num_resources = ARRAY_SIZE(mxc_nand_resources), | ||
459 | .resource = mxc_nand_resources, | ||
460 | }; | ||
461 | |||
462 | static struct resource mx25_rtc_resources[] = { | ||
463 | { | ||
464 | .start = MX25_DRYICE_BASE_ADDR, | ||
465 | .end = MX25_DRYICE_BASE_ADDR + 0x40, | ||
466 | .flags = IORESOURCE_MEM, | ||
467 | }, | ||
468 | { | ||
469 | .start = MX25_INT_DRYICE, | ||
470 | .flags = IORESOURCE_IRQ | ||
471 | }, | ||
472 | }; | ||
473 | |||
474 | struct platform_device mx25_rtc_device = { | ||
475 | .name = "imxdi_rtc", | ||
476 | .id = 0, | ||
477 | .num_resources = ARRAY_SIZE(mx25_rtc_resources), | ||
478 | .resource = mx25_rtc_resources, | ||
479 | }; | ||
480 | |||
481 | static struct resource mx25_fb_resources[] = { | ||
482 | { | ||
483 | .start = MX25_LCDC_BASE_ADDR, | ||
484 | .end = MX25_LCDC_BASE_ADDR + 0xfff, | ||
485 | .flags = IORESOURCE_MEM, | ||
486 | }, | ||
487 | { | ||
488 | .start = MX25_INT_LCDC, | ||
489 | .end = MX25_INT_LCDC, | ||
490 | .flags = IORESOURCE_IRQ, | ||
491 | }, | ||
492 | }; | ||
493 | |||
494 | struct platform_device mx25_fb_device = { | ||
495 | .name = "imx-fb", | ||
496 | .id = 0, | ||
497 | .resource = mx25_fb_resources, | ||
498 | .num_resources = ARRAY_SIZE(mx25_fb_resources), | ||
499 | .dev = { | ||
500 | .coherent_dma_mask = 0xFFFFFFFF, | ||
501 | }, | ||
502 | }; | ||
diff --git a/arch/arm/mach-mx25/devices.h b/arch/arm/mach-mx25/devices.h index fe5420fcd11f..39560e13bc0d 100644 --- a/arch/arm/mach-mx25/devices.h +++ b/arch/arm/mach-mx25/devices.h | |||
@@ -18,3 +18,6 @@ extern struct platform_device mxc_i2c_device0; | |||
18 | extern struct platform_device mxc_i2c_device1; | 18 | extern struct platform_device mxc_i2c_device1; |
19 | extern struct platform_device mxc_i2c_device2; | 19 | extern struct platform_device mxc_i2c_device2; |
20 | extern struct platform_device mx25_fec_device; | 20 | extern struct platform_device mx25_fec_device; |
21 | extern struct platform_device mxc_nand_device; | ||
22 | extern struct platform_device mx25_rtc_device; | ||
23 | extern struct platform_device mx25_fb_device; | ||
diff --git a/arch/arm/mach-mx25/mx25pdk.c b/arch/arm/mach-mx25/mach-mx25pdk.c index 6f06089246eb..83d74109e7d8 100644 --- a/arch/arm/mach-mx25/mx25pdk.c +++ b/arch/arm/mach-mx25/mach-mx25pdk.c | |||
@@ -35,8 +35,9 @@ | |||
35 | #include <mach/imx-uart.h> | 35 | #include <mach/imx-uart.h> |
36 | #include <mach/mx25.h> | 36 | #include <mach/mx25.h> |
37 | #include <mach/mxc_nand.h> | 37 | #include <mach/mxc_nand.h> |
38 | #include <mach/imxfb.h> | ||
38 | #include "devices.h" | 39 | #include "devices.h" |
39 | #include <mach/iomux.h> | 40 | #include <mach/iomux-mx25.h> |
40 | 41 | ||
41 | static struct imxuart_platform_data uart_pdata = { | 42 | static struct imxuart_platform_data uart_pdata = { |
42 | .flags = IMXUART_HAVE_RTSCTS, | 43 | .flags = IMXUART_HAVE_RTSCTS, |
@@ -54,6 +55,31 @@ static struct pad_desc mx25pdk_pads[] = { | |||
54 | MX25_PAD_FEC_TX_CLK__FEC_TX_CLK, | 55 | MX25_PAD_FEC_TX_CLK__FEC_TX_CLK, |
55 | MX25_PAD_A17__GPIO_2_3, /* FEC_EN, GPIO 35 */ | 56 | MX25_PAD_A17__GPIO_2_3, /* FEC_EN, GPIO 35 */ |
56 | MX25_PAD_D12__GPIO_4_8, /* FEC_RESET_B, GPIO 104 */ | 57 | MX25_PAD_D12__GPIO_4_8, /* FEC_RESET_B, GPIO 104 */ |
58 | |||
59 | /* LCD */ | ||
60 | MX25_PAD_LD0__LD0, | ||
61 | MX25_PAD_LD1__LD1, | ||
62 | MX25_PAD_LD2__LD2, | ||
63 | MX25_PAD_LD3__LD3, | ||
64 | MX25_PAD_LD4__LD4, | ||
65 | MX25_PAD_LD5__LD5, | ||
66 | MX25_PAD_LD6__LD6, | ||
67 | MX25_PAD_LD7__LD7, | ||
68 | MX25_PAD_LD8__LD8, | ||
69 | MX25_PAD_LD9__LD9, | ||
70 | MX25_PAD_LD10__LD10, | ||
71 | MX25_PAD_LD11__LD11, | ||
72 | MX25_PAD_LD12__LD12, | ||
73 | MX25_PAD_LD13__LD13, | ||
74 | MX25_PAD_LD14__LD14, | ||
75 | MX25_PAD_LD15__LD15, | ||
76 | MX25_PAD_GPIO_E__LD16, | ||
77 | MX25_PAD_GPIO_F__LD17, | ||
78 | MX25_PAD_HSYNC__HSYNC, | ||
79 | MX25_PAD_VSYNC__VSYNC, | ||
80 | MX25_PAD_LSCLK__LSCLK, | ||
81 | MX25_PAD_OE_ACD__OE_ACD, | ||
82 | MX25_PAD_CONTRAST__CONTRAST, | ||
57 | }; | 83 | }; |
58 | 84 | ||
59 | static struct fec_platform_data mx25_fec_pdata = { | 85 | static struct fec_platform_data mx25_fec_pdata = { |
@@ -77,6 +103,40 @@ static void __init mx25pdk_fec_reset(void) | |||
77 | gpio_set_value(FEC_RESET_B_GPIO, 1); | 103 | gpio_set_value(FEC_RESET_B_GPIO, 1); |
78 | } | 104 | } |
79 | 105 | ||
106 | static struct mxc_nand_platform_data mx25pdk_nand_board_info = { | ||
107 | .width = 1, | ||
108 | .hw_ecc = 1, | ||
109 | .flash_bbt = 1, | ||
110 | }; | ||
111 | |||
112 | static struct imx_fb_videomode mx25pdk_modes[] = { | ||
113 | { | ||
114 | .mode = { | ||
115 | .name = "CRT-VGA", | ||
116 | .refresh = 60, | ||
117 | .xres = 640, | ||
118 | .yres = 480, | ||
119 | .pixclock = 39683, | ||
120 | .left_margin = 45, | ||
121 | .right_margin = 114, | ||
122 | .upper_margin = 33, | ||
123 | .lower_margin = 11, | ||
124 | .hsync_len = 1, | ||
125 | .vsync_len = 1, | ||
126 | }, | ||
127 | .bpp = 16, | ||
128 | .pcr = 0xFA208B80, | ||
129 | }, | ||
130 | }; | ||
131 | |||
132 | static struct imx_fb_platform_data mx25pdk_fb_pdata = { | ||
133 | .mode = mx25pdk_modes, | ||
134 | .num_modes = ARRAY_SIZE(mx25pdk_modes), | ||
135 | .pwmr = 0x00A903FF, | ||
136 | .lscr1 = 0x00120300, | ||
137 | .dmacr = 0x00020010, | ||
138 | }; | ||
139 | |||
80 | static void __init mx25pdk_init(void) | 140 | static void __init mx25pdk_init(void) |
81 | { | 141 | { |
82 | mxc_iomux_v3_setup_multiple_pads(mx25pdk_pads, | 142 | mxc_iomux_v3_setup_multiple_pads(mx25pdk_pads, |
@@ -84,6 +144,9 @@ static void __init mx25pdk_init(void) | |||
84 | 144 | ||
85 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 145 | mxc_register_device(&mxc_uart_device0, &uart_pdata); |
86 | mxc_register_device(&mxc_usbh2, NULL); | 146 | mxc_register_device(&mxc_usbh2, NULL); |
147 | mxc_register_device(&mxc_nand_device, &mx25pdk_nand_board_info); | ||
148 | mxc_register_device(&mx25_rtc_device, NULL); | ||
149 | mxc_register_device(&mx25_fb_device, &mx25pdk_fb_pdata); | ||
87 | 150 | ||
88 | mx25pdk_fec_reset(); | 151 | mx25pdk_fec_reset(); |
89 | mxc_register_device(&mx25_fec_device, &mx25_fec_pdata); | 152 | mxc_register_device(&mx25_fec_device, &mx25_fec_pdata); |
@@ -102,7 +165,7 @@ MACHINE_START(MX25_3DS, "Freescale MX25PDK (3DS)") | |||
102 | /* Maintainer: Freescale Semiconductor, Inc. */ | 165 | /* Maintainer: Freescale Semiconductor, Inc. */ |
103 | .phys_io = MX25_AIPS1_BASE_ADDR, | 166 | .phys_io = MX25_AIPS1_BASE_ADDR, |
104 | .io_pg_offst = ((MX25_AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, | 167 | .io_pg_offst = ((MX25_AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, |
105 | .boot_params = PHYS_OFFSET + 0x100, | 168 | .boot_params = MX25_PHYS_OFFSET + 0x100, |
106 | .map_io = mx25_map_io, | 169 | .map_io = mx25_map_io, |
107 | .init_irq = mx25_init_irq, | 170 | .init_irq = mx25_init_irq, |
108 | .init_machine = mx25pdk_init, | 171 | .init_machine = mx25pdk_init, |
diff --git a/arch/arm/mach-mx3/Kconfig b/arch/arm/mach-mx3/Kconfig index 28294416b0af..3872af1cf2c3 100644 --- a/arch/arm/mach-mx3/Kconfig +++ b/arch/arm/mach-mx3/Kconfig | |||
@@ -34,6 +34,7 @@ config MACH_MX31ADS_WM1133_EV1 | |||
34 | config MACH_PCM037 | 34 | config MACH_PCM037 |
35 | bool "Support Phytec pcm037 (i.MX31) platforms" | 35 | bool "Support Phytec pcm037 (i.MX31) platforms" |
36 | select ARCH_MX31 | 36 | select ARCH_MX31 |
37 | select MXC_ULPI if USB_ULPI | ||
37 | help | 38 | help |
38 | Include support for Phytec pcm037 platform. This includes | 39 | Include support for Phytec pcm037 platform. This includes |
39 | specific configurations for the board and its peripherals. | 40 | specific configurations for the board and its peripherals. |
@@ -86,6 +87,7 @@ config MACH_QONG | |||
86 | config MACH_PCM043 | 87 | config MACH_PCM043 |
87 | bool "Support Phytec pcm043 (i.MX35) platforms" | 88 | bool "Support Phytec pcm043 (i.MX35) platforms" |
88 | select ARCH_MX35 | 89 | select ARCH_MX35 |
90 | select MXC_ULPI if USB_ULPI | ||
89 | help | 91 | help |
90 | Include support for Phytec pcm043 platform. This includes | 92 | Include support for Phytec pcm043 platform. This includes |
91 | specific configurations for the board and its peripherals. | 93 | specific configurations for the board and its peripherals. |
diff --git a/arch/arm/mach-mx3/Makefile b/arch/arm/mach-mx3/Makefile index 93c7b296be6a..5d650fda5d5d 100644 --- a/arch/arm/mach-mx3/Makefile +++ b/arch/arm/mach-mx3/Makefile | |||
@@ -5,18 +5,22 @@ | |||
5 | # Object file lists. | 5 | # Object file lists. |
6 | 6 | ||
7 | obj-y := mm.o devices.o cpu.o | 7 | obj-y := mm.o devices.o cpu.o |
8 | obj-$(CONFIG_ARCH_MX31) += clock.o iomux.o | 8 | CFLAGS_mm.o = -DIMX_NEEDS_DEPRECATED_SYMBOLS |
9 | CFLAGS_devices.o = -DIMX_NEEDS_DEPRECATED_SYMBOLS | ||
10 | CFLAGS_cpu.o = -DIMX_NEEDS_DEPRECATED_SYMBOLS | ||
11 | obj-$(CONFIG_ARCH_MX31) += clock-imx31.o iomux-imx31.o | ||
9 | obj-$(CONFIG_ARCH_MX35) += clock-imx35.o | 12 | obj-$(CONFIG_ARCH_MX35) += clock-imx35.o |
10 | obj-$(CONFIG_MACH_MX31ADS) += mx31ads.o | 13 | obj-$(CONFIG_MACH_MX31ADS) += mach-mx31ads.o |
11 | obj-$(CONFIG_MACH_MX31LILLY) += mx31lilly.o mx31lilly-db.o | 14 | obj-$(CONFIG_MACH_MX31LILLY) += mach-mx31lilly.o mx31lilly-db.o |
12 | obj-$(CONFIG_MACH_MX31LITE) += mx31lite.o mx31lite-db.o | 15 | obj-$(CONFIG_MACH_MX31LITE) += mach-mx31lite.o mx31lite-db.o |
13 | obj-$(CONFIG_MACH_PCM037) += pcm037.o | 16 | obj-$(CONFIG_MACH_PCM037) += mach-pcm037.o |
14 | obj-$(CONFIG_MACH_PCM037_EET) += pcm037_eet.o | 17 | obj-$(CONFIG_MACH_PCM037_EET) += mach-pcm037_eet.o |
15 | obj-$(CONFIG_MACH_MX31_3DS) += mx31pdk.o | 18 | obj-$(CONFIG_MACH_MX31_3DS) += mach-mx31_3ds.o |
16 | obj-$(CONFIG_MACH_MX31MOBOARD) += mx31moboard.o mx31moboard-devboard.o \ | 19 | CFLAGS_mach-mx31_3ds.o = -DIMX_NEEDS_DEPRECATED_SYMBOLS |
17 | mx31moboard-marxbot.o | 20 | obj-$(CONFIG_MACH_MX31MOBOARD) += mach-mx31moboard.o mx31moboard-devboard.o \ |
18 | obj-$(CONFIG_MACH_QONG) += qong.o | 21 | mx31moboard-marxbot.o mx31moboard-smartbot.o |
19 | obj-$(CONFIG_MACH_PCM043) += pcm043.o | 22 | obj-$(CONFIG_MACH_QONG) += mach-qong.o |
20 | obj-$(CONFIG_MACH_ARMADILLO5X0) += armadillo5x0.o | 23 | obj-$(CONFIG_MACH_PCM043) += mach-pcm043.o |
21 | obj-$(CONFIG_MACH_MX35_3DS) += mx35pdk.o | 24 | obj-$(CONFIG_MACH_ARMADILLO5X0) += mach-armadillo5x0.o |
22 | obj-$(CONFIG_MACH_KZM_ARM11_01) += kzmarm11.o | 25 | obj-$(CONFIG_MACH_MX35_3DS) += mach-mx35pdk.o |
26 | obj-$(CONFIG_MACH_KZM_ARM11_01) += mach-kzm_arm11_01.o | ||
diff --git a/arch/arm/mach-mx3/clock.c b/arch/arm/mach-mx3/clock-imx31.c index 27a318af0d20..d22a66f502a8 100644 --- a/arch/arm/mach-mx3/clock.c +++ b/arch/arm/mach-mx3/clock-imx31.c | |||
@@ -618,14 +618,15 @@ int __init mx31_clocks_init(unsigned long fref) | |||
618 | 618 | ||
619 | mx31_read_cpu_rev(); | 619 | mx31_read_cpu_rev(); |
620 | 620 | ||
621 | if (mx31_revision() >= CHIP_REV_2_0) { | 621 | if (mx31_revision() >= MX31_CHIP_REV_2_0) { |
622 | reg = __raw_readl(MXC_CCM_PMCR1); | 622 | reg = __raw_readl(MXC_CCM_PMCR1); |
623 | /* No PLL restart on DVFS switch; enable auto EMI handshake */ | 623 | /* No PLL restart on DVFS switch; enable auto EMI handshake */ |
624 | reg |= MXC_CCM_PMCR1_PLLRDIS | MXC_CCM_PMCR1_EMIRQ_EN; | 624 | reg |= MXC_CCM_PMCR1_PLLRDIS | MXC_CCM_PMCR1_EMIRQ_EN; |
625 | __raw_writel(reg, MXC_CCM_PMCR1); | 625 | __raw_writel(reg, MXC_CCM_PMCR1); |
626 | } | 626 | } |
627 | 627 | ||
628 | mxc_timer_init(&ipg_clk, IO_ADDRESS(GPT1_BASE_ADDR), MXC_INT_GPT); | 628 | mxc_timer_init(&ipg_clk, MX31_IO_ADDRESS(MX31_GPT1_BASE_ADDR), |
629 | MX31_INT_GPT); | ||
629 | 630 | ||
630 | return 0; | 631 | return 0; |
631 | } | 632 | } |
diff --git a/arch/arm/mach-mx3/clock-imx35.c b/arch/arm/mach-mx3/clock-imx35.c index 7584b4c6c556..07d630ebc286 100644 --- a/arch/arm/mach-mx3/clock-imx35.c +++ b/arch/arm/mach-mx3/clock-imx35.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
29 | #include <mach/common.h> | 29 | #include <mach/common.h> |
30 | 30 | ||
31 | #define CCM_BASE IO_ADDRESS(CCM_BASE_ADDR) | 31 | #define CCM_BASE MX35_IO_ADDRESS(MX35_CCM_BASE_ADDR) |
32 | 32 | ||
33 | #define CCM_CCMR 0x00 | 33 | #define CCM_CCMR 0x00 |
34 | #define CCM_PDR0 0x04 | 34 | #define CCM_PDR0 0x04 |
@@ -504,7 +504,8 @@ int __init mx35_clocks_init() | |||
504 | __raw_writel((3 << 26) | ll, CCM_BASE + CCM_CGR2); | 504 | __raw_writel((3 << 26) | ll, CCM_BASE + CCM_CGR2); |
505 | __raw_writel(0, CCM_BASE + CCM_CGR3); | 505 | __raw_writel(0, CCM_BASE + CCM_CGR3); |
506 | 506 | ||
507 | mxc_timer_init(&gpt_clk, IO_ADDRESS(GPT1_BASE_ADDR), MXC_INT_GPT); | 507 | mxc_timer_init(&gpt_clk, |
508 | MX35_IO_ADDRESS(MX35_GPT1_BASE_ADDR), MX35_INT_GPT); | ||
508 | 509 | ||
509 | return 0; | 510 | return 0; |
510 | } | 511 | } |
diff --git a/arch/arm/mach-mx3/cpu.c b/arch/arm/mach-mx3/cpu.c index db828809c675..861afe0fe3ad 100644 --- a/arch/arm/mach-mx3/cpu.c +++ b/arch/arm/mach-mx3/cpu.c | |||
@@ -41,7 +41,7 @@ void __init mx31_read_cpu_rev(void) | |||
41 | u32 i, srev; | 41 | u32 i, srev; |
42 | 42 | ||
43 | /* read SREV register from IIM module */ | 43 | /* read SREV register from IIM module */ |
44 | srev = __raw_readl(IO_ADDRESS(IIM_BASE_ADDR) + MXC_IIMSREV); | 44 | srev = __raw_readl(IO_ADDRESS(IIM_BASE_ADDR + MXC_IIMSREV)); |
45 | 45 | ||
46 | for (i = 0; i < ARRAY_SIZE(mx31_cpu_type); i++) | 46 | for (i = 0; i < ARRAY_SIZE(mx31_cpu_type); i++) |
47 | if (srev == mx31_cpu_type[i].srev) { | 47 | if (srev == mx31_cpu_type[i].srev) { |
diff --git a/arch/arm/mach-mx3/crm_regs.h b/arch/arm/mach-mx3/crm_regs.h index adfa3627ad84..37a8a07beda3 100644 --- a/arch/arm/mach-mx3/crm_regs.h +++ b/arch/arm/mach-mx3/crm_regs.h | |||
@@ -24,7 +24,7 @@ | |||
24 | #define CKIH_CLK_FREQ_27MHZ 27000000 | 24 | #define CKIH_CLK_FREQ_27MHZ 27000000 |
25 | #define CKIL_CLK_FREQ 32768 | 25 | #define CKIL_CLK_FREQ 32768 |
26 | 26 | ||
27 | #define MXC_CCM_BASE IO_ADDRESS(CCM_BASE_ADDR) | 27 | #define MXC_CCM_BASE MX31_IO_ADDRESS(MX31_CCM_BASE_ADDR) |
28 | 28 | ||
29 | /* Register addresses */ | 29 | /* Register addresses */ |
30 | #define MXC_CCM_CCMR (MXC_CCM_BASE + 0x00) | 30 | #define MXC_CCM_CCMR (MXC_CCM_BASE + 0x00) |
diff --git a/arch/arm/mach-mx3/iomux.c b/arch/arm/mach-mx3/iomux-imx31.c index c66ccbcdc11b..a1d7fa5123dc 100644 --- a/arch/arm/mach-mx3/iomux.c +++ b/arch/arm/mach-mx3/iomux-imx31.c | |||
@@ -29,7 +29,7 @@ | |||
29 | /* | 29 | /* |
30 | * IOMUX register (base) addresses | 30 | * IOMUX register (base) addresses |
31 | */ | 31 | */ |
32 | #define IOMUX_BASE IO_ADDRESS(IOMUXC_BASE_ADDR) | 32 | #define IOMUX_BASE MX31_IO_ADDRESS(MX31_IOMUXC_BASE_ADDR) |
33 | #define IOMUXINT_OBS1 (IOMUX_BASE + 0x000) | 33 | #define IOMUXINT_OBS1 (IOMUX_BASE + 0x000) |
34 | #define IOMUXINT_OBS2 (IOMUX_BASE + 0x004) | 34 | #define IOMUXINT_OBS2 (IOMUX_BASE + 0x004) |
35 | #define IOMUXGPR (IOMUX_BASE + 0x008) | 35 | #define IOMUXGPR (IOMUX_BASE + 0x008) |
diff --git a/arch/arm/mach-mx3/armadillo5x0.c b/arch/arm/mach-mx3/mach-armadillo5x0.c index 54aab401dbdf..3d72b0b89705 100644 --- a/arch/arm/mach-mx3/armadillo5x0.c +++ b/arch/arm/mach-mx3/mach-armadillo5x0.c | |||
@@ -182,8 +182,8 @@ static struct physmap_flash_data armadillo5x0_nor_flash_pdata = { | |||
182 | 182 | ||
183 | static struct resource armadillo5x0_nor_flash_resource = { | 183 | static struct resource armadillo5x0_nor_flash_resource = { |
184 | .flags = IORESOURCE_MEM, | 184 | .flags = IORESOURCE_MEM, |
185 | .start = CS0_BASE_ADDR, | 185 | .start = MX31_CS0_BASE_ADDR, |
186 | .end = CS0_BASE_ADDR + SZ_64M - 1, | 186 | .end = MX31_CS0_BASE_ADDR + SZ_64M - 1, |
187 | }; | 187 | }; |
188 | 188 | ||
189 | static struct platform_device armadillo5x0_nor_flash = { | 189 | static struct platform_device armadillo5x0_nor_flash = { |
@@ -311,8 +311,8 @@ static struct imxmmc_platform_data sdhc_pdata = { | |||
311 | */ | 311 | */ |
312 | static struct resource armadillo5x0_smc911x_resources[] = { | 312 | static struct resource armadillo5x0_smc911x_resources[] = { |
313 | { | 313 | { |
314 | .start = CS3_BASE_ADDR, | 314 | .start = MX31_CS3_BASE_ADDR, |
315 | .end = CS3_BASE_ADDR + SZ_32M - 1, | 315 | .end = MX31_CS3_BASE_ADDR + SZ_32M - 1, |
316 | .flags = IORESOURCE_MEM, | 316 | .flags = IORESOURCE_MEM, |
317 | }, { | 317 | }, { |
318 | .start = IOMUX_TO_IRQ(MX31_PIN_GPIO1_0), | 318 | .start = IOMUX_TO_IRQ(MX31_PIN_GPIO1_0), |
@@ -406,9 +406,9 @@ static struct sys_timer armadillo5x0_timer = { | |||
406 | 406 | ||
407 | MACHINE_START(ARMADILLO5X0, "Armadillo-500") | 407 | MACHINE_START(ARMADILLO5X0, "Armadillo-500") |
408 | /* Maintainer: Alberto Panizzo */ | 408 | /* Maintainer: Alberto Panizzo */ |
409 | .phys_io = AIPS1_BASE_ADDR, | 409 | .phys_io = MX31_AIPS1_BASE_ADDR, |
410 | .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, | 410 | .io_pg_offst = (MX31_AIPS1_BASE_ADDR_VIRT >> 18) & 0xfffc, |
411 | .boot_params = PHYS_OFFSET + 0x00000100, | 411 | .boot_params = MX3x_PHYS_OFFSET + 0x100, |
412 | .map_io = mx31_map_io, | 412 | .map_io = mx31_map_io, |
413 | .init_irq = mx31_init_irq, | 413 | .init_irq = mx31_init_irq, |
414 | .timer = &armadillo5x0_timer, | 414 | .timer = &armadillo5x0_timer, |
diff --git a/arch/arm/mach-mx3/kzmarm11.c b/arch/arm/mach-mx3/mach-kzm_arm11_01.c index 6fa99ce3008a..f085d5d1a6de 100644 --- a/arch/arm/mach-mx3/kzmarm11.c +++ b/arch/arm/mach-mx3/mach-kzm_arm11_01.c | |||
@@ -46,13 +46,18 @@ | |||
46 | 46 | ||
47 | #include "devices.h" | 47 | #include "devices.h" |
48 | 48 | ||
49 | #define KZM_ARM11_IO_ADDRESS(x) ( \ | ||
50 | IMX_IO_ADDRESS(x, MX31_CS4) ?: \ | ||
51 | IMX_IO_ADDRESS(x, MX31_CS5) ?: \ | ||
52 | MX31_IO_ADDRESS(x)) | ||
53 | |||
49 | #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) | 54 | #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) |
50 | /* | 55 | /* |
51 | * KZM-ARM11-01 has an external UART on FPGA | 56 | * KZM-ARM11-01 has an external UART on FPGA |
52 | */ | 57 | */ |
53 | static struct plat_serial8250_port serial_platform_data[] = { | 58 | static struct plat_serial8250_port serial_platform_data[] = { |
54 | { | 59 | { |
55 | .membase = IO_ADDRESS(KZM_ARM11_16550), | 60 | .membase = KZM_ARM11_IO_ADDRESS(KZM_ARM11_16550), |
56 | .mapbase = KZM_ARM11_16550, | 61 | .mapbase = KZM_ARM11_16550, |
57 | .irq = IOMUX_TO_IRQ(MX31_PIN_GPIO1_1), | 62 | .irq = IOMUX_TO_IRQ(MX31_PIN_GPIO1_1), |
58 | .irqflags = IRQ_TYPE_EDGE_RISING, | 63 | .irqflags = IRQ_TYPE_EDGE_RISING, |
@@ -102,9 +107,9 @@ static int __init kzm_init_ext_uart(void) | |||
102 | /* | 107 | /* |
103 | * Unmask UART interrupt | 108 | * Unmask UART interrupt |
104 | */ | 109 | */ |
105 | tmp = __raw_readb(IO_ADDRESS(KZM_ARM11_CTL1)); | 110 | tmp = __raw_readb(KZM_ARM11_IO_ADDRESS(KZM_ARM11_CTL1)); |
106 | tmp |= 0x2; | 111 | tmp |= 0x2; |
107 | __raw_writeb(tmp, IO_ADDRESS(KZM_ARM11_CTL1)); | 112 | __raw_writeb(tmp, KZM_ARM11_IO_ADDRESS(KZM_ARM11_CTL1)); |
108 | 113 | ||
109 | return platform_device_register(&serial_device); | 114 | return platform_device_register(&serial_device); |
110 | } | 115 | } |
@@ -128,8 +133,8 @@ static struct smsc911x_platform_config kzm_smsc9118_config = { | |||
128 | 133 | ||
129 | static struct resource kzm_smsc9118_resources[] = { | 134 | static struct resource kzm_smsc9118_resources[] = { |
130 | { | 135 | { |
131 | .start = CS5_BASE_ADDR, | 136 | .start = MX31_CS5_BASE_ADDR, |
132 | .end = CS5_BASE_ADDR + SZ_128K - 1, | 137 | .end = MX31_CS5_BASE_ADDR + SZ_128K - 1, |
133 | .flags = IORESOURCE_MEM, | 138 | .flags = IORESOURCE_MEM, |
134 | }, | 139 | }, |
135 | { | 140 | { |
@@ -222,15 +227,15 @@ static void __init kzm_board_init(void) | |||
222 | */ | 227 | */ |
223 | static struct map_desc kzm_io_desc[] __initdata = { | 228 | static struct map_desc kzm_io_desc[] __initdata = { |
224 | { | 229 | { |
225 | .virtual = CS4_BASE_ADDR_VIRT, | 230 | .virtual = MX31_CS4_BASE_ADDR_VIRT, |
226 | .pfn = __phys_to_pfn(CS4_BASE_ADDR), | 231 | .pfn = __phys_to_pfn(MX31_CS4_BASE_ADDR), |
227 | .length = CS4_SIZE, | 232 | .length = MX31_CS4_SIZE, |
228 | .type = MT_DEVICE | 233 | .type = MT_DEVICE |
229 | }, | 234 | }, |
230 | { | 235 | { |
231 | .virtual = CS5_BASE_ADDR_VIRT, | 236 | .virtual = MX31_CS5_BASE_ADDR_VIRT, |
232 | .pfn = __phys_to_pfn(CS5_BASE_ADDR), | 237 | .pfn = __phys_to_pfn(MX31_CS5_BASE_ADDR), |
233 | .length = CS5_SIZE, | 238 | .length = MX31_CS5_SIZE, |
234 | .type = MT_DEVICE | 239 | .type = MT_DEVICE |
235 | }, | 240 | }, |
236 | }; | 241 | }; |
@@ -258,9 +263,9 @@ static struct sys_timer kzm_timer = { | |||
258 | * initialize __mach_desc_KZM_ARM11_01 data structure. | 263 | * initialize __mach_desc_KZM_ARM11_01 data structure. |
259 | */ | 264 | */ |
260 | MACHINE_START(KZM_ARM11_01, "Kyoto Microcomputer Co., Ltd. KZM-ARM11-01") | 265 | MACHINE_START(KZM_ARM11_01, "Kyoto Microcomputer Co., Ltd. KZM-ARM11-01") |
261 | .phys_io = AIPS1_BASE_ADDR, | 266 | .phys_io = MX31_AIPS1_BASE_ADDR, |
262 | .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, | 267 | .io_pg_offst = (MX31_AIPS1_BASE_ADDR_VIRT >> 18) & 0xfffc, |
263 | .boot_params = PHYS_OFFSET + 0x100, | 268 | .boot_params = MX3x_PHYS_OFFSET + 0x100, |
264 | .map_io = kzm_map_io, | 269 | .map_io = kzm_map_io, |
265 | .init_irq = mx31_init_irq, | 270 | .init_irq = mx31_init_irq, |
266 | .init_machine = kzm_board_init, | 271 | .init_machine = kzm_board_init, |
diff --git a/arch/arm/mach-mx3/mx31pdk.c b/arch/arm/mach-mx3/mach-mx31_3ds.c index 18715f1aa7eb..b88c18ad7698 100644 --- a/arch/arm/mach-mx3/mx31pdk.c +++ b/arch/arm/mach-mx3/mach-mx31_3ds.c | |||
@@ -211,9 +211,9 @@ static int __init mx31pdk_init_expio(void) | |||
211 | */ | 211 | */ |
212 | static struct map_desc mx31pdk_io_desc[] __initdata = { | 212 | static struct map_desc mx31pdk_io_desc[] __initdata = { |
213 | { | 213 | { |
214 | .virtual = CS5_BASE_ADDR_VIRT, | 214 | .virtual = MX31_CS5_BASE_ADDR_VIRT, |
215 | .pfn = __phys_to_pfn(CS5_BASE_ADDR), | 215 | .pfn = __phys_to_pfn(MX31_CS5_BASE_ADDR), |
216 | .length = CS5_SIZE, | 216 | .length = MX31_CS5_SIZE, |
217 | .type = MT_DEVICE, | 217 | .type = MT_DEVICE, |
218 | }, | 218 | }, |
219 | }; | 219 | }; |
@@ -256,9 +256,9 @@ static struct sys_timer mx31pdk_timer = { | |||
256 | */ | 256 | */ |
257 | MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)") | 257 | MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)") |
258 | /* Maintainer: Freescale Semiconductor, Inc. */ | 258 | /* Maintainer: Freescale Semiconductor, Inc. */ |
259 | .phys_io = AIPS1_BASE_ADDR, | 259 | .phys_io = MX31_AIPS1_BASE_ADDR, |
260 | .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, | 260 | .io_pg_offst = (MX31_AIPS1_BASE_ADDR_VIRT >> 18) & 0xfffc, |
261 | .boot_params = PHYS_OFFSET + 0x100, | 261 | .boot_params = MX3x_PHYS_OFFSET + 0x100, |
262 | .map_io = mx31pdk_map_io, | 262 | .map_io = mx31pdk_map_io, |
263 | .init_irq = mx31_init_irq, | 263 | .init_irq = mx31_init_irq, |
264 | .init_machine = mxc_board_init, | 264 | .init_machine = mxc_board_init, |
diff --git a/arch/arm/mach-mx3/mx31ads.c b/arch/arm/mach-mx3/mach-mx31ads.c index 938c549767dc..b3d1a1895c20 100644 --- a/arch/arm/mach-mx3/mx31ads.c +++ b/arch/arm/mach-mx3/mach-mx31ads.c | |||
@@ -60,7 +60,7 @@ | |||
60 | static struct plat_serial8250_port serial_platform_data[] = { | 60 | static struct plat_serial8250_port serial_platform_data[] = { |
61 | { | 61 | { |
62 | .membase = (void *)(PBC_BASE_ADDRESS + PBC_SC16C652_UARTA), | 62 | .membase = (void *)(PBC_BASE_ADDRESS + PBC_SC16C652_UARTA), |
63 | .mapbase = (unsigned long)(CS4_BASE_ADDR + PBC_SC16C652_UARTA), | 63 | .mapbase = (unsigned long)(MX31_CS4_BASE_ADDR + PBC_SC16C652_UARTA), |
64 | .irq = EXPIO_INT_XUART_INTA, | 64 | .irq = EXPIO_INT_XUART_INTA, |
65 | .uartclk = 14745600, | 65 | .uartclk = 14745600, |
66 | .regshift = 0, | 66 | .regshift = 0, |
@@ -68,7 +68,7 @@ static struct plat_serial8250_port serial_platform_data[] = { | |||
68 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_AUTO_IRQ, | 68 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_AUTO_IRQ, |
69 | }, { | 69 | }, { |
70 | .membase = (void *)(PBC_BASE_ADDRESS + PBC_SC16C652_UARTB), | 70 | .membase = (void *)(PBC_BASE_ADDRESS + PBC_SC16C652_UARTB), |
71 | .mapbase = (unsigned long)(CS4_BASE_ADDR + PBC_SC16C652_UARTB), | 71 | .mapbase = (unsigned long)(MX31_CS4_BASE_ADDR + PBC_SC16C652_UARTB), |
72 | .irq = EXPIO_INT_XUART_INTB, | 72 | .irq = EXPIO_INT_XUART_INTB, |
73 | .uartclk = 14745600, | 73 | .uartclk = 14745600, |
74 | .regshift = 0, | 74 | .regshift = 0, |
@@ -309,12 +309,8 @@ static struct regulator_init_data ldo1_data = { | |||
309 | }; | 309 | }; |
310 | 310 | ||
311 | static struct regulator_consumer_supply ldo2_consumers[] = { | 311 | static struct regulator_consumer_supply ldo2_consumers[] = { |
312 | { | 312 | { .supply = "AVDD", .dev_name = "1-001a" }, |
313 | .supply = "AVDD", | 313 | { .supply = "HPVDD", .dev_name = "1-001a" }, |
314 | }, | ||
315 | { | ||
316 | .supply = "HPVDD", | ||
317 | }, | ||
318 | }; | 314 | }; |
319 | 315 | ||
320 | /* CODEC and SIM */ | 316 | /* CODEC and SIM */ |
@@ -385,8 +381,6 @@ static struct wm8350_audio_platform_data imx32ads_wm8350_setup = { | |||
385 | 381 | ||
386 | static int mx31_wm8350_init(struct wm8350 *wm8350) | 382 | static int mx31_wm8350_init(struct wm8350 *wm8350) |
387 | { | 383 | { |
388 | int i; | ||
389 | |||
390 | wm8350_gpio_config(wm8350, 0, WM8350_GPIO_DIR_IN, | 384 | wm8350_gpio_config(wm8350, 0, WM8350_GPIO_DIR_IN, |
391 | WM8350_GPIO0_PWR_ON_IN, WM8350_GPIO_ACTIVE_LOW, | 385 | WM8350_GPIO0_PWR_ON_IN, WM8350_GPIO_ACTIVE_LOW, |
392 | WM8350_GPIO_PULL_UP, WM8350_GPIO_INVERT_OFF, | 386 | WM8350_GPIO_PULL_UP, WM8350_GPIO_INVERT_OFF, |
@@ -422,10 +416,6 @@ static int mx31_wm8350_init(struct wm8350 *wm8350) | |||
422 | WM8350_GPIO_PULL_NONE, WM8350_GPIO_INVERT_OFF, | 416 | WM8350_GPIO_PULL_NONE, WM8350_GPIO_INVERT_OFF, |
423 | WM8350_GPIO_DEBOUNCE_OFF); | 417 | WM8350_GPIO_DEBOUNCE_OFF); |
424 | 418 | ||
425 | /* Fix up for our own supplies. */ | ||
426 | for (i = 0; i < ARRAY_SIZE(ldo2_consumers); i++) | ||
427 | ldo2_consumers[i].dev = wm8350->dev; | ||
428 | |||
429 | wm8350_register_regulator(wm8350, WM8350_DCDC_1, &sw1a_data); | 419 | wm8350_register_regulator(wm8350, WM8350_DCDC_1, &sw1a_data); |
430 | wm8350_register_regulator(wm8350, WM8350_DCDC_3, &viohi_data); | 420 | wm8350_register_regulator(wm8350, WM8350_DCDC_3, &viohi_data); |
431 | wm8350_register_regulator(wm8350, WM8350_DCDC_4, &violo_data); | 421 | wm8350_register_regulator(wm8350, WM8350_DCDC_4, &violo_data); |
@@ -493,14 +483,27 @@ static void mxc_init_i2c(void) | |||
493 | } | 483 | } |
494 | #endif | 484 | #endif |
495 | 485 | ||
486 | static unsigned int ssi_pins[] = { | ||
487 | MX31_PIN_SFS5__SFS5, | ||
488 | MX31_PIN_SCK5__SCK5, | ||
489 | MX31_PIN_SRXD5__SRXD5, | ||
490 | MX31_PIN_STXD5__STXD5, | ||
491 | }; | ||
492 | |||
493 | static void mxc_init_audio(void) | ||
494 | { | ||
495 | mxc_register_device(&imx_ssi_device0, NULL); | ||
496 | mxc_iomux_setup_multiple_pins(ssi_pins, ARRAY_SIZE(ssi_pins), "ssi"); | ||
497 | } | ||
498 | |||
496 | /*! | 499 | /*! |
497 | * This structure defines static mappings for the i.MX31ADS board. | 500 | * This structure defines static mappings for the i.MX31ADS board. |
498 | */ | 501 | */ |
499 | static struct map_desc mx31ads_io_desc[] __initdata = { | 502 | static struct map_desc mx31ads_io_desc[] __initdata = { |
500 | { | 503 | { |
501 | .virtual = CS4_BASE_ADDR_VIRT, | 504 | .virtual = MX31_CS4_BASE_ADDR_VIRT, |
502 | .pfn = __phys_to_pfn(CS4_BASE_ADDR), | 505 | .pfn = __phys_to_pfn(MX31_CS4_BASE_ADDR), |
503 | .length = CS4_SIZE / 2, | 506 | .length = MX31_CS4_SIZE / 2, |
504 | .type = MT_DEVICE | 507 | .type = MT_DEVICE |
505 | }, | 508 | }, |
506 | }; | 509 | }; |
@@ -528,6 +531,7 @@ static void __init mxc_board_init(void) | |||
528 | mxc_init_extuart(); | 531 | mxc_init_extuart(); |
529 | mxc_init_imx_uart(); | 532 | mxc_init_imx_uart(); |
530 | mxc_init_i2c(); | 533 | mxc_init_i2c(); |
534 | mxc_init_audio(); | ||
531 | } | 535 | } |
532 | 536 | ||
533 | static void __init mx31ads_timer_init(void) | 537 | static void __init mx31ads_timer_init(void) |
@@ -545,9 +549,9 @@ static struct sys_timer mx31ads_timer = { | |||
545 | */ | 549 | */ |
546 | MACHINE_START(MX31ADS, "Freescale MX31ADS") | 550 | MACHINE_START(MX31ADS, "Freescale MX31ADS") |
547 | /* Maintainer: Freescale Semiconductor, Inc. */ | 551 | /* Maintainer: Freescale Semiconductor, Inc. */ |
548 | .phys_io = AIPS1_BASE_ADDR, | 552 | .phys_io = MX31_AIPS1_BASE_ADDR, |
549 | .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, | 553 | .io_pg_offst = (MX31_AIPS1_BASE_ADDR_VIRT >> 18) & 0xfffc, |
550 | .boot_params = PHYS_OFFSET + 0x100, | 554 | .boot_params = MX3x_PHYS_OFFSET + 0x100, |
551 | .map_io = mx31ads_map_io, | 555 | .map_io = mx31ads_map_io, |
552 | .init_irq = mx31ads_init_irq, | 556 | .init_irq = mx31ads_init_irq, |
553 | .init_machine = mxc_board_init, | 557 | .init_machine = mxc_board_init, |
diff --git a/arch/arm/mach-mx3/mx31lilly.c b/arch/arm/mach-mx3/mach-mx31lilly.c index 9ce029f554b9..80847b04c063 100644 --- a/arch/arm/mach-mx3/mx31lilly.c +++ b/arch/arm/mach-mx3/mach-mx31lilly.c | |||
@@ -57,8 +57,8 @@ | |||
57 | 57 | ||
58 | static struct resource smsc91x_resources[] = { | 58 | static struct resource smsc91x_resources[] = { |
59 | { | 59 | { |
60 | .start = CS4_BASE_ADDR, | 60 | .start = MX31_CS4_BASE_ADDR, |
61 | .end = CS4_BASE_ADDR + 0xffff, | 61 | .end = MX31_CS4_BASE_ADDR + 0xffff, |
62 | .flags = IORESOURCE_MEM, | 62 | .flags = IORESOURCE_MEM, |
63 | }, | 63 | }, |
64 | { | 64 | { |
@@ -195,9 +195,9 @@ static struct sys_timer mx31lilly_timer = { | |||
195 | }; | 195 | }; |
196 | 196 | ||
197 | MACHINE_START(LILLY1131, "INCO startec LILLY-1131") | 197 | MACHINE_START(LILLY1131, "INCO startec LILLY-1131") |
198 | .phys_io = AIPS1_BASE_ADDR, | 198 | .phys_io = MX31_AIPS1_BASE_ADDR, |
199 | .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, | 199 | .io_pg_offst = (MX31_AIPS1_BASE_ADDR_VIRT >> 18) & 0xfffc, |
200 | .boot_params = PHYS_OFFSET + 0x100, | 200 | .boot_params = MX3x_PHYS_OFFSET + 0x100, |
201 | .map_io = mx31_map_io, | 201 | .map_io = mx31_map_io, |
202 | .init_irq = mx31_init_irq, | 202 | .init_irq = mx31_init_irq, |
203 | .init_machine = mx31lilly_board_init, | 203 | .init_machine = mx31lilly_board_init, |
diff --git a/arch/arm/mach-mx3/mx31lite.c b/arch/arm/mach-mx3/mach-mx31lite.c index 789b20d1730f..2b6d11400877 100644 --- a/arch/arm/mach-mx3/mx31lite.c +++ b/arch/arm/mach-mx3/mach-mx31lite.c | |||
@@ -82,8 +82,8 @@ static struct smsc911x_platform_config smsc911x_config = { | |||
82 | 82 | ||
83 | static struct resource smsc911x_resources[] = { | 83 | static struct resource smsc911x_resources[] = { |
84 | { | 84 | { |
85 | .start = CS4_BASE_ADDR, | 85 | .start = MX31_CS4_BASE_ADDR, |
86 | .end = CS4_BASE_ADDR + 0x100, | 86 | .end = MX31_CS4_BASE_ADDR + 0x100, |
87 | .flags = IORESOURCE_MEM, | 87 | .flags = IORESOURCE_MEM, |
88 | }, { | 88 | }, { |
89 | .start = IOMUX_TO_IRQ(MX31_PIN_SFS6), | 89 | .start = IOMUX_TO_IRQ(MX31_PIN_SFS6), |
@@ -214,9 +214,9 @@ static struct platform_device physmap_flash_device = { | |||
214 | */ | 214 | */ |
215 | static struct map_desc mx31lite_io_desc[] __initdata = { | 215 | static struct map_desc mx31lite_io_desc[] __initdata = { |
216 | { | 216 | { |
217 | .virtual = CS4_BASE_ADDR_VIRT, | 217 | .virtual = MX31_CS4_BASE_ADDR_VIRT, |
218 | .pfn = __phys_to_pfn(CS4_BASE_ADDR), | 218 | .pfn = __phys_to_pfn(MX31_CS4_BASE_ADDR), |
219 | .length = CS4_SIZE, | 219 | .length = MX31_CS4_SIZE, |
220 | .type = MT_DEVICE | 220 | .type = MT_DEVICE |
221 | } | 221 | } |
222 | }; | 222 | }; |
@@ -287,9 +287,9 @@ struct sys_timer mx31lite_timer = { | |||
287 | 287 | ||
288 | MACHINE_START(MX31LITE, "LogicPD i.MX31 SOM") | 288 | MACHINE_START(MX31LITE, "LogicPD i.MX31 SOM") |
289 | /* Maintainer: Freescale Semiconductor, Inc. */ | 289 | /* Maintainer: Freescale Semiconductor, Inc. */ |
290 | .phys_io = AIPS1_BASE_ADDR, | 290 | .phys_io = MX31_AIPS1_BASE_ADDR, |
291 | .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, | 291 | .io_pg_offst = (MX31_AIPS1_BASE_ADDR_VIRT >> 18) & 0xfffc, |
292 | .boot_params = PHYS_OFFSET + 0x100, | 292 | .boot_params = MX3x_PHYS_OFFSET + 0x100, |
293 | .map_io = mx31lite_map_io, | 293 | .map_io = mx31lite_map_io, |
294 | .init_irq = mx31_init_irq, | 294 | .init_irq = mx31_init_irq, |
295 | .init_machine = mxc_board_init, | 295 | .init_machine = mxc_board_init, |
diff --git a/arch/arm/mach-mx3/mx31moboard.c b/arch/arm/mach-mx3/mach-mx31moboard.c index cfd605d078ec..a7dc5191bf5e 100644 --- a/arch/arm/mach-mx3/mx31moboard.c +++ b/arch/arm/mach-mx3/mach-mx31moboard.c | |||
@@ -96,9 +96,6 @@ static unsigned int moboard_pins[] = { | |||
96 | /* LEDs */ | 96 | /* LEDs */ |
97 | MX31_PIN_SVEN0__GPIO2_0, MX31_PIN_STX0__GPIO2_1, | 97 | MX31_PIN_SVEN0__GPIO2_0, MX31_PIN_STX0__GPIO2_1, |
98 | MX31_PIN_SRX0__GPIO2_2, MX31_PIN_SIMPD0__GPIO2_3, | 98 | MX31_PIN_SRX0__GPIO2_2, MX31_PIN_SIMPD0__GPIO2_3, |
99 | /* SEL */ | ||
100 | MX31_PIN_DTR_DCE1__GPIO2_8, MX31_PIN_DSR_DCE1__GPIO2_9, | ||
101 | MX31_PIN_RI_DCE1__GPIO2_10, MX31_PIN_DCD_DCE1__GPIO2_11, | ||
102 | /* SPI1 */ | 99 | /* SPI1 */ |
103 | MX31_PIN_CSPI2_MOSI__MOSI, MX31_PIN_CSPI2_MISO__MISO, | 100 | MX31_PIN_CSPI2_MOSI__MOSI, MX31_PIN_CSPI2_MISO__MISO, |
104 | MX31_PIN_CSPI2_SCLK__SCLK, MX31_PIN_CSPI2_SPI_RDY__SPI_RDY, | 101 | MX31_PIN_CSPI2_SCLK__SCLK, MX31_PIN_CSPI2_SPI_RDY__SPI_RDY, |
@@ -352,9 +349,7 @@ static struct fsl_usb2_platform_data usb_pdata = { | |||
352 | 349 | ||
353 | static int moboard_usbh2_hw_init(struct platform_device *pdev) | 350 | static int moboard_usbh2_hw_init(struct platform_device *pdev) |
354 | { | 351 | { |
355 | int ret = gpio_request(USBH2_EN_B, "usbh2-en"); | 352 | int ret; |
356 | if (ret) | ||
357 | return ret; | ||
358 | 353 | ||
359 | mxc_iomux_set_gpr(MUX_PGP_UH2, true); | 354 | mxc_iomux_set_gpr(MUX_PGP_UH2, true); |
360 | 355 | ||
@@ -371,6 +366,9 @@ static int moboard_usbh2_hw_init(struct platform_device *pdev) | |||
371 | mxc_iomux_set_pad(MX31_PIN_SRXD3, USB_PAD_CFG); | 366 | mxc_iomux_set_pad(MX31_PIN_SRXD3, USB_PAD_CFG); |
372 | mxc_iomux_set_pad(MX31_PIN_STXD3, USB_PAD_CFG); | 367 | mxc_iomux_set_pad(MX31_PIN_STXD3, USB_PAD_CFG); |
373 | 368 | ||
369 | ret = gpio_request(USBH2_EN_B, "usbh2-en"); | ||
370 | if (ret) | ||
371 | return ret; | ||
374 | gpio_direction_output(USBH2_EN_B, 0); | 372 | gpio_direction_output(USBH2_EN_B, 0); |
375 | 373 | ||
376 | return 0; | 374 | return 0; |
@@ -431,34 +429,6 @@ static struct platform_device mx31moboard_leds_device = { | |||
431 | }, | 429 | }, |
432 | }; | 430 | }; |
433 | 431 | ||
434 | #define SEL0 IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1) | ||
435 | #define SEL1 IOMUX_TO_GPIO(MX31_PIN_DSR_DCE1) | ||
436 | #define SEL2 IOMUX_TO_GPIO(MX31_PIN_RI_DCE1) | ||
437 | #define SEL3 IOMUX_TO_GPIO(MX31_PIN_DCD_DCE1) | ||
438 | |||
439 | static void mx31moboard_init_sel_gpios(void) | ||
440 | { | ||
441 | if (!gpio_request(SEL0, "sel0")) { | ||
442 | gpio_direction_input(SEL0); | ||
443 | gpio_export(SEL0, true); | ||
444 | } | ||
445 | |||
446 | if (!gpio_request(SEL1, "sel1")) { | ||
447 | gpio_direction_input(SEL1); | ||
448 | gpio_export(SEL1, true); | ||
449 | } | ||
450 | |||
451 | if (!gpio_request(SEL2, "sel2")) { | ||
452 | gpio_direction_input(SEL2); | ||
453 | gpio_export(SEL2, true); | ||
454 | } | ||
455 | |||
456 | if (!gpio_request(SEL3, "sel3")) { | ||
457 | gpio_direction_input(SEL3); | ||
458 | gpio_export(SEL3, true); | ||
459 | } | ||
460 | } | ||
461 | |||
462 | static struct ipu_platform_data mx3_ipu_data = { | 432 | static struct ipu_platform_data mx3_ipu_data = { |
463 | .irq_base = MXC_IPU_IRQ_START, | 433 | .irq_base = MXC_IPU_IRQ_START, |
464 | }; | 434 | }; |
@@ -518,8 +488,6 @@ static void __init mxc_board_init(void) | |||
518 | 488 | ||
519 | mxc_register_device(&mxc_uart_device4, &uart4_pdata); | 489 | mxc_register_device(&mxc_uart_device4, &uart4_pdata); |
520 | 490 | ||
521 | mx31moboard_init_sel_gpios(); | ||
522 | |||
523 | mxc_register_device(&mxc_i2c_device0, &moboard_i2c0_pdata); | 491 | mxc_register_device(&mxc_i2c_device0, &moboard_i2c0_pdata); |
524 | mxc_register_device(&mxc_i2c_device1, &moboard_i2c1_pdata); | 492 | mxc_register_device(&mxc_i2c_device1, &moboard_i2c1_pdata); |
525 | 493 | ||
@@ -552,6 +520,9 @@ static void __init mxc_board_init(void) | |||
552 | case MX31MARXBOT: | 520 | case MX31MARXBOT: |
553 | mx31moboard_marxbot_init(); | 521 | mx31moboard_marxbot_init(); |
554 | break; | 522 | break; |
523 | case MX31SMARTBOT: | ||
524 | mx31moboard_smartbot_init(); | ||
525 | break; | ||
555 | default: | 526 | default: |
556 | printk(KERN_ERR "Illegal mx31moboard_baseboard type %d\n", | 527 | printk(KERN_ERR "Illegal mx31moboard_baseboard type %d\n", |
557 | mx31moboard_baseboard); | 528 | mx31moboard_baseboard); |
@@ -569,9 +540,9 @@ struct sys_timer mx31moboard_timer = { | |||
569 | 540 | ||
570 | MACHINE_START(MX31MOBOARD, "EPFL Mobots mx31moboard") | 541 | MACHINE_START(MX31MOBOARD, "EPFL Mobots mx31moboard") |
571 | /* Maintainer: Valentin Longchamp, EPFL Mobots group */ | 542 | /* Maintainer: Valentin Longchamp, EPFL Mobots group */ |
572 | .phys_io = AIPS1_BASE_ADDR, | 543 | .phys_io = MX31_AIPS1_BASE_ADDR, |
573 | .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, | 544 | .io_pg_offst = (MX31_AIPS1_BASE_ADDR_VIRT >> 18) & 0xfffc, |
574 | .boot_params = PHYS_OFFSET + 0x100, | 545 | .boot_params = MX3x_PHYS_OFFSET + 0x100, |
575 | .map_io = mx31_map_io, | 546 | .map_io = mx31_map_io, |
576 | .init_irq = mx31_init_irq, | 547 | .init_irq = mx31_init_irq, |
577 | .init_machine = mxc_board_init, | 548 | .init_machine = mxc_board_init, |
diff --git a/arch/arm/mach-mx3/mx35pdk.c b/arch/arm/mach-mx3/mach-mx35pdk.c index 0bbc65ea23c8..bcac84d4dca4 100644 --- a/arch/arm/mach-mx3/mx35pdk.c +++ b/arch/arm/mach-mx3/mach-mx35pdk.c | |||
@@ -106,9 +106,9 @@ struct sys_timer mx35pdk_timer = { | |||
106 | 106 | ||
107 | MACHINE_START(MX35_3DS, "Freescale MX35PDK") | 107 | MACHINE_START(MX35_3DS, "Freescale MX35PDK") |
108 | /* Maintainer: Freescale Semiconductor, Inc */ | 108 | /* Maintainer: Freescale Semiconductor, Inc */ |
109 | .phys_io = AIPS1_BASE_ADDR, | 109 | .phys_io = MX35_AIPS1_BASE_ADDR, |
110 | .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, | 110 | .io_pg_offst = ((MX35_AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, |
111 | .boot_params = PHYS_OFFSET + 0x100, | 111 | .boot_params = MX3x_PHYS_OFFSET + 0x100, |
112 | .map_io = mx35_map_io, | 112 | .map_io = mx35_map_io, |
113 | .init_irq = mx35_init_irq, | 113 | .init_irq = mx35_init_irq, |
114 | .init_machine = mxc_board_init, | 114 | .init_machine = mxc_board_init, |
diff --git a/arch/arm/mach-mx3/pcm037.c b/arch/arm/mach-mx3/mach-pcm037.c index 5be396917c99..11f531559169 100644 --- a/arch/arm/mach-mx3/pcm037.c +++ b/arch/arm/mach-mx3/mach-pcm037.c | |||
@@ -33,6 +33,9 @@ | |||
33 | #include <linux/irq.h> | 33 | #include <linux/irq.h> |
34 | #include <linux/fsl_devices.h> | 34 | #include <linux/fsl_devices.h> |
35 | #include <linux/can/platform/sja1000.h> | 35 | #include <linux/can/platform/sja1000.h> |
36 | #include <linux/usb/otg.h> | ||
37 | #include <linux/usb/ulpi.h> | ||
38 | #include <linux/fsl_devices.h> | ||
36 | 39 | ||
37 | #include <media/soc_camera.h> | 40 | #include <media/soc_camera.h> |
38 | 41 | ||
@@ -51,6 +54,8 @@ | |||
51 | #include <mach/mx3_camera.h> | 54 | #include <mach/mx3_camera.h> |
52 | #include <mach/mx3fb.h> | 55 | #include <mach/mx3fb.h> |
53 | #include <mach/mxc_nand.h> | 56 | #include <mach/mxc_nand.h> |
57 | #include <mach/mxc_ehci.h> | ||
58 | #include <mach/ulpi.h> | ||
54 | 59 | ||
55 | #include "devices.h" | 60 | #include "devices.h" |
56 | #include "pcm037.h" | 61 | #include "pcm037.h" |
@@ -172,19 +177,7 @@ static unsigned int pcm037_pins[] = { | |||
172 | MX31_PIN_CSI_VSYNC__CSI_VSYNC, | 177 | MX31_PIN_CSI_VSYNC__CSI_VSYNC, |
173 | /* GPIO */ | 178 | /* GPIO */ |
174 | IOMUX_MODE(MX31_PIN_ATA_DMACK, IOMUX_CONFIG_GPIO), | 179 | IOMUX_MODE(MX31_PIN_ATA_DMACK, IOMUX_CONFIG_GPIO), |
175 | }; | 180 | /* OTG */ |
176 | |||
177 | static struct physmap_flash_data pcm037_flash_data = { | ||
178 | .width = 2, | ||
179 | }; | ||
180 | |||
181 | static struct resource pcm037_flash_resource = { | ||
182 | .start = 0xa0000000, | ||
183 | .end = 0xa1ffffff, | ||
184 | .flags = IORESOURCE_MEM, | ||
185 | }; | ||
186 | |||
187 | static int usbotg_pins[] = { | ||
188 | MX31_PIN_USBOTG_DATA0__USBOTG_DATA0, | 181 | MX31_PIN_USBOTG_DATA0__USBOTG_DATA0, |
189 | MX31_PIN_USBOTG_DATA1__USBOTG_DATA1, | 182 | MX31_PIN_USBOTG_DATA1__USBOTG_DATA1, |
190 | MX31_PIN_USBOTG_DATA2__USBOTG_DATA2, | 183 | MX31_PIN_USBOTG_DATA2__USBOTG_DATA2, |
@@ -197,39 +190,29 @@ static int usbotg_pins[] = { | |||
197 | MX31_PIN_USBOTG_DIR__USBOTG_DIR, | 190 | MX31_PIN_USBOTG_DIR__USBOTG_DIR, |
198 | MX31_PIN_USBOTG_NXT__USBOTG_NXT, | 191 | MX31_PIN_USBOTG_NXT__USBOTG_NXT, |
199 | MX31_PIN_USBOTG_STP__USBOTG_STP, | 192 | MX31_PIN_USBOTG_STP__USBOTG_STP, |
193 | /* USB host 2 */ | ||
194 | IOMUX_MODE(MX31_PIN_USBH2_CLK, IOMUX_CONFIG_FUNC), | ||
195 | IOMUX_MODE(MX31_PIN_USBH2_DIR, IOMUX_CONFIG_FUNC), | ||
196 | IOMUX_MODE(MX31_PIN_USBH2_NXT, IOMUX_CONFIG_FUNC), | ||
197 | IOMUX_MODE(MX31_PIN_USBH2_STP, IOMUX_CONFIG_FUNC), | ||
198 | IOMUX_MODE(MX31_PIN_USBH2_DATA0, IOMUX_CONFIG_FUNC), | ||
199 | IOMUX_MODE(MX31_PIN_USBH2_DATA1, IOMUX_CONFIG_FUNC), | ||
200 | IOMUX_MODE(MX31_PIN_STXD3, IOMUX_CONFIG_FUNC), | ||
201 | IOMUX_MODE(MX31_PIN_SRXD3, IOMUX_CONFIG_FUNC), | ||
202 | IOMUX_MODE(MX31_PIN_SCK3, IOMUX_CONFIG_FUNC), | ||
203 | IOMUX_MODE(MX31_PIN_SFS3, IOMUX_CONFIG_FUNC), | ||
204 | IOMUX_MODE(MX31_PIN_STXD6, IOMUX_CONFIG_FUNC), | ||
205 | IOMUX_MODE(MX31_PIN_SRXD6, IOMUX_CONFIG_FUNC), | ||
200 | }; | 206 | }; |
201 | 207 | ||
202 | /* USB OTG HS port */ | 208 | static struct physmap_flash_data pcm037_flash_data = { |
203 | static int __init gpio_usbotg_hs_activate(void) | 209 | .width = 2, |
204 | { | 210 | }; |
205 | int ret = mxc_iomux_setup_multiple_pins(usbotg_pins, | ||
206 | ARRAY_SIZE(usbotg_pins), "usbotg"); | ||
207 | |||
208 | if (ret < 0) { | ||
209 | printk(KERN_ERR "Cannot set up OTG pins\n"); | ||
210 | return ret; | ||
211 | } | ||
212 | |||
213 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA0, PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST); | ||
214 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA1, PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST); | ||
215 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA2, PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST); | ||
216 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA3, PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST); | ||
217 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA4, PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST); | ||
218 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA5, PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST); | ||
219 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA6, PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST); | ||
220 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA7, PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST); | ||
221 | mxc_iomux_set_pad(MX31_PIN_USBOTG_CLK, PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST); | ||
222 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DIR, PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST); | ||
223 | mxc_iomux_set_pad(MX31_PIN_USBOTG_NXT, PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST); | ||
224 | mxc_iomux_set_pad(MX31_PIN_USBOTG_STP, PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST); | ||
225 | |||
226 | return 0; | ||
227 | } | ||
228 | 211 | ||
229 | /* OTG config */ | 212 | static struct resource pcm037_flash_resource = { |
230 | static struct fsl_usb2_platform_data usb_pdata = { | 213 | .start = 0xa0000000, |
231 | .operating_mode = FSL_USB2_DR_DEVICE, | 214 | .end = 0xa1ffffff, |
232 | .phy_mode = FSL_USB2_PHY_ULPI, | 215 | .flags = IORESOURCE_MEM, |
233 | }; | 216 | }; |
234 | 217 | ||
235 | static struct platform_device pcm037_flash = { | 218 | static struct platform_device pcm037_flash = { |
@@ -248,8 +231,8 @@ static struct imxuart_platform_data uart_pdata = { | |||
248 | 231 | ||
249 | static struct resource smsc911x_resources[] = { | 232 | static struct resource smsc911x_resources[] = { |
250 | { | 233 | { |
251 | .start = CS1_BASE_ADDR + 0x300, | 234 | .start = MX31_CS1_BASE_ADDR + 0x300, |
252 | .end = CS1_BASE_ADDR + 0x300 + SZ_64K - 1, | 235 | .end = MX31_CS1_BASE_ADDR + 0x300 + SZ_64K - 1, |
253 | .flags = IORESOURCE_MEM, | 236 | .flags = IORESOURCE_MEM, |
254 | }, { | 237 | }, { |
255 | .start = IOMUX_TO_IRQ(MX31_PIN_GPIO3_1), | 238 | .start = IOMUX_TO_IRQ(MX31_PIN_GPIO3_1), |
@@ -281,8 +264,8 @@ static struct platdata_mtd_ram pcm038_sram_data = { | |||
281 | }; | 264 | }; |
282 | 265 | ||
283 | static struct resource pcm038_sram_resource = { | 266 | static struct resource pcm038_sram_resource = { |
284 | .start = CS4_BASE_ADDR, | 267 | .start = MX31_CS4_BASE_ADDR, |
285 | .end = CS4_BASE_ADDR + 512 * 1024 - 1, | 268 | .end = MX31_CS4_BASE_ADDR + 512 * 1024 - 1, |
286 | .flags = IORESOURCE_MEM, | 269 | .flags = IORESOURCE_MEM, |
287 | }; | 270 | }; |
288 | 271 | ||
@@ -536,8 +519,8 @@ static struct mx3fb_platform_data mx3fb_pdata = { | |||
536 | 519 | ||
537 | static struct resource pcm970_sja1000_resources[] = { | 520 | static struct resource pcm970_sja1000_resources[] = { |
538 | { | 521 | { |
539 | .start = CS5_BASE_ADDR, | 522 | .start = MX31_CS5_BASE_ADDR, |
540 | .end = CS5_BASE_ADDR + 0x100 - 1, | 523 | .end = MX31_CS5_BASE_ADDR + 0x100 - 1, |
541 | .flags = IORESOURCE_MEM, | 524 | .flags = IORESOURCE_MEM, |
542 | }, { | 525 | }, { |
543 | .start = IOMUX_TO_IRQ(IOMUX_PIN(48, 105)), | 526 | .start = IOMUX_TO_IRQ(IOMUX_PIN(48, 105)), |
@@ -561,16 +544,65 @@ static struct platform_device pcm970_sja1000 = { | |||
561 | .num_resources = ARRAY_SIZE(pcm970_sja1000_resources), | 544 | .num_resources = ARRAY_SIZE(pcm970_sja1000_resources), |
562 | }; | 545 | }; |
563 | 546 | ||
547 | static struct mxc_usbh_platform_data otg_pdata = { | ||
548 | .portsc = MXC_EHCI_MODE_ULPI, | ||
549 | .flags = MXC_EHCI_INTERFACE_DIFF_UNI, | ||
550 | }; | ||
551 | |||
552 | static struct mxc_usbh_platform_data usbh2_pdata = { | ||
553 | .portsc = MXC_EHCI_MODE_ULPI, | ||
554 | .flags = MXC_EHCI_INTERFACE_DIFF_UNI, | ||
555 | }; | ||
556 | |||
557 | static struct fsl_usb2_platform_data otg_device_pdata = { | ||
558 | .operating_mode = FSL_USB2_DR_DEVICE, | ||
559 | .phy_mode = FSL_USB2_PHY_ULPI, | ||
560 | }; | ||
561 | |||
562 | static int otg_mode_host; | ||
563 | |||
564 | static int __init pcm037_otg_mode(char *options) | ||
565 | { | ||
566 | if (!strcmp(options, "host")) | ||
567 | otg_mode_host = 1; | ||
568 | else if (!strcmp(options, "device")) | ||
569 | otg_mode_host = 0; | ||
570 | else | ||
571 | pr_info("otg_mode neither \"host\" nor \"device\". " | ||
572 | "Defaulting to device\n"); | ||
573 | return 0; | ||
574 | } | ||
575 | __setup("otg_mode=", pcm037_otg_mode); | ||
576 | |||
564 | /* | 577 | /* |
565 | * Board specific initialization. | 578 | * Board specific initialization. |
566 | */ | 579 | */ |
567 | static void __init mxc_board_init(void) | 580 | static void __init mxc_board_init(void) |
568 | { | 581 | { |
569 | int ret; | 582 | int ret; |
583 | u32 tmp; | ||
584 | |||
585 | mxc_iomux_set_gpr(MUX_PGP_UH2, 1); | ||
570 | 586 | ||
571 | mxc_iomux_setup_multiple_pins(pcm037_pins, ARRAY_SIZE(pcm037_pins), | 587 | mxc_iomux_setup_multiple_pins(pcm037_pins, ARRAY_SIZE(pcm037_pins), |
572 | "pcm037"); | 588 | "pcm037"); |
573 | 589 | ||
590 | #define H2_PAD_CFG (PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST | PAD_CTL_HYS_CMOS \ | ||
591 | | PAD_CTL_ODE_CMOS | PAD_CTL_100K_PU) | ||
592 | |||
593 | mxc_iomux_set_pad(MX31_PIN_USBH2_CLK, H2_PAD_CFG); | ||
594 | mxc_iomux_set_pad(MX31_PIN_USBH2_DIR, H2_PAD_CFG); | ||
595 | mxc_iomux_set_pad(MX31_PIN_USBH2_NXT, H2_PAD_CFG); | ||
596 | mxc_iomux_set_pad(MX31_PIN_USBH2_STP, H2_PAD_CFG); | ||
597 | mxc_iomux_set_pad(MX31_PIN_USBH2_DATA0, H2_PAD_CFG); /* USBH2_DATA0 */ | ||
598 | mxc_iomux_set_pad(MX31_PIN_USBH2_DATA1, H2_PAD_CFG); /* USBH2_DATA1 */ | ||
599 | mxc_iomux_set_pad(MX31_PIN_SRXD6, H2_PAD_CFG); /* USBH2_DATA2 */ | ||
600 | mxc_iomux_set_pad(MX31_PIN_STXD6, H2_PAD_CFG); /* USBH2_DATA3 */ | ||
601 | mxc_iomux_set_pad(MX31_PIN_SFS3, H2_PAD_CFG); /* USBH2_DATA4 */ | ||
602 | mxc_iomux_set_pad(MX31_PIN_SCK3, H2_PAD_CFG); /* USBH2_DATA5 */ | ||
603 | mxc_iomux_set_pad(MX31_PIN_SRXD3, H2_PAD_CFG); /* USBH2_DATA6 */ | ||
604 | mxc_iomux_set_pad(MX31_PIN_STXD3, H2_PAD_CFG); /* USBH2_DATA7 */ | ||
605 | |||
574 | if (pcm037_variant() == PCM037_EET) | 606 | if (pcm037_variant() == PCM037_EET) |
575 | mxc_iomux_setup_multiple_pins(pcm037_uart1_pins, | 607 | mxc_iomux_setup_multiple_pins(pcm037_uart1_pins, |
576 | ARRAY_SIZE(pcm037_uart1_pins), "pcm037_uart1"); | 608 | ARRAY_SIZE(pcm037_uart1_pins), "pcm037_uart1"); |
@@ -608,8 +640,6 @@ static void __init mxc_board_init(void) | |||
608 | mxc_register_device(&mxcsdhc_device0, &sdhc_pdata); | 640 | mxc_register_device(&mxcsdhc_device0, &sdhc_pdata); |
609 | mxc_register_device(&mx3_ipu, &mx3_ipu_data); | 641 | mxc_register_device(&mx3_ipu, &mx3_ipu_data); |
610 | mxc_register_device(&mx3_fb, &mx3fb_pdata); | 642 | mxc_register_device(&mx3_fb, &mx3fb_pdata); |
611 | if (!gpio_usbotg_hs_activate()) | ||
612 | mxc_register_device(&mxc_otg_udc_device, &usb_pdata); | ||
613 | 643 | ||
614 | /* CSI */ | 644 | /* CSI */ |
615 | /* Camera power: default - off */ | 645 | /* Camera power: default - off */ |
@@ -623,6 +653,23 @@ static void __init mxc_board_init(void) | |||
623 | mxc_register_device(&mx3_camera, &camera_pdata); | 653 | mxc_register_device(&mx3_camera, &camera_pdata); |
624 | 654 | ||
625 | platform_device_register(&pcm970_sja1000); | 655 | platform_device_register(&pcm970_sja1000); |
656 | |||
657 | #if defined(CONFIG_USB_ULPI) | ||
658 | if (otg_mode_host) { | ||
659 | otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, | ||
660 | USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); | ||
661 | |||
662 | mxc_register_device(&mxc_otg_host, &otg_pdata); | ||
663 | } | ||
664 | |||
665 | usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, | ||
666 | USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); | ||
667 | |||
668 | mxc_register_device(&mxc_usbh2, &usbh2_pdata); | ||
669 | #endif | ||
670 | if (!otg_mode_host) | ||
671 | mxc_register_device(&mxc_otg_udc_device, &otg_device_pdata); | ||
672 | |||
626 | } | 673 | } |
627 | 674 | ||
628 | static void __init pcm037_timer_init(void) | 675 | static void __init pcm037_timer_init(void) |
@@ -636,9 +683,9 @@ struct sys_timer pcm037_timer = { | |||
636 | 683 | ||
637 | MACHINE_START(PCM037, "Phytec Phycore pcm037") | 684 | MACHINE_START(PCM037, "Phytec Phycore pcm037") |
638 | /* Maintainer: Pengutronix */ | 685 | /* Maintainer: Pengutronix */ |
639 | .phys_io = AIPS1_BASE_ADDR, | 686 | .phys_io = MX31_AIPS1_BASE_ADDR, |
640 | .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, | 687 | .io_pg_offst = (MX31_AIPS1_BASE_ADDR_VIRT >> 18) & 0xfffc, |
641 | .boot_params = PHYS_OFFSET + 0x100, | 688 | .boot_params = MX3x_PHYS_OFFSET + 0x100, |
642 | .map_io = mx31_map_io, | 689 | .map_io = mx31_map_io, |
643 | .init_irq = mx31_init_irq, | 690 | .init_irq = mx31_init_irq, |
644 | .init_machine = mxc_board_init, | 691 | .init_machine = mxc_board_init, |
diff --git a/arch/arm/mach-mx3/pcm037_eet.c b/arch/arm/mach-mx3/mach-pcm037_eet.c index 8d386000fc40..8d386000fc40 100644 --- a/arch/arm/mach-mx3/pcm037_eet.c +++ b/arch/arm/mach-mx3/mach-pcm037_eet.c | |||
diff --git a/arch/arm/mach-mx3/pcm043.c b/arch/arm/mach-mx3/mach-pcm043.c index e3aa829be586..1bf1ec2eef5e 100644 --- a/arch/arm/mach-mx3/pcm043.c +++ b/arch/arm/mach-mx3/mach-pcm043.c | |||
@@ -26,8 +26,12 @@ | |||
26 | #include <linux/gpio.h> | 26 | #include <linux/gpio.h> |
27 | #include <linux/smc911x.h> | 27 | #include <linux/smc911x.h> |
28 | #include <linux/interrupt.h> | 28 | #include <linux/interrupt.h> |
29 | #include <linux/delay.h> | ||
29 | #include <linux/i2c.h> | 30 | #include <linux/i2c.h> |
30 | #include <linux/i2c/at24.h> | 31 | #include <linux/i2c/at24.h> |
32 | #include <linux/usb/otg.h> | ||
33 | #include <linux/usb/ulpi.h> | ||
34 | #include <linux/fsl_devices.h> | ||
31 | 35 | ||
32 | #include <asm/mach-types.h> | 36 | #include <asm/mach-types.h> |
33 | #include <asm/mach/arch.h> | 37 | #include <asm/mach/arch.h> |
@@ -44,6 +48,10 @@ | |||
44 | #include <mach/ipu.h> | 48 | #include <mach/ipu.h> |
45 | #include <mach/mx3fb.h> | 49 | #include <mach/mx3fb.h> |
46 | #include <mach/mxc_nand.h> | 50 | #include <mach/mxc_nand.h> |
51 | #include <mach/mxc_ehci.h> | ||
52 | #include <mach/ulpi.h> | ||
53 | #include <mach/audmux.h> | ||
54 | #include <mach/ssi.h> | ||
47 | 55 | ||
48 | #include "devices.h" | 56 | #include "devices.h" |
49 | 57 | ||
@@ -205,6 +213,94 @@ static struct pad_desc pcm043_pads[] = { | |||
205 | MX35_PAD_D3_CLS__IPU_DISPB_D3_CLS, | 213 | MX35_PAD_D3_CLS__IPU_DISPB_D3_CLS, |
206 | /* gpio */ | 214 | /* gpio */ |
207 | MX35_PAD_ATA_CS0__GPIO2_6, | 215 | MX35_PAD_ATA_CS0__GPIO2_6, |
216 | /* USB host */ | ||
217 | MX35_PAD_I2C2_CLK__USB_TOP_USBH2_PWR, | ||
218 | MX35_PAD_I2C2_DAT__USB_TOP_USBH2_OC, | ||
219 | /* SSI */ | ||
220 | MX35_PAD_STXFS4__AUDMUX_AUD4_TXFS, | ||
221 | MX35_PAD_STXD4__AUDMUX_AUD4_TXD, | ||
222 | MX35_PAD_SRXD4__AUDMUX_AUD4_RXD, | ||
223 | MX35_PAD_SCK4__AUDMUX_AUD4_TXC, | ||
224 | }; | ||
225 | |||
226 | #define AC97_GPIO_TXFS (1 * 32 + 31) | ||
227 | #define AC97_GPIO_TXD (1 * 32 + 28) | ||
228 | #define AC97_GPIO_RESET (1 * 32 + 0) | ||
229 | |||
230 | static void pcm043_ac97_warm_reset(struct snd_ac97 *ac97) | ||
231 | { | ||
232 | struct pad_desc txfs_gpio = MX35_PAD_STXFS4__GPIO2_31; | ||
233 | struct pad_desc txfs = MX35_PAD_STXFS4__AUDMUX_AUD4_TXFS; | ||
234 | int ret; | ||
235 | |||
236 | ret = gpio_request(AC97_GPIO_TXFS, "SSI"); | ||
237 | if (ret) { | ||
238 | printk("failed to get GPIO_TXFS: %d\n", ret); | ||
239 | return; | ||
240 | } | ||
241 | |||
242 | mxc_iomux_v3_setup_pad(&txfs_gpio); | ||
243 | |||
244 | /* warm reset */ | ||
245 | gpio_direction_output(AC97_GPIO_TXFS, 1); | ||
246 | udelay(2); | ||
247 | gpio_set_value(AC97_GPIO_TXFS, 0); | ||
248 | |||
249 | gpio_free(AC97_GPIO_TXFS); | ||
250 | mxc_iomux_v3_setup_pad(&txfs); | ||
251 | } | ||
252 | |||
253 | static void pcm043_ac97_cold_reset(struct snd_ac97 *ac97) | ||
254 | { | ||
255 | struct pad_desc txfs_gpio = MX35_PAD_STXFS4__GPIO2_31; | ||
256 | struct pad_desc txfs = MX35_PAD_STXFS4__AUDMUX_AUD4_TXFS; | ||
257 | struct pad_desc txd_gpio = MX35_PAD_STXD4__GPIO2_28; | ||
258 | struct pad_desc txd = MX35_PAD_STXD4__AUDMUX_AUD4_TXD; | ||
259 | struct pad_desc reset_gpio = MX35_PAD_SD2_CMD__GPIO2_0; | ||
260 | int ret; | ||
261 | |||
262 | ret = gpio_request(AC97_GPIO_TXFS, "SSI"); | ||
263 | if (ret) | ||
264 | goto err1; | ||
265 | |||
266 | ret = gpio_request(AC97_GPIO_TXD, "SSI"); | ||
267 | if (ret) | ||
268 | goto err2; | ||
269 | |||
270 | ret = gpio_request(AC97_GPIO_RESET, "SSI"); | ||
271 | if (ret) | ||
272 | goto err3; | ||
273 | |||
274 | mxc_iomux_v3_setup_pad(&txfs_gpio); | ||
275 | mxc_iomux_v3_setup_pad(&txd_gpio); | ||
276 | mxc_iomux_v3_setup_pad(&reset_gpio); | ||
277 | |||
278 | gpio_direction_output(AC97_GPIO_TXFS, 0); | ||
279 | gpio_direction_output(AC97_GPIO_TXD, 0); | ||
280 | |||
281 | /* cold reset */ | ||
282 | gpio_direction_output(AC97_GPIO_RESET, 0); | ||
283 | udelay(10); | ||
284 | gpio_direction_output(AC97_GPIO_RESET, 1); | ||
285 | |||
286 | mxc_iomux_v3_setup_pad(&txd); | ||
287 | mxc_iomux_v3_setup_pad(&txfs); | ||
288 | |||
289 | gpio_free(AC97_GPIO_RESET); | ||
290 | err3: | ||
291 | gpio_free(AC97_GPIO_TXD); | ||
292 | err2: | ||
293 | gpio_free(AC97_GPIO_TXFS); | ||
294 | err1: | ||
295 | if (ret) | ||
296 | printk("%s failed with %d\n", __func__, ret); | ||
297 | mdelay(1); | ||
298 | } | ||
299 | |||
300 | static struct imx_ssi_platform_data pcm043_ssi_pdata = { | ||
301 | .ac97_reset = pcm043_ac97_cold_reset, | ||
302 | .ac97_warm_reset = pcm043_ac97_warm_reset, | ||
303 | .flags = IMX_SSI_USE_AC97, | ||
208 | }; | 304 | }; |
209 | 305 | ||
210 | static struct mxc_nand_platform_data pcm037_nand_board_info = { | 306 | static struct mxc_nand_platform_data pcm037_nand_board_info = { |
@@ -212,6 +308,37 @@ static struct mxc_nand_platform_data pcm037_nand_board_info = { | |||
212 | .hw_ecc = 1, | 308 | .hw_ecc = 1, |
213 | }; | 309 | }; |
214 | 310 | ||
311 | static struct mxc_usbh_platform_data otg_pdata = { | ||
312 | .portsc = MXC_EHCI_MODE_UTMI, | ||
313 | .flags = MXC_EHCI_INTERFACE_DIFF_UNI, | ||
314 | }; | ||
315 | |||
316 | static struct mxc_usbh_platform_data usbh1_pdata = { | ||
317 | .portsc = MXC_EHCI_MODE_SERIAL, | ||
318 | .flags = MXC_EHCI_INTERFACE_SINGLE_UNI | MXC_EHCI_INTERNAL_PHY | | ||
319 | MXC_EHCI_IPPUE_DOWN, | ||
320 | }; | ||
321 | |||
322 | static struct fsl_usb2_platform_data otg_device_pdata = { | ||
323 | .operating_mode = FSL_USB2_DR_DEVICE, | ||
324 | .phy_mode = FSL_USB2_PHY_UTMI, | ||
325 | }; | ||
326 | |||
327 | static int otg_mode_host; | ||
328 | |||
329 | static int __init pcm043_otg_mode(char *options) | ||
330 | { | ||
331 | if (!strcmp(options, "host")) | ||
332 | otg_mode_host = 1; | ||
333 | else if (!strcmp(options, "device")) | ||
334 | otg_mode_host = 0; | ||
335 | else | ||
336 | pr_info("otg_mode neither \"host\" nor \"device\". " | ||
337 | "Defaulting to device\n"); | ||
338 | return 0; | ||
339 | } | ||
340 | __setup("otg_mode=", pcm043_otg_mode); | ||
341 | |||
215 | /* | 342 | /* |
216 | * Board specific initialization. | 343 | * Board specific initialization. |
217 | */ | 344 | */ |
@@ -219,10 +346,23 @@ static void __init mxc_board_init(void) | |||
219 | { | 346 | { |
220 | mxc_iomux_v3_setup_multiple_pads(pcm043_pads, ARRAY_SIZE(pcm043_pads)); | 347 | mxc_iomux_v3_setup_multiple_pads(pcm043_pads, ARRAY_SIZE(pcm043_pads)); |
221 | 348 | ||
349 | mxc_audmux_v2_configure_port(3, | ||
350 | MXC_AUDMUX_V2_PTCR_SYN | /* 4wire mode */ | ||
351 | MXC_AUDMUX_V2_PTCR_TFSEL(0) | | ||
352 | MXC_AUDMUX_V2_PTCR_TFSDIR, | ||
353 | MXC_AUDMUX_V2_PDCR_RXDSEL(0)); | ||
354 | |||
355 | mxc_audmux_v2_configure_port(0, | ||
356 | MXC_AUDMUX_V2_PTCR_SYN | /* 4wire mode */ | ||
357 | MXC_AUDMUX_V2_PTCR_TCSEL(3) | | ||
358 | MXC_AUDMUX_V2_PTCR_TCLKDIR, /* clock is output */ | ||
359 | MXC_AUDMUX_V2_PDCR_RXDSEL(3)); | ||
360 | |||
222 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 361 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
223 | 362 | ||
224 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 363 | mxc_register_device(&mxc_uart_device0, &uart_pdata); |
225 | mxc_register_device(&mxc_nand_device, &pcm037_nand_board_info); | 364 | mxc_register_device(&mxc_nand_device, &pcm037_nand_board_info); |
365 | mxc_register_device(&imx_ssi_device0, &pcm043_ssi_pdata); | ||
226 | 366 | ||
227 | mxc_register_device(&mxc_uart_device1, &uart_pdata); | 367 | mxc_register_device(&mxc_uart_device1, &uart_pdata); |
228 | 368 | ||
@@ -235,6 +375,20 @@ static void __init mxc_board_init(void) | |||
235 | 375 | ||
236 | mxc_register_device(&mx3_ipu, &mx3_ipu_data); | 376 | mxc_register_device(&mx3_ipu, &mx3_ipu_data); |
237 | mxc_register_device(&mx3_fb, &mx3fb_pdata); | 377 | mxc_register_device(&mx3_fb, &mx3fb_pdata); |
378 | |||
379 | #if defined(CONFIG_USB_ULPI) | ||
380 | if (otg_mode_host) { | ||
381 | otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, | ||
382 | USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); | ||
383 | |||
384 | mxc_register_device(&mxc_otg_host, &otg_pdata); | ||
385 | } | ||
386 | |||
387 | mxc_register_device(&mxc_usbh1, &usbh1_pdata); | ||
388 | #endif | ||
389 | if (!otg_mode_host) | ||
390 | mxc_register_device(&mxc_otg_udc_device, &otg_device_pdata); | ||
391 | |||
238 | } | 392 | } |
239 | 393 | ||
240 | static void __init pcm043_timer_init(void) | 394 | static void __init pcm043_timer_init(void) |
@@ -248,9 +402,9 @@ struct sys_timer pcm043_timer = { | |||
248 | 402 | ||
249 | MACHINE_START(PCM043, "Phytec Phycore pcm043") | 403 | MACHINE_START(PCM043, "Phytec Phycore pcm043") |
250 | /* Maintainer: Pengutronix */ | 404 | /* Maintainer: Pengutronix */ |
251 | .phys_io = AIPS1_BASE_ADDR, | 405 | .phys_io = MX35_AIPS1_BASE_ADDR, |
252 | .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, | 406 | .io_pg_offst = ((MX35_AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, |
253 | .boot_params = PHYS_OFFSET + 0x100, | 407 | .boot_params = MX3x_PHYS_OFFSET + 0x100, |
254 | .map_io = mx35_map_io, | 408 | .map_io = mx35_map_io, |
255 | .init_irq = mx35_init_irq, | 409 | .init_irq = mx35_init_irq, |
256 | .init_machine = mxc_board_init, | 410 | .init_machine = mxc_board_init, |
diff --git a/arch/arm/mach-mx3/qong.c b/arch/arm/mach-mx3/mach-qong.c index 044511f1b9a9..e5b5b8323a17 100644 --- a/arch/arm/mach-mx3/qong.c +++ b/arch/arm/mach-mx3/mach-qong.c | |||
@@ -43,7 +43,7 @@ | |||
43 | #define QONG_FPGA_VERSION(major, minor, rev) \ | 43 | #define QONG_FPGA_VERSION(major, minor, rev) \ |
44 | (((major & 0xF) << 12) | ((minor & 0xF) << 8) | (rev & 0xFF)) | 44 | (((major & 0xF) << 12) | ((minor & 0xF) << 8) | (rev & 0xFF)) |
45 | 45 | ||
46 | #define QONG_FPGA_BASEADDR CS1_BASE_ADDR | 46 | #define QONG_FPGA_BASEADDR MX31_CS1_BASE_ADDR |
47 | #define QONG_FPGA_PERIPH_SIZE (1 << 24) | 47 | #define QONG_FPGA_PERIPH_SIZE (1 << 24) |
48 | 48 | ||
49 | #define QONG_FPGA_CTRL_BASEADDR QONG_FPGA_BASEADDR | 49 | #define QONG_FPGA_CTRL_BASEADDR QONG_FPGA_BASEADDR |
@@ -115,8 +115,8 @@ static struct physmap_flash_data qong_flash_data = { | |||
115 | }; | 115 | }; |
116 | 116 | ||
117 | static struct resource qong_flash_resource = { | 117 | static struct resource qong_flash_resource = { |
118 | .start = CS0_BASE_ADDR, | 118 | .start = MX31_CS0_BASE_ADDR, |
119 | .end = CS0_BASE_ADDR + QONG_NOR_SIZE - 1, | 119 | .end = MX31_CS0_BASE_ADDR + QONG_NOR_SIZE - 1, |
120 | .flags = IORESOURCE_MEM, | 120 | .flags = IORESOURCE_MEM, |
121 | }; | 121 | }; |
122 | 122 | ||
@@ -180,8 +180,8 @@ static struct platform_nand_data qong_nand_data = { | |||
180 | }; | 180 | }; |
181 | 181 | ||
182 | static struct resource qong_nand_resource = { | 182 | static struct resource qong_nand_resource = { |
183 | .start = CS3_BASE_ADDR, | 183 | .start = MX31_CS3_BASE_ADDR, |
184 | .end = CS3_BASE_ADDR + SZ_32M - 1, | 184 | .end = MX31_CS3_BASE_ADDR + SZ_32M - 1, |
185 | .flags = IORESOURCE_MEM, | 185 | .flags = IORESOURCE_MEM, |
186 | }; | 186 | }; |
187 | 187 | ||
@@ -198,9 +198,7 @@ static struct platform_device qong_nand_device = { | |||
198 | static void __init qong_init_nand_mtd(void) | 198 | static void __init qong_init_nand_mtd(void) |
199 | { | 199 | { |
200 | /* init CS */ | 200 | /* init CS */ |
201 | __raw_writel(0x00004f00, CSCR_U(3)); | 201 | mx31_setup_weimcs(3, 0x00004f00, 0x20013b31, 0x00020800); |
202 | __raw_writel(0x20013b31, CSCR_L(3)); | ||
203 | __raw_writel(0x00020800, CSCR_A(3)); | ||
204 | mxc_iomux_set_gpr(MUX_SDCTL_CSD1_SEL, true); | 202 | mxc_iomux_set_gpr(MUX_SDCTL_CSD1_SEL, true); |
205 | 203 | ||
206 | /* enable pin */ | 204 | /* enable pin */ |
@@ -275,9 +273,9 @@ static struct sys_timer qong_timer = { | |||
275 | 273 | ||
276 | MACHINE_START(QONG, "Dave/DENX QongEVB-LITE") | 274 | MACHINE_START(QONG, "Dave/DENX QongEVB-LITE") |
277 | /* Maintainer: DENX Software Engineering GmbH */ | 275 | /* Maintainer: DENX Software Engineering GmbH */ |
278 | .phys_io = AIPS1_BASE_ADDR, | 276 | .phys_io = MX31_AIPS1_BASE_ADDR, |
279 | .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, | 277 | .io_pg_offst = (MX31_AIPS1_BASE_ADDR_VIRT >> 18) & 0xfffc, |
280 | .boot_params = PHYS_OFFSET + 0x100, | 278 | .boot_params = MX3x_PHYS_OFFSET + 0x100, |
281 | .map_io = mx31_map_io, | 279 | .map_io = mx31_map_io, |
282 | .init_irq = mx31_init_irq, | 280 | .init_irq = mx31_init_irq, |
283 | .init_machine = mxc_board_init, | 281 | .init_machine = mxc_board_init, |
diff --git a/arch/arm/mach-mx3/mx31lite-db.c b/arch/arm/mach-mx3/mx31lite-db.c index 694611d6b057..ccd874225c3b 100644 --- a/arch/arm/mach-mx3/mx31lite-db.c +++ b/arch/arm/mach-mx3/mx31lite-db.c | |||
@@ -67,6 +67,13 @@ static unsigned int litekit_db_board_pins[] __initdata = { | |||
67 | MX31_PIN_CSPI1_SS0__SS0, | 67 | MX31_PIN_CSPI1_SS0__SS0, |
68 | MX31_PIN_CSPI1_SS1__SS1, | 68 | MX31_PIN_CSPI1_SS1__SS1, |
69 | MX31_PIN_CSPI1_SS2__SS2, | 69 | MX31_PIN_CSPI1_SS2__SS2, |
70 | /* SDHC1 */ | ||
71 | MX31_PIN_SD1_DATA0__SD1_DATA0, | ||
72 | MX31_PIN_SD1_DATA1__SD1_DATA1, | ||
73 | MX31_PIN_SD1_DATA2__SD1_DATA2, | ||
74 | MX31_PIN_SD1_DATA3__SD1_DATA3, | ||
75 | MX31_PIN_SD1_CLK__SD1_CLK, | ||
76 | MX31_PIN_SD1_CMD__SD1_CMD, | ||
70 | }; | 77 | }; |
71 | 78 | ||
72 | /* UART */ | 79 | /* UART */ |
@@ -79,11 +86,11 @@ static struct imxuart_platform_data uart_pdata __initdata = { | |||
79 | static int gpio_det, gpio_wp; | 86 | static int gpio_det, gpio_wp; |
80 | 87 | ||
81 | #define MMC_PAD_CFG (PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST | PAD_CTL_HYS_CMOS | \ | 88 | #define MMC_PAD_CFG (PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST | PAD_CTL_HYS_CMOS | \ |
82 | PAD_CTL_ODE_CMOS | PAD_CTL_100K_PU) | 89 | PAD_CTL_ODE_CMOS) |
83 | 90 | ||
84 | static int mxc_mmc1_get_ro(struct device *dev) | 91 | static int mxc_mmc1_get_ro(struct device *dev) |
85 | { | 92 | { |
86 | return gpio_get_value(IOMUX_TO_GPIO(MX31_PIN_LCS0)); | 93 | return gpio_get_value(IOMUX_TO_GPIO(MX31_PIN_GPIO1_6)); |
87 | } | 94 | } |
88 | 95 | ||
89 | static int mxc_mmc1_init(struct device *dev, | 96 | static int mxc_mmc1_init(struct device *dev, |
@@ -94,12 +101,17 @@ static int mxc_mmc1_init(struct device *dev, | |||
94 | gpio_det = IOMUX_TO_GPIO(MX31_PIN_DCD_DCE1); | 101 | gpio_det = IOMUX_TO_GPIO(MX31_PIN_DCD_DCE1); |
95 | gpio_wp = IOMUX_TO_GPIO(MX31_PIN_GPIO1_6); | 102 | gpio_wp = IOMUX_TO_GPIO(MX31_PIN_GPIO1_6); |
96 | 103 | ||
97 | mxc_iomux_set_pad(MX31_PIN_SD1_DATA0, MMC_PAD_CFG); | 104 | mxc_iomux_set_pad(MX31_PIN_SD1_DATA0, |
98 | mxc_iomux_set_pad(MX31_PIN_SD1_DATA1, MMC_PAD_CFG); | 105 | MMC_PAD_CFG | PAD_CTL_PUE_PUD | PAD_CTL_100K_PU); |
99 | mxc_iomux_set_pad(MX31_PIN_SD1_DATA2, MMC_PAD_CFG); | 106 | mxc_iomux_set_pad(MX31_PIN_SD1_DATA1, |
100 | mxc_iomux_set_pad(MX31_PIN_SD1_DATA3, MMC_PAD_CFG); | 107 | MMC_PAD_CFG | PAD_CTL_PUE_PUD | PAD_CTL_100K_PU); |
108 | mxc_iomux_set_pad(MX31_PIN_SD1_DATA2, | ||
109 | MMC_PAD_CFG | PAD_CTL_PUE_PUD | PAD_CTL_100K_PU); | ||
110 | mxc_iomux_set_pad(MX31_PIN_SD1_DATA3, | ||
111 | MMC_PAD_CFG | PAD_CTL_PUE_PUD | PAD_CTL_100K_PU); | ||
112 | mxc_iomux_set_pad(MX31_PIN_SD1_CMD, | ||
113 | MMC_PAD_CFG | PAD_CTL_PUE_PUD | PAD_CTL_100K_PU); | ||
101 | mxc_iomux_set_pad(MX31_PIN_SD1_CLK, MMC_PAD_CFG); | 114 | mxc_iomux_set_pad(MX31_PIN_SD1_CLK, MMC_PAD_CFG); |
102 | mxc_iomux_set_pad(MX31_PIN_SD1_CMD, MMC_PAD_CFG); | ||
103 | 115 | ||
104 | ret = gpio_request(gpio_det, "MMC detect"); | 116 | ret = gpio_request(gpio_det, "MMC detect"); |
105 | if (ret) | 117 | if (ret) |
@@ -113,7 +125,7 @@ static int mxc_mmc1_init(struct device *dev, | |||
113 | gpio_direction_input(gpio_wp); | 125 | gpio_direction_input(gpio_wp); |
114 | 126 | ||
115 | ret = request_irq(IOMUX_TO_IRQ(MX31_PIN_DCD_DCE1), detect_irq, | 127 | ret = request_irq(IOMUX_TO_IRQ(MX31_PIN_DCD_DCE1), detect_irq, |
116 | IRQF_DISABLED | IRQF_TRIGGER_FALLING, | 128 | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, |
117 | "MMC detect", data); | 129 | "MMC detect", data); |
118 | if (ret) | 130 | if (ret) |
119 | goto exit_free_wp; | 131 | goto exit_free_wp; |
@@ -133,7 +145,7 @@ static void mxc_mmc1_exit(struct device *dev, void *data) | |||
133 | { | 145 | { |
134 | gpio_free(gpio_det); | 146 | gpio_free(gpio_det); |
135 | gpio_free(gpio_wp); | 147 | gpio_free(gpio_wp); |
136 | free_irq(IOMUX_TO_IRQ(MX31_PIN_GPIO1_1), data); | 148 | free_irq(IOMUX_TO_IRQ(MX31_PIN_DCD_DCE1), data); |
137 | } | 149 | } |
138 | 150 | ||
139 | static struct imxmmc_platform_data mmc_pdata = { | 151 | static struct imxmmc_platform_data mmc_pdata = { |
diff --git a/arch/arm/mach-mx3/mx31moboard-devboard.c b/arch/arm/mach-mx3/mx31moboard-devboard.c index 438428eaf769..9fbad2eb3a49 100644 --- a/arch/arm/mach-mx3/mx31moboard-devboard.c +++ b/arch/arm/mach-mx3/mx31moboard-devboard.c | |||
@@ -49,6 +49,9 @@ static unsigned int devboard_pins[] = { | |||
49 | MX31_PIN_CSPI1_SS2__USBH1_RCV, MX31_PIN_CSPI1_SCLK__USBH1_OEB, | 49 | MX31_PIN_CSPI1_SS2__USBH1_RCV, MX31_PIN_CSPI1_SCLK__USBH1_OEB, |
50 | MX31_PIN_CSPI1_SPI_RDY__USBH1_FS, MX31_PIN_SFS6__USBH1_SUSPEND, | 50 | MX31_PIN_CSPI1_SPI_RDY__USBH1_FS, MX31_PIN_SFS6__USBH1_SUSPEND, |
51 | MX31_PIN_NFRE_B__GPIO1_11, MX31_PIN_NFALE__GPIO1_12, | 51 | MX31_PIN_NFRE_B__GPIO1_11, MX31_PIN_NFALE__GPIO1_12, |
52 | /* SEL */ | ||
53 | MX31_PIN_DTR_DCE1__GPIO2_8, MX31_PIN_DSR_DCE1__GPIO2_9, | ||
54 | MX31_PIN_RI_DCE1__GPIO2_10, MX31_PIN_DCD_DCE1__GPIO2_11, | ||
52 | }; | 55 | }; |
53 | 56 | ||
54 | static struct imxuart_platform_data uart_pdata = { | 57 | static struct imxuart_platform_data uart_pdata = { |
@@ -108,6 +111,33 @@ static struct imxmmc_platform_data sdhc2_pdata = { | |||
108 | .exit = devboard_sdhc2_exit, | 111 | .exit = devboard_sdhc2_exit, |
109 | }; | 112 | }; |
110 | 113 | ||
114 | #define SEL0 IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1) | ||
115 | #define SEL1 IOMUX_TO_GPIO(MX31_PIN_DSR_DCE1) | ||
116 | #define SEL2 IOMUX_TO_GPIO(MX31_PIN_RI_DCE1) | ||
117 | #define SEL3 IOMUX_TO_GPIO(MX31_PIN_DCD_DCE1) | ||
118 | |||
119 | static void devboard_init_sel_gpios(void) | ||
120 | { | ||
121 | if (!gpio_request(SEL0, "sel0")) { | ||
122 | gpio_direction_input(SEL0); | ||
123 | gpio_export(SEL0, true); | ||
124 | } | ||
125 | |||
126 | if (!gpio_request(SEL1, "sel1")) { | ||
127 | gpio_direction_input(SEL1); | ||
128 | gpio_export(SEL1, true); | ||
129 | } | ||
130 | |||
131 | if (!gpio_request(SEL2, "sel2")) { | ||
132 | gpio_direction_input(SEL2); | ||
133 | gpio_export(SEL2, true); | ||
134 | } | ||
135 | |||
136 | if (!gpio_request(SEL3, "sel3")) { | ||
137 | gpio_direction_input(SEL3); | ||
138 | gpio_export(SEL3, true); | ||
139 | } | ||
140 | } | ||
111 | #define USB_PAD_CFG (PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST | PAD_CTL_HYS_CMOS | \ | 141 | #define USB_PAD_CFG (PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST | PAD_CTL_HYS_CMOS | \ |
112 | PAD_CTL_ODE_CMOS | PAD_CTL_100K_PU) | 142 | PAD_CTL_ODE_CMOS | PAD_CTL_100K_PU) |
113 | 143 | ||
@@ -196,5 +226,7 @@ void __init mx31moboard_devboard_init(void) | |||
196 | 226 | ||
197 | mxc_register_device(&mxcsdhc_device1, &sdhc2_pdata); | 227 | mxc_register_device(&mxcsdhc_device1, &sdhc2_pdata); |
198 | 228 | ||
229 | devboard_init_sel_gpios(); | ||
230 | |||
199 | devboard_usbh1_init(); | 231 | devboard_usbh1_init(); |
200 | } | 232 | } |
diff --git a/arch/arm/mach-mx3/mx31moboard-marxbot.c b/arch/arm/mach-mx3/mx31moboard-marxbot.c index 1f44b9ccbb0f..3958515d75bf 100644 --- a/arch/arm/mach-mx3/mx31moboard-marxbot.c +++ b/arch/arm/mach-mx3/mx31moboard-marxbot.c | |||
@@ -66,6 +66,9 @@ static unsigned int marxbot_pins[] = { | |||
66 | MX31_PIN_CSPI1_SS2__USBH1_RCV, MX31_PIN_CSPI1_SCLK__USBH1_OEB, | 66 | MX31_PIN_CSPI1_SS2__USBH1_RCV, MX31_PIN_CSPI1_SCLK__USBH1_OEB, |
67 | MX31_PIN_CSPI1_SPI_RDY__USBH1_FS, MX31_PIN_SFS6__USBH1_SUSPEND, | 67 | MX31_PIN_CSPI1_SPI_RDY__USBH1_FS, MX31_PIN_SFS6__USBH1_SUSPEND, |
68 | MX31_PIN_NFRE_B__GPIO1_11, MX31_PIN_NFALE__GPIO1_12, | 68 | MX31_PIN_NFRE_B__GPIO1_11, MX31_PIN_NFALE__GPIO1_12, |
69 | /* SEL */ | ||
70 | MX31_PIN_DTR_DCE1__GPIO2_8, MX31_PIN_DSR_DCE1__GPIO2_9, | ||
71 | MX31_PIN_RI_DCE1__GPIO2_10, MX31_PIN_DCD_DCE1__GPIO2_11, | ||
69 | }; | 72 | }; |
70 | 73 | ||
71 | #define SDHC2_CD IOMUX_TO_GPIO(MX31_PIN_ATA_DIOR) | 74 | #define SDHC2_CD IOMUX_TO_GPIO(MX31_PIN_ATA_DIOR) |
@@ -127,12 +130,12 @@ static struct imxmmc_platform_data sdhc2_pdata = { | |||
127 | static void dspics_resets_init(void) | 130 | static void dspics_resets_init(void) |
128 | { | 131 | { |
129 | if (!gpio_request(TRSLAT_RST_B, "translator-rst")) { | 132 | if (!gpio_request(TRSLAT_RST_B, "translator-rst")) { |
130 | gpio_direction_output(TRSLAT_RST_B, 1); | 133 | gpio_direction_output(TRSLAT_RST_B, 0); |
131 | gpio_export(TRSLAT_RST_B, false); | 134 | gpio_export(TRSLAT_RST_B, false); |
132 | } | 135 | } |
133 | 136 | ||
134 | if (!gpio_request(DSPICS_RST_B, "dspics-rst")) { | 137 | if (!gpio_request(DSPICS_RST_B, "dspics-rst")) { |
135 | gpio_direction_output(DSPICS_RST_B, 1); | 138 | gpio_direction_output(DSPICS_RST_B, 0); |
136 | gpio_export(DSPICS_RST_B, false); | 139 | gpio_export(DSPICS_RST_B, false); |
137 | } | 140 | } |
138 | } | 141 | } |
@@ -200,7 +203,7 @@ static int __init marxbot_cam_init(void) | |||
200 | int ret = gpio_request(CAM_CHOICE, "cam-choice"); | 203 | int ret = gpio_request(CAM_CHOICE, "cam-choice"); |
201 | if (ret) | 204 | if (ret) |
202 | return ret; | 205 | return ret; |
203 | gpio_direction_output(CAM_CHOICE, 1); | 206 | gpio_direction_output(CAM_CHOICE, 0); |
204 | 207 | ||
205 | ret = gpio_request(BASECAM_RST_B, "basecam-reset"); | 208 | ret = gpio_request(BASECAM_RST_B, "basecam-reset"); |
206 | if (ret) | 209 | if (ret) |
@@ -223,6 +226,34 @@ static int __init marxbot_cam_init(void) | |||
223 | return 0; | 226 | return 0; |
224 | } | 227 | } |
225 | 228 | ||
229 | #define SEL0 IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1) | ||
230 | #define SEL1 IOMUX_TO_GPIO(MX31_PIN_DSR_DCE1) | ||
231 | #define SEL2 IOMUX_TO_GPIO(MX31_PIN_RI_DCE1) | ||
232 | #define SEL3 IOMUX_TO_GPIO(MX31_PIN_DCD_DCE1) | ||
233 | |||
234 | static void marxbot_init_sel_gpios(void) | ||
235 | { | ||
236 | if (!gpio_request(SEL0, "sel0")) { | ||
237 | gpio_direction_input(SEL0); | ||
238 | gpio_export(SEL0, true); | ||
239 | } | ||
240 | |||
241 | if (!gpio_request(SEL1, "sel1")) { | ||
242 | gpio_direction_input(SEL1); | ||
243 | gpio_export(SEL1, true); | ||
244 | } | ||
245 | |||
246 | if (!gpio_request(SEL2, "sel2")) { | ||
247 | gpio_direction_input(SEL2); | ||
248 | gpio_export(SEL2, true); | ||
249 | } | ||
250 | |||
251 | if (!gpio_request(SEL3, "sel3")) { | ||
252 | gpio_direction_input(SEL3); | ||
253 | gpio_export(SEL3, true); | ||
254 | } | ||
255 | } | ||
256 | |||
226 | #define USB_PAD_CFG (PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST | PAD_CTL_HYS_CMOS | \ | 257 | #define USB_PAD_CFG (PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST | PAD_CTL_HYS_CMOS | \ |
227 | PAD_CTL_ODE_CMOS | PAD_CTL_100K_PU) | 258 | PAD_CTL_ODE_CMOS | PAD_CTL_100K_PU) |
228 | 259 | ||
@@ -307,6 +338,8 @@ void __init mx31moboard_marxbot_init(void) | |||
307 | mxc_iomux_setup_multiple_pins(marxbot_pins, ARRAY_SIZE(marxbot_pins), | 338 | mxc_iomux_setup_multiple_pins(marxbot_pins, ARRAY_SIZE(marxbot_pins), |
308 | "marxbot"); | 339 | "marxbot"); |
309 | 340 | ||
341 | marxbot_init_sel_gpios(); | ||
342 | |||
310 | dspics_resets_init(); | 343 | dspics_resets_init(); |
311 | 344 | ||
312 | mxc_register_device(&mxcsdhc_device1, &sdhc2_pdata); | 345 | mxc_register_device(&mxcsdhc_device1, &sdhc2_pdata); |
diff --git a/arch/arm/mach-mx3/mx31moboard-smartbot.c b/arch/arm/mach-mx3/mx31moboard-smartbot.c new file mode 100644 index 000000000000..52a69fc8b14f --- /dev/null +++ b/arch/arm/mach-mx3/mx31moboard-smartbot.c | |||
@@ -0,0 +1,162 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009 Valentin Longchamp, EPFL Mobots group | ||
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/delay.h> | ||
20 | #include <linux/gpio.h> | ||
21 | #include <linux/init.h> | ||
22 | #include <linux/interrupt.h> | ||
23 | #include <linux/i2c.h> | ||
24 | #include <linux/platform_device.h> | ||
25 | #include <linux/types.h> | ||
26 | |||
27 | #include <mach/common.h> | ||
28 | #include <mach/hardware.h> | ||
29 | #include <mach/imx-uart.h> | ||
30 | #include <mach/iomux-mx3.h> | ||
31 | |||
32 | #include <media/soc_camera.h> | ||
33 | |||
34 | #include "devices.h" | ||
35 | |||
36 | static unsigned int smartbot_pins[] = { | ||
37 | /* UART1 */ | ||
38 | MX31_PIN_CTS2__CTS2, MX31_PIN_RTS2__RTS2, | ||
39 | MX31_PIN_TXD2__TXD2, MX31_PIN_RXD2__RXD2, | ||
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 | /* ENABLES */ | ||
51 | MX31_PIN_DTR_DCE1__GPIO2_8, MX31_PIN_DSR_DCE1__GPIO2_9, | ||
52 | MX31_PIN_RI_DCE1__GPIO2_10, MX31_PIN_DCD_DCE1__GPIO2_11, | ||
53 | }; | ||
54 | |||
55 | static struct imxuart_platform_data uart_pdata = { | ||
56 | .flags = IMXUART_HAVE_RTSCTS, | ||
57 | }; | ||
58 | |||
59 | #define CAM_POWER IOMUX_TO_GPIO(MX31_PIN_GPIO3_1) | ||
60 | #define CAM_RST_B IOMUX_TO_GPIO(MX31_PIN_GPIO3_0) | ||
61 | |||
62 | static int smartbot_cam_power(struct device *dev, int on) | ||
63 | { | ||
64 | gpio_set_value(CAM_POWER, !on); | ||
65 | return 0; | ||
66 | } | ||
67 | |||
68 | static int smartbot_cam_reset(struct device *dev) | ||
69 | { | ||
70 | gpio_set_value(CAM_RST_B, 0); | ||
71 | udelay(100); | ||
72 | gpio_set_value(CAM_RST_B, 1); | ||
73 | return 0; | ||
74 | } | ||
75 | |||
76 | static struct i2c_board_info smartbot_i2c_devices[] = { | ||
77 | { | ||
78 | I2C_BOARD_INFO("mt9t031", 0x5d), | ||
79 | }, | ||
80 | }; | ||
81 | |||
82 | static struct soc_camera_link base_iclink = { | ||
83 | .bus_id = 0, /* Must match with the camera ID */ | ||
84 | .power = smartbot_cam_power, | ||
85 | .reset = smartbot_cam_reset, | ||
86 | .board_info = &smartbot_i2c_devices[0], | ||
87 | .i2c_adapter_id = 0, | ||
88 | .module_name = "mt9t031", | ||
89 | }; | ||
90 | |||
91 | static struct platform_device smartbot_camera[] = { | ||
92 | { | ||
93 | .name = "soc-camera-pdrv", | ||
94 | .id = 0, | ||
95 | .dev = { | ||
96 | .platform_data = &base_iclink, | ||
97 | }, | ||
98 | }, | ||
99 | }; | ||
100 | |||
101 | static struct platform_device *smartbot_cameras[] __initdata = { | ||
102 | &smartbot_camera[0], | ||
103 | }; | ||
104 | |||
105 | static int __init smartbot_cam_init(void) | ||
106 | { | ||
107 | int ret = gpio_request(CAM_RST_B, "cam-reset"); | ||
108 | if (ret) | ||
109 | return ret; | ||
110 | gpio_direction_output(CAM_RST_B, 1); | ||
111 | ret = gpio_request(CAM_POWER, "cam-standby"); | ||
112 | if (ret) | ||
113 | return ret; | ||
114 | gpio_direction_output(CAM_POWER, 0); | ||
115 | |||
116 | return 0; | ||
117 | } | ||
118 | |||
119 | #define POWER_EN IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1) | ||
120 | #define DSPIC_RST_B IOMUX_TO_GPIO(MX31_PIN_DSR_DCE1) | ||
121 | #define TRSLAT_RST_B IOMUX_TO_GPIO(MX31_PIN_RI_DCE1) | ||
122 | #define SEL3 IOMUX_TO_GPIO(MX31_PIN_DCD_DCE1) | ||
123 | |||
124 | static void smartbot_resets_init(void) | ||
125 | { | ||
126 | if (!gpio_request(POWER_EN, "power-enable")) { | ||
127 | gpio_direction_output(POWER_EN, 0); | ||
128 | gpio_export(POWER_EN, false); | ||
129 | } | ||
130 | |||
131 | if (!gpio_request(DSPIC_RST_B, "dspic-rst")) { | ||
132 | gpio_direction_output(DSPIC_RST_B, 0); | ||
133 | gpio_export(DSPIC_RST_B, false); | ||
134 | } | ||
135 | |||
136 | if (!gpio_request(TRSLAT_RST_B, "translator-rst")) { | ||
137 | gpio_direction_output(TRSLAT_RST_B, 0); | ||
138 | gpio_export(TRSLAT_RST_B, false); | ||
139 | } | ||
140 | |||
141 | if (!gpio_request(SEL3, "sel3")) { | ||
142 | gpio_direction_input(SEL3); | ||
143 | gpio_export(SEL3, true); | ||
144 | } | ||
145 | } | ||
146 | /* | ||
147 | * system init for baseboard usage. Will be called by mx31moboard init. | ||
148 | */ | ||
149 | void __init mx31moboard_smartbot_init(void) | ||
150 | { | ||
151 | printk(KERN_INFO "Initializing mx31smartbot peripherals\n"); | ||
152 | |||
153 | mxc_iomux_setup_multiple_pins(smartbot_pins, ARRAY_SIZE(smartbot_pins), | ||
154 | "smartbot"); | ||
155 | |||
156 | mxc_register_device(&mxc_uart_device1, &uart_pdata); | ||
157 | |||
158 | smartbot_resets_init(); | ||
159 | |||
160 | smartbot_cam_init(); | ||
161 | platform_add_devices(smartbot_cameras, ARRAY_SIZE(smartbot_cameras)); | ||
162 | } | ||
diff --git a/arch/arm/mach-mx5/Kconfig b/arch/arm/mach-mx5/Kconfig new file mode 100644 index 000000000000..1576d51e676c --- /dev/null +++ b/arch/arm/mach-mx5/Kconfig | |||
@@ -0,0 +1,18 @@ | |||
1 | if ARCH_MX5 | ||
2 | |||
3 | config ARCH_MX51 | ||
4 | bool | ||
5 | default y | ||
6 | select MXC_TZIC | ||
7 | select ARCH_MXC_IOMUX_V3 | ||
8 | |||
9 | comment "MX5 platforms:" | ||
10 | |||
11 | config MACH_MX51_BABBAGE | ||
12 | bool "Support MX51 BABBAGE platforms" | ||
13 | help | ||
14 | Include support for MX51 Babbage platform, also known as MX51EVK in | ||
15 | u-boot. This includes specific configurations for the board and its | ||
16 | peripherals. | ||
17 | |||
18 | endif | ||
diff --git a/arch/arm/mach-mx5/Makefile b/arch/arm/mach-mx5/Makefile new file mode 100644 index 000000000000..bf23f869ef51 --- /dev/null +++ b/arch/arm/mach-mx5/Makefile | |||
@@ -0,0 +1,9 @@ | |||
1 | # | ||
2 | # Makefile for the linux kernel. | ||
3 | # | ||
4 | |||
5 | # Object file lists. | ||
6 | obj-y := cpu.o mm.o clock-mx51.o devices.o | ||
7 | |||
8 | obj-$(CONFIG_MACH_MX51_BABBAGE) += board-mx51_babbage.o | ||
9 | |||
diff --git a/arch/arm/mach-mx5/Makefile.boot b/arch/arm/mach-mx5/Makefile.boot new file mode 100644 index 000000000000..9939a19d99a1 --- /dev/null +++ b/arch/arm/mach-mx5/Makefile.boot | |||
@@ -0,0 +1,3 @@ | |||
1 | zreladdr-y := 0x90008000 | ||
2 | params_phys-y := 0x90000100 | ||
3 | initrd_phys-y := 0x90800000 | ||
diff --git a/arch/arm/mach-mx5/board-mx51_babbage.c b/arch/arm/mach-mx5/board-mx51_babbage.c new file mode 100644 index 000000000000..ee67a71db80d --- /dev/null +++ b/arch/arm/mach-mx5/board-mx51_babbage.c | |||
@@ -0,0 +1,98 @@ | |||
1 | /* | ||
2 | * Copyright 2009 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * Copyright (C) 2009-2010 Amit Kucheria <amit.kucheria@canonical.com> | ||
4 | * | ||
5 | * The code contained herein is licensed under the GNU General Public | ||
6 | * License. You may obtain a copy of the GNU General Public License | ||
7 | * Version 2 or later at the following locations: | ||
8 | * | ||
9 | * http://www.opensource.org/licenses/gpl-license.html | ||
10 | * http://www.gnu.org/copyleft/gpl.html | ||
11 | */ | ||
12 | |||
13 | #include <linux/init.h> | ||
14 | #include <linux/platform_device.h> | ||
15 | |||
16 | #include <mach/common.h> | ||
17 | #include <mach/hardware.h> | ||
18 | #include <mach/imx-uart.h> | ||
19 | #include <mach/iomux-mx51.h> | ||
20 | |||
21 | #include <asm/irq.h> | ||
22 | #include <asm/setup.h> | ||
23 | #include <asm/mach-types.h> | ||
24 | #include <asm/mach/arch.h> | ||
25 | #include <asm/mach/time.h> | ||
26 | |||
27 | #include "devices.h" | ||
28 | |||
29 | static struct platform_device *devices[] __initdata = { | ||
30 | &mxc_fec_device, | ||
31 | }; | ||
32 | |||
33 | static struct pad_desc mx51babbage_pads[] = { | ||
34 | /* UART1 */ | ||
35 | MX51_PAD_UART1_RXD__UART1_RXD, | ||
36 | MX51_PAD_UART1_TXD__UART1_TXD, | ||
37 | MX51_PAD_UART1_RTS__UART1_RTS, | ||
38 | MX51_PAD_UART1_CTS__UART1_CTS, | ||
39 | |||
40 | /* UART2 */ | ||
41 | MX51_PAD_UART2_RXD__UART2_RXD, | ||
42 | MX51_PAD_UART2_TXD__UART2_TXD, | ||
43 | |||
44 | /* UART3 */ | ||
45 | MX51_PAD_EIM_D25__UART3_RXD, | ||
46 | MX51_PAD_EIM_D26__UART3_TXD, | ||
47 | MX51_PAD_EIM_D27__UART3_RTS, | ||
48 | MX51_PAD_EIM_D24__UART3_CTS, | ||
49 | }; | ||
50 | |||
51 | /* Serial ports */ | ||
52 | #if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE) | ||
53 | static struct imxuart_platform_data uart_pdata = { | ||
54 | .flags = IMXUART_HAVE_RTSCTS, | ||
55 | }; | ||
56 | |||
57 | static inline void mxc_init_imx_uart(void) | ||
58 | { | ||
59 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | ||
60 | mxc_register_device(&mxc_uart_device1, &uart_pdata); | ||
61 | mxc_register_device(&mxc_uart_device2, &uart_pdata); | ||
62 | } | ||
63 | #else /* !SERIAL_IMX */ | ||
64 | static inline void mxc_init_imx_uart(void) | ||
65 | { | ||
66 | } | ||
67 | #endif /* SERIAL_IMX */ | ||
68 | |||
69 | /* | ||
70 | * Board specific initialization. | ||
71 | */ | ||
72 | static void __init mxc_board_init(void) | ||
73 | { | ||
74 | mxc_iomux_v3_setup_multiple_pads(mx51babbage_pads, | ||
75 | ARRAY_SIZE(mx51babbage_pads)); | ||
76 | mxc_init_imx_uart(); | ||
77 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
78 | } | ||
79 | |||
80 | static void __init mx51_babbage_timer_init(void) | ||
81 | { | ||
82 | mx51_clocks_init(32768, 24000000, 22579200, 0); | ||
83 | } | ||
84 | |||
85 | static struct sys_timer mxc_timer = { | ||
86 | .init = mx51_babbage_timer_init, | ||
87 | }; | ||
88 | |||
89 | MACHINE_START(MX51_BABBAGE, "Freescale MX51 Babbage Board") | ||
90 | /* Maintainer: Amit Kucheria <amit.kucheria@canonical.com> */ | ||
91 | .phys_io = MX51_AIPS1_BASE_ADDR, | ||
92 | .io_pg_offst = ((MX51_AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, | ||
93 | .boot_params = PHYS_OFFSET + 0x100, | ||
94 | .map_io = mx51_map_io, | ||
95 | .init_irq = mx51_init_irq, | ||
96 | .init_machine = mxc_board_init, | ||
97 | .timer = &mxc_timer, | ||
98 | MACHINE_END | ||
diff --git a/arch/arm/mach-mx5/clock-mx51.c b/arch/arm/mach-mx5/clock-mx51.c new file mode 100644 index 000000000000..be90c03101cd --- /dev/null +++ b/arch/arm/mach-mx5/clock-mx51.c | |||
@@ -0,0 +1,825 @@ | |||
1 | /* | ||
2 | * Copyright 2008-2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * Copyright (C) 2009-2010 Amit Kucheria <amit.kucheria@canonical.com> | ||
4 | * | ||
5 | * The code contained herein is licensed under the GNU General Public | ||
6 | * License. You may obtain a copy of the GNU General Public License | ||
7 | * Version 2 or later at the following locations: | ||
8 | * | ||
9 | * http://www.opensource.org/licenses/gpl-license.html | ||
10 | * http://www.gnu.org/copyleft/gpl.html | ||
11 | */ | ||
12 | |||
13 | #include <linux/mm.h> | ||
14 | #include <linux/delay.h> | ||
15 | #include <linux/clk.h> | ||
16 | #include <linux/io.h> | ||
17 | |||
18 | #include <asm/clkdev.h> | ||
19 | |||
20 | #include <mach/hardware.h> | ||
21 | #include <mach/common.h> | ||
22 | #include <mach/clock.h> | ||
23 | |||
24 | #include "crm_regs.h" | ||
25 | |||
26 | /* External clock values passed-in by the board code */ | ||
27 | static unsigned long external_high_reference, external_low_reference; | ||
28 | static unsigned long oscillator_reference, ckih2_reference; | ||
29 | |||
30 | static struct clk osc_clk; | ||
31 | static struct clk pll1_main_clk; | ||
32 | static struct clk pll1_sw_clk; | ||
33 | static struct clk pll2_sw_clk; | ||
34 | static struct clk pll3_sw_clk; | ||
35 | static struct clk lp_apm_clk; | ||
36 | static struct clk periph_apm_clk; | ||
37 | static struct clk ahb_clk; | ||
38 | static struct clk ipg_clk; | ||
39 | |||
40 | #define MAX_DPLL_WAIT_TRIES 1000 /* 1000 * udelay(1) = 1ms */ | ||
41 | |||
42 | static int _clk_ccgr_enable(struct clk *clk) | ||
43 | { | ||
44 | u32 reg; | ||
45 | |||
46 | reg = __raw_readl(clk->enable_reg); | ||
47 | reg |= MXC_CCM_CCGRx_MOD_ON << clk->enable_shift; | ||
48 | __raw_writel(reg, clk->enable_reg); | ||
49 | |||
50 | return 0; | ||
51 | } | ||
52 | |||
53 | static void _clk_ccgr_disable(struct clk *clk) | ||
54 | { | ||
55 | u32 reg; | ||
56 | reg = __raw_readl(clk->enable_reg); | ||
57 | reg &= ~(MXC_CCM_CCGRx_MOD_OFF << clk->enable_shift); | ||
58 | __raw_writel(reg, clk->enable_reg); | ||
59 | |||
60 | } | ||
61 | |||
62 | static void _clk_ccgr_disable_inwait(struct clk *clk) | ||
63 | { | ||
64 | u32 reg; | ||
65 | |||
66 | reg = __raw_readl(clk->enable_reg); | ||
67 | reg &= ~(MXC_CCM_CCGRx_CG_MASK << clk->enable_shift); | ||
68 | reg |= MXC_CCM_CCGRx_MOD_IDLE << clk->enable_shift; | ||
69 | __raw_writel(reg, clk->enable_reg); | ||
70 | } | ||
71 | |||
72 | /* | ||
73 | * For the 4-to-1 muxed input clock | ||
74 | */ | ||
75 | static inline u32 _get_mux(struct clk *parent, struct clk *m0, | ||
76 | struct clk *m1, struct clk *m2, struct clk *m3) | ||
77 | { | ||
78 | if (parent == m0) | ||
79 | return 0; | ||
80 | else if (parent == m1) | ||
81 | return 1; | ||
82 | else if (parent == m2) | ||
83 | return 2; | ||
84 | else if (parent == m3) | ||
85 | return 3; | ||
86 | else | ||
87 | BUG(); | ||
88 | |||
89 | return -EINVAL; | ||
90 | } | ||
91 | |||
92 | static inline void __iomem *_get_pll_base(struct clk *pll) | ||
93 | { | ||
94 | if (pll == &pll1_main_clk) | ||
95 | return MX51_DPLL1_BASE; | ||
96 | else if (pll == &pll2_sw_clk) | ||
97 | return MX51_DPLL2_BASE; | ||
98 | else if (pll == &pll3_sw_clk) | ||
99 | return MX51_DPLL3_BASE; | ||
100 | else | ||
101 | BUG(); | ||
102 | |||
103 | return NULL; | ||
104 | } | ||
105 | |||
106 | static unsigned long clk_pll_get_rate(struct clk *clk) | ||
107 | { | ||
108 | long mfi, mfn, mfd, pdf, ref_clk, mfn_abs; | ||
109 | unsigned long dp_op, dp_mfd, dp_mfn, dp_ctl, pll_hfsm, dbl; | ||
110 | void __iomem *pllbase; | ||
111 | s64 temp; | ||
112 | unsigned long parent_rate; | ||
113 | |||
114 | parent_rate = clk_get_rate(clk->parent); | ||
115 | |||
116 | pllbase = _get_pll_base(clk); | ||
117 | |||
118 | dp_ctl = __raw_readl(pllbase + MXC_PLL_DP_CTL); | ||
119 | pll_hfsm = dp_ctl & MXC_PLL_DP_CTL_HFSM; | ||
120 | dbl = dp_ctl & MXC_PLL_DP_CTL_DPDCK0_2_EN; | ||
121 | |||
122 | if (pll_hfsm == 0) { | ||
123 | dp_op = __raw_readl(pllbase + MXC_PLL_DP_OP); | ||
124 | dp_mfd = __raw_readl(pllbase + MXC_PLL_DP_MFD); | ||
125 | dp_mfn = __raw_readl(pllbase + MXC_PLL_DP_MFN); | ||
126 | } else { | ||
127 | dp_op = __raw_readl(pllbase + MXC_PLL_DP_HFS_OP); | ||
128 | dp_mfd = __raw_readl(pllbase + MXC_PLL_DP_HFS_MFD); | ||
129 | dp_mfn = __raw_readl(pllbase + MXC_PLL_DP_HFS_MFN); | ||
130 | } | ||
131 | pdf = dp_op & MXC_PLL_DP_OP_PDF_MASK; | ||
132 | mfi = (dp_op & MXC_PLL_DP_OP_MFI_MASK) >> MXC_PLL_DP_OP_MFI_OFFSET; | ||
133 | mfi = (mfi <= 5) ? 5 : mfi; | ||
134 | mfd = dp_mfd & MXC_PLL_DP_MFD_MASK; | ||
135 | mfn = mfn_abs = dp_mfn & MXC_PLL_DP_MFN_MASK; | ||
136 | /* Sign extend to 32-bits */ | ||
137 | if (mfn >= 0x04000000) { | ||
138 | mfn |= 0xFC000000; | ||
139 | mfn_abs = -mfn; | ||
140 | } | ||
141 | |||
142 | ref_clk = 2 * parent_rate; | ||
143 | if (dbl != 0) | ||
144 | ref_clk *= 2; | ||
145 | |||
146 | ref_clk /= (pdf + 1); | ||
147 | temp = (u64) ref_clk * mfn_abs; | ||
148 | do_div(temp, mfd + 1); | ||
149 | if (mfn < 0) | ||
150 | temp = -temp; | ||
151 | temp = (ref_clk * mfi) + temp; | ||
152 | |||
153 | return temp; | ||
154 | } | ||
155 | |||
156 | static int _clk_pll_set_rate(struct clk *clk, unsigned long rate) | ||
157 | { | ||
158 | u32 reg; | ||
159 | void __iomem *pllbase; | ||
160 | |||
161 | long mfi, pdf, mfn, mfd = 999999; | ||
162 | s64 temp64; | ||
163 | unsigned long quad_parent_rate; | ||
164 | unsigned long pll_hfsm, dp_ctl; | ||
165 | unsigned long parent_rate; | ||
166 | |||
167 | parent_rate = clk_get_rate(clk->parent); | ||
168 | |||
169 | pllbase = _get_pll_base(clk); | ||
170 | |||
171 | quad_parent_rate = 4 * parent_rate; | ||
172 | pdf = mfi = -1; | ||
173 | while (++pdf < 16 && mfi < 5) | ||
174 | mfi = rate * (pdf+1) / quad_parent_rate; | ||
175 | if (mfi > 15) | ||
176 | return -EINVAL; | ||
177 | pdf--; | ||
178 | |||
179 | temp64 = rate * (pdf+1) - quad_parent_rate * mfi; | ||
180 | do_div(temp64, quad_parent_rate/1000000); | ||
181 | mfn = (long)temp64; | ||
182 | |||
183 | dp_ctl = __raw_readl(pllbase + MXC_PLL_DP_CTL); | ||
184 | /* use dpdck0_2 */ | ||
185 | __raw_writel(dp_ctl | 0x1000L, pllbase + MXC_PLL_DP_CTL); | ||
186 | pll_hfsm = dp_ctl & MXC_PLL_DP_CTL_HFSM; | ||
187 | if (pll_hfsm == 0) { | ||
188 | reg = mfi << 4 | pdf; | ||
189 | __raw_writel(reg, pllbase + MXC_PLL_DP_OP); | ||
190 | __raw_writel(mfd, pllbase + MXC_PLL_DP_MFD); | ||
191 | __raw_writel(mfn, pllbase + MXC_PLL_DP_MFN); | ||
192 | } else { | ||
193 | reg = mfi << 4 | pdf; | ||
194 | __raw_writel(reg, pllbase + MXC_PLL_DP_HFS_OP); | ||
195 | __raw_writel(mfd, pllbase + MXC_PLL_DP_HFS_MFD); | ||
196 | __raw_writel(mfn, pllbase + MXC_PLL_DP_HFS_MFN); | ||
197 | } | ||
198 | |||
199 | return 0; | ||
200 | } | ||
201 | |||
202 | static int _clk_pll_enable(struct clk *clk) | ||
203 | { | ||
204 | u32 reg; | ||
205 | void __iomem *pllbase; | ||
206 | int i = 0; | ||
207 | |||
208 | pllbase = _get_pll_base(clk); | ||
209 | reg = __raw_readl(pllbase + MXC_PLL_DP_CTL) | MXC_PLL_DP_CTL_UPEN; | ||
210 | __raw_writel(reg, pllbase + MXC_PLL_DP_CTL); | ||
211 | |||
212 | /* Wait for lock */ | ||
213 | do { | ||
214 | reg = __raw_readl(pllbase + MXC_PLL_DP_CTL); | ||
215 | if (reg & MXC_PLL_DP_CTL_LRF) | ||
216 | break; | ||
217 | |||
218 | udelay(1); | ||
219 | } while (++i < MAX_DPLL_WAIT_TRIES); | ||
220 | |||
221 | if (i == MAX_DPLL_WAIT_TRIES) { | ||
222 | pr_err("MX5: pll locking failed\n"); | ||
223 | return -EINVAL; | ||
224 | } | ||
225 | |||
226 | return 0; | ||
227 | } | ||
228 | |||
229 | static void _clk_pll_disable(struct clk *clk) | ||
230 | { | ||
231 | u32 reg; | ||
232 | void __iomem *pllbase; | ||
233 | |||
234 | pllbase = _get_pll_base(clk); | ||
235 | reg = __raw_readl(pllbase + MXC_PLL_DP_CTL) & ~MXC_PLL_DP_CTL_UPEN; | ||
236 | __raw_writel(reg, pllbase + MXC_PLL_DP_CTL); | ||
237 | } | ||
238 | |||
239 | static int _clk_pll1_sw_set_parent(struct clk *clk, struct clk *parent) | ||
240 | { | ||
241 | u32 reg, step; | ||
242 | |||
243 | reg = __raw_readl(MXC_CCM_CCSR); | ||
244 | |||
245 | /* When switching from pll_main_clk to a bypass clock, first select a | ||
246 | * multiplexed clock in 'step_sel', then shift the glitchless mux | ||
247 | * 'pll1_sw_clk_sel'. | ||
248 | * | ||
249 | * When switching back, do it in reverse order | ||
250 | */ | ||
251 | if (parent == &pll1_main_clk) { | ||
252 | /* Switch to pll1_main_clk */ | ||
253 | reg &= ~MXC_CCM_CCSR_PLL1_SW_CLK_SEL; | ||
254 | __raw_writel(reg, MXC_CCM_CCSR); | ||
255 | /* step_clk mux switched to lp_apm, to save power. */ | ||
256 | reg = __raw_readl(MXC_CCM_CCSR); | ||
257 | reg &= ~MXC_CCM_CCSR_STEP_SEL_MASK; | ||
258 | reg |= (MXC_CCM_CCSR_STEP_SEL_LP_APM << | ||
259 | MXC_CCM_CCSR_STEP_SEL_OFFSET); | ||
260 | } else { | ||
261 | if (parent == &lp_apm_clk) { | ||
262 | step = MXC_CCM_CCSR_STEP_SEL_LP_APM; | ||
263 | } else if (parent == &pll2_sw_clk) { | ||
264 | step = MXC_CCM_CCSR_STEP_SEL_PLL2_DIVIDED; | ||
265 | } else if (parent == &pll3_sw_clk) { | ||
266 | step = MXC_CCM_CCSR_STEP_SEL_PLL3_DIVIDED; | ||
267 | } else | ||
268 | return -EINVAL; | ||
269 | |||
270 | reg &= ~MXC_CCM_CCSR_STEP_SEL_MASK; | ||
271 | reg |= (step << MXC_CCM_CCSR_STEP_SEL_OFFSET); | ||
272 | |||
273 | __raw_writel(reg, MXC_CCM_CCSR); | ||
274 | /* Switch to step_clk */ | ||
275 | reg = __raw_readl(MXC_CCM_CCSR); | ||
276 | reg |= MXC_CCM_CCSR_PLL1_SW_CLK_SEL; | ||
277 | } | ||
278 | __raw_writel(reg, MXC_CCM_CCSR); | ||
279 | return 0; | ||
280 | } | ||
281 | |||
282 | static unsigned long clk_pll1_sw_get_rate(struct clk *clk) | ||
283 | { | ||
284 | u32 reg, div; | ||
285 | unsigned long parent_rate; | ||
286 | |||
287 | parent_rate = clk_get_rate(clk->parent); | ||
288 | |||
289 | reg = __raw_readl(MXC_CCM_CCSR); | ||
290 | |||
291 | if (clk->parent == &pll2_sw_clk) { | ||
292 | div = ((reg & MXC_CCM_CCSR_PLL2_PODF_MASK) >> | ||
293 | MXC_CCM_CCSR_PLL2_PODF_OFFSET) + 1; | ||
294 | } else if (clk->parent == &pll3_sw_clk) { | ||
295 | div = ((reg & MXC_CCM_CCSR_PLL3_PODF_MASK) >> | ||
296 | MXC_CCM_CCSR_PLL3_PODF_OFFSET) + 1; | ||
297 | } else | ||
298 | div = 1; | ||
299 | return parent_rate / div; | ||
300 | } | ||
301 | |||
302 | static int _clk_pll2_sw_set_parent(struct clk *clk, struct clk *parent) | ||
303 | { | ||
304 | u32 reg; | ||
305 | |||
306 | reg = __raw_readl(MXC_CCM_CCSR); | ||
307 | |||
308 | if (parent == &pll2_sw_clk) | ||
309 | reg &= ~MXC_CCM_CCSR_PLL2_SW_CLK_SEL; | ||
310 | else | ||
311 | reg |= MXC_CCM_CCSR_PLL2_SW_CLK_SEL; | ||
312 | |||
313 | __raw_writel(reg, MXC_CCM_CCSR); | ||
314 | return 0; | ||
315 | } | ||
316 | |||
317 | static int _clk_lp_apm_set_parent(struct clk *clk, struct clk *parent) | ||
318 | { | ||
319 | u32 reg; | ||
320 | |||
321 | if (parent == &osc_clk) | ||
322 | reg = __raw_readl(MXC_CCM_CCSR) & ~MXC_CCM_CCSR_LP_APM_SEL; | ||
323 | else | ||
324 | return -EINVAL; | ||
325 | |||
326 | __raw_writel(reg, MXC_CCM_CCSR); | ||
327 | |||
328 | return 0; | ||
329 | } | ||
330 | |||
331 | static unsigned long clk_arm_get_rate(struct clk *clk) | ||
332 | { | ||
333 | u32 cacrr, div; | ||
334 | unsigned long parent_rate; | ||
335 | |||
336 | parent_rate = clk_get_rate(clk->parent); | ||
337 | cacrr = __raw_readl(MXC_CCM_CACRR); | ||
338 | div = (cacrr & MXC_CCM_CACRR_ARM_PODF_MASK) + 1; | ||
339 | |||
340 | return parent_rate / div; | ||
341 | } | ||
342 | |||
343 | static int _clk_periph_apm_set_parent(struct clk *clk, struct clk *parent) | ||
344 | { | ||
345 | u32 reg, mux; | ||
346 | int i = 0; | ||
347 | |||
348 | mux = _get_mux(parent, &pll1_sw_clk, &pll3_sw_clk, &lp_apm_clk, NULL); | ||
349 | |||
350 | reg = __raw_readl(MXC_CCM_CBCMR) & ~MXC_CCM_CBCMR_PERIPH_CLK_SEL_MASK; | ||
351 | reg |= mux << MXC_CCM_CBCMR_PERIPH_CLK_SEL_OFFSET; | ||
352 | __raw_writel(reg, MXC_CCM_CBCMR); | ||
353 | |||
354 | /* Wait for lock */ | ||
355 | do { | ||
356 | reg = __raw_readl(MXC_CCM_CDHIPR); | ||
357 | if (!(reg & MXC_CCM_CDHIPR_PERIPH_CLK_SEL_BUSY)) | ||
358 | break; | ||
359 | |||
360 | udelay(1); | ||
361 | } while (++i < MAX_DPLL_WAIT_TRIES); | ||
362 | |||
363 | if (i == MAX_DPLL_WAIT_TRIES) { | ||
364 | pr_err("MX5: Set parent for periph_apm clock failed\n"); | ||
365 | return -EINVAL; | ||
366 | } | ||
367 | |||
368 | return 0; | ||
369 | } | ||
370 | |||
371 | static int _clk_main_bus_set_parent(struct clk *clk, struct clk *parent) | ||
372 | { | ||
373 | u32 reg; | ||
374 | |||
375 | reg = __raw_readl(MXC_CCM_CBCDR); | ||
376 | |||
377 | if (parent == &pll2_sw_clk) | ||
378 | reg &= ~MXC_CCM_CBCDR_PERIPH_CLK_SEL; | ||
379 | else if (parent == &periph_apm_clk) | ||
380 | reg |= MXC_CCM_CBCDR_PERIPH_CLK_SEL; | ||
381 | else | ||
382 | return -EINVAL; | ||
383 | |||
384 | __raw_writel(reg, MXC_CCM_CBCDR); | ||
385 | |||
386 | return 0; | ||
387 | } | ||
388 | |||
389 | static struct clk main_bus_clk = { | ||
390 | .parent = &pll2_sw_clk, | ||
391 | .set_parent = _clk_main_bus_set_parent, | ||
392 | }; | ||
393 | |||
394 | static unsigned long clk_ahb_get_rate(struct clk *clk) | ||
395 | { | ||
396 | u32 reg, div; | ||
397 | unsigned long parent_rate; | ||
398 | |||
399 | parent_rate = clk_get_rate(clk->parent); | ||
400 | |||
401 | reg = __raw_readl(MXC_CCM_CBCDR); | ||
402 | div = ((reg & MXC_CCM_CBCDR_AHB_PODF_MASK) >> | ||
403 | MXC_CCM_CBCDR_AHB_PODF_OFFSET) + 1; | ||
404 | return parent_rate / div; | ||
405 | } | ||
406 | |||
407 | |||
408 | static int _clk_ahb_set_rate(struct clk *clk, unsigned long rate) | ||
409 | { | ||
410 | u32 reg, div; | ||
411 | unsigned long parent_rate; | ||
412 | int i = 0; | ||
413 | |||
414 | parent_rate = clk_get_rate(clk->parent); | ||
415 | |||
416 | div = parent_rate / rate; | ||
417 | if (div > 8 || div < 1 || ((parent_rate / div) != rate)) | ||
418 | return -EINVAL; | ||
419 | |||
420 | reg = __raw_readl(MXC_CCM_CBCDR); | ||
421 | reg &= ~MXC_CCM_CBCDR_AHB_PODF_MASK; | ||
422 | reg |= (div - 1) << MXC_CCM_CBCDR_AHB_PODF_OFFSET; | ||
423 | __raw_writel(reg, MXC_CCM_CBCDR); | ||
424 | |||
425 | /* Wait for lock */ | ||
426 | do { | ||
427 | reg = __raw_readl(MXC_CCM_CDHIPR); | ||
428 | if (!(reg & MXC_CCM_CDHIPR_AHB_PODF_BUSY)) | ||
429 | break; | ||
430 | |||
431 | udelay(1); | ||
432 | } while (++i < MAX_DPLL_WAIT_TRIES); | ||
433 | |||
434 | if (i == MAX_DPLL_WAIT_TRIES) { | ||
435 | pr_err("MX5: clk_ahb_set_rate failed\n"); | ||
436 | return -EINVAL; | ||
437 | } | ||
438 | |||
439 | return 0; | ||
440 | } | ||
441 | |||
442 | static unsigned long _clk_ahb_round_rate(struct clk *clk, | ||
443 | unsigned long rate) | ||
444 | { | ||
445 | u32 div; | ||
446 | unsigned long parent_rate; | ||
447 | |||
448 | parent_rate = clk_get_rate(clk->parent); | ||
449 | |||
450 | div = parent_rate / rate; | ||
451 | if (div > 8) | ||
452 | div = 8; | ||
453 | else if (div == 0) | ||
454 | div++; | ||
455 | return parent_rate / div; | ||
456 | } | ||
457 | |||
458 | |||
459 | static int _clk_max_enable(struct clk *clk) | ||
460 | { | ||
461 | u32 reg; | ||
462 | |||
463 | _clk_ccgr_enable(clk); | ||
464 | |||
465 | /* Handshake with MAX when LPM is entered. */ | ||
466 | reg = __raw_readl(MXC_CCM_CLPCR); | ||
467 | reg &= ~MXC_CCM_CLPCR_BYPASS_MAX_LPM_HS; | ||
468 | __raw_writel(reg, MXC_CCM_CLPCR); | ||
469 | |||
470 | return 0; | ||
471 | } | ||
472 | |||
473 | static void _clk_max_disable(struct clk *clk) | ||
474 | { | ||
475 | u32 reg; | ||
476 | |||
477 | _clk_ccgr_disable_inwait(clk); | ||
478 | |||
479 | /* No Handshake with MAX when LPM is entered as its disabled. */ | ||
480 | reg = __raw_readl(MXC_CCM_CLPCR); | ||
481 | reg |= MXC_CCM_CLPCR_BYPASS_MAX_LPM_HS; | ||
482 | __raw_writel(reg, MXC_CCM_CLPCR); | ||
483 | } | ||
484 | |||
485 | static unsigned long clk_ipg_get_rate(struct clk *clk) | ||
486 | { | ||
487 | u32 reg, div; | ||
488 | unsigned long parent_rate; | ||
489 | |||
490 | parent_rate = clk_get_rate(clk->parent); | ||
491 | |||
492 | reg = __raw_readl(MXC_CCM_CBCDR); | ||
493 | div = ((reg & MXC_CCM_CBCDR_IPG_PODF_MASK) >> | ||
494 | MXC_CCM_CBCDR_IPG_PODF_OFFSET) + 1; | ||
495 | |||
496 | return parent_rate / div; | ||
497 | } | ||
498 | |||
499 | static unsigned long clk_ipg_per_get_rate(struct clk *clk) | ||
500 | { | ||
501 | u32 reg, prediv1, prediv2, podf; | ||
502 | unsigned long parent_rate; | ||
503 | |||
504 | parent_rate = clk_get_rate(clk->parent); | ||
505 | |||
506 | if (clk->parent == &main_bus_clk || clk->parent == &lp_apm_clk) { | ||
507 | /* the main_bus_clk is the one before the DVFS engine */ | ||
508 | reg = __raw_readl(MXC_CCM_CBCDR); | ||
509 | prediv1 = ((reg & MXC_CCM_CBCDR_PERCLK_PRED1_MASK) >> | ||
510 | MXC_CCM_CBCDR_PERCLK_PRED1_OFFSET) + 1; | ||
511 | prediv2 = ((reg & MXC_CCM_CBCDR_PERCLK_PRED2_MASK) >> | ||
512 | MXC_CCM_CBCDR_PERCLK_PRED2_OFFSET) + 1; | ||
513 | podf = ((reg & MXC_CCM_CBCDR_PERCLK_PODF_MASK) >> | ||
514 | MXC_CCM_CBCDR_PERCLK_PODF_OFFSET) + 1; | ||
515 | return parent_rate / (prediv1 * prediv2 * podf); | ||
516 | } else if (clk->parent == &ipg_clk) | ||
517 | return parent_rate; | ||
518 | else | ||
519 | BUG(); | ||
520 | } | ||
521 | |||
522 | static int _clk_ipg_per_set_parent(struct clk *clk, struct clk *parent) | ||
523 | { | ||
524 | u32 reg; | ||
525 | |||
526 | reg = __raw_readl(MXC_CCM_CBCMR); | ||
527 | |||
528 | reg &= ~MXC_CCM_CBCMR_PERCLK_LP_APM_CLK_SEL; | ||
529 | reg &= ~MXC_CCM_CBCMR_PERCLK_IPG_CLK_SEL; | ||
530 | |||
531 | if (parent == &ipg_clk) | ||
532 | reg |= MXC_CCM_CBCMR_PERCLK_IPG_CLK_SEL; | ||
533 | else if (parent == &lp_apm_clk) | ||
534 | reg |= MXC_CCM_CBCMR_PERCLK_LP_APM_CLK_SEL; | ||
535 | else if (parent != &main_bus_clk) | ||
536 | return -EINVAL; | ||
537 | |||
538 | __raw_writel(reg, MXC_CCM_CBCMR); | ||
539 | |||
540 | return 0; | ||
541 | } | ||
542 | |||
543 | static unsigned long clk_uart_get_rate(struct clk *clk) | ||
544 | { | ||
545 | u32 reg, prediv, podf; | ||
546 | unsigned long parent_rate; | ||
547 | |||
548 | parent_rate = clk_get_rate(clk->parent); | ||
549 | |||
550 | reg = __raw_readl(MXC_CCM_CSCDR1); | ||
551 | prediv = ((reg & MXC_CCM_CSCDR1_UART_CLK_PRED_MASK) >> | ||
552 | MXC_CCM_CSCDR1_UART_CLK_PRED_OFFSET) + 1; | ||
553 | podf = ((reg & MXC_CCM_CSCDR1_UART_CLK_PODF_MASK) >> | ||
554 | MXC_CCM_CSCDR1_UART_CLK_PODF_OFFSET) + 1; | ||
555 | |||
556 | return parent_rate / (prediv * podf); | ||
557 | } | ||
558 | |||
559 | static int _clk_uart_set_parent(struct clk *clk, struct clk *parent) | ||
560 | { | ||
561 | u32 reg, mux; | ||
562 | |||
563 | mux = _get_mux(parent, &pll1_sw_clk, &pll2_sw_clk, &pll3_sw_clk, | ||
564 | &lp_apm_clk); | ||
565 | reg = __raw_readl(MXC_CCM_CSCMR1) & ~MXC_CCM_CSCMR1_UART_CLK_SEL_MASK; | ||
566 | reg |= mux << MXC_CCM_CSCMR1_UART_CLK_SEL_OFFSET; | ||
567 | __raw_writel(reg, MXC_CCM_CSCMR1); | ||
568 | |||
569 | return 0; | ||
570 | } | ||
571 | |||
572 | static unsigned long get_high_reference_clock_rate(struct clk *clk) | ||
573 | { | ||
574 | return external_high_reference; | ||
575 | } | ||
576 | |||
577 | static unsigned long get_low_reference_clock_rate(struct clk *clk) | ||
578 | { | ||
579 | return external_low_reference; | ||
580 | } | ||
581 | |||
582 | static unsigned long get_oscillator_reference_clock_rate(struct clk *clk) | ||
583 | { | ||
584 | return oscillator_reference; | ||
585 | } | ||
586 | |||
587 | static unsigned long get_ckih2_reference_clock_rate(struct clk *clk) | ||
588 | { | ||
589 | return ckih2_reference; | ||
590 | } | ||
591 | |||
592 | /* External high frequency clock */ | ||
593 | static struct clk ckih_clk = { | ||
594 | .get_rate = get_high_reference_clock_rate, | ||
595 | }; | ||
596 | |||
597 | static struct clk ckih2_clk = { | ||
598 | .get_rate = get_ckih2_reference_clock_rate, | ||
599 | }; | ||
600 | |||
601 | static struct clk osc_clk = { | ||
602 | .get_rate = get_oscillator_reference_clock_rate, | ||
603 | }; | ||
604 | |||
605 | /* External low frequency (32kHz) clock */ | ||
606 | static struct clk ckil_clk = { | ||
607 | .get_rate = get_low_reference_clock_rate, | ||
608 | }; | ||
609 | |||
610 | static struct clk pll1_main_clk = { | ||
611 | .parent = &osc_clk, | ||
612 | .get_rate = clk_pll_get_rate, | ||
613 | .enable = _clk_pll_enable, | ||
614 | .disable = _clk_pll_disable, | ||
615 | }; | ||
616 | |||
617 | /* Clock tree block diagram (WIP): | ||
618 | * CCM: Clock Controller Module | ||
619 | * | ||
620 | * PLL output -> | | ||
621 | * | CCM Switcher -> CCM_CLK_ROOT_GEN -> | ||
622 | * PLL bypass -> | | ||
623 | * | ||
624 | */ | ||
625 | |||
626 | /* PLL1 SW supplies to ARM core */ | ||
627 | static struct clk pll1_sw_clk = { | ||
628 | .parent = &pll1_main_clk, | ||
629 | .set_parent = _clk_pll1_sw_set_parent, | ||
630 | .get_rate = clk_pll1_sw_get_rate, | ||
631 | }; | ||
632 | |||
633 | /* PLL2 SW supplies to AXI/AHB/IP buses */ | ||
634 | static struct clk pll2_sw_clk = { | ||
635 | .parent = &osc_clk, | ||
636 | .get_rate = clk_pll_get_rate, | ||
637 | .set_rate = _clk_pll_set_rate, | ||
638 | .set_parent = _clk_pll2_sw_set_parent, | ||
639 | .enable = _clk_pll_enable, | ||
640 | .disable = _clk_pll_disable, | ||
641 | }; | ||
642 | |||
643 | /* PLL3 SW supplies to serial clocks like USB, SSI, etc. */ | ||
644 | static struct clk pll3_sw_clk = { | ||
645 | .parent = &osc_clk, | ||
646 | .set_rate = _clk_pll_set_rate, | ||
647 | .get_rate = clk_pll_get_rate, | ||
648 | .enable = _clk_pll_enable, | ||
649 | .disable = _clk_pll_disable, | ||
650 | }; | ||
651 | |||
652 | /* Low-power Audio Playback Mode clock */ | ||
653 | static struct clk lp_apm_clk = { | ||
654 | .parent = &osc_clk, | ||
655 | .set_parent = _clk_lp_apm_set_parent, | ||
656 | }; | ||
657 | |||
658 | static struct clk periph_apm_clk = { | ||
659 | .parent = &pll1_sw_clk, | ||
660 | .set_parent = _clk_periph_apm_set_parent, | ||
661 | }; | ||
662 | |||
663 | static struct clk cpu_clk = { | ||
664 | .parent = &pll1_sw_clk, | ||
665 | .get_rate = clk_arm_get_rate, | ||
666 | }; | ||
667 | |||
668 | static struct clk ahb_clk = { | ||
669 | .parent = &main_bus_clk, | ||
670 | .get_rate = clk_ahb_get_rate, | ||
671 | .set_rate = _clk_ahb_set_rate, | ||
672 | .round_rate = _clk_ahb_round_rate, | ||
673 | }; | ||
674 | |||
675 | /* Main IP interface clock for access to registers */ | ||
676 | static struct clk ipg_clk = { | ||
677 | .parent = &ahb_clk, | ||
678 | .get_rate = clk_ipg_get_rate, | ||
679 | }; | ||
680 | |||
681 | static struct clk ipg_perclk = { | ||
682 | .parent = &lp_apm_clk, | ||
683 | .get_rate = clk_ipg_per_get_rate, | ||
684 | .set_parent = _clk_ipg_per_set_parent, | ||
685 | }; | ||
686 | |||
687 | static struct clk uart_root_clk = { | ||
688 | .parent = &pll2_sw_clk, | ||
689 | .get_rate = clk_uart_get_rate, | ||
690 | .set_parent = _clk_uart_set_parent, | ||
691 | }; | ||
692 | |||
693 | static struct clk ahb_max_clk = { | ||
694 | .parent = &ahb_clk, | ||
695 | .enable_reg = MXC_CCM_CCGR0, | ||
696 | .enable_shift = MXC_CCM_CCGRx_CG14_OFFSET, | ||
697 | .enable = _clk_max_enable, | ||
698 | .disable = _clk_max_disable, | ||
699 | }; | ||
700 | |||
701 | static struct clk aips_tz1_clk = { | ||
702 | .parent = &ahb_clk, | ||
703 | .secondary = &ahb_max_clk, | ||
704 | .enable_reg = MXC_CCM_CCGR0, | ||
705 | .enable_shift = MXC_CCM_CCGRx_CG12_OFFSET, | ||
706 | .enable = _clk_ccgr_enable, | ||
707 | .disable = _clk_ccgr_disable_inwait, | ||
708 | }; | ||
709 | |||
710 | static struct clk aips_tz2_clk = { | ||
711 | .parent = &ahb_clk, | ||
712 | .secondary = &ahb_max_clk, | ||
713 | .enable_reg = MXC_CCM_CCGR0, | ||
714 | .enable_shift = MXC_CCM_CCGRx_CG13_OFFSET, | ||
715 | .enable = _clk_ccgr_enable, | ||
716 | .disable = _clk_ccgr_disable_inwait, | ||
717 | }; | ||
718 | |||
719 | static struct clk gpt_32k_clk = { | ||
720 | .id = 0, | ||
721 | .parent = &ckil_clk, | ||
722 | }; | ||
723 | |||
724 | #define DEFINE_CLOCK(name, i, er, es, gr, sr, p, s) \ | ||
725 | static struct clk name = { \ | ||
726 | .id = i, \ | ||
727 | .enable_reg = er, \ | ||
728 | .enable_shift = es, \ | ||
729 | .get_rate = gr, \ | ||
730 | .set_rate = sr, \ | ||
731 | .enable = _clk_ccgr_enable, \ | ||
732 | .disable = _clk_ccgr_disable, \ | ||
733 | .parent = p, \ | ||
734 | .secondary = s, \ | ||
735 | } | ||
736 | |||
737 | /* DEFINE_CLOCK(name, id, enable_reg, enable_shift, | ||
738 | get_rate, set_rate, parent, secondary); */ | ||
739 | |||
740 | /* Shared peripheral bus arbiter */ | ||
741 | DEFINE_CLOCK(spba_clk, 0, MXC_CCM_CCGR5, MXC_CCM_CCGRx_CG0_OFFSET, | ||
742 | NULL, NULL, &ipg_clk, NULL); | ||
743 | |||
744 | /* UART */ | ||
745 | DEFINE_CLOCK(uart1_clk, 0, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG4_OFFSET, | ||
746 | NULL, NULL, &uart_root_clk, NULL); | ||
747 | DEFINE_CLOCK(uart2_clk, 1, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG6_OFFSET, | ||
748 | NULL, NULL, &uart_root_clk, NULL); | ||
749 | DEFINE_CLOCK(uart3_clk, 2, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG8_OFFSET, | ||
750 | NULL, NULL, &uart_root_clk, NULL); | ||
751 | DEFINE_CLOCK(uart1_ipg_clk, 0, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG3_OFFSET, | ||
752 | NULL, NULL, &ipg_clk, &aips_tz1_clk); | ||
753 | DEFINE_CLOCK(uart2_ipg_clk, 1, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG5_OFFSET, | ||
754 | NULL, NULL, &ipg_clk, &aips_tz1_clk); | ||
755 | DEFINE_CLOCK(uart3_ipg_clk, 2, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG7_OFFSET, | ||
756 | NULL, NULL, &ipg_clk, &spba_clk); | ||
757 | |||
758 | /* GPT */ | ||
759 | DEFINE_CLOCK(gpt_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG9_OFFSET, | ||
760 | NULL, NULL, &ipg_perclk, NULL); | ||
761 | DEFINE_CLOCK(gpt_ipg_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG10_OFFSET, | ||
762 | NULL, NULL, &ipg_clk, NULL); | ||
763 | |||
764 | /* FEC */ | ||
765 | DEFINE_CLOCK(fec_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG12_OFFSET, | ||
766 | NULL, NULL, &ipg_clk, NULL); | ||
767 | |||
768 | #define _REGISTER_CLOCK(d, n, c) \ | ||
769 | { \ | ||
770 | .dev_id = d, \ | ||
771 | .con_id = n, \ | ||
772 | .clk = &c, \ | ||
773 | }, | ||
774 | |||
775 | static struct clk_lookup lookups[] = { | ||
776 | _REGISTER_CLOCK("imx-uart.0", NULL, uart1_clk) | ||
777 | _REGISTER_CLOCK("imx-uart.1", NULL, uart2_clk) | ||
778 | _REGISTER_CLOCK("imx-uart.2", NULL, uart3_clk) | ||
779 | _REGISTER_CLOCK(NULL, "gpt", gpt_clk) | ||
780 | _REGISTER_CLOCK("fec.0", NULL, fec_clk) | ||
781 | }; | ||
782 | |||
783 | static void clk_tree_init(void) | ||
784 | { | ||
785 | u32 reg; | ||
786 | |||
787 | ipg_perclk.set_parent(&ipg_perclk, &lp_apm_clk); | ||
788 | |||
789 | /* | ||
790 | * Initialise the IPG PER CLK dividers to 3. IPG_PER_CLK should be at | ||
791 | * 8MHz, its derived from lp_apm. | ||
792 | * | ||
793 | * FIXME: Verify if true for all boards | ||
794 | */ | ||
795 | reg = __raw_readl(MXC_CCM_CBCDR); | ||
796 | reg &= ~MXC_CCM_CBCDR_PERCLK_PRED1_MASK; | ||
797 | reg &= ~MXC_CCM_CBCDR_PERCLK_PRED2_MASK; | ||
798 | reg &= ~MXC_CCM_CBCDR_PERCLK_PODF_MASK; | ||
799 | reg |= (2 << MXC_CCM_CBCDR_PERCLK_PRED1_OFFSET); | ||
800 | __raw_writel(reg, MXC_CCM_CBCDR); | ||
801 | } | ||
802 | |||
803 | int __init mx51_clocks_init(unsigned long ckil, unsigned long osc, | ||
804 | unsigned long ckih1, unsigned long ckih2) | ||
805 | { | ||
806 | int i; | ||
807 | |||
808 | external_low_reference = ckil; | ||
809 | external_high_reference = ckih1; | ||
810 | ckih2_reference = ckih2; | ||
811 | oscillator_reference = osc; | ||
812 | |||
813 | for (i = 0; i < ARRAY_SIZE(lookups); i++) | ||
814 | clkdev_add(&lookups[i]); | ||
815 | |||
816 | clk_tree_init(); | ||
817 | |||
818 | clk_enable(&cpu_clk); | ||
819 | clk_enable(&main_bus_clk); | ||
820 | |||
821 | /* System timer */ | ||
822 | mxc_timer_init(&gpt_clk, MX51_IO_ADDRESS(MX51_GPT1_BASE_ADDR), | ||
823 | MX51_MXC_INT_GPT); | ||
824 | return 0; | ||
825 | } | ||
diff --git a/arch/arm/mach-mx5/cpu.c b/arch/arm/mach-mx5/cpu.c new file mode 100644 index 000000000000..41c769f08c4d --- /dev/null +++ b/arch/arm/mach-mx5/cpu.c | |||
@@ -0,0 +1,47 @@ | |||
1 | /* | ||
2 | * Copyright 2008-2009 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * | ||
4 | * The code contained herein is licensed under the GNU General Public | ||
5 | * License. You may obtain a copy of the GNU General Public License | ||
6 | * Version 2 or later at the following locations: | ||
7 | * | ||
8 | * http://www.opensource.org/licenses/gpl-license.html | ||
9 | * http://www.gnu.org/copyleft/gpl.html | ||
10 | * | ||
11 | * This file contains the CPU initialization code. | ||
12 | */ | ||
13 | |||
14 | #include <linux/types.h> | ||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/init.h> | ||
17 | #include <mach/hardware.h> | ||
18 | #include <asm/io.h> | ||
19 | |||
20 | static int __init post_cpu_init(void) | ||
21 | { | ||
22 | unsigned int reg; | ||
23 | void __iomem *base; | ||
24 | |||
25 | if (!cpu_is_mx51()) | ||
26 | return 0; | ||
27 | |||
28 | base = MX51_IO_ADDRESS(MX51_AIPS1_BASE_ADDR); | ||
29 | __raw_writel(0x0, base + 0x40); | ||
30 | __raw_writel(0x0, base + 0x44); | ||
31 | __raw_writel(0x0, base + 0x48); | ||
32 | __raw_writel(0x0, base + 0x4C); | ||
33 | reg = __raw_readl(base + 0x50) & 0x00FFFFFF; | ||
34 | __raw_writel(reg, base + 0x50); | ||
35 | |||
36 | base = MX51_IO_ADDRESS(MX51_AIPS2_BASE_ADDR); | ||
37 | __raw_writel(0x0, base + 0x40); | ||
38 | __raw_writel(0x0, base + 0x44); | ||
39 | __raw_writel(0x0, base + 0x48); | ||
40 | __raw_writel(0x0, base + 0x4C); | ||
41 | reg = __raw_readl(base + 0x50) & 0x00FFFFFF; | ||
42 | __raw_writel(reg, base + 0x50); | ||
43 | |||
44 | return 0; | ||
45 | } | ||
46 | |||
47 | postcore_initcall(post_cpu_init); | ||
diff --git a/arch/arm/mach-mx5/crm_regs.h b/arch/arm/mach-mx5/crm_regs.h new file mode 100644 index 000000000000..c776b9af0624 --- /dev/null +++ b/arch/arm/mach-mx5/crm_regs.h | |||
@@ -0,0 +1,583 @@ | |||
1 | /* | ||
2 | * Copyright 2008-2009 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * | ||
4 | * The code contained herein is licensed under the GNU General Public | ||
5 | * License. You may obtain a copy of the GNU General Public License | ||
6 | * Version 2 or later at the following locations: | ||
7 | * | ||
8 | * http://www.opensource.org/licenses/gpl-license.html | ||
9 | * http://www.gnu.org/copyleft/gpl.html | ||
10 | */ | ||
11 | #ifndef __ARCH_ARM_MACH_MX51_CRM_REGS_H__ | ||
12 | #define __ARCH_ARM_MACH_MX51_CRM_REGS_H__ | ||
13 | |||
14 | #define MX51_CCM_BASE MX51_IO_ADDRESS(MX51_CCM_BASE_ADDR) | ||
15 | #define MX51_DPLL1_BASE MX51_IO_ADDRESS(MX51_PLL1_BASE_ADDR) | ||
16 | #define MX51_DPLL2_BASE MX51_IO_ADDRESS(MX51_PLL2_BASE_ADDR) | ||
17 | #define MX51_DPLL3_BASE MX51_IO_ADDRESS(MX51_PLL3_BASE_ADDR) | ||
18 | #define MX51_CORTEXA8_BASE MX51_IO_ADDRESS(MX51_ARM_BASE_ADDR) | ||
19 | #define MX51_GPC_BASE MX51_IO_ADDRESS(MX51_GPC_BASE_ADDR) | ||
20 | |||
21 | /* PLL Register Offsets */ | ||
22 | #define MXC_PLL_DP_CTL 0x00 | ||
23 | #define MXC_PLL_DP_CONFIG 0x04 | ||
24 | #define MXC_PLL_DP_OP 0x08 | ||
25 | #define MXC_PLL_DP_MFD 0x0C | ||
26 | #define MXC_PLL_DP_MFN 0x10 | ||
27 | #define MXC_PLL_DP_MFNMINUS 0x14 | ||
28 | #define MXC_PLL_DP_MFNPLUS 0x18 | ||
29 | #define MXC_PLL_DP_HFS_OP 0x1C | ||
30 | #define MXC_PLL_DP_HFS_MFD 0x20 | ||
31 | #define MXC_PLL_DP_HFS_MFN 0x24 | ||
32 | #define MXC_PLL_DP_MFN_TOGC 0x28 | ||
33 | #define MXC_PLL_DP_DESTAT 0x2c | ||
34 | |||
35 | /* PLL Register Bit definitions */ | ||
36 | #define MXC_PLL_DP_CTL_MUL_CTRL 0x2000 | ||
37 | #define MXC_PLL_DP_CTL_DPDCK0_2_EN 0x1000 | ||
38 | #define MXC_PLL_DP_CTL_DPDCK0_2_OFFSET 12 | ||
39 | #define MXC_PLL_DP_CTL_ADE 0x800 | ||
40 | #define MXC_PLL_DP_CTL_REF_CLK_DIV 0x400 | ||
41 | #define MXC_PLL_DP_CTL_REF_CLK_SEL_MASK (3 << 8) | ||
42 | #define MXC_PLL_DP_CTL_REF_CLK_SEL_OFFSET 8 | ||
43 | #define MXC_PLL_DP_CTL_HFSM 0x80 | ||
44 | #define MXC_PLL_DP_CTL_PRE 0x40 | ||
45 | #define MXC_PLL_DP_CTL_UPEN 0x20 | ||
46 | #define MXC_PLL_DP_CTL_RST 0x10 | ||
47 | #define MXC_PLL_DP_CTL_RCP 0x8 | ||
48 | #define MXC_PLL_DP_CTL_PLM 0x4 | ||
49 | #define MXC_PLL_DP_CTL_BRM0 0x2 | ||
50 | #define MXC_PLL_DP_CTL_LRF 0x1 | ||
51 | |||
52 | #define MXC_PLL_DP_CONFIG_BIST 0x8 | ||
53 | #define MXC_PLL_DP_CONFIG_SJC_CE 0x4 | ||
54 | #define MXC_PLL_DP_CONFIG_AREN 0x2 | ||
55 | #define MXC_PLL_DP_CONFIG_LDREQ 0x1 | ||
56 | |||
57 | #define MXC_PLL_DP_OP_MFI_OFFSET 4 | ||
58 | #define MXC_PLL_DP_OP_MFI_MASK (0xF << 4) | ||
59 | #define MXC_PLL_DP_OP_PDF_OFFSET 0 | ||
60 | #define MXC_PLL_DP_OP_PDF_MASK 0xF | ||
61 | |||
62 | #define MXC_PLL_DP_MFD_OFFSET 0 | ||
63 | #define MXC_PLL_DP_MFD_MASK 0x07FFFFFF | ||
64 | |||
65 | #define MXC_PLL_DP_MFN_OFFSET 0x0 | ||
66 | #define MXC_PLL_DP_MFN_MASK 0x07FFFFFF | ||
67 | |||
68 | #define MXC_PLL_DP_MFN_TOGC_TOG_DIS (1 << 17) | ||
69 | #define MXC_PLL_DP_MFN_TOGC_TOG_EN (1 << 16) | ||
70 | #define MXC_PLL_DP_MFN_TOGC_CNT_OFFSET 0x0 | ||
71 | #define MXC_PLL_DP_MFN_TOGC_CNT_MASK 0xFFFF | ||
72 | |||
73 | #define MXC_PLL_DP_DESTAT_TOG_SEL (1 << 31) | ||
74 | #define MXC_PLL_DP_DESTAT_MFN 0x07FFFFFF | ||
75 | |||
76 | /* Register addresses of CCM*/ | ||
77 | #define MXC_CCM_CCR (MX51_CCM_BASE + 0x00) | ||
78 | #define MXC_CCM_CCDR (MX51_CCM_BASE + 0x04) | ||
79 | #define MXC_CCM_CSR (MX51_CCM_BASE + 0x08) | ||
80 | #define MXC_CCM_CCSR (MX51_CCM_BASE + 0x0C) | ||
81 | #define MXC_CCM_CACRR (MX51_CCM_BASE + 0x10) | ||
82 | #define MXC_CCM_CBCDR (MX51_CCM_BASE + 0x14) | ||
83 | #define MXC_CCM_CBCMR (MX51_CCM_BASE + 0x18) | ||
84 | #define MXC_CCM_CSCMR1 (MX51_CCM_BASE + 0x1C) | ||
85 | #define MXC_CCM_CSCMR2 (MX51_CCM_BASE + 0x20) | ||
86 | #define MXC_CCM_CSCDR1 (MX51_CCM_BASE + 0x24) | ||
87 | #define MXC_CCM_CS1CDR (MX51_CCM_BASE + 0x28) | ||
88 | #define MXC_CCM_CS2CDR (MX51_CCM_BASE + 0x2C) | ||
89 | #define MXC_CCM_CDCDR (MX51_CCM_BASE + 0x30) | ||
90 | #define MXC_CCM_CHSCDR (MX51_CCM_BASE + 0x34) | ||
91 | #define MXC_CCM_CSCDR2 (MX51_CCM_BASE + 0x38) | ||
92 | #define MXC_CCM_CSCDR3 (MX51_CCM_BASE + 0x3C) | ||
93 | #define MXC_CCM_CSCDR4 (MX51_CCM_BASE + 0x40) | ||
94 | #define MXC_CCM_CWDR (MX51_CCM_BASE + 0x44) | ||
95 | #define MXC_CCM_CDHIPR (MX51_CCM_BASE + 0x48) | ||
96 | #define MXC_CCM_CDCR (MX51_CCM_BASE + 0x4C) | ||
97 | #define MXC_CCM_CTOR (MX51_CCM_BASE + 0x50) | ||
98 | #define MXC_CCM_CLPCR (MX51_CCM_BASE + 0x54) | ||
99 | #define MXC_CCM_CISR (MX51_CCM_BASE + 0x58) | ||
100 | #define MXC_CCM_CIMR (MX51_CCM_BASE + 0x5C) | ||
101 | #define MXC_CCM_CCOSR (MX51_CCM_BASE + 0x60) | ||
102 | #define MXC_CCM_CGPR (MX51_CCM_BASE + 0x64) | ||
103 | #define MXC_CCM_CCGR0 (MX51_CCM_BASE + 0x68) | ||
104 | #define MXC_CCM_CCGR1 (MX51_CCM_BASE + 0x6C) | ||
105 | #define MXC_CCM_CCGR2 (MX51_CCM_BASE + 0x70) | ||
106 | #define MXC_CCM_CCGR3 (MX51_CCM_BASE + 0x74) | ||
107 | #define MXC_CCM_CCGR4 (MX51_CCM_BASE + 0x78) | ||
108 | #define MXC_CCM_CCGR5 (MX51_CCM_BASE + 0x7C) | ||
109 | #define MXC_CCM_CCGR6 (MX51_CCM_BASE + 0x80) | ||
110 | #define MXC_CCM_CMEOR (MX51_CCM_BASE + 0x84) | ||
111 | |||
112 | /* Define the bits in register CCR */ | ||
113 | #define MXC_CCM_CCR_COSC_EN (1 << 12) | ||
114 | #define MXC_CCM_CCR_FPM_MULT_MASK (1 << 11) | ||
115 | #define MXC_CCM_CCR_CAMP2_EN (1 << 10) | ||
116 | #define MXC_CCM_CCR_CAMP1_EN (1 << 9) | ||
117 | #define MXC_CCM_CCR_FPM_EN (1 << 8) | ||
118 | #define MXC_CCM_CCR_OSCNT_OFFSET (0) | ||
119 | #define MXC_CCM_CCR_OSCNT_MASK (0xFF) | ||
120 | |||
121 | /* Define the bits in register CCDR */ | ||
122 | #define MXC_CCM_CCDR_HSC_HS_MASK (0x1 << 18) | ||
123 | #define MXC_CCM_CCDR_IPU_HS_MASK (0x1 << 17) | ||
124 | #define MXC_CCM_CCDR_EMI_HS_MASK (0x1 << 16) | ||
125 | |||
126 | /* Define the bits in register CSR */ | ||
127 | #define MXC_CCM_CSR_COSR_READY (1 << 5) | ||
128 | #define MXC_CCM_CSR_LVS_VALUE (1 << 4) | ||
129 | #define MXC_CCM_CSR_CAMP2_READY (1 << 3) | ||
130 | #define MXC_CCM_CSR_CAMP1_READY (1 << 2) | ||
131 | #define MXC_CCM_CSR_FPM_READY (1 << 1) | ||
132 | #define MXC_CCM_CSR_REF_EN_B (1 << 0) | ||
133 | |||
134 | /* Define the bits in register CCSR */ | ||
135 | #define MXC_CCM_CCSR_LP_APM_SEL (0x1 << 9) | ||
136 | #define MXC_CCM_CCSR_STEP_SEL_OFFSET (7) | ||
137 | #define MXC_CCM_CCSR_STEP_SEL_MASK (0x3 << 7) | ||
138 | #define MXC_CCM_CCSR_STEP_SEL_LP_APM 0 | ||
139 | #define MXC_CCM_CCSR_STEP_SEL_PLL1_BYPASS 1 /* Only when JTAG connected? */ | ||
140 | #define MXC_CCM_CCSR_STEP_SEL_PLL2_DIVIDED 2 | ||
141 | #define MXC_CCM_CCSR_STEP_SEL_PLL3_DIVIDED 3 | ||
142 | #define MXC_CCM_CCSR_PLL2_PODF_OFFSET (5) | ||
143 | #define MXC_CCM_CCSR_PLL2_PODF_MASK (0x3 << 5) | ||
144 | #define MXC_CCM_CCSR_PLL3_PODF_OFFSET (3) | ||
145 | #define MXC_CCM_CCSR_PLL3_PODF_MASK (0x3 << 3) | ||
146 | #define MXC_CCM_CCSR_PLL1_SW_CLK_SEL (1 << 2) /* 0: pll1_main_clk, | ||
147 | 1: step_clk */ | ||
148 | #define MXC_CCM_CCSR_PLL2_SW_CLK_SEL (1 << 1) | ||
149 | #define MXC_CCM_CCSR_PLL3_SW_CLK_SEL (1 << 0) | ||
150 | |||
151 | /* Define the bits in register CACRR */ | ||
152 | #define MXC_CCM_CACRR_ARM_PODF_OFFSET (0) | ||
153 | #define MXC_CCM_CACRR_ARM_PODF_MASK (0x7) | ||
154 | |||
155 | /* Define the bits in register CBCDR */ | ||
156 | #define MXC_CCM_CBCDR_EMI_CLK_SEL (0x1 << 26) | ||
157 | #define MXC_CCM_CBCDR_PERIPH_CLK_SEL (0x1 << 25) | ||
158 | #define MXC_CCM_CBCDR_DDR_HF_SEL_OFFSET (30) | ||
159 | #define MXC_CCM_CBCDR_DDR_HF_SEL (0x1 << 30) | ||
160 | #define MXC_CCM_CBCDR_DDR_PODF_OFFSET (27) | ||
161 | #define MXC_CCM_CBCDR_DDR_PODF_MASK (0x7 << 27) | ||
162 | #define MXC_CCM_CBCDR_EMI_PODF_OFFSET (22) | ||
163 | #define MXC_CCM_CBCDR_EMI_PODF_MASK (0x7 << 22) | ||
164 | #define MXC_CCM_CBCDR_AXI_B_PODF_OFFSET (19) | ||
165 | #define MXC_CCM_CBCDR_AXI_B_PODF_MASK (0x7 << 19) | ||
166 | #define MXC_CCM_CBCDR_AXI_A_PODF_OFFSET (16) | ||
167 | #define MXC_CCM_CBCDR_AXI_A_PODF_MASK (0x7 << 16) | ||
168 | #define MXC_CCM_CBCDR_NFC_PODF_OFFSET (13) | ||
169 | #define MXC_CCM_CBCDR_NFC_PODF_MASK (0x7 << 13) | ||
170 | #define MXC_CCM_CBCDR_AHB_PODF_OFFSET (10) | ||
171 | #define MXC_CCM_CBCDR_AHB_PODF_MASK (0x7 << 10) | ||
172 | #define MXC_CCM_CBCDR_IPG_PODF_OFFSET (8) | ||
173 | #define MXC_CCM_CBCDR_IPG_PODF_MASK (0x3 << 8) | ||
174 | #define MXC_CCM_CBCDR_PERCLK_PRED1_OFFSET (6) | ||
175 | #define MXC_CCM_CBCDR_PERCLK_PRED1_MASK (0x3 << 6) | ||
176 | #define MXC_CCM_CBCDR_PERCLK_PRED2_OFFSET (3) | ||
177 | #define MXC_CCM_CBCDR_PERCLK_PRED2_MASK (0x7 << 3) | ||
178 | #define MXC_CCM_CBCDR_PERCLK_PODF_OFFSET (0) | ||
179 | #define MXC_CCM_CBCDR_PERCLK_PODF_MASK (0x7) | ||
180 | |||
181 | /* Define the bits in register CBCMR */ | ||
182 | #define MXC_CCM_CBCMR_VPU_AXI_CLK_SEL_OFFSET (14) | ||
183 | #define MXC_CCM_CBCMR_VPU_AXI_CLK_SEL_MASK (0x3 << 14) | ||
184 | #define MXC_CCM_CBCMR_PERIPH_CLK_SEL_OFFSET (12) | ||
185 | #define MXC_CCM_CBCMR_PERIPH_CLK_SEL_MASK (0x3 << 12) | ||
186 | #define MXC_CCM_CBCMR_DDR_CLK_SEL_OFFSET (10) | ||
187 | #define MXC_CCM_CBCMR_DDR_CLK_SEL_MASK (0x3 << 10) | ||
188 | #define MXC_CCM_CBCMR_ARM_AXI_CLK_SEL_OFFSET (8) | ||
189 | #define MXC_CCM_CBCMR_ARM_AXI_CLK_SEL_MASK (0x3 << 8) | ||
190 | #define MXC_CCM_CBCMR_IPU_HSP_CLK_SEL_OFFSET (6) | ||
191 | #define MXC_CCM_CBCMR_IPU_HSP_CLK_SEL_MASK (0x3 << 6) | ||
192 | #define MXC_CCM_CBCMR_GPU_CLK_SEL_OFFSET (4) | ||
193 | #define MXC_CCM_CBCMR_GPU_CLK_SEL_MASK (0x3 << 4) | ||
194 | #define MXC_CCM_CBCMR_GPU2D_CLK_SEL_OFFSET (14) | ||
195 | #define MXC_CCM_CBCMR_GPU2D_CLK_SEL_MASK (0x3 << 14) | ||
196 | #define MXC_CCM_CBCMR_PERCLK_LP_APM_CLK_SEL (0x1 << 1) | ||
197 | #define MXC_CCM_CBCMR_PERCLK_IPG_CLK_SEL (0x1 << 0) | ||
198 | |||
199 | /* Define the bits in register CSCMR1 */ | ||
200 | #define MXC_CCM_CSCMR1_SSI_EXT2_CLK_SEL_OFFSET (30) | ||
201 | #define MXC_CCM_CSCMR1_SSI_EXT2_CLK_SEL_MASK (0x3 << 30) | ||
202 | #define MXC_CCM_CSCMR1_SSI_EXT1_CLK_SEL_OFFSET (28) | ||
203 | #define MXC_CCM_CSCMR1_SSI_EXT1_CLK_SEL_MASK (0x3 << 28) | ||
204 | #define MXC_CCM_CSCMR1_USB_PHY_CLK_SEL_OFFSET (26) | ||
205 | #define MXC_CCM_CSCMR1_USB_PHY_CLK_SEL (0x1 << 26) | ||
206 | #define MXC_CCM_CSCMR1_UART_CLK_SEL_OFFSET (24) | ||
207 | #define MXC_CCM_CSCMR1_UART_CLK_SEL_MASK (0x3 << 24) | ||
208 | #define MXC_CCM_CSCMR1_USBOH3_CLK_SEL_OFFSET (22) | ||
209 | #define MXC_CCM_CSCMR1_USBOH3_CLK_SEL_MASK (0x3 << 22) | ||
210 | #define MXC_CCM_CSCMR1_ESDHC1_MSHC1_CLK_SEL_OFFSET (20) | ||
211 | #define MXC_CCM_CSCMR1_ESDHC1_MSHC1_CLK_SEL_MASK (0x3 << 20) | ||
212 | #define MXC_CCM_CSCMR1_ESDHC3_CLK_SEL (0x1 << 19) | ||
213 | #define MXC_CCM_CSCMR1_ESDHC4_CLK_SEL (0x1 << 18) | ||
214 | #define MXC_CCM_CSCMR1_ESDHC2_MSHC2_CLK_SEL_OFFSET (16) | ||
215 | #define MXC_CCM_CSCMR1_ESDHC2_MSHC2_CLK_SEL_MASK (0x3 << 16) | ||
216 | #define MXC_CCM_CSCMR1_SSI1_CLK_SEL_OFFSET (14) | ||
217 | #define MXC_CCM_CSCMR1_SSI1_CLK_SEL_MASK (0x3 << 14) | ||
218 | #define MXC_CCM_CSCMR1_SSI2_CLK_SEL_OFFSET (12) | ||
219 | #define MXC_CCM_CSCMR1_SSI2_CLK_SEL_MASK (0x3 << 12) | ||
220 | #define MXC_CCM_CSCMR1_SSI3_CLK_SEL (0x1 << 11) | ||
221 | #define MXC_CCM_CSCMR1_VPU_RCLK_SEL (0x1 << 10) | ||
222 | #define MXC_CCM_CSCMR1_SSI_APM_CLK_SEL_OFFSET (8) | ||
223 | #define MXC_CCM_CSCMR1_SSI_APM_CLK_SEL_MASK (0x3 << 8) | ||
224 | #define MXC_CCM_CSCMR1_TVE_CLK_SEL (0x1 << 7) | ||
225 | #define MXC_CCM_CSCMR1_TVE_EXT_CLK_SEL (0x1 << 6) | ||
226 | #define MXC_CCM_CSCMR1_CSPI_CLK_SEL_OFFSET (4) | ||
227 | #define MXC_CCM_CSCMR1_CSPI_CLK_SEL_MASK (0x3 << 4) | ||
228 | #define MXC_CCM_CSCMR1_SPDIF_CLK_SEL_OFFSET (2) | ||
229 | #define MXC_CCM_CSCMR1_SPDIF_CLK_SEL_MASK (0x3 << 2) | ||
230 | #define MXC_CCM_CSCMR1_SSI_EXT2_COM_CLK_SEL (0x1 << 1) | ||
231 | #define MXC_CCM_CSCMR1_SSI_EXT1_COM_CLK_SEL (0x1) | ||
232 | |||
233 | /* Define the bits in register CSCMR2 */ | ||
234 | #define MXC_CCM_CSCMR2_DI_CLK_SEL_OFFSET(n) (26+n*3) | ||
235 | #define MXC_CCM_CSCMR2_DI_CLK_SEL_MASK(n) (0x7 << (26+n*3)) | ||
236 | #define MXC_CCM_CSCMR2_CSI_MCLK2_CLK_SEL_OFFSET (24) | ||
237 | #define MXC_CCM_CSCMR2_CSI_MCLK2_CLK_SEL_MASK (0x3 << 24) | ||
238 | #define MXC_CCM_CSCMR2_CSI_MCLK1_CLK_SEL_OFFSET (22) | ||
239 | #define MXC_CCM_CSCMR2_CSI_MCLK1_CLK_SEL_MASK (0x3 << 22) | ||
240 | #define MXC_CCM_CSCMR2_ESC_CLK_SEL_OFFSET (20) | ||
241 | #define MXC_CCM_CSCMR2_ESC_CLK_SEL_MASK (0x3 << 20) | ||
242 | #define MXC_CCM_CSCMR2_HSC2_CLK_SEL_OFFSET (18) | ||
243 | #define MXC_CCM_CSCMR2_HSC2_CLK_SEL_MASK (0x3 << 18) | ||
244 | #define MXC_CCM_CSCMR2_HSC1_CLK_SEL_OFFSET (16) | ||
245 | #define MXC_CCM_CSCMR2_HSC1_CLK_SEL_MASK (0x3 << 16) | ||
246 | #define MXC_CCM_CSCMR2_HSI2C_CLK_SEL_OFFSET (14) | ||
247 | #define MXC_CCM_CSCMR2_HSI2C_CLK_SEL_MASK (0x3 << 14) | ||
248 | #define MXC_CCM_CSCMR2_FIRI_CLK_SEL_OFFSET (12) | ||
249 | #define MXC_CCM_CSCMR2_FIRI_CLK_SEL_MASK (0x3 << 12) | ||
250 | #define MXC_CCM_CSCMR2_SIM_CLK_SEL_OFFSET (10) | ||
251 | #define MXC_CCM_CSCMR2_SIM_CLK_SEL_MASK (0x3 << 10) | ||
252 | #define MXC_CCM_CSCMR2_SLIMBUS_COM (0x1 << 9) | ||
253 | #define MXC_CCM_CSCMR2_SLIMBUS_CLK_SEL_OFFSET (6) | ||
254 | #define MXC_CCM_CSCMR2_SLIMBUS_CLK_SEL_MASK (0x7 << 6) | ||
255 | #define MXC_CCM_CSCMR2_SPDIF1_COM (1 << 5) | ||
256 | #define MXC_CCM_CSCMR2_SPDIF0_COM (1 << 4) | ||
257 | #define MXC_CCM_CSCMR2_SPDIF1_CLK_SEL_OFFSET (2) | ||
258 | #define MXC_CCM_CSCMR2_SPDIF1_CLK_SEL_MASK (0x3 << 2) | ||
259 | #define MXC_CCM_CSCMR2_SPDIF0_CLK_SEL_OFFSET (0) | ||
260 | #define MXC_CCM_CSCMR2_SPDIF0_CLK_SEL_MASK (0x3) | ||
261 | |||
262 | /* Define the bits in register CSCDR1 */ | ||
263 | #define MXC_CCM_CSCDR1_ESDHC2_MSHC2_CLK_PRED_OFFSET (22) | ||
264 | #define MXC_CCM_CSCDR1_ESDHC2_MSHC2_CLK_PRED_MASK (0x7 << 22) | ||
265 | #define MXC_CCM_CSCDR1_ESDHC2_MSHC2_CLK_PODF_OFFSET (19) | ||
266 | #define MXC_CCM_CSCDR1_ESDHC2_MSHC2_CLK_PODF_MASK (0x7 << 19) | ||
267 | #define MXC_CCM_CSCDR1_ESDHC1_MSHC1_CLK_PRED_OFFSET (16) | ||
268 | #define MXC_CCM_CSCDR1_ESDHC1_MSHC1_CLK_PRED_MASK (0x7 << 16) | ||
269 | #define MXC_CCM_CSCDR1_PGC_CLK_PODF_OFFSET (14) | ||
270 | #define MXC_CCM_CSCDR1_PGC_CLK_PODF_MASK (0x3 << 14) | ||
271 | #define MXC_CCM_CSCDR1_ESDHC1_MSHC1_CLK_PODF_OFFSET (11) | ||
272 | #define MXC_CCM_CSCDR1_ESDHC1_MSHC1_CLK_PODF_MASK (0x7 << 11) | ||
273 | #define MXC_CCM_CSCDR1_USBOH3_CLK_PRED_OFFSET (8) | ||
274 | #define MXC_CCM_CSCDR1_USBOH3_CLK_PRED_MASK (0x7 << 8) | ||
275 | #define MXC_CCM_CSCDR1_USBOH3_CLK_PODF_OFFSET (6) | ||
276 | #define MXC_CCM_CSCDR1_USBOH3_CLK_PODF_MASK (0x3 << 6) | ||
277 | #define MXC_CCM_CSCDR1_UART_CLK_PRED_OFFSET (3) | ||
278 | #define MXC_CCM_CSCDR1_UART_CLK_PRED_MASK (0x7 << 3) | ||
279 | #define MXC_CCM_CSCDR1_UART_CLK_PODF_OFFSET (0) | ||
280 | #define MXC_CCM_CSCDR1_UART_CLK_PODF_MASK (0x7) | ||
281 | |||
282 | /* Define the bits in register CS1CDR and CS2CDR */ | ||
283 | #define MXC_CCM_CS1CDR_SSI_EXT1_CLK_PRED_OFFSET (22) | ||
284 | #define MXC_CCM_CS1CDR_SSI_EXT1_CLK_PRED_MASK (0x7 << 22) | ||
285 | #define MXC_CCM_CS1CDR_SSI_EXT1_CLK_PODF_OFFSET (16) | ||
286 | #define MXC_CCM_CS1CDR_SSI_EXT1_CLK_PODF_MASK (0x3F << 16) | ||
287 | #define MXC_CCM_CS1CDR_SSI1_CLK_PRED_OFFSET (6) | ||
288 | #define MXC_CCM_CS1CDR_SSI1_CLK_PRED_MASK (0x7 << 6) | ||
289 | #define MXC_CCM_CS1CDR_SSI1_CLK_PODF_OFFSET (0) | ||
290 | #define MXC_CCM_CS1CDR_SSI1_CLK_PODF_MASK (0x3F) | ||
291 | |||
292 | #define MXC_CCM_CS2CDR_SSI_EXT2_CLK_PRED_OFFSET (22) | ||
293 | #define MXC_CCM_CS2CDR_SSI_EXT2_CLK_PRED_MASK (0x7 << 22) | ||
294 | #define MXC_CCM_CS2CDR_SSI_EXT2_CLK_PODF_OFFSET (16) | ||
295 | #define MXC_CCM_CS2CDR_SSI_EXT2_CLK_PODF_MASK (0x3F << 16) | ||
296 | #define MXC_CCM_CS2CDR_SSI2_CLK_PRED_OFFSET (6) | ||
297 | #define MXC_CCM_CS2CDR_SSI2_CLK_PRED_MASK (0x7 << 6) | ||
298 | #define MXC_CCM_CS2CDR_SSI2_CLK_PODF_OFFSET (0) | ||
299 | #define MXC_CCM_CS2CDR_SSI2_CLK_PODF_MASK (0x3F) | ||
300 | |||
301 | /* Define the bits in register CDCDR */ | ||
302 | #define MXC_CCM_CDCDR_TVE_CLK_PRED_OFFSET (28) | ||
303 | #define MXC_CCM_CDCDR_TVE_CLK_PRED_MASK (0x7 << 28) | ||
304 | #define MXC_CCM_CDCDR_SPDIF0_CLK_PRED_OFFSET (25) | ||
305 | #define MXC_CCM_CDCDR_SPDIF0_CLK_PRED_MASK (0x7 << 25) | ||
306 | #define MXC_CCM_CDCDR_SPDIF0_CLK_PODF_OFFSET (19) | ||
307 | #define MXC_CCM_CDCDR_SPDIF0_CLK_PODF_MASK (0x3F << 19) | ||
308 | #define MXC_CCM_CDCDR_SPDIF1_CLK_PRED_OFFSET (16) | ||
309 | #define MXC_CCM_CDCDR_SPDIF1_CLK_PRED_MASK (0x7 << 16) | ||
310 | #define MXC_CCM_CDCDR_SPDIF1_CLK_PODF_OFFSET (9) | ||
311 | #define MXC_CCM_CDCDR_SPDIF1_CLK_PODF_MASK (0x3F << 9) | ||
312 | #define MXC_CCM_CDCDR_DI_CLK_PRED_OFFSET (6) | ||
313 | #define MXC_CCM_CDCDR_DI_CLK_PRED_MASK (0x7 << 6) | ||
314 | #define MXC_CCM_CDCDR_USB_PHY_PRED_OFFSET (3) | ||
315 | #define MXC_CCM_CDCDR_USB_PHY_PRED_MASK (0x7 << 3) | ||
316 | #define MXC_CCM_CDCDR_USB_PHY_PODF_OFFSET (0) | ||
317 | #define MXC_CCM_CDCDR_USB_PHY_PODF_MASK (0x7) | ||
318 | |||
319 | /* Define the bits in register CHSCCDR */ | ||
320 | #define MXC_CCM_CHSCCDR_ESC_CLK_PRED_OFFSET (12) | ||
321 | #define MXC_CCM_CHSCCDR_ESC_CLK_PRED_MASK (0x7 << 12) | ||
322 | #define MXC_CCM_CHSCCDR_ESC_CLK_PODF_OFFSET (6) | ||
323 | #define MXC_CCM_CHSCCDR_ESC_CLK_PODF_MASK (0x3F << 6) | ||
324 | #define MXC_CCM_CHSCCDR_HSC2_CLK_PODF_OFFSET (3) | ||
325 | #define MXC_CCM_CHSCCDR_HSC2_CLK_PODF_MASK (0x7 << 3) | ||
326 | #define MXC_CCM_CHSCCDR_HSC1_CLK_PODF_OFFSET (0) | ||
327 | #define MXC_CCM_CHSCCDR_HSC1_CLK_PODF_MASK (0x7) | ||
328 | |||
329 | /* Define the bits in register CSCDR2 */ | ||
330 | #define MXC_CCM_CSCDR2_CSPI_CLK_PRED_OFFSET (25) | ||
331 | #define MXC_CCM_CSCDR2_CSPI_CLK_PRED_MASK (0x7 << 25) | ||
332 | #define MXC_CCM_CSCDR2_CSPI_CLK_PODF_OFFSET (19) | ||
333 | #define MXC_CCM_CSCDR2_CSPI_CLK_PODF_MASK (0x3F << 19) | ||
334 | #define MXC_CCM_CSCDR2_SIM_CLK_PRED_OFFSET (16) | ||
335 | #define MXC_CCM_CSCDR2_SIM_CLK_PRED_MASK (0x7 << 16) | ||
336 | #define MXC_CCM_CSCDR2_SIM_CLK_PODF_OFFSET (9) | ||
337 | #define MXC_CCM_CSCDR2_SIM_CLK_PODF_MASK (0x3F << 9) | ||
338 | #define MXC_CCM_CSCDR2_SLIMBUS_CLK_PRED_OFFSET (6) | ||
339 | #define MXC_CCM_CSCDR2_SLIMBUS_PRED_MASK (0x7 << 6) | ||
340 | #define MXC_CCM_CSCDR2_SLIMBUS_PODF_OFFSET (0) | ||
341 | #define MXC_CCM_CSCDR2_SLIMBUS_PODF_MASK (0x3F) | ||
342 | |||
343 | /* Define the bits in register CSCDR3 */ | ||
344 | #define MXC_CCM_CSCDR3_HSI2C_CLK_PRED_OFFSET (16) | ||
345 | #define MXC_CCM_CSCDR3_HSI2C_CLK_PRED_MASK (0x7 << 16) | ||
346 | #define MXC_CCM_CSCDR3_HSI2C_CLK_PODF_OFFSET (9) | ||
347 | #define MXC_CCM_CSCDR3_HSI2C_CLK_PODF_MASK (0x3F << 9) | ||
348 | #define MXC_CCM_CSCDR3_FIRI_CLK_PRED_OFFSET (6) | ||
349 | #define MXC_CCM_CSCDR3_FIRI_CLK_PRED_MASK (0x7 << 6) | ||
350 | #define MXC_CCM_CSCDR3_FIRI_CLK_PODF_OFFSET (0) | ||
351 | #define MXC_CCM_CSCDR3_FIRI_CLK_PODF_MASK (0x3F) | ||
352 | |||
353 | /* Define the bits in register CSCDR4 */ | ||
354 | #define MXC_CCM_CSCDR4_CSI_MCLK2_CLK_PRED_OFFSET (16) | ||
355 | #define MXC_CCM_CSCDR4_CSI_MCLK2_CLK_PRED_MASK (0x7 << 16) | ||
356 | #define MXC_CCM_CSCDR4_CSI_MCLK2_CLK_PODF_OFFSET (9) | ||
357 | #define MXC_CCM_CSCDR4_CSI_MCLK2_CLK_PODF_MASK (0x3F << 9) | ||
358 | #define MXC_CCM_CSCDR4_CSI_MCLK1_CLK_PRED_OFFSET (6) | ||
359 | #define MXC_CCM_CSCDR4_CSI_MCLK1_CLK_PRED_MASK (0x7 << 6) | ||
360 | #define MXC_CCM_CSCDR4_CSI_MCLK1_CLK_PODF_OFFSET (0) | ||
361 | #define MXC_CCM_CSCDR4_CSI_MCLK1_CLK_PODF_MASK (0x3F) | ||
362 | |||
363 | /* Define the bits in register CDHIPR */ | ||
364 | #define MXC_CCM_CDHIPR_ARM_PODF_BUSY (1 << 16) | ||
365 | #define MXC_CCM_CDHIPR_DDR_HF_CLK_SEL_BUSY (1 << 8) | ||
366 | #define MXC_CCM_CDHIPR_DDR_PODF_BUSY (1 << 7) | ||
367 | #define MXC_CCM_CDHIPR_EMI_CLK_SEL_BUSY (1 << 6) | ||
368 | #define MXC_CCM_CDHIPR_PERIPH_CLK_SEL_BUSY (1 << 5) | ||
369 | #define MXC_CCM_CDHIPR_NFC_IPG_INT_MEM_PODF_BUSY (1 << 4) | ||
370 | #define MXC_CCM_CDHIPR_AHB_PODF_BUSY (1 << 3) | ||
371 | #define MXC_CCM_CDHIPR_EMI_PODF_BUSY (1 << 2) | ||
372 | #define MXC_CCM_CDHIPR_AXI_B_PODF_BUSY (1 << 1) | ||
373 | #define MXC_CCM_CDHIPR_AXI_A_PODF_BUSY (1 << 0) | ||
374 | |||
375 | /* Define the bits in register CDCR */ | ||
376 | #define MXC_CCM_CDCR_ARM_FREQ_SHIFT_DIVIDER (0x1 << 2) | ||
377 | #define MXC_CCM_CDCR_PERIPH_CLK_DVFS_PODF_OFFSET (0) | ||
378 | #define MXC_CCM_CDCR_PERIPH_CLK_DVFS_PODF_MASK (0x3) | ||
379 | |||
380 | /* Define the bits in register CLPCR */ | ||
381 | #define MXC_CCM_CLPCR_BYPASS_HSC_LPM_HS (0x1 << 23) | ||
382 | #define MXC_CCM_CLPCR_BYPASS_SCC_LPM_HS (0x1 << 22) | ||
383 | #define MXC_CCM_CLPCR_BYPASS_MAX_LPM_HS (0x1 << 21) | ||
384 | #define MXC_CCM_CLPCR_BYPASS_SDMA_LPM_HS (0x1 << 20) | ||
385 | #define MXC_CCM_CLPCR_BYPASS_EMI_LPM_HS (0x1 << 19) | ||
386 | #define MXC_CCM_CLPCR_BYPASS_IPU_LPM_HS (0x1 << 18) | ||
387 | #define MXC_CCM_CLPCR_BYPASS_RTIC_LPM_HS (0x1 << 17) | ||
388 | #define MXC_CCM_CLPCR_BYPASS_RNGC_LPM_HS (0x1 << 16) | ||
389 | #define MXC_CCM_CLPCR_COSC_PWRDOWN (0x1 << 11) | ||
390 | #define MXC_CCM_CLPCR_STBY_COUNT_OFFSET (9) | ||
391 | #define MXC_CCM_CLPCR_STBY_COUNT_MASK (0x3 << 9) | ||
392 | #define MXC_CCM_CLPCR_VSTBY (0x1 << 8) | ||
393 | #define MXC_CCM_CLPCR_DIS_REF_OSC (0x1 << 7) | ||
394 | #define MXC_CCM_CLPCR_SBYOS (0x1 << 6) | ||
395 | #define MXC_CCM_CLPCR_ARM_CLK_DIS_ON_LPM (0x1 << 5) | ||
396 | #define MXC_CCM_CLPCR_LPSR_CLK_SEL_OFFSET (3) | ||
397 | #define MXC_CCM_CLPCR_LPSR_CLK_SEL_MASK (0x3 << 3) | ||
398 | #define MXC_CCM_CLPCR_LPM_OFFSET (0) | ||
399 | #define MXC_CCM_CLPCR_LPM_MASK (0x3) | ||
400 | |||
401 | /* Define the bits in register CISR */ | ||
402 | #define MXC_CCM_CISR_ARM_PODF_LOADED (0x1 << 25) | ||
403 | #define MXC_CCM_CISR_NFC_IPG_INT_MEM_PODF_LOADED (0x1 << 21) | ||
404 | #define MXC_CCM_CISR_AHB_PODF_LOADED (0x1 << 20) | ||
405 | #define MXC_CCM_CISR_EMI_PODF_LOADED (0x1 << 19) | ||
406 | #define MXC_CCM_CISR_AXI_B_PODF_LOADED (0x1 << 18) | ||
407 | #define MXC_CCM_CISR_AXI_A_PODF_LOADED (0x1 << 17) | ||
408 | #define MXC_CCM_CISR_DIVIDER_LOADED (0x1 << 16) | ||
409 | #define MXC_CCM_CISR_COSC_READY (0x1 << 6) | ||
410 | #define MXC_CCM_CISR_CKIH2_READY (0x1 << 5) | ||
411 | #define MXC_CCM_CISR_CKIH_READY (0x1 << 4) | ||
412 | #define MXC_CCM_CISR_FPM_READY (0x1 << 3) | ||
413 | #define MXC_CCM_CISR_LRF_PLL3 (0x1 << 2) | ||
414 | #define MXC_CCM_CISR_LRF_PLL2 (0x1 << 1) | ||
415 | #define MXC_CCM_CISR_LRF_PLL1 (0x1) | ||
416 | |||
417 | /* Define the bits in register CIMR */ | ||
418 | #define MXC_CCM_CIMR_MASK_ARM_PODF_LOADED (0x1 << 25) | ||
419 | #define MXC_CCM_CIMR_MASK_NFC_IPG_INT_MEM_PODF_LOADED (0x1 << 21) | ||
420 | #define MXC_CCM_CIMR_MASK_EMI_PODF_LOADED (0x1 << 20) | ||
421 | #define MXC_CCM_CIMR_MASK_AXI_C_PODF_LOADED (0x1 << 19) | ||
422 | #define MXC_CCM_CIMR_MASK_AXI_B_PODF_LOADED (0x1 << 18) | ||
423 | #define MXC_CCM_CIMR_MASK_AXI_A_PODF_LOADED (0x1 << 17) | ||
424 | #define MXC_CCM_CIMR_MASK_DIVIDER_LOADED (0x1 << 16) | ||
425 | #define MXC_CCM_CIMR_MASK_COSC_READY (0x1 << 5) | ||
426 | #define MXC_CCM_CIMR_MASK_CKIH_READY (0x1 << 4) | ||
427 | #define MXC_CCM_CIMR_MASK_FPM_READY (0x1 << 3) | ||
428 | #define MXC_CCM_CIMR_MASK_LRF_PLL3 (0x1 << 2) | ||
429 | #define MXC_CCM_CIMR_MASK_LRF_PLL2 (0x1 << 1) | ||
430 | #define MXC_CCM_CIMR_MASK_LRF_PLL1 (0x1) | ||
431 | |||
432 | /* Define the bits in register CCOSR */ | ||
433 | #define MXC_CCM_CCOSR_CKO2_EN_OFFSET (0x1 << 24) | ||
434 | #define MXC_CCM_CCOSR_CKO2_DIV_OFFSET (21) | ||
435 | #define MXC_CCM_CCOSR_CKO2_DIV_MASK (0x7 << 21) | ||
436 | #define MXC_CCM_CCOSR_CKO2_SEL_OFFSET (16) | ||
437 | #define MXC_CCM_CCOSR_CKO2_SEL_MASK (0x1F << 16) | ||
438 | #define MXC_CCM_CCOSR_CKOL_EN (0x1 << 7) | ||
439 | #define MXC_CCM_CCOSR_CKOL_DIV_OFFSET (4) | ||
440 | #define MXC_CCM_CCOSR_CKOL_DIV_MASK (0x7 << 4) | ||
441 | #define MXC_CCM_CCOSR_CKOL_SEL_OFFSET (0) | ||
442 | #define MXC_CCM_CCOSR_CKOL_SEL_MASK (0xF) | ||
443 | |||
444 | /* Define the bits in registers CGPR */ | ||
445 | #define MXC_CCM_CGPR_EFUSE_PROG_SUPPLY_GATE (0x1 << 4) | ||
446 | #define MXC_CCM_CGPR_FPM_SEL (0x1 << 3) | ||
447 | #define MXC_CCM_CGPR_VL_L2BIST_CLKDIV_OFFSET (0) | ||
448 | #define MXC_CCM_CGPR_VL_L2BIST_CLKDIV_MASK (0x7) | ||
449 | |||
450 | /* Define the bits in registers CCGRx */ | ||
451 | #define MXC_CCM_CCGRx_CG_MASK 0x3 | ||
452 | #define MXC_CCM_CCGRx_MOD_OFF 0x0 | ||
453 | #define MXC_CCM_CCGRx_MOD_ON 0x3 | ||
454 | #define MXC_CCM_CCGRx_MOD_IDLE 0x1 | ||
455 | |||
456 | #define MXC_CCM_CCGRx_CG15_MASK (0x3 << 30) | ||
457 | #define MXC_CCM_CCGRx_CG14_MASK (0x3 << 28) | ||
458 | #define MXC_CCM_CCGRx_CG13_MASK (0x3 << 26) | ||
459 | #define MXC_CCM_CCGRx_CG12_MASK (0x3 << 24) | ||
460 | #define MXC_CCM_CCGRx_CG11_MASK (0x3 << 22) | ||
461 | #define MXC_CCM_CCGRx_CG10_MASK (0x3 << 20) | ||
462 | #define MXC_CCM_CCGRx_CG9_MASK (0x3 << 18) | ||
463 | #define MXC_CCM_CCGRx_CG8_MASK (0x3 << 16) | ||
464 | #define MXC_CCM_CCGRx_CG5_MASK (0x3 << 10) | ||
465 | #define MXC_CCM_CCGRx_CG4_MASK (0x3 << 8) | ||
466 | #define MXC_CCM_CCGRx_CG3_MASK (0x3 << 6) | ||
467 | #define MXC_CCM_CCGRx_CG2_MASK (0x3 << 4) | ||
468 | #define MXC_CCM_CCGRx_CG1_MASK (0x3 << 2) | ||
469 | #define MXC_CCM_CCGRx_CG0_MASK (0x3 << 0) | ||
470 | |||
471 | #define MXC_CCM_CCGRx_CG15_OFFSET 30 | ||
472 | #define MXC_CCM_CCGRx_CG14_OFFSET 28 | ||
473 | #define MXC_CCM_CCGRx_CG13_OFFSET 26 | ||
474 | #define MXC_CCM_CCGRx_CG12_OFFSET 24 | ||
475 | #define MXC_CCM_CCGRx_CG11_OFFSET 22 | ||
476 | #define MXC_CCM_CCGRx_CG10_OFFSET 20 | ||
477 | #define MXC_CCM_CCGRx_CG9_OFFSET 18 | ||
478 | #define MXC_CCM_CCGRx_CG8_OFFSET 16 | ||
479 | #define MXC_CCM_CCGRx_CG7_OFFSET 14 | ||
480 | #define MXC_CCM_CCGRx_CG6_OFFSET 12 | ||
481 | #define MXC_CCM_CCGRx_CG5_OFFSET 10 | ||
482 | #define MXC_CCM_CCGRx_CG4_OFFSET 8 | ||
483 | #define MXC_CCM_CCGRx_CG3_OFFSET 6 | ||
484 | #define MXC_CCM_CCGRx_CG2_OFFSET 4 | ||
485 | #define MXC_CCM_CCGRx_CG1_OFFSET 2 | ||
486 | #define MXC_CCM_CCGRx_CG0_OFFSET 0 | ||
487 | |||
488 | #define MXC_DPTC_LP_BASE (MX51_GPC_BASE + 0x80) | ||
489 | #define MXC_DPTC_GP_BASE (MX51_GPC_BASE + 0x100) | ||
490 | #define MXC_DVFS_CORE_BASE (MX51_GPC_BASE + 0x180) | ||
491 | #define MXC_DPTC_PER_BASE (MX51_GPC_BASE + 0x1C0) | ||
492 | #define MXC_PGC_IPU_BASE (MX51_GPC_BASE + 0x220) | ||
493 | #define MXC_PGC_VPU_BASE (MX51_GPC_BASE + 0x240) | ||
494 | #define MXC_PGC_GPU_BASE (MX51_GPC_BASE + 0x260) | ||
495 | #define MXC_SRPG_NEON_BASE (MX51_GPC_BASE + 0x280) | ||
496 | #define MXC_SRPG_ARM_BASE (MX51_GPC_BASE + 0x2A0) | ||
497 | #define MXC_SRPG_EMPGC0_BASE (MX51_GPC_BASE + 0x2C0) | ||
498 | #define MXC_SRPG_EMPGC1_BASE (MX51_GPC_BASE + 0x2D0) | ||
499 | #define MXC_SRPG_MEGAMIX_BASE (MX51_GPC_BASE + 0x2E0) | ||
500 | #define MXC_SRPG_EMI_BASE (MX51_GPC_BASE + 0x300) | ||
501 | |||
502 | /* CORTEXA8 platform */ | ||
503 | #define MXC_CORTEXA8_PLAT_PVID (MX51_CORTEXA8_BASE + 0x0) | ||
504 | #define MXC_CORTEXA8_PLAT_GPC (MX51_CORTEXA8_BASE + 0x4) | ||
505 | #define MXC_CORTEXA8_PLAT_PIC (MX51_CORTEXA8_BASE + 0x8) | ||
506 | #define MXC_CORTEXA8_PLAT_LPC (MX51_CORTEXA8_BASE + 0xC) | ||
507 | #define MXC_CORTEXA8_PLAT_NEON_LPC (MX51_CORTEXA8_BASE + 0x10) | ||
508 | #define MXC_CORTEXA8_PLAT_ICGC (MX51_CORTEXA8_BASE + 0x14) | ||
509 | #define MXC_CORTEXA8_PLAT_AMC (MX51_CORTEXA8_BASE + 0x18) | ||
510 | #define MXC_CORTEXA8_PLAT_NMC (MX51_CORTEXA8_BASE + 0x20) | ||
511 | #define MXC_CORTEXA8_PLAT_NMS (MX51_CORTEXA8_BASE + 0x24) | ||
512 | |||
513 | /* DVFS CORE */ | ||
514 | #define MXC_DVFSTHRS (MXC_DVFS_CORE_BASE + 0x00) | ||
515 | #define MXC_DVFSCOUN (MXC_DVFS_CORE_BASE + 0x04) | ||
516 | #define MXC_DVFSSIG1 (MXC_DVFS_CORE_BASE + 0x08) | ||
517 | #define MXC_DVFSSIG0 (MXC_DVFS_CORE_BASE + 0x0C) | ||
518 | #define MXC_DVFSGPC0 (MXC_DVFS_CORE_BASE + 0x10) | ||
519 | #define MXC_DVFSGPC1 (MXC_DVFS_CORE_BASE + 0x14) | ||
520 | #define MXC_DVFSGPBT (MXC_DVFS_CORE_BASE + 0x18) | ||
521 | #define MXC_DVFSEMAC (MXC_DVFS_CORE_BASE + 0x1C) | ||
522 | #define MXC_DVFSCNTR (MXC_DVFS_CORE_BASE + 0x20) | ||
523 | #define MXC_DVFSLTR0_0 (MXC_DVFS_CORE_BASE + 0x24) | ||
524 | #define MXC_DVFSLTR0_1 (MXC_DVFS_CORE_BASE + 0x28) | ||
525 | #define MXC_DVFSLTR1_0 (MXC_DVFS_CORE_BASE + 0x2C) | ||
526 | #define MXC_DVFSLTR1_1 (MXC_DVFS_CORE_BASE + 0x30) | ||
527 | #define MXC_DVFSPT0 (MXC_DVFS_CORE_BASE + 0x34) | ||
528 | #define MXC_DVFSPT1 (MXC_DVFS_CORE_BASE + 0x38) | ||
529 | #define MXC_DVFSPT2 (MXC_DVFS_CORE_BASE + 0x3C) | ||
530 | #define MXC_DVFSPT3 (MXC_DVFS_CORE_BASE + 0x40) | ||
531 | |||
532 | /* GPC */ | ||
533 | #define MXC_GPC_CNTR (MX51_GPC_BASE + 0x0) | ||
534 | #define MXC_GPC_PGR (MX51_GPC_BASE + 0x4) | ||
535 | #define MXC_GPC_VCR (MX51_GPC_BASE + 0x8) | ||
536 | #define MXC_GPC_ALL_PU (MX51_GPC_BASE + 0xC) | ||
537 | #define MXC_GPC_NEON (MX51_GPC_BASE + 0x10) | ||
538 | #define MXC_GPC_PGR_ARMPG_OFFSET 8 | ||
539 | #define MXC_GPC_PGR_ARMPG_MASK (3 << 8) | ||
540 | |||
541 | /* PGC */ | ||
542 | #define MXC_PGC_IPU_PGCR (MXC_PGC_IPU_BASE + 0x0) | ||
543 | #define MXC_PGC_IPU_PGSR (MXC_PGC_IPU_BASE + 0xC) | ||
544 | #define MXC_PGC_VPU_PGCR (MXC_PGC_VPU_BASE + 0x0) | ||
545 | #define MXC_PGC_VPU_PGSR (MXC_PGC_VPU_BASE + 0xC) | ||
546 | #define MXC_PGC_GPU_PGCR (MXC_PGC_GPU_BASE + 0x0) | ||
547 | #define MXC_PGC_GPU_PGSR (MXC_PGC_GPU_BASE + 0xC) | ||
548 | |||
549 | #define MXC_PGCR_PCR 1 | ||
550 | #define MXC_SRPGCR_PCR 1 | ||
551 | #define MXC_EMPGCR_PCR 1 | ||
552 | #define MXC_PGSR_PSR 1 | ||
553 | |||
554 | |||
555 | #define MXC_CORTEXA8_PLAT_LPC_DSM (1 << 0) | ||
556 | #define MXC_CORTEXA8_PLAT_LPC_DBG_DSM (1 << 1) | ||
557 | |||
558 | /* SRPG */ | ||
559 | #define MXC_SRPG_NEON_SRPGCR (MXC_SRPG_NEON_BASE + 0x0) | ||
560 | #define MXC_SRPG_NEON_PUPSCR (MXC_SRPG_NEON_BASE + 0x4) | ||
561 | #define MXC_SRPG_NEON_PDNSCR (MXC_SRPG_NEON_BASE + 0x8) | ||
562 | |||
563 | #define MXC_SRPG_ARM_SRPGCR (MXC_SRPG_ARM_BASE + 0x0) | ||
564 | #define MXC_SRPG_ARM_PUPSCR (MXC_SRPG_ARM_BASE + 0x4) | ||
565 | #define MXC_SRPG_ARM_PDNSCR (MXC_SRPG_ARM_BASE + 0x8) | ||
566 | |||
567 | #define MXC_SRPG_EMPGC0_SRPGCR (MXC_SRPG_EMPGC0_BASE + 0x0) | ||
568 | #define MXC_SRPG_EMPGC0_PUPSCR (MXC_SRPG_EMPGC0_BASE + 0x4) | ||
569 | #define MXC_SRPG_EMPGC0_PDNSCR (MXC_SRPG_EMPGC0_BASE + 0x8) | ||
570 | |||
571 | #define MXC_SRPG_EMPGC1_SRPGCR (MXC_SRPG_EMPGC1_BASE + 0x0) | ||
572 | #define MXC_SRPG_EMPGC1_PUPSCR (MXC_SRPG_EMPGC1_BASE + 0x4) | ||
573 | #define MXC_SRPG_EMPGC1_PDNSCR (MXC_SRPG_EMPGC1_BASE + 0x8) | ||
574 | |||
575 | #define MXC_SRPG_MEGAMIX_SRPGCR (MXC_SRPG_MEGAMIX_BASE + 0x0) | ||
576 | #define MXC_SRPG_MEGAMIX_PUPSCR (MXC_SRPG_MEGAMIX_BASE + 0x4) | ||
577 | #define MXC_SRPG_MEGAMIX_PDNSCR (MXC_SRPG_MEGAMIX_BASE + 0x8) | ||
578 | |||
579 | #define MXC_SRPGC_EMI_SRPGCR (MXC_SRPGC_EMI_BASE + 0x0) | ||
580 | #define MXC_SRPGC_EMI_PUPSCR (MXC_SRPGC_EMI_BASE + 0x4) | ||
581 | #define MXC_SRPGC_EMI_PDNSCR (MXC_SRPGC_EMI_BASE + 0x8) | ||
582 | |||
583 | #endif /* __ARCH_ARM_MACH_MX51_CRM_REGS_H__ */ | ||
diff --git a/arch/arm/mach-mx5/devices.c b/arch/arm/mach-mx5/devices.c new file mode 100644 index 000000000000..d6fd3961ade9 --- /dev/null +++ b/arch/arm/mach-mx5/devices.c | |||
@@ -0,0 +1,96 @@ | |||
1 | /* | ||
2 | * Copyright 2009 Amit Kucheria <amit.kucheria@canonical.com> | ||
3 | * | ||
4 | * The code contained herein is licensed under the GNU General Public | ||
5 | * License. You may obtain a copy of the GNU General Public License | ||
6 | * Version 2 or later at the following locations: | ||
7 | * | ||
8 | * http://www.opensource.org/licenses/gpl-license.html | ||
9 | * http://www.gnu.org/copyleft/gpl.html | ||
10 | */ | ||
11 | |||
12 | #include <linux/platform_device.h> | ||
13 | #include <mach/hardware.h> | ||
14 | #include <mach/imx-uart.h> | ||
15 | |||
16 | static struct resource uart0[] = { | ||
17 | { | ||
18 | .start = MX51_UART1_BASE_ADDR, | ||
19 | .end = MX51_UART1_BASE_ADDR + 0xfff, | ||
20 | .flags = IORESOURCE_MEM, | ||
21 | }, { | ||
22 | .start = MX51_MXC_INT_UART1, | ||
23 | .end = MX51_MXC_INT_UART1, | ||
24 | .flags = IORESOURCE_IRQ, | ||
25 | }, | ||
26 | }; | ||
27 | |||
28 | struct platform_device mxc_uart_device0 = { | ||
29 | .name = "imx-uart", | ||
30 | .id = 0, | ||
31 | .resource = uart0, | ||
32 | .num_resources = ARRAY_SIZE(uart0), | ||
33 | }; | ||
34 | |||
35 | static struct resource uart1[] = { | ||
36 | { | ||
37 | .start = MX51_UART2_BASE_ADDR, | ||
38 | .end = MX51_UART2_BASE_ADDR + 0xfff, | ||
39 | .flags = IORESOURCE_MEM, | ||
40 | }, { | ||
41 | .start = MX51_MXC_INT_UART2, | ||
42 | .end = MX51_MXC_INT_UART2, | ||
43 | .flags = IORESOURCE_IRQ, | ||
44 | }, | ||
45 | }; | ||
46 | |||
47 | struct platform_device mxc_uart_device1 = { | ||
48 | .name = "imx-uart", | ||
49 | .id = 1, | ||
50 | .resource = uart1, | ||
51 | .num_resources = ARRAY_SIZE(uart1), | ||
52 | }; | ||
53 | |||
54 | static struct resource uart2[] = { | ||
55 | { | ||
56 | .start = MX51_UART3_BASE_ADDR, | ||
57 | .end = MX51_UART3_BASE_ADDR + 0xfff, | ||
58 | .flags = IORESOURCE_MEM, | ||
59 | }, { | ||
60 | .start = MX51_MXC_INT_UART3, | ||
61 | .end = MX51_MXC_INT_UART3, | ||
62 | .flags = IORESOURCE_IRQ, | ||
63 | }, | ||
64 | }; | ||
65 | |||
66 | struct platform_device mxc_uart_device2 = { | ||
67 | .name = "imx-uart", | ||
68 | .id = 2, | ||
69 | .resource = uart2, | ||
70 | .num_resources = ARRAY_SIZE(uart2), | ||
71 | }; | ||
72 | |||
73 | static struct resource mxc_fec_resources[] = { | ||
74 | { | ||
75 | .start = MX51_MXC_FEC_BASE_ADDR, | ||
76 | .end = MX51_MXC_FEC_BASE_ADDR + 0xfff, | ||
77 | .flags = IORESOURCE_MEM, | ||
78 | }, { | ||
79 | .start = MX51_MXC_INT_FEC, | ||
80 | .end = MX51_MXC_INT_FEC, | ||
81 | .flags = IORESOURCE_IRQ, | ||
82 | }, | ||
83 | }; | ||
84 | |||
85 | struct platform_device mxc_fec_device = { | ||
86 | .name = "fec", | ||
87 | .id = 0, | ||
88 | .num_resources = ARRAY_SIZE(mxc_fec_resources), | ||
89 | .resource = mxc_fec_resources, | ||
90 | }; | ||
91 | |||
92 | /* Dummy definition to allow compiling in AVIC and TZIC simultaneously */ | ||
93 | int __init mxc_register_gpios(void) | ||
94 | { | ||
95 | return 0; | ||
96 | } | ||
diff --git a/arch/arm/mach-mx5/devices.h b/arch/arm/mach-mx5/devices.h new file mode 100644 index 000000000000..f339ab8c19be --- /dev/null +++ b/arch/arm/mach-mx5/devices.h | |||
@@ -0,0 +1,4 @@ | |||
1 | extern struct platform_device mxc_uart_device0; | ||
2 | extern struct platform_device mxc_uart_device1; | ||
3 | extern struct platform_device mxc_uart_device2; | ||
4 | extern struct platform_device mxc_fec_device; | ||
diff --git a/arch/arm/mach-mx5/mm.c b/arch/arm/mach-mx5/mm.c new file mode 100644 index 000000000000..c21e18be7af8 --- /dev/null +++ b/arch/arm/mach-mx5/mm.c | |||
@@ -0,0 +1,89 @@ | |||
1 | /* | ||
2 | * Copyright 2008-2009 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * | ||
4 | * The code contained herein is licensed under the GNU General Public | ||
5 | * License. You may obtain a copy of the GNU General Public License | ||
6 | * Version 2 or later at the following locations: | ||
7 | * | ||
8 | * http://www.opensource.org/licenses/gpl-license.html | ||
9 | * http://www.gnu.org/copyleft/gpl.html | ||
10 | * | ||
11 | * Create static mapping between physical to virtual memory. | ||
12 | */ | ||
13 | |||
14 | #include <linux/mm.h> | ||
15 | #include <linux/init.h> | ||
16 | |||
17 | #include <asm/mach/map.h> | ||
18 | |||
19 | #include <mach/hardware.h> | ||
20 | #include <mach/common.h> | ||
21 | #include <mach/iomux-v3.h> | ||
22 | |||
23 | /* | ||
24 | * Define the MX51 memory map. | ||
25 | */ | ||
26 | static struct map_desc mxc_io_desc[] __initdata = { | ||
27 | { | ||
28 | .virtual = MX51_IRAM_BASE_ADDR_VIRT, | ||
29 | .pfn = __phys_to_pfn(MX51_IRAM_BASE_ADDR), | ||
30 | .length = MX51_IRAM_SIZE, | ||
31 | .type = MT_DEVICE | ||
32 | }, { | ||
33 | .virtual = MX51_DEBUG_BASE_ADDR_VIRT, | ||
34 | .pfn = __phys_to_pfn(MX51_DEBUG_BASE_ADDR), | ||
35 | .length = MX51_DEBUG_SIZE, | ||
36 | .type = MT_DEVICE | ||
37 | }, { | ||
38 | .virtual = MX51_TZIC_BASE_ADDR_VIRT, | ||
39 | .pfn = __phys_to_pfn(MX51_TZIC_BASE_ADDR), | ||
40 | .length = MX51_TZIC_SIZE, | ||
41 | .type = MT_DEVICE | ||
42 | }, { | ||
43 | .virtual = MX51_AIPS1_BASE_ADDR_VIRT, | ||
44 | .pfn = __phys_to_pfn(MX51_AIPS1_BASE_ADDR), | ||
45 | .length = MX51_AIPS1_SIZE, | ||
46 | .type = MT_DEVICE | ||
47 | }, { | ||
48 | .virtual = MX51_SPBA0_BASE_ADDR_VIRT, | ||
49 | .pfn = __phys_to_pfn(MX51_SPBA0_BASE_ADDR), | ||
50 | .length = MX51_SPBA0_SIZE, | ||
51 | .type = MT_DEVICE | ||
52 | }, { | ||
53 | .virtual = MX51_AIPS2_BASE_ADDR_VIRT, | ||
54 | .pfn = __phys_to_pfn(MX51_AIPS2_BASE_ADDR), | ||
55 | .length = MX51_AIPS2_SIZE, | ||
56 | .type = MT_DEVICE | ||
57 | }, { | ||
58 | .virtual = MX51_NFC_AXI_BASE_ADDR_VIRT, | ||
59 | .pfn = __phys_to_pfn(MX51_NFC_AXI_BASE_ADDR), | ||
60 | .length = MX51_NFC_AXI_SIZE, | ||
61 | .type = MT_DEVICE | ||
62 | }, | ||
63 | }; | ||
64 | |||
65 | /* | ||
66 | * This function initializes the memory map. It is called during the | ||
67 | * system startup to create static physical to virtual memory mappings | ||
68 | * for the IO modules. | ||
69 | */ | ||
70 | void __init mx51_map_io(void) | ||
71 | { | ||
72 | u32 tzic_addr; | ||
73 | |||
74 | if (mx51_revision() < MX51_CHIP_REV_2_0) | ||
75 | tzic_addr = 0x8FFFC000; | ||
76 | else | ||
77 | tzic_addr = 0xE0003000; | ||
78 | mxc_io_desc[2].pfn = __phys_to_pfn(tzic_addr); | ||
79 | |||
80 | mxc_set_cpu_type(MXC_CPU_MX51); | ||
81 | mxc_iomux_v3_init(MX51_IO_ADDRESS(MX51_IOMUXC_BASE_ADDR)); | ||
82 | mxc_arch_reset_init(MX51_IO_ADDRESS(MX51_WDOG_BASE_ADDR)); | ||
83 | iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc)); | ||
84 | } | ||
85 | |||
86 | void __init mx51_init_irq(void) | ||
87 | { | ||
88 | tzic_init_irq(MX51_IO_ADDRESS(MX51_TZIC_BASE_ADDR)); | ||
89 | } | ||
diff --git a/arch/arm/mach-mxc91231/magx-zn5.c b/arch/arm/mach-mxc91231/magx-zn5.c index 7dbe4ca12efd..69816ba82930 100644 --- a/arch/arm/mach-mxc91231/magx-zn5.c +++ b/arch/arm/mach-mxc91231/magx-zn5.c | |||
@@ -55,7 +55,7 @@ struct sys_timer zn5_timer = { | |||
55 | MACHINE_START(MAGX_ZN5, "Motorola Zn5") | 55 | MACHINE_START(MAGX_ZN5, "Motorola Zn5") |
56 | .phys_io = MXC91231_AIPS1_BASE_ADDR, | 56 | .phys_io = MXC91231_AIPS1_BASE_ADDR, |
57 | .io_pg_offst = ((MXC91231_AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, | 57 | .io_pg_offst = ((MXC91231_AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, |
58 | .boot_params = PHYS_OFFSET + 0x100, | 58 | .boot_params = MXC91231_PHYS_OFFSET + 0x100, |
59 | .map_io = mxc91231_map_io, | 59 | .map_io = mxc91231_map_io, |
60 | .init_irq = mxc91231_init_irq, | 60 | .init_irq = mxc91231_init_irq, |
61 | .timer = &zn5_timer, | 61 | .timer = &zn5_timer, |
diff --git a/arch/arm/plat-mxc/Kconfig b/arch/arm/plat-mxc/Kconfig index 8b0a1ee039fa..7f7ad6f289bd 100644 --- a/arch/arm/plat-mxc/Kconfig +++ b/arch/arm/plat-mxc/Kconfig | |||
@@ -9,38 +9,43 @@ choice | |||
9 | config ARCH_MX1 | 9 | config ARCH_MX1 |
10 | bool "MX1-based" | 10 | bool "MX1-based" |
11 | select CPU_ARM920T | 11 | select CPU_ARM920T |
12 | select COMMON_CLKDEV | 12 | select IMX_HAVE_IOMUX_V1 |
13 | help | 13 | help |
14 | This enables support for systems based on the Freescale i.MX1 family | 14 | This enables support for systems based on the Freescale i.MX1 family |
15 | 15 | ||
16 | config ARCH_MX2 | 16 | config ARCH_MX2 |
17 | bool "MX2-based" | 17 | bool "MX2-based" |
18 | select CPU_ARM926T | 18 | select CPU_ARM926T |
19 | select COMMON_CLKDEV | 19 | select IMX_HAVE_IOMUX_V1 |
20 | help | 20 | help |
21 | This enables support for systems based on the Freescale i.MX2 family | 21 | This enables support for systems based on the Freescale i.MX2 family |
22 | 22 | ||
23 | config ARCH_MX25 | 23 | config ARCH_MX25 |
24 | bool "MX25-based" | 24 | bool "MX25-based" |
25 | select CPU_ARM926T | 25 | select CPU_ARM926T |
26 | select COMMON_CLKDEV | 26 | select ARCH_MXC_IOMUX_V3 |
27 | select HAVE_FB_IMX | ||
27 | help | 28 | help |
28 | This enables support for systems based on the Freescale i.MX25 family | 29 | This enables support for systems based on the Freescale i.MX25 family |
29 | 30 | ||
30 | config ARCH_MX3 | 31 | config ARCH_MX3 |
31 | bool "MX3-based" | 32 | bool "MX3-based" |
32 | select CPU_V6 | 33 | select CPU_V6 |
33 | select COMMON_CLKDEV | ||
34 | help | 34 | help |
35 | This enables support for systems based on the Freescale i.MX3 family | 35 | This enables support for systems based on the Freescale i.MX3 family |
36 | 36 | ||
37 | config ARCH_MXC91231 | 37 | config ARCH_MXC91231 |
38 | bool "MXC91231-based" | 38 | bool "MXC91231-based" |
39 | select CPU_V6 | 39 | select CPU_V6 |
40 | select COMMON_CLKDEV | ||
41 | help | 40 | help |
42 | This enables support for systems based on the Freescale MXC91231 family | 41 | This enables support for systems based on the Freescale MXC91231 family |
43 | 42 | ||
43 | config ARCH_MX5 | ||
44 | bool "MX5-based" | ||
45 | select CPU_V7 | ||
46 | help | ||
47 | This enables support for systems based on the Freescale i.MX51 family | ||
48 | |||
44 | endchoice | 49 | endchoice |
45 | 50 | ||
46 | source "arch/arm/mach-mx1/Kconfig" | 51 | source "arch/arm/mach-mx1/Kconfig" |
@@ -48,12 +53,12 @@ source "arch/arm/mach-mx2/Kconfig" | |||
48 | source "arch/arm/mach-mx3/Kconfig" | 53 | source "arch/arm/mach-mx3/Kconfig" |
49 | source "arch/arm/mach-mx25/Kconfig" | 54 | source "arch/arm/mach-mx25/Kconfig" |
50 | source "arch/arm/mach-mxc91231/Kconfig" | 55 | source "arch/arm/mach-mxc91231/Kconfig" |
56 | source "arch/arm/mach-mx5/Kconfig" | ||
51 | 57 | ||
52 | endmenu | 58 | endmenu |
53 | 59 | ||
54 | config MXC_IRQ_PRIOR | 60 | config MXC_IRQ_PRIOR |
55 | bool "Use IRQ priority" | 61 | bool "Use IRQ priority" |
56 | depends on ARCH_MXC | ||
57 | help | 62 | help |
58 | Select this if you want to use prioritized IRQ handling. | 63 | Select this if you want to use prioritized IRQ handling. |
59 | This feature prevents higher priority ISR to be interrupted | 64 | This feature prevents higher priority ISR to be interrupted |
@@ -62,9 +67,16 @@ config MXC_IRQ_PRIOR | |||
62 | requirements for timing. | 67 | requirements for timing. |
63 | Say N here, unless you have a specialized requirement. | 68 | Say N here, unless you have a specialized requirement. |
64 | 69 | ||
70 | config MXC_TZIC | ||
71 | bool "Enable TrustZone Interrupt Controller" | ||
72 | depends on ARCH_MX51 | ||
73 | help | ||
74 | This will be automatically selected for all processors | ||
75 | containing this interrupt controller. | ||
76 | Say N here only if you are really sure. | ||
77 | |||
65 | config MXC_PWM | 78 | config MXC_PWM |
66 | tristate "Enable PWM driver" | 79 | tristate "Enable PWM driver" |
67 | depends on ARCH_MXC | ||
68 | select HAVE_PWM | 80 | select HAVE_PWM |
69 | help | 81 | help |
70 | Enable support for the i.MX PWM controller(s). | 82 | Enable support for the i.MX PWM controller(s). |
@@ -74,7 +86,9 @@ config MXC_ULPI | |||
74 | 86 | ||
75 | config ARCH_HAS_RNGA | 87 | config ARCH_HAS_RNGA |
76 | bool | 88 | bool |
77 | depends on ARCH_MXC | 89 | |
90 | config IMX_HAVE_IOMUX_V1 | ||
91 | bool | ||
78 | 92 | ||
79 | config ARCH_MXC_IOMUX_V3 | 93 | config ARCH_MXC_IOMUX_V3 |
80 | bool | 94 | bool |
diff --git a/arch/arm/plat-mxc/Makefile b/arch/arm/plat-mxc/Makefile index 996cbac6932c..a72a5e4ca20e 100644 --- a/arch/arm/plat-mxc/Makefile +++ b/arch/arm/plat-mxc/Makefile | |||
@@ -5,8 +5,12 @@ | |||
5 | # Common support | 5 | # Common support |
6 | obj-y := irq.o clock.o gpio.o time.o devices.o cpu.o system.o | 6 | 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 | # MX51 uses the TZIC interrupt controller, older platforms use AVIC (irq.o) |
9 | obj-$(CONFIG_ARCH_MX2) += iomux-mx1-mx2.o dma-mx1-mx2.o | 9 | obj-$(CONFIG_MXC_TZIC) += tzic.o |
10 | |||
11 | obj-$(CONFIG_ARCH_MX1) += dma-mx1-mx2.o | ||
12 | obj-$(CONFIG_ARCH_MX2) += dma-mx1-mx2.o | ||
13 | obj-$(CONFIG_IMX_HAVE_IOMUX_V1) += iomux-v1.o | ||
10 | obj-$(CONFIG_ARCH_MXC_IOMUX_V3) += iomux-v3.o | 14 | obj-$(CONFIG_ARCH_MXC_IOMUX_V3) += iomux-v3.o |
11 | obj-$(CONFIG_MXC_PWM) += pwm.o | 15 | obj-$(CONFIG_MXC_PWM) += pwm.o |
12 | obj-$(CONFIG_USB_EHCI_MXC) += ehci.o | 16 | obj-$(CONFIG_USB_EHCI_MXC) += ehci.o |
diff --git a/arch/arm/plat-mxc/audmux-v1.c b/arch/arm/plat-mxc/audmux-v1.c index da6387dcdf21..b62917ca3f95 100644 --- a/arch/arm/plat-mxc/audmux-v1.c +++ b/arch/arm/plat-mxc/audmux-v1.c | |||
@@ -50,8 +50,18 @@ EXPORT_SYMBOL_GPL(mxc_audmux_v1_configure_port); | |||
50 | 50 | ||
51 | static int mxc_audmux_v1_init(void) | 51 | static int mxc_audmux_v1_init(void) |
52 | { | 52 | { |
53 | if (cpu_is_mx27() || cpu_is_mx21()) | 53 | #ifdef CONFIG_MACH_MX21 |
54 | audmux_base = IO_ADDRESS(AUDMUX_BASE_ADDR); | 54 | if (cpu_is_mx21()) |
55 | audmux_base = MX21_IO_ADDRESS(MX21_AUDMUX_BASE_ADDR); | ||
56 | else | ||
57 | #endif | ||
58 | #ifdef CONFIG_MACH_MX27 | ||
59 | if (cpu_is_mx27()) | ||
60 | audmux_base = MX27_IO_ADDRESS(MX27_AUDMUX_BASE_ADDR); | ||
61 | else | ||
62 | #endif | ||
63 | (void)0; | ||
64 | |||
55 | return 0; | 65 | return 0; |
56 | } | 66 | } |
57 | 67 | ||
diff --git a/arch/arm/plat-mxc/audmux-v2.c b/arch/arm/plat-mxc/audmux-v2.c index b06954a84436..d983cd6c788c 100644 --- a/arch/arm/plat-mxc/audmux-v2.c +++ b/arch/arm/plat-mxc/audmux-v2.c | |||
@@ -190,7 +190,10 @@ static int mxc_audmux_v2_init(void) | |||
190 | { | 190 | { |
191 | int ret; | 191 | int ret; |
192 | 192 | ||
193 | if (cpu_is_mx35()) { | 193 | if (cpu_is_mx31()) |
194 | audmux_base = MX31_IO_ADDRESS(MX31_AUDMUX_BASE_ADDR); | ||
195 | |||
196 | else if (cpu_is_mx35()) { | ||
194 | audmux_clk = clk_get(NULL, "audmux"); | 197 | audmux_clk = clk_get(NULL, "audmux"); |
195 | if (IS_ERR(audmux_clk)) { | 198 | if (IS_ERR(audmux_clk)) { |
196 | ret = PTR_ERR(audmux_clk); | 199 | ret = PTR_ERR(audmux_clk); |
@@ -198,11 +201,9 @@ static int mxc_audmux_v2_init(void) | |||
198 | ret); | 201 | ret); |
199 | return ret; | 202 | return ret; |
200 | } | 203 | } |
204 | audmux_base = MX35_IO_ADDRESS(MX35_AUDMUX_BASE_ADDR); | ||
201 | } | 205 | } |
202 | 206 | ||
203 | if (cpu_is_mx31() || cpu_is_mx35()) | ||
204 | audmux_base = IO_ADDRESS(AUDMUX_BASE_ADDR); | ||
205 | |||
206 | audmux_debugfs_init(); | 207 | audmux_debugfs_init(); |
207 | 208 | ||
208 | return 0; | 209 | return 0; |
diff --git a/arch/arm/plat-mxc/clock.c b/arch/arm/plat-mxc/clock.c index 9e8fbd57495c..323ff8ccc877 100644 --- a/arch/arm/plat-mxc/clock.c +++ b/arch/arm/plat-mxc/clock.c | |||
@@ -56,6 +56,7 @@ static void __clk_disable(struct clk *clk) | |||
56 | __clk_disable(clk->parent); | 56 | __clk_disable(clk->parent); |
57 | __clk_disable(clk->secondary); | 57 | __clk_disable(clk->secondary); |
58 | 58 | ||
59 | WARN_ON(!clk->usecount); | ||
59 | if (!(--clk->usecount) && clk->disable) | 60 | if (!(--clk->usecount) && clk->disable) |
60 | clk->disable(clk); | 61 | clk->disable(clk); |
61 | } | 62 | } |
diff --git a/arch/arm/plat-mxc/dma-mx1-mx2.c b/arch/arm/plat-mxc/dma-mx1-mx2.c index 9c1b3f9c4f4d..e16014b0d13c 100644 --- a/arch/arm/plat-mxc/dma-mx1-mx2.c +++ b/arch/arm/plat-mxc/dma-mx1-mx2.c | |||
@@ -128,6 +128,18 @@ struct imx_dma_channel { | |||
128 | int hw_chaining; | 128 | int hw_chaining; |
129 | }; | 129 | }; |
130 | 130 | ||
131 | static void __iomem *imx_dmav1_baseaddr; | ||
132 | |||
133 | static void imx_dmav1_writel(unsigned val, unsigned offset) | ||
134 | { | ||
135 | __raw_writel(val, imx_dmav1_baseaddr + offset); | ||
136 | } | ||
137 | |||
138 | static unsigned imx_dmav1_readl(unsigned offset) | ||
139 | { | ||
140 | return __raw_readl(imx_dmav1_baseaddr + offset); | ||
141 | } | ||
142 | |||
131 | static struct imx_dma_channel imx_dma_channels[IMX_DMA_CHANNELS]; | 143 | static struct imx_dma_channel imx_dma_channels[IMX_DMA_CHANNELS]; |
132 | 144 | ||
133 | static struct clk *dma_clk; | 145 | static struct clk *dma_clk; |
@@ -140,7 +152,6 @@ static int imx_dma_hw_chain(struct imx_dma_channel *imxdma) | |||
140 | return 0; | 152 | return 0; |
141 | } | 153 | } |
142 | 154 | ||
143 | |||
144 | /* | 155 | /* |
145 | * imx_dma_sg_next - prepare next chunk for scatter-gather DMA emulation | 156 | * imx_dma_sg_next - prepare next chunk for scatter-gather DMA emulation |
146 | */ | 157 | */ |
@@ -160,17 +171,17 @@ static inline int imx_dma_sg_next(int channel, struct scatterlist *sg) | |||
160 | imxdma->resbytes -= now; | 171 | imxdma->resbytes -= now; |
161 | 172 | ||
162 | if ((imxdma->dma_mode & DMA_MODE_MASK) == DMA_MODE_READ) | 173 | if ((imxdma->dma_mode & DMA_MODE_MASK) == DMA_MODE_READ) |
163 | __raw_writel(sg->dma_address, DMA_BASE + DMA_DAR(channel)); | 174 | imx_dmav1_writel(sg->dma_address, DMA_DAR(channel)); |
164 | else | 175 | else |
165 | __raw_writel(sg->dma_address, DMA_BASE + DMA_SAR(channel)); | 176 | imx_dmav1_writel(sg->dma_address, DMA_SAR(channel)); |
166 | 177 | ||
167 | __raw_writel(now, DMA_BASE + DMA_CNTR(channel)); | 178 | imx_dmav1_writel(now, DMA_CNTR(channel)); |
168 | 179 | ||
169 | pr_debug("imxdma%d: next sg chunk dst 0x%08x, src 0x%08x, " | 180 | pr_debug("imxdma%d: next sg chunk dst 0x%08x, src 0x%08x, " |
170 | "size 0x%08x\n", channel, | 181 | "size 0x%08x\n", channel, |
171 | __raw_readl(DMA_BASE + DMA_DAR(channel)), | 182 | imx_dmav1_readl(DMA_DAR(channel)), |
172 | __raw_readl(DMA_BASE + DMA_SAR(channel)), | 183 | imx_dmav1_readl(DMA_SAR(channel)), |
173 | __raw_readl(DMA_BASE + DMA_CNTR(channel))); | 184 | imx_dmav1_readl(DMA_CNTR(channel))); |
174 | 185 | ||
175 | return now; | 186 | return now; |
176 | } | 187 | } |
@@ -218,27 +229,26 @@ imx_dma_setup_single(int channel, dma_addr_t dma_address, | |||
218 | channel, __func__, (unsigned int)dma_address, | 229 | channel, __func__, (unsigned int)dma_address, |
219 | dma_length, dev_addr); | 230 | dma_length, dev_addr); |
220 | 231 | ||
221 | __raw_writel(dev_addr, DMA_BASE + DMA_SAR(channel)); | 232 | imx_dmav1_writel(dev_addr, DMA_SAR(channel)); |
222 | __raw_writel(dma_address, DMA_BASE + DMA_DAR(channel)); | 233 | imx_dmav1_writel(dma_address, DMA_DAR(channel)); |
223 | __raw_writel(imxdma->ccr_from_device, | 234 | imx_dmav1_writel(imxdma->ccr_from_device, DMA_CCR(channel)); |
224 | DMA_BASE + DMA_CCR(channel)); | ||
225 | } else if ((dmamode & DMA_MODE_MASK) == DMA_MODE_WRITE) { | 235 | } else if ((dmamode & DMA_MODE_MASK) == DMA_MODE_WRITE) { |
226 | pr_debug("imxdma%d: %s dma_addressg=0x%08x dma_length=%d " | 236 | pr_debug("imxdma%d: %s dma_addressg=0x%08x dma_length=%d " |
227 | "dev_addr=0x%08x for write\n", | 237 | "dev_addr=0x%08x for write\n", |
228 | channel, __func__, (unsigned int)dma_address, | 238 | channel, __func__, (unsigned int)dma_address, |
229 | dma_length, dev_addr); | 239 | dma_length, dev_addr); |
230 | 240 | ||
231 | __raw_writel(dma_address, DMA_BASE + DMA_SAR(channel)); | 241 | imx_dmav1_writel(dma_address, DMA_SAR(channel)); |
232 | __raw_writel(dev_addr, DMA_BASE + DMA_DAR(channel)); | 242 | imx_dmav1_writel(dev_addr, DMA_DAR(channel)); |
233 | __raw_writel(imxdma->ccr_to_device, | 243 | imx_dmav1_writel(imxdma->ccr_to_device, |
234 | DMA_BASE + DMA_CCR(channel)); | 244 | DMA_CCR(channel)); |
235 | } else { | 245 | } else { |
236 | printk(KERN_ERR "imxdma%d: imx_dma_setup_single bad dmamode\n", | 246 | printk(KERN_ERR "imxdma%d: imx_dma_setup_single bad dmamode\n", |
237 | channel); | 247 | channel); |
238 | return -EINVAL; | 248 | return -EINVAL; |
239 | } | 249 | } |
240 | 250 | ||
241 | __raw_writel(dma_length, DMA_BASE + DMA_CNTR(channel)); | 251 | imx_dmav1_writel(dma_length, DMA_CNTR(channel)); |
242 | 252 | ||
243 | return 0; | 253 | return 0; |
244 | } | 254 | } |
@@ -316,17 +326,15 @@ imx_dma_setup_sg(int channel, | |||
316 | "dev_addr=0x%08x for read\n", | 326 | "dev_addr=0x%08x for read\n", |
317 | channel, __func__, sg, sgcount, dma_length, dev_addr); | 327 | channel, __func__, sg, sgcount, dma_length, dev_addr); |
318 | 328 | ||
319 | __raw_writel(dev_addr, DMA_BASE + DMA_SAR(channel)); | 329 | imx_dmav1_writel(dev_addr, DMA_SAR(channel)); |
320 | __raw_writel(imxdma->ccr_from_device, | 330 | imx_dmav1_writel(imxdma->ccr_from_device, DMA_CCR(channel)); |
321 | DMA_BASE + DMA_CCR(channel)); | ||
322 | } else if ((dmamode & DMA_MODE_MASK) == DMA_MODE_WRITE) { | 331 | } else if ((dmamode & DMA_MODE_MASK) == DMA_MODE_WRITE) { |
323 | pr_debug("imxdma%d: %s sg=%p sgcount=%d total length=%d " | 332 | pr_debug("imxdma%d: %s sg=%p sgcount=%d total length=%d " |
324 | "dev_addr=0x%08x for write\n", | 333 | "dev_addr=0x%08x for write\n", |
325 | channel, __func__, sg, sgcount, dma_length, dev_addr); | 334 | channel, __func__, sg, sgcount, dma_length, dev_addr); |
326 | 335 | ||
327 | __raw_writel(dev_addr, DMA_BASE + DMA_DAR(channel)); | 336 | imx_dmav1_writel(dev_addr, DMA_DAR(channel)); |
328 | __raw_writel(imxdma->ccr_to_device, | 337 | imx_dmav1_writel(imxdma->ccr_to_device, DMA_CCR(channel)); |
329 | DMA_BASE + DMA_CCR(channel)); | ||
330 | } else { | 338 | } else { |
331 | printk(KERN_ERR "imxdma%d: imx_dma_setup_sg bad dmamode\n", | 339 | printk(KERN_ERR "imxdma%d: imx_dma_setup_sg bad dmamode\n", |
332 | channel); | 340 | channel); |
@@ -360,7 +368,7 @@ imx_dma_config_channel(int channel, unsigned int config_port, | |||
360 | imxdma->ccr_from_device = config_port | (config_mem << 2) | dreq; | 368 | imxdma->ccr_from_device = config_port | (config_mem << 2) | dreq; |
361 | imxdma->ccr_to_device = config_mem | (config_port << 2) | dreq; | 369 | imxdma->ccr_to_device = config_mem | (config_port << 2) | dreq; |
362 | 370 | ||
363 | __raw_writel(dmareq, DMA_BASE + DMA_RSSR(channel)); | 371 | imx_dmav1_writel(dmareq, DMA_RSSR(channel)); |
364 | 372 | ||
365 | return 0; | 373 | return 0; |
366 | } | 374 | } |
@@ -368,7 +376,7 @@ EXPORT_SYMBOL(imx_dma_config_channel); | |||
368 | 376 | ||
369 | void imx_dma_config_burstlen(int channel, unsigned int burstlen) | 377 | void imx_dma_config_burstlen(int channel, unsigned int burstlen) |
370 | { | 378 | { |
371 | __raw_writel(burstlen, DMA_BASE + DMA_BLR(channel)); | 379 | imx_dmav1_writel(burstlen, DMA_BLR(channel)); |
372 | } | 380 | } |
373 | EXPORT_SYMBOL(imx_dma_config_burstlen); | 381 | EXPORT_SYMBOL(imx_dma_config_burstlen); |
374 | 382 | ||
@@ -398,7 +406,7 @@ imx_dma_setup_handlers(int channel, | |||
398 | } | 406 | } |
399 | 407 | ||
400 | local_irq_save(flags); | 408 | local_irq_save(flags); |
401 | __raw_writel(1 << channel, DMA_BASE + DMA_DISR); | 409 | imx_dmav1_writel(1 << channel, DMA_DISR); |
402 | imxdma->irq_handler = irq_handler; | 410 | imxdma->irq_handler = irq_handler; |
403 | imxdma->err_handler = err_handler; | 411 | imxdma->err_handler = err_handler; |
404 | imxdma->data = data; | 412 | imxdma->data = data; |
@@ -462,22 +470,21 @@ void imx_dma_enable(int channel) | |||
462 | 470 | ||
463 | local_irq_save(flags); | 471 | local_irq_save(flags); |
464 | 472 | ||
465 | __raw_writel(1 << channel, DMA_BASE + DMA_DISR); | 473 | imx_dmav1_writel(1 << channel, DMA_DISR); |
466 | __raw_writel(__raw_readl(DMA_BASE + DMA_DIMR) & ~(1 << channel), | 474 | imx_dmav1_writel(imx_dmav1_readl(DMA_DIMR) & ~(1 << channel), DMA_DIMR); |
467 | DMA_BASE + DMA_DIMR); | 475 | imx_dmav1_writel(imx_dmav1_readl(DMA_CCR(channel)) | CCR_CEN | |
468 | __raw_writel(__raw_readl(DMA_BASE + DMA_CCR(channel)) | CCR_CEN | | 476 | CCR_ACRPT, DMA_CCR(channel)); |
469 | CCR_ACRPT, | ||
470 | DMA_BASE + DMA_CCR(channel)); | ||
471 | 477 | ||
472 | #ifdef CONFIG_ARCH_MX2 | 478 | #ifdef CONFIG_ARCH_MX2 |
473 | if (imxdma->sg && imx_dma_hw_chain(imxdma)) { | 479 | if ((cpu_is_mx21() || cpu_is_mx27()) && |
480 | imxdma->sg && imx_dma_hw_chain(imxdma)) { | ||
474 | imxdma->sg = sg_next(imxdma->sg); | 481 | imxdma->sg = sg_next(imxdma->sg); |
475 | if (imxdma->sg) { | 482 | if (imxdma->sg) { |
476 | u32 tmp; | 483 | u32 tmp; |
477 | imx_dma_sg_next(channel, imxdma->sg); | 484 | imx_dma_sg_next(channel, imxdma->sg); |
478 | tmp = __raw_readl(DMA_BASE + DMA_CCR(channel)); | 485 | tmp = imx_dmav1_readl(DMA_CCR(channel)); |
479 | __raw_writel(tmp | CCR_RPT | CCR_ACRPT, | 486 | imx_dmav1_writel(tmp | CCR_RPT | CCR_ACRPT, |
480 | DMA_BASE + DMA_CCR(channel)); | 487 | DMA_CCR(channel)); |
481 | } | 488 | } |
482 | } | 489 | } |
483 | #endif | 490 | #endif |
@@ -502,11 +509,10 @@ void imx_dma_disable(int channel) | |||
502 | del_timer(&imxdma->watchdog); | 509 | del_timer(&imxdma->watchdog); |
503 | 510 | ||
504 | local_irq_save(flags); | 511 | local_irq_save(flags); |
505 | __raw_writel(__raw_readl(DMA_BASE + DMA_DIMR) | (1 << channel), | 512 | imx_dmav1_writel(imx_dmav1_readl(DMA_DIMR) | (1 << channel), DMA_DIMR); |
506 | DMA_BASE + DMA_DIMR); | 513 | imx_dmav1_writel(imx_dmav1_readl(DMA_CCR(channel)) & ~CCR_CEN, |
507 | __raw_writel(__raw_readl(DMA_BASE + DMA_CCR(channel)) & ~CCR_CEN, | 514 | DMA_CCR(channel)); |
508 | DMA_BASE + DMA_CCR(channel)); | 515 | imx_dmav1_writel(1 << channel, DMA_DISR); |
509 | __raw_writel(1 << channel, DMA_BASE + DMA_DISR); | ||
510 | imxdma->in_use = 0; | 516 | imxdma->in_use = 0; |
511 | local_irq_restore(flags); | 517 | local_irq_restore(flags); |
512 | } | 518 | } |
@@ -517,7 +523,7 @@ static void imx_dma_watchdog(unsigned long chno) | |||
517 | { | 523 | { |
518 | struct imx_dma_channel *imxdma = &imx_dma_channels[chno]; | 524 | struct imx_dma_channel *imxdma = &imx_dma_channels[chno]; |
519 | 525 | ||
520 | __raw_writel(0, DMA_BASE + DMA_CCR(chno)); | 526 | imx_dmav1_writel(0, DMA_CCR(chno)); |
521 | imxdma->in_use = 0; | 527 | imxdma->in_use = 0; |
522 | imxdma->sg = NULL; | 528 | imxdma->sg = NULL; |
523 | 529 | ||
@@ -533,17 +539,17 @@ static irqreturn_t dma_err_handler(int irq, void *dev_id) | |||
533 | unsigned int err_mask; | 539 | unsigned int err_mask; |
534 | int errcode; | 540 | int errcode; |
535 | 541 | ||
536 | disr = __raw_readl(DMA_BASE + DMA_DISR); | 542 | disr = imx_dmav1_readl(DMA_DISR); |
537 | 543 | ||
538 | err_mask = __raw_readl(DMA_BASE + DMA_DBTOSR) | | 544 | err_mask = imx_dmav1_readl(DMA_DBTOSR) | |
539 | __raw_readl(DMA_BASE + DMA_DRTOSR) | | 545 | imx_dmav1_readl(DMA_DRTOSR) | |
540 | __raw_readl(DMA_BASE + DMA_DSESR) | | 546 | imx_dmav1_readl(DMA_DSESR) | |
541 | __raw_readl(DMA_BASE + DMA_DBOSR); | 547 | imx_dmav1_readl(DMA_DBOSR); |
542 | 548 | ||
543 | if (!err_mask) | 549 | if (!err_mask) |
544 | return IRQ_HANDLED; | 550 | return IRQ_HANDLED; |
545 | 551 | ||
546 | __raw_writel(disr & err_mask, DMA_BASE + DMA_DISR); | 552 | imx_dmav1_writel(disr & err_mask, DMA_DISR); |
547 | 553 | ||
548 | for (i = 0; i < IMX_DMA_CHANNELS; i++) { | 554 | for (i = 0; i < IMX_DMA_CHANNELS; i++) { |
549 | if (!(err_mask & (1 << i))) | 555 | if (!(err_mask & (1 << i))) |
@@ -551,20 +557,20 @@ static irqreturn_t dma_err_handler(int irq, void *dev_id) | |||
551 | imxdma = &imx_dma_channels[i]; | 557 | imxdma = &imx_dma_channels[i]; |
552 | errcode = 0; | 558 | errcode = 0; |
553 | 559 | ||
554 | if (__raw_readl(DMA_BASE + DMA_DBTOSR) & (1 << i)) { | 560 | if (imx_dmav1_readl(DMA_DBTOSR) & (1 << i)) { |
555 | __raw_writel(1 << i, DMA_BASE + DMA_DBTOSR); | 561 | imx_dmav1_writel(1 << i, DMA_DBTOSR); |
556 | errcode |= IMX_DMA_ERR_BURST; | 562 | errcode |= IMX_DMA_ERR_BURST; |
557 | } | 563 | } |
558 | if (__raw_readl(DMA_BASE + DMA_DRTOSR) & (1 << i)) { | 564 | if (imx_dmav1_readl(DMA_DRTOSR) & (1 << i)) { |
559 | __raw_writel(1 << i, DMA_BASE + DMA_DRTOSR); | 565 | imx_dmav1_writel(1 << i, DMA_DRTOSR); |
560 | errcode |= IMX_DMA_ERR_REQUEST; | 566 | errcode |= IMX_DMA_ERR_REQUEST; |
561 | } | 567 | } |
562 | if (__raw_readl(DMA_BASE + DMA_DSESR) & (1 << i)) { | 568 | if (imx_dmav1_readl(DMA_DSESR) & (1 << i)) { |
563 | __raw_writel(1 << i, DMA_BASE + DMA_DSESR); | 569 | imx_dmav1_writel(1 << i, DMA_DSESR); |
564 | errcode |= IMX_DMA_ERR_TRANSFER; | 570 | errcode |= IMX_DMA_ERR_TRANSFER; |
565 | } | 571 | } |
566 | if (__raw_readl(DMA_BASE + DMA_DBOSR) & (1 << i)) { | 572 | if (imx_dmav1_readl(DMA_DBOSR) & (1 << i)) { |
567 | __raw_writel(1 << i, DMA_BASE + DMA_DBOSR); | 573 | imx_dmav1_writel(1 << i, DMA_DBOSR); |
568 | errcode |= IMX_DMA_ERR_BUFFER; | 574 | errcode |= IMX_DMA_ERR_BUFFER; |
569 | } | 575 | } |
570 | if (imxdma->name && imxdma->err_handler) { | 576 | if (imxdma->name && imxdma->err_handler) { |
@@ -607,7 +613,7 @@ static void dma_irq_handle_channel(int chno) | |||
607 | if (imxdma->sg) { | 613 | if (imxdma->sg) { |
608 | imx_dma_sg_next(chno, imxdma->sg); | 614 | imx_dma_sg_next(chno, imxdma->sg); |
609 | 615 | ||
610 | tmp = __raw_readl(DMA_BASE + DMA_CCR(chno)); | 616 | tmp = imx_dmav1_readl(DMA_CCR(chno)); |
611 | 617 | ||
612 | if (imx_dma_hw_chain(imxdma)) { | 618 | if (imx_dma_hw_chain(imxdma)) { |
613 | /* FIXME: The timeout should probably be | 619 | /* FIXME: The timeout should probably be |
@@ -617,15 +623,13 @@ static void dma_irq_handle_channel(int chno) | |||
617 | jiffies + msecs_to_jiffies(500)); | 623 | jiffies + msecs_to_jiffies(500)); |
618 | 624 | ||
619 | tmp |= CCR_CEN | CCR_RPT | CCR_ACRPT; | 625 | tmp |= CCR_CEN | CCR_RPT | CCR_ACRPT; |
620 | __raw_writel(tmp, DMA_BASE + | 626 | imx_dmav1_writel(tmp, DMA_CCR(chno)); |
621 | DMA_CCR(chno)); | ||
622 | } else { | 627 | } else { |
623 | __raw_writel(tmp & ~CCR_CEN, DMA_BASE + | 628 | imx_dmav1_writel(tmp & ~CCR_CEN, DMA_CCR(chno)); |
624 | DMA_CCR(chno)); | ||
625 | tmp |= CCR_CEN; | 629 | tmp |= CCR_CEN; |
626 | } | 630 | } |
627 | 631 | ||
628 | __raw_writel(tmp, DMA_BASE + DMA_CCR(chno)); | 632 | imx_dmav1_writel(tmp, DMA_CCR(chno)); |
629 | 633 | ||
630 | if (imxdma->prog_handler) | 634 | if (imxdma->prog_handler) |
631 | imxdma->prog_handler(chno, imxdma->data, | 635 | imxdma->prog_handler(chno, imxdma->data, |
@@ -640,7 +644,7 @@ static void dma_irq_handle_channel(int chno) | |||
640 | } | 644 | } |
641 | } | 645 | } |
642 | 646 | ||
643 | __raw_writel(0, DMA_BASE + DMA_CCR(chno)); | 647 | imx_dmav1_writel(0, DMA_CCR(chno)); |
644 | imxdma->in_use = 0; | 648 | imxdma->in_use = 0; |
645 | if (imxdma->irq_handler) | 649 | if (imxdma->irq_handler) |
646 | imxdma->irq_handler(chno, imxdma->data); | 650 | imxdma->irq_handler(chno, imxdma->data); |
@@ -651,15 +655,16 @@ static irqreturn_t dma_irq_handler(int irq, void *dev_id) | |||
651 | int i, disr; | 655 | int i, disr; |
652 | 656 | ||
653 | #ifdef CONFIG_ARCH_MX2 | 657 | #ifdef CONFIG_ARCH_MX2 |
654 | dma_err_handler(irq, dev_id); | 658 | if (cpu_is_mx21() || cpu_is_mx27()) |
659 | dma_err_handler(irq, dev_id); | ||
655 | #endif | 660 | #endif |
656 | 661 | ||
657 | disr = __raw_readl(DMA_BASE + DMA_DISR); | 662 | disr = imx_dmav1_readl(DMA_DISR); |
658 | 663 | ||
659 | pr_debug("imxdma: dma_irq_handler called, disr=0x%08x\n", | 664 | pr_debug("imxdma: dma_irq_handler called, disr=0x%08x\n", |
660 | disr); | 665 | disr); |
661 | 666 | ||
662 | __raw_writel(disr, DMA_BASE + DMA_DISR); | 667 | imx_dmav1_writel(disr, DMA_DISR); |
663 | for (i = 0; i < IMX_DMA_CHANNELS; i++) { | 668 | for (i = 0; i < IMX_DMA_CHANNELS; i++) { |
664 | if (disr & (1 << i)) | 669 | if (disr & (1 << i)) |
665 | dma_irq_handle_channel(i); | 670 | dma_irq_handle_channel(i); |
@@ -699,17 +704,19 @@ int imx_dma_request(int channel, const char *name) | |||
699 | local_irq_restore(flags); /* request_irq() can block */ | 704 | local_irq_restore(flags); /* request_irq() can block */ |
700 | 705 | ||
701 | #ifdef CONFIG_ARCH_MX2 | 706 | #ifdef CONFIG_ARCH_MX2 |
702 | ret = request_irq(MXC_INT_DMACH0 + channel, dma_irq_handler, 0, "DMA", | 707 | if (cpu_is_mx21() || cpu_is_mx27()) { |
703 | NULL); | 708 | ret = request_irq(MX2x_INT_DMACH0 + channel, |
704 | if (ret) { | 709 | dma_irq_handler, 0, "DMA", NULL); |
705 | imxdma->name = NULL; | 710 | if (ret) { |
706 | printk(KERN_CRIT "Can't register IRQ %d for DMA channel %d\n", | 711 | imxdma->name = NULL; |
707 | MXC_INT_DMACH0 + channel, channel); | 712 | pr_crit("Can't register IRQ %d for DMA channel %d\n", |
708 | return ret; | 713 | MX2x_INT_DMACH0 + channel, channel); |
714 | return ret; | ||
715 | } | ||
716 | init_timer(&imxdma->watchdog); | ||
717 | imxdma->watchdog.function = &imx_dma_watchdog; | ||
718 | imxdma->watchdog.data = channel; | ||
709 | } | 719 | } |
710 | init_timer(&imxdma->watchdog); | ||
711 | imxdma->watchdog.function = &imx_dma_watchdog; | ||
712 | imxdma->watchdog.data = channel; | ||
713 | #endif | 720 | #endif |
714 | 721 | ||
715 | return ret; | 722 | return ret; |
@@ -738,7 +745,8 @@ void imx_dma_free(int channel) | |||
738 | imxdma->name = NULL; | 745 | imxdma->name = NULL; |
739 | 746 | ||
740 | #ifdef CONFIG_ARCH_MX2 | 747 | #ifdef CONFIG_ARCH_MX2 |
741 | free_irq(MXC_INT_DMACH0 + channel, NULL); | 748 | if (cpu_is_mx21() || cpu_is_mx27()) |
749 | free_irq(MX2x_INT_DMACH0 + channel, NULL); | ||
742 | #endif | 750 | #endif |
743 | 751 | ||
744 | local_irq_restore(flags); | 752 | local_irq_restore(flags); |
@@ -796,34 +804,53 @@ static int __init imx_dma_init(void) | |||
796 | int ret = 0; | 804 | int ret = 0; |
797 | int i; | 805 | int i; |
798 | 806 | ||
807 | #ifdef CONFIG_ARCH_MX1 | ||
808 | if (cpu_is_mx1()) | ||
809 | imx_dmav1_baseaddr = MX1_IO_ADDRESS(MX1_DMA_BASE_ADDR); | ||
810 | else | ||
811 | #endif | ||
812 | #ifdef CONFIG_MACH_MX21 | ||
813 | if (cpu_is_mx21()) | ||
814 | imx_dmav1_baseaddr = MX21_IO_ADDRESS(MX21_DMA_BASE_ADDR); | ||
815 | else | ||
816 | #endif | ||
817 | #ifdef CONFIG_MACH_MX27 | ||
818 | if (cpu_is_mx27()) | ||
819 | imx_dmav1_baseaddr = MX27_IO_ADDRESS(MX27_DMA_BASE_ADDR); | ||
820 | else | ||
821 | #endif | ||
822 | BUG(); | ||
823 | |||
799 | dma_clk = clk_get(NULL, "dma"); | 824 | dma_clk = clk_get(NULL, "dma"); |
800 | clk_enable(dma_clk); | 825 | clk_enable(dma_clk); |
801 | 826 | ||
802 | /* reset DMA module */ | 827 | /* reset DMA module */ |
803 | __raw_writel(DCR_DRST, DMA_BASE + DMA_DCR); | 828 | imx_dmav1_writel(DCR_DRST, DMA_DCR); |
804 | 829 | ||
805 | #ifdef CONFIG_ARCH_MX1 | 830 | #ifdef CONFIG_ARCH_MX1 |
806 | ret = request_irq(DMA_INT, dma_irq_handler, 0, "DMA", NULL); | 831 | if (cpu_is_mx1()) { |
807 | if (ret) { | 832 | ret = request_irq(MX1_DMA_INT, dma_irq_handler, 0, "DMA", NULL); |
808 | printk(KERN_CRIT "Wow! Can't register IRQ for DMA\n"); | 833 | if (ret) { |
809 | return ret; | 834 | pr_crit("Wow! Can't register IRQ for DMA\n"); |
810 | } | 835 | return ret; |
836 | } | ||
811 | 837 | ||
812 | ret = request_irq(DMA_ERR, dma_err_handler, 0, "DMA", NULL); | 838 | ret = request_irq(MX1_DMA_ERR, dma_err_handler, 0, "DMA", NULL); |
813 | if (ret) { | 839 | if (ret) { |
814 | printk(KERN_CRIT "Wow! Can't register ERRIRQ for DMA\n"); | 840 | pr_crit("Wow! Can't register ERRIRQ for DMA\n"); |
815 | free_irq(DMA_INT, NULL); | 841 | free_irq(MX1_DMA_INT, NULL); |
816 | return ret; | 842 | return ret; |
843 | } | ||
817 | } | 844 | } |
818 | #endif | 845 | #endif |
819 | /* enable DMA module */ | 846 | /* enable DMA module */ |
820 | __raw_writel(DCR_DEN, DMA_BASE + DMA_DCR); | 847 | imx_dmav1_writel(DCR_DEN, DMA_DCR); |
821 | 848 | ||
822 | /* clear all interrupts */ | 849 | /* clear all interrupts */ |
823 | __raw_writel((1 << IMX_DMA_CHANNELS) - 1, DMA_BASE + DMA_DISR); | 850 | imx_dmav1_writel((1 << IMX_DMA_CHANNELS) - 1, DMA_DISR); |
824 | 851 | ||
825 | /* disable interrupts */ | 852 | /* disable interrupts */ |
826 | __raw_writel((1 << IMX_DMA_CHANNELS) - 1, DMA_BASE + DMA_DIMR); | 853 | imx_dmav1_writel((1 << IMX_DMA_CHANNELS) - 1, DMA_DIMR); |
827 | 854 | ||
828 | for (i = 0; i < IMX_DMA_CHANNELS; i++) { | 855 | for (i = 0; i < IMX_DMA_CHANNELS; i++) { |
829 | imx_dma_channels[i].sg = NULL; | 856 | imx_dma_channels[i].sg = NULL; |
diff --git a/arch/arm/plat-mxc/ehci.c b/arch/arm/plat-mxc/ehci.c index 41599be882e8..cb0b63874482 100644 --- a/arch/arm/plat-mxc/ehci.c +++ b/arch/arm/plat-mxc/ehci.c | |||
@@ -25,25 +25,37 @@ | |||
25 | #define USBCTRL_OTGBASE_OFFSET 0x600 | 25 | #define USBCTRL_OTGBASE_OFFSET 0x600 |
26 | 26 | ||
27 | #define MX31_OTG_SIC_SHIFT 29 | 27 | #define MX31_OTG_SIC_SHIFT 29 |
28 | #define MX31_OTG_SIC_MASK (0xf << MX31_OTG_SIC_SHIFT) | 28 | #define MX31_OTG_SIC_MASK (0x3 << MX31_OTG_SIC_SHIFT) |
29 | #define MX31_OTG_PM_BIT (1 << 24) | 29 | #define MX31_OTG_PM_BIT (1 << 24) |
30 | 30 | ||
31 | #define MX31_H2_SIC_SHIFT 21 | 31 | #define MX31_H2_SIC_SHIFT 21 |
32 | #define MX31_H2_SIC_MASK (0xf << MX31_H2_SIC_SHIFT) | 32 | #define MX31_H2_SIC_MASK (0x3 << MX31_H2_SIC_SHIFT) |
33 | #define MX31_H2_PM_BIT (1 << 16) | 33 | #define MX31_H2_PM_BIT (1 << 16) |
34 | #define MX31_H2_DT_BIT (1 << 5) | 34 | #define MX31_H2_DT_BIT (1 << 5) |
35 | 35 | ||
36 | #define MX31_H1_SIC_SHIFT 13 | 36 | #define MX31_H1_SIC_SHIFT 13 |
37 | #define MX31_H1_SIC_MASK (0xf << MX31_H1_SIC_SHIFT) | 37 | #define MX31_H1_SIC_MASK (0x3 << MX31_H1_SIC_SHIFT) |
38 | #define MX31_H1_PM_BIT (1 << 8) | 38 | #define MX31_H1_PM_BIT (1 << 8) |
39 | #define MX31_H1_DT_BIT (1 << 4) | 39 | #define MX31_H1_DT_BIT (1 << 4) |
40 | 40 | ||
41 | #define MX35_OTG_SIC_SHIFT 29 | ||
42 | #define MX35_OTG_SIC_MASK (0x3 << MX35_OTG_SIC_SHIFT) | ||
43 | #define MX35_OTG_PM_BIT (1 << 24) | ||
44 | |||
45 | #define MX35_H1_SIC_SHIFT 21 | ||
46 | #define MX35_H1_SIC_MASK (0x3 << MX35_H1_SIC_SHIFT) | ||
47 | #define MX35_H1_PM_BIT (1 << 8) | ||
48 | #define MX35_H1_IPPUE_UP_BIT (1 << 7) | ||
49 | #define MX35_H1_IPPUE_DOWN_BIT (1 << 6) | ||
50 | #define MX35_H1_TLL_BIT (1 << 5) | ||
51 | #define MX35_H1_USBTE_BIT (1 << 4) | ||
52 | |||
41 | int mxc_set_usbcontrol(int port, unsigned int flags) | 53 | int mxc_set_usbcontrol(int port, unsigned int flags) |
42 | { | 54 | { |
43 | unsigned int v; | 55 | unsigned int v; |
44 | 56 | #ifdef CONFIG_ARCH_MX3 | |
45 | if (cpu_is_mx31()) { | 57 | if (cpu_is_mx31()) { |
46 | v = readl(IO_ADDRESS(MX31_OTG_BASE_ADDR + | 58 | v = readl(MX31_IO_ADDRESS(MX31_OTG_BASE_ADDR + |
47 | USBCTRL_OTGBASE_OFFSET)); | 59 | USBCTRL_OTGBASE_OFFSET)); |
48 | 60 | ||
49 | switch (port) { | 61 | switch (port) { |
@@ -51,15 +63,15 @@ int mxc_set_usbcontrol(int port, unsigned int flags) | |||
51 | v &= ~(MX31_OTG_SIC_MASK | MX31_OTG_PM_BIT); | 63 | v &= ~(MX31_OTG_SIC_MASK | MX31_OTG_PM_BIT); |
52 | v |= (flags & MXC_EHCI_INTERFACE_MASK) | 64 | v |= (flags & MXC_EHCI_INTERFACE_MASK) |
53 | << MX31_OTG_SIC_SHIFT; | 65 | << MX31_OTG_SIC_SHIFT; |
54 | if (flags & MXC_EHCI_POWER_PINS_ENABLED) | 66 | if (!(flags & MXC_EHCI_POWER_PINS_ENABLED)) |
55 | v |= MX31_OTG_PM_BIT; | 67 | v |= MX31_OTG_PM_BIT; |
56 | 68 | ||
57 | break; | 69 | break; |
58 | case 1: /* H1 port */ | 70 | case 1: /* H1 port */ |
59 | v &= ~(MX31_H1_SIC_MASK | MX31_H1_PM_BIT); | 71 | v &= ~(MX31_H1_SIC_MASK | MX31_H1_PM_BIT | MX31_H1_DT_BIT); |
60 | v |= (flags & MXC_EHCI_INTERFACE_MASK) | 72 | v |= (flags & MXC_EHCI_INTERFACE_MASK) |
61 | << MX31_H1_SIC_SHIFT; | 73 | << MX31_H1_SIC_SHIFT; |
62 | if (flags & MXC_EHCI_POWER_PINS_ENABLED) | 74 | if (!(flags & MXC_EHCI_POWER_PINS_ENABLED)) |
63 | v |= MX31_H1_PM_BIT; | 75 | v |= MX31_H1_PM_BIT; |
64 | 76 | ||
65 | if (!(flags & MXC_EHCI_TTL_ENABLED)) | 77 | if (!(flags & MXC_EHCI_TTL_ENABLED)) |
@@ -67,7 +79,7 @@ int mxc_set_usbcontrol(int port, unsigned int flags) | |||
67 | 79 | ||
68 | break; | 80 | break; |
69 | case 2: /* H2 port */ | 81 | case 2: /* H2 port */ |
70 | v &= ~(MX31_H2_SIC_MASK | MX31_H2_PM_BIT); | 82 | v &= ~(MX31_H2_SIC_MASK | MX31_H2_PM_BIT | MX31_H2_DT_BIT); |
71 | v |= (flags & MXC_EHCI_INTERFACE_MASK) | 83 | v |= (flags & MXC_EHCI_INTERFACE_MASK) |
72 | << MX31_H2_SIC_SHIFT; | 84 | << MX31_H2_SIC_SHIFT; |
73 | if (!(flags & MXC_EHCI_POWER_PINS_ENABLED)) | 85 | if (!(flags & MXC_EHCI_POWER_PINS_ENABLED)) |
@@ -77,13 +89,103 @@ int mxc_set_usbcontrol(int port, unsigned int flags) | |||
77 | v |= MX31_H2_DT_BIT; | 89 | v |= MX31_H2_DT_BIT; |
78 | 90 | ||
79 | break; | 91 | break; |
92 | default: | ||
93 | return -EINVAL; | ||
80 | } | 94 | } |
81 | 95 | ||
82 | writel(v, IO_ADDRESS(MX31_OTG_BASE_ADDR + | 96 | writel(v, MX31_IO_ADDRESS(MX31_OTG_BASE_ADDR + |
83 | USBCTRL_OTGBASE_OFFSET)); | 97 | USBCTRL_OTGBASE_OFFSET)); |
84 | return 0; | 98 | return 0; |
85 | } | 99 | } |
86 | 100 | ||
101 | if (cpu_is_mx35()) { | ||
102 | v = readl(MX35_IO_ADDRESS(MX35_OTG_BASE_ADDR + | ||
103 | USBCTRL_OTGBASE_OFFSET)); | ||
104 | |||
105 | switch (port) { | ||
106 | case 0: /* OTG port */ | ||
107 | v &= ~(MX35_OTG_SIC_MASK | MX35_OTG_PM_BIT); | ||
108 | v |= (flags & MXC_EHCI_INTERFACE_MASK) | ||
109 | << MX35_OTG_SIC_SHIFT; | ||
110 | if (!(flags & MXC_EHCI_POWER_PINS_ENABLED)) | ||
111 | v |= MX35_OTG_PM_BIT; | ||
112 | |||
113 | break; | ||
114 | case 1: /* H1 port */ | ||
115 | v &= ~(MX35_H1_SIC_MASK | MX35_H1_PM_BIT | MX35_H1_TLL_BIT | | ||
116 | MX35_H1_USBTE_BIT | MX35_H1_IPPUE_DOWN_BIT | MX35_H1_IPPUE_UP_BIT); | ||
117 | v |= (flags & MXC_EHCI_INTERFACE_MASK) | ||
118 | << MX35_H1_SIC_SHIFT; | ||
119 | if (!(flags & MXC_EHCI_POWER_PINS_ENABLED)) | ||
120 | v |= MX35_H1_PM_BIT; | ||
121 | |||
122 | if (!(flags & MXC_EHCI_TTL_ENABLED)) | ||
123 | v |= MX35_H1_TLL_BIT; | ||
124 | |||
125 | if (flags & MXC_EHCI_INTERNAL_PHY) | ||
126 | v |= MX35_H1_USBTE_BIT; | ||
127 | |||
128 | if (flags & MXC_EHCI_IPPUE_DOWN) | ||
129 | v |= MX35_H1_IPPUE_DOWN_BIT; | ||
130 | |||
131 | if (flags & MXC_EHCI_IPPUE_UP) | ||
132 | v |= MX35_H1_IPPUE_UP_BIT; | ||
133 | |||
134 | break; | ||
135 | default: | ||
136 | return -EINVAL; | ||
137 | } | ||
138 | |||
139 | writel(v, MX35_IO_ADDRESS(MX35_OTG_BASE_ADDR + | ||
140 | USBCTRL_OTGBASE_OFFSET)); | ||
141 | return 0; | ||
142 | } | ||
143 | #endif /* CONFIG_ARCH_MX3 */ | ||
144 | #ifdef CONFIG_MACH_MX27 | ||
145 | if (cpu_is_mx27()) { | ||
146 | /* On i.MX27 we can use the i.MX31 USBCTRL bits, they | ||
147 | * are identical | ||
148 | */ | ||
149 | v = readl(MX27_IO_ADDRESS(MX27_OTG_BASE_ADDR + | ||
150 | USBCTRL_OTGBASE_OFFSET)); | ||
151 | switch (port) { | ||
152 | case 0: /* OTG port */ | ||
153 | v &= ~(MX31_OTG_SIC_MASK | MX31_OTG_PM_BIT); | ||
154 | v |= (flags & MXC_EHCI_INTERFACE_MASK) | ||
155 | << MX31_OTG_SIC_SHIFT; | ||
156 | if (!(flags & MXC_EHCI_POWER_PINS_ENABLED)) | ||
157 | v |= MX31_OTG_PM_BIT; | ||
158 | break; | ||
159 | case 1: /* H1 port */ | ||
160 | v &= ~(MX31_H1_SIC_MASK | MX31_H1_PM_BIT | MX31_H1_DT_BIT); | ||
161 | v |= (flags & MXC_EHCI_INTERFACE_MASK) | ||
162 | << MX31_H1_SIC_SHIFT; | ||
163 | if (!(flags & MXC_EHCI_POWER_PINS_ENABLED)) | ||
164 | v |= MX31_H1_PM_BIT; | ||
165 | |||
166 | if (!(flags & MXC_EHCI_TTL_ENABLED)) | ||
167 | v |= MX31_H1_DT_BIT; | ||
168 | |||
169 | break; | ||
170 | case 2: /* H2 port */ | ||
171 | v &= ~(MX31_H2_SIC_MASK | MX31_H2_PM_BIT | MX31_H2_DT_BIT); | ||
172 | v |= (flags & MXC_EHCI_INTERFACE_MASK) | ||
173 | << MX31_H2_SIC_SHIFT; | ||
174 | if (!(flags & MXC_EHCI_POWER_PINS_ENABLED)) | ||
175 | v |= MX31_H2_PM_BIT; | ||
176 | |||
177 | if (!(flags & MXC_EHCI_TTL_ENABLED)) | ||
178 | v |= MX31_H2_DT_BIT; | ||
179 | |||
180 | break; | ||
181 | default: | ||
182 | return -EINVAL; | ||
183 | } | ||
184 | writel(v, MX27_IO_ADDRESS(MX27_OTG_BASE_ADDR + | ||
185 | USBCTRL_OTGBASE_OFFSET)); | ||
186 | return 0; | ||
187 | } | ||
188 | #endif /* CONFIG_MACH_MX27 */ | ||
87 | printk(KERN_WARNING | 189 | printk(KERN_WARNING |
88 | "%s() unable to setup USBCONTROL for this CPU\n", __func__); | 190 | "%s() unable to setup USBCONTROL for this CPU\n", __func__); |
89 | return -EINVAL; | 191 | return -EINVAL; |
diff --git a/arch/arm/plat-mxc/gpio.c b/arch/arm/plat-mxc/gpio.c index d65ebe303b9f..70b23893f094 100644 --- a/arch/arm/plat-mxc/gpio.c +++ b/arch/arm/plat-mxc/gpio.c | |||
@@ -140,16 +140,13 @@ static void mxc_flip_edge(struct mxc_gpio_port *port, u32 gpio) | |||
140 | val = __raw_readl(reg); | 140 | val = __raw_readl(reg); |
141 | edge = (val >> (bit << 1)) & 3; | 141 | edge = (val >> (bit << 1)) & 3; |
142 | val &= ~(0x3 << (bit << 1)); | 142 | val &= ~(0x3 << (bit << 1)); |
143 | switch (edge) { | 143 | if (edge == GPIO_INT_HIGH_LEV) { |
144 | case GPIO_INT_HIGH_LEV: | ||
145 | edge = GPIO_INT_LOW_LEV; | 144 | edge = GPIO_INT_LOW_LEV; |
146 | pr_debug("mxc: switch GPIO %d to low trigger\n", gpio); | 145 | pr_debug("mxc: switch GPIO %d to low trigger\n", gpio); |
147 | break; | 146 | } else if (edge == GPIO_INT_LOW_LEV) { |
148 | case GPIO_INT_LOW_LEV: | ||
149 | edge = GPIO_INT_HIGH_LEV; | 147 | edge = GPIO_INT_HIGH_LEV; |
150 | pr_debug("mxc: switch GPIO %d to high trigger\n", gpio); | 148 | pr_debug("mxc: switch GPIO %d to high trigger\n", gpio); |
151 | break; | 149 | } else { |
152 | default: | ||
153 | pr_err("mxc: invalid configuration for GPIO %d: %x\n", | 150 | pr_err("mxc: invalid configuration for GPIO %d: %x\n", |
154 | gpio, edge); | 151 | gpio, edge); |
155 | return; | 152 | return; |
@@ -157,25 +154,20 @@ static void mxc_flip_edge(struct mxc_gpio_port *port, u32 gpio) | |||
157 | __raw_writel(val | (edge << (bit << 1)), reg); | 154 | __raw_writel(val | (edge << (bit << 1)), reg); |
158 | } | 155 | } |
159 | 156 | ||
160 | /* handle n interrupts in one status register */ | 157 | /* handle 32 interrupts in one status register */ |
161 | static void mxc_gpio_irq_handler(struct mxc_gpio_port *port, u32 irq_stat) | 158 | static void mxc_gpio_irq_handler(struct mxc_gpio_port *port, u32 irq_stat) |
162 | { | 159 | { |
163 | u32 gpio_irq_no; | 160 | u32 gpio_irq_no_base = port->virtual_irq_start; |
164 | 161 | ||
165 | gpio_irq_no = port->virtual_irq_start; | 162 | while (irq_stat != 0) { |
166 | for (; irq_stat != 0; irq_stat >>= 1, gpio_irq_no++) { | 163 | int irqoffset = fls(irq_stat) - 1; |
167 | u32 gpio = irq_to_gpio(gpio_irq_no); | ||
168 | |||
169 | if ((irq_stat & 1) == 0) | ||
170 | continue; | ||
171 | 164 | ||
172 | BUG_ON(!(irq_desc[gpio_irq_no].handle_irq)); | 165 | if (port->both_edges & (1 << irqoffset)) |
166 | mxc_flip_edge(port, irqoffset); | ||
173 | 167 | ||
174 | if (port->both_edges & (1 << (gpio & 31))) | 168 | generic_handle_irq(gpio_irq_no_base + irqoffset); |
175 | mxc_flip_edge(port, gpio); | ||
176 | 169 | ||
177 | irq_desc[gpio_irq_no].handle_irq(gpio_irq_no, | 170 | irq_stat &= ~(1 << irqoffset); |
178 | &irq_desc[gpio_irq_no]); | ||
179 | } | 171 | } |
180 | } | 172 | } |
181 | 173 | ||
diff --git a/arch/arm/plat-mxc/include/mach/board-kzmarm11.h b/arch/arm/plat-mxc/include/mach/board-kzmarm11.h index 05ff2f31ef1f..93cc66f104c7 100644 --- a/arch/arm/plat-mxc/include/mach/board-kzmarm11.h +++ b/arch/arm/plat-mxc/include/mach/board-kzmarm11.h | |||
@@ -21,19 +21,19 @@ | |||
21 | /* | 21 | /* |
22 | * KZM-ARM11-01 Board Control Registers on FPGA | 22 | * KZM-ARM11-01 Board Control Registers on FPGA |
23 | */ | 23 | */ |
24 | #define KZM_ARM11_CTL1 (CS4_BASE_ADDR + 0x1000) | 24 | #define KZM_ARM11_CTL1 (MX31_CS4_BASE_ADDR + 0x1000) |
25 | #define KZM_ARM11_CTL2 (CS4_BASE_ADDR + 0x1001) | 25 | #define KZM_ARM11_CTL2 (MX31_CS4_BASE_ADDR + 0x1001) |
26 | #define KZM_ARM11_RSW1 (CS4_BASE_ADDR + 0x1002) | 26 | #define KZM_ARM11_RSW1 (MX31_CS4_BASE_ADDR + 0x1002) |
27 | #define KZM_ARM11_BACK_LIGHT (CS4_BASE_ADDR + 0x1004) | 27 | #define KZM_ARM11_BACK_LIGHT (MX31_CS4_BASE_ADDR + 0x1004) |
28 | #define KZM_ARM11_FPGA_REV (CS4_BASE_ADDR + 0x1008) | 28 | #define KZM_ARM11_FPGA_REV (MX31_CS4_BASE_ADDR + 0x1008) |
29 | #define KZM_ARM11_7SEG_LED (CS4_BASE_ADDR + 0x1010) | 29 | #define KZM_ARM11_7SEG_LED (MX31_CS4_BASE_ADDR + 0x1010) |
30 | #define KZM_ARM11_LEDS (CS4_BASE_ADDR + 0x1020) | 30 | #define KZM_ARM11_LEDS (MX31_CS4_BASE_ADDR + 0x1020) |
31 | #define KZM_ARM11_DIPSW2 (CS4_BASE_ADDR + 0x1003) | 31 | #define KZM_ARM11_DIPSW2 (MX31_CS4_BASE_ADDR + 0x1003) |
32 | 32 | ||
33 | /* | 33 | /* |
34 | * External UART for touch panel on FPGA | 34 | * External UART for touch panel on FPGA |
35 | */ | 35 | */ |
36 | #define KZM_ARM11_16550 (CS4_BASE_ADDR + 0x1050) | 36 | #define KZM_ARM11_16550 (MX31_CS4_BASE_ADDR + 0x1050) |
37 | 37 | ||
38 | #endif /* __ARM_ARCH_BOARD_KZM_ARM11_H */ | 38 | #endif /* __ARM_ARCH_BOARD_KZM_ARM11_H */ |
39 | 39 | ||
diff --git a/arch/arm/plat-mxc/include/mach/board-mx31ads.h b/arch/arm/plat-mxc/include/mach/board-mx31ads.h index 2cbfa35e82ff..095a199591c6 100644 --- a/arch/arm/plat-mxc/include/mach/board-mx31ads.h +++ b/arch/arm/plat-mxc/include/mach/board-mx31ads.h | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <mach/hardware.h> | 14 | #include <mach/hardware.h> |
15 | 15 | ||
16 | /* Base address of PBC controller */ | 16 | /* Base address of PBC controller */ |
17 | #define PBC_BASE_ADDRESS IO_ADDRESS(CS4_BASE_ADDR) | 17 | #define PBC_BASE_ADDRESS MX31_CS4_BASE_ADDR_VIRT |
18 | /* Offsets for the PBC Controller register */ | 18 | /* Offsets for the PBC Controller register */ |
19 | 19 | ||
20 | /* PBC Board status register offset */ | 20 | /* PBC Board status register offset */ |
diff --git a/arch/arm/plat-mxc/include/mach/board-mx31moboard.h b/arch/arm/plat-mxc/include/mach/board-mx31moboard.h index d5be6b5a6acf..fc5fec9b55f0 100644 --- a/arch/arm/plat-mxc/include/mach/board-mx31moboard.h +++ b/arch/arm/plat-mxc/include/mach/board-mx31moboard.h | |||
@@ -25,6 +25,7 @@ enum mx31moboard_boards { | |||
25 | MX31NOBOARD = 0, | 25 | MX31NOBOARD = 0, |
26 | MX31DEVBOARD = 1, | 26 | MX31DEVBOARD = 1, |
27 | MX31MARXBOT = 2, | 27 | MX31MARXBOT = 2, |
28 | MX31SMARTBOT = 3, | ||
28 | }; | 29 | }; |
29 | 30 | ||
30 | /* | 31 | /* |
@@ -34,6 +35,7 @@ enum mx31moboard_boards { | |||
34 | 35 | ||
35 | extern void mx31moboard_devboard_init(void); | 36 | extern void mx31moboard_devboard_init(void); |
36 | extern void mx31moboard_marxbot_init(void); | 37 | extern void mx31moboard_marxbot_init(void); |
38 | extern void mx31moboard_smartbot_init(void); | ||
37 | 39 | ||
38 | #endif | 40 | #endif |
39 | 41 | ||
diff --git a/arch/arm/plat-mxc/include/mach/clock.h b/arch/arm/plat-mxc/include/mach/clock.h index 43a82d0c534d..753a5988d85c 100644 --- a/arch/arm/plat-mxc/include/mach/clock.h +++ b/arch/arm/plat-mxc/include/mach/clock.h | |||
@@ -26,13 +26,6 @@ | |||
26 | struct module; | 26 | struct module; |
27 | 27 | ||
28 | struct clk { | 28 | struct clk { |
29 | #ifndef CONFIG_COMMON_CLKDEV | ||
30 | /* As soon as i.MX1 and i.MX31 switched to clkdev, this | ||
31 | * block can go away */ | ||
32 | struct list_head node; | ||
33 | struct module *owner; | ||
34 | const char *name; | ||
35 | #endif | ||
36 | int id; | 29 | int id; |
37 | /* Source clock this clk depends on */ | 30 | /* Source clock this clk depends on */ |
38 | struct clk *parent; | 31 | struct clk *parent; |
diff --git a/arch/arm/plat-mxc/include/mach/common.h b/arch/arm/plat-mxc/include/mach/common.h index 4bf1068ffad9..2941472582d2 100644 --- a/arch/arm/plat-mxc/include/mach/common.h +++ b/arch/arm/plat-mxc/include/mach/common.h | |||
@@ -20,14 +20,17 @@ extern void mx25_map_io(void); | |||
20 | extern void mx27_map_io(void); | 20 | extern void mx27_map_io(void); |
21 | extern void mx31_map_io(void); | 21 | extern void mx31_map_io(void); |
22 | extern void mx35_map_io(void); | 22 | extern void mx35_map_io(void); |
23 | extern void mx51_map_io(void); | ||
23 | extern void mxc91231_map_io(void); | 24 | extern void mxc91231_map_io(void); |
24 | extern void mxc_init_irq(void __iomem *); | 25 | extern void mxc_init_irq(void __iomem *); |
26 | extern void tzic_init_irq(void __iomem *); | ||
25 | extern void mx1_init_irq(void); | 27 | extern void mx1_init_irq(void); |
26 | extern void mx21_init_irq(void); | 28 | extern void mx21_init_irq(void); |
27 | extern void mx25_init_irq(void); | 29 | extern void mx25_init_irq(void); |
28 | extern void mx27_init_irq(void); | 30 | extern void mx27_init_irq(void); |
29 | extern void mx31_init_irq(void); | 31 | extern void mx31_init_irq(void); |
30 | extern void mx35_init_irq(void); | 32 | extern void mx35_init_irq(void); |
33 | extern void mx51_init_irq(void); | ||
31 | extern void mxc91231_init_irq(void); | 34 | extern void mxc91231_init_irq(void); |
32 | extern void mxc_timer_init(struct clk *timer_clk, void __iomem *, int); | 35 | extern void mxc_timer_init(struct clk *timer_clk, void __iomem *, int); |
33 | extern int mx1_clocks_init(unsigned long fref); | 36 | extern int mx1_clocks_init(unsigned long fref); |
@@ -36,6 +39,8 @@ extern int mx25_clocks_init(void); | |||
36 | extern int mx27_clocks_init(unsigned long fref); | 39 | extern int mx27_clocks_init(unsigned long fref); |
37 | extern int mx31_clocks_init(unsigned long fref); | 40 | extern int mx31_clocks_init(unsigned long fref); |
38 | extern int mx35_clocks_init(void); | 41 | extern int mx35_clocks_init(void); |
42 | extern int mx51_clocks_init(unsigned long ckil, unsigned long osc, | ||
43 | unsigned long ckih1, unsigned long ckih2); | ||
39 | extern int mxc91231_clocks_init(unsigned long fref); | 44 | extern int mxc91231_clocks_init(unsigned long fref); |
40 | extern int mxc_register_gpios(void); | 45 | extern int mxc_register_gpios(void); |
41 | extern int mxc_register_device(struct platform_device *pdev, void *data); | 46 | extern int mxc_register_device(struct platform_device *pdev, void *data); |
diff --git a/arch/arm/plat-mxc/include/mach/debug-macro.S b/arch/arm/plat-mxc/include/mach/debug-macro.S index 15b2b148a105..133d66bfb533 100644 --- a/arch/arm/plat-mxc/include/mach/debug-macro.S +++ b/arch/arm/plat-mxc/include/mach/debug-macro.S | |||
@@ -10,6 +10,7 @@ | |||
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | #define IMX_NEEDS_DEPRECATED_SYMBOLS | ||
13 | 14 | ||
14 | #ifdef CONFIG_ARCH_MX1 | 15 | #ifdef CONFIG_ARCH_MX1 |
15 | #include <mach/mx1.h> | 16 | #include <mach/mx1.h> |
@@ -44,13 +45,22 @@ | |||
44 | #define UART_VADDR AIPS1_IO_ADDRESS(UART1_BASE_ADDR) | 45 | #define UART_VADDR AIPS1_IO_ADDRESS(UART1_BASE_ADDR) |
45 | #endif | 46 | #endif |
46 | 47 | ||
48 | #ifdef CONFIG_ARCH_MX5 | ||
49 | #ifdef UART_PADDR | ||
50 | #error "CONFIG_DEBUG_LL is incompatible with multiple archs" | ||
51 | #endif | ||
52 | #include <mach/mx51.h> | ||
53 | #define UART_PADDR MX51_UART1_BASE_ADDR | ||
54 | #define UART_VADDR MX51_AIPS1_IO_ADDRESS(MX51_UART1_BASE_ADDR) | ||
55 | #endif | ||
56 | |||
47 | #ifdef CONFIG_ARCH_MXC91231 | 57 | #ifdef CONFIG_ARCH_MXC91231 |
48 | #ifdef UART_PADDR | 58 | #ifdef UART_PADDR |
49 | #error "CONFIG_DEBUG_LL is incompatible with multiple archs" | 59 | #error "CONFIG_DEBUG_LL is incompatible with multiple archs" |
50 | #endif | 60 | #endif |
51 | #include <mach/mxc91231.h> | 61 | #include <mach/mxc91231.h> |
52 | #define UART_PADDR MXC91231_UART2_BASE_ADDR | 62 | #define UART_PADDR MXC91231_UART2_BASE_ADDR |
53 | #define UART_VADDR MXC91231_AIPS1_IO_ADDRESS(MXC91231_UART2_BASE_ADDR) | 63 | #define UART_VADDR MXC91231_IO_ADDRESS(MXC91231_UART2_BASE_ADDR) |
54 | #endif | 64 | #endif |
55 | .macro addruart,rx | 65 | .macro addruart,rx |
56 | mrc p15, 0, \rx, c1, c0 | 66 | mrc p15, 0, \rx, c1, c0 |
diff --git a/arch/arm/plat-mxc/include/mach/entry-macro.S b/arch/arm/plat-mxc/include/mach/entry-macro.S index 7cf290efe768..aeb08697726b 100644 --- a/arch/arm/plat-mxc/include/mach/entry-macro.S +++ b/arch/arm/plat-mxc/include/mach/entry-macro.S | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2007 Lennert Buytenhek <buytenh@wantstofly.org> | 2 | * Copyright (C) 2007 Lennert Buytenhek <buytenh@wantstofly.org> |
3 | * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. | 3 | * Copyright 2004-2009 Freescale Semiconductor, Inc. All Rights Reserved. |
4 | */ | 4 | */ |
5 | 5 | ||
6 | /* | 6 | /* |
@@ -18,11 +18,16 @@ | |||
18 | .endm | 18 | .endm |
19 | 19 | ||
20 | .macro get_irqnr_preamble, base, tmp | 20 | .macro get_irqnr_preamble, base, tmp |
21 | #ifndef CONFIG_MXC_TZIC | ||
21 | ldr \base, =avic_base | 22 | ldr \base, =avic_base |
22 | ldr \base, [\base] | 23 | ldr \base, [\base] |
23 | #ifdef CONFIG_MXC_IRQ_PRIOR | 24 | #ifdef CONFIG_MXC_IRQ_PRIOR |
24 | ldr r4, [\base, #AVIC_NIMASK] | 25 | ldr r4, [\base, #AVIC_NIMASK] |
25 | #endif | 26 | #endif |
27 | #elif defined CONFIG_MXC_TZIC | ||
28 | ldr \base, =tzic_base | ||
29 | ldr \base, [\base] | ||
30 | #endif /* CONFIG_MXC_TZIC */ | ||
26 | .endm | 31 | .endm |
27 | 32 | ||
28 | .macro arch_ret_to_user, tmp1, tmp2 | 33 | .macro arch_ret_to_user, tmp1, tmp2 |
@@ -32,6 +37,7 @@ | |||
32 | @ and returns its number in irqnr | 37 | @ and returns its number in irqnr |
33 | @ and returns if an interrupt occured in irqstat | 38 | @ and returns if an interrupt occured in irqstat |
34 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 39 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
40 | #ifndef CONFIG_MXC_TZIC | ||
35 | @ Load offset & priority of the highest priority | 41 | @ Load offset & priority of the highest priority |
36 | @ interrupt pending from AVIC_NIVECSR | 42 | @ interrupt pending from AVIC_NIVECSR |
37 | ldr \irqstat, [\base, #0x40] | 43 | ldr \irqstat, [\base, #0x40] |
@@ -45,6 +51,32 @@ | |||
45 | strne \tmp, [\base, #AVIC_NIMASK] | 51 | strne \tmp, [\base, #AVIC_NIMASK] |
46 | streq r4, [\base, #AVIC_NIMASK] | 52 | streq r4, [\base, #AVIC_NIMASK] |
47 | #endif | 53 | #endif |
54 | #elif defined CONFIG_MXC_TZIC | ||
55 | @ Load offset & priority of the highest priority | ||
56 | @ interrupt pending. | ||
57 | @ 0xD80 is HIPND0 register | ||
58 | mov \irqnr, #0 | ||
59 | mov \irqstat, #0x0D80 | ||
60 | 1000: | ||
61 | ldr \tmp, [\irqstat, \base] | ||
62 | cmp \tmp, #0 | ||
63 | bne 1001f | ||
64 | addeq \irqnr, \irqnr, #32 | ||
65 | addeq \irqstat, \irqstat, #4 | ||
66 | cmp \irqnr, #128 | ||
67 | blo 1000b | ||
68 | b 2001f | ||
69 | 1001: mov \irqstat, #1 | ||
70 | 1002: tst \tmp, \irqstat | ||
71 | bne 2002f | ||
72 | movs \tmp, \tmp, lsr #1 | ||
73 | addne \irqnr, \irqnr, #1 | ||
74 | bne 1002b | ||
75 | 2001: | ||
76 | mov \irqnr, #0 | ||
77 | 2002: | ||
78 | movs \irqnr, \irqnr | ||
79 | #endif | ||
48 | .endm | 80 | .endm |
49 | 81 | ||
50 | @ irq priority table (not used) | 82 | @ irq priority table (not used) |
diff --git a/arch/arm/plat-mxc/include/mach/hardware.h b/arch/arm/plat-mxc/include/mach/hardware.h index 78db75475f69..ebadf4ac43fc 100644 --- a/arch/arm/plat-mxc/include/mach/hardware.h +++ b/arch/arm/plat-mxc/include/mach/hardware.h | |||
@@ -22,6 +22,15 @@ | |||
22 | 22 | ||
23 | #include <asm/sizes.h> | 23 | #include <asm/sizes.h> |
24 | 24 | ||
25 | #define IMX_IO_ADDRESS(addr, module) \ | ||
26 | ((void __force __iomem *) \ | ||
27 | (((unsigned long)((addr) - (module ## _BASE_ADDR)) < module ## _SIZE) ?\ | ||
28 | (addr) - (module ## _BASE_ADDR) + (module ## _BASE_ADDR_VIRT) : 0)) | ||
29 | |||
30 | #ifdef CONFIG_ARCH_MX5 | ||
31 | #include <mach/mx51.h> | ||
32 | #endif | ||
33 | |||
25 | #ifdef CONFIG_ARCH_MX3 | 34 | #ifdef CONFIG_ARCH_MX3 |
26 | #include <mach/mx3x.h> | 35 | #include <mach/mx3x.h> |
27 | #include <mach/mx31.h> | 36 | #include <mach/mx31.h> |
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx1.h b/arch/arm/plat-mxc/include/mach/iomux-mx1.h index bf23305c19cc..6b1507cf378e 100644 --- a/arch/arm/plat-mxc/include/mach/iomux-mx1.h +++ b/arch/arm/plat-mxc/include/mach/iomux-mx1.h | |||
@@ -1,166 +1,155 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2008 by Sascha Hauer <kernel@pengutronix.de> | 2 | * Copyright (C) 2008 by Sascha Hauer <kernel@pengutronix.de> |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or | 4 | * This program is free software; you can redistribute it and/or |
5 | * modify it under the terms of the GNU General Public License | 5 | * modify it under the terms of the GNU General Public License |
6 | * as published by the Free Software Foundation; either version 2 | 6 | * as published by the Free Software Foundation; either version 2 |
7 | * of the License, or (at your option) any later version. | 7 | * of the License, or (at your option) any later version. |
8 | * This program is distributed in the hope that it will be useful, | 8 | * This program is distributed in the hope that it will be useful, |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
11 | * GNU General Public License for more details. | 11 | * GNU General Public License for more details. |
12 | * | 12 | * |
13 | * You should have received a copy of the GNU General Public License | 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 | 14 | * along with this program; if not, write to the Free Software |
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | 15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
16 | * MA 02110-1301, USA. | 16 | * MA 02110-1301, USA. |
17 | */ | 17 | */ |
18 | #ifndef __MACH_IOMUX_MX1_H__ | ||
19 | #define __MACH_IOMUX_MX1_H__ | ||
18 | 20 | ||
19 | #ifndef _MXC_IOMUX_MX1_H | 21 | #include <mach/iomux-v1.h> |
20 | #define _MXC_IOMUX_MX1_H | ||
21 | 22 | ||
22 | #ifndef GPIO_PORTA | 23 | #define PA0_AIN_SPI2_CLK (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 0) |
23 | #error Please include mach/iomux.h | 24 | #define PA0_AF_ETMTRACESYNC (GPIO_PORTA | GPIO_AF | 0) |
24 | #endif | 25 | #define PA1_AOUT_SPI2_RXD (GPIO_PORTA | GPIO_AOUT | GPIO_IN | 1) |
26 | #define PA1_PF_TIN (GPIO_PORTA | GPIO_PF | 1) | ||
27 | #define PA2_PF_PWM0 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 2) | ||
28 | #define PA3_PF_CSI_MCLK (GPIO_PORTA | GPIO_PF | 3) | ||
29 | #define PA4_PF_CSI_D0 (GPIO_PORTA | GPIO_PF | 4) | ||
30 | #define PA5_PF_CSI_D1 (GPIO_PORTA | GPIO_PF | 5) | ||
31 | #define PA6_PF_CSI_D2 (GPIO_PORTA | GPIO_PF | 6) | ||
32 | #define PA7_PF_CSI_D3 (GPIO_PORTA | GPIO_PF | 7) | ||
33 | #define PA8_PF_CSI_D4 (GPIO_PORTA | GPIO_PF | 8) | ||
34 | #define PA9_PF_CSI_D5 (GPIO_PORTA | GPIO_PF | 9) | ||
35 | #define PA10_PF_CSI_D6 (GPIO_PORTA | GPIO_PF | 10) | ||
36 | #define PA11_PF_CSI_D7 (GPIO_PORTA | GPIO_PF | 11) | ||
37 | #define PA12_PF_CSI_VSYNC (GPIO_PORTA | GPIO_PF | 12) | ||
38 | #define PA13_PF_CSI_HSYNC (GPIO_PORTA | GPIO_PF | 13) | ||
39 | #define PA14_PF_CSI_PIXCLK (GPIO_PORTA | GPIO_PF | 14) | ||
40 | #define PA15_PF_I2C_SDA (GPIO_PORTA | GPIO_PF | GPIO_OUT | 15) | ||
41 | #define PA16_PF_I2C_SCL (GPIO_PORTA | GPIO_PF | GPIO_OUT | 16) | ||
42 | #define PA17_AF_ETMTRACEPKT4 (GPIO_PORTA | GPIO_AF | 17) | ||
43 | #define PA17_AIN_SPI2_SS (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 17) | ||
44 | #define PA18_AF_ETMTRACEPKT5 (GPIO_PORTA | GPIO_AF | 18) | ||
45 | #define PA19_AF_ETMTRACEPKT6 (GPIO_PORTA | GPIO_AF | 19) | ||
46 | #define PA20_AF_ETMTRACEPKT7 (GPIO_PORTA | GPIO_AF | 20) | ||
47 | #define PA21_PF_A0 (GPIO_PORTA | GPIO_PF | 21) | ||
48 | #define PA22_PF_CS4 (GPIO_PORTA | GPIO_PF | 22) | ||
49 | #define PA23_PF_CS5 (GPIO_PORTA | GPIO_PF | 23) | ||
50 | #define PA24_PF_A16 (GPIO_PORTA | GPIO_PF | 24) | ||
51 | #define PA24_AF_ETMTRACEPKT0 (GPIO_PORTA | GPIO_AF | 24) | ||
52 | #define PA25_PF_A17 (GPIO_PORTA | GPIO_PF | 25) | ||
53 | #define PA25_AF_ETMTRACEPKT1 (GPIO_PORTA | GPIO_AF | 25) | ||
54 | #define PA26_PF_A18 (GPIO_PORTA | GPIO_PF | 26) | ||
55 | #define PA26_AF_ETMTRACEPKT2 (GPIO_PORTA | GPIO_AF | 26) | ||
56 | #define PA27_PF_A19 (GPIO_PORTA | GPIO_PF | 27) | ||
57 | #define PA27_AF_ETMTRACEPKT3 (GPIO_PORTA | GPIO_AF | 27) | ||
58 | #define PA28_PF_A20 (GPIO_PORTA | GPIO_PF | 28) | ||
59 | #define PA28_AF_ETMPIPESTAT0 (GPIO_PORTA | GPIO_AF | 28) | ||
60 | #define PA29_PF_A21 (GPIO_PORTA | GPIO_PF | 29) | ||
61 | #define PA29_AF_ETMPIPESTAT1 (GPIO_PORTA | GPIO_AF | 29) | ||
62 | #define PA30_PF_A22 (GPIO_PORTA | GPIO_PF | 30) | ||
63 | #define PA30_AF_ETMPIPESTAT2 (GPIO_PORTA | GPIO_AF | 30) | ||
64 | #define PA31_PF_A23 (GPIO_PORTA | GPIO_PF | 31) | ||
65 | #define PA31_AF_ETMTRACECLK (GPIO_PORTA | GPIO_AF | 31) | ||
66 | #define PB8_PF_SD_DAT0 (GPIO_PORTB | GPIO_PF | GPIO_PUEN | 8) | ||
67 | #define PB8_AF_MS_PIO (GPIO_PORTB | GPIO_AF | 8) | ||
68 | #define PB9_PF_SD_DAT1 (GPIO_PORTB | GPIO_PF | GPIO_PUEN | 9) | ||
69 | #define PB9_AF_MS_PI1 (GPIO_PORTB | GPIO_AF | 9) | ||
70 | #define PB10_PF_SD_DAT2 (GPIO_PORTB | GPIO_PF | GPIO_PUEN | 10) | ||
71 | #define PB10_AF_MS_SCLKI (GPIO_PORTB | GPIO_AF | 10) | ||
72 | #define PB11_PF_SD_DAT3 (GPIO_PORTB | GPIO_PF | 11) | ||
73 | #define PB11_AF_MS_SDIO (GPIO_PORTB | GPIO_AF | 11) | ||
74 | #define PB12_PF_SD_CLK (GPIO_PORTB | GPIO_PF | 12) | ||
75 | #define PB12_AF_MS_SCLK0 (GPIO_PORTB | GPIO_AF | 12) | ||
76 | #define PB13_PF_SD_CMD (GPIO_PORTB | GPIO_PF | GPIO_PUEN | 13) | ||
77 | #define PB13_AF_MS_BS (GPIO_PORTB | GPIO_AF | 13) | ||
78 | #define PB14_AF_SSI_RXFS (GPIO_PORTB | GPIO_AF | 14) | ||
79 | #define PB15_AF_SSI_RXCLK (GPIO_PORTB | GPIO_AF | 15) | ||
80 | #define PB16_AF_SSI_RXDAT (GPIO_PORTB | GPIO_AF | GPIO_IN | 16) | ||
81 | #define PB17_AF_SSI_TXDAT (GPIO_PORTB | GPIO_AF | GPIO_OUT | 17) | ||
82 | #define PB18_AF_SSI_TXFS (GPIO_PORTB | GPIO_AF | 18) | ||
83 | #define PB19_AF_SSI_TXCLK (GPIO_PORTB | GPIO_AF | 19) | ||
84 | #define PB20_PF_USBD_AFE (GPIO_PORTB | GPIO_PF | 20) | ||
85 | #define PB21_PF_USBD_OE (GPIO_PORTB | GPIO_PF | 21) | ||
86 | #define PB22_PF_USBD_RCV (GPIO_PORTB | GPIO_PF | 22) | ||
87 | #define PB23_PF_USBD_SUSPND (GPIO_PORTB | GPIO_PF | 23) | ||
88 | #define PB24_PF_USBD_VP (GPIO_PORTB | GPIO_PF | 24) | ||
89 | #define PB25_PF_USBD_VM (GPIO_PORTB | GPIO_PF | 25) | ||
90 | #define PB26_PF_USBD_VPO (GPIO_PORTB | GPIO_PF | 26) | ||
91 | #define PB27_PF_USBD_VMO (GPIO_PORTB | GPIO_PF | 27) | ||
92 | #define PB28_PF_UART2_CTS (GPIO_PORTB | GPIO_PF | GPIO_OUT | 28) | ||
93 | #define PB29_PF_UART2_RTS (GPIO_PORTB | GPIO_PF | GPIO_IN | 29) | ||
94 | #define PB30_PF_UART2_TXD (GPIO_PORTB | GPIO_PF | GPIO_OUT | 30) | ||
95 | #define PB31_PF_UART2_RXD (GPIO_PORTB | GPIO_PF | GPIO_IN | 31) | ||
96 | #define PC3_PF_SSI_RXFS (GPIO_PORTC | GPIO_PF | 3) | ||
97 | #define PC4_PF_SSI_RXCLK (GPIO_PORTC | GPIO_PF | 4) | ||
98 | #define PC5_PF_SSI_RXDAT (GPIO_PORTC | GPIO_PF | GPIO_IN | 5) | ||
99 | #define PC6_PF_SSI_TXDAT (GPIO_PORTC | GPIO_PF | GPIO_OUT | 6) | ||
100 | #define PC7_PF_SSI_TXFS (GPIO_PORTC | GPIO_PF | 7) | ||
101 | #define PC8_PF_SSI_TXCLK (GPIO_PORTC | GPIO_PF | 8) | ||
102 | #define PC9_PF_UART1_CTS (GPIO_PORTC | GPIO_PF | GPIO_OUT | 9) | ||
103 | #define PC10_PF_UART1_RTS (GPIO_PORTC | GPIO_PF | GPIO_IN | 10) | ||
104 | #define PC11_PF_UART1_TXD (GPIO_PORTC | GPIO_PF | GPIO_OUT | 11) | ||
105 | #define PC12_PF_UART1_RXD (GPIO_PORTC | GPIO_PF | GPIO_IN | 12) | ||
106 | #define PC13_PF_SPI1_SPI_RDY (GPIO_PORTC | GPIO_PF | 13) | ||
107 | #define PC14_PF_SPI1_SCLK (GPIO_PORTC | GPIO_PF | 14) | ||
108 | #define PC15_PF_SPI1_SS (GPIO_PORTC | GPIO_PF | 15) | ||
109 | #define PC16_PF_SPI1_MISO (GPIO_PORTC | GPIO_PF | 16) | ||
110 | #define PC17_PF_SPI1_MOSI (GPIO_PORTC | GPIO_PF | 17) | ||
111 | #define PC24_BIN_UART3_RI (GPIO_PORTC | GPIO_BIN | GPIO_OUT | 24) | ||
112 | #define PC25_BIN_UART3_DSR (GPIO_PORTC | GPIO_BIN | GPIO_OUT | 25) | ||
113 | #define PC26_AOUT_UART3_DTR (GPIO_PORTC | GPIO_AOUT | GPIO_IN | 26) | ||
114 | #define PC27_BIN_UART3_DCD (GPIO_PORTC | GPIO_BIN | GPIO_OUT | 27) | ||
115 | #define PC28_BIN_UART3_CTS (GPIO_PORTC | GPIO_BIN | GPIO_OUT | 28) | ||
116 | #define PC29_AOUT_UART3_RTS (GPIO_PORTC | GPIO_AOUT | GPIO_IN | 29) | ||
117 | #define PC30_BIN_UART3_TX (GPIO_PORTC | GPIO_BIN | 30) | ||
118 | #define PC31_AOUT_UART3_RX (GPIO_PORTC | GPIO_AOUT | GPIO_IN | 31) | ||
119 | #define PD6_PF_LSCLK (GPIO_PORTD | GPIO_PF | GPIO_OUT | 6) | ||
120 | #define PD7_PF_REV (GPIO_PORTD | GPIO_PF | 7) | ||
121 | #define PD7_AF_UART2_DTR (GPIO_PORTD | GPIO_AF | GPIO_IN | 7) | ||
122 | #define PD7_AIN_SPI2_SCLK (GPIO_PORTD | GPIO_AIN | 7) | ||
123 | #define PD8_PF_CLS (GPIO_PORTD | GPIO_PF | 8) | ||
124 | #define PD8_AF_UART2_DCD (GPIO_PORTD | GPIO_AF | GPIO_OUT | 8) | ||
125 | #define PD8_AIN_SPI2_SS (GPIO_PORTD | GPIO_AIN | 8) | ||
126 | #define PD9_PF_PS (GPIO_PORTD | GPIO_PF | 9) | ||
127 | #define PD9_AF_UART2_RI (GPIO_PORTD | GPIO_AF | GPIO_OUT | 9) | ||
128 | #define PD9_AOUT_SPI2_RXD (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 9) | ||
129 | #define PD10_PF_SPL_SPR (GPIO_PORTD | GPIO_PF | GPIO_OUT | 10) | ||
130 | #define PD10_AF_UART2_DSR (GPIO_PORTD | GPIO_AF | GPIO_OUT | 10) | ||
131 | #define PD10_AIN_SPI2_TXD (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 10) | ||
132 | #define PD11_PF_CONTRAST (GPIO_PORTD | GPIO_PF | GPIO_OUT | 11) | ||
133 | #define PD12_PF_ACD_OE (GPIO_PORTD | GPIO_PF | GPIO_OUT | 12) | ||
134 | #define PD13_PF_LP_HSYNC (GPIO_PORTD | GPIO_PF | GPIO_OUT | 13) | ||
135 | #define PD14_PF_FLM_VSYNC (GPIO_PORTD | GPIO_PF | GPIO_OUT | 14) | ||
136 | #define PD15_PF_LD0 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 15) | ||
137 | #define PD16_PF_LD1 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 16) | ||
138 | #define PD17_PF_LD2 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 17) | ||
139 | #define PD18_PF_LD3 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 18) | ||
140 | #define PD19_PF_LD4 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 19) | ||
141 | #define PD20_PF_LD5 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 20) | ||
142 | #define PD21_PF_LD6 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 21) | ||
143 | #define PD22_PF_LD7 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 22) | ||
144 | #define PD23_PF_LD8 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 23) | ||
145 | #define PD24_PF_LD9 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 24) | ||
146 | #define PD25_PF_LD10 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 25) | ||
147 | #define PD26_PF_LD11 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 26) | ||
148 | #define PD27_PF_LD12 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 27) | ||
149 | #define PD28_PF_LD13 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 28) | ||
150 | #define PD29_PF_LD14 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 29) | ||
151 | #define PD30_PF_LD15 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 30) | ||
152 | #define PD31_PF_TMR2OUT (GPIO_PORTD | GPIO_PF | 31) | ||
153 | #define PD31_BIN_SPI2_TXD (GPIO_PORTD | GPIO_BIN | 31) | ||
25 | 154 | ||
26 | /* FIXME: This list is not completed. The correct directions are | 155 | #endif /* ifndef __MACH_IOMUX_MX1_H__ */ |
27 | * missing on some (many) pins | ||
28 | */ | ||
29 | |||
30 | |||
31 | /* Primary GPIO pin functions */ | ||
32 | |||
33 | #define PA0_AIN_SPI2_CLK (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 0) | ||
34 | #define PA0_AF_ETMTRACESYNC (GPIO_PORTA | GPIO_AF | 0) | ||
35 | #define PA1_AOUT_SPI2_RXD (GPIO_PORTA | GPIO_AOUT | GPIO_IN | 1) | ||
36 | #define PA1_PF_TIN (GPIO_PORTA | GPIO_PF | 1) | ||
37 | #define PA2_PF_PWM0 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 2) | ||
38 | #define PA3_PF_CSI_MCLK (GPIO_PORTA | GPIO_PF | 3) | ||
39 | #define PA4_PF_CSI_D0 (GPIO_PORTA | GPIO_PF | 4) | ||
40 | #define PA5_PF_CSI_D1 (GPIO_PORTA | GPIO_PF | 5) | ||
41 | #define PA6_PF_CSI_D2 (GPIO_PORTA | GPIO_PF | 6) | ||
42 | #define PA7_PF_CSI_D3 (GPIO_PORTA | GPIO_PF | 7) | ||
43 | #define PA8_PF_CSI_D4 (GPIO_PORTA | GPIO_PF | 8) | ||
44 | #define PA9_PF_CSI_D5 (GPIO_PORTA | GPIO_PF | 9) | ||
45 | #define PA10_PF_CSI_D6 (GPIO_PORTA | GPIO_PF | 10) | ||
46 | #define PA11_PF_CSI_D7 (GPIO_PORTA | GPIO_PF | 11) | ||
47 | #define PA12_PF_CSI_VSYNC (GPIO_PORTA | GPIO_PF | 12) | ||
48 | #define PA13_PF_CSI_HSYNC (GPIO_PORTA | GPIO_PF | 13) | ||
49 | #define PA14_PF_CSI_PIXCLK (GPIO_PORTA | GPIO_PF | 14) | ||
50 | #define PA15_PF_I2C_SDA (GPIO_PORTA | GPIO_PF | GPIO_OUT | 15) | ||
51 | #define PA16_PF_I2C_SCL (GPIO_PORTA | GPIO_PF | GPIO_OUT | 16) | ||
52 | #define PA17_AF_ETMTRACEPKT4 (GPIO_PORTA | GPIO_AF | 17) | ||
53 | #define PA17_AIN_SPI2_SS (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 17) | ||
54 | #define PA18_AF_ETMTRACEPKT5 (GPIO_PORTA | GPIO_AF | 18) | ||
55 | #define PA19_AF_ETMTRACEPKT6 (GPIO_PORTA | GPIO_AF | 19) | ||
56 | #define PA20_AF_ETMTRACEPKT7 (GPIO_PORTA | GPIO_AF | 20) | ||
57 | #define PA21_PF_A0 (GPIO_PORTA | GPIO_PF | 21) | ||
58 | #define PA22_PF_CS4 (GPIO_PORTA | GPIO_PF | 22) | ||
59 | #define PA23_PF_CS5 (GPIO_PORTA | GPIO_PF | 23) | ||
60 | #define PA24_PF_A16 (GPIO_PORTA | GPIO_PF | 24) | ||
61 | #define PA24_AF_ETMTRACEPKT0 (GPIO_PORTA | GPIO_AF | 24) | ||
62 | #define PA25_PF_A17 (GPIO_PORTA | GPIO_PF | 25) | ||
63 | #define PA25_AF_ETMTRACEPKT1 (GPIO_PORTA | GPIO_AF | 25) | ||
64 | #define PA26_PF_A18 (GPIO_PORTA | GPIO_PF | 26) | ||
65 | #define PA26_AF_ETMTRACEPKT2 (GPIO_PORTA | GPIO_AF | 26) | ||
66 | #define PA27_PF_A19 (GPIO_PORTA | GPIO_PF | 27) | ||
67 | #define PA27_AF_ETMTRACEPKT3 (GPIO_PORTA | GPIO_AF | 27) | ||
68 | #define PA28_PF_A20 (GPIO_PORTA | GPIO_PF | 28) | ||
69 | #define PA28_AF_ETMPIPESTAT0 (GPIO_PORTA | GPIO_AF | 28) | ||
70 | #define PA29_PF_A21 (GPIO_PORTA | GPIO_PF | 29) | ||
71 | #define PA29_AF_ETMPIPESTAT1 (GPIO_PORTA | GPIO_AF | 29) | ||
72 | #define PA30_PF_A22 (GPIO_PORTA | GPIO_PF | 30) | ||
73 | #define PA30_AF_ETMPIPESTAT2 (GPIO_PORTA | GPIO_AF | 30) | ||
74 | #define PA31_PF_A23 (GPIO_PORTA | GPIO_PF | 31) | ||
75 | #define PA31_AF_ETMTRACECLK (GPIO_PORTA | GPIO_AF | 31) | ||
76 | #define PB8_PF_SD_DAT0 (GPIO_PORTB | GPIO_PF | GPIO_PUEN | 8) | ||
77 | #define PB8_AF_MS_PIO (GPIO_PORTB | GPIO_AF | 8) | ||
78 | #define PB9_PF_SD_DAT1 (GPIO_PORTB | GPIO_PF | GPIO_PUEN | 9) | ||
79 | #define PB9_AF_MS_PI1 (GPIO_PORTB | GPIO_AF | 9) | ||
80 | #define PB10_PF_SD_DAT2 (GPIO_PORTB | GPIO_PF | GPIO_PUEN | 10) | ||
81 | #define PB10_AF_MS_SCLKI (GPIO_PORTB | GPIO_AF | 10) | ||
82 | #define PB11_PF_SD_DAT3 (GPIO_PORTB | GPIO_PF | 11) | ||
83 | #define PB11_AF_MS_SDIO (GPIO_PORTB | GPIO_AF | 11) | ||
84 | #define PB12_PF_SD_CLK (GPIO_PORTB | GPIO_PF | 12) | ||
85 | #define PB12_AF_MS_SCLK0 (GPIO_PORTB | GPIO_AF | 12) | ||
86 | #define PB13_PF_SD_CMD (GPIO_PORTB | GPIO_PF | GPIO_PUEN | 13) | ||
87 | #define PB13_AF_MS_BS (GPIO_PORTB | GPIO_AF | 13) | ||
88 | #define PB14_AF_SSI_RXFS (GPIO_PORTB | GPIO_AF | 14) | ||
89 | #define PB15_AF_SSI_RXCLK (GPIO_PORTB | GPIO_AF | 15) | ||
90 | #define PB16_AF_SSI_RXDAT (GPIO_PORTB | GPIO_AF | GPIO_IN | 16) | ||
91 | #define PB17_AF_SSI_TXDAT (GPIO_PORTB | GPIO_AF | GPIO_OUT | 17) | ||
92 | #define PB18_AF_SSI_TXFS (GPIO_PORTB | GPIO_AF | 18) | ||
93 | #define PB19_AF_SSI_TXCLK (GPIO_PORTB | GPIO_AF | 19) | ||
94 | #define PB20_PF_USBD_AFE (GPIO_PORTB | GPIO_PF | 20) | ||
95 | #define PB21_PF_USBD_OE (GPIO_PORTB | GPIO_PF | 21) | ||
96 | #define PB22_PF_USBD_RCV (GPIO_PORTB | GPIO_PF | 22) | ||
97 | #define PB23_PF_USBD_SUSPND (GPIO_PORTB | GPIO_PF | 23) | ||
98 | #define PB24_PF_USBD_VP (GPIO_PORTB | GPIO_PF | 24) | ||
99 | #define PB25_PF_USBD_VM (GPIO_PORTB | GPIO_PF | 25) | ||
100 | #define PB26_PF_USBD_VPO (GPIO_PORTB | GPIO_PF | 26) | ||
101 | #define PB27_PF_USBD_VMO (GPIO_PORTB | GPIO_PF | 27) | ||
102 | #define PB28_PF_UART2_CTS (GPIO_PORTB | GPIO_PF | GPIO_OUT | 28) | ||
103 | #define PB29_PF_UART2_RTS (GPIO_PORTB | GPIO_PF | GPIO_IN | 29) | ||
104 | #define PB30_PF_UART2_TXD (GPIO_PORTB | GPIO_PF | GPIO_OUT | 30) | ||
105 | #define PB31_PF_UART2_RXD (GPIO_PORTB | GPIO_PF | GPIO_IN | 31) | ||
106 | #define PC3_PF_SSI_RXFS (GPIO_PORTC | GPIO_PF | 3) | ||
107 | #define PC4_PF_SSI_RXCLK (GPIO_PORTC | GPIO_PF | 4) | ||
108 | #define PC5_PF_SSI_RXDAT (GPIO_PORTC | GPIO_PF | GPIO_IN | 5) | ||
109 | #define PC6_PF_SSI_TXDAT (GPIO_PORTC | GPIO_PF | GPIO_OUT | 6) | ||
110 | #define PC7_PF_SSI_TXFS (GPIO_PORTC | GPIO_PF | 7) | ||
111 | #define PC8_PF_SSI_TXCLK (GPIO_PORTC | GPIO_PF | 8) | ||
112 | #define PC9_PF_UART1_CTS (GPIO_PORTC | GPIO_PF | GPIO_OUT | 9) | ||
113 | #define PC10_PF_UART1_RTS (GPIO_PORTC | GPIO_PF | GPIO_IN | 10) | ||
114 | #define PC11_PF_UART1_TXD (GPIO_PORTC | GPIO_PF | GPIO_OUT | 11) | ||
115 | #define PC12_PF_UART1_RXD (GPIO_PORTC | GPIO_PF | GPIO_IN | 12) | ||
116 | #define PC13_PF_SPI1_SPI_RDY (GPIO_PORTC | GPIO_PF | 13) | ||
117 | #define PC14_PF_SPI1_SCLK (GPIO_PORTC | GPIO_PF | 14) | ||
118 | #define PC15_PF_SPI1_SS (GPIO_PORTC | GPIO_PF | 15) | ||
119 | #define PC16_PF_SPI1_MISO (GPIO_PORTC | GPIO_PF | 16) | ||
120 | #define PC17_PF_SPI1_MOSI (GPIO_PORTC | GPIO_PF | 17) | ||
121 | #define PC24_BIN_UART3_RI (GPIO_PORTC | GPIO_BIN | GPIO_OUT | 24) | ||
122 | #define PC25_BIN_UART3_DSR (GPIO_PORTC | GPIO_BIN | GPIO_OUT | 25) | ||
123 | #define PC26_AOUT_UART3_DTR (GPIO_PORTC | GPIO_AOUT | GPIO_IN | 26) | ||
124 | #define PC27_BIN_UART3_DCD (GPIO_PORTC | GPIO_BIN | GPIO_OUT | 27) | ||
125 | #define PC28_BIN_UART3_CTS (GPIO_PORTC | GPIO_BIN | GPIO_OUT | 28) | ||
126 | #define PC29_AOUT_UART3_RTS (GPIO_PORTC | GPIO_AOUT | GPIO_IN | 29) | ||
127 | #define PC30_BIN_UART3_TX (GPIO_PORTC | GPIO_BIN | 30) | ||
128 | #define PC31_AOUT_UART3_RX (GPIO_PORTC | GPIO_AOUT | GPIO_IN | 31) | ||
129 | #define PD6_PF_LSCLK (GPIO_PORTD | GPIO_PF | GPIO_OUT | 6) | ||
130 | #define PD7_PF_REV (GPIO_PORTD | GPIO_PF | 7) | ||
131 | #define PD7_AF_UART2_DTR (GPIO_PORTD | GPIO_AF | GPIO_IN | 7) | ||
132 | #define PD7_AIN_SPI2_SCLK (GPIO_PORTD | GPIO_AIN | 7) | ||
133 | #define PD8_PF_CLS (GPIO_PORTD | GPIO_PF | 8) | ||
134 | #define PD8_AF_UART2_DCD (GPIO_PORTD | GPIO_AF | GPIO_OUT | 8) | ||
135 | #define PD8_AIN_SPI2_SS (GPIO_PORTD | GPIO_AIN | 8) | ||
136 | #define PD9_PF_PS (GPIO_PORTD | GPIO_PF | 9) | ||
137 | #define PD9_AF_UART2_RI (GPIO_PORTD | GPIO_AF | GPIO_OUT | 9) | ||
138 | #define PD9_AOUT_SPI2_RXD (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 9) | ||
139 | #define PD10_PF_SPL_SPR (GPIO_PORTD | GPIO_PF | GPIO_OUT | 10) | ||
140 | #define PD10_AF_UART2_DSR (GPIO_PORTD | GPIO_AF | GPIO_OUT | 10) | ||
141 | #define PD10_AIN_SPI2_TXD (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 10) | ||
142 | #define PD11_PF_CONTRAST (GPIO_PORTD | GPIO_PF | GPIO_OUT | 11) | ||
143 | #define PD12_PF_ACD_OE (GPIO_PORTD | GPIO_PF | GPIO_OUT | 12) | ||
144 | #define PD13_PF_LP_HSYNC (GPIO_PORTD | GPIO_PF | GPIO_OUT | 13) | ||
145 | #define PD14_PF_FLM_VSYNC (GPIO_PORTD | GPIO_PF | GPIO_OUT | 14) | ||
146 | #define PD15_PF_LD0 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 15) | ||
147 | #define PD16_PF_LD1 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 16) | ||
148 | #define PD17_PF_LD2 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 17) | ||
149 | #define PD18_PF_LD3 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 18) | ||
150 | #define PD19_PF_LD4 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 19) | ||
151 | #define PD20_PF_LD5 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 20) | ||
152 | #define PD21_PF_LD6 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 21) | ||
153 | #define PD22_PF_LD7 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 22) | ||
154 | #define PD23_PF_LD8 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 23) | ||
155 | #define PD24_PF_LD9 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 24) | ||
156 | #define PD25_PF_LD10 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 25) | ||
157 | #define PD26_PF_LD11 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 26) | ||
158 | #define PD27_PF_LD12 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 27) | ||
159 | #define PD28_PF_LD13 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 28) | ||
160 | #define PD29_PF_LD14 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 29) | ||
161 | #define PD30_PF_LD15 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 30) | ||
162 | #define PD31_PF_TMR2OUT (GPIO_PORTD | GPIO_PF | 31) | ||
163 | #define PD31_BIN_SPI2_TXD (GPIO_PORTD | GPIO_BIN | 31) | ||
164 | |||
165 | |||
166 | #endif | ||
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx21.h b/arch/arm/plat-mxc/include/mach/iomux-mx21.h index 63aaa972e275..1495dfda7834 100644 --- a/arch/arm/plat-mxc/include/mach/iomux-mx21.h +++ b/arch/arm/plat-mxc/include/mach/iomux-mx21.h | |||
@@ -1,126 +1,122 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2009 by Holger Schurig <hs4233@mail.mn-solutions.de> | 2 | * Copyright (C) 2009 by Holger Schurig <hs4233@mail.mn-solutions.de> |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or | 4 | * This program is free software; you can redistribute it and/or |
5 | * modify it under the terms of the GNU General Public License | 5 | * modify it under the terms of the GNU General Public License |
6 | * as published by the Free Software Foundation; either version 2 | 6 | * as published by the Free Software Foundation; either version 2 |
7 | * of the License, or (at your option) any later version. | 7 | * of the License, or (at your option) any later version. |
8 | * This program is distributed in the hope that it will be useful, | 8 | * This program is distributed in the hope that it will be useful, |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
11 | * GNU General Public License for more details. | 11 | * GNU General Public License for more details. |
12 | * | 12 | * |
13 | * You should have received a copy of the GNU General Public License | 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 | 14 | * along with this program; if not, write to the Free Software |
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | 15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
16 | * MA 02110-1301, USA. | 16 | * MA 02110-1301, USA. |
17 | */ | 17 | */ |
18 | 18 | #ifndef __MACH_IOMUX_MX21_H__ | |
19 | #ifndef _MXC_IOMUX_MX21_H | 19 | #define __MACH_IOMUX_MX21_H__ |
20 | #define _MXC_IOMUX_MX21_H | 20 | |
21 | 21 | #include <mach/iomux-mx2x.h> | |
22 | #ifndef GPIO_PORTA | 22 | #include <mach/iomux-v1.h> |
23 | #error Please include mach/iomux.h | ||
24 | #endif | ||
25 | |||
26 | 23 | ||
27 | /* Primary GPIO pin functions */ | 24 | /* Primary GPIO pin functions */ |
28 | 25 | ||
29 | #define PB22_PF_USBH1_BYP (GPIO_PORTB | GPIO_PF | 22) | 26 | #define PB22_PF_USBH1_BYP (GPIO_PORTB | GPIO_PF | 22) |
30 | #define PB25_PF_USBH1_ON (GPIO_PORTB | GPIO_PF | 25) | 27 | #define PB25_PF_USBH1_ON (GPIO_PORTB | GPIO_PF | 25) |
31 | #define PC5_PF_USBOTG_SDA (GPIO_PORTC | GPIO_PF | 5) | 28 | #define PC5_PF_USBOTG_SDA (GPIO_PORTC | GPIO_PF | 5) |
32 | #define PC6_PF_USBOTG_SCL (GPIO_PORTC | GPIO_PF | 6) | 29 | #define PC6_PF_USBOTG_SCL (GPIO_PORTC | GPIO_PF | 6) |
33 | #define PC7_PF_USBOTG_ON (GPIO_PORTC | GPIO_PF | 7) | 30 | #define PC7_PF_USBOTG_ON (GPIO_PORTC | GPIO_PF | 7) |
34 | #define PC8_PF_USBOTG_FS (GPIO_PORTC | GPIO_PF | 8) | 31 | #define PC8_PF_USBOTG_FS (GPIO_PORTC | GPIO_PF | 8) |
35 | #define PC9_PF_USBOTG_OE (GPIO_PORTC | GPIO_PF | 9) | 32 | #define PC9_PF_USBOTG_OE (GPIO_PORTC | GPIO_PF | 9) |
36 | #define PC10_PF_USBOTG_TXDM (GPIO_PORTC | GPIO_PF | 10) | 33 | #define PC10_PF_USBOTG_TXDM (GPIO_PORTC | GPIO_PF | 10) |
37 | #define PC11_PF_USBOTG_TXDP (GPIO_PORTC | GPIO_PF | 11) | 34 | #define PC11_PF_USBOTG_TXDP (GPIO_PORTC | GPIO_PF | 11) |
38 | #define PC12_PF_USBOTG_RXDM (GPIO_PORTC | GPIO_PF | 12) | 35 | #define PC12_PF_USBOTG_RXDM (GPIO_PORTC | GPIO_PF | 12) |
39 | #define PC13_PF_USBOTG_RXDP (GPIO_PORTC | GPIO_PF | 13) | 36 | #define PC13_PF_USBOTG_RXDP (GPIO_PORTC | GPIO_PF | 13) |
40 | #define PC16_PF_SAP_FS (GPIO_PORTC | GPIO_PF | 16) | 37 | #define PC16_PF_SAP_FS (GPIO_PORTC | GPIO_PF | 16) |
41 | #define PC17_PF_SAP_RXD (GPIO_PORTC | GPIO_PF | 17) | 38 | #define PC17_PF_SAP_RXD (GPIO_PORTC | GPIO_PF | 17) |
42 | #define PC18_PF_SAP_TXD (GPIO_PORTC | GPIO_PF | 18) | 39 | #define PC18_PF_SAP_TXD (GPIO_PORTC | GPIO_PF | 18) |
43 | #define PC19_PF_SAP_CLK (GPIO_PORTC | GPIO_PF | 19) | 40 | #define PC19_PF_SAP_CLK (GPIO_PORTC | GPIO_PF | 19) |
44 | #define PE0_PF_TEST_WB2 (GPIO_PORTE | GPIO_PF | 0) | 41 | #define PE0_PF_TEST_WB2 (GPIO_PORTE | GPIO_PF | 0) |
45 | #define PE1_PF_TEST_WB1 (GPIO_PORTE | GPIO_PF | 1) | 42 | #define PE1_PF_TEST_WB1 (GPIO_PORTE | GPIO_PF | 1) |
46 | #define PE2_PF_TEST_WB0 (GPIO_PORTE | GPIO_PF | 2) | 43 | #define PE2_PF_TEST_WB0 (GPIO_PORTE | GPIO_PF | 2) |
47 | #define PF1_PF_NFCE (GPIO_PORTF | GPIO_PF | 1) | 44 | #define PF1_PF_NFCE (GPIO_PORTF | GPIO_PF | 1) |
48 | #define PF3_PF_NFCLE (GPIO_PORTF | GPIO_PF | 3) | 45 | #define PF3_PF_NFCLE (GPIO_PORTF | GPIO_PF | 3) |
49 | #define PF7_PF_NFIO0 (GPIO_PORTF | GPIO_PF | 7) | 46 | #define PF7_PF_NFIO0 (GPIO_PORTF | GPIO_PF | 7) |
50 | #define PF8_PF_NFIO1 (GPIO_PORTF | GPIO_PF | 8) | 47 | #define PF8_PF_NFIO1 (GPIO_PORTF | GPIO_PF | 8) |
51 | #define PF9_PF_NFIO2 (GPIO_PORTF | GPIO_PF | 9) | 48 | #define PF9_PF_NFIO2 (GPIO_PORTF | GPIO_PF | 9) |
52 | #define PF10_PF_NFIO3 (GPIO_PORTF | GPIO_PF | 10) | 49 | #define PF10_PF_NFIO3 (GPIO_PORTF | GPIO_PF | 10) |
53 | #define PF11_PF_NFIO4 (GPIO_PORTF | GPIO_PF | 11) | 50 | #define PF11_PF_NFIO4 (GPIO_PORTF | GPIO_PF | 11) |
54 | #define PF12_PF_NFIO5 (GPIO_PORTF | GPIO_PF | 12) | 51 | #define PF12_PF_NFIO5 (GPIO_PORTF | GPIO_PF | 12) |
55 | #define PF13_PF_NFIO6 (GPIO_PORTF | GPIO_PF | 13) | 52 | #define PF13_PF_NFIO6 (GPIO_PORTF | GPIO_PF | 13) |
56 | #define PF14_PF_NFIO7 (GPIO_PORTF | GPIO_PF | 14) | 53 | #define PF14_PF_NFIO7 (GPIO_PORTF | GPIO_PF | 14) |
57 | #define PF16_PF_RES (GPIO_PORTF | GPIO_PF | 16) | 54 | #define PF16_PF_RES (GPIO_PORTF | GPIO_PF | 16) |
58 | 55 | ||
59 | /* Alternate GPIO pin functions */ | 56 | /* Alternate GPIO pin functions */ |
60 | 57 | ||
61 | #define PA5_AF_BMI_CLK_CS (GPIO_PORTA | GPIO_AF | 5) | 58 | #define PA5_AF_BMI_CLK_CS (GPIO_PORTA | GPIO_AF | 5) |
62 | #define PA6_AF_BMI_D0 (GPIO_PORTA | GPIO_AF | 6) | 59 | #define PA6_AF_BMI_D0 (GPIO_PORTA | GPIO_AF | 6) |
63 | #define PA7_AF_BMI_D1 (GPIO_PORTA | GPIO_AF | 7) | 60 | #define PA7_AF_BMI_D1 (GPIO_PORTA | GPIO_AF | 7) |
64 | #define PA8_AF_BMI_D2 (GPIO_PORTA | GPIO_AF | 8) | 61 | #define PA8_AF_BMI_D2 (GPIO_PORTA | GPIO_AF | 8) |
65 | #define PA9_AF_BMI_D3 (GPIO_PORTA | GPIO_AF | 9) | 62 | #define PA9_AF_BMI_D3 (GPIO_PORTA | GPIO_AF | 9) |
66 | #define PA10_AF_BMI_D4 (GPIO_PORTA | GPIO_AF | 10) | 63 | #define PA10_AF_BMI_D4 (GPIO_PORTA | GPIO_AF | 10) |
67 | #define PA11_AF_BMI_D5 (GPIO_PORTA | GPIO_AF | 11) | 64 | #define PA11_AF_BMI_D5 (GPIO_PORTA | GPIO_AF | 11) |
68 | #define PA12_AF_BMI_D6 (GPIO_PORTA | GPIO_AF | 12) | 65 | #define PA12_AF_BMI_D6 (GPIO_PORTA | GPIO_AF | 12) |
69 | #define PA13_AF_BMI_D7 (GPIO_PORTA | GPIO_AF | 13) | 66 | #define PA13_AF_BMI_D7 (GPIO_PORTA | GPIO_AF | 13) |
70 | #define PA14_AF_BMI_D8 (GPIO_PORTA | GPIO_AF | 14) | 67 | #define PA14_AF_BMI_D8 (GPIO_PORTA | GPIO_AF | 14) |
71 | #define PA15_AF_BMI_D9 (GPIO_PORTA | GPIO_AF | 15) | 68 | #define PA15_AF_BMI_D9 (GPIO_PORTA | GPIO_AF | 15) |
72 | #define PA16_AF_BMI_D10 (GPIO_PORTA | GPIO_AF | 16) | 69 | #define PA16_AF_BMI_D10 (GPIO_PORTA | GPIO_AF | 16) |
73 | #define PA17_AF_BMI_D11 (GPIO_PORTA | GPIO_AF | 17) | 70 | #define PA17_AF_BMI_D11 (GPIO_PORTA | GPIO_AF | 17) |
74 | #define PA18_AF_BMI_D12 (GPIO_PORTA | GPIO_AF | 18) | 71 | #define PA18_AF_BMI_D12 (GPIO_PORTA | GPIO_AF | 18) |
75 | #define PA19_AF_BMI_D13 (GPIO_PORTA | GPIO_AF | 19) | 72 | #define PA19_AF_BMI_D13 (GPIO_PORTA | GPIO_AF | 19) |
76 | #define PA20_AF_BMI_D14 (GPIO_PORTA | GPIO_AF | 20) | 73 | #define PA20_AF_BMI_D14 (GPIO_PORTA | GPIO_AF | 20) |
77 | #define PA21_AF_BMI_D15 (GPIO_PORTA | GPIO_AF | 21) | 74 | #define PA21_AF_BMI_D15 (GPIO_PORTA | GPIO_AF | 21) |
78 | #define PA22_AF_BMI_READ_REQ (GPIO_PORTA | GPIO_AF | 22) | 75 | #define PA22_AF_BMI_READ_REQ (GPIO_PORTA | GPIO_AF | 22) |
79 | #define PA23_AF_BMI_WRITE (GPIO_PORTA | GPIO_AF | 23) | 76 | #define PA23_AF_BMI_WRITE (GPIO_PORTA | GPIO_AF | 23) |
80 | #define PA29_AF_BMI_RX_FULL (GPIO_PORTA | GPIO_AF | 29) | 77 | #define PA29_AF_BMI_RX_FULL (GPIO_PORTA | GPIO_AF | 29) |
81 | #define PA30_AF_BMI_READ (GPIO_PORTA | GPIO_AF | 30) | 78 | #define PA30_AF_BMI_READ (GPIO_PORTA | GPIO_AF | 30) |
82 | 79 | ||
83 | /* AIN GPIO pin functions */ | 80 | /* AIN GPIO pin functions */ |
84 | 81 | ||
85 | #define PC14_AIN_SYS_CLK (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 14) | 82 | #define PC14_AIN_SYS_CLK (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 14) |
86 | #define PD21_AIN_USBH2_FS (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 21) | 83 | #define PD21_AIN_USBH2_FS (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 21) |
87 | #define PD22_AIN_USBH2_OE (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 22) | 84 | #define PD22_AIN_USBH2_OE (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 22) |
88 | #define PD23_AIN_USBH2_TXDM (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 23) | 85 | #define PD23_AIN_USBH2_TXDM (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 23) |
89 | #define PD24_AIN_USBH2_TXDP (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 24) | 86 | #define PD24_AIN_USBH2_TXDP (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 24) |
90 | #define PE8_AIN_IR_TXD (GPIO_PORTE | GPIO_AIN | GPIO_OUT | 8) | 87 | #define PE8_AIN_IR_TXD (GPIO_PORTE | GPIO_AIN | GPIO_OUT | 8) |
91 | #define PF0_AIN_PC_RST (GPIO_PORTF | GPIO_AIN | GPIO_OUT | 0) | 88 | #define PF0_AIN_PC_RST (GPIO_PORTF | GPIO_AIN | GPIO_OUT | 0) |
92 | #define PF1_AIN_PC_CE1 (GPIO_PORTF | GPIO_AIN | GPIO_OUT | 1) | 89 | #define PF1_AIN_PC_CE1 (GPIO_PORTF | GPIO_AIN | GPIO_OUT | 1) |
93 | #define PF2_AIN_PC_CE2 (GPIO_PORTF | GPIO_AIN | GPIO_OUT | 2) | 90 | #define PF2_AIN_PC_CE2 (GPIO_PORTF | GPIO_AIN | GPIO_OUT | 2) |
94 | #define PF3_AIN_PC_POE (GPIO_PORTF | GPIO_AIN | GPIO_OUT | 3) | 91 | #define PF3_AIN_PC_POE (GPIO_PORTF | GPIO_AIN | GPIO_OUT | 3) |
95 | #define PF4_AIN_PC_OE (GPIO_PORTF | GPIO_AIN | GPIO_OUT | 4) | 92 | #define PF4_AIN_PC_OE (GPIO_PORTF | GPIO_AIN | GPIO_OUT | 4) |
96 | #define PF5_AIN_PC_RW (GPIO_PORTF | GPIO_AIN | GPIO_OUT | 5) | 93 | #define PF5_AIN_PC_RW (GPIO_PORTF | GPIO_AIN | GPIO_OUT | 5) |
97 | 94 | ||
98 | /* BIN GPIO pin functions */ | 95 | /* BIN GPIO pin functions */ |
99 | 96 | ||
100 | #define PC14_BIN_SYS_CLK (GPIO_PORTC | GPIO_BIN | GPIO_OUT | 14) | 97 | #define PC14_BIN_SYS_CLK (GPIO_PORTC | GPIO_BIN | GPIO_OUT | 14) |
101 | #define PD27_BIN_EXT_DMA_GRANT (GPIO_PORTD | GPIO_BIN | GPIO_OUT | 27) | 98 | #define PD27_BIN_EXT_DMA_GRANT (GPIO_PORTD | GPIO_BIN | GPIO_OUT | 27) |
102 | 99 | ||
103 | /* CIN GPIO pin functions */ | 100 | /* CIN GPIO pin functions */ |
104 | 101 | ||
105 | #define PB26_CIN_USBH1_RXDAT (GPIO_PORTB | GPIO_CIN | GPIO_OUT | 26) | 102 | #define PB26_CIN_USBH1_RXDAT (GPIO_PORTB | GPIO_CIN | GPIO_OUT | 26) |
106 | 103 | ||
107 | /* AOUT GPIO pin functions */ | 104 | /* AOUT GPIO pin functions */ |
108 | 105 | ||
109 | #define PA29_AOUT_BMI_WAIT (GPIO_PORTA | GPIO_AOUT | GPIO_IN | 29) | 106 | #define PA29_AOUT_BMI_WAIT (GPIO_PORTA | GPIO_AOUT | GPIO_IN | 29) |
110 | #define PD19_AOUT_USBH2_RXDM (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 19) | 107 | #define PD19_AOUT_USBH2_RXDM (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 19) |
111 | #define PD20_AOUT_USBH2_RXDP (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 20) | 108 | #define PD20_AOUT_USBH2_RXDP (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 20) |
112 | #define PD25_AOUT_EXT_DMAREQ (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 25) | 109 | #define PD25_AOUT_EXT_DMAREQ (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 25) |
113 | #define PD26_AOUT_USBOTG_RXDAT (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 26) | 110 | #define PD26_AOUT_USBOTG_RXDAT (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 26) |
114 | #define PE9_AOUT_IR_RXD (GPIO_PORTE | GPIO_AOUT | GPIO_IN | 9) | 111 | #define PE9_AOUT_IR_RXD (GPIO_PORTE | GPIO_AOUT | GPIO_IN | 9) |
115 | #define PF6_AOUT_PC_BVD2 (GPIO_PORTF | GPIO_AOUT | GPIO_IN | 6) | 112 | #define PF6_AOUT_PC_BVD2 (GPIO_PORTF | GPIO_AOUT | GPIO_IN | 6) |
116 | #define PF7_AOUT_PC_BVD1 (GPIO_PORTF | GPIO_AOUT | GPIO_IN | 7) | 113 | #define PF7_AOUT_PC_BVD1 (GPIO_PORTF | GPIO_AOUT | GPIO_IN | 7) |
117 | #define PF8_AOUT_PC_VS2 (GPIO_PORTF | GPIO_AOUT | GPIO_IN | 8) | 114 | #define PF8_AOUT_PC_VS2 (GPIO_PORTF | GPIO_AOUT | GPIO_IN | 8) |
118 | #define PF9_AOUT_PC_VS1 (GPIO_PORTF | GPIO_AOUT | GPIO_IN | 9) | 115 | #define PF9_AOUT_PC_VS1 (GPIO_PORTF | GPIO_AOUT | GPIO_IN | 9) |
119 | #define PF10_AOUT_PC_WP (GPIO_PORTF | GPIO_AOUT | GPIO_IN | 10) | 116 | #define PF10_AOUT_PC_WP (GPIO_PORTF | GPIO_AOUT | GPIO_IN | 10) |
120 | #define PF11_AOUT_PC_READY (GPIO_PORTF | GPIO_AOUT | GPIO_IN | 11) | 117 | #define PF11_AOUT_PC_READY (GPIO_PORTF | GPIO_AOUT | GPIO_IN | 11) |
121 | #define PF12_AOUT_PC_WAIT (GPIO_PORTF | GPIO_AOUT | GPIO_IN | 12) | 118 | #define PF12_AOUT_PC_WAIT (GPIO_PORTF | GPIO_AOUT | GPIO_IN | 12) |
122 | #define PF13_AOUT_PC_CD2 (GPIO_PORTF | GPIO_AOUT | GPIO_IN | 13) | 119 | #define PF13_AOUT_PC_CD2 (GPIO_PORTF | GPIO_AOUT | GPIO_IN | 13) |
123 | #define PF14_AOUT_PC_CD1 (GPIO_PORTF | GPIO_AOUT | GPIO_IN | 14) | 120 | #define PF14_AOUT_PC_CD1 (GPIO_PORTF | GPIO_AOUT | GPIO_IN | 14) |
124 | 121 | ||
125 | 122 | #endif /* ifndef __MACH_IOMUX_MX21_H__ */ | |
126 | #endif | ||
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx25.h b/arch/arm/plat-mxc/include/mach/iomux-mx25.h index 9af494f0ab3d..f39220d1b67a 100644 --- a/arch/arm/plat-mxc/include/mach/iomux-mx25.h +++ b/arch/arm/plat-mxc/include/mach/iomux-mx25.h | |||
@@ -7,7 +7,7 @@ | |||
7 | * Copyright 2008 Freescale Semiconductor, Inc. All Rights Reserved. | 7 | * Copyright 2008 Freescale Semiconductor, Inc. All Rights Reserved. |
8 | * and | 8 | * and |
9 | * arch/arm/plat-mxc/include/mach/iomux-mx35.h | 9 | * arch/arm/plat-mxc/include/mach/iomux-mx35.h |
10 | * Copyright (C, NO_PAD_CTRL) 2009 by Jan Weitzel Phytec Messtechnik GmbH <armlinux@phytec.de> | 10 | * Copyright (C) 2009 by Jan Weitzel Phytec Messtechnik GmbH <armlinux@phytec.de> |
11 | * | 11 | * |
12 | * The code contained herein is licensed under the GNU General Public | 12 | * The code contained herein is licensed under the GNU General Public |
13 | * License. You may obtain a copy of the GNU General Public License | 13 | * License. You may obtain a copy of the GNU General Public License |
@@ -16,24 +16,11 @@ | |||
16 | * http://www.opensource.org/licenses/gpl-license.html | 16 | * http://www.opensource.org/licenses/gpl-license.html |
17 | * http://www.gnu.org/copyleft/gpl.html | 17 | * http://www.gnu.org/copyleft/gpl.html |
18 | */ | 18 | */ |
19 | #ifndef __IOMUX_MX25_H__ | 19 | #ifndef __MACH_IOMUX_MX25_H__ |
20 | #define __IOMUX_MX25_H__ | 20 | #define __MACH_IOMUX_MX25_H__ |
21 | 21 | ||
22 | #include <mach/iomux-v3.h> | 22 | #include <mach/iomux-v3.h> |
23 | 23 | ||
24 | #ifndef GPIO_PORTA | ||
25 | #error Please include mach/iomux.h | ||
26 | #endif | ||
27 | |||
28 | /* | ||
29 | * | ||
30 | * @brief MX25 I/O Pin List | ||
31 | * | ||
32 | * @ingroup GPIO_MX25 | ||
33 | */ | ||
34 | |||
35 | #ifndef __ASSEMBLY__ | ||
36 | |||
37 | /* | 24 | /* |
38 | * IOMUX/PAD Bit field definitions | 25 | * IOMUX/PAD Bit field definitions |
39 | */ | 26 | */ |
@@ -462,9 +449,11 @@ | |||
462 | #define MX25_PAD_GPIO_C__CAN2_TX IOMUX_PAD(0x3f8, 0x1fc, 0x16, 0, 0, PAD_CTL_PUS_22K_UP) | 449 | #define MX25_PAD_GPIO_C__CAN2_TX IOMUX_PAD(0x3f8, 0x1fc, 0x16, 0, 0, PAD_CTL_PUS_22K_UP) |
463 | 450 | ||
464 | #define MX25_PAD_GPIO_D__GPIO_D IOMUX_PAD(0x3fc, 0x200, 0x10, 0, 0, NO_PAD_CTRL) | 451 | #define MX25_PAD_GPIO_D__GPIO_D IOMUX_PAD(0x3fc, 0x200, 0x10, 0, 0, NO_PAD_CTRL) |
452 | #define MX25_PAD_GPIO_E__LD16 IOMUX_PAD(0x400, 0x204, 0x02, 0, 0, NO_PAD_CTRL) | ||
465 | #define MX25_PAD_GPIO_D__CAN2_RX IOMUX_PAD(0x3fc, 0x200, 0x16, 0x484, 1, PAD_CTL_PUS_22K_UP) | 453 | #define MX25_PAD_GPIO_D__CAN2_RX IOMUX_PAD(0x3fc, 0x200, 0x16, 0x484, 1, PAD_CTL_PUS_22K_UP) |
466 | 454 | ||
467 | #define MX25_PAD_GPIO_E__GPIO_E IOMUX_PAD(0x400, 0x204, 0x10, 0, 0, NO_PAD_CTRL) | 455 | #define MX25_PAD_GPIO_E__GPIO_E IOMUX_PAD(0x400, 0x204, 0x10, 0, 0, NO_PAD_CTRL) |
456 | #define MX25_PAD_GPIO_F__LD17 IOMUX_PAD(0x404, 0x208, 0x02, 0, 0, NO_PAD_CTRL) | ||
468 | #define MX25_PAD_GPIO_E__AUD7_TXD IOMUX_PAD(0x400, 0x204, 0x14, 0, 0, NO_PAD_CTRL) | 457 | #define MX25_PAD_GPIO_E__AUD7_TXD IOMUX_PAD(0x400, 0x204, 0x14, 0, 0, NO_PAD_CTRL) |
469 | 458 | ||
470 | #define MX25_PAD_GPIO_F__GPIO_F IOMUX_PAD(0x404, 0x208, 0x10, 0, 0, NO_PAD_CTRL) | 459 | #define MX25_PAD_GPIO_F__GPIO_F IOMUX_PAD(0x404, 0x208, 0x10, 0, 0, NO_PAD_CTRL) |
@@ -513,5 +502,4 @@ | |||
513 | #define MX25_PAD_CTL_GRP_DVS_SDHC1 IOMUX_PAD(0x458, 0x000, 0, 0, 0, NO_PAD_CTRL) | 502 | #define MX25_PAD_CTL_GRP_DVS_SDHC1 IOMUX_PAD(0x458, 0x000, 0, 0, 0, NO_PAD_CTRL) |
514 | #define MX25_PAD_CTL_GRP_DVS_LCD IOMUX_PAD(0x45c, 0x000, 0, 0, 0, NO_PAD_CTRL) | 503 | #define MX25_PAD_CTL_GRP_DVS_LCD IOMUX_PAD(0x45c, 0x000, 0, 0, 0, NO_PAD_CTRL) |
515 | 504 | ||
516 | #endif // __ASSEMBLY__ | 505 | #endif /* __MACH_IOMUX_MX25_H__ */ |
517 | #endif // __IOMUX_MX25_H__ | ||
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx27.h b/arch/arm/plat-mxc/include/mach/iomux-mx27.h index 5ac158b70f61..d9f9a6e32d80 100644 --- a/arch/arm/plat-mxc/include/mach/iomux-mx27.h +++ b/arch/arm/plat-mxc/include/mach/iomux-mx27.h | |||
@@ -1,207 +1,205 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2008 by Sascha Hauer <kernel@pengutronix.de> | 2 | * Copyright (C) 2008 by Sascha Hauer <kernel@pengutronix.de> |
3 | * Copyright (C) 2009 by Holger Schurig <hs4233@mail.mn-solutions.de> | 3 | * Copyright (C) 2009 by Holger Schurig <hs4233@mail.mn-solutions.de> |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or | 5 | * This program is free software; you can redistribute it and/or |
6 | * modify it under the terms of the GNU General Public License | 6 | * modify it under the terms of the GNU General Public License |
7 | * as published by the Free Software Foundation; either version 2 | 7 | * as published by the Free Software Foundation; either version 2 |
8 | * of the License, or (at your option) any later version. | 8 | * of the License, or (at your option) any later version. |
9 | * This program is distributed in the hope that it will be useful, | 9 | * This program is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. |
13 | * | 13 | * |
14 | * You should have received a copy of the GNU General Public License | 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 | 15 | * along with this program; if not, write to the Free Software |
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
17 | * MA 02110-1301, USA. | 17 | * MA 02110-1301, USA. |
18 | */ | 18 | */ |
19 | 19 | #ifndef __MACH_IOMUX_MX27_H__ | |
20 | #ifndef _MXC_IOMUX_MX27_H | 20 | #define __MACH_IOMUX_MX27_H__ |
21 | #define _MXC_IOMUX_MX27_H | 21 | |
22 | 22 | #include <mach/iomux-mx2x.h> | |
23 | #ifndef GPIO_PORTA | 23 | #include <mach/iomux-v1.h> |
24 | #error Please include mach/iomux.h | ||
25 | #endif | ||
26 | |||
27 | 24 | ||
28 | /* Primary GPIO pin functions */ | 25 | /* Primary GPIO pin functions */ |
29 | 26 | ||
30 | #define PA0_PF_USBH2_CLK (GPIO_PORTA | GPIO_PF | 0) | 27 | #define PA0_PF_USBH2_CLK (GPIO_PORTA | GPIO_PF | 0) |
31 | #define PA1_PF_USBH2_DIR (GPIO_PORTA | GPIO_PF | 1) | 28 | #define PA1_PF_USBH2_DIR (GPIO_PORTA | GPIO_PF | 1) |
32 | #define PA2_PF_USBH2_DATA7 (GPIO_PORTA | GPIO_PF | 2) | 29 | #define PA2_PF_USBH2_DATA7 (GPIO_PORTA | GPIO_PF | 2) |
33 | #define PA3_PF_USBH2_NXT (GPIO_PORTA | GPIO_PF | 3) | 30 | #define PA3_PF_USBH2_NXT (GPIO_PORTA | GPIO_PF | 3) |
34 | #define PA4_PF_USBH2_STP (GPIO_PORTA | GPIO_PF | 4) | 31 | #define PA4_PF_USBH2_STP (GPIO_PORTA | GPIO_PF | 4) |
35 | #define PB22_PF_USBH1_SUSP (GPIO_PORTB | GPIO_PF | 22) | 32 | #define PB22_PF_USBH1_SUSP (GPIO_PORTB | GPIO_PF | 22) |
36 | #define PB25_PF_USBH1_RCV (GPIO_PORTB | GPIO_PF | 25) | 33 | #define PB25_PF_USBH1_RCV (GPIO_PORTB | GPIO_PF | 25) |
37 | #define PC5_PF_I2C2_SDA (GPIO_PORTC | GPIO_PF | GPIO_IN | 5) | 34 | #define PC5_PF_I2C2_SDA (GPIO_PORTC | GPIO_PF | GPIO_IN | 5) |
38 | #define PC6_PF_I2C2_SCL (GPIO_PORTC | GPIO_PF | GPIO_IN | 6) | 35 | #define PC6_PF_I2C2_SCL (GPIO_PORTC | GPIO_PF | GPIO_IN | 6) |
39 | #define PC7_PF_USBOTG_DATA5 (GPIO_PORTC | GPIO_PF | GPIO_OUT | 7) | 36 | #define PC7_PF_USBOTG_DATA5 (GPIO_PORTC | GPIO_PF | GPIO_OUT | 7) |
40 | #define PC8_PF_USBOTG_DATA6 (GPIO_PORTC | GPIO_PF | GPIO_OUT | 8) | 37 | #define PC8_PF_USBOTG_DATA6 (GPIO_PORTC | GPIO_PF | GPIO_OUT | 8) |
41 | #define PC9_PF_USBOTG_DATA0 (GPIO_PORTC | GPIO_PF | GPIO_OUT | 9) | 38 | #define PC9_PF_USBOTG_DATA0 (GPIO_PORTC | GPIO_PF | GPIO_OUT | 9) |
42 | #define PC10_PF_USBOTG_DATA2 (GPIO_PORTC | GPIO_PF | GPIO_OUT | 10) | 39 | #define PC10_PF_USBOTG_DATA2 (GPIO_PORTC | GPIO_PF | GPIO_OUT | 10) |
43 | #define PC11_PF_USBOTG_DATA1 (GPIO_PORTC | GPIO_PF | GPIO_OUT | 11) | 40 | #define PC11_PF_USBOTG_DATA1 (GPIO_PORTC | GPIO_PF | GPIO_OUT | 11) |
44 | #define PC12_PF_USBOTG_DATA4 (GPIO_PORTC | GPIO_PF | GPIO_OUT | 12) | 41 | #define PC12_PF_USBOTG_DATA4 (GPIO_PORTC | GPIO_PF | GPIO_OUT | 12) |
45 | #define PC13_PF_USBOTG_DATA3 (GPIO_PORTC | GPIO_PF | GPIO_OUT | 13) | 42 | #define PC13_PF_USBOTG_DATA3 (GPIO_PORTC | GPIO_PF | GPIO_OUT | 13) |
46 | #define PC16_PF_SSI4_FS (GPIO_PORTC | GPIO_PF | GPIO_IN | 16) | 43 | #define PC16_PF_SSI4_FS (GPIO_PORTC | GPIO_PF | GPIO_IN | 16) |
47 | #define PC17_PF_SSI4_RXD (GPIO_PORTC | GPIO_PF | GPIO_IN | 17) | 44 | #define PC17_PF_SSI4_RXD (GPIO_PORTC | GPIO_PF | GPIO_IN | 17) |
48 | #define PC18_PF_SSI4_TXD (GPIO_PORTC | GPIO_PF | GPIO_IN | 18) | 45 | #define PC18_PF_SSI4_TXD (GPIO_PORTC | GPIO_PF | GPIO_IN | 18) |
49 | #define PC19_PF_SSI4_CLK (GPIO_PORTC | GPIO_PF | GPIO_IN | 19) | 46 | #define PC19_PF_SSI4_CLK (GPIO_PORTC | GPIO_PF | GPIO_IN | 19) |
50 | #define PC25_AF_GPT5_TIN (GPIO_PORTC | GPIO_AF | 25) | 47 | #define PD0_PF_SD3_CMD (GPIO_PORTD | GPIO_PF | 0) |
51 | #define PC27_AF_GPT4_TIN (GPIO_PORTC | GPIO_AF | 27) | 48 | #define PD1_PF_SD3_CLK (GPIO_PORTD | GPIO_PF | 1) |
52 | #define PD0_PF_SD3_CMD (GPIO_PORTD | GPIO_PF | 0) | 49 | #define PD2_PF_ATA_DATA0 (GPIO_PORTD | GPIO_PF | 2) |
53 | #define PD1_PF_SD3_CLK (GPIO_PORTD | GPIO_PF | 1) | 50 | #define PD3_PF_ATA_DATA1 (GPIO_PORTD | GPIO_PF | 3) |
54 | #define PD2_PF_ATA_DATA0 (GPIO_PORTD | GPIO_PF | 2) | 51 | #define PD4_PF_ATA_DATA2 (GPIO_PORTD | GPIO_PF | 4) |
55 | #define PD3_PF_ATA_DATA1 (GPIO_PORTD | GPIO_PF | 3) | 52 | #define PD5_PF_ATA_DATA3 (GPIO_PORTD | GPIO_PF | 5) |
56 | #define PD4_PF_ATA_DATA2 (GPIO_PORTD | GPIO_PF | 4) | 53 | #define PD6_PF_ATA_DATA4 (GPIO_PORTD | GPIO_PF | 6) |
57 | #define PD5_PF_ATA_DATA3 (GPIO_PORTD | GPIO_PF | 5) | 54 | #define PD7_PF_ATA_DATA5 (GPIO_PORTD | GPIO_PF | 7) |
58 | #define PD6_PF_ATA_DATA4 (GPIO_PORTD | GPIO_PF | 6) | 55 | #define PD8_PF_ATA_DATA6 (GPIO_PORTD | GPIO_PF | 8) |
59 | #define PD7_PF_ATA_DATA5 (GPIO_PORTD | GPIO_PF | 7) | 56 | #define PD9_PF_ATA_DATA7 (GPIO_PORTD | GPIO_PF | 9) |
60 | #define PD8_PF_ATA_DATA6 (GPIO_PORTD | GPIO_PF | 8) | 57 | #define PD10_PF_ATA_DATA8 (GPIO_PORTD | GPIO_PF | 10) |
61 | #define PD9_PF_ATA_DATA7 (GPIO_PORTD | GPIO_PF | 9) | 58 | #define PD11_PF_ATA_DATA9 (GPIO_PORTD | GPIO_PF | 11) |
62 | #define PD10_PF_ATA_DATA8 (GPIO_PORTD | GPIO_PF | 10) | 59 | #define PD12_PF_ATA_DATA10 (GPIO_PORTD | GPIO_PF | 12) |
63 | #define PD11_PF_ATA_DATA9 (GPIO_PORTD | GPIO_PF | 11) | 60 | #define PD13_PF_ATA_DATA11 (GPIO_PORTD | GPIO_PF | 13) |
64 | #define PD12_PF_ATA_DATA10 (GPIO_PORTD | GPIO_PF | 12) | 61 | #define PD14_PF_ATA_DATA12 (GPIO_PORTD | GPIO_PF | 14) |
65 | #define PD13_PF_ATA_DATA11 (GPIO_PORTD | GPIO_PF | 13) | 62 | #define PD15_PF_ATA_DATA13 (GPIO_PORTD | GPIO_PF | 15) |
66 | #define PD14_PF_ATA_DATA12 (GPIO_PORTD | GPIO_PF | 14) | 63 | #define PD16_PF_ATA_DATA14 (GPIO_PORTD | GPIO_PF | 16) |
67 | #define PD15_PF_ATA_DATA13 (GPIO_PORTD | GPIO_PF | 15) | 64 | #define PE0_PF_USBOTG_NXT (GPIO_PORTE | GPIO_PF | GPIO_OUT | 0) |
68 | #define PD16_PF_ATA_DATA14 (GPIO_PORTD | GPIO_PF | 16) | 65 | #define PE1_PF_USBOTG_STP (GPIO_PORTE | GPIO_PF | GPIO_OUT | 1) |
69 | #define PE0_PF_USBOTG_NXT (GPIO_PORTE | GPIO_PF | GPIO_OUT | 0) | 66 | #define PE2_PF_USBOTG_DIR (GPIO_PORTE | GPIO_PF | GPIO_OUT | 2) |
70 | #define PE1_PF_USBOTG_STP (GPIO_PORTE | GPIO_PF | GPIO_OUT | 1) | 67 | #define PE24_PF_USBOTG_CLK (GPIO_PORTE | GPIO_PF | GPIO_OUT | 24) |
71 | #define PE2_PF_USBOTG_DIR (GPIO_PORTE | GPIO_PF | GPIO_OUT | 2) | 68 | #define PE25_PF_USBOTG_DATA7 (GPIO_PORTE | GPIO_PF | GPIO_OUT | 25) |
72 | #define PE24_PF_USBOTG_CLK (GPIO_PORTE | GPIO_PF | GPIO_OUT | 24) | 69 | #define PF1_PF_NFCLE (GPIO_PORTF | GPIO_PF | 1) |
73 | #define PE25_PF_USBOTG_DATA7 (GPIO_PORTE | GPIO_PF | GPIO_OUT | 25) | 70 | #define PF3_PF_NFCE (GPIO_PORTF | GPIO_PF | 3) |
74 | #define PF1_PF_NFCLE (GPIO_PORTF | GPIO_PF | 1) | 71 | #define PF7_PF_PC_POE (GPIO_PORTF | GPIO_PF | 7) |
75 | #define PF3_PF_NFCE (GPIO_PORTF | GPIO_PF | 3) | 72 | #define PF8_PF_PC_RW (GPIO_PORTF | GPIO_PF | 8) |
76 | #define PF7_PF_PC_POE (GPIO_PORTF | GPIO_PF | 7) | 73 | #define PF9_PF_PC_IOIS16 (GPIO_PORTF | GPIO_PF | 9) |
77 | #define PF8_PF_PC_RW (GPIO_PORTF | GPIO_PF | 8) | 74 | #define PF10_PF_PC_RST (GPIO_PORTF | GPIO_PF | 10) |
78 | #define PF9_PF_PC_IOIS16 (GPIO_PORTF | GPIO_PF | 9) | 75 | #define PF11_PF_PC_BVD2 (GPIO_PORTF | GPIO_PF | 11) |
79 | #define PF10_PF_PC_RST (GPIO_PORTF | GPIO_PF | 10) | 76 | #define PF12_PF_PC_BVD1 (GPIO_PORTF | GPIO_PF | 12) |
80 | #define PF11_PF_PC_BVD2 (GPIO_PORTF | GPIO_PF | 11) | 77 | #define PF13_PF_PC_VS2 (GPIO_PORTF | GPIO_PF | 13) |
81 | #define PF12_PF_PC_BVD1 (GPIO_PORTF | GPIO_PF | 12) | 78 | #define PF14_PF_PC_VS1 (GPIO_PORTF | GPIO_PF | 14) |
82 | #define PF13_PF_PC_VS2 (GPIO_PORTF | GPIO_PF | 13) | 79 | #define PF16_PF_PC_PWRON (GPIO_PORTF | GPIO_PF | 16) |
83 | #define PF14_PF_PC_VS1 (GPIO_PORTF | GPIO_PF | 14) | 80 | #define PF17_PF_PC_READY (GPIO_PORTF | GPIO_PF | 17) |
84 | #define PF16_PF_PC_PWRON (GPIO_PORTF | GPIO_PF | 16) | 81 | #define PF18_PF_PC_WAIT (GPIO_PORTF | GPIO_PF | 18) |
85 | #define PF17_PF_PC_READY (GPIO_PORTF | GPIO_PF | 17) | 82 | #define PF19_PF_PC_CD2 (GPIO_PORTF | GPIO_PF | 19) |
86 | #define PF18_PF_PC_WAIT (GPIO_PORTF | GPIO_PF | 18) | 83 | #define PF20_PF_PC_CD1 (GPIO_PORTF | GPIO_PF | 20) |
87 | #define PF19_PF_PC_CD2 (GPIO_PORTF | GPIO_PF | 19) | 84 | #define PF23_PF_ATA_DATA15 (GPIO_PORTF | GPIO_PF | 23) |
88 | #define PF20_PF_PC_CD1 (GPIO_PORTF | GPIO_PF | 20) | ||
89 | #define PF23_PF_ATA_DATA15 (GPIO_PORTF | GPIO_PF | 23) | ||
90 | 85 | ||
91 | /* Alternate GPIO pin functions */ | 86 | /* Alternate GPIO pin functions */ |
92 | 87 | ||
93 | #define PB4_AF_MSHC_DATA0 (GPIO_PORTB | GPIO_AF | GPIO_OUT | 4) | 88 | #define PB4_AF_MSHC_DATA0 (GPIO_PORTB | GPIO_AF | GPIO_OUT | 4) |
94 | #define PB5_AF_MSHC_DATA1 (GPIO_PORTB | GPIO_AF | GPIO_OUT | 5) | 89 | #define PB5_AF_MSHC_DATA1 (GPIO_PORTB | GPIO_AF | GPIO_OUT | 5) |
95 | #define PB6_AF_MSHC_DATA2 (GPIO_PORTB | GPIO_AF | GPIO_OUT | 6) | 90 | #define PB6_AF_MSHC_DATA2 (GPIO_PORTB | GPIO_AF | GPIO_OUT | 6) |
96 | #define PB7_AF_MSHC_DATA4 (GPIO_PORTB | GPIO_AF | GPIO_OUT | 7) | 91 | #define PB7_AF_MSHC_DATA4 (GPIO_PORTB | GPIO_AF | GPIO_OUT | 7) |
97 | #define PB8_AF_MSHC_BS (GPIO_PORTB | GPIO_AF | GPIO_OUT | 8) | 92 | #define PB8_AF_MSHC_BS (GPIO_PORTB | GPIO_AF | GPIO_OUT | 8) |
98 | #define PB9_AF_MSHC_SCLK (GPIO_PORTB | GPIO_AF | GPIO_OUT | 9) | 93 | #define PB9_AF_MSHC_SCLK (GPIO_PORTB | GPIO_AF | GPIO_OUT | 9) |
99 | #define PB10_AF_UART6_TXD (GPIO_PORTB | GPIO_AF | GPIO_OUT | 10) | 94 | #define PB10_AF_UART6_TXD (GPIO_PORTB | GPIO_AF | GPIO_OUT | 10) |
100 | #define PB11_AF_UART6_RXD (GPIO_PORTB | GPIO_AF | GPIO_IN | 11) | 95 | #define PB11_AF_UART6_RXD (GPIO_PORTB | GPIO_AF | GPIO_IN | 11) |
101 | #define PB12_AF_UART6_CTS (GPIO_PORTB | GPIO_AF | GPIO_OUT | 12) | 96 | #define PB12_AF_UART6_CTS (GPIO_PORTB | GPIO_AF | GPIO_OUT | 12) |
102 | #define PB13_AF_UART6_RTS (GPIO_PORTB | GPIO_AF | GPIO_IN | 13) | 97 | #define PB13_AF_UART6_RTS (GPIO_PORTB | GPIO_AF | GPIO_IN | 13) |
103 | #define PB18_AF_UART5_TXD (GPIO_PORTB | GPIO_AF | GPIO_OUT | 18) | 98 | #define PB18_AF_UART5_TXD (GPIO_PORTB | GPIO_AF | GPIO_OUT | 18) |
104 | #define PB19_AF_UART5_RXD (GPIO_PORTB | GPIO_AF | GPIO_IN | 19) | 99 | #define PB19_AF_UART5_RXD (GPIO_PORTB | GPIO_AF | GPIO_IN | 19) |
105 | #define PB20_AF_UART5_CTS (GPIO_PORTB | GPIO_AF | GPIO_OUT | 20) | 100 | #define PB20_AF_UART5_CTS (GPIO_PORTB | GPIO_AF | GPIO_OUT | 20) |
106 | #define PB21_AF_UART5_RTS (GPIO_PORTB | GPIO_AF | GPIO_IN | 21) | 101 | #define PB21_AF_UART5_RTS (GPIO_PORTB | GPIO_AF | GPIO_IN | 21) |
107 | #define PC8_AF_FEC_MDIO (GPIO_PORTC | GPIO_AF | GPIO_IN | 8) | 102 | #define PC8_AF_FEC_MDIO (GPIO_PORTC | GPIO_AF | GPIO_IN | 8) |
108 | #define PC24_AF_GPT5_TOUT (GPIO_PORTC | GPIO_AF | 24) | 103 | #define PC24_AF_GPT5_TOUT (GPIO_PORTC | GPIO_AF | 24) |
109 | #define PC26_AF_GPT4_TOUT (GPIO_PORTC | GPIO_AF | 26) | 104 | #define PC25_AF_GPT5_TIN (GPIO_PORTC | GPIO_AF | 25) |
110 | #define PD1_AF_ETMTRACE_PKT15 (GPIO_PORTD | GPIO_AF | 1) | 105 | #define PC26_AF_GPT4_TOUT (GPIO_PORTC | GPIO_AF | 26) |
111 | #define PD6_AF_ETMTRACE_PKT14 (GPIO_PORTD | GPIO_AF | 6) | 106 | #define PC27_AF_GPT4_TIN (GPIO_PORTC | GPIO_AF | 27) |
112 | #define PD7_AF_ETMTRACE_PKT13 (GPIO_PORTD | GPIO_AF | 7) | 107 | #define PD1_AF_ETMTRACE_PKT15 (GPIO_PORTD | GPIO_AF | 1) |
113 | #define PD9_AF_ETMTRACE_PKT12 (GPIO_PORTD | GPIO_AF | 9) | 108 | #define PD6_AF_ETMTRACE_PKT14 (GPIO_PORTD | GPIO_AF | 6) |
114 | #define PD2_AF_SD3_D0 (GPIO_PORTD | GPIO_AF | 2) | 109 | #define PD7_AF_ETMTRACE_PKT13 (GPIO_PORTD | GPIO_AF | 7) |
115 | #define PD3_AF_SD3_D1 (GPIO_PORTD | GPIO_AF | 3) | 110 | #define PD9_AF_ETMTRACE_PKT12 (GPIO_PORTD | GPIO_AF | 9) |
116 | #define PD4_AF_SD3_D2 (GPIO_PORTD | GPIO_AF | 4) | 111 | #define PD2_AF_SD3_D0 (GPIO_PORTD | GPIO_AF | 2) |
117 | #define PD5_AF_SD3_D3 (GPIO_PORTD | GPIO_AF | 5) | 112 | #define PD3_AF_SD3_D1 (GPIO_PORTD | GPIO_AF | 3) |
118 | #define PD8_AF_FEC_MDIO (GPIO_PORTD | GPIO_AF | GPIO_IN | 8) | 113 | #define PD4_AF_SD3_D2 (GPIO_PORTD | GPIO_AF | 4) |
119 | #define PD10_AF_ETMTRACE_PKT11 (GPIO_PORTD | GPIO_AF | 10) | 114 | #define PD5_AF_SD3_D3 (GPIO_PORTD | GPIO_AF | 5) |
120 | #define PD11_AF_ETMTRACE_PKT10 (GPIO_PORTD | GPIO_AF | 11) | 115 | #define PD8_AF_FEC_MDIO (GPIO_PORTD | GPIO_AF | GPIO_IN | 8) |
121 | #define PD12_AF_ETMTRACE_PKT9 (GPIO_PORTD | GPIO_AF | 12) | 116 | #define PD10_AF_ETMTRACE_PKT11 (GPIO_PORTD | GPIO_AF | 10) |
122 | #define PD13_AF_ETMTRACE_PKT8 (GPIO_PORTD | GPIO_AF | 13) | 117 | #define PD11_AF_ETMTRACE_PKT10 (GPIO_PORTD | GPIO_AF | 11) |
123 | #define PD14_AF_ETMTRACE_PKT7 (GPIO_PORTD | GPIO_AF | 14) | 118 | #define PD12_AF_ETMTRACE_PKT9 (GPIO_PORTD | GPIO_AF | 12) |
124 | #define PD15_AF_ETMTRACE_PKT6 (GPIO_PORTD | GPIO_AF | 15) | 119 | #define PD13_AF_ETMTRACE_PKT8 (GPIO_PORTD | GPIO_AF | 13) |
125 | #define PD16_AF_ETMTRACE_PKT5 (GPIO_PORTD | GPIO_AF | 16) | 120 | #define PD14_AF_ETMTRACE_PKT7 (GPIO_PORTD | GPIO_AF | 14) |
126 | #define PF1_AF_ETMTRACE_PKT0 (GPIO_PORTF | GPIO_AF | 1) | 121 | #define PD15_AF_ETMTRACE_PKT6 (GPIO_PORTD | GPIO_AF | 15) |
127 | #define PF3_AF_ETMTRACE_PKT2 (GPIO_PORTF | GPIO_AF | 3) | 122 | #define PD16_AF_ETMTRACE_PKT5 (GPIO_PORTD | GPIO_AF | 16) |
128 | #define PF5_AF_ETMPIPESTAT11 (GPIO_PORTF | GPIO_AF | 5) | 123 | #define PF1_AF_ETMTRACE_PKT0 (GPIO_PORTF | GPIO_AF | 1) |
129 | #define PF7_AF_ATA_BUFFER_EN (GPIO_PORTF | GPIO_AF | 7) | 124 | #define PF3_AF_ETMTRACE_PKT2 (GPIO_PORTF | GPIO_AF | 3) |
130 | #define PF8_AF_ATA_IORDY (GPIO_PORTF | GPIO_AF | 8) | 125 | #define PF5_AF_ETMPIPESTAT11 (GPIO_PORTF | GPIO_AF | 5) |
131 | #define PF9_AF_ATA_INTRQ (GPIO_PORTF | GPIO_AF | 9) | 126 | #define PF7_AF_ATA_BUFFER_EN (GPIO_PORTF | GPIO_AF | 7) |
132 | #define PF10_AF_ATA_RESET (GPIO_PORTF | GPIO_AF | 10) | 127 | #define PF8_AF_ATA_IORDY (GPIO_PORTF | GPIO_AF | 8) |
133 | #define PF11_AF_ATA_DMACK (GPIO_PORTF | GPIO_AF | 11) | 128 | #define PF9_AF_ATA_INTRQ (GPIO_PORTF | GPIO_AF | 9) |
134 | #define PF12_AF_ATA_DMAREQ (GPIO_PORTF | GPIO_AF | 12) | 129 | #define PF10_AF_ATA_RESET (GPIO_PORTF | GPIO_AF | 10) |
135 | #define PF13_AF_ATA_DA0 (GPIO_PORTF | GPIO_AF | 13) | 130 | #define PF11_AF_ATA_DMACK (GPIO_PORTF | GPIO_AF | 11) |
136 | #define PF14_AF_ATA_DA1 (GPIO_PORTF | GPIO_AF | 14) | 131 | #define PF12_AF_ATA_DMAREQ (GPIO_PORTF | GPIO_AF | 12) |
137 | #define PF15_AF_ETMTRACE_SYNC (GPIO_PORTF | GPIO_AF | 15) | 132 | #define PF13_AF_ATA_DA0 (GPIO_PORTF | GPIO_AF | 13) |
138 | #define PF16_AF_ATA_DA2 (GPIO_PORTF | GPIO_AF | 16) | 133 | #define PF14_AF_ATA_DA1 (GPIO_PORTF | GPIO_AF | 14) |
139 | #define PF17_AF_ATA_CS0 (GPIO_PORTF | GPIO_AF | 17) | 134 | #define PF15_AF_ETMTRACE_SYNC (GPIO_PORTF | GPIO_AF | 15) |
140 | #define PF18_AF_ATA_CS1 (GPIO_PORTF | GPIO_AF | 18) | 135 | #define PF16_AF_ATA_DA2 (GPIO_PORTF | GPIO_AF | 16) |
141 | #define PF19_AF_ATA_DIOW (GPIO_PORTF | GPIO_AF | 19) | 136 | #define PF17_AF_ATA_CS0 (GPIO_PORTF | GPIO_AF | 17) |
142 | #define PF20_AF_ATA_DIOR (GPIO_PORTF | GPIO_AF | 20) | 137 | #define PF18_AF_ATA_CS1 (GPIO_PORTF | GPIO_AF | 18) |
143 | #define PF22_AF_ETMTRACE_CLK (GPIO_PORTF | GPIO_AF | 22) | 138 | #define PF19_AF_ATA_DIOW (GPIO_PORTF | GPIO_AF | 19) |
144 | #define PF23_AF_ETMTRACE_PKT4 (GPIO_PORTF | GPIO_AF | 23) | 139 | #define PF20_AF_ATA_DIOR (GPIO_PORTF | GPIO_AF | 20) |
140 | #define PF22_AF_ETMTRACE_CLK (GPIO_PORTF | GPIO_AF | 22) | ||
141 | #define PF23_AF_ETMTRACE_PKT4 (GPIO_PORTF | GPIO_AF | 23) | ||
145 | 142 | ||
146 | /* AIN GPIO pin functions */ | 143 | /* AIN GPIO pin functions */ |
147 | 144 | ||
148 | #define PC14_AIN_SSI1_MCLK (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 14) | 145 | #define PC14_AIN_SSI1_MCLK (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 14) |
149 | #define PC15_AIN_GPT6_TOUT (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 15) | 146 | #define PC15_AIN_GPT6_TOUT (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 15) |
150 | #define PD0_AIN_FEC_TXD0 (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 0) | 147 | #define PD0_AIN_FEC_TXD0 (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 0) |
151 | #define PD1_AIN_FEC_TXD1 (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 1) | 148 | #define PD1_AIN_FEC_TXD1 (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 1) |
152 | #define PD2_AIN_FEC_TXD2 (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 2) | 149 | #define PD2_AIN_FEC_TXD2 (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 2) |
153 | #define PD3_AIN_FEC_TXD3 (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 3) | 150 | #define PD3_AIN_FEC_TXD3 (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 3) |
154 | #define PD9_AIN_FEC_MDC (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 9) | 151 | #define PD9_AIN_FEC_MDC (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 9) |
155 | #define PD16_AIN_FEC_TX_ER (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 16) | 152 | #define PD16_AIN_FEC_TX_ER (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 16) |
156 | #define PD27_AIN_EXT_DMA_GRANT (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 27) | 153 | #define PD27_AIN_EXT_DMA_GRANT (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 27) |
157 | #define PF23_AIN_FEC_TX_EN (GPIO_PORTF | GPIO_AIN | GPIO_OUT | 23) | 154 | #define PF23_AIN_FEC_TX_EN (GPIO_PORTF | GPIO_AIN | GPIO_OUT | 23) |
158 | 155 | ||
159 | /* BIN GPIO pin functions */ | 156 | /* BIN GPIO pin functions */ |
160 | 157 | ||
161 | #define PC14_BIN_SSI2_MCLK (GPIO_PORTC | GPIO_BIN | GPIO_OUT | 14) | 158 | #define PC14_BIN_SSI2_MCLK (GPIO_PORTC | GPIO_BIN | GPIO_OUT | 14) |
162 | 159 | ||
163 | /* CIN GPIO pin functions */ | 160 | /* CIN GPIO pin functions */ |
164 | 161 | ||
165 | #define PD2_CIN_SLCDC1_DAT0 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 2) | 162 | #define PD2_CIN_SLCDC1_DAT0 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 2) |
166 | #define PD3_CIN_SLCDC1_DAT1 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 3) | 163 | #define PD3_CIN_SLCDC1_DAT1 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 3) |
167 | #define PD4_CIN_SLCDC1_DAT2 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 4) | 164 | #define PD4_CIN_SLCDC1_DAT2 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 4) |
168 | #define PD5_CIN_SLCDC1_DAT3 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 5) | 165 | #define PD5_CIN_SLCDC1_DAT3 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 5) |
169 | #define PD6_CIN_SLCDC1_DAT4 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 6) | 166 | #define PD6_CIN_SLCDC1_DAT4 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 6) |
170 | #define PD7_CIN_SLCDC1_DAT5 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 7) | 167 | #define PD7_CIN_SLCDC1_DAT5 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 7) |
171 | #define PD8_CIN_SLCDC1_DAT6 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 8) | 168 | #define PD8_CIN_SLCDC1_DAT6 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 8) |
172 | #define PD9_CIN_SLCDC1_DAT7 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 9) | 169 | #define PD9_CIN_SLCDC1_DAT7 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 9) |
173 | #define PD10_CIN_SLCDC1_DAT8 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 10) | 170 | #define PD10_CIN_SLCDC1_DAT8 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 10) |
174 | #define PD11_CIN_SLCDC1_DAT9 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 11) | 171 | #define PD11_CIN_SLCDC1_DAT9 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 11) |
175 | #define PD12_CIN_SLCDC1_DAT10 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 12) | 172 | #define PD12_CIN_SLCDC1_DAT10 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 12) |
176 | #define PD13_CIN_SLCDC1_DAT11 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 13) | 173 | #define PD13_CIN_SLCDC1_DAT11 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 13) |
177 | #define PD14_CIN_SLCDC1_DAT12 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 14) | 174 | #define PD14_CIN_SLCDC1_DAT12 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 14) |
178 | #define PD15_CIN_SLCDC1_DAT13 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 15) | 175 | #define PD15_CIN_SLCDC1_DAT13 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 15) |
179 | #define PD16_CIN_SLCDC1_DAT14 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 16) | 176 | #define PD16_CIN_SLCDC1_DAT14 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 16) |
180 | #define PD23_CIN_SLCDC1_DAT15 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 23) | 177 | #define PD23_CIN_SLCDC1_DAT15 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 23) |
181 | #define PF27_CIN_EXT_DMA_GRANT (GPIO_PORTF | GPIO_CIN | GPIO_OUT | 27) | 178 | #define PF27_CIN_EXT_DMA_GRANT (GPIO_PORTF | GPIO_CIN | GPIO_OUT | 27) |
182 | /* LCDC_TESTx on PBxx omitted, because it's not clear what they do */ | 179 | /* LCDC_TESTx on PBxx omitted, because it's not clear what they do */ |
183 | 180 | ||
184 | /* AOUT GPIO pin functions */ | 181 | /* AOUT GPIO pin functions */ |
185 | 182 | ||
186 | #define PC14_AOUT_GPT6_TIN (GPIO_PORTC | GPIO_AOUT | GPIO_IN | 14) | 183 | #define PC14_AOUT_GPT6_TIN (GPIO_PORTC | GPIO_AOUT | GPIO_IN | 14) |
187 | #define PD4_AOUT_FEC_RX_ER (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 4) | 184 | #define PD4_AOUT_FEC_RX_ER (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 4) |
188 | #define PD5_AOUT_FEC_RXD1 (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 5) | 185 | #define PD5_AOUT_FEC_RXD1 (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 5) |
189 | #define PD6_AOUT_FEC_RXD2 (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 6) | 186 | #define PD6_AOUT_FEC_RXD2 (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 6) |
190 | #define PD7_AOUT_FEC_RXD3 (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 7) | 187 | #define PD7_AOUT_FEC_RXD3 (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 7) |
191 | #define PD10_AOUT_FEC_CRS (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 10) | 188 | #define PD10_AOUT_FEC_CRS (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 10) |
192 | #define PD11_AOUT_FEC_TX_CLK (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 11) | 189 | #define PD11_AOUT_FEC_TX_CLK (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 11) |
193 | #define PD12_AOUT_FEC_RXD0 (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 12) | 190 | #define PD12_AOUT_FEC_RXD0 (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 12) |
194 | #define PD13_AOUT_FEC_RX_DV (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 13) | 191 | #define PD13_AOUT_FEC_RX_DV (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 13) |
195 | #define PD14_AOUT_FEC_RX_CLK (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 14) | 192 | #define PD14_AOUT_FEC_RX_CLK (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 14) |
196 | #define PD15_AOUT_FEC_COL (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 15) | 193 | #define PD15_AOUT_FEC_COL (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 15) |
197 | 194 | ||
198 | #define PC17_BOUT_PC_IOIS16 (GPIO_PORTC | GPIO_BOUT | GPIO_IN | 17) | 195 | /* BOUT GPIO pin functions */ |
199 | #define PC18_BOUT_PC_BVD2 (GPIO_PORTC | GPIO_BOUT | GPIO_IN | 18) | 196 | |
200 | #define PC19_BOUT_PC_BVD1 (GPIO_PORTC | GPIO_BOUT | GPIO_IN | 19) | 197 | #define PC17_BOUT_PC_IOIS16 (GPIO_PORTC | GPIO_BOUT | GPIO_IN | 17) |
201 | #define PC28_BOUT_PC_BVD2 (GPIO_PORTC | GPIO_BOUT | GPIO_IN | 28) | 198 | #define PC18_BOUT_PC_BVD2 (GPIO_PORTC | GPIO_BOUT | GPIO_IN | 18) |
202 | #define PC29_BOUT_PC_VS1 (GPIO_PORTC | GPIO_BOUT | GPIO_IN | 29) | 199 | #define PC19_BOUT_PC_BVD1 (GPIO_PORTC | GPIO_BOUT | GPIO_IN | 19) |
203 | #define PC30_BOUT_PC_READY (GPIO_PORTC | GPIO_BOUT | GPIO_IN | 30) | 200 | #define PC28_BOUT_PC_BVD2 (GPIO_PORTC | GPIO_BOUT | GPIO_IN | 28) |
204 | #define PC31_BOUT_PC_WAIT (GPIO_PORTC | GPIO_BOUT | GPIO_IN | 31) | 201 | #define PC29_BOUT_PC_VS1 (GPIO_PORTC | GPIO_BOUT | GPIO_IN | 29) |
205 | 202 | #define PC30_BOUT_PC_READY (GPIO_PORTC | GPIO_BOUT | GPIO_IN | 30) | |
206 | 203 | #define PC31_BOUT_PC_WAIT (GPIO_PORTC | GPIO_BOUT | GPIO_IN | 31) | |
207 | #endif /* _MXC_GPIO_MX1_MX2_H */ | 204 | |
205 | #endif /* __MACH_IOMUX_MX27_H__ */ | ||
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx2x.h b/arch/arm/plat-mxc/include/mach/iomux-mx2x.h index fb5ae638e79f..c4f116d214f2 100644 --- a/arch/arm/plat-mxc/include/mach/iomux-mx2x.h +++ b/arch/arm/plat-mxc/include/mach/iomux-mx2x.h | |||
@@ -1,237 +1,230 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2008 by Sascha Hauer <kernel@pengutronix.de> | 2 | * Copyright (C) 2008 by Sascha Hauer <kernel@pengutronix.de> |
3 | * Copyright (C) 2009 by Holger Schurig <hs4233@mail.mn-solutions.de> | 3 | * Copyright (C) 2009 by Holger Schurig <hs4233@mail.mn-solutions.de> |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or | 5 | * This program is free software; you can redistribute it and/or |
6 | * modify it under the terms of the GNU General Public License | 6 | * modify it under the terms of the GNU General Public License |
7 | * as published by the Free Software Foundation; either version 2 | 7 | * as published by the Free Software Foundation; either version 2 |
8 | * of the License, or (at your option) any later version. | 8 | * of the License, or (at your option) any later version. |
9 | * This program is distributed in the hope that it will be useful, | 9 | * This program is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. |
13 | * | 13 | * |
14 | * You should have received a copy of the GNU General Public License | 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 | 15 | * along with this program; if not, write to the Free Software |
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
17 | * MA 02110-1301, USA. | 17 | * MA 02110-1301, USA. |
18 | */ | 18 | */ |
19 | 19 | #ifndef __MACH_IOMUX_MX2x_H__ | |
20 | #ifndef _MXC_IOMUX_MX2x_H | 20 | #define __MACH_IOMUX_MX2x_H__ |
21 | #define _MXC_IOMUX_MX2x_H | ||
22 | |||
23 | #ifndef GPIO_PORTA | ||
24 | #error Please include mach/iomux.h | ||
25 | #endif | ||
26 | |||
27 | 21 | ||
28 | /* Primary GPIO pin functions */ | 22 | /* Primary GPIO pin functions */ |
29 | 23 | ||
30 | #define PA5_PF_LSCLK (GPIO_PORTA | GPIO_PF | GPIO_OUT | 5) | 24 | #define PA5_PF_LSCLK (GPIO_PORTA | GPIO_PF | GPIO_OUT | 5) |
31 | #define PA6_PF_LD0 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 6) | 25 | #define PA6_PF_LD0 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 6) |
32 | #define PA7_PF_LD1 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 7) | 26 | #define PA7_PF_LD1 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 7) |
33 | #define PA8_PF_LD2 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 8) | 27 | #define PA8_PF_LD2 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 8) |
34 | #define PA9_PF_LD3 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 9) | 28 | #define PA9_PF_LD3 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 9) |
35 | #define PA10_PF_LD4 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 10) | 29 | #define PA10_PF_LD4 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 10) |
36 | #define PA11_PF_LD5 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 11) | 30 | #define PA11_PF_LD5 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 11) |
37 | #define PA12_PF_LD6 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 12) | 31 | #define PA12_PF_LD6 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 12) |
38 | #define PA13_PF_LD7 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 13) | 32 | #define PA13_PF_LD7 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 13) |
39 | #define PA14_PF_LD8 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 14) | 33 | #define PA14_PF_LD8 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 14) |
40 | #define PA15_PF_LD9 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 15) | 34 | #define PA15_PF_LD9 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 15) |
41 | #define PA16_PF_LD10 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 16) | 35 | #define PA16_PF_LD10 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 16) |
42 | #define PA17_PF_LD11 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 17) | 36 | #define PA17_PF_LD11 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 17) |
43 | #define PA18_PF_LD12 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 18) | 37 | #define PA18_PF_LD12 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 18) |
44 | #define PA19_PF_LD13 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 19) | 38 | #define PA19_PF_LD13 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 19) |
45 | #define PA20_PF_LD14 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 20) | 39 | #define PA20_PF_LD14 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 20) |
46 | #define PA21_PF_LD15 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 21) | 40 | #define PA21_PF_LD15 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 21) |
47 | #define PA22_PF_LD16 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 22) | 41 | #define PA22_PF_LD16 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 22) |
48 | #define PA23_PF_LD17 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 23) | 42 | #define PA23_PF_LD17 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 23) |
49 | #define PA24_PF_REV (GPIO_PORTA | GPIO_PF | GPIO_OUT | 24) | 43 | #define PA24_PF_REV (GPIO_PORTA | GPIO_PF | GPIO_OUT | 24) |
50 | #define PA25_PF_CLS (GPIO_PORTA | GPIO_PF | GPIO_OUT | 25) | 44 | #define PA25_PF_CLS (GPIO_PORTA | GPIO_PF | GPIO_OUT | 25) |
51 | #define PA26_PF_PS (GPIO_PORTA | GPIO_PF | GPIO_OUT | 26) | 45 | #define PA26_PF_PS (GPIO_PORTA | GPIO_PF | GPIO_OUT | 26) |
52 | #define PA27_PF_SPL_SPR (GPIO_PORTA | GPIO_PF | GPIO_OUT | 27) | 46 | #define PA27_PF_SPL_SPR (GPIO_PORTA | GPIO_PF | GPIO_OUT | 27) |
53 | #define PA28_PF_HSYNC (GPIO_PORTA | GPIO_PF | GPIO_OUT | 28) | 47 | #define PA28_PF_HSYNC (GPIO_PORTA | GPIO_PF | GPIO_OUT | 28) |
54 | #define PA29_PF_VSYNC (GPIO_PORTA | GPIO_PF | GPIO_OUT | 29) | 48 | #define PA29_PF_VSYNC (GPIO_PORTA | GPIO_PF | GPIO_OUT | 29) |
55 | #define PA30_PF_CONTRAST (GPIO_PORTA | GPIO_PF | GPIO_OUT | 30) | 49 | #define PA30_PF_CONTRAST (GPIO_PORTA | GPIO_PF | GPIO_OUT | 30) |
56 | #define PA31_PF_OE_ACD (GPIO_PORTA | GPIO_PF | GPIO_OUT | 31) | 50 | #define PA31_PF_OE_ACD (GPIO_PORTA | GPIO_PF | GPIO_OUT | 31) |
57 | #define PB4_PF_SD2_D0 (GPIO_PORTB | GPIO_PF | 4) | 51 | #define PB4_PF_SD2_D0 (GPIO_PORTB | GPIO_PF | 4) |
58 | #define PB5_PF_SD2_D1 (GPIO_PORTB | GPIO_PF | 5) | 52 | #define PB5_PF_SD2_D1 (GPIO_PORTB | GPIO_PF | 5) |
59 | #define PB6_PF_SD2_D2 (GPIO_PORTB | GPIO_PF | 6) | 53 | #define PB6_PF_SD2_D2 (GPIO_PORTB | GPIO_PF | 6) |
60 | #define PB7_PF_SD2_D3 (GPIO_PORTB | GPIO_PF | 7) | 54 | #define PB7_PF_SD2_D3 (GPIO_PORTB | GPIO_PF | 7) |
61 | #define PB8_PF_SD2_CMD (GPIO_PORTB | GPIO_PF | 8) | 55 | #define PB8_PF_SD2_CMD (GPIO_PORTB | GPIO_PF | 8) |
62 | #define PB9_PF_SD2_CLK (GPIO_PORTB | GPIO_PF | 9) | 56 | #define PB9_PF_SD2_CLK (GPIO_PORTB | GPIO_PF | 9) |
63 | #define PB10_PF_CSI_D0 (GPIO_PORTB | GPIO_PF | GPIO_OUT | 10) | 57 | #define PB10_PF_CSI_D0 (GPIO_PORTB | GPIO_PF | GPIO_OUT | 10) |
64 | #define PB11_PF_CSI_D1 (GPIO_PORTB | GPIO_PF | GPIO_OUT | 11) | 58 | #define PB11_PF_CSI_D1 (GPIO_PORTB | GPIO_PF | GPIO_OUT | 11) |
65 | #define PB12_PF_CSI_D2 (GPIO_PORTB | GPIO_PF | GPIO_OUT | 12) | 59 | #define PB12_PF_CSI_D2 (GPIO_PORTB | GPIO_PF | GPIO_OUT | 12) |
66 | #define PB13_PF_CSI_D3 (GPIO_PORTB | GPIO_PF | GPIO_OUT | 13) | 60 | #define PB13_PF_CSI_D3 (GPIO_PORTB | GPIO_PF | GPIO_OUT | 13) |
67 | #define PB14_PF_CSI_D4 (GPIO_PORTB | GPIO_PF | GPIO_OUT | 14) | 61 | #define PB14_PF_CSI_D4 (GPIO_PORTB | GPIO_PF | GPIO_OUT | 14) |
68 | #define PB15_PF_CSI_MCLK (GPIO_PORTB | GPIO_PF | GPIO_OUT | 15) | 62 | #define PB15_PF_CSI_MCLK (GPIO_PORTB | GPIO_PF | GPIO_OUT | 15) |
69 | #define PB16_PF_CSI_PIXCLK (GPIO_PORTB | GPIO_PF | GPIO_OUT | 16) | 63 | #define PB16_PF_CSI_PIXCLK (GPIO_PORTB | GPIO_PF | GPIO_OUT | 16) |
70 | #define PB17_PF_CSI_D5 (GPIO_PORTB | GPIO_PF | GPIO_OUT | 17) | 64 | #define PB17_PF_CSI_D5 (GPIO_PORTB | GPIO_PF | GPIO_OUT | 17) |
71 | #define PB18_PF_CSI_D6 (GPIO_PORTB | GPIO_PF | GPIO_OUT | 18) | 65 | #define PB18_PF_CSI_D6 (GPIO_PORTB | GPIO_PF | GPIO_OUT | 18) |
72 | #define PB19_PF_CSI_D7 (GPIO_PORTB | GPIO_PF | GPIO_OUT | 19) | 66 | #define PB19_PF_CSI_D7 (GPIO_PORTB | GPIO_PF | GPIO_OUT | 19) |
73 | #define PB20_PF_CSI_VSYNC (GPIO_PORTB | GPIO_PF | GPIO_OUT | 20) | 67 | #define PB20_PF_CSI_VSYNC (GPIO_PORTB | GPIO_PF | GPIO_OUT | 20) |
74 | #define PB21_PF_CSI_HSYNC (GPIO_PORTB | GPIO_PF | GPIO_OUT | 21) | 68 | #define PB21_PF_CSI_HSYNC (GPIO_PORTB | GPIO_PF | GPIO_OUT | 21) |
75 | #define PB23_PF_USB_PWR (GPIO_PORTB | GPIO_PF | 23) | 69 | #define PB23_PF_USB_PWR (GPIO_PORTB | GPIO_PF | 23) |
76 | #define PB24_PF_USB_OC (GPIO_PORTB | GPIO_PF | 24) | 70 | #define PB24_PF_USB_OC (GPIO_PORTB | GPIO_PF | 24) |
77 | #define PB26_PF_USBH1_FS (GPIO_PORTB | GPIO_PF | 26) | 71 | #define PB26_PF_USBH1_FS (GPIO_PORTB | GPIO_PF | 26) |
78 | #define PB27_PF_USBH1_OE (GPIO_PORTB | GPIO_PF | 27) | 72 | #define PB27_PF_USBH1_OE (GPIO_PORTB | GPIO_PF | 27) |
79 | #define PB28_PF_USBH1_TXDM (GPIO_PORTB | GPIO_PF | 28) | 73 | #define PB28_PF_USBH1_TXDM (GPIO_PORTB | GPIO_PF | 28) |
80 | #define PB29_PF_USBH1_TXDP (GPIO_PORTB | GPIO_PF | 29) | 74 | #define PB29_PF_USBH1_TXDP (GPIO_PORTB | GPIO_PF | 29) |
81 | #define PB30_PF_USBH1_RXDM (GPIO_PORTB | GPIO_PF | 30) | 75 | #define PB30_PF_USBH1_RXDM (GPIO_PORTB | GPIO_PF | 30) |
82 | #define PB31_PF_USBH1_RXDP (GPIO_PORTB | GPIO_PF | 31) | 76 | #define PB31_PF_USBH1_RXDP (GPIO_PORTB | GPIO_PF | 31) |
83 | #define PC14_PF_TOUT (GPIO_PORTC | GPIO_PF | 14) | 77 | #define PC14_PF_TOUT (GPIO_PORTC | GPIO_PF | 14) |
84 | #define PC15_PF_TIN (GPIO_PORTC | GPIO_PF | 15) | 78 | #define PC15_PF_TIN (GPIO_PORTC | GPIO_PF | 15) |
85 | #define PC20_PF_SSI1_FS (GPIO_PORTC | GPIO_PF | GPIO_IN | 20) | 79 | #define PC20_PF_SSI1_FS (GPIO_PORTC | GPIO_PF | GPIO_IN | 20) |
86 | #define PC21_PF_SSI1_RXD (GPIO_PORTC | GPIO_PF | GPIO_IN | 21) | 80 | #define PC21_PF_SSI1_RXD (GPIO_PORTC | GPIO_PF | GPIO_IN | 21) |
87 | #define PC22_PF_SSI1_TXD (GPIO_PORTC | GPIO_PF | GPIO_IN | 22) | 81 | #define PC22_PF_SSI1_TXD (GPIO_PORTC | GPIO_PF | GPIO_IN | 22) |
88 | #define PC23_PF_SSI1_CLK (GPIO_PORTC | GPIO_PF | GPIO_IN | 23) | 82 | #define PC23_PF_SSI1_CLK (GPIO_PORTC | GPIO_PF | GPIO_IN | 23) |
89 | #define PC24_PF_SSI2_FS (GPIO_PORTC | GPIO_PF | GPIO_IN | 24) | 83 | #define PC24_PF_SSI2_FS (GPIO_PORTC | GPIO_PF | GPIO_IN | 24) |
90 | #define PC25_PF_SSI2_RXD (GPIO_PORTC | GPIO_PF | GPIO_IN | 25) | 84 | #define PC25_PF_SSI2_RXD (GPIO_PORTC | GPIO_PF | GPIO_IN | 25) |
91 | #define PC26_PF_SSI2_TXD (GPIO_PORTC | GPIO_PF | GPIO_IN | 26) | 85 | #define PC26_PF_SSI2_TXD (GPIO_PORTC | GPIO_PF | GPIO_IN | 26) |
92 | #define PC27_PF_SSI2_CLK (GPIO_PORTC | GPIO_PF | GPIO_IN | 27) | 86 | #define PC27_PF_SSI2_CLK (GPIO_PORTC | GPIO_PF | GPIO_IN | 27) |
93 | #define PC28_PF_SSI3_FS (GPIO_PORTC | GPIO_PF | GPIO_IN | 28) | 87 | #define PC28_PF_SSI3_FS (GPIO_PORTC | GPIO_PF | GPIO_IN | 28) |
94 | #define PC29_PF_SSI3_RXD (GPIO_PORTC | GPIO_PF | GPIO_IN | 29) | 88 | #define PC29_PF_SSI3_RXD (GPIO_PORTC | GPIO_PF | GPIO_IN | 29) |
95 | #define PC30_PF_SSI3_TXD (GPIO_PORTC | GPIO_PF | GPIO_IN | 30) | 89 | #define PC30_PF_SSI3_TXD (GPIO_PORTC | GPIO_PF | GPIO_IN | 30) |
96 | #define PC31_PF_SSI3_CLK (GPIO_PORTC | GPIO_PF | GPIO_IN | 31) | 90 | #define PC31_PF_SSI3_CLK (GPIO_PORTC | GPIO_PF | GPIO_IN | 31) |
97 | #define PD17_PF_I2C_DATA (GPIO_PORTD | GPIO_PF | GPIO_OUT | 17) | 91 | #define PD17_PF_I2C_DATA (GPIO_PORTD | GPIO_PF | GPIO_OUT | 17) |
98 | #define PD18_PF_I2C_CLK (GPIO_PORTD | GPIO_PF | GPIO_OUT | 18) | 92 | #define PD18_PF_I2C_CLK (GPIO_PORTD | GPIO_PF | GPIO_OUT | 18) |
99 | #define PD19_PF_CSPI2_SS2 (GPIO_PORTD | GPIO_PF | 19) | 93 | #define PD19_PF_CSPI2_SS2 (GPIO_PORTD | GPIO_PF | 19) |
100 | #define PD20_PF_CSPI2_SS1 (GPIO_PORTD | GPIO_PF | 20) | 94 | #define PD20_PF_CSPI2_SS1 (GPIO_PORTD | GPIO_PF | 20) |
101 | #define PD21_PF_CSPI2_SS0 (GPIO_PORTD | GPIO_PF | 21) | 95 | #define PD21_PF_CSPI2_SS0 (GPIO_PORTD | GPIO_PF | 21) |
102 | #define PD22_PF_CSPI2_SCLK (GPIO_PORTD | GPIO_PF | 22) | 96 | #define PD22_PF_CSPI2_SCLK (GPIO_PORTD | GPIO_PF | 22) |
103 | #define PD23_PF_CSPI2_MISO (GPIO_PORTD | GPIO_PF | 23) | 97 | #define PD23_PF_CSPI2_MISO (GPIO_PORTD | GPIO_PF | 23) |
104 | #define PD24_PF_CSPI2_MOSI (GPIO_PORTD | GPIO_PF | 24) | 98 | #define PD24_PF_CSPI2_MOSI (GPIO_PORTD | GPIO_PF | 24) |
105 | #define PD25_PF_CSPI1_RDY (GPIO_PORTD | GPIO_PF | GPIO_OUT | 25) | 99 | #define PD25_PF_CSPI1_RDY (GPIO_PORTD | GPIO_PF | GPIO_OUT | 25) |
106 | #define PD26_PF_CSPI1_SS2 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 26) | 100 | #define PD26_PF_CSPI1_SS2 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 26) |
107 | #define PD27_PF_CSPI1_SS1 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 27) | 101 | #define PD27_PF_CSPI1_SS1 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 27) |
108 | #define PD28_PF_CSPI1_SS0 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 28) | 102 | #define PD28_PF_CSPI1_SS0 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 28) |
109 | #define PD29_PF_CSPI1_SCLK (GPIO_PORTD | GPIO_PF | GPIO_OUT | 29) | 103 | #define PD29_PF_CSPI1_SCLK (GPIO_PORTD | GPIO_PF | GPIO_OUT | 29) |
110 | #define PD30_PF_CSPI1_MISO (GPIO_PORTD | GPIO_PF | GPIO_IN | 30) | 104 | #define PD30_PF_CSPI1_MISO (GPIO_PORTD | GPIO_PF | GPIO_IN | 30) |
111 | #define PD31_PF_CSPI1_MOSI (GPIO_PORTD | GPIO_PF | GPIO_OUT | 31) | 105 | #define PD31_PF_CSPI1_MOSI (GPIO_PORTD | GPIO_PF | GPIO_OUT | 31) |
112 | #define PE3_PF_UART2_CTS (GPIO_PORTE | GPIO_PF | GPIO_OUT | 3) | 106 | #define PE3_PF_UART2_CTS (GPIO_PORTE | GPIO_PF | GPIO_OUT | 3) |
113 | #define PE4_PF_UART2_RTS (GPIO_PORTE | GPIO_PF | GPIO_IN | 4) | 107 | #define PE4_PF_UART2_RTS (GPIO_PORTE | GPIO_PF | GPIO_IN | 4) |
114 | #define PE5_PF_PWMO (GPIO_PORTE | GPIO_PF | 5) | 108 | #define PE5_PF_PWMO (GPIO_PORTE | GPIO_PF | 5) |
115 | #define PE6_PF_UART2_TXD (GPIO_PORTE | GPIO_PF | GPIO_OUT | 6) | 109 | #define PE6_PF_UART2_TXD (GPIO_PORTE | GPIO_PF | GPIO_OUT | 6) |
116 | #define PE7_PF_UART2_RXD (GPIO_PORTE | GPIO_PF | GPIO_IN | 7) | 110 | #define PE7_PF_UART2_RXD (GPIO_PORTE | GPIO_PF | GPIO_IN | 7) |
117 | #define PE8_PF_UART3_TXD (GPIO_PORTE | GPIO_PF | GPIO_OUT | 8) | 111 | #define PE8_PF_UART3_TXD (GPIO_PORTE | GPIO_PF | GPIO_OUT | 8) |
118 | #define PE9_PF_UART3_RXD (GPIO_PORTE | GPIO_PF | GPIO_IN | 9) | 112 | #define PE9_PF_UART3_RXD (GPIO_PORTE | GPIO_PF | GPIO_IN | 9) |
119 | #define PE10_PF_UART3_CTS (GPIO_PORTE | GPIO_PF | GPIO_OUT | 10) | 113 | #define PE10_PF_UART3_CTS (GPIO_PORTE | GPIO_PF | GPIO_OUT | 10) |
120 | #define PE11_PF_UART3_RTS (GPIO_PORTE | GPIO_PF | GPIO_IN | 11) | 114 | #define PE11_PF_UART3_RTS (GPIO_PORTE | GPIO_PF | GPIO_IN | 11) |
121 | #define PE12_PF_UART1_TXD (GPIO_PORTE | GPIO_PF | GPIO_OUT | 12) | 115 | #define PE12_PF_UART1_TXD (GPIO_PORTE | GPIO_PF | GPIO_OUT | 12) |
122 | #define PE13_PF_UART1_RXD (GPIO_PORTE | GPIO_PF | GPIO_IN | 13) | 116 | #define PE13_PF_UART1_RXD (GPIO_PORTE | GPIO_PF | GPIO_IN | 13) |
123 | #define PE14_PF_UART1_CTS (GPIO_PORTE | GPIO_PF | GPIO_OUT | 14) | 117 | #define PE14_PF_UART1_CTS (GPIO_PORTE | GPIO_PF | GPIO_OUT | 14) |
124 | #define PE15_PF_UART1_RTS (GPIO_PORTE | GPIO_PF | GPIO_IN | 15) | 118 | #define PE15_PF_UART1_RTS (GPIO_PORTE | GPIO_PF | GPIO_IN | 15) |
125 | #define PE16_PF_RTCK (GPIO_PORTE | GPIO_PF | GPIO_OUT | 16) | 119 | #define PE16_PF_RTCK (GPIO_PORTE | GPIO_PF | GPIO_OUT | 16) |
126 | #define PE17_PF_RESET_OUT (GPIO_PORTE | GPIO_PF | 17) | 120 | #define PE17_PF_RESET_OUT (GPIO_PORTE | GPIO_PF | 17) |
127 | #define PE18_PF_SD1_D0 (GPIO_PORTE | GPIO_PF | 18) | 121 | #define PE18_PF_SD1_D0 (GPIO_PORTE | GPIO_PF | 18) |
128 | #define PE19_PF_SD1_D1 (GPIO_PORTE | GPIO_PF | 19) | 122 | #define PE19_PF_SD1_D1 (GPIO_PORTE | GPIO_PF | 19) |
129 | #define PE20_PF_SD1_D2 (GPIO_PORTE | GPIO_PF | 20) | 123 | #define PE20_PF_SD1_D2 (GPIO_PORTE | GPIO_PF | 20) |
130 | #define PE21_PF_SD1_D3 (GPIO_PORTE | GPIO_PF | 21) | 124 | #define PE21_PF_SD1_D3 (GPIO_PORTE | GPIO_PF | 21) |
131 | #define PE22_PF_SD1_CMD (GPIO_PORTE | GPIO_PF | 22) | 125 | #define PE22_PF_SD1_CMD (GPIO_PORTE | GPIO_PF | 22) |
132 | #define PE23_PF_SD1_CLK (GPIO_PORTE | GPIO_PF | 23) | 126 | #define PE23_PF_SD1_CLK (GPIO_PORTE | GPIO_PF | 23) |
133 | #define PF0_PF_NRFB (GPIO_PORTF | GPIO_PF | 0) | 127 | #define PF0_PF_NRFB (GPIO_PORTF | GPIO_PF | 0) |
134 | #define PF2_PF_NFWP (GPIO_PORTF | GPIO_PF | 2) | 128 | #define PF2_PF_NFWP (GPIO_PORTF | GPIO_PF | 2) |
135 | #define PF4_PF_NFALE (GPIO_PORTF | GPIO_PF | 4) | 129 | #define PF4_PF_NFALE (GPIO_PORTF | GPIO_PF | 4) |
136 | #define PF5_PF_NFRE (GPIO_PORTF | GPIO_PF | 5) | 130 | #define PF5_PF_NFRE (GPIO_PORTF | GPIO_PF | 5) |
137 | #define PF6_PF_NFWE (GPIO_PORTF | GPIO_PF | 6) | 131 | #define PF6_PF_NFWE (GPIO_PORTF | GPIO_PF | 6) |
138 | #define PF15_PF_CLKO (GPIO_PORTF | GPIO_PF | 15) | 132 | #define PF15_PF_CLKO (GPIO_PORTF | GPIO_PF | 15) |
139 | #define PF21_PF_CS4 (GPIO_PORTF | GPIO_PF | 21) | 133 | #define PF21_PF_CS4 (GPIO_PORTF | GPIO_PF | 21) |
140 | #define PF22_PF_CS5 (GPIO_PORTF | GPIO_PF | 22) | 134 | #define PF22_PF_CS5 (GPIO_PORTF | GPIO_PF | 22) |
141 | 135 | ||
142 | /* Alternate GPIO pin functions */ | 136 | /* Alternate GPIO pin functions */ |
143 | 137 | ||
144 | #define PB26_AF_UART4_RTS (GPIO_PORTB | GPIO_AF | GPIO_IN | 26) | 138 | #define PB26_AF_UART4_RTS (GPIO_PORTB | GPIO_AF | GPIO_IN | 26) |
145 | #define PB28_AF_UART4_TXD (GPIO_PORTB | GPIO_AF | GPIO_OUT | 28) | 139 | #define PB28_AF_UART4_TXD (GPIO_PORTB | GPIO_AF | GPIO_OUT | 28) |
146 | #define PB29_AF_UART4_CTS (GPIO_PORTB | GPIO_AF | GPIO_OUT | 29) | 140 | #define PB29_AF_UART4_CTS (GPIO_PORTB | GPIO_AF | GPIO_OUT | 29) |
147 | #define PB31_AF_UART4_RXD (GPIO_PORTB | GPIO_AF | GPIO_IN | 31) | 141 | #define PB31_AF_UART4_RXD (GPIO_PORTB | GPIO_AF | GPIO_IN | 31) |
148 | #define PC28_AF_SLCDC2_D0 (GPIO_PORTC | GPIO_AF | 28) | 142 | #define PC28_AF_SLCDC2_D0 (GPIO_PORTC | GPIO_AF | 28) |
149 | #define PC29_AF_SLCDC2_RS (GPIO_PORTC | GPIO_AF | 29) | 143 | #define PC29_AF_SLCDC2_RS (GPIO_PORTC | GPIO_AF | 29) |
150 | #define PC30_AF_SLCDC2_CS (GPIO_PORTC | GPIO_AF | 30) | 144 | #define PC30_AF_SLCDC2_CS (GPIO_PORTC | GPIO_AF | 30) |
151 | #define PC31_AF_SLCDC2_CLK (GPIO_PORTC | GPIO_AF | 31) | 145 | #define PC31_AF_SLCDC2_CLK (GPIO_PORTC | GPIO_AF | 31) |
152 | #define PD19_AF_USBH2_DATA4 (GPIO_PORTD | GPIO_AF | 19) | 146 | #define PD19_AF_USBH2_DATA4 (GPIO_PORTD | GPIO_AF | 19) |
153 | #define PD20_AF_USBH2_DATA3 (GPIO_PORTD | GPIO_AF | 20) | 147 | #define PD20_AF_USBH2_DATA3 (GPIO_PORTD | GPIO_AF | 20) |
154 | #define PD21_AF_USBH2_DATA6 (GPIO_PORTD | GPIO_AF | 21) | 148 | #define PD21_AF_USBH2_DATA6 (GPIO_PORTD | GPIO_AF | 21) |
155 | #define PD22_AF_USBH2_DATA0 (GPIO_PORTD | GPIO_AF | 22) | 149 | #define PD22_AF_USBH2_DATA0 (GPIO_PORTD | GPIO_AF | 22) |
156 | #define PD23_AF_USBH2_DATA2 (GPIO_PORTD | GPIO_AF | 23) | 150 | #define PD23_AF_USBH2_DATA2 (GPIO_PORTD | GPIO_AF | 23) |
157 | #define PD24_AF_USBH2_DATA1 (GPIO_PORTD | GPIO_AF | 24) | 151 | #define PD24_AF_USBH2_DATA1 (GPIO_PORTD | GPIO_AF | 24) |
158 | #define PD26_AF_USBH2_DATA5 (GPIO_PORTD | GPIO_AF | 26) | 152 | #define PD26_AF_USBH2_DATA5 (GPIO_PORTD | GPIO_AF | 26) |
159 | #define PE0_AF_KP_COL6 (GPIO_PORTE | GPIO_AF | 0) | 153 | #define PE0_AF_KP_COL6 (GPIO_PORTE | GPIO_AF | 0) |
160 | #define PE1_AF_KP_ROW6 (GPIO_PORTE | GPIO_AF | 1) | 154 | #define PE1_AF_KP_ROW6 (GPIO_PORTE | GPIO_AF | 1) |
161 | #define PE2_AF_KP_ROW7 (GPIO_PORTE | GPIO_AF | 2) | 155 | #define PE2_AF_KP_ROW7 (GPIO_PORTE | GPIO_AF | 2) |
162 | #define PE3_AF_KP_COL7 (GPIO_PORTE | GPIO_AF | 3) | 156 | #define PE3_AF_KP_COL7 (GPIO_PORTE | GPIO_AF | 3) |
163 | #define PE4_AF_KP_ROW7 (GPIO_PORTE | GPIO_AF | 4) | 157 | #define PE4_AF_KP_ROW7 (GPIO_PORTE | GPIO_AF | 4) |
164 | #define PE6_AF_KP_COL6 (GPIO_PORTE | GPIO_AF | 6) | 158 | #define PE6_AF_KP_COL6 (GPIO_PORTE | GPIO_AF | 6) |
165 | #define PE7_AF_KP_ROW6 (GPIO_PORTE | GPIO_AF | 7) | 159 | #define PE7_AF_KP_ROW6 (GPIO_PORTE | GPIO_AF | 7) |
166 | #define PE16_AF_OWIRE (GPIO_PORTE | GPIO_AF | 16) | 160 | #define PE16_AF_OWIRE (GPIO_PORTE | GPIO_AF | 16) |
167 | #define PE18_AF_CSPI3_MISO (GPIO_PORTE | GPIO_AF | GPIO_IN | 18) | 161 | #define PE18_AF_CSPI3_MISO (GPIO_PORTE | GPIO_AF | GPIO_IN | 18) |
168 | #define PE21_AF_CSPI3_SS (GPIO_PORTE | GPIO_AF | GPIO_OUT | 21) | 162 | #define PE21_AF_CSPI3_SS (GPIO_PORTE | GPIO_AF | GPIO_OUT | 21) |
169 | #define PE22_AF_CSPI3_MOSI (GPIO_PORTE | GPIO_AF | GPIO_OUT | 22) | 163 | #define PE22_AF_CSPI3_MOSI (GPIO_PORTE | GPIO_AF | GPIO_OUT | 22) |
170 | #define PE23_AF_CSPI3_SCLK (GPIO_PORTE | GPIO_AF | GPIO_OUT | 23) | 164 | #define PE23_AF_CSPI3_SCLK (GPIO_PORTE | GPIO_AF | GPIO_OUT | 23) |
171 | 165 | ||
172 | /* AIN GPIO pin functions */ | 166 | /* AIN GPIO pin functions */ |
173 | 167 | ||
174 | #define PA6_AIN_SLCDC1_DAT0 (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 6) | 168 | #define PA6_AIN_SLCDC1_DAT0 (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 6) |
175 | #define PA7_AIN_SLCDC1_DAT1 (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 7) | 169 | #define PA7_AIN_SLCDC1_DAT1 (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 7) |
176 | #define PA8_AIN_SLCDC1_DAT2 (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 8) | 170 | #define PA8_AIN_SLCDC1_DAT2 (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 8) |
177 | #define PA0_AIN_SLCDC1_DAT3 (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 0) | 171 | #define PA0_AIN_SLCDC1_DAT3 (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 0) |
178 | #define PA11_AIN_SLCDC1_DAT5 (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 11) | 172 | #define PA11_AIN_SLCDC1_DAT5 (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 11) |
179 | #define PA13_AIN_SLCDC1_DAT7 (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 13) | 173 | #define PA13_AIN_SLCDC1_DAT7 (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 13) |
180 | #define PA15_AIN_SLCDC1_DAT9 (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 15) | 174 | #define PA15_AIN_SLCDC1_DAT9 (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 15) |
181 | #define PA17_AIN_SLCDC1_DAT11 (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 17) | 175 | #define PA17_AIN_SLCDC1_DAT11 (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 17) |
182 | #define PA19_AIN_SLCDC1_DAT13 (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 19) | 176 | #define PA19_AIN_SLCDC1_DAT13 (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 19) |
183 | #define PA21_AIN_SLCDC1_DAT15 (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 21) | 177 | #define PA21_AIN_SLCDC1_DAT15 (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 21) |
184 | #define PA22_AIN_EXT_DMAGRANT (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 22) | 178 | #define PA22_AIN_EXT_DMAGRANT (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 22) |
185 | #define PA24_AIN_SLCDC1_D0 (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 24) | 179 | #define PA24_AIN_SLCDC1_D0 (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 24) |
186 | #define PA25_AIN_SLCDC1_RS (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 25) | 180 | #define PA25_AIN_SLCDC1_RS (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 25) |
187 | #define PA26_AIN_SLCDC1_CS (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 26) | 181 | #define PA26_AIN_SLCDC1_CS (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 26) |
188 | #define PA27_AIN_SLCDC1_CLK (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 27) | 182 | #define PA27_AIN_SLCDC1_CLK (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 27) |
189 | #define PB6_AIN_SLCDC1_D0 (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 6) | 183 | #define PB6_AIN_SLCDC1_D0 (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 6) |
190 | #define PB7_AIN_SLCDC1_RS (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 7) | 184 | #define PB7_AIN_SLCDC1_RS (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 7) |
191 | #define PB8_AIN_SLCDC1_CS (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 8) | 185 | #define PB8_AIN_SLCDC1_CS (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 8) |
192 | #define PB9_AIN_SLCDC1_CLK (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 9) | 186 | #define PB9_AIN_SLCDC1_CLK (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 9) |
193 | #define PB25_AIN_SLCDC1_DAT0 (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 25) | 187 | #define PB25_AIN_SLCDC1_DAT0 (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 25) |
194 | #define PB26_AIN_SLCDC1_DAT1 (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 26) | 188 | #define PB26_AIN_SLCDC1_DAT1 (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 26) |
195 | #define PB27_AIN_SLCDC1_DAT2 (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 27) | 189 | #define PB27_AIN_SLCDC1_DAT2 (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 27) |
196 | #define PB28_AIN_SLCDC1_DAT3 (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 28) | 190 | #define PB28_AIN_SLCDC1_DAT3 (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 28) |
197 | #define PB29_AIN_SLCDC1_DAT4 (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 29) | 191 | #define PB29_AIN_SLCDC1_DAT4 (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 29) |
198 | #define PB30_AIN_SLCDC1_DAT5 (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 30) | 192 | #define PB30_AIN_SLCDC1_DAT5 (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 30) |
199 | #define PB31_AIN_SLCDC1_DAT6 (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 31) | 193 | #define PB31_AIN_SLCDC1_DAT6 (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 31) |
200 | #define PC5_AIN_SLCDC1_DAT7 (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 5) | 194 | #define PC5_AIN_SLCDC1_DAT7 (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 5) |
201 | #define PC6_AIN_SLCDC1_DAT8 (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 6) | 195 | #define PC6_AIN_SLCDC1_DAT8 (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 6) |
202 | #define PC7_AIN_SLCDC1_DAT9 (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 7) | 196 | #define PC7_AIN_SLCDC1_DAT9 (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 7) |
203 | #define PC8_AIN_SLCDC1_DAT10 (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 8) | 197 | #define PC8_AIN_SLCDC1_DAT10 (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 8) |
204 | #define PC9_AIN_SLCDC1_DAT11 (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 9) | 198 | #define PC9_AIN_SLCDC1_DAT11 (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 9) |
205 | #define PC10_AIN_SLCDC1_DAT12 (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 10) | 199 | #define PC10_AIN_SLCDC1_DAT12 (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 10) |
206 | #define PC11_AIN_SLCDC1_DAT13 (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 11) | 200 | #define PC11_AIN_SLCDC1_DAT13 (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 11) |
207 | #define PC12_AIN_SLCDC1_DAT14 (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 12) | 201 | #define PC12_AIN_SLCDC1_DAT14 (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 12) |
208 | #define PC13_AIN_SLCDC1_DAT15 (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 13) | 202 | #define PC13_AIN_SLCDC1_DAT15 (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 13) |
209 | #define PE5_AIN_PC_SPKOUT (GPIO_PORTE | GPIO_AIN | GPIO_OUT | 5) | 203 | #define PE5_AIN_PC_SPKOUT (GPIO_PORTE | GPIO_AIN | GPIO_OUT | 5) |
210 | 204 | ||
211 | /* BIN GPIO pin functions */ | 205 | /* BIN GPIO pin functions */ |
212 | 206 | ||
213 | #define PE5_BIN_TOUT2 (GPIO_PORTE | GPIO_BIN | GPIO_OUT | 5) | 207 | #define PE5_BIN_TOUT2 (GPIO_PORTE | GPIO_BIN | GPIO_OUT | 5) |
214 | 208 | ||
215 | /* CIN GPIO pin functions */ | 209 | /* CIN GPIO pin functions */ |
216 | 210 | ||
217 | #define PA14_CIN_SLCDC1_DAT0 (GPIO_PORTA | GPIO_CIN | GPIO_OUT | 14) | 211 | #define PA14_CIN_SLCDC1_DAT0 (GPIO_PORTA | GPIO_CIN | GPIO_OUT | 14) |
218 | #define PA15_CIN_SLCDC1_DAT1 (GPIO_PORTA | GPIO_CIN | GPIO_OUT | 15) | 212 | #define PA15_CIN_SLCDC1_DAT1 (GPIO_PORTA | GPIO_CIN | GPIO_OUT | 15) |
219 | #define PA16_CIN_SLCDC1_DAT2 (GPIO_PORTA | GPIO_CIN | GPIO_OUT | 16) | 213 | #define PA16_CIN_SLCDC1_DAT2 (GPIO_PORTA | GPIO_CIN | GPIO_OUT | 16) |
220 | #define PA17_CIN_SLCDC1_DAT3 (GPIO_PORTA | GPIO_CIN | GPIO_OUT | 17) | 214 | #define PA17_CIN_SLCDC1_DAT3 (GPIO_PORTA | GPIO_CIN | GPIO_OUT | 17) |
221 | #define PA18_CIN_SLCDC1_DAT4 (GPIO_PORTA | GPIO_CIN | GPIO_OUT | 18) | 215 | #define PA18_CIN_SLCDC1_DAT4 (GPIO_PORTA | GPIO_CIN | GPIO_OUT | 18) |
222 | #define PA19_CIN_SLCDC1_DAT5 (GPIO_PORTA | GPIO_CIN | GPIO_OUT | 19) | 216 | #define PA19_CIN_SLCDC1_DAT5 (GPIO_PORTA | GPIO_CIN | GPIO_OUT | 19) |
223 | #define PA20_CIN_SLCDC1_DAT6 (GPIO_PORTA | GPIO_CIN | GPIO_OUT | 20) | 217 | #define PA20_CIN_SLCDC1_DAT6 (GPIO_PORTA | GPIO_CIN | GPIO_OUT | 20) |
224 | #define PA21_CIN_SLCDC1_DAT7 (GPIO_PORTA | GPIO_CIN | GPIO_OUT | 21) | 218 | #define PA21_CIN_SLCDC1_DAT7 (GPIO_PORTA | GPIO_CIN | GPIO_OUT | 21) |
225 | #define PB30_CIN_UART4_CTS (GPIO_PORTB | GPIO_CIN | GPIO_OUT | 30) | 219 | #define PB30_CIN_UART4_CTS (GPIO_PORTB | GPIO_CIN | GPIO_OUT | 30) |
226 | #define PE5_CIN_TOUT3 (GPIO_PORTE | GPIO_CIN | GPIO_OUT | 5) | 220 | #define PE5_CIN_TOUT3 (GPIO_PORTE | GPIO_CIN | GPIO_OUT | 5) |
227 | 221 | ||
228 | /* AOUT GPIO pin functions */ | 222 | /* AOUT GPIO pin functions */ |
229 | 223 | ||
230 | #define PB29_AOUT_UART4_RXD (GPIO_PORTB | GPIO_AOUT | GPIO_IN | 29) | 224 | #define PB29_AOUT_UART4_RXD (GPIO_PORTB | GPIO_AOUT | GPIO_IN | 29) |
231 | #define PB31_AOUT_UART4_RTS (GPIO_PORTB | GPIO_AOUT | GPIO_IN | 31) | 225 | #define PB31_AOUT_UART4_RTS (GPIO_PORTB | GPIO_AOUT | GPIO_IN | 31) |
232 | #define PC8_AOUT_USBOTG_TXR_INT (GPIO_PORTC | GPIO_AOUT | GPIO_IN | 8) | 226 | #define PC8_AOUT_USBOTG_TXR_INT (GPIO_PORTC | GPIO_AOUT | GPIO_IN | 8) |
233 | #define PC15_AOUT_WKGD (GPIO_PORTC | GPIO_AOUT | GPIO_IN | 15) | 227 | #define PC15_AOUT_WKGD (GPIO_PORTC | GPIO_AOUT | GPIO_IN | 15) |
234 | #define PF21_AOUT_DTACK (GPIO_PORTF | GPIO_AOUT | GPIO_IN | 21) | 228 | #define PF21_AOUT_DTACK (GPIO_PORTF | GPIO_AOUT | GPIO_IN | 21) |
235 | |||
236 | 229 | ||
237 | #endif | 230 | #endif /* ifndef __MACH_IOMUX_MX2x_H__ */ |
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx3.h b/arch/arm/plat-mxc/include/mach/iomux-mx3.h index e1fc6da1cd10..e51465d7b224 100644 --- a/arch/arm/plat-mxc/include/mach/iomux-mx3.h +++ b/arch/arm/plat-mxc/include/mach/iomux-mx3.h | |||
@@ -16,12 +16,10 @@ | |||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
17 | * MA 02110-1301, USA. | 17 | * MA 02110-1301, USA. |
18 | */ | 18 | */ |
19 | 19 | #ifndef __MACH_IOMUX_MX3_H__ | |
20 | #ifndef __MACH_MX31_IOMUX_H__ | 20 | #define __MACH_IOMUX_MX3_H__ |
21 | #define __MACH_MX31_IOMUX_H__ | ||
22 | 21 | ||
23 | #include <linux/types.h> | 22 | #include <linux/types.h> |
24 | |||
25 | /* | 23 | /* |
26 | * various IOMUX output functions | 24 | * various IOMUX output functions |
27 | */ | 25 | */ |
@@ -34,7 +32,7 @@ | |||
34 | #define IOMUX_OCONFIG_ALT4 (5 << 4) /* used as alternate function 4 */ | 32 | #define IOMUX_OCONFIG_ALT4 (5 << 4) /* used as alternate function 4 */ |
35 | #define IOMUX_OCONFIG_ALT5 (6 << 4) /* used as alternate function 5 */ | 33 | #define IOMUX_OCONFIG_ALT5 (6 << 4) /* used as alternate function 5 */ |
36 | #define IOMUX_OCONFIG_ALT6 (7 << 4) /* used as alternate function 6 */ | 34 | #define IOMUX_OCONFIG_ALT6 (7 << 4) /* used as alternate function 6 */ |
37 | #define IOMUX_ICONFIG_NONE 0 /* not configured for input */ | 35 | #define IOMUX_ICONFIG_NONE 0 /* not configured for input */ |
38 | #define IOMUX_ICONFIG_GPIO 1 /* used as GPIO */ | 36 | #define IOMUX_ICONFIG_GPIO 1 /* used as GPIO */ |
39 | #define IOMUX_ICONFIG_FUNC 2 /* used as function */ | 37 | #define IOMUX_ICONFIG_FUNC 2 /* used as function */ |
40 | #define IOMUX_ICONFIG_ALT1 4 /* used as alternate function 1 */ | 38 | #define IOMUX_ICONFIG_ALT1 4 /* used as alternate function 1 */ |
@@ -167,11 +165,6 @@ int mxc_iomux_mode(unsigned int pin_mode); | |||
167 | MXC_GPIO_IRQ_START) | 165 | MXC_GPIO_IRQ_START) |
168 | 166 | ||
169 | /* | 167 | /* |
170 | * The number of gpio devices among the pads | ||
171 | */ | ||
172 | #define GPIO_PORT_MAX 3 | ||
173 | |||
174 | /* | ||
175 | * This enumeration is constructed based on the Section | 168 | * This enumeration is constructed based on the Section |
176 | * "sw_pad_ctl & sw_mux_ctl details" of the MX31 IC Spec. Each enumerated | 169 | * "sw_pad_ctl & sw_mux_ctl details" of the MX31 IC Spec. Each enumerated |
177 | * value is constructed based on the rules described above. | 170 | * value is constructed based on the rules described above. |
@@ -633,40 +626,40 @@ enum iomux_pins { | |||
633 | #define MX31_PIN_TXD2__GPIO1_28 IOMUX_MODE(MX31_PIN_TXD2, IOMUX_CONFIG_GPIO) | 626 | #define MX31_PIN_TXD2__GPIO1_28 IOMUX_MODE(MX31_PIN_TXD2, IOMUX_CONFIG_GPIO) |
634 | #define MX31_PIN_CSI_D4__GPIO3_4 IOMUX_MODE(MX31_PIN_CSI_D4, IOMUX_CONFIG_GPIO) | 627 | #define MX31_PIN_CSI_D4__GPIO3_4 IOMUX_MODE(MX31_PIN_CSI_D4, IOMUX_CONFIG_GPIO) |
635 | #define MX31_PIN_CSI_D5__GPIO3_5 IOMUX_MODE(MX31_PIN_CSI_D5, IOMUX_CONFIG_GPIO) | 628 | #define MX31_PIN_CSI_D5__GPIO3_5 IOMUX_MODE(MX31_PIN_CSI_D5, IOMUX_CONFIG_GPIO) |
636 | #define MX31_PIN_USBOTG_DATA0__USBOTG_DATA0 IOMUX_MODE(MX31_PIN_USBOTG_DATA0, IOMUX_CONFIG_FUNC) | 629 | #define MX31_PIN_USBOTG_DATA0__USBOTG_DATA0 IOMUX_MODE(MX31_PIN_USBOTG_DATA0, IOMUX_CONFIG_FUNC) |
637 | #define MX31_PIN_USBOTG_DATA1__USBOTG_DATA1 IOMUX_MODE(MX31_PIN_USBOTG_DATA1, IOMUX_CONFIG_FUNC) | 630 | #define MX31_PIN_USBOTG_DATA1__USBOTG_DATA1 IOMUX_MODE(MX31_PIN_USBOTG_DATA1, IOMUX_CONFIG_FUNC) |
638 | #define MX31_PIN_USBOTG_DATA2__USBOTG_DATA2 IOMUX_MODE(MX31_PIN_USBOTG_DATA2, IOMUX_CONFIG_FUNC) | 631 | #define MX31_PIN_USBOTG_DATA2__USBOTG_DATA2 IOMUX_MODE(MX31_PIN_USBOTG_DATA2, IOMUX_CONFIG_FUNC) |
639 | #define MX31_PIN_USBOTG_DATA3__USBOTG_DATA3 IOMUX_MODE(MX31_PIN_USBOTG_DATA3, IOMUX_CONFIG_FUNC) | 632 | #define MX31_PIN_USBOTG_DATA3__USBOTG_DATA3 IOMUX_MODE(MX31_PIN_USBOTG_DATA3, IOMUX_CONFIG_FUNC) |
640 | #define MX31_PIN_USBOTG_DATA4__USBOTG_DATA4 IOMUX_MODE(MX31_PIN_USBOTG_DATA4, IOMUX_CONFIG_FUNC) | 633 | #define MX31_PIN_USBOTG_DATA4__USBOTG_DATA4 IOMUX_MODE(MX31_PIN_USBOTG_DATA4, IOMUX_CONFIG_FUNC) |
641 | #define MX31_PIN_USBOTG_DATA5__USBOTG_DATA5 IOMUX_MODE(MX31_PIN_USBOTG_DATA5, IOMUX_CONFIG_FUNC) | 634 | #define MX31_PIN_USBOTG_DATA5__USBOTG_DATA5 IOMUX_MODE(MX31_PIN_USBOTG_DATA5, IOMUX_CONFIG_FUNC) |
642 | #define MX31_PIN_USBOTG_DATA6__USBOTG_DATA6 IOMUX_MODE(MX31_PIN_USBOTG_DATA6, IOMUX_CONFIG_FUNC) | 635 | #define MX31_PIN_USBOTG_DATA6__USBOTG_DATA6 IOMUX_MODE(MX31_PIN_USBOTG_DATA6, IOMUX_CONFIG_FUNC) |
643 | #define MX31_PIN_USBOTG_DATA7__USBOTG_DATA7 IOMUX_MODE(MX31_PIN_USBOTG_DATA7, IOMUX_CONFIG_FUNC) | 636 | #define MX31_PIN_USBOTG_DATA7__USBOTG_DATA7 IOMUX_MODE(MX31_PIN_USBOTG_DATA7, IOMUX_CONFIG_FUNC) |
644 | #define MX31_PIN_USBOTG_CLK__USBOTG_CLK IOMUX_MODE(MX31_PIN_USBOTG_CLK, IOMUX_CONFIG_FUNC) | 637 | #define MX31_PIN_USBOTG_CLK__USBOTG_CLK IOMUX_MODE(MX31_PIN_USBOTG_CLK, IOMUX_CONFIG_FUNC) |
645 | #define MX31_PIN_USBOTG_DIR__USBOTG_DIR IOMUX_MODE(MX31_PIN_USBOTG_DIR, IOMUX_CONFIG_FUNC) | 638 | #define MX31_PIN_USBOTG_DIR__USBOTG_DIR IOMUX_MODE(MX31_PIN_USBOTG_DIR, IOMUX_CONFIG_FUNC) |
646 | #define MX31_PIN_USBOTG_NXT__USBOTG_NXT IOMUX_MODE(MX31_PIN_USBOTG_NXT, IOMUX_CONFIG_FUNC) | 639 | #define MX31_PIN_USBOTG_NXT__USBOTG_NXT IOMUX_MODE(MX31_PIN_USBOTG_NXT, IOMUX_CONFIG_FUNC) |
647 | #define MX31_PIN_USBOTG_STP__USBOTG_STP IOMUX_MODE(MX31_PIN_USBOTG_STP, IOMUX_CONFIG_FUNC) | 640 | #define MX31_PIN_USBOTG_STP__USBOTG_STP IOMUX_MODE(MX31_PIN_USBOTG_STP, IOMUX_CONFIG_FUNC) |
648 | #define MX31_PIN_CSPI1_MOSI__USBH1_RXDM IOMUX_MODE(MX31_PIN_CSPI1_MOSI, IOMUX_CONFIG_ALT1) | 641 | #define MX31_PIN_CSPI1_MOSI__USBH1_RXDM IOMUX_MODE(MX31_PIN_CSPI1_MOSI, IOMUX_CONFIG_ALT1) |
649 | #define MX31_PIN_CSPI1_MISO__USBH1_RXDP IOMUX_MODE(MX31_PIN_CSPI1_MISO, IOMUX_CONFIG_ALT1) | 642 | #define MX31_PIN_CSPI1_MISO__USBH1_RXDP IOMUX_MODE(MX31_PIN_CSPI1_MISO, IOMUX_CONFIG_ALT1) |
650 | #define MX31_PIN_CSPI1_SS0__USBH1_TXDM IOMUX_MODE(MX31_PIN_CSPI1_SS0, IOMUX_CONFIG_ALT1) | 643 | #define MX31_PIN_CSPI1_SS0__USBH1_TXDM IOMUX_MODE(MX31_PIN_CSPI1_SS0, IOMUX_CONFIG_ALT1) |
651 | #define MX31_PIN_CSPI1_SS1__USBH1_TXDP IOMUX_MODE(MX31_PIN_CSPI1_SS1, IOMUX_CONFIG_ALT1) | 644 | #define MX31_PIN_CSPI1_SS1__USBH1_TXDP IOMUX_MODE(MX31_PIN_CSPI1_SS1, IOMUX_CONFIG_ALT1) |
652 | #define MX31_PIN_CSPI1_SS2__USBH1_RCV IOMUX_MODE(MX31_PIN_CSPI1_SS2, IOMUX_CONFIG_ALT1) | 645 | #define MX31_PIN_CSPI1_SS2__USBH1_RCV IOMUX_MODE(MX31_PIN_CSPI1_SS2, IOMUX_CONFIG_ALT1) |
653 | #define MX31_PIN_CSPI1_SCLK__USBH1_OEB IOMUX_MODE(MX31_PIN_CSPI1_SCLK, IOMUX_CONFIG_ALT1) | 646 | #define MX31_PIN_CSPI1_SCLK__USBH1_OEB IOMUX_MODE(MX31_PIN_CSPI1_SCLK, IOMUX_CONFIG_ALT1) |
654 | #define MX31_PIN_CSPI1_SPI_RDY__USBH1_FS IOMUX_MODE(MX31_PIN_CSPI1_SPI_RDY, IOMUX_CONFIG_ALT1) | 647 | #define MX31_PIN_CSPI1_SPI_RDY__USBH1_FS IOMUX_MODE(MX31_PIN_CSPI1_SPI_RDY, IOMUX_CONFIG_ALT1) |
655 | #define MX31_PIN_SFS6__USBH1_SUSPEND IOMUX_MODE(MX31_PIN_SFS6, IOMUX_CONFIG_FUNC) | 648 | #define MX31_PIN_SFS6__USBH1_SUSPEND IOMUX_MODE(MX31_PIN_SFS6, IOMUX_CONFIG_FUNC) |
656 | #define MX31_PIN_NFRE_B__GPIO1_11 IOMUX_MODE(MX31_PIN_NFRE_B, IOMUX_CONFIG_GPIO) | 649 | #define MX31_PIN_NFRE_B__GPIO1_11 IOMUX_MODE(MX31_PIN_NFRE_B, IOMUX_CONFIG_GPIO) |
657 | #define MX31_PIN_NFALE__GPIO1_12 IOMUX_MODE(MX31_PIN_NFALE, IOMUX_CONFIG_GPIO) | 650 | #define MX31_PIN_NFALE__GPIO1_12 IOMUX_MODE(MX31_PIN_NFALE, IOMUX_CONFIG_GPIO) |
658 | #define MX31_PIN_USBH2_DATA0__USBH2_DATA0 IOMUX_MODE(MX31_PIN_USBH2_DATA0, IOMUX_CONFIG_FUNC) | 651 | #define MX31_PIN_USBH2_DATA0__USBH2_DATA0 IOMUX_MODE(MX31_PIN_USBH2_DATA0, IOMUX_CONFIG_FUNC) |
659 | #define MX31_PIN_USBH2_DATA1__USBH2_DATA1 IOMUX_MODE(MX31_PIN_USBH2_DATA1, IOMUX_CONFIG_FUNC) | 652 | #define MX31_PIN_USBH2_DATA1__USBH2_DATA1 IOMUX_MODE(MX31_PIN_USBH2_DATA1, IOMUX_CONFIG_FUNC) |
660 | #define MX31_PIN_STXD3__USBH2_DATA2 IOMUX_MODE(MX31_PIN_STXD3, IOMUX_CONFIG_FUNC) | 653 | #define MX31_PIN_STXD3__USBH2_DATA2 IOMUX_MODE(MX31_PIN_STXD3, IOMUX_CONFIG_FUNC) |
661 | #define MX31_PIN_SRXD3__USBH2_DATA3 IOMUX_MODE(MX31_PIN_SRXD3, IOMUX_CONFIG_FUNC) | 654 | #define MX31_PIN_SRXD3__USBH2_DATA3 IOMUX_MODE(MX31_PIN_SRXD3, IOMUX_CONFIG_FUNC) |
662 | #define MX31_PIN_SCK3__USBH2_DATA4 IOMUX_MODE(MX31_PIN_SCK3, IOMUX_CONFIG_FUNC) | 655 | #define MX31_PIN_SCK3__USBH2_DATA4 IOMUX_MODE(MX31_PIN_SCK3, IOMUX_CONFIG_FUNC) |
663 | #define MX31_PIN_SFS3__USBH2_DATA5 IOMUX_MODE(MX31_PIN_SFS3, IOMUX_CONFIG_FUNC) | 656 | #define MX31_PIN_SFS3__USBH2_DATA5 IOMUX_MODE(MX31_PIN_SFS3, IOMUX_CONFIG_FUNC) |
664 | #define MX31_PIN_STXD6__USBH2_DATA6 IOMUX_MODE(MX31_PIN_STXD6, IOMUX_CONFIG_FUNC) | 657 | #define MX31_PIN_STXD6__USBH2_DATA6 IOMUX_MODE(MX31_PIN_STXD6, IOMUX_CONFIG_FUNC) |
665 | #define MX31_PIN_SRXD6__USBH2_DATA7 IOMUX_MODE(MX31_PIN_SRXD6, IOMUX_CONFIG_FUNC) | 658 | #define MX31_PIN_SRXD6__USBH2_DATA7 IOMUX_MODE(MX31_PIN_SRXD6, IOMUX_CONFIG_FUNC) |
666 | #define MX31_PIN_USBH2_CLK__USBH2_CLK IOMUX_MODE(MX31_PIN_USBH2_CLK, IOMUX_CONFIG_FUNC) | 659 | #define MX31_PIN_USBH2_CLK__USBH2_CLK IOMUX_MODE(MX31_PIN_USBH2_CLK, IOMUX_CONFIG_FUNC) |
667 | #define MX31_PIN_USBH2_DIR__USBH2_DIR IOMUX_MODE(MX31_PIN_USBH2_DIR, IOMUX_CONFIG_FUNC) | 660 | #define MX31_PIN_USBH2_DIR__USBH2_DIR IOMUX_MODE(MX31_PIN_USBH2_DIR, IOMUX_CONFIG_FUNC) |
668 | #define MX31_PIN_USBH2_NXT__USBH2_NXT IOMUX_MODE(MX31_PIN_USBH2_NXT, IOMUX_CONFIG_FUNC) | 661 | #define MX31_PIN_USBH2_NXT__USBH2_NXT IOMUX_MODE(MX31_PIN_USBH2_NXT, IOMUX_CONFIG_FUNC) |
669 | #define MX31_PIN_USBH2_STP__USBH2_STP IOMUX_MODE(MX31_PIN_USBH2_STP, IOMUX_CONFIG_FUNC) | 662 | #define MX31_PIN_USBH2_STP__USBH2_STP IOMUX_MODE(MX31_PIN_USBH2_STP, IOMUX_CONFIG_FUNC) |
670 | #define MX31_PIN_SCK6__GPIO1_25 IOMUX_MODE(MX31_PIN_SCK6, IOMUX_CONFIG_GPIO) | 663 | #define MX31_PIN_SCK6__GPIO1_25 IOMUX_MODE(MX31_PIN_SCK6, IOMUX_CONFIG_GPIO) |
671 | #define MX31_PIN_USB_OC__GPIO1_30 IOMUX_MODE(MX31_PIN_USB_OC, IOMUX_CONFIG_GPIO) | 664 | #define MX31_PIN_USB_OC__GPIO1_30 IOMUX_MODE(MX31_PIN_USB_OC, IOMUX_CONFIG_GPIO) |
672 | #define MX31_PIN_I2C_DAT__I2C1_SDA IOMUX_MODE(MX31_PIN_I2C_DAT, IOMUX_CONFIG_FUNC) | 665 | #define MX31_PIN_I2C_DAT__I2C1_SDA IOMUX_MODE(MX31_PIN_I2C_DAT, IOMUX_CONFIG_FUNC) |
@@ -711,8 +704,8 @@ enum iomux_pins { | |||
711 | #define MX31_PIN_DSR_DCE1__GPIO2_9 IOMUX_MODE(MX31_PIN_DSR_DCE1, IOMUX_CONFIG_GPIO) | 704 | #define MX31_PIN_DSR_DCE1__GPIO2_9 IOMUX_MODE(MX31_PIN_DSR_DCE1, IOMUX_CONFIG_GPIO) |
712 | #define MX31_PIN_RI_DCE1__GPIO2_10 IOMUX_MODE(MX31_PIN_RI_DCE1, IOMUX_CONFIG_GPIO) | 705 | #define MX31_PIN_RI_DCE1__GPIO2_10 IOMUX_MODE(MX31_PIN_RI_DCE1, IOMUX_CONFIG_GPIO) |
713 | #define MX31_PIN_DCD_DCE1__GPIO2_11 IOMUX_MODE(MX31_PIN_DCD_DCE1, IOMUX_CONFIG_GPIO) | 706 | #define MX31_PIN_DCD_DCE1__GPIO2_11 IOMUX_MODE(MX31_PIN_DCD_DCE1, IOMUX_CONFIG_GPIO) |
714 | #define MX31_PIN_STXD5__GPIO1_21 IOMUX_MODE(MX31_PIN_STXD5, IOMUX_CONFIG_GPIO) | 707 | #define MX31_PIN_STXD5__GPIO1_21 IOMUX_MODE(MX31_PIN_STXD5, IOMUX_CONFIG_GPIO) |
715 | #define MX31_PIN_SRXD5__GPIO1_22 IOMUX_MODE(MX31_PIN_SRXD5, IOMUX_CONFIG_GPIO) | 708 | #define MX31_PIN_SRXD5__GPIO1_22 IOMUX_MODE(MX31_PIN_SRXD5, IOMUX_CONFIG_GPIO) |
716 | #define MX31_PIN_GPIO1_3__GPIO1_3 IOMUX_MODE(MX31_PIN_GPIO1_3, IOMUX_CONFIG_GPIO) | 709 | #define MX31_PIN_GPIO1_3__GPIO1_3 IOMUX_MODE(MX31_PIN_GPIO1_3, IOMUX_CONFIG_GPIO) |
717 | #define MX31_PIN_CSPI2_SS1__CSPI3_SS1 IOMUX_MODE(MX31_PIN_CSPI2_SS1, IOMUX_CONFIG_ALT1) | 710 | #define MX31_PIN_CSPI2_SS1__CSPI3_SS1 IOMUX_MODE(MX31_PIN_CSPI2_SS1, IOMUX_CONFIG_ALT1) |
718 | #define MX31_PIN_RTS1__GPIO2_6 IOMUX_MODE(MX31_PIN_RTS1, IOMUX_CONFIG_GPIO) | 711 | #define MX31_PIN_RTS1__GPIO2_6 IOMUX_MODE(MX31_PIN_RTS1, IOMUX_CONFIG_GPIO) |
@@ -727,13 +720,14 @@ enum iomux_pins { | |||
727 | #define MX31_PIN_SCK5__SCK5 IOMUX_MODE(MX31_PIN_SCK5, IOMUX_CONFIG_FUNC) | 720 | #define MX31_PIN_SCK5__SCK5 IOMUX_MODE(MX31_PIN_SCK5, IOMUX_CONFIG_FUNC) |
728 | #define MX31_PIN_SFS5__SFS5 IOMUX_MODE(MX31_PIN_SFS5, IOMUX_CONFIG_FUNC) | 721 | #define MX31_PIN_SFS5__SFS5 IOMUX_MODE(MX31_PIN_SFS5, IOMUX_CONFIG_FUNC) |
729 | 722 | ||
730 | /*XXX: The SS0, SS1, SS2, SS3 lines of spi3 are multiplexed by cspi2_ss0, cspi2_ss1, cspi1_ss0 | 723 | /* |
731 | * cspi1_ss1*/ | 724 | * XXX: The SS0, SS1, SS2, SS3 lines of spi3 are multiplexed with cspi2_ss0, |
725 | * cspi2_ss1, cspi1_ss0 cspi1_ss1 | ||
726 | */ | ||
732 | 727 | ||
733 | /* | 728 | /* |
734 | * This function configures the pad value for a IOMUX pin. | 729 | * This function configures the pad value for a IOMUX pin. |
735 | */ | 730 | */ |
736 | void mxc_iomux_set_pad(enum iomux_pins, u32); | 731 | void mxc_iomux_set_pad(enum iomux_pins, u32); |
737 | 732 | ||
738 | #endif | 733 | #endif /* ifndef __MACH_IOMUX_MX3_H__ */ |
739 | |||
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx35.h b/arch/arm/plat-mxc/include/mach/iomux-mx35.h index c88d40795f7a..2a24bae1b878 100644 --- a/arch/arm/plat-mxc/include/mach/iomux-mx35.h +++ b/arch/arm/plat-mxc/include/mach/iomux-mx35.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C, NO_PAD_CTRL) 2009 by Jan Weitzel Phytec Messtechnik GmbH <armlinux@phytec.de> | 2 | * Copyright (C) 2009 by Jan Weitzel Phytec Messtechnik GmbH <armlinux@phytec.de> |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or | 4 | * This program is free software; you can redistribute it and/or |
5 | * modify it under the terms of the GNU General Public License | 5 | * modify it under the terms of the GNU General Public License |
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx51.h b/arch/arm/plat-mxc/include/mach/iomux-mx51.h new file mode 100644 index 000000000000..b4f975e6a665 --- /dev/null +++ b/arch/arm/plat-mxc/include/mach/iomux-mx51.h | |||
@@ -0,0 +1,326 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009-2010 Amit Kucheria <amit.kucheria@canonical.com> | ||
3 | * | ||
4 | * The code contained herein is licensed under the GNU General Public | ||
5 | * License. You may obtain a copy of the GNU General Public License | ||
6 | * Version 2 or later at the following locations: | ||
7 | * | ||
8 | * http://www.opensource.org/licenses/gpl-license.html | ||
9 | * http://www.gnu.org/copyleft/gpl.html | ||
10 | */ | ||
11 | |||
12 | #ifndef __MACH_IOMUX_MX51_H__ | ||
13 | #define __MACH_IOMUX_MX51_H__ | ||
14 | |||
15 | #include <mach/iomux-v3.h> | ||
16 | |||
17 | /* | ||
18 | * various IOMUX alternate output functions (1-7) | ||
19 | */ | ||
20 | typedef enum iomux_config { | ||
21 | IOMUX_CONFIG_ALT0, | ||
22 | IOMUX_CONFIG_ALT1, | ||
23 | IOMUX_CONFIG_ALT2, | ||
24 | IOMUX_CONFIG_ALT3, | ||
25 | IOMUX_CONFIG_ALT4, | ||
26 | IOMUX_CONFIG_ALT5, | ||
27 | IOMUX_CONFIG_ALT6, | ||
28 | IOMUX_CONFIG_ALT7, | ||
29 | IOMUX_CONFIG_GPIO, /* added to help user use GPIO mode */ | ||
30 | IOMUX_CONFIG_SION = 0x1 << 4, /* LOOPBACK:MUX SION bit */ | ||
31 | } iomux_pin_cfg_t; | ||
32 | |||
33 | /* Pad control groupings */ | ||
34 | #define MX51_UART1_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_PKE | PAD_CTL_PUE | \ | ||
35 | PAD_CTL_DSE_HIGH) | ||
36 | #define MX51_UART2_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE | PAD_CTL_DSE_HIGH | \ | ||
37 | PAD_CTL_SRE_FAST) | ||
38 | #define MX51_UART3_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_DSE_HIGH | \ | ||
39 | PAD_CTL_SRE_FAST) | ||
40 | |||
41 | /* | ||
42 | * The naming convention for the pad modes is MX51_PAD_<padname>__<padmode> | ||
43 | * If <padname> or <padmode> refers to a GPIO, it is named | ||
44 | * GPIO_<unit>_<num> see also iomux-v3.h | ||
45 | */ | ||
46 | |||
47 | /* | ||
48 | * FIXME: This was converted using scripts from existing Freescale code to | ||
49 | * this form used upstream. Need to verify the name format. | ||
50 | */ | ||
51 | |||
52 | /* PAD MUX ALT INPSE PATH PADCTRL */ | ||
53 | |||
54 | #define MX51_PAD_GPIO_2_0__EIM_D16 IOMUX_PAD(0x3f0, 0x05c, 1, 0x0, 0, NO_PAD_CTRL) | ||
55 | #define MX51_PAD_GPIO_2_1__EIM_D17 IOMUX_PAD(0x3f4, 0x060, 1, 0x0, 0, NO_PAD_CTRL) | ||
56 | #define MX51_PAD_GPIO_2_2__EIM_D18 IOMUX_PAD(0x3f8, 0x064, 1, 0x0, 0, NO_PAD_CTRL) | ||
57 | #define MX51_PAD_GPIO_2_3__EIM_D19 IOMUX_PAD(0x3fc, 0x068, 1, 0x0, 0, NO_PAD_CTRL) | ||
58 | #define MX51_PAD_GPIO_2_4__EIM_D20 IOMUX_PAD(0x400, 0x06c, 1, 0x0, 0, NO_PAD_CTRL) | ||
59 | #define MX51_PAD_GPIO_2_5__EIM_D21 IOMUX_PAD(0x404, 0x070, 1, 0x0, 0, NO_PAD_CTRL) | ||
60 | #define MX51_PAD_GPIO_2_6__EIM_D22 IOMUX_PAD(0x408, 0x074, 1, 0x0, 0, NO_PAD_CTRL) | ||
61 | #define MX51_PAD_GPIO_2_7__EIM_D23 IOMUX_PAD(0x40c, 0x078, 1, 0x0, 0, NO_PAD_CTRL) | ||
62 | |||
63 | /* Babbage UART3 */ | ||
64 | #define MX51_PAD_EIM_D24__UART3_CTS IOMUX_PAD(0x410, 0x07c, IOMUX_CONFIG_ALT3, 0x0, 0, MX51_UART3_PAD_CTRL) | ||
65 | #define MX51_PAD_EIM_D25__UART3_RXD IOMUX_PAD(0x414, 0x080, IOMUX_CONFIG_ALT3, 0x9f4, 0, MX51_UART3_PAD_CTRL) | ||
66 | #define MX51_PAD_EIM_D26__UART3_TXD IOMUX_PAD(0x418, 0x084, IOMUX_CONFIG_ALT3, 0x0, 0, MX51_UART3_PAD_CTRL) | ||
67 | #define MX51_PAD_EIM_D27__UART3_RTS IOMUX_PAD(0x41c, 0x088, IOMUX_CONFIG_ALT3, 0x9f0, 0, MX51_UART3_PAD_CTRL) | ||
68 | |||
69 | #define MX51_PAD_EIM_D28__EIM_D28 IOMUX_PAD(0x420, 0x08c, 0, 0x0, 0, NO_PAD_CTRL) | ||
70 | #define MX51_PAD_EIM_D29__EIM_D29 IOMUX_PAD(0x424, 0x090, 0, 0x0, 0, NO_PAD_CTRL) | ||
71 | #define MX51_PAD_EIM_D30__EIM_D30 IOMUX_PAD(0x428, 0x094, 0, 0x0, 0, NO_PAD_CTRL) | ||
72 | #define MX51_PAD_EIM_D31__EIM_D31 IOMUX_PAD(0x42c, 0x09c, 0, 0x0, 0, NO_PAD_CTRL) | ||
73 | |||
74 | #define MX51_PAD_GPIO_2_10__EIM_A16 IOMUX_PAD(0x430, 0x09c, 1, 0x0, 0, NO_PAD_CTRL) | ||
75 | #define MX51_PAD_GPIO_2_11__EIM_A17 IOMUX_PAD(0x434, 0x0a0, 1, 0x0, 0, NO_PAD_CTRL) | ||
76 | #define MX51_PAD_GPIO_2_12__EIM_A18 IOMUX_PAD(0x438, 0x0a4, 1, 0x0, 0, NO_PAD_CTRL) | ||
77 | #define MX51_PAD_GPIO_2_13__EIM_A19 IOMUX_PAD(0x43c, 0x0a8, 1, 0x0, 0, NO_PAD_CTRL) | ||
78 | #define MX51_PAD_GPIO_2_14__EIM_A20 IOMUX_PAD(0x440, 0x0ac, 1, 0x0, 0, NO_PAD_CTRL) | ||
79 | #define MX51_PAD_GPIO_2_15__EIM_A21 IOMUX_PAD(0x444, 0x0b0, 1, 0x0, 0, NO_PAD_CTRL) | ||
80 | #define MX51_PAD_GPIO_2_16__EIM_A22 IOMUX_PAD(0x448, 0x0b4, 1, 0x0, 0, NO_PAD_CTRL) | ||
81 | #define MX51_PAD_GPIO_2_17__EIM_A23 IOMUX_PAD(0x44c, 0x0b8, 1, 0x0, 0, NO_PAD_CTRL) | ||
82 | |||
83 | #define MX51_PAD_GPIO_2_18__EIM_A24 IOMUX_PAD(0x450, 0x0bc, 1, 0x0, 0, NO_PAD_CTRL) | ||
84 | #define MX51_PAD_GPIO_2_19__EIM_A25 IOMUX_PAD(0x454, 0x0c0, 1, 0x0, 0, NO_PAD_CTRL) | ||
85 | #define MX51_PAD_GPIO_2_20__EIM_A26 IOMUX_PAD(0x458, 0x0c4, 1, 0x0, 0, NO_PAD_CTRL) | ||
86 | #define MX51_PAD_GPIO_2_21__EIM_A27 IOMUX_PAD(0x45c, 0x0c8, 1, 0x0, 0, NO_PAD_CTRL) | ||
87 | #define MX51_PAD_EIM_EB0__EIM_EB0 IOMUX_PAD(0x460, 0x0cc, 0, 0x0, 0, NO_PAD_CTRL) | ||
88 | #define MX51_PAD_EIM_EB1__EIM_EB1 IOMUX_PAD(0x464, 0x0d0, 0, 0x0, 0, NO_PAD_CTRL) | ||
89 | #define MX51_PAD_GPIO_2_22__EIM_EB2 IOMUX_PAD(0x468, 0x0d4, 1, 0x0, 0, NO_PAD_CTRL) | ||
90 | #define MX51_PAD_GPIO_2_23__EIM_EB3 IOMUX_PAD(0x46c, 0x0d8, 1, 0x0, 0, NO_PAD_CTRL) | ||
91 | |||
92 | #define MX51_PAD_GPIO_2_24__EIM_OE IOMUX_PAD(0x470, 0x0dc, 1, 0x0, 0, NO_PAD_CTRL) | ||
93 | #define MX51_PAD_GPIO_2_25__EIM_CS0 IOMUX_PAD(0x474, 0x0e0, 1, 0x0, 0, NO_PAD_CTRL) | ||
94 | #define MX51_PAD_GPIO_2_26__EIM_CS1 IOMUX_PAD(0x478, 0x0e4, 1, 0x0, 0, NO_PAD_CTRL) | ||
95 | #define MX51_PAD_GPIO_2_27__EIM_CS2 IOMUX_PAD(0x47c, 0x0e8, 1, 0x0, 0, NO_PAD_CTRL) | ||
96 | #define MX51_PAD_GPIO_2_28__EIM_CS3 IOMUX_PAD(0x480, 0x0ec, 1, 0x0, 0, NO_PAD_CTRL) | ||
97 | #define MX51_PAD_GPIO_2_29__EIM_CS4 IOMUX_PAD(0x484, 0x0f0, 1, 0x0, 0, NO_PAD_CTRL) | ||
98 | #define MX51_PAD_GPIO_2_30__EIM_CS5 IOMUX_PAD(0x488, 0x0f4, 1, 0x0, 0, NO_PAD_CTRL) | ||
99 | #define MX51_PAD_GPIO_2_31__EIM_DTACK IOMUX_PAD(0x48c, 0x0f8, 1, 0x0, 0, NO_PAD_CTRL) | ||
100 | |||
101 | #define MX51_PAD_GPIO_3_1__EIM_LBA IOMUX_PAD(0x494, 0xFC, 1, 0x0, 0, NO_PAD_CTRL) | ||
102 | #define MX51_PAD_GPIO_3_2__EIM_CRE IOMUX_PAD(0x4A0, 0x100, 1, 0x0, 0, NO_PAD_CTRL) | ||
103 | #define MX51_PAD_DRAM_CS1__DRAM_CS1 IOMUX_PAD(0x4D0, 0x104, 0, 0x0, 0, NO_PAD_CTRL) | ||
104 | #define MX51_PAD_GPIO_3_3__NANDF_WE_B IOMUX_PAD(0x4E4, 0x108, 3, 0x0, 0, NO_PAD_CTRL) | ||
105 | #define MX51_PAD_GPIO_3_4__NANDF_RE_B IOMUX_PAD(0x4E8, 0x10C, 3, 0x0, 0, NO_PAD_CTRL) | ||
106 | #define MX51_PAD_GPIO_3_5__NANDF_ALE IOMUX_PAD(0x4EC, 0x110, 3, 0x0, 0, NO_PAD_CTRL) | ||
107 | #define MX51_PAD_GPIO_3_6__NANDF_CLE IOMUX_PAD(0x4F0, 0x114, 3, 0x0, 0, NO_PAD_CTRL) | ||
108 | #define MX51_PAD_GPIO_3_7__NANDF_WP_B IOMUX_PAD(0x4F4, 0x118, 3, 0x0, 0, NO_PAD_CTRL) | ||
109 | #define MX51_PAD_GPIO_3_8__NANDF_RB0 IOMUX_PAD(0x4F8, 0x11C, 3, 0x0, 0, NO_PAD_CTRL) | ||
110 | #define MX51_PAD_GPIO_3_9__NANDF_RB1 IOMUX_PAD(0x4FC, 0x120, 3, 0x0, 0, NO_PAD_CTRL) | ||
111 | #define MX51_PAD_GPIO_3_10__NANDF_RB2 IOMUX_PAD(0x500, 0x124, 3, 0x0, 0, NO_PAD_CTRL) | ||
112 | #define MX51_PAD_GPIO_3_11__NANDF_RB3 IOMUX_PAD(0x504, 0x128, 3, 0x0, 0, NO_PAD_CTRL) | ||
113 | #define MX51_PAD_GPIO_3_12__GPIO_NAND IOMUX_PAD(0x514, 0x12C, 3, 0x0, 0, NO_PAD_CTRL) | ||
114 | /* REVISIT: Not sure of these values | ||
115 | |||
116 | #define MX51_PAD_GPIO_1___NANDF_RB4 IOMUX_PAD(, , , 0x0, 0, NO_PAD_CTRL) | ||
117 | #define MX51_PAD_GPIO_3_13__NANDF_RB5 IOMUX_PAD(0x5D8, 0x130, 3, 0x0, 0, NO_PAD_CTRL) | ||
118 | #define MX51_PAD_GPIO_3_15__NANDF_RB7 IOMUX_PAD(0x5E0, 0x138, 3, 0x0, 0, NO_PAD_CTRL) | ||
119 | */ | ||
120 | #define MX51_PAD_GPIO_3_14__NANDF_RB6 IOMUX_PAD(0x5DC, 0x134, 3, 0x0, 0, NO_PAD_CTRL) | ||
121 | #define MX51_PAD_GPIO_3_16__NANDF_CS0 IOMUX_PAD(0x518, 0x130, 3, 0x0, 0, NO_PAD_CTRL) | ||
122 | #define MX51_PAD_GPIO_3_17__NANDF_CS1 IOMUX_PAD(0x51C, 0x134, 3, 0x0, 0, NO_PAD_CTRL) | ||
123 | #define MX51_PAD_GPIO_3_18__NANDF_CS2 IOMUX_PAD(0x520, 0x138, 3, 0x0, 0, NO_PAD_CTRL) | ||
124 | #define MX51_PAD_GPIO_3_19__NANDF_CS3 IOMUX_PAD(0x524, 0x13C, 3, 0x0, 0, NO_PAD_CTRL) | ||
125 | #define MX51_PAD_GPIO_3_20__NANDF_CS4 IOMUX_PAD(0x528, 0x140, 3, 0x0, 0, NO_PAD_CTRL) | ||
126 | #define MX51_PAD_GPIO_3_21__NANDF_CS5 IOMUX_PAD(0x52C, 0x144, 3, 0x0, 0, NO_PAD_CTRL) | ||
127 | #define MX51_PAD_GPIO_3_22__NANDF_CS6 IOMUX_PAD(0x530, 0x148, 3, 0x0, 0, NO_PAD_CTRL) | ||
128 | #define MX51_PAD_GPIO_3_23__NANDF_CS7 IOMUX_PAD(0x534, 0x14C, 3, 0x0, 0, NO_PAD_CTRL) | ||
129 | #define MX51_PAD_GPIO_3_24__NANDF_RDY_INT IOMUX_PAD(0x538, 0x150, 3, 0x0, 0, NO_PAD_CTRL) | ||
130 | #define MX51_PAD_GPIO_3_25__NANDF_D15 IOMUX_PAD(0x53C, 0x154, 3, 0x0, 0, NO_PAD_CTRL) | ||
131 | #define MX51_PAD_GPIO_3_26__NANDF_D14 IOMUX_PAD(0x540, 0x158, 3, 0x0, 0, NO_PAD_CTRL) | ||
132 | #define MX51_PAD_GPIO_3_27__NANDF_D13 IOMUX_PAD(0x544, 0x15C, 3, 0x0, 0, NO_PAD_CTRL) | ||
133 | #define MX51_PAD_GPIO_3_28__NANDF_D12 IOMUX_PAD(0x548, 0x160, 3, 0x0, 0, NO_PAD_CTRL) | ||
134 | #define MX51_PAD_GPIO_3_29__NANDF_D11 IOMUX_PAD(0x54C, 0x164, 3, 0x0, 0, NO_PAD_CTRL) | ||
135 | #define MX51_PAD_GPIO_3_30__NANDF_D10 IOMUX_PAD(0x550, 0x168, 3, 0x0, 0, NO_PAD_CTRL) | ||
136 | #define MX51_PAD_GPIO_3_31__NANDF_D9 IOMUX_PAD(0x554, 0x16C, 3, 0x0, 0, NO_PAD_CTRL) | ||
137 | #define MX51_PAD_GPIO_4_0__NANDF_D8 IOMUX_PAD(0x558, 0x170, 3, 0x0, 0, NO_PAD_CTRL) | ||
138 | #define MX51_PAD_GPIO_4_1__NANDF_D7 IOMUX_PAD(0x55C, 0x174, 3, 0x0, 0, NO_PAD_CTRL) | ||
139 | #define MX51_PAD_GPIO_4_2__NANDF_D6 IOMUX_PAD(0x560, 0x178, 3, 0x0, 0, NO_PAD_CTRL) | ||
140 | #define MX51_PAD_GPIO_4_3__NANDF_D5 IOMUX_PAD(0x564, 0x17C, 3, 0x0, 0, NO_PAD_CTRL) | ||
141 | #define MX51_PAD_GPIO_4_4__NANDF_D4 IOMUX_PAD(0x568, 0x180, 3, 0x0, 0, NO_PAD_CTRL) | ||
142 | #define MX51_PAD_GPIO_4_5__NANDF_D3 IOMUX_PAD(0x56C, 0x184, 3, 0x0, 0, NO_PAD_CTRL) | ||
143 | #define MX51_PAD_GPIO_4_6__NANDF_D2 IOMUX_PAD(0x570, 0x188, 3, 0x0, 0, NO_PAD_CTRL) | ||
144 | #define MX51_PAD_GPIO_4_7__NANDF_D1 IOMUX_PAD(0x574, 0x18C, 3, 0x0, 0, NO_PAD_CTRL) | ||
145 | #define MX51_PAD_GPIO_4_8__NANDF_D0 IOMUX_PAD(0x578, 0x190, 3, 0x0, 0, NO_PAD_CTRL) | ||
146 | #define MX51_PAD_GPIO_3_12__CSI1_D8 IOMUX_PAD(0x57C, 0x194, 3, 0x0, 0, NO_PAD_CTRL) | ||
147 | #define MX51_PAD_GPIO_3_13__CSI1_D9 IOMUX_PAD(0x580, 0x198, 3, 0x0, 0, NO_PAD_CTRL) | ||
148 | #define MX51_PAD_CSI1_D10__CSI1_D10 IOMUX_PAD(0x584, 0x19C, 0, 0x0, 0, NO_PAD_CTRL) | ||
149 | #define MX51_PAD_CSI1_D11__CSI1_D11 IOMUX_PAD(0x588, 0x1A0, 0, 0x0, 0, NO_PAD_CTRL) | ||
150 | #define MX51_PAD_CSI1_D12__CSI1_D12 IOMUX_PAD(0x58C, 0x1A4, 0, 0x0, 0, NO_PAD_CTRL) | ||
151 | #define MX51_PAD_CSI1_D13__CSI1_D13 IOMUX_PAD(0x590, 0x1A8, 0, 0x0, 0, NO_PAD_CTRL) | ||
152 | #define MX51_PAD_CSI1_D14__CSI1_D14 IOMUX_PAD(0x594, 0x1AC, 0, 0x0, 0, NO_PAD_CTRL) | ||
153 | #define MX51_PAD_CSI1_D15__CSI1_D15 IOMUX_PAD(0x598, 0x1B0, 0, 0x0, 0, NO_PAD_CTRL) | ||
154 | #define MX51_PAD_CSI1_D16__CSI1_D16 IOMUX_PAD(0x59C, 0x1B4, 0, 0x0, 0, NO_PAD_CTRL) | ||
155 | #define MX51_PAD_CSI1_D17__CSI1_D17 IOMUX_PAD(0x5A0, 0x1B8, 0, 0x0, 0, NO_PAD_CTRL) | ||
156 | #define MX51_PAD_CSI1_D18__CSI1_D18 IOMUX_PAD(0x5A4, 0x1BC, 0, 0x0, 0, NO_PAD_CTRL) | ||
157 | #define MX51_PAD_CSI1_D19__CSI1_D19 IOMUX_PAD(0x5A8, 0x1C0, 0, 0x0, 0, NO_PAD_CTRL) | ||
158 | #define MX51_PAD_CSI1_VSYNC__CSI1_VSYNC IOMUX_PAD(0x5AC, 0x1C4, 0, 0x0, 0, NO_PAD_CTRL) | ||
159 | #define MX51_PAD_CSI1_HSYNC__CSI1_HSYNC IOMUX_PAD(0x5B0, 0x1C8, 0, 0x0, 0, NO_PAD_CTRL) | ||
160 | #define MX51_PAD_CSI1_PIXCLK__CSI1_PIXCLK IOMUX_PAD(0x5B4, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
161 | #define MX51_PAD_CSI1_MCLK__CSI1_MCLK IOMUX_PAD(0x5B8, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
162 | #define MX51_PAD_CSI1_PKE0__CSI1_PKE0 IOMUX_PAD(0x860, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
163 | #define MX51_PAD_GPIO_4_9__CSI2_D12 IOMUX_PAD(0x5BC, 0x1CC, 3, 0x0, 0, NO_PAD_CTRL) | ||
164 | #define MX51_PAD_GPIO_4_10__CSI2_D13 IOMUX_PAD(0x5C0, 0x1D0, 3, 0x0, 0, NO_PAD_CTRL) | ||
165 | #define MX51_PAD_GPIO_4_11__CSI2_D14 IOMUX_PAD(0x5C4, 0x1D4, 3, 0x0, 0, NO_PAD_CTRL) | ||
166 | #define MX51_PAD_GPIO_4_12__CSI2_D15 IOMUX_PAD(0x5C8, 0x1D8, 3, 0x0, 0, NO_PAD_CTRL) | ||
167 | #define MX51_PAD_GPIO_4_11__CSI2_D16 IOMUX_PAD(0x5CC, 0x1DC, 3, 0x0, 0, NO_PAD_CTRL) | ||
168 | #define MX51_PAD_GPIO_4_12__CSI2_D17 IOMUX_PAD(0x5D0, 0x1E0, 3, 0x0, 0, NO_PAD_CTRL) | ||
169 | #define MX51_PAD_GPIO_4_11__CSI2_D18 IOMUX_PAD(0x5D4, 0x1E4, 3, 0x0, 0, NO_PAD_CTRL) | ||
170 | #define MX51_PAD_GPIO_4_12__CSI2_D19 IOMUX_PAD(0x5D8, 0x1E8, 3, 0x0, 0, NO_PAD_CTRL) | ||
171 | #define MX51_PAD_GPIO_4_13__CSI2_VSYNC IOMUX_PAD(0x5DC, 0x1EC, 3, 0x0, 0, NO_PAD_CTRL) | ||
172 | #define MX51_PAD_GPIO_4_14__CSI2_HSYNC IOMUX_PAD(0x5E0, 0x1F0, 3, 0x0, 0, NO_PAD_CTRL) | ||
173 | #define MX51_PAD_GPIO_4_15__CSI2_PIXCLK IOMUX_PAD(0x5E4, 0x1F4, 3, 0x0, 0, NO_PAD_CTRL) | ||
174 | #define MX51_PAD_CSI2_PKE0__CSI2_PKE0 IOMUX_PAD(0x81C, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
175 | #define MX51_PAD_GPIO_4_16__I2C1_CLK IOMUX_PAD(0x5E8, 0x1F8, 3, 0x0, 0, NO_PAD_CTRL) | ||
176 | #define MX51_PAD_GPIO_4_17__I2C1_DAT IOMUX_PAD(0x5EC, 0x1FC, 3, 0x0, 0, NO_PAD_CTRL) | ||
177 | #define MX51_PAD_GPIO_4_18__AUD3_BB_TXD IOMUX_PAD(0x5F0, 0x200, 3, 0x0, 0, NO_PAD_CTRL) | ||
178 | #define MX51_PAD_GPIO_4_19__AUD3_BB_RXD IOMUX_PAD(0x5F4, 0x204, 3, 0x0, 0, NO_PAD_CTRL) | ||
179 | #define MX51_PAD_GPIO_4_20__AUD3_BB_CK IOMUX_PAD(0x5F8, 0x208, 3, 0x0, 0, NO_PAD_CTRL) | ||
180 | #define MX51_PAD_GPIO_4_21__AUD3_BB_FS IOMUX_PAD(0x5FC, 0x20C, 3, 0x0, 0, NO_PAD_CTRL) | ||
181 | #define MX51_PAD_GPIO_4_22__CSPI1_MOSI IOMUX_PAD(0x600, 0x210, 3, 0x0, 0, NO_PAD_CTRL) | ||
182 | #define MX51_PAD_GPIO_4_23__CSPI1_MISO IOMUX_PAD(0x604, 0x214, 3, 0x0, 0, NO_PAD_CTRL) | ||
183 | #define MX51_PAD_GPIO_4_24__CSPI1_SS0 IOMUX_PAD(0x608, 0x218, 3, 0x0, 0, NO_PAD_CTRL) | ||
184 | #define MX51_PAD_GPIO_4_25__CSPI1_SS1 IOMUX_PAD(0x60C, 0x21C, 3, 0x0, 0, NO_PAD_CTRL) | ||
185 | #define MX51_PAD_GPIO_4_26__CSPI1_RDY IOMUX_PAD(0x610, 0x220, 3, 0x0, 0, NO_PAD_CTRL) | ||
186 | #define MX51_PAD_GPIO_4_27__CSPI1_SCLK IOMUX_PAD(0x614, 0x224, 3, 0x0, 0, NO_PAD_CTRL) | ||
187 | |||
188 | /* Babbage UART1 */ | ||
189 | #define MX51_PAD_UART1_RXD__UART1_RXD IOMUX_PAD(0x618, 0x228, IOMUX_CONFIG_ALT0, 0x9e4, 0, MX51_UART1_PAD_CTRL | PAD_CTL_SRE_FAST) | ||
190 | #define MX51_PAD_UART1_TXD__UART1_TXD IOMUX_PAD(0x61C, 0x22C, IOMUX_CONFIG_ALT0, 0x0, 0, MX51_UART1_PAD_CTRL | PAD_CTL_SRE_FAST) | ||
191 | #define MX51_PAD_UART1_RTS__UART1_RTS IOMUX_PAD(0x620, 0x230, IOMUX_CONFIG_ALT0, 0x9e0, 0, MX51_UART1_PAD_CTRL) | ||
192 | #define MX51_PAD_UART1_CTS__UART1_CTS IOMUX_PAD(0x624, 0x234, IOMUX_CONFIG_ALT0, 0x0, 0, MX51_UART1_PAD_CTRL) | ||
193 | |||
194 | /* Babbage UART2 */ | ||
195 | #define MX51_PAD_UART2_RXD__UART2_RXD IOMUX_PAD(0x628, 0x238, IOMUX_CONFIG_ALT0, 0x9ec, 2, MX51_UART2_PAD_CTRL) | ||
196 | #define MX51_PAD_UART2_TXD__UART2_TXD IOMUX_PAD(0x62C, 0x23C, IOMUX_CONFIG_ALT0, 0x0, 0, MX51_UART2_PAD_CTRL) | ||
197 | |||
198 | #define MX51_PAD_GPIO_1_22__UART3_RXD IOMUX_PAD(0x630, 0x240, 3, 0x0, 0, NO_PAD_CTRL) | ||
199 | #define MX51_PAD_GPIO_1_23__UART3_TXD IOMUX_PAD(0x634, 0x244, 3, 0x0, 0, NO_PAD_CTRL) | ||
200 | #define MX51_PAD_GPIO_1_24__OWIRE_LINE IOMUX_PAD(0x638, 0x248, 3, 0x0, 0, NO_PAD_CTRL) | ||
201 | #define MX51_PAD_KEY_ROW0__KEY_ROW0 IOMUX_PAD(0x63C, 0x24C, 0, 0x0, 0, NO_PAD_CTRL) | ||
202 | #define MX51_PAD_KEY_ROW1__KEY_ROW1 IOMUX_PAD(0x640, 0x250, 0, 0x0, 0, NO_PAD_CTRL) | ||
203 | #define MX51_PAD_KEY_ROW2__KEY_ROW2 IOMUX_PAD(0x644, 0x254, 0, 0x0, 0, NO_PAD_CTRL) | ||
204 | #define MX51_PAD_KEY_ROW3__KEY_ROW3 IOMUX_PAD(0x648, 0x258, 0, 0x0, 0, NO_PAD_CTRL) | ||
205 | #define MX51_PAD_KEY_COL0__KEY_COL0 IOMUX_PAD(0x64C, 0x25C, 0, 0x0, 0, NO_PAD_CTRL) | ||
206 | #define MX51_PAD_KEY_COL1__KEY_COL1 IOMUX_PAD(0x650, 0x260, 0, 0x0, 0, NO_PAD_CTRL) | ||
207 | #define MX51_PAD_KEY_COL2__KEY_COL2 IOMUX_PAD(0x654, 0x264, 0, 0x0, 0, NO_PAD_CTRL) | ||
208 | #define MX51_PAD_KEY_COL3__KEY_COL3 IOMUX_PAD(0x658, 0x268, 0, 0x0, 0, NO_PAD_CTRL) | ||
209 | #define MX51_PAD_KEY_COL4__KEY_COL4 IOMUX_PAD(0x65C, 0x26C, 0, 0x0, 0, NO_PAD_CTRL) | ||
210 | #define MX51_PAD_KEY_COL5__KEY_COL5 IOMUX_PAD(0x660, 0x270, 0, 0x0, 0, NO_PAD_CTRL) | ||
211 | #define MX51_PAD_GPIO_1_25__USBH1_CLK IOMUX_PAD(0x678, 0x278, 2, 0x0, 0, NO_PAD_CTRL) | ||
212 | #define MX51_PAD_GPIO_1_26__USBH1_DIR IOMUX_PAD(0x67C, 0x27C, 2, 0x0, 0, NO_PAD_CTRL) | ||
213 | #define MX51_PAD_GPIO_1_27__USBH1_STP IOMUX_PAD(0x680, 0x280, 2, 0x0, 0, NO_PAD_CTRL) | ||
214 | #define MX51_PAD_GPIO_1_28__USBH1_NXT IOMUX_PAD(0x684, 0x284, 2, 0x0, 0, NO_PAD_CTRL) | ||
215 | #define MX51_PAD_GPIO_1_11__USBH1_DATA0 IOMUX_PAD(0x688, 0x288, 2, 0x0, 0, NO_PAD_CTRL) | ||
216 | #define MX51_PAD_GPIO_1_12__USBH1_DATA1 IOMUX_PAD(0x68C, 0x28C, 2, 0x0, 0, NO_PAD_CTRL) | ||
217 | #define MX51_PAD_GPIO_1_13__USBH1_DATA2 IOMUX_PAD(0x690, 0x290, 2, 0x0, 0, NO_PAD_CTRL) | ||
218 | #define MX51_PAD_GPIO_1_14__USBH1_DATA3 IOMUX_PAD(0x694, 0x294, 2, 0x0, 0, NO_PAD_CTRL) | ||
219 | #define MX51_PAD_GPIO_1_15__USBH1_DATA4 IOMUX_PAD(0x698, 0x298, 2, 0x0, 0, NO_PAD_CTRL) | ||
220 | #define MX51_PAD_GPIO_1_16__USBH1_DATA5 IOMUX_PAD(0x69C, 0x29C, 2, 0x0, 0, NO_PAD_CTRL) | ||
221 | #define MX51_PAD_GPIO_1_17__USBH1_DATA6 IOMUX_PAD(0x6A0, 0x2A0, 2, 0x0, 0, NO_PAD_CTRL) | ||
222 | #define MX51_PAD_GPIO_1_18__USBH1_DATA7 IOMUX_PAD(0x6A4, 0x2A4, 2, 0x0, 0, NO_PAD_CTRL) | ||
223 | #define MX51_PAD_GPIO_3_0__DI1_PIN11 IOMUX_PAD(0x6A8, 0x2A8, 4, 0x0, 0, NO_PAD_CTRL) | ||
224 | #define MX51_PAD_GPIO_3_1__DI1_PIN12 IOMUX_PAD(0x6AC, 0x2AC, 4, 0x0, 0, NO_PAD_CTRL) | ||
225 | #define MX51_PAD_GPIO_3_2__DI1_PIN13 IOMUX_PAD(0x6B0, 0x2B0, 4, 0x0, 0, NO_PAD_CTRL) | ||
226 | #define MX51_PAD_GPIO_3_3__DI1_D0_CS IOMUX_PAD(0x6B4, 0x2B4, 4, 0x0, 0, NO_PAD_CTRL) | ||
227 | #define MX51_PAD_GPIO_3_4__DI1_D1_CS IOMUX_PAD(0x6B8, 0x2B8, 4, 0x0, 0, NO_PAD_CTRL) | ||
228 | #define MX51_PAD_GPIO_3_5__DISPB2_SER_DIN IOMUX_PAD(0x6BC, 0x2BC, 4, 0x0, 0, NO_PAD_CTRL) | ||
229 | #define MX51_PAD_GPIO_3_6__DISPB2_SER_DIO IOMUX_PAD(0x6C0, 0x2C0, 4, 0x0, 0, NO_PAD_CTRL) | ||
230 | #define MX51_PAD_GPIO_3_7__DISPB2_SER_CLK IOMUX_PAD(0x6C4, 0x2C4, 4, 0x0, 0, NO_PAD_CTRL) | ||
231 | #define MX51_PAD_GPIO_3_8__DISPB2_SER_RS IOMUX_PAD(0x6C8, 0x2C8, 4, 0x0, 0, NO_PAD_CTRL) | ||
232 | #define MX51_PAD_DISP1_DAT0__DISP1_DAT0 IOMUX_PAD(0x6CC, 0x2CC, 0, 0x0, 0, NO_PAD_CTRL) | ||
233 | #define MX51_PAD_DISP1_DAT1__DISP1_DAT1 IOMUX_PAD(0x6D0, 0x2D0, 0, 0x0, 0, NO_PAD_CTRL) | ||
234 | #define MX51_PAD_DISP1_DAT2__DISP1_DAT2 IOMUX_PAD(0x6D4, 0x2D4, 0, 0x0, 0, NO_PAD_CTRL) | ||
235 | #define MX51_PAD_DISP1_DAT3__DISP1_DAT3 IOMUX_PAD(0x6D8, 0x2D8, 0, 0x0, 0, NO_PAD_CTRL) | ||
236 | #define MX51_PAD_DISP1_DAT4__DISP1_DAT4 IOMUX_PAD(0x6DC, 0x2DC, 0, 0x0, 0, NO_PAD_CTRL) | ||
237 | #define MX51_PAD_DISP1_DAT5__DISP1_DAT5 IOMUX_PAD(0x6E0, 0x2E0, 0, 0x0, 0, NO_PAD_CTRL) | ||
238 | #define MX51_PAD_DISP1_DAT6__DISP1_DAT6 IOMUX_PAD(0x6E4, 0x2E4, 0, 0x0, 0, NO_PAD_CTRL) | ||
239 | #define MX51_PAD_DISP1_DAT7__DISP1_DAT7 IOMUX_PAD(0x6E8, 0x2E8, 0, 0x0, 0, NO_PAD_CTRL) | ||
240 | #define MX51_PAD_DISP1_DAT8__DISP1_DAT8 IOMUX_PAD(0x6EC, 0x2EC, 0, 0x0, 0, NO_PAD_CTRL) | ||
241 | #define MX51_PAD_DISP1_DAT9__DISP1_DAT9 IOMUX_PAD(0x6F0, 0x2F0, 0, 0x0, 0, NO_PAD_CTRL) | ||
242 | #define MX51_PAD_DISP1_DAT10__DISP1_DAT10 IOMUX_PAD(0x6F4, 0x2F4, 0, 0x0, 0, NO_PAD_CTRL) | ||
243 | #define MX51_PAD_DISP1_DAT11__DISP1_DAT11 IOMUX_PAD(0x6F8, 0x2F8, 0, 0x0, 0, NO_PAD_CTRL) | ||
244 | #define MX51_PAD_DISP1_DAT12__DISP1_DAT12 IOMUX_PAD(0x6FC, 0x2FC, 0, 0x0, 0, NO_PAD_CTRL) | ||
245 | #define MX51_PAD_DISP1_DAT13__DISP1_DAT13 IOMUX_PAD(0x700, 0x300, 0, 0x0, 0, NO_PAD_CTRL) | ||
246 | #define MX51_PAD_DISP1_DAT14__DISP1_DAT14 IOMUX_PAD(0x704, 0x304, 0, 0x0, 0, NO_PAD_CTRL) | ||
247 | #define MX51_PAD_DISP1_DAT15__DISP1_DAT15 IOMUX_PAD(0x708, 0x308, 0, 0x0, 0, NO_PAD_CTRL) | ||
248 | #define MX51_PAD_DISP1_DAT16__DISP1_DAT16 IOMUX_PAD(0x70C, 0x30C, 0, 0x0, 0, NO_PAD_CTRL) | ||
249 | #define MX51_PAD_DISP1_DAT17__DISP1_DAT17 IOMUX_PAD(0x710, 0x310, 0, 0x0, 0, NO_PAD_CTRL) | ||
250 | #define MX51_PAD_DISP1_DAT18__DISP1_DAT18 IOMUX_PAD(0x714, 0x314, 0, 0x0, 0, NO_PAD_CTRL) | ||
251 | #define MX51_PAD_DISP1_DAT19__DISP1_DAT19 IOMUX_PAD(0x718, 0x318, 0, 0x0, 0, NO_PAD_CTRL) | ||
252 | #define MX51_PAD_DISP1_DAT20__DISP1_DAT20 IOMUX_PAD(0x71C, 0x31C, 0, 0x0, 0, NO_PAD_CTRL) | ||
253 | #define MX51_PAD_DISP1_DAT21__DISP1_DAT21 IOMUX_PAD(0x720, 0x320, 0, 0x0, 0, NO_PAD_CTRL) | ||
254 | #define MX51_PAD_DISP1_DAT22__DISP1_DAT22 IOMUX_PAD(0x724, 0x324, 0, 0x0, 0, NO_PAD_CTRL) | ||
255 | #define MX51_PAD_DISP1_DAT23__DISP1_DAT23 IOMUX_PAD(0x728, 0x328, 0, 0x0, 0, NO_PAD_CTRL) | ||
256 | #define MX51_PAD_DI1_PIN3__DI1_PIN3 IOMUX_PAD(0x72C, 0x32C, 0, 0x0, 0, NO_PAD_CTRL) | ||
257 | #define MX51_PAD_DI1_PIN2__DI1_PIN2 IOMUX_PAD(0x734, 0x330, 0, 0x0, 0, NO_PAD_CTRL) | ||
258 | #define MX51_PAD_DI_GP1__DI_GP1 IOMUX_PAD(0x73C, 0x334, 0, 0x0, 0, NO_PAD_CTRL) | ||
259 | #define MX51_PAD_DI_GP2__DI_GP2 IOMUX_PAD(0x740, 0x338, 0, 0x0, 0, NO_PAD_CTRL) | ||
260 | #define MX51_PAD_DI_GP3__DI_GP3 IOMUX_PAD(0x744, 0x33C, 0, 0x0, 0, NO_PAD_CTRL) | ||
261 | #define MX51_PAD_DI2_PIN4__DI2_PIN4 IOMUX_PAD(0x748, 0x340, 0, 0x0, 0, NO_PAD_CTRL) | ||
262 | #define MX51_PAD_DI2_PIN2__DI2_PIN2 IOMUX_PAD(0x74C, 0x344, 0, 0x0, 0, NO_PAD_CTRL) | ||
263 | #define MX51_PAD_DI2_PIN3__DI2_PIN3 IOMUX_PAD(0x750, 0x348, 0, 0x0, 0, NO_PAD_CTRL) | ||
264 | #define MX51_PAD_DI2_DISP_CLK__DI2_DISP_CLK IOMUX_PAD(0x754, 0x34C, 0, 0x0, 0, NO_PAD_CTRL) | ||
265 | #define MX51_PAD_DI_GP4__DI_GP4 IOMUX_PAD(0x758, 0x350, 0, 0x0, 0, NO_PAD_CTRL) | ||
266 | #define MX51_PAD_DISP2_DAT0__DISP2_DAT0 IOMUX_PAD(0x75C, 0x354, 0, 0x0, 0, NO_PAD_CTRL) | ||
267 | #define MX51_PAD_DISP2_DAT1__DISP2_DAT1 IOMUX_PAD(0x760, 0x358, 0, 0x0, 0, NO_PAD_CTRL) | ||
268 | #define MX51_PAD_DISP2_DAT2__DISP2_DAT2 IOMUX_PAD(0x764, 0x35C, 0, 0x0, 0, NO_PAD_CTRL) | ||
269 | #define MX51_PAD_DISP2_DAT3__DISP2_DAT3 IOMUX_PAD(0x768, 0x360, 0, 0x0, 0, NO_PAD_CTRL) | ||
270 | #define MX51_PAD_DISP2_DAT4__DISP2_DAT4 IOMUX_PAD(0x76C, 0x364, 0, 0x0, 0, NO_PAD_CTRL) | ||
271 | #define MX51_PAD_DISP2_DAT5__DISP2_DAT5 IOMUX_PAD(0x770, 0x368, 0, 0x0, 0, NO_PAD_CTRL) | ||
272 | #define MX51_PAD_GPIO_1_19__DISP2_DAT6 IOMUX_PAD(0x774, 0x36C, 5, 0x0, 0, NO_PAD_CTRL) | ||
273 | #define MX51_PAD_GPIO_1_29__DISP2_DAT7 IOMUX_PAD(0x778, 0x370, 5, 0x0, 0, NO_PAD_CTRL) | ||
274 | #define MX51_PAD_GPIO_1_30__DISP2_DAT8 IOMUX_PAD(0x77C, 0x374, 5, 0x0, 0, NO_PAD_CTRL) | ||
275 | #define MX51_PAD_GPIO_1_31__DISP2_DAT9 IOMUX_PAD(0x780, 0x378, 5, 0x0, 0, NO_PAD_CTRL) | ||
276 | #define MX51_PAD_DISP2_DAT10__DISP2_DAT10 IOMUX_PAD(0x784, 0x37C, 0, 0x0, 0, NO_PAD_CTRL) | ||
277 | #define MX51_PAD_DISP2_DAT11__DISP2_DAT11 IOMUX_PAD(0x788, 0x380, 0, 0x0, 0, NO_PAD_CTRL) | ||
278 | #define MX51_PAD_DISP2_DAT12__DISP2_DAT12 IOMUX_PAD(0x78C, 0x384, 0, 0x0, 0, NO_PAD_CTRL) | ||
279 | #define MX51_PAD_DISP2_DAT13__DISP2_DAT13 IOMUX_PAD(0x790, 0x388, 0, 0x0, 0, NO_PAD_CTRL) | ||
280 | #define MX51_PAD_DISP2_DAT14__DISP2_DAT14 IOMUX_PAD(0x794, 0x38C, 0, 0x0, 0, NO_PAD_CTRL) | ||
281 | #define MX51_PAD_DISP2_DAT15__DISP2_DAT15 IOMUX_PAD(0x798, 0x390, 0, 0x0, 0, NO_PAD_CTRL) | ||
282 | #define MX51_PAD_SD1_CMD__SD1_CMD IOMUX_PAD(0x79C, 0x394, 0, 0x0, 0, NO_PAD_CTRL) | ||
283 | #define MX51_PAD_SD1_CLK__SD1_CLK IOMUX_PAD(0x7A0, 0x398, 0, 0x0, 0, NO_PAD_CTRL) | ||
284 | #define MX51_PAD_SD1_DATA0__SD1_DATA0 IOMUX_PAD(0x7A4, 0x39C, 0, 0x0, 0, NO_PAD_CTRL) | ||
285 | #define MX51_PAD_SD1_DATA1__SD1_DATA1 IOMUX_PAD(0x7A8, 0x3A0, 0, 0x0, 0, NO_PAD_CTRL) | ||
286 | #define MX51_PAD_SD1_DATA2__SD1_DATA2 IOMUX_PAD(0x7AC, 0x3A4, 0, 0x0, 0, NO_PAD_CTRL) | ||
287 | #define MX51_PAD_SD1_DATA3__SD1_DATA3 IOMUX_PAD(0x7B0, 0x3A8, 0, 0x0, 0, NO_PAD_CTRL) | ||
288 | #define MX51_PAD_GPIO_1_0__GPIO1_0 IOMUX_PAD(0x7B4, 0x3AC, 1, 0x0, 0, NO_PAD_CTRL) | ||
289 | #define MX51_PAD_GPIO_1_1__GPIO1_1 IOMUX_PAD(0x7B8, 0x3B0, 1, 0x0, 0, NO_PAD_CTRL) | ||
290 | #define MX51_PAD_SD2_CMD__SD2_CMD IOMUX_PAD(0x7BC, 0x3B4, 0, 0x0, 0, NO_PAD_CTRL) | ||
291 | #define MX51_PAD_SD2_CLK__SD2_CLK IOMUX_PAD(0x7C0, 0x3B8, 0, 0x0, 0, NO_PAD_CTRL) | ||
292 | #define MX51_PAD_SD2_DATA0__SD2_DATA0 IOMUX_PAD(0x7C4, 0x3BC, 0, 0x0, 0, NO_PAD_CTRL) | ||
293 | #define MX51_PAD_SD2_DATA1__SD2_DATA1 IOMUX_PAD(0x7C8, 0x3C0, 0, 0x0, 0, NO_PAD_CTRL) | ||
294 | #define MX51_PAD_SD2_DATA2__SD2_DATA2 IOMUX_PAD(0x7CC, 0x3C4, 0, 0x0, 0, NO_PAD_CTRL) | ||
295 | #define MX51_PAD_SD2_DATA3__SD2_DATA3 IOMUX_PAD(0x7D0, 0x3C8, 0, 0x0, 0, NO_PAD_CTRL) | ||
296 | #define MX51_PAD_GPIO_1_2__GPIO1_2 IOMUX_PAD(0x7D4, 0x3CC, 0, 0x0, 0, NO_PAD_CTRL) | ||
297 | #define MX51_PAD_GPIO_1_3__GPIO1_3 IOMUX_PAD(0x7D8, 0x3D0, 0, 0x0, 0, NO_PAD_CTRL) | ||
298 | #define MX51_PAD_PMIC_INT_REQ__PMIC_INT_REQ IOMUX_PAD(0x7FC, 0x3D4, 0, 0x0, 0, NO_PAD_CTRL) | ||
299 | #define MX51_PAD_GPIO_1_4__GPIO1_4 IOMUX_PAD(0x804, 0x3D8, 0, 0x0, 0, NO_PAD_CTRL) | ||
300 | #define MX51_PAD_GPIO_1_5__GPIO1_5 IOMUX_PAD(0x808, 0x3DC, 0, 0x0, 0, NO_PAD_CTRL) | ||
301 | #define MX51_PAD_GPIO_1_6__GPIO1_6 IOMUX_PAD(0x80C, 0x3E0, 0, 0x0, 0, NO_PAD_CTRL) | ||
302 | #define MX51_PAD_GPIO_1_7__GPIO1_7 IOMUX_PAD(0x810, 0x3E4, 0, 0x0, 0, NO_PAD_CTRL) | ||
303 | #define MX51_PAD_GPIO_1_8__GPIO1_8 IOMUX_PAD(0x814, 0x3E8, 0, 0x0, 1, \ | ||
304 | (PAD_CTL_SRE_SLOW | PAD_CTL_DSE_MED | PAD_CTL_PUS_100K_UP | PAD_CTL_HYS)) | ||
305 | #define MX51_PAD_GPIO_1_9__GPIO1_9 IOMUX_PAD(0x818, 0x3EC, 0, 0x0, 0, NO_PAD_CTRL) | ||
306 | |||
307 | /* EIM */ | ||
308 | #define MX51_PAD_EIM_DA0__EIM_DA0 IOMUX_PAD(0x7a8, 0x01c, 0, 0x0, 0, NO_PAD_CTRL) | ||
309 | #define MX51_PAD_EIM_DA1__EIM_DA1 IOMUX_PAD(0x7a8, 0x020, 0, 0x0, 0, NO_PAD_CTRL) | ||
310 | #define MX51_PAD_EIM_DA2__EIM_DA2 IOMUX_PAD(0x7a8, 0x024, 0, 0x0, 0, NO_PAD_CTRL) | ||
311 | #define MX51_PAD_EIM_DA3__EIM_DA3 IOMUX_PAD(0x7a8, 0x028, 0, 0x0, 0, NO_PAD_CTRL) | ||
312 | #define MX51_PAD_EIM_DA4__EIM_DA4 IOMUX_PAD(0x7ac, 0x02c, 0, 0x0, 0, NO_PAD_CTRL) | ||
313 | #define MX51_PAD_EIM_DA5__EIM_DA5 IOMUX_PAD(0x7ac, 0x030, 0, 0x0, 0, NO_PAD_CTRL) | ||
314 | #define MX51_PAD_EIM_DA6__EIM_DA6 IOMUX_PAD(0x7ac, 0x034, 0, 0x0, 0, NO_PAD_CTRL) | ||
315 | #define MX51_PAD_EIM_DA7__EIM_DA7 IOMUX_PAD(0x7ac, 0x038, 0, 0x0, 0, NO_PAD_CTRL) | ||
316 | |||
317 | #define MX51_PAD_EIM_DA8__EIM_DA8 IOMUX_PAD(0x7b0, 0x03c, 0, 0x0, 0, NO_PAD_CTRL) | ||
318 | #define MX51_PAD_EIM_DA9__EIM_DA9 IOMUX_PAD(0x7b0, 0x040, 0, 0x0, 0, NO_PAD_CTRL) | ||
319 | #define MX51_PAD_EIM_DA10__EIM_DA10 IOMUX_PAD(0x7b0, 0x044, 0, 0x0, 0, NO_PAD_CTRL) | ||
320 | #define MX51_PAD_EIM_DA11__EIM_DA11 IOMUX_PAD(0x7b0, 0x048, 0, 0x0, 0, NO_PAD_CTRL) | ||
321 | #define MX51_PAD_EIM_DA12__EIM_DA12 IOMUX_PAD(0x7bc, 0x04c, 0, 0x0, 0, NO_PAD_CTRL) | ||
322 | #define MX51_PAD_EIM_DA13__EIM_DA13 IOMUX_PAD(0x7bc, 0x050, 0, 0x0, 0, NO_PAD_CTRL) | ||
323 | #define MX51_PAD_EIM_DA14__EIM_DA14 IOMUX_PAD(0x7bc, 0x054, 0, 0x0, 0, NO_PAD_CTRL) | ||
324 | #define MX51_PAD_EIM_DA15__EIM_DA15 IOMUX_PAD(0x7bc, 0x058, 0, 0x0, 0, NO_PAD_CTRL) | ||
325 | |||
326 | #endif /* __MACH_IOMUX_MX51_H__ */ | ||
diff --git a/arch/arm/plat-mxc/include/mach/iomux-v1.h b/arch/arm/plat-mxc/include/mach/iomux-v1.h new file mode 100644 index 000000000000..884f5753f279 --- /dev/null +++ b/arch/arm/plat-mxc/include/mach/iomux-v1.h | |||
@@ -0,0 +1,103 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2008 by Sascha Hauer <kernel@pengutronix.de> | ||
3 | * Copyright (C) 2009 by Holger Schurig <hs4233@mail.mn-solutions.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 | #ifndef __MACH_IOMUX_V1_H__ | ||
20 | #define __MACH_IOMUX_V1_H__ | ||
21 | |||
22 | /* | ||
23 | * GPIO Module and I/O Multiplexer | ||
24 | * x = 0..3 for reg_A, reg_B, reg_C, reg_D | ||
25 | */ | ||
26 | #define MXC_DDIR(x) (0x00 + ((x) << 8)) | ||
27 | #define MXC_OCR1(x) (0x04 + ((x) << 8)) | ||
28 | #define MXC_OCR2(x) (0x08 + ((x) << 8)) | ||
29 | #define MXC_ICONFA1(x) (0x0c + ((x) << 8)) | ||
30 | #define MXC_ICONFA2(x) (0x10 + ((x) << 8)) | ||
31 | #define MXC_ICONFB1(x) (0x14 + ((x) << 8)) | ||
32 | #define MXC_ICONFB2(x) (0x18 + ((x) << 8)) | ||
33 | #define MXC_DR(x) (0x1c + ((x) << 8)) | ||
34 | #define MXC_GIUS(x) (0x20 + ((x) << 8)) | ||
35 | #define MXC_SSR(x) (0x24 + ((x) << 8)) | ||
36 | #define MXC_ICR1(x) (0x28 + ((x) << 8)) | ||
37 | #define MXC_ICR2(x) (0x2c + ((x) << 8)) | ||
38 | #define MXC_IMR(x) (0x30 + ((x) << 8)) | ||
39 | #define MXC_ISR(x) (0x34 + ((x) << 8)) | ||
40 | #define MXC_GPR(x) (0x38 + ((x) << 8)) | ||
41 | #define MXC_SWR(x) (0x3c + ((x) << 8)) | ||
42 | #define MXC_PUEN(x) (0x40 + ((x) << 8)) | ||
43 | |||
44 | #define MX1_NUM_GPIO_PORT 4 | ||
45 | #define MX21_NUM_GPIO_PORT 6 | ||
46 | #define MX27_NUM_GPIO_PORT 6 | ||
47 | |||
48 | #define GPIO_PIN_MASK 0x1f | ||
49 | |||
50 | #define GPIO_PORT_SHIFT 5 | ||
51 | #define GPIO_PORT_MASK (0x7 << GPIO_PORT_SHIFT) | ||
52 | |||
53 | #define GPIO_PORTA (0 << GPIO_PORT_SHIFT) | ||
54 | #define GPIO_PORTB (1 << GPIO_PORT_SHIFT) | ||
55 | #define GPIO_PORTC (2 << GPIO_PORT_SHIFT) | ||
56 | #define GPIO_PORTD (3 << GPIO_PORT_SHIFT) | ||
57 | #define GPIO_PORTE (4 << GPIO_PORT_SHIFT) | ||
58 | #define GPIO_PORTF (5 << GPIO_PORT_SHIFT) | ||
59 | |||
60 | #define GPIO_OUT (1 << 8) | ||
61 | #define GPIO_IN (0 << 8) | ||
62 | #define GPIO_PUEN (1 << 9) | ||
63 | |||
64 | #define GPIO_PF (1 << 10) | ||
65 | #define GPIO_AF (1 << 11) | ||
66 | |||
67 | #define GPIO_OCR_SHIFT 12 | ||
68 | #define GPIO_OCR_MASK (3 << GPIO_OCR_SHIFT) | ||
69 | #define GPIO_AIN (0 << GPIO_OCR_SHIFT) | ||
70 | #define GPIO_BIN (1 << GPIO_OCR_SHIFT) | ||
71 | #define GPIO_CIN (2 << GPIO_OCR_SHIFT) | ||
72 | #define GPIO_GPIO (3 << GPIO_OCR_SHIFT) | ||
73 | |||
74 | #define GPIO_AOUT_SHIFT 14 | ||
75 | #define GPIO_AOUT_MASK (3 << GPIO_AOUT_SHIFT) | ||
76 | #define GPIO_AOUT (0 << GPIO_AOUT_SHIFT) | ||
77 | #define GPIO_AOUT_ISR (1 << GPIO_AOUT_SHIFT) | ||
78 | #define GPIO_AOUT_0 (2 << GPIO_AOUT_SHIFT) | ||
79 | #define GPIO_AOUT_1 (3 << GPIO_AOUT_SHIFT) | ||
80 | |||
81 | #define GPIO_BOUT_SHIFT 16 | ||
82 | #define GPIO_BOUT_MASK (3 << GPIO_BOUT_SHIFT) | ||
83 | #define GPIO_BOUT (0 << GPIO_BOUT_SHIFT) | ||
84 | #define GPIO_BOUT_ISR (1 << GPIO_BOUT_SHIFT) | ||
85 | #define GPIO_BOUT_0 (2 << GPIO_BOUT_SHIFT) | ||
86 | #define GPIO_BOUT_1 (3 << GPIO_BOUT_SHIFT) | ||
87 | |||
88 | /* decode irq number to use with IMR(x), ISR(x) and friends */ | ||
89 | #define IRQ_TO_REG(irq) ((irq - MXC_INTERNAL_IRQS) >> 5) | ||
90 | |||
91 | #define IRQ_GPIOA(x) (MXC_GPIO_IRQ_START + x) | ||
92 | #define IRQ_GPIOB(x) (IRQ_GPIOA(32) + x) | ||
93 | #define IRQ_GPIOC(x) (IRQ_GPIOB(32) + x) | ||
94 | #define IRQ_GPIOD(x) (IRQ_GPIOC(32) + x) | ||
95 | #define IRQ_GPIOE(x) (IRQ_GPIOD(32) + x) | ||
96 | #define IRQ_GPIOF(x) (IRQ_GPIOE(32) + x) | ||
97 | |||
98 | extern int mxc_gpio_mode(int gpio_mode); | ||
99 | extern int mxc_gpio_setup_multiple_pins(const int *pin_list, unsigned count, | ||
100 | const char *label); | ||
101 | extern void mxc_gpio_release_multiple_pins(const int *pin_list, int count); | ||
102 | |||
103 | #endif /* __MACH_IOMUX_V1_H__ */ | ||
diff --git a/arch/arm/plat-mxc/include/mach/iomux-v3.h b/arch/arm/plat-mxc/include/mach/iomux-v3.h index 1deda0184892..f2f73d31d5ba 100644 --- a/arch/arm/plat-mxc/include/mach/iomux-v3.h +++ b/arch/arm/plat-mxc/include/mach/iomux-v3.h | |||
@@ -81,11 +81,13 @@ struct pad_desc { | |||
81 | 81 | ||
82 | #define PAD_CTL_ODE (1 << 3) | 82 | #define PAD_CTL_ODE (1 << 3) |
83 | 83 | ||
84 | #define PAD_CTL_DSE_STANDARD (0 << 1) | 84 | #define PAD_CTL_DSE_LOW (0 << 1) |
85 | #define PAD_CTL_DSE_HIGH (1 << 1) | 85 | #define PAD_CTL_DSE_MED (1 << 1) |
86 | #define PAD_CTL_DSE_MAX (2 << 1) | 86 | #define PAD_CTL_DSE_HIGH (2 << 1) |
87 | #define PAD_CTL_DSE_MAX (3 << 1) | ||
87 | 88 | ||
88 | #define PAD_CTL_SRE_FAST (1 << 0) | 89 | #define PAD_CTL_SRE_FAST (1 << 0) |
90 | #define PAD_CTL_SRE_SLOW (0 << 0) | ||
89 | 91 | ||
90 | /* | 92 | /* |
91 | * setups a single pad in the iomuxer | 93 | * setups a single pad in the iomuxer |
diff --git a/arch/arm/plat-mxc/include/mach/iomux.h b/arch/arm/plat-mxc/include/mach/iomux.h index 011cfcd8b820..3d226d7e7be2 100644 --- a/arch/arm/plat-mxc/include/mach/iomux.h +++ b/arch/arm/plat-mxc/include/mach/iomux.h | |||
@@ -1,102 +1,14 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2008 by Sascha Hauer <kernel@pengutronix.de> | 2 | * Copyright (C) 2010 Uwe Kleine-Koenig, Pengutronix |
3 | * Copyright (C) 2009 by Holger Schurig <hs4233@mail.mn-solutions.de> | 3 | * |
4 | * | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * This program is free software; you can redistribute it and/or | 5 | * under the terms of the GNU General Public License version 2 as published by |
6 | * modify it under the terms of the GNU General Public License | 6 | * the Free Software Foundation. |
7 | * as published by the Free Software Foundation; either version 2 | 7 | */ |
8 | * of the License, or (at your option) any later version. | 8 | #ifndef __MACH_IOMUX_H__ |
9 | * This program is distributed in the hope that it will be useful, | 9 | #define __MACH_IOMUX_H__ |
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 _MXC_IOMUX_H | ||
21 | #define _MXC_IOMUX_H | ||
22 | |||
23 | /* | ||
24 | * GPIO Module and I/O Multiplexer | ||
25 | * x = 0..3 for reg_A, reg_B, reg_C, reg_D | ||
26 | */ | ||
27 | #define VA_GPIO_BASE IO_ADDRESS(GPIO_BASE_ADDR) | ||
28 | #define MXC_DDIR(x) (0x00 + ((x) << 8)) | ||
29 | #define MXC_OCR1(x) (0x04 + ((x) << 8)) | ||
30 | #define MXC_OCR2(x) (0x08 + ((x) << 8)) | ||
31 | #define MXC_ICONFA1(x) (0x0c + ((x) << 8)) | ||
32 | #define MXC_ICONFA2(x) (0x10 + ((x) << 8)) | ||
33 | #define MXC_ICONFB1(x) (0x14 + ((x) << 8)) | ||
34 | #define MXC_ICONFB2(x) (0x18 + ((x) << 8)) | ||
35 | #define MXC_DR(x) (0x1c + ((x) << 8)) | ||
36 | #define MXC_GIUS(x) (0x20 + ((x) << 8)) | ||
37 | #define MXC_SSR(x) (0x24 + ((x) << 8)) | ||
38 | #define MXC_ICR1(x) (0x28 + ((x) << 8)) | ||
39 | #define MXC_ICR2(x) (0x2c + ((x) << 8)) | ||
40 | #define MXC_IMR(x) (0x30 + ((x) << 8)) | ||
41 | #define MXC_ISR(x) (0x34 + ((x) << 8)) | ||
42 | #define MXC_GPR(x) (0x38 + ((x) << 8)) | ||
43 | #define MXC_SWR(x) (0x3c + ((x) << 8)) | ||
44 | #define MXC_PUEN(x) (0x40 + ((x) << 8)) | ||
45 | |||
46 | #ifdef CONFIG_ARCH_MX1 | ||
47 | # define GPIO_PORT_MAX 3 | ||
48 | #endif | ||
49 | #ifdef CONFIG_ARCH_MX2 | ||
50 | # define GPIO_PORT_MAX 5 | ||
51 | #endif | ||
52 | #ifdef CONFIG_ARCH_MX25 | ||
53 | # define GPIO_PORT_MAX 3 | ||
54 | #endif | ||
55 | |||
56 | #ifndef GPIO_PORT_MAX | ||
57 | # error "GPIO config port count unknown!" | ||
58 | #endif | ||
59 | |||
60 | #define GPIO_PIN_MASK 0x1f | ||
61 | |||
62 | #define GPIO_PORT_SHIFT 5 | ||
63 | #define GPIO_PORT_MASK (0x7 << GPIO_PORT_SHIFT) | ||
64 | |||
65 | #define GPIO_PORTA (0 << GPIO_PORT_SHIFT) | ||
66 | #define GPIO_PORTB (1 << GPIO_PORT_SHIFT) | ||
67 | #define GPIO_PORTC (2 << GPIO_PORT_SHIFT) | ||
68 | #define GPIO_PORTD (3 << GPIO_PORT_SHIFT) | ||
69 | #define GPIO_PORTE (4 << GPIO_PORT_SHIFT) | ||
70 | #define GPIO_PORTF (5 << GPIO_PORT_SHIFT) | ||
71 | |||
72 | #define GPIO_OUT (1 << 8) | ||
73 | #define GPIO_IN (0 << 8) | ||
74 | #define GPIO_PUEN (1 << 9) | ||
75 | |||
76 | #define GPIO_PF (1 << 10) | ||
77 | #define GPIO_AF (1 << 11) | ||
78 | |||
79 | #define GPIO_OCR_SHIFT 12 | ||
80 | #define GPIO_OCR_MASK (3 << GPIO_OCR_SHIFT) | ||
81 | #define GPIO_AIN (0 << GPIO_OCR_SHIFT) | ||
82 | #define GPIO_BIN (1 << GPIO_OCR_SHIFT) | ||
83 | #define GPIO_CIN (2 << GPIO_OCR_SHIFT) | ||
84 | #define GPIO_GPIO (3 << GPIO_OCR_SHIFT) | ||
85 | |||
86 | #define GPIO_AOUT_SHIFT 14 | ||
87 | #define GPIO_AOUT_MASK (3 << GPIO_AOUT_SHIFT) | ||
88 | #define GPIO_AOUT (0 << GPIO_AOUT_SHIFT) | ||
89 | #define GPIO_AOUT_ISR (1 << GPIO_AOUT_SHIFT) | ||
90 | #define GPIO_AOUT_0 (2 << GPIO_AOUT_SHIFT) | ||
91 | #define GPIO_AOUT_1 (3 << GPIO_AOUT_SHIFT) | ||
92 | |||
93 | #define GPIO_BOUT_SHIFT 16 | ||
94 | #define GPIO_BOUT_MASK (3 << GPIO_BOUT_SHIFT) | ||
95 | #define GPIO_BOUT (0 << GPIO_BOUT_SHIFT) | ||
96 | #define GPIO_BOUT_ISR (1 << GPIO_BOUT_SHIFT) | ||
97 | #define GPIO_BOUT_0 (2 << GPIO_BOUT_SHIFT) | ||
98 | #define GPIO_BOUT_1 (3 << GPIO_BOUT_SHIFT) | ||
99 | 10 | ||
11 | /* This file will go away, please include mach/iomux-mx... directly */ | ||
100 | 12 | ||
101 | #ifdef CONFIG_ARCH_MX1 | 13 | #ifdef CONFIG_ARCH_MX1 |
102 | #include <mach/iomux-mx1.h> | 14 | #include <mach/iomux-mx1.h> |
@@ -110,25 +22,5 @@ | |||
110 | #include <mach/iomux-mx27.h> | 22 | #include <mach/iomux-mx27.h> |
111 | #endif | 23 | #endif |
112 | #endif | 24 | #endif |
113 | #ifdef CONFIG_ARCH_MX25 | ||
114 | #include <mach/iomux-mx25.h> | ||
115 | #endif | ||
116 | 25 | ||
117 | 26 | #endif /* __MACH_IOMUX_H__ */ | |
118 | /* decode irq number to use with IMR(x), ISR(x) and friends */ | ||
119 | #define IRQ_TO_REG(irq) ((irq - MXC_INTERNAL_IRQS) >> 5) | ||
120 | |||
121 | #define IRQ_GPIOA(x) (MXC_GPIO_IRQ_START + x) | ||
122 | #define IRQ_GPIOB(x) (IRQ_GPIOA(32) + x) | ||
123 | #define IRQ_GPIOC(x) (IRQ_GPIOB(32) + x) | ||
124 | #define IRQ_GPIOD(x) (IRQ_GPIOC(32) + x) | ||
125 | #define IRQ_GPIOE(x) (IRQ_GPIOD(32) + x) | ||
126 | #define IRQ_GPIOF(x) (IRQ_GPIOE(32) + x) | ||
127 | |||
128 | |||
129 | extern void mxc_gpio_mode(int gpio_mode); | ||
130 | extern int mxc_gpio_setup_multiple_pins(const int *pin_list, unsigned count, | ||
131 | const char *label); | ||
132 | extern void mxc_gpio_release_multiple_pins(const int *pin_list, int count); | ||
133 | |||
134 | #endif | ||
diff --git a/arch/arm/plat-mxc/include/mach/irqs.h b/arch/arm/plat-mxc/include/mach/irqs.h index 0cb347645db4..86781f7b0c0c 100644 --- a/arch/arm/plat-mxc/include/mach/irqs.h +++ b/arch/arm/plat-mxc/include/mach/irqs.h | |||
@@ -12,22 +12,29 @@ | |||
12 | #define __ASM_ARCH_MXC_IRQS_H__ | 12 | #define __ASM_ARCH_MXC_IRQS_H__ |
13 | 13 | ||
14 | /* | 14 | /* |
15 | * So far all i.MX SoCs have 64 internal interrupts | 15 | * SoCs with TZIC interrupt controller have 128 IRQs, those with AVIC have 64 |
16 | */ | 16 | */ |
17 | #ifdef CONFIG_MXC_TZIC | ||
18 | #define MXC_INTERNAL_IRQS 128 | ||
19 | #else | ||
17 | #define MXC_INTERNAL_IRQS 64 | 20 | #define MXC_INTERNAL_IRQS 64 |
21 | #endif | ||
18 | 22 | ||
19 | #define MXC_GPIO_IRQ_START MXC_INTERNAL_IRQS | 23 | #define MXC_GPIO_IRQ_START MXC_INTERNAL_IRQS |
20 | 24 | ||
21 | #if defined CONFIG_ARCH_MX1 | 25 | /* these are ordered by size to support multi-SoC kernels */ |
22 | #define MXC_GPIO_IRQS (32 * 4) | 26 | #if defined CONFIG_ARCH_MX2 |
23 | #elif defined CONFIG_ARCH_MX2 | ||
24 | #define MXC_GPIO_IRQS (32 * 6) | 27 | #define MXC_GPIO_IRQS (32 * 6) |
25 | #elif defined CONFIG_ARCH_MX3 | 28 | #elif defined CONFIG_ARCH_MX1 |
26 | #define MXC_GPIO_IRQS (32 * 3) | 29 | #define MXC_GPIO_IRQS (32 * 4) |
27 | #elif defined CONFIG_ARCH_MX25 | 30 | #elif defined CONFIG_ARCH_MX25 |
28 | #define MXC_GPIO_IRQS (32 * 4) | 31 | #define MXC_GPIO_IRQS (32 * 4) |
32 | #elif defined CONFIG_ARCH_MX5 | ||
33 | #define MXC_GPIO_IRQS (32 * 4) | ||
29 | #elif defined CONFIG_ARCH_MXC91231 | 34 | #elif defined CONFIG_ARCH_MXC91231 |
30 | #define MXC_GPIO_IRQS (32 * 4) | 35 | #define MXC_GPIO_IRQS (32 * 4) |
36 | #elif defined CONFIG_ARCH_MX3 | ||
37 | #define MXC_GPIO_IRQS (32 * 3) | ||
31 | #endif | 38 | #endif |
32 | 39 | ||
33 | /* | 40 | /* |
@@ -51,6 +58,7 @@ | |||
51 | #else | 58 | #else |
52 | #define MX3_IPU_IRQS 0 | 59 | #define MX3_IPU_IRQS 0 |
53 | #endif | 60 | #endif |
61 | /* REVISIT: Add IPU irqs on IMX51 */ | ||
54 | 62 | ||
55 | #define NR_IRQS (MXC_IPU_IRQ_START + MX3_IPU_IRQS) | 63 | #define NR_IRQS (MXC_IPU_IRQ_START + MX3_IPU_IRQS) |
56 | 64 | ||
diff --git a/arch/arm/plat-mxc/include/mach/memory.h b/arch/arm/plat-mxc/include/mach/memory.h index d3afafdcc0e5..c4b40c35a6a1 100644 --- a/arch/arm/plat-mxc/include/mach/memory.h +++ b/arch/arm/plat-mxc/include/mach/memory.h | |||
@@ -11,37 +11,45 @@ | |||
11 | #ifndef __ASM_ARCH_MXC_MEMORY_H__ | 11 | #ifndef __ASM_ARCH_MXC_MEMORY_H__ |
12 | #define __ASM_ARCH_MXC_MEMORY_H__ | 12 | #define __ASM_ARCH_MXC_MEMORY_H__ |
13 | 13 | ||
14 | #if defined CONFIG_ARCH_MX1 | 14 | #define MX1_PHYS_OFFSET UL(0x08000000) |
15 | #define PHYS_OFFSET UL(0x08000000) | 15 | #define MX21_PHYS_OFFSET UL(0xc0000000) |
16 | #elif defined CONFIG_ARCH_MX2 | 16 | #define MX25_PHYS_OFFSET UL(0x80000000) |
17 | #ifdef CONFIG_MACH_MX21 | 17 | #define MX27_PHYS_OFFSET UL(0xa0000000) |
18 | #define PHYS_OFFSET UL(0xC0000000) | 18 | #define MX3x_PHYS_OFFSET UL(0x80000000) |
19 | #endif | 19 | #define MX51_PHYS_OFFSET UL(0x90000000) |
20 | #ifdef CONFIG_MACH_MX27 | 20 | #define MXC91231_PHYS_OFFSET UL(0x90000000) |
21 | #define PHYS_OFFSET UL(0xA0000000) | 21 | |
22 | #endif | 22 | #if !defined(CONFIG_RUNTIME_PHYS_OFFSET) |
23 | #elif defined CONFIG_ARCH_MX3 | 23 | # if defined CONFIG_ARCH_MX1 |
24 | #define PHYS_OFFSET UL(0x80000000) | 24 | # define PHYS_OFFSET MX1_PHYS_OFFSET |
25 | #elif defined CONFIG_ARCH_MX25 | 25 | # elif defined CONFIG_MACH_MX21 |
26 | #define PHYS_OFFSET UL(0x80000000) | 26 | # define PHYS_OFFSET MX21_PHYS_OFFSET |
27 | #elif defined CONFIG_ARCH_MXC91231 | 27 | # elif defined CONFIG_ARCH_MX25 |
28 | #define PHYS_OFFSET UL(0x90000000) | 28 | # define PHYS_OFFSET MX25_PHYS_OFFSET |
29 | # elif defined CONFIG_MACH_MX27 | ||
30 | # define PHYS_OFFSET MX27_PHYS_OFFSET | ||
31 | # elif defined CONFIG_ARCH_MX3 | ||
32 | # define PHYS_OFFSET MX3x_PHYS_OFFSET | ||
33 | # elif defined CONFIG_ARCH_MXC91231 | ||
34 | # define PHYS_OFFSET MXC91231_PHYS_OFFSET | ||
35 | # elif defined CONFIG_ARCH_MX5 | ||
36 | # define PHYS_OFFSET MX51_PHYS_OFFSET | ||
37 | # endif | ||
29 | #endif | 38 | #endif |
30 | 39 | ||
31 | #if defined(CONFIG_MX1_VIDEO) | 40 | #if defined(CONFIG_MX3_VIDEO) |
32 | /* | 41 | /* |
33 | * Increase size of DMA-consistent memory region. | 42 | * Increase size of DMA-consistent memory region. |
34 | * This is required for i.MX camera driver to capture at least four VGA frames. | 43 | * This is required for mx3 camera driver to capture at least two QXGA frames. |
35 | */ | 44 | */ |
36 | #define CONSISTENT_DMA_SIZE SZ_4M | 45 | #define CONSISTENT_DMA_SIZE SZ_8M |
37 | #endif /* CONFIG_MX1_VIDEO */ | ||
38 | 46 | ||
39 | #if defined(CONFIG_MX3_VIDEO) | 47 | #elif defined(CONFIG_MX1_VIDEO) |
40 | /* | 48 | /* |
41 | * Increase size of DMA-consistent memory region. | 49 | * Increase size of DMA-consistent memory region. |
42 | * This is required for mx3 camera driver to capture at least two QXGA frames. | 50 | * This is required for i.MX camera driver to capture at least four VGA frames. |
43 | */ | 51 | */ |
44 | #define CONSISTENT_DMA_SIZE SZ_8M | 52 | #define CONSISTENT_DMA_SIZE SZ_4M |
45 | #endif /* CONFIG_MX3_VIDEO */ | 53 | #endif /* CONFIG_MX1_VIDEO */ |
46 | 54 | ||
47 | #endif /* __ASM_ARCH_MXC_MEMORY_H__ */ | 55 | #endif /* __ASM_ARCH_MXC_MEMORY_H__ */ |
diff --git a/arch/arm/plat-mxc/include/mach/mtd-xip.h b/arch/arm/plat-mxc/include/mach/mtd-xip.h deleted file mode 100644 index 1ab1bba5688d..000000000000 --- a/arch/arm/plat-mxc/include/mach/mtd-xip.h +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | /* | ||
2 | * MTD primitives for XIP support. Architecture specific functions | ||
3 | * | ||
4 | * Do not include this file directly. It's included from linux/mtd/xip.h | ||
5 | * | ||
6 | * Copyright (C) 2008 Darius Augulis <augulis.darius@gmail.com>, Teltonika, Inc. | ||
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 <mach/mxc_timer.h> | ||
15 | |||
16 | #ifndef __ARCH_IMX_MTD_XIP_H__ | ||
17 | #define __ARCH_IMX_MTD_XIP_H__ | ||
18 | |||
19 | #ifdef CONFIG_ARCH_MX1 | ||
20 | /* AITC registers */ | ||
21 | #define AITC_BASE IO_ADDRESS(AVIC_BASE_ADDR) | ||
22 | #define NIPNDH (AITC_BASE + 0x58) | ||
23 | #define NIPNDL (AITC_BASE + 0x5C) | ||
24 | #define INTENABLEH (AITC_BASE + 0x10) | ||
25 | #define INTENABLEL (AITC_BASE + 0x14) | ||
26 | /* MTD macros */ | ||
27 | #define xip_irqpending() ((__raw_readl(INTENABLEH) & __raw_readl(NIPNDH)) \ | ||
28 | || (__raw_readl(INTENABLEL) & __raw_readl(NIPNDL))) | ||
29 | #define xip_currtime() (__raw_readl(TIMER_BASE + MXC_TCN)) | ||
30 | #define xip_elapsed_since(x) (signed)((__raw_readl(TIMER_BASE + MXC_TCN) - (x)) / 96) | ||
31 | #define xip_cpu_idle() asm volatile ("mcr p15, 0, %0, c7, c0, 4" :: "r" (0)) | ||
32 | #endif /* CONFIG_ARCH_MX1 */ | ||
33 | |||
34 | #endif /* __ARCH_IMX_MTD_XIP_H__ */ | ||
diff --git a/arch/arm/plat-mxc/include/mach/mx1.h b/arch/arm/plat-mxc/include/mach/mx1.h index 1b2890a5c452..5eba7e6785de 100644 --- a/arch/arm/plat-mxc/include/mach/mx1.h +++ b/arch/arm/plat-mxc/include/mach/mx1.h | |||
@@ -9,156 +9,289 @@ | |||
9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #ifndef __ASM_ARCH_MXC_MX1_H__ | 12 | #ifndef __MACH_MX1_H__ |
13 | #define __ASM_ARCH_MXC_MX1_H__ | 13 | #define __MACH_MX1_H__ |
14 | 14 | ||
15 | #include <mach/vmalloc.h> | 15 | #include <mach/vmalloc.h> |
16 | 16 | ||
17 | /* | 17 | /* |
18 | * Memory map | 18 | * Memory map |
19 | */ | 19 | */ |
20 | #define IMX_IO_PHYS 0x00200000 | 20 | #define MX1_IO_BASE_ADDR 0x00200000 |
21 | #define IMX_IO_SIZE 0x00100000 | 21 | #define MX1_IO_SIZE SZ_1M |
22 | #define IMX_IO_BASE VMALLOC_END | 22 | #define MX1_IO_BASE_ADDR_VIRT VMALLOC_END |
23 | 23 | ||
24 | #define IMX_CS0_PHYS 0x10000000 | 24 | #define MX1_CS0_PHYS 0x10000000 |
25 | #define IMX_CS0_SIZE 0x02000000 | 25 | #define MX1_CS0_SIZE 0x02000000 |
26 | 26 | ||
27 | #define IMX_CS1_PHYS 0x12000000 | 27 | #define MX1_CS1_PHYS 0x12000000 |
28 | #define IMX_CS1_SIZE 0x01000000 | 28 | #define MX1_CS1_SIZE 0x01000000 |
29 | 29 | ||
30 | #define IMX_CS2_PHYS 0x13000000 | 30 | #define MX1_CS2_PHYS 0x13000000 |
31 | #define IMX_CS2_SIZE 0x01000000 | 31 | #define MX1_CS2_SIZE 0x01000000 |
32 | 32 | ||
33 | #define IMX_CS3_PHYS 0x14000000 | 33 | #define MX1_CS3_PHYS 0x14000000 |
34 | #define IMX_CS3_SIZE 0x01000000 | 34 | #define MX1_CS3_SIZE 0x01000000 |
35 | 35 | ||
36 | #define IMX_CS4_PHYS 0x15000000 | 36 | #define MX1_CS4_PHYS 0x15000000 |
37 | #define IMX_CS4_SIZE 0x01000000 | 37 | #define MX1_CS4_SIZE 0x01000000 |
38 | 38 | ||
39 | #define IMX_CS5_PHYS 0x16000000 | 39 | #define MX1_CS5_PHYS 0x16000000 |
40 | #define IMX_CS5_SIZE 0x01000000 | 40 | #define MX1_CS5_SIZE 0x01000000 |
41 | 41 | ||
42 | /* | 42 | /* |
43 | * Register BASEs, based on OFFSETs | 43 | * Register BASEs, based on OFFSETs |
44 | */ | 44 | */ |
45 | #define AIPI1_BASE_ADDR (0x00000 + IMX_IO_PHYS) | 45 | #define MX1_AIPI1_BASE_ADDR (0x00000 + MX1_IO_BASE_ADDR) |
46 | #define WDT_BASE_ADDR (0x01000 + IMX_IO_PHYS) | 46 | #define MX1_WDT_BASE_ADDR (0x01000 + MX1_IO_BASE_ADDR) |
47 | #define TIM1_BASE_ADDR (0x02000 + IMX_IO_PHYS) | 47 | #define MX1_TIM1_BASE_ADDR (0x02000 + MX1_IO_BASE_ADDR) |
48 | #define TIM2_BASE_ADDR (0x03000 + IMX_IO_PHYS) | 48 | #define MX1_TIM2_BASE_ADDR (0x03000 + MX1_IO_BASE_ADDR) |
49 | #define RTC_BASE_ADDR (0x04000 + IMX_IO_PHYS) | 49 | #define MX1_RTC_BASE_ADDR (0x04000 + MX1_IO_BASE_ADDR) |
50 | #define LCDC_BASE_ADDR (0x05000 + IMX_IO_PHYS) | 50 | #define MX1_LCDC_BASE_ADDR (0x05000 + MX1_IO_BASE_ADDR) |
51 | #define UART1_BASE_ADDR (0x06000 + IMX_IO_PHYS) | 51 | #define MX1_UART1_BASE_ADDR (0x06000 + MX1_IO_BASE_ADDR) |
52 | #define UART2_BASE_ADDR (0x07000 + IMX_IO_PHYS) | 52 | #define MX1_UART2_BASE_ADDR (0x07000 + MX1_IO_BASE_ADDR) |
53 | #define PWM_BASE_ADDR (0x08000 + IMX_IO_PHYS) | 53 | #define MX1_PWM_BASE_ADDR (0x08000 + MX1_IO_BASE_ADDR) |
54 | #define DMA_BASE_ADDR (0x09000 + IMX_IO_PHYS) | 54 | #define MX1_DMA_BASE_ADDR (0x09000 + MX1_IO_BASE_ADDR) |
55 | #define AIPI2_BASE_ADDR (0x10000 + IMX_IO_PHYS) | 55 | #define MX1_AIPI2_BASE_ADDR (0x10000 + MX1_IO_BASE_ADDR) |
56 | #define SIM_BASE_ADDR (0x11000 + IMX_IO_PHYS) | 56 | #define MX1_SIM_BASE_ADDR (0x11000 + MX1_IO_BASE_ADDR) |
57 | #define USBD_BASE_ADDR (0x12000 + IMX_IO_PHYS) | 57 | #define MX1_USBD_BASE_ADDR (0x12000 + MX1_IO_BASE_ADDR) |
58 | #define SPI1_BASE_ADDR (0x13000 + IMX_IO_PHYS) | 58 | #define MX1_SPI1_BASE_ADDR (0x13000 + MX1_IO_BASE_ADDR) |
59 | #define MMC_BASE_ADDR (0x14000 + IMX_IO_PHYS) | 59 | #define MX1_MMC_BASE_ADDR (0x14000 + MX1_IO_BASE_ADDR) |
60 | #define ASP_BASE_ADDR (0x15000 + IMX_IO_PHYS) | 60 | #define MX1_ASP_BASE_ADDR (0x15000 + MX1_IO_BASE_ADDR) |
61 | #define BTA_BASE_ADDR (0x16000 + IMX_IO_PHYS) | 61 | #define MX1_BTA_BASE_ADDR (0x16000 + MX1_IO_BASE_ADDR) |
62 | #define I2C_BASE_ADDR (0x17000 + IMX_IO_PHYS) | 62 | #define MX1_I2C_BASE_ADDR (0x17000 + MX1_IO_BASE_ADDR) |
63 | #define SSI_BASE_ADDR (0x18000 + IMX_IO_PHYS) | 63 | #define MX1_SSI_BASE_ADDR (0x18000 + MX1_IO_BASE_ADDR) |
64 | #define SPI2_BASE_ADDR (0x19000 + IMX_IO_PHYS) | 64 | #define MX1_SPI2_BASE_ADDR (0x19000 + MX1_IO_BASE_ADDR) |
65 | #define MSHC_BASE_ADDR (0x1A000 + IMX_IO_PHYS) | 65 | #define MX1_MSHC_BASE_ADDR (0x1A000 + MX1_IO_BASE_ADDR) |
66 | #define CCM_BASE_ADDR (0x1B000 + IMX_IO_PHYS) | 66 | #define MX1_CCM_BASE_ADDR (0x1B000 + MX1_IO_BASE_ADDR) |
67 | #define SCM_BASE_ADDR (0x1B804 + IMX_IO_PHYS) | 67 | #define MX1_SCM_BASE_ADDR (0x1B804 + MX1_IO_BASE_ADDR) |
68 | #define GPIO_BASE_ADDR (0x1C000 + IMX_IO_PHYS) | 68 | #define MX1_GPIO_BASE_ADDR (0x1C000 + MX1_IO_BASE_ADDR) |
69 | #define EIM_BASE_ADDR (0x20000 + IMX_IO_PHYS) | 69 | #define MX1_EIM_BASE_ADDR (0x20000 + MX1_IO_BASE_ADDR) |
70 | #define SDRAMC_BASE_ADDR (0x21000 + IMX_IO_PHYS) | 70 | #define MX1_SDRAMC_BASE_ADDR (0x21000 + MX1_IO_BASE_ADDR) |
71 | #define MMA_BASE_ADDR (0x22000 + IMX_IO_PHYS) | 71 | #define MX1_MMA_BASE_ADDR (0x22000 + MX1_IO_BASE_ADDR) |
72 | #define AVIC_BASE_ADDR (0x23000 + IMX_IO_PHYS) | 72 | #define MX1_AVIC_BASE_ADDR (0x23000 + MX1_IO_BASE_ADDR) |
73 | #define CSI_BASE_ADDR (0x24000 + IMX_IO_PHYS) | 73 | #define MX1_CSI_BASE_ADDR (0x24000 + MX1_IO_BASE_ADDR) |
74 | 74 | ||
75 | /* macro to get at IO space when running virtually */ | 75 | /* macro to get at IO space when running virtually */ |
76 | #define IO_ADDRESS(x) ((x) - IMX_IO_PHYS + IMX_IO_BASE) | 76 | #define MX1_IO_ADDRESS(x) ( \ |
77 | 77 | IMX_IO_ADDRESS(x, MX1_IO)) | |
78 | /* define macros needed for entry-macro.S */ | ||
79 | #define AVIC_IO_ADDRESS(x) IO_ADDRESS(x) | ||
80 | 78 | ||
81 | /* fixed interrput numbers */ | 79 | /* fixed interrput numbers */ |
82 | #define INT_SOFTINT 0 | 80 | #define MX1_INT_SOFTINT 0 |
83 | #define CSI_INT 6 | 81 | #define MX1_CSI_INT 6 |
84 | #define DSPA_MAC_INT 7 | 82 | #define MX1_DSPA_MAC_INT 7 |
85 | #define DSPA_INT 8 | 83 | #define MX1_DSPA_INT 8 |
86 | #define COMP_INT 9 | 84 | #define MX1_COMP_INT 9 |
87 | #define MSHC_XINT 10 | 85 | #define MX1_MSHC_XINT 10 |
88 | #define GPIO_INT_PORTA 11 | 86 | #define MX1_GPIO_INT_PORTA 11 |
89 | #define GPIO_INT_PORTB 12 | 87 | #define MX1_GPIO_INT_PORTB 12 |
90 | #define GPIO_INT_PORTC 13 | 88 | #define MX1_GPIO_INT_PORTC 13 |
91 | #define LCDC_INT 14 | 89 | #define MX1_LCDC_INT 14 |
92 | #define SIM_INT 15 | 90 | #define MX1_SIM_INT 15 |
93 | #define SIM_DATA_INT 16 | 91 | #define MX1_SIM_DATA_INT 16 |
94 | #define RTC_INT 17 | 92 | #define MX1_RTC_INT 17 |
95 | #define RTC_SAMINT 18 | 93 | #define MX1_RTC_SAMINT 18 |
96 | #define UART2_MINT_PFERR 19 | 94 | #define MX1_UART2_MINT_PFERR 19 |
97 | #define UART2_MINT_RTS 20 | 95 | #define MX1_UART2_MINT_RTS 20 |
98 | #define UART2_MINT_DTR 21 | 96 | #define MX1_UART2_MINT_DTR 21 |
99 | #define UART2_MINT_UARTC 22 | 97 | #define MX1_UART2_MINT_UARTC 22 |
100 | #define UART2_MINT_TX 23 | 98 | #define MX1_UART2_MINT_TX 23 |
101 | #define UART2_MINT_RX 24 | 99 | #define MX1_UART2_MINT_RX 24 |
102 | #define UART1_MINT_PFERR 25 | 100 | #define MX1_UART1_MINT_PFERR 25 |
103 | #define UART1_MINT_RTS 26 | 101 | #define MX1_UART1_MINT_RTS 26 |
104 | #define UART1_MINT_DTR 27 | 102 | #define MX1_UART1_MINT_DTR 27 |
105 | #define UART1_MINT_UARTC 28 | 103 | #define MX1_UART1_MINT_UARTC 28 |
106 | #define UART1_MINT_TX 29 | 104 | #define MX1_UART1_MINT_TX 29 |
107 | #define UART1_MINT_RX 30 | 105 | #define MX1_UART1_MINT_RX 30 |
108 | #define VOICE_DAC_INT 31 | 106 | #define MX1_VOICE_DAC_INT 31 |
109 | #define VOICE_ADC_INT 32 | 107 | #define MX1_VOICE_ADC_INT 32 |
110 | #define PEN_DATA_INT 33 | 108 | #define MX1_PEN_DATA_INT 33 |
111 | #define PWM_INT 34 | 109 | #define MX1_PWM_INT 34 |
112 | #define SDHC_INT 35 | 110 | #define MX1_SDHC_INT 35 |
113 | #define I2C_INT 39 | 111 | #define MX1_I2C_INT 39 |
114 | #define CSPI_INT 41 | 112 | #define MX1_CSPI_INT 41 |
115 | #define SSI_TX_INT 42 | 113 | #define MX1_SSI_TX_INT 42 |
116 | #define SSI_TX_ERR_INT 43 | 114 | #define MX1_SSI_TX_ERR_INT 43 |
117 | #define SSI_RX_INT 44 | 115 | #define MX1_SSI_RX_INT 44 |
118 | #define SSI_RX_ERR_INT 45 | 116 | #define MX1_SSI_RX_ERR_INT 45 |
119 | #define TOUCH_INT 46 | 117 | #define MX1_TOUCH_INT 46 |
120 | #define USBD_INT0 47 | 118 | #define MX1_USBD_INT0 47 |
121 | #define USBD_INT1 48 | 119 | #define MX1_USBD_INT1 48 |
122 | #define USBD_INT2 49 | 120 | #define MX1_USBD_INT2 49 |
123 | #define USBD_INT3 50 | 121 | #define MX1_USBD_INT3 50 |
124 | #define USBD_INT4 51 | 122 | #define MX1_USBD_INT4 51 |
125 | #define USBD_INT5 52 | 123 | #define MX1_USBD_INT5 52 |
126 | #define USBD_INT6 53 | 124 | #define MX1_USBD_INT6 53 |
127 | #define BTSYS_INT 55 | 125 | #define MX1_BTSYS_INT 55 |
128 | #define BTTIM_INT 56 | 126 | #define MX1_BTTIM_INT 56 |
129 | #define BTWUI_INT 57 | 127 | #define MX1_BTWUI_INT 57 |
130 | #define TIM2_INT 58 | 128 | #define MX1_TIM2_INT 58 |
131 | #define TIM1_INT 59 | 129 | #define MX1_TIM1_INT 59 |
132 | #define DMA_ERR 60 | 130 | #define MX1_DMA_ERR 60 |
133 | #define DMA_INT 61 | 131 | #define MX1_DMA_INT 61 |
134 | #define GPIO_INT_PORTD 62 | 132 | #define MX1_GPIO_INT_PORTD 62 |
135 | #define WDT_INT 63 | 133 | #define MX1_WDT_INT 63 |
136 | 134 | ||
137 | /* DMA */ | 135 | /* DMA */ |
138 | #define DMA_REQ_UART3_T 2 | 136 | #define MX1_DMA_REQ_UART3_T 2 |
139 | #define DMA_REQ_UART3_R 3 | 137 | #define MX1_DMA_REQ_UART3_R 3 |
140 | #define DMA_REQ_SSI2_T 4 | 138 | #define MX1_DMA_REQ_SSI2_T 4 |
141 | #define DMA_REQ_SSI2_R 5 | 139 | #define MX1_DMA_REQ_SSI2_R 5 |
142 | #define DMA_REQ_CSI_STAT 6 | 140 | #define MX1_DMA_REQ_CSI_STAT 6 |
143 | #define DMA_REQ_CSI_R 7 | 141 | #define MX1_DMA_REQ_CSI_R 7 |
144 | #define DMA_REQ_MSHC 8 | 142 | #define MX1_DMA_REQ_MSHC 8 |
145 | #define DMA_REQ_DSPA_DCT_DOUT 9 | 143 | #define MX1_DMA_REQ_DSPA_DCT_DOUT 9 |
146 | #define DMA_REQ_DSPA_DCT_DIN 10 | 144 | #define MX1_DMA_REQ_DSPA_DCT_DIN 10 |
147 | #define DMA_REQ_DSPA_MAC 11 | 145 | #define MX1_DMA_REQ_DSPA_MAC 11 |
148 | #define DMA_REQ_EXT 12 | 146 | #define MX1_DMA_REQ_EXT 12 |
149 | #define DMA_REQ_SDHC 13 | 147 | #define MX1_DMA_REQ_SDHC 13 |
150 | #define DMA_REQ_SPI1_R 14 | 148 | #define MX1_DMA_REQ_SPI1_R 14 |
151 | #define DMA_REQ_SPI1_T 15 | 149 | #define MX1_DMA_REQ_SPI1_T 15 |
152 | #define DMA_REQ_SSI_T 16 | 150 | #define MX1_DMA_REQ_SSI_T 16 |
153 | #define DMA_REQ_SSI_R 17 | 151 | #define MX1_DMA_REQ_SSI_R 17 |
154 | #define DMA_REQ_ASP_DAC 18 | 152 | #define MX1_DMA_REQ_ASP_DAC 18 |
155 | #define DMA_REQ_ASP_ADC 19 | 153 | #define MX1_DMA_REQ_ASP_ADC 19 |
156 | #define DMA_REQ_USP_EP(x) (20 + (x)) | 154 | #define MX1_DMA_REQ_USP_EP(x) (20 + (x)) |
157 | #define DMA_REQ_SPI2_R 26 | 155 | #define MX1_DMA_REQ_SPI2_R 26 |
158 | #define DMA_REQ_SPI2_T 27 | 156 | #define MX1_DMA_REQ_SPI2_T 27 |
159 | #define DMA_REQ_UART2_T 28 | 157 | #define MX1_DMA_REQ_UART2_T 28 |
160 | #define DMA_REQ_UART2_R 29 | 158 | #define MX1_DMA_REQ_UART2_R 29 |
161 | #define DMA_REQ_UART1_T 30 | 159 | #define MX1_DMA_REQ_UART1_T 30 |
162 | #define DMA_REQ_UART1_R 31 | 160 | #define MX1_DMA_REQ_UART1_R 31 |
163 | 161 | ||
164 | #endif /* __ASM_ARCH_MXC_MX1_H__ */ | 162 | /* |
163 | * This doesn't depend on IMX_NEEDS_DEPRECATED_SYMBOLS | ||
164 | * to not break drivers/usb/gadget/imx_udc. Should go | ||
165 | * away after this driver uses the new name. | ||
166 | */ | ||
167 | #define USBD_INT0 MX1_USBD_INT0 | ||
168 | |||
169 | #ifdef IMX_NEEDS_DEPRECATED_SYMBOLS | ||
170 | /* these should go away */ | ||
171 | #define IMX_IO_PHYS MX1_IO_BASE_ADDR | ||
172 | #define IMX_IO_SIZE MX1_IO_SIZE | ||
173 | #define IMX_IO_BASE MX1_IO_BASE_ADDR_VIRT | ||
174 | #define IMX_CS0_PHYS MX1_CS0_PHYS | ||
175 | #define IMX_CS0_SIZE MX1_CS0_SIZE | ||
176 | #define IMX_CS1_PHYS MX1_CS1_PHYS | ||
177 | #define IMX_CS1_SIZE MX1_CS1_SIZE | ||
178 | #define IMX_CS2_PHYS MX1_CS2_PHYS | ||
179 | #define IMX_CS2_SIZE MX1_CS2_SIZE | ||
180 | #define IMX_CS3_PHYS MX1_CS3_PHYS | ||
181 | #define IMX_CS3_SIZE MX1_CS3_SIZE | ||
182 | #define IMX_CS4_PHYS MX1_CS4_PHYS | ||
183 | #define IMX_CS4_SIZE MX1_CS4_SIZE | ||
184 | #define IMX_CS5_PHYS MX1_CS5_PHYS | ||
185 | #define IMX_CS5_SIZE MX1_CS5_SIZE | ||
186 | #define AIPI1_BASE_ADDR MX1_AIPI1_BASE_ADDR | ||
187 | #define WDT_BASE_ADDR MX1_WDT_BASE_ADDR | ||
188 | #define TIM1_BASE_ADDR MX1_TIM1_BASE_ADDR | ||
189 | #define TIM2_BASE_ADDR MX1_TIM2_BASE_ADDR | ||
190 | #define RTC_BASE_ADDR MX1_RTC_BASE_ADDR | ||
191 | #define LCDC_BASE_ADDR MX1_LCDC_BASE_ADDR | ||
192 | #define UART1_BASE_ADDR MX1_UART1_BASE_ADDR | ||
193 | #define UART2_BASE_ADDR MX1_UART2_BASE_ADDR | ||
194 | #define PWM_BASE_ADDR MX1_PWM_BASE_ADDR | ||
195 | #define DMA_BASE_ADDR MX1_DMA_BASE_ADDR | ||
196 | #define AIPI2_BASE_ADDR MX1_AIPI2_BASE_ADDR | ||
197 | #define SIM_BASE_ADDR MX1_SIM_BASE_ADDR | ||
198 | #define USBD_BASE_ADDR MX1_USBD_BASE_ADDR | ||
199 | #define SPI1_BASE_ADDR MX1_SPI1_BASE_ADDR | ||
200 | #define MMC_BASE_ADDR MX1_MMC_BASE_ADDR | ||
201 | #define ASP_BASE_ADDR MX1_ASP_BASE_ADDR | ||
202 | #define BTA_BASE_ADDR MX1_BTA_BASE_ADDR | ||
203 | #define I2C_BASE_ADDR MX1_I2C_BASE_ADDR | ||
204 | #define SSI_BASE_ADDR MX1_SSI_BASE_ADDR | ||
205 | #define SPI2_BASE_ADDR MX1_SPI2_BASE_ADDR | ||
206 | #define MSHC_BASE_ADDR MX1_MSHC_BASE_ADDR | ||
207 | #define CCM_BASE_ADDR MX1_CCM_BASE_ADDR | ||
208 | #define SCM_BASE_ADDR MX1_SCM_BASE_ADDR | ||
209 | #define GPIO_BASE_ADDR MX1_GPIO_BASE_ADDR | ||
210 | #define EIM_BASE_ADDR MX1_EIM_BASE_ADDR | ||
211 | #define SDRAMC_BASE_ADDR MX1_SDRAMC_BASE_ADDR | ||
212 | #define MMA_BASE_ADDR MX1_MMA_BASE_ADDR | ||
213 | #define AVIC_BASE_ADDR MX1_AVIC_BASE_ADDR | ||
214 | #define CSI_BASE_ADDR MX1_CSI_BASE_ADDR | ||
215 | #define IO_ADDRESS(x) MX1_IO_ADDRESS(x) | ||
216 | #define AVIC_IO_ADDRESS(x) IO_ADDRESS(x) | ||
217 | #define INT_SOFTINT MX1_INT_SOFTINT | ||
218 | #define CSI_INT MX1_CSI_INT | ||
219 | #define DSPA_MAC_INT MX1_DSPA_MAC_INT | ||
220 | #define DSPA_INT MX1_DSPA_INT | ||
221 | #define COMP_INT MX1_COMP_INT | ||
222 | #define MSHC_XINT MX1_MSHC_XINT | ||
223 | #define GPIO_INT_PORTA MX1_GPIO_INT_PORTA | ||
224 | #define GPIO_INT_PORTB MX1_GPIO_INT_PORTB | ||
225 | #define GPIO_INT_PORTC MX1_GPIO_INT_PORTC | ||
226 | #define LCDC_INT MX1_LCDC_INT | ||
227 | #define SIM_INT MX1_SIM_INT | ||
228 | #define SIM_DATA_INT MX1_SIM_DATA_INT | ||
229 | #define RTC_INT MX1_RTC_INT | ||
230 | #define RTC_SAMINT MX1_RTC_SAMINT | ||
231 | #define UART2_MINT_PFERR MX1_UART2_MINT_PFERR | ||
232 | #define UART2_MINT_RTS MX1_UART2_MINT_RTS | ||
233 | #define UART2_MINT_DTR MX1_UART2_MINT_DTR | ||
234 | #define UART2_MINT_UARTC MX1_UART2_MINT_UARTC | ||
235 | #define UART2_MINT_TX MX1_UART2_MINT_TX | ||
236 | #define UART2_MINT_RX MX1_UART2_MINT_RX | ||
237 | #define UART1_MINT_PFERR MX1_UART1_MINT_PFERR | ||
238 | #define UART1_MINT_RTS MX1_UART1_MINT_RTS | ||
239 | #define UART1_MINT_DTR MX1_UART1_MINT_DTR | ||
240 | #define UART1_MINT_UARTC MX1_UART1_MINT_UARTC | ||
241 | #define UART1_MINT_TX MX1_UART1_MINT_TX | ||
242 | #define UART1_MINT_RX MX1_UART1_MINT_RX | ||
243 | #define VOICE_DAC_INT MX1_VOICE_DAC_INT | ||
244 | #define VOICE_ADC_INT MX1_VOICE_ADC_INT | ||
245 | #define PEN_DATA_INT MX1_PEN_DATA_INT | ||
246 | #define PWM_INT MX1_PWM_INT | ||
247 | #define SDHC_INT MX1_SDHC_INT | ||
248 | #define I2C_INT MX1_I2C_INT | ||
249 | #define CSPI_INT MX1_CSPI_INT | ||
250 | #define SSI_TX_INT MX1_SSI_TX_INT | ||
251 | #define SSI_TX_ERR_INT MX1_SSI_TX_ERR_INT | ||
252 | #define SSI_RX_INT MX1_SSI_RX_INT | ||
253 | #define SSI_RX_ERR_INT MX1_SSI_RX_ERR_INT | ||
254 | #define TOUCH_INT MX1_TOUCH_INT | ||
255 | #define USBD_INT1 MX1_USBD_INT1 | ||
256 | #define USBD_INT2 MX1_USBD_INT2 | ||
257 | #define USBD_INT3 MX1_USBD_INT3 | ||
258 | #define USBD_INT4 MX1_USBD_INT4 | ||
259 | #define USBD_INT5 MX1_USBD_INT5 | ||
260 | #define USBD_INT6 MX1_USBD_INT6 | ||
261 | #define BTSYS_INT MX1_BTSYS_INT | ||
262 | #define BTTIM_INT MX1_BTTIM_INT | ||
263 | #define BTWUI_INT MX1_BTWUI_INT | ||
264 | #define TIM2_INT MX1_TIM2_INT | ||
265 | #define TIM1_INT MX1_TIM1_INT | ||
266 | #define DMA_ERR MX1_DMA_ERR | ||
267 | #define DMA_INT MX1_DMA_INT | ||
268 | #define GPIO_INT_PORTD MX1_GPIO_INT_PORTD | ||
269 | #define WDT_INT MX1_WDT_INT | ||
270 | #define DMA_REQ_UART3_T MX1_DMA_REQ_UART3_T | ||
271 | #define DMA_REQ_UART3_R MX1_DMA_REQ_UART3_R | ||
272 | #define DMA_REQ_SSI2_T MX1_DMA_REQ_SSI2_T | ||
273 | #define DMA_REQ_SSI2_R MX1_DMA_REQ_SSI2_R | ||
274 | #define DMA_REQ_CSI_STAT MX1_DMA_REQ_CSI_STAT | ||
275 | #define DMA_REQ_CSI_R MX1_DMA_REQ_CSI_R | ||
276 | #define DMA_REQ_MSHC MX1_DMA_REQ_MSHC | ||
277 | #define DMA_REQ_DSPA_DCT_DOUT MX1_DMA_REQ_DSPA_DCT_DOUT | ||
278 | #define DMA_REQ_DSPA_DCT_DIN MX1_DMA_REQ_DSPA_DCT_DIN | ||
279 | #define DMA_REQ_DSPA_MAC MX1_DMA_REQ_DSPA_MAC | ||
280 | #define DMA_REQ_EXT MX1_DMA_REQ_EXT | ||
281 | #define DMA_REQ_SDHC MX1_DMA_REQ_SDHC | ||
282 | #define DMA_REQ_SPI1_R MX1_DMA_REQ_SPI1_R | ||
283 | #define DMA_REQ_SPI1_T MX1_DMA_REQ_SPI1_T | ||
284 | #define DMA_REQ_SSI_T MX1_DMA_REQ_SSI_T | ||
285 | #define DMA_REQ_SSI_R MX1_DMA_REQ_SSI_R | ||
286 | #define DMA_REQ_ASP_DAC MX1_DMA_REQ_ASP_DAC | ||
287 | #define DMA_REQ_ASP_ADC MX1_DMA_REQ_ASP_ADC | ||
288 | #define DMA_REQ_USP_EP(x) MX1_DMA_REQ_USP_EP(x) | ||
289 | #define DMA_REQ_SPI2_R MX1_DMA_REQ_SPI2_R | ||
290 | #define DMA_REQ_SPI2_T MX1_DMA_REQ_SPI2_T | ||
291 | #define DMA_REQ_UART2_T MX1_DMA_REQ_UART2_T | ||
292 | #define DMA_REQ_UART2_R MX1_DMA_REQ_UART2_R | ||
293 | #define DMA_REQ_UART1_T MX1_DMA_REQ_UART1_T | ||
294 | #define DMA_REQ_UART1_R MX1_DMA_REQ_UART1_R | ||
295 | #endif /* ifdef IMX_NEEDS_DEPRECATED_SYMBOLS */ | ||
296 | |||
297 | #endif /* ifndef __MACH_MX1_H__ */ | ||
diff --git a/arch/arm/plat-mxc/include/mach/mx21.h b/arch/arm/plat-mxc/include/mach/mx21.h index bb297d8765a7..ed98b9c9f389 100644 --- a/arch/arm/plat-mxc/include/mach/mx21.h +++ b/arch/arm/plat-mxc/include/mach/mx21.h | |||
@@ -22,8 +22,8 @@ | |||
22 | * MA 02110-1301, USA. | 22 | * MA 02110-1301, USA. |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #ifndef __ASM_ARCH_MXC_MX21_H__ | 25 | #ifndef __MACH_MX21_H__ |
26 | #define __ASM_ARCH_MXC_MX21_H__ | 26 | #define __MACH_MX21_H__ |
27 | 27 | ||
28 | #define MX21_AIPI_BASE_ADDR 0x10000000 | 28 | #define MX21_AIPI_BASE_ADDR 0x10000000 |
29 | #define MX21_AIPI_BASE_ADDR_VIRT 0xf4000000 | 29 | #define MX21_AIPI_BASE_ADDR_VIRT 0xf4000000 |
@@ -92,6 +92,11 @@ | |||
92 | 92 | ||
93 | #define MX21_IRAM_BASE_ADDR 0xffffe800 /* internal ram */ | 93 | #define MX21_IRAM_BASE_ADDR 0xffffe800 /* internal ram */ |
94 | 94 | ||
95 | #define MX21_IO_ADDRESS(x) ( \ | ||
96 | IMX_IO_ADDRESS(x, MX21_AIPI) ?: \ | ||
97 | IMX_IO_ADDRESS(x, MX21_SAHB1) ?: \ | ||
98 | IMX_IO_ADDRESS(x, MX21_X_MEMC)) | ||
99 | |||
95 | /* fixed interrupt numbers */ | 100 | /* fixed interrupt numbers */ |
96 | #define MX21_INT_CSPI3 6 | 101 | #define MX21_INT_CSPI3 6 |
97 | #define MX21_INT_GPIO 8 | 102 | #define MX21_INT_GPIO 8 |
@@ -179,6 +184,7 @@ | |||
179 | #define MX21_DMA_REQ_CSI_STAT 30 | 184 | #define MX21_DMA_REQ_CSI_STAT 30 |
180 | #define MX21_DMA_REQ_CSI_RX 31 | 185 | #define MX21_DMA_REQ_CSI_RX 31 |
181 | 186 | ||
187 | #ifdef IMX_NEEDS_DEPRECATED_SYMBOLS | ||
182 | /* these should go away */ | 188 | /* these should go away */ |
183 | #define SDRAM_BASE_ADDR MX21_SDRAM_BASE_ADDR | 189 | #define SDRAM_BASE_ADDR MX21_SDRAM_BASE_ADDR |
184 | #define CSD1_BASE_ADDR MX21_CSD1_BASE_ADDR | 190 | #define CSD1_BASE_ADDR MX21_CSD1_BASE_ADDR |
@@ -211,5 +217,6 @@ | |||
211 | #define DMA_REQ_FIRI_RX MX21_DMA_REQ_FIRI_RX | 217 | #define DMA_REQ_FIRI_RX MX21_DMA_REQ_FIRI_RX |
212 | #define DMA_REQ_BMI_TX MX21_DMA_REQ_BMI_TX | 218 | #define DMA_REQ_BMI_TX MX21_DMA_REQ_BMI_TX |
213 | #define DMA_REQ_BMI_RX MX21_DMA_REQ_BMI_RX | 219 | #define DMA_REQ_BMI_RX MX21_DMA_REQ_BMI_RX |
220 | #endif | ||
214 | 221 | ||
215 | #endif /* __ASM_ARCH_MXC_MX21_H__ */ | 222 | #endif /* ifndef __MACH_MX21_H__ */ |
diff --git a/arch/arm/plat-mxc/include/mach/mx25.h b/arch/arm/plat-mxc/include/mach/mx25.h index 854e2dc58481..4eb6e334bda5 100644 --- a/arch/arm/plat-mxc/include/mach/mx25.h +++ b/arch/arm/plat-mxc/include/mach/mx25.h | |||
@@ -22,27 +22,27 @@ | |||
22 | #define MX25_GPIO3_BASE_ADDR_VIRT (MX25_AIPS2_BASE_ADDR_VIRT + 0xa4000) | 22 | #define MX25_GPIO3_BASE_ADDR_VIRT (MX25_AIPS2_BASE_ADDR_VIRT + 0xa4000) |
23 | #define MX25_GPIO4_BASE_ADDR_VIRT (MX25_AIPS2_BASE_ADDR_VIRT + 0x9c000) | 23 | #define MX25_GPIO4_BASE_ADDR_VIRT (MX25_AIPS2_BASE_ADDR_VIRT + 0x9c000) |
24 | 24 | ||
25 | #define MX25_AIPS1_IO_ADDRESS(x) \ | 25 | #define MX25_IO_ADDRESS(x) ( \ |
26 | (((x) - MX25_AIPS1_BASE_ADDR) + MX25_AIPS1_BASE_ADDR_VIRT) | 26 | IMX_IO_ADDRESS(x, MX25_AIPS1) ?: \ |
27 | #define MX25_AIPS2_IO_ADDRESS(x) \ | 27 | IMX_IO_ADDRESS(x, MX25_AIPS2) ?: \ |
28 | (((x) - MX25_AIPS2_BASE_ADDR) + MX25_AIPS2_BASE_ADDR_VIRT) | 28 | IMX_IO_ADDRESS(x, MX25_AVIC)) |
29 | #define MX25_AVIC_IO_ADDRESS(x) \ | ||
30 | (((x) - MX25_AVIC_BASE_ADDR) + MX25_AVIC_BASE_ADDR_VIRT) | ||
31 | 29 | ||
32 | #define __in_range(addr, name) ((addr) >= name##_BASE_ADDR && (addr) < name##_BASE_ADDR + name##_SIZE) | 30 | #define MX25_UART1_BASE_ADDR 0x43f90000 |
33 | 31 | #define MX25_UART2_BASE_ADDR 0x43f94000 | |
34 | #define MX25_IO_ADDRESS(x) \ | ||
35 | (void __force __iomem *) \ | ||
36 | (__in_range(x, MX25_AIPS1) ? MX25_AIPS1_IO_ADDRESS(x) : \ | ||
37 | __in_range(x, MX25_AIPS2) ? MX25_AIPS2_IO_ADDRESS(x) : \ | ||
38 | __in_range(x, MX25_AVIC) ? MX25_AVIC_IO_ADDRESS(x) : \ | ||
39 | 0xDEADBEEF) | ||
40 | |||
41 | #define UART1_BASE_ADDR 0x43f90000 | ||
42 | #define UART2_BASE_ADDR 0x43f94000 | ||
43 | 32 | ||
44 | #define MX25_FEC_BASE_ADDR 0x50038000 | 33 | #define MX25_FEC_BASE_ADDR 0x50038000 |
34 | #define MX25_NFC_BASE_ADDR 0xbb000000 | ||
35 | #define MX25_DRYICE_BASE_ADDR 0x53ffc000 | ||
36 | #define MX25_LCDC_BASE_ADDR 0x53fbc000 | ||
45 | 37 | ||
38 | #define MX25_INT_DRYICE 25 | ||
46 | #define MX25_INT_FEC 57 | 39 | #define MX25_INT_FEC 57 |
40 | #define MX25_INT_NANDFC 33 | ||
41 | #define MX25_INT_LCDC 39 | ||
42 | |||
43 | #if defined(IMX_NEEDS_DEPRECATED_SYMBOLS) | ||
44 | #define UART1_BASE_ADDR MX25_UART1_BASE_ADDR | ||
45 | #define UART2_BASE_ADDR MX25_UART2_BASE_ADDR | ||
46 | #endif | ||
47 | 47 | ||
48 | #endif /* __MACH_MX25_H__ */ | 48 | #endif /* ifndef __MACH_MX25_H__ */ |
diff --git a/arch/arm/plat-mxc/include/mach/mx27.h b/arch/arm/plat-mxc/include/mach/mx27.h index e2ae19f51710..bae9cd75beee 100644 --- a/arch/arm/plat-mxc/include/mach/mx27.h +++ b/arch/arm/plat-mxc/include/mach/mx27.h | |||
@@ -21,8 +21,12 @@ | |||
21 | * MA 02110-1301, USA. | 21 | * MA 02110-1301, USA. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #ifndef __ASM_ARCH_MXC_MX27_H__ | 24 | #ifndef __MACH_MX27_H__ |
25 | #define __ASM_ARCH_MXC_MX27_H__ | 25 | #define __MACH_MX27_H__ |
26 | |||
27 | #ifndef __ASSEMBLER__ | ||
28 | #include <linux/io.h> | ||
29 | #endif | ||
26 | 30 | ||
27 | #define MX27_AIPI_BASE_ADDR 0x10000000 | 31 | #define MX27_AIPI_BASE_ADDR 0x10000000 |
28 | #define MX27_AIPI_BASE_ADDR_VIRT 0xf4000000 | 32 | #define MX27_AIPI_BASE_ADDR_VIRT 0xf4000000 |
@@ -109,11 +113,31 @@ | |||
109 | #define MX27_M3IF_BASE_ADDR (MX27_X_MEMC_BASE_ADDR + 0x3000) | 113 | #define MX27_M3IF_BASE_ADDR (MX27_X_MEMC_BASE_ADDR + 0x3000) |
110 | #define MX27_PCMCIA_CTL_BASE_ADDR (MX27_X_MEMC_BASE_ADDR + 0x4000) | 114 | #define MX27_PCMCIA_CTL_BASE_ADDR (MX27_X_MEMC_BASE_ADDR + 0x4000) |
111 | 115 | ||
116 | #define MX27_WEIM_CSCRx_BASE_ADDR(cs) (MX27_WEIM_BASE_ADDR + (cs) * 0x10) | ||
117 | #define MX27_WEIM_CSCRxU(cs) (MX27_WEIM_CSCRx_BASE_ADDR(cs)) | ||
118 | #define MX27_WEIM_CSCRxL(cs) (MX27_WEIM_CSCRx_BASE_ADDR(cs) + 0x4) | ||
119 | #define MX27_WEIM_CSCRxA(cs) (MX27_WEIM_CSCRx_BASE_ADDR(cs) + 0x8) | ||
120 | |||
112 | #define MX27_PCMCIA_MEM_BASE_ADDR 0xdc000000 | 121 | #define MX27_PCMCIA_MEM_BASE_ADDR 0xdc000000 |
113 | 122 | ||
114 | /* IRAM */ | 123 | /* IRAM */ |
115 | #define MX27_IRAM_BASE_ADDR 0xffff4c00 /* internal ram */ | 124 | #define MX27_IRAM_BASE_ADDR 0xffff4c00 /* internal ram */ |
116 | 125 | ||
126 | #define MX27_IO_ADDRESS(x) ( \ | ||
127 | IMX_IO_ADDRESS(x, MX27_AIPI) ?: \ | ||
128 | IMX_IO_ADDRESS(x, MX27_SAHB1) ?: \ | ||
129 | IMX_IO_ADDRESS(x, MX27_X_MEMC)) | ||
130 | |||
131 | #ifndef __ASSEMBLER__ | ||
132 | static inline void mx27_setup_weimcs(size_t cs, | ||
133 | unsigned upper, unsigned lower, unsigned addional) | ||
134 | { | ||
135 | __raw_writel(upper, MX27_IO_ADDRESS(MX27_WEIM_CSCRxU(cs))); | ||
136 | __raw_writel(lower, MX27_IO_ADDRESS(MX27_WEIM_CSCRxL(cs))); | ||
137 | __raw_writel(addional, MX27_IO_ADDRESS(MX27_WEIM_CSCRxA(cs))); | ||
138 | } | ||
139 | #endif | ||
140 | |||
117 | /* fixed interrupt numbers */ | 141 | /* fixed interrupt numbers */ |
118 | #define MX27_INT_I2C2 1 | 142 | #define MX27_INT_I2C2 1 |
119 | #define MX27_INT_GPT6 2 | 143 | #define MX27_INT_GPT6 2 |
@@ -225,6 +249,7 @@ | |||
225 | extern int mx27_revision(void); | 249 | extern int mx27_revision(void); |
226 | #endif | 250 | #endif |
227 | 251 | ||
252 | #ifdef IMX_NEEDS_DEPRECATED_SYMBOLS | ||
228 | /* these should go away */ | 253 | /* these should go away */ |
229 | #define MSHC_BASE_ADDR MX27_MSHC_BASE_ADDR | 254 | #define MSHC_BASE_ADDR MX27_MSHC_BASE_ADDR |
230 | #define GPT5_BASE_ADDR MX27_GPT5_BASE_ADDR | 255 | #define GPT5_BASE_ADDR MX27_GPT5_BASE_ADDR |
@@ -292,5 +317,6 @@ extern int mx27_revision(void); | |||
292 | #define DMA_REQ_UART6_RX MX27_DMA_REQ_UART6_RX | 317 | #define DMA_REQ_UART6_RX MX27_DMA_REQ_UART6_RX |
293 | #define DMA_REQ_SDHC3 MX27_DMA_REQ_SDHC3 | 318 | #define DMA_REQ_SDHC3 MX27_DMA_REQ_SDHC3 |
294 | #define DMA_REQ_NFC MX27_DMA_REQ_NFC | 319 | #define DMA_REQ_NFC MX27_DMA_REQ_NFC |
320 | #endif | ||
295 | 321 | ||
296 | #endif /* __ASM_ARCH_MXC_MX27_H__ */ | 322 | #endif /* ifndef __MACH_MX27_H__ */ |
diff --git a/arch/arm/plat-mxc/include/mach/mx2x.h b/arch/arm/plat-mxc/include/mach/mx2x.h index f2eaf140ed02..afb895a0b5b8 100644 --- a/arch/arm/plat-mxc/include/mach/mx2x.h +++ b/arch/arm/plat-mxc/include/mach/mx2x.h | |||
@@ -20,8 +20,8 @@ | |||
20 | * MA 02110-1301, USA. | 20 | * MA 02110-1301, USA. |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #ifndef __ASM_ARCH_MXC_MX2x_H__ | 23 | #ifndef __MACH_MX2x_H__ |
24 | #define __ASM_ARCH_MXC_MX2x_H__ | 24 | #define __MACH_MX2x_H__ |
25 | 25 | ||
26 | /* The following addresses are common between i.MX21 and i.MX27 */ | 26 | /* The following addresses are common between i.MX21 and i.MX27 */ |
27 | 27 | ||
@@ -176,6 +176,7 @@ | |||
176 | #define MX2x_DMA_REQ_CSI_STAT 30 | 176 | #define MX2x_DMA_REQ_CSI_STAT 30 |
177 | #define MX2x_DMA_REQ_CSI_RX 31 | 177 | #define MX2x_DMA_REQ_CSI_RX 31 |
178 | 178 | ||
179 | #ifdef IMX_NEEDS_DEPRECATED_SYMBOLS | ||
179 | /* these should go away */ | 180 | /* these should go away */ |
180 | #define AIPI_BASE_ADDR MX2x_AIPI_BASE_ADDR | 181 | #define AIPI_BASE_ADDR MX2x_AIPI_BASE_ADDR |
181 | #define AIPI_BASE_ADDR_VIRT MX2x_AIPI_BASE_ADDR_VIRT | 182 | #define AIPI_BASE_ADDR_VIRT MX2x_AIPI_BASE_ADDR_VIRT |
@@ -287,5 +288,6 @@ | |||
287 | #define DMA_REQ_UART1_TX MX2x_DMA_REQ_UART1_TX | 288 | #define DMA_REQ_UART1_TX MX2x_DMA_REQ_UART1_TX |
288 | #define DMA_REQ_CSI_STAT MX2x_DMA_REQ_CSI_STAT | 289 | #define DMA_REQ_CSI_STAT MX2x_DMA_REQ_CSI_STAT |
289 | #define DMA_REQ_CSI_RX MX2x_DMA_REQ_CSI_RX | 290 | #define DMA_REQ_CSI_RX MX2x_DMA_REQ_CSI_RX |
291 | #endif | ||
290 | 292 | ||
291 | #endif /* __ASM_ARCH_MXC_MX2x_H__ */ | 293 | #endif /* ifndef __MACH_MX2x_H__ */ |
diff --git a/arch/arm/plat-mxc/include/mach/mx31.h b/arch/arm/plat-mxc/include/mach/mx31.h index b8b47d139eb5..fb90e119c2b5 100644 --- a/arch/arm/plat-mxc/include/mach/mx31.h +++ b/arch/arm/plat-mxc/include/mach/mx31.h | |||
@@ -1,3 +1,10 @@ | |||
1 | #ifndef __MACH_MX31_H__ | ||
2 | #define __MACH_MX31_H__ | ||
3 | |||
4 | #ifndef __ASSEMBLER__ | ||
5 | #include <linux/io.h> | ||
6 | #endif | ||
7 | |||
1 | /* | 8 | /* |
2 | * IRAM | 9 | * IRAM |
3 | */ | 10 | */ |
@@ -107,8 +114,30 @@ | |||
107 | #define MX31_EMI_CTL_BASE_ADDR (MX31_X_MEMC_BASE_ADDR + 0x4000) | 114 | #define MX31_EMI_CTL_BASE_ADDR (MX31_X_MEMC_BASE_ADDR + 0x4000) |
108 | #define MX31_PCMCIA_CTL_BASE_ADDR MX31_EMI_CTL_BASE_ADDR | 115 | #define MX31_PCMCIA_CTL_BASE_ADDR MX31_EMI_CTL_BASE_ADDR |
109 | 116 | ||
117 | #define MX31_WEIM_CSCRx_BASE_ADDR(cs) (MX31_WEIM_BASE_ADDR + (cs) * 0x10) | ||
118 | #define MX31_WEIM_CSCRxU(cs) (MX31_WEIM_CSCRx_BASE_ADDR(cs)) | ||
119 | #define MX31_WEIM_CSCRxL(cs) (MX31_WEIM_CSCRx_BASE_ADDR(cs) + 0x4) | ||
120 | #define MX31_WEIM_CSCRxA(cs) (MX31_WEIM_CSCRx_BASE_ADDR(cs) + 0x8) | ||
121 | |||
110 | #define MX31_PCMCIA_MEM_BASE_ADDR 0xbc000000 | 122 | #define MX31_PCMCIA_MEM_BASE_ADDR 0xbc000000 |
111 | 123 | ||
124 | #define MX31_IO_ADDRESS(x) ( \ | ||
125 | IMX_IO_ADDRESS(x, MX31_AIPS1) ?: \ | ||
126 | IMX_IO_ADDRESS(x, MX31_AIPS2) ?: \ | ||
127 | IMX_IO_ADDRESS(x, MX31_AVIC) ?: \ | ||
128 | IMX_IO_ADDRESS(x, MX31_X_MEMC) ?: \ | ||
129 | IMX_IO_ADDRESS(x, MX31_SPBA0)) | ||
130 | |||
131 | #ifndef __ASSEMBLER__ | ||
132 | static inline void mx31_setup_weimcs(size_t cs, | ||
133 | unsigned upper, unsigned lower, unsigned addional) | ||
134 | { | ||
135 | __raw_writel(upper, MX31_IO_ADDRESS(MX31_WEIM_CSCRxU(cs))); | ||
136 | __raw_writel(lower, MX31_IO_ADDRESS(MX31_WEIM_CSCRxL(cs))); | ||
137 | __raw_writel(addional, MX31_IO_ADDRESS(MX31_WEIM_CSCRxA(cs))); | ||
138 | } | ||
139 | #endif | ||
140 | |||
112 | #define MX31_INT_I2C3 3 | 141 | #define MX31_INT_I2C3 3 |
113 | #define MX31_INT_I2C2 4 | 142 | #define MX31_INT_I2C2 4 |
114 | #define MX31_INT_MPEG4_ENCODER 5 | 143 | #define MX31_INT_MPEG4_ENCODER 5 |
@@ -186,6 +215,7 @@ | |||
186 | #define MX31_SYSTEM_REV_MIN MX31_CHIP_REV_1_0 | 215 | #define MX31_SYSTEM_REV_MIN MX31_CHIP_REV_1_0 |
187 | #define MX31_SYSTEM_REV_NUM 3 | 216 | #define MX31_SYSTEM_REV_NUM 3 |
188 | 217 | ||
218 | #ifdef IMX_NEEDS_DEPRECATED_SYMBOLS | ||
189 | /* these should go away */ | 219 | /* these should go away */ |
190 | #define ATA_BASE_ADDR MX31_ATA_BASE_ADDR | 220 | #define ATA_BASE_ADDR MX31_ATA_BASE_ADDR |
191 | #define UART4_BASE_ADDR MX31_UART4_BASE_ADDR | 221 | #define UART4_BASE_ADDR MX31_UART4_BASE_ADDR |
@@ -216,3 +246,6 @@ | |||
216 | #define MXC_INT_UART5 MX31_INT_UART5 | 246 | #define MXC_INT_UART5 MX31_INT_UART5 |
217 | #define MXC_INT_CCM MX31_INT_CCM | 247 | #define MXC_INT_CCM MX31_INT_CCM |
218 | #define MXC_INT_PCMCIA MX31_INT_PCMCIA | 248 | #define MXC_INT_PCMCIA MX31_INT_PCMCIA |
249 | #endif | ||
250 | |||
251 | #endif /* ifndef __MACH_MX31_H__ */ | ||
diff --git a/arch/arm/plat-mxc/include/mach/mx35.h b/arch/arm/plat-mxc/include/mach/mx35.h index af871bce35b6..526a55842ae5 100644 --- a/arch/arm/plat-mxc/include/mach/mx35.h +++ b/arch/arm/plat-mxc/include/mach/mx35.h | |||
@@ -1,3 +1,5 @@ | |||
1 | #ifndef __MACH_MX35_H__ | ||
2 | #define __MACH_MX35_H__ | ||
1 | /* | 3 | /* |
2 | * IRAM | 4 | * IRAM |
3 | */ | 5 | */ |
@@ -104,6 +106,13 @@ | |||
104 | #define MX35_NFC_BASE_ADDR 0xbb000000 | 106 | #define MX35_NFC_BASE_ADDR 0xbb000000 |
105 | #define MX35_PCMCIA_MEM_BASE_ADDR 0xbc000000 | 107 | #define MX35_PCMCIA_MEM_BASE_ADDR 0xbc000000 |
106 | 108 | ||
109 | #define MX35_IO_ADDRESS(x) ( \ | ||
110 | IMX_IO_ADDRESS(x, MX35_AIPS1) ?: \ | ||
111 | IMX_IO_ADDRESS(x, MX35_AIPS2) ?: \ | ||
112 | IMX_IO_ADDRESS(x, MX35_AVIC) ?: \ | ||
113 | IMX_IO_ADDRESS(x, MX35_X_MEMC) ?: \ | ||
114 | IMX_IO_ADDRESS(x, MX35_SPBA0)) | ||
115 | |||
107 | /* | 116 | /* |
108 | * Interrupt numbers | 117 | * Interrupt numbers |
109 | */ | 118 | */ |
@@ -180,6 +189,7 @@ | |||
180 | #define MX35_SYSTEM_REV_MIN MX35_CHIP_REV_1_0 | 189 | #define MX35_SYSTEM_REV_MIN MX35_CHIP_REV_1_0 |
181 | #define MX35_SYSTEM_REV_NUM 3 | 190 | #define MX35_SYSTEM_REV_NUM 3 |
182 | 191 | ||
192 | #ifdef IMX_NEEDS_DEPRECATED_SYMBOLS | ||
183 | /* these should go away */ | 193 | /* these should go away */ |
184 | #define MXC_FEC_BASE_ADDR MX35_FEC_BASE_ADDR | 194 | #define MXC_FEC_BASE_ADDR MX35_FEC_BASE_ADDR |
185 | #define MXC_INT_OWIRE MX35_INT_OWIRE | 195 | #define MXC_INT_OWIRE MX35_INT_OWIRE |
@@ -195,3 +205,6 @@ | |||
195 | #define MXC_INT_MLB MX35_INT_MLB | 205 | #define MXC_INT_MLB MX35_INT_MLB |
196 | #define MXC_INT_SPDIF MX35_INT_SPDIF | 206 | #define MXC_INT_SPDIF MX35_INT_SPDIF |
197 | #define MXC_INT_FEC MX35_INT_FEC | 207 | #define MXC_INT_FEC MX35_INT_FEC |
208 | #endif | ||
209 | |||
210 | #endif /* ifndef __MACH_MX35_H__ */ | ||
diff --git a/arch/arm/plat-mxc/include/mach/mx3x.h b/arch/arm/plat-mxc/include/mach/mx3x.h index be69272407ad..7a356de385f5 100644 --- a/arch/arm/plat-mxc/include/mach/mx3x.h +++ b/arch/arm/plat-mxc/include/mach/mx3x.h | |||
@@ -8,8 +8,8 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #ifndef __ASM_ARCH_MXC_MX31_H__ | 11 | #ifndef __MACH_MX3x_H__ |
12 | #define __ASM_ARCH_MXC_MX31_H__ | 12 | #define __MACH_MX3x_H__ |
13 | 13 | ||
14 | /* | 14 | /* |
15 | * MX31 memory map: | 15 | * MX31 memory map: |
@@ -269,6 +269,7 @@ static inline int mx31_revision(void) | |||
269 | } | 269 | } |
270 | #endif | 270 | #endif |
271 | 271 | ||
272 | #ifdef IMX_NEEDS_DEPRECATED_SYMBOLS | ||
272 | /* these should go away */ | 273 | /* these should go away */ |
273 | #define L2CC_BASE_ADDR MX3x_L2CC_BASE_ADDR | 274 | #define L2CC_BASE_ADDR MX3x_L2CC_BASE_ADDR |
274 | #define L2CC_SIZE MX3x_L2CC_SIZE | 275 | #define L2CC_SIZE MX3x_L2CC_SIZE |
@@ -401,5 +402,6 @@ static inline int mx31_revision(void) | |||
401 | #define CHIP_REV_3_2 MX3x_CHIP_REV_3_2 | 402 | #define CHIP_REV_3_2 MX3x_CHIP_REV_3_2 |
402 | #define SYSTEM_REV_MIN MX3x_SYSTEM_REV_MIN | 403 | #define SYSTEM_REV_MIN MX3x_SYSTEM_REV_MIN |
403 | #define SYSTEM_REV_NUM MX3x_SYSTEM_REV_NUM | 404 | #define SYSTEM_REV_NUM MX3x_SYSTEM_REV_NUM |
405 | #endif | ||
404 | 406 | ||
405 | #endif /* __ASM_ARCH_MXC_MX31_H__ */ | 407 | #endif /* ifndef __MACH_MX3x_H__ */ |
diff --git a/arch/arm/plat-mxc/include/mach/mx51.h b/arch/arm/plat-mxc/include/mach/mx51.h new file mode 100644 index 000000000000..771532b6b4a6 --- /dev/null +++ b/arch/arm/plat-mxc/include/mach/mx51.h | |||
@@ -0,0 +1,454 @@ | |||
1 | #ifndef __ASM_ARCH_MXC_MX51_H__ | ||
2 | #define __ASM_ARCH_MXC_MX51_H__ | ||
3 | |||
4 | /* | ||
5 | * MX51 memory map: | ||
6 | * | ||
7 | * | ||
8 | * Virt Phys Size What | ||
9 | * --------------------------------------------------------------------------- | ||
10 | * FA3E0000 1FFE0000 128K IRAM (SCCv2 RAM) | ||
11 | * 30000000 256M GPU | ||
12 | * 40000000 512M IPU | ||
13 | * FA200000 60000000 1M DEBUG | ||
14 | * FB100000 70000000 1M SPBA 0 | ||
15 | * FB000000 73F00000 1M AIPS 1 | ||
16 | * FB200000 83F00000 1M AIPS 2 | ||
17 | * FA100000 8FFFC000 16K TZIC (interrupt controller) | ||
18 | * 90000000 256M CSD0 SDRAM/DDR | ||
19 | * A0000000 256M CSD1 SDRAM/DDR | ||
20 | * B0000000 128M CS0 Flash | ||
21 | * B8000000 128M CS1 Flash | ||
22 | * C0000000 128M CS2 Flash | ||
23 | * C8000000 64M CS3 Flash | ||
24 | * CC000000 32M CS4 SRAM | ||
25 | * CE000000 32M CS5 SRAM | ||
26 | * F9000000 CFFF0000 64K NFC (NAND Flash AXI) | ||
27 | * | ||
28 | */ | ||
29 | |||
30 | /* | ||
31 | * IRAM | ||
32 | */ | ||
33 | #define MX51_IRAM_BASE_ADDR 0x1FFE0000 /* internal ram */ | ||
34 | #define MX51_IRAM_BASE_ADDR_VIRT 0xFA3E0000 | ||
35 | #define MX51_IRAM_PARTITIONS 16 | ||
36 | #define MX51_IRAM_PARTITIONS_TO1 12 | ||
37 | #define MX51_IRAM_SIZE (MX51_IRAM_PARTITIONS * SZ_8K) /* 128KB */ | ||
38 | |||
39 | /* | ||
40 | * NFC | ||
41 | */ | ||
42 | #define MX51_NFC_AXI_BASE_ADDR 0xCFFF0000 /* NAND flash AXI */ | ||
43 | #define MX51_NFC_AXI_BASE_ADDR_VIRT 0xF9000000 | ||
44 | #define MX51_NFC_AXI_SIZE SZ_64K | ||
45 | |||
46 | /* | ||
47 | * Graphics Memory of GPU | ||
48 | */ | ||
49 | #define MX51_GPU_BASE_ADDR 0x20000000 | ||
50 | #define MX51_GPU2D_BASE_ADDR 0xD0000000 | ||
51 | |||
52 | #define MX51_TZIC_BASE_ADDR 0x8FFFC000 | ||
53 | #define MX51_TZIC_BASE_ADDR_VIRT 0xFA100000 | ||
54 | #define MX51_TZIC_SIZE SZ_16K | ||
55 | |||
56 | #define MX51_DEBUG_BASE_ADDR 0x60000000 | ||
57 | #define MX51_DEBUG_BASE_ADDR_VIRT 0xFA200000 | ||
58 | #define MX51_DEBUG_SIZE SZ_1M | ||
59 | #define MX51_ETB_BASE_ADDR (MX51_DEBUG_BASE_ADDR + 0x00001000) | ||
60 | #define MX51_ETM_BASE_ADDR (MX51_DEBUG_BASE_ADDR + 0x00002000) | ||
61 | #define MX51_TPIU_BASE_ADDR (MX51_DEBUG_BASE_ADDR + 0x00003000) | ||
62 | #define MX51_CTI0_BASE_ADDR (MX51_DEBUG_BASE_ADDR + 0x00004000) | ||
63 | #define MX51_CTI1_BASE_ADDR (MX51_DEBUG_BASE_ADDR + 0x00005000) | ||
64 | #define MX51_CTI2_BASE_ADDR (MX51_DEBUG_BASE_ADDR + 0x00006000) | ||
65 | #define MX51_CTI3_BASE_ADDR (MX51_DEBUG_BASE_ADDR + 0x00007000) | ||
66 | #define MX51_CORTEX_DBG_BASE_ADDR (MX51_DEBUG_BASE_ADDR + 0x00008000) | ||
67 | |||
68 | /* | ||
69 | * SPBA global module enabled #0 | ||
70 | */ | ||
71 | #define MX51_SPBA0_BASE_ADDR 0x70000000 | ||
72 | #define MX51_SPBA0_BASE_ADDR_VIRT 0xFB100000 | ||
73 | #define MX51_SPBA0_SIZE SZ_1M | ||
74 | |||
75 | #define MX51_MMC_SDHC1_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x00004000) | ||
76 | #define MX51_MMC_SDHC2_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x00008000) | ||
77 | #define MX51_UART3_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x0000C000) | ||
78 | #define MX51_CSPI1_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x00010000) | ||
79 | #define MX51_SSI2_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x00014000) | ||
80 | #define MX51_MMC_SDHC3_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x00020000) | ||
81 | #define MX51_MMC_SDHC4_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x00024000) | ||
82 | #define MX51_SPDIF_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x00028000) | ||
83 | #define MX51_ATA_DMA_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x00030000) | ||
84 | #define MX51_SLIM_DMA_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x00034000) | ||
85 | #define MX51_HSI2C_DMA_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x00038000) | ||
86 | #define MX51_SPBA_CTRL_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x0003C000) | ||
87 | |||
88 | /* | ||
89 | * defines for SPBA modules | ||
90 | */ | ||
91 | #define MX51_SPBA_SDHC1 0x04 | ||
92 | #define MX51_SPBA_SDHC2 0x08 | ||
93 | #define MX51_SPBA_UART3 0x0C | ||
94 | #define MX51_SPBA_CSPI1 0x10 | ||
95 | #define MX51_SPBA_SSI2 0x14 | ||
96 | #define MX51_SPBA_SDHC3 0x20 | ||
97 | #define MX51_SPBA_SDHC4 0x24 | ||
98 | #define MX51_SPBA_SPDIF 0x28 | ||
99 | #define MX51_SPBA_ATA 0x30 | ||
100 | #define MX51_SPBA_SLIM 0x34 | ||
101 | #define MX51_SPBA_HSI2C 0x38 | ||
102 | #define MX51_SPBA_CTRL 0x3C | ||
103 | |||
104 | /* | ||
105 | * AIPS 1 | ||
106 | */ | ||
107 | #define MX51_AIPS1_BASE_ADDR 0x73F00000 | ||
108 | #define MX51_AIPS1_BASE_ADDR_VIRT 0xFB000000 | ||
109 | #define MX51_AIPS1_SIZE SZ_1M | ||
110 | |||
111 | #define MX51_OTG_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x00080000) | ||
112 | #define MX51_GPIO1_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x00084000) | ||
113 | #define MX51_GPIO2_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x00088000) | ||
114 | #define MX51_GPIO3_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x0008C000) | ||
115 | #define MX51_GPIO4_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x00090000) | ||
116 | #define MX51_KPP_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x00094000) | ||
117 | #define MX51_WDOG_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x00098000) | ||
118 | #define MX51_WDOG2_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x0009C000) | ||
119 | #define MX51_GPT1_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x000A0000) | ||
120 | #define MX51_SRTC_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x000A4000) | ||
121 | #define MX51_IOMUXC_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x000A8000) | ||
122 | #define MX51_EPIT1_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x000AC000) | ||
123 | #define MX51_EPIT2_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x000B0000) | ||
124 | #define MX51_PWM1_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x000B4000) | ||
125 | #define MX51_PWM2_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x000B8000) | ||
126 | #define MX51_UART1_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x000BC000) | ||
127 | #define MX51_UART2_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x000C0000) | ||
128 | #define MX51_SRC_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x000D0000) | ||
129 | #define MX51_CCM_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x000D4000) | ||
130 | #define MX51_GPC_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x000D8000) | ||
131 | |||
132 | /* | ||
133 | * Defines for modules using static and dynamic DMA channels | ||
134 | */ | ||
135 | #define MX51_MXC_DMA_CHANNEL_IRAM 30 | ||
136 | #define MX51_MXC_DMA_CHANNEL_SPDIF_TX MXC_DMA_DYNAMIC_CHANNEL | ||
137 | #define MX51_MXC_DMA_CHANNEL_UART1_RX MXC_DMA_DYNAMIC_CHANNEL | ||
138 | #define MX51_MXC_DMA_CHANNEL_UART1_TX MXC_DMA_DYNAMIC_CHANNEL | ||
139 | #define MX51_MXC_DMA_CHANNEL_UART2_RX MXC_DMA_DYNAMIC_CHANNEL | ||
140 | #define MX51_MXC_DMA_CHANNEL_UART2_TX MXC_DMA_DYNAMIC_CHANNEL | ||
141 | #define MX51_MXC_DMA_CHANNEL_UART3_RX MXC_DMA_DYNAMIC_CHANNEL | ||
142 | #define MX51_MXC_DMA_CHANNEL_UART3_TX MXC_DMA_DYNAMIC_CHANNEL | ||
143 | #define MX51_MXC_DMA_CHANNEL_MMC1 MXC_DMA_DYNAMIC_CHANNEL | ||
144 | #define MX51_MXC_DMA_CHANNEL_MMC2 MXC_DMA_DYNAMIC_CHANNEL | ||
145 | #define MX51_MXC_DMA_CHANNEL_SSI1_RX MXC_DMA_DYNAMIC_CHANNEL | ||
146 | #define MX51_MXC_DMA_CHANNEL_SSI1_TX MXC_DMA_DYNAMIC_CHANNEL | ||
147 | #define MX51_MXC_DMA_CHANNEL_SSI2_RX MXC_DMA_DYNAMIC_CHANNEL | ||
148 | #ifdef CONFIG_SDMA_IRAM | ||
149 | #define MX51_MXC_DMA_CHANNEL_SSI2_TX (MX51_MXC_DMA_CHANNEL_IRAM + 1) | ||
150 | #else /*CONFIG_SDMA_IRAM */ | ||
151 | #define MX51_MXC_DMA_CHANNEL_SSI2_TX MXC_DMA_DYNAMIC_CHANNEL | ||
152 | #endif /*CONFIG_SDMA_IRAM */ | ||
153 | #define MX51_MXC_DMA_CHANNEL_CSPI1_RX MXC_DMA_DYNAMIC_CHANNEL | ||
154 | #define MX51_MXC_DMA_CHANNEL_CSPI1_TX MXC_DMA_DYNAMIC_CHANNEL | ||
155 | #define MX51_MXC_DMA_CHANNEL_CSPI2_RX MXC_DMA_DYNAMIC_CHANNEL | ||
156 | #define MX51_MXC_DMA_CHANNEL_CSPI2_TX MXC_DMA_DYNAMIC_CHANNEL | ||
157 | #define MX51_MXC_DMA_CHANNEL_CSPI3_RX MXC_DMA_DYNAMIC_CHANNEL | ||
158 | #define MX51_MXC_DMA_CHANNEL_CSPI3_TX MXC_DMA_DYNAMIC_CHANNEL | ||
159 | #define MX51_MXC_DMA_CHANNEL_ATA_RX MXC_DMA_DYNAMIC_CHANNEL | ||
160 | #define MX51_MXC_DMA_CHANNEL_ATA_TX MXC_DMA_DYNAMIC_CHANNEL | ||
161 | #define MX51_MXC_DMA_CHANNEL_MEMORY MXC_DMA_DYNAMIC_CHANNEL | ||
162 | |||
163 | /* | ||
164 | * AIPS 2 | ||
165 | */ | ||
166 | #define MX51_AIPS2_BASE_ADDR 0x83F00000 | ||
167 | #define MX51_AIPS2_BASE_ADDR_VIRT 0xFB200000 | ||
168 | #define MX51_AIPS2_SIZE SZ_1M | ||
169 | |||
170 | #define MX51_PLL1_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x00080000) | ||
171 | #define MX51_PLL2_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x00084000) | ||
172 | #define MX51_PLL3_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x00088000) | ||
173 | #define MX51_AHBMAX_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x00094000) | ||
174 | #define MX51_IIM_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x00098000) | ||
175 | #define MX51_CSU_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x0009C000) | ||
176 | #define MX51_ARM_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000A0000) | ||
177 | #define MX51_OWIRE_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000A4000) | ||
178 | #define MX51_FIRI_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000A8000) | ||
179 | #define MX51_CSPI2_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000AC000) | ||
180 | #define MX51_SDMA_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000B0000) | ||
181 | #define MX51_SCC_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000B4000) | ||
182 | #define MX51_ROMCP_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000B8000) | ||
183 | #define MX51_RTIC_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000BC000) | ||
184 | #define MX51_CSPI3_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000C0000) | ||
185 | #define MX51_I2C2_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000C4000) | ||
186 | #define MX51_I2C1_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000C8000) | ||
187 | #define MX51_SSI1_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000CC000) | ||
188 | #define MX51_AUDMUX_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000D0000) | ||
189 | #define MX51_M4IF_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000D8000) | ||
190 | #define MX51_ESDCTL_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000D9000) | ||
191 | #define MX51_WEIM_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000DA000) | ||
192 | #define MX51_NFC_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000DB000) | ||
193 | #define MX51_EMI_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000DBF00) | ||
194 | #define MX51_MIPI_HSC_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000DC000) | ||
195 | #define MX51_ATA_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000E0000) | ||
196 | #define MX51_SIM_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000E4000) | ||
197 | #define MX51_SSI3BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000E8000) | ||
198 | #define MX51_MXC_FEC_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000EC000) | ||
199 | #define MX51_TVE_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000F0000) | ||
200 | #define MX51_VPU_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000F4000) | ||
201 | #define MX51_SAHARA_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x000F8000) | ||
202 | |||
203 | /* | ||
204 | * Memory regions and CS | ||
205 | */ | ||
206 | #define MX51_GPU_CTRL_BASE_ADDR 0x30000000 | ||
207 | #define MX51_IPU_CTRL_BASE_ADDR 0x40000000 | ||
208 | #define MX51_CSD0_BASE_ADDR 0x90000000 | ||
209 | #define MX51_CSD1_BASE_ADDR 0xA0000000 | ||
210 | #define MX51_CS0_BASE_ADDR 0xB0000000 | ||
211 | #define MX51_CS1_BASE_ADDR 0xB8000000 | ||
212 | #define MX51_CS2_BASE_ADDR 0xC0000000 | ||
213 | #define MX51_CS3_BASE_ADDR 0xC8000000 | ||
214 | #define MX51_CS4_BASE_ADDR 0xCC000000 | ||
215 | #define MX51_CS5_BASE_ADDR 0xCE000000 | ||
216 | |||
217 | /* Does given address belongs to the specified memory region? */ | ||
218 | #define ADDRESS_IN_REGION(addr, start, size) \ | ||
219 | (((addr) >= (start)) && ((addr) < (start)+(size))) | ||
220 | |||
221 | /* Does given address belongs to the specified named `module'? */ | ||
222 | #define MX51_IS_MODULE(addr, module) \ | ||
223 | ADDRESS_IN_REGION(addr, MX51_ ## module ## _BASE_ADDR, \ | ||
224 | MX51_ ## module ## _SIZE) | ||
225 | /* | ||
226 | * This macro defines the physical to virtual address mapping for all the | ||
227 | * peripheral modules. It is used by passing in the physical address as x | ||
228 | * and returning the virtual address. If the physical address is not mapped, | ||
229 | * it returns 0xDEADBEEF | ||
230 | */ | ||
231 | |||
232 | #define MX51_IO_ADDRESS(x) \ | ||
233 | (void __iomem *) \ | ||
234 | (MX51_IS_MODULE(x, IRAM) ? MX51_IRAM_IO_ADDRESS(x) : \ | ||
235 | MX51_IS_MODULE(x, TZIC) ? MX51_TZIC_IO_ADDRESS(x) : \ | ||
236 | MX51_IS_MODULE(x, DEBUG) ? MX51_DEBUG_IO_ADDRESS(x) : \ | ||
237 | MX51_IS_MODULE(x, SPBA0) ? MX51_SPBA0_IO_ADDRESS(x) : \ | ||
238 | MX51_IS_MODULE(x, AIPS1) ? MX51_AIPS1_IO_ADDRESS(x) : \ | ||
239 | MX51_IS_MODULE(x, AIPS2) ? MX51_AIPS2_IO_ADDRESS(x) : \ | ||
240 | MX51_IS_MODULE(x, NFC_AXI) ? MX51_NFC_AXI_IO_ADDRESS(x) : \ | ||
241 | 0xDEADBEEF) | ||
242 | |||
243 | /* | ||
244 | * define the address mapping macros: in physical address order | ||
245 | */ | ||
246 | #define MX51_IRAM_IO_ADDRESS(x) \ | ||
247 | (((x) - MX51_IRAM_BASE_ADDR) + MX51_IRAM_BASE_ADDR_VIRT) | ||
248 | |||
249 | #define MX51_TZIC_IO_ADDRESS(x) \ | ||
250 | (((x) - MX51_TZIC_BASE_ADDR) + MX51_TZIC_BASE_ADDR_VIRT) | ||
251 | |||
252 | #define MX51_DEBUG_IO_ADDRESS(x) \ | ||
253 | (((x) - MX51_DEBUG_BASE_ADDR) + MX51_DEBUG_BASE_ADDR_VIRT) | ||
254 | |||
255 | #define MX51_SPBA0_IO_ADDRESS(x) \ | ||
256 | (((x) - MX51_SPBA0_BASE_ADDR) + MX51_SPBA0_BASE_ADDR_VIRT) | ||
257 | |||
258 | #define MX51_AIPS1_IO_ADDRESS(x) \ | ||
259 | (((x) - MX51_AIPS1_BASE_ADDR) + MX51_AIPS1_BASE_ADDR_VIRT) | ||
260 | |||
261 | #define MX51_AIPS2_IO_ADDRESS(x) \ | ||
262 | (((x) - MX51_AIPS2_BASE_ADDR) + MX51_AIPS2_BASE_ADDR_VIRT) | ||
263 | |||
264 | #define MX51_NFC_AXI_IO_ADDRESS(x) \ | ||
265 | (((x) - MX51_NFC_AXI_BASE_ADDR) + MX51_NFC_AXI_BASE_ADDR_VIRT) | ||
266 | |||
267 | #define MX51_IS_MEM_DEVICE_NONSHARED(x) 0 | ||
268 | |||
269 | /* | ||
270 | * DMA request assignments | ||
271 | */ | ||
272 | #define MX51_DMA_REQ_SSI3_TX1 47 | ||
273 | #define MX51_DMA_REQ_SSI3_RX1 46 | ||
274 | #define MX51_DMA_REQ_SPDIF 45 | ||
275 | #define MX51_DMA_REQ_UART3_TX 44 | ||
276 | #define MX51_DMA_REQ_UART3_RX 43 | ||
277 | #define MX51_DMA_REQ_SLIM_B_TX 42 | ||
278 | #define MX51_DMA_REQ_SDHC4 41 | ||
279 | #define MX51_DMA_REQ_SDHC3 40 | ||
280 | #define MX51_DMA_REQ_CSPI_TX 39 | ||
281 | #define MX51_DMA_REQ_CSPI_RX 38 | ||
282 | #define MX51_DMA_REQ_SSI3_TX2 37 | ||
283 | #define MX51_DMA_REQ_IPU 36 | ||
284 | #define MX51_DMA_REQ_SSI3_RX2 35 | ||
285 | #define MX51_DMA_REQ_EPIT2 34 | ||
286 | #define MX51_DMA_REQ_CTI2_1 33 | ||
287 | #define MX51_DMA_REQ_EMI_WR 32 | ||
288 | #define MX51_DMA_REQ_CTI2_0 31 | ||
289 | #define MX51_DMA_REQ_EMI_RD 30 | ||
290 | #define MX51_DMA_REQ_SSI1_TX1 29 | ||
291 | #define MX51_DMA_REQ_SSI1_RX1 28 | ||
292 | #define MX51_DMA_REQ_SSI1_TX2 27 | ||
293 | #define MX51_DMA_REQ_SSI1_RX2 26 | ||
294 | #define MX51_DMA_REQ_SSI2_TX1 25 | ||
295 | #define MX51_DMA_REQ_SSI2_RX1 24 | ||
296 | #define MX51_DMA_REQ_SSI2_TX2 23 | ||
297 | #define MX51_DMA_REQ_SSI2_RX2 22 | ||
298 | #define MX51_DMA_REQ_SDHC2 21 | ||
299 | #define MX51_DMA_REQ_SDHC1 20 | ||
300 | #define MX51_DMA_REQ_UART1_TX 19 | ||
301 | #define MX51_DMA_REQ_UART1_RX 18 | ||
302 | #define MX51_DMA_REQ_UART2_TX 17 | ||
303 | #define MX51_DMA_REQ_UART2_RX 16 | ||
304 | #define MX51_DMA_REQ_GPU 15 | ||
305 | #define MX51_DMA_REQ_EXTREQ1 14 | ||
306 | #define MX51_DMA_REQ_FIRI_TX 13 | ||
307 | #define MX51_DMA_REQ_FIRI_RX 12 | ||
308 | #define MX51_DMA_REQ_HS_I2C_RX 11 | ||
309 | #define MX51_DMA_REQ_HS_I2C_TX 10 | ||
310 | #define MX51_DMA_REQ_CSPI2_TX 9 | ||
311 | #define MX51_DMA_REQ_CSPI2_RX 8 | ||
312 | #define MX51_DMA_REQ_CSPI1_TX 7 | ||
313 | #define MX51_DMA_REQ_CSPI1_RX 6 | ||
314 | #define MX51_DMA_REQ_SLIM_B 5 | ||
315 | #define MX51_DMA_REQ_ATA_TX_END 4 | ||
316 | #define MX51_DMA_REQ_ATA_TX 3 | ||
317 | #define MX51_DMA_REQ_ATA_RX 2 | ||
318 | #define MX51_DMA_REQ_GPC 1 | ||
319 | #define MX51_DMA_REQ_VPU 0 | ||
320 | |||
321 | /* | ||
322 | * Interrupt numbers | ||
323 | */ | ||
324 | #define MX51_MXC_INT_BASE 0 | ||
325 | #define MX51_MXC_INT_RESV0 0 | ||
326 | #define MX51_MXC_INT_MMC_SDHC1 1 | ||
327 | #define MX51_MXC_INT_MMC_SDHC2 2 | ||
328 | #define MX51_MXC_INT_MMC_SDHC3 3 | ||
329 | #define MX51_MXC_INT_MMC_SDHC4 4 | ||
330 | #define MX51_MXC_INT_RESV5 5 | ||
331 | #define MX51_MXC_INT_SDMA 6 | ||
332 | #define MX51_MXC_INT_IOMUX 7 | ||
333 | #define MX51_MXC_INT_NFC 8 | ||
334 | #define MX51_MXC_INT_VPU 9 | ||
335 | #define MX51_MXC_INT_IPU_ERR 10 | ||
336 | #define MX51_MXC_INT_IPU_SYN 11 | ||
337 | #define MX51_MXC_INT_GPU 12 | ||
338 | #define MX51_MXC_INT_RESV13 13 | ||
339 | #define MX51_MXC_INT_USB_H1 14 | ||
340 | #define MX51_MXC_INT_EMI 15 | ||
341 | #define MX51_MXC_INT_USB_H2 16 | ||
342 | #define MX51_MXC_INT_USB_H3 17 | ||
343 | #define MX51_MXC_INT_USB_OTG 18 | ||
344 | #define MX51_MXC_INT_SAHARA_H0 19 | ||
345 | #define MX51_MXC_INT_SAHARA_H1 20 | ||
346 | #define MX51_MXC_INT_SCC_SMN 21 | ||
347 | #define MX51_MXC_INT_SCC_STZ 22 | ||
348 | #define MX51_MXC_INT_SCC_SCM 23 | ||
349 | #define MX51_MXC_INT_SRTC_NTZ 24 | ||
350 | #define MX51_MXC_INT_SRTC_TZ 25 | ||
351 | #define MX51_MXC_INT_RTIC 26 | ||
352 | #define MX51_MXC_INT_CSU 27 | ||
353 | #define MX51_MXC_INT_SLIM_B 28 | ||
354 | #define MX51_MXC_INT_SSI1 29 | ||
355 | #define MX51_MXC_INT_SSI2 30 | ||
356 | #define MX51_MXC_INT_UART1 31 | ||
357 | #define MX51_MXC_INT_UART2 32 | ||
358 | #define MX51_MXC_INT_UART3 33 | ||
359 | #define MX51_MXC_INT_RESV34 34 | ||
360 | #define MX51_MXC_INT_RESV35 35 | ||
361 | #define MX51_MXC_INT_CSPI1 36 | ||
362 | #define MX51_MXC_INT_CSPI2 37 | ||
363 | #define MX51_MXC_INT_CSPI 38 | ||
364 | #define MX51_MXC_INT_GPT 39 | ||
365 | #define MX51_MXC_INT_EPIT1 40 | ||
366 | #define MX51_MXC_INT_EPIT2 41 | ||
367 | #define MX51_MXC_INT_GPIO1_INT7 42 | ||
368 | #define MX51_MXC_INT_GPIO1_INT6 43 | ||
369 | #define MX51_MXC_INT_GPIO1_INT5 44 | ||
370 | #define MX51_MXC_INT_GPIO1_INT4 45 | ||
371 | #define MX51_MXC_INT_GPIO1_INT3 46 | ||
372 | #define MX51_MXC_INT_GPIO1_INT2 47 | ||
373 | #define MX51_MXC_INT_GPIO1_INT1 48 | ||
374 | #define MX51_MXC_INT_GPIO1_INT0 49 | ||
375 | #define MX51_MXC_INT_GPIO1_LOW 50 | ||
376 | #define MX51_MXC_INT_GPIO1_HIGH 51 | ||
377 | #define MX51_MXC_INT_GPIO2_LOW 52 | ||
378 | #define MX51_MXC_INT_GPIO2_HIGH 53 | ||
379 | #define MX51_MXC_INT_GPIO3_LOW 54 | ||
380 | #define MX51_MXC_INT_GPIO3_HIGH 55 | ||
381 | #define MX51_MXC_INT_GPIO4_LOW 56 | ||
382 | #define MX51_MXC_INT_GPIO4_HIGH 57 | ||
383 | #define MX51_MXC_INT_WDOG1 58 | ||
384 | #define MX51_MXC_INT_WDOG2 59 | ||
385 | #define MX51_MXC_INT_KPP 60 | ||
386 | #define MX51_MXC_INT_PWM1 61 | ||
387 | #define MX51_MXC_INT_I2C1 62 | ||
388 | #define MX51_MXC_INT_I2C2 63 | ||
389 | #define MX51_MXC_INT_HS_I2C 64 | ||
390 | #define MX51_MXC_INT_RESV65 65 | ||
391 | #define MX51_MXC_INT_RESV66 66 | ||
392 | #define MX51_MXC_INT_SIM_IPB 67 | ||
393 | #define MX51_MXC_INT_SIM_DAT 68 | ||
394 | #define MX51_MXC_INT_IIM 69 | ||
395 | #define MX51_MXC_INT_ATA 70 | ||
396 | #define MX51_MXC_INT_CCM1 71 | ||
397 | #define MX51_MXC_INT_CCM2 72 | ||
398 | #define MX51_MXC_INT_GPC1 73 | ||
399 | #define MX51_MXC_INT_GPC2 74 | ||
400 | #define MX51_MXC_INT_SRC 75 | ||
401 | #define MX51_MXC_INT_NM 76 | ||
402 | #define MX51_MXC_INT_PMU 77 | ||
403 | #define MX51_MXC_INT_CTI_IRQ 78 | ||
404 | #define MX51_MXC_INT_CTI1_TG0 79 | ||
405 | #define MX51_MXC_INT_CTI1_TG1 80 | ||
406 | #define MX51_MXC_INT_MCG_ERR 81 | ||
407 | #define MX51_MXC_INT_MCG_TMR 82 | ||
408 | #define MX51_MXC_INT_MCG_FUNC 83 | ||
409 | #define MX51_MXC_INT_GPU2_IRQ 84 | ||
410 | #define MX51_MXC_INT_GPU2_BUSY 85 | ||
411 | #define MX51_MXC_INT_RESV86 86 | ||
412 | #define MX51_MXC_INT_FEC 87 | ||
413 | #define MX51_MXC_INT_OWIRE 88 | ||
414 | #define MX51_MXC_INT_CTI1_TG2 89 | ||
415 | #define MX51_MXC_INT_SJC 90 | ||
416 | #define MX51_MXC_INT_SPDIF 91 | ||
417 | #define MX51_MXC_INT_TVE 92 | ||
418 | #define MX51_MXC_INT_FIRI 93 | ||
419 | #define MX51_MXC_INT_PWM2 94 | ||
420 | #define MX51_MXC_INT_SLIM_EXP 95 | ||
421 | #define MX51_MXC_INT_SSI3 96 | ||
422 | #define MX51_MXC_INT_EMI_BOOT 97 | ||
423 | #define MX51_MXC_INT_CTI1_TG3 98 | ||
424 | #define MX51_MXC_INT_SMC_RX 99 | ||
425 | #define MX51_MXC_INT_VPU_IDLE 100 | ||
426 | #define MX51_MXC_INT_EMI_NFC 101 | ||
427 | #define MX51_MXC_INT_GPU_IDLE 102 | ||
428 | |||
429 | /* silicon revisions specific to i.MX51 */ | ||
430 | #define MX51_CHIP_REV_1_0 0x10 | ||
431 | #define MX51_CHIP_REV_1_1 0x11 | ||
432 | #define MX51_CHIP_REV_1_2 0x12 | ||
433 | #define MX51_CHIP_REV_1_3 0x13 | ||
434 | #define MX51_CHIP_REV_2_0 0x20 | ||
435 | #define MX51_CHIP_REV_2_1 0x21 | ||
436 | #define MX51_CHIP_REV_2_2 0x22 | ||
437 | #define MX51_CHIP_REV_2_3 0x23 | ||
438 | #define MX51_CHIP_REV_3_0 0x30 | ||
439 | #define MX51_CHIP_REV_3_1 0x31 | ||
440 | #define MX51_CHIP_REV_3_2 0x32 | ||
441 | |||
442 | /* Mandatory defines used globally */ | ||
443 | |||
444 | #if !defined(__ASSEMBLY__) && !defined(__MXC_BOOT_UNCOMPRESS) | ||
445 | |||
446 | extern unsigned int system_rev; | ||
447 | |||
448 | static inline unsigned int mx51_revision(void) | ||
449 | { | ||
450 | return system_rev; | ||
451 | } | ||
452 | #endif | ||
453 | |||
454 | #endif /* __ASM_ARCH_MXC_MX51_H__ */ | ||
diff --git a/arch/arm/plat-mxc/include/mach/mxc.h b/arch/arm/plat-mxc/include/mach/mxc.h index 51990536b845..a790bf212972 100644 --- a/arch/arm/plat-mxc/include/mach/mxc.h +++ b/arch/arm/plat-mxc/include/mach/mxc.h | |||
@@ -30,6 +30,7 @@ | |||
30 | #define MXC_CPU_MX27 27 | 30 | #define MXC_CPU_MX27 27 |
31 | #define MXC_CPU_MX31 31 | 31 | #define MXC_CPU_MX31 31 |
32 | #define MXC_CPU_MX35 35 | 32 | #define MXC_CPU_MX35 35 |
33 | #define MXC_CPU_MX51 51 | ||
33 | #define MXC_CPU_MXC91231 91231 | 34 | #define MXC_CPU_MXC91231 91231 |
34 | 35 | ||
35 | #ifndef __ASSEMBLY__ | 36 | #ifndef __ASSEMBLY__ |
@@ -108,6 +109,18 @@ extern unsigned int __mxc_cpu_type; | |||
108 | # define cpu_is_mx35() (0) | 109 | # define cpu_is_mx35() (0) |
109 | #endif | 110 | #endif |
110 | 111 | ||
112 | #ifdef CONFIG_ARCH_MX5 | ||
113 | # ifdef mxc_cpu_type | ||
114 | # undef mxc_cpu_type | ||
115 | # define mxc_cpu_type __mxc_cpu_type | ||
116 | # else | ||
117 | # define mxc_cpu_type MXC_CPU_MX51 | ||
118 | # endif | ||
119 | # define cpu_is_mx51() (mxc_cpu_type == MXC_CPU_MX51) | ||
120 | #else | ||
121 | # define cpu_is_mx51() (0) | ||
122 | #endif | ||
123 | |||
111 | #ifdef CONFIG_ARCH_MXC91231 | 124 | #ifdef CONFIG_ARCH_MXC91231 |
112 | # ifdef mxc_cpu_type | 125 | # ifdef mxc_cpu_type |
113 | # undef mxc_cpu_type | 126 | # undef mxc_cpu_type |
@@ -121,9 +134,10 @@ extern unsigned int __mxc_cpu_type; | |||
121 | #endif | 134 | #endif |
122 | 135 | ||
123 | #if defined(CONFIG_ARCH_MX3) || defined(CONFIG_ARCH_MX2) | 136 | #if defined(CONFIG_ARCH_MX3) || defined(CONFIG_ARCH_MX2) |
124 | #define CSCR_U(n) (IO_ADDRESS(WEIM_BASE_ADDR) + n * 0x10) | 137 | /* These are deprecated, use mx[23][157]_setup_weimcs instead. */ |
125 | #define CSCR_L(n) (IO_ADDRESS(WEIM_BASE_ADDR) + n * 0x10 + 0x4) | 138 | #define CSCR_U(n) (IO_ADDRESS(WEIM_BASE_ADDR + n * 0x10)) |
126 | #define CSCR_A(n) (IO_ADDRESS(WEIM_BASE_ADDR) + n * 0x10 + 0x8) | 139 | #define CSCR_L(n) (IO_ADDRESS(WEIM_BASE_ADDR + n * 0x10 + 0x4)) |
140 | #define CSCR_A(n) (IO_ADDRESS(WEIM_BASE_ADDR + n * 0x10 + 0x8)) | ||
127 | #endif | 141 | #endif |
128 | 142 | ||
129 | #define cpu_is_mx3() (cpu_is_mx31() || cpu_is_mx35() || cpu_is_mxc91231()) | 143 | #define cpu_is_mx3() (cpu_is_mx31() || cpu_is_mx35() || cpu_is_mxc91231()) |
diff --git a/arch/arm/plat-mxc/include/mach/mxc91231.h b/arch/arm/plat-mxc/include/mach/mxc91231.h index 81484d1ef232..5182b986b785 100644 --- a/arch/arm/plat-mxc/include/mach/mxc91231.h +++ b/arch/arm/plat-mxc/include/mach/mxc91231.h | |||
@@ -184,60 +184,22 @@ | |||
184 | #define MXC91231_CS4_BASE_ADDR 0xB4000000 | 184 | #define MXC91231_CS4_BASE_ADDR 0xB4000000 |
185 | #define MXC91231_CS5_BASE_ADDR 0xB6000000 | 185 | #define MXC91231_CS5_BASE_ADDR 0xB6000000 |
186 | 186 | ||
187 | /* Is given address belongs to the specified memory region? */ | ||
188 | #define ADDRESS_IN_REGION(addr, start, size) \ | ||
189 | (((addr) >= (start)) && ((addr) < (start)+(size))) | ||
190 | |||
191 | /* Is given address belongs to the specified named `module'? */ | ||
192 | #define MXC91231_IS_MODULE(addr, module) \ | ||
193 | ADDRESS_IN_REGION(addr, MXC91231_ ## module ## _BASE_ADDR, \ | ||
194 | MXC91231_ ## module ## _SIZE) | ||
195 | /* | 187 | /* |
196 | * This macro defines the physical to virtual address mapping for all the | 188 | * This macro defines the physical to virtual address mapping for all the |
197 | * peripheral modules. It is used by passing in the physical address as x | 189 | * peripheral modules. It is used by passing in the physical address as x |
198 | * and returning the virtual address. If the physical address is not mapped, | 190 | * and returning the virtual address. If the physical address is not mapped, |
199 | * it returns 0xDEADBEEF | 191 | * it returns 0. |
200 | */ | ||
201 | |||
202 | #define MXC91231_IO_ADDRESS(x) \ | ||
203 | (void __iomem *) \ | ||
204 | (MXC91231_IS_MODULE(x, L2CC) ? MXC91231_L2CC_IO_ADDRESS(x) : \ | ||
205 | MXC91231_IS_MODULE(x, AIPS1) ? MXC91231_AIPS1_IO_ADDRESS(x) : \ | ||
206 | MXC91231_IS_MODULE(x, AIPS2) ? MXC91231_AIPS2_IO_ADDRESS(x) : \ | ||
207 | MXC91231_IS_MODULE(x, SPBA0) ? MXC91231_SPBA0_IO_ADDRESS(x) : \ | ||
208 | MXC91231_IS_MODULE(x, SPBA1) ? MXC91231_SPBA1_IO_ADDRESS(x) : \ | ||
209 | MXC91231_IS_MODULE(x, ROMP) ? MXC91231_ROMP_IO_ADDRESS(x) : \ | ||
210 | MXC91231_IS_MODULE(x, AVIC) ? MXC91231_AVIC_IO_ADDRESS(x) : \ | ||
211 | MXC91231_IS_MODULE(x, X_MEMC) ? MXC91231_X_MEMC_IO_ADDRESS(x) : \ | ||
212 | 0xDEADBEEF) | ||
213 | |||
214 | |||
215 | /* | ||
216 | * define the address mapping macros: in physical address order | ||
217 | */ | 192 | */ |
218 | #define MXC91231_L2CC_IO_ADDRESS(x) \ | ||
219 | (((x) - MXC91231_L2CC_BASE_ADDR) + MXC91231_L2CC_BASE_ADDR_VIRT) | ||
220 | |||
221 | #define MXC91231_AIPS1_IO_ADDRESS(x) \ | ||
222 | (((x) - MXC91231_AIPS1_BASE_ADDR) + MXC91231_AIPS1_BASE_ADDR_VIRT) | ||
223 | |||
224 | #define MXC91231_SPBA0_IO_ADDRESS(x) \ | ||
225 | (((x) - MXC91231_SPBA0_BASE_ADDR) + MXC91231_SPBA0_BASE_ADDR_VIRT) | ||
226 | |||
227 | #define MXC91231_SPBA1_IO_ADDRESS(x) \ | ||
228 | (((x) - MXC91231_SPBA1_BASE_ADDR) + MXC91231_SPBA1_BASE_ADDR_VIRT) | ||
229 | |||
230 | #define MXC91231_AIPS2_IO_ADDRESS(x) \ | ||
231 | (((x) - MXC91231_AIPS2_BASE_ADDR) + MXC91231_AIPS2_BASE_ADDR_VIRT) | ||
232 | |||
233 | #define MXC91231_ROMP_IO_ADDRESS(x) \ | ||
234 | (((x) - MXC91231_ROMP_BASE_ADDR) + MXC91231_ROMP_BASE_ADDR_VIRT) | ||
235 | |||
236 | #define MXC91231_AVIC_IO_ADDRESS(x) \ | ||
237 | (((x) - MXC91231_AVIC_BASE_ADDR) + MXC91231_AVIC_BASE_ADDR_VIRT) | ||
238 | 193 | ||
239 | #define MXC91231_X_MEMC_IO_ADDRESS(x) \ | 194 | #define MXC91231_IO_ADDRESS(x) ( \ |
240 | (((x) - MXC91231_X_MEMC_BASE_ADDR) + MXC91231_X_MEMC_BASE_ADDR_VIRT) | 195 | IMX_IO_ADDRESS(x, MXC91231_L2CC) ?: \ |
196 | IMX_IO_ADDRESS(x, MXC91231_X_MEMC) ?: \ | ||
197 | IMX_IO_ADDRESS(x, MXC91231_ROMP) ?: \ | ||
198 | IMX_IO_ADDRESS(x, MXC91231_AVIC) ?: \ | ||
199 | IMX_IO_ADDRESS(x, MXC91231_AIPS1) ?: \ | ||
200 | IMX_IO_ADDRESS(x, MXC91231_SPBA0) ?: \ | ||
201 | IMX_IO_ADDRESS(x, MXC91231_SPBA1) ?: \ | ||
202 | IMX_IO_ADDRESS(x, MXC91231_AIPS2)) | ||
241 | 203 | ||
242 | /* | 204 | /* |
243 | * Interrupt numbers | 205 | * Interrupt numbers |
diff --git a/arch/arm/plat-mxc/include/mach/mxc_ehci.h b/arch/arm/plat-mxc/include/mach/mxc_ehci.h index 8f796239393e..4b9b8368c0c0 100644 --- a/arch/arm/plat-mxc/include/mach/mxc_ehci.h +++ b/arch/arm/plat-mxc/include/mach/mxc_ehci.h | |||
@@ -22,6 +22,10 @@ | |||
22 | #define MXC_EHCI_POWER_PINS_ENABLED (1 << 5) | 22 | #define MXC_EHCI_POWER_PINS_ENABLED (1 << 5) |
23 | #define MXC_EHCI_TTL_ENABLED (1 << 6) | 23 | #define MXC_EHCI_TTL_ENABLED (1 << 6) |
24 | 24 | ||
25 | #define MXC_EHCI_INTERNAL_PHY (1 << 7) | ||
26 | #define MXC_EHCI_IPPUE_DOWN (1 << 8) | ||
27 | #define MXC_EHCI_IPPUE_UP (1 << 9) | ||
28 | |||
25 | struct mxc_usbh_platform_data { | 29 | struct mxc_usbh_platform_data { |
26 | int (*init)(struct platform_device *pdev); | 30 | int (*init)(struct platform_device *pdev); |
27 | int (*exit)(struct platform_device *pdev); | 31 | int (*exit)(struct platform_device *pdev); |
diff --git a/arch/arm/plat-mxc/include/mach/ssi.h b/arch/arm/plat-mxc/include/mach/ssi.h new file mode 100644 index 000000000000..c34ded523f10 --- /dev/null +++ b/arch/arm/plat-mxc/include/mach/ssi.h | |||
@@ -0,0 +1,18 @@ | |||
1 | #ifndef __MACH_SSI_H | ||
2 | #define __MACH_SSI_H | ||
3 | |||
4 | struct snd_ac97; | ||
5 | |||
6 | extern unsigned char imx_ssi_fiq_start, imx_ssi_fiq_end; | ||
7 | extern unsigned long imx_ssi_fiq_base, imx_ssi_fiq_tx_buffer, imx_ssi_fiq_rx_buffer; | ||
8 | |||
9 | struct imx_ssi_platform_data { | ||
10 | unsigned int flags; | ||
11 | #define IMX_SSI_DMA (1 << 0) | ||
12 | #define IMX_SSI_USE_AC97 (1 << 1) | ||
13 | void (*ac97_reset) (struct snd_ac97 *ac97); | ||
14 | void (*ac97_warm_reset)(struct snd_ac97 *ac97); | ||
15 | }; | ||
16 | |||
17 | #endif /* __MACH_SSI_H */ | ||
18 | |||
diff --git a/arch/arm/plat-mxc/include/mach/timex.h b/arch/arm/plat-mxc/include/mach/timex.h index 527a6c24788e..024416ed11cd 100644 --- a/arch/arm/plat-mxc/include/mach/timex.h +++ b/arch/arm/plat-mxc/include/mach/timex.h | |||
@@ -28,6 +28,8 @@ | |||
28 | #define CLOCK_TICK_RATE 16625000 | 28 | #define CLOCK_TICK_RATE 16625000 |
29 | #elif defined CONFIG_ARCH_MX25 | 29 | #elif defined CONFIG_ARCH_MX25 |
30 | #define CLOCK_TICK_RATE 16000000 | 30 | #define CLOCK_TICK_RATE 16000000 |
31 | #elif defined CONFIG_ARCH_MX5 | ||
32 | #define CLOCK_TICK_RATE 8000000 | ||
31 | #elif defined CONFIG_ARCH_MXC91231 | 33 | #elif defined CONFIG_ARCH_MXC91231 |
32 | #define CLOCK_TICK_RATE 13000000 | 34 | #define CLOCK_TICK_RATE 13000000 |
33 | #endif | 35 | #endif |
diff --git a/arch/arm/plat-mxc/include/mach/uncompress.h b/arch/arm/plat-mxc/include/mach/uncompress.h index d49384cb1e97..52e476a150ca 100644 --- a/arch/arm/plat-mxc/include/mach/uncompress.h +++ b/arch/arm/plat-mxc/include/mach/uncompress.h | |||
@@ -1,8 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * arch/arm/plat-mxc/include/mach/uncompress.h | 2 | * arch/arm/plat-mxc/include/mach/uncompress.h |
3 | * | 3 | * |
4 | * | ||
5 | * | ||
6 | * Copyright (C) 1999 ARM Limited | 4 | * Copyright (C) 1999 ARM Limited |
7 | * Copyright (C) Shane Nay (shane@minirl.com) | 5 | * Copyright (C) Shane Nay (shane@minirl.com) |
8 | * | 6 | * |
@@ -25,7 +23,6 @@ | |||
25 | 23 | ||
26 | #define __MXC_BOOT_UNCOMPRESS | 24 | #define __MXC_BOOT_UNCOMPRESS |
27 | 25 | ||
28 | #include <mach/hardware.h> | ||
29 | #include <asm/mach-types.h> | 26 | #include <asm/mach-types.h> |
30 | 27 | ||
31 | static unsigned long uart_base; | 28 | static unsigned long uart_base; |
diff --git a/arch/arm/plat-mxc/iomux-mx1-mx2.c b/arch/arm/plat-mxc/iomux-mx1-mx2.c deleted file mode 100644 index a37163ce280b..000000000000 --- a/arch/arm/plat-mxc/iomux-mx1-mx2.c +++ /dev/null | |||
@@ -1,157 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-mxc/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 | |||
26 | #include <linux/errno.h> | ||
27 | #include <linux/init.h> | ||
28 | #include <linux/kernel.h> | ||
29 | #include <linux/module.h> | ||
30 | #include <linux/string.h> | ||
31 | #include <linux/gpio.h> | ||
32 | |||
33 | #include <mach/hardware.h> | ||
34 | #include <asm/mach/map.h> | ||
35 | #include <mach/iomux.h> | ||
36 | |||
37 | void mxc_gpio_mode(int gpio_mode) | ||
38 | { | ||
39 | unsigned int pin = gpio_mode & GPIO_PIN_MASK; | ||
40 | unsigned int port = (gpio_mode & GPIO_PORT_MASK) >> GPIO_PORT_SHIFT; | ||
41 | unsigned int ocr = (gpio_mode & GPIO_OCR_MASK) >> GPIO_OCR_SHIFT; | ||
42 | unsigned int tmp; | ||
43 | |||
44 | /* Pullup enable */ | ||
45 | tmp = __raw_readl(VA_GPIO_BASE + MXC_PUEN(port)); | ||
46 | if (gpio_mode & GPIO_PUEN) | ||
47 | tmp |= (1 << pin); | ||
48 | else | ||
49 | tmp &= ~(1 << pin); | ||
50 | __raw_writel(tmp, VA_GPIO_BASE + MXC_PUEN(port)); | ||
51 | |||
52 | /* Data direction */ | ||
53 | tmp = __raw_readl(VA_GPIO_BASE + MXC_DDIR(port)); | ||
54 | if (gpio_mode & GPIO_OUT) | ||
55 | tmp |= 1 << pin; | ||
56 | else | ||
57 | tmp &= ~(1 << pin); | ||
58 | __raw_writel(tmp, VA_GPIO_BASE + MXC_DDIR(port)); | ||
59 | |||
60 | /* Primary / alternate function */ | ||
61 | tmp = __raw_readl(VA_GPIO_BASE + MXC_GPR(port)); | ||
62 | if (gpio_mode & GPIO_AF) | ||
63 | tmp |= (1 << pin); | ||
64 | else | ||
65 | tmp &= ~(1 << pin); | ||
66 | __raw_writel(tmp, VA_GPIO_BASE + MXC_GPR(port)); | ||
67 | |||
68 | /* use as gpio? */ | ||
69 | tmp = __raw_readl(VA_GPIO_BASE + MXC_GIUS(port)); | ||
70 | if (gpio_mode & (GPIO_PF | GPIO_AF)) | ||
71 | tmp &= ~(1 << pin); | ||
72 | else | ||
73 | tmp |= (1 << pin); | ||
74 | __raw_writel(tmp, VA_GPIO_BASE + MXC_GIUS(port)); | ||
75 | |||
76 | if (pin < 16) { | ||
77 | tmp = __raw_readl(VA_GPIO_BASE + MXC_OCR1(port)); | ||
78 | tmp &= ~(3 << (pin * 2)); | ||
79 | tmp |= (ocr << (pin * 2)); | ||
80 | __raw_writel(tmp, VA_GPIO_BASE + MXC_OCR1(port)); | ||
81 | |||
82 | tmp = __raw_readl(VA_GPIO_BASE + MXC_ICONFA1(port)); | ||
83 | tmp &= ~(3 << (pin * 2)); | ||
84 | tmp |= ((gpio_mode >> GPIO_AOUT_SHIFT) & 3) << (pin * 2); | ||
85 | __raw_writel(tmp, VA_GPIO_BASE + MXC_ICONFA1(port)); | ||
86 | |||
87 | tmp = __raw_readl(VA_GPIO_BASE + MXC_ICONFB1(port)); | ||
88 | tmp &= ~(3 << (pin * 2)); | ||
89 | tmp |= ((gpio_mode >> GPIO_BOUT_SHIFT) & 3) << (pin * 2); | ||
90 | __raw_writel(tmp, VA_GPIO_BASE + MXC_ICONFB1(port)); | ||
91 | } else { | ||
92 | pin -= 16; | ||
93 | |||
94 | tmp = __raw_readl(VA_GPIO_BASE + MXC_OCR2(port)); | ||
95 | tmp &= ~(3 << (pin * 2)); | ||
96 | tmp |= (ocr << (pin * 2)); | ||
97 | __raw_writel(tmp, VA_GPIO_BASE + MXC_OCR2(port)); | ||
98 | |||
99 | tmp = __raw_readl(VA_GPIO_BASE + MXC_ICONFA2(port)); | ||
100 | tmp &= ~(3 << (pin * 2)); | ||
101 | tmp |= ((gpio_mode >> GPIO_AOUT_SHIFT) & 3) << (pin * 2); | ||
102 | __raw_writel(tmp, VA_GPIO_BASE + MXC_ICONFA2(port)); | ||
103 | |||
104 | tmp = __raw_readl(VA_GPIO_BASE + MXC_ICONFB2(port)); | ||
105 | tmp &= ~(3 << (pin * 2)); | ||
106 | tmp |= ((gpio_mode >> GPIO_BOUT_SHIFT) & 3) << (pin * 2); | ||
107 | __raw_writel(tmp, VA_GPIO_BASE + MXC_ICONFB2(port)); | ||
108 | } | ||
109 | } | ||
110 | EXPORT_SYMBOL(mxc_gpio_mode); | ||
111 | |||
112 | int mxc_gpio_setup_multiple_pins(const int *pin_list, unsigned count, | ||
113 | const char *label) | ||
114 | { | ||
115 | const int *p = pin_list; | ||
116 | int i; | ||
117 | unsigned gpio; | ||
118 | unsigned mode; | ||
119 | int ret = -EINVAL; | ||
120 | |||
121 | for (i = 0; i < count; i++) { | ||
122 | gpio = *p & (GPIO_PIN_MASK | GPIO_PORT_MASK); | ||
123 | mode = *p & ~(GPIO_PIN_MASK | GPIO_PORT_MASK); | ||
124 | |||
125 | if (gpio >= (GPIO_PORT_MAX + 1) * 32) | ||
126 | goto setup_error; | ||
127 | |||
128 | ret = gpio_request(gpio, label); | ||
129 | if (ret) | ||
130 | goto setup_error; | ||
131 | |||
132 | mxc_gpio_mode(gpio | mode); | ||
133 | |||
134 | p++; | ||
135 | } | ||
136 | return 0; | ||
137 | |||
138 | setup_error: | ||
139 | mxc_gpio_release_multiple_pins(pin_list, i); | ||
140 | return ret; | ||
141 | } | ||
142 | EXPORT_SYMBOL(mxc_gpio_setup_multiple_pins); | ||
143 | |||
144 | void mxc_gpio_release_multiple_pins(const int *pin_list, int count) | ||
145 | { | ||
146 | const int *p = pin_list; | ||
147 | int i; | ||
148 | |||
149 | for (i = 0; i < count; i++) { | ||
150 | unsigned gpio = *p & (GPIO_PIN_MASK | GPIO_PORT_MASK); | ||
151 | gpio_free(gpio); | ||
152 | p++; | ||
153 | } | ||
154 | |||
155 | } | ||
156 | EXPORT_SYMBOL(mxc_gpio_release_multiple_pins); | ||
157 | |||
diff --git a/arch/arm/plat-mxc/iomux-v1.c b/arch/arm/plat-mxc/iomux-v1.c new file mode 100644 index 000000000000..960a02cbcbaf --- /dev/null +++ b/arch/arm/plat-mxc/iomux-v1.c | |||
@@ -0,0 +1,238 @@ | |||
1 | /* | ||
2 | * arch/arm/plat-mxc/iomux-v1.c | ||
3 | * | ||
4 | * Copyright (C) 2004 Sascha Hauer, Synertronixx GmbH | ||
5 | * Copyright (C) 2009 Uwe Kleine-Koenig, Pengutronix | ||
6 | * | ||
7 | * Common code for i.MX1, i.MX21 and i.MX27 | ||
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 Foundation, Inc., | ||
21 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. | ||
22 | */ | ||
23 | |||
24 | #include <linux/errno.h> | ||
25 | #include <linux/init.h> | ||
26 | #include <linux/kernel.h> | ||
27 | #include <linux/module.h> | ||
28 | #include <linux/string.h> | ||
29 | #include <linux/gpio.h> | ||
30 | |||
31 | #include <mach/hardware.h> | ||
32 | #include <asm/mach/map.h> | ||
33 | #include <mach/iomux-v1.h> | ||
34 | |||
35 | static void __iomem *imx_iomuxv1_baseaddr; | ||
36 | static unsigned imx_iomuxv1_numports; | ||
37 | |||
38 | static inline unsigned long imx_iomuxv1_readl(unsigned offset) | ||
39 | { | ||
40 | return __raw_readl(imx_iomuxv1_baseaddr + offset); | ||
41 | } | ||
42 | |||
43 | static inline void imx_iomuxv1_writel(unsigned long val, unsigned offset) | ||
44 | { | ||
45 | __raw_writel(val, imx_iomuxv1_baseaddr + offset); | ||
46 | } | ||
47 | |||
48 | static inline void imx_iomuxv1_rmwl(unsigned offset, | ||
49 | unsigned long mask, unsigned long value) | ||
50 | { | ||
51 | unsigned long reg = imx_iomuxv1_readl(offset); | ||
52 | |||
53 | reg &= ~mask; | ||
54 | reg |= value; | ||
55 | |||
56 | imx_iomuxv1_writel(reg, offset); | ||
57 | } | ||
58 | |||
59 | static inline void imx_iomuxv1_set_puen( | ||
60 | unsigned int port, unsigned int pin, int on) | ||
61 | { | ||
62 | unsigned long mask = 1 << pin; | ||
63 | |||
64 | imx_iomuxv1_rmwl(MXC_PUEN(port), mask, on ? mask : 0); | ||
65 | } | ||
66 | |||
67 | static inline void imx_iomuxv1_set_ddir( | ||
68 | unsigned int port, unsigned int pin, int out) | ||
69 | { | ||
70 | unsigned long mask = 1 << pin; | ||
71 | |||
72 | imx_iomuxv1_rmwl(MXC_DDIR(port), mask, out ? mask : 0); | ||
73 | } | ||
74 | |||
75 | static inline void imx_iomuxv1_set_gpr( | ||
76 | unsigned int port, unsigned int pin, int af) | ||
77 | { | ||
78 | unsigned long mask = 1 << pin; | ||
79 | |||
80 | imx_iomuxv1_rmwl(MXC_GPR(port), mask, af ? mask : 0); | ||
81 | } | ||
82 | |||
83 | static inline void imx_iomuxv1_set_gius( | ||
84 | unsigned int port, unsigned int pin, int inuse) | ||
85 | { | ||
86 | unsigned long mask = 1 << pin; | ||
87 | |||
88 | imx_iomuxv1_rmwl(MXC_GIUS(port), mask, inuse ? mask : 0); | ||
89 | } | ||
90 | |||
91 | static inline void imx_iomuxv1_set_ocr( | ||
92 | unsigned int port, unsigned int pin, unsigned int ocr) | ||
93 | { | ||
94 | unsigned long shift = (pin & 0xf) << 1; | ||
95 | unsigned long mask = 3 << shift; | ||
96 | unsigned long value = ocr << shift; | ||
97 | unsigned long offset = pin < 16 ? MXC_OCR1(port) : MXC_OCR2(port); | ||
98 | |||
99 | imx_iomuxv1_rmwl(offset, mask, value); | ||
100 | } | ||
101 | |||
102 | static inline void imx_iomuxv1_set_iconfa( | ||
103 | unsigned int port, unsigned int pin, unsigned int aout) | ||
104 | { | ||
105 | unsigned long shift = (pin & 0xf) << 1; | ||
106 | unsigned long mask = 3 << shift; | ||
107 | unsigned long value = aout << shift; | ||
108 | unsigned long offset = pin < 16 ? MXC_ICONFA1(port) : MXC_ICONFA2(port); | ||
109 | |||
110 | imx_iomuxv1_rmwl(offset, mask, value); | ||
111 | } | ||
112 | |||
113 | static inline void imx_iomuxv1_set_iconfb( | ||
114 | unsigned int port, unsigned int pin, unsigned int bout) | ||
115 | { | ||
116 | unsigned long shift = (pin & 0xf) << 1; | ||
117 | unsigned long mask = 3 << shift; | ||
118 | unsigned long value = bout << shift; | ||
119 | unsigned long offset = pin < 16 ? MXC_ICONFB1(port) : MXC_ICONFB2(port); | ||
120 | |||
121 | imx_iomuxv1_rmwl(offset, mask, value); | ||
122 | } | ||
123 | |||
124 | int mxc_gpio_mode(int gpio_mode) | ||
125 | { | ||
126 | unsigned int pin = gpio_mode & GPIO_PIN_MASK; | ||
127 | unsigned int port = (gpio_mode & GPIO_PORT_MASK) >> GPIO_PORT_SHIFT; | ||
128 | unsigned int ocr = (gpio_mode & GPIO_OCR_MASK) >> GPIO_OCR_SHIFT; | ||
129 | unsigned int aout = (gpio_mode >> GPIO_AOUT_SHIFT) & 3; | ||
130 | unsigned int bout = (gpio_mode >> GPIO_BOUT_SHIFT) & 3; | ||
131 | |||
132 | if (port >= imx_iomuxv1_numports) | ||
133 | return -EINVAL; | ||
134 | |||
135 | /* Pullup enable */ | ||
136 | imx_iomuxv1_set_puen(port, pin, gpio_mode & GPIO_PUEN); | ||
137 | |||
138 | /* Data direction */ | ||
139 | imx_iomuxv1_set_ddir(port, pin, gpio_mode & GPIO_OUT); | ||
140 | |||
141 | /* Primary / alternate function */ | ||
142 | imx_iomuxv1_set_gpr(port, pin, gpio_mode & GPIO_AF); | ||
143 | |||
144 | /* use as gpio? */ | ||
145 | imx_iomuxv1_set_gius(port, pin, !(gpio_mode & (GPIO_PF | GPIO_AF))); | ||
146 | |||
147 | imx_iomuxv1_set_ocr(port, pin, ocr); | ||
148 | |||
149 | imx_iomuxv1_set_iconfa(port, pin, aout); | ||
150 | |||
151 | imx_iomuxv1_set_iconfb(port, pin, bout); | ||
152 | |||
153 | return 0; | ||
154 | } | ||
155 | EXPORT_SYMBOL(mxc_gpio_mode); | ||
156 | |||
157 | static int imx_iomuxv1_setup_multiple(const int *list, unsigned count) | ||
158 | { | ||
159 | size_t i; | ||
160 | int ret; | ||
161 | |||
162 | for (i = 0; i < count; ++i) { | ||
163 | ret = mxc_gpio_mode(list[i]); | ||
164 | |||
165 | if (ret) | ||
166 | return ret; | ||
167 | } | ||
168 | |||
169 | return ret; | ||
170 | } | ||
171 | |||
172 | int mxc_gpio_setup_multiple_pins(const int *pin_list, unsigned count, | ||
173 | const char *label) | ||
174 | { | ||
175 | size_t i; | ||
176 | int ret; | ||
177 | |||
178 | for (i = 0; i < count; ++i) { | ||
179 | unsigned gpio = pin_list[i] & (GPIO_PIN_MASK | GPIO_PORT_MASK); | ||
180 | |||
181 | ret = gpio_request(gpio, label); | ||
182 | if (ret) | ||
183 | goto err_gpio_request; | ||
184 | } | ||
185 | |||
186 | ret = imx_iomuxv1_setup_multiple(pin_list, count); | ||
187 | if (ret) | ||
188 | goto err_setup; | ||
189 | |||
190 | return 0; | ||
191 | |||
192 | err_setup: | ||
193 | BUG_ON(i != count); | ||
194 | |||
195 | err_gpio_request: | ||
196 | mxc_gpio_release_multiple_pins(pin_list, i); | ||
197 | |||
198 | return ret; | ||
199 | } | ||
200 | EXPORT_SYMBOL(mxc_gpio_setup_multiple_pins); | ||
201 | |||
202 | void mxc_gpio_release_multiple_pins(const int *pin_list, int count) | ||
203 | { | ||
204 | size_t i; | ||
205 | |||
206 | for (i = 0; i < count; ++i) { | ||
207 | unsigned gpio = pin_list[i] & (GPIO_PIN_MASK | GPIO_PORT_MASK); | ||
208 | |||
209 | gpio_free(gpio); | ||
210 | } | ||
211 | } | ||
212 | EXPORT_SYMBOL(mxc_gpio_release_multiple_pins); | ||
213 | |||
214 | static int imx_iomuxv1_init(void) | ||
215 | { | ||
216 | #ifdef CONFIG_ARCH_MX1 | ||
217 | if (cpu_is_mx1()) { | ||
218 | imx_iomuxv1_baseaddr = MX1_IO_ADDRESS(MX1_GPIO_BASE_ADDR); | ||
219 | imx_iomuxv1_numports = MX1_NUM_GPIO_PORT; | ||
220 | } else | ||
221 | #endif | ||
222 | #ifdef CONFIG_MACH_MX21 | ||
223 | if (cpu_is_mx21()) { | ||
224 | imx_iomuxv1_baseaddr = MX21_IO_ADDRESS(MX21_GPIO_BASE_ADDR); | ||
225 | imx_iomuxv1_numports = MX21_NUM_GPIO_PORT; | ||
226 | } else | ||
227 | #endif | ||
228 | #ifdef CONFIG_MACH_MX27 | ||
229 | if (cpu_is_mx27()) { | ||
230 | imx_iomuxv1_baseaddr = MX27_IO_ADDRESS(MX27_GPIO_BASE_ADDR); | ||
231 | imx_iomuxv1_numports = MX27_NUM_GPIO_PORT; | ||
232 | } else | ||
233 | #endif | ||
234 | return -ENODEV; | ||
235 | |||
236 | return 0; | ||
237 | } | ||
238 | pure_initcall(imx_iomuxv1_init); | ||
diff --git a/arch/arm/plat-mxc/time.c b/arch/arm/plat-mxc/time.c index 844567ee35fe..c1ce51abdba6 100644 --- a/arch/arm/plat-mxc/time.c +++ b/arch/arm/plat-mxc/time.c | |||
@@ -30,9 +30,15 @@ | |||
30 | #include <asm/mach/time.h> | 30 | #include <asm/mach/time.h> |
31 | #include <mach/common.h> | 31 | #include <mach/common.h> |
32 | 32 | ||
33 | /* | ||
34 | * There are 2 versions of the timer hardware on Freescale MXC hardware. | ||
35 | * Version 1: MX1/MXL, MX21, MX27. | ||
36 | * Version 2: MX25, MX31, MX35, MX37, MX51 | ||
37 | */ | ||
38 | |||
33 | /* defines common for all i.MX */ | 39 | /* defines common for all i.MX */ |
34 | #define MXC_TCTL 0x00 | 40 | #define MXC_TCTL 0x00 |
35 | #define MXC_TCTL_TEN (1 << 0) | 41 | #define MXC_TCTL_TEN (1 << 0) /* Enable module */ |
36 | #define MXC_TPRER 0x04 | 42 | #define MXC_TPRER 0x04 |
37 | 43 | ||
38 | /* MX1, MX21, MX27 */ | 44 | /* MX1, MX21, MX27 */ |
@@ -47,8 +53,8 @@ | |||
47 | #define MX2_TSTAT_CAPT (1 << 1) | 53 | #define MX2_TSTAT_CAPT (1 << 1) |
48 | #define MX2_TSTAT_COMP (1 << 0) | 54 | #define MX2_TSTAT_COMP (1 << 0) |
49 | 55 | ||
50 | /* MX31, MX35, MX25, MXC91231 */ | 56 | /* MX31, MX35, MX25, MXC91231, MX5 */ |
51 | #define MX3_TCTL_WAITEN (1 << 3) | 57 | #define MX3_TCTL_WAITEN (1 << 3) /* Wait enable mode */ |
52 | #define MX3_TCTL_CLK_IPG (1 << 6) | 58 | #define MX3_TCTL_CLK_IPG (1 << 6) |
53 | #define MX3_TCTL_FRR (1 << 9) | 59 | #define MX3_TCTL_FRR (1 << 9) |
54 | #define MX3_IR 0x0c | 60 | #define MX3_IR 0x0c |
@@ -57,6 +63,9 @@ | |||
57 | #define MX3_TCN 0x24 | 63 | #define MX3_TCN 0x24 |
58 | #define MX3_TCMP 0x10 | 64 | #define MX3_TCMP 0x10 |
59 | 65 | ||
66 | #define timer_is_v1() (cpu_is_mx1() || cpu_is_mx21() || cpu_is_mx27()) | ||
67 | #define timer_is_v2() (!timer_is_v1()) | ||
68 | |||
60 | static struct clock_event_device clockevent_mxc; | 69 | static struct clock_event_device clockevent_mxc; |
61 | static enum clock_event_mode clockevent_mode = CLOCK_EVT_MODE_UNUSED; | 70 | static enum clock_event_mode clockevent_mode = CLOCK_EVT_MODE_UNUSED; |
62 | 71 | ||
@@ -66,7 +75,7 @@ static inline void gpt_irq_disable(void) | |||
66 | { | 75 | { |
67 | unsigned int tmp; | 76 | unsigned int tmp; |
68 | 77 | ||
69 | if (cpu_is_mx3() || cpu_is_mx25()) | 78 | if (timer_is_v2()) |
70 | __raw_writel(0, timer_base + MX3_IR); | 79 | __raw_writel(0, timer_base + MX3_IR); |
71 | else { | 80 | else { |
72 | tmp = __raw_readl(timer_base + MXC_TCTL); | 81 | tmp = __raw_readl(timer_base + MXC_TCTL); |
@@ -76,7 +85,7 @@ static inline void gpt_irq_disable(void) | |||
76 | 85 | ||
77 | static inline void gpt_irq_enable(void) | 86 | static inline void gpt_irq_enable(void) |
78 | { | 87 | { |
79 | if (cpu_is_mx3() || cpu_is_mx25()) | 88 | if (timer_is_v2()) |
80 | __raw_writel(1<<0, timer_base + MX3_IR); | 89 | __raw_writel(1<<0, timer_base + MX3_IR); |
81 | else { | 90 | else { |
82 | __raw_writel(__raw_readl(timer_base + MXC_TCTL) | MX1_2_TCTL_IRQEN, | 91 | __raw_writel(__raw_readl(timer_base + MXC_TCTL) | MX1_2_TCTL_IRQEN, |
@@ -86,11 +95,13 @@ static inline void gpt_irq_enable(void) | |||
86 | 95 | ||
87 | static void gpt_irq_acknowledge(void) | 96 | static void gpt_irq_acknowledge(void) |
88 | { | 97 | { |
89 | if (cpu_is_mx1()) | 98 | if (timer_is_v1()) { |
90 | __raw_writel(0, timer_base + MX1_2_TSTAT); | 99 | if (cpu_is_mx1()) |
91 | if (cpu_is_mx2()) | 100 | __raw_writel(0, timer_base + MX1_2_TSTAT); |
92 | __raw_writel(MX2_TSTAT_CAPT | MX2_TSTAT_COMP, timer_base + MX1_2_TSTAT); | 101 | else |
93 | if (cpu_is_mx3() || cpu_is_mx25()) | 102 | __raw_writel(MX2_TSTAT_CAPT | MX2_TSTAT_COMP, |
103 | timer_base + MX1_2_TSTAT); | ||
104 | } else if (timer_is_v2()) | ||
94 | __raw_writel(MX3_TSTAT_OF1, timer_base + MX3_TSTAT); | 105 | __raw_writel(MX3_TSTAT_OF1, timer_base + MX3_TSTAT); |
95 | } | 106 | } |
96 | 107 | ||
@@ -117,7 +128,7 @@ static int __init mxc_clocksource_init(struct clk *timer_clk) | |||
117 | { | 128 | { |
118 | unsigned int c = clk_get_rate(timer_clk); | 129 | unsigned int c = clk_get_rate(timer_clk); |
119 | 130 | ||
120 | if (cpu_is_mx3() || cpu_is_mx25()) | 131 | if (timer_is_v2()) |
121 | clocksource_mxc.read = mx3_get_cycles; | 132 | clocksource_mxc.read = mx3_get_cycles; |
122 | 133 | ||
123 | clocksource_mxc.mult = clocksource_hz2mult(c, | 134 | clocksource_mxc.mult = clocksource_hz2mult(c, |
@@ -180,7 +191,7 @@ static void mxc_set_mode(enum clock_event_mode mode, | |||
180 | 191 | ||
181 | if (mode != clockevent_mode) { | 192 | if (mode != clockevent_mode) { |
182 | /* Set event time into far-far future */ | 193 | /* Set event time into far-far future */ |
183 | if (cpu_is_mx3() || cpu_is_mx25()) | 194 | if (timer_is_v2()) |
184 | __raw_writel(__raw_readl(timer_base + MX3_TCN) - 3, | 195 | __raw_writel(__raw_readl(timer_base + MX3_TCN) - 3, |
185 | timer_base + MX3_TCMP); | 196 | timer_base + MX3_TCMP); |
186 | else | 197 | else |
@@ -233,7 +244,7 @@ static irqreturn_t mxc_timer_interrupt(int irq, void *dev_id) | |||
233 | struct clock_event_device *evt = &clockevent_mxc; | 244 | struct clock_event_device *evt = &clockevent_mxc; |
234 | uint32_t tstat; | 245 | uint32_t tstat; |
235 | 246 | ||
236 | if (cpu_is_mx3() || cpu_is_mx25()) | 247 | if (timer_is_v2()) |
237 | tstat = __raw_readl(timer_base + MX3_TSTAT); | 248 | tstat = __raw_readl(timer_base + MX3_TSTAT); |
238 | else | 249 | else |
239 | tstat = __raw_readl(timer_base + MX1_2_TSTAT); | 250 | tstat = __raw_readl(timer_base + MX1_2_TSTAT); |
@@ -264,7 +275,7 @@ static int __init mxc_clockevent_init(struct clk *timer_clk) | |||
264 | { | 275 | { |
265 | unsigned int c = clk_get_rate(timer_clk); | 276 | unsigned int c = clk_get_rate(timer_clk); |
266 | 277 | ||
267 | if (cpu_is_mx3() || cpu_is_mx25()) | 278 | if (timer_is_v2()) |
268 | clockevent_mxc.set_next_event = mx3_set_next_event; | 279 | clockevent_mxc.set_next_event = mx3_set_next_event; |
269 | 280 | ||
270 | clockevent_mxc.mult = div_sc(c, NSEC_PER_SEC, | 281 | clockevent_mxc.mult = div_sc(c, NSEC_PER_SEC, |
@@ -296,7 +307,7 @@ void __init mxc_timer_init(struct clk *timer_clk, void __iomem *base, int irq) | |||
296 | __raw_writel(0, timer_base + MXC_TCTL); | 307 | __raw_writel(0, timer_base + MXC_TCTL); |
297 | __raw_writel(0, timer_base + MXC_TPRER); /* see datasheet note */ | 308 | __raw_writel(0, timer_base + MXC_TPRER); /* see datasheet note */ |
298 | 309 | ||
299 | if (cpu_is_mx3() || cpu_is_mx25()) | 310 | if (timer_is_v2()) |
300 | tctl_val = MX3_TCTL_CLK_IPG | MX3_TCTL_FRR | MX3_TCTL_WAITEN | MXC_TCTL_TEN; | 311 | tctl_val = MX3_TCTL_CLK_IPG | MX3_TCTL_FRR | MX3_TCTL_WAITEN | MXC_TCTL_TEN; |
301 | else | 312 | else |
302 | tctl_val = MX1_2_TCTL_FRR | MX1_2_TCTL_CLK_PCLK1 | MXC_TCTL_TEN; | 313 | tctl_val = MX1_2_TCTL_FRR | MX1_2_TCTL_CLK_PCLK1 | MXC_TCTL_TEN; |
diff --git a/arch/arm/plat-mxc/tzic.c b/arch/arm/plat-mxc/tzic.c new file mode 100644 index 000000000000..afa6709db0b3 --- /dev/null +++ b/arch/arm/plat-mxc/tzic.c | |||
@@ -0,0 +1,172 @@ | |||
1 | /* | ||
2 | * Copyright 2004-2009 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * | ||
4 | * The code contained herein is licensed under the GNU General Public | ||
5 | * License. You may obtain a copy of the GNU General Public License | ||
6 | * Version 2 or later at the following locations: | ||
7 | * | ||
8 | * http://www.opensource.org/licenses/gpl-license.html | ||
9 | * http://www.gnu.org/copyleft/gpl.html | ||
10 | */ | ||
11 | |||
12 | #include <linux/module.h> | ||
13 | #include <linux/moduleparam.h> | ||
14 | #include <linux/init.h> | ||
15 | #include <linux/device.h> | ||
16 | #include <linux/errno.h> | ||
17 | #include <linux/io.h> | ||
18 | |||
19 | #include <asm/mach/irq.h> | ||
20 | |||
21 | #include <mach/hardware.h> | ||
22 | |||
23 | /* | ||
24 | ***************************************** | ||
25 | * TZIC Registers * | ||
26 | ***************************************** | ||
27 | */ | ||
28 | |||
29 | #define TZIC_INTCNTL 0x0000 /* Control register */ | ||
30 | #define TZIC_INTTYPE 0x0004 /* Controller Type register */ | ||
31 | #define TZIC_IMPID 0x0008 /* Distributor Implementer Identification */ | ||
32 | #define TZIC_PRIOMASK 0x000C /* Priority Mask Reg */ | ||
33 | #define TZIC_SYNCCTRL 0x0010 /* Synchronizer Control register */ | ||
34 | #define TZIC_DSMINT 0x0014 /* DSM interrupt Holdoffregister */ | ||
35 | #define TZIC_INTSEC0(i) (0x0080 + ((i) << 2)) /* Interrupt Security Reg 0 */ | ||
36 | #define TZIC_ENSET0(i) (0x0100 + ((i) << 2)) /* Enable Set Reg 0 */ | ||
37 | #define TZIC_ENCLEAR0(i) (0x0180 + ((i) << 2)) /* Enable Clear Reg 0 */ | ||
38 | #define TZIC_SRCSET0 0x0200 /* Source Set Register 0 */ | ||
39 | #define TZIC_SRCCLAR0 0x0280 /* Source Clear Register 0 */ | ||
40 | #define TZIC_PRIORITY0 0x0400 /* Priority Register 0 */ | ||
41 | #define TZIC_PND0 0x0D00 /* Pending Register 0 */ | ||
42 | #define TZIC_HIPND0 0x0D80 /* High Priority Pending Register */ | ||
43 | #define TZIC_WAKEUP0(i) (0x0E00 + ((i) << 2)) /* Wakeup Config Register */ | ||
44 | #define TZIC_SWINT 0x0F00 /* Software Interrupt Rigger Register */ | ||
45 | #define TZIC_ID0 0x0FD0 /* Indentification Register 0 */ | ||
46 | |||
47 | void __iomem *tzic_base; /* Used as irq controller base in entry-macro.S */ | ||
48 | |||
49 | /** | ||
50 | * tzic_mask_irq() - Disable interrupt number "irq" in the TZIC | ||
51 | * | ||
52 | * @param irq interrupt source number | ||
53 | */ | ||
54 | static void tzic_mask_irq(unsigned int irq) | ||
55 | { | ||
56 | int index, off; | ||
57 | |||
58 | index = irq >> 5; | ||
59 | off = irq & 0x1F; | ||
60 | __raw_writel(1 << off, tzic_base + TZIC_ENCLEAR0(index)); | ||
61 | } | ||
62 | |||
63 | /** | ||
64 | * tzic_unmask_irq() - Enable interrupt number "irq" in the TZIC | ||
65 | * | ||
66 | * @param irq interrupt source number | ||
67 | */ | ||
68 | static void tzic_unmask_irq(unsigned int irq) | ||
69 | { | ||
70 | int index, off; | ||
71 | |||
72 | index = irq >> 5; | ||
73 | off = irq & 0x1F; | ||
74 | __raw_writel(1 << off, tzic_base + TZIC_ENSET0(index)); | ||
75 | } | ||
76 | |||
77 | static unsigned int wakeup_intr[4]; | ||
78 | |||
79 | /** | ||
80 | * tzic_set_wake_irq() - Set interrupt number "irq" in the TZIC as a wake-up source. | ||
81 | * | ||
82 | * @param irq interrupt source number | ||
83 | * @param enable enable as wake-up if equal to non-zero | ||
84 | * disble as wake-up if equal to zero | ||
85 | * | ||
86 | * @return This function returns 0 on success. | ||
87 | */ | ||
88 | static int tzic_set_wake_irq(unsigned int irq, unsigned int enable) | ||
89 | { | ||
90 | unsigned int index, off; | ||
91 | |||
92 | index = irq >> 5; | ||
93 | off = irq & 0x1F; | ||
94 | |||
95 | if (index > 3) | ||
96 | return -EINVAL; | ||
97 | |||
98 | if (enable) | ||
99 | wakeup_intr[index] |= (1 << off); | ||
100 | else | ||
101 | wakeup_intr[index] &= ~(1 << off); | ||
102 | |||
103 | return 0; | ||
104 | } | ||
105 | |||
106 | static struct irq_chip mxc_tzic_chip = { | ||
107 | .name = "MXC_TZIC", | ||
108 | .ack = tzic_mask_irq, | ||
109 | .mask = tzic_mask_irq, | ||
110 | .unmask = tzic_unmask_irq, | ||
111 | .set_wake = tzic_set_wake_irq, | ||
112 | }; | ||
113 | |||
114 | /* | ||
115 | * This function initializes the TZIC hardware and disables all the | ||
116 | * interrupts. It registers the interrupt enable and disable functions | ||
117 | * to the kernel for each interrupt source. | ||
118 | */ | ||
119 | void __init tzic_init_irq(void __iomem *irqbase) | ||
120 | { | ||
121 | int i; | ||
122 | |||
123 | tzic_base = irqbase; | ||
124 | /* put the TZIC into the reset value with | ||
125 | * all interrupts disabled | ||
126 | */ | ||
127 | i = __raw_readl(tzic_base + TZIC_INTCNTL); | ||
128 | |||
129 | __raw_writel(0x80010001, tzic_base + TZIC_INTCNTL); | ||
130 | __raw_writel(0x1f, tzic_base + TZIC_PRIOMASK); | ||
131 | __raw_writel(0x02, tzic_base + TZIC_SYNCCTRL); | ||
132 | |||
133 | for (i = 0; i < 4; i++) | ||
134 | __raw_writel(0xFFFFFFFF, tzic_base + TZIC_INTSEC0(i)); | ||
135 | |||
136 | /* disable all interrupts */ | ||
137 | for (i = 0; i < 4; i++) | ||
138 | __raw_writel(0xFFFFFFFF, tzic_base + TZIC_ENCLEAR0(i)); | ||
139 | |||
140 | /* all IRQ no FIQ Warning :: No selection */ | ||
141 | |||
142 | for (i = 0; i < MXC_INTERNAL_IRQS; i++) { | ||
143 | set_irq_chip(i, &mxc_tzic_chip); | ||
144 | set_irq_handler(i, handle_level_irq); | ||
145 | set_irq_flags(i, IRQF_VALID); | ||
146 | } | ||
147 | |||
148 | pr_info("TrustZone Interrupt Controller (TZIC) initialized\n"); | ||
149 | } | ||
150 | |||
151 | /** | ||
152 | * tzic_enable_wake() - enable wakeup interrupt | ||
153 | * | ||
154 | * @param is_idle 1 if called in idle loop (ENSET0 register); | ||
155 | * 0 to be used when called from low power entry | ||
156 | * @return 0 if successful; non-zero otherwise | ||
157 | */ | ||
158 | int tzic_enable_wake(int is_idle) | ||
159 | { | ||
160 | unsigned int i, v; | ||
161 | |||
162 | __raw_writel(1, tzic_base + TZIC_DSMINT); | ||
163 | if (unlikely(__raw_readl(tzic_base + TZIC_DSMINT) == 0)) | ||
164 | return -EAGAIN; | ||
165 | |||
166 | for (i = 0; i < 4; i++) { | ||
167 | v = is_idle ? __raw_readl(TZIC_ENSET0(i)) : wakeup_intr[i]; | ||
168 | __raw_writel(v, TZIC_WAKEUP0(i)); | ||
169 | } | ||
170 | |||
171 | return 0; | ||
172 | } | ||
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig index 677cd53f18c3..4f99274b24c2 100644 --- a/drivers/mtd/nand/Kconfig +++ b/drivers/mtd/nand/Kconfig | |||
@@ -444,7 +444,7 @@ config MTD_NAND_FSL_UPM | |||
444 | 444 | ||
445 | config MTD_NAND_MXC | 445 | config MTD_NAND_MXC |
446 | tristate "MXC NAND support" | 446 | tristate "MXC NAND support" |
447 | depends on ARCH_MX2 || ARCH_MX3 | 447 | depends on ARCH_MX2 || ARCH_MX25 || ARCH_MX3 |
448 | help | 448 | help |
449 | This enables the driver for the NAND flash controller on the | 449 | This enables the driver for the NAND flash controller on the |
450 | MXC processors. | 450 | MXC processors. |
diff --git a/drivers/serial/imx.c b/drivers/serial/imx.c index 60d665a17a88..b801f5ab2b7b 100644 --- a/drivers/serial/imx.c +++ b/drivers/serial/imx.c | |||
@@ -440,7 +440,7 @@ static irqreturn_t imx_rxint(int irq, void *dev_id) | |||
440 | 440 | ||
441 | temp = readl(sport->port.membase + USR2); | 441 | temp = readl(sport->port.membase + USR2); |
442 | if (temp & USR2_BRCD) { | 442 | if (temp & USR2_BRCD) { |
443 | writel(temp | USR2_BRCD, sport->port.membase + USR2); | 443 | writel(USR2_BRCD, sport->port.membase + USR2); |
444 | if (uart_handle_break(&sport->port)) | 444 | if (uart_handle_break(&sport->port)) |
445 | continue; | 445 | continue; |
446 | } | 446 | } |
diff --git a/drivers/usb/gadget/fsl_mx3_udc.c b/drivers/usb/gadget/fsl_mx3_udc.c index 4bc2bf3d602e..20a802ecaa15 100644 --- a/drivers/usb/gadget/fsl_mx3_udc.c +++ b/drivers/usb/gadget/fsl_mx3_udc.c | |||
@@ -17,6 +17,8 @@ | |||
17 | #include <linux/fsl_devices.h> | 17 | #include <linux/fsl_devices.h> |
18 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
19 | 19 | ||
20 | #include <mach/hardware.h> | ||
21 | |||
20 | static struct clk *mxc_ahb_clk; | 22 | static struct clk *mxc_ahb_clk; |
21 | static struct clk *mxc_usb_clk; | 23 | static struct clk *mxc_usb_clk; |
22 | 24 | ||
@@ -28,14 +30,16 @@ int fsl_udc_clk_init(struct platform_device *pdev) | |||
28 | 30 | ||
29 | pdata = pdev->dev.platform_data; | 31 | pdata = pdev->dev.platform_data; |
30 | 32 | ||
31 | mxc_ahb_clk = clk_get(&pdev->dev, "usb_ahb"); | 33 | if (!cpu_is_mx35()) { |
32 | if (IS_ERR(mxc_ahb_clk)) | 34 | mxc_ahb_clk = clk_get(&pdev->dev, "usb_ahb"); |
33 | return PTR_ERR(mxc_ahb_clk); | 35 | if (IS_ERR(mxc_ahb_clk)) |
36 | return PTR_ERR(mxc_ahb_clk); | ||
34 | 37 | ||
35 | ret = clk_enable(mxc_ahb_clk); | 38 | ret = clk_enable(mxc_ahb_clk); |
36 | if (ret < 0) { | 39 | if (ret < 0) { |
37 | dev_err(&pdev->dev, "clk_enable(\"usb_ahb\") failed\n"); | 40 | dev_err(&pdev->dev, "clk_enable(\"usb_ahb\") failed\n"); |
38 | goto eenahb; | 41 | goto eenahb; |
42 | } | ||
39 | } | 43 | } |
40 | 44 | ||
41 | /* make sure USB_CLK is running at 60 MHz +/- 1000 Hz */ | 45 | /* make sure USB_CLK is running at 60 MHz +/- 1000 Hz */ |
@@ -50,6 +54,7 @@ int fsl_udc_clk_init(struct platform_device *pdev) | |||
50 | if (pdata->phy_mode != FSL_USB2_PHY_ULPI && | 54 | if (pdata->phy_mode != FSL_USB2_PHY_ULPI && |
51 | (freq < 59999000 || freq > 60001000)) { | 55 | (freq < 59999000 || freq > 60001000)) { |
52 | dev_err(&pdev->dev, "USB_CLK=%lu, should be 60MHz\n", freq); | 56 | dev_err(&pdev->dev, "USB_CLK=%lu, should be 60MHz\n", freq); |
57 | ret = -EINVAL; | ||
53 | goto eclkrate; | 58 | goto eclkrate; |
54 | } | 59 | } |
55 | 60 | ||
@@ -66,9 +71,11 @@ eclkrate: | |||
66 | clk_put(mxc_usb_clk); | 71 | clk_put(mxc_usb_clk); |
67 | mxc_usb_clk = NULL; | 72 | mxc_usb_clk = NULL; |
68 | egusb: | 73 | egusb: |
69 | clk_disable(mxc_ahb_clk); | 74 | if (!cpu_is_mx35()) |
75 | clk_disable(mxc_ahb_clk); | ||
70 | eenahb: | 76 | eenahb: |
71 | clk_put(mxc_ahb_clk); | 77 | if (!cpu_is_mx35()) |
78 | clk_put(mxc_ahb_clk); | ||
72 | return ret; | 79 | return ret; |
73 | } | 80 | } |
74 | 81 | ||
@@ -90,6 +97,8 @@ void fsl_udc_clk_release(void) | |||
90 | clk_disable(mxc_usb_clk); | 97 | clk_disable(mxc_usb_clk); |
91 | clk_put(mxc_usb_clk); | 98 | clk_put(mxc_usb_clk); |
92 | } | 99 | } |
93 | clk_disable(mxc_ahb_clk); | 100 | if (!cpu_is_mx35()) { |
94 | clk_put(mxc_ahb_clk); | 101 | clk_disable(mxc_ahb_clk); |
102 | clk_put(mxc_ahb_clk); | ||
103 | } | ||
95 | } | 104 | } |
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 5a5c303a6373..83d40ed2f2d6 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig | |||
@@ -400,9 +400,12 @@ config FB_SA1100 | |||
400 | If you plan to use the LCD display with your SA-1100 system, say | 400 | If you plan to use the LCD display with your SA-1100 system, say |
401 | Y here. | 401 | Y here. |
402 | 402 | ||
403 | config HAVE_FB_IMX | ||
404 | bool | ||
405 | |||
403 | config FB_IMX | 406 | config FB_IMX |
404 | tristate "Motorola i.MX LCD support" | 407 | tristate "Motorola i.MX LCD support" |
405 | depends on FB && (ARCH_MX1 || ARCH_MX2) | 408 | depends on FB && (HAVE_FB_IMX || ARCH_MX1 || ARCH_MX2) |
406 | select FB_CFB_FILLRECT | 409 | select FB_CFB_FILLRECT |
407 | select FB_CFB_COPYAREA | 410 | select FB_CFB_COPYAREA |
408 | select FB_CFB_IMAGEBLIT | 411 | select FB_CFB_IMAGEBLIT |