Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'rmk-devel-mxc-pu-v2' of git://pasiphae.extern.pengutronix.de/git/imx/linux-2.6 into devel

authored by

Russell King and committed by
Russell King
c95a4432 c613bbba

+3890 -366
+1
arch/arm/Makefile
··· 139 139 plat-$(CONFIG_ARCH_MXC) := mxc 140 140 machine-$(CONFIG_ARCH_MX2) := mx2 141 141 machine-$(CONFIG_ARCH_MX3) := mx3 142 + machine-$(CONFIG_ARCH_MX1) := mx1 142 143 machine-$(CONFIG_ARCH_ORION5X) := orion5x 143 144 plat-$(CONFIG_PLAT_ORION) := orion 144 145 machine-$(CONFIG_ARCH_MSM) := msm
+790
arch/arm/configs/mx31moboard_defconfig
··· 1 + # 2 + # Automatically generated make config: don't edit 3 + # Linux kernel version: 2.6.27-rc5 4 + # Fri Oct 24 11:41:22 2008 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_MMU=y 12 + # CONFIG_NO_IOPORT is not set 13 + CONFIG_GENERIC_HARDIRQS=y 14 + CONFIG_STACKTRACE_SUPPORT=y 15 + CONFIG_HAVE_LATENCYTOP_SUPPORT=y 16 + CONFIG_LOCKDEP_SUPPORT=y 17 + CONFIG_TRACE_IRQFLAGS_SUPPORT=y 18 + CONFIG_HARDIRQS_SW_RESEND=y 19 + CONFIG_GENERIC_IRQ_PROBE=y 20 + CONFIG_RWSEM_GENERIC_SPINLOCK=y 21 + # CONFIG_ARCH_HAS_ILOG2_U32 is not set 22 + # CONFIG_ARCH_HAS_ILOG2_U64 is not set 23 + CONFIG_GENERIC_HWEIGHT=y 24 + CONFIG_GENERIC_CALIBRATE_DELAY=y 25 + CONFIG_ARCH_SUPPORTS_AOUT=y 26 + CONFIG_ZONE_DMA=y 27 + CONFIG_ARCH_MTD_XIP=y 28 + CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 29 + CONFIG_VECTORS_BASE=0xffff0000 30 + CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 31 + 32 + # 33 + # General setup 34 + # 35 + CONFIG_EXPERIMENTAL=y 36 + CONFIG_BROKEN_ON_SMP=y 37 + CONFIG_LOCK_KERNEL=y 38 + CONFIG_INIT_ENV_ARG_LIMIT=32 39 + CONFIG_LOCALVERSION="" 40 + CONFIG_LOCALVERSION_AUTO=y 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 + CONFIG_IKCONFIG=y 49 + CONFIG_IKCONFIG_PROC=y 50 + CONFIG_LOG_BUF_SHIFT=14 51 + # CONFIG_CGROUPS is not set 52 + CONFIG_GROUP_SCHED=y 53 + CONFIG_FAIR_GROUP_SCHED=y 54 + # CONFIG_RT_GROUP_SCHED is not set 55 + CONFIG_USER_SCHED=y 56 + # CONFIG_CGROUP_SCHED is not set 57 + CONFIG_SYSFS_DEPRECATED=y 58 + CONFIG_SYSFS_DEPRECATED_V2=y 59 + # CONFIG_RELAY is not set 60 + # CONFIG_NAMESPACES is not set 61 + # CONFIG_BLK_DEV_INITRD is not set 62 + CONFIG_CC_OPTIMIZE_FOR_SIZE=y 63 + CONFIG_SYSCTL=y 64 + CONFIG_EMBEDDED=y 65 + CONFIG_UID16=y 66 + CONFIG_SYSCTL_SYSCALL=y 67 + CONFIG_KALLSYMS=y 68 + # CONFIG_KALLSYMS_EXTRA_PASS is not set 69 + CONFIG_HOTPLUG=y 70 + CONFIG_PRINTK=y 71 + CONFIG_BUG=y 72 + CONFIG_ELF_CORE=y 73 + CONFIG_COMPAT_BRK=y 74 + CONFIG_BASE_FULL=y 75 + CONFIG_FUTEX=y 76 + CONFIG_ANON_INODES=y 77 + CONFIG_EPOLL=y 78 + CONFIG_SIGNALFD=y 79 + CONFIG_TIMERFD=y 80 + CONFIG_EVENTFD=y 81 + CONFIG_SHMEM=y 82 + CONFIG_VM_EVENT_COUNTERS=y 83 + CONFIG_SLAB=y 84 + # CONFIG_SLUB is not set 85 + # CONFIG_SLOB is not set 86 + # CONFIG_PROFILING is not set 87 + # CONFIG_MARKERS is not set 88 + CONFIG_HAVE_OPROFILE=y 89 + # CONFIG_KPROBES is not set 90 + # CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set 91 + # CONFIG_HAVE_IOREMAP_PROT is not set 92 + CONFIG_HAVE_KPROBES=y 93 + CONFIG_HAVE_KRETPROBES=y 94 + # CONFIG_HAVE_ARCH_TRACEHOOK is not set 95 + # CONFIG_HAVE_DMA_ATTRS is not set 96 + # CONFIG_USE_GENERIC_SMP_HELPERS is not set 97 + # CONFIG_HAVE_CLK is not set 98 + CONFIG_PROC_PAGE_MONITOR=y 99 + CONFIG_HAVE_GENERIC_DMA_COHERENT=y 100 + CONFIG_SLABINFO=y 101 + CONFIG_RT_MUTEXES=y 102 + # CONFIG_TINY_SHMEM is not set 103 + CONFIG_BASE_SMALL=0 104 + CONFIG_MODULES=y 105 + # CONFIG_MODULE_FORCE_LOAD is not set 106 + CONFIG_MODULE_UNLOAD=y 107 + CONFIG_MODULE_FORCE_UNLOAD=y 108 + CONFIG_MODVERSIONS=y 109 + # CONFIG_MODULE_SRCVERSION_ALL is not set 110 + CONFIG_KMOD=y 111 + CONFIG_BLOCK=y 112 + # CONFIG_LBD is not set 113 + # CONFIG_BLK_DEV_IO_TRACE is not set 114 + # CONFIG_LSF is not set 115 + # CONFIG_BLK_DEV_BSG is not set 116 + # CONFIG_BLK_DEV_INTEGRITY is not set 117 + 118 + # 119 + # IO Schedulers 120 + # 121 + CONFIG_IOSCHED_NOOP=y 122 + CONFIG_IOSCHED_AS=y 123 + CONFIG_IOSCHED_DEADLINE=y 124 + CONFIG_IOSCHED_CFQ=y 125 + # CONFIG_DEFAULT_AS is not set 126 + # CONFIG_DEFAULT_DEADLINE is not set 127 + CONFIG_DEFAULT_CFQ=y 128 + # CONFIG_DEFAULT_NOOP is not set 129 + CONFIG_DEFAULT_IOSCHED="cfq" 130 + CONFIG_CLASSIC_RCU=y 131 + 132 + # 133 + # System Type 134 + # 135 + # CONFIG_ARCH_AAEC2000 is not set 136 + # CONFIG_ARCH_INTEGRATOR is not set 137 + # CONFIG_ARCH_REALVIEW is not set 138 + # CONFIG_ARCH_VERSATILE is not set 139 + # CONFIG_ARCH_AT91 is not set 140 + # CONFIG_ARCH_CLPS7500 is not set 141 + # CONFIG_ARCH_CLPS711X is not set 142 + # CONFIG_ARCH_EBSA110 is not set 143 + # CONFIG_ARCH_EP93XX is not set 144 + # CONFIG_ARCH_FOOTBRIDGE is not set 145 + # CONFIG_ARCH_NETX is not set 146 + # CONFIG_ARCH_H720X is not set 147 + # CONFIG_ARCH_IMX is not set 148 + # CONFIG_ARCH_IOP13XX is not set 149 + # CONFIG_ARCH_IOP32X is not set 150 + # CONFIG_ARCH_IOP33X is not set 151 + # CONFIG_ARCH_IXP23XX is not set 152 + # CONFIG_ARCH_IXP2000 is not set 153 + # CONFIG_ARCH_IXP4XX is not set 154 + # CONFIG_ARCH_L7200 is not set 155 + # CONFIG_ARCH_KIRKWOOD is not set 156 + # CONFIG_ARCH_KS8695 is not set 157 + # CONFIG_ARCH_NS9XXX is not set 158 + # CONFIG_ARCH_LOKI is not set 159 + # CONFIG_ARCH_MV78XX0 is not set 160 + CONFIG_ARCH_MXC=y 161 + # CONFIG_ARCH_ORION5X is not set 162 + # CONFIG_ARCH_PNX4008 is not set 163 + # CONFIG_ARCH_PXA is not set 164 + # CONFIG_ARCH_RPC is not set 165 + # CONFIG_ARCH_SA1100 is not set 166 + # CONFIG_ARCH_S3C2410 is not set 167 + # CONFIG_ARCH_SHARK is not set 168 + # CONFIG_ARCH_LH7A40X is not set 169 + # CONFIG_ARCH_DAVINCI is not set 170 + # CONFIG_ARCH_OMAP is not set 171 + # CONFIG_ARCH_MSM7X00A is not set 172 + 173 + # 174 + # Boot options 175 + # 176 + 177 + # 178 + # Power management 179 + # 180 + 181 + # 182 + # Freescale MXC Implementations 183 + # 184 + # CONFIG_ARCH_MX2 is not set 185 + CONFIG_ARCH_MX3=y 186 + 187 + # 188 + # MX3 Options 189 + # 190 + # CONFIG_MACH_MX31ADS is not set 191 + # CONFIG_MACH_PCM037 is not set 192 + # CONFIG_MACH_MX31LITE is not set 193 + CONFIG_MACH_MX31MOBOARD=y 194 + # CONFIG_MXC_IRQ_PRIOR is not set 195 + 196 + # 197 + # Processor Type 198 + # 199 + CONFIG_CPU_32=y 200 + CONFIG_CPU_V6=y 201 + # CONFIG_CPU_32v6K is not set 202 + CONFIG_CPU_32v6=y 203 + CONFIG_CPU_ABRT_EV6=y 204 + CONFIG_CPU_PABRT_NOIFAR=y 205 + CONFIG_CPU_CACHE_V6=y 206 + CONFIG_CPU_CACHE_VIPT=y 207 + CONFIG_CPU_COPY_V6=y 208 + CONFIG_CPU_TLB_V6=y 209 + CONFIG_CPU_HAS_ASID=y 210 + CONFIG_CPU_CP15=y 211 + CONFIG_CPU_CP15_MMU=y 212 + 213 + # 214 + # Processor Features 215 + # 216 + CONFIG_ARM_THUMB=y 217 + # CONFIG_CPU_ICACHE_DISABLE is not set 218 + # CONFIG_CPU_DCACHE_DISABLE is not set 219 + # CONFIG_CPU_BPREDICT_DISABLE is not set 220 + # CONFIG_OUTER_CACHE is not set 221 + 222 + # 223 + # Bus support 224 + # 225 + # CONFIG_PCI_SYSCALL is not set 226 + # CONFIG_ARCH_SUPPORTS_MSI is not set 227 + # CONFIG_PCCARD is not set 228 + 229 + # 230 + # Kernel Features 231 + # 232 + CONFIG_TICK_ONESHOT=y 233 + CONFIG_NO_HZ=y 234 + CONFIG_HIGH_RES_TIMERS=y 235 + CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 236 + CONFIG_PREEMPT=y 237 + CONFIG_HZ=100 238 + CONFIG_AEABI=y 239 + # CONFIG_OABI_COMPAT is not set 240 + CONFIG_ARCH_FLATMEM_HAS_HOLES=y 241 + # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set 242 + CONFIG_SELECT_MEMORY_MODEL=y 243 + CONFIG_FLATMEM_MANUAL=y 244 + # CONFIG_DISCONTIGMEM_MANUAL is not set 245 + # CONFIG_SPARSEMEM_MANUAL is not set 246 + CONFIG_FLATMEM=y 247 + CONFIG_FLAT_NODE_MEM_MAP=y 248 + # CONFIG_SPARSEMEM_STATIC is not set 249 + # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 250 + CONFIG_PAGEFLAGS_EXTENDED=y 251 + CONFIG_SPLIT_PTLOCK_CPUS=4 252 + # CONFIG_RESOURCES_64BIT is not set 253 + CONFIG_ZONE_DMA_FLAG=1 254 + CONFIG_BOUNCE=y 255 + CONFIG_VIRT_TO_BUS=y 256 + CONFIG_ALIGNMENT_TRAP=y 257 + 258 + # 259 + # Boot options 260 + # 261 + CONFIG_ZBOOT_ROM_TEXT=0x0 262 + CONFIG_ZBOOT_ROM_BSS=0x0 263 + CONFIG_CMDLINE="noinitrd console=ttymxc0,115200 root=/dev/mtdblock2 rw ip=off" 264 + # CONFIG_XIP_KERNEL is not set 265 + # CONFIG_KEXEC is not set 266 + 267 + # 268 + # Floating point emulation 269 + # 270 + 271 + # 272 + # At least one emulation must be selected 273 + # 274 + CONFIG_VFP=y 275 + 276 + # 277 + # Userspace binary formats 278 + # 279 + CONFIG_BINFMT_ELF=y 280 + # CONFIG_BINFMT_AOUT is not set 281 + # CONFIG_BINFMT_MISC is not set 282 + 283 + # 284 + # Power management options 285 + # 286 + # CONFIG_PM is not set 287 + CONFIG_ARCH_SUSPEND_POSSIBLE=y 288 + CONFIG_NET=y 289 + 290 + # 291 + # Networking options 292 + # 293 + CONFIG_PACKET=y 294 + # CONFIG_PACKET_MMAP is not set 295 + CONFIG_UNIX=y 296 + # CONFIG_NET_KEY is not set 297 + CONFIG_INET=y 298 + # CONFIG_IP_MULTICAST is not set 299 + # CONFIG_IP_ADVANCED_ROUTER is not set 300 + CONFIG_IP_FIB_HASH=y 301 + CONFIG_IP_PNP=y 302 + CONFIG_IP_PNP_DHCP=y 303 + # CONFIG_IP_PNP_BOOTP is not set 304 + # CONFIG_IP_PNP_RARP is not set 305 + # CONFIG_NET_IPIP is not set 306 + # CONFIG_NET_IPGRE is not set 307 + # CONFIG_ARPD is not set 308 + # CONFIG_SYN_COOKIES is not set 309 + # CONFIG_INET_AH is not set 310 + # CONFIG_INET_ESP is not set 311 + # CONFIG_INET_IPCOMP is not set 312 + # CONFIG_INET_XFRM_TUNNEL is not set 313 + # CONFIG_INET_TUNNEL is not set 314 + # CONFIG_INET_XFRM_MODE_TRANSPORT is not set 315 + # CONFIG_INET_XFRM_MODE_TUNNEL is not set 316 + # CONFIG_INET_XFRM_MODE_BEET is not set 317 + # CONFIG_INET_LRO is not set 318 + # CONFIG_INET_DIAG is not set 319 + # CONFIG_TCP_CONG_ADVANCED is not set 320 + CONFIG_TCP_CONG_CUBIC=y 321 + CONFIG_DEFAULT_TCP_CONG="cubic" 322 + # CONFIG_TCP_MD5SIG is not set 323 + # CONFIG_IPV6 is not set 324 + # CONFIG_NETWORK_SECMARK is not set 325 + # CONFIG_NETFILTER is not set 326 + # CONFIG_IP_DCCP is not set 327 + # CONFIG_IP_SCTP is not set 328 + # CONFIG_TIPC is not set 329 + # CONFIG_ATM is not set 330 + # CONFIG_BRIDGE is not set 331 + # CONFIG_VLAN_8021Q is not set 332 + # CONFIG_DECNET is not set 333 + # CONFIG_LLC2 is not set 334 + # CONFIG_IPX is not set 335 + # CONFIG_ATALK is not set 336 + # CONFIG_X25 is not set 337 + # CONFIG_LAPB is not set 338 + # CONFIG_ECONET is not set 339 + # CONFIG_WAN_ROUTER is not set 340 + # CONFIG_NET_SCHED is not set 341 + 342 + # 343 + # Network testing 344 + # 345 + # CONFIG_NET_PKTGEN is not set 346 + # CONFIG_HAMRADIO is not set 347 + # CONFIG_CAN is not set 348 + # CONFIG_IRDA is not set 349 + # CONFIG_BT is not set 350 + # CONFIG_AF_RXRPC is not set 351 + 352 + # 353 + # Wireless 354 + # 355 + # CONFIG_CFG80211 is not set 356 + # CONFIG_WIRELESS_EXT is not set 357 + # CONFIG_MAC80211 is not set 358 + # CONFIG_IEEE80211 is not set 359 + # CONFIG_RFKILL is not set 360 + # CONFIG_NET_9P is not set 361 + 362 + # 363 + # Device Drivers 364 + # 365 + 366 + # 367 + # Generic Driver Options 368 + # 369 + CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 370 + CONFIG_STANDALONE=y 371 + CONFIG_PREVENT_FIRMWARE_BUILD=y 372 + CONFIG_FW_LOADER=m 373 + CONFIG_FIRMWARE_IN_KERNEL=y 374 + CONFIG_EXTRA_FIRMWARE="" 375 + # CONFIG_SYS_HYPERVISOR is not set 376 + # CONFIG_CONNECTOR is not set 377 + CONFIG_MTD=y 378 + # CONFIG_MTD_DEBUG is not set 379 + # CONFIG_MTD_CONCAT is not set 380 + CONFIG_MTD_PARTITIONS=y 381 + CONFIG_MTD_REDBOOT_PARTS=y 382 + CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 383 + # CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set 384 + CONFIG_MTD_REDBOOT_PARTS_READONLY=y 385 + # CONFIG_MTD_CMDLINE_PARTS is not set 386 + # CONFIG_MTD_AFS_PARTS is not set 387 + # CONFIG_MTD_AR7_PARTS is not set 388 + 389 + # 390 + # User Modules And Translation Layers 391 + # 392 + CONFIG_MTD_CHAR=y 393 + CONFIG_MTD_BLKDEVS=y 394 + CONFIG_MTD_BLOCK=y 395 + # CONFIG_FTL is not set 396 + # CONFIG_NFTL is not set 397 + # CONFIG_INFTL is not set 398 + # CONFIG_RFD_FTL is not set 399 + # CONFIG_SSFDC is not set 400 + # CONFIG_MTD_OOPS is not set 401 + 402 + # 403 + # RAM/ROM/Flash chip drivers 404 + # 405 + CONFIG_MTD_CFI=y 406 + # CONFIG_MTD_JEDECPROBE is not set 407 + CONFIG_MTD_GEN_PROBE=y 408 + CONFIG_MTD_CFI_ADV_OPTIONS=y 409 + CONFIG_MTD_CFI_NOSWAP=y 410 + # CONFIG_MTD_CFI_BE_BYTE_SWAP is not set 411 + # CONFIG_MTD_CFI_LE_BYTE_SWAP is not set 412 + CONFIG_MTD_CFI_GEOMETRY=y 413 + # CONFIG_MTD_MAP_BANK_WIDTH_1 is not set 414 + CONFIG_MTD_MAP_BANK_WIDTH_2=y 415 + # CONFIG_MTD_MAP_BANK_WIDTH_4 is not set 416 + # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set 417 + # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set 418 + # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set 419 + CONFIG_MTD_CFI_I1=y 420 + # CONFIG_MTD_CFI_I2 is not set 421 + # CONFIG_MTD_CFI_I4 is not set 422 + # CONFIG_MTD_CFI_I8 is not set 423 + # CONFIG_MTD_OTP is not set 424 + # CONFIG_MTD_CFI_INTELEXT is not set 425 + CONFIG_MTD_CFI_AMDSTD=y 426 + # CONFIG_MTD_CFI_STAA is not set 427 + CONFIG_MTD_CFI_UTIL=y 428 + # CONFIG_MTD_RAM is not set 429 + # CONFIG_MTD_ROM is not set 430 + # CONFIG_MTD_ABSENT is not set 431 + # CONFIG_MTD_XIP is not set 432 + 433 + # 434 + # Mapping drivers for chip access 435 + # 436 + # CONFIG_MTD_COMPLEX_MAPPINGS is not set 437 + CONFIG_MTD_PHYSMAP=y 438 + CONFIG_MTD_PHYSMAP_START=0x0 439 + CONFIG_MTD_PHYSMAP_LEN=0x0 440 + CONFIG_MTD_PHYSMAP_BANKWIDTH=2 441 + # CONFIG_MTD_ARM_INTEGRATOR is not set 442 + # CONFIG_MTD_PLATRAM is not set 443 + 444 + # 445 + # Self-contained MTD device drivers 446 + # 447 + # CONFIG_MTD_SLRAM is not set 448 + # CONFIG_MTD_PHRAM is not set 449 + # CONFIG_MTD_MTDRAM is not set 450 + # CONFIG_MTD_BLOCK2MTD is not set 451 + 452 + # 453 + # Disk-On-Chip Device Drivers 454 + # 455 + # CONFIG_MTD_DOC2000 is not set 456 + # CONFIG_MTD_DOC2001 is not set 457 + # CONFIG_MTD_DOC2001PLUS is not set 458 + # CONFIG_MTD_NAND is not set 459 + # CONFIG_MTD_ONENAND is not set 460 + 461 + # 462 + # UBI - Unsorted block images 463 + # 464 + # CONFIG_MTD_UBI is not set 465 + # CONFIG_PARPORT is not set 466 + # CONFIG_BLK_DEV is not set 467 + # CONFIG_MISC_DEVICES is not set 468 + CONFIG_HAVE_IDE=y 469 + # CONFIG_IDE is not set 470 + 471 + # 472 + # SCSI device support 473 + # 474 + # CONFIG_RAID_ATTRS is not set 475 + # CONFIG_SCSI is not set 476 + # CONFIG_SCSI_DMA is not set 477 + # CONFIG_SCSI_NETLINK is not set 478 + # CONFIG_ATA is not set 479 + # CONFIG_MD is not set 480 + CONFIG_NETDEVICES=y 481 + # CONFIG_DUMMY is not set 482 + # CONFIG_BONDING is not set 483 + # CONFIG_MACVLAN is not set 484 + # CONFIG_EQUALIZER is not set 485 + # CONFIG_TUN is not set 486 + # CONFIG_VETH is not set 487 + # CONFIG_PHYLIB is not set 488 + CONFIG_NET_ETHERNET=y 489 + CONFIG_MII=y 490 + # CONFIG_AX88796 is not set 491 + CONFIG_SMC91X=y 492 + # CONFIG_DM9000 is not set 493 + # CONFIG_IBM_NEW_EMAC_ZMII is not set 494 + # CONFIG_IBM_NEW_EMAC_RGMII is not set 495 + # CONFIG_IBM_NEW_EMAC_TAH is not set 496 + # CONFIG_IBM_NEW_EMAC_EMAC4 is not set 497 + # CONFIG_B44 is not set 498 + # CONFIG_NETDEV_1000 is not set 499 + # CONFIG_NETDEV_10000 is not set 500 + 501 + # 502 + # Wireless LAN 503 + # 504 + # CONFIG_WLAN_PRE80211 is not set 505 + # CONFIG_WLAN_80211 is not set 506 + # CONFIG_IWLWIFI_LEDS is not set 507 + # CONFIG_WAN is not set 508 + # CONFIG_PPP is not set 509 + # CONFIG_SLIP is not set 510 + # CONFIG_NETCONSOLE is not set 511 + # CONFIG_NETPOLL is not set 512 + # CONFIG_NET_POLL_CONTROLLER is not set 513 + # CONFIG_ISDN is not set 514 + 515 + # 516 + # Input device support 517 + # 518 + # CONFIG_INPUT is not set 519 + 520 + # 521 + # Hardware I/O ports 522 + # 523 + # CONFIG_SERIO is not set 524 + # CONFIG_GAMEPORT is not set 525 + 526 + # 527 + # Character devices 528 + # 529 + # CONFIG_VT is not set 530 + CONFIG_DEVKMEM=y 531 + # CONFIG_SERIAL_NONSTANDARD is not set 532 + 533 + # 534 + # Serial drivers 535 + # 536 + # CONFIG_SERIAL_8250 is not set 537 + 538 + # 539 + # Non-8250 serial port support 540 + # 541 + CONFIG_SERIAL_IMX=y 542 + CONFIG_SERIAL_IMX_CONSOLE=y 543 + CONFIG_SERIAL_CORE=y 544 + CONFIG_SERIAL_CORE_CONSOLE=y 545 + CONFIG_UNIX98_PTYS=y 546 + # CONFIG_LEGACY_PTYS is not set 547 + # CONFIG_IPMI_HANDLER is not set 548 + # CONFIG_HW_RANDOM is not set 549 + # CONFIG_NVRAM is not set 550 + # CONFIG_R3964 is not set 551 + # CONFIG_RAW_DRIVER is not set 552 + # CONFIG_TCG_TPM is not set 553 + # CONFIG_I2C is not set 554 + # CONFIG_SPI is not set 555 + CONFIG_ARCH_REQUIRE_GPIOLIB=y 556 + CONFIG_GPIOLIB=y 557 + # CONFIG_GPIO_SYSFS is not set 558 + 559 + # 560 + # I2C GPIO expanders: 561 + # 562 + 563 + # 564 + # PCI GPIO expanders: 565 + # 566 + 567 + # 568 + # SPI GPIO expanders: 569 + # 570 + # CONFIG_W1 is not set 571 + # CONFIG_POWER_SUPPLY is not set 572 + # CONFIG_HWMON is not set 573 + # CONFIG_WATCHDOG is not set 574 + 575 + # 576 + # Sonics Silicon Backplane 577 + # 578 + CONFIG_SSB_POSSIBLE=y 579 + # CONFIG_SSB is not set 580 + 581 + # 582 + # Multifunction device drivers 583 + # 584 + # CONFIG_MFD_CORE is not set 585 + # CONFIG_MFD_SM501 is not set 586 + # CONFIG_HTC_EGPIO is not set 587 + # CONFIG_HTC_PASIC3 is not set 588 + # CONFIG_MFD_TMIO is not set 589 + # CONFIG_MFD_T7L66XB is not set 590 + # CONFIG_MFD_TC6387XB is not set 591 + # CONFIG_MFD_TC6393XB is not set 592 + 593 + # 594 + # Multimedia devices 595 + # 596 + 597 + # 598 + # Multimedia core support 599 + # 600 + # CONFIG_VIDEO_DEV is not set 601 + # CONFIG_DVB_CORE is not set 602 + # CONFIG_VIDEO_MEDIA is not set 603 + 604 + # 605 + # Multimedia drivers 606 + # 607 + # CONFIG_DAB is not set 608 + 609 + # 610 + # Graphics support 611 + # 612 + # CONFIG_VGASTATE is not set 613 + # CONFIG_VIDEO_OUTPUT_CONTROL is not set 614 + # CONFIG_FB is not set 615 + # CONFIG_BACKLIGHT_LCD_SUPPORT is not set 616 + 617 + # 618 + # Display device support 619 + # 620 + # CONFIG_DISPLAY_SUPPORT is not set 621 + # CONFIG_SOUND is not set 622 + # CONFIG_USB_SUPPORT is not set 623 + # CONFIG_MMC is not set 624 + # CONFIG_NEW_LEDS is not set 625 + CONFIG_RTC_LIB=y 626 + # CONFIG_RTC_CLASS is not set 627 + # CONFIG_DMADEVICES is not set 628 + 629 + # 630 + # Voltage and Current regulators 631 + # 632 + # CONFIG_REGULATOR is not set 633 + # CONFIG_REGULATOR_FIXED_VOLTAGE is not set 634 + # CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set 635 + # CONFIG_REGULATOR_BQ24022 is not set 636 + # CONFIG_UIO is not set 637 + 638 + # 639 + # File systems 640 + # 641 + # CONFIG_EXT2_FS is not set 642 + # CONFIG_EXT3_FS is not set 643 + # CONFIG_EXT4DEV_FS is not set 644 + # CONFIG_REISERFS_FS is not set 645 + # CONFIG_JFS_FS is not set 646 + # CONFIG_FS_POSIX_ACL is not set 647 + # CONFIG_XFS_FS is not set 648 + # CONFIG_OCFS2_FS is not set 649 + # CONFIG_DNOTIFY is not set 650 + CONFIG_INOTIFY=y 651 + CONFIG_INOTIFY_USER=y 652 + # CONFIG_QUOTA is not set 653 + # CONFIG_AUTOFS_FS is not set 654 + # CONFIG_AUTOFS4_FS is not set 655 + # CONFIG_FUSE_FS is not set 656 + 657 + # 658 + # CD-ROM/DVD Filesystems 659 + # 660 + # CONFIG_ISO9660_FS is not set 661 + # CONFIG_UDF_FS is not set 662 + 663 + # 664 + # DOS/FAT/NT Filesystems 665 + # 666 + # CONFIG_MSDOS_FS is not set 667 + # CONFIG_VFAT_FS is not set 668 + # CONFIG_NTFS_FS is not set 669 + 670 + # 671 + # Pseudo filesystems 672 + # 673 + CONFIG_PROC_FS=y 674 + CONFIG_PROC_SYSCTL=y 675 + CONFIG_SYSFS=y 676 + CONFIG_TMPFS=y 677 + # CONFIG_TMPFS_POSIX_ACL is not set 678 + # CONFIG_HUGETLB_PAGE is not set 679 + # CONFIG_CONFIGFS_FS is not set 680 + 681 + # 682 + # Miscellaneous filesystems 683 + # 684 + # CONFIG_ADFS_FS is not set 685 + # CONFIG_AFFS_FS is not set 686 + # CONFIG_HFS_FS is not set 687 + # CONFIG_HFSPLUS_FS is not set 688 + # CONFIG_BEFS_FS is not set 689 + # CONFIG_BFS_FS is not set 690 + # CONFIG_EFS_FS is not set 691 + CONFIG_JFFS2_FS=y 692 + CONFIG_JFFS2_FS_DEBUG=0 693 + CONFIG_JFFS2_FS_WRITEBUFFER=y 694 + # CONFIG_JFFS2_FS_WBUF_VERIFY is not set 695 + # CONFIG_JFFS2_SUMMARY is not set 696 + # CONFIG_JFFS2_FS_XATTR is not set 697 + # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set 698 + CONFIG_JFFS2_ZLIB=y 699 + # CONFIG_JFFS2_LZO is not set 700 + CONFIG_JFFS2_RTIME=y 701 + # CONFIG_JFFS2_RUBIN is not set 702 + # CONFIG_CRAMFS is not set 703 + # CONFIG_VXFS_FS is not set 704 + # CONFIG_MINIX_FS is not set 705 + # CONFIG_OMFS_FS is not set 706 + # CONFIG_HPFS_FS is not set 707 + # CONFIG_QNX4FS_FS is not set 708 + # CONFIG_ROMFS_FS is not set 709 + # CONFIG_SYSV_FS is not set 710 + # CONFIG_UFS_FS is not set 711 + CONFIG_NETWORK_FILESYSTEMS=y 712 + CONFIG_NFS_FS=y 713 + # CONFIG_NFS_V3 is not set 714 + # CONFIG_NFS_V4 is not set 715 + CONFIG_ROOT_NFS=y 716 + # CONFIG_NFSD is not set 717 + CONFIG_LOCKD=y 718 + CONFIG_NFS_COMMON=y 719 + CONFIG_SUNRPC=y 720 + # CONFIG_RPCSEC_GSS_KRB5 is not set 721 + # CONFIG_RPCSEC_GSS_SPKM3 is not set 722 + # CONFIG_SMB_FS is not set 723 + # CONFIG_CIFS is not set 724 + # CONFIG_NCP_FS is not set 725 + # CONFIG_CODA_FS is not set 726 + # CONFIG_AFS_FS is not set 727 + 728 + # 729 + # Partition Types 730 + # 731 + # CONFIG_PARTITION_ADVANCED is not set 732 + CONFIG_MSDOS_PARTITION=y 733 + # CONFIG_NLS is not set 734 + # CONFIG_DLM is not set 735 + 736 + # 737 + # Kernel hacking 738 + # 739 + # CONFIG_PRINTK_TIME is not set 740 + # CONFIG_ENABLE_WARN_DEPRECATED is not set 741 + # CONFIG_ENABLE_MUST_CHECK is not set 742 + CONFIG_FRAME_WARN=1024 743 + # CONFIG_MAGIC_SYSRQ is not set 744 + # CONFIG_UNUSED_SYMBOLS is not set 745 + # CONFIG_DEBUG_FS is not set 746 + # CONFIG_HEADERS_CHECK is not set 747 + # CONFIG_DEBUG_KERNEL is not set 748 + # CONFIG_DEBUG_BUGVERBOSE is not set 749 + # CONFIG_DEBUG_MEMORY_INIT is not set 750 + CONFIG_FRAME_POINTER=y 751 + # CONFIG_LATENCYTOP is not set 752 + CONFIG_SYSCTL_SYSCALL_CHECK=y 753 + CONFIG_HAVE_FTRACE=y 754 + CONFIG_HAVE_DYNAMIC_FTRACE=y 755 + # CONFIG_FTRACE is not set 756 + # CONFIG_IRQSOFF_TRACER is not set 757 + # CONFIG_PREEMPT_TRACER is not set 758 + # CONFIG_SCHED_TRACER is not set 759 + # CONFIG_CONTEXT_SWITCH_TRACER is not set 760 + # CONFIG_SAMPLES is not set 761 + CONFIG_HAVE_ARCH_KGDB=y 762 + # CONFIG_DEBUG_USER is not set 763 + 764 + # 765 + # Security options 766 + # 767 + # CONFIG_KEYS is not set 768 + # CONFIG_SECURITY is not set 769 + # CONFIG_SECURITY_FILE_CAPABILITIES is not set 770 + # CONFIG_CRYPTO is not set 771 + 772 + # 773 + # Library routines 774 + # 775 + CONFIG_BITREVERSE=y 776 + # CONFIG_GENERIC_FIND_FIRST_BIT is not set 777 + # CONFIG_GENERIC_FIND_NEXT_BIT is not set 778 + # CONFIG_CRC_CCITT is not set 779 + # CONFIG_CRC16 is not set 780 + # CONFIG_CRC_T10DIF is not set 781 + # CONFIG_CRC_ITU_T is not set 782 + CONFIG_CRC32=y 783 + # CONFIG_CRC7 is not set 784 + # CONFIG_LIBCRC32C is not set 785 + CONFIG_ZLIB_INFLATE=y 786 + CONFIG_ZLIB_DEFLATE=y 787 + CONFIG_PLIST=y 788 + CONFIG_HAS_IOMEM=y 789 + CONFIG_HAS_IOPORT=y 790 + CONFIG_HAS_DMA=y
+773
arch/arm/configs/mx31pdk_defconfig
··· 1 + # 2 + # Automatically generated make config: don't edit 3 + # Linux kernel version: 2.6.28-rc2 4 + # Sun Oct 26 15:55:29 2008 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_MMU=y 12 + # CONFIG_NO_IOPORT is not set 13 + CONFIG_GENERIC_HARDIRQS=y 14 + CONFIG_STACKTRACE_SUPPORT=y 15 + CONFIG_HAVE_LATENCYTOP_SUPPORT=y 16 + CONFIG_LOCKDEP_SUPPORT=y 17 + CONFIG_TRACE_IRQFLAGS_SUPPORT=y 18 + CONFIG_HARDIRQS_SW_RESEND=y 19 + CONFIG_GENERIC_IRQ_PROBE=y 20 + CONFIG_RWSEM_GENERIC_SPINLOCK=y 21 + # CONFIG_ARCH_HAS_ILOG2_U32 is not set 22 + # CONFIG_ARCH_HAS_ILOG2_U64 is not set 23 + CONFIG_GENERIC_HWEIGHT=y 24 + CONFIG_GENERIC_CALIBRATE_DELAY=y 25 + CONFIG_ARCH_MTD_XIP=y 26 + CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 27 + CONFIG_VECTORS_BASE=0xffff0000 28 + CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 29 + 30 + # 31 + # General setup 32 + # 33 + # CONFIG_EXPERIMENTAL is not set 34 + CONFIG_BROKEN_ON_SMP=y 35 + CONFIG_INIT_ENV_ARG_LIMIT=32 36 + CONFIG_LOCALVERSION="" 37 + # CONFIG_LOCALVERSION_AUTO is not set 38 + # CONFIG_SWAP is not set 39 + # CONFIG_SYSVIPC is not set 40 + # CONFIG_BSD_PROCESS_ACCT is not set 41 + # CONFIG_TASKSTATS is not set 42 + # CONFIG_AUDIT is not set 43 + # CONFIG_IKCONFIG is not set 44 + CONFIG_LOG_BUF_SHIFT=17 45 + # CONFIG_CGROUPS is not set 46 + # CONFIG_SYSFS_DEPRECATED_V2 is not set 47 + # CONFIG_RELAY is not set 48 + CONFIG_NAMESPACES=y 49 + # CONFIG_UTS_NS is not set 50 + # CONFIG_BLK_DEV_INITRD is not set 51 + # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 52 + CONFIG_SYSCTL=y 53 + # CONFIG_EMBEDDED is not set 54 + CONFIG_UID16=y 55 + CONFIG_SYSCTL_SYSCALL=y 56 + CONFIG_KALLSYMS=y 57 + # CONFIG_KALLSYMS_EXTRA_PASS is not set 58 + CONFIG_HOTPLUG=y 59 + CONFIG_PRINTK=y 60 + CONFIG_BUG=y 61 + CONFIG_ELF_CORE=y 62 + # CONFIG_COMPAT_BRK is not set 63 + CONFIG_BASE_FULL=y 64 + CONFIG_FUTEX=y 65 + CONFIG_ANON_INODES=y 66 + CONFIG_EPOLL=y 67 + CONFIG_SIGNALFD=y 68 + CONFIG_TIMERFD=y 69 + CONFIG_EVENTFD=y 70 + CONFIG_SHMEM=y 71 + CONFIG_AIO=y 72 + CONFIG_VM_EVENT_COUNTERS=y 73 + CONFIG_SLUB_DEBUG=y 74 + # CONFIG_SLAB is not set 75 + CONFIG_SLUB=y 76 + # CONFIG_SLOB is not set 77 + # CONFIG_PROFILING is not set 78 + # CONFIG_MARKERS is not set 79 + CONFIG_HAVE_OPROFILE=y 80 + CONFIG_HAVE_KPROBES=y 81 + CONFIG_HAVE_KRETPROBES=y 82 + CONFIG_HAVE_GENERIC_DMA_COHERENT=y 83 + CONFIG_SLABINFO=y 84 + CONFIG_RT_MUTEXES=y 85 + # CONFIG_TINY_SHMEM is not set 86 + CONFIG_BASE_SMALL=0 87 + # CONFIG_MODULES is not set 88 + CONFIG_BLOCK=y 89 + # CONFIG_LBD is not set 90 + # CONFIG_BLK_DEV_IO_TRACE is not set 91 + # CONFIG_LSF is not set 92 + # CONFIG_BLK_DEV_INTEGRITY is not set 93 + 94 + # 95 + # IO Schedulers 96 + # 97 + CONFIG_IOSCHED_NOOP=y 98 + # CONFIG_IOSCHED_AS is not set 99 + # CONFIG_IOSCHED_DEADLINE is not set 100 + # CONFIG_IOSCHED_CFQ is not set 101 + # CONFIG_DEFAULT_AS is not set 102 + # CONFIG_DEFAULT_DEADLINE is not set 103 + # CONFIG_DEFAULT_CFQ is not set 104 + CONFIG_DEFAULT_NOOP=y 105 + CONFIG_DEFAULT_IOSCHED="noop" 106 + CONFIG_CLASSIC_RCU=y 107 + # CONFIG_FREEZER is not set 108 + 109 + # 110 + # System Type 111 + # 112 + # CONFIG_ARCH_AAEC2000 is not set 113 + # CONFIG_ARCH_INTEGRATOR is not set 114 + # CONFIG_ARCH_REALVIEW is not set 115 + # CONFIG_ARCH_VERSATILE is not set 116 + # CONFIG_ARCH_AT91 is not set 117 + # CONFIG_ARCH_CLPS7500 is not set 118 + # CONFIG_ARCH_CLPS711X is not set 119 + # CONFIG_ARCH_EBSA110 is not set 120 + # CONFIG_ARCH_EP93XX is not set 121 + # CONFIG_ARCH_FOOTBRIDGE is not set 122 + # CONFIG_ARCH_NETX is not set 123 + # CONFIG_ARCH_H720X is not set 124 + # CONFIG_ARCH_IMX is not set 125 + # CONFIG_ARCH_IOP13XX is not set 126 + # CONFIG_ARCH_IOP32X is not set 127 + # CONFIG_ARCH_IOP33X is not set 128 + # CONFIG_ARCH_IXP23XX is not set 129 + # CONFIG_ARCH_IXP2000 is not set 130 + # CONFIG_ARCH_IXP4XX is not set 131 + # CONFIG_ARCH_L7200 is not set 132 + # CONFIG_ARCH_KIRKWOOD is not set 133 + # CONFIG_ARCH_KS8695 is not set 134 + # CONFIG_ARCH_NS9XXX is not set 135 + # CONFIG_ARCH_LOKI is not set 136 + # CONFIG_ARCH_MV78XX0 is not set 137 + CONFIG_ARCH_MXC=y 138 + # CONFIG_ARCH_ORION5X is not set 139 + # CONFIG_ARCH_PNX4008 is not set 140 + # CONFIG_ARCH_PXA is not set 141 + # CONFIG_ARCH_RPC is not set 142 + # CONFIG_ARCH_SA1100 is not set 143 + # CONFIG_ARCH_S3C2410 is not set 144 + # CONFIG_ARCH_SHARK is not set 145 + # CONFIG_ARCH_LH7A40X is not set 146 + # CONFIG_ARCH_DAVINCI is not set 147 + # CONFIG_ARCH_OMAP is not set 148 + # CONFIG_ARCH_MSM is not set 149 + 150 + # 151 + # Boot options 152 + # 153 + 154 + # 155 + # Power management 156 + # 157 + 158 + # 159 + # Freescale MXC Implementations 160 + # 161 + # CONFIG_ARCH_MX2 is not set 162 + CONFIG_ARCH_MX3=y 163 + 164 + # 165 + # MX3 Options 166 + # 167 + # CONFIG_MACH_MX31ADS is not set 168 + # CONFIG_MACH_PCM037 is not set 169 + # CONFIG_MACH_MX31LITE is not set 170 + CONFIG_MACH_MX31_3DS=y 171 + # CONFIG_MXC_IRQ_PRIOR is not set 172 + 173 + # 174 + # Processor Type 175 + # 176 + CONFIG_CPU_32=y 177 + CONFIG_CPU_V6=y 178 + # CONFIG_CPU_32v6K is not set 179 + CONFIG_CPU_32v6=y 180 + CONFIG_CPU_ABRT_EV6=y 181 + CONFIG_CPU_PABRT_NOIFAR=y 182 + CONFIG_CPU_CACHE_V6=y 183 + CONFIG_CPU_CACHE_VIPT=y 184 + CONFIG_CPU_COPY_V6=y 185 + CONFIG_CPU_TLB_V6=y 186 + CONFIG_CPU_HAS_ASID=y 187 + CONFIG_CPU_CP15=y 188 + CONFIG_CPU_CP15_MMU=y 189 + 190 + # 191 + # Processor Features 192 + # 193 + CONFIG_ARM_THUMB=y 194 + # CONFIG_CPU_ICACHE_DISABLE is not set 195 + # CONFIG_CPU_DCACHE_DISABLE is not set 196 + # CONFIG_CPU_BPREDICT_DISABLE is not set 197 + # CONFIG_OUTER_CACHE is not set 198 + 199 + # 200 + # Bus support 201 + # 202 + # CONFIG_PCI_SYSCALL is not set 203 + # CONFIG_ARCH_SUPPORTS_MSI is not set 204 + # CONFIG_PCCARD is not set 205 + 206 + # 207 + # Kernel Features 208 + # 209 + # CONFIG_NO_HZ is not set 210 + # CONFIG_HIGH_RES_TIMERS is not set 211 + CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 212 + CONFIG_VMSPLIT_3G=y 213 + # CONFIG_VMSPLIT_2G is not set 214 + # CONFIG_VMSPLIT_1G is not set 215 + CONFIG_PAGE_OFFSET=0xC0000000 216 + CONFIG_HZ=100 217 + CONFIG_AEABI=y 218 + CONFIG_ARCH_FLATMEM_HAS_HOLES=y 219 + # CONFIG_ARCH_SPARSEMEM_DEFAULT is not set 220 + # CONFIG_ARCH_SELECT_MEMORY_MODEL is not set 221 + CONFIG_FLATMEM=y 222 + CONFIG_FLAT_NODE_MEM_MAP=y 223 + CONFIG_PAGEFLAGS_EXTENDED=y 224 + CONFIG_SPLIT_PTLOCK_CPUS=4 225 + # CONFIG_RESOURCES_64BIT is not set 226 + # CONFIG_PHYS_ADDR_T_64BIT is not set 227 + CONFIG_ZONE_DMA_FLAG=0 228 + CONFIG_VIRT_TO_BUS=y 229 + # CONFIG_UNEVICTABLE_LRU is not set 230 + CONFIG_ALIGNMENT_TRAP=y 231 + 232 + # 233 + # Boot options 234 + # 235 + CONFIG_ZBOOT_ROM_TEXT=0 236 + CONFIG_ZBOOT_ROM_BSS=0 237 + CONFIG_CMDLINE="" 238 + # CONFIG_XIP_KERNEL is not set 239 + 240 + # 241 + # CPU Power Management 242 + # 243 + # CONFIG_CPU_IDLE is not set 244 + 245 + # 246 + # Floating point emulation 247 + # 248 + 249 + # 250 + # At least one emulation must be selected 251 + # 252 + # CONFIG_VFP is not set 253 + 254 + # 255 + # Userspace binary formats 256 + # 257 + CONFIG_BINFMT_ELF=y 258 + # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set 259 + CONFIG_HAVE_AOUT=y 260 + # CONFIG_BINFMT_AOUT is not set 261 + # CONFIG_BINFMT_MISC is not set 262 + 263 + # 264 + # Power management options 265 + # 266 + # CONFIG_PM is not set 267 + CONFIG_ARCH_SUSPEND_POSSIBLE=y 268 + CONFIG_NET=y 269 + 270 + # 271 + # Networking options 272 + # 273 + CONFIG_PACKET=y 274 + # CONFIG_PACKET_MMAP is not set 275 + CONFIG_UNIX=y 276 + CONFIG_XFRM=y 277 + # CONFIG_XFRM_USER is not set 278 + CONFIG_NET_KEY=y 279 + CONFIG_INET=y 280 + # CONFIG_IP_MULTICAST is not set 281 + # CONFIG_IP_ADVANCED_ROUTER is not set 282 + CONFIG_IP_FIB_HASH=y 283 + CONFIG_IP_PNP=y 284 + CONFIG_IP_PNP_DHCP=y 285 + # CONFIG_IP_PNP_BOOTP is not set 286 + # CONFIG_IP_PNP_RARP is not set 287 + # CONFIG_NET_IPIP is not set 288 + # CONFIG_NET_IPGRE is not set 289 + # CONFIG_SYN_COOKIES is not set 290 + # CONFIG_INET_AH is not set 291 + # CONFIG_INET_ESP is not set 292 + # CONFIG_INET_IPCOMP is not set 293 + # CONFIG_INET_XFRM_TUNNEL is not set 294 + CONFIG_INET_TUNNEL=y 295 + CONFIG_INET_XFRM_MODE_TRANSPORT=y 296 + CONFIG_INET_XFRM_MODE_TUNNEL=y 297 + CONFIG_INET_XFRM_MODE_BEET=y 298 + # CONFIG_INET_LRO is not set 299 + CONFIG_INET_DIAG=y 300 + CONFIG_INET_TCP_DIAG=y 301 + # CONFIG_TCP_CONG_ADVANCED is not set 302 + CONFIG_TCP_CONG_CUBIC=y 303 + CONFIG_DEFAULT_TCP_CONG="cubic" 304 + CONFIG_IPV6=y 305 + # CONFIG_IPV6_PRIVACY is not set 306 + # CONFIG_IPV6_ROUTER_PREF is not set 307 + # CONFIG_INET6_AH is not set 308 + # CONFIG_INET6_ESP is not set 309 + # CONFIG_INET6_IPCOMP is not set 310 + # CONFIG_INET6_XFRM_TUNNEL is not set 311 + # CONFIG_INET6_TUNNEL is not set 312 + CONFIG_INET6_XFRM_MODE_TRANSPORT=y 313 + CONFIG_INET6_XFRM_MODE_TUNNEL=y 314 + CONFIG_INET6_XFRM_MODE_BEET=y 315 + CONFIG_IPV6_SIT=y 316 + CONFIG_IPV6_NDISC_NODETYPE=y 317 + # CONFIG_IPV6_TUNNEL is not set 318 + # CONFIG_NETWORK_SECMARK is not set 319 + # CONFIG_NETFILTER is not set 320 + # CONFIG_ATM is not set 321 + # CONFIG_BRIDGE is not set 322 + # CONFIG_VLAN_8021Q is not set 323 + # CONFIG_DECNET is not set 324 + # CONFIG_LLC2 is not set 325 + # CONFIG_IPX is not set 326 + # CONFIG_ATALK is not set 327 + # CONFIG_NET_SCHED is not set 328 + 329 + # 330 + # Network testing 331 + # 332 + # CONFIG_NET_PKTGEN is not set 333 + # CONFIG_HAMRADIO is not set 334 + # CONFIG_CAN is not set 335 + # CONFIG_IRDA is not set 336 + # CONFIG_BT is not set 337 + # CONFIG_PHONET is not set 338 + CONFIG_WIRELESS=y 339 + # CONFIG_CFG80211 is not set 340 + CONFIG_WIRELESS_OLD_REGULATORY=y 341 + # CONFIG_WIRELESS_EXT is not set 342 + # CONFIG_MAC80211 is not set 343 + # CONFIG_IEEE80211 is not set 344 + # CONFIG_RFKILL is not set 345 + 346 + # 347 + # Device Drivers 348 + # 349 + 350 + # 351 + # Generic Driver Options 352 + # 353 + CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 354 + CONFIG_STANDALONE=y 355 + # CONFIG_PREVENT_FIRMWARE_BUILD is not set 356 + CONFIG_FW_LOADER=y 357 + # CONFIG_FIRMWARE_IN_KERNEL is not set 358 + CONFIG_EXTRA_FIRMWARE="" 359 + # CONFIG_SYS_HYPERVISOR is not set 360 + # CONFIG_CONNECTOR is not set 361 + # CONFIG_MTD is not set 362 + # CONFIG_PARPORT is not set 363 + # CONFIG_BLK_DEV is not set 364 + # CONFIG_MISC_DEVICES is not set 365 + CONFIG_HAVE_IDE=y 366 + # CONFIG_IDE is not set 367 + 368 + # 369 + # SCSI device support 370 + # 371 + # CONFIG_RAID_ATTRS is not set 372 + # CONFIG_SCSI is not set 373 + # CONFIG_SCSI_DMA is not set 374 + # CONFIG_SCSI_NETLINK is not set 375 + # CONFIG_ATA is not set 376 + # CONFIG_MD is not set 377 + CONFIG_NETDEVICES=y 378 + # CONFIG_DUMMY is not set 379 + # CONFIG_BONDING is not set 380 + # CONFIG_EQUALIZER is not set 381 + # CONFIG_TUN is not set 382 + # CONFIG_VETH is not set 383 + # CONFIG_PHYLIB is not set 384 + CONFIG_NET_ETHERNET=y 385 + # CONFIG_MII is not set 386 + # CONFIG_AX88796 is not set 387 + # CONFIG_SMC91X is not set 388 + # CONFIG_DM9000 is not set 389 + # CONFIG_SMC911X is not set 390 + # CONFIG_IBM_NEW_EMAC_ZMII is not set 391 + # CONFIG_IBM_NEW_EMAC_RGMII is not set 392 + # CONFIG_IBM_NEW_EMAC_TAH is not set 393 + # CONFIG_IBM_NEW_EMAC_EMAC4 is not set 394 + # CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set 395 + # CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 396 + # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 397 + # CONFIG_B44 is not set 398 + CONFIG_NETDEV_1000=y 399 + CONFIG_NETDEV_10000=y 400 + 401 + # 402 + # Wireless LAN 403 + # 404 + # CONFIG_WLAN_PRE80211 is not set 405 + # CONFIG_WLAN_80211 is not set 406 + # CONFIG_IWLWIFI_LEDS is not set 407 + # CONFIG_WAN is not set 408 + # CONFIG_PPP is not set 409 + # CONFIG_SLIP is not set 410 + # CONFIG_NETPOLL is not set 411 + # CONFIG_NET_POLL_CONTROLLER is not set 412 + # CONFIG_ISDN is not set 413 + 414 + # 415 + # Input device support 416 + # 417 + CONFIG_INPUT=y 418 + # CONFIG_INPUT_FF_MEMLESS is not set 419 + # CONFIG_INPUT_POLLDEV is not set 420 + 421 + # 422 + # Userland interfaces 423 + # 424 + CONFIG_INPUT_MOUSEDEV=y 425 + # CONFIG_INPUT_MOUSEDEV_PSAUX is not set 426 + CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 427 + CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 428 + # CONFIG_INPUT_JOYDEV is not set 429 + # CONFIG_INPUT_EVDEV is not set 430 + # CONFIG_INPUT_EVBUG is not set 431 + 432 + # 433 + # Input Device Drivers 434 + # 435 + # CONFIG_INPUT_KEYBOARD is not set 436 + # CONFIG_INPUT_MOUSE is not set 437 + # CONFIG_INPUT_JOYSTICK is not set 438 + # CONFIG_INPUT_TABLET is not set 439 + # CONFIG_INPUT_TOUCHSCREEN is not set 440 + # CONFIG_INPUT_MISC is not set 441 + 442 + # 443 + # Hardware I/O ports 444 + # 445 + # CONFIG_SERIO is not set 446 + # CONFIG_GAMEPORT is not set 447 + 448 + # 449 + # Character devices 450 + # 451 + CONFIG_VT=y 452 + CONFIG_CONSOLE_TRANSLATIONS=y 453 + CONFIG_VT_CONSOLE=y 454 + CONFIG_HW_CONSOLE=y 455 + # CONFIG_VT_HW_CONSOLE_BINDING is not set 456 + # CONFIG_DEVKMEM is not set 457 + # CONFIG_SERIAL_NONSTANDARD is not set 458 + 459 + # 460 + # Serial drivers 461 + # 462 + # CONFIG_SERIAL_8250 is not set 463 + 464 + # 465 + # Non-8250 serial port support 466 + # 467 + CONFIG_SERIAL_IMX=y 468 + CONFIG_SERIAL_IMX_CONSOLE=y 469 + CONFIG_SERIAL_CORE=y 470 + CONFIG_SERIAL_CORE_CONSOLE=y 471 + CONFIG_UNIX98_PTYS=y 472 + # CONFIG_LEGACY_PTYS is not set 473 + # CONFIG_IPMI_HANDLER is not set 474 + # CONFIG_HW_RANDOM is not set 475 + # CONFIG_NVRAM is not set 476 + # CONFIG_R3964 is not set 477 + # CONFIG_RAW_DRIVER is not set 478 + # CONFIG_I2C is not set 479 + # CONFIG_SPI is not set 480 + CONFIG_ARCH_REQUIRE_GPIOLIB=y 481 + CONFIG_GPIOLIB=y 482 + 483 + # 484 + # I2C GPIO expanders: 485 + # 486 + 487 + # 488 + # PCI GPIO expanders: 489 + # 490 + 491 + # 492 + # SPI GPIO expanders: 493 + # 494 + # CONFIG_W1 is not set 495 + # CONFIG_POWER_SUPPLY is not set 496 + # CONFIG_HWMON is not set 497 + # CONFIG_THERMAL is not set 498 + # CONFIG_THERMAL_HWMON is not set 499 + # CONFIG_WATCHDOG is not set 500 + 501 + # 502 + # Sonics Silicon Backplane 503 + # 504 + CONFIG_SSB_POSSIBLE=y 505 + # CONFIG_SSB is not set 506 + 507 + # 508 + # Multifunction device drivers 509 + # 510 + # CONFIG_MFD_CORE is not set 511 + # CONFIG_MFD_SM501 is not set 512 + # CONFIG_MFD_ASIC3 is not set 513 + # CONFIG_HTC_EGPIO is not set 514 + # CONFIG_HTC_PASIC3 is not set 515 + # CONFIG_MFD_TMIO is not set 516 + # CONFIG_MFD_T7L66XB is not set 517 + # CONFIG_MFD_TC6387XB is not set 518 + # CONFIG_MFD_TC6393XB is not set 519 + # CONFIG_MFD_WM8400 is not set 520 + 521 + # 522 + # Multimedia devices 523 + # 524 + 525 + # 526 + # Multimedia core support 527 + # 528 + # CONFIG_VIDEO_DEV is not set 529 + # CONFIG_DVB_CORE is not set 530 + # CONFIG_VIDEO_MEDIA is not set 531 + 532 + # 533 + # Multimedia drivers 534 + # 535 + # CONFIG_DAB is not set 536 + 537 + # 538 + # Graphics support 539 + # 540 + # CONFIG_VGASTATE is not set 541 + # CONFIG_VIDEO_OUTPUT_CONTROL is not set 542 + # CONFIG_FB is not set 543 + # CONFIG_BACKLIGHT_LCD_SUPPORT is not set 544 + 545 + # 546 + # Display device support 547 + # 548 + # CONFIG_DISPLAY_SUPPORT is not set 549 + 550 + # 551 + # Console display driver support 552 + # 553 + # CONFIG_VGA_CONSOLE is not set 554 + CONFIG_DUMMY_CONSOLE=y 555 + # CONFIG_SOUND is not set 556 + # CONFIG_HID_SUPPORT is not set 557 + # CONFIG_USB_SUPPORT is not set 558 + # CONFIG_MMC is not set 559 + # CONFIG_MEMSTICK is not set 560 + # CONFIG_ACCESSIBILITY is not set 561 + # CONFIG_NEW_LEDS is not set 562 + CONFIG_RTC_LIB=y 563 + # CONFIG_RTC_CLASS is not set 564 + # CONFIG_DMADEVICES is not set 565 + 566 + # 567 + # Voltage and Current regulators 568 + # 569 + # CONFIG_REGULATOR is not set 570 + # CONFIG_REGULATOR_FIXED_VOLTAGE is not set 571 + # CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set 572 + # CONFIG_REGULATOR_BQ24022 is not set 573 + # CONFIG_UIO is not set 574 + 575 + # 576 + # File systems 577 + # 578 + # CONFIG_EXT2_FS is not set 579 + # CONFIG_EXT3_FS is not set 580 + # CONFIG_EXT4_FS is not set 581 + # CONFIG_REISERFS_FS is not set 582 + # CONFIG_JFS_FS is not set 583 + # CONFIG_FS_POSIX_ACL is not set 584 + CONFIG_FILE_LOCKING=y 585 + # CONFIG_XFS_FS is not set 586 + # CONFIG_OCFS2_FS is not set 587 + # CONFIG_DNOTIFY is not set 588 + # CONFIG_INOTIFY is not set 589 + # CONFIG_QUOTA is not set 590 + # CONFIG_AUTOFS_FS is not set 591 + # CONFIG_AUTOFS4_FS is not set 592 + # CONFIG_FUSE_FS is not set 593 + 594 + # 595 + # CD-ROM/DVD Filesystems 596 + # 597 + # CONFIG_ISO9660_FS is not set 598 + # CONFIG_UDF_FS is not set 599 + 600 + # 601 + # DOS/FAT/NT Filesystems 602 + # 603 + # CONFIG_MSDOS_FS is not set 604 + # CONFIG_VFAT_FS is not set 605 + # CONFIG_NTFS_FS is not set 606 + 607 + # 608 + # Pseudo filesystems 609 + # 610 + CONFIG_PROC_FS=y 611 + CONFIG_PROC_SYSCTL=y 612 + CONFIG_PROC_PAGE_MONITOR=y 613 + CONFIG_SYSFS=y 614 + # CONFIG_TMPFS is not set 615 + # CONFIG_HUGETLB_PAGE is not set 616 + # CONFIG_CONFIGFS_FS is not set 617 + 618 + # 619 + # Miscellaneous filesystems 620 + # 621 + # CONFIG_HFSPLUS_FS is not set 622 + # CONFIG_CRAMFS is not set 623 + # CONFIG_VXFS_FS is not set 624 + # CONFIG_MINIX_FS is not set 625 + # CONFIG_OMFS_FS is not set 626 + # CONFIG_HPFS_FS is not set 627 + # CONFIG_QNX4FS_FS is not set 628 + # CONFIG_ROMFS_FS is not set 629 + # CONFIG_SYSV_FS is not set 630 + # CONFIG_UFS_FS is not set 631 + CONFIG_NETWORK_FILESYSTEMS=y 632 + # CONFIG_NFS_FS is not set 633 + # CONFIG_NFSD is not set 634 + # CONFIG_SMB_FS is not set 635 + # CONFIG_CIFS is not set 636 + # CONFIG_NCP_FS is not set 637 + # CONFIG_CODA_FS is not set 638 + 639 + # 640 + # Partition Types 641 + # 642 + # CONFIG_PARTITION_ADVANCED is not set 643 + CONFIG_MSDOS_PARTITION=y 644 + # CONFIG_NLS is not set 645 + 646 + # 647 + # Kernel hacking 648 + # 649 + # CONFIG_PRINTK_TIME is not set 650 + # CONFIG_ENABLE_WARN_DEPRECATED is not set 651 + # CONFIG_ENABLE_MUST_CHECK is not set 652 + CONFIG_FRAME_WARN=1024 653 + # CONFIG_MAGIC_SYSRQ is not set 654 + # CONFIG_UNUSED_SYMBOLS is not set 655 + # CONFIG_DEBUG_FS is not set 656 + # CONFIG_HEADERS_CHECK is not set 657 + # CONFIG_DEBUG_KERNEL is not set 658 + # CONFIG_SLUB_DEBUG_ON is not set 659 + # CONFIG_SLUB_STATS is not set 660 + CONFIG_DEBUG_BUGVERBOSE=y 661 + CONFIG_DEBUG_MEMORY_INIT=y 662 + CONFIG_FRAME_POINTER=y 663 + # CONFIG_RCU_CPU_STALL_DETECTOR is not set 664 + # CONFIG_LATENCYTOP is not set 665 + # CONFIG_SYSCTL_SYSCALL_CHECK is not set 666 + CONFIG_NOP_TRACER=y 667 + CONFIG_HAVE_FTRACE=y 668 + CONFIG_HAVE_DYNAMIC_FTRACE=y 669 + # CONFIG_DYNAMIC_PRINTK_DEBUG is not set 670 + # CONFIG_SAMPLES is not set 671 + CONFIG_HAVE_ARCH_KGDB=y 672 + # CONFIG_DEBUG_USER is not set 673 + 674 + # 675 + # Security options 676 + # 677 + # CONFIG_KEYS is not set 678 + # CONFIG_SECURITY is not set 679 + # CONFIG_SECURITYFS is not set 680 + # CONFIG_SECURITY_FILE_CAPABILITIES is not set 681 + CONFIG_CRYPTO=y 682 + 683 + # 684 + # Crypto core or helper 685 + # 686 + # CONFIG_CRYPTO_FIPS is not set 687 + # CONFIG_CRYPTO_MANAGER is not set 688 + # CONFIG_CRYPTO_NULL is not set 689 + # CONFIG_CRYPTO_CRYPTD is not set 690 + # CONFIG_CRYPTO_AUTHENC is not set 691 + 692 + # 693 + # Authenticated Encryption with Associated Data 694 + # 695 + # CONFIG_CRYPTO_CCM is not set 696 + # CONFIG_CRYPTO_GCM is not set 697 + # CONFIG_CRYPTO_SEQIV is not set 698 + 699 + # 700 + # Block modes 701 + # 702 + # CONFIG_CRYPTO_CBC is not set 703 + # CONFIG_CRYPTO_CTR is not set 704 + # CONFIG_CRYPTO_CTS is not set 705 + # CONFIG_CRYPTO_ECB is not set 706 + # CONFIG_CRYPTO_PCBC is not set 707 + 708 + # 709 + # Hash modes 710 + # 711 + # CONFIG_CRYPTO_HMAC is not set 712 + 713 + # 714 + # Digest 715 + # 716 + # CONFIG_CRYPTO_CRC32C is not set 717 + # CONFIG_CRYPTO_MD4 is not set 718 + # CONFIG_CRYPTO_MD5 is not set 719 + # CONFIG_CRYPTO_MICHAEL_MIC is not set 720 + # CONFIG_CRYPTO_RMD128 is not set 721 + # CONFIG_CRYPTO_RMD160 is not set 722 + # CONFIG_CRYPTO_RMD256 is not set 723 + # CONFIG_CRYPTO_RMD320 is not set 724 + # CONFIG_CRYPTO_SHA1 is not set 725 + # CONFIG_CRYPTO_SHA256 is not set 726 + # CONFIG_CRYPTO_SHA512 is not set 727 + # CONFIG_CRYPTO_TGR192 is not set 728 + # CONFIG_CRYPTO_WP512 is not set 729 + 730 + # 731 + # Ciphers 732 + # 733 + # CONFIG_CRYPTO_AES is not set 734 + # CONFIG_CRYPTO_ANUBIS is not set 735 + # CONFIG_CRYPTO_ARC4 is not set 736 + # CONFIG_CRYPTO_BLOWFISH is not set 737 + # CONFIG_CRYPTO_CAMELLIA is not set 738 + # CONFIG_CRYPTO_CAST5 is not set 739 + # CONFIG_CRYPTO_CAST6 is not set 740 + # CONFIG_CRYPTO_DES is not set 741 + # CONFIG_CRYPTO_FCRYPT is not set 742 + # CONFIG_CRYPTO_KHAZAD is not set 743 + # CONFIG_CRYPTO_SEED is not set 744 + # CONFIG_CRYPTO_SERPENT is not set 745 + # CONFIG_CRYPTO_TEA is not set 746 + # CONFIG_CRYPTO_TWOFISH is not set 747 + 748 + # 749 + # Compression 750 + # 751 + # CONFIG_CRYPTO_DEFLATE is not set 752 + # CONFIG_CRYPTO_LZO is not set 753 + 754 + # 755 + # Random Number Generation 756 + # 757 + # CONFIG_CRYPTO_ANSI_CPRNG is not set 758 + CONFIG_CRYPTO_HW=y 759 + 760 + # 761 + # Library routines 762 + # 763 + # CONFIG_CRC_CCITT is not set 764 + # CONFIG_CRC16 is not set 765 + # CONFIG_CRC_T10DIF is not set 766 + # CONFIG_CRC_ITU_T is not set 767 + # CONFIG_CRC32 is not set 768 + # CONFIG_CRC7 is not set 769 + # CONFIG_LIBCRC32C is not set 770 + CONFIG_PLIST=y 771 + CONFIG_HAS_IOMEM=y 772 + CONFIG_HAS_IOPORT=y 773 + CONFIG_HAS_DMA=y
+14
arch/arm/mach-mx1/Kconfig
··· 1 + if ARCH_MX1 2 + 3 + comment "MX1 Platforms" 4 + 5 + config MACH_MXLADS 6 + bool 7 + 8 + config ARCH_MX1ADS 9 + bool "MX1ADS platform" 10 + select MACH_MXLADS 11 + help 12 + Say Y here if you are using Motorola MX1ADS/MXLADS boards 13 + 14 + endif
+10
arch/arm/mach-mx1/Makefile
··· 1 + # 2 + # Makefile for the linux kernel. 3 + # 4 + 5 + # Object file lists. 6 + 7 + obj-y += generic.o clock.o devices.o 8 + 9 + # Specific board support 10 + obj-$(CONFIG_ARCH_MX1ADS) += mx1ads.o
+4
arch/arm/mach-mx1/Makefile.boot
··· 1 + zreladdr-y := 0x08008000 2 + params_phys-y := 0x08000100 3 + initrd_phys-y := 0x08800000 4 +
+656
arch/arm/mach-mx1/clock.c
··· 1 + /* 2 + * Copyright (C) 2008 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix 3 + * 4 + * This program is free software; you can redistribute it and/or modify 5 + * it under the terms of the GNU General Public License as published by 6 + * the Free Software Foundation; either version 2 of the License, or 7 + * (at your option) any later version. 8 + * 9 + * This program is distributed in the hope that it will be useful, 10 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 + * GNU General Public License for more details. 13 + * 14 + * You should have received a copy of the GNU General Public License 15 + * along with this program; if not, write to the Free Software 16 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 + */ 18 + 19 + #include <linux/kernel.h> 20 + #include <linux/init.h> 21 + #include <linux/math64.h> 22 + #include <linux/err.h> 23 + #include <linux/clk.h> 24 + #include <linux/io.h> 25 + 26 + #include <mach/clock.h> 27 + #include <mach/hardware.h> 28 + #include "crm_regs.h" 29 + 30 + static int _clk_enable(struct clk *clk) 31 + { 32 + unsigned int reg; 33 + 34 + reg = __raw_readl(clk->enable_reg); 35 + reg |= 1 << clk->enable_shift; 36 + __raw_writel(reg, clk->enable_reg); 37 + 38 + return 0; 39 + } 40 + 41 + static void _clk_disable(struct clk *clk) 42 + { 43 + unsigned int reg; 44 + 45 + reg = __raw_readl(clk->enable_reg); 46 + reg &= ~(1 << clk->enable_shift); 47 + __raw_writel(reg, clk->enable_reg); 48 + } 49 + 50 + static int _clk_can_use_parent(const struct clk *clk_arr[], unsigned int size, 51 + struct clk *parent) 52 + { 53 + int i; 54 + 55 + for (i = 0; i < size; i++) 56 + if (parent == clk_arr[i]) 57 + return i; 58 + 59 + return -EINVAL; 60 + } 61 + 62 + static unsigned long 63 + _clk_simple_round_rate(struct clk *clk, unsigned long rate, unsigned int limit) 64 + { 65 + int div; 66 + unsigned long parent_rate; 67 + 68 + parent_rate = clk_get_rate(clk->parent); 69 + 70 + div = parent_rate / rate; 71 + if (parent_rate % rate) 72 + div++; 73 + 74 + if (div > limit) 75 + div = limit; 76 + 77 + return parent_rate / div; 78 + } 79 + 80 + static unsigned long _clk_parent_round_rate(struct clk *clk, unsigned long rate) 81 + { 82 + return clk->parent->round_rate(clk->parent, rate); 83 + } 84 + 85 + static int _clk_parent_set_rate(struct clk *clk, unsigned long rate) 86 + { 87 + return clk->parent->set_rate(clk->parent, rate); 88 + } 89 + 90 + /* 91 + * get the system pll clock in Hz 92 + * 93 + * mfi + mfn / (mfd +1) 94 + * f = 2 * f_ref * -------------------- 95 + * pd + 1 96 + */ 97 + static unsigned long mx1_decode_pll(unsigned int pll, u32 f_ref) 98 + { 99 + unsigned long long ll; 100 + unsigned long quot; 101 + 102 + u32 mfi = (pll >> 10) & 0xf; 103 + u32 mfn = pll & 0x3ff; 104 + u32 mfd = (pll >> 16) & 0x3ff; 105 + u32 pd = (pll >> 26) & 0xf; 106 + 107 + mfi = mfi <= 5 ? 5 : mfi; 108 + 109 + ll = 2 * (unsigned long long)f_ref * 110 + ((mfi << 16) + (mfn << 16) / (mfd + 1)); 111 + quot = (pd + 1) * (1 << 16); 112 + ll += quot / 2; 113 + do_div(ll, quot); 114 + return (unsigned long)ll; 115 + } 116 + 117 + static unsigned long clk16m_get_rate(struct clk *clk) 118 + { 119 + return 16000000; 120 + } 121 + 122 + static struct clk clk16m = { 123 + .name = "CLK16M", 124 + .get_rate = clk16m_get_rate, 125 + .enable = _clk_enable, 126 + .enable_reg = CCM_CSCR, 127 + .enable_shift = CCM_CSCR_OSC_EN_SHIFT, 128 + .disable = _clk_disable, 129 + }; 130 + 131 + /* in Hz */ 132 + static unsigned long clk32_rate; 133 + 134 + static unsigned long clk32_get_rate(struct clk *clk) 135 + { 136 + return clk32_rate; 137 + } 138 + 139 + static struct clk clk32 = { 140 + .name = "CLK32", 141 + .get_rate = clk32_get_rate, 142 + }; 143 + 144 + static unsigned long clk32_premult_get_rate(struct clk *clk) 145 + { 146 + return clk_get_rate(clk->parent) * 512; 147 + } 148 + 149 + static struct clk clk32_premult = { 150 + .name = "CLK32_premultiplier", 151 + .parent = &clk32, 152 + .get_rate = clk32_premult_get_rate, 153 + }; 154 + 155 + static const struct clk *prem_clk_clocks[] = { 156 + &clk32_premult, 157 + &clk16m, 158 + }; 159 + 160 + static int prem_clk_set_parent(struct clk *clk, struct clk *parent) 161 + { 162 + int i; 163 + unsigned int reg = __raw_readl(CCM_CSCR); 164 + 165 + i = _clk_can_use_parent(prem_clk_clocks, ARRAY_SIZE(prem_clk_clocks), 166 + parent); 167 + 168 + switch (i) { 169 + case 0: 170 + reg &= ~CCM_CSCR_SYSTEM_SEL; 171 + break; 172 + case 1: 173 + reg |= CCM_CSCR_SYSTEM_SEL; 174 + break; 175 + default: 176 + return i; 177 + } 178 + 179 + __raw_writel(reg, CCM_CSCR); 180 + 181 + return 0; 182 + } 183 + 184 + static struct clk prem_clk = { 185 + .name = "prem_clk", 186 + .set_parent = prem_clk_set_parent, 187 + }; 188 + 189 + static unsigned long system_clk_get_rate(struct clk *clk) 190 + { 191 + return mx1_decode_pll(__raw_readl(CCM_SPCTL0), 192 + clk_get_rate(clk->parent)); 193 + } 194 + 195 + static struct clk system_clk = { 196 + .name = "system_clk", 197 + .parent = &prem_clk, 198 + .get_rate = system_clk_get_rate, 199 + }; 200 + 201 + static unsigned long mcu_clk_get_rate(struct clk *clk) 202 + { 203 + return mx1_decode_pll(__raw_readl(CCM_MPCTL0), 204 + clk_get_rate(clk->parent)); 205 + } 206 + 207 + static struct clk mcu_clk = { 208 + .name = "mcu_clk", 209 + .parent = &clk32_premult, 210 + .get_rate = mcu_clk_get_rate, 211 + }; 212 + 213 + static unsigned long fclk_get_rate(struct clk *clk) 214 + { 215 + unsigned long fclk = clk_get_rate(clk->parent); 216 + 217 + if (__raw_readl(CCM_CSCR) & CCM_CSCR_PRESC) 218 + fclk /= 2; 219 + 220 + return fclk; 221 + } 222 + 223 + static struct clk fclk = { 224 + .name = "fclk", 225 + .parent = &mcu_clk, 226 + .get_rate = fclk_get_rate, 227 + }; 228 + 229 + /* 230 + * get hclk ( SDRAM, CSI, Memory Stick, I2C, DMA ) 231 + */ 232 + static unsigned long hclk_get_rate(struct clk *clk) 233 + { 234 + return clk_get_rate(clk->parent) / (((__raw_readl(CCM_CSCR) & 235 + CCM_CSCR_BCLK_MASK) >> CCM_CSCR_BCLK_OFFSET) + 1); 236 + } 237 + 238 + static unsigned long hclk_round_rate(struct clk *clk, unsigned long rate) 239 + { 240 + return _clk_simple_round_rate(clk, rate, 16); 241 + } 242 + 243 + static int hclk_set_rate(struct clk *clk, unsigned long rate) 244 + { 245 + unsigned int div; 246 + unsigned int reg; 247 + unsigned long parent_rate; 248 + 249 + parent_rate = clk_get_rate(clk->parent); 250 + 251 + div = parent_rate / rate; 252 + 253 + if (div > 16 || div < 1 || ((parent_rate / div) != rate)) 254 + return -EINVAL; 255 + 256 + div--; 257 + 258 + reg = __raw_readl(CCM_CSCR); 259 + reg &= ~CCM_CSCR_BCLK_MASK; 260 + reg |= div << CCM_CSCR_BCLK_OFFSET; 261 + __raw_writel(reg, CCM_CSCR); 262 + 263 + return 0; 264 + } 265 + 266 + static struct clk hclk = { 267 + .name = "hclk", 268 + .parent = &system_clk, 269 + .get_rate = hclk_get_rate, 270 + .round_rate = hclk_round_rate, 271 + .set_rate = hclk_set_rate, 272 + }; 273 + 274 + static unsigned long clk48m_get_rate(struct clk *clk) 275 + { 276 + return clk_get_rate(clk->parent) / (((__raw_readl(CCM_CSCR) & 277 + CCM_CSCR_USB_MASK) >> CCM_CSCR_USB_OFFSET) + 1); 278 + } 279 + 280 + static unsigned long clk48m_round_rate(struct clk *clk, unsigned long rate) 281 + { 282 + return _clk_simple_round_rate(clk, rate, 8); 283 + } 284 + 285 + static int clk48m_set_rate(struct clk *clk, unsigned long rate) 286 + { 287 + unsigned int div; 288 + unsigned int reg; 289 + unsigned long parent_rate; 290 + 291 + parent_rate = clk_get_rate(clk->parent); 292 + 293 + div = parent_rate / rate; 294 + 295 + if (div > 8 || div < 1 || ((parent_rate / div) != rate)) 296 + return -EINVAL; 297 + 298 + div--; 299 + 300 + reg = __raw_readl(CCM_CSCR); 301 + reg &= ~CCM_CSCR_USB_MASK; 302 + reg |= div << CCM_CSCR_USB_OFFSET; 303 + __raw_writel(reg, CCM_CSCR); 304 + 305 + return 0; 306 + } 307 + 308 + static struct clk clk48m = { 309 + .name = "CLK48M", 310 + .parent = &system_clk, 311 + .get_rate = clk48m_get_rate, 312 + .round_rate = clk48m_round_rate, 313 + .set_rate = clk48m_set_rate, 314 + }; 315 + 316 + /* 317 + * get peripheral clock 1 ( UART[12], Timer[12], PWM ) 318 + */ 319 + static unsigned long perclk1_get_rate(struct clk *clk) 320 + { 321 + return clk_get_rate(clk->parent) / (((__raw_readl(CCM_PCDR) & 322 + CCM_PCDR_PCLK1_MASK) >> CCM_PCDR_PCLK1_OFFSET) + 1); 323 + } 324 + 325 + static unsigned long perclk1_round_rate(struct clk *clk, unsigned long rate) 326 + { 327 + return _clk_simple_round_rate(clk, rate, 16); 328 + } 329 + 330 + static int perclk1_set_rate(struct clk *clk, unsigned long rate) 331 + { 332 + unsigned int div; 333 + unsigned int reg; 334 + unsigned long parent_rate; 335 + 336 + parent_rate = clk_get_rate(clk->parent); 337 + 338 + div = parent_rate / rate; 339 + 340 + if (div > 16 || div < 1 || ((parent_rate / div) != rate)) 341 + return -EINVAL; 342 + 343 + div--; 344 + 345 + reg = __raw_readl(CCM_PCDR); 346 + reg &= ~CCM_PCDR_PCLK1_MASK; 347 + reg |= div << CCM_PCDR_PCLK1_OFFSET; 348 + __raw_writel(reg, CCM_PCDR); 349 + 350 + return 0; 351 + } 352 + 353 + /* 354 + * get peripheral clock 2 ( LCD, SD, SPI[12] ) 355 + */ 356 + static unsigned long perclk2_get_rate(struct clk *clk) 357 + { 358 + return clk_get_rate(clk->parent) / (((__raw_readl(CCM_PCDR) & 359 + CCM_PCDR_PCLK2_MASK) >> CCM_PCDR_PCLK2_OFFSET) + 1); 360 + } 361 + 362 + static unsigned long perclk2_round_rate(struct clk *clk, unsigned long rate) 363 + { 364 + return _clk_simple_round_rate(clk, rate, 16); 365 + } 366 + 367 + static int perclk2_set_rate(struct clk *clk, unsigned long rate) 368 + { 369 + unsigned int div; 370 + unsigned int reg; 371 + unsigned long parent_rate; 372 + 373 + parent_rate = clk_get_rate(clk->parent); 374 + 375 + div = parent_rate / rate; 376 + 377 + if (div > 16 || div < 1 || ((parent_rate / div) != rate)) 378 + return -EINVAL; 379 + 380 + div--; 381 + 382 + reg = __raw_readl(CCM_PCDR); 383 + reg &= ~CCM_PCDR_PCLK2_MASK; 384 + reg |= div << CCM_PCDR_PCLK2_OFFSET; 385 + __raw_writel(reg, CCM_PCDR); 386 + 387 + return 0; 388 + } 389 + 390 + /* 391 + * get peripheral clock 3 ( SSI ) 392 + */ 393 + static unsigned long perclk3_get_rate(struct clk *clk) 394 + { 395 + return clk_get_rate(clk->parent) / (((__raw_readl(CCM_PCDR) & 396 + CCM_PCDR_PCLK3_MASK) >> CCM_PCDR_PCLK3_OFFSET) + 1); 397 + } 398 + 399 + static unsigned long perclk3_round_rate(struct clk *clk, unsigned long rate) 400 + { 401 + return _clk_simple_round_rate(clk, rate, 128); 402 + } 403 + 404 + static int perclk3_set_rate(struct clk *clk, unsigned long rate) 405 + { 406 + unsigned int div; 407 + unsigned int reg; 408 + unsigned long parent_rate; 409 + 410 + parent_rate = clk_get_rate(clk->parent); 411 + 412 + div = parent_rate / rate; 413 + 414 + if (div > 128 || div < 1 || ((parent_rate / div) != rate)) 415 + return -EINVAL; 416 + 417 + div--; 418 + 419 + reg = __raw_readl(CCM_PCDR); 420 + reg &= ~CCM_PCDR_PCLK3_MASK; 421 + reg |= div << CCM_PCDR_PCLK3_OFFSET; 422 + __raw_writel(reg, CCM_PCDR); 423 + 424 + return 0; 425 + } 426 + 427 + static struct clk perclk[] = { 428 + { 429 + .name = "perclk", 430 + .id = 0, 431 + .parent = &system_clk, 432 + .get_rate = perclk1_get_rate, 433 + .round_rate = perclk1_round_rate, 434 + .set_rate = perclk1_set_rate, 435 + }, { 436 + .name = "perclk", 437 + .id = 1, 438 + .parent = &system_clk, 439 + .get_rate = perclk2_get_rate, 440 + .round_rate = perclk2_round_rate, 441 + .set_rate = perclk2_set_rate, 442 + }, { 443 + .name = "perclk", 444 + .id = 2, 445 + .parent = &system_clk, 446 + .get_rate = perclk3_get_rate, 447 + .round_rate = perclk3_round_rate, 448 + .set_rate = perclk3_set_rate, 449 + } 450 + }; 451 + 452 + static const struct clk *clko_clocks[] = { 453 + &perclk[0], 454 + &hclk, 455 + &clk48m, 456 + &clk16m, 457 + &prem_clk, 458 + &fclk, 459 + }; 460 + 461 + static int clko_set_parent(struct clk *clk, struct clk *parent) 462 + { 463 + int i; 464 + unsigned int reg; 465 + 466 + i = _clk_can_use_parent(clko_clocks, ARRAY_SIZE(clko_clocks), parent); 467 + if (i < 0) 468 + return i; 469 + 470 + reg = __raw_readl(CCM_CSCR) & ~CCM_CSCR_CLKO_MASK; 471 + reg |= i << CCM_CSCR_CLKO_OFFSET; 472 + __raw_writel(reg, CCM_CSCR); 473 + 474 + if (clko_clocks[i]->set_rate && clko_clocks[i]->round_rate) { 475 + clk->set_rate = _clk_parent_set_rate; 476 + clk->round_rate = _clk_parent_round_rate; 477 + } else { 478 + clk->set_rate = NULL; 479 + clk->round_rate = NULL; 480 + } 481 + 482 + return 0; 483 + } 484 + 485 + static struct clk clko_clk = { 486 + .name = "clko_clk", 487 + .set_parent = clko_set_parent, 488 + }; 489 + 490 + static struct clk dma_clk = { 491 + .name = "dma_clk", 492 + .parent = &hclk, 493 + .round_rate = _clk_parent_round_rate, 494 + .set_rate = _clk_parent_set_rate, 495 + .enable = _clk_enable, 496 + .enable_reg = SCM_GCCR, 497 + .enable_shift = SCM_GCCR_DMA_CLK_EN_OFFSET, 498 + .disable = _clk_disable, 499 + }; 500 + 501 + static struct clk csi_clk = { 502 + .name = "csi_clk", 503 + .parent = &hclk, 504 + .round_rate = _clk_parent_round_rate, 505 + .set_rate = _clk_parent_set_rate, 506 + .enable = _clk_enable, 507 + .enable_reg = SCM_GCCR, 508 + .enable_shift = SCM_GCCR_CSI_CLK_EN_OFFSET, 509 + .disable = _clk_disable, 510 + }; 511 + 512 + static struct clk mma_clk = { 513 + .name = "mma_clk", 514 + .parent = &hclk, 515 + .round_rate = _clk_parent_round_rate, 516 + .set_rate = _clk_parent_set_rate, 517 + .enable = _clk_enable, 518 + .enable_reg = SCM_GCCR, 519 + .enable_shift = SCM_GCCR_MMA_CLK_EN_OFFSET, 520 + .disable = _clk_disable, 521 + }; 522 + 523 + static struct clk usbd_clk = { 524 + .name = "usbd_clk", 525 + .parent = &clk48m, 526 + .round_rate = _clk_parent_round_rate, 527 + .set_rate = _clk_parent_set_rate, 528 + .enable = _clk_enable, 529 + .enable_reg = SCM_GCCR, 530 + .enable_shift = SCM_GCCR_USBD_CLK_EN_OFFSET, 531 + .disable = _clk_disable, 532 + }; 533 + 534 + static struct clk gpt_clk = { 535 + .name = "gpt_clk", 536 + .parent = &perclk[0], 537 + .round_rate = _clk_parent_round_rate, 538 + .set_rate = _clk_parent_set_rate, 539 + }; 540 + 541 + static struct clk uart_clk = { 542 + .name = "uart_clk", 543 + .parent = &perclk[0], 544 + .round_rate = _clk_parent_round_rate, 545 + .set_rate = _clk_parent_set_rate, 546 + }; 547 + 548 + static struct clk i2c_clk = { 549 + .name = "i2c_clk", 550 + .parent = &hclk, 551 + .round_rate = _clk_parent_round_rate, 552 + .set_rate = _clk_parent_set_rate, 553 + }; 554 + 555 + static struct clk spi_clk = { 556 + .name = "spi_clk", 557 + .parent = &perclk[1], 558 + .round_rate = _clk_parent_round_rate, 559 + .set_rate = _clk_parent_set_rate, 560 + }; 561 + 562 + static struct clk sdhc_clk = { 563 + .name = "sdhc_clk", 564 + .parent = &perclk[1], 565 + .round_rate = _clk_parent_round_rate, 566 + .set_rate = _clk_parent_set_rate, 567 + }; 568 + 569 + static struct clk lcdc_clk = { 570 + .name = "lcdc_clk", 571 + .parent = &perclk[1], 572 + .round_rate = _clk_parent_round_rate, 573 + .set_rate = _clk_parent_set_rate, 574 + }; 575 + 576 + static struct clk mshc_clk = { 577 + .name = "mshc_clk", 578 + .parent = &hclk, 579 + .round_rate = _clk_parent_round_rate, 580 + .set_rate = _clk_parent_set_rate, 581 + }; 582 + 583 + static struct clk ssi_clk = { 584 + .name = "ssi_clk", 585 + .parent = &perclk[2], 586 + .round_rate = _clk_parent_round_rate, 587 + .set_rate = _clk_parent_set_rate, 588 + }; 589 + 590 + static struct clk rtc_clk = { 591 + .name = "rtc_clk", 592 + .parent = &clk32, 593 + }; 594 + 595 + static struct clk *mxc_clks[] = { 596 + &clk16m, 597 + &clk32, 598 + &clk32_premult, 599 + &prem_clk, 600 + &system_clk, 601 + &mcu_clk, 602 + &fclk, 603 + &hclk, 604 + &clk48m, 605 + &perclk[0], 606 + &perclk[1], 607 + &perclk[2], 608 + &clko_clk, 609 + &dma_clk, 610 + &csi_clk, 611 + &mma_clk, 612 + &usbd_clk, 613 + &gpt_clk, 614 + &uart_clk, 615 + &i2c_clk, 616 + &spi_clk, 617 + &sdhc_clk, 618 + &lcdc_clk, 619 + &mshc_clk, 620 + &ssi_clk, 621 + &rtc_clk, 622 + }; 623 + 624 + int __init mxc_clocks_init(unsigned long fref) 625 + { 626 + struct clk **clkp; 627 + unsigned int reg; 628 + 629 + /* disable clocks we are able to */ 630 + __raw_writel(0, SCM_GCCR); 631 + 632 + clk32_rate = fref; 633 + reg = __raw_readl(CCM_CSCR); 634 + 635 + /* detect clock reference for system PLL */ 636 + if (reg & CCM_CSCR_SYSTEM_SEL) { 637 + prem_clk.parent = &clk16m; 638 + } else { 639 + /* ensure that oscillator is disabled */ 640 + reg &= ~(1 << CCM_CSCR_OSC_EN_SHIFT); 641 + __raw_writel(reg, CCM_CSCR); 642 + prem_clk.parent = &clk32_premult; 643 + } 644 + 645 + /* detect reference for CLKO */ 646 + reg = (reg & CCM_CSCR_CLKO_MASK) >> CCM_CSCR_CLKO_OFFSET; 647 + clko_clk.parent = (struct clk *)clko_clocks[reg]; 648 + 649 + for (clkp = mxc_clks; clkp < mxc_clks + ARRAY_SIZE(mxc_clks); clkp++) 650 + clk_register(*clkp); 651 + 652 + clk_enable(&hclk); 653 + clk_enable(&fclk); 654 + 655 + return 0; 656 + }
+55
arch/arm/mach-mx1/crm_regs.h
··· 1 + /* 2 + * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. 3 + * Copyright (c) 2008 Paulius Zaleckas <paulius.zaleckas@teltonika.lt> 4 + * 5 + * This file may be distributed under the terms of the GNU General 6 + * Public License, version 2. 7 + */ 8 + 9 + #ifndef __ARCH_ARM_MACH_MX1_CRM_REGS_H__ 10 + #define __ARCH_ARM_MACH_MX1_CRM_REGS_H__ 11 + 12 + #define CCM_BASE IO_ADDRESS(CCM_BASE_ADDR) 13 + #define SCM_BASE IO_ADDRESS(SCM_BASE_ADDR) 14 + 15 + /* CCM register addresses */ 16 + #define CCM_CSCR (CCM_BASE + 0x0) 17 + #define CCM_MPCTL0 (CCM_BASE + 0x4) 18 + #define CCM_MPCTL1 (CCM_BASE + 0x8) 19 + #define CCM_SPCTL0 (CCM_BASE + 0xC) 20 + #define CCM_SPCTL1 (CCM_BASE + 0x10) 21 + #define CCM_PCDR (CCM_BASE + 0x20) 22 + 23 + #define CCM_CSCR_CLKO_OFFSET 29 24 + #define CCM_CSCR_CLKO_MASK (0x7 << 29) 25 + #define CCM_CSCR_USB_OFFSET 26 26 + #define CCM_CSCR_USB_MASK (0x7 << 26) 27 + #define CCM_CSCR_SPLL_RESTART (1 << 22) 28 + #define CCM_CSCR_MPLL_RESTART (1 << 21) 29 + #define CCM_CSCR_OSC_EN_SHIFT 17 30 + #define CCM_CSCR_SYSTEM_SEL (1 << 16) 31 + #define CCM_CSCR_BCLK_OFFSET 10 32 + #define CCM_CSCR_BCLK_MASK (0xF << 10) 33 + #define CCM_CSCR_PRESC (1 << 15) 34 + #define CCM_CSCR_SPEN (1 << 1) 35 + #define CCM_CSCR_MPEN (1 << 0) 36 + 37 + #define CCM_PCDR_PCLK3_OFFSET 16 38 + #define CCM_PCDR_PCLK3_MASK (0x7F << 16) 39 + #define CCM_PCDR_PCLK2_OFFSET 4 40 + #define CCM_PCDR_PCLK2_MASK (0xF << 4) 41 + #define CCM_PCDR_PCLK1_OFFSET 0 42 + #define CCM_PCDR_PCLK1_MASK 0xF 43 + 44 + /* SCM register addresses */ 45 + #define SCM_SIDR (SCM_BASE + 0x0) 46 + #define SCM_FMCR (SCM_BASE + 0x4) 47 + #define SCM_GPCR (SCM_BASE + 0x8) 48 + #define SCM_GCCR (SCM_BASE + 0xC) 49 + 50 + #define SCM_GCCR_DMA_CLK_EN_OFFSET 3 51 + #define SCM_GCCR_CSI_CLK_EN_OFFSET 2 52 + #define SCM_GCCR_MMA_CLK_EN_OFFSET 1 53 + #define SCM_GCCR_USBD_CLK_EN_OFFSET 0 54 + 55 + #endif /* __ARCH_ARM_MACH_MX2_CRM_REGS_H__ */
+260
arch/arm/mach-mx1/devices.c
··· 1 + /* 2 + * Copyright 2006-2007 Freescale Semiconductor, Inc. All Rights Reserved. 3 + * Copyright 2008 Sascha Hauer, kernel@pengutronix.de 4 + * Copyright (c) 2008 Paulius Zaleckas <paulius.zaleckas@teltonika.lt> 5 + * Copyright (c) 2008 Darius Augulis <darius.augulis@teltonika.lt> 6 + * 7 + * This program is free software; you can redistribute it and/or 8 + * modify it under the terms of the GNU General Public License 9 + * as published by the Free Software Foundation; either version 2 10 + * of the License, or (at your option) any later version. 11 + * This program is distributed in the hope that it will be useful, 12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 + * GNU General Public License for more details. 15 + * 16 + * You should have received a copy of the GNU General Public License 17 + * along with this program; if not, write to the Free Software 18 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, 19 + * Boston, MA 02110-1301, USA. 20 + */ 21 + 22 + #include <linux/kernel.h> 23 + #include <linux/init.h> 24 + #include <linux/platform_device.h> 25 + #include <linux/gpio.h> 26 + #include <mach/hardware.h> 27 + 28 + static struct resource imx_csi_resources[] = { 29 + [0] = { 30 + .start = 0x00224000, 31 + .end = 0x00224010, 32 + .flags = IORESOURCE_MEM, 33 + }, 34 + [1] = { 35 + .start = CSI_INT, 36 + .end = CSI_INT, 37 + .flags = IORESOURCE_IRQ, 38 + }, 39 + }; 40 + 41 + static u64 imx_csi_dmamask = 0xffffffffUL; 42 + 43 + struct platform_device imx_csi_device = { 44 + .name = "imx-csi", 45 + .id = 0, /* This is used to put cameras on this interface */ 46 + .dev = { 47 + .dma_mask = &imx_csi_dmamask, 48 + .coherent_dma_mask = 0xffffffff, 49 + }, 50 + .resource = imx_csi_resources, 51 + .num_resources = ARRAY_SIZE(imx_csi_resources), 52 + }; 53 + 54 + static struct resource imx_i2c_resources[] = { 55 + [0] = { 56 + .start = 0x00217000, 57 + .end = 0x00217010, 58 + .flags = IORESOURCE_MEM, 59 + }, 60 + [1] = { 61 + .start = I2C_INT, 62 + .end = I2C_INT, 63 + .flags = IORESOURCE_IRQ, 64 + }, 65 + }; 66 + 67 + struct platform_device imx_i2c_device = { 68 + .name = "imx-i2c", 69 + .id = 0, 70 + .resource = imx_i2c_resources, 71 + .num_resources = ARRAY_SIZE(imx_i2c_resources), 72 + }; 73 + 74 + static struct resource imx_uart1_resources[] = { 75 + [0] = { 76 + .start = UART1_BASE_ADDR, 77 + .end = UART1_BASE_ADDR + 0xD0, 78 + .flags = IORESOURCE_MEM, 79 + }, 80 + [1] = { 81 + .start = UART1_MINT_RX, 82 + .end = UART1_MINT_RX, 83 + .flags = IORESOURCE_IRQ, 84 + }, 85 + [2] = { 86 + .start = UART1_MINT_TX, 87 + .end = UART1_MINT_TX, 88 + .flags = IORESOURCE_IRQ, 89 + }, 90 + [3] = { 91 + .start = UART1_MINT_RTS, 92 + .end = UART1_MINT_RTS, 93 + .flags = IORESOURCE_IRQ, 94 + }, 95 + }; 96 + 97 + struct platform_device imx_uart1_device = { 98 + .name = "imx-uart", 99 + .id = 0, 100 + .num_resources = ARRAY_SIZE(imx_uart1_resources), 101 + .resource = imx_uart1_resources, 102 + }; 103 + 104 + static struct resource imx_uart2_resources[] = { 105 + [0] = { 106 + .start = UART2_BASE_ADDR, 107 + .end = UART2_BASE_ADDR + 0xD0, 108 + .flags = IORESOURCE_MEM, 109 + }, 110 + [1] = { 111 + .start = UART2_MINT_RX, 112 + .end = UART2_MINT_RX, 113 + .flags = IORESOURCE_IRQ, 114 + }, 115 + [2] = { 116 + .start = UART2_MINT_TX, 117 + .end = UART2_MINT_TX, 118 + .flags = IORESOURCE_IRQ, 119 + }, 120 + [3] = { 121 + .start = UART2_MINT_RTS, 122 + .end = UART2_MINT_RTS, 123 + .flags = IORESOURCE_IRQ, 124 + }, 125 + }; 126 + 127 + struct platform_device imx_uart2_device = { 128 + .name = "imx-uart", 129 + .id = 1, 130 + .num_resources = ARRAY_SIZE(imx_uart2_resources), 131 + .resource = imx_uart2_resources, 132 + }; 133 + 134 + static struct resource imx_rtc_resources[] = { 135 + [0] = { 136 + .start = 0x00204000, 137 + .end = 0x00204024, 138 + .flags = IORESOURCE_MEM, 139 + }, 140 + [1] = { 141 + .start = RTC_INT, 142 + .end = RTC_INT, 143 + .flags = IORESOURCE_IRQ, 144 + }, 145 + [2] = { 146 + .start = RTC_SAMINT, 147 + .end = RTC_SAMINT, 148 + .flags = IORESOURCE_IRQ, 149 + }, 150 + }; 151 + 152 + struct platform_device imx_rtc_device = { 153 + .name = "rtc-imx", 154 + .id = 0, 155 + .resource = imx_rtc_resources, 156 + .num_resources = ARRAY_SIZE(imx_rtc_resources), 157 + }; 158 + 159 + static struct resource imx_wdt_resources[] = { 160 + [0] = { 161 + .start = 0x00201000, 162 + .end = 0x00201008, 163 + .flags = IORESOURCE_MEM, 164 + }, 165 + [1] = { 166 + .start = WDT_INT, 167 + .end = WDT_INT, 168 + .flags = IORESOURCE_IRQ, 169 + }, 170 + }; 171 + 172 + struct platform_device imx_wdt_device = { 173 + .name = "imx-wdt", 174 + .id = 0, 175 + .resource = imx_wdt_resources, 176 + .num_resources = ARRAY_SIZE(imx_wdt_resources), 177 + }; 178 + 179 + static struct resource imx_usb_resources[] = { 180 + [0] = { 181 + .start = 0x00212000, 182 + .end = 0x00212148, 183 + .flags = IORESOURCE_MEM, 184 + }, 185 + [1] = { 186 + .start = USBD_INT0, 187 + .end = USBD_INT0, 188 + .flags = IORESOURCE_IRQ, 189 + }, 190 + [2] = { 191 + .start = USBD_INT1, 192 + .end = USBD_INT1, 193 + .flags = IORESOURCE_IRQ, 194 + }, 195 + [3] = { 196 + .start = USBD_INT2, 197 + .end = USBD_INT2, 198 + .flags = IORESOURCE_IRQ, 199 + }, 200 + [4] = { 201 + .start = USBD_INT3, 202 + .end = USBD_INT3, 203 + .flags = IORESOURCE_IRQ, 204 + }, 205 + [5] = { 206 + .start = USBD_INT4, 207 + .end = USBD_INT4, 208 + .flags = IORESOURCE_IRQ, 209 + }, 210 + [6] = { 211 + .start = USBD_INT5, 212 + .end = USBD_INT5, 213 + .flags = IORESOURCE_IRQ, 214 + }, 215 + [7] = { 216 + .start = USBD_INT6, 217 + .end = USBD_INT6, 218 + .flags = IORESOURCE_IRQ, 219 + }, 220 + }; 221 + 222 + struct platform_device imx_usb_device = { 223 + .name = "imx_udc", 224 + .id = 0, 225 + .num_resources = ARRAY_SIZE(imx_usb_resources), 226 + .resource = imx_usb_resources, 227 + }; 228 + 229 + /* GPIO port description */ 230 + static struct mxc_gpio_port imx_gpio_ports[] = { 231 + [0] = { 232 + .chip.label = "gpio-0", 233 + .base = (void __iomem *)IO_ADDRESS(GPIO_BASE_ADDR), 234 + .irq = GPIO_INT_PORTA, 235 + .virtual_irq_start = MXC_MAX_INT_LINES 236 + }, 237 + [1] = { 238 + .chip.label = "gpio-1", 239 + .base = (void __iomem *)IO_ADDRESS(GPIO_BASE_ADDR + 0x100), 240 + .irq = GPIO_INT_PORTB, 241 + .virtual_irq_start = MXC_MAX_INT_LINES + 32 242 + }, 243 + [2] = { 244 + .chip.label = "gpio-2", 245 + .base = (void __iomem *)IO_ADDRESS(GPIO_BASE_ADDR + 0x200), 246 + .irq = GPIO_INT_PORTC, 247 + .virtual_irq_start = MXC_MAX_INT_LINES + 64 248 + }, 249 + [3] = { 250 + .chip.label = "gpio-3", 251 + .base = (void __iomem *)IO_ADDRESS(GPIO_BASE_ADDR + 0x300), 252 + .irq = GPIO_INT_PORTD, 253 + .virtual_irq_start = MXC_MAX_INT_LINES + 96 254 + } 255 + }; 256 + 257 + int __init mxc_register_gpios(void) 258 + { 259 + return mxc_gpio_init(imx_gpio_ports, ARRAY_SIZE(imx_gpio_ports)); 260 + }
+7
arch/arm/mach-mx1/devices.h
··· 1 + extern struct platform_device imx_csi_device; 2 + extern struct platform_device imx_i2c_device; 3 + extern struct platform_device imx_uart1_device; 4 + extern struct platform_device imx_uart2_device; 5 + extern struct platform_device imx_rtc_device; 6 + extern struct platform_device imx_wdt_device; 7 + extern struct platform_device imx_usb_device;
+43
arch/arm/mach-mx1/generic.c
··· 1 + /* 2 + * author: Sascha Hauer 3 + * Created: april 20th, 2004 4 + * Copyright: Synertronixx GmbH 5 + * 6 + * Common code for i.MX machines 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 as published by 10 + * the Free Software Foundation; either version 2 of the License, or 11 + * (at your option) any later version. 12 + * 13 + * This program is distributed in the hope that it will be useful, 14 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 + * GNU General Public License for more details. 17 + * 18 + * You should have received a copy of the GNU General Public License 19 + * along with this program; if not, write to the Free Software 20 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 + * 22 + */ 23 + #include <linux/kernel.h> 24 + #include <linux/init.h> 25 + #include <linux/io.h> 26 + 27 + #include <asm/mach/map.h> 28 + 29 + #include <mach/hardware.h> 30 + 31 + static struct map_desc imx_io_desc[] __initdata = { 32 + { 33 + .virtual = IMX_IO_BASE, 34 + .pfn = __phys_to_pfn(IMX_IO_PHYS), 35 + .length = IMX_IO_SIZE, 36 + .type = MT_DEVICE 37 + } 38 + }; 39 + 40 + void __init mxc_map_io(void) 41 + { 42 + iotable_init(imx_io_desc, ARRAY_SIZE(imx_io_desc)); 43 + }
+148
arch/arm/mach-mx1/mx1ads.c
··· 1 + /* 2 + * arch/arm/mach-imx/mx1ads.c 3 + * 4 + * Initially based on: 5 + * linux-2.6.7-imx/arch/arm/mach-imx/scb9328.c 6 + * Copyright (c) 2004 Sascha Hauer <sascha@saschahauer.de> 7 + * 8 + * 2004 (c) MontaVista Software, Inc. 9 + * 10 + * This file is licensed under the terms of the GNU General Public 11 + * License version 2. This program is licensed "as is" without any 12 + * warranty of any kind, whether express or implied. 13 + */ 14 + 15 + #include <linux/kernel.h> 16 + #include <linux/init.h> 17 + #include <linux/platform_device.h> 18 + #include <linux/mtd/physmap.h> 19 + 20 + #include <asm/mach-types.h> 21 + #include <asm/mach/arch.h> 22 + #include <asm/mach/time.h> 23 + 24 + #include <mach/hardware.h> 25 + #include <mach/common.h> 26 + #include <mach/imx-uart.h> 27 + #include <mach/iomux-mx1-mx2.h> 28 + #include "devices.h" 29 + 30 + /* 31 + * UARTs platform data 32 + */ 33 + static int mxc_uart1_pins[] = { 34 + PC9_PF_UART1_CTS, 35 + PC10_PF_UART1_RTS, 36 + PC11_PF_UART1_TXD, 37 + PC12_PF_UART1_RXD, 38 + }; 39 + 40 + static int uart1_mxc_init(struct platform_device *pdev) 41 + { 42 + return mxc_gpio_setup_multiple_pins(mxc_uart1_pins, 43 + ARRAY_SIZE(mxc_uart1_pins), "UART1"); 44 + } 45 + 46 + static int uart1_mxc_exit(struct platform_device *pdev) 47 + { 48 + mxc_gpio_release_multiple_pins(mxc_uart1_pins, 49 + ARRAY_SIZE(mxc_uart1_pins)); 50 + return 0; 51 + } 52 + 53 + static int mxc_uart2_pins[] = { 54 + PB28_PF_UART2_CTS, 55 + PB29_PF_UART2_RTS, 56 + PB30_PF_UART2_TXD, 57 + PB31_PF_UART2_RXD, 58 + }; 59 + 60 + static int uart2_mxc_init(struct platform_device *pdev) 61 + { 62 + return mxc_gpio_setup_multiple_pins(mxc_uart2_pins, 63 + ARRAY_SIZE(mxc_uart2_pins), "UART2"); 64 + } 65 + 66 + static int uart2_mxc_exit(struct platform_device *pdev) 67 + { 68 + mxc_gpio_release_multiple_pins(mxc_uart2_pins, 69 + ARRAY_SIZE(mxc_uart2_pins)); 70 + return 0; 71 + } 72 + 73 + static struct imxuart_platform_data uart_pdata[] = { 74 + { 75 + .init = uart1_mxc_init, 76 + .exit = uart1_mxc_exit, 77 + .flags = IMXUART_HAVE_RTSCTS, 78 + }, { 79 + .init = uart2_mxc_init, 80 + .exit = uart2_mxc_exit, 81 + .flags = IMXUART_HAVE_RTSCTS, 82 + }, 83 + }; 84 + 85 + /* 86 + * Physmap flash 87 + */ 88 + 89 + static struct physmap_flash_data mx1ads_flash_data = { 90 + .width = 4, /* bankwidth in bytes */ 91 + }; 92 + 93 + static struct resource flash_resource = { 94 + .start = IMX_CS0_PHYS, 95 + .end = IMX_CS0_PHYS + SZ_32M - 1, 96 + .flags = IORESOURCE_MEM, 97 + }; 98 + 99 + static struct platform_device flash_device = { 100 + .name = "physmap-flash", 101 + .id = 0, 102 + .resource = &flash_resource, 103 + .num_resources = 1, 104 + }; 105 + 106 + /* 107 + * Board init 108 + */ 109 + static void __init mx1ads_init(void) 110 + { 111 + /* UART */ 112 + mxc_register_device(&imx_uart1_device, &uart_pdata[0]); 113 + mxc_register_device(&imx_uart2_device, &uart_pdata[1]); 114 + 115 + /* Physmap flash */ 116 + mxc_register_device(&flash_device, &mx1ads_flash_data); 117 + } 118 + 119 + static void __init mx1ads_timer_init(void) 120 + { 121 + mxc_clocks_init(32000); 122 + mxc_timer_init("gpt_clk"); 123 + } 124 + 125 + struct sys_timer mx1ads_timer = { 126 + .init = mx1ads_timer_init, 127 + }; 128 + 129 + MACHINE_START(MX1ADS, "Freescale MX1ADS") 130 + /* Maintainer: Sascha Hauer, Pengutronix */ 131 + .phys_io = IMX_IO_PHYS, 132 + .io_pg_offst = (IMX_IO_BASE >> 18) & 0xfffc, 133 + .boot_params = PHYS_OFFSET + 0x100, 134 + .map_io = mxc_map_io, 135 + .init_irq = mxc_init_irq, 136 + .timer = &mx1ads_timer, 137 + .init_machine = mx1ads_init, 138 + MACHINE_END 139 + 140 + MACHINE_START(MXLADS, "Freescale MXLADS") 141 + .phys_io = IMX_IO_PHYS, 142 + .io_pg_offst = (IMX_IO_BASE >> 18) & 0xfffc, 143 + .boot_params = PHYS_OFFSET + 0x100, 144 + .map_io = mxc_map_io, 145 + .init_irq = mxc_init_irq, 146 + .timer = &mx1ads_timer, 147 + .init_machine = mx1ads_init, 148 + MACHINE_END
+19
arch/arm/mach-mx2/devices.c
··· 205 205 .resource = mxc_w1_master_resources, 206 206 }; 207 207 208 + static struct resource mxc_nand_resources[] = { 209 + { 210 + .start = NFC_BASE_ADDR, 211 + .end = NFC_BASE_ADDR + 0xfff, 212 + .flags = IORESOURCE_MEM 213 + }, { 214 + .start = MXC_INT_NANDFC, 215 + .end = MXC_INT_NANDFC, 216 + .flags = IORESOURCE_IRQ 217 + }, 218 + }; 219 + 220 + struct platform_device mxc_nand_device = { 221 + .name = "mxc_nand", 222 + .id = 0, 223 + .num_resources = ARRAY_SIZE(mxc_nand_resources), 224 + .resource = mxc_nand_resources, 225 + }; 226 + 208 227 /* GPIO port description */ 209 228 static struct mxc_gpio_port imx_gpio_ports[] = { 210 229 [0] = {
+1
arch/arm/mach-mx2/devices.h
··· 13 13 extern struct platform_device mxc_uart_device4; 14 14 extern struct platform_device mxc_uart_device5; 15 15 extern struct platform_device mxc_w1_master_device; 16 + extern struct platform_device mxc_nand_device;
+26 -35
arch/arm/mach-mx2/mx27ads.c
··· 68 68 static int uart_mxc_port0_init(struct platform_device *pdev) 69 69 { 70 70 return mxc_gpio_setup_multiple_pins(mxc_uart0_pins, 71 - ARRAY_SIZE(mxc_uart0_pins), 72 - MXC_GPIO_ALLOC_MODE_NORMAL, "UART0"); 71 + ARRAY_SIZE(mxc_uart0_pins), "UART0"); 73 72 } 74 73 75 74 static int uart_mxc_port0_exit(struct platform_device *pdev) 76 75 { 77 - return mxc_gpio_setup_multiple_pins(mxc_uart0_pins, 78 - ARRAY_SIZE(mxc_uart0_pins), 79 - MXC_GPIO_ALLOC_MODE_RELEASE, "UART0"); 76 + mxc_gpio_release_multiple_pins(mxc_uart0_pins, 77 + ARRAY_SIZE(mxc_uart0_pins)); 78 + return 0; 80 79 } 81 80 82 81 static int mxc_uart1_pins[] = { ··· 88 89 static int uart_mxc_port1_init(struct platform_device *pdev) 89 90 { 90 91 return mxc_gpio_setup_multiple_pins(mxc_uart1_pins, 91 - ARRAY_SIZE(mxc_uart1_pins), 92 - MXC_GPIO_ALLOC_MODE_NORMAL, "UART1"); 92 + ARRAY_SIZE(mxc_uart1_pins), "UART1"); 93 93 } 94 94 95 95 static int uart_mxc_port1_exit(struct platform_device *pdev) 96 96 { 97 - return mxc_gpio_setup_multiple_pins(mxc_uart1_pins, 98 - ARRAY_SIZE(mxc_uart1_pins), 99 - MXC_GPIO_ALLOC_MODE_RELEASE, "UART1"); 97 + mxc_gpio_setup_release_pins(mxc_uart1_pins, 98 + ARRAY_SIZE(mxc_uart1_pins)); 99 + return 0; 100 100 } 101 101 102 102 static int mxc_uart2_pins[] = { ··· 108 110 static int uart_mxc_port2_init(struct platform_device *pdev) 109 111 { 110 112 return mxc_gpio_setup_multiple_pins(mxc_uart2_pins, 111 - ARRAY_SIZE(mxc_uart2_pins), 112 - MXC_GPIO_ALLOC_MODE_NORMAL, "UART2"); 113 + ARRAY_SIZE(mxc_uart2_pins), "UART2"); 113 114 } 114 115 115 116 static int uart_mxc_port2_exit(struct platform_device *pdev) 116 117 { 117 - return mxc_gpio_setup_multiple_pins(mxc_uart2_pins, 118 - ARRAY_SIZE(mxc_uart2_pins), 119 - MXC_GPIO_ALLOC_MODE_RELEASE, "UART2"); 118 + mxc_gpio_release_multiple_pins(mxc_uart2_pins, 119 + ARRAY_SIZE(mxc_uart2_pins)); 120 + return 0; 120 121 } 121 122 122 123 static int mxc_uart3_pins[] = { ··· 128 131 static int uart_mxc_port3_init(struct platform_device *pdev) 129 132 { 130 133 return mxc_gpio_setup_multiple_pins(mxc_uart3_pins, 131 - ARRAY_SIZE(mxc_uart3_pins), 132 - MXC_GPIO_ALLOC_MODE_NORMAL, "UART3"); 134 + ARRAY_SIZE(mxc_uart3_pins), "UART3"); 133 135 } 134 136 135 137 static int uart_mxc_port3_exit(struct platform_device *pdev) 136 138 { 137 - return mxc_gpio_setup_multiple_pins(mxc_uart3_pins, 138 - ARRAY_SIZE(mxc_uart3_pins), 139 - MXC_GPIO_ALLOC_MODE_RELEASE, "UART3"); 139 + mxc_gpio_release_multiple_pins(mxc_uart3_pins, 140 + ARRAY_SIZE(mxc_uart3_pins)); 140 141 } 141 142 142 143 static int mxc_uart4_pins[] = { ··· 147 152 static int uart_mxc_port4_init(struct platform_device *pdev) 148 153 { 149 154 return mxc_gpio_setup_multiple_pins(mxc_uart4_pins, 150 - ARRAY_SIZE(mxc_uart4_pins), 151 - MXC_GPIO_ALLOC_MODE_NORMAL, "UART4"); 155 + ARRAY_SIZE(mxc_uart4_pins), "UART4"); 152 156 } 153 157 154 158 static int uart_mxc_port4_exit(struct platform_device *pdev) 155 159 { 156 - return mxc_gpio_setup_multiple_pins(mxc_uart4_pins, 157 - ARRAY_SIZE(mxc_uart4_pins), 158 - MXC_GPIO_ALLOC_MODE_RELEASE, "UART4"); 160 + mxc_gpio_release_multiple_pins(mxc_uart4_pins, 161 + ARRAY_SIZE(mxc_uart4_pins)); 162 + return 0; 159 163 } 160 164 161 165 static int mxc_uart5_pins[] = { ··· 167 173 static int uart_mxc_port5_init(struct platform_device *pdev) 168 174 { 169 175 return mxc_gpio_setup_multiple_pins(mxc_uart5_pins, 170 - ARRAY_SIZE(mxc_uart5_pins), 171 - MXC_GPIO_ALLOC_MODE_NORMAL, "UART5"); 176 + ARRAY_SIZE(mxc_uart5_pins), "UART5"); 172 177 } 173 178 174 179 static int uart_mxc_port5_exit(struct platform_device *pdev) 175 180 { 176 - return mxc_gpio_setup_multiple_pins(mxc_uart5_pins, 177 - ARRAY_SIZE(mxc_uart5_pins), 178 - MXC_GPIO_ALLOC_MODE_RELEASE, "UART5"); 181 + mxc_gpio_release_multiple_pins(mxc_uart5_pins, 182 + ARRAY_SIZE(mxc_uart5_pins)); 183 + return 0; 179 184 } 180 185 181 186 static struct platform_device *platform_devices[] __initdata = { ··· 205 212 static void gpio_fec_active(void) 206 213 { 207 214 mxc_gpio_setup_multiple_pins(mxc_fec_pins, 208 - ARRAY_SIZE(mxc_fec_pins), 209 - MXC_GPIO_ALLOC_MODE_NORMAL, "FEC"); 215 + ARRAY_SIZE(mxc_fec_pins), "FEC"); 210 216 } 211 217 212 218 static void gpio_fec_inactive(void) 213 219 { 214 - mxc_gpio_setup_multiple_pins(mxc_fec_pins, 215 - ARRAY_SIZE(mxc_fec_pins), 216 - MXC_GPIO_ALLOC_MODE_RELEASE, "FEC"); 220 + mxc_gpio_release_multiple_pins(mxc_fec_pins, 221 + ARRAY_SIZE(mxc_fec_pins)); 217 222 } 218 223 219 224 static struct imxuart_platform_data uart_pdata[] = {
+60 -20
arch/arm/mach-mx2/pcm038.c
··· 19 19 20 20 #include <linux/platform_device.h> 21 21 #include <linux/mtd/physmap.h> 22 + #include <linux/mtd/plat-ram.h> 22 23 #include <asm/mach/arch.h> 23 24 #include <asm/mach-types.h> 24 25 #include <mach/common.h> ··· 28 27 #include <asm/mach/time.h> 29 28 #include <mach/imx-uart.h> 30 29 #include <mach/board-pcm038.h> 30 + #include <mach/mxc_nand.h> 31 31 32 32 #include "devices.h" 33 + 34 + /* 35 + * Phytec's PCM038 comes with 2MiB battery buffered SRAM, 36 + * 16 bit width 37 + */ 38 + 39 + static struct platdata_mtd_ram pcm038_sram_data = { 40 + .bankwidth = 2, 41 + }; 42 + 43 + static struct resource pcm038_sram_resource = { 44 + .start = CS1_BASE_ADDR, 45 + .end = CS1_BASE_ADDR + 512 * 1024 - 1, 46 + .flags = IORESOURCE_MEM, 47 + }; 48 + 49 + static struct platform_device pcm038_sram_mtd_device = { 50 + .name = "mtd-ram", 51 + .id = 0, 52 + .dev = { 53 + .platform_data = &pcm038_sram_data, 54 + }, 55 + .num_resources = 1, 56 + .resource = &pcm038_sram_resource, 57 + }; 33 58 34 59 /* 35 60 * Phytec's phyCORE-i.MX27 comes with 32MiB flash, ··· 91 64 static int uart_mxc_port0_init(struct platform_device *pdev) 92 65 { 93 66 return mxc_gpio_setup_multiple_pins(mxc_uart0_pins, 94 - ARRAY_SIZE(mxc_uart0_pins), 95 - MXC_GPIO_ALLOC_MODE_NORMAL, "UART0"); 67 + ARRAY_SIZE(mxc_uart0_pins), "UART0"); 96 68 } 97 69 98 70 static int uart_mxc_port0_exit(struct platform_device *pdev) 99 71 { 100 - return mxc_gpio_setup_multiple_pins(mxc_uart0_pins, 101 - ARRAY_SIZE(mxc_uart0_pins), 102 - MXC_GPIO_ALLOC_MODE_RELEASE, "UART0"); 72 + mxc_gpio_release_multiple_pins(mxc_uart0_pins, 73 + ARRAY_SIZE(mxc_uart0_pins)); 74 + return 0; 103 75 } 104 76 105 77 static int mxc_uart1_pins[] = { ··· 111 85 static int uart_mxc_port1_init(struct platform_device *pdev) 112 86 { 113 87 return mxc_gpio_setup_multiple_pins(mxc_uart1_pins, 114 - ARRAY_SIZE(mxc_uart1_pins), 115 - MXC_GPIO_ALLOC_MODE_NORMAL, "UART1"); 88 + ARRAY_SIZE(mxc_uart1_pins), "UART1"); 116 89 } 117 90 118 91 static int uart_mxc_port1_exit(struct platform_device *pdev) 119 92 { 120 - return mxc_gpio_setup_multiple_pins(mxc_uart1_pins, 121 - ARRAY_SIZE(mxc_uart1_pins), 122 - MXC_GPIO_ALLOC_MODE_RELEASE, "UART1"); 93 + mxc_gpio_release_multiple_pins(mxc_uart1_pins, 94 + ARRAY_SIZE(mxc_uart1_pins)); 95 + return 0; 123 96 } 124 97 125 98 static int mxc_uart2_pins[] = { PE10_PF_UART3_CTS, ··· 129 104 static int uart_mxc_port2_init(struct platform_device *pdev) 130 105 { 131 106 return mxc_gpio_setup_multiple_pins(mxc_uart2_pins, 132 - ARRAY_SIZE(mxc_uart2_pins), 133 - MXC_GPIO_ALLOC_MODE_NORMAL, "UART2"); 107 + ARRAY_SIZE(mxc_uart2_pins), "UART2"); 134 108 } 135 109 136 110 static int uart_mxc_port2_exit(struct platform_device *pdev) 137 111 { 138 - return mxc_gpio_setup_multiple_pins(mxc_uart2_pins, 139 - ARRAY_SIZE(mxc_uart2_pins), 140 - MXC_GPIO_ALLOC_MODE_RELEASE, "UART2"); 112 + mxc_gpio_release_multiple_pins(mxc_uart2_pins, 113 + ARRAY_SIZE(mxc_uart2_pins)); 114 + return 0; 141 115 } 142 116 143 117 static struct imxuart_platform_data uart_pdata[] = { ··· 179 155 static void gpio_fec_active(void) 180 156 { 181 157 mxc_gpio_setup_multiple_pins(mxc_fec_pins, 182 - ARRAY_SIZE(mxc_fec_pins), 183 - MXC_GPIO_ALLOC_MODE_NORMAL, "FEC"); 158 + ARRAY_SIZE(mxc_fec_pins), "FEC"); 184 159 } 185 160 186 161 static void gpio_fec_inactive(void) 187 162 { 188 - mxc_gpio_setup_multiple_pins(mxc_fec_pins, 189 - ARRAY_SIZE(mxc_fec_pins), 190 - MXC_GPIO_ALLOC_MODE_RELEASE, "FEC"); 163 + mxc_gpio_release_multiple_pins(mxc_fec_pins, 164 + ARRAY_SIZE(mxc_fec_pins)); 191 165 } 166 + 167 + static struct mxc_nand_platform_data pcm038_nand_board_info = { 168 + .width = 1, 169 + .hw_ecc = 1, 170 + }; 192 171 193 172 static struct platform_device *platform_devices[] __initdata = { 194 173 &pcm038_nor_mtd_device, 195 174 &mxc_w1_master_device, 175 + &pcm038_sram_mtd_device, 196 176 }; 177 + 178 + /* On pcm038 there's a sram attached to CS1, we enable the chipselect here and 179 + * setup other stuffs to access the sram. */ 180 + static void __init pcm038_init_sram(void) 181 + { 182 + __raw_writel(0x0000d843, CSCR_U(1)); 183 + __raw_writel(0x22252521, CSCR_L(1)); 184 + __raw_writel(0x22220a00, CSCR_A(1)); 185 + } 197 186 198 187 static void __init pcm038_init(void) 199 188 { 200 189 gpio_fec_active(); 190 + pcm038_init_sram(); 201 191 202 192 mxc_register_device(&mxc_uart_device0, &uart_pdata[0]); 203 193 mxc_register_device(&mxc_uart_device1, &uart_pdata[1]); 204 194 mxc_register_device(&mxc_uart_device2, &uart_pdata[2]); 195 + 205 196 mxc_gpio_mode(PE16_AF_RTCK); /* OWIRE */ 197 + mxc_register_device(&mxc_nand_device, &pcm038_nand_board_info); 206 198 207 199 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); 208 200
+14
arch/arm/mach-mx3/Kconfig
··· 21 21 Include support for MX31 LITEKIT platform. This includes specific 22 22 configurations for the board and its peripherals. 23 23 24 + config MACH_MX31_3DS 25 + bool "Support MX31PDK (3DS)" 26 + default n 27 + help 28 + Include support for MX31PDK (3DS) platform. This includes specific 29 + configurations for the board and its peripherals. 30 + 31 + config MACH_MX31MOBOARD 32 + bool "Support mx31moboard platforms (EPFL Mobots group)" 33 + default n 34 + help 35 + Include support for mx31moboard platform. This includes specific 36 + configurations for the board and its peripherals. 37 + 24 38 endmenu 25 39
+2
arch/arm/mach-mx3/Makefile
··· 8 8 obj-$(CONFIG_MACH_MX31ADS) += mx31ads.o 9 9 obj-$(CONFIG_MACH_MX31LITE) += mx31lite.o 10 10 obj-$(CONFIG_MACH_PCM037) += pcm037.o 11 + obj-$(CONFIG_MACH_MX31_3DS) += mx31pdk.o 12 + obj-$(CONFIG_MACH_MX31MOBOARD) += mx31moboard.o
+19
arch/arm/mach-mx3/devices.c
··· 160 160 .num_resources = ARRAY_SIZE(mxc_w1_master_resources), 161 161 .resource = mxc_w1_master_resources, 162 162 }; 163 + 164 + static struct resource mxc_nand_resources[] = { 165 + { 166 + .start = NFC_BASE_ADDR, 167 + .end = NFC_BASE_ADDR + 0xfff, 168 + .flags = IORESOURCE_MEM 169 + }, { 170 + .start = MXC_INT_NANDFC, 171 + .end = MXC_INT_NANDFC, 172 + .flags = IORESOURCE_IRQ 173 + }, 174 + }; 175 + 176 + struct platform_device mxc_nand_device = { 177 + .name = "mxc_nand", 178 + .id = 0, 179 + .num_resources = ARRAY_SIZE(mxc_nand_resources), 180 + .resource = mxc_nand_resources, 181 + };
+1
arch/arm/mach-mx3/devices.h
··· 5 5 extern struct platform_device mxc_uart_device3; 6 6 extern struct platform_device mxc_uart_device4; 7 7 extern struct platform_device mxc_w1_master_device; 8 + extern struct platform_device mxc_nand_device;
+5 -4
arch/arm/mach-mx3/iomux.c
··· 74 74 u32 field, l; 75 75 void __iomem *reg; 76 76 77 - reg = IOMUXSW_PAD_CTL + (pin + 2) / 3; 77 + pin &= IOMUX_PADNUM_MASK; 78 + reg = IOMUXSW_PAD_CTL + (pin + 2) / 3 * 4; 78 79 field = (pin + 2) % 3; 79 80 80 - pr_debug("%s: reg offset = 0x%x field = %d\n", 81 + pr_debug("%s: reg offset = 0x%x, field = %d\n", 81 82 __func__, (pin + 2) / 3, field); 82 83 83 84 spin_lock(&gpio_mux_lock); 84 85 85 86 l = __raw_readl(reg); 86 - l &= ~(0x1ff << (field * 9)); 87 - l |= config << (field * 9); 87 + l &= ~(0x1ff << (field * 10)); 88 + l |= config << (field * 10); 88 89 __raw_writel(l, reg); 89 90 90 91 spin_unlock(&gpio_mux_lock);
+141
arch/arm/mach-mx3/mx31moboard.c
··· 1 + /* 2 + * Copyright (C) 2008 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/types.h> 20 + #include <linux/init.h> 21 + 22 + #include <linux/platform_device.h> 23 + #include <linux/mtd/physmap.h> 24 + #include <linux/mtd/partitions.h> 25 + #include <linux/memory.h> 26 + 27 + #include <mach/hardware.h> 28 + #include <asm/mach-types.h> 29 + #include <asm/mach/arch.h> 30 + #include <asm/mach/time.h> 31 + #include <asm/mach/map.h> 32 + #include <mach/common.h> 33 + #include <mach/imx-uart.h> 34 + #include <mach/iomux-mx3.h> 35 + 36 + #include "devices.h" 37 + 38 + static struct physmap_flash_data mx31moboard_flash_data = { 39 + .width = 2, 40 + }; 41 + 42 + static struct resource mx31moboard_flash_resource = { 43 + .start = 0xa0000000, 44 + .end = 0xa1ffffff, 45 + .flags = IORESOURCE_MEM, 46 + }; 47 + 48 + static struct platform_device mx31moboard_flash = { 49 + .name = "physmap-flash", 50 + .id = 0, 51 + .dev = { 52 + .platform_data = &mx31moboard_flash_data, 53 + }, 54 + .resource = &mx31moboard_flash_resource, 55 + .num_resources = 1, 56 + }; 57 + 58 + static struct imxuart_platform_data uart_pdata = { 59 + .flags = IMXUART_HAVE_RTSCTS, 60 + }; 61 + 62 + static struct platform_device *devices[] __initdata = { 63 + &mx31moboard_flash, 64 + }; 65 + 66 + /* 67 + * Board specific initialization. 68 + */ 69 + static void __init mxc_board_init(void) 70 + { 71 + platform_add_devices(devices, ARRAY_SIZE(devices)); 72 + 73 + mxc_iomux_mode(MX31_PIN_CTS1__CTS1); 74 + mxc_iomux_mode(MX31_PIN_RTS1__RTS1); 75 + mxc_iomux_mode(MX31_PIN_TXD1__TXD1); 76 + mxc_iomux_mode(MX31_PIN_RXD1__RXD1); 77 + 78 + mxc_register_device(&mxc_uart_device0, &uart_pdata); 79 + 80 + mxc_iomux_mode(MX31_PIN_CTS2__CTS2); 81 + mxc_iomux_mode(MX31_PIN_RTS2__RTS2); 82 + mxc_iomux_mode(MX31_PIN_TXD2__TXD2); 83 + mxc_iomux_mode(MX31_PIN_RXD2__RXD2); 84 + 85 + mxc_register_device(&mxc_uart_device1, &uart_pdata); 86 + 87 + mxc_iomux_mode(MX31_PIN_PC_RST__CTS5); 88 + mxc_iomux_mode(MX31_PIN_PC_VS2__RTS5); 89 + mxc_iomux_mode(MX31_PIN_PC_BVD2__TXD5); 90 + mxc_iomux_mode(MX31_PIN_PC_BVD1__RXD5); 91 + 92 + mxc_register_device(&mxc_uart_device4, &uart_pdata); 93 + } 94 + 95 + /* 96 + * This structure defines static mappings for the mx31moboard. 97 + */ 98 + static struct map_desc mx31moboard_io_desc[] __initdata = { 99 + { 100 + .virtual = AIPS1_BASE_ADDR_VIRT, 101 + .pfn = __phys_to_pfn(AIPS1_BASE_ADDR), 102 + .length = AIPS1_SIZE, 103 + .type = MT_DEVICE_NONSHARED 104 + }, { 105 + .virtual = AIPS2_BASE_ADDR_VIRT, 106 + .pfn = __phys_to_pfn(AIPS2_BASE_ADDR), 107 + .length = AIPS2_SIZE, 108 + .type = MT_DEVICE_NONSHARED 109 + }, 110 + }; 111 + 112 + /* 113 + * Set up static virtual mappings. 114 + */ 115 + void __init mx31moboard_map_io(void) 116 + { 117 + mxc_map_io(); 118 + iotable_init(mx31moboard_io_desc, ARRAY_SIZE(mx31moboard_io_desc)); 119 + } 120 + 121 + static void __init mx31moboard_timer_init(void) 122 + { 123 + mxc_clocks_init(26000000); 124 + mxc_timer_init("ipg_clk.0"); 125 + } 126 + 127 + struct sys_timer mx31moboard_timer = { 128 + .init = mx31moboard_timer_init, 129 + }; 130 + 131 + MACHINE_START(MX31MOBOARD, "EPFL Mobots mx31moboard") 132 + /* Maintainer: Valentin Longchamp, EPFL Mobots group */ 133 + .phys_io = AIPS1_BASE_ADDR, 134 + .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, 135 + .boot_params = PHYS_OFFSET + 0x100, 136 + .map_io = mx31moboard_map_io, 137 + .init_irq = mxc_init_irq, 138 + .init_machine = mxc_board_init, 139 + .timer = &mx31moboard_timer, 140 + MACHINE_END 141 +
+115
arch/arm/mach-mx3/mx31pdk.c
··· 1 + /* 2 + * Copyright 2008 Freescale Semiconductor, Inc. All Rights Reserved. 3 + * 4 + * This program is free software; you can redistribute it and/or modify 5 + * it under the terms of the GNU General Public License as published by 6 + * the Free Software Foundation; either version 2 of the License, or 7 + * (at your option) any later version. 8 + * 9 + * This program is distributed in the hope that it will be useful, 10 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 + * GNU General Public License for more details. 13 + * 14 + * You should have received a copy of the GNU General Public License 15 + * along with this program; if not, write to the Free Software 16 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 + */ 18 + 19 + #include <linux/types.h> 20 + #include <linux/init.h> 21 + #include <linux/clk.h> 22 + #include <linux/irq.h> 23 + 24 + #include <mach/hardware.h> 25 + #include <asm/mach-types.h> 26 + #include <asm/mach/arch.h> 27 + #include <asm/mach/time.h> 28 + #include <asm/memory.h> 29 + #include <asm/mach/map.h> 30 + #include <mach/common.h> 31 + #include <mach/board-mx31pdk.h> 32 + #include <mach/imx-uart.h> 33 + #include <mach/iomux-mx3.h> 34 + #include "devices.h" 35 + 36 + /*! 37 + * @file mx31pdk.c 38 + * 39 + * @brief This file contains the board-specific initialization routines. 40 + * 41 + * @ingroup System 42 + */ 43 + 44 + static struct imxuart_platform_data uart_pdata = { 45 + .flags = IMXUART_HAVE_RTSCTS, 46 + }; 47 + 48 + static inline void mxc_init_imx_uart(void) 49 + { 50 + mxc_iomux_mode(MX31_PIN_CTS1__CTS1); 51 + mxc_iomux_mode(MX31_PIN_RTS1__RTS1); 52 + mxc_iomux_mode(MX31_PIN_TXD1__TXD1); 53 + mxc_iomux_mode(MX31_PIN_RXD1__RXD1); 54 + 55 + mxc_register_device(&mxc_uart_device0, &uart_pdata); 56 + } 57 + 58 + /*! 59 + * This structure defines static mappings for the i.MX31PDK board. 60 + */ 61 + static struct map_desc mx31pdk_io_desc[] __initdata = { 62 + { 63 + .virtual = AIPS1_BASE_ADDR_VIRT, 64 + .pfn = __phys_to_pfn(AIPS1_BASE_ADDR), 65 + .length = AIPS1_SIZE, 66 + .type = MT_DEVICE_NONSHARED 67 + }, { 68 + .virtual = AIPS2_BASE_ADDR_VIRT, 69 + .pfn = __phys_to_pfn(AIPS2_BASE_ADDR), 70 + .length = AIPS2_SIZE, 71 + .type = MT_DEVICE_NONSHARED 72 + }, 73 + }; 74 + 75 + /*! 76 + * Set up static virtual mappings. 77 + */ 78 + static void __init mx31pdk_map_io(void) 79 + { 80 + mxc_map_io(); 81 + iotable_init(mx31pdk_io_desc, ARRAY_SIZE(mx31pdk_io_desc)); 82 + } 83 + 84 + /*! 85 + * Board specific initialization. 86 + */ 87 + static void __init mxc_board_init(void) 88 + { 89 + mxc_init_imx_uart(); 90 + } 91 + 92 + static void __init mx31pdk_timer_init(void) 93 + { 94 + mxc_clocks_init(26000000); 95 + mxc_timer_init("ipg_clk.0"); 96 + } 97 + 98 + static struct sys_timer mx31pdk_timer = { 99 + .init = mx31pdk_timer_init, 100 + }; 101 + 102 + /* 103 + * The following uses standard kernel macros defined in arch.h in order to 104 + * initialize __mach_desc_MX31PDK data structure. 105 + */ 106 + MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)") 107 + /* Maintainer: Freescale Semiconductor, Inc. */ 108 + .phys_io = AIPS1_BASE_ADDR, 109 + .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, 110 + .boot_params = PHYS_OFFSET + 0x100, 111 + .map_io = mx31pdk_map_io, 112 + .init_irq = mxc_init_irq, 113 + .init_machine = mxc_board_init, 114 + .timer = &mx31pdk_timer, 115 + MACHINE_END
+67
arch/arm/mach-mx3/pcm037.c
··· 21 21 22 22 #include <linux/platform_device.h> 23 23 #include <linux/mtd/physmap.h> 24 + #include <linux/mtd/plat-ram.h> 24 25 #include <linux/memory.h> 26 + #include <linux/gpio.h> 27 + #include <linux/smc911x.h> 28 + #include <linux/interrupt.h> 25 29 26 30 #include <mach/hardware.h> 27 31 #include <asm/mach-types.h> ··· 36 32 #include <mach/imx-uart.h> 37 33 #include <mach/iomux-mx3.h> 38 34 #include <mach/board-pcm037.h> 35 + #include <mach/mxc_nand.h> 39 36 40 37 #include "devices.h" 41 38 ··· 64 59 .flags = IMXUART_HAVE_RTSCTS, 65 60 }; 66 61 62 + static struct resource smc911x_resources[] = { 63 + [0] = { 64 + .start = CS1_BASE_ADDR + 0x300, 65 + .end = CS1_BASE_ADDR + 0x300 + SZ_64K - 1, 66 + .flags = IORESOURCE_MEM, 67 + }, 68 + [1] = { 69 + .start = IOMUX_TO_IRQ(MX31_PIN_GPIO3_1), 70 + .end = IOMUX_TO_IRQ(MX31_PIN_GPIO3_1), 71 + .flags = IORESOURCE_IRQ, 72 + }, 73 + }; 74 + 75 + static struct smc911x_platdata smc911x_info = { 76 + .flags = SMC911X_USE_32BIT, 77 + .irq_flags = IRQF_SHARED | IRQF_TRIGGER_LOW, 78 + }; 79 + 80 + static struct platform_device pcm037_eth = { 81 + .name = "smc911x", 82 + .id = -1, 83 + .num_resources = ARRAY_SIZE(smc911x_resources), 84 + .resource = smc911x_resources, 85 + .dev = { 86 + .platform_data = &smc911x_info, 87 + }, 88 + }; 89 + 90 + static struct platdata_mtd_ram pcm038_sram_data = { 91 + .bankwidth = 2, 92 + }; 93 + 94 + static struct resource pcm038_sram_resource = { 95 + .start = CS4_BASE_ADDR, 96 + .end = CS4_BASE_ADDR + 512 * 1024 - 1, 97 + .flags = IORESOURCE_MEM, 98 + }; 99 + 100 + static struct platform_device pcm037_sram_device = { 101 + .name = "mtd-ram", 102 + .id = 0, 103 + .dev = { 104 + .platform_data = &pcm038_sram_data, 105 + }, 106 + .num_resources = 1, 107 + .resource = &pcm038_sram_resource, 108 + }; 109 + 110 + static struct mxc_nand_platform_data pcm037_nand_board_info = { 111 + .width = 1, 112 + .hw_ecc = 1, 113 + }; 114 + 67 115 static struct platform_device *devices[] __initdata = { 68 116 &pcm037_flash, 117 + &pcm037_eth, 118 + &pcm037_sram_device, 69 119 }; 70 120 71 121 /* ··· 144 84 145 85 mxc_iomux_mode(MX31_PIN_BATT_LINE__OWIRE); 146 86 mxc_register_device(&mxc_w1_master_device, NULL); 87 + 88 + /* SMSC9215 IRQ pin */ 89 + mxc_iomux_mode(IOMUX_MODE(MX31_PIN_GPIO3_1, IOMUX_CONFIG_GPIO)); 90 + if (!gpio_request(MX31_PIN_GPIO3_1, "pcm037-eth")) 91 + gpio_direction_input(MX31_PIN_GPIO3_1); 92 + 93 + mxc_register_device(&mxc_nand_device, &pcm037_nand_board_info); 147 94 } 148 95 149 96 /*
+6
arch/arm/plat-mxc/Kconfig
··· 6 6 prompt "MXC/iMX Base Type" 7 7 default ARCH_MX3 8 8 9 + config ARCH_MX1 10 + bool "MX1-based" 11 + help 12 + This enables support for systems based on the Freescale i.MX1 family 13 + 9 14 config ARCH_MX2 10 15 bool "MX2-based" 11 16 select CPU_ARM926T ··· 25 20 26 21 endchoice 27 22 23 + source "arch/arm/mach-mx1/Kconfig" 28 24 source "arch/arm/mach-mx2/Kconfig" 29 25 source "arch/arm/mach-mx3/Kconfig" 30 26
+1
arch/arm/plat-mxc/Makefile
··· 5 5 # Common support 6 6 obj-y := irq.o clock.o gpio.o time.o devices.o 7 7 8 + obj-$(CONFIG_ARCH_MX1) += iomux-mx1-mx2.o dma-mx1-mx2.o 8 9 obj-$(CONFIG_ARCH_MX2) += iomux-mx1-mx2.o dma-mx1-mx2.o
+3 -4
arch/arm/plat-mxc/dma-mx1-mx2.c
··· 34 34 #include <asm/system.h> 35 35 #include <asm/irq.h> 36 36 #include <mach/hardware.h> 37 - #include <mach/dma.h> 38 37 #include <mach/dma-mx1-mx2.h> 39 38 40 39 #define DMA_DCR 0x00 /* Control Register */ ··· 113 114 void (*err_handler) (int, void *, int errcode); 114 115 void (*prog_handler) (int, void *, struct scatterlist *); 115 116 void *data; 116 - dmamode_t dma_mode; 117 + unsigned int dma_mode; 117 118 struct scatterlist *sg; 118 119 unsigned int resbytes; 119 120 int dma_num; ··· 192 193 int 193 194 imx_dma_setup_single(int channel, dma_addr_t dma_address, 194 195 unsigned int dma_length, unsigned int dev_addr, 195 - dmamode_t dmamode) 196 + unsigned int dmamode) 196 197 { 197 198 struct imx_dma_channel *imxdma = &imx_dma_channels[channel]; 198 199 ··· 287 288 imx_dma_setup_sg(int channel, 288 289 struct scatterlist *sg, unsigned int sgcount, 289 290 unsigned int dma_length, unsigned int dev_addr, 290 - dmamode_t dmamode) 291 + unsigned int dmamode) 291 292 { 292 293 struct imx_dma_channel *imxdma = &imx_dma_channels[channel]; 293 294
+3 -3
arch/arm/plat-mxc/gpio.c
··· 115 115 } 116 116 } 117 117 118 - #ifdef CONFIG_ARCH_MX3 119 - /* MX3 has one interrupt *per* gpio port */ 118 + #if defined(CONFIG_ARCH_MX3) || defined(CONFIG_ARCH_MX1) 119 + /* MX1 and MX3 has one interrupt *per* gpio port */ 120 120 static void mx3_gpio_irq_handler(u32 irq, struct irq_desc *desc) 121 121 { 122 122 u32 irq_stat; ··· 237 237 /* its a serious configuration bug when it fails */ 238 238 BUG_ON( gpiochip_add(&port[i].chip) < 0 ); 239 239 240 - #ifdef CONFIG_ARCH_MX3 240 + #if defined(CONFIG_ARCH_MX3) || defined(CONFIG_ARCH_MX1) 241 241 /* setup one handler for each entry */ 242 242 set_irq_chained_handler(port[i].irq, mx3_gpio_irq_handler); 243 243 set_irq_data(port[i].irq, &port[i]);
-5
arch/arm/plat-mxc/include/mach/board-mx27ads.h
··· 28 28 /* 29 29 * MXC UART EVB board level configurations 30 30 */ 31 - 32 - #define MXC_LL_EXTUART_PADDR (CS4_BASE_ADDR + 0x20000) 33 - #define MXC_LL_EXTUART_VADDR (CS4_BASE_ADDR_VIRT + 0x20000) 34 - #define MXC_LL_EXTUART_16BIT_BUS 35 - 36 31 #define MXC_LL_UART_PADDR UART1_BASE_ADDR 37 32 #define MXC_LL_UART_VADDR AIPI_IO_ADDRESS(UART1_BASE_ADDR) 38 33
+19
arch/arm/plat-mxc/include/mach/board-mx31pdk.h
··· 1 + /* 2 + * Copyright 2008 Freescale Semiconductor, Inc. All Rights Reserved. 3 + */ 4 + 5 + /* 6 + * This program is free software; you can redistribute it and/or modify 7 + * it under the terms of the GNU General Public License version 2 as 8 + * published by the Free Software Foundation. 9 + */ 10 + 11 + #ifndef __ASM_ARCH_MXC_BOARD_MX31PDK_H__ 12 + #define __ASM_ARCH_MXC_BOARD_MX31PDK_H__ 13 + 14 + /* mandatory for CONFIG_LL_DEBUG */ 15 + 16 + #define MXC_LL_UART_PADDR UART1_BASE_ADDR 17 + #define MXC_LL_UART_VADDR AIPS1_IO_ADDRESS(UART1_BASE_ADDR) 18 + 19 + #endif /* __ASM_ARCH_MXC_BOARD_MX31PDK_H__ */
+3
arch/arm/plat-mxc/include/mach/debug-macro.S
··· 28 28 #ifdef CONFIG_MACH_PCM038 29 29 #include <mach/board-pcm038.h> 30 30 #endif 31 + #ifdef CONFIG_MACH_MX31_3DS 32 + #include <mach/board-mx31pdk.h> 33 + #endif 31 34 .macro addruart,rx 32 35 mrc p15, 0, \rx, c1, c0 33 36 tst \rx, #1 @ MMU enabled?
+6 -4
arch/arm/plat-mxc/include/mach/dma-mx1-mx2.h
··· 22 22 * MA 02110-1301, USA. 23 23 */ 24 24 25 - #include <mach/dma.h> 26 - 27 25 #ifndef __ASM_ARCH_MXC_DMA_H 28 26 #define __ASM_ARCH_MXC_DMA_H 29 27 30 28 #define IMX_DMA_CHANNELS 16 29 + 30 + #define DMA_MODE_READ 0 31 + #define DMA_MODE_WRITE 1 32 + #define DMA_MODE_MASK 1 31 33 32 34 #define DMA_BASE IO_ADDRESS(DMA_BASE_ADDR) 33 35 ··· 56 54 int 57 55 imx_dma_setup_single(int channel, dma_addr_t dma_address, 58 56 unsigned int dma_length, unsigned int dev_addr, 59 - dmamode_t dmamode); 57 + unsigned int dmamode); 60 58 61 59 int 62 60 imx_dma_setup_sg(int channel, struct scatterlist *sg, 63 61 unsigned int sgcount, unsigned int dma_length, 64 - unsigned int dev_addr, dmamode_t dmamode); 62 + unsigned int dev_addr, unsigned int dmamode); 65 63 66 64 int 67 65 imx_dma_setup_handlers(int channel,
+4
arch/arm/plat-mxc/include/mach/hardware.h
··· 32 32 # endif 33 33 #endif 34 34 35 + #ifdef CONFIG_ARCH_MX1 36 + # include <mach/mx1.h> 37 + #endif 38 + 35 39 #include <mach/mxc.h> 36 40 37 41 #endif /* __ASM_ARCH_MXC_HARDWARE_H__ */
+44 -24
arch/arm/plat-mxc/include/mach/iomux-mx1-mx2.h
··· 21 21 22 22 #include <linux/io.h> 23 23 24 - #define MXC_GPIO_ALLOC_MODE_NORMAL 0 25 - #define MXC_GPIO_ALLOC_MODE_NO_ALLOC 1 26 - #define MXC_GPIO_ALLOC_MODE_TRY_ALLOC 2 27 - #define MXC_GPIO_ALLOC_MODE_ALLOC_ONLY 4 28 - #define MXC_GPIO_ALLOC_MODE_RELEASE 8 29 - 30 24 /* 31 25 * GPIO Module and I/O Multiplexer 32 26 * x = 0..3 for reg_A, reg_B, reg_C, reg_D ··· 97 103 98 104 extern void mxc_gpio_mode(int gpio_mode); 99 105 extern int mxc_gpio_setup_multiple_pins(const int *pin_list, unsigned count, 100 - int alloc_mode, const char *label); 106 + const char *label); 107 + extern void mxc_gpio_release_multiple_pins(const int *pin_list, int count); 101 108 102 109 /*-------------------------------------------------------------------------*/ 103 110 ··· 108 113 * missing on some (many) pins 109 114 */ 110 115 #ifdef CONFIG_ARCH_MX1 111 - #define PA0_AIN_SPI2_CLK (GPIO_GIUS | GPIO_PORTA | GPIO_OUT | 0) 116 + #define PA0_AIN_SPI2_CLK (GPIO_PORTA | GPIO_OUT | 0) 112 117 #define PA0_AF_ETMTRACESYNC (GPIO_PORTA | GPIO_AF | 0) 113 - #define PA1_AOUT_SPI2_RXD (GPIO_GIUS | GPIO_PORTA | GPIO_IN | 1) 118 + #define PA1_AOUT_SPI2_RXD (GPIO_PORTA | GPIO_IN | 1) 114 119 #define PA1_PF_TIN (GPIO_PORTA | GPIO_PF | 1) 115 120 #define PA2_PF_PWM0 (GPIO_PORTA | GPIO_OUT | GPIO_PF | 2) 116 121 #define PA3_PF_CSI_MCLK (GPIO_PORTA | GPIO_PF | 3) ··· 128 133 #define PA15_PF_I2C_SDA (GPIO_PORTA | GPIO_OUT | GPIO_PF | 15) 129 134 #define PA16_PF_I2C_SCL (GPIO_PORTA | GPIO_OUT | GPIO_PF | 16) 130 135 #define PA17_AF_ETMTRACEPKT4 (GPIO_PORTA | GPIO_AF | 17) 131 - #define PA17_AIN_SPI2_SS (GPIO_GIUS | GPIO_PORTA | GPIO_OUT | 17) 136 + #define PA17_AIN_SPI2_SS (GPIO_PORTA | GPIO_OUT | 17) 132 137 #define PA18_AF_ETMTRACEPKT5 (GPIO_PORTA | GPIO_AF | 18) 133 138 #define PA19_AF_ETMTRACEPKT6 (GPIO_PORTA | GPIO_AF | 19) 134 139 #define PA20_AF_ETMTRACEPKT7 (GPIO_PORTA | GPIO_AF | 20) ··· 196 201 #define PC15_PF_SPI1_SS (GPIO_PORTC | GPIO_PF | 15) 197 202 #define PC16_PF_SPI1_MISO (GPIO_PORTC | GPIO_PF | 16) 198 203 #define PC17_PF_SPI1_MOSI (GPIO_PORTC | GPIO_PF | 17) 199 - #define PC24_BIN_UART3_RI (GPIO_GIUS | GPIO_PORTC | GPIO_OUT | GPIO_BIN | 24) 200 - #define PC25_BIN_UART3_DSR (GPIO_GIUS | GPIO_PORTC | GPIO_OUT | GPIO_BIN | 25) 201 - #define PC26_AOUT_UART3_DTR (GPIO_GIUS | GPIO_PORTC | GPIO_IN | 26) 202 - #define PC27_BIN_UART3_DCD (GPIO_GIUS | GPIO_PORTC | GPIO_OUT | GPIO_BIN | 27) 203 - #define PC28_BIN_UART3_CTS (GPIO_GIUS | GPIO_PORTC | GPIO_OUT | GPIO_BIN | 28) 204 - #define PC29_AOUT_UART3_RTS (GPIO_GIUS | GPIO_PORTC | GPIO_IN | 29) 205 - #define PC30_BIN_UART3_TX (GPIO_GIUS | GPIO_PORTC | GPIO_BIN | 30) 206 - #define PC31_AOUT_UART3_RX (GPIO_GIUS | GPIO_PORTC | GPIO_IN | 31) 204 + #define PC24_BIN_UART3_RI (GPIO_PORTC | GPIO_OUT | GPIO_BIN | 24) 205 + #define PC25_BIN_UART3_DSR (GPIO_PORTC | GPIO_OUT | GPIO_BIN | 25) 206 + #define PC26_AOUT_UART3_DTR (GPIO_PORTC | GPIO_IN | 26) 207 + #define PC27_BIN_UART3_DCD (GPIO_PORTC | GPIO_OUT | GPIO_BIN | 27) 208 + #define PC28_BIN_UART3_CTS (GPIO_PORTC | GPIO_OUT | GPIO_BIN | 28) 209 + #define PC29_AOUT_UART3_RTS (GPIO_PORTC | GPIO_IN | 29) 210 + #define PC30_BIN_UART3_TX (GPIO_PORTC | GPIO_BIN | 30) 211 + #define PC31_AOUT_UART3_RX (GPIO_PORTC | GPIO_IN | 31) 207 212 #define PD6_PF_LSCLK (GPIO_PORTD | GPIO_OUT | GPIO_PF | 6) 208 213 #define PD7_PF_REV (GPIO_PORTD | GPIO_PF | 7) 209 - #define PD7_AF_UART2_DTR (GPIO_GIUS | GPIO_PORTD | GPIO_IN | GPIO_AF | 7) 210 - #define PD7_AIN_SPI2_SCLK (GPIO_GIUS | GPIO_PORTD | GPIO_AIN | 7) 214 + #define PD7_AF_UART2_DTR (GPIO_PORTD | GPIO_IN | GPIO_AF | 7) 215 + #define PD7_AIN_SPI2_SCLK (GPIO_PORTD | GPIO_AIN | 7) 211 216 #define PD8_PF_CLS (GPIO_PORTD | GPIO_PF | 8) 212 217 #define PD8_AF_UART2_DCD (GPIO_PORTD | GPIO_OUT | GPIO_AF | 8) 213 - #define PD8_AIN_SPI2_SS (GPIO_GIUS | GPIO_PORTD | GPIO_AIN | 8) 218 + #define PD8_AIN_SPI2_SS (GPIO_PORTD | GPIO_AIN | 8) 214 219 #define PD9_PF_PS (GPIO_PORTD | GPIO_PF | 9) 215 220 #define PD9_AF_UART2_RI (GPIO_PORTD | GPIO_OUT | GPIO_AF | 9) 216 - #define PD9_AOUT_SPI2_RXD (GPIO_GIUS | GPIO_PORTD | GPIO_IN | 9) 221 + #define PD9_AOUT_SPI2_RXD (GPIO_PORTD | GPIO_IN | 9) 217 222 #define PD10_PF_SPL_SPR (GPIO_PORTD | GPIO_OUT | GPIO_PF | 10) 218 223 #define PD10_AF_UART2_DSR (GPIO_PORTD | GPIO_OUT | GPIO_AF | 10) 219 - #define PD10_AIN_SPI2_TXD (GPIO_GIUS | GPIO_PORTD | GPIO_OUT | 10) 224 + #define PD10_AIN_SPI2_TXD (GPIO_PORTD | GPIO_OUT | 10) 220 225 #define PD11_PF_CONTRAST (GPIO_PORTD | GPIO_OUT | GPIO_PF | 11) 221 226 #define PD12_PF_ACD_OE (GPIO_PORTD | GPIO_OUT | GPIO_PF | 12) 222 227 #define PD13_PF_LP_HSYNC (GPIO_PORTD | GPIO_OUT | GPIO_PF | 13) ··· 238 243 #define PD29_PF_LD14 (GPIO_PORTD | GPIO_OUT | GPIO_PF | 29) 239 244 #define PD30_PF_LD15 (GPIO_PORTD | GPIO_OUT | GPIO_PF | 30) 240 245 #define PD31_PF_TMR2OUT (GPIO_PORTD | GPIO_PF | 31) 241 - #define PD31_BIN_SPI2_TXD (GPIO_GIUS | GPIO_PORTD | GPIO_BIN | 31) 246 + #define PD31_BIN_SPI2_TXD (GPIO_PORTD | GPIO_BIN | 31) 242 247 #endif 243 248 244 249 #ifdef CONFIG_ARCH_MX2 ··· 274 279 #define PA29_PF_VSYNC (GPIO_PORTA | GPIO_OUT | GPIO_PF | 29) 275 280 #define PA30_PF_CONTRAST (GPIO_PORTA | GPIO_OUT | GPIO_PF | 30) 276 281 #define PA31_PF_OE_ACD (GPIO_PORTA | GPIO_OUT | GPIO_PF | 31) 282 + #define PB4_PF_SD2_D0 (GPIO_PORTB | GPIO_PF | 4) 283 + #define PB5_PF_SD2_D1 (GPIO_PORTB | GPIO_PF | 5) 284 + #define PB6_PF_SD2_D2 (GPIO_PORTB | GPIO_PF | 6) 285 + #define PB7_PF_SD2_D3 (GPIO_PORTB | GPIO_PF | 7) 286 + #define PB8_PF_SD2_CMD (GPIO_PORTB | GPIO_PF | 8) 287 + #define PB9_PF_SD2_CLK (GPIO_PORTB | GPIO_PF | 9) 277 288 #define PB10_PF_CSI_D0 (GPIO_PORTB | GPIO_OUT | GPIO_PF | 10) 278 289 #define PB10_AF_UART6_TXD (GPIO_PORTB | GPIO_OUT | GPIO_AF | 10) 279 290 #define PB11_PF_CSI_D1 (GPIO_PORTB | GPIO_OUT | GPIO_PF | 11) ··· 316 315 #define PB31_AF_UART4_RXD (GPIO_PORTB | GPIO_IN | GPIO_AF | 31) 317 316 #define PC5_PF_I2C2_SDA (GPIO_PORTC | GPIO_IN | GPIO_PF | 5) 318 317 #define PC6_PF_I2C2_SCL (GPIO_PORTC | GPIO_IN | GPIO_PF | 6) 318 + #define PC7_PF_USBOTG_DATA5 (GPIO_PORTC | GPIO_OUT | GPIO_PF | 7) 319 + #define PC8_PF_USBOTG_DATA6 (GPIO_PORTC | GPIO_OUT | GPIO_PF | 8) 320 + #define PC9_PF_USBOTG_DATA0 (GPIO_PORTC | GPIO_OUT | GPIO_PF | 9) 321 + #define PC10_PF_USBOTG_DATA2 (GPIO_PORTC | GPIO_OUT | GPIO_PF | 10) 322 + #define PC11_PF_USBOTG_DATA1 (GPIO_PORTC | GPIO_OUT | GPIO_PF | 11) 323 + #define PC12_PF_USBOTG_DATA4 (GPIO_PORTC | GPIO_OUT | GPIO_PF | 12) 324 + #define PC13_PF_USBOTG_DATA3 (GPIO_PORTC | GPIO_OUT | GPIO_PF | 13) 319 325 #define PC16_PF_SSI4_FS (GPIO_PORTC | GPIO_IN | GPIO_PF | 16) 320 326 #define PC17_PF_SSI4_RXD (GPIO_PORTC | GPIO_IN | GPIO_PF | 17) 321 327 #define PC18_PF_SSI4_TXD (GPIO_PORTC | GPIO_IN | GPIO_PF | 18) ··· 373 365 #define PD30_PF_CSPI1_MISO (GPIO_PORTD | GPIO_IN | GPIO_PF | 30) 374 366 #define PD31_PF_CSPI1_MOSI (GPIO_PORTD | GPIO_OUT | GPIO_PF | 31) 375 367 #define PF23_AIN_FEC_TX_EN (GPIO_PORTF | GPIO_OUT | GPIO_AIN | 23) 368 + #define PE0_PF_USBOTG_NXT (GPIO_PORTE | GPIO_OUT | GPIO_PF | 0) 369 + #define PE1_PF_USBOTG_STP (GPIO_PORTE | GPIO_OUT | GPIO_PF | 1) 370 + #define PE2_PF_USBOTG_DIR (GPIO_PORTE | GPIO_OUT | GPIO_PF | 2) 376 371 #define PE3_PF_UART2_CTS (GPIO_PORTE | GPIO_OUT | GPIO_PF | 3) 377 372 #define PE4_PF_UART2_RTS (GPIO_PORTE | GPIO_IN | GPIO_PF | 4) 378 373 #define PE6_PF_UART2_TXD (GPIO_PORTE | GPIO_OUT | GPIO_PF | 6) ··· 390 379 #define PE15_PF_UART1_RTS (GPIO_PORTE | GPIO_IN | GPIO_PF | 15) 391 380 #define PE16_AF_RTCK (GPIO_PORTE | GPIO_OUT | GPIO_AF | 16) 392 381 #define PE16_PF_RTCK (GPIO_PORTE | GPIO_OUT | GPIO_PF | 16) 382 + #define PE18_PF_SDHC1_D0 (GPIO_PORTE | GPIO_PF | 18) 393 383 #define PE18_AF_CSPI3_MISO (GPIO_PORTE | GPIO_IN | GPIO_AF | 18) 384 + #define PE19_PF_SDHC1_D1 (GPIO_PORTE | GPIO_PF | 19) 385 + #define PE20_PF_SDHC1_D2 (GPIO_PORTE | GPIO_PF | 20) 386 + #define PE21_PF_SDHC1_D3 (GPIO_PORTE | GPIO_PF | 21) 394 387 #define PE21_AF_CSPI3_SS (GPIO_PORTE | GPIO_OUT | GPIO_AF | 21) 388 + #define PE22_PF_SDHC1_CMD (GPIO_PORTE | GPIO_PF | 22) 395 389 #define PE22_AF_CSPI3_MOSI (GPIO_PORTE | GPIO_OUT | GPIO_AF | 22) 390 + #define PE22_PF_SDHC1_CLK (GPIO_PORTE | GPIO_PF | 23) 396 391 #define PE23_AF_CSPI3_SCLK (GPIO_PORTE | GPIO_OUT | GPIO_AF | 23) 392 + #define PE24_PF_USBOTG_CLK (GPIO_PORTE | GPIO_OUT | GPIO_PF | 24) 393 + #define PE25_PF_USBOTG_DATA7 (GPIO_PORTE | GPIO_OUT | GPIO_PF | 25) 397 394 #endif 398 395 399 396 /* decode irq number to use with IMR(x), ISR(x) and friends */ ··· 411 392 #define IRQ_GPIOB(x) (IRQ_GPIOA(32) + x) 412 393 #define IRQ_GPIOC(x) (IRQ_GPIOB(32) + x) 413 394 #define IRQ_GPIOD(x) (IRQ_GPIOC(32) + x) 395 + #define IRQ_GPIOE(x) (IRQ_GPIOD(32) + x) 414 396 415 397 #endif /* _MXC_GPIO_MX1_MX2_H */
+17
arch/arm/plat-mxc/include/mach/iomux-mx3.h
··· 491 491 #define MX31_PIN_RTS1__RTS1 IOMUX_MODE(MX31_PIN_RTS1, IOMUX_CONFIG_FUNC) 492 492 #define MX31_PIN_TXD1__TXD1 IOMUX_MODE(MX31_PIN_TXD1, IOMUX_CONFIG_FUNC) 493 493 #define MX31_PIN_RXD1__RXD1 IOMUX_MODE(MX31_PIN_RXD1, IOMUX_CONFIG_FUNC) 494 + #define MX31_PIN_CTS2__CTS2 IOMUX_MODE(MX31_PIN_CTS2, IOMUX_CONFIG_FUNC) 495 + #define MX31_PIN_RTS2__RTS2 IOMUX_MODE(MX31_PIN_RTS2, IOMUX_CONFIG_FUNC) 496 + #define MX31_PIN_TXD2__TXD2 IOMUX_MODE(MX31_PIN_TXD2, IOMUX_CONFIG_FUNC) 497 + #define MX31_PIN_RXD2__RXD2 IOMUX_MODE(MX31_PIN_RXD2, IOMUX_CONFIG_FUNC) 498 + #define MX31_PIN_PC_RST__CTS5 IOMUX_MODE(MX31_PIN_PC_RST, IOMUX_CONFIG_ALT2) 499 + #define MX31_PIN_PC_VS2__RTS5 IOMUX_MODE(MX31_PIN_PC_VS2, IOMUX_CONFIG_ALT2) 500 + #define MX31_PIN_PC_BVD2__TXD5 IOMUX_MODE(MX31_PIN_PC_BVD2, IOMUX_CONFIG_ALT2) 501 + #define MX31_PIN_PC_BVD1__RXD5 IOMUX_MODE(MX31_PIN_PC_BVD1, IOMUX_CONFIG_ALT2) 494 502 #define MX31_PIN_CSPI1_MOSI__MOSI IOMUX_MODE(MX31_PIN_CSPI1_MOSI, IOMUX_CONFIG_FUNC) 495 503 #define MX31_PIN_CSPI1_MISO__MISO IOMUX_MODE(MX31_PIN_CSPI1_MISO, IOMUX_CONFIG_FUNC) 496 504 #define MX31_PIN_CSPI1_SCLK__SCLK IOMUX_MODE(MX31_PIN_CSPI1_SCLK, IOMUX_CONFIG_FUNC) ··· 517 509 #define MX31_PIN_CSPI3_MISO__MISO IOMUX_MODE(MX31_PIN_CSPI3_MISO, IOMUX_CONFIG_FUNC) 518 510 #define MX31_PIN_CSPI3_SCLK__SCLK IOMUX_MODE(MX31_PIN_CSPI3_SCLK, IOMUX_CONFIG_FUNC) 519 511 #define MX31_PIN_CSPI3_SPI_RDY__SPI_RDY IOMUX_MODE(MX31_PIN_CSPI3_SPI_RDY, IOMUX_CONFIG_FUNC) 512 + #define MX31_PIN_BATT_LINE__OWIRE IOMUX_MODE(MX31_PIN_BATT_LINE, IOMUX_CONFIG_FUNC) 513 + #define MX31_PIN_CS4__CS4 IOMUX_MODE(MX31_PIN_CS4, IOMUX_CONFIG_FUNC) 514 + #define MX31_PIN_SD1_DATA3__SD1_DATA3 IOMUX_MODE(MX31_PIN_SD1_DATA3, IOMUX_CONFIG_FUNC) 515 + #define MX31_PIN_SD1_DATA2__SD1_DATA2 IOMUX_MODE(MX31_PIN_SD1_DATA2, IOMUX_CONFIG_FUNC) 516 + #define MX31_PIN_SD1_DATA1__SD1_DATA1 IOMUX_MODE(MX31_PIN_SD1_DATA1, IOMUX_CONFIG_FUNC) 517 + #define MX31_PIN_SD1_DATA0__SD1_DATA0 IOMUX_MODE(MX31_PIN_SD1_DATA0, IOMUX_CONFIG_FUNC) 518 + #define MX31_PIN_SD1_CLK__SD1_CLK IOMUX_MODE(MX31_PIN_SD1_CLK, IOMUX_CONFIG_FUNC) 519 + #define MX31_PIN_SD1_CMD__SD1_CMD IOMUX_MODE(MX31_PIN_SD1_CMD, IOMUX_CONFIG_FUNC) 520 + 520 521 /*XXX: The SS0, SS1, SS2, SS3 lines of spi3 are multiplexed by cspi2_ss0, cspi2_ss1, cspi1_ss0 521 522 * cspi1_ss1*/ 522 523
+5
arch/arm/plat-mxc/include/mach/irqs.h
··· 14 14 #include <mach/hardware.h> 15 15 extern void imx_irq_set_priority(unsigned char irq, unsigned char prio); 16 16 17 + /* all normal IRQs can be FIQs */ 18 + #define FIQ_START 0 19 + /* switch betwean IRQ and FIQ */ 20 + extern int mxc_set_irq_fiq(unsigned int irq, unsigned int type); 21 + 17 22 #endif /* __ASM_ARCH_MXC_IRQS_H__ */
+34
arch/arm/plat-mxc/include/mach/mtd-xip.h
··· 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__ */
+197
arch/arm/plat-mxc/include/mach/mx1.h
··· 1 + /* 2 + * Copyright (C) 1997,1998 Russell King 3 + * Copyright (C) 1999 ARM Limited 4 + * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. 5 + * Copyright (c) 2008 Paulius Zaleckas <paulius.zaleckas@teltonika.lt> 6 + * 7 + * This program is free software; you can redistribute it and/or modify 8 + * it under the terms of the GNU General Public License version 2 as 9 + * published by the Free Software Foundation. 10 + */ 11 + 12 + #ifndef __ASM_ARCH_MXC_MX1_H__ 13 + #define __ASM_ARCH_MXC_MX1_H__ 14 + 15 + #ifndef __ASM_ARCH_MXC_HARDWARE_H__ 16 + #error "Do not include directly." 17 + #endif 18 + 19 + #include <mach/vmalloc.h> 20 + 21 + /* 22 + * defines the hardware clock tick rate 23 + */ 24 + #define CLOCK_TICK_RATE 16000000 25 + 26 + #define PHYS_OFFSET UL(0x08000000) 27 + 28 + /* 29 + * Memory map 30 + */ 31 + #define IMX_IO_PHYS 0x00200000 32 + #define IMX_IO_SIZE 0x00100000 33 + #define IMX_IO_BASE VMALLOC_END 34 + 35 + #define IMX_CS0_PHYS 0x10000000 36 + #define IMX_CS0_SIZE 0x02000000 37 + 38 + #define IMX_CS1_PHYS 0x12000000 39 + #define IMX_CS1_SIZE 0x01000000 40 + 41 + #define IMX_CS2_PHYS 0x13000000 42 + #define IMX_CS2_SIZE 0x01000000 43 + 44 + #define IMX_CS3_PHYS 0x14000000 45 + #define IMX_CS3_SIZE 0x01000000 46 + 47 + #define IMX_CS4_PHYS 0x15000000 48 + #define IMX_CS4_SIZE 0x01000000 49 + 50 + #define IMX_CS5_PHYS 0x16000000 51 + #define IMX_CS5_SIZE 0x01000000 52 + 53 + /* 54 + * Register BASEs, based on OFFSETs 55 + */ 56 + #define AIPI1_BASE_ADDR (0x00000 + IMX_IO_PHYS) 57 + #define WDT_BASE_ADDR (0x01000 + IMX_IO_PHYS) 58 + #define TIM1_BASE_ADDR (0x02000 + IMX_IO_PHYS) 59 + #define TIM2_BASE_ADDR (0x03000 + IMX_IO_PHYS) 60 + #define RTC_BASE_ADDR (0x04000 + IMX_IO_PHYS) 61 + #define LCDC_BASE_ADDR (0x05000 + IMX_IO_PHYS) 62 + #define UART1_BASE_ADDR (0x06000 + IMX_IO_PHYS) 63 + #define UART2_BASE_ADDR (0x07000 + IMX_IO_PHYS) 64 + #define PWM_BASE_ADDR (0x08000 + IMX_IO_PHYS) 65 + #define DMA_BASE_ADDR (0x09000 + IMX_IO_PHYS) 66 + #define AIPI2_BASE_ADDR (0x10000 + IMX_IO_PHYS) 67 + #define SIM_BASE_ADDR (0x11000 + IMX_IO_PHYS) 68 + #define USBD_BASE_ADDR (0x12000 + IMX_IO_PHYS) 69 + #define SPI1_BASE_ADDR (0x13000 + IMX_IO_PHYS) 70 + #define MMC_BASE_ADDR (0x14000 + IMX_IO_PHYS) 71 + #define ASP_BASE_ADDR (0x15000 + IMX_IO_PHYS) 72 + #define BTA_BASE_ADDR (0x16000 + IMX_IO_PHYS) 73 + #define I2C_BASE_ADDR (0x17000 + IMX_IO_PHYS) 74 + #define SSI_BASE_ADDR (0x18000 + IMX_IO_PHYS) 75 + #define SPI2_BASE_ADDR (0x19000 + IMX_IO_PHYS) 76 + #define MSHC_BASE_ADDR (0x1A000 + IMX_IO_PHYS) 77 + #define CCM_BASE_ADDR (0x1B000 + IMX_IO_PHYS) 78 + #define SCM_BASE_ADDR (0x1B804 + IMX_IO_PHYS) 79 + #define GPIO_BASE_ADDR (0x1C000 + IMX_IO_PHYS) 80 + #define EIM_BASE_ADDR (0x20000 + IMX_IO_PHYS) 81 + #define SDRAMC_BASE_ADDR (0x21000 + IMX_IO_PHYS) 82 + #define MMA_BASE_ADDR (0x22000 + IMX_IO_PHYS) 83 + #define AVIC_BASE_ADDR (0x23000 + IMX_IO_PHYS) 84 + #define CSI_BASE_ADDR (0x24000 + IMX_IO_PHYS) 85 + 86 + /* macro to get at IO space when running virtually */ 87 + #define IO_ADDRESS(x) ((x) - IMX_IO_PHYS + IMX_IO_BASE) 88 + 89 + /* define macros needed for entry-macro.S */ 90 + #define AVIC_IO_ADDRESS(x) IO_ADDRESS(x) 91 + 92 + /* fixed interrput numbers */ 93 + #define INT_SOFTINT 0 94 + #define CSI_INT 6 95 + #define DSPA_MAC_INT 7 96 + #define DSPA_INT 8 97 + #define COMP_INT 9 98 + #define MSHC_XINT 10 99 + #define GPIO_INT_PORTA 11 100 + #define GPIO_INT_PORTB 12 101 + #define GPIO_INT_PORTC 13 102 + #define LCDC_INT 14 103 + #define SIM_INT 15 104 + #define SIM_DATA_INT 16 105 + #define RTC_INT 17 106 + #define RTC_SAMINT 18 107 + #define UART2_MINT_PFERR 19 108 + #define UART2_MINT_RTS 20 109 + #define UART2_MINT_DTR 21 110 + #define UART2_MINT_UARTC 22 111 + #define UART2_MINT_TX 23 112 + #define UART2_MINT_RX 24 113 + #define UART1_MINT_PFERR 25 114 + #define UART1_MINT_RTS 26 115 + #define UART1_MINT_DTR 27 116 + #define UART1_MINT_UARTC 28 117 + #define UART1_MINT_TX 29 118 + #define UART1_MINT_RX 30 119 + #define VOICE_DAC_INT 31 120 + #define VOICE_ADC_INT 32 121 + #define PEN_DATA_INT 33 122 + #define PWM_INT 34 123 + #define SDHC_INT 35 124 + #define I2C_INT 39 125 + #define CSPI_INT 41 126 + #define SSI_TX_INT 42 127 + #define SSI_TX_ERR_INT 43 128 + #define SSI_RX_INT 44 129 + #define SSI_RX_ERR_INT 45 130 + #define TOUCH_INT 46 131 + #define USBD_INT0 47 132 + #define USBD_INT1 48 133 + #define USBD_INT2 49 134 + #define USBD_INT3 50 135 + #define USBD_INT4 51 136 + #define USBD_INT5 52 137 + #define USBD_INT6 53 138 + #define BTSYS_INT 55 139 + #define BTTIM_INT 56 140 + #define BTWUI_INT 57 141 + #define TIM2_INT 58 142 + #define TIM1_INT 59 143 + #define DMA_ERR 60 144 + #define DMA_INT 61 145 + #define GPIO_INT_PORTD 62 146 + #define WDT_INT 63 147 + 148 + #define MXC_MAX_INT_LINES 64 149 + 150 + #define NR_IRQS 256 151 + 152 + /* gpio and gpio based interrupt handling */ 153 + #define GPIO_DR 0x1C 154 + #define GPIO_GDIR 0x00 155 + #define GPIO_PSR 0x24 156 + #define GPIO_ICR1 0x28 157 + #define GPIO_ICR2 0x2C 158 + #define GPIO_IMR 0x30 159 + #define GPIO_ISR 0x34 160 + #define GPIO_INT_LOW_LEV 0x3 161 + #define GPIO_INT_HIGH_LEV 0x2 162 + #define GPIO_INT_RISE_EDGE 0x0 163 + #define GPIO_INT_FALL_EDGE 0x1 164 + #define GPIO_INT_NONE 0x4 165 + 166 + /* DMA */ 167 + #define DMA_REQ_UART3_T 2 168 + #define DMA_REQ_UART3_R 3 169 + #define DMA_REQ_SSI2_T 4 170 + #define DMA_REQ_SSI2_R 5 171 + #define DMA_REQ_CSI_STAT 6 172 + #define DMA_REQ_CSI_R 7 173 + #define DMA_REQ_MSHC 8 174 + #define DMA_REQ_DSPA_DCT_DOUT 9 175 + #define DMA_REQ_DSPA_DCT_DIN 10 176 + #define DMA_REQ_DSPA_MAC 11 177 + #define DMA_REQ_EXT 12 178 + #define DMA_REQ_SDHC 13 179 + #define DMA_REQ_SPI1_R 14 180 + #define DMA_REQ_SPI1_T 15 181 + #define DMA_REQ_SSI_T 16 182 + #define DMA_REQ_SSI_R 17 183 + #define DMA_REQ_ASP_DAC 18 184 + #define DMA_REQ_ASP_ADC 19 185 + #define DMA_REQ_USP_EP(x) (20 + (x)) 186 + #define DMA_REQ_SPI2_R 26 187 + #define DMA_REQ_SPI2_T 27 188 + #define DMA_REQ_UART2_T 28 189 + #define DMA_REQ_UART2_R 29 190 + #define DMA_REQ_UART1_T 30 191 + #define DMA_REQ_UART1_R 31 192 + 193 + /* mandatory for CONFIG_LL_DEBUG */ 194 + #define MXC_LL_UART_PADDR UART1_BASE_ADDR 195 + #define MXC_LL_UART_VADDR IO_ADDRESS(UART1_BASE_ADDR) 196 + 197 + #endif /* __ASM_ARCH_MXC_MX1_H__ */
+2 -1
arch/arm/plat-mxc/include/mach/mx27.h
··· 72 72 /* for mx27*/ 73 73 #define OTG_BASE_ADDR USBOTG_BASE_ADDR 74 74 #define SAHARA_BASE_ADDR (AIPI_BASE_ADDR + 0x25000) 75 - #define EMMA_BASE_ADDR (AIPI_BASE_ADDR + 0x26400) 75 + #define EMMA_PP_BASE_ADDR (AIPI_BASE_ADDR + 0x26000) 76 + #define EMMA_PRP_BASE_ADDR (AIPI_BASE_ADDR + 0x26400) 76 77 #define CCM_BASE_ADDR (AIPI_BASE_ADDR + 0x27000) 77 78 #define SYSCTRL_BASE_ADDR (AIPI_BASE_ADDR + 0x27800) 78 79 #define IIM_BASE_ADDR (AIPI_BASE_ADDR + 0x28000)
+2 -2
arch/arm/plat-mxc/include/mach/mxc_timer.h
··· 26 26 #include <linux/clk.h> 27 27 #include <mach/hardware.h> 28 28 29 - #ifdef CONFIG_ARCH_IMX 29 + #ifdef CONFIG_ARCH_MX1 30 30 #define TIMER_BASE IO_ADDRESS(TIM1_BASE_ADDR) 31 31 #define TIMER_INTERRUPT TIM1_INT 32 32 ··· 65 65 { 66 66 __raw_writel(0, TIMER_BASE + MXC_TSTAT); 67 67 } 68 - #endif /* CONFIG_ARCH_IMX */ 68 + #endif /* CONFIG_ARCH_MX1 */ 69 69 70 70 #ifdef CONFIG_ARCH_MX2 71 71 #define TIMER_BASE IO_ADDRESS(GPT1_BASE_ADDR)
+22 -21
arch/arm/plat-mxc/iomux-mx1-mx2.c
··· 110 110 EXPORT_SYMBOL(mxc_gpio_mode); 111 111 112 112 int mxc_gpio_setup_multiple_pins(const int *pin_list, unsigned count, 113 - int alloc_mode, const char *label) 113 + const char *label) 114 114 { 115 115 const int *p = pin_list; 116 116 int i; 117 117 unsigned gpio; 118 118 unsigned mode; 119 + int ret = -EINVAL; 119 120 120 121 for (i = 0; i < count; i++) { 121 122 gpio = *p & (GPIO_PIN_MASK | GPIO_PORT_MASK); ··· 125 124 if (gpio >= (GPIO_PORT_MAX + 1) * 32) 126 125 goto setup_error; 127 126 128 - if (alloc_mode & MXC_GPIO_ALLOC_MODE_RELEASE) 129 - gpio_free(gpio); 130 - else if (!(alloc_mode & MXC_GPIO_ALLOC_MODE_NO_ALLOC)) 131 - if (gpio_request(gpio, label) 132 - && !(alloc_mode & MXC_GPIO_ALLOC_MODE_TRY_ALLOC)) 133 - goto setup_error; 127 + ret = gpio_request(gpio, label); 128 + if (ret) 129 + goto setup_error; 134 130 135 - if (!(alloc_mode & (MXC_GPIO_ALLOC_MODE_ALLOC_ONLY | 136 - MXC_GPIO_ALLOC_MODE_RELEASE))) 137 - mxc_gpio_mode(gpio | mode); 131 + mxc_gpio_mode(gpio | mode); 138 132 139 133 p++; 140 134 } 141 135 return 0; 142 136 143 137 setup_error: 144 - if (alloc_mode & (MXC_GPIO_ALLOC_MODE_NO_ALLOC | 145 - MXC_GPIO_ALLOC_MODE_TRY_ALLOC)) 146 - return -EINVAL; 147 - 148 - while (p != pin_list) { 149 - p--; 150 - gpio = *p & (GPIO_PIN_MASK | GPIO_PORT_MASK); 151 - gpio_free(gpio); 152 - } 153 - 154 - return -EINVAL; 138 + mxc_gpio_release_multiple_pins(pin_list, i); 139 + return ret; 155 140 } 156 141 EXPORT_SYMBOL(mxc_gpio_setup_multiple_pins); 142 + 143 + void mxc_gpio_release_multiple_pins(const int *pin_list, int count) 144 + { 145 + const int *p = pin_list; 146 + int i; 147 + 148 + for (i = 0; i < count; i++) { 149 + unsigned gpio = *p & (GPIO_PIN_MASK | GPIO_PORT_MASK); 150 + gpio_free(gpio); 151 + p++; 152 + } 153 + 154 + } 155 + EXPORT_SYMBOL(mxc_gpio_release_multiple_pins); 157 156
+29 -1
arch/arm/plat-mxc/irq.c
··· 17 17 * MA 02110-1301, USA. 18 18 */ 19 19 20 + #include <linux/module.h> 20 21 #include <linux/irq.h> 21 22 #include <linux/io.h> 22 23 #include <mach/common.h> 24 + #include <asm/mach/irq.h> 23 25 24 26 #define AVIC_BASE IO_ADDRESS(AVIC_BASE_ADDR) 25 27 #define AVIC_INTCNTL (AVIC_BASE + 0x00) /* int control reg */ ··· 67 65 EXPORT_SYMBOL(imx_irq_set_priority); 68 66 #endif 69 67 68 + #ifdef CONFIG_FIQ 69 + int mxc_set_irq_fiq(unsigned int irq, unsigned int type) 70 + { 71 + unsigned int irqt; 72 + 73 + if (irq >= MXC_MAX_INT_LINES) 74 + return -EINVAL; 75 + 76 + if (irq < MXC_MAX_INT_LINES / 2) { 77 + irqt = __raw_readl(AVIC_INTTYPEL) & ~(1 << irq); 78 + __raw_writel(irqt | (!!type << irq), AVIC_INTTYPEL); 79 + } else { 80 + irq -= MXC_MAX_INT_LINES / 2; 81 + irqt = __raw_readl(AVIC_INTTYPEH) & ~(1 << irq); 82 + __raw_writel(irqt | (!!type << irq), AVIC_INTTYPEH); 83 + } 84 + 85 + return 0; 86 + } 87 + EXPORT_SYMBOL(mxc_set_irq_fiq); 88 + #endif /* CONFIG_FIQ */ 89 + 70 90 /* Disable interrupt number "irq" in the AVIC */ 71 91 static void mxc_mask_irq(unsigned int irq) 72 92 { ··· 115 91 void __init mxc_init_irq(void) 116 92 { 117 93 int i; 118 - u32 reg; 119 94 120 95 /* put the AVIC into the reset value with 121 96 * all interrupts disabled ··· 141 118 142 119 /* init architectures chained interrupt handler */ 143 120 mxc_register_gpios(); 121 + 122 + #ifdef CONFIG_FIQ 123 + /* Initialize FIQ */ 124 + init_FIQ(); 125 + #endif 144 126 145 127 printk(KERN_INFO "MXC IRQ initialized\n"); 146 128 }
+241 -218
drivers/mmc/host/imxmmc.c
··· 10 10 * it under the terms of the GNU General Public License version 2 as 11 11 * published by the Free Software Foundation. 12 12 * 13 - * 2005-04-17 Pavel Pisa <pisa@cmp.felk.cvut.cz> 14 - * Changed to conform redesigned i.MX scatter gather DMA interface 15 - * 16 - * 2005-11-04 Pavel Pisa <pisa@cmp.felk.cvut.cz> 17 - * Updated for 2.6.14 kernel 18 - * 19 - * 2005-12-13 Jay Monkman <jtm@smoothsmoothie.com> 20 - * Found and corrected problems in the write path 21 - * 22 - * 2005-12-30 Pavel Pisa <pisa@cmp.felk.cvut.cz> 23 - * The event handling rewritten right way in softirq. 24 - * Added many ugly hacks and delays to overcome SDHC 25 - * deficiencies 26 - * 27 13 */ 28 14 29 15 #include <linux/module.h> ··· 23 37 #include <linux/mmc/card.h> 24 38 #include <linux/delay.h> 25 39 #include <linux/clk.h> 40 + #include <linux/io.h> 26 41 27 42 #include <asm/dma.h> 28 - #include <asm/io.h> 29 43 #include <asm/irq.h> 30 44 #include <asm/sizes.h> 31 45 #include <mach/mmc.h> ··· 36 50 #define DRIVER_NAME "imx-mmc" 37 51 38 52 #define IMXMCI_INT_MASK_DEFAULT (INT_MASK_BUF_READY | INT_MASK_DATA_TRAN | \ 39 - INT_MASK_WRITE_OP_DONE | INT_MASK_END_CMD_RES | \ 40 - INT_MASK_AUTO_CARD_DETECT | INT_MASK_DAT0_EN | INT_MASK_SDIO) 53 + INT_MASK_WRITE_OP_DONE | INT_MASK_END_CMD_RES | \ 54 + INT_MASK_AUTO_CARD_DETECT | INT_MASK_DAT0_EN | INT_MASK_SDIO) 41 55 42 56 struct imxmci_host { 43 57 struct mmc_host *mmc; 44 58 spinlock_t lock; 45 59 struct resource *res; 60 + void __iomem *base; 46 61 int irq; 47 62 imx_dmach_t dma; 48 - unsigned int clkrt; 49 - unsigned int cmdat; 50 63 volatile unsigned int imask; 51 64 unsigned int power_mode; 52 65 unsigned int present; ··· 59 74 struct tasklet_struct tasklet; 60 75 unsigned int status_reg; 61 76 unsigned long pending_events; 62 - /* Next to fields are there for CPU driven transfers to overcome SDHC deficiencies */ 77 + /* Next two fields are there for CPU driven transfers to overcome SDHC deficiencies */ 63 78 u16 *data_ptr; 64 79 unsigned int data_cnt; 65 80 atomic_t stuck_timeout; ··· 99 114 static void imxmci_stop_clock(struct imxmci_host *host) 100 115 { 101 116 int i = 0; 102 - MMC_STR_STP_CLK &= ~STR_STP_CLK_START_CLK; 103 - while(i < 0x1000) { 104 - if(!(i & 0x7f)) 105 - MMC_STR_STP_CLK |= STR_STP_CLK_STOP_CLK; 117 + u16 reg; 106 118 107 - if(!(MMC_STATUS & STATUS_CARD_BUS_CLK_RUN)) { 119 + reg = readw(host->base + MMC_REG_STR_STP_CLK); 120 + writew(reg & ~STR_STP_CLK_START_CLK, host->base + MMC_REG_STR_STP_CLK); 121 + while (i < 0x1000) { 122 + if (!(i & 0x7f)) { 123 + reg = readw(host->base + MMC_REG_STR_STP_CLK); 124 + writew(reg | STR_STP_CLK_STOP_CLK, 125 + host->base + MMC_REG_STR_STP_CLK); 126 + } 127 + 128 + reg = readw(host->base + MMC_REG_STATUS); 129 + if (!(reg & STATUS_CARD_BUS_CLK_RUN)) { 108 130 /* Check twice before cut */ 109 - if(!(MMC_STATUS & STATUS_CARD_BUS_CLK_RUN)) 131 + reg = readw(host->base + MMC_REG_STATUS); 132 + if (!(reg & STATUS_CARD_BUS_CLK_RUN)) 110 133 return; 111 134 } 112 135 ··· 128 135 unsigned int trials = 0; 129 136 unsigned int delay_limit = 128; 130 137 unsigned long flags; 138 + u16 reg; 131 139 132 - MMC_STR_STP_CLK &= ~STR_STP_CLK_STOP_CLK; 140 + reg = readw(host->base + MMC_REG_STR_STP_CLK); 141 + writew(reg & ~STR_STP_CLK_STOP_CLK, host->base + MMC_REG_STR_STP_CLK); 133 142 134 143 clear_bit(IMXMCI_PEND_STARTED_b, &host->pending_events); 135 144 ··· 140 145 * then 6 delay loops, but during card detection (low clockrate) 141 146 * it takes up to 5000 delay loops and sometimes fails for the first time 142 147 */ 143 - MMC_STR_STP_CLK |= STR_STP_CLK_START_CLK; 148 + reg = readw(host->base + MMC_REG_STR_STP_CLK); 149 + writew(reg | STR_STP_CLK_START_CLK, host->base + MMC_REG_STR_STP_CLK); 144 150 145 151 do { 146 152 unsigned int delay = delay_limit; 147 153 148 - while(delay--){ 149 - if(MMC_STATUS & STATUS_CARD_BUS_CLK_RUN) 154 + while (delay--) { 155 + reg = readw(host->base + MMC_REG_STATUS); 156 + if (reg & STATUS_CARD_BUS_CLK_RUN) 150 157 /* Check twice before cut */ 151 - if(MMC_STATUS & STATUS_CARD_BUS_CLK_RUN) 158 + reg = readw(host->base + MMC_REG_STATUS); 159 + if (reg & STATUS_CARD_BUS_CLK_RUN) 152 160 return 0; 153 161 154 - if(test_bit(IMXMCI_PEND_STARTED_b, &host->pending_events)) 162 + if (test_bit(IMXMCI_PEND_STARTED_b, &host->pending_events)) 155 163 return 0; 156 164 } 157 165 ··· 165 167 * IRQ or schedule delays this function execution and the clocks has 166 168 * been already stopped by other means (response processing, SDHC HW) 167 169 */ 168 - if(!test_bit(IMXMCI_PEND_STARTED_b, &host->pending_events)) 169 - MMC_STR_STP_CLK |= STR_STP_CLK_START_CLK; 170 + if (!test_bit(IMXMCI_PEND_STARTED_b, &host->pending_events)) { 171 + reg = readw(host->base + MMC_REG_STR_STP_CLK); 172 + writew(reg | STR_STP_CLK_START_CLK, 173 + host->base + MMC_REG_STR_STP_CLK); 174 + } 170 175 local_irq_restore(flags); 171 176 172 - } while(++trials<256); 177 + } while (++trials < 256); 173 178 174 179 dev_err(mmc_dev(host->mmc), "imxmci_start_clock blocked, no luck\n"); 175 180 176 181 return -1; 177 182 } 178 183 179 - static void imxmci_softreset(void) 184 + static void imxmci_softreset(struct imxmci_host *host) 180 185 { 181 - /* reset sequence */ 182 - MMC_STR_STP_CLK = 0x8; 183 - MMC_STR_STP_CLK = 0xD; 184 - MMC_STR_STP_CLK = 0x5; 185 - MMC_STR_STP_CLK = 0x5; 186 - MMC_STR_STP_CLK = 0x5; 187 - MMC_STR_STP_CLK = 0x5; 188 - MMC_STR_STP_CLK = 0x5; 189 - MMC_STR_STP_CLK = 0x5; 190 - MMC_STR_STP_CLK = 0x5; 191 - MMC_STR_STP_CLK = 0x5; 186 + int i; 192 187 193 - MMC_RES_TO = 0xff; 194 - MMC_BLK_LEN = 512; 195 - MMC_NOB = 1; 188 + /* reset sequence */ 189 + writew(0x08, host->base + MMC_REG_STR_STP_CLK); 190 + writew(0x0D, host->base + MMC_REG_STR_STP_CLK); 191 + 192 + for (i = 0; i < 8; i++) 193 + writew(0x05, host->base + MMC_REG_STR_STP_CLK); 194 + 195 + writew(0xff, host->base + MMC_REG_RES_TO); 196 + writew(512, host->base + MMC_REG_BLK_LEN); 197 + writew(1, host->base + MMC_REG_NOB); 196 198 } 197 199 198 200 static int imxmci_busy_wait_for_status(struct imxmci_host *host, 199 - unsigned int *pstat, unsigned int stat_mask, 200 - int timeout, const char *where) 201 + unsigned int *pstat, unsigned int stat_mask, 202 + int timeout, const char *where) 201 203 { 202 - int loops=0; 203 - while(!(*pstat & stat_mask)) { 204 - loops+=2; 205 - if(loops >= timeout) { 204 + int loops = 0; 205 + 206 + while (!(*pstat & stat_mask)) { 207 + loops += 2; 208 + if (loops >= timeout) { 206 209 dev_dbg(mmc_dev(host->mmc), "busy wait timeout in %s, STATUS = 0x%x (0x%x)\n", 207 210 where, *pstat, stat_mask); 208 211 return -1; 209 212 } 210 213 udelay(2); 211 - *pstat |= MMC_STATUS; 214 + *pstat |= readw(host->base + MMC_REG_STATUS); 212 215 } 213 - if(!loops) 216 + if (!loops) 214 217 return 0; 215 218 216 219 /* The busy-wait is expected there for clock <8MHz due to SDHC hardware flaws */ 217 - if(!(stat_mask & STATUS_END_CMD_RESP) || (host->mmc->ios.clock>=8000000)) 220 + if (!(stat_mask & STATUS_END_CMD_RESP) || (host->mmc->ios.clock >= 8000000)) 218 221 dev_info(mmc_dev(host->mmc), "busy wait for %d usec in %s, STATUS = 0x%x (0x%x)\n", 219 - loops, where, *pstat, stat_mask); 222 + loops, where, *pstat, stat_mask); 220 223 return loops; 221 224 } 222 225 ··· 234 235 host->data = data; 235 236 data->bytes_xfered = 0; 236 237 237 - MMC_NOB = nob; 238 - MMC_BLK_LEN = blksz; 238 + writew(nob, host->base + MMC_REG_NOB); 239 + writew(blksz, host->base + MMC_REG_BLK_LEN); 239 240 240 241 /* 241 242 * DMA cannot be used for small block sizes, we have to use CPU driven transfers otherwise. ··· 251 252 host->dma_dir = DMA_FROM_DEVICE; 252 253 253 254 /* Hack to enable read SCR */ 254 - MMC_NOB = 1; 255 - MMC_BLK_LEN = 512; 255 + writew(1, host->base + MMC_REG_NOB); 256 + writew(512, host->base + MMC_REG_BLK_LEN); 256 257 } else { 257 258 host->dma_dir = DMA_TO_DEVICE; 258 259 } 259 260 260 261 /* Convert back to virtual address */ 261 - host->data_ptr = (u16*)sg_virt(data->sg); 262 + host->data_ptr = (u16 *)sg_virt(data->sg); 262 263 host->data_cnt = 0; 263 264 264 265 clear_bit(IMXMCI_PEND_DMA_DATA_b, &host->pending_events); ··· 270 271 if (data->flags & MMC_DATA_READ) { 271 272 host->dma_dir = DMA_FROM_DEVICE; 272 273 host->dma_nents = dma_map_sg(mmc_dev(host->mmc), data->sg, 273 - data->sg_len, host->dma_dir); 274 + data->sg_len, host->dma_dir); 274 275 275 276 imx_dma_setup_sg(host->dma, data->sg, data->sg_len, datasz, 276 - host->res->start + MMC_BUFFER_ACCESS_OFS, DMA_MODE_READ); 277 + host->res->start + MMC_REG_BUFFER_ACCESS, 278 + DMA_MODE_READ); 277 279 278 280 /*imx_dma_setup_mem2dev_ccr(host->dma, DMA_MODE_READ, IMX_DMA_WIDTH_16, CCR_REN);*/ 279 281 CCR(host->dma) = CCR_DMOD_LINEAR | CCR_DSIZ_32 | CCR_SMOD_FIFO | CCR_SSIZ_16 | CCR_REN; ··· 282 282 host->dma_dir = DMA_TO_DEVICE; 283 283 284 284 host->dma_nents = dma_map_sg(mmc_dev(host->mmc), data->sg, 285 - data->sg_len, host->dma_dir); 285 + data->sg_len, host->dma_dir); 286 286 287 287 imx_dma_setup_sg(host->dma, data->sg, data->sg_len, datasz, 288 - host->res->start + MMC_BUFFER_ACCESS_OFS, DMA_MODE_WRITE); 288 + host->res->start + MMC_REG_BUFFER_ACCESS, 289 + DMA_MODE_WRITE); 289 290 290 291 /*imx_dma_setup_mem2dev_ccr(host->dma, DMA_MODE_WRITE, IMX_DMA_WIDTH_16, CCR_REN);*/ 291 292 CCR(host->dma) = CCR_SMOD_LINEAR | CCR_SSIZ_32 | CCR_DMOD_FIFO | CCR_DSIZ_16 | CCR_REN; ··· 294 293 295 294 #if 1 /* This code is there only for consistency checking and can be disabled in future */ 296 295 host->dma_size = 0; 297 - for(i=0; i<host->dma_nents; i++) 298 - host->dma_size+=data->sg[i].length; 296 + for (i = 0; i < host->dma_nents; i++) 297 + host->dma_size += data->sg[i].length; 299 298 300 299 if (datasz > host->dma_size) { 301 300 dev_err(mmc_dev(host->mmc), "imxmci_setup_data datasz 0x%x > 0x%x dm_size\n", 302 - datasz, host->dma_size); 301 + datasz, host->dma_size); 303 302 } 304 303 #endif 305 304 ··· 307 306 308 307 wmb(); 309 308 310 - if(host->actual_bus_width == MMC_BUS_WIDTH_4) 309 + if (host->actual_bus_width == MMC_BUS_WIDTH_4) 311 310 BLR(host->dma) = 0; /* burst 64 byte read / 64 bytes write */ 312 311 else 313 312 BLR(host->dma) = 16; /* burst 16 byte read / 16 bytes write */ ··· 318 317 clear_bit(IMXMCI_PEND_CPU_DATA_b, &host->pending_events); 319 318 320 319 /* start DMA engine for read, write is delayed after initial response */ 321 - if (host->dma_dir == DMA_FROM_DEVICE) { 320 + if (host->dma_dir == DMA_FROM_DEVICE) 322 321 imx_dma_enable(host->dma); 323 - } 324 322 } 325 323 326 324 static void imxmci_start_cmd(struct imxmci_host *host, struct mmc_command *cmd, unsigned int cmdat) ··· 351 351 break; 352 352 } 353 353 354 - if ( test_and_clear_bit(IMXMCI_PEND_SET_INIT_b, &host->pending_events) ) 354 + if (test_and_clear_bit(IMXMCI_PEND_SET_INIT_b, &host->pending_events)) 355 355 cmdat |= CMD_DAT_CONT_INIT; /* This command needs init */ 356 356 357 - if ( host->actual_bus_width == MMC_BUS_WIDTH_4 ) 357 + if (host->actual_bus_width == MMC_BUS_WIDTH_4) 358 358 cmdat |= CMD_DAT_CONT_BUS_WIDTH_4; 359 359 360 - MMC_CMD = cmd->opcode; 361 - MMC_ARGH = cmd->arg >> 16; 362 - MMC_ARGL = cmd->arg & 0xffff; 363 - MMC_CMD_DAT_CONT = cmdat; 360 + writew(cmd->opcode, host->base + MMC_REG_CMD); 361 + writew(cmd->arg >> 16, host->base + MMC_REG_ARGH); 362 + writew(cmd->arg & 0xffff, host->base + MMC_REG_ARGL); 363 + writew(cmdat, host->base + MMC_REG_CMD_DAT_CONT); 364 364 365 365 atomic_set(&host->stuck_timeout, 0); 366 366 set_bit(IMXMCI_PEND_WAIT_RESP_b, &host->pending_events); ··· 368 368 369 369 imask = IMXMCI_INT_MASK_DEFAULT; 370 370 imask &= ~INT_MASK_END_CMD_RES; 371 - if ( cmdat & CMD_DAT_CONT_DATA_ENABLE ) { 372 - /*imask &= ~INT_MASK_BUF_READY;*/ 371 + if (cmdat & CMD_DAT_CONT_DATA_ENABLE) { 372 + /* imask &= ~INT_MASK_BUF_READY; */ 373 373 imask &= ~INT_MASK_DATA_TRAN; 374 - if ( cmdat & CMD_DAT_CONT_WRITE ) 374 + if (cmdat & CMD_DAT_CONT_WRITE) 375 375 imask &= ~INT_MASK_WRITE_OP_DONE; 376 - if(test_bit(IMXMCI_PEND_CPU_DATA_b, &host->pending_events)) 376 + if (test_bit(IMXMCI_PEND_CPU_DATA_b, &host->pending_events)) 377 377 imask &= ~INT_MASK_BUF_READY; 378 378 } 379 379 380 380 spin_lock_irqsave(&host->lock, flags); 381 381 host->imask = imask; 382 - MMC_INT_MASK = host->imask; 382 + writew(host->imask, host->base + MMC_REG_INT_MASK); 383 383 spin_unlock_irqrestore(&host->lock, flags); 384 384 385 385 dev_dbg(mmc_dev(host->mmc), "CMD%02d (0x%02x) mask set to 0x%04x\n", ··· 395 395 spin_lock_irqsave(&host->lock, flags); 396 396 397 397 host->pending_events &= ~(IMXMCI_PEND_WAIT_RESP_m | IMXMCI_PEND_DMA_END_m | 398 - IMXMCI_PEND_DMA_DATA_m | IMXMCI_PEND_CPU_DATA_m); 398 + IMXMCI_PEND_DMA_DATA_m | IMXMCI_PEND_CPU_DATA_m); 399 399 400 400 host->imask = IMXMCI_INT_MASK_DEFAULT; 401 - MMC_INT_MASK = host->imask; 401 + writew(host->imask, host->base + MMC_REG_INT_MASK); 402 402 403 403 spin_unlock_irqrestore(&host->lock, flags); 404 404 405 - if(req && req->cmd) 405 + if (req && req->cmd) 406 406 host->prev_cmd_code = req->cmd->opcode; 407 407 408 408 host->req = NULL; ··· 416 416 struct mmc_data *data = host->data; 417 417 int data_error; 418 418 419 - if(test_and_clear_bit(IMXMCI_PEND_DMA_DATA_b, &host->pending_events)){ 419 + if (test_and_clear_bit(IMXMCI_PEND_DMA_DATA_b, &host->pending_events)) { 420 420 imx_dma_disable(host->dma); 421 421 dma_unmap_sg(mmc_dev(host->mmc), data->sg, host->dma_nents, 422 422 host->dma_dir); 423 423 } 424 424 425 - if ( stat & STATUS_ERR_MASK ) { 426 - dev_dbg(mmc_dev(host->mmc), "request failed. status: 0x%08x\n",stat); 427 - if(stat & (STATUS_CRC_READ_ERR | STATUS_CRC_WRITE_ERR)) 425 + if (stat & STATUS_ERR_MASK) { 426 + dev_dbg(mmc_dev(host->mmc), "request failed. status: 0x%08x\n", stat); 427 + if (stat & (STATUS_CRC_READ_ERR | STATUS_CRC_WRITE_ERR)) 428 428 data->error = -EILSEQ; 429 - else if(stat & STATUS_TIME_OUT_READ) 429 + else if (stat & STATUS_TIME_OUT_READ) 430 430 data->error = -ETIMEDOUT; 431 431 else 432 432 data->error = -EIO; ··· 445 445 { 446 446 struct mmc_command *cmd = host->cmd; 447 447 int i; 448 - u32 a,b,c; 448 + u32 a, b, c; 449 449 struct mmc_data *data = host->data; 450 450 451 451 if (!cmd) ··· 461 461 cmd->error = -EILSEQ; 462 462 } 463 463 464 - if(cmd->flags & MMC_RSP_PRESENT) { 465 - if(cmd->flags & MMC_RSP_136) { 464 + if (cmd->flags & MMC_RSP_PRESENT) { 465 + if (cmd->flags & MMC_RSP_136) { 466 466 for (i = 0; i < 4; i++) { 467 - u32 a = MMC_RES_FIFO & 0xffff; 468 - u32 b = MMC_RES_FIFO & 0xffff; 469 - cmd->resp[i] = a<<16 | b; 467 + a = readw(host->base + MMC_REG_RES_FIFO); 468 + b = readw(host->base + MMC_REG_RES_FIFO); 469 + cmd->resp[i] = a << 16 | b; 470 470 } 471 471 } else { 472 - a = MMC_RES_FIFO & 0xffff; 473 - b = MMC_RES_FIFO & 0xffff; 474 - c = MMC_RES_FIFO & 0xffff; 475 - cmd->resp[0] = a<<24 | b<<8 | c>>8; 472 + a = readw(host->base + MMC_REG_RES_FIFO); 473 + b = readw(host->base + MMC_REG_RES_FIFO); 474 + c = readw(host->base + MMC_REG_RES_FIFO); 475 + cmd->resp[0] = a << 24 | b << 8 | c >> 8; 476 476 } 477 477 } 478 478 ··· 484 484 485 485 /* Wait for FIFO to be empty before starting DMA write */ 486 486 487 - stat = MMC_STATUS; 488 - if(imxmci_busy_wait_for_status(host, &stat, 489 - STATUS_APPL_BUFF_FE, 490 - 40, "imxmci_cmd_done DMA WR") < 0) { 487 + stat = readw(host->base + MMC_REG_STATUS); 488 + if (imxmci_busy_wait_for_status(host, &stat, 489 + STATUS_APPL_BUFF_FE, 490 + 40, "imxmci_cmd_done DMA WR") < 0) { 491 491 cmd->error = -EIO; 492 492 imxmci_finish_data(host, stat); 493 - if(host->req) 493 + if (host->req) 494 494 imxmci_finish_request(host, host->req); 495 495 dev_warn(mmc_dev(host->mmc), "STATUS = 0x%04x\n", 496 - stat); 496 + stat); 497 497 return 0; 498 498 } 499 499 500 - if(test_bit(IMXMCI_PEND_DMA_DATA_b, &host->pending_events)) { 500 + if (test_bit(IMXMCI_PEND_DMA_DATA_b, &host->pending_events)) 501 501 imx_dma_enable(host->dma); 502 - } 503 502 } 504 503 } else { 505 504 struct mmc_request *req; 506 505 imxmci_stop_clock(host); 507 506 req = host->req; 508 507 509 - if(data) 508 + if (data) 510 509 imxmci_finish_data(host, stat); 511 510 512 - if( req ) { 511 + if (req) 513 512 imxmci_finish_request(host, req); 514 - } else { 513 + else 515 514 dev_warn(mmc_dev(host->mmc), "imxmci_cmd_done: no request to finish\n"); 516 - } 517 515 } 518 516 519 517 return 1; ··· 533 535 } else { 534 536 struct mmc_request *req; 535 537 req = host->req; 536 - if( req ) { 538 + if (req) 537 539 imxmci_finish_request(host, req); 538 - } else { 540 + else 539 541 dev_warn(mmc_dev(host->mmc), "imxmci_data_done: no request to finish\n"); 540 - } 541 542 } 542 543 543 544 return 1; ··· 549 552 int trans_done = 0; 550 553 unsigned int stat = *pstat; 551 554 552 - if(host->actual_bus_width != MMC_BUS_WIDTH_4) 555 + if (host->actual_bus_width != MMC_BUS_WIDTH_4) 553 556 burst_len = 16; 554 557 else 555 558 burst_len = 64; ··· 560 563 561 564 udelay(20); /* required for clocks < 8MHz*/ 562 565 563 - if(host->dma_dir == DMA_FROM_DEVICE) { 566 + if (host->dma_dir == DMA_FROM_DEVICE) { 564 567 imxmci_busy_wait_for_status(host, &stat, 565 - STATUS_APPL_BUFF_FF | STATUS_DATA_TRANS_DONE | 566 - STATUS_TIME_OUT_READ, 567 - 50, "imxmci_cpu_driven_data read"); 568 + STATUS_APPL_BUFF_FF | STATUS_DATA_TRANS_DONE | 569 + STATUS_TIME_OUT_READ, 570 + 50, "imxmci_cpu_driven_data read"); 568 571 569 - while((stat & (STATUS_APPL_BUFF_FF | STATUS_DATA_TRANS_DONE)) && 570 - !(stat & STATUS_TIME_OUT_READ) && 571 - (host->data_cnt < 512)) { 572 + while ((stat & (STATUS_APPL_BUFF_FF | STATUS_DATA_TRANS_DONE)) && 573 + !(stat & STATUS_TIME_OUT_READ) && 574 + (host->data_cnt < 512)) { 572 575 573 576 udelay(20); /* required for clocks < 8MHz*/ 574 577 575 - for(i = burst_len; i>=2 ; i-=2) { 578 + for (i = burst_len; i >= 2 ; i -= 2) { 576 579 u16 data; 577 - data = MMC_BUFFER_ACCESS; 580 + data = readw(host->base + MMC_REG_BUFFER_ACCESS); 578 581 udelay(10); /* required for clocks < 8MHz*/ 579 - if(host->data_cnt+2 <= host->dma_size) { 582 + if (host->data_cnt+2 <= host->dma_size) { 580 583 *(host->data_ptr++) = data; 581 584 } else { 582 - if(host->data_cnt < host->dma_size) 583 - *(u8*)(host->data_ptr) = data; 585 + if (host->data_cnt < host->dma_size) 586 + *(u8 *)(host->data_ptr) = data; 584 587 } 585 588 host->data_cnt += 2; 586 589 } 587 590 588 - stat = MMC_STATUS; 591 + stat = readw(host->base + MMC_REG_STATUS); 589 592 590 593 dev_dbg(mmc_dev(host->mmc), "imxmci_cpu_driven_data read %d burst %d STATUS = 0x%x\n", 591 594 host->data_cnt, burst_len, stat); 592 595 } 593 596 594 - if((stat & STATUS_DATA_TRANS_DONE) && (host->data_cnt >= 512)) 597 + if ((stat & STATUS_DATA_TRANS_DONE) && (host->data_cnt >= 512)) 595 598 trans_done = 1; 596 599 597 - if(host->dma_size & 0x1ff) 600 + if (host->dma_size & 0x1ff) 598 601 stat &= ~STATUS_CRC_READ_ERR; 599 602 600 - if(stat & STATUS_TIME_OUT_READ) { 603 + if (stat & STATUS_TIME_OUT_READ) { 601 604 dev_dbg(mmc_dev(host->mmc), "imxmci_cpu_driven_data read timeout STATUS = 0x%x\n", 602 605 stat); 603 606 trans_done = -1; ··· 605 608 606 609 } else { 607 610 imxmci_busy_wait_for_status(host, &stat, 608 - STATUS_APPL_BUFF_FE, 609 - 20, "imxmci_cpu_driven_data write"); 611 + STATUS_APPL_BUFF_FE, 612 + 20, "imxmci_cpu_driven_data write"); 610 613 611 - while((stat & STATUS_APPL_BUFF_FE) && 612 - (host->data_cnt < host->dma_size)) { 613 - if(burst_len >= host->dma_size - host->data_cnt) { 614 + while ((stat & STATUS_APPL_BUFF_FE) && 615 + (host->data_cnt < host->dma_size)) { 616 + if (burst_len >= host->dma_size - host->data_cnt) { 614 617 burst_len = host->dma_size - host->data_cnt; 615 618 host->data_cnt = host->dma_size; 616 619 trans_done = 1; ··· 618 621 host->data_cnt += burst_len; 619 622 } 620 623 621 - for(i = burst_len; i>0 ; i-=2) 622 - MMC_BUFFER_ACCESS = *(host->data_ptr++); 624 + for (i = burst_len; i > 0 ; i -= 2) 625 + writew(*(host->data_ptr++), host->base + MMC_REG_BUFFER_ACCESS); 623 626 624 - stat = MMC_STATUS; 627 + stat = readw(host->base + MMC_REG_STATUS); 625 628 626 629 dev_dbg(mmc_dev(host->mmc), "imxmci_cpu_driven_data write burst %d STATUS = 0x%x\n", 627 630 burst_len, stat); ··· 636 639 static void imxmci_dma_irq(int dma, void *devid) 637 640 { 638 641 struct imxmci_host *host = devid; 639 - uint32_t stat = MMC_STATUS; 642 + u32 stat = readw(host->base + MMC_REG_STATUS); 640 643 641 644 atomic_set(&host->stuck_timeout, 0); 642 645 host->status_reg = stat; ··· 647 650 static irqreturn_t imxmci_irq(int irq, void *devid) 648 651 { 649 652 struct imxmci_host *host = devid; 650 - uint32_t stat = MMC_STATUS; 653 + u32 stat = readw(host->base + MMC_REG_STATUS); 651 654 int handled = 1; 652 655 653 - MMC_INT_MASK = host->imask | INT_MASK_SDIO | INT_MASK_AUTO_CARD_DETECT; 656 + writew(host->imask | INT_MASK_SDIO | INT_MASK_AUTO_CARD_DETECT, 657 + host->base + MMC_REG_INT_MASK); 654 658 655 659 atomic_set(&host->stuck_timeout, 0); 656 660 host->status_reg = stat; ··· 669 671 unsigned int data_dir_mask = 0; /* STATUS_WR_CRC_ERROR_CODE_MASK */ 670 672 int timeout = 0; 671 673 672 - if(atomic_read(&host->stuck_timeout) > 4) { 674 + if (atomic_read(&host->stuck_timeout) > 4) { 673 675 char *what; 674 676 timeout = 1; 675 - stat = MMC_STATUS; 677 + stat = readw(host->base + MMC_REG_STATUS); 676 678 host->status_reg = stat; 677 679 if (test_bit(IMXMCI_PEND_WAIT_RESP_b, &host->pending_events)) 678 680 if (test_bit(IMXMCI_PEND_DMA_DATA_b, &host->pending_events)) ··· 681 683 what = "RESP"; 682 684 else 683 685 if (test_bit(IMXMCI_PEND_DMA_DATA_b, &host->pending_events)) 684 - if(test_bit(IMXMCI_PEND_DMA_END_b, &host->pending_events)) 686 + if (test_bit(IMXMCI_PEND_DMA_END_b, &host->pending_events)) 685 687 what = "DATA"; 686 688 else 687 689 what = "DMA"; 688 690 else 689 691 what = "???"; 690 692 691 - dev_err(mmc_dev(host->mmc), "%s TIMEOUT, hardware stucked STATUS = 0x%04x IMASK = 0x%04x\n", 692 - what, stat, MMC_INT_MASK); 693 - dev_err(mmc_dev(host->mmc), "CMD_DAT_CONT = 0x%04x, MMC_BLK_LEN = 0x%04x, MMC_NOB = 0x%04x, DMA_CCR = 0x%08x\n", 694 - MMC_CMD_DAT_CONT, MMC_BLK_LEN, MMC_NOB, CCR(host->dma)); 693 + dev_err(mmc_dev(host->mmc), 694 + "%s TIMEOUT, hardware stucked STATUS = 0x%04x IMASK = 0x%04x\n", 695 + what, stat, 696 + readw(host->base + MMC_REG_INT_MASK)); 697 + dev_err(mmc_dev(host->mmc), 698 + "CMD_DAT_CONT = 0x%04x, MMC_BLK_LEN = 0x%04x, MMC_NOB = 0x%04x, DMA_CCR = 0x%08x\n", 699 + readw(host->base + MMC_REG_CMD_DAT_CONT), 700 + readw(host->base + MMC_REG_BLK_LEN), 701 + readw(host->base + MMC_REG_NOB), 702 + CCR(host->dma)); 695 703 dev_err(mmc_dev(host->mmc), "CMD%d, prevCMD%d, bus %d-bit, dma_size = 0x%x\n", 696 - host->cmd?host->cmd->opcode:0, host->prev_cmd_code, 1<<host->actual_bus_width, host->dma_size); 704 + host->cmd ? host->cmd->opcode : 0, 705 + host->prev_cmd_code, 706 + 1 << host->actual_bus_width, host->dma_size); 697 707 } 698 708 699 - if(!host->present || timeout) 709 + if (!host->present || timeout) 700 710 host->status_reg = STATUS_TIME_OUT_RESP | STATUS_TIME_OUT_READ | 701 - STATUS_CRC_READ_ERR | STATUS_CRC_WRITE_ERR; 711 + STATUS_CRC_READ_ERR | STATUS_CRC_WRITE_ERR; 702 712 703 - if(test_bit(IMXMCI_PEND_IRQ_b, &host->pending_events) || timeout) { 713 + if (test_bit(IMXMCI_PEND_IRQ_b, &host->pending_events) || timeout) { 704 714 clear_bit(IMXMCI_PEND_IRQ_b, &host->pending_events); 705 715 706 - stat = MMC_STATUS; 716 + stat = readw(host->base + MMC_REG_STATUS); 707 717 /* 708 718 * This is not required in theory, but there is chance to miss some flag 709 719 * which clears automatically by mask write, FreeScale original code keeps ··· 719 713 */ 720 714 stat |= host->status_reg; 721 715 722 - if(test_bit(IMXMCI_PEND_CPU_DATA_b, &host->pending_events)) 716 + if (test_bit(IMXMCI_PEND_CPU_DATA_b, &host->pending_events)) 723 717 stat &= ~STATUS_CRC_READ_ERR; 724 718 725 - if(test_bit(IMXMCI_PEND_WAIT_RESP_b, &host->pending_events)) { 719 + if (test_bit(IMXMCI_PEND_WAIT_RESP_b, &host->pending_events)) { 726 720 imxmci_busy_wait_for_status(host, &stat, 727 - STATUS_END_CMD_RESP | STATUS_ERR_MASK, 728 - 20, "imxmci_tasklet_fnc resp (ERRATUM #4)"); 721 + STATUS_END_CMD_RESP | STATUS_ERR_MASK, 722 + 20, "imxmci_tasklet_fnc resp (ERRATUM #4)"); 729 723 } 730 724 731 - if(stat & (STATUS_END_CMD_RESP | STATUS_ERR_MASK)) { 732 - if(test_and_clear_bit(IMXMCI_PEND_WAIT_RESP_b, &host->pending_events)) 725 + if (stat & (STATUS_END_CMD_RESP | STATUS_ERR_MASK)) { 726 + if (test_and_clear_bit(IMXMCI_PEND_WAIT_RESP_b, &host->pending_events)) 733 727 imxmci_cmd_done(host, stat); 734 - if(host->data && (stat & STATUS_ERR_MASK)) 728 + if (host->data && (stat & STATUS_ERR_MASK)) 735 729 imxmci_data_done(host, stat); 736 730 } 737 731 738 - if(test_bit(IMXMCI_PEND_CPU_DATA_b, &host->pending_events)) { 739 - stat |= MMC_STATUS; 740 - if(imxmci_cpu_driven_data(host, &stat)){ 741 - if(test_and_clear_bit(IMXMCI_PEND_WAIT_RESP_b, &host->pending_events)) 732 + if (test_bit(IMXMCI_PEND_CPU_DATA_b, &host->pending_events)) { 733 + stat |= readw(host->base + MMC_REG_STATUS); 734 + if (imxmci_cpu_driven_data(host, &stat)) { 735 + if (test_and_clear_bit(IMXMCI_PEND_WAIT_RESP_b, &host->pending_events)) 742 736 imxmci_cmd_done(host, stat); 743 737 atomic_clear_mask(IMXMCI_PEND_IRQ_m|IMXMCI_PEND_CPU_DATA_m, 744 - &host->pending_events); 738 + &host->pending_events); 745 739 imxmci_data_done(host, stat); 746 740 } 747 741 } 748 742 } 749 743 750 - if(test_bit(IMXMCI_PEND_DMA_END_b, &host->pending_events) && 751 - !test_bit(IMXMCI_PEND_WAIT_RESP_b, &host->pending_events)) { 744 + if (test_bit(IMXMCI_PEND_DMA_END_b, &host->pending_events) && 745 + !test_bit(IMXMCI_PEND_WAIT_RESP_b, &host->pending_events)) { 752 746 753 - stat = MMC_STATUS; 747 + stat = readw(host->base + MMC_REG_STATUS); 754 748 /* Same as above */ 755 749 stat |= host->status_reg; 756 750 757 - if(host->dma_dir == DMA_TO_DEVICE) { 751 + if (host->dma_dir == DMA_TO_DEVICE) 758 752 data_dir_mask = STATUS_WRITE_OP_DONE; 759 - } else { 753 + else 760 754 data_dir_mask = STATUS_DATA_TRANS_DONE; 761 - } 762 755 763 - if(stat & data_dir_mask) { 756 + if (stat & data_dir_mask) { 764 757 clear_bit(IMXMCI_PEND_DMA_END_b, &host->pending_events); 765 758 imxmci_data_done(host, stat); 766 759 } 767 760 } 768 761 769 - if(test_and_clear_bit(IMXMCI_PEND_CARD_XCHG_b, &host->pending_events)) { 762 + if (test_and_clear_bit(IMXMCI_PEND_CARD_XCHG_b, &host->pending_events)) { 770 763 771 - if(host->cmd) 764 + if (host->cmd) 772 765 imxmci_cmd_done(host, STATUS_TIME_OUT_RESP); 773 766 774 - if(host->data) 767 + if (host->data) 775 768 imxmci_data_done(host, STATUS_TIME_OUT_READ | 776 769 STATUS_CRC_READ_ERR | STATUS_CRC_WRITE_ERR); 777 770 778 - if(host->req) 771 + if (host->req) 779 772 imxmci_finish_request(host, host->req); 780 773 781 774 mmc_detect_change(host->mmc, msecs_to_jiffies(100)); ··· 801 796 if (req->data->flags & MMC_DATA_WRITE) 802 797 cmdat |= CMD_DAT_CONT_WRITE; 803 798 804 - if (req->data->flags & MMC_DATA_STREAM) { 799 + if (req->data->flags & MMC_DATA_STREAM) 805 800 cmdat |= CMD_DAT_CONT_STREAM_BLOCK; 806 - } 807 801 } 808 802 809 803 imxmci_start_cmd(host, req->cmd, cmdat); ··· 815 811 struct imxmci_host *host = mmc_priv(mmc); 816 812 int prescaler; 817 813 818 - if( ios->bus_width==MMC_BUS_WIDTH_4 ) { 814 + if (ios->bus_width == MMC_BUS_WIDTH_4) { 819 815 host->actual_bus_width = MMC_BUS_WIDTH_4; 820 816 imx_gpio_mode(PB11_PF_SD_DAT3); 821 - }else{ 817 + } else { 822 818 host->actual_bus_width = MMC_BUS_WIDTH_1; 823 819 imx_gpio_mode(GPIO_PORTB | GPIO_IN | GPIO_PUEN | 11); 824 820 } 825 821 826 - if ( host->power_mode != ios->power_mode ) { 822 + if (host->power_mode != ios->power_mode) { 827 823 switch (ios->power_mode) { 828 824 case MMC_POWER_OFF: 829 - break; 825 + break; 830 826 case MMC_POWER_UP: 831 827 set_bit(IMXMCI_PEND_SET_INIT_b, &host->pending_events); 832 - break; 828 + break; 833 829 case MMC_POWER_ON: 834 - break; 830 + break; 835 831 } 836 832 host->power_mode = ios->power_mode; 837 833 } 838 834 839 - if ( ios->clock ) { 835 + if (ios->clock) { 840 836 unsigned int clk; 837 + u16 reg; 841 838 842 839 /* The prescaler is 5 for PERCLK2 equal to 96MHz 843 840 * then 96MHz / 5 = 19.2 MHz 844 841 */ 845 842 clk = clk_get_rate(host->clk); 846 - prescaler=(clk+(CLK_RATE*7)/8)/CLK_RATE; 847 - switch(prescaler) { 843 + prescaler = (clk + (CLK_RATE * 7) / 8) / CLK_RATE; 844 + switch (prescaler) { 848 845 case 0: 849 846 case 1: prescaler = 0; 850 847 break; ··· 863 858 dev_dbg(mmc_dev(host->mmc), "PERCLK2 %d MHz -> prescaler %d\n", 864 859 clk, prescaler); 865 860 866 - for(clk=0; clk<8; clk++) { 861 + for (clk = 0; clk < 8; clk++) { 867 862 int x; 868 - x = CLK_RATE / (1<<clk); 869 - if( x <= ios->clock) 863 + x = CLK_RATE / (1 << clk); 864 + if (x <= ios->clock) 870 865 break; 871 866 } 872 867 873 - MMC_STR_STP_CLK |= STR_STP_CLK_ENABLE; /* enable controller */ 868 + /* enable controller */ 869 + reg = readw(host->base + MMC_REG_STR_STP_CLK); 870 + writew(reg | STR_STP_CLK_ENABLE, 871 + host->base + MMC_REG_STR_STP_CLK); 874 872 875 873 imxmci_stop_clock(host); 876 - MMC_CLK_RATE = (prescaler<<3) | clk; 874 + writew((prescaler << 3) | clk, host->base + MMC_REG_CLK_RATE); 877 875 /* 878 876 * Under my understanding, clock should not be started there, because it would 879 877 * initiate SDHC sequencer and send last or random command into card 880 878 */ 881 - /*imxmci_start_clock(host);*/ 879 + /* imxmci_start_clock(host); */ 882 880 883 - dev_dbg(mmc_dev(host->mmc), "MMC_CLK_RATE: 0x%08x\n", MMC_CLK_RATE); 881 + dev_dbg(mmc_dev(host->mmc), 882 + "MMC_CLK_RATE: 0x%08x\n", 883 + readw(host->base + MMC_REG_CLK_RATE)); 884 884 } else { 885 885 imxmci_stop_clock(host); 886 886 } ··· 925 915 tasklet_schedule(&host->tasklet); 926 916 } 927 917 928 - if(test_bit(IMXMCI_PEND_WAIT_RESP_b, &host->pending_events) || 929 - test_bit(IMXMCI_PEND_DMA_DATA_b, &host->pending_events)) { 918 + if (test_bit(IMXMCI_PEND_WAIT_RESP_b, &host->pending_events) || 919 + test_bit(IMXMCI_PEND_DMA_DATA_b, &host->pending_events)) { 930 920 atomic_inc(&host->stuck_timeout); 931 - if(atomic_read(&host->stuck_timeout) > 4) 921 + if (atomic_read(&host->stuck_timeout) > 4) 932 922 tasklet_schedule(&host->tasklet); 933 923 } else { 934 924 atomic_set(&host->stuck_timeout, 0); ··· 944 934 struct imxmci_host *host = NULL; 945 935 struct resource *r; 946 936 int ret = 0, irq; 937 + u16 rev_no; 947 938 948 939 printk(KERN_INFO "i.MX mmc driver\n"); 949 940 ··· 953 942 if (!r || irq < 0) 954 943 return -ENXIO; 955 944 956 - if (!request_mem_region(r->start, 0x100, pdev->name)) 945 + r = request_mem_region(r->start, resource_size(r), pdev->name); 946 + if (!r) 957 947 return -EBUSY; 958 948 959 949 mmc = mmc_alloc_host(sizeof(struct imxmci_host), &pdev->dev); ··· 978 966 mmc->max_blk_count = 65535; 979 967 980 968 host = mmc_priv(mmc); 969 + host->base = ioremap(r->start, resource_size(r)); 970 + if (!host->base) { 971 + ret = -ENOMEM; 972 + goto out; 973 + } 974 + 981 975 host->mmc = mmc; 982 976 host->dma_allocated = 0; 983 977 host->pdata = pdev->dev.platform_data; ··· 1011 993 imx_gpio_mode(PB12_PF_SD_CLK); 1012 994 imx_gpio_mode(PB13_PF_SD_CMD); 1013 995 1014 - imxmci_softreset(); 996 + imxmci_softreset(host); 1015 997 1016 - if ( MMC_REV_NO != 0x390 ) { 998 + rev_no = readw(host->base + MMC_REG_REV_NO); 999 + if (rev_no != 0x390) { 1017 1000 dev_err(mmc_dev(host->mmc), "wrong rev.no. 0x%08x. aborting.\n", 1018 - MMC_REV_NO); 1001 + readw(host->base + MMC_REG_REV_NO)); 1019 1002 goto out; 1020 1003 } 1021 1004 1022 - MMC_READ_TO = 0x2db4; /* recommended in data sheet */ 1005 + /* recommended in data sheet */ 1006 + writew(0x2db4, host->base + MMC_REG_READ_TO); 1023 1007 1024 1008 host->imask = IMXMCI_INT_MASK_DEFAULT; 1025 - MMC_INT_MASK = host->imask; 1009 + writew(host->imask, host->base + MMC_REG_INT_MASK); 1026 1010 1027 1011 host->dma = imx_dma_request_by_prio(DRIVER_NAME, DMA_PRIO_LOW); 1028 1012 if(host->dma < 0) { ··· 1032 1012 ret = -EBUSY; 1033 1013 goto out; 1034 1014 } 1035 - host->dma_allocated=1; 1015 + host->dma_allocated = 1; 1036 1016 imx_dma_setup_handlers(host->dma, imxmci_dma_irq, NULL, host); 1037 1017 1038 1018 tasklet_init(&host->tasklet, imxmci_tasklet_fnc, (unsigned long)host); ··· 1052 1032 host->timer.data = (unsigned long)host; 1053 1033 host->timer.function = imxmci_check_status; 1054 1034 add_timer(&host->timer); 1055 - mod_timer(&host->timer, jiffies + (HZ>>1)); 1035 + mod_timer(&host->timer, jiffies + (HZ >> 1)); 1056 1036 1057 1037 platform_set_drvdata(pdev, mmc); 1058 1038 ··· 1062 1042 1063 1043 out: 1064 1044 if (host) { 1065 - if(host->dma_allocated){ 1045 + if (host->dma_allocated) { 1066 1046 imx_dma_free(host->dma); 1067 - host->dma_allocated=0; 1047 + host->dma_allocated = 0; 1068 1048 } 1069 1049 if (host->clk) { 1070 1050 clk_disable(host->clk); 1071 1051 clk_put(host->clk); 1072 1052 } 1053 + if (host->base) 1054 + iounmap(host->base); 1073 1055 } 1074 1056 if (mmc) 1075 1057 mmc_free_host(mmc); 1076 - release_mem_region(r->start, 0x100); 1058 + release_mem_region(r->start, resource_size(r)); 1077 1059 return ret; 1078 1060 } 1079 1061 ··· 1094 1072 mmc_remove_host(mmc); 1095 1073 1096 1074 free_irq(host->irq, host); 1097 - if(host->dma_allocated){ 1075 + iounmap(host->base); 1076 + if (host->dma_allocated) { 1098 1077 imx_dma_free(host->dma); 1099 - host->dma_allocated=0; 1078 + host->dma_allocated = 0; 1100 1079 } 1101 1080 1102 1081 tasklet_kill(&host->tasklet); ··· 1105 1082 clk_disable(host->clk); 1106 1083 clk_put(host->clk); 1107 1084 1108 - release_mem_region(host->res->start, 0x100); 1085 + release_mem_region(host->res->start, resource_size(host->res)); 1109 1086 1110 1087 mmc_free_host(mmc); 1111 1088 } ··· 1132 1109 1133 1110 if (mmc) { 1134 1111 host = mmc_priv(mmc); 1135 - if(host) 1112 + if (host) 1136 1113 set_bit(IMXMCI_PEND_SET_INIT_b, &host->pending_events); 1137 1114 ret = mmc_resume_host(mmc); 1138 1115 }
+17 -20
drivers/mmc/host/imxmmc.h
··· 1 + #define MMC_REG_STR_STP_CLK 0x00 2 + #define MMC_REG_STATUS 0x04 3 + #define MMC_REG_CLK_RATE 0x08 4 + #define MMC_REG_CMD_DAT_CONT 0x0C 5 + #define MMC_REG_RES_TO 0x10 6 + #define MMC_REG_READ_TO 0x14 7 + #define MMC_REG_BLK_LEN 0x18 8 + #define MMC_REG_NOB 0x1C 9 + #define MMC_REG_REV_NO 0x20 10 + #define MMC_REG_INT_MASK 0x24 11 + #define MMC_REG_CMD 0x28 12 + #define MMC_REG_ARGH 0x2C 13 + #define MMC_REG_ARGL 0x30 14 + #define MMC_REG_RES_FIFO 0x34 15 + #define MMC_REG_BUFFER_ACCESS 0x38 1 16 2 - # define __REG16(x) (*((volatile u16 *)IO_ADDRESS(x))) 3 - 4 - #define MMC_STR_STP_CLK __REG16(IMX_MMC_BASE + 0x00) 5 - #define MMC_STATUS __REG16(IMX_MMC_BASE + 0x04) 6 - #define MMC_CLK_RATE __REG16(IMX_MMC_BASE + 0x08) 7 - #define MMC_CMD_DAT_CONT __REG16(IMX_MMC_BASE + 0x0C) 8 - #define MMC_RES_TO __REG16(IMX_MMC_BASE + 0x10) 9 - #define MMC_READ_TO __REG16(IMX_MMC_BASE + 0x14) 10 - #define MMC_BLK_LEN __REG16(IMX_MMC_BASE + 0x18) 11 - #define MMC_NOB __REG16(IMX_MMC_BASE + 0x1C) 12 - #define MMC_REV_NO __REG16(IMX_MMC_BASE + 0x20) 13 - #define MMC_INT_MASK __REG16(IMX_MMC_BASE + 0x24) 14 - #define MMC_CMD __REG16(IMX_MMC_BASE + 0x28) 15 - #define MMC_ARGH __REG16(IMX_MMC_BASE + 0x2C) 16 - #define MMC_ARGL __REG16(IMX_MMC_BASE + 0x30) 17 - #define MMC_RES_FIFO __REG16(IMX_MMC_BASE + 0x34) 18 - #define MMC_BUFFER_ACCESS __REG16(IMX_MMC_BASE + 0x38) 19 - #define MMC_BUFFER_ACCESS_OFS 0x38 20 - 21 - 17 + #define STR_STP_CLK_IPG_CLK_GATE_DIS (1<<15) 18 + #define STR_STP_CLK_IPG_PERCLK_GATE_DIS (1<<14) 22 19 #define STR_STP_CLK_ENDIAN (1<<5) 23 20 #define STR_STP_CLK_RESET (1<<3) 24 21 #define STR_STP_CLK_ENABLE (1<<2)
+1 -1
drivers/mtd/nand/Kconfig
··· 408 408 409 409 config MTD_NAND_MXC 410 410 tristate "MXC NAND support" 411 - depends on ARCH_MX2 411 + depends on ARCH_MX2 || ARCH_MX3 412 412 help 413 413 This enables the driver for the NAND flash controller on the 414 414 MXC processors.
+3 -3
drivers/serial/imx.c
··· 66 66 #define ONEMS 0xb0 /* One Millisecond register */ 67 67 #define UTS 0xb4 /* UART Test Register */ 68 68 #endif 69 - #ifdef CONFIG_ARCH_IMX 69 + #if defined(CONFIG_ARCH_IMX) || defined(CONFIG_ARCH_MX1) 70 70 #define BIPR1 0xb0 /* Incremental Preset Register 1 */ 71 71 #define BIPR2 0xb4 /* Incremental Preset Register 2 */ 72 72 #define BIPR3 0xb8 /* Incremental Preset Register 3 */ ··· 96 96 #define UCR1_RTSDEN (1<<5) /* RTS delta interrupt enable */ 97 97 #define UCR1_SNDBRK (1<<4) /* Send break */ 98 98 #define UCR1_TDMAEN (1<<3) /* Transmitter ready DMA enable */ 99 - #ifdef CONFIG_ARCH_IMX 99 + #if defined(CONFIG_ARCH_IMX) || defined(CONFIG_ARCH_MX1) 100 100 #define UCR1_UARTCLKEN (1<<2) /* UART clock enabled */ 101 101 #endif 102 102 #if defined CONFIG_ARCH_MX3 || defined CONFIG_ARCH_MX2 ··· 187 187 #define MAX_INTERNAL_IRQ IMX_IRQS 188 188 #endif 189 189 190 - #if defined CONFIG_ARCH_MX3 || defined CONFIG_ARCH_MX2 190 + #ifdef CONFIG_ARCH_MXC 191 191 #define SERIAL_IMX_MAJOR 207 192 192 #define MINOR_START 16 193 193 #define DEV_NAME "ttymxc"