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

Configure Feed

Select the types of activity you want to include in your feed.

Merge branches 'at91', 'imx', 'iop', 'ixp', 'ks8695', 'misc', 'ns9xxx', 'pxa' and 's3c' into devel

authored by

Russell King and committed by
Russell King
5957a4eb ed54fcfd

+5471 -1149
+1 -1
MAINTAINERS
··· 457 457 458 458 ARM/HP JORNADA 7XX MACHINE SUPPORT 459 459 P: Kristoffer Ericson 460 - M: kristoffer_e1@hotmail.com 460 + M: kristoffer.ericson@gmail.com 461 461 W: www.jlime.com 462 462 S: Maintained 463 463
+9
arch/arm/Kconfig
··· 324 324 325 325 <http://www.digi.com/products/microprocessors/index.jsp> 326 326 327 + config ARCH_MXC 328 + bool "Freescale MXC/iMX-based" 329 + select ARCH_MTD_XIP 330 + help 331 + Support for Freescale MXC/iMX-based family of processors 332 + 327 333 config ARCH_PNX4008 328 334 bool "Philips Nexperia PNX4008 Mobile" 329 335 help ··· 438 432 source "arch/arm/mach-omap2/Kconfig" 439 433 440 434 source "arch/arm/plat-s3c24xx/Kconfig" 435 + source "arch/arm/plat-s3c/Kconfig" 441 436 442 437 if ARCH_S3C2410 443 438 source "arch/arm/mach-s3c2400/Kconfig" ··· 462 455 source "arch/arm/mach-realview/Kconfig" 463 456 464 457 source "arch/arm/mach-at91/Kconfig" 458 + 459 + source "arch/arm/plat-mxc/Kconfig" 465 460 466 461 source "arch/arm/mach-netx/Kconfig" 467 462
+9 -9
arch/arm/Kconfig.debug
··· 82 82 output to the second serial port on these devices. Saying N will 83 83 cause the debug messages to appear on the first serial port. 84 84 85 - config DEBUG_S3C2410_PORT 86 - depends on DEBUG_LL && ARCH_S3C2410 87 - bool "Kernel low-level debugging messages via S3C2410 UART" 85 + config DEBUG_S3C_PORT 86 + depends on DEBUG_LL && PLAT_S3C 87 + bool "Kernel low-level debugging messages via S3C UART" 88 88 help 89 89 Say Y here if you want debug print routines to go to one of the 90 - S3C2410 internal UARTs. The chosen UART must have been configured 90 + S3C internal UARTs. The chosen UART must have been configured 91 91 before it is used. 92 92 93 - config DEBUG_S3C2410_UART 94 - depends on ARCH_S3C2410 95 - int "S3C2410 UART to use for low-level debug" 93 + config DEBUG_S3C_UART 94 + depends on PLAT_S3C 95 + int "S3C UART to use for low-level debug" 96 96 default "0" 97 97 help 98 - Choice for UART for kernel low-level using S3C2410 UARTS, 98 + Choice for UART for kernel low-level using S3C UARTS, 99 99 should be between zero and two. The port must have been 100 100 initialised by the boot-loader before use. 101 101 102 102 The uncompressor code port configuration is now handled 103 - by CONFIG_S3C2410_LOWLEVEL_UART_PORT. 103 + by CONFIG_S3C_LOWLEVEL_UART_PORT. 104 104 105 105 endmenu
+3
arch/arm/Makefile
··· 137 137 textofs-$(CONFIG_ARCH_NS9XXX) := 0x00108000 138 138 machine-$(CONFIG_ARCH_DAVINCI) := davinci 139 139 machine-$(CONFIG_ARCH_KS8695) := ks8695 140 + incdir-$(CONFIG_ARCH_MXC) := mxc 141 + machine-$(CONFIG_ARCH_MX3) := mx3 140 142 141 143 ifeq ($(CONFIG_ARCH_EBSA110),y) 142 144 # This is what happens if you forget the IOCS16 line. ··· 185 183 core-$(CONFIG_PLAT_IOP) += arch/arm/plat-iop/ 186 184 core-$(CONFIG_ARCH_OMAP) += arch/arm/plat-omap/ 187 185 core-$(CONFIG_PLAT_S3C24XX) += arch/arm/plat-s3c24xx/ 186 + core-$(CONFIG_ARCH_MXC) += arch/arm/plat-mxc/ 188 187 189 188 drivers-$(CONFIG_OPROFILE) += arch/arm/oprofile/ 190 189 drivers-$(CONFIG_ARCH_CLPS7500) += drivers/acorn/char/
+8
arch/arm/boot/Makefile
··· 91 91 $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \ 92 92 $(obj)/zImage System.map "$(INSTALL_PATH)" 93 93 94 + zi: 95 + $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \ 96 + $(obj)/zImage System.map "$(INSTALL_PATH)" 97 + 98 + i: 99 + $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \ 100 + $(obj)/Image System.map "$(INSTALL_PATH)" 101 + 94 102 subdir- := bootp compressed
+1 -1
arch/arm/boot/compressed/Makefile
··· 73 73 74 74 targets := vmlinux vmlinux.lds piggy.gz piggy.o font.o font.c \ 75 75 head.o misc.o $(OBJS) 76 - EXTRA_CFLAGS := -fpic 76 + EXTRA_CFLAGS := -fpic -fno-builtin 77 77 EXTRA_AFLAGS := 78 78 79 79 # Supply ZRELADDR, INITRD_PHYS and PARAMS_PHYS to the decompressor via
+1 -1
arch/arm/boot/compressed/head.S
··· 55 55 #elif defined(CONFIG_ARCH_S3C2410) 56 56 .macro loadsp, rb 57 57 mov \rb, #0x50000000 58 - add \rb, \rb, #0x4000 * CONFIG_S3C2410_LOWLEVEL_UART_PORT 58 + add \rb, \rb, #0x4000 * CONFIG_S3C_LOWLEVEL_UART_PORT 59 59 .endm 60 60 #else 61 61 .macro loadsp, rb
+1265
arch/arm/configs/em_x270_defconfig
··· 1 + # 2 + # Automatically generated make config: don't edit 3 + # Linux kernel version: 2.6.22 4 + # Mon Jul 9 15:18:20 2007 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 is not set 11 + CONFIG_MMU=y 12 + # CONFIG_NO_IOPORT is not set 13 + CONFIG_GENERIC_HARDIRQS=y 14 + CONFIG_STACKTRACE_SUPPORT=y 15 + CONFIG_LOCKDEP_SUPPORT=y 16 + CONFIG_TRACE_IRQFLAGS_SUPPORT=y 17 + CONFIG_HARDIRQS_SW_RESEND=y 18 + CONFIG_GENERIC_IRQ_PROBE=y 19 + CONFIG_RWSEM_GENERIC_SPINLOCK=y 20 + # CONFIG_ARCH_HAS_ILOG2_U32 is not set 21 + # CONFIG_ARCH_HAS_ILOG2_U64 is not set 22 + CONFIG_GENERIC_HWEIGHT=y 23 + CONFIG_GENERIC_CALIBRATE_DELAY=y 24 + CONFIG_ZONE_DMA=y 25 + CONFIG_ARCH_MTD_XIP=y 26 + CONFIG_VECTORS_BASE=0xffff0000 27 + CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 28 + 29 + # 30 + # Code maturity level options 31 + # 32 + CONFIG_EXPERIMENTAL=y 33 + CONFIG_BROKEN_ON_SMP=y 34 + CONFIG_INIT_ENV_ARG_LIMIT=32 35 + 36 + # 37 + # General setup 38 + # 39 + CONFIG_LOCALVERSION="-em-x270" 40 + # CONFIG_LOCALVERSION_AUTO is not set 41 + CONFIG_SWAP=y 42 + CONFIG_SYSVIPC=y 43 + # CONFIG_IPC_NS is not set 44 + CONFIG_SYSVIPC_SYSCTL=y 45 + # CONFIG_POSIX_MQUEUE is not set 46 + # CONFIG_BSD_PROCESS_ACCT is not set 47 + # CONFIG_TASKSTATS is not set 48 + # CONFIG_UTS_NS is not set 49 + # CONFIG_AUDIT is not set 50 + CONFIG_IKCONFIG=y 51 + CONFIG_IKCONFIG_PROC=y 52 + CONFIG_LOG_BUF_SHIFT=17 53 + CONFIG_SYSFS_DEPRECATED=y 54 + # CONFIG_RELAY is not set 55 + CONFIG_BLK_DEV_INITRD=y 56 + CONFIG_INITRAMFS_SOURCE="" 57 + CONFIG_CC_OPTIMIZE_FOR_SIZE=y 58 + CONFIG_SYSCTL=y 59 + CONFIG_EMBEDDED=y 60 + CONFIG_UID16=y 61 + CONFIG_SYSCTL_SYSCALL=y 62 + CONFIG_KALLSYMS=y 63 + # CONFIG_KALLSYMS_ALL is not set 64 + # CONFIG_KALLSYMS_EXTRA_PASS is not set 65 + CONFIG_HOTPLUG=y 66 + CONFIG_PRINTK=y 67 + CONFIG_BUG=y 68 + CONFIG_ELF_CORE=y 69 + CONFIG_BASE_FULL=y 70 + CONFIG_FUTEX=y 71 + CONFIG_ANON_INODES=y 72 + CONFIG_EPOLL=y 73 + CONFIG_SIGNALFD=y 74 + CONFIG_TIMERFD=y 75 + CONFIG_EVENTFD=y 76 + CONFIG_SHMEM=y 77 + CONFIG_VM_EVENT_COUNTERS=y 78 + CONFIG_SLAB=y 79 + # CONFIG_SLUB is not set 80 + # CONFIG_SLOB is not set 81 + CONFIG_RT_MUTEXES=y 82 + # CONFIG_TINY_SHMEM is not set 83 + CONFIG_BASE_SMALL=0 84 + 85 + # 86 + # Loadable module support 87 + # 88 + CONFIG_MODULES=y 89 + CONFIG_MODULE_UNLOAD=y 90 + CONFIG_MODULE_FORCE_UNLOAD=y 91 + # CONFIG_MODVERSIONS is not set 92 + # CONFIG_MODULE_SRCVERSION_ALL is not set 93 + CONFIG_KMOD=y 94 + 95 + # 96 + # Block layer 97 + # 98 + CONFIG_BLOCK=y 99 + # CONFIG_LBD is not set 100 + # CONFIG_BLK_DEV_IO_TRACE is not set 101 + # CONFIG_LSF is not set 102 + 103 + # 104 + # IO Schedulers 105 + # 106 + CONFIG_IOSCHED_NOOP=y 107 + CONFIG_IOSCHED_AS=y 108 + CONFIG_IOSCHED_DEADLINE=y 109 + CONFIG_IOSCHED_CFQ=y 110 + CONFIG_DEFAULT_AS=y 111 + # CONFIG_DEFAULT_DEADLINE is not set 112 + # CONFIG_DEFAULT_CFQ is not set 113 + # CONFIG_DEFAULT_NOOP is not set 114 + CONFIG_DEFAULT_IOSCHED="anticipatory" 115 + 116 + # 117 + # System Type 118 + # 119 + # CONFIG_ARCH_AAEC2000 is not set 120 + # CONFIG_ARCH_INTEGRATOR is not set 121 + # CONFIG_ARCH_REALVIEW is not set 122 + # CONFIG_ARCH_VERSATILE is not set 123 + # CONFIG_ARCH_AT91 is not set 124 + # CONFIG_ARCH_CLPS7500 is not set 125 + # CONFIG_ARCH_CLPS711X is not set 126 + # CONFIG_ARCH_CO285 is not set 127 + # CONFIG_ARCH_EBSA110 is not set 128 + # CONFIG_ARCH_EP93XX is not set 129 + # CONFIG_ARCH_FOOTBRIDGE is not set 130 + # CONFIG_ARCH_NETX is not set 131 + # CONFIG_ARCH_H720X is not set 132 + # CONFIG_ARCH_IMX is not set 133 + # CONFIG_ARCH_IOP13XX is not set 134 + # CONFIG_ARCH_IOP32X is not set 135 + # CONFIG_ARCH_IOP33X is not set 136 + # CONFIG_ARCH_IXP23XX is not set 137 + # CONFIG_ARCH_IXP2000 is not set 138 + # CONFIG_ARCH_IXP4XX is not set 139 + # CONFIG_ARCH_L7200 is not set 140 + # CONFIG_ARCH_KS8695 is not set 141 + # CONFIG_ARCH_NS9XXX is not set 142 + # CONFIG_ARCH_PNX4008 is not set 143 + CONFIG_ARCH_PXA=y 144 + # CONFIG_ARCH_RPC is not set 145 + # CONFIG_ARCH_SA1100 is not set 146 + # CONFIG_ARCH_S3C2410 is not set 147 + # CONFIG_ARCH_SHARK is not set 148 + # CONFIG_ARCH_LH7A40X is not set 149 + # CONFIG_ARCH_DAVINCI is not set 150 + # CONFIG_ARCH_OMAP is not set 151 + 152 + # 153 + # Intel PXA2xx Implementations 154 + # 155 + # CONFIG_ARCH_LUBBOCK is not set 156 + # CONFIG_MACH_LOGICPD_PXA270 is not set 157 + # CONFIG_MACH_MAINSTONE is not set 158 + # CONFIG_ARCH_PXA_IDP is not set 159 + # CONFIG_PXA_SHARPSL is not set 160 + # CONFIG_MACH_TRIZEPS4 is not set 161 + CONFIG_MACH_EM_X270=y 162 + CONFIG_PXA27x=y 163 + 164 + # 165 + # Processor Type 166 + # 167 + CONFIG_CPU_32=y 168 + CONFIG_CPU_XSCALE=y 169 + CONFIG_CPU_32v5=y 170 + CONFIG_CPU_ABRT_EV5T=y 171 + CONFIG_CPU_CACHE_VIVT=y 172 + CONFIG_CPU_TLB_V4WBI=y 173 + CONFIG_CPU_CP15=y 174 + CONFIG_CPU_CP15_MMU=y 175 + 176 + # 177 + # Processor Features 178 + # 179 + CONFIG_ARM_THUMB=y 180 + # CONFIG_CPU_DCACHE_DISABLE is not set 181 + # CONFIG_OUTER_CACHE is not set 182 + CONFIG_IWMMXT=y 183 + CONFIG_XSCALE_PMU=y 184 + 185 + # 186 + # Bus support 187 + # 188 + # CONFIG_ARCH_SUPPORTS_MSI is not set 189 + 190 + # 191 + # PCCARD (PCMCIA/CardBus) support 192 + # 193 + # CONFIG_PCCARD is not set 194 + 195 + # 196 + # Kernel Features 197 + # 198 + # CONFIG_TICK_ONESHOT is not set 199 + # CONFIG_PREEMPT is not set 200 + # CONFIG_NO_IDLE_HZ is not set 201 + CONFIG_HZ=100 202 + CONFIG_AEABI=y 203 + CONFIG_OABI_COMPAT=y 204 + # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set 205 + CONFIG_SELECT_MEMORY_MODEL=y 206 + CONFIG_FLATMEM_MANUAL=y 207 + # CONFIG_DISCONTIGMEM_MANUAL is not set 208 + # CONFIG_SPARSEMEM_MANUAL is not set 209 + CONFIG_FLATMEM=y 210 + CONFIG_FLAT_NODE_MEM_MAP=y 211 + # CONFIG_SPARSEMEM_STATIC is not set 212 + CONFIG_SPLIT_PTLOCK_CPUS=4096 213 + # CONFIG_RESOURCES_64BIT is not set 214 + CONFIG_ZONE_DMA_FLAG=1 215 + CONFIG_ALIGNMENT_TRAP=y 216 + 217 + # 218 + # Boot options 219 + # 220 + CONFIG_ZBOOT_ROM_TEXT=0x0 221 + CONFIG_ZBOOT_ROM_BSS=0x0 222 + CONFIG_CMDLINE="" 223 + # CONFIG_XIP_KERNEL is not set 224 + # CONFIG_KEXEC is not set 225 + 226 + # 227 + # Floating point emulation 228 + # 229 + 230 + # 231 + # At least one emulation must be selected 232 + # 233 + CONFIG_FPE_NWFPE=y 234 + # CONFIG_FPE_NWFPE_XP is not set 235 + # CONFIG_FPE_FASTFPE is not set 236 + 237 + # 238 + # Userspace binary formats 239 + # 240 + CONFIG_BINFMT_ELF=y 241 + # CONFIG_BINFMT_AOUT is not set 242 + # CONFIG_BINFMT_MISC is not set 243 + 244 + # 245 + # Power management options 246 + # 247 + CONFIG_PM=y 248 + CONFIG_PM_LEGACY=y 249 + # CONFIG_PM_DEBUG is not set 250 + # CONFIG_PM_SYSFS_DEPRECATED is not set 251 + CONFIG_APM_EMULATION=m 252 + 253 + # 254 + # Networking 255 + # 256 + CONFIG_NET=y 257 + 258 + # 259 + # Networking options 260 + # 261 + CONFIG_PACKET=y 262 + # CONFIG_PACKET_MMAP is not set 263 + CONFIG_UNIX=y 264 + CONFIG_XFRM=y 265 + # CONFIG_XFRM_USER is not set 266 + # CONFIG_XFRM_SUB_POLICY is not set 267 + # CONFIG_XFRM_MIGRATE is not set 268 + # CONFIG_NET_KEY is not set 269 + CONFIG_INET=y 270 + # CONFIG_IP_MULTICAST is not set 271 + # CONFIG_IP_ADVANCED_ROUTER is not set 272 + CONFIG_IP_FIB_HASH=y 273 + CONFIG_IP_PNP=y 274 + CONFIG_IP_PNP_DHCP=y 275 + CONFIG_IP_PNP_BOOTP=y 276 + # CONFIG_IP_PNP_RARP is not set 277 + # CONFIG_NET_IPIP is not set 278 + # CONFIG_NET_IPGRE is not set 279 + # CONFIG_ARPD is not set 280 + # CONFIG_SYN_COOKIES is not set 281 + # CONFIG_INET_AH is not set 282 + # CONFIG_INET_ESP is not set 283 + # CONFIG_INET_IPCOMP is not set 284 + # CONFIG_INET_XFRM_TUNNEL is not set 285 + # CONFIG_INET_TUNNEL is not set 286 + CONFIG_INET_XFRM_MODE_TRANSPORT=y 287 + CONFIG_INET_XFRM_MODE_TUNNEL=y 288 + CONFIG_INET_XFRM_MODE_BEET=y 289 + CONFIG_INET_DIAG=y 290 + CONFIG_INET_TCP_DIAG=y 291 + # CONFIG_TCP_CONG_ADVANCED is not set 292 + CONFIG_TCP_CONG_CUBIC=y 293 + CONFIG_DEFAULT_TCP_CONG="cubic" 294 + # CONFIG_TCP_MD5SIG is not set 295 + # CONFIG_IPV6 is not set 296 + # CONFIG_INET6_XFRM_TUNNEL is not set 297 + # CONFIG_INET6_TUNNEL is not set 298 + # CONFIG_NETWORK_SECMARK is not set 299 + # CONFIG_NETFILTER is not set 300 + # CONFIG_IP_DCCP is not set 301 + # CONFIG_IP_SCTP is not set 302 + # CONFIG_TIPC is not set 303 + # CONFIG_ATM is not set 304 + # CONFIG_BRIDGE is not set 305 + # CONFIG_VLAN_8021Q is not set 306 + # CONFIG_DECNET is not set 307 + # CONFIG_LLC2 is not set 308 + # CONFIG_IPX is not set 309 + # CONFIG_ATALK is not set 310 + # CONFIG_X25 is not set 311 + # CONFIG_LAPB is not set 312 + # CONFIG_ECONET is not set 313 + # CONFIG_WAN_ROUTER is not set 314 + 315 + # 316 + # QoS and/or fair queueing 317 + # 318 + # CONFIG_NET_SCHED is not set 319 + 320 + # 321 + # Network testing 322 + # 323 + # CONFIG_NET_PKTGEN is not set 324 + # CONFIG_HAMRADIO is not set 325 + # CONFIG_IRDA is not set 326 + CONFIG_BT=m 327 + CONFIG_BT_L2CAP=m 328 + CONFIG_BT_SCO=m 329 + CONFIG_BT_RFCOMM=m 330 + # CONFIG_BT_RFCOMM_TTY is not set 331 + CONFIG_BT_BNEP=m 332 + # CONFIG_BT_BNEP_MC_FILTER is not set 333 + # CONFIG_BT_BNEP_PROTO_FILTER is not set 334 + CONFIG_BT_HIDP=m 335 + 336 + # 337 + # Bluetooth device drivers 338 + # 339 + CONFIG_BT_HCIUSB=m 340 + # CONFIG_BT_HCIUSB_SCO is not set 341 + CONFIG_BT_HCIUART=m 342 + # CONFIG_BT_HCIUART_H4 is not set 343 + # CONFIG_BT_HCIUART_BCSP is not set 344 + CONFIG_BT_HCIBCM203X=m 345 + CONFIG_BT_HCIBPA10X=m 346 + CONFIG_BT_HCIBFUSB=m 347 + # CONFIG_BT_HCIVHCI is not set 348 + # CONFIG_AF_RXRPC is not set 349 + 350 + # 351 + # Wireless 352 + # 353 + # CONFIG_CFG80211 is not set 354 + # CONFIG_WIRELESS_EXT is not set 355 + # CONFIG_MAC80211 is not set 356 + CONFIG_IEEE80211=m 357 + # CONFIG_IEEE80211_DEBUG is not set 358 + CONFIG_IEEE80211_CRYPT_WEP=m 359 + CONFIG_IEEE80211_CRYPT_CCMP=m 360 + # CONFIG_IEEE80211_CRYPT_TKIP is not set 361 + # CONFIG_IEEE80211_SOFTMAC is not set 362 + # CONFIG_RFKILL is not set 363 + 364 + # 365 + # Device Drivers 366 + # 367 + 368 + # 369 + # Generic Driver Options 370 + # 371 + CONFIG_STANDALONE=y 372 + CONFIG_PREVENT_FIRMWARE_BUILD=y 373 + CONFIG_FW_LOADER=y 374 + # CONFIG_DEBUG_DRIVER is not set 375 + # CONFIG_DEBUG_DEVRES is not set 376 + # CONFIG_SYS_HYPERVISOR is not set 377 + 378 + # 379 + # Connector - unified userspace <-> kernelspace linker 380 + # 381 + # CONFIG_CONNECTOR is not set 382 + CONFIG_MTD=y 383 + # CONFIG_MTD_DEBUG is not set 384 + CONFIG_MTD_CONCAT=y 385 + CONFIG_MTD_PARTITIONS=y 386 + # CONFIG_MTD_REDBOOT_PARTS is not set 387 + # CONFIG_MTD_CMDLINE_PARTS is not set 388 + # CONFIG_MTD_AFS_PARTS is not set 389 + 390 + # 391 + # User Modules And Translation Layers 392 + # 393 + CONFIG_MTD_CHAR=y 394 + CONFIG_MTD_BLKDEVS=y 395 + CONFIG_MTD_BLOCK=y 396 + # CONFIG_FTL is not set 397 + # CONFIG_NFTL is not set 398 + # CONFIG_INFTL is not set 399 + # CONFIG_RFD_FTL is not set 400 + # CONFIG_SSFDC is not set 401 + 402 + # 403 + # RAM/ROM/Flash chip drivers 404 + # 405 + # CONFIG_MTD_CFI is not set 406 + # CONFIG_MTD_JEDECPROBE is not set 407 + # CONFIG_MTD_CFI_NOSWAP is not set 408 + # CONFIG_MTD_CFI_BE_BYTE_SWAP is not set 409 + # CONFIG_MTD_CFI_LE_BYTE_SWAP is not set 410 + CONFIG_MTD_MAP_BANK_WIDTH_1=y 411 + CONFIG_MTD_MAP_BANK_WIDTH_2=y 412 + CONFIG_MTD_MAP_BANK_WIDTH_4=y 413 + # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set 414 + # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set 415 + # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set 416 + CONFIG_MTD_CFI_I1=y 417 + CONFIG_MTD_CFI_I2=y 418 + # CONFIG_MTD_CFI_I4 is not set 419 + # CONFIG_MTD_CFI_I8 is not set 420 + # CONFIG_MTD_RAM is not set 421 + # CONFIG_MTD_ROM is not set 422 + # CONFIG_MTD_ABSENT is not set 423 + 424 + # 425 + # Mapping drivers for chip access 426 + # 427 + # CONFIG_MTD_COMPLEX_MAPPINGS is not set 428 + # CONFIG_MTD_SHARP_SL is not set 429 + # CONFIG_MTD_PLATRAM is not set 430 + 431 + # 432 + # Self-contained MTD device drivers 433 + # 434 + # CONFIG_MTD_SLRAM is not set 435 + # CONFIG_MTD_PHRAM is not set 436 + # CONFIG_MTD_MTDRAM is not set 437 + # CONFIG_MTD_BLOCK2MTD is not set 438 + 439 + # 440 + # Disk-On-Chip Device Drivers 441 + # 442 + # CONFIG_MTD_DOC2000 is not set 443 + # CONFIG_MTD_DOC2001 is not set 444 + # CONFIG_MTD_DOC2001PLUS is not set 445 + CONFIG_MTD_NAND=y 446 + # CONFIG_MTD_NAND_VERIFY_WRITE is not set 447 + # CONFIG_MTD_NAND_ECC_SMC is not set 448 + # CONFIG_MTD_NAND_MUSEUM_IDS is not set 449 + # CONFIG_MTD_NAND_H1900 is not set 450 + CONFIG_MTD_NAND_IDS=y 451 + # CONFIG_MTD_NAND_DISKONCHIP is not set 452 + # CONFIG_MTD_NAND_SHARPSL is not set 453 + # CONFIG_MTD_NAND_NANDSIM is not set 454 + CONFIG_MTD_NAND_PLATFORM=y 455 + # CONFIG_MTD_ONENAND is not set 456 + 457 + # 458 + # UBI - Unsorted block images 459 + # 460 + # CONFIG_MTD_UBI is not set 461 + 462 + # 463 + # Parallel port support 464 + # 465 + # CONFIG_PARPORT is not set 466 + 467 + # 468 + # Plug and Play support 469 + # 470 + # CONFIG_PNPACPI is not set 471 + 472 + # 473 + # Block devices 474 + # 475 + # CONFIG_BLK_DEV_COW_COMMON is not set 476 + CONFIG_BLK_DEV_LOOP=y 477 + # CONFIG_BLK_DEV_CRYPTOLOOP is not set 478 + # CONFIG_BLK_DEV_NBD is not set 479 + # CONFIG_BLK_DEV_UB is not set 480 + CONFIG_BLK_DEV_RAM=y 481 + CONFIG_BLK_DEV_RAM_COUNT=16 482 + CONFIG_BLK_DEV_RAM_SIZE=12000 483 + CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 484 + # CONFIG_CDROM_PKTCDVD is not set 485 + # CONFIG_ATA_OVER_ETH is not set 486 + # CONFIG_IDE is not set 487 + 488 + # 489 + # SCSI device support 490 + # 491 + # CONFIG_RAID_ATTRS is not set 492 + CONFIG_SCSI=y 493 + # CONFIG_SCSI_TGT is not set 494 + # CONFIG_SCSI_NETLINK is not set 495 + # CONFIG_SCSI_PROC_FS is not set 496 + 497 + # 498 + # SCSI support type (disk, tape, CD-ROM) 499 + # 500 + CONFIG_BLK_DEV_SD=y 501 + # CONFIG_CHR_DEV_ST is not set 502 + # CONFIG_CHR_DEV_OSST is not set 503 + # CONFIG_BLK_DEV_SR is not set 504 + # CONFIG_CHR_DEV_SG is not set 505 + # CONFIG_CHR_DEV_SCH is not set 506 + 507 + # 508 + # Some SCSI devices (e.g. CD jukebox) support multiple LUNs 509 + # 510 + # CONFIG_SCSI_MULTI_LUN is not set 511 + # CONFIG_SCSI_CONSTANTS is not set 512 + # CONFIG_SCSI_LOGGING is not set 513 + # CONFIG_SCSI_SCAN_ASYNC is not set 514 + CONFIG_SCSI_WAIT_SCAN=m 515 + 516 + # 517 + # SCSI Transports 518 + # 519 + # CONFIG_SCSI_SPI_ATTRS is not set 520 + # CONFIG_SCSI_FC_ATTRS is not set 521 + # CONFIG_SCSI_ISCSI_ATTRS is not set 522 + # CONFIG_SCSI_SAS_ATTRS is not set 523 + # CONFIG_SCSI_SAS_LIBSAS is not set 524 + 525 + # 526 + # SCSI low-level drivers 527 + # 528 + # CONFIG_ISCSI_TCP is not set 529 + # CONFIG_SCSI_DEBUG is not set 530 + # CONFIG_ATA is not set 531 + 532 + # 533 + # Multi-device support (RAID and LVM) 534 + # 535 + # CONFIG_MD is not set 536 + 537 + # 538 + # Network device support 539 + # 540 + CONFIG_NETDEVICES=y 541 + # CONFIG_DUMMY is not set 542 + # CONFIG_BONDING is not set 543 + # CONFIG_EQUALIZER is not set 544 + # CONFIG_TUN is not set 545 + # CONFIG_PHYLIB is not set 546 + 547 + # 548 + # Ethernet (10 or 100Mbit) 549 + # 550 + CONFIG_NET_ETHERNET=y 551 + CONFIG_MII=y 552 + # CONFIG_SMC91X is not set 553 + CONFIG_DM9000=y 554 + # CONFIG_SMC911X is not set 555 + # CONFIG_NETDEV_1000 is not set 556 + # CONFIG_NETDEV_10000 is not set 557 + 558 + # 559 + # Wireless LAN 560 + # 561 + # CONFIG_WLAN_PRE80211 is not set 562 + # CONFIG_WLAN_80211 is not set 563 + 564 + # 565 + # USB Network Adapters 566 + # 567 + # CONFIG_USB_CATC is not set 568 + # CONFIG_USB_KAWETH is not set 569 + # CONFIG_USB_PEGASUS is not set 570 + # CONFIG_USB_RTL8150 is not set 571 + # CONFIG_USB_USBNET_MII is not set 572 + # CONFIG_USB_USBNET is not set 573 + # CONFIG_WAN is not set 574 + # CONFIG_PPP is not set 575 + # CONFIG_SLIP is not set 576 + # CONFIG_SHAPER is not set 577 + # CONFIG_NETCONSOLE is not set 578 + # CONFIG_NETPOLL is not set 579 + # CONFIG_NET_POLL_CONTROLLER is not set 580 + 581 + # 582 + # ISDN subsystem 583 + # 584 + # CONFIG_ISDN is not set 585 + 586 + # 587 + # Input device support 588 + # 589 + CONFIG_INPUT=y 590 + # CONFIG_INPUT_FF_MEMLESS is not set 591 + # CONFIG_INPUT_POLLDEV is not set 592 + 593 + # 594 + # Userland interfaces 595 + # 596 + CONFIG_INPUT_MOUSEDEV=y 597 + # CONFIG_INPUT_MOUSEDEV_PSAUX is not set 598 + CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 599 + CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 600 + # CONFIG_INPUT_JOYDEV is not set 601 + # CONFIG_INPUT_TSDEV is not set 602 + CONFIG_INPUT_EVDEV=y 603 + # CONFIG_INPUT_EVBUG is not set 604 + 605 + # 606 + # Input Device Drivers 607 + # 608 + CONFIG_INPUT_KEYBOARD=y 609 + # CONFIG_KEYBOARD_ATKBD is not set 610 + # CONFIG_KEYBOARD_SUNKBD is not set 611 + # CONFIG_KEYBOARD_LKKBD is not set 612 + # CONFIG_KEYBOARD_XTKBD is not set 613 + # CONFIG_KEYBOARD_NEWTON is not set 614 + # CONFIG_KEYBOARD_STOWAWAY is not set 615 + CONFIG_KEYBOARD_PXA27x=m 616 + # CONFIG_KEYBOARD_GPIO is not set 617 + # CONFIG_INPUT_MOUSE is not set 618 + # CONFIG_INPUT_JOYSTICK is not set 619 + # CONFIG_INPUT_TABLET is not set 620 + CONFIG_INPUT_TOUCHSCREEN=y 621 + # CONFIG_TOUCHSCREEN_GUNZE is not set 622 + # CONFIG_TOUCHSCREEN_ELO is not set 623 + # CONFIG_TOUCHSCREEN_MTOUCH is not set 624 + # CONFIG_TOUCHSCREEN_MK712 is not set 625 + # CONFIG_TOUCHSCREEN_PENMOUNT is not set 626 + # CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set 627 + # CONFIG_TOUCHSCREEN_TOUCHWIN is not set 628 + # CONFIG_TOUCHSCREEN_UCB1400 is not set 629 + # CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set 630 + # CONFIG_INPUT_MISC is not set 631 + 632 + # 633 + # Hardware I/O ports 634 + # 635 + CONFIG_SERIO=y 636 + # CONFIG_SERIO_SERPORT is not set 637 + CONFIG_SERIO_LIBPS2=y 638 + # CONFIG_SERIO_RAW is not set 639 + # CONFIG_GAMEPORT is not set 640 + 641 + # 642 + # Character devices 643 + # 644 + CONFIG_VT=y 645 + CONFIG_VT_CONSOLE=y 646 + CONFIG_HW_CONSOLE=y 647 + # CONFIG_VT_HW_CONSOLE_BINDING is not set 648 + # CONFIG_SERIAL_NONSTANDARD is not set 649 + 650 + # 651 + # Serial drivers 652 + # 653 + # CONFIG_SERIAL_8250 is not set 654 + 655 + # 656 + # Non-8250 serial port support 657 + # 658 + CONFIG_SERIAL_PXA=y 659 + CONFIG_SERIAL_PXA_CONSOLE=y 660 + CONFIG_SERIAL_CORE=y 661 + CONFIG_SERIAL_CORE_CONSOLE=y 662 + CONFIG_UNIX98_PTYS=y 663 + CONFIG_LEGACY_PTYS=y 664 + CONFIG_LEGACY_PTY_COUNT=256 665 + 666 + # 667 + # IPMI 668 + # 669 + # CONFIG_IPMI_HANDLER is not set 670 + # CONFIG_WATCHDOG is not set 671 + CONFIG_HW_RANDOM=m 672 + # CONFIG_NVRAM is not set 673 + # CONFIG_R3964 is not set 674 + # CONFIG_RAW_DRIVER is not set 675 + 676 + # 677 + # TPM devices 678 + # 679 + # CONFIG_TCG_TPM is not set 680 + # CONFIG_I2C is not set 681 + 682 + # 683 + # SPI support 684 + # 685 + # CONFIG_SPI is not set 686 + # CONFIG_SPI_MASTER is not set 687 + 688 + # 689 + # Dallas's 1-wire bus 690 + # 691 + # CONFIG_W1 is not set 692 + # CONFIG_HWMON is not set 693 + 694 + # 695 + # Misc devices 696 + # 697 + 698 + # 699 + # Multifunction device drivers 700 + # 701 + # CONFIG_MFD_SM501 is not set 702 + 703 + # 704 + # LED devices 705 + # 706 + # CONFIG_NEW_LEDS is not set 707 + 708 + # 709 + # LED drivers 710 + # 711 + 712 + # 713 + # LED Triggers 714 + # 715 + 716 + # 717 + # Multimedia devices 718 + # 719 + # CONFIG_VIDEO_DEV is not set 720 + # CONFIG_DVB_CORE is not set 721 + # CONFIG_DAB is not set 722 + 723 + # 724 + # Graphics support 725 + # 726 + # CONFIG_BACKLIGHT_LCD_SUPPORT is not set 727 + 728 + # 729 + # Display device support 730 + # 731 + # CONFIG_DISPLAY_SUPPORT is not set 732 + # CONFIG_VGASTATE is not set 733 + CONFIG_FB=y 734 + # CONFIG_FIRMWARE_EDID is not set 735 + # CONFIG_FB_DDC is not set 736 + CONFIG_FB_CFB_FILLRECT=y 737 + CONFIG_FB_CFB_COPYAREA=y 738 + CONFIG_FB_CFB_IMAGEBLIT=y 739 + # CONFIG_FB_SYS_FILLRECT is not set 740 + # CONFIG_FB_SYS_COPYAREA is not set 741 + # CONFIG_FB_SYS_IMAGEBLIT is not set 742 + # CONFIG_FB_SYS_FOPS is not set 743 + CONFIG_FB_DEFERRED_IO=y 744 + # CONFIG_FB_SVGALIB is not set 745 + # CONFIG_FB_MACMODES is not set 746 + # CONFIG_FB_BACKLIGHT is not set 747 + # CONFIG_FB_MODE_HELPERS is not set 748 + # CONFIG_FB_TILEBLITTING is not set 749 + 750 + # 751 + # Frame buffer hardware drivers 752 + # 753 + # CONFIG_FB_S1D13XXX is not set 754 + CONFIG_FB_PXA=y 755 + # CONFIG_FB_PXA_PARAMETERS is not set 756 + # CONFIG_FB_MBX is not set 757 + # CONFIG_FB_VIRTUAL is not set 758 + 759 + # 760 + # Console display driver support 761 + # 762 + # CONFIG_VGA_CONSOLE is not set 763 + CONFIG_DUMMY_CONSOLE=y 764 + CONFIG_FRAMEBUFFER_CONSOLE=y 765 + # CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set 766 + # CONFIG_FONTS is not set 767 + CONFIG_FONT_8x8=y 768 + CONFIG_FONT_8x16=y 769 + CONFIG_LOGO=y 770 + CONFIG_LOGO_LINUX_MONO=y 771 + CONFIG_LOGO_LINUX_VGA16=y 772 + CONFIG_LOGO_LINUX_CLUT224=y 773 + 774 + # 775 + # Sound 776 + # 777 + CONFIG_SOUND=m 778 + 779 + # 780 + # Advanced Linux Sound Architecture 781 + # 782 + CONFIG_SND=m 783 + CONFIG_SND_TIMER=m 784 + CONFIG_SND_PCM=m 785 + # CONFIG_SND_SEQUENCER is not set 786 + CONFIG_SND_OSSEMUL=y 787 + CONFIG_SND_MIXER_OSS=m 788 + CONFIG_SND_PCM_OSS=m 789 + CONFIG_SND_PCM_OSS_PLUGINS=y 790 + # CONFIG_SND_DYNAMIC_MINORS is not set 791 + CONFIG_SND_SUPPORT_OLD_API=y 792 + CONFIG_SND_VERBOSE_PROCFS=y 793 + # CONFIG_SND_VERBOSE_PRINTK is not set 794 + # CONFIG_SND_DEBUG is not set 795 + 796 + # 797 + # Generic devices 798 + # 799 + CONFIG_SND_AC97_CODEC=m 800 + # CONFIG_SND_DUMMY is not set 801 + # CONFIG_SND_MTPAV is not set 802 + # CONFIG_SND_SERIAL_U16550 is not set 803 + # CONFIG_SND_MPU401 is not set 804 + 805 + # 806 + # ALSA ARM devices 807 + # 808 + CONFIG_SND_PXA2XX_PCM=m 809 + CONFIG_SND_PXA2XX_AC97=m 810 + 811 + # 812 + # USB devices 813 + # 814 + # CONFIG_SND_USB_AUDIO is not set 815 + # CONFIG_SND_USB_CAIAQ is not set 816 + 817 + # 818 + # System on Chip audio support 819 + # 820 + # CONFIG_SND_SOC is not set 821 + 822 + # 823 + # Open Sound System 824 + # 825 + # CONFIG_SOUND_PRIME is not set 826 + CONFIG_AC97_BUS=m 827 + 828 + # 829 + # HID Devices 830 + # 831 + CONFIG_HID=y 832 + # CONFIG_HID_DEBUG is not set 833 + 834 + # 835 + # USB Input Devices 836 + # 837 + CONFIG_USB_HID=y 838 + # CONFIG_USB_HIDINPUT_POWERBOOK is not set 839 + # CONFIG_HID_FF is not set 840 + # CONFIG_USB_HIDDEV is not set 841 + 842 + # 843 + # USB support 844 + # 845 + CONFIG_USB_ARCH_HAS_HCD=y 846 + CONFIG_USB_ARCH_HAS_OHCI=y 847 + # CONFIG_USB_ARCH_HAS_EHCI is not set 848 + CONFIG_USB=y 849 + # CONFIG_USB_DEBUG is not set 850 + 851 + # 852 + # Miscellaneous USB options 853 + # 854 + CONFIG_USB_DEVICEFS=y 855 + # CONFIG_USB_DEVICE_CLASS is not set 856 + # CONFIG_USB_DYNAMIC_MINORS is not set 857 + # CONFIG_USB_SUSPEND is not set 858 + # CONFIG_USB_OTG is not set 859 + 860 + # 861 + # USB Host Controller Drivers 862 + # 863 + # CONFIG_USB_ISP116X_HCD is not set 864 + CONFIG_USB_OHCI_HCD=y 865 + # CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 866 + # CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set 867 + CONFIG_USB_OHCI_LITTLE_ENDIAN=y 868 + # CONFIG_USB_SL811_HCD is not set 869 + 870 + # 871 + # USB Device Class drivers 872 + # 873 + # CONFIG_USB_ACM is not set 874 + # CONFIG_USB_PRINTER is not set 875 + 876 + # 877 + # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 878 + # 879 + 880 + # 881 + # may also be needed; see USB_STORAGE Help for more information 882 + # 883 + CONFIG_USB_STORAGE=y 884 + # CONFIG_USB_STORAGE_DEBUG is not set 885 + # CONFIG_USB_STORAGE_DATAFAB is not set 886 + # CONFIG_USB_STORAGE_FREECOM is not set 887 + # CONFIG_USB_STORAGE_DPCM is not set 888 + # CONFIG_USB_STORAGE_USBAT is not set 889 + # CONFIG_USB_STORAGE_SDDR09 is not set 890 + # CONFIG_USB_STORAGE_SDDR55 is not set 891 + # CONFIG_USB_STORAGE_JUMPSHOT is not set 892 + # CONFIG_USB_STORAGE_ALAUDA is not set 893 + # CONFIG_USB_STORAGE_KARMA is not set 894 + # CONFIG_USB_LIBUSUAL is not set 895 + 896 + # 897 + # USB Imaging devices 898 + # 899 + # CONFIG_USB_MDC800 is not set 900 + # CONFIG_USB_MICROTEK is not set 901 + # CONFIG_USB_MON is not set 902 + 903 + # 904 + # USB port drivers 905 + # 906 + 907 + # 908 + # USB Serial Converter support 909 + # 910 + # CONFIG_USB_SERIAL is not set 911 + 912 + # 913 + # USB Miscellaneous drivers 914 + # 915 + # CONFIG_USB_EMI62 is not set 916 + # CONFIG_USB_EMI26 is not set 917 + # CONFIG_USB_ADUTUX is not set 918 + # CONFIG_USB_AUERSWALD is not set 919 + # CONFIG_USB_RIO500 is not set 920 + # CONFIG_USB_LEGOTOWER is not set 921 + # CONFIG_USB_LCD is not set 922 + # CONFIG_USB_BERRY_CHARGE is not set 923 + # CONFIG_USB_LED is not set 924 + # CONFIG_USB_CYPRESS_CY7C63 is not set 925 + # CONFIG_USB_CYTHERM is not set 926 + # CONFIG_USB_PHIDGET is not set 927 + # CONFIG_USB_IDMOUSE is not set 928 + # CONFIG_USB_FTDI_ELAN is not set 929 + # CONFIG_USB_APPLEDISPLAY is not set 930 + # CONFIG_USB_LD is not set 931 + # CONFIG_USB_TRANCEVIBRATOR is not set 932 + # CONFIG_USB_IOWARRIOR is not set 933 + # CONFIG_USB_TEST is not set 934 + 935 + # 936 + # USB DSL modem support 937 + # 938 + 939 + # 940 + # USB Gadget Support 941 + # 942 + # CONFIG_USB_GADGET is not set 943 + CONFIG_MMC=m 944 + # CONFIG_MMC_DEBUG is not set 945 + # CONFIG_MMC_UNSAFE_RESUME is not set 946 + 947 + # 948 + # MMC/SD Card Drivers 949 + # 950 + CONFIG_MMC_BLOCK=m 951 + 952 + # 953 + # MMC/SD Host Controller Drivers 954 + # 955 + CONFIG_MMC_PXA=m 956 + 957 + # 958 + # Real Time Clock 959 + # 960 + CONFIG_RTC_LIB=y 961 + CONFIG_RTC_CLASS=m 962 + 963 + # 964 + # RTC interfaces 965 + # 966 + CONFIG_RTC_INTF_SYSFS=y 967 + CONFIG_RTC_INTF_PROC=y 968 + CONFIG_RTC_INTF_DEV=y 969 + # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set 970 + # CONFIG_RTC_DRV_TEST is not set 971 + 972 + # 973 + # I2C RTC drivers 974 + # 975 + 976 + # 977 + # SPI RTC drivers 978 + # 979 + 980 + # 981 + # Platform RTC drivers 982 + # 983 + # CONFIG_RTC_DRV_CMOS is not set 984 + # CONFIG_RTC_DRV_DS1553 is not set 985 + # CONFIG_RTC_DRV_DS1742 is not set 986 + # CONFIG_RTC_DRV_M48T86 is not set 987 + CONFIG_RTC_DRV_V3020=m 988 + 989 + # 990 + # on-CPU RTC drivers 991 + # 992 + CONFIG_RTC_DRV_SA1100=m 993 + 994 + # 995 + # File systems 996 + # 997 + CONFIG_EXT2_FS=y 998 + # CONFIG_EXT2_FS_XATTR is not set 999 + # CONFIG_EXT2_FS_XIP is not set 1000 + CONFIG_EXT3_FS=y 1001 + CONFIG_EXT3_FS_XATTR=y 1002 + # CONFIG_EXT3_FS_POSIX_ACL is not set 1003 + # CONFIG_EXT3_FS_SECURITY is not set 1004 + # CONFIG_EXT4DEV_FS is not set 1005 + CONFIG_JBD=y 1006 + # CONFIG_JBD_DEBUG is not set 1007 + CONFIG_FS_MBCACHE=y 1008 + # CONFIG_REISERFS_FS is not set 1009 + # CONFIG_JFS_FS is not set 1010 + # CONFIG_FS_POSIX_ACL is not set 1011 + # CONFIG_XFS_FS is not set 1012 + # CONFIG_GFS2_FS is not set 1013 + # CONFIG_OCFS2_FS is not set 1014 + # CONFIG_MINIX_FS is not set 1015 + # CONFIG_ROMFS_FS is not set 1016 + CONFIG_INOTIFY=y 1017 + CONFIG_INOTIFY_USER=y 1018 + # CONFIG_QUOTA is not set 1019 + CONFIG_DNOTIFY=y 1020 + # CONFIG_AUTOFS_FS is not set 1021 + # CONFIG_AUTOFS4_FS is not set 1022 + # CONFIG_FUSE_FS is not set 1023 + 1024 + # 1025 + # CD-ROM/DVD Filesystems 1026 + # 1027 + # CONFIG_ISO9660_FS is not set 1028 + # CONFIG_UDF_FS is not set 1029 + 1030 + # 1031 + # DOS/FAT/NT Filesystems 1032 + # 1033 + CONFIG_FAT_FS=y 1034 + CONFIG_MSDOS_FS=y 1035 + CONFIG_VFAT_FS=y 1036 + CONFIG_FAT_DEFAULT_CODEPAGE=437 1037 + CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" 1038 + # CONFIG_NTFS_FS is not set 1039 + 1040 + # 1041 + # Pseudo filesystems 1042 + # 1043 + CONFIG_PROC_FS=y 1044 + CONFIG_PROC_SYSCTL=y 1045 + CONFIG_SYSFS=y 1046 + CONFIG_TMPFS=y 1047 + # CONFIG_TMPFS_POSIX_ACL is not set 1048 + # CONFIG_HUGETLB_PAGE is not set 1049 + CONFIG_RAMFS=y 1050 + # CONFIG_CONFIGFS_FS is not set 1051 + 1052 + # 1053 + # Miscellaneous filesystems 1054 + # 1055 + # CONFIG_ADFS_FS is not set 1056 + # CONFIG_AFFS_FS is not set 1057 + # CONFIG_HFS_FS is not set 1058 + # CONFIG_HFSPLUS_FS is not set 1059 + # CONFIG_BEFS_FS is not set 1060 + # CONFIG_BFS_FS is not set 1061 + # CONFIG_EFS_FS is not set 1062 + CONFIG_JFFS2_FS=y 1063 + CONFIG_JFFS2_FS_DEBUG=0 1064 + CONFIG_JFFS2_FS_WRITEBUFFER=y 1065 + CONFIG_JFFS2_SUMMARY=y 1066 + # CONFIG_JFFS2_FS_XATTR is not set 1067 + # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set 1068 + CONFIG_JFFS2_ZLIB=y 1069 + CONFIG_JFFS2_RTIME=y 1070 + # CONFIG_JFFS2_RUBIN is not set 1071 + # CONFIG_CRAMFS is not set 1072 + # CONFIG_VXFS_FS is not set 1073 + # CONFIG_HPFS_FS is not set 1074 + # CONFIG_QNX4FS_FS is not set 1075 + # CONFIG_SYSV_FS is not set 1076 + # CONFIG_UFS_FS is not set 1077 + 1078 + # 1079 + # Network File Systems 1080 + # 1081 + CONFIG_NFS_FS=y 1082 + CONFIG_NFS_V3=y 1083 + # CONFIG_NFS_V3_ACL is not set 1084 + # CONFIG_NFS_V4 is not set 1085 + # CONFIG_NFS_DIRECTIO is not set 1086 + # CONFIG_NFSD is not set 1087 + CONFIG_ROOT_NFS=y 1088 + CONFIG_LOCKD=y 1089 + CONFIG_LOCKD_V4=y 1090 + CONFIG_NFS_COMMON=y 1091 + CONFIG_SUNRPC=y 1092 + # CONFIG_SUNRPC_BIND34 is not set 1093 + # CONFIG_RPCSEC_GSS_KRB5 is not set 1094 + # CONFIG_RPCSEC_GSS_SPKM3 is not set 1095 + CONFIG_SMB_FS=y 1096 + # CONFIG_SMB_NLS_DEFAULT is not set 1097 + # CONFIG_CIFS is not set 1098 + # CONFIG_NCP_FS is not set 1099 + # CONFIG_CODA_FS is not set 1100 + # CONFIG_AFS_FS is not set 1101 + # CONFIG_9P_FS is not set 1102 + 1103 + # 1104 + # Partition Types 1105 + # 1106 + # CONFIG_PARTITION_ADVANCED is not set 1107 + CONFIG_MSDOS_PARTITION=y 1108 + 1109 + # 1110 + # Native Language Support 1111 + # 1112 + CONFIG_NLS=y 1113 + CONFIG_NLS_DEFAULT="iso8859-1" 1114 + CONFIG_NLS_CODEPAGE_437=y 1115 + # CONFIG_NLS_CODEPAGE_737 is not set 1116 + # CONFIG_NLS_CODEPAGE_775 is not set 1117 + # CONFIG_NLS_CODEPAGE_850 is not set 1118 + # CONFIG_NLS_CODEPAGE_852 is not set 1119 + # CONFIG_NLS_CODEPAGE_855 is not set 1120 + # CONFIG_NLS_CODEPAGE_857 is not set 1121 + # CONFIG_NLS_CODEPAGE_860 is not set 1122 + # CONFIG_NLS_CODEPAGE_861 is not set 1123 + # CONFIG_NLS_CODEPAGE_862 is not set 1124 + # CONFIG_NLS_CODEPAGE_863 is not set 1125 + # CONFIG_NLS_CODEPAGE_864 is not set 1126 + # CONFIG_NLS_CODEPAGE_865 is not set 1127 + # CONFIG_NLS_CODEPAGE_866 is not set 1128 + # CONFIG_NLS_CODEPAGE_869 is not set 1129 + # CONFIG_NLS_CODEPAGE_936 is not set 1130 + # CONFIG_NLS_CODEPAGE_950 is not set 1131 + # CONFIG_NLS_CODEPAGE_932 is not set 1132 + # CONFIG_NLS_CODEPAGE_949 is not set 1133 + # CONFIG_NLS_CODEPAGE_874 is not set 1134 + # CONFIG_NLS_ISO8859_8 is not set 1135 + # CONFIG_NLS_CODEPAGE_1250 is not set 1136 + # CONFIG_NLS_CODEPAGE_1251 is not set 1137 + # CONFIG_NLS_ASCII is not set 1138 + CONFIG_NLS_ISO8859_1=y 1139 + # CONFIG_NLS_ISO8859_2 is not set 1140 + # CONFIG_NLS_ISO8859_3 is not set 1141 + # CONFIG_NLS_ISO8859_4 is not set 1142 + # CONFIG_NLS_ISO8859_5 is not set 1143 + # CONFIG_NLS_ISO8859_6 is not set 1144 + # CONFIG_NLS_ISO8859_7 is not set 1145 + # CONFIG_NLS_ISO8859_9 is not set 1146 + # CONFIG_NLS_ISO8859_13 is not set 1147 + # CONFIG_NLS_ISO8859_14 is not set 1148 + # CONFIG_NLS_ISO8859_15 is not set 1149 + # CONFIG_NLS_KOI8_R is not set 1150 + # CONFIG_NLS_KOI8_U is not set 1151 + CONFIG_NLS_UTF8=y 1152 + 1153 + # 1154 + # Distributed Lock Manager 1155 + # 1156 + # CONFIG_DLM is not set 1157 + 1158 + # 1159 + # Profiling support 1160 + # 1161 + # CONFIG_PROFILING is not set 1162 + 1163 + # 1164 + # Kernel hacking 1165 + # 1166 + # CONFIG_PRINTK_TIME is not set 1167 + CONFIG_ENABLE_MUST_CHECK=y 1168 + CONFIG_MAGIC_SYSRQ=y 1169 + # CONFIG_UNUSED_SYMBOLS is not set 1170 + # CONFIG_DEBUG_FS is not set 1171 + # CONFIG_HEADERS_CHECK is not set 1172 + CONFIG_DEBUG_KERNEL=y 1173 + # CONFIG_DEBUG_SHIRQ is not set 1174 + # CONFIG_DETECT_SOFTLOCKUP is not set 1175 + # CONFIG_SCHEDSTATS is not set 1176 + # CONFIG_TIMER_STATS is not set 1177 + # CONFIG_DEBUG_SLAB is not set 1178 + # CONFIG_DEBUG_RT_MUTEXES is not set 1179 + # CONFIG_RT_MUTEX_TESTER is not set 1180 + # CONFIG_DEBUG_SPINLOCK is not set 1181 + # CONFIG_DEBUG_MUTEXES is not set 1182 + # CONFIG_DEBUG_LOCK_ALLOC is not set 1183 + # CONFIG_PROVE_LOCKING is not set 1184 + # CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1185 + # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1186 + # CONFIG_DEBUG_KOBJECT is not set 1187 + # CONFIG_DEBUG_BUGVERBOSE is not set 1188 + CONFIG_DEBUG_INFO=y 1189 + # CONFIG_DEBUG_VM is not set 1190 + # CONFIG_DEBUG_LIST is not set 1191 + CONFIG_FRAME_POINTER=y 1192 + CONFIG_FORCED_INLINING=y 1193 + # CONFIG_RCU_TORTURE_TEST is not set 1194 + # CONFIG_FAULT_INJECTION is not set 1195 + CONFIG_DEBUG_USER=y 1196 + CONFIG_DEBUG_ERRORS=y 1197 + CONFIG_DEBUG_LL=y 1198 + # CONFIG_DEBUG_ICEDCC is not set 1199 + 1200 + # 1201 + # Security options 1202 + # 1203 + # CONFIG_KEYS is not set 1204 + # CONFIG_SECURITY is not set 1205 + 1206 + # 1207 + # Cryptographic options 1208 + # 1209 + CONFIG_CRYPTO=y 1210 + CONFIG_CRYPTO_ALGAPI=m 1211 + CONFIG_CRYPTO_BLKCIPHER=m 1212 + CONFIG_CRYPTO_MANAGER=m 1213 + # CONFIG_CRYPTO_HMAC is not set 1214 + # CONFIG_CRYPTO_XCBC is not set 1215 + # CONFIG_CRYPTO_NULL is not set 1216 + # CONFIG_CRYPTO_MD4 is not set 1217 + # CONFIG_CRYPTO_MD5 is not set 1218 + # CONFIG_CRYPTO_SHA1 is not set 1219 + # CONFIG_CRYPTO_SHA256 is not set 1220 + # CONFIG_CRYPTO_SHA512 is not set 1221 + # CONFIG_CRYPTO_WP512 is not set 1222 + # CONFIG_CRYPTO_TGR192 is not set 1223 + # CONFIG_CRYPTO_GF128MUL is not set 1224 + CONFIG_CRYPTO_ECB=m 1225 + CONFIG_CRYPTO_CBC=m 1226 + CONFIG_CRYPTO_PCBC=m 1227 + # CONFIG_CRYPTO_LRW is not set 1228 + # CONFIG_CRYPTO_CRYPTD is not set 1229 + # CONFIG_CRYPTO_DES is not set 1230 + # CONFIG_CRYPTO_FCRYPT is not set 1231 + # CONFIG_CRYPTO_BLOWFISH is not set 1232 + # CONFIG_CRYPTO_TWOFISH is not set 1233 + # CONFIG_CRYPTO_SERPENT is not set 1234 + CONFIG_CRYPTO_AES=m 1235 + # CONFIG_CRYPTO_CAST5 is not set 1236 + # CONFIG_CRYPTO_CAST6 is not set 1237 + # CONFIG_CRYPTO_TEA is not set 1238 + CONFIG_CRYPTO_ARC4=m 1239 + # CONFIG_CRYPTO_KHAZAD is not set 1240 + # CONFIG_CRYPTO_ANUBIS is not set 1241 + # CONFIG_CRYPTO_DEFLATE is not set 1242 + # CONFIG_CRYPTO_MICHAEL_MIC is not set 1243 + # CONFIG_CRYPTO_CRC32C is not set 1244 + # CONFIG_CRYPTO_CAMELLIA is not set 1245 + # CONFIG_CRYPTO_TEST is not set 1246 + 1247 + # 1248 + # Hardware crypto devices 1249 + # 1250 + 1251 + # 1252 + # Library routines 1253 + # 1254 + CONFIG_BITREVERSE=y 1255 + # CONFIG_CRC_CCITT is not set 1256 + # CONFIG_CRC16 is not set 1257 + # CONFIG_CRC_ITU_T is not set 1258 + CONFIG_CRC32=y 1259 + # CONFIG_LIBCRC32C is not set 1260 + CONFIG_ZLIB_INFLATE=y 1261 + CONFIG_ZLIB_DEFLATE=y 1262 + CONFIG_PLIST=y 1263 + CONFIG_HAS_IOMEM=y 1264 + CONFIG_HAS_IOPORT=y 1265 + CONFIG_HAS_DMA=y
+5 -5
arch/arm/configs/s3c2410_defconfig
··· 138 138 CONFIG_PLAT_S3C24XX=y 139 139 CONFIG_CPU_S3C244X=y 140 140 CONFIG_PM_SIMTEC=y 141 - # CONFIG_S3C2410_BOOT_WATCHDOG is not set 142 - # CONFIG_S3C2410_BOOT_ERROR_RESET is not set 141 + # CONFIG_S3C_BOOT_WATCHDOG is not set 142 + # CONFIG_S3C_BOOT_ERROR_RESET is not set 143 143 # CONFIG_S3C2410_PM_DEBUG is not set 144 144 # CONFIG_S3C2410_PM_CHECK is not set 145 - CONFIG_S3C2410_LOWLEVEL_UART_PORT=0 145 + CONFIG_S3C_LOWLEVEL_UART_PORT=0 146 146 CONFIG_S3C2410_DMA=y 147 147 # CONFIG_S3C2410_DMA_DEBUG is not set 148 148 CONFIG_MACH_SMDK=y ··· 1392 1392 # CONFIG_DEBUG_ERRORS is not set 1393 1393 CONFIG_DEBUG_LL=y 1394 1394 # CONFIG_DEBUG_ICEDCC is not set 1395 - CONFIG_DEBUG_S3C2410_PORT=y 1396 - CONFIG_DEBUG_S3C2410_UART=0 1395 + CONFIG_DEBUG_S3C_PORT=y 1396 + CONFIG_DEBUG_S3C_UART=0 1397 1397 1398 1398 # 1399 1399 # Security options
+7
arch/arm/mach-iop32x/Kconfig
··· 42 42 Say N if the IOP is an add in card, the host system owns the PCI 43 43 bus in this case. 44 44 45 + config MACH_EM7210 46 + bool "Enable support for the Lanner EM7210" 47 + help 48 + Say Y here if you want to run your kernel on the Lanner EM7210 49 + board. Say also Y here if you have a SS4000e Baxter Creek NAS 50 + appliance." 51 + 45 52 endmenu 46 53 47 54 endif
+1
arch/arm/mach-iop32x/Makefile
··· 11 11 obj-$(CONFIG_ARCH_IQ80321) += iq80321.o 12 12 obj-$(CONFIG_ARCH_IQ31244) += iq31244.o 13 13 obj-$(CONFIG_MACH_N2100) += n2100.o 14 + obj-$(CONFIG_MACH_EM7210) += em7210.o
+215
arch/arm/mach-iop32x/em7210.c
··· 1 + /* 2 + * arch/arm/mach-iop32x/em7210.c 3 + * 4 + * Board support code for the Lanner EM7210 platforms. 5 + * 6 + * Based on arch/arm/mach-iop32x/iq31244.c file. 7 + * 8 + * Copyright (C) 2007 Arnaud Patard <arnaud.patard@rtp-net.org> 9 + * 10 + * This program is free software; you can redistribute it and/or modify 11 + * it under the terms of the GNU General Public License version 2 as 12 + * published by the Free Software Foundation. 13 + * 14 + */ 15 + 16 + #include <linux/mm.h> 17 + #include <linux/init.h> 18 + #include <linux/kernel.h> 19 + #include <linux/pci.h> 20 + #include <linux/pm.h> 21 + #include <linux/serial_core.h> 22 + #include <linux/serial_8250.h> 23 + #include <linux/mtd/physmap.h> 24 + #include <linux/platform_device.h> 25 + #include <linux/i2c.h> 26 + #include <asm/hardware.h> 27 + #include <linux/io.h> 28 + #include <linux/irq.h> 29 + #include <asm/mach/arch.h> 30 + #include <asm/mach/map.h> 31 + #include <asm/mach/pci.h> 32 + #include <asm/mach/time.h> 33 + #include <asm/mach-types.h> 34 + #include <asm/arch/time.h> 35 + 36 + static void __init em7210_timer_init(void) 37 + { 38 + /* http://www.kwaak.net/fotos/fotos-nas/slide_24.html */ 39 + /* 33.333 MHz crystal. */ 40 + iop_init_time(200000000); 41 + } 42 + 43 + static struct sys_timer em7210_timer = { 44 + .init = em7210_timer_init, 45 + .offset = iop_gettimeoffset, 46 + }; 47 + 48 + /* 49 + * EM7210 RTC 50 + */ 51 + static struct i2c_board_info __initdata em7210_i2c_devices[] = { 52 + { 53 + I2C_BOARD_INFO("rtc-rs5c372", 0x32), 54 + .type = "rs5c372a", 55 + }, 56 + }; 57 + 58 + /* 59 + * EM7210 I/O 60 + */ 61 + static struct map_desc em7210_io_desc[] __initdata = { 62 + { /* on-board devices */ 63 + .virtual = IQ31244_UART, 64 + .pfn = __phys_to_pfn(IQ31244_UART), 65 + .length = 0x00100000, 66 + .type = MT_DEVICE, 67 + }, 68 + }; 69 + 70 + void __init em7210_map_io(void) 71 + { 72 + iop3xx_map_io(); 73 + iotable_init(em7210_io_desc, ARRAY_SIZE(em7210_io_desc)); 74 + } 75 + 76 + 77 + /* 78 + * EM7210 PCI 79 + */ 80 + #define INTA IRQ_IOP32X_XINT0 81 + #define INTB IRQ_IOP32X_XINT1 82 + #define INTC IRQ_IOP32X_XINT2 83 + #define INTD IRQ_IOP32X_XINT3 84 + 85 + static int __init 86 + em7210_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 87 + { 88 + static int pci_irq_table[][4] = { 89 + /* 90 + * PCI IDSEL/INTPIN->INTLINE 91 + * A B C D 92 + */ 93 + {INTB, INTB, INTB, INTB}, /* console / uart */ 94 + {INTA, INTA, INTA, INTA}, /* 1st 82541 */ 95 + {INTD, INTD, INTD, INTD}, /* 2nd 82541 */ 96 + {INTC, INTC, INTC, INTC}, /* GD31244 */ 97 + {INTD, INTA, INTA, INTA}, /* mini-PCI */ 98 + {INTD, INTC, INTA, INTA}, /* NEC USB */ 99 + }; 100 + 101 + if (pin < 1 || pin > 4) 102 + return -1; 103 + 104 + return pci_irq_table[slot % 6][pin - 1]; 105 + } 106 + 107 + static struct hw_pci em7210_pci __initdata = { 108 + .swizzle = pci_std_swizzle, 109 + .nr_controllers = 1, 110 + .setup = iop3xx_pci_setup, 111 + .preinit = iop3xx_pci_preinit, 112 + .scan = iop3xx_pci_scan_bus, 113 + .map_irq = em7210_pci_map_irq, 114 + }; 115 + 116 + static int __init em7210_pci_init(void) 117 + { 118 + if (machine_is_em7210()) 119 + pci_common_init(&em7210_pci); 120 + 121 + return 0; 122 + } 123 + 124 + subsys_initcall(em7210_pci_init); 125 + 126 + 127 + /* 128 + * EM7210 Flash 129 + */ 130 + static struct physmap_flash_data em7210_flash_data = { 131 + .width = 2, 132 + }; 133 + 134 + static struct resource em7210_flash_resource = { 135 + .start = 0xf0000000, 136 + .end = 0xf1ffffff, 137 + .flags = IORESOURCE_MEM, 138 + }; 139 + 140 + static struct platform_device em7210_flash_device = { 141 + .name = "physmap-flash", 142 + .id = 0, 143 + .dev = { 144 + .platform_data = &em7210_flash_data, 145 + }, 146 + .num_resources = 1, 147 + .resource = &em7210_flash_resource, 148 + }; 149 + 150 + 151 + /* 152 + * EM7210 UART 153 + * The physical address of the serial port is 0xfe800000, 154 + * so it can be used for physical and virtual address. 155 + */ 156 + static struct plat_serial8250_port em7210_serial_port[] = { 157 + { 158 + .mapbase = IQ31244_UART, 159 + .membase = (char *)IQ31244_UART, 160 + .irq = IRQ_IOP32X_XINT1, 161 + .flags = UPF_SKIP_TEST, 162 + .iotype = UPIO_MEM, 163 + .regshift = 0, 164 + .uartclk = 1843200, 165 + }, 166 + { }, 167 + }; 168 + 169 + static struct resource em7210_uart_resource = { 170 + .start = IQ31244_UART, 171 + .end = IQ31244_UART + 7, 172 + .flags = IORESOURCE_MEM, 173 + }; 174 + 175 + static struct platform_device em7210_serial_device = { 176 + .name = "serial8250", 177 + .id = PLAT8250_DEV_PLATFORM, 178 + .dev = { 179 + .platform_data = em7210_serial_port, 180 + }, 181 + .num_resources = 1, 182 + .resource = &em7210_uart_resource, 183 + }; 184 + 185 + void em7210_power_off(void) 186 + { 187 + *IOP3XX_GPOE &= 0xfe; 188 + *IOP3XX_GPOD |= 0x01; 189 + } 190 + 191 + static void __init em7210_init_machine(void) 192 + { 193 + platform_device_register(&em7210_serial_device); 194 + platform_device_register(&iop3xx_i2c0_device); 195 + platform_device_register(&iop3xx_i2c1_device); 196 + platform_device_register(&em7210_flash_device); 197 + platform_device_register(&iop3xx_dma_0_channel); 198 + platform_device_register(&iop3xx_dma_1_channel); 199 + 200 + i2c_register_board_info(0, em7210_i2c_devices, 201 + ARRAY_SIZE(em7210_i2c_devices)); 202 + 203 + 204 + pm_power_off = em7210_power_off; 205 + } 206 + 207 + MACHINE_START(EM7210, "Lanner EM7210") 208 + .phys_io = IQ31244_UART, 209 + .io_pg_offst = ((IQ31244_UART) >> 18) & 0xfffc, 210 + .boot_params = 0xa0000100, 211 + .map_io = em7210_map_io, 212 + .init_irq = iop32x_init_irq, 213 + .timer = &em7210_timer, 214 + .init_machine = em7210_init_machine, 215 + MACHINE_END
+2 -1
arch/arm/mach-iop32x/irq.c
··· 63 63 if (machine_is_glantank() || 64 64 machine_is_iq80321() || 65 65 machine_is_iq31244() || 66 - machine_is_n2100()) 66 + machine_is_n2100() || 67 + machine_is_em7210()) 67 68 *IOP3XX_PCIIRSR = 0x0f; 68 69 69 70 for (i = 0; i < NR_IRQS; i++) {
+1 -1
arch/arm/mach-ixp4xx/common.c
··· 188 188 *int_reg |= (int_style << (line * IXP4XX_GPIO_STYLE_SIZE)); 189 189 190 190 /* Configure the line as an input */ 191 - gpio_line_config(line, IXP4XX_GPIO_IN); 191 + gpio_line_config(irq2gpio[irq], IXP4XX_GPIO_IN); 192 192 193 193 return 0; 194 194 }
-1
arch/arm/mach-ks8695/irq.c
··· 23 23 #include <linux/module.h> 24 24 #include <linux/interrupt.h> 25 25 #include <linux/ioport.h> 26 - #include <linux/ptrace.h> 27 26 #include <linux/sysdev.h> 28 27 29 28 #include <asm/hardware.h>
+12
arch/arm/mach-mx3/Kconfig
··· 1 + menu "MX3 Options" 2 + depends on ARCH_MX3 3 + 4 + config MACH_MX31ADS 5 + bool "Support MX31ADS platforms" 6 + default y 7 + help 8 + Include support for MX31ADS platform. This includes specific 9 + configurations for the board and its peripherals. 10 + 11 + endmenu 12 +
+8
arch/arm/mach-mx3/Makefile
··· 1 + # 2 + # Makefile for the linux kernel. 3 + # 4 + 5 + # Object file lists. 6 + 7 + obj-y := mm.o time.o 8 + obj-$(CONFIG_MACH_MX31ADS) += mx31ads.o
+3
arch/arm/mach-mx3/Makefile.boot
··· 1 + zreladdr-y := 0x80008000 2 + params_phys-y := 0x80000100 3 + initrd_phys-y := 0x80800000
+64
arch/arm/mach-mx3/mm.c
··· 1 + /* 2 + * Copyright (C) 1999,2000 Arm Limited 3 + * Copyright (C) 2000 Deep Blue Solutions Ltd 4 + * Copyright (C) 2002 Shane Nay (shane@minirl.com) 5 + * Copyright 2005-2007 Freescale Semiconductor, Inc. All Rights Reserved. 6 + * - add MX31 specific definitions 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/mm.h> 24 + #include <linux/init.h> 25 + #include <asm/hardware.h> 26 + #include <asm/pgtable.h> 27 + #include <asm/mach/map.h> 28 + #include <asm/arch/common.h> 29 + 30 + /*! 31 + * @file mm.c 32 + * 33 + * @brief This file creates static virtual to physical mappings, common to all MX3 boards. 34 + * 35 + * @ingroup Memory 36 + */ 37 + 38 + /*! 39 + * This table defines static virtual address mappings for I/O regions. 40 + * These are the mappings common across all MX3 boards. 41 + */ 42 + static struct map_desc mxc_io_desc[] __initdata = { 43 + { 44 + .virtual = X_MEMC_BASE_ADDR_VIRT, 45 + .pfn = __phys_to_pfn(X_MEMC_BASE_ADDR), 46 + .length = X_MEMC_SIZE, 47 + .type = MT_DEVICE 48 + }, { 49 + .virtual = AVIC_BASE_ADDR_VIRT, 50 + .pfn = __phys_to_pfn(AVIC_BASE_ADDR), 51 + .length = AVIC_SIZE, 52 + .type = MT_NONSHARED_DEVICE 53 + }, 54 + }; 55 + 56 + /*! 57 + * This function initializes the memory map. It is called during the 58 + * system startup to create static physical to virtual memory mappings 59 + * for the IO modules. 60 + */ 61 + void __init mxc_map_io(void) 62 + { 63 + iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc)); 64 + }
+142
arch/arm/mach-mx3/mx31ads.c
··· 1 + /* 2 + * Copyright (C) 2000 Deep Blue Solutions Ltd 3 + * Copyright (C) 2002 Shane Nay (shane@minirl.com) 4 + * Copyright 2005-2007 Freescale Semiconductor, Inc. All Rights Reserved. 5 + * 6 + * This program is free software; you can redistribute it and/or modify 7 + * it under the terms of the GNU General Public License as published by 8 + * the Free Software Foundation; either version 2 of the License, or 9 + * (at your option) any later version. 10 + * 11 + * This program is distributed in the hope that it will be useful, 12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 + * GNU General Public License for more details. 15 + * 16 + * You should have received a copy of the GNU General Public License 17 + * along with this program; if not, write to the Free Software 18 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 + */ 20 + 21 + #include <linux/types.h> 22 + #include <linux/init.h> 23 + #include <linux/clk.h> 24 + #include <linux/serial_8250.h> 25 + 26 + #include <asm/hardware.h> 27 + #include <asm/mach-types.h> 28 + #include <asm/mach/arch.h> 29 + #include <asm/memory.h> 30 + #include <asm/mach/map.h> 31 + #include <asm/arch/common.h> 32 + 33 + /*! 34 + * @file mx31ads.c 35 + * 36 + * @brief This file contains the board-specific initialization routines. 37 + * 38 + * @ingroup System 39 + */ 40 + 41 + #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) 42 + /*! 43 + * The serial port definition structure. 44 + */ 45 + static struct plat_serial8250_port serial_platform_data[] = { 46 + { 47 + .membase = (void *)(PBC_BASE_ADDRESS + PBC_SC16C652_UARTA), 48 + .mapbase = (unsigned long)(CS4_BASE_ADDR + PBC_SC16C652_UARTA), 49 + .irq = EXPIO_INT_XUART_INTA, 50 + .uartclk = 14745600, 51 + .regshift = 0, 52 + .iotype = UPIO_MEM, 53 + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_AUTO_IRQ, 54 + }, { 55 + .membase = (void *)(PBC_BASE_ADDRESS + PBC_SC16C652_UARTB), 56 + .mapbase = (unsigned long)(CS4_BASE_ADDR + PBC_SC16C652_UARTB), 57 + .irq = EXPIO_INT_XUART_INTB, 58 + .uartclk = 14745600, 59 + .regshift = 0, 60 + .iotype = UPIO_MEM, 61 + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_AUTO_IRQ, 62 + }, 63 + {}, 64 + }; 65 + 66 + static struct platform_device serial_device = { 67 + .name = "serial8250", 68 + .id = 0, 69 + .dev = { 70 + .platform_data = serial_platform_data, 71 + }, 72 + }; 73 + 74 + static int __init mxc_init_extuart(void) 75 + { 76 + return platform_device_register(&serial_device); 77 + } 78 + #else 79 + static inline int mxc_init_extuart(void) 80 + { 81 + return 0; 82 + } 83 + #endif 84 + 85 + /*! 86 + * This structure defines static mappings for the i.MX31ADS board. 87 + */ 88 + static struct map_desc mx31ads_io_desc[] __initdata = { 89 + { 90 + .virtual = AIPS1_BASE_ADDR_VIRT, 91 + .pfn = __phys_to_pfn(AIPS1_BASE_ADDR), 92 + .length = AIPS1_SIZE, 93 + .type = MT_NONSHARED_DEVICE 94 + }, { 95 + .virtual = SPBA0_BASE_ADDR_VIRT, 96 + .pfn = __phys_to_pfn(SPBA0_BASE_ADDR), 97 + .length = SPBA0_SIZE, 98 + .type = MT_NONSHARED_DEVICE 99 + }, { 100 + .virtual = AIPS2_BASE_ADDR_VIRT, 101 + .pfn = __phys_to_pfn(AIPS2_BASE_ADDR), 102 + .length = AIPS2_SIZE, 103 + .type = MT_NONSHARED_DEVICE 104 + }, { 105 + .virtual = CS4_BASE_ADDR_VIRT, 106 + .pfn = __phys_to_pfn(CS4_BASE_ADDR), 107 + .length = CS4_SIZE / 2, 108 + .type = MT_DEVICE 109 + }, 110 + }; 111 + 112 + /*! 113 + * Set up static virtual mappings. 114 + */ 115 + void __init mx31ads_map_io(void) 116 + { 117 + mxc_map_io(); 118 + iotable_init(mx31ads_io_desc, ARRAY_SIZE(mx31ads_io_desc)); 119 + } 120 + 121 + /*! 122 + * Board specific initialization. 123 + */ 124 + static void __init mxc_board_init(void) 125 + { 126 + mxc_init_extuart(); 127 + } 128 + 129 + /* 130 + * The following uses standard kernel macros defined in arch.h in order to 131 + * initialize __mach_desc_MX31ADS data structure. 132 + */ 133 + MACHINE_START(MX31ADS, "Freescale MX31ADS") 134 + /* Maintainer: Freescale Semiconductor, Inc. */ 135 + .phys_io = AIPS1_BASE_ADDR, 136 + .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, 137 + .boot_params = PHYS_OFFSET + 0x100, 138 + .map_io = mx31ads_map_io, 139 + .init_irq = mxc_init_irq, 140 + .init_machine = mxc_board_init, 141 + .timer = &mxc_timer, 142 + MACHINE_END
+152
arch/arm/mach-mx3/time.c
··· 1 + /* 2 + * System Timer Interrupt reconfigured to run in free-run mode. 3 + * Author: Vitaly Wool 4 + * Copyright 2004 MontaVista Software Inc. 5 + * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. 6 + */ 7 + 8 + /* 9 + * This program is free software; you can redistribute it and/or modify 10 + * it under the terms of the GNU General Public License version 2 as 11 + * published by the Free Software Foundation. 12 + */ 13 + 14 + /*! 15 + * @file time.c 16 + * @brief This file contains OS tick and wdog timer implementations. 17 + * 18 + * This file contains OS tick and wdog timer implementations. 19 + * 20 + * @ingroup Timers 21 + */ 22 + 23 + #include <linux/module.h> 24 + #include <linux/init.h> 25 + #include <linux/interrupt.h> 26 + #include <linux/irq.h> 27 + #include <asm/hardware.h> 28 + #include <asm/mach/time.h> 29 + #include <asm/io.h> 30 + #include <asm/arch/common.h> 31 + 32 + /*! 33 + * This is the timer interrupt service routine to do required tasks. 34 + * It also services the WDOG timer at the frequency of twice per WDOG 35 + * timeout value. For example, if the WDOG's timeout value is 4 (2 36 + * seconds since the WDOG runs at 0.5Hz), it will be serviced once 37 + * every 2/2=1 second. 38 + * 39 + * @param irq GPT interrupt source number (not used) 40 + * @param dev_id this parameter is not used 41 + * @return always returns \b IRQ_HANDLED as defined in 42 + * include/linux/interrupt.h. 43 + */ 44 + static irqreturn_t mxc_timer_interrupt(int irq, void *dev_id) 45 + { 46 + unsigned int next_match; 47 + 48 + write_seqlock(&xtime_lock); 49 + 50 + if (__raw_readl(MXC_GPT_GPTSR) & GPTSR_OF1) { 51 + do { 52 + timer_tick(); 53 + next_match = __raw_readl(MXC_GPT_GPTOCR1) + LATCH; 54 + __raw_writel(GPTSR_OF1, MXC_GPT_GPTSR); 55 + __raw_writel(next_match, MXC_GPT_GPTOCR1); 56 + } while ((signed long)(next_match - 57 + __raw_readl(MXC_GPT_GPTCNT)) <= 0); 58 + } 59 + 60 + write_sequnlock(&xtime_lock); 61 + 62 + return IRQ_HANDLED; 63 + } 64 + 65 + /*! 66 + * This function is used to obtain the number of microseconds since the last 67 + * timer interrupt. Note that interrupts is disabled by do_gettimeofday(). 68 + * 69 + * @return the number of microseconds since the last timer interrupt. 70 + */ 71 + static unsigned long mxc_gettimeoffset(void) 72 + { 73 + unsigned long ticks_to_match, elapsed, usec, tick_usec, i; 74 + 75 + /* Get ticks before next timer match */ 76 + ticks_to_match = 77 + __raw_readl(MXC_GPT_GPTOCR1) - __raw_readl(MXC_GPT_GPTCNT); 78 + 79 + /* We need elapsed ticks since last match */ 80 + elapsed = LATCH - ticks_to_match; 81 + 82 + /* Now convert them to usec */ 83 + /* Insure no overflow when calculating the usec below */ 84 + for (i = 1, tick_usec = tick_nsec / 1000;; i *= 2) { 85 + tick_usec /= i; 86 + if ((0xFFFFFFFF / tick_usec) > elapsed) 87 + break; 88 + } 89 + usec = (unsigned long)(elapsed * tick_usec) / (LATCH / i); 90 + 91 + return usec; 92 + } 93 + 94 + /*! 95 + * The OS tick timer interrupt structure. 96 + */ 97 + static struct irqaction timer_irq = { 98 + .name = "MXC Timer Tick", 99 + .flags = IRQF_DISABLED | IRQF_TIMER, 100 + .handler = mxc_timer_interrupt 101 + }; 102 + 103 + /*! 104 + * This function is used to initialize the GPT to produce an interrupt 105 + * based on HZ. It is called by start_kernel() during system startup. 106 + */ 107 + void __init mxc_init_time(void) 108 + { 109 + u32 reg, v; 110 + reg = __raw_readl(MXC_GPT_GPTCR); 111 + reg &= ~GPTCR_ENABLE; 112 + __raw_writel(reg, MXC_GPT_GPTCR); 113 + reg |= GPTCR_SWR; 114 + __raw_writel(reg, MXC_GPT_GPTCR); 115 + 116 + while ((__raw_readl(MXC_GPT_GPTCR) & GPTCR_SWR) != 0) 117 + cpu_relax(); 118 + 119 + reg = GPTCR_FRR | GPTCR_CLKSRC_HIGHFREQ; 120 + __raw_writel(reg, MXC_GPT_GPTCR); 121 + 122 + /* TODO: get timer rate from clk driver */ 123 + v = 66500000; 124 + 125 + __raw_writel((v / CLOCK_TICK_RATE) - 1, MXC_GPT_GPTPR); 126 + 127 + if ((v % CLOCK_TICK_RATE) != 0) { 128 + pr_info("\nWARNING: Can't generate CLOCK_TICK_RATE at %d Hz\n", 129 + CLOCK_TICK_RATE); 130 + } 131 + pr_info("Actual CLOCK_TICK_RATE is %d Hz\n", 132 + v / ((__raw_readl(MXC_GPT_GPTPR) & 0xFFF) + 1)); 133 + 134 + reg = __raw_readl(MXC_GPT_GPTCNT); 135 + reg += LATCH; 136 + __raw_writel(reg, MXC_GPT_GPTOCR1); 137 + 138 + setup_irq(MXC_INT_GPT, &timer_irq); 139 + 140 + reg = __raw_readl(MXC_GPT_GPTCR); 141 + reg = 142 + GPTCR_FRR | GPTCR_CLKSRC_HIGHFREQ | GPTCR_STOPEN | GPTCR_DOZEN | 143 + GPTCR_WAITEN | GPTCR_ENMOD | GPTCR_ENABLE; 144 + __raw_writel(reg, MXC_GPT_GPTCR); 145 + 146 + __raw_writel(GPTIR_OF1IE, MXC_GPT_GPTIR); 147 + } 148 + 149 + struct sys_timer mxc_timer = { 150 + .init = mxc_init_time, 151 + .offset = mxc_gettimeoffset, 152 + };
+1
arch/arm/mach-ns9xxx/Makefile
··· 1 1 obj-y := irq.o time.o generic.o 2 2 3 3 obj-$(CONFIG_MACH_CC9P9360DEV) += mach-cc9p9360dev.o 4 + obj-$(CONFIG_MACH_CC9P9360JS) += mach-cc9p9360js.o 4 5 5 6 obj-$(CONFIG_BOARD_A9M9750DEV) += board-a9m9750dev.o 6 7 obj-$(CONFIG_BOARD_JSCC9P9360) += board-jscc9p9360.o
+3 -4
arch/arm/mach-ns9xxx/board-a9m9750dev.c
··· 77 77 78 78 desc = irq_desc + FPGA_IRQ(irqno); 79 79 80 - desc_handle_irq(irqno, desc); 80 + desc_handle_irq(FPGA_IRQ(irqno), desc); 81 81 } 82 82 } 83 83 ··· 91 91 * use GPIO 11, because GPIO 32 is used for the LCD 92 92 */ 93 93 /* XXX: proper GPIO handling */ 94 - BBU_GC(2) &= ~0x2000; 94 + BBU_GCONFb1(1) &= ~0x2000; 95 95 96 96 for (i = FPGA_IRQ(0); i <= FPGA_IRQ(7); ++i) { 97 97 set_irq_chip(i, &a9m9750dev_fpga_chip); ··· 178 178 179 179 /* setup static CS0: memory configuration */ 180 180 reg = MEM_SMC(0); 181 - REGSET(reg, MEM_SMC, WSMC, OFF); 181 + REGSET(reg, MEM_SMC, PSMC, OFF); 182 182 REGSET(reg, MEM_SMC, BSMC, OFF); 183 183 REGSET(reg, MEM_SMC, EW, OFF); 184 184 REGSET(reg, MEM_SMC, PB, 1); ··· 196 196 platform_add_devices(board_a9m9750dev_devices, 197 197 ARRAY_SIZE(board_a9m9750dev_devices)); 198 198 } 199 -
+2
arch/arm/mach-ns9xxx/generic.c
··· 18 18 #include <asm/arch-ns9xxx/regs-mem.h> 19 19 #include <asm/arch-ns9xxx/board.h> 20 20 21 + #include "generic.h" 22 + 21 23 static struct map_desc standard_io_desc[] __initdata = { 22 24 { /* BBus */ 23 25 .virtual = io_p2v(0x90000000),
+10 -1
arch/arm/mach-ns9xxx/irq.c
··· 21 21 { 22 22 u32 tc = SYS_TC(irq - IRQ_TIMER0); 23 23 24 + /* 25 + * If the timer is programmed to halt on terminal count, the 26 + * timer must be disabled before clearing the interrupt. 27 + */ 28 + if (REGGET(tc, SYS_TCx, REN) == 0) { 29 + REGSET(tc, SYS_TCx, TEN, DIS); 30 + SYS_TC(irq - IRQ_TIMER0) = tc; 31 + } 32 + 24 33 REGSET(tc, SYS_TCx, INTC, SET); 25 34 SYS_TC(irq - IRQ_TIMER0) = tc; 26 35 ··· 37 28 SYS_TC(irq - IRQ_TIMER0) = tc; 38 29 } 39 30 40 - void (*ns9xxx_ack_irq_functions[NR_IRQS])(unsigned int) = { 31 + static void (*ns9xxx_ack_irq_functions[NR_IRQS])(unsigned int) = { 41 32 [IRQ_TIMER0] = ns9xxx_ack_irq_timer, 42 33 [IRQ_TIMER1] = ns9xxx_ack_irq_timer, 43 34 [IRQ_TIMER2] = ns9xxx_ack_irq_timer,
+1 -1
arch/arm/mach-ns9xxx/mach-cc9p9360js.c
··· 20 20 board_jscc9p9360_init_machine(); 21 21 } 22 22 23 - MACHINE_START(CC9P9360DEV, "Digi ConnectCore 9P 9360 on an JSCC9P9360 Devboard") 23 + MACHINE_START(CC9P9360JS, "Digi ConnectCore 9P 9360 on an JSCC9P9360 Devboard") 24 24 .map_io = ns9xxx_map_io, 25 25 .init_irq = ns9xxx_init_irq, 26 26 .init_machine = mach_cc9p9360js_init_machine,
+4
arch/arm/mach-pxa/Kconfig
··· 37 37 bool "Keith und Koep Trizeps4 DIMM-Module" 38 38 select PXA27x 39 39 40 + config MACH_EM_X270 41 + bool "CompuLab EM-x270 platform" 42 + select PXA27x 43 + 40 44 endchoice 41 45 42 46 if PXA_SHARPSL
+1
arch/arm/mach-pxa/Makefile
··· 18 18 obj-$(CONFIG_MACH_AKITA) += akita-ioexp.o 19 19 obj-$(CONFIG_MACH_POODLE) += poodle.o corgi_ssp.o 20 20 obj-$(CONFIG_MACH_TOSA) += tosa.o 21 + obj-$(CONFIG_MACH_EM_X270) += em-x270.o 21 22 22 23 # Support for blinky lights 23 24 led-y := leds.o
+11 -11
arch/arm/mach-pxa/devices.h
··· 1 - extern struct platform_device pxamci_device; 2 - extern struct platform_device pxaudc_device; 3 - extern struct platform_device pxafb_device; 4 - extern struct platform_device ffuart_device; 5 - extern struct platform_device btuart_device; 6 - extern struct platform_device stuart_device; 7 - extern struct platform_device hwuart_device; 8 - extern struct platform_device pxai2c_device; 9 - extern struct platform_device pxai2s_device; 10 - extern struct platform_device pxaficp_device; 11 - extern struct platform_device pxartc_device; 1 + extern struct platform_device pxa_device_mci; 2 + extern struct platform_device pxa_device_udc; 3 + extern struct platform_device pxa_device_fb; 4 + extern struct platform_device pxa_device_ffuart; 5 + extern struct platform_device pxa_device_btuart; 6 + extern struct platform_device pxa_device_stuart; 7 + extern struct platform_device pxa_device_hwuart; 8 + extern struct platform_device pxa_device_i2c; 9 + extern struct platform_device pxa_device_i2s; 10 + extern struct platform_device pxa_device_ficp; 11 + extern struct platform_device pxa_device_rtc;
+354
arch/arm/mach-pxa/em-x270.c
··· 1 + /* 2 + * Support for CompuLab EM-x270 platform 3 + * 4 + * Copyright (C) 2007 CompuLab, Ltd. 5 + * Author: Mike Rapoport <mike@compulab.co.il> 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 + #include <linux/irq.h> 13 + #include <linux/platform_device.h> 14 + 15 + #include <linux/dm9000.h> 16 + #include <linux/rtc-v3020.h> 17 + 18 + #include <linux/mtd/nand.h> 19 + #include <linux/mtd/partitions.h> 20 + 21 + #include <asm/mach-types.h> 22 + 23 + #include <asm/mach/arch.h> 24 + 25 + #include <asm/arch/pxa-regs.h> 26 + #include <asm/arch/pxafb.h> 27 + #include <asm/arch/ohci.h> 28 + #include <asm/arch/mmc.h> 29 + #include <asm/arch/bitfield.h> 30 + 31 + #include "generic.h" 32 + 33 + /* GPIO IRQ usage */ 34 + #define EM_X270_MMC_PD (105) 35 + #define EM_X270_ETHIRQ IRQ_GPIO(41) 36 + #define EM_X270_MMC_IRQ IRQ_GPIO(13) 37 + 38 + static struct resource em_x270_dm9k_resource[] = { 39 + [0] = { 40 + .start = PXA_CS2_PHYS, 41 + .end = PXA_CS2_PHYS + 3, 42 + .flags = IORESOURCE_MEM, 43 + }, 44 + [1] = { 45 + .start = PXA_CS2_PHYS + 8, 46 + .end = PXA_CS2_PHYS + 8 + 0x3f, 47 + .flags = IORESOURCE_MEM, 48 + }, 49 + [2] = { 50 + .start = EM_X270_ETHIRQ, 51 + .end = EM_X270_ETHIRQ, 52 + .flags = IORESOURCE_IRQ, 53 + } 54 + }; 55 + 56 + /* for the moment we limit ourselves to 32bit IO until some 57 + * better IO routines can be written and tested 58 + */ 59 + static struct dm9000_plat_data em_x270_dm9k_platdata = { 60 + .flags = DM9000_PLATF_32BITONLY, 61 + }; 62 + 63 + /* Ethernet device */ 64 + static struct platform_device em_x270_dm9k = { 65 + .name = "dm9000", 66 + .id = 0, 67 + .num_resources = ARRAY_SIZE(em_x270_dm9k_resource), 68 + .resource = em_x270_dm9k_resource, 69 + .dev = { 70 + .platform_data = &em_x270_dm9k_platdata, 71 + } 72 + }; 73 + 74 + /* audio device */ 75 + static struct platform_device em_x270_audio = { 76 + .name = "pxa2xx-ac97", 77 + .id = -1, 78 + }; 79 + 80 + /* WM9712 touchscreen controller. Hopefully the driver will make it to 81 + * the mainstream sometime */ 82 + static struct platform_device em_x270_ts = { 83 + .name = "wm97xx-ts", 84 + .id = -1, 85 + }; 86 + 87 + /* RTC */ 88 + static struct resource em_x270_v3020_resource[] = { 89 + [0] = { 90 + .start = PXA_CS4_PHYS, 91 + .end = PXA_CS4_PHYS + 3, 92 + .flags = IORESOURCE_MEM, 93 + }, 94 + }; 95 + 96 + static struct v3020_platform_data em_x270_v3020_platdata = { 97 + .leftshift = 0, 98 + }; 99 + 100 + static struct platform_device em_x270_rtc = { 101 + .name = "v3020", 102 + .num_resources = ARRAY_SIZE(em_x270_v3020_resource), 103 + .resource = em_x270_v3020_resource, 104 + .id = -1, 105 + .dev = { 106 + .platform_data = &em_x270_v3020_platdata, 107 + } 108 + }; 109 + 110 + /* NAND flash */ 111 + #define GPIO_NAND_CS (11) 112 + #define GPIO_NAND_RB (56) 113 + 114 + static inline void nand_cs_on(void) 115 + { 116 + GPCR(GPIO_NAND_CS) = GPIO_bit(GPIO_NAND_CS); 117 + } 118 + 119 + static void nand_cs_off(void) 120 + { 121 + dsb(); 122 + 123 + GPSR(GPIO_NAND_CS) = GPIO_bit(GPIO_NAND_CS); 124 + } 125 + 126 + /* hardware specific access to control-lines */ 127 + static void em_x270_nand_cmd_ctl(struct mtd_info *mtd, int dat, 128 + unsigned int ctrl) 129 + { 130 + struct nand_chip *this = mtd->priv; 131 + unsigned long nandaddr = (unsigned long)this->IO_ADDR_W; 132 + 133 + dsb(); 134 + 135 + if (ctrl & NAND_CTRL_CHANGE) { 136 + if (ctrl & NAND_ALE) 137 + nandaddr |= (1 << 3); 138 + else 139 + nandaddr &= ~(1 << 3); 140 + if (ctrl & NAND_CLE) 141 + nandaddr |= (1 << 2); 142 + else 143 + nandaddr &= ~(1 << 2); 144 + if (ctrl & NAND_NCE) 145 + nand_cs_on(); 146 + else 147 + nand_cs_off(); 148 + } 149 + 150 + dsb(); 151 + this->IO_ADDR_W = (void __iomem *)nandaddr; 152 + if (dat != NAND_CMD_NONE) 153 + writel(dat, this->IO_ADDR_W); 154 + 155 + dsb(); 156 + } 157 + 158 + /* read device ready pin */ 159 + static int em_x270_nand_device_ready(struct mtd_info *mtd) 160 + { 161 + dsb(); 162 + 163 + return GPLR(GPIO_NAND_RB) & GPIO_bit(GPIO_NAND_RB); 164 + } 165 + 166 + static struct mtd_partition em_x270_partition_info[] = { 167 + [0] = { 168 + .name = "em_x270-0", 169 + .offset = 0, 170 + .size = SZ_4M, 171 + }, 172 + [1] = { 173 + .name = "em_x270-1", 174 + .offset = MTDPART_OFS_APPEND, 175 + .size = MTDPART_SIZ_FULL 176 + }, 177 + }; 178 + 179 + static const char *em_x270_part_probes[] = { "cmdlinepart", NULL }; 180 + 181 + struct platform_nand_data em_x270_nand_platdata = { 182 + .chip = { 183 + .nr_chips = 1, 184 + .chip_offset = 0, 185 + .nr_partitions = ARRAY_SIZE(em_x270_partition_info), 186 + .partitions = em_x270_partition_info, 187 + .chip_delay = 20, 188 + .part_probe_types = em_x270_part_probes, 189 + }, 190 + .ctrl = { 191 + .hwcontrol = 0, 192 + .dev_ready = em_x270_nand_device_ready, 193 + .select_chip = 0, 194 + .cmd_ctrl = em_x270_nand_cmd_ctl, 195 + }, 196 + }; 197 + 198 + static struct resource em_x270_nand_resource[] = { 199 + [0] = { 200 + .start = PXA_CS1_PHYS, 201 + .end = PXA_CS1_PHYS + 12, 202 + .flags = IORESOURCE_MEM, 203 + }, 204 + }; 205 + 206 + static struct platform_device em_x270_nand = { 207 + .name = "gen_nand", 208 + .num_resources = ARRAY_SIZE(em_x270_nand_resource), 209 + .resource = em_x270_nand_resource, 210 + .id = -1, 211 + .dev = { 212 + .platform_data = &em_x270_nand_platdata, 213 + } 214 + }; 215 + 216 + /* platform devices */ 217 + static struct platform_device *platform_devices[] __initdata = { 218 + &em_x270_dm9k, 219 + &em_x270_audio, 220 + &em_x270_ts, 221 + &em_x270_rtc, 222 + &em_x270_nand, 223 + }; 224 + 225 + 226 + /* PXA27x OHCI controller setup */ 227 + static int em_x270_ohci_init(struct device *dev) 228 + { 229 + /* Set the Power Control Polarity Low */ 230 + UHCHR = (UHCHR | UHCHR_PCPL) & 231 + ~(UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSE); 232 + 233 + /* enable port 2 transiever */ 234 + UP2OCR = UP2OCR_HXS | UP2OCR_HXOE; 235 + 236 + return 0; 237 + } 238 + 239 + static struct pxaohci_platform_data em_x270_ohci_platform_data = { 240 + .port_mode = PMM_PERPORT_MODE, 241 + .init = em_x270_ohci_init, 242 + }; 243 + 244 + 245 + static int em_x270_mci_init(struct device *dev, 246 + irq_handler_t em_x270_detect_int, 247 + void *data) 248 + { 249 + int err; 250 + 251 + /* setup GPIO for PXA27x MMC controller */ 252 + pxa_gpio_mode(GPIO32_MMCCLK_MD); 253 + pxa_gpio_mode(GPIO112_MMCCMD_MD); 254 + pxa_gpio_mode(GPIO92_MMCDAT0_MD); 255 + pxa_gpio_mode(GPIO109_MMCDAT1_MD); 256 + pxa_gpio_mode(GPIO110_MMCDAT2_MD); 257 + pxa_gpio_mode(GPIO111_MMCDAT3_MD); 258 + 259 + /* EM-X270 uses GPIO13 as SD power enable */ 260 + pxa_gpio_mode(EM_X270_MMC_PD | GPIO_OUT); 261 + 262 + err = request_irq(EM_X270_MMC_IRQ, em_x270_detect_int, 263 + IRQF_DISABLED | IRQF_TRIGGER_FALLING, 264 + "MMC card detect", data); 265 + if (err) { 266 + printk(KERN_ERR "%s: can't request MMC card detect IRQ: %d\n", 267 + __FUNCTION__, err); 268 + return err; 269 + } 270 + 271 + return 0; 272 + } 273 + 274 + static void em_x270_mci_setpower(struct device *dev, unsigned int vdd) 275 + { 276 + /* 277 + FIXME: current hardware implementation does not allow to 278 + enable/disable MMC power. This will be fixed in next HW releases, 279 + and we'll need to add implmentation here. 280 + */ 281 + return; 282 + } 283 + 284 + static void em_x270_mci_exit(struct device *dev, void *data) 285 + { 286 + free_irq(EM_X270_MMC_IRQ, data); 287 + } 288 + 289 + static struct pxamci_platform_data em_x270_mci_platform_data = { 290 + .ocr_mask = MMC_VDD_28_29|MMC_VDD_29_30|MMC_VDD_30_31, 291 + .init = em_x270_mci_init, 292 + .setpower = em_x270_mci_setpower, 293 + .exit = em_x270_mci_exit, 294 + }; 295 + 296 + /* LCD 480x640 */ 297 + static struct pxafb_mode_info em_x270_lcd_mode = { 298 + .pixclock = 50000, 299 + .bpp = 16, 300 + .xres = 480, 301 + .yres = 640, 302 + .hsync_len = 8, 303 + .vsync_len = 2, 304 + .left_margin = 8, 305 + .upper_margin = 0, 306 + .right_margin = 24, 307 + .lower_margin = 4, 308 + .cmap_greyscale = 0, 309 + }; 310 + 311 + static struct pxafb_mach_info em_x270_lcd = { 312 + .modes = &em_x270_lcd_mode, 313 + .num_modes = 1, 314 + .cmap_inverse = 0, 315 + .cmap_static = 0, 316 + .lccr0 = LCCR0_PAS, 317 + .lccr3 = LCCR3_PixClkDiv(0x01) | LCCR3_Acb(0xff), 318 + }; 319 + 320 + static void __init em_x270_init(void) 321 + { 322 + /* setup LCD */ 323 + set_pxa_fb_info(&em_x270_lcd); 324 + 325 + /* register EM-X270 platform devices */ 326 + platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); 327 + 328 + /* set MCI and OHCI platform parameters */ 329 + pxa_set_mci_info(&em_x270_mci_platform_data); 330 + pxa_set_ohci_info(&em_x270_ohci_platform_data); 331 + 332 + /* setup STUART GPIOs */ 333 + pxa_gpio_mode(GPIO46_STRXD_MD); 334 + pxa_gpio_mode(GPIO47_STTXD_MD); 335 + 336 + /* setup BTUART GPIOs */ 337 + pxa_gpio_mode(GPIO42_BTRXD_MD); 338 + pxa_gpio_mode(GPIO43_BTTXD_MD); 339 + pxa_gpio_mode(GPIO44_BTCTS_MD); 340 + pxa_gpio_mode(GPIO45_BTRTS_MD); 341 + 342 + /* Setup interrupt for dm9000 */ 343 + set_irq_type(EM_X270_ETHIRQ, IRQT_RISING); 344 + } 345 + 346 + MACHINE_START(EM_X270, "Compulab EM-x270") 347 + .boot_params = 0xa0000100, 348 + .phys_io = 0x40000000, 349 + .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, 350 + .map_io = pxa_map_io, 351 + .init_irq = pxa27x_init_irq, 352 + .timer = &pxa_timer, 353 + .init_machine = em_x270_init, 354 + MACHINE_END
+16 -16
arch/arm/mach-pxa/generic.c
··· 243 243 244 244 static u64 pxamci_dmamask = 0xffffffffUL; 245 245 246 - struct platform_device pxamci_device = { 246 + struct platform_device pxa_device_mci = { 247 247 .name = "pxa2xx-mci", 248 248 .id = -1, 249 249 .dev = { ··· 256 256 257 257 void __init pxa_set_mci_info(struct pxamci_platform_data *info) 258 258 { 259 - pxamci_device.dev.platform_data = info; 259 + pxa_device_mci.dev.platform_data = info; 260 260 } 261 261 262 262 ··· 282 282 283 283 static u64 udc_dma_mask = ~(u32)0; 284 284 285 - struct platform_device pxaudc_device = { 285 + struct platform_device pxa_device_udc = { 286 286 .name = "pxa2xx-udc", 287 287 .id = -1, 288 288 .resource = pxa2xx_udc_resources, ··· 308 308 309 309 static u64 fb_dma_mask = ~(u64)0; 310 310 311 - struct platform_device pxafb_device = { 311 + struct platform_device pxa_device_fb = { 312 312 .name = "pxa2xx-fb", 313 313 .id = -1, 314 314 .dev = { ··· 321 321 322 322 void __init set_pxa_fb_info(struct pxafb_mach_info *info) 323 323 { 324 - pxafb_device.dev.platform_data = info; 324 + pxa_device_fb.dev.platform_data = info; 325 325 } 326 326 327 327 void __init set_pxa_fb_parent(struct device *parent_dev) 328 328 { 329 - pxafb_device.dev.parent = parent_dev; 329 + pxa_device_fb.dev.parent = parent_dev; 330 330 } 331 331 332 - struct platform_device ffuart_device = { 332 + struct platform_device pxa_device_ffuart= { 333 333 .name = "pxa2xx-uart", 334 334 .id = 0, 335 335 }; 336 - struct platform_device btuart_device = { 336 + struct platform_device pxa_device_btuart = { 337 337 .name = "pxa2xx-uart", 338 338 .id = 1, 339 339 }; 340 - struct platform_device stuart_device = { 340 + struct platform_device pxa_device_stuart = { 341 341 .name = "pxa2xx-uart", 342 342 .id = 2, 343 343 }; 344 - struct platform_device hwuart_device = { 344 + struct platform_device pxa_device_hwuart = { 345 345 .name = "pxa2xx-uart", 346 346 .id = 3, 347 347 }; ··· 358 358 }, 359 359 }; 360 360 361 - struct platform_device pxai2c_device = { 361 + struct platform_device pxa_device_i2c = { 362 362 .name = "pxa2xx-i2c", 363 363 .id = 0, 364 364 .resource = pxai2c_resources, ··· 367 367 368 368 void __init pxa_set_i2c_info(struct i2c_pxa_platform_data *info) 369 369 { 370 - pxai2c_device.dev.platform_data = info; 370 + pxa_device_i2c.dev.platform_data = info; 371 371 } 372 372 373 373 static struct resource pxai2s_resources[] = { ··· 382 382 }, 383 383 }; 384 384 385 - struct platform_device pxai2s_device = { 385 + struct platform_device pxa_device_i2s = { 386 386 .name = "pxa2xx-i2s", 387 387 .id = -1, 388 388 .resource = pxai2s_resources, ··· 391 391 392 392 static u64 pxaficp_dmamask = ~(u32)0; 393 393 394 - struct platform_device pxaficp_device = { 394 + struct platform_device pxa_device_ficp = { 395 395 .name = "pxa2xx-ir", 396 396 .id = -1, 397 397 .dev = { ··· 402 402 403 403 void __init pxa_set_ficp_info(struct pxaficp_platform_data *info) 404 404 { 405 - pxaficp_device.dev.platform_data = info; 405 + pxa_device_ficp.dev.platform_data = info; 406 406 } 407 407 408 - struct platform_device pxartc_device = { 408 + struct platform_device pxa_device_rtc = { 409 409 .name = "sa1100-rtc", 410 410 .id = -1, 411 411 };
+44 -125
arch/arm/mach-pxa/pm.c
··· 24 24 #include <asm/arch/lubbock.h> 25 25 #include <asm/mach/time.h> 26 26 27 - 28 - /* 29 - * Debug macros 30 - */ 31 - #undef DEBUG 32 - 33 - #define SAVE(x) sleep_save[SLEEP_SAVE_##x] = x 34 - #define RESTORE(x) x = sleep_save[SLEEP_SAVE_##x] 35 - 36 - #define RESTORE_GPLEVEL(n) do { \ 37 - GPSR##n = sleep_save[SLEEP_SAVE_GPLR##n]; \ 38 - GPCR##n = ~sleep_save[SLEEP_SAVE_GPLR##n]; \ 39 - } while (0) 40 - 41 - /* 42 - * List of global PXA peripheral registers to preserve. 43 - * More ones like CP and general purpose register values are preserved 44 - * with the stack pointer in sleep.S. 45 - */ 46 - enum { SLEEP_SAVE_START = 0, 47 - 48 - SLEEP_SAVE_GPLR0, SLEEP_SAVE_GPLR1, SLEEP_SAVE_GPLR2, SLEEP_SAVE_GPLR3, 49 - SLEEP_SAVE_GPDR0, SLEEP_SAVE_GPDR1, SLEEP_SAVE_GPDR2, SLEEP_SAVE_GPDR3, 50 - SLEEP_SAVE_GRER0, SLEEP_SAVE_GRER1, SLEEP_SAVE_GRER2, SLEEP_SAVE_GRER3, 51 - SLEEP_SAVE_GFER0, SLEEP_SAVE_GFER1, SLEEP_SAVE_GFER2, SLEEP_SAVE_GFER3, 52 - SLEEP_SAVE_PGSR0, SLEEP_SAVE_PGSR1, SLEEP_SAVE_PGSR2, SLEEP_SAVE_PGSR3, 53 - 54 - SLEEP_SAVE_GAFR0_L, SLEEP_SAVE_GAFR0_U, 55 - SLEEP_SAVE_GAFR1_L, SLEEP_SAVE_GAFR1_U, 56 - SLEEP_SAVE_GAFR2_L, SLEEP_SAVE_GAFR2_U, 57 - SLEEP_SAVE_GAFR3_L, SLEEP_SAVE_GAFR3_U, 58 - 59 - SLEEP_SAVE_PSTR, 60 - 61 - SLEEP_SAVE_ICMR, 62 - SLEEP_SAVE_CKEN, 63 - 64 - #ifdef CONFIG_PXA27x 65 - SLEEP_SAVE_MDREFR, 66 - SLEEP_SAVE_PWER, SLEEP_SAVE_PCFR, SLEEP_SAVE_PRER, 67 - SLEEP_SAVE_PFER, SLEEP_SAVE_PKWR, 68 - #endif 69 - 70 - SLEEP_SAVE_CKSUM, 71 - 72 - SLEEP_SAVE_SIZE 73 - }; 74 - 27 + struct pxa_cpu_pm_fns *pxa_cpu_pm_fns; 28 + static unsigned long *sleep_save; 75 29 76 30 int pxa_pm_enter(suspend_state_t state) 77 31 { 78 - unsigned long sleep_save[SLEEP_SAVE_SIZE]; 79 - unsigned long checksum = 0; 32 + unsigned long sleep_save_checksum = 0, checksum = 0; 80 33 int i; 81 - extern void pxa_cpu_pm_enter(suspend_state_t state); 82 34 83 35 #ifdef CONFIG_IWMMXT 84 36 /* force any iWMMXt context to ram **/ ··· 38 86 iwmmxt_task_disable(NULL); 39 87 #endif 40 88 41 - SAVE(GPLR0); SAVE(GPLR1); SAVE(GPLR2); 42 - SAVE(GPDR0); SAVE(GPDR1); SAVE(GPDR2); 43 - SAVE(GRER0); SAVE(GRER1); SAVE(GRER2); 44 - SAVE(GFER0); SAVE(GFER1); SAVE(GFER2); 45 - SAVE(PGSR0); SAVE(PGSR1); SAVE(PGSR2); 46 - 47 - SAVE(GAFR0_L); SAVE(GAFR0_U); 48 - SAVE(GAFR1_L); SAVE(GAFR1_U); 49 - SAVE(GAFR2_L); SAVE(GAFR2_U); 50 - 51 - #ifdef CONFIG_PXA27x 52 - SAVE(MDREFR); 53 - SAVE(GPLR3); SAVE(GPDR3); SAVE(GRER3); SAVE(GFER3); SAVE(PGSR3); 54 - SAVE(GAFR3_L); SAVE(GAFR3_U); 55 - SAVE(PWER); SAVE(PCFR); SAVE(PRER); 56 - SAVE(PFER); SAVE(PKWR); 57 - #endif 58 - 59 - SAVE(ICMR); 60 - ICMR = 0; 61 - 62 - SAVE(CKEN); 63 - SAVE(PSTR); 64 - 65 - /* Note: wake up source are set up in each machine specific files */ 66 - 67 - /* clear GPIO transition detect bits */ 68 - GEDR0 = GEDR0; GEDR1 = GEDR1; GEDR2 = GEDR2; 69 - #ifdef CONFIG_PXA27x 70 - GEDR3 = GEDR3; 71 - #endif 89 + pxa_cpu_pm_fns->save(sleep_save); 72 90 73 91 /* Clear sleep reset status */ 74 92 RCSR = RCSR_SMR; 75 93 76 94 /* before sleeping, calculate and save a checksum */ 77 - for (i = 0; i < SLEEP_SAVE_SIZE - 1; i++) 78 - checksum += sleep_save[i]; 79 - sleep_save[SLEEP_SAVE_CKSUM] = checksum; 95 + for (i = 0; i < pxa_cpu_pm_fns->save_size - 1; i++) 96 + sleep_save_checksum += sleep_save[i]; 80 97 81 98 /* *** go zzz *** */ 82 - pxa_cpu_pm_enter(state); 83 - 99 + pxa_cpu_pm_fns->enter(state); 84 100 cpu_init(); 85 101 86 102 /* after sleeping, validate the checksum */ 87 - checksum = 0; 88 - for (i = 0; i < SLEEP_SAVE_SIZE - 1; i++) 103 + for (i = 0; i < pxa_cpu_pm_fns->save_size - 1; i++) 89 104 checksum += sleep_save[i]; 90 105 91 106 /* if invalid, display message and wait for a hardware reset */ 92 - if (checksum != sleep_save[SLEEP_SAVE_CKSUM]) { 107 + if (checksum != sleep_save_checksum) { 93 108 #ifdef CONFIG_ARCH_LUBBOCK 94 109 LUB_HEXLED = 0xbadbadc5; 95 110 #endif 96 111 while (1) 97 - pxa_cpu_pm_enter(state); 112 + pxa_cpu_pm_fns->enter(state); 98 113 } 99 114 100 - /* ensure not to come back here if it wasn't intended */ 101 - PSPR = 0; 115 + pxa_cpu_pm_fns->restore(sleep_save); 102 116 103 - /* restore registers */ 104 - RESTORE_GPLEVEL(0); RESTORE_GPLEVEL(1); RESTORE_GPLEVEL(2); 105 - RESTORE(GPDR0); RESTORE(GPDR1); RESTORE(GPDR2); 106 - RESTORE(GAFR0_L); RESTORE(GAFR0_U); 107 - RESTORE(GAFR1_L); RESTORE(GAFR1_U); 108 - RESTORE(GAFR2_L); RESTORE(GAFR2_U); 109 - RESTORE(GRER0); RESTORE(GRER1); RESTORE(GRER2); 110 - RESTORE(GFER0); RESTORE(GFER1); RESTORE(GFER2); 111 - RESTORE(PGSR0); RESTORE(PGSR1); RESTORE(PGSR2); 112 - 113 - #ifdef CONFIG_PXA27x 114 - RESTORE(MDREFR); 115 - RESTORE_GPLEVEL(3); RESTORE(GPDR3); 116 - RESTORE(GAFR3_L); RESTORE(GAFR3_U); 117 - RESTORE(GRER3); RESTORE(GFER3); RESTORE(PGSR3); 118 - RESTORE(PWER); RESTORE(PCFR); RESTORE(PRER); 119 - RESTORE(PFER); RESTORE(PKWR); 120 - #endif 121 - 122 - PSSR = PSSR_RDH | PSSR_PH; 123 - 124 - RESTORE(CKEN); 125 - 126 - ICLR = 0; 127 - ICCR = 1; 128 - RESTORE(ICMR); 129 - 130 - RESTORE(PSTR); 131 - 132 - #ifdef DEBUG 133 - printk(KERN_DEBUG "*** made it back from resume\n"); 134 - #endif 117 + pr_debug("*** made it back from resume\n"); 135 118 136 119 return 0; 137 120 } ··· 77 190 { 78 191 return virt_to_phys(sp); 79 192 } 193 + 194 + static int pxa_pm_valid(suspend_state_t state) 195 + { 196 + if (pxa_cpu_pm_fns) 197 + return pxa_cpu_pm_fns->valid(state); 198 + 199 + return -EINVAL; 200 + } 201 + 202 + static struct pm_ops pxa_pm_ops = { 203 + .valid = pxa_pm_valid, 204 + .enter = pxa_pm_enter, 205 + }; 206 + 207 + static int __init pxa_pm_init(void) 208 + { 209 + if (!pxa_cpu_pm_fns) { 210 + printk(KERN_ERR "no valid pxa_cpu_pm_fns defined\n"); 211 + return -EINVAL; 212 + } 213 + 214 + sleep_save = kmalloc(pxa_cpu_pm_fns->save_size, GFP_KERNEL); 215 + if (!sleep_save) { 216 + printk(KERN_ERR "failed to alloc memory for pm save\n"); 217 + return -ENOMEM; 218 + } 219 + 220 + pm_set_ops(&pxa_pm_ops); 221 + return 0; 222 + } 223 + 224 + device_initcall(pxa_pm_init);
+92 -19
arch/arm/mach-pxa/pxa25x.c
··· 110 110 111 111 #ifdef CONFIG_PM 112 112 113 - void pxa_cpu_pm_enter(suspend_state_t state) 114 - { 115 - extern void pxa_cpu_suspend(unsigned int); 116 - extern void pxa_cpu_resume(void); 113 + #define SAVE(x) sleep_save[SLEEP_SAVE_##x] = x 114 + #define RESTORE(x) x = sleep_save[SLEEP_SAVE_##x] 117 115 116 + #define RESTORE_GPLEVEL(n) do { \ 117 + GPSR##n = sleep_save[SLEEP_SAVE_GPLR##n]; \ 118 + GPCR##n = ~sleep_save[SLEEP_SAVE_GPLR##n]; \ 119 + } while (0) 120 + 121 + /* 122 + * List of global PXA peripheral registers to preserve. 123 + * More ones like CP and general purpose register values are preserved 124 + * with the stack pointer in sleep.S. 125 + */ 126 + enum { SLEEP_SAVE_START = 0, 127 + 128 + SLEEP_SAVE_GPLR0, SLEEP_SAVE_GPLR1, SLEEP_SAVE_GPLR2, 129 + SLEEP_SAVE_GPDR0, SLEEP_SAVE_GPDR1, SLEEP_SAVE_GPDR2, 130 + SLEEP_SAVE_GRER0, SLEEP_SAVE_GRER1, SLEEP_SAVE_GRER2, 131 + SLEEP_SAVE_GFER0, SLEEP_SAVE_GFER1, SLEEP_SAVE_GFER2, 132 + SLEEP_SAVE_PGSR0, SLEEP_SAVE_PGSR1, SLEEP_SAVE_PGSR2, 133 + 134 + SLEEP_SAVE_GAFR0_L, SLEEP_SAVE_GAFR0_U, 135 + SLEEP_SAVE_GAFR1_L, SLEEP_SAVE_GAFR1_U, 136 + SLEEP_SAVE_GAFR2_L, SLEEP_SAVE_GAFR2_U, 137 + 138 + SLEEP_SAVE_PSTR, 139 + 140 + SLEEP_SAVE_ICMR, 141 + SLEEP_SAVE_CKEN, 142 + 143 + SLEEP_SAVE_SIZE 144 + }; 145 + 146 + 147 + static void pxa25x_cpu_pm_save(unsigned long *sleep_save) 148 + { 149 + SAVE(GPLR0); SAVE(GPLR1); SAVE(GPLR2); 150 + SAVE(GPDR0); SAVE(GPDR1); SAVE(GPDR2); 151 + SAVE(GRER0); SAVE(GRER1); SAVE(GRER2); 152 + SAVE(GFER0); SAVE(GFER1); SAVE(GFER2); 153 + SAVE(PGSR0); SAVE(PGSR1); SAVE(PGSR2); 154 + 155 + SAVE(GAFR0_L); SAVE(GAFR0_U); 156 + SAVE(GAFR1_L); SAVE(GAFR1_U); 157 + SAVE(GAFR2_L); SAVE(GAFR2_U); 158 + 159 + SAVE(ICMR); 160 + SAVE(CKEN); 161 + SAVE(PSTR); 162 + } 163 + 164 + static void pxa25x_cpu_pm_restore(unsigned long *sleep_save) 165 + { 166 + /* restore registers */ 167 + RESTORE_GPLEVEL(0); RESTORE_GPLEVEL(1); RESTORE_GPLEVEL(2); 168 + RESTORE(GPDR0); RESTORE(GPDR1); RESTORE(GPDR2); 169 + RESTORE(GAFR0_L); RESTORE(GAFR0_U); 170 + RESTORE(GAFR1_L); RESTORE(GAFR1_U); 171 + RESTORE(GAFR2_L); RESTORE(GAFR2_U); 172 + RESTORE(GRER0); RESTORE(GRER1); RESTORE(GRER2); 173 + RESTORE(GFER0); RESTORE(GFER1); RESTORE(GFER2); 174 + RESTORE(PGSR0); RESTORE(PGSR1); RESTORE(PGSR2); 175 + 176 + RESTORE(CKEN); 177 + RESTORE(ICMR); 178 + RESTORE(PSTR); 179 + } 180 + 181 + static void pxa25x_cpu_pm_enter(suspend_state_t state) 182 + { 118 183 CKEN = 0; 119 184 120 185 switch (state) { 121 186 case PM_SUSPEND_MEM: 122 187 /* set resume return address */ 123 188 PSPR = virt_to_phys(pxa_cpu_resume); 124 - pxa_cpu_suspend(PWRMODE_SLEEP); 189 + pxa25x_cpu_suspend(PWRMODE_SLEEP); 125 190 break; 126 191 } 127 192 } 128 193 129 - static struct pm_ops pxa25x_pm_ops = { 130 - .enter = pxa_pm_enter, 194 + static struct pxa_cpu_pm_fns pxa25x_cpu_pm_fns = { 195 + .save_size = SLEEP_SAVE_SIZE, 131 196 .valid = pm_valid_only_mem, 197 + .save = pxa25x_cpu_pm_save, 198 + .restore = pxa25x_cpu_pm_restore, 199 + .enter = pxa25x_cpu_pm_enter, 132 200 }; 201 + 202 + static void __init pxa25x_init_pm(void) 203 + { 204 + pxa_cpu_pm_fns = &pxa25x_cpu_pm_fns; 205 + } 133 206 #endif 134 207 135 208 void __init pxa25x_init_irq(void) ··· 212 139 } 213 140 214 141 static struct platform_device *pxa25x_devices[] __initdata = { 215 - &pxamci_device, 216 - &pxaudc_device, 217 - &pxafb_device, 218 - &ffuart_device, 219 - &btuart_device, 220 - &stuart_device, 221 - &pxai2c_device, 222 - &pxai2s_device, 223 - &pxaficp_device, 224 - &pxartc_device, 142 + &pxa_device_mci, 143 + &pxa_device_udc, 144 + &pxa_device_fb, 145 + &pxa_device_ffuart, 146 + &pxa_device_btuart, 147 + &pxa_device_stuart, 148 + &pxa_device_i2c, 149 + &pxa_device_i2s, 150 + &pxa_device_ficp, 151 + &pxa_device_rtc, 225 152 }; 226 153 227 154 static int __init pxa25x_init(void) ··· 232 159 if ((ret = pxa_init_dma(16))) 233 160 return ret; 234 161 #ifdef CONFIG_PM 235 - pm_set_ops(&pxa25x_pm_ops); 162 + pxa25x_init_pm(); 236 163 #endif 237 164 ret = platform_add_devices(pxa25x_devices, 238 165 ARRAY_SIZE(pxa25x_devices)); 239 166 } 240 167 /* Only add HWUART for PXA255/26x; PXA210/250/27x do not have it. */ 241 168 if (cpu_is_pxa25x()) 242 - ret = platform_device_register(&hwuart_device); 169 + ret = platform_device_register(&pxa_device_hwuart); 243 170 244 171 return ret; 245 172 }
+126 -25
arch/arm/mach-pxa/pxa27x.c
··· 126 126 127 127 #ifdef CONFIG_PM 128 128 129 - void pxa_cpu_pm_enter(suspend_state_t state) 129 + #define SAVE(x) sleep_save[SLEEP_SAVE_##x] = x 130 + #define RESTORE(x) x = sleep_save[SLEEP_SAVE_##x] 131 + 132 + #define RESTORE_GPLEVEL(n) do { \ 133 + GPSR##n = sleep_save[SLEEP_SAVE_GPLR##n]; \ 134 + GPCR##n = ~sleep_save[SLEEP_SAVE_GPLR##n]; \ 135 + } while (0) 136 + 137 + /* 138 + * List of global PXA peripheral registers to preserve. 139 + * More ones like CP and general purpose register values are preserved 140 + * with the stack pointer in sleep.S. 141 + */ 142 + enum { SLEEP_SAVE_START = 0, 143 + 144 + SLEEP_SAVE_GPLR0, SLEEP_SAVE_GPLR1, SLEEP_SAVE_GPLR2, SLEEP_SAVE_GPLR3, 145 + SLEEP_SAVE_GPDR0, SLEEP_SAVE_GPDR1, SLEEP_SAVE_GPDR2, SLEEP_SAVE_GPDR3, 146 + SLEEP_SAVE_GRER0, SLEEP_SAVE_GRER1, SLEEP_SAVE_GRER2, SLEEP_SAVE_GRER3, 147 + SLEEP_SAVE_GFER0, SLEEP_SAVE_GFER1, SLEEP_SAVE_GFER2, SLEEP_SAVE_GFER3, 148 + SLEEP_SAVE_PGSR0, SLEEP_SAVE_PGSR1, SLEEP_SAVE_PGSR2, SLEEP_SAVE_PGSR3, 149 + 150 + SLEEP_SAVE_GAFR0_L, SLEEP_SAVE_GAFR0_U, 151 + SLEEP_SAVE_GAFR1_L, SLEEP_SAVE_GAFR1_U, 152 + SLEEP_SAVE_GAFR2_L, SLEEP_SAVE_GAFR2_U, 153 + SLEEP_SAVE_GAFR3_L, SLEEP_SAVE_GAFR3_U, 154 + 155 + SLEEP_SAVE_PSTR, 156 + 157 + SLEEP_SAVE_ICMR, 158 + SLEEP_SAVE_CKEN, 159 + 160 + SLEEP_SAVE_MDREFR, 161 + SLEEP_SAVE_PWER, SLEEP_SAVE_PCFR, SLEEP_SAVE_PRER, 162 + SLEEP_SAVE_PFER, SLEEP_SAVE_PKWR, 163 + 164 + SLEEP_SAVE_SIZE 165 + }; 166 + 167 + void pxa27x_cpu_pm_save(unsigned long *sleep_save) 168 + { 169 + SAVE(GPLR0); SAVE(GPLR1); SAVE(GPLR2); SAVE(GPLR3); 170 + SAVE(GPDR0); SAVE(GPDR1); SAVE(GPDR2); SAVE(GPDR3); 171 + SAVE(GRER0); SAVE(GRER1); SAVE(GRER2); SAVE(GRER3); 172 + SAVE(GFER0); SAVE(GFER1); SAVE(GFER2); SAVE(GFER3); 173 + SAVE(PGSR0); SAVE(PGSR1); SAVE(PGSR2); SAVE(PGSR3); 174 + 175 + SAVE(GAFR0_L); SAVE(GAFR0_U); 176 + SAVE(GAFR1_L); SAVE(GAFR1_U); 177 + SAVE(GAFR2_L); SAVE(GAFR2_U); 178 + SAVE(GAFR3_L); SAVE(GAFR3_U); 179 + 180 + SAVE(MDREFR); 181 + SAVE(PWER); SAVE(PCFR); SAVE(PRER); 182 + SAVE(PFER); SAVE(PKWR); 183 + 184 + SAVE(ICMR); ICMR = 0; 185 + SAVE(CKEN); 186 + SAVE(PSTR); 187 + 188 + /* Clear GPIO transition detect bits */ 189 + GEDR0 = GEDR0; GEDR1 = GEDR1; GEDR2 = GEDR2; GEDR3 = GEDR3; 190 + } 191 + 192 + void pxa27x_cpu_pm_restore(unsigned long *sleep_save) 193 + { 194 + /* ensure not to come back here if it wasn't intended */ 195 + PSPR = 0; 196 + 197 + /* restore registers */ 198 + RESTORE_GPLEVEL(0); RESTORE_GPLEVEL(1); 199 + RESTORE_GPLEVEL(2); RESTORE_GPLEVEL(3); 200 + RESTORE(GPDR0); RESTORE(GPDR1); RESTORE(GPDR2); RESTORE(GPDR3); 201 + RESTORE(GAFR0_L); RESTORE(GAFR0_U); 202 + RESTORE(GAFR1_L); RESTORE(GAFR1_U); 203 + RESTORE(GAFR2_L); RESTORE(GAFR2_U); 204 + RESTORE(GAFR3_L); RESTORE(GAFR3_U); 205 + RESTORE(GRER0); RESTORE(GRER1); RESTORE(GRER2); RESTORE(GRER3); 206 + RESTORE(GFER0); RESTORE(GFER1); RESTORE(GFER2); RESTORE(GFER3); 207 + RESTORE(PGSR0); RESTORE(PGSR1); RESTORE(PGSR2); RESTORE(PGSR3); 208 + 209 + RESTORE(MDREFR); 210 + RESTORE(PWER); RESTORE(PCFR); RESTORE(PRER); 211 + RESTORE(PFER); RESTORE(PKWR); 212 + 213 + PSSR = PSSR_RDH | PSSR_PH; 214 + 215 + RESTORE(CKEN); 216 + 217 + ICLR = 0; 218 + ICCR = 1; 219 + RESTORE(ICMR); 220 + RESTORE(PSTR); 221 + } 222 + 223 + void pxa27x_cpu_pm_enter(suspend_state_t state) 130 224 { 131 225 extern void pxa_cpu_standby(void); 132 - extern void pxa_cpu_suspend(unsigned int); 133 - extern void pxa_cpu_resume(void); 134 226 135 227 if (state == PM_SUSPEND_STANDBY) 136 - CKEN = (1 << CKEN_MEMC) | (1 << CKEN_OSTIMER) | (1 << CKEN_LCD) | (1 << CKEN_PWM0); 228 + CKEN = (1 << CKEN_MEMC) | (1 << CKEN_OSTIMER) | 229 + (1 << CKEN_LCD) | (1 << CKEN_PWM0); 137 230 else 138 231 CKEN = (1 << CKEN_MEMC) | (1 << CKEN_OSTIMER); 139 232 ··· 243 150 case PM_SUSPEND_MEM: 244 151 /* set resume return address */ 245 152 PSPR = virt_to_phys(pxa_cpu_resume); 246 - pxa_cpu_suspend(PWRMODE_SLEEP); 153 + pxa27x_cpu_suspend(PWRMODE_SLEEP); 247 154 break; 248 155 } 249 156 } 250 157 251 - static int pxa27x_pm_valid(suspend_state_t state) 158 + static int pxa27x_cpu_pm_valid(suspend_state_t state) 252 159 { 253 160 return state == PM_SUSPEND_MEM || state == PM_SUSPEND_STANDBY; 254 161 } 255 162 256 - static struct pm_ops pxa27x_pm_ops = { 257 - .enter = pxa_pm_enter, 258 - .valid = pxa27x_pm_valid, 163 + static struct pxa_cpu_pm_fns pxa27x_cpu_pm_fns = { 164 + .save_size = SLEEP_SAVE_SIZE, 165 + .save = pxa27x_cpu_pm_save, 166 + .restore = pxa27x_cpu_pm_restore, 167 + .valid = pxa27x_cpu_pm_valid, 168 + .enter = pxa27x_cpu_pm_enter, 259 169 }; 170 + 171 + static void __init pxa27x_init_pm(void) 172 + { 173 + pxa_cpu_pm_fns = &pxa27x_cpu_pm_fns; 174 + } 260 175 #endif 261 176 262 177 /* ··· 286 185 }, 287 186 }; 288 187 289 - static struct platform_device pxaohci_device = { 188 + static struct platform_device pxa27x_device_ohci = { 290 189 .name = "pxa27x-ohci", 291 190 .id = -1, 292 191 .dev = { ··· 299 198 300 199 void __init pxa_set_ohci_info(struct pxaohci_platform_data *info) 301 200 { 302 - pxaohci_device.dev.platform_data = info; 201 + pxa27x_device_ohci.dev.platform_data = info; 303 202 } 304 203 305 204 static struct resource i2c_power_resources[] = { ··· 314 213 }, 315 214 }; 316 215 317 - static struct platform_device pxai2c_power_device = { 216 + static struct platform_device pxa27x_device_i2c_power = { 318 217 .name = "pxa2xx-i2c", 319 218 .id = 1, 320 219 .resource = i2c_power_resources, ··· 322 221 }; 323 222 324 223 static struct platform_device *devices[] __initdata = { 325 - &pxamci_device, 326 - &pxaudc_device, 327 - &pxafb_device, 328 - &ffuart_device, 329 - &btuart_device, 330 - &stuart_device, 331 - &pxai2c_device, 332 - &pxai2c_power_device, 333 - &pxai2s_device, 334 - &pxaficp_device, 335 - &pxartc_device, 336 - &pxaohci_device, 224 + &pxa_device_mci, 225 + &pxa_device_udc, 226 + &pxa_device_fb, 227 + &pxa_device_ffuart, 228 + &pxa_device_btuart, 229 + &pxa_device_stuart, 230 + &pxa_device_i2c, 231 + &pxa_device_i2s, 232 + &pxa_device_ficp, 233 + &pxa_device_rtc, 234 + &pxa27x_device_i2c_power, 235 + &pxa27x_device_ohci, 337 236 }; 338 237 339 238 void __init pxa27x_init_irq(void) ··· 350 249 if ((ret = pxa_init_dma(32))) 351 250 return ret; 352 251 #ifdef CONFIG_PM 353 - pm_set_ops(&pxa27x_pm_ops); 252 + pxa27x_init_pm(); 354 253 #endif 355 254 ret = platform_add_devices(devices, ARRAY_SIZE(devices)); 356 255 }
+73 -39
arch/arm/mach-pxa/sleep.S
··· 17 17 18 18 #include <asm/arch/pxa-regs.h> 19 19 20 - #ifdef CONFIG_PXA27x // workaround for Errata 50 21 20 #define MDREFR_KDIV 0x200a4000 // all banks 22 21 #define CCCR_SLEEP 0x00000107 // L=7 2N=2 A=0 PPDIS=0 CPDIS=0 23 - #endif 24 22 25 23 .text 26 24 27 - /* 28 - * pxa_cpu_suspend() 29 - * 30 - * Forces CPU into sleep state. 31 - * 32 - * r0 = value for PWRMODE M field for desired sleep state 33 - */ 34 - 35 - ENTRY(pxa_cpu_suspend) 36 - 37 - #ifndef CONFIG_IWMMXT 38 - mra r2, r3, acc0 39 - #endif 40 - stmfd sp!, {r2 - r12, lr} @ save registers on stack 41 - 25 + pxa_cpu_save_cp: 42 26 @ get coprocessor registers 43 27 mrc p14, 0, r3, c6, c0, 0 @ clock configuration, for turbo mode 44 28 mrc p15, 0, r4, c15, c1, 0 @ CP access reg ··· 38 54 mov r10, sp 39 55 stmfd sp!, {r3 - r10} 40 56 41 - mov r5, r0 @ save sleep mode 57 + mov pc, lr 58 + 59 + pxa_cpu_save_sp: 42 60 @ preserve phys address of stack 43 61 mov r0, sp 62 + mov r2, lr 44 63 bl sleep_phys_sp 45 64 ldr r1, =sleep_save_sp 46 65 str r0, [r1] 66 + mov pc, r2 67 + 68 + /* 69 + * pxa27x_cpu_suspend() 70 + * 71 + * Forces CPU into sleep state. 72 + * 73 + * r0 = value for PWRMODE M field for desired sleep state 74 + */ 75 + 76 + ENTRY(pxa27x_cpu_suspend) 77 + 78 + #ifndef CONFIG_IWMMXT 79 + mra r2, r3, acc0 80 + #endif 81 + stmfd sp!, {r2 - r12, lr} @ save registers on stack 82 + 83 + bl pxa_cpu_save_cp 84 + 85 + mov r5, r0 @ save sleep mode 86 + bl pxa_cpu_save_sp 47 87 48 88 @ clean data cache 49 89 bl xscale_flush_kern_cache_all ··· 88 80 @ enable SDRAM self-refresh mode 89 81 orr r5, r5, #MDREFR_SLFRSH 90 82 91 - #ifdef CONFIG_PXA27x 92 83 @ set SDCLKx divide-by-2 bits (this is part of a workaround for Errata 50) 93 84 ldr r6, =MDREFR_KDIV 94 85 orr r5, r5, r6 95 - #endif 96 86 97 - #ifdef CONFIG_PXA25x 87 + @ Intel PXA270 Specification Update notes problems sleeping 88 + @ with core operating above 91 MHz 89 + @ (see Errata 50, ...processor does not exit from sleep...) 90 + 91 + ldr r6, =CCCR 92 + ldr r8, [r6] @ keep original value for resume 93 + 94 + ldr r7, =CCCR_SLEEP @ prepare CCCR sleep value 95 + mov r0, #0x2 @ prepare value for CLKCFG 96 + 97 + @ align execution to a cache line 98 + b pxa_cpu_do_suspend 99 + 100 + /* 101 + * pxa27x_cpu_suspend() 102 + * 103 + * Forces CPU into sleep state. 104 + * 105 + * r0 = value for PWRMODE M field for desired sleep state 106 + */ 107 + 108 + ENTRY(pxa25x_cpu_suspend) 109 + stmfd sp!, {r2 - r12, lr} @ save registers on stack 110 + 111 + bl pxa_cpu_save_cp 112 + 113 + mov r5, r0 @ save sleep mode 114 + bl pxa_cpu_save_sp 115 + 116 + @ clean data cache 117 + bl xscale_flush_kern_cache_all 118 + 119 + @ prepare value for sleep mode 120 + mov r1, r5 @ sleep mode 121 + 122 + @ prepare pointer to physical address 0 (virtual mapping in generic.c) 123 + mov r2, #UNCACHED_PHYS_0 124 + 125 + @ prepare SDRAM refresh settings 126 + ldr r4, =MDREFR 127 + ldr r5, [r4] 128 + 129 + @ enable SDRAM self-refresh mode 130 + orr r5, r5, #MDREFR_SLFRSH 131 + 98 132 @ Intel PXA255 Specification Update notes problems 99 133 @ about suspending with PXBus operating above 133MHz 100 134 @ (see Errata 31, GPIO output signals, ... unpredictable in sleep ··· 168 118 mov r0, #0 169 119 mcr p14, 0, r0, c6, c0, 0 170 120 orr r0, r0, #2 @ initiate change bit 171 - #endif 172 - #ifdef CONFIG_PXA27x 173 - @ Intel PXA270 Specification Update notes problems sleeping 174 - @ with core operating above 91 MHz 175 - @ (see Errata 50, ...processor does not exit from sleep...) 176 - 177 - ldr r6, =CCCR 178 - ldr r8, [r6] @ keep original value for resume 179 - 180 - ldr r7, =CCCR_SLEEP @ prepare CCCR sleep value 181 - mov r0, #0x2 @ prepare value for CLKCFG 182 - #endif 183 - 184 - @ align execution to a cache line 185 - b 1f 121 + b pxa_cpu_do_suspend 186 122 187 123 .ltorg 188 124 .align 5 189 - 1: 125 + pxa_cpu_do_suspend: 190 126 191 127 @ All needed values are now in registers. 192 128 @ These last instructions should be in cache 193 129 194 - #if defined(CONFIG_PXA25x) || defined(CONFIG_PXA27x) 195 130 @ initiate the frequency change... 196 131 str r7, [r6] 197 132 mcr p14, 0, r0, c6, c0, 0 ··· 190 155 mov r0, #42 191 156 10: subs r0, r0, #1 192 157 bne 10b 193 - #endif 194 158 195 159 @ Do not reorder... 196 160 @ Intel PXA270 Specification Update notes problems performing
+127 -129
arch/arm/mach-pxa/time.c
··· 1 1 /* 2 2 * arch/arm/mach-pxa/time.c 3 3 * 4 - * Author: Nicolas Pitre 5 - * Created: Jun 15, 2001 6 - * Copyright: MontaVista Software Inc. 4 + * PXA clocksource, clockevents, and OST interrupt handlers. 5 + * Copyright (c) 2007 by Bill Gatliff <bgat@billgatliff.com>. 6 + * 7 + * Derived from Nicolas Pitre's PXA timer handler Copyright (c) 2001 8 + * by MontaVista Software, Inc. (Nico, your code rocks!) 7 9 * 8 10 * This program is free software; you can redistribute it and/or modify 9 11 * it under the terms of the GNU General Public License version 2 as ··· 14 12 15 13 #include <linux/kernel.h> 16 14 #include <linux/init.h> 17 - #include <linux/delay.h> 18 15 #include <linux/interrupt.h> 19 - #include <linux/time.h> 20 - #include <linux/signal.h> 21 - #include <linux/errno.h> 22 - #include <linux/sched.h> 23 - #include <linux/clocksource.h> 16 + #include <linux/clockchips.h> 24 17 25 - #include <asm/system.h> 26 - #include <asm/hardware.h> 27 - #include <asm/io.h> 28 - #include <asm/leds.h> 29 - #include <asm/irq.h> 30 18 #include <asm/mach/irq.h> 31 19 #include <asm/mach/time.h> 32 20 #include <asm/arch/pxa-regs.h> 33 21 34 - 35 - static int pxa_set_rtc(void) 36 - { 37 - unsigned long current_time = xtime.tv_sec; 38 - 39 - if (RTSR & RTSR_ALE) { 40 - /* make sure not to forward the clock over an alarm */ 41 - unsigned long alarm = RTAR; 42 - if (current_time >= alarm && alarm >= RCNR) 43 - return -ERESTARTSYS; 44 - } 45 - RCNR = current_time; 46 - return 0; 47 - } 48 - 49 - #ifdef CONFIG_NO_IDLE_HZ 50 - static unsigned long initial_match; 51 - static int match_posponed; 52 - #endif 53 - 54 22 static irqreturn_t 55 - pxa_timer_interrupt(int irq, void *dev_id) 23 + pxa_ost0_interrupt(int irq, void *dev_id) 56 24 { 57 25 int next_match; 26 + struct clock_event_device *c = dev_id; 58 27 59 - write_seqlock(&xtime_lock); 60 - 61 - #ifdef CONFIG_NO_IDLE_HZ 62 - if (match_posponed) { 63 - match_posponed = 0; 64 - OSMR0 = initial_match; 65 - } 66 - #endif 67 - 68 - /* Loop until we get ahead of the free running timer. 69 - * This ensures an exact clock tick count and time accuracy. 70 - * Since IRQs are disabled at this point, coherence between 71 - * lost_ticks(updated in do_timer()) and the match reg value is 72 - * ensured, hence we can use do_gettimeofday() from interrupt 73 - * handlers. 74 - * 75 - * HACK ALERT: it seems that the PXA timer regs aren't updated right 76 - * away in all cases when a write occurs. We therefore compare with 77 - * 8 instead of 0 in the while() condition below to avoid missing a 78 - * match if OSCR has already reached the next OSMR value. 79 - * Experience has shown that up to 6 ticks are needed to work around 80 - * this problem, but let's use 8 to be conservative. Note that this 81 - * affect things only when the timer IRQ has been delayed by nearly 82 - * exactly one tick period which should be a pretty rare event. 28 + if (c->mode == CLOCK_EVT_MODE_ONESHOT) { 29 + /* Disarm the compare/match, signal the event. */ 30 + OIER &= ~OIER_E0; 31 + c->event_handler(c); 32 + } else if (c->mode == CLOCK_EVT_MODE_PERIODIC) { 33 + /* Call the event handler as many times as necessary 34 + * to recover missed events, if any (if we update 35 + * OSMR0 and OSCR0 is still ahead of us, we've missed 36 + * the event). As we're dealing with that, re-arm the 37 + * compare/match for the next event. 38 + * 39 + * HACK ALERT: 40 + * 41 + * There's a latency between the instruction that 42 + * writes to OSMR0 and the actual commit to the 43 + * physical hardware, because the CPU doesn't (have 44 + * to) run at bus speed, there's a write buffer 45 + * between the CPU and the bus, etc. etc. So if the 46 + * target OSCR0 is "very close", to the OSMR0 load 47 + * value, the update to OSMR0 might not get to the 48 + * hardware in time and we'll miss that interrupt. 49 + * 50 + * To be safe, if the new OSMR0 is "very close" to the 51 + * target OSCR0 value, we call the event_handler as 52 + * though the event actually happened. According to 53 + * Nico's comment in the previous version of this 54 + * code, experience has shown that 6 OSCR ticks is 55 + * "very close" but he went with 8. We will use 16, 56 + * based on the results of testing on PXA270. 57 + * 58 + * To be doubly sure, we also tell clkevt via 59 + * clockevents_register_device() not to ask for 60 + * anything that might put us "very close". 83 61 */ 62 + #define MIN_OSCR_DELTA 16 84 63 do { 85 - timer_tick(); 86 - OSSR = OSSR_M0; /* Clear match on timer 0 */ 64 + OSSR = OSSR_M0; 87 65 next_match = (OSMR0 += LATCH); 88 - } while( (signed long)(next_match - OSCR) <= 8 ); 89 - 90 - write_sequnlock(&xtime_lock); 66 + c->event_handler(c); 67 + } while (((signed long)(next_match - OSCR) <= MIN_OSCR_DELTA) 68 + && (c->mode == CLOCK_EVT_MODE_PERIODIC)); 69 + } 91 70 92 71 return IRQ_HANDLED; 93 72 } 94 73 95 - static struct irqaction pxa_timer_irq = { 96 - .name = "PXA Timer Tick", 97 - .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, 98 - .handler = pxa_timer_interrupt, 74 + static int 75 + pxa_osmr0_set_next_event(unsigned long delta, struct clock_event_device *dev) 76 + { 77 + unsigned long irqflags; 78 + 79 + raw_local_irq_save(irqflags); 80 + OSMR0 = OSCR + delta; 81 + OSSR = OSSR_M0; 82 + OIER |= OIER_E0; 83 + raw_local_irq_restore(irqflags); 84 + return 0; 85 + } 86 + 87 + static void 88 + pxa_osmr0_set_mode(enum clock_event_mode mode, struct clock_event_device *dev) 89 + { 90 + unsigned long irqflags; 91 + 92 + switch (mode) { 93 + case CLOCK_EVT_MODE_PERIODIC: 94 + raw_local_irq_save(irqflags); 95 + OSMR0 = OSCR + LATCH; 96 + OSSR = OSSR_M0; 97 + OIER |= OIER_E0; 98 + raw_local_irq_restore(irqflags); 99 + break; 100 + 101 + case CLOCK_EVT_MODE_ONESHOT: 102 + raw_local_irq_save(irqflags); 103 + OIER &= ~OIER_E0; 104 + raw_local_irq_restore(irqflags); 105 + break; 106 + 107 + case CLOCK_EVT_MODE_UNUSED: 108 + case CLOCK_EVT_MODE_SHUTDOWN: 109 + /* initializing, released, or preparing for suspend */ 110 + raw_local_irq_save(irqflags); 111 + OIER &= ~OIER_E0; 112 + raw_local_irq_restore(irqflags); 113 + break; 114 + } 115 + } 116 + 117 + static struct clock_event_device ckevt_pxa_osmr0 = { 118 + .name = "osmr0", 119 + .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, 120 + .shift = 32, 121 + .rating = 200, 122 + .cpumask = CPU_MASK_CPU0, 123 + .set_next_event = pxa_osmr0_set_next_event, 124 + .set_mode = pxa_osmr0_set_mode, 99 125 }; 100 126 101 - static cycle_t pxa_get_cycles(void) 127 + static cycle_t pxa_read_oscr(void) 102 128 { 103 129 return OSCR; 104 130 } 105 131 106 - static struct clocksource clocksource_pxa = { 107 - .name = "pxa_timer", 132 + static struct clocksource cksrc_pxa_oscr0 = { 133 + .name = "oscr0", 108 134 .rating = 200, 109 - .read = pxa_get_cycles, 135 + .read = pxa_read_oscr, 110 136 .mask = CLOCKSOURCE_MASK(32), 111 137 .shift = 20, 112 138 .flags = CLOCK_SOURCE_IS_CONTINUOUS, 113 139 }; 114 140 141 + static struct irqaction pxa_ost0_irq = { 142 + .name = "ost0", 143 + .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, 144 + .handler = pxa_ost0_interrupt, 145 + .dev_id = &ckevt_pxa_osmr0, 146 + }; 147 + 115 148 static void __init pxa_timer_init(void) 116 149 { 117 - struct timespec tv; 118 - unsigned long flags; 150 + OIER = 0; 151 + OSSR = OSSR_M0 | OSSR_M1 | OSSR_M2 | OSSR_M3; 119 152 120 - set_rtc = pxa_set_rtc; 153 + ckevt_pxa_osmr0.mult = 154 + div_sc(CLOCK_TICK_RATE, NSEC_PER_SEC, ckevt_pxa_osmr0.shift); 155 + ckevt_pxa_osmr0.max_delta_ns = 156 + clockevent_delta2ns(0x7fffffff, &ckevt_pxa_osmr0); 157 + ckevt_pxa_osmr0.min_delta_ns = 158 + clockevent_delta2ns(MIN_OSCR_DELTA, &ckevt_pxa_osmr0) + 1; 121 159 122 - OIER = 0; /* disable any timer interrupts */ 123 - OSSR = 0xf; /* clear status on all timers */ 124 - setup_irq(IRQ_OST0, &pxa_timer_irq); 125 - local_irq_save(flags); 126 - OIER = OIER_E0; /* enable match on timer 0 to cause interrupts */ 127 - OSMR0 = OSCR + LATCH; /* set initial match */ 128 - local_irq_restore(flags); 160 + cksrc_pxa_oscr0.mult = 161 + clocksource_hz2mult(CLOCK_TICK_RATE, cksrc_pxa_oscr0.shift); 129 162 130 - /* 131 - * OSCR runs continuously on PXA and is not written to, 132 - * so we can use it as clock source directly. 133 - */ 134 - clocksource_pxa.mult = 135 - clocksource_hz2mult(CLOCK_TICK_RATE, clocksource_pxa.shift); 136 - clocksource_register(&clocksource_pxa); 163 + setup_irq(IRQ_OST0, &pxa_ost0_irq); 164 + 165 + clocksource_register(&cksrc_pxa_oscr0); 166 + clockevents_register_device(&ckevt_pxa_osmr0); 137 167 } 138 - 139 - #ifdef CONFIG_NO_IDLE_HZ 140 - static int pxa_dyn_tick_enable_disable(void) 141 - { 142 - /* nothing to do */ 143 - return 0; 144 - } 145 - 146 - static void pxa_dyn_tick_reprogram(unsigned long ticks) 147 - { 148 - if (ticks > 1) { 149 - initial_match = OSMR0; 150 - OSMR0 = initial_match + ticks * LATCH; 151 - match_posponed = 1; 152 - } 153 - } 154 - 155 - static irqreturn_t 156 - pxa_dyn_tick_handler(int irq, void *dev_id) 157 - { 158 - if (match_posponed) { 159 - match_posponed = 0; 160 - OSMR0 = initial_match; 161 - if ( (signed long)(initial_match - OSCR) <= 8 ) 162 - return pxa_timer_interrupt(irq, dev_id); 163 - } 164 - return IRQ_NONE; 165 - } 166 - 167 - static struct dyn_tick_timer pxa_dyn_tick = { 168 - .enable = pxa_dyn_tick_enable_disable, 169 - .disable = pxa_dyn_tick_enable_disable, 170 - .reprogram = pxa_dyn_tick_reprogram, 171 - .handler = pxa_dyn_tick_handler, 172 - }; 173 - #endif 174 168 175 169 #ifdef CONFIG_PM 176 170 static unsigned long osmr[4], oier; ··· 189 191 OIER = oier; 190 192 191 193 /* 192 - * OSMR0 is the system timer: make sure OSCR is sufficiently behind 194 + * OSCR0 is the system timer, which has to increase 195 + * monotonically until it rolls over in hardware. The value 196 + * (OSMR0 - LATCH) is OSCR0 at the most recent system tick, 197 + * which is a handy value to restore to OSCR0. 193 198 */ 194 199 OSCR = OSMR0 - LATCH; 195 200 } ··· 205 204 .init = pxa_timer_init, 206 205 .suspend = pxa_timer_suspend, 207 206 .resume = pxa_timer_resume, 208 - #ifdef CONFIG_NO_IDLE_HZ 209 - .dyn_tick = &pxa_dyn_tick, 210 - #endif 211 207 };
+1 -1
arch/arm/mach-rpc/riscpc.c
··· 87 87 /* 88 88 * Turn off floppy. 89 89 */ 90 - outb(0xc, 0x3f2); 90 + writeb(0xc, PCIO_BASE + (0x3f2 << 2)); 91 91 92 92 /* 93 93 * RiscPC can't handle half-word loads and stores
+1
arch/arm/mach-s3c2410/Kconfig
··· 9 9 depends on ARCH_S3C2410 10 10 select S3C2410_CLOCK 11 11 select S3C2410_GPIO 12 + select CPU_LLSERIAL_S3C2410 12 13 select S3C2410_PM if PM 13 14 help 14 15 Support for S3C2410 and S3C2410A family from the S3C24XX line
+1 -1
arch/arm/mach-s3c2410/clock.c
··· 37 37 #include <asm/hardware.h> 38 38 #include <asm/io.h> 39 39 40 - #include <asm/arch/regs-serial.h> 40 + #include <asm/plat-s3c/regs-serial.h> 41 41 #include <asm/arch/regs-clock.h> 42 42 #include <asm/arch/regs-gpio.h> 43 43
+4 -4
arch/arm/mach-s3c2410/dma.c
··· 23 23 #include <asm/plat-s3c24xx/cpu.h> 24 24 #include <asm/plat-s3c24xx/dma.h> 25 25 26 - #include <asm/arch/regs-serial.h> 26 + #include <asm/plat-s3c/regs-serial.h> 27 27 #include <asm/arch/regs-gpio.h> 28 - #include <asm/arch/regs-ac97.h> 28 + #include <asm/plat-s3c/regs-ac97.h> 29 29 #include <asm/arch/regs-mem.h> 30 30 #include <asm/arch/regs-lcd.h> 31 31 #include <asm/arch/regs-sdi.h> 32 - #include <asm/arch/regs-iis.h> 33 - #include <asm/arch/regs-spi.h> 32 + #include <asm/plat-s3c24xx/regs-iis.h> 33 + #include <asm/plat-s3c24xx/regs-spi.h> 34 34 35 35 static struct s3c24xx_dma_map __initdata s3c2410_dma_mappings[] = { 36 36 [DMACH_XD0] = {
+1 -1
arch/arm/mach-s3c2410/mach-amlm5900.c
··· 48 48 #include <asm/mach-types.h> 49 49 #include <asm/arch/fb.h> 50 50 51 - #include <asm/arch/regs-serial.h> 51 + #include <asm/plat-s3c/regs-serial.h> 52 52 #include <asm/arch/regs-lcd.h> 53 53 #include <asm/arch/regs-gpio.h> 54 54
+3 -3
arch/arm/mach-s3c2410/mach-bast.c
··· 36 36 #include <asm/mach-types.h> 37 37 38 38 //#include <asm/debug-ll.h> 39 - #include <asm/arch/regs-serial.h> 39 + #include <asm/plat-s3c/regs-serial.h> 40 40 #include <asm/arch/regs-gpio.h> 41 41 #include <asm/arch/regs-mem.h> 42 42 #include <asm/arch/regs-lcd.h> 43 43 44 - #include <asm/arch/nand.h> 45 - #include <asm/arch/iic.h> 44 + #include <asm/plat-s3c/nand.h> 45 + #include <asm/plat-s3c/iic.h> 46 46 #include <asm/arch/fb.h> 47 47 48 48 #include <linux/mtd/mtd.h>
+2 -2
arch/arm/mach-s3c2410/mach-h1940.c
··· 30 30 #include <asm/irq.h> 31 31 #include <asm/mach-types.h> 32 32 33 - #include <asm/arch/regs-serial.h> 33 + #include <asm/plat-s3c/regs-serial.h> 34 34 #include <asm/arch/regs-lcd.h> 35 35 #include <asm/arch/regs-gpio.h> 36 36 #include <asm/arch/regs-clock.h> ··· 38 38 #include <asm/arch/h1940.h> 39 39 #include <asm/arch/h1940-latch.h> 40 40 #include <asm/arch/fb.h> 41 - #include <asm/arch/udc.h> 41 + #include <asm/plat-s3c24xx/udc.h> 42 42 43 43 #include <asm/plat-s3c24xx/clock.h> 44 44 #include <asm/plat-s3c24xx/devs.h>
+2 -2
arch/arm/mach-s3c2410/mach-n30.c
··· 33 33 #include <asm/irq.h> 34 34 #include <asm/mach-types.h> 35 35 36 - #include <asm/arch/regs-serial.h> 36 + #include <asm/plat-s3c/regs-serial.h> 37 37 #include <asm/arch/regs-gpio.h> 38 - #include <asm/arch/iic.h> 38 + #include <asm/plat-s3c/iic.h> 39 39 40 40 #include <asm/plat-s3c24xx/s3c2410.h> 41 41 #include <asm/plat-s3c24xx/clock.h>
+1 -1
arch/arm/mach-s3c2410/mach-otom.c
··· 29 29 #include <asm/irq.h> 30 30 #include <asm/mach-types.h> 31 31 32 - #include <asm/arch/regs-serial.h> 32 + #include <asm/plat-s3c/regs-serial.h> 33 33 #include <asm/arch/regs-gpio.h> 34 34 35 35 #include <asm/plat-s3c24xx/s3c2410.h>
+3 -3
arch/arm/mach-s3c2410/mach-qt2410.c
··· 49 49 50 50 #include <asm/arch/regs-gpio.h> 51 51 #include <asm/arch/leds-gpio.h> 52 - #include <asm/arch/regs-serial.h> 52 + #include <asm/plat-s3c/regs-serial.h> 53 53 #include <asm/arch/fb.h> 54 - #include <asm/arch/nand.h> 55 - #include <asm/arch/udc.h> 54 + #include <asm/plat-s3c/nand.h> 55 + #include <asm/plat-s3c24xx/udc.h> 56 56 #include <asm/arch/spi.h> 57 57 #include <asm/arch/spi-gpio.h> 58 58
+1 -1
arch/arm/mach-s3c2410/mach-smdk2410.c
··· 47 47 #include <asm/irq.h> 48 48 #include <asm/mach-types.h> 49 49 50 - #include <asm/arch/regs-serial.h> 50 + #include <asm/plat-s3c/regs-serial.h> 51 51 52 52 #include <asm/plat-s3c24xx/devs.h> 53 53 #include <asm/plat-s3c24xx/cpu.h>
+1 -1
arch/arm/mach-s3c2410/mach-vr1000.c
··· 39 39 #include <asm/irq.h> 40 40 #include <asm/mach-types.h> 41 41 42 - #include <asm/arch/regs-serial.h> 42 + #include <asm/plat-s3c/regs-serial.h> 43 43 #include <asm/arch/regs-gpio.h> 44 44 #include <asm/arch/leds-gpio.h> 45 45
+1 -2
arch/arm/mach-s3c2410/s3c2410.c
··· 29 29 #include <asm/irq.h> 30 30 31 31 #include <asm/arch/regs-clock.h> 32 - #include <asm/arch/regs-serial.h> 32 + #include <asm/plat-s3c/regs-serial.h> 33 33 34 34 #include <asm/plat-s3c24xx/s3c2410.h> 35 35 #include <asm/plat-s3c24xx/cpu.h> ··· 40 40 41 41 static struct map_desc s3c2410_iodesc[] __initdata = { 42 42 IODESC_ENT(CLKPWR), 43 - IODESC_ENT(LCD), 44 43 IODESC_ENT(TIMER), 45 44 IODESC_ENT(WATCHDOG), 46 45 };
+1 -1
arch/arm/mach-s3c2410/sleep.S
··· 32 32 #include <asm/arch/regs-gpio.h> 33 33 #include <asm/arch/regs-clock.h> 34 34 #include <asm/arch/regs-mem.h> 35 - #include <asm/arch/regs-serial.h> 35 + #include <asm/plat-s3c/regs-serial.h> 36 36 37 37 /* s3c2410_cpu_suspend 38 38 *
+1
arch/arm/mach-s3c2412/Kconfig
··· 7 7 config CPU_S3C2412 8 8 bool 9 9 depends on ARCH_S3C2410 10 + select CPU_LLSERIAL_S3C2440 10 11 select S3C2412_PM if PM 11 12 select S3C2412_DMA if S3C2410_DMA 12 13 help
+1 -1
arch/arm/mach-s3c2412/clock.c
··· 37 37 #include <asm/hardware.h> 38 38 #include <asm/io.h> 39 39 40 - #include <asm/arch/regs-serial.h> 40 + #include <asm/plat-s3c/regs-serial.h> 41 41 #include <asm/arch/regs-clock.h> 42 42 #include <asm/arch/regs-gpio.h> 43 43
+4 -4
arch/arm/mach-s3c2412/dma.c
··· 24 24 #include <asm/plat-s3c24xx/dma.h> 25 25 #include <asm/plat-s3c24xx/cpu.h> 26 26 27 - #include <asm/arch/regs-serial.h> 27 + #include <asm/plat-s3c/regs-serial.h> 28 28 #include <asm/arch/regs-gpio.h> 29 - #include <asm/arch/regs-ac97.h> 29 + #include <asm/plat-s3c/regs-ac97.h> 30 30 #include <asm/arch/regs-mem.h> 31 31 #include <asm/arch/regs-lcd.h> 32 32 #include <asm/arch/regs-sdi.h> 33 - #include <asm/arch/regs-iis.h> 34 - #include <asm/arch/regs-spi.h> 33 + #include <asm/plat-s3c24xx/regs-iis.h> 34 + #include <asm/plat-s3c24xx/regs-spi.h> 35 35 36 36 #define MAP(x) { (x)| DMA_CH_VALID, (x)| DMA_CH_VALID, (x)| DMA_CH_VALID, (x)| DMA_CH_VALID } 37 37
+2 -2
arch/arm/mach-s3c2412/mach-smdk2413.c
··· 32 32 #include <asm/mach-types.h> 33 33 34 34 //#include <asm/debug-ll.h> 35 - #include <asm/arch/regs-serial.h> 35 + #include <asm/plat-s3c/regs-serial.h> 36 36 #include <asm/arch/regs-gpio.h> 37 37 #include <asm/arch/regs-lcd.h> 38 38 39 39 #include <asm/arch/idle.h> 40 - #include <asm/arch/udc.h> 40 + #include <asm/plat-s3c24xx/udc.h> 41 41 #include <asm/arch/fb.h> 42 42 43 43 #include <asm/plat-s3c24xx/s3c2410.h>
+2 -2
arch/arm/mach-s3c2412/mach-vstms.c
··· 33 33 #include <asm/irq.h> 34 34 #include <asm/mach-types.h> 35 35 36 - #include <asm/arch/regs-serial.h> 36 + #include <asm/plat-s3c/regs-serial.h> 37 37 #include <asm/arch/regs-gpio.h> 38 38 #include <asm/arch/regs-lcd.h> 39 39 40 40 #include <asm/arch/idle.h> 41 41 #include <asm/arch/fb.h> 42 42 43 - #include <asm/arch/nand.h> 43 + #include <asm/plat-s3c/nand.h> 44 44 45 45 #include <asm/plat-s3c24xx/s3c2410.h> 46 46 #include <asm/plat-s3c24xx/s3c2412.h>
+2 -3
arch/arm/mach-s3c2412/s3c2412.c
··· 34 34 #include <asm/arch/idle.h> 35 35 36 36 #include <asm/arch/regs-clock.h> 37 - #include <asm/arch/regs-serial.h> 37 + #include <asm/plat-s3c/regs-serial.h> 38 38 #include <asm/arch/regs-power.h> 39 39 #include <asm/arch/regs-gpio.h> 40 40 #include <asm/arch/regs-gpioj.h> 41 41 #include <asm/arch/regs-dsc.h> 42 - #include <asm/arch/regs-spi.h> 42 + #include <asm/plat-s3c24xx/regs-spi.h> 43 43 #include <asm/arch/regs-s3c2412.h> 44 44 45 45 #include <asm/plat-s3c24xx/s3c2412.h> ··· 63 63 64 64 static struct map_desc s3c2412_iodesc[] __initdata = { 65 65 IODESC_ENT(CLKPWR), 66 - IODESC_ENT(LCD), 67 66 IODESC_ENT(TIMER), 68 67 IODESC_ENT(WATCHDOG), 69 68 };
+1
arch/arm/mach-s3c2440/Kconfig
··· 12 12 select S3C2410_GPIO 13 13 select S3C2440_DMA if S3C2410_DMA 14 14 select CPU_S3C244X 15 + select CPU_LLSERIAL_S3C2440 15 16 help 16 17 Support for S3C2440 Samsung Mobile CPU based systems. 17 18
+4 -4
arch/arm/mach-s3c2440/dma.c
··· 23 23 #include <asm/plat-s3c24xx/dma.h> 24 24 #include <asm/plat-s3c24xx/cpu.h> 25 25 26 - #include <asm/arch/regs-serial.h> 26 + #include <asm/plat-s3c/regs-serial.h> 27 27 #include <asm/arch/regs-gpio.h> 28 - #include <asm/arch/regs-ac97.h> 28 + #include <asm/plat-s3c/regs-ac97.h> 29 29 #include <asm/arch/regs-mem.h> 30 30 #include <asm/arch/regs-lcd.h> 31 31 #include <asm/arch/regs-sdi.h> 32 - #include <asm/arch/regs-iis.h> 33 - #include <asm/arch/regs-spi.h> 32 + #include <asm/plat-s3c24xx/regs-iis.h> 33 + #include <asm/plat-s3c24xx/regs-spi.h> 34 34 35 35 static struct s3c24xx_dma_map __initdata s3c2440_dma_mappings[] = { 36 36 [DMACH_XD0] = {
+2 -2
arch/arm/mach-s3c2440/mach-anubis.c
··· 34 34 #include <asm/irq.h> 35 35 #include <asm/mach-types.h> 36 36 37 - #include <asm/arch/regs-serial.h> 37 + #include <asm/plat-s3c/regs-serial.h> 38 38 #include <asm/arch/regs-gpio.h> 39 39 #include <asm/arch/regs-mem.h> 40 40 #include <asm/arch/regs-lcd.h> 41 - #include <asm/arch/nand.h> 41 + #include <asm/plat-s3c/nand.h> 42 42 43 43 #include <linux/mtd/mtd.h> 44 44 #include <linux/mtd/nand.h>
+1 -1
arch/arm/mach-s3c2440/mach-nexcoder.c
··· 36 36 37 37 //#include <asm/debug-ll.h> 38 38 #include <asm/arch/regs-gpio.h> 39 - #include <asm/arch/regs-serial.h> 39 + #include <asm/plat-s3c/regs-serial.h> 40 40 41 41 #include <asm/plat-s3c24xx/s3c2410.h> 42 42 #include <asm/plat-s3c24xx/s3c2440.h>
+2 -2
arch/arm/mach-s3c2440/mach-osiris.c
··· 31 31 #include <asm/irq.h> 32 32 #include <asm/mach-types.h> 33 33 34 - #include <asm/arch/regs-serial.h> 34 + #include <asm/plat-s3c/regs-serial.h> 35 35 #include <asm/arch/regs-gpio.h> 36 36 #include <asm/arch/regs-mem.h> 37 37 #include <asm/arch/regs-lcd.h> 38 - #include <asm/arch/nand.h> 38 + #include <asm/plat-s3c/nand.h> 39 39 40 40 #include <linux/mtd/mtd.h> 41 41 #include <linux/mtd/nand.h>
+2 -2
arch/arm/mach-s3c2440/mach-rx3715.c
··· 38 38 #include <asm/irq.h> 39 39 #include <asm/mach-types.h> 40 40 41 - #include <asm/arch/regs-serial.h> 41 + #include <asm/plat-s3c/regs-serial.h> 42 42 #include <asm/arch/regs-gpio.h> 43 43 #include <asm/arch/regs-lcd.h> 44 44 45 45 #include <asm/arch/h1940.h> 46 - #include <asm/arch/nand.h> 46 + #include <asm/plat-s3c/nand.h> 47 47 #include <asm/arch/fb.h> 48 48 49 49 #include <asm/plat-s3c24xx/clock.h>
+1 -1
arch/arm/mach-s3c2440/mach-smdk2440.c
··· 31 31 #include <asm/irq.h> 32 32 #include <asm/mach-types.h> 33 33 34 - #include <asm/arch/regs-serial.h> 34 + #include <asm/plat-s3c/regs-serial.h> 35 35 #include <asm/arch/regs-gpio.h> 36 36 #include <asm/arch/regs-lcd.h> 37 37
+1
arch/arm/mach-s3c2442/Kconfig
··· 11 11 select S3C2410_GPIO 12 12 select S3C2410_PM if PM 13 13 select CPU_S3C244X 14 + select CPU_LLSERIAL_S3C2440 14 15 help 15 16 Support for S3C2442 Samsung Mobile CPU based systems. 16 17
+1
arch/arm/mach-s3c2443/Kconfig
··· 8 8 bool 9 9 depends on ARCH_S3C2410 10 10 select S3C2443_DMA if S3C2410_DMA 11 + select CPU_LLSERIAL_S3C2440 11 12 help 12 13 Support for the S3C2443 SoC from the S3C24XX line 13 14
+4 -4
arch/arm/mach-s3c2443/dma.c
··· 24 24 #include <asm/plat-s3c24xx/dma.h> 25 25 #include <asm/plat-s3c24xx/cpu.h> 26 26 27 - #include <asm/arch/regs-serial.h> 27 + #include <asm/plat-s3c/regs-serial.h> 28 28 #include <asm/arch/regs-gpio.h> 29 - #include <asm/arch/regs-ac97.h> 29 + #include <asm/plat-s3c/regs-ac97.h> 30 30 #include <asm/arch/regs-mem.h> 31 31 #include <asm/arch/regs-lcd.h> 32 32 #include <asm/arch/regs-sdi.h> 33 - #include <asm/arch/regs-iis.h> 34 - #include <asm/arch/regs-spi.h> 33 + #include <asm/plat-s3c24xx/regs-iis.h> 34 + #include <asm/plat-s3c24xx/regs-spi.h> 35 35 36 36 #define MAP(x) { \ 37 37 [0] = (x) | DMA_CH_VALID, \
+1 -1
arch/arm/mach-s3c2443/mach-smdk2443.c
··· 31 31 #include <asm/irq.h> 32 32 #include <asm/mach-types.h> 33 33 34 - #include <asm/arch/regs-serial.h> 34 + #include <asm/plat-s3c/regs-serial.h> 35 35 #include <asm/arch/regs-gpio.h> 36 36 #include <asm/arch/regs-lcd.h> 37 37
+11 -2
arch/arm/mach-sa1100/Kconfig
··· 101 101 handheld computer. See <http://www.hp.com/jornada/products/720> 102 102 for details. 103 103 104 + config SA1100_JORNADA720_SSP 105 + bool "HP Jornada 720 Extended SSP driver" 106 + select SA1100_SSP 107 + depends on SA1100_JORNADA720 108 + help 109 + Say Y here if you have a HP Jornada 7xx handheld computer and you 110 + want to access devices connected to the MCU. Those include the 111 + keyboard, touchscreen, backlight and battery. This driver also activates 112 + the generic SSP which it extends. 113 + 104 114 config SA1100_HACKKIT 105 115 bool "HackKit Core CPU Board" 106 116 help ··· 155 145 help 156 146 Say Y here to enable support for the generic PIO SSP driver. 157 147 This isn't for audio support, but for attached sensors and 158 - other devices, eg for BadgePAD 4 sensor support, or Jornada 159 - 720 touchscreen support. 148 + other devices, eg for BadgePAD 4 sensor support. 160 149 161 150 config H3600_SLEEVE 162 151 tristate "Compaq iPAQ Handheld sleeve support"
+2
arch/arm/mach-sa1100/Makefile
··· 31 31 led-$(CONFIG_SA1100_HACKKIT) += leds-hackkit.o 32 32 33 33 obj-$(CONFIG_SA1100_JORNADA720) += jornada720.o 34 + obj-$(CONFIG_SA1100_JORNADA720_SSP) += jornada720_ssp.o 34 35 35 36 obj-$(CONFIG_SA1100_LART) += lart.o 36 37 led-$(CONFIG_SA1100_LART) += leds-lart.o ··· 52 51 # Miscelaneous functions 53 52 obj-$(CONFIG_PM) += pm.o sleep.o 54 53 obj-$(CONFIG_SA1100_SSP) += ssp.o 54 +
+201
arch/arm/mach-sa1100/jornada720_ssp.c
··· 1 + /** 2 + * arch/arm/mac-sa1100/jornada720_ssp.c 3 + * 4 + * Copyright (C) 2006/2007 Kristoffer Ericson <Kristoffer.Ericson@gmail.com> 5 + * Copyright (C) 2006 Filip Zyzniewski <filip.zyzniewski@tefnet.pl> 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 + * SSP driver for the HP Jornada 710/720/728 12 + */ 13 + 14 + #include <linux/delay.h> 15 + #include <linux/errno.h> 16 + #include <linux/init.h> 17 + #include <linux/kernel.h> 18 + #include <linux/module.h> 19 + #include <linux/platform_device.h> 20 + #include <linux/sched.h> 21 + #include <linux/slab.h> 22 + 23 + #include <asm/hardware.h> 24 + #include <asm/hardware/ssp.h> 25 + #include <asm/arch/jornada720.h> 26 + 27 + static DEFINE_SPINLOCK(jornada_ssp_lock); 28 + static unsigned long jornada_ssp_flags; 29 + 30 + /** 31 + * jornada_ssp_reverse - reverses input byte 32 + * 33 + * we need to reverse all data we recieve from the mcu due to its physical location 34 + * returns : 01110111 -> 11101110 35 + */ 36 + u8 inline jornada_ssp_reverse(u8 byte) 37 + { 38 + return 39 + ((0x80 & byte) >> 7) | 40 + ((0x40 & byte) >> 5) | 41 + ((0x20 & byte) >> 3) | 42 + ((0x10 & byte) >> 1) | 43 + ((0x08 & byte) << 1) | 44 + ((0x04 & byte) << 3) | 45 + ((0x02 & byte) << 5) | 46 + ((0x01 & byte) << 7); 47 + }; 48 + EXPORT_SYMBOL(jornada_ssp_reverse); 49 + 50 + /** 51 + * jornada_ssp_byte - waits for ready ssp bus and sends byte 52 + * 53 + * waits for fifo buffer to clear and then transmits, if it doesn't then we will 54 + * timeout after <timeout> rounds. Needs mcu running before its called. 55 + * 56 + * returns : %mcu output on success 57 + * : %-ETIMEOUT on timeout 58 + */ 59 + int jornada_ssp_byte(u8 byte) 60 + { 61 + int timeout = 400000; 62 + u16 ret; 63 + 64 + while ((GPLR & GPIO_GPIO10)) { 65 + if (!--timeout) { 66 + printk(KERN_WARNING "SSP: timeout while waiting for transmit\n"); 67 + return -ETIMEDOUT; 68 + } 69 + cpu_relax(); 70 + } 71 + 72 + ret = jornada_ssp_reverse(byte) << 8; 73 + 74 + ssp_write_word(ret); 75 + ssp_read_word(&ret); 76 + 77 + return jornada_ssp_reverse(ret); 78 + }; 79 + EXPORT_SYMBOL(jornada_ssp_byte); 80 + 81 + /** 82 + * jornada_ssp_inout - decide if input is command or trading byte 83 + * 84 + * returns : (jornada_ssp_byte(byte)) on success 85 + * : %-ETIMEOUT on timeout failure 86 + */ 87 + int jornada_ssp_inout(u8 byte) 88 + { 89 + int ret, i; 90 + 91 + /* true means command byte */ 92 + if (byte != TXDUMMY) { 93 + ret = jornada_ssp_byte(byte); 94 + /* Proper return to commands is TxDummy */ 95 + if (ret != TXDUMMY) { 96 + for (i = 0; i < 256; i++)/* flushing bus */ 97 + if (jornada_ssp_byte(TXDUMMY) == -1) 98 + break; 99 + return -ETIMEDOUT; 100 + } 101 + } else /* Exchange TxDummy for data */ 102 + ret = jornada_ssp_byte(TXDUMMY); 103 + 104 + return ret; 105 + }; 106 + EXPORT_SYMBOL(jornada_ssp_inout); 107 + 108 + /** 109 + * jornada_ssp_start - enable mcu 110 + * 111 + */ 112 + int jornada_ssp_start() 113 + { 114 + spin_lock_irqsave(&jornada_ssp_lock, jornada_ssp_flags); 115 + GPCR = GPIO_GPIO25; 116 + udelay(50); 117 + return 0; 118 + }; 119 + EXPORT_SYMBOL(jornada_ssp_start); 120 + 121 + /** 122 + * jornada_ssp_end - disable mcu and turn off lock 123 + * 124 + */ 125 + int jornada_ssp_end() 126 + { 127 + GPSR = GPIO_GPIO25; 128 + spin_unlock_irqrestore(&jornada_ssp_lock, jornada_ssp_flags); 129 + return 0; 130 + }; 131 + EXPORT_SYMBOL(jornada_ssp_end); 132 + 133 + static int __init jornada_ssp_probe(struct platform_device *dev) 134 + { 135 + int ret; 136 + 137 + GPSR = GPIO_GPIO25; 138 + 139 + ret = ssp_init(); 140 + 141 + /* worked fine, lets not bother with anything else */ 142 + if (!ret) { 143 + printk(KERN_INFO "SSP: device initialized with irq\n"); 144 + return ret; 145 + } 146 + 147 + printk(KERN_WARNING "SSP: initialization failed, trying non-irq solution \n"); 148 + 149 + /* init of Serial 4 port */ 150 + Ser4MCCR0 = 0; 151 + Ser4SSCR0 = 0x0387; 152 + Ser4SSCR1 = 0x18; 153 + 154 + /* clear out any left over data */ 155 + ssp_flush(); 156 + 157 + /* enable MCU */ 158 + jornada_ssp_start(); 159 + 160 + /* see if return value makes sense */ 161 + ret = jornada_ssp_inout(GETBRIGHTNESS); 162 + 163 + /* seems like it worked, just feed it with TxDummy to get rid of data */ 164 + if (ret == TxDummy) 165 + jornada_ssp_inout(TXDUMMY); 166 + 167 + jornada_ssp_end(); 168 + 169 + /* failed, lets just kill everything */ 170 + if (ret == -ETIMEDOUT) { 171 + printk(KERN_WARNING "SSP: attempts failed, bailing\n"); 172 + ssp_exit(); 173 + return -ENODEV; 174 + } 175 + 176 + /* all fine */ 177 + printk(KERN_INFO "SSP: device initialized\n"); 178 + return 0; 179 + }; 180 + 181 + static int jornada_ssp_remove(struct platform_device *dev) 182 + { 183 + /* Note that this doesnt actually remove the driver, since theres nothing to remove 184 + * It just makes sure everything is turned off */ 185 + GPSR = GPIO_GPIO25; 186 + ssp_exit(); 187 + return 0; 188 + }; 189 + 190 + struct platform_driver jornadassp_driver = { 191 + .probe = jornada_ssp_probe, 192 + .remove = jornada_ssp_remove, 193 + .driver = { 194 + .name = "jornada_ssp", 195 + }, 196 + }; 197 + 198 + static int __init jornada_ssp_init(void) 199 + { 200 + return platform_driver_register(&jornadassp_driver); 201 + }
+2
arch/arm/mach-sa1100/neponset.c
··· 292 292 &smc91x_device, 293 293 }; 294 294 295 + extern void sa1110_mb_disable(void); 296 + 295 297 static int __init neponset_init(void) 296 298 { 297 299 platform_driver_register(&neponset_device_driver);
+7 -11
arch/arm/mm/Kconfig
··· 345 345 # ARMv6 346 346 config CPU_V6 347 347 bool "Support ARM V6 processor" 348 - depends on ARCH_INTEGRATOR || MACH_REALVIEW_EB || ARCH_OMAP2 348 + depends on ARCH_INTEGRATOR || MACH_REALVIEW_EB || ARCH_OMAP2 || ARCH_MX3 349 + default y if ARCH_MX3 349 350 select CPU_32v6 350 351 select CPU_ABRT_EV6 351 352 select CPU_CACHE_V6 352 353 select CPU_CACHE_VIPT 353 354 select CPU_CP15_MMU 354 - select CPU_HAS_ASID 355 + select CPU_HAS_ASID if MMU 355 356 select CPU_COPY_V6 if MMU 356 357 select CPU_TLB_V6 if MMU 357 358 ··· 360 359 config CPU_32v6K 361 360 bool "Support ARM V6K processor extensions" if !SMP 362 361 depends on CPU_V6 363 - default y if SMP 362 + default y if SMP && !ARCH_MX3 364 363 help 365 364 Say Y here if your ARMv6 processor supports the 'K' extension. 366 365 This enables the kernel to use some instructions not present ··· 378 377 select CPU_CACHE_V7 379 378 select CPU_CACHE_VIPT 380 379 select CPU_CP15_MMU 381 - select CPU_HAS_ASID 380 + select CPU_HAS_ASID if MMU 382 381 select CPU_COPY_V6 if MMU 383 382 select CPU_TLB_V7 if MMU 384 383 ··· 406 405 407 406 config CPU_32v6 408 407 bool 408 + select TLS_REG_EMUL if !CPU_32v6K && !MMU 409 409 410 410 config CPU_32v7 411 411 bool ··· 600 598 601 599 config CPU_DCACHE_WRITETHROUGH 602 600 bool "Force write through D-cache" 603 - depends on (CPU_ARM740T || CPU_ARM920T || CPU_ARM922T || CPU_ARM925T || CPU_ARM926T || CPU_ARM940T || CPU_ARM946E || CPU_ARM1020 || CPU_V6) && !CPU_DCACHE_DISABLE 601 + depends on (CPU_ARM740T || CPU_ARM920T || CPU_ARM922T || CPU_ARM925T || CPU_ARM926T || CPU_ARM940T || CPU_ARM946E || CPU_ARM1020) && !CPU_DCACHE_DISABLE 604 602 default y if CPU_ARM925T 605 603 help 606 604 Say Y here to use the data cache in writethrough mode. Unless you ··· 612 610 help 613 611 Say Y here to use the predictable round-robin cache replacement 614 612 policy. Unless you specifically require this or are unsure, say N. 615 - 616 - config CPU_L2CACHE_DISABLE 617 - bool "Disable level 2 cache" 618 - depends on CPU_V7 619 - help 620 - Say Y here to disable the level 2 cache. If unsure, say N. 621 613 622 614 config CPU_BPREDICT_DISABLE 623 615 bool "Disable branch prediction"
+6
arch/arm/mm/cache-l2x0.c
··· 17 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 18 */ 19 19 #include <linux/init.h> 20 + #include <linux/spinlock.h> 20 21 21 22 #include <asm/cacheflush.h> 22 23 #include <asm/io.h> ··· 26 25 #define CACHE_LINE_SIZE 32 27 26 28 27 static void __iomem *l2x0_base; 28 + static DEFINE_SPINLOCK(l2x0_lock); 29 29 30 30 static inline void sync_writel(unsigned long val, unsigned long reg, 31 31 unsigned long complete_mask) 32 32 { 33 + unsigned long flags; 34 + 35 + spin_lock_irqsave(&l2x0_lock, flags); 33 36 writel(val, l2x0_base + reg); 34 37 /* wait for the operation to complete */ 35 38 while (readl(l2x0_base + reg) & complete_mask) 36 39 ; 40 + spin_unlock_irqrestore(&l2x0_lock, flags); 37 41 } 38 42 39 43 static inline void cache_sync(void)
+10 -4
arch/arm/mm/mmu.c
··· 114 114 } 115 115 if (i == ARRAY_SIZE(cache_policies)) 116 116 printk(KERN_ERR "ERROR: unknown or unsupported cache policy\n"); 117 + if (cpu_architecture() >= CPU_ARCH_ARMv6) { 118 + printk(KERN_WARNING "Only cachepolicy=writeback supported on ARMv6 and later\n"); 119 + cachepolicy = CPOLICY_WRITEBACK; 120 + } 117 121 flush_cache_all(); 118 122 set_cr(cr_alignment); 119 123 } ··· 256 252 int cpu_arch = cpu_architecture(); 257 253 int i; 258 254 255 + if (cpu_arch < CPU_ARCH_ARMv6) { 259 256 #if defined(CONFIG_CPU_DCACHE_DISABLE) 260 - if (cachepolicy > CPOLICY_BUFFERED) 261 - cachepolicy = CPOLICY_BUFFERED; 257 + if (cachepolicy > CPOLICY_BUFFERED) 258 + cachepolicy = CPOLICY_BUFFERED; 262 259 #elif defined(CONFIG_CPU_DCACHE_WRITETHROUGH) 263 - if (cachepolicy > CPOLICY_WRITETHROUGH) 264 - cachepolicy = CPOLICY_WRITETHROUGH; 260 + if (cachepolicy > CPOLICY_WRITETHROUGH) 261 + cachepolicy = CPOLICY_WRITETHROUGH; 265 262 #endif 263 + } 266 264 if (cpu_arch < CPU_ARCH_ARMv5) { 267 265 if (cachepolicy >= CPOLICY_WRITEALLOC) 268 266 cachepolicy = CPOLICY_WRITEBACK;
+2
arch/arm/mm/proc-syms.c
··· 31 31 EXPORT_SYMBOL(cpu_cache); 32 32 #endif 33 33 34 + #ifdef CONFIG_MMU 34 35 #ifndef MULTI_USER 35 36 EXPORT_SYMBOL(__cpu_clear_user_page); 36 37 EXPORT_SYMBOL(__cpu_copy_user_page); 37 38 #else 38 39 EXPORT_SYMBOL(cpu_user); 40 + #endif 39 41 #endif 40 42 41 43 /*
+13 -20
arch/arm/mm/proc-v7.S
··· 77 77 * - we are not using split page tables 78 78 */ 79 79 ENTRY(cpu_v7_switch_mm) 80 + #ifdef CONFIG_MMU 80 81 mov r2, #0 81 82 ldr r1, [r1, #MM_CONTEXT_ID] @ get mm->context.id 82 83 orr r0, r0, #TTB_RGN_OC_WB @ mark PTWs outer cacheable, WB ··· 87 86 isb 88 87 mcr p15, 0, r1, c13, c0, 1 @ set context ID 89 88 isb 89 + #endif 90 90 mov pc, lr 91 91 92 92 /* ··· 111 109 * 1111 0 1 1 r/w r/w 112 110 */ 113 111 ENTRY(cpu_v7_set_pte_ext) 112 + #ifdef CONFIG_MMU 114 113 str r1, [r0], #-2048 @ linux version 115 114 116 115 bic r3, r1, #0x000003f0 ··· 139 136 140 137 str r3, [r0] 141 138 mcr p15, 0, r0, c7, c10, 1 @ flush_pte 139 + #endif 142 140 mov pc, lr 143 141 144 142 cpu_v7_name: ··· 173 169 mcr p15, 0, r10, c7, c5, 0 @ I+BTB cache invalidate 174 170 #endif 175 171 dsb 172 + #ifdef CONFIG_MMU 176 173 mcr p15, 0, r10, c8, c7, 0 @ invalidate I + D TLBs 177 174 mcr p15, 0, r10, c2, c0, 2 @ TTB control register 178 175 orr r4, r4, #TTB_RGN_OC_WB @ mark PTWs outer cacheable, WB ··· 181 176 mcr p15, 0, r4, c2, c0, 1 @ load TTB1 182 177 mov r10, #0x1f @ domains 0, 1 = manager 183 178 mcr p15, 0, r10, c3, c0, 0 @ load domain access register 184 - #ifndef CONFIG_CPU_L2CACHE_DISABLE 185 - @ L2 cache configuration in the L2 aux control register 186 - mrc p15, 1, r10, c9, c0, 2 187 - bic r10, r10, #(1 << 16) @ L2 outer cache 188 - mcr p15, 1, r10, c9, c0, 2 189 - @ L2 cache is enabled in the aux control register 190 - mrc p15, 0, r10, c1, c0, 1 191 - orr r10, r10, #2 192 - mcr p15, 0, r10, c1, c0, 1 193 179 #endif 194 - mrc p15, 0, r0, c1, c0, 0 @ read control register 195 - ldr r10, cr1_clear @ get mask for bits to clear 196 - bic r0, r0, r10 @ clear bits them 197 - ldr r10, cr1_set @ get mask for bits to set 198 - orr r0, r0, r10 @ set them 180 + adr r5, v7_crval 181 + ldmia r5, {r5, r6} 182 + mrc p15, 0, r0, c1, c0, 0 @ read control register 183 + bic r0, r0, r5 @ clear bits them 184 + orr r0, r0, r6 @ set them 199 185 mov pc, lr @ return to head.S:__ret 200 186 201 187 /* ··· 195 199 * rrrr rrrx xxx0 0101 xxxx xxxx x111 xxxx < forced 196 200 * 0 110 0011 1.00 .111 1101 < we want 197 201 */ 198 - .type cr1_clear, #object 199 - .type cr1_set, #object 200 - cr1_clear: 201 - .word 0x0120c302 202 - cr1_set: 203 - .word 0x00c0387d 202 + .type v7_crval, #object 203 + v7_crval: 204 + crval clear=0x0120c302, mmuset=0x00c0387d, ucset=0x00c0187c 204 205 205 206 __v7_setup_stack: 206 207 .space 4 * 11 @ 11 registers
+8
arch/arm/plat-iop/time.c
··· 78 78 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, 79 79 }; 80 80 81 + static unsigned long iop_tick_rate; 82 + unsigned long get_iop_tick_rate(void) 83 + { 84 + return iop_tick_rate; 85 + } 86 + EXPORT_SYMBOL(get_iop_tick_rate); 87 + 81 88 void __init iop_init_time(unsigned long tick_rate) 82 89 { 83 90 u32 timer_ctl; ··· 92 85 ticks_per_jiffy = (tick_rate + HZ/2) / HZ; 93 86 ticks_per_usec = tick_rate / 1000000; 94 87 next_jiffy_time = 0xffffffff; 88 + iop_tick_rate = tick_rate; 95 89 96 90 timer_ctl = IOP_TMR_EN | IOP_TMR_PRIVILEGED | 97 91 IOP_TMR_RELOAD | IOP_TMR_RATIO_1_1;
+20
arch/arm/plat-mxc/Kconfig
··· 1 + if ARCH_MXC 2 + 3 + menu "Freescale MXC Implementations" 4 + 5 + choice 6 + prompt "MXC/iMX System Type" 7 + default 0 8 + 9 + config ARCH_MX3 10 + bool "MX3-based" 11 + help 12 + This enables support for systems based on the Freescale i.MX3 family 13 + 14 + endchoice 15 + 16 + source "arch/arm/mach-mx3/Kconfig" 17 + 18 + endmenu 19 + 20 + endif
+10
arch/arm/plat-mxc/Makefile
··· 1 + # 2 + # Makefile for the linux kernel. 3 + # 4 + 5 + # Common support 6 + obj-y := irq.o 7 + 8 + obj-m := 9 + obj-n := 10 + obj- :=
+83
arch/arm/plat-mxc/irq.c
··· 1 + /* 2 + * Copyright 2004-2007 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 + #include <linux/module.h> 12 + #include <linux/moduleparam.h> 13 + #include <linux/init.h> 14 + #include <linux/device.h> 15 + #include <linux/errno.h> 16 + #include <asm/hardware.h> 17 + #include <asm/io.h> 18 + #include <asm/irq.h> 19 + #include <asm/mach/irq.h> 20 + #include <asm/arch/common.h> 21 + 22 + /*! 23 + * Disable interrupt number "irq" in the AVIC 24 + * 25 + * @param irq interrupt source number 26 + */ 27 + static void mxc_mask_irq(unsigned int irq) 28 + { 29 + __raw_writel(irq, AVIC_INTDISNUM); 30 + } 31 + 32 + /*! 33 + * Enable interrupt number "irq" in the AVIC 34 + * 35 + * @param irq interrupt source number 36 + */ 37 + static void mxc_unmask_irq(unsigned int irq) 38 + { 39 + __raw_writel(irq, AVIC_INTENNUM); 40 + } 41 + 42 + static struct irq_chip mxc_avic_chip = { 43 + .mask_ack = mxc_mask_irq, 44 + .mask = mxc_mask_irq, 45 + .unmask = mxc_unmask_irq, 46 + }; 47 + 48 + /*! 49 + * This function initializes the AVIC hardware and disables all the 50 + * interrupts. It registers the interrupt enable and disable functions 51 + * to the kernel for each interrupt source. 52 + */ 53 + void __init mxc_init_irq(void) 54 + { 55 + int i; 56 + u32 reg; 57 + 58 + /* put the AVIC into the reset value with 59 + * all interrupts disabled 60 + */ 61 + __raw_writel(0, AVIC_INTCNTL); 62 + __raw_writel(0x1f, AVIC_NIMASK); 63 + 64 + /* disable all interrupts */ 65 + __raw_writel(0, AVIC_INTENABLEH); 66 + __raw_writel(0, AVIC_INTENABLEL); 67 + 68 + /* all IRQ no FIQ */ 69 + __raw_writel(0, AVIC_INTTYPEH); 70 + __raw_writel(0, AVIC_INTTYPEL); 71 + for (i = 0; i < MXC_MAX_INT_LINES; i++) { 72 + set_irq_chip(i, &mxc_avic_chip); 73 + set_irq_handler(i, handle_level_irq); 74 + set_irq_flags(i, IRQF_VALID); 75 + } 76 + 77 + /* Set WDOG2's interrupt the highest priority level (bit 28-31) */ 78 + reg = __raw_readl(AVIC_NIPRIORITY6); 79 + reg |= (0xF << 28); 80 + __raw_writel(reg, AVIC_NIPRIORITY6); 81 + 82 + printk(KERN_INFO "MXC IRQ initialized\n"); 83 + }
+104
arch/arm/plat-s3c/Kconfig
··· 1 + # arch/arm/plat-s3c/Kconfig 2 + # 3 + # Copyright 2007 Simtec Electronics 4 + # 5 + # Licensed under GPLv2 6 + 7 + config PLAT_S3C 8 + bool 9 + depends on ARCH_S3C2410 10 + default y if ARCH_S3C2410 11 + select NO_IOPORT 12 + help 13 + Base platform code for any Samsung S3C device 14 + 15 + # low-level serial option nodes 16 + 17 + config CPU_LLSERIAL_S3C2410_ONLY 18 + bool 19 + depends on ARCH_S3C2410 20 + default y if CPU_LLSERIAL_S3C2410 && !CPU_LLSERIAL_S3C2440 21 + 22 + config CPU_LLSERIAL_S3C2440_ONLY 23 + bool 24 + depends on ARCH_S3C2410 25 + default y if CPU_LLSERIAL_S3C2440 && !CPU_LLSERIAL_S3C2410 26 + 27 + config CPU_LLSERIAL_S3C2410 28 + bool 29 + depends on ARCH_S3C2410 30 + help 31 + Selected if there is an S3C2410 (or register compatible) serial 32 + low-level implementation needed 33 + 34 + config CPU_LLSERIAL_S3C2440 35 + bool 36 + depends on ARCH_S3C2410 37 + help 38 + Selected if there is an S3C2440 (or register compatible) serial 39 + low-level implementation needed 40 + 41 + # boot configurations 42 + 43 + comment "Boot options" 44 + 45 + config S3C_BOOT_WATCHDOG 46 + bool "S3C Initialisation watchdog" 47 + depends on PLAT_S3C && S3C2410_WATCHDOG 48 + help 49 + Say y to enable the watchdog during the kernel decompression 50 + stage. If the kernel fails to uncompress, then the watchdog 51 + will trigger a reset and the system should restart. 52 + 53 + config S3C_BOOT_ERROR_RESET 54 + bool "S3C Reboot on decompression error" 55 + depends on PLAT_S3C 56 + help 57 + Say y here to use the watchdog to reset the system if the 58 + kernel decompressor detects an error during decompression. 59 + 60 + comment "Power management" 61 + 62 + config S3C2410_PM_DEBUG 63 + bool "S3C2410 PM Suspend debug" 64 + depends on PLAT_S3C && PM 65 + help 66 + Say Y here if you want verbose debugging from the PM Suspend and 67 + Resume code. See <file:Documentation/arm/Samsung-S3C24XX/Suspend.txt> 68 + for more information. 69 + 70 + config S3C2410_PM_CHECK 71 + bool "S3C2410 PM Suspend Memory CRC" 72 + depends on PLAT_S3C && PM && CRC32 73 + help 74 + Enable the PM code's memory area checksum over sleep. This option 75 + will generate CRCs of all blocks of memory, and store them before 76 + going to sleep. The blocks are then checked on resume for any 77 + errors. 78 + 79 + Note, this can take several seconds depending on memory size 80 + and CPU speed. 81 + 82 + See <file:Documentation/arm/Samsung-S3C24XX/Suspend.txt> 83 + 84 + config S3C2410_PM_CHECK_CHUNKSIZE 85 + int "S3C2410 PM Suspend CRC Chunksize (KiB)" 86 + depends on PLAT_S3C && PM && S3C2410_PM_CHECK 87 + default 64 88 + help 89 + Set the chunksize in Kilobytes of the CRC for checking memory 90 + corruption over suspend and resume. A smaller value will mean that 91 + the CRC data block will take more memory, but wil identify any 92 + faults with better precision. 93 + 94 + See <file:Documentation/arm/Samsung-S3C24XX/Suspend.txt> 95 + 96 + config S3C_LOWLEVEL_UART_PORT 97 + int "S3C UART to use for low-level messages" 98 + depends on PLAT_S3C 99 + default 0 100 + help 101 + Choice of which UART port to use for the low-level messages, 102 + such as the `Uncompressing...` at start time. The value of 103 + this configuration should be between zero and two. The port 104 + must have been initialised by the boot-loader before use.
+1 -59
arch/arm/plat-s3c24xx/Kconfig
··· 10 10 default y if ARCH_S3C2410 11 11 select NO_IOPORT 12 12 help 13 - Base platform code for any Samsung S3C device 13 + Base platform code for any Samsung S3C24XX device 14 14 15 15 if PLAT_S3C24XX 16 16 ··· 25 25 help 26 26 Common power management code for systems that are 27 27 compatible with the Simtec style of power management 28 - 29 - config S3C2410_BOOT_WATCHDOG 30 - bool "S3C2410 Initialisation watchdog" 31 - depends on ARCH_S3C2410 && S3C2410_WATCHDOG 32 - help 33 - Say y to enable the watchdog during the kernel decompression 34 - stage. If the kernel fails to uncompress, then the watchdog 35 - will trigger a reset and the system should restart. 36 - 37 - config S3C2410_BOOT_ERROR_RESET 38 - bool "S3C2410 Reboot on decompression error" 39 - depends on ARCH_S3C2410 40 - help 41 - Say y here to use the watchdog to reset the system if the 42 - kernel decompressor detects an error during decompression. 43 - 44 - config S3C2410_PM_DEBUG 45 - bool "S3C2410 PM Suspend debug" 46 - depends on ARCH_S3C2410 && PM 47 - help 48 - Say Y here if you want verbose debugging from the PM Suspend and 49 - Resume code. See <file:Documentation/arm/Samsung-S3C24XX/Suspend.txt> 50 - for more information. 51 - 52 - config S3C2410_PM_CHECK 53 - bool "S3C2410 PM Suspend Memory CRC" 54 - depends on ARCH_S3C2410 && PM && CRC32 55 - help 56 - Enable the PM code's memory area checksum over sleep. This option 57 - will generate CRCs of all blocks of memory, and store them before 58 - going to sleep. The blocks are then checked on resume for any 59 - errors. 60 - 61 - Note, this can take several seconds depending on memory size 62 - and CPU speed. 63 - 64 - See <file:Documentation/arm/Samsung-S3C24XX/Suspend.txt> 65 - 66 - config S3C2410_PM_CHECK_CHUNKSIZE 67 - int "S3C2410 PM Suspend CRC Chunksize (KiB)" 68 - depends on ARCH_S3C2410 && PM && S3C2410_PM_CHECK 69 - default 64 70 - help 71 - Set the chunksize in Kilobytes of the CRC for checking memory 72 - corruption over suspend and resume. A smaller value will mean that 73 - the CRC data block will take more memory, but wil identify any 74 - faults with better precision. 75 - 76 - See <file:Documentation/arm/Samsung-S3C24XX/Suspend.txt> 77 - 78 - config S3C2410_LOWLEVEL_UART_PORT 79 - int "S3C2410 UART to use for low-level messages" 80 - default 0 81 - help 82 - Choice of which UART port to use for the low-level messages, 83 - such as the `Uncompressing...` at start time. The value of 84 - this configuration should be between zero and two. The port 85 - must have been initialised by the boot-loader before use. 86 28 87 29 config S3C2410_DMA 88 30 bool "S3C2410 DMA support"
+1 -1
arch/arm/plat-s3c24xx/common-smdk.c
··· 38 38 #include <asm/arch/regs-gpio.h> 39 39 #include <asm/arch/leds-gpio.h> 40 40 41 - #include <asm/arch/nand.h> 41 + #include <asm/plat-s3c/nand.h> 42 42 43 43 #include <asm/plat-s3c24xx/common-smdk.h> 44 44 #include <asm/plat-s3c24xx/devs.h>
+1 -1
arch/arm/plat-s3c24xx/cpu.c
··· 38 38 #include <asm/mach/map.h> 39 39 40 40 #include <asm/arch/regs-gpio.h> 41 - #include <asm/arch/regs-serial.h> 41 + #include <asm/plat-s3c/regs-serial.h> 42 42 43 43 #include <asm/plat-s3c24xx/cpu.h> 44 44 #include <asm/plat-s3c24xx/devs.h>
+3 -3
arch/arm/plat-s3c24xx/devs.c
··· 28 28 #include <asm/io.h> 29 29 #include <asm/irq.h> 30 30 31 - #include <asm/arch/regs-serial.h> 32 - #include <asm/arch/udc.h> 31 + #include <asm/plat-s3c/regs-serial.h> 32 + #include <asm/plat-s3c24xx/udc.h> 33 33 34 34 #include <asm/plat-s3c24xx/devs.h> 35 35 #include <asm/plat-s3c24xx/cpu.h> 36 - #include <asm/arch/regs-spi.h> 36 + #include <asm/plat-s3c24xx/regs-spi.h> 37 37 38 38 /* Serial port registrations */ 39 39
+1 -1
arch/arm/plat-s3c24xx/pm.c
··· 40 40 #include <asm/hardware.h> 41 41 #include <asm/io.h> 42 42 43 - #include <asm/arch/regs-serial.h> 43 + #include <asm/plat-s3c/regs-serial.h> 44 44 #include <asm/arch/regs-clock.h> 45 45 #include <asm/arch/regs-gpio.h> 46 46 #include <asm/arch/regs-mem.h>
+1 -2
arch/arm/plat-s3c24xx/s3c244x.c
··· 30 30 #include <asm/irq.h> 31 31 32 32 #include <asm/arch/regs-clock.h> 33 - #include <asm/arch/regs-serial.h> 33 + #include <asm/plat-s3c/regs-serial.h> 34 34 #include <asm/arch/regs-gpio.h> 35 35 #include <asm/arch/regs-gpioj.h> 36 36 #include <asm/arch/regs-dsc.h> ··· 47 47 IODESC_ENT(CLKPWR), 48 48 IODESC_ENT(TIMER), 49 49 IODESC_ENT(WATCHDOG), 50 - IODESC_ENT(LCD), 51 50 }; 52 51 53 52 /* uart initialisation */
+1 -1
arch/arm/plat-s3c24xx/sleep.S
··· 32 32 #include <asm/arch/regs-gpio.h> 33 33 #include <asm/arch/regs-clock.h> 34 34 #include <asm/arch/regs-mem.h> 35 - #include <asm/arch/regs-serial.h> 35 + #include <asm/plat-s3c/regs-serial.h> 36 36 37 37 /* CONFIG_DEBUG_RESUME is dangerous if your bootloader does not 38 38 * reset the UART configuration, only enable if you really need this!
+1 -1
arch/arm/plat-s3c24xx/time.c
··· 33 33 #include <asm/io.h> 34 34 #include <asm/irq.h> 35 35 #include <asm/arch/map.h> 36 - #include <asm/arch/regs-timer.h> 36 + #include <asm/plat-s3c/regs-timer.h> 37 37 #include <asm/arch/regs-irq.h> 38 38 #include <asm/mach/time.h> 39 39
+6 -6
arch/arm/vfp/vfphw.S
··· 74 74 75 75 VFPFMRX r1, FPEXC @ Is the VFP enabled? 76 76 DBGSTR1 "fpexc %08x", r1 77 - tst r1, #FPEXC_ENABLE 77 + tst r1, #FPEXC_EN 78 78 bne look_for_VFP_exceptions @ VFP is already enabled 79 79 80 80 DBGSTR1 "enable %x", r10 81 81 ldr r3, last_VFP_context_address 82 - orr r1, r1, #FPEXC_ENABLE @ user FPEXC has the enable bit set 82 + orr r1, r1, #FPEXC_EN @ user FPEXC has the enable bit set 83 83 ldr r4, [r3, r11, lsl #2] @ last_VFP_context pointer 84 - bic r5, r1, #FPEXC_EXCEPTION @ make sure exceptions are disabled 84 + bic r5, r1, #FPEXC_EX @ make sure exceptions are disabled 85 85 cmp r4, r10 86 86 beq check_for_exception @ we are returning to the same 87 87 @ process, so the registers are ··· 124 124 VFPFMXR FPSCR, r5 @ restore status 125 125 126 126 check_for_exception: 127 - tst r1, #FPEXC_EXCEPTION 127 + tst r1, #FPEXC_EX 128 128 bne process_exception @ might as well handle the pending 129 129 @ exception before retrying branch 130 130 @ out before setting an FPEXC that ··· 136 136 137 137 138 138 look_for_VFP_exceptions: 139 - tst r1, #FPEXC_EXCEPTION 139 + tst r1, #FPEXC_EX 140 140 bne process_exception 141 141 VFPFMRX r5, FPSCR 142 - tst r5, #FPSCR_IXE @ IXE doesn't set FPEXC_EXCEPTION ! 142 + tst r5, #FPSCR_IXE @ IXE doesn't set FPEXC_EX ! 143 143 bne process_exception 144 144 145 145 @ Fall into hand on to next handler - appropriate coproc instr
+6 -6
arch/arm/vfp/vfpmodule.c
··· 53 53 * case the thread migrates to a different CPU. The 54 54 * restoring is done lazily. 55 55 */ 56 - if ((fpexc & FPEXC_ENABLE) && last_VFP_context[cpu]) { 56 + if ((fpexc & FPEXC_EN) && last_VFP_context[cpu]) { 57 57 vfp_save_state(last_VFP_context[cpu], fpexc); 58 58 last_VFP_context[cpu]->hard.cpu = cpu; 59 59 } ··· 70 70 * Always disable VFP so we can lazily save/restore the 71 71 * old state. 72 72 */ 73 - fmxr(FPEXC, fpexc & ~FPEXC_ENABLE); 73 + fmxr(FPEXC, fpexc & ~FPEXC_EN); 74 74 return NOTIFY_DONE; 75 75 } 76 76 ··· 81 81 */ 82 82 memset(vfp, 0, sizeof(union vfp_state)); 83 83 84 - vfp->hard.fpexc = FPEXC_ENABLE; 84 + vfp->hard.fpexc = FPEXC_EN; 85 85 vfp->hard.fpscr = FPSCR_ROUND_NEAREST; 86 86 87 87 /* 88 88 * Disable VFP to ensure we initialise it first. 89 89 */ 90 - fmxr(FPEXC, fmrx(FPEXC) & ~FPEXC_ENABLE); 90 + fmxr(FPEXC, fmrx(FPEXC) & ~FPEXC_EN); 91 91 } 92 92 93 93 /* flush and release case: Per-thread VFP cleanup. */ ··· 229 229 /* 230 230 * Enable access to the VFP so we can handle the bounce. 231 231 */ 232 - fmxr(FPEXC, fpexc & ~(FPEXC_EXCEPTION|FPEXC_INV|FPEXC_UFC|FPEXC_IOC)); 232 + fmxr(FPEXC, fpexc & ~(FPEXC_EX|FPEXC_INV|FPEXC_UFC|FPEXC_IOC)); 233 233 234 234 orig_fpscr = fpscr = fmrx(FPSCR); 235 235 ··· 248 248 /* 249 249 * Modify fpscr to indicate the number of iterations remaining 250 250 */ 251 - if (fpexc & FPEXC_EXCEPTION) { 251 + if (fpexc & FPEXC_EX) { 252 252 u32 len; 253 253 254 254 len = fpexc + (1 << FPEXC_LENGTH_BIT);
+16
drivers/char/watchdog/Kconfig
··· 187 187 188 188 Say N if you are unsure. 189 189 190 + config IOP_WATCHDOG 191 + tristate "IOP Watchdog" 192 + depends on WATCHDOG && PLAT_IOP 193 + select WATCHDOG_NOWAYOUT if (ARCH_IOP32X || ARCH_IOP33X) 194 + help 195 + Say Y here if to include support for the watchdog timer 196 + in the Intel IOP3XX & IOP13XX I/O Processors. This driver can 197 + be built as a module by choosing M. The module will 198 + be called iop_wdt. 199 + 200 + Note: The IOP13XX watchdog does an Internal Bus Reset which will 201 + affect both cores and the peripherals of the IOP. The ATU-X 202 + and/or ATUe configuration registers will remain intact, but if 203 + operating as an Root Complex and/or Central Resource, the PCI-X 204 + and/or PCIe busses will also be reset. THIS IS A VERY BIG HAMMER. 205 + 190 206 # AVR32 Architecture 191 207 192 208 config AT32AP700X_WDT
+1
drivers/char/watchdog/Makefile
··· 35 35 obj-$(CONFIG_MPCORE_WATCHDOG) += mpcore_wdt.o 36 36 obj-$(CONFIG_EP93XX_WATCHDOG) += ep93xx_wdt.o 37 37 obj-$(CONFIG_PNX4008_WATCHDOG) += pnx4008_wdt.o 38 + obj-$(CONFIG_IOP_WATCHDOG) += iop_wdt.o 38 39 39 40 # AVR32 Architecture 40 41 obj-$(CONFIG_AT32AP700X_WDT) += at32ap700x_wdt.o
+262
drivers/char/watchdog/iop_wdt.c
··· 1 + /* 2 + * drivers/char/watchdog/iop_wdt.c 3 + * 4 + * WDT driver for Intel I/O Processors 5 + * Copyright (C) 2005, Intel Corporation. 6 + * 7 + * Based on ixp4xx driver, Copyright 2004 (c) MontaVista, Software, Inc. 8 + * 9 + * This program is free software; you can redistribute it and/or modify it 10 + * under the terms and conditions of the GNU General Public License, 11 + * version 2, as published by the Free Software Foundation. 12 + * 13 + * This program is distributed in the hope it will be useful, but WITHOUT 14 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 15 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 16 + * more details. 17 + * 18 + * You should have received a copy of the GNU General Public License along with 19 + * this program; if not, write to the Free Software Foundation, Inc., 59 Temple 20 + * Place - Suite 330, Boston, MA 02111-1307 USA. 21 + * 22 + * Curt E Bruns <curt.e.bruns@intel.com> 23 + * Peter Milne <peter.milne@d-tacq.com> 24 + * Dan Williams <dan.j.williams@intel.com> 25 + */ 26 + 27 + #include <linux/module.h> 28 + #include <linux/kernel.h> 29 + #include <linux/fs.h> 30 + #include <linux/init.h> 31 + #include <linux/device.h> 32 + #include <linux/miscdevice.h> 33 + #include <linux/watchdog.h> 34 + #include <linux/uaccess.h> 35 + #include <asm/hardware.h> 36 + 37 + static int nowayout = WATCHDOG_NOWAYOUT; 38 + static unsigned long wdt_status; 39 + static unsigned long boot_status; 40 + 41 + #define WDT_IN_USE 0 42 + #define WDT_OK_TO_CLOSE 1 43 + #define WDT_ENABLED 2 44 + 45 + static unsigned long iop_watchdog_timeout(void) 46 + { 47 + return (0xffffffffUL / get_iop_tick_rate()); 48 + } 49 + 50 + /** 51 + * wdt_supports_disable - determine if we are accessing a iop13xx watchdog 52 + * or iop3xx by whether it has a disable command 53 + */ 54 + static int wdt_supports_disable(void) 55 + { 56 + int can_disable; 57 + 58 + if (IOP_WDTCR_EN_ARM != IOP_WDTCR_DIS_ARM) 59 + can_disable = 1; 60 + else 61 + can_disable = 0; 62 + 63 + return can_disable; 64 + } 65 + 66 + static void wdt_enable(void) 67 + { 68 + /* Arm and enable the Timer to starting counting down from 0xFFFF.FFFF 69 + * Takes approx. 10.7s to timeout 70 + */ 71 + write_wdtcr(IOP_WDTCR_EN_ARM); 72 + write_wdtcr(IOP_WDTCR_EN); 73 + } 74 + 75 + /* returns 0 if the timer was successfully disabled */ 76 + static int wdt_disable(void) 77 + { 78 + /* Stop Counting */ 79 + if (wdt_supports_disable()) { 80 + write_wdtcr(IOP_WDTCR_DIS_ARM); 81 + write_wdtcr(IOP_WDTCR_DIS); 82 + clear_bit(WDT_ENABLED, &wdt_status); 83 + printk(KERN_INFO "WATCHDOG: Disabled\n"); 84 + return 0; 85 + } else 86 + return 1; 87 + } 88 + 89 + static int iop_wdt_open(struct inode *inode, struct file *file) 90 + { 91 + if (test_and_set_bit(WDT_IN_USE, &wdt_status)) 92 + return -EBUSY; 93 + 94 + clear_bit(WDT_OK_TO_CLOSE, &wdt_status); 95 + 96 + wdt_enable(); 97 + 98 + set_bit(WDT_ENABLED, &wdt_status); 99 + 100 + return nonseekable_open(inode, file); 101 + } 102 + 103 + static ssize_t 104 + iop_wdt_write(struct file *file, const char *data, size_t len, 105 + loff_t *ppos) 106 + { 107 + if (len) { 108 + if (!nowayout) { 109 + size_t i; 110 + 111 + clear_bit(WDT_OK_TO_CLOSE, &wdt_status); 112 + 113 + for (i = 0; i != len; i++) { 114 + char c; 115 + 116 + if (get_user(c, data + i)) 117 + return -EFAULT; 118 + if (c == 'V') 119 + set_bit(WDT_OK_TO_CLOSE, &wdt_status); 120 + } 121 + } 122 + wdt_enable(); 123 + } 124 + 125 + return len; 126 + } 127 + 128 + static struct watchdog_info ident = { 129 + .options = WDIOF_CARDRESET | WDIOF_MAGICCLOSE | WDIOF_KEEPALIVEPING, 130 + .identity = "iop watchdog", 131 + }; 132 + 133 + static int 134 + iop_wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, 135 + unsigned long arg) 136 + { 137 + int options; 138 + int ret = -ENOTTY; 139 + 140 + switch (cmd) { 141 + case WDIOC_GETSUPPORT: 142 + if (copy_to_user 143 + ((struct watchdog_info *)arg, &ident, sizeof ident)) 144 + ret = -EFAULT; 145 + else 146 + ret = 0; 147 + break; 148 + 149 + case WDIOC_GETSTATUS: 150 + ret = put_user(0, (int *)arg); 151 + break; 152 + 153 + case WDIOC_GETBOOTSTATUS: 154 + ret = put_user(boot_status, (int *)arg); 155 + break; 156 + 157 + case WDIOC_GETTIMEOUT: 158 + ret = put_user(iop_watchdog_timeout(), (int *)arg); 159 + break; 160 + 161 + case WDIOC_KEEPALIVE: 162 + wdt_enable(); 163 + ret = 0; 164 + break; 165 + 166 + case WDIOC_SETOPTIONS: 167 + if (get_user(options, (int *)arg)) 168 + return -EFAULT; 169 + 170 + if (options & WDIOS_DISABLECARD) { 171 + if (!nowayout) { 172 + if (wdt_disable() == 0) { 173 + set_bit(WDT_OK_TO_CLOSE, &wdt_status); 174 + ret = 0; 175 + } else 176 + ret = -ENXIO; 177 + } else 178 + ret = 0; 179 + } 180 + 181 + if (options & WDIOS_ENABLECARD) { 182 + wdt_enable(); 183 + ret = 0; 184 + } 185 + break; 186 + } 187 + 188 + return ret; 189 + } 190 + 191 + static int iop_wdt_release(struct inode *inode, struct file *file) 192 + { 193 + int state = 1; 194 + if (test_bit(WDT_OK_TO_CLOSE, &wdt_status)) 195 + if (test_bit(WDT_ENABLED, &wdt_status)) 196 + state = wdt_disable(); 197 + 198 + /* if the timer is not disbaled reload and notify that we are still 199 + * going down 200 + */ 201 + if (state != 0) { 202 + wdt_enable(); 203 + printk(KERN_CRIT "WATCHDOG: Device closed unexpectedly - " 204 + "reset in %lu seconds\n", iop_watchdog_timeout()); 205 + } 206 + 207 + clear_bit(WDT_IN_USE, &wdt_status); 208 + clear_bit(WDT_OK_TO_CLOSE, &wdt_status); 209 + 210 + return 0; 211 + } 212 + 213 + static const struct file_operations iop_wdt_fops = { 214 + .owner = THIS_MODULE, 215 + .llseek = no_llseek, 216 + .write = iop_wdt_write, 217 + .ioctl = iop_wdt_ioctl, 218 + .open = iop_wdt_open, 219 + .release = iop_wdt_release, 220 + }; 221 + 222 + static struct miscdevice iop_wdt_miscdev = { 223 + .minor = WATCHDOG_MINOR, 224 + .name = "watchdog", 225 + .fops = &iop_wdt_fops, 226 + }; 227 + 228 + static int __init iop_wdt_init(void) 229 + { 230 + int ret; 231 + 232 + ret = misc_register(&iop_wdt_miscdev); 233 + if (ret == 0) 234 + printk("iop watchdog timer: timeout %lu sec\n", 235 + iop_watchdog_timeout()); 236 + 237 + /* check if the reset was caused by the watchdog timer */ 238 + boot_status = (read_rcsr() & IOP_RCSR_WDT) ? WDIOF_CARDRESET : 0; 239 + 240 + /* Configure Watchdog Timeout to cause an Internal Bus (IB) Reset 241 + * NOTE: An IB Reset will Reset both cores in the IOP342 242 + */ 243 + write_wdtsr(IOP13XX_WDTCR_IB_RESET); 244 + 245 + return ret; 246 + } 247 + 248 + static void __exit iop_wdt_exit(void) 249 + { 250 + misc_deregister(&iop_wdt_miscdev); 251 + } 252 + 253 + module_init(iop_wdt_init); 254 + module_exit(iop_wdt_exit); 255 + 256 + module_param(nowayout, int, 0); 257 + MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started"); 258 + 259 + MODULE_AUTHOR("Curt E Bruns <curt.e.bruns@intel.com>"); 260 + MODULE_DESCRIPTION("iop watchdog timer driver"); 261 + MODULE_LICENSE("GPL"); 262 + MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
+1 -2
drivers/net/arm/ether1.c
··· 36 36 #include <linux/types.h> 37 37 #include <linux/fcntl.h> 38 38 #include <linux/interrupt.h> 39 - #include <linux/ptrace.h> 40 39 #include <linux/ioport.h> 41 40 #include <linux/in.h> 42 41 #include <linux/slab.h> ··· 74 75 75 76 /* ------------------------------------------------------------------------- */ 76 77 77 - static char version[] __initdata = "ether1 ethernet driver (c) 2000 Russell King v1.07\n"; 78 + static char version[] __devinitdata = "ether1 ethernet driver (c) 2000 Russell King v1.07\n"; 78 79 79 80 #define BUS_16 16 80 81 #define BUS_8 8
+1 -2
drivers/net/arm/ether3.c
··· 51 51 #include <linux/types.h> 52 52 #include <linux/fcntl.h> 53 53 #include <linux/interrupt.h> 54 - #include <linux/ptrace.h> 55 54 #include <linux/ioport.h> 56 55 #include <linux/in.h> 57 56 #include <linux/slab.h> ··· 68 69 #include <asm/ecard.h> 69 70 #include <asm/io.h> 70 71 71 - static char version[] __initdata = "ether3 ethernet driver (c) 1995-2000 R.M.King v1.17\n"; 72 + static char version[] __devinitdata = "ether3 ethernet driver (c) 1995-2000 R.M.King v1.17\n"; 72 73 73 74 #include "ether3.h" 74 75
-1
drivers/net/arm/etherh.c
··· 31 31 #include <linux/types.h> 32 32 #include <linux/fcntl.h> 33 33 #include <linux/interrupt.h> 34 - #include <linux/ptrace.h> 35 34 #include <linux/ioport.h> 36 35 #include <linux/in.h> 37 36 #include <linux/slab.h>
+101 -108
drivers/scsi/arm/cumana_1.c
··· 24 24 25 25 #define CUMANASCSI_PUBLIC_RELEASE 1 26 26 27 - #define NCR5380_implementation_fields int port, ctrl 27 + #define priv(host) ((struct NCR5380_hostdata *)(host)->hostdata) 28 28 #define NCR5380_local_declare() struct Scsi_Host *_instance 29 29 #define NCR5380_setup(instance) _instance = instance 30 30 #define NCR5380_read(reg) cumanascsi_read(_instance, reg) ··· 32 32 #define NCR5380_intr cumanascsi_intr 33 33 #define NCR5380_queue_command cumanascsi_queue_command 34 34 #define NCR5380_proc_info cumanascsi_proc_info 35 + 36 + #define NCR5380_implementation_fields \ 37 + unsigned ctrl; \ 38 + void __iomem *base; \ 39 + void __iomem *dma 35 40 36 41 #define BOARD_NORMAL 0 37 42 #define BOARD_NCR53C400 1 ··· 52 47 return ""; 53 48 } 54 49 55 - #ifdef NOT_EFFICIENT 56 - #define CTRL(p,v) outb(*ctrl = (v), (p) - 577) 57 - #define STAT(p) inb((p)+1) 58 - #define IN(p) inb((p)) 59 - #define OUT(v,p) outb((v), (p)) 60 - #else 61 - #define CTRL(p,v) (p[-2308] = (*ctrl = (v))) 62 - #define STAT(p) (p[4]) 63 - #define IN(p) (*(p)) 64 - #define IN2(p) ((unsigned short)(*(volatile unsigned long *)(p))) 65 - #define OUT(v,p) (*(p) = (v)) 66 - #define OUT2(v,p) (*((volatile unsigned long *)(p)) = (v)) 67 - #endif 68 - #define L(v) (((v)<<16)|((v) & 0x0000ffff)) 69 - #define H(v) (((v)>>16)|((v) & 0xffff0000)) 50 + #define CTRL 0x16fc 51 + #define STAT 0x2004 52 + #define L(v) (((v)<<16)|((v) & 0x0000ffff)) 53 + #define H(v) (((v)>>16)|((v) & 0xffff0000)) 70 54 71 55 static inline int 72 - NCR5380_pwrite(struct Scsi_Host *instance, unsigned char *addr, int len) 56 + NCR5380_pwrite(struct Scsi_Host *host, unsigned char *addr, int len) 73 57 { 74 - int *ctrl = &((struct NCR5380_hostdata *)instance->hostdata)->ctrl; 75 - int oldctrl = *ctrl; 76 58 unsigned long *laddr; 77 - #ifdef NOT_EFFICIENT 78 - int iobase = instance->io_port; 79 - int dma_io = iobase & ~(0x3C0000>>2); 80 - #else 81 - volatile unsigned char *iobase = (unsigned char *)ioaddr(instance->io_port); 82 - volatile unsigned char *dma_io = (unsigned char *)((int)iobase & ~0x3C0000); 83 - #endif 59 + void __iomem *dma = priv(host)->dma + 0x2000; 84 60 85 61 if(!len) return 0; 86 62 87 - CTRL(iobase, 0x02); 63 + writeb(0x02, priv(host)->base + CTRL); 88 64 laddr = (unsigned long *)addr; 89 65 while(len >= 32) 90 66 { 91 - int status; 67 + unsigned int status; 92 68 unsigned long v; 93 - status = STAT(iobase); 69 + status = readb(priv(host)->base + STAT); 94 70 if(status & 0x80) 95 71 goto end; 96 72 if(!(status & 0x40)) 97 73 continue; 98 - v=*laddr++; OUT2(L(v),dma_io); OUT2(H(v),dma_io); 99 - v=*laddr++; OUT2(L(v),dma_io); OUT2(H(v),dma_io); 100 - v=*laddr++; OUT2(L(v),dma_io); OUT2(H(v),dma_io); 101 - v=*laddr++; OUT2(L(v),dma_io); OUT2(H(v),dma_io); 102 - v=*laddr++; OUT2(L(v),dma_io); OUT2(H(v),dma_io); 103 - v=*laddr++; OUT2(L(v),dma_io); OUT2(H(v),dma_io); 104 - v=*laddr++; OUT2(L(v),dma_io); OUT2(H(v),dma_io); 105 - v=*laddr++; OUT2(L(v),dma_io); OUT2(H(v),dma_io); 74 + v=*laddr++; writew(L(v), dma); writew(H(v), dma); 75 + v=*laddr++; writew(L(v), dma); writew(H(v), dma); 76 + v=*laddr++; writew(L(v), dma); writew(H(v), dma); 77 + v=*laddr++; writew(L(v), dma); writew(H(v), dma); 78 + v=*laddr++; writew(L(v), dma); writew(H(v), dma); 79 + v=*laddr++; writew(L(v), dma); writew(H(v), dma); 80 + v=*laddr++; writew(L(v), dma); writew(H(v), dma); 81 + v=*laddr++; writew(L(v), dma); writew(H(v), dma); 106 82 len -= 32; 107 83 if(len == 0) 108 84 break; 109 85 } 110 86 111 87 addr = (unsigned char *)laddr; 112 - CTRL(iobase, 0x12); 88 + writeb(0x12, priv(host)->base + CTRL); 89 + 113 90 while(len > 0) 114 91 { 115 - int status; 116 - status = STAT(iobase); 92 + unsigned int status; 93 + status = readb(priv(host)->base + STAT); 117 94 if(status & 0x80) 118 95 goto end; 119 96 if(status & 0x40) 120 97 { 121 - OUT(*addr++, dma_io); 98 + writeb(*addr++, dma); 122 99 if(--len == 0) 123 100 break; 124 101 } 125 102 126 - status = STAT(iobase); 103 + status = readb(priv(host)->base + STAT); 127 104 if(status & 0x80) 128 105 goto end; 129 106 if(status & 0x40) 130 107 { 131 - OUT(*addr++, dma_io); 108 + writeb(*addr++, dma); 132 109 if(--len == 0) 133 110 break; 134 111 } 135 112 } 136 113 end: 137 - CTRL(iobase, oldctrl|0x40); 114 + writeb(priv(host)->ctrl | 0x40, priv(host)->base + CTRL); 138 115 return len; 139 116 } 140 117 141 118 static inline int 142 - NCR5380_pread(struct Scsi_Host *instance, unsigned char *addr, int len) 119 + NCR5380_pread(struct Scsi_Host *host, unsigned char *addr, int len) 143 120 { 144 - int *ctrl = &((struct NCR5380_hostdata *)instance->hostdata)->ctrl; 145 - int oldctrl = *ctrl; 146 121 unsigned long *laddr; 147 - #ifdef NOT_EFFICIENT 148 - int iobase = instance->io_port; 149 - int dma_io = iobase & ~(0x3C0000>>2); 150 - #else 151 - volatile unsigned char *iobase = (unsigned char *)ioaddr(instance->io_port); 152 - volatile unsigned char *dma_io = (unsigned char *)((int)iobase & ~0x3C0000); 153 - #endif 122 + void __iomem *dma = priv(host)->dma + 0x2000; 154 123 155 124 if(!len) return 0; 156 125 157 - CTRL(iobase, 0x00); 126 + writeb(0x00, priv(host)->base + CTRL); 158 127 laddr = (unsigned long *)addr; 159 128 while(len >= 32) 160 129 { 161 - int status; 162 - status = STAT(iobase); 130 + unsigned int status; 131 + status = readb(priv(host)->base + STAT); 163 132 if(status & 0x80) 164 133 goto end; 165 134 if(!(status & 0x40)) 166 135 continue; 167 - *laddr++ = IN2(dma_io)|(IN2(dma_io)<<16); 168 - *laddr++ = IN2(dma_io)|(IN2(dma_io)<<16); 169 - *laddr++ = IN2(dma_io)|(IN2(dma_io)<<16); 170 - *laddr++ = IN2(dma_io)|(IN2(dma_io)<<16); 171 - *laddr++ = IN2(dma_io)|(IN2(dma_io)<<16); 172 - *laddr++ = IN2(dma_io)|(IN2(dma_io)<<16); 173 - *laddr++ = IN2(dma_io)|(IN2(dma_io)<<16); 174 - *laddr++ = IN2(dma_io)|(IN2(dma_io)<<16); 136 + *laddr++ = readw(dma) | (readw(dma) << 16); 137 + *laddr++ = readw(dma) | (readw(dma) << 16); 138 + *laddr++ = readw(dma) | (readw(dma) << 16); 139 + *laddr++ = readw(dma) | (readw(dma) << 16); 140 + *laddr++ = readw(dma) | (readw(dma) << 16); 141 + *laddr++ = readw(dma) | (readw(dma) << 16); 142 + *laddr++ = readw(dma) | (readw(dma) << 16); 143 + *laddr++ = readw(dma) | (readw(dma) << 16); 175 144 len -= 32; 176 145 if(len == 0) 177 146 break; 178 147 } 179 148 180 149 addr = (unsigned char *)laddr; 181 - CTRL(iobase, 0x10); 150 + writeb(0x10, priv(host)->base + CTRL); 151 + 182 152 while(len > 0) 183 153 { 184 - int status; 185 - status = STAT(iobase); 154 + unsigned int status; 155 + status = readb(priv(host)->base + STAT); 186 156 if(status & 0x80) 187 157 goto end; 188 158 if(status & 0x40) 189 159 { 190 - *addr++ = IN(dma_io); 160 + *addr++ = readb(dma); 191 161 if(--len == 0) 192 162 break; 193 163 } 194 164 195 - status = STAT(iobase); 165 + status = readb(priv(host)->base + STAT); 196 166 if(status & 0x80) 197 167 goto end; 198 168 if(status & 0x40) 199 169 { 200 - *addr++ = IN(dma_io); 170 + *addr++ = readb(dma); 201 171 if(--len == 0) 202 172 break; 203 173 } 204 174 } 205 175 end: 206 - CTRL(iobase, oldctrl|0x40); 176 + writeb(priv(host)->ctrl | 0x40, priv(host)->base + CTRL); 207 177 return len; 208 178 } 209 179 210 - #undef STAT 211 - #undef CTRL 212 - #undef IN 213 - #undef OUT 214 - 215 - #define CTRL(p,v) outb(*ctrl = (v), (p) - 577) 216 - 217 - static char cumanascsi_read(struct Scsi_Host *instance, int reg) 180 + static unsigned char cumanascsi_read(struct Scsi_Host *host, unsigned int reg) 218 181 { 219 - unsigned int iobase = instance->io_port; 220 - int i; 221 - int *ctrl = &((struct NCR5380_hostdata *)instance->hostdata)->ctrl; 182 + void __iomem *base = priv(host)->base; 183 + unsigned char val; 222 184 223 - CTRL(iobase, 0); 224 - i = inb(iobase + 64 + reg); 225 - CTRL(iobase, 0x40); 185 + writeb(0, base + CTRL); 226 186 227 - return i; 187 + val = readb(base + 0x2100 + (reg << 2)); 188 + 189 + priv(host)->ctrl = 0x40; 190 + writeb(0x40, base + CTRL); 191 + 192 + return val; 228 193 } 229 194 230 - static void cumanascsi_write(struct Scsi_Host *instance, int reg, int value) 195 + static void cumanascsi_write(struct Scsi_Host *host, unsigned int reg, unsigned int value) 231 196 { 232 - int iobase = instance->io_port; 233 - int *ctrl = &((struct NCR5380_hostdata *)instance->hostdata)->ctrl; 197 + void __iomem *base = priv(host)->base; 234 198 235 - CTRL(iobase, 0); 236 - outb(value, iobase + 64 + reg); 237 - CTRL(iobase, 0x40); 199 + writeb(0, base + CTRL); 200 + 201 + writeb(value, base + 0x2100 + (reg << 2)); 202 + 203 + priv(host)->ctrl = 0x40; 204 + writeb(0x40, base + CTRL); 238 205 } 239 - 240 - #undef CTRL 241 206 242 207 #include "../NCR5380.c" 243 208 ··· 231 256 cumanascsi1_probe(struct expansion_card *ec, const struct ecard_id *id) 232 257 { 233 258 struct Scsi_Host *host; 234 - int ret = -ENOMEM; 259 + int ret; 235 260 236 - host = scsi_host_alloc(&cumanascsi_template, sizeof(struct NCR5380_hostdata)); 237 - if (!host) 261 + ret = ecard_request_resources(ec); 262 + if (ret) 238 263 goto out; 239 264 240 - host->io_port = ecard_address(ec, ECARD_IOC, ECARD_SLOW) + 0x800; 265 + host = scsi_host_alloc(&cumanascsi_template, sizeof(struct NCR5380_hostdata)); 266 + if (!host) { 267 + ret = -ENOMEM; 268 + goto out_release; 269 + } 270 + 271 + priv(host)->base = ioremap(ecard_resource_start(ec, ECARD_RES_IOCSLOW), 272 + ecard_resource_len(ec, ECARD_RES_IOCSLOW)); 273 + priv(host)->dma = ioremap(ecard_resource_start(ec, ECARD_RES_MEMC), 274 + ecard_resource_len(ec, ECARD_RES_MEMC)); 275 + if (!priv(host)->base || !priv(host)->dma) { 276 + ret = -ENOMEM; 277 + goto out_unmap; 278 + } 279 + 241 280 host->irq = ec->irq; 242 281 243 282 NCR5380_init(host, 0); 244 283 284 + priv(host)->ctrl = 0; 285 + writeb(0, priv(host)->base + CTRL); 286 + 245 287 host->n_io_port = 255; 246 288 if (!(request_region(host->io_port, host->n_io_port, "CumanaSCSI-1"))) { 247 289 ret = -EBUSY; 248 - goto out_free; 290 + goto out_unmap; 249 291 } 250 - 251 - ((struct NCR5380_hostdata *)host->hostdata)->ctrl = 0; 252 - outb(0x00, host->io_port - 577); 253 292 254 293 ret = request_irq(host->irq, cumanascsi_intr, IRQF_DISABLED, 255 294 "CumanaSCSI-1", host); 256 295 if (ret) { 257 296 printk("scsi%d: IRQ%d not free: %d\n", 258 297 host->host_no, host->irq, ret); 259 - goto out_release; 298 + goto out_unmap; 260 299 } 261 300 262 301 printk("scsi%d: at port 0x%08lx irq %d", ··· 290 301 291 302 out_free_irq: 292 303 free_irq(host->irq, host); 293 - out_release: 294 - release_region(host->io_port, host->n_io_port); 295 - out_free: 304 + out_unmap: 305 + iounmap(priv(host)->base); 306 + iounmap(priv(host)->dma); 296 307 scsi_host_put(host); 308 + out_release: 309 + ecard_release_resources(ec); 297 310 out: 298 311 return ret; 299 312 } ··· 309 318 scsi_remove_host(host); 310 319 free_irq(host->irq, host); 311 320 NCR5380_exit(host); 312 - release_region(host->io_port, host->n_io_port); 321 + iounmap(priv(host)->base); 322 + iounmap(priv(host)->dma); 313 323 scsi_host_put(host); 324 + ecard_release_resources(ec); 314 325 } 315 326 316 327 static const struct ecard_id cumanascsi1_cids[] = {
+42 -112
drivers/scsi/arm/ecoscsi.c
··· 34 34 #include "../scsi.h" 35 35 #include <scsi/scsi_host.h> 36 36 37 - #define NCR5380_implementation_fields int port, ctrl 38 - #define NCR5380_local_declare() struct Scsi_Host *_instance 39 - #define NCR5380_setup(instance) _instance = instance 37 + #define priv(host) ((struct NCR5380_hostdata *)(host)->hostdata) 40 38 41 - #define NCR5380_read(reg) ecoscsi_read(_instance, reg) 42 - #define NCR5380_write(reg, value) ecoscsi_write(_instance, reg, value) 39 + #define NCR5380_local_declare() void __iomem *_base 40 + #define NCR5380_setup(host) _base = priv(host)->base 41 + 42 + #define NCR5380_read(reg) ({ writeb(reg | 8, _base); readb(_base + 4); }) 43 + #define NCR5380_write(reg, value) ({ writeb(reg | 8, _base); writeb(value, _base + 4); }) 43 44 44 45 #define NCR5380_intr ecoscsi_intr 45 46 #define NCR5380_queue_command ecoscsi_queue_command 46 47 #define NCR5380_proc_info ecoscsi_proc_info 47 48 49 + #define NCR5380_implementation_fields \ 50 + void __iomem *base 51 + 48 52 #include "../NCR5380.h" 49 53 50 54 #define ECOSCSI_PUBLIC_RELEASE 1 51 - 52 - static char ecoscsi_read(struct Scsi_Host *instance, int reg) 53 - { 54 - int iobase = instance->io_port; 55 - outb(reg | 8, iobase); 56 - return inb(iobase + 1); 57 - } 58 - 59 - static void ecoscsi_write(struct Scsi_Host *instance, int reg, int value) 60 - { 61 - int iobase = instance->io_port; 62 - outb(reg | 8, iobase); 63 - outb(value, iobase + 1); 64 - } 65 55 66 56 /* 67 57 * Function : ecoscsi_setup(char *str, int *ints) ··· 71 81 { 72 82 return ""; 73 83 } 74 - 75 - #if 0 76 - #define STAT(p) inw(p + 144) 77 - 78 - static inline int NCR5380_pwrite(struct Scsi_Host *host, unsigned char *addr, 79 - int len) 80 - { 81 - int iobase = host->io_port; 82 - printk("writing %p len %d\n",addr, len); 83 - if(!len) return -1; 84 - 85 - while(1) 86 - { 87 - int status; 88 - while(((status = STAT(iobase)) & 0x100)==0); 89 - } 90 - } 91 - 92 - static inline int NCR5380_pread(struct Scsi_Host *host, unsigned char *addr, 93 - int len) 94 - { 95 - int iobase = host->io_port; 96 - int iobase2= host->io_port + 0x100; 97 - unsigned char *start = addr; 98 - int s; 99 - printk("reading %p len %d\n",addr, len); 100 - outb(inb(iobase + 128), iobase + 135); 101 - while(len > 0) 102 - { 103 - int status,b,i, timeout; 104 - timeout = 0x07FFFFFF; 105 - while(((status = STAT(iobase)) & 0x100)==0) 106 - { 107 - timeout--; 108 - if(status & 0x200 || !timeout) 109 - { 110 - printk("status = %p\n",status); 111 - outb(0, iobase + 135); 112 - return 1; 113 - } 114 - } 115 - if(len >= 128) 116 - { 117 - for(i=0; i<64; i++) 118 - { 119 - b = inw(iobase + 136); 120 - *addr++ = b; 121 - *addr++ = b>>8; 122 - } 123 - len -= 128; 124 - } 125 - else 126 - { 127 - b = inw(iobase + 136); 128 - *addr ++ = b; 129 - len -= 1; 130 - if(len) 131 - *addr ++ = b>>8; 132 - len -= 1; 133 - } 134 - } 135 - outb(0, iobase + 135); 136 - printk("first bytes = %02X %02X %02X %20X %02X %02X %02X\n",*start, start[1], start[2], start[3], start[4], start[5], start[6]); 137 - return 1; 138 - } 139 - #endif 140 - #undef STAT 141 84 142 85 #define BOARD_NORMAL 0 143 86 #define BOARD_NCR53C400 1 ··· 96 173 97 174 static int __init ecoscsi_init(void) 98 175 { 176 + void __iomem *_base; 177 + int ret; 178 + 179 + if (!request_mem_region(0x33a0000, 4096, "ecoscsi")) { 180 + ret = -EBUSY; 181 + goto out; 182 + } 183 + 184 + _base = ioremap(0x33a0000, 4096); 185 + if (!_base) { 186 + ret = -ENOMEM; 187 + goto out_release; 188 + } 189 + 190 + NCR5380_write(MODE_REG, 0x20); /* Is it really SCSI? */ 191 + if (NCR5380_read(MODE_REG) != 0x20) /* Write to a reg. */ 192 + goto out_unmap; 193 + 194 + NCR5380_write(MODE_REG, 0x00); /* it back. */ 195 + if (NCR5380_read(MODE_REG) != 0x00) 196 + goto out_unmap; 99 197 100 198 host = scsi_host_alloc(tpnt, sizeof(struct NCR5380_hostdata)); 101 - if (!host) 102 - return 0; 199 + if (!host) { 200 + ret = -ENOMEM; 201 + goto out_unmap; 202 + } 103 203 104 - host->io_port = 0x80ce8000; 105 - host->n_io_port = 144; 204 + priv(host)->base = _base; 106 205 host->irq = IRQ_NONE; 107 - 108 - if (!(request_region(host->io_port, host->n_io_port, "ecoscsi")) ) 109 - goto unregister_scsi; 110 - 111 - ecoscsi_write(host, MODE_REG, 0x20); /* Is it really SCSI? */ 112 - if (ecoscsi_read(host, MODE_REG) != 0x20) /* Write to a reg. */ 113 - goto release_reg; 114 - 115 - ecoscsi_write(host, MODE_REG, 0x00 ); /* it back. */ 116 - if (ecoscsi_read(host, MODE_REG) != 0x00) 117 - goto release_reg; 118 206 119 207 NCR5380_init(host, 0); 120 208 ··· 140 206 scsi_scan_host(host); 141 207 return 0; 142 208 143 - release_reg: 144 - release_region(host->io_port, host->n_io_port); 145 - unregister_scsi: 146 - scsi_host_put(host); 147 - return -ENODEV; 209 + out_unmap: 210 + iounmap(_base); 211 + out_release: 212 + release_mem_region(0x33a0000, 4096); 213 + out: 214 + return ret; 148 215 } 149 216 150 217 static void __exit ecoscsi_exit(void) 151 218 { 152 219 scsi_remove_host(host); 153 - 154 - if (shpnt->irq != IRQ_NONE) 155 - free_irq(shpnt->irq, NULL); 156 220 NCR5380_exit(host); 157 - if (shpnt->io_port) 158 - release_region(shpnt->io_port, shpnt->n_io_port); 159 - 160 221 scsi_host_put(host); 222 + release_mem_region(0x33a0000, 4096); 161 223 return 0; 162 224 } 163 225
+44 -30
drivers/scsi/arm/oak.c
··· 23 23 24 24 #define OAKSCSI_PUBLIC_RELEASE 1 25 25 26 - #define NCR5380_read(reg) oakscsi_read(_instance, reg) 27 - #define NCR5380_write(reg, value) oakscsi_write(_instance, reg, value) 26 + #define priv(host) ((struct NCR5380_hostdata *)(host)->hostdata) 27 + #define NCR5380_local_declare() void __iomem *_base 28 + #define NCR5380_setup(host) _base = priv(host)->base 29 + 30 + #define NCR5380_read(reg) readb(_base + ((reg) << 2)) 31 + #define NCR5380_write(reg, value) writeb(value, _base + ((reg) << 2)) 28 32 #define NCR5380_intr oakscsi_intr 29 33 #define NCR5380_queue_command oakscsi_queue_command 30 34 #define NCR5380_proc_info oakscsi_proc_info 31 35 32 - #define NCR5380_implementation_fields int port, ctrl 33 - #define NCR5380_local_declare() struct Scsi_Host *_instance 34 - #define NCR5380_setup(instance) _instance = instance 36 + #define NCR5380_implementation_fields \ 37 + void __iomem *base 35 38 36 39 #define BOARD_NORMAL 0 37 40 #define BOARD_NCR53C400 1 ··· 42 39 #include "../NCR5380.h" 43 40 44 41 #undef START_DMA_INITIATOR_RECEIVE_REG 45 - #define START_DMA_INITIATOR_RECEIVE_REG (7 + 128) 42 + #define START_DMA_INITIATOR_RECEIVE_REG (128 + 7) 46 43 47 44 const char * oakscsi_info (struct Scsi_Host *spnt) 48 45 { 49 46 return ""; 50 47 } 51 48 52 - #define STAT(p) inw(p + 144) 53 - extern void inswb(int from, void *to, int len); 49 + #define STAT ((128 + 16) << 2) 50 + #define DATA ((128 + 8) << 2) 54 51 55 52 static inline int NCR5380_pwrite(struct Scsi_Host *instance, unsigned char *addr, 56 53 int len) 57 54 { 58 - int iobase = instance->io_port; 55 + void __iomem *base = priv(instance)->base; 56 + 59 57 printk("writing %p len %d\n",addr, len); 60 58 if(!len) return -1; 61 59 62 60 while(1) 63 61 { 64 62 int status; 65 - while(((status = STAT(iobase)) & 0x100)==0); 63 + while (((status = readw(base + STAT)) & 0x100)==0); 66 64 } 67 65 } 68 66 69 67 static inline int NCR5380_pread(struct Scsi_Host *instance, unsigned char *addr, 70 68 int len) 71 69 { 72 - int iobase = instance->io_port; 70 + void __iomem *base = priv(instance)->base; 73 71 printk("reading %p len %d\n", addr, len); 74 72 while(len > 0) 75 73 { 76 - int status, timeout; 74 + unsigned int status, timeout; 77 75 unsigned long b; 78 76 79 77 timeout = 0x01FFFFFF; 80 78 81 - while(((status = STAT(iobase)) & 0x100)==0) 79 + while (((status = readw(base + STAT)) & 0x100)==0) 82 80 { 83 81 timeout--; 84 82 if(status & 0x200 || !timeout) 85 83 { 86 - printk("status = %08X\n",status); 84 + printk("status = %08X\n", status); 87 85 return 1; 88 86 } 89 87 } 88 + 90 89 if(len >= 128) 91 90 { 92 - inswb(iobase + 136, addr, 128); 91 + readsw(base + DATA, addr, 128); 93 92 addr += 128; 94 93 len -= 128; 95 94 } 96 95 else 97 96 { 98 - b = (unsigned long) inw(iobase + 136); 97 + b = (unsigned long) readw(base + DATA); 99 98 *addr ++ = b; 100 99 len -= 1; 101 100 if(len) ··· 108 103 return 0; 109 104 } 110 105 111 - #define oakscsi_read(instance,reg) (inb((instance)->io_port + (reg))) 112 - #define oakscsi_write(instance,reg,val) (outb((val), (instance)->io_port + (reg))) 113 - 114 106 #undef STAT 107 + #undef DATA 115 108 116 109 #include "../NCR5380.c" 117 110 ··· 135 132 struct Scsi_Host *host; 136 133 int ret = -ENOMEM; 137 134 138 - host = scsi_host_alloc(&oakscsi_template, sizeof(struct NCR5380_hostdata)); 139 - if (!host) 135 + ret = ecard_request_resources(ec); 136 + if (ret) 140 137 goto out; 141 138 142 - host->io_port = ecard_address(ec, ECARD_MEMC, 0); 139 + host = scsi_host_alloc(&oakscsi_template, sizeof(struct NCR5380_hostdata)); 140 + if (!host) { 141 + ret = -ENOMEM; 142 + goto release; 143 + } 144 + 145 + priv(host)->base = ioremap(ecard_resource_start(ec, ECARD_RES_MEMC), 146 + ecard_resource_len(ec, ECARD_RES_MEMC)); 147 + if (!priv(host)->base) { 148 + ret = -ENOMEM; 149 + goto unreg; 150 + } 151 + 143 152 host->irq = IRQ_NONE; 144 153 host->n_io_port = 255; 145 - 146 - ret = -EBUSY; 147 - if (!request_region (host->io_port, host->n_io_port, "Oak SCSI")) 148 - goto unreg; 149 154 150 155 NCR5380_init(host, 0); 151 156 ··· 167 156 168 157 ret = scsi_add_host(host, &ec->dev); 169 158 if (ret) 170 - goto out_release; 159 + goto out_unmap; 171 160 172 161 scsi_scan_host(host); 173 162 goto out; 174 163 175 - out_release: 176 - release_region(host->io_port, host->n_io_port); 164 + out_unmap: 165 + iounmap(priv(host)->base); 177 166 unreg: 178 167 scsi_host_put(host); 168 + release: 169 + ecard_release_resources(ec); 179 170 out: 180 171 return ret; 181 172 } ··· 190 177 scsi_remove_host(host); 191 178 192 179 NCR5380_exit(host); 193 - release_region(host->io_port, host->n_io_port); 180 + iounmap(priv(host)->base); 194 181 scsi_host_put(host); 182 + ecard_release_resources(ec); 195 183 } 196 184 197 185 static const struct ecard_id oakscsi_cids[] = {
+1 -1
drivers/serial/imx.c
··· 1114 1114 1115 1115 static void __exit imx_serial_exit(void) 1116 1116 { 1117 - uart_unregister_driver(&imx_reg); 1118 1117 platform_driver_unregister(&serial_imx_driver); 1118 + uart_unregister_driver(&imx_reg); 1119 1119 } 1120 1120 1121 1121 module_init(imx_serial_init);
+1 -1
drivers/serial/s3c2410.c
··· 78 78 79 79 #include <asm/hardware.h> 80 80 81 - #include <asm/arch/regs-serial.h> 81 + #include <asm/plat-s3c/regs-serial.h> 82 82 #include <asm/arch/regs-gpio.h> 83 83 84 84 /* structures */
+43
include/asm-arm/arch-iop13xx/iop13xx.h
··· 19 19 return id; 20 20 } 21 21 22 + /* WDTCR CP6 R7 Page 9 */ 23 + static inline u32 read_wdtcr(void) 24 + { 25 + u32 val; 26 + asm volatile("mrc p6, 0, %0, c7, c9, 0":"=r" (val)); 27 + return val; 28 + } 29 + static inline void write_wdtcr(u32 val) 30 + { 31 + asm volatile("mcr p6, 0, %0, c7, c9, 0"::"r" (val)); 32 + } 33 + 34 + /* WDTSR CP6 R8 Page 9 */ 35 + static inline u32 read_wdtsr(void) 36 + { 37 + u32 val; 38 + asm volatile("mrc p6, 0, %0, c8, c9, 0":"=r" (val)); 39 + return val; 40 + } 41 + static inline void write_wdtsr(u32 val) 42 + { 43 + asm volatile("mcr p6, 0, %0, c8, c9, 0"::"r" (val)); 44 + } 45 + 46 + /* RCSR - Reset Cause Status Register */ 47 + static inline u32 read_rcsr(void) 48 + { 49 + u32 val; 50 + asm volatile("mrc p6, 0, %0, c0, c1, 0":"=r" (val)); 51 + return val; 52 + } 53 + 54 + extern unsigned long get_iop_tick_rate(void); 22 55 #endif 23 56 24 57 /* ··· 513 480 #define IOP13XX_PBI_LR1 IOP13XX_PBI_OFFSET(0x14) 514 481 515 482 #define IOP13XX_PROCESSOR_FREQ IOP13XX_REG_ADDR32(0x2180) 483 + 484 + /* Watchdog timer definitions */ 485 + #define IOP_WDTCR_EN_ARM 0x1e1e1e1e 486 + #define IOP_WDTCR_EN 0xe1e1e1e1 487 + #define IOP_WDTCR_DIS_ARM 0x1f1f1f1f 488 + #define IOP_WDTCR_DIS 0xf1f1f1f1 489 + #define IOP_RCSR_WDT (1 << 5) /* reset caused by watchdog timer */ 490 + #define IOP13XX_WDTSR_WRITE_EN (1 << 31) /* used to speed up reset requests */ 491 + #define IOP13XX_WDTCR_IB_RESET (1 << 0) 492 + 516 493 #endif /* _IOP13XX_HW_H_ */
+2 -32
include/asm-arm/arch-iop13xx/system.h
··· 13 13 cpu_do_idle(); 14 14 } 15 15 16 - /* WDTCR CP6 R7 Page 9 */ 17 - static inline u32 read_wdtcr(void) 18 - { 19 - u32 val; 20 - asm volatile("mrc p6, 0, %0, c7, c9, 0":"=r" (val)); 21 - return val; 22 - } 23 - static inline void write_wdtcr(u32 val) 24 - { 25 - asm volatile("mcr p6, 0, %0, c7, c9, 0"::"r" (val)); 26 - } 27 - 28 - /* WDTSR CP6 R8 Page 9 */ 29 - static inline u32 read_wdtsr(void) 30 - { 31 - u32 val; 32 - asm volatile("mrc p6, 0, %0, c8, c9, 0":"=r" (val)); 33 - return val; 34 - } 35 - static inline void write_wdtsr(u32 val) 36 - { 37 - asm volatile("mcr p6, 0, %0, c8, c9, 0"::"r" (val)); 38 - } 39 - 40 - #define IOP13XX_WDTCR_EN_ARM 0x1e1e1e1e 41 - #define IOP13XX_WDTCR_EN 0xe1e1e1e1 42 - #define IOP13XX_WDTCR_DIS_ARM 0x1f1f1f1f 43 - #define IOP13XX_WDTCR_DIS 0xf1f1f1f1 44 - #define IOP13XX_WDTSR_WRITE_EN (1 << 31) 45 - #define IOP13XX_WDTCR_IB_RESET (1 << 0) 46 16 static inline void arch_reset(char mode) 47 17 { 48 18 /* 49 19 * Reset the internal bus (warning both cores are reset) 50 20 */ 51 - write_wdtcr(IOP13XX_WDTCR_EN_ARM); 52 - write_wdtcr(IOP13XX_WDTCR_EN); 21 + write_wdtcr(IOP_WDTCR_EN_ARM); 22 + write_wdtcr(IOP_WDTCR_EN); 53 23 write_wdtsr(IOP13XX_WDTSR_WRITE_EN | IOP13XX_WDTCR_IB_RESET); 54 24 write_wdtcr(0x1000); 55 25
+1 -2
include/asm-arm/arch-iop13xx/uncompress.h
··· 1 1 #include <asm/types.h> 2 2 #include <linux/serial_reg.h> 3 3 #include <asm/hardware.h> 4 - #include <asm/processor.h> 5 4 6 5 #define UART_BASE ((volatile u32 *)IOP13XX_UART1_PHYS) 7 6 #define TX_DONE (UART_LSR_TEMT | UART_LSR_THRE) ··· 8 9 static inline void putc(char c) 9 10 { 10 11 while ((UART_BASE[UART_LSR] & TX_DONE) != TX_DONE) 11 - cpu_relax(); 12 + barrier(); 12 13 UART_BASE[UART_TX] = c; 13 14 } 14 15
+1 -1
include/asm-arm/arch-iop32x/uncompress.h
··· 26 26 { 27 27 if (machine_is_iq80321()) 28 28 uart_base = (volatile u8 *)IQ80321_UART; 29 - else if (machine_is_iq31244()) 29 + else if (machine_is_iq31244() || machine_is_em7210()) 30 30 uart_base = (volatile u8 *)IQ31244_UART; 31 31 else 32 32 uart_base = (volatile u8 *)0xfe800000;
+142
include/asm-arm/arch-mxc/board-mx31ads.h
··· 1 + /* 2 + * Copyright 2005-2007 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_MX31ADS_H__ 12 + #define __ASM_ARCH_MXC_BOARD_MX31ADS_H__ 13 + 14 + /*! 15 + * @name PBC Controller parameters 16 + */ 17 + /*! @{ */ 18 + /*! 19 + * Base address of PBC controller 20 + */ 21 + #define PBC_BASE_ADDRESS IO_ADDRESS(CS4_BASE_ADDR) 22 + /* Offsets for the PBC Controller register */ 23 + /*! 24 + * PBC Board status register offset 25 + */ 26 + #define PBC_BSTAT 0x000002 27 + /*! 28 + * PBC Board control register 1 set address. 29 + */ 30 + #define PBC_BCTRL1_SET 0x000004 31 + /*! 32 + * PBC Board control register 1 clear address. 33 + */ 34 + #define PBC_BCTRL1_CLEAR 0x000006 35 + /*! 36 + * PBC Board control register 2 set address. 37 + */ 38 + #define PBC_BCTRL2_SET 0x000008 39 + /*! 40 + * PBC Board control register 2 clear address. 41 + */ 42 + #define PBC_BCTRL2_CLEAR 0x00000A 43 + /*! 44 + * PBC Board control register 3 set address. 45 + */ 46 + #define PBC_BCTRL3_SET 0x00000C 47 + /*! 48 + * PBC Board control register 3 clear address. 49 + */ 50 + #define PBC_BCTRL3_CLEAR 0x00000E 51 + /*! 52 + * PBC Board control register 4 set address. 53 + */ 54 + #define PBC_BCTRL4_SET 0x000010 55 + /*! 56 + * PBC Board control register 4 clear address. 57 + */ 58 + #define PBC_BCTRL4_CLEAR 0x000012 59 + /*! 60 + * PBC Board status register 1. 61 + */ 62 + #define PBC_BSTAT1 0x000014 63 + /*! 64 + * PBC Board interrupt status register. 65 + */ 66 + #define PBC_INTSTATUS 0x000016 67 + /*! 68 + * PBC Board interrupt current status register. 69 + */ 70 + #define PBC_INTCURR_STATUS 0x000018 71 + /*! 72 + * PBC Interrupt mask register set address. 73 + */ 74 + #define PBC_INTMASK_SET 0x00001A 75 + /*! 76 + * PBC Interrupt mask register clear address. 77 + */ 78 + #define PBC_INTMASK_CLEAR 0x00001C 79 + 80 + /*! 81 + * External UART A. 82 + */ 83 + #define PBC_SC16C652_UARTA 0x010000 84 + /*! 85 + * External UART B. 86 + */ 87 + #define PBC_SC16C652_UARTB 0x010010 88 + /*! 89 + * Ethernet Controller IO base address. 90 + */ 91 + #define PBC_CS8900A_IOBASE 0x020000 92 + /*! 93 + * Ethernet Controller Memory base address. 94 + */ 95 + #define PBC_CS8900A_MEMBASE 0x021000 96 + /*! 97 + * Ethernet Controller DMA base address. 98 + */ 99 + #define PBC_CS8900A_DMABASE 0x022000 100 + /*! 101 + * External chip select 0. 102 + */ 103 + #define PBC_XCS0 0x040000 104 + /*! 105 + * LCD Display enable. 106 + */ 107 + #define PBC_LCD_EN_B 0x060000 108 + /*! 109 + * Code test debug enable. 110 + */ 111 + #define PBC_CODE_B 0x070000 112 + /*! 113 + * PSRAM memory select. 114 + */ 115 + #define PBC_PSRAM_B 0x5000000 116 + 117 + #define PBC_INTSTATUS_REG (PBC_INTSTATUS + PBC_BASE_ADDRESS) 118 + #define PBC_INTCURR_STATUS_REG (PBC_INTCURR_STATUS + PBC_BASE_ADDRESS) 119 + #define PBC_INTMASK_SET_REG (PBC_INTMASK_SET + PBC_BASE_ADDRESS) 120 + #define PBC_INTMASK_CLEAR_REG (PBC_INTMASK_CLEAR + PBC_BASE_ADDRESS) 121 + #define EXPIO_PARENT_INT IOMUX_TO_IRQ(MX31_PIN_GPIO1_4) 122 + 123 + #define EXPIO_INT_LOW_BAT (MXC_EXP_IO_BASE + 0) 124 + #define EXPIO_INT_PB_IRQ (MXC_EXP_IO_BASE + 1) 125 + #define EXPIO_INT_OTG_FS_OVR (MXC_EXP_IO_BASE + 2) 126 + #define EXPIO_INT_FSH_OVR (MXC_EXP_IO_BASE + 3) 127 + #define EXPIO_INT_RES4 (MXC_EXP_IO_BASE + 4) 128 + #define EXPIO_INT_RES5 (MXC_EXP_IO_BASE + 5) 129 + #define EXPIO_INT_RES6 (MXC_EXP_IO_BASE + 6) 130 + #define EXPIO_INT_RES7 (MXC_EXP_IO_BASE + 7) 131 + #define EXPIO_INT_ENET_INT (MXC_EXP_IO_BASE + 8) 132 + #define EXPIO_INT_OTG_FS_INT (MXC_EXP_IO_BASE + 9) 133 + #define EXPIO_INT_XUART_INTA (MXC_EXP_IO_BASE + 10) 134 + #define EXPIO_INT_XUART_INTB (MXC_EXP_IO_BASE + 11) 135 + #define EXPIO_INT_SYNTH_IRQ (MXC_EXP_IO_BASE + 12) 136 + #define EXPIO_INT_CE_INT1 (MXC_EXP_IO_BASE + 13) 137 + #define EXPIO_INT_CE_INT2 (MXC_EXP_IO_BASE + 14) 138 + #define EXPIO_INT_RES15 (MXC_EXP_IO_BASE + 15) 139 + 140 + #define MXC_MAX_EXP_IO_LINES 16 141 + 142 + #endif /* __ASM_ARCH_MXC_BOARD_MX31ADS_H__ */
+20
include/asm-arm/arch-mxc/common.h
··· 1 + /* 2 + * Copyright 2004-2007 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_COMMON_H__ 12 + #define __ASM_ARCH_MXC_COMMON_H__ 13 + 14 + struct sys_timer; 15 + 16 + extern void mxc_map_io(void); 17 + extern void mxc_init_irq(void); 18 + extern struct sys_timer mxc_timer; 19 + 20 + #endif
+21
include/asm-arm/arch-mxc/dma.h
··· 1 + /* 2 + * Copyright 2004-2007 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_DMA_H__ 12 + #define __ASM_ARCH_MXC_DMA_H__ 13 + 14 + /*! 15 + * @file dma.h 16 + * @brief This file contains Unified DMA API for all MXC platforms. 17 + * The API is platform independent. 18 + * 19 + * @ingroup SDMA 20 + */ 21 + #endif
+39
include/asm-arm/arch-mxc/entry-macro.S
··· 1 + /* 2 + * Copyright (C) 2007 Lennert Buytenhek <buytenh@wantstofly.org> 3 + * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. 4 + */ 5 + 6 + /* 7 + * This program is free software; you can redistribute it and/or modify 8 + * it under the terms of the GNU General Public License version 2 as 9 + * published by the Free Software Foundation. 10 + */ 11 + 12 + @ this macro disables fast irq (not implemented) 13 + .macro disable_fiq 14 + .endm 15 + 16 + .macro get_irqnr_preamble, base, tmp 17 + .endm 18 + 19 + .macro arch_ret_to_user, tmp1, tmp2 20 + .endm 21 + 22 + @ this macro checks which interrupt occured 23 + @ and returns its number in irqnr 24 + @ and returns if an interrupt occured in irqstat 25 + .macro get_irqnr_and_base, irqnr, irqstat, base, tmp 26 + ldr \base, =AVIC_IO_ADDRESS(AVIC_BASE_ADDR) 27 + @ Load offset & priority of the highest priority 28 + @ interrupt pending from AVIC_NIVECSR 29 + ldr \irqstat, [\base, #0x40] 30 + @ Shift to get the decoded IRQ number, using ASR so 31 + @ 'no interrupt pending' becomes 0xffffffff 32 + mov \irqnr, \irqstat, asr #16 33 + @ set zero flag if IRQ + 1 == 0 34 + adds \tmp, \irqnr, #1 35 + .endm 36 + 37 + @ irq priority table (not used) 38 + .macro irq_prio_table 39 + .endm
+52
include/asm-arm/arch-mxc/hardware.h
··· 1 + /* 2 + * Copyright 2004-2007 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 + /*! 12 + * @file hardware.h 13 + * @brief This file contains the hardware definitions of the board. 14 + * 15 + * @ingroup System 16 + */ 17 + #ifndef __ASM_ARCH_MXC_HARDWARE_H__ 18 + #define __ASM_ARCH_MXC_HARDWARE_H__ 19 + 20 + #include <asm/sizes.h> 21 + 22 + #include <asm/arch/mx31.h> 23 + 24 + #include <asm/arch/mxc.h> 25 + 26 + #define MXC_MAX_GPIO_LINES (GPIO_NUM_PIN * GPIO_PORT_NUM) 27 + 28 + /* 29 + * --------------------------------------------------------------------------- 30 + * Board specific defines 31 + * --------------------------------------------------------------------------- 32 + */ 33 + #define MXC_EXP_IO_BASE (MXC_GPIO_INT_BASE + MXC_MAX_GPIO_LINES) 34 + 35 + #include <asm/arch/board-mx31ads.h> 36 + 37 + #ifndef MXC_MAX_EXP_IO_LINES 38 + #define MXC_MAX_EXP_IO_LINES 0 39 + #endif 40 + 41 + #define MXC_MAX_VIRTUAL_INTS 16 42 + #define MXC_VIRTUAL_INTS_BASE (MXC_EXP_IO_BASE + MXC_MAX_EXP_IO_LINES) 43 + #define MXC_SDIO1_CARD_IRQ MXC_VIRTUAL_INTS_BASE 44 + #define MXC_SDIO2_CARD_IRQ (MXC_VIRTUAL_INTS_BASE + 1) 45 + #define MXC_SDIO3_CARD_IRQ (MXC_VIRTUAL_INTS_BASE + 2) 46 + 47 + #define MXC_MAX_INTS (MXC_MAX_INT_LINES + \ 48 + MXC_MAX_GPIO_LINES + \ 49 + MXC_MAX_EXP_IO_LINES + \ 50 + MXC_MAX_VIRTUAL_INTS) 51 + 52 + #endif /* __ASM_ARCH_MXC_HARDWARE_H__ */
+33
include/asm-arm/arch-mxc/io.h
··· 1 + /* 2 + * Copyright 2004-2007 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 + /*! 12 + * @file io.h 13 + * @brief This file contains some memory mapping macros. 14 + * @note There is no real ISA or PCI buses. But have to define these macros 15 + * for some drivers to compile. 16 + * 17 + * @ingroup System 18 + */ 19 + 20 + #ifndef __ASM_ARCH_MXC_IO_H__ 21 + #define __ASM_ARCH_MXC_IO_H__ 22 + 23 + /*! Allow IO space to be anywhere in the memory */ 24 + #define IO_SPACE_LIMIT 0xffffffff 25 + 26 + /*! 27 + * io address mapping macro 28 + */ 29 + #define __io(a) ((void __iomem *)(a)) 30 + 31 + #define __mem_pci(a) (a) 32 + 33 + #endif
+38
include/asm-arm/arch-mxc/irqs.h
··· 1 + /* 2 + * Copyright 2004-2007 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_IRQS_H__ 12 + #define __ASM_ARCH_MXC_IRQS_H__ 13 + 14 + #include <asm/hardware.h> 15 + 16 + /*! 17 + * @file irqs.h 18 + * @brief This file defines the number of normal interrupts and fast interrupts 19 + * 20 + * @ingroup Interrupt 21 + */ 22 + 23 + #define MXC_IRQ_TO_EXPIO(irq) ((irq) - MXC_EXP_IO_BASE) 24 + 25 + #define MXC_IRQ_TO_GPIO(irq) ((irq) - MXC_GPIO_INT_BASE) 26 + #define MXC_GPIO_TO_IRQ(x) (MXC_GPIO_INT_BASE + x) 27 + 28 + /*! 29 + * Number of normal interrupts 30 + */ 31 + #define NR_IRQS MXC_MAX_INTS 32 + 33 + /*! 34 + * Number of fast interrupts 35 + */ 36 + #define NR_FIQS MXC_MAX_INTS 37 + 38 + #endif /* __ASM_ARCH_MXC_IRQS_H__ */
+36
include/asm-arm/arch-mxc/memory.h
··· 1 + /* 2 + * Copyright 2004-2007 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_MEMORY_H__ 12 + #define __ASM_ARCH_MXC_MEMORY_H__ 13 + 14 + #include <asm/hardware.h> 15 + 16 + /*! 17 + * @file memory.h 18 + * @brief This file contains macros needed by the Linux kernel and drivers. 19 + * 20 + * @ingroup Memory 21 + */ 22 + 23 + /*! 24 + * Virtual view <-> DMA view memory address translations 25 + * This macro is used to translate the virtual address to an address 26 + * suitable to be passed to set_dma_addr() 27 + */ 28 + #define __virt_to_bus(a) __virt_to_phys(a) 29 + 30 + /*! 31 + * Used to convert an address for DMA operations to an address that the 32 + * kernel can use. 33 + */ 34 + #define __bus_to_virt(a) __phys_to_virt(a) 35 + 36 + #endif /* __ASM_ARCH_MXC_MEMORY_H__ */
+335
include/asm-arm/arch-mxc/mx31.h
··· 1 + /* 2 + * Copyright 2004-2007 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_MX31_H__ 12 + #define __ASM_ARCH_MXC_MX31_H__ 13 + 14 + #ifndef __ASM_ARCH_MXC_HARDWARE_H__ 15 + #error "Do not include directly." 16 + #endif 17 + 18 + /*! 19 + * defines the hardware clock tick rate 20 + */ 21 + #define CLOCK_TICK_RATE 16625000 22 + 23 + /* 24 + * MX31 memory map: 25 + * 26 + * Virt Phys Size What 27 + * --------------------------------------------------------------------------- 28 + * F8000000 1FFC0000 16K IRAM 29 + * F9000000 30000000 256M L2CC 30 + * FC000000 43F00000 1M AIPS 1 31 + * FC100000 50000000 1M SPBA 32 + * FC200000 53F00000 1M AIPS 2 33 + * FC500000 60000000 128M ROMPATCH 34 + * FC400000 68000000 128M AVIC 35 + * 70000000 256M IPU (MAX M2) 36 + * 80000000 256M CSD0 SDRAM/DDR 37 + * 90000000 256M CSD1 SDRAM/DDR 38 + * A0000000 128M CS0 Flash 39 + * A8000000 128M CS1 Flash 40 + * B0000000 32M CS2 41 + * B2000000 32M CS3 42 + * F4000000 B4000000 32M CS4 43 + * B6000000 32M CS5 44 + * FC320000 B8000000 64K NAND, SDRAM, WEIM, M3IF, EMI controllers 45 + * C0000000 64M PCMCIA/CF 46 + */ 47 + 48 + #define CS0_BASE_ADDR 0xA0000000 49 + #define CS1_BASE_ADDR 0xA8000000 50 + #define CS2_BASE_ADDR 0xB0000000 51 + #define CS3_BASE_ADDR 0xB2000000 52 + 53 + #define CS4_BASE_ADDR 0xB4000000 54 + #define CS4_BASE_ADDR_VIRT 0xF4000000 55 + #define CS4_SIZE SZ_32M 56 + 57 + #define CS5_BASE_ADDR 0xB6000000 58 + #define PCMCIA_MEM_BASE_ADDR 0xBC000000 59 + 60 + /* 61 + * IRAM 62 + */ 63 + #define IRAM_BASE_ADDR 0x1FFC0000 /* internal ram */ 64 + #define IRAM_BASE_ADDR_VIRT 0xF8000000 65 + #define IRAM_SIZE SZ_16K 66 + 67 + /* 68 + * L2CC 69 + */ 70 + #define L2CC_BASE_ADDR 0x30000000 71 + #define L2CC_BASE_ADDR_VIRT 0xF9000000 72 + #define L2CC_SIZE SZ_1M 73 + 74 + /* 75 + * AIPS 1 76 + */ 77 + #define AIPS1_BASE_ADDR 0x43F00000 78 + #define AIPS1_BASE_ADDR_VIRT 0xFC000000 79 + #define AIPS1_SIZE SZ_1M 80 + 81 + #define MAX_BASE_ADDR (AIPS1_BASE_ADDR + 0x00004000) 82 + #define EVTMON_BASE_ADDR (AIPS1_BASE_ADDR + 0x00008000) 83 + #define CLKCTL_BASE_ADDR (AIPS1_BASE_ADDR + 0x0000C000) 84 + #define ETB_SLOT4_BASE_ADDR (AIPS1_BASE_ADDR + 0x00010000) 85 + #define ETB_SLOT5_BASE_ADDR (AIPS1_BASE_ADDR + 0x00014000) 86 + #define ECT_CTIO_BASE_ADDR (AIPS1_BASE_ADDR + 0x00018000) 87 + #define I2C_BASE_ADDR (AIPS1_BASE_ADDR + 0x00080000) 88 + #define I2C3_BASE_ADDR (AIPS1_BASE_ADDR + 0x00084000) 89 + #define OTG_BASE_ADDR (AIPS1_BASE_ADDR + 0x00088000) 90 + #define ATA_BASE_ADDR (AIPS1_BASE_ADDR + 0x0008C000) 91 + #define UART1_BASE_ADDR (AIPS1_BASE_ADDR + 0x00090000) 92 + #define UART2_BASE_ADDR (AIPS1_BASE_ADDR + 0x00094000) 93 + #define I2C2_BASE_ADDR (AIPS1_BASE_ADDR + 0x00098000) 94 + #define OWIRE_BASE_ADDR (AIPS1_BASE_ADDR + 0x0009C000) 95 + #define SSI1_BASE_ADDR (AIPS1_BASE_ADDR + 0x000A0000) 96 + #define CSPI1_BASE_ADDR (AIPS1_BASE_ADDR + 0x000A4000) 97 + #define KPP_BASE_ADDR (AIPS1_BASE_ADDR + 0x000A8000) 98 + #define IOMUXC_BASE_ADDR (AIPS1_BASE_ADDR + 0x000AC000) 99 + #define UART4_BASE_ADDR (AIPS1_BASE_ADDR + 0x000B0000) 100 + #define UART5_BASE_ADDR (AIPS1_BASE_ADDR + 0x000B4000) 101 + #define ECT_IP1_BASE_ADDR (AIPS1_BASE_ADDR + 0x000B8000) 102 + #define ECT_IP2_BASE_ADDR (AIPS1_BASE_ADDR + 0x000BC000) 103 + 104 + /* 105 + * SPBA global module enabled #0 106 + */ 107 + #define SPBA0_BASE_ADDR 0x50000000 108 + #define SPBA0_BASE_ADDR_VIRT 0xFC100000 109 + #define SPBA0_SIZE SZ_1M 110 + 111 + #define MMC_SDHC1_BASE_ADDR (SPBA0_BASE_ADDR + 0x00004000) 112 + #define MMC_SDHC2_BASE_ADDR (SPBA0_BASE_ADDR + 0x00008000) 113 + #define UART3_BASE_ADDR (SPBA0_BASE_ADDR + 0x0000C000) 114 + #define CSPI2_BASE_ADDR (SPBA0_BASE_ADDR + 0x00010000) 115 + #define SSI2_BASE_ADDR (SPBA0_BASE_ADDR + 0x00014000) 116 + #define SIM1_BASE_ADDR (SPBA0_BASE_ADDR + 0x00018000) 117 + #define IIM_BASE_ADDR (SPBA0_BASE_ADDR + 0x0001C000) 118 + #define ATA_DMA_BASE_ADDR (SPBA0_BASE_ADDR + 0x00020000) 119 + #define MSHC1_BASE_ADDR (SPBA0_BASE_ADDR + 0x00024000) 120 + #define MSHC2_BASE_ADDR (SPBA0_BASE_ADDR + 0x00024000) 121 + #define SPBA_CTRL_BASE_ADDR (SPBA0_BASE_ADDR + 0x0003C000) 122 + 123 + /* 124 + * AIPS 2 125 + */ 126 + #define AIPS2_BASE_ADDR 0x53F00000 127 + #define AIPS2_BASE_ADDR_VIRT 0xFC200000 128 + #define AIPS2_SIZE SZ_1M 129 + #define CCM_BASE_ADDR (AIPS2_BASE_ADDR + 0x00080000) 130 + #define CSPI3_BASE_ADDR (AIPS2_BASE_ADDR + 0x00084000) 131 + #define FIRI_BASE_ADDR (AIPS2_BASE_ADDR + 0x0008C000) 132 + #define GPT1_BASE_ADDR (AIPS2_BASE_ADDR + 0x00090000) 133 + #define EPIT1_BASE_ADDR (AIPS2_BASE_ADDR + 0x00094000) 134 + #define EPIT2_BASE_ADDR (AIPS2_BASE_ADDR + 0x00098000) 135 + #define GPIO3_BASE_ADDR (AIPS2_BASE_ADDR + 0x000A4000) 136 + #define SCC_BASE_ADDR (AIPS2_BASE_ADDR + 0x000AC000) 137 + #define SCM_BASE_ADDR (AIPS2_BASE_ADDR + 0x000AE000) 138 + #define SMN_BASE_ADDR (AIPS2_BASE_ADDR + 0x000AF000) 139 + #define RNGA_BASE_ADDR (AIPS2_BASE_ADDR + 0x000B0000) 140 + #define IPU_CTRL_BASE_ADDR (AIPS2_BASE_ADDR + 0x000C0000) 141 + #define AUDMUX_BASE_ADDR (AIPS2_BASE_ADDR + 0x000C4000) 142 + #define MPEG4_ENC_BASE_ADDR (AIPS2_BASE_ADDR + 0x000C8000) 143 + #define GPIO1_BASE_ADDR (AIPS2_BASE_ADDR + 0x000CC000) 144 + #define GPIO2_BASE_ADDR (AIPS2_BASE_ADDR + 0x000D0000) 145 + #define SDMA_BASE_ADDR (AIPS2_BASE_ADDR + 0x000D4000) 146 + #define RTC_BASE_ADDR (AIPS2_BASE_ADDR + 0x000D8000) 147 + #define WDOG_BASE_ADDR (AIPS2_BASE_ADDR + 0x000DC000) 148 + #define PWM_BASE_ADDR (AIPS2_BASE_ADDR + 0x000E0000) 149 + #define RTIC_BASE_ADDR (AIPS2_BASE_ADDR + 0x000EC000) 150 + 151 + /* 152 + * ROMP and AVIC 153 + */ 154 + #define ROMP_BASE_ADDR 0x60000000 155 + #define ROMP_BASE_ADDR_VIRT 0xFC500000 156 + #define ROMP_SIZE SZ_1M 157 + 158 + #define AVIC_BASE_ADDR 0x68000000 159 + #define AVIC_BASE_ADDR_VIRT 0xFC400000 160 + #define AVIC_SIZE SZ_1M 161 + 162 + /* 163 + * NAND, SDRAM, WEIM, M3IF, EMI controllers 164 + */ 165 + #define X_MEMC_BASE_ADDR 0xB8000000 166 + #define X_MEMC_BASE_ADDR_VIRT 0xFC320000 167 + #define X_MEMC_SIZE SZ_64K 168 + 169 + #define NFC_BASE_ADDR (X_MEMC_BASE_ADDR + 0x0000) 170 + #define ESDCTL_BASE_ADDR (X_MEMC_BASE_ADDR + 0x1000) 171 + #define WEIM_BASE_ADDR (X_MEMC_BASE_ADDR + 0x2000) 172 + #define M3IF_BASE_ADDR (X_MEMC_BASE_ADDR + 0x3000) 173 + #define EMI_CTL_BASE_ADDR (X_MEMC_BASE_ADDR + 0x4000) 174 + #define PCMCIA_CTL_BASE_ADDR EMI_CTL_BASE_ADDR 175 + 176 + /* 177 + * Memory regions and CS 178 + */ 179 + #define IPU_MEM_BASE_ADDR 0x70000000 180 + #define CSD0_BASE_ADDR 0x80000000 181 + #define CSD1_BASE_ADDR 0x90000000 182 + #define CS0_BASE_ADDR 0xA0000000 183 + #define CS1_BASE_ADDR 0xA8000000 184 + #define CS2_BASE_ADDR 0xB0000000 185 + #define CS3_BASE_ADDR 0xB2000000 186 + 187 + #define CS4_BASE_ADDR 0xB4000000 188 + #define CS4_BASE_ADDR_VIRT 0xF4000000 189 + #define CS4_SIZE SZ_32M 190 + 191 + #define CS5_BASE_ADDR 0xB6000000 192 + #define PCMCIA_MEM_BASE_ADDR 0xBC000000 193 + 194 + /*! 195 + * This macro defines the physical to virtual address mapping for all the 196 + * peripheral modules. It is used by passing in the physical address as x 197 + * and returning the virtual address. If the physical address is not mapped, 198 + * it returns 0xDEADBEEF 199 + */ 200 + #define IO_ADDRESS(x) \ 201 + (((x >= IRAM_BASE_ADDR) && (x < (IRAM_BASE_ADDR + IRAM_SIZE))) ? IRAM_IO_ADDRESS(x):\ 202 + ((x >= L2CC_BASE_ADDR) && (x < (L2CC_BASE_ADDR + L2CC_SIZE))) ? L2CC_IO_ADDRESS(x):\ 203 + ((x >= AIPS1_BASE_ADDR) && (x < (AIPS1_BASE_ADDR + AIPS1_SIZE))) ? AIPS1_IO_ADDRESS(x):\ 204 + ((x >= SPBA0_BASE_ADDR) && (x < (SPBA0_BASE_ADDR + SPBA0_SIZE))) ? SPBA0_IO_ADDRESS(x):\ 205 + ((x >= AIPS2_BASE_ADDR) && (x < (AIPS2_BASE_ADDR + AIPS2_SIZE))) ? AIPS2_IO_ADDRESS(x):\ 206 + ((x >= ROMP_BASE_ADDR) && (x < (ROMP_BASE_ADDR + ROMP_SIZE))) ? ROMP_IO_ADDRESS(x):\ 207 + ((x >= AVIC_BASE_ADDR) && (x < (AVIC_BASE_ADDR + AVIC_SIZE))) ? AVIC_IO_ADDRESS(x):\ 208 + ((x >= CS4_BASE_ADDR) && (x < (CS4_BASE_ADDR + CS4_SIZE))) ? CS4_IO_ADDRESS(x):\ 209 + ((x >= X_MEMC_BASE_ADDR) && (x < (X_MEMC_BASE_ADDR + X_MEMC_SIZE))) ? X_MEMC_IO_ADDRESS(x):\ 210 + 0xDEADBEEF) 211 + 212 + /* 213 + * define the address mapping macros: in physical address order 214 + */ 215 + 216 + #define IRAM_IO_ADDRESS(x) \ 217 + (((x) - IRAM_BASE_ADDR) + IRAM_BASE_ADDR_VIRT) 218 + 219 + #define L2CC_IO_ADDRESS(x) \ 220 + (((x) - L2CC_BASE_ADDR) + L2CC_BASE_ADDR_VIRT) 221 + 222 + #define AIPS1_IO_ADDRESS(x) \ 223 + (((x) - AIPS1_BASE_ADDR) + AIPS1_BASE_ADDR_VIRT) 224 + 225 + #define SPBA0_IO_ADDRESS(x) \ 226 + (((x) - SPBA0_BASE_ADDR) + SPBA0_BASE_ADDR_VIRT) 227 + 228 + #define AIPS2_IO_ADDRESS(x) \ 229 + (((x) - AIPS2_BASE_ADDR) + AIPS2_BASE_ADDR_VIRT) 230 + 231 + #define ROMP_IO_ADDRESS(x) \ 232 + (((x) - ROMP_BASE_ADDR) + ROMP_BASE_ADDR_VIRT) 233 + 234 + #define AVIC_IO_ADDRESS(x) \ 235 + (((x) - AVIC_BASE_ADDR) + AVIC_BASE_ADDR_VIRT) 236 + 237 + #define CS4_IO_ADDRESS(x) \ 238 + (((x) - CS4_BASE_ADDR) + CS4_BASE_ADDR_VIRT) 239 + 240 + #define X_MEMC_IO_ADDRESS(x) \ 241 + (((x) - X_MEMC_BASE_ADDR) + X_MEMC_BASE_ADDR_VIRT) 242 + 243 + #define PCMCIA_IO_ADDRESS(x) \ 244 + (((x) - X_MEMC_BASE_ADDR) + X_MEMC_BASE_ADDR_VIRT) 245 + 246 + /* Start of physical RAM - On many MX31 platforms, this is the first SDRAM bank (CSD0) */ 247 + #define PHYS_OFFSET CSD0_BASE_ADDR 248 + 249 + /* 250 + * Interrupt numbers 251 + */ 252 + #define MXC_INT_PEN_ADS7843 0 253 + #define MXC_INT_RESV1 1 254 + #define MXC_INT_CS8900A 2 255 + #define MXC_INT_I2C3 3 256 + #define MXC_INT_I2C2 4 257 + #define MXC_INT_MPEG4_ENCODER 5 258 + #define MXC_INT_RTIC 6 259 + #define MXC_INT_FIRI 7 260 + #define MXC_INT_MMC_SDHC2 8 261 + #define MXC_INT_MMC_SDHC1 9 262 + #define MXC_INT_I2C 10 263 + #define MXC_INT_SSI2 11 264 + #define MXC_INT_SSI1 12 265 + #define MXC_INT_CSPI2 13 266 + #define MXC_INT_CSPI1 14 267 + #define MXC_INT_ATA 15 268 + #define MXC_INT_MBX 16 269 + #define MXC_INT_CSPI3 17 270 + #define MXC_INT_UART3 18 271 + #define MXC_INT_IIM 19 272 + #define MXC_INT_SIM2 20 273 + #define MXC_INT_SIM1 21 274 + #define MXC_INT_RNGA 22 275 + #define MXC_INT_EVTMON 23 276 + #define MXC_INT_KPP 24 277 + #define MXC_INT_RTC 25 278 + #define MXC_INT_PWM 26 279 + #define MXC_INT_EPIT2 27 280 + #define MXC_INT_EPIT1 28 281 + #define MXC_INT_GPT 29 282 + #define MXC_INT_RESV30 30 283 + #define MXC_INT_RESV31 31 284 + #define MXC_INT_UART2 32 285 + #define MXC_INT_NANDFC 33 286 + #define MXC_INT_SDMA 34 287 + #define MXC_INT_USB1 35 288 + #define MXC_INT_USB2 36 289 + #define MXC_INT_USB3 37 290 + #define MXC_INT_USB4 38 291 + #define MXC_INT_MSHC1 39 292 + #define MXC_INT_MSHC2 40 293 + #define MXC_INT_IPU_ERR 41 294 + #define MXC_INT_IPU_SYN 42 295 + #define MXC_INT_RESV43 43 296 + #define MXC_INT_RESV44 44 297 + #define MXC_INT_UART1 45 298 + #define MXC_INT_UART4 46 299 + #define MXC_INT_UART5 47 300 + #define MXC_INT_ECT 48 301 + #define MXC_INT_SCC_SCM 49 302 + #define MXC_INT_SCC_SMN 50 303 + #define MXC_INT_GPIO2 51 304 + #define MXC_INT_GPIO1 52 305 + #define MXC_INT_CCM 53 306 + #define MXC_INT_PCMCIA 54 307 + #define MXC_INT_WDOG 55 308 + #define MXC_INT_GPIO3 56 309 + #define MXC_INT_RESV57 57 310 + #define MXC_INT_EXT_POWER 58 311 + #define MXC_INT_EXT_TEMPER 59 312 + #define MXC_INT_EXT_SENSOR60 60 313 + #define MXC_INT_EXT_SENSOR61 61 314 + #define MXC_INT_EXT_WDOG 62 315 + #define MXC_INT_EXT_TV 63 316 + 317 + #define MXC_MAX_INT_LINES 64 318 + 319 + #define MXC_GPIO_INT_BASE MXC_MAX_INT_LINES 320 + 321 + /*! 322 + * Number of GPIO port as defined in the IC Spec 323 + */ 324 + #define GPIO_PORT_NUM 3 325 + /*! 326 + * Number of GPIO pins per port 327 + */ 328 + #define GPIO_NUM_PIN 32 329 + 330 + #define PROD_SIGNATURE 0x1 /* For MX31 */ 331 + 332 + #define SYSTEM_REV_MIN CHIP_REV_1_0 333 + #define SYSTEM_REV_NUM 3 334 + 335 + #endif /* __ASM_ARCH_MXC_MX31_H__ */
+149
include/asm-arm/arch-mxc/mxc.h
··· 1 + /* 2 + * Copyright 2004-2007 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_H__ 12 + #define __ASM_ARCH_MXC_H__ 13 + 14 + #ifndef __ASM_ARCH_MXC_HARDWARE_H__ 15 + #error "Do not include directly." 16 + #endif 17 + 18 + /* 19 + ***************************************** 20 + * GPT Register definitions * 21 + ***************************************** 22 + */ 23 + #define MXC_GPT_GPTCR IO_ADDRESS(GPT1_BASE_ADDR + 0x00) 24 + #define MXC_GPT_GPTPR IO_ADDRESS(GPT1_BASE_ADDR + 0x04) 25 + #define MXC_GPT_GPTSR IO_ADDRESS(GPT1_BASE_ADDR + 0x08) 26 + #define MXC_GPT_GPTIR IO_ADDRESS(GPT1_BASE_ADDR + 0x0C) 27 + #define MXC_GPT_GPTOCR1 IO_ADDRESS(GPT1_BASE_ADDR + 0x10) 28 + #define MXC_GPT_GPTOCR2 IO_ADDRESS(GPT1_BASE_ADDR + 0x14) 29 + #define MXC_GPT_GPTOCR3 IO_ADDRESS(GPT1_BASE_ADDR + 0x18) 30 + #define MXC_GPT_GPTICR1 IO_ADDRESS(GPT1_BASE_ADDR + 0x1C) 31 + #define MXC_GPT_GPTICR2 IO_ADDRESS(GPT1_BASE_ADDR + 0x20) 32 + #define MXC_GPT_GPTCNT IO_ADDRESS(GPT1_BASE_ADDR + 0x24) 33 + 34 + /*! 35 + * GPT Control register bit definitions 36 + */ 37 + #define GPTCR_FO3 (1 << 31) 38 + #define GPTCR_FO2 (1 << 30) 39 + #define GPTCR_FO1 (1 << 29) 40 + 41 + #define GPTCR_OM3_SHIFT 26 42 + #define GPTCR_OM3_MASK (7 << GPTCR_OM3_SHIFT) 43 + #define GPTCR_OM3_DISCONNECTED (0 << GPTCR_OM3_SHIFT) 44 + #define GPTCR_OM3_TOGGLE (1 << GPTCR_OM3_SHIFT) 45 + #define GPTCR_OM3_CLEAR (2 << GPTCR_OM3_SHIFT) 46 + #define GPTCR_OM3_SET (3 << GPTCR_OM3_SHIFT) 47 + #define GPTCR_OM3_GENERATE_LOW (7 << GPTCR_OM3_SHIFT) 48 + 49 + #define GPTCR_OM2_SHIFT 23 50 + #define GPTCR_OM2_MASK (7 << GPTCR_OM2_SHIFT) 51 + #define GPTCR_OM2_DISCONNECTED (0 << GPTCR_OM2_SHIFT) 52 + #define GPTCR_OM2_TOGGLE (1 << GPTCR_OM2_SHIFT) 53 + #define GPTCR_OM2_CLEAR (2 << GPTCR_OM2_SHIFT) 54 + #define GPTCR_OM2_SET (3 << GPTCR_OM2_SHIFT) 55 + #define GPTCR_OM2_GENERATE_LOW (7 << GPTCR_OM2_SHIFT) 56 + 57 + #define GPTCR_OM1_SHIFT 20 58 + #define GPTCR_OM1_MASK (7 << GPTCR_OM1_SHIFT) 59 + #define GPTCR_OM1_DISCONNECTED (0 << GPTCR_OM1_SHIFT) 60 + #define GPTCR_OM1_TOGGLE (1 << GPTCR_OM1_SHIFT) 61 + #define GPTCR_OM1_CLEAR (2 << GPTCR_OM1_SHIFT) 62 + #define GPTCR_OM1_SET (3 << GPTCR_OM1_SHIFT) 63 + #define GPTCR_OM1_GENERATE_LOW (7 << GPTCR_OM1_SHIFT) 64 + 65 + #define GPTCR_IM2_SHIFT 18 66 + #define GPTCR_IM2_MASK (3 << GPTCR_IM2_SHIFT) 67 + #define GPTCR_IM2_CAPTURE_DISABLE (0 << GPTCR_IM2_SHIFT) 68 + #define GPTCR_IM2_CAPTURE_RISING (1 << GPTCR_IM2_SHIFT) 69 + #define GPTCR_IM2_CAPTURE_FALLING (2 << GPTCR_IM2_SHIFT) 70 + #define GPTCR_IM2_CAPTURE_BOTH (3 << GPTCR_IM2_SHIFT) 71 + 72 + #define GPTCR_IM1_SHIFT 16 73 + #define GPTCR_IM1_MASK (3 << GPTCR_IM1_SHIFT) 74 + #define GPTCR_IM1_CAPTURE_DISABLE (0 << GPTCR_IM1_SHIFT) 75 + #define GPTCR_IM1_CAPTURE_RISING (1 << GPTCR_IM1_SHIFT) 76 + #define GPTCR_IM1_CAPTURE_FALLING (2 << GPTCR_IM1_SHIFT) 77 + #define GPTCR_IM1_CAPTURE_BOTH (3 << GPTCR_IM1_SHIFT) 78 + 79 + #define GPTCR_SWR (1 << 15) 80 + #define GPTCR_FRR (1 << 9) 81 + 82 + #define GPTCR_CLKSRC_SHIFT 6 83 + #define GPTCR_CLKSRC_MASK (7 << GPTCR_CLKSRC_SHIFT) 84 + #define GPTCR_CLKSRC_NOCLOCK (0 << GPTCR_CLKSRC_SHIFT) 85 + #define GPTCR_CLKSRC_HIGHFREQ (2 << GPTCR_CLKSRC_SHIFT) 86 + #define GPTCR_CLKSRC_CLKIN (3 << GPTCR_CLKSRC_SHIFT) 87 + #define GPTCR_CLKSRC_CLK32K (7 << GPTCR_CLKSRC_SHIFT) 88 + 89 + #define GPTCR_STOPEN (1 << 5) 90 + #define GPTCR_DOZEN (1 << 4) 91 + #define GPTCR_WAITEN (1 << 3) 92 + #define GPTCR_DBGEN (1 << 2) 93 + 94 + #define GPTCR_ENMOD (1 << 1) 95 + #define GPTCR_ENABLE (1 << 0) 96 + 97 + #define GPTSR_OF1 (1 << 0) 98 + #define GPTSR_OF2 (1 << 1) 99 + #define GPTSR_OF3 (1 << 2) 100 + #define GPTSR_IF1 (1 << 3) 101 + #define GPTSR_IF2 (1 << 4) 102 + #define GPTSR_ROV (1 << 5) 103 + 104 + #define GPTIR_OF1IE GPTSR_OF1 105 + #define GPTIR_OF2IE GPTSR_OF2 106 + #define GPTIR_OF3IE GPTSR_OF3 107 + #define GPTIR_IF1IE GPTSR_IF1 108 + #define GPTIR_IF2IE GPTSR_IF2 109 + #define GPTIR_ROVIE GPTSR_ROV 110 + 111 + /* 112 + ***************************************** 113 + * AVIC Registers * 114 + ***************************************** 115 + */ 116 + #define AVIC_BASE IO_ADDRESS(AVIC_BASE_ADDR) 117 + #define AVIC_INTCNTL (AVIC_BASE + 0x00) /* int control reg */ 118 + #define AVIC_NIMASK (AVIC_BASE + 0x04) /* int mask reg */ 119 + #define AVIC_INTENNUM (AVIC_BASE + 0x08) /* int enable number reg */ 120 + #define AVIC_INTDISNUM (AVIC_BASE + 0x0C) /* int disable number reg */ 121 + #define AVIC_INTENABLEH (AVIC_BASE + 0x10) /* int enable reg high */ 122 + #define AVIC_INTENABLEL (AVIC_BASE + 0x14) /* int enable reg low */ 123 + #define AVIC_INTTYPEH (AVIC_BASE + 0x18) /* int type reg high */ 124 + #define AVIC_INTTYPEL (AVIC_BASE + 0x1C) /* int type reg low */ 125 + #define AVIC_NIPRIORITY7 (AVIC_BASE + 0x20) /* norm int priority lvl7 */ 126 + #define AVIC_NIPRIORITY6 (AVIC_BASE + 0x24) /* norm int priority lvl6 */ 127 + #define AVIC_NIPRIORITY5 (AVIC_BASE + 0x28) /* norm int priority lvl5 */ 128 + #define AVIC_NIPRIORITY4 (AVIC_BASE + 0x2C) /* norm int priority lvl4 */ 129 + #define AVIC_NIPRIORITY3 (AVIC_BASE + 0x30) /* norm int priority lvl3 */ 130 + #define AVIC_NIPRIORITY2 (AVIC_BASE + 0x34) /* norm int priority lvl2 */ 131 + #define AVIC_NIPRIORITY1 (AVIC_BASE + 0x38) /* norm int priority lvl1 */ 132 + #define AVIC_NIPRIORITY0 (AVIC_BASE + 0x3C) /* norm int priority lvl0 */ 133 + #define AVIC_NIVECSR (AVIC_BASE + 0x40) /* norm int vector/status */ 134 + #define AVIC_FIVECSR (AVIC_BASE + 0x44) /* fast int vector/status */ 135 + #define AVIC_INTSRCH (AVIC_BASE + 0x48) /* int source reg high */ 136 + #define AVIC_INTSRCL (AVIC_BASE + 0x4C) /* int source reg low */ 137 + #define AVIC_INTFRCH (AVIC_BASE + 0x50) /* int force reg high */ 138 + #define AVIC_INTFRCL (AVIC_BASE + 0x54) /* int force reg low */ 139 + #define AVIC_NIPNDH (AVIC_BASE + 0x58) /* norm int pending high */ 140 + #define AVIC_NIPNDL (AVIC_BASE + 0x5C) /* norm int pending low */ 141 + #define AVIC_FIPNDH (AVIC_BASE + 0x60) /* fast int pending high */ 142 + #define AVIC_FIPNDL (AVIC_BASE + 0x64) /* fast int pending low */ 143 + 144 + #define SYSTEM_PREV_REG IO_ADDRESS(IIM_BASE_ADDR + 0x20) 145 + #define SYSTEM_SREV_REG IO_ADDRESS(IIM_BASE_ADDR + 0x24) 146 + #define IIM_PROD_REV_SH 3 147 + #define IIM_PROD_REV_LEN 5 148 + 149 + #endif /* __ASM_ARCH_MXC_H__ */
+50
include/asm-arm/arch-mxc/system.h
··· 1 + /* 2 + * Copyright (C) 1999 ARM Limited 3 + * Copyright (C) 2000 Deep Blue Solutions Ltd 4 + * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. 5 + * 6 + * This program is free software; you can redistribute it and/or modify 7 + * it under the terms of the GNU General Public License as published by 8 + * the Free Software Foundation; either version 2 of the License, or 9 + * (at your option) any later version. 10 + * 11 + * This program is distributed in the hope that it will be useful, 12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 + * GNU General Public License for more details. 15 + * 16 + * You should have received a copy of the GNU General Public License 17 + * along with this program; if not, write to the Free Software 18 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 + */ 20 + 21 + #ifndef __ASM_ARCH_MXC_SYSTEM_H__ 22 + #define __ASM_ARCH_MXC_SYSTEM_H__ 23 + 24 + /*! 25 + * @file system.h 26 + * @brief This file contains idle and reset functions. 27 + * 28 + * @ingroup System 29 + */ 30 + 31 + /*! 32 + * This function puts the CPU into idle mode. It is called by default_idle() 33 + * in process.c file. 34 + */ 35 + static inline void arch_idle(void) 36 + { 37 + cpu_do_idle(); 38 + } 39 + 40 + /* 41 + * This function resets the system. It is called by machine_restart(). 42 + * 43 + * @param mode indicates different kinds of resets 44 + */ 45 + static inline void arch_reset(char mode) 46 + { 47 + cpu_reset(0); 48 + } 49 + 50 + #endif /* __ASM_ARCH_MXC_SYSTEM_H__ */
+25
include/asm-arm/arch-mxc/timex.h
··· 1 + /* 2 + * Copyright (C) 1999 ARM Limited 3 + * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. 4 + * 5 + * This program is free software; you can redistribute it and/or modify 6 + * it under the terms of the GNU General Public License as published by 7 + * the Free Software Foundation; either version 2 of the License, or 8 + * (at your option) any later version. 9 + * 10 + * This program is distributed in the hope that it will be useful, 11 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 + * GNU General Public License for more details. 14 + * 15 + * You should have received a copy of the GNU General Public License 16 + * along with this program; if not, write to the Free Software 17 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 + */ 19 + 20 + #ifndef __ASM_ARCH_MXC_TIMEX_H__ 21 + #define __ASM_ARCH_MXC_TIMEX_H__ 22 + 23 + #include <asm/hardware.h> /* for CLOCK_TICK_RATE */ 24 + 25 + #endif /* __ASM_ARCH_MXC_TIMEX_H__ */
+79
include/asm-arm/arch-mxc/uncompress.h
··· 1 + /* 2 + * include/asm-arm/arch-mxc/uncompress.h 3 + * 4 + * 5 + * 6 + * Copyright (C) 1999 ARM Limited 7 + * Copyright (C) Shane Nay (shane@minirl.com) 8 + * 9 + * This program is free software; you can redistribute it and/or modify 10 + * it under the terms of the GNU General Public License as published by 11 + * the Free Software Foundation; either version 2 of the License, or 12 + * (at your option) any later version. 13 + * 14 + * This program is distributed in the hope that it will be useful, 15 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 + * GNU General Public License for more details. 18 + * 19 + * You should have received a copy of the GNU General Public License 20 + * along with this program; if not, write to the Free Software 21 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 + */ 23 + #ifndef __ASM_ARCH_MXC_UNCOMPRESS_H__ 24 + #define __ASM_ARCH_MXC_UNCOMPRESS_H__ 25 + 26 + #define __MXC_BOOT_UNCOMPRESS 27 + 28 + #include <asm/hardware.h> 29 + #include <asm/processor.h> 30 + 31 + #define UART(x) (*(volatile unsigned long *)(serial_port + (x))) 32 + 33 + #define USR2 0x98 34 + #define USR2_TXFE (1<<14) 35 + #define TXR 0x40 36 + #define UCR1 0x80 37 + #define UCR1_UARTEN 1 38 + 39 + /* 40 + * The following code assumes the serial port has already been 41 + * initialized by the bootloader. We search for the first enabled 42 + * port in the most probable order. If you didn't setup a port in 43 + * your bootloader then nothing will appear (which might be desired). 44 + * 45 + * This does not append a newline 46 + */ 47 + 48 + static void putc(int ch) 49 + { 50 + static unsigned long serial_port = 0; 51 + 52 + if (unlikely(serial_port == 0)) { 53 + do { 54 + serial_port = UART1_BASE_ADDR; 55 + if (UART(UCR1) & UCR1_UARTEN) 56 + break; 57 + serial_port = UART2_BASE_ADDR; 58 + if (UART(UCR1) & UCR1_UARTEN) 59 + break; 60 + return; 61 + } while (0); 62 + } 63 + 64 + while (!(UART(USR2) & USR2_TXFE)) 65 + cpu_relax(); 66 + 67 + UART(TXR) = ch; 68 + } 69 + 70 + #define flush() do { } while (0) 71 + 72 + /* 73 + * nothing to do 74 + */ 75 + #define arch_decomp_setup() 76 + 77 + #define arch_decomp_wdog() 78 + 79 + #endif /* __ASM_ARCH_MXC_UNCOMPRESS_H__ */
+36
include/asm-arm/arch-mxc/vmalloc.h
··· 1 + /* 2 + * Copyright (C) 2000 Russell King. 3 + * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. 4 + * 5 + * This program is free software; you can redistribute it and/or modify 6 + * it under the terms of the GNU General Public License as published by 7 + * the Free Software Foundation; either version 2 of the License, or 8 + * (at your option) any later version. 9 + * 10 + * This program is distributed in the hope that it will be useful, 11 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 + * GNU General Public License for more details. 14 + * 15 + * You should have received a copy of the GNU General Public License 16 + * along with this program; if not, write to the Free Software 17 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 + */ 19 + 20 + #ifndef __ASM_ARCH_MXC_VMALLOC_H__ 21 + #define __ASM_ARCH_MXC_VMALLOC_H__ 22 + 23 + /*! 24 + * @file vmalloc.h 25 + * 26 + * @brief This file contains platform specific macros for vmalloc. 27 + * 28 + * @ingroup System 29 + */ 30 + 31 + /*! 32 + * vmalloc ending address 33 + */ 34 + #define VMALLOC_END 0xF4000000 35 + 36 + #endif /* __ASM_ARCH_MXC_VMALLOC_H__ */
+26 -2
include/asm-arm/arch-ns9xxx/regs-bbu.h
··· 15 15 16 16 /* BBus Utility */ 17 17 18 - /* GPIO Configuration Register */ 19 - #define BBU_GC(x) __REG2(0x9060000c, (x)) 18 + /* GPIO Configuration Registers block 1 */ 19 + /* NOTE: the HRM starts counting at 1 for the GPIO registers, here the start is 20 + * at 0 for each block. That is, BBU_GCONFb1(0) is GPIO Configuration Register 21 + * #1, BBU_GCONFb2(0) is GPIO Configuration Register #8. */ 22 + #define BBU_GCONFb1(x) __REG2(0x90600010, (x)) 23 + #define BBU_GCONFb2(x) __REG2(0x90600100, (x)) 24 + 25 + #define BBU_GCONFx_DIR(m) __REGBIT(3 + (((m) & 7) << 2)) 26 + #define BBU_GCONFx_DIR_INPUT(m) __REGVAL(BBU_GCONFx_DIR(m), 0) 27 + #define BBU_GCONFx_DIR_OUTPUT(m) __REGVAL(BBU_GCONFx_DIR(m), 1) 28 + #define BBU_GCONFx_INV(m) __REGBIT(2 + (((m) & 7) << 2)) 29 + #define BBU_GCONFx_INV_NO(m) __REGVAL(BBU_GCONFx_INV(m), 0) 30 + #define BBU_GCONFx_INV_YES(m) __REGVAL(BBU_GCONFx_INV(m), 1) 31 + #define BBU_GCONFx_FUNC(m) __REGBITS(1 + (((m) & 7) << 2), ((m) & 7) << 2) 32 + #define BBU_GCONFx_FUNC_0(m) __REGVAL(BBU_GCONFx_FUNC(m), 0) 33 + #define BBU_GCONFx_FUNC_1(m) __REGVAL(BBU_GCONFx_FUNC(m), 1) 34 + #define BBU_GCONFx_FUNC_2(m) __REGVAL(BBU_GCONFx_FUNC(m), 2) 35 + #define BBU_GCONFx_FUNC_3(m) __REGVAL(BBU_GCONFx_FUNC(m), 3) 36 + 37 + #define BBU_GCTRL1 __REG(0x90600030) 38 + #define BBU_GCTRL2 __REG(0x90600034) 39 + #define BBU_GCTRL3 __REG(0x90600120) 40 + 41 + #define BBU_GSTAT1 __REG(0x90600040) 42 + #define BBU_GSTAT2 __REG(0x90600044) 43 + #define BBU_GSTAT3 __REG(0x90600130) 20 44 21 45 #endif /* ifndef __ASM_ARCH_REGSBBU_H */
+3 -3
include/asm-arm/arch-ns9xxx/regs-mem.h
··· 79 79 #define MEM_SMC(x) __REG2(0xa0700200, (x) << 3) 80 80 81 81 /* Static Memory Configuration Register x: Write protect */ 82 - #define MEM_SMC_WSMC __REGBIT(20) 83 - #define MEM_SMC_WSMC_OFF __REGVAL(MEM_SMC_WSMC, 0) 84 - #define MEM_SMC_WSMC_ON __REGVAL(MEM_SMC_WSMC, 1) 82 + #define MEM_SMC_PSMC __REGBIT(20) 83 + #define MEM_SMC_PSMC_OFF __REGVAL(MEM_SMC_PSMC, 0) 84 + #define MEM_SMC_PSMC_ON __REGVAL(MEM_SMC_PSMC, 1) 85 85 86 86 /* Static Memory Configuration Register x: Buffer enable */ 87 87 #define MEM_SMC_BSMC __REGBIT(19)
+1 -1
include/asm-arm/arch-ns9xxx/regs-sys.h
··· 64 64 65 65 /* Timer x Control register: Timer enable */ 66 66 #define SYS_TCx_TEN __REGBIT(15) 67 - #define SYS_TCx_TEN_DIS __REGVAL(SYS_TCx_TEN, 1) 67 + #define SYS_TCx_TEN_DIS __REGVAL(SYS_TCx_TEN, 0) 68 68 #define SYS_TCx_TEN_EN __REGVAL(SYS_TCx_TEN, 1) 69 69 70 70 /* Timer x Control register: CPU debug mode */
+15 -1
include/asm-arm/arch-pxa/pm.h
··· 7 7 * 8 8 */ 9 9 10 - extern int pxa_pm_prepare(suspend_state_t state); 10 + struct pxa_cpu_pm_fns { 11 + int save_size; 12 + void (*save)(unsigned long *); 13 + void (*restore)(unsigned long *); 14 + int (*valid)(suspend_state_t state); 15 + void (*enter)(suspend_state_t state); 16 + }; 17 + 18 + extern struct pxa_cpu_pm_fns *pxa_cpu_pm_fns; 19 + 20 + /* sleep.S */ 21 + extern void pxa25x_cpu_suspend(unsigned int); 22 + extern void pxa27x_cpu_suspend(unsigned int); 23 + extern void pxa_cpu_resume(void); 24 + 11 25 extern int pxa_pm_enter(suspend_state_t state);
+66
include/asm-arm/arch-s3c2400/map.h
··· 1 + /* linux/include/asm-arm/arch-s3c2400/map.h 2 + * 3 + * Copyright 2003,2007 Simtec Electronics 4 + * http://armlinux.simtec.co.uk/ 5 + * Ben Dooks <ben@simtec.co.uk> 6 + * 7 + * Copyright 2003, Lucas Correia Villa Real 8 + * 9 + * S3C2400 - Memory map definitions 10 + * 11 + * This program is free software; you can redistribute it and/or modify 12 + * it under the terms of the GNU General Public License version 2 as 13 + * published by the Free Software Foundation. 14 + */ 15 + 16 + #define S3C2400_PA_MEMCTRL (0x14000000) 17 + #define S3C2400_PA_USBHOST (0x14200000) 18 + #define S3C2400_PA_IRQ (0x14400000) 19 + #define S3C2400_PA_DMA (0x14600000) 20 + #define S3C2400_PA_CLKPWR (0x14800000) 21 + #define S3C2400_PA_LCD (0x14A00000) 22 + #define S3C2400_PA_UART (0x15000000) 23 + #define S3C2400_PA_TIMER (0x15100000) 24 + #define S3C2400_PA_USBDEV (0x15200140) 25 + #define S3C2400_PA_WATCHDOG (0x15300000) 26 + #define S3C2400_PA_IIC (0x15400000) 27 + #define S3C2400_PA_IIS (0x15508000) 28 + #define S3C2400_PA_GPIO (0x15600000) 29 + #define S3C2400_PA_RTC (0x15700040) 30 + #define S3C2400_PA_ADC (0x15800000) 31 + #define S3C2400_PA_SPI (0x15900000) 32 + 33 + #define S3C2400_PA_MMC (0x15A00000) 34 + #define S3C2400_SZ_MMC SZ_1M 35 + 36 + /* physical addresses of all the chip-select areas */ 37 + 38 + #define S3C2400_CS0 (0x00000000) 39 + #define S3C2400_CS1 (0x02000000) 40 + #define S3C2400_CS2 (0x04000000) 41 + #define S3C2400_CS3 (0x06000000) 42 + #define S3C2400_CS4 (0x08000000) 43 + #define S3C2400_CS5 (0x0A000000) 44 + #define S3C2400_CS6 (0x0C000000) 45 + #define S3C2400_CS7 (0x0E000000) 46 + 47 + #define S3C2400_SDRAM_PA (S3C2400_CS6) 48 + 49 + /* Use a single interface for common resources between S3C24XX cpus */ 50 + 51 + #define S3C24XX_PA_IRQ S3C2400_PA_IRQ 52 + #define S3C24XX_PA_MEMCTRL S3C2400_PA_MEMCTRL 53 + #define S3C24XX_PA_USBHOST S3C2400_PA_USBHOST 54 + #define S3C24XX_PA_DMA S3C2400_PA_DMA 55 + #define S3C24XX_PA_CLKPWR S3C2400_PA_CLKPWR 56 + #define S3C24XX_PA_LCD S3C2400_PA_LCD 57 + #define S3C24XX_PA_UART S3C2400_PA_UART 58 + #define S3C24XX_PA_TIMER S3C2400_PA_TIMER 59 + #define S3C24XX_PA_USBDEV S3C2400_PA_USBDEV 60 + #define S3C24XX_PA_WATCHDOG S3C2400_PA_WATCHDOG 61 + #define S3C24XX_PA_IIC S3C2400_PA_IIC 62 + #define S3C24XX_PA_IIS S3C2400_PA_IIS 63 + #define S3C24XX_PA_GPIO S3C2400_PA_GPIO 64 + #define S3C24XX_PA_RTC S3C2400_PA_RTC 65 + #define S3C24XX_PA_ADC S3C2400_PA_ADC 66 + #define S3C24XX_PA_SPI S3C2400_PA_SPI
+23
include/asm-arm/arch-s3c2400/memory.h
··· 1 + /* linux/include/asm-arm/arch-s3c2400/memory.h 2 + * from linux/include/asm-arm/arch-rpc/memory.h 3 + * 4 + * Copyright 2007 Simtec Electronics 5 + * http://armlinux.simtec.co.uk/ 6 + * Ben Dooks <ben@simtec.co.uk> 7 + * 8 + * Copyright (C) 1996,1997,1998 Russell King. 9 + * 10 + * This program is free software; you can redistribute it and/or modify 11 + * it under the terms of the GNU General Public License version 2 as 12 + * published by the Free Software Foundation. 13 + */ 14 + 15 + #ifndef __ASM_ARCH_MEMORY_H 16 + #define __ASM_ARCH_MEMORY_H 17 + 18 + #define PHYS_OFFSET UL(0x0C000000) 19 + 20 + #define __virt_to_bus(x) __virt_to_phys(x) 21 + #define __bus_to_virt(x) __phys_to_virt(x) 22 + 23 + #endif
+43 -41
include/asm-arm/arch-s3c2410/debug-macro.S
··· 13 13 */ 14 14 15 15 #include <asm/arch/map.h> 16 - #include <asm/arch/regs-serial.h> 17 16 #include <asm/arch/regs-gpio.h> 17 + #include <asm/plat-s3c/regs-serial.h> 18 18 19 19 #define S3C2410_UART1_OFF (0x4000) 20 20 #define SHIFT_2440TXF (14-9) 21 21 22 - .macro addruart, rx 22 + .macro addruart, rx 23 23 mrc p15, 0, \rx, c1, c0 24 24 tst \rx, #1 25 25 ldreq \rx, = S3C24XX_PA_UART 26 26 ldrne \rx, = S3C24XX_VA_UART 27 - #if CONFIG_DEBUG_S3C2410_UART != 0 28 - add \rx, \rx, #(S3C2410_UART1_OFF * CONFIG_DEBUG_S3C2410_UART) 27 + #if CONFIG_DEBUG_S3C_UART != 0 28 + add \rx, \rx, #(S3C2410_UART1_OFF * CONFIG_DEBUG_S3C_UART) 29 29 #endif 30 - .endm 30 + .endm 31 31 32 - .macro senduart,rd,rx 33 - strb \rd, [\rx, # S3C2410_UTXH ] 34 - .endm 35 - 36 - .macro busyuart, rd, rx 37 - ldr \rd, [ \rx, # S3C2410_UFCON ] 38 - tst \rd, #S3C2410_UFCON_FIFOMODE @ fifo enabled? 39 - beq 1001f @ 40 - @ FIFO enabled... 41 - 1003: 32 + .macro fifo_full_s3c24xx rd, rx 42 33 @ check for arm920 vs arm926. currently assume all arm926 43 34 @ devices have an 64 byte FIFO identical to the s3c2440 44 35 mrc p15, 0, \rd, c0, c0 ··· 48 57 ldr \rd, [ \rx, # S3C2410_UFSTAT ] 49 58 moveq \rd, \rd, lsr #SHIFT_2440TXF 50 59 tst \rd, #S3C2410_UFSTAT_TXFULL 51 - bne 1003b 52 - b 1002f 60 + .endm 53 61 54 - 1001: 55 - @ busy waiting for non fifo 56 - ldr \rd, [ \rx, # S3C2410_UTRSTAT ] 57 - tst \rd, #S3C2410_UTRSTAT_TXFE 58 - beq 1001b 62 + .macro fifo_full_s3c2410 rd, rx 63 + ldr \rd, [ \rx, # S3C2410_UFSTAT ] 64 + tst \rd, #S3C2410_UFSTAT_TXFULL 65 + .endm 59 66 60 - 1002: @ exit busyuart 61 - .endm 67 + /* fifo level reading */ 62 68 63 - .macro waituart,rd,rx 64 - 65 - ldr \rd, [ \rx, # S3C2410_UFCON ] 66 - tst \rd, #S3C2410_UFCON_FIFOMODE @ fifo enabled? 67 - beq 1001f @ 68 - @ FIFO enabled... 69 - 1003: 69 + .macro fifo_level_s3c24xx rd, rx 70 + @ check for arm920 vs arm926. currently assume all arm926 71 + @ devices have an 64 byte FIFO identical to the s3c2440 72 + mrc p15, 0, \rd, c0, c0 73 + and \rd, \rd, #0xff0 74 + teq \rd, #0x260 75 + beq 10000f 70 76 mrc p15, 0, \rd, c1, c0 71 77 tst \rd, #1 72 78 addeq \rd, \rx, #(S3C24XX_PA_GPIO - S3C24XX_PA_UART) ··· 73 85 and \rd, \rd, #0x00ff0000 74 86 teq \rd, #0x00440000 @ is it 2440? 75 87 88 + 10000: 76 89 ldr \rd, [ \rx, # S3C2410_UFSTAT ] 77 90 andne \rd, \rd, #S3C2410_UFSTAT_TXMASK 78 91 andeq \rd, \rd, #S3C2440_UFSTAT_TXMASK 79 - teq \rd, #0 80 - bne 1003b 81 - b 1002f 92 + .endm 82 93 83 - 1001: 84 - @ idle waiting for non fifo 85 - ldr \rd, [ \rx, # S3C2410_UTRSTAT ] 86 - tst \rd, #S3C2410_UTRSTAT_TXFE 87 - beq 1001b 94 + .macro fifo_level_s3c2410 rd, rx 95 + ldr \rd, [ \rx, # S3C2410_UFSTAT ] 96 + and \rd, \rd, #S3C2410_UFSTAT_TXMASK 97 + .endm 88 98 89 - 1002: @ exit busyuart 90 - .endm 99 + /* Select the correct implementation depending on the configuration. The 100 + * S3C2440 will get selected by default, as these are the most widely 101 + * used variants of these 102 + */ 103 + 104 + #if defined(CONFIG_CPU_LLSERIAL_S3C2410_ONLY) 105 + #define fifo_full fifo_full_s3c2410 106 + #define fifo_level fifo_level_s3c2410 107 + #warning 2410only 108 + #elif !defined(CONFIG_CPU_LLSERIAL_S3C2440_ONLY) 109 + #define fifo_full fifo_full_s3c24xx 110 + #define fifo_level fifo_level_s3c24xx 111 + #warning generic 112 + #endif 113 + 114 + /* include the reset of the code which will do the work */ 115 + 116 + #include <asm/plat-s3c/debug-macro.S>
include/asm-arm/arch-s3c2410/iic.h include/asm-arm/plat-s3c/iic.h
+9 -76
include/asm-arm/arch-s3c2410/map.h
··· 13 13 #ifndef __ASM_ARCH_MAP_H 14 14 #define __ASM_ARCH_MAP_H 15 15 16 - /* we have a bit of a tight squeeze to fit all our registers from 17 - * 0xF00000000 upwards, since we use all of the nGCS space in some 18 - * capacity, and also need to fit the S3C2410 registers in as well... 19 - * 20 - * we try to ensure stuff like the IRQ registers are available for 21 - * an single MOVS instruction (ie, only 8 bits of set data) 22 - * 23 - * Note, we are trying to remove some of these from the implementation 24 - * as they are only useful to certain drivers... 25 - */ 16 + #include <asm/plat-s3c/map.h> 26 17 27 - #ifndef __ASSEMBLY__ 28 - #define S3C2410_ADDR(x) ((void __iomem __force *)0xF0000000 + (x)) 29 - #else 30 - #define S3C2410_ADDR(x) (0xF0000000 + (x)) 31 - #endif 32 - 33 - #define S3C2400_ADDR(x) S3C2410_ADDR(x) 18 + #define S3C2410_ADDR(x) S3C_ADDR(x) 34 19 35 20 /* interrupt controller is the first thing we put in, to make 36 21 * the assembly code for the irq detection easier 37 22 */ 38 - #define S3C24XX_VA_IRQ S3C2410_ADDR(0x00000000) 39 - #define S3C2400_PA_IRQ (0x14400000) 23 + #define S3C24XX_VA_IRQ S3C_VA_IRQ 40 24 #define S3C2410_PA_IRQ (0x4A000000) 41 25 #define S3C24XX_SZ_IRQ SZ_1M 42 26 43 27 /* memory controller registers */ 44 - #define S3C24XX_VA_MEMCTRL S3C2410_ADDR(0x00100000) 45 - #define S3C2400_PA_MEMCTRL (0x14000000) 28 + #define S3C24XX_VA_MEMCTRL S3C_VA_MEM 46 29 #define S3C2410_PA_MEMCTRL (0x48000000) 47 30 #define S3C24XX_SZ_MEMCTRL SZ_1M 48 31 49 32 /* USB host controller */ 50 - #define S3C2400_PA_USBHOST (0x14200000) 51 33 #define S3C2410_PA_USBHOST (0x49000000) 52 34 #define S3C24XX_SZ_USBHOST SZ_1M 53 35 54 36 /* DMA controller */ 55 - #define S3C2400_PA_DMA (0x14600000) 56 37 #define S3C2410_PA_DMA (0x4B000000) 57 38 #define S3C24XX_SZ_DMA SZ_1M 58 39 59 40 /* Clock and Power management */ 60 - #define S3C24XX_VA_CLKPWR S3C2410_ADDR(0x00200000) 61 - #define S3C2400_PA_CLKPWR (0x14800000) 41 + #define S3C24XX_VA_CLKPWR S3C_VA_SYS 62 42 #define S3C2410_PA_CLKPWR (0x4C000000) 63 43 #define S3C24XX_SZ_CLKPWR SZ_1M 64 44 65 45 /* LCD controller */ 66 - #define S3C24XX_VA_LCD S3C2410_ADDR(0x00300000) 67 - #define S3C2400_PA_LCD (0x14A00000) 68 46 #define S3C2410_PA_LCD (0x4D000000) 69 47 #define S3C24XX_SZ_LCD SZ_1M 70 48 ··· 50 72 #define S3C2410_PA_NAND (0x4E000000) 51 73 #define S3C24XX_SZ_NAND SZ_1M 52 74 53 - /* MMC controller - available on the S3C2400 */ 54 - #define S3C2400_PA_MMC (0x15A00000) 55 - #define S3C2400_SZ_MMC SZ_1M 56 - 57 75 /* UARTs */ 58 - #define S3C24XX_VA_UART S3C2410_ADDR(0x00400000) 59 - #define S3C2400_PA_UART (0x15000000) 76 + #define S3C24XX_VA_UART S3C_VA_UART 60 77 #define S3C2410_PA_UART (0x50000000) 61 78 #define S3C24XX_SZ_UART SZ_1M 62 79 63 80 /* Timers */ 64 - #define S3C24XX_VA_TIMER S3C2410_ADDR(0x00500000) 65 - #define S3C2400_PA_TIMER (0x15100000) 81 + #define S3C24XX_VA_TIMER S3C_VA_TIMER 66 82 #define S3C2410_PA_TIMER (0x51000000) 67 83 #define S3C24XX_SZ_TIMER SZ_1M 68 84 69 85 /* USB Device port */ 70 - #define S3C24XX_VA_USBDEV S3C2410_ADDR(0x00600000) 71 - #define S3C2400_PA_USBDEV (0x15200140) 72 86 #define S3C2410_PA_USBDEV (0x52000000) 73 87 #define S3C24XX_SZ_USBDEV SZ_1M 74 88 75 89 /* Watchdog */ 76 - #define S3C24XX_VA_WATCHDOG S3C2410_ADDR(0x00700000) 77 - #define S3C2400_PA_WATCHDOG (0x15300000) 90 + #define S3C24XX_VA_WATCHDOG S3C_VA_WATCHDOG 78 91 #define S3C2410_PA_WATCHDOG (0x53000000) 79 92 #define S3C24XX_SZ_WATCHDOG SZ_1M 80 93 81 94 /* IIC hardware controller */ 82 - #define S3C2400_PA_IIC (0x15400000) 83 95 #define S3C2410_PA_IIC (0x54000000) 84 96 #define S3C24XX_SZ_IIC SZ_1M 85 97 86 98 /* IIS controller */ 87 - #define S3C2400_PA_IIS (0x15508000) 88 99 #define S3C2410_PA_IIS (0x55000000) 89 100 #define S3C24XX_SZ_IIS SZ_1M 90 101 ··· 83 116 * it is the same distance apart from the UART in the 84 117 * phsyical address space, as the initial mapping for the IO 85 118 * is done as a 1:1 maping. This puts it (currently) at 86 - * 0xF6800000, which is not in the way of any current mapping 119 + * 0xFA800000, which is not in the way of any current mapping 87 120 * by the base system. 88 121 */ 89 122 90 - #define S3C2400_PA_GPIO (0x15600000) 91 123 #define S3C2410_PA_GPIO (0x56000000) 92 124 #define S3C24XX_VA_GPIO ((S3C2410_PA_GPIO - S3C24XX_PA_UART) + S3C24XX_VA_UART) 93 125 #define S3C24XX_SZ_GPIO SZ_1M 94 126 95 127 /* RTC */ 96 - #define S3C2400_PA_RTC (0x15700040) 97 128 #define S3C2410_PA_RTC (0x57000000) 98 129 #define S3C24XX_SZ_RTC SZ_1M 99 130 100 131 /* ADC */ 101 - #define S3C2400_PA_ADC (0x15800000) 102 132 #define S3C2410_PA_ADC (0x58000000) 103 133 #define S3C24XX_SZ_ADC SZ_1M 104 134 105 135 /* SPI */ 106 - #define S3C2400_PA_SPI (0x15900000) 107 136 #define S3C2410_PA_SPI (0x59000000) 108 137 #define S3C24XX_SZ_SPI SZ_1M 109 138 ··· 140 177 141 178 #define S3C2410_SDRAM_PA (S3C2410_CS6) 142 179 143 - #define S3C2400_CS0 (0x00000000) 144 - #define S3C2400_CS1 (0x02000000) 145 - #define S3C2400_CS2 (0x04000000) 146 - #define S3C2400_CS3 (0x06000000) 147 - #define S3C2400_CS4 (0x08000000) 148 - #define S3C2400_CS5 (0x0A000000) 149 - #define S3C2400_CS6 (0x0C000000) 150 - #define S3C2400_CS7 (0x0E000000) 151 - 152 - #define S3C2400_SDRAM_PA (S3C2400_CS6) 153 - 154 180 /* Use a single interface for common resources between S3C24XX cpus */ 155 181 156 - #ifdef CONFIG_CPU_S3C2400 157 - #define S3C24XX_PA_IRQ S3C2400_PA_IRQ 158 - #define S3C24XX_PA_MEMCTRL S3C2400_PA_MEMCTRL 159 - #define S3C24XX_PA_USBHOST S3C2400_PA_USBHOST 160 - #define S3C24XX_PA_DMA S3C2400_PA_DMA 161 - #define S3C24XX_PA_CLKPWR S3C2400_PA_CLKPWR 162 - #define S3C24XX_PA_LCD S3C2400_PA_LCD 163 - #define S3C24XX_PA_UART S3C2400_PA_UART 164 - #define S3C24XX_PA_TIMER S3C2400_PA_TIMER 165 - #define S3C24XX_PA_USBDEV S3C2400_PA_USBDEV 166 - #define S3C24XX_PA_WATCHDOG S3C2400_PA_WATCHDOG 167 - #define S3C24XX_PA_IIC S3C2400_PA_IIC 168 - #define S3C24XX_PA_IIS S3C2400_PA_IIS 169 - #define S3C24XX_PA_GPIO S3C2400_PA_GPIO 170 - #define S3C24XX_PA_RTC S3C2400_PA_RTC 171 - #define S3C24XX_PA_ADC S3C2400_PA_ADC 172 - #define S3C24XX_PA_SPI S3C2400_PA_SPI 173 - #else 174 182 #define S3C24XX_PA_IRQ S3C2410_PA_IRQ 175 183 #define S3C24XX_PA_MEMCTRL S3C2410_PA_MEMCTRL 176 184 #define S3C24XX_PA_USBHOST S3C2410_PA_USBHOST ··· 158 224 #define S3C24XX_PA_RTC S3C2410_PA_RTC 159 225 #define S3C24XX_PA_ADC S3C2410_PA_ADC 160 226 #define S3C24XX_PA_SPI S3C2410_PA_SPI 161 - #endif 162 227 163 228 /* deal with the registers that move under the 2412/2413 */ 164 229
-13
include/asm-arm/arch-s3c2410/memory.h
··· 11 11 #ifndef __ASM_ARCH_MEMORY_H 12 12 #define __ASM_ARCH_MEMORY_H 13 13 14 - /* 15 - * DRAM starts at 0x30000000 for S3C2410/S3C2440 16 - * and at 0x0C000000 for S3C2400 17 - */ 18 - #ifdef CONFIG_CPU_S3C2400 19 - #define PHYS_OFFSET UL(0x0C000000) 20 - #else 21 14 #define PHYS_OFFSET UL(0x30000000) 22 - #endif 23 - 24 - /* 25 - * These are exactly the same on the S3C2410 as the 26 - * physical memory view. 27 - */ 28 15 29 16 #define __virt_to_bus(x) __virt_to_phys(x) 30 17 #define __bus_to_virt(x) __phys_to_virt(x)
include/asm-arm/arch-s3c2410/nand.h include/asm-arm/plat-s3c/nand.h
include/asm-arm/arch-s3c2410/regs-ac97.h include/asm-arm/plat-s3c/regs-ac97.h
include/asm-arm/arch-s3c2410/regs-adc.h include/asm-arm/plat-s3c/regs-adc.h
include/asm-arm/arch-s3c2410/regs-iic.h include/asm-arm/plat-s3c/regs-iic.h
include/asm-arm/arch-s3c2410/regs-iis.h include/asm-arm/plat-s3c24xx/regs-iis.h
+1 -1
include/asm-arm/arch-s3c2410/regs-lcd.h
··· 12 12 #ifndef ___ASM_ARCH_REGS_LCD_H 13 13 #define ___ASM_ARCH_REGS_LCD_H "$Id: lcd.h,v 1.3 2003/06/26 13:25:06 ben Exp $" 14 14 15 - #define S3C2410_LCDREG(x) ((x) + S3C24XX_VA_LCD) 15 + #define S3C2410_LCDREG(x) (x) 16 16 17 17 /* LCD control registers */ 18 18 #define S3C2410_LCDCON1 S3C2410_LCDREG(0x00)
include/asm-arm/arch-s3c2410/regs-nand.h include/asm-arm/plat-s3c/regs-nand.h
include/asm-arm/arch-s3c2410/regs-rtc.h include/asm-arm/plat-s3c/regs-rtc.h
+4 -4
include/asm-arm/arch-s3c2410/regs-serial.h include/asm-arm/plat-s3c/regs-serial.h
··· 32 32 #ifndef __ASM_ARM_REGS_SERIAL_H 33 33 #define __ASM_ARM_REGS_SERIAL_H 34 34 35 - #define S3C24XX_VA_UART0 (S3C24XX_VA_UART) 36 - #define S3C24XX_VA_UART1 (S3C24XX_VA_UART + 0x4000 ) 37 - #define S3C24XX_VA_UART2 (S3C24XX_VA_UART + 0x8000 ) 38 - #define S3C24XX_VA_UART3 (S3C24XX_VA_UART + 0xC000 ) 35 + #define S3C24XX_VA_UART0 (S3C_VA_UART) 36 + #define S3C24XX_VA_UART1 (S3C_VA_UART + 0x4000 ) 37 + #define S3C24XX_VA_UART2 (S3C_VA_UART + 0x8000 ) 38 + #define S3C24XX_VA_UART3 (S3C_VA_UART + 0xC000 ) 39 39 40 40 #define S3C2410_PA_UART0 (S3C24XX_PA_UART) 41 41 #define S3C2410_PA_UART1 (S3C24XX_PA_UART + 0x4000 )
include/asm-arm/arch-s3c2410/regs-spi.h include/asm-arm/plat-s3c24xx/regs-spi.h
+8 -8
include/asm-arm/arch-s3c2410/regs-timer.h include/asm-arm/plat-s3c/regs-timer.h
··· 14 14 #ifndef __ASM_ARCH_REGS_TIMER_H 15 15 #define __ASM_ARCH_REGS_TIMER_H "$Id: timer.h,v 1.4 2003/05/06 19:30:50 ben Exp $" 16 16 17 - #define S3C2410_TIMERREG(x) (S3C24XX_VA_TIMER + (x)) 18 - #define S3C2410_TIMERREG2(tmr,reg) S3C2410_TIMERREG((reg)+0x0c+((tmr)*0x0c)) 17 + #define S3C_TIMERREG(x) (S3C_VA_TIMER + (x)) 18 + #define S3C_TIMERREG2(tmr,reg) S3C_TIMERREG((reg)+0x0c+((tmr)*0x0c)) 19 19 20 - #define S3C2410_TCFG0 S3C2410_TIMERREG(0x00) 21 - #define S3C2410_TCFG1 S3C2410_TIMERREG(0x04) 22 - #define S3C2410_TCON S3C2410_TIMERREG(0x08) 20 + #define S3C2410_TCFG0 S3C_TIMERREG(0x00) 21 + #define S3C2410_TCFG1 S3C_TIMERREG(0x04) 22 + #define S3C2410_TCON S3C_TIMERREG(0x08) 23 23 24 24 #define S3C2410_TCFG_PRESCALER0_MASK (255<<0) 25 25 #define S3C2410_TCFG_PRESCALER1_MASK (255<<8) ··· 71 71 72 72 /* WARNING - timer 4 has no buffer reg, and it's observation is at +4 */ 73 73 74 - #define S3C2410_TCNTB(tmr) S3C2410_TIMERREG2(tmr, 0x00) 75 - #define S3C2410_TCMPB(tmr) S3C2410_TIMERREG2(tmr, 0x04) 76 - #define S3C2410_TCNTO(tmr) S3C2410_TIMERREG2(tmr, (((tmr) == 4) ? 0x04 : 0x08)) 74 + #define S3C2410_TCNTB(tmr) S3C_TIMERREG2(tmr, 0x00) 75 + #define S3C2410_TCMPB(tmr) S3C_TIMERREG2(tmr, 0x04) 76 + #define S3C2410_TCNTO(tmr) S3C_TIMERREG2(tmr, (((tmr) == 4) ? 0x04 : 0x08)) 77 77 78 78 #define S3C2410_TCON_T4RELOAD (1<<22) 79 79 #define S3C2410_TCON_T4MANUALUPD (1<<21)
include/asm-arm/arch-s3c2410/regs-udc.h include/asm-arm/plat-s3c24xx/regs-udc.h
+4 -4
include/asm-arm/arch-s3c2410/regs-watchdog.h include/asm-arm/plat-s3c/regs-watchdog.h
··· 14 14 #ifndef __ASM_ARCH_REGS_WATCHDOG_H 15 15 #define __ASM_ARCH_REGS_WATCHDOG_H "$Id: watchdog.h,v 1.2 2003/04/29 13:31:09 ben Exp $" 16 16 17 - #define S3C2410_WDOGREG(x) ((x) + S3C24XX_VA_WATCHDOG) 17 + #define S3C_WDOGREG(x) ((x) + S3C_VA_WATCHDOG) 18 18 19 - #define S3C2410_WTCON S3C2410_WDOGREG(0x00) 20 - #define S3C2410_WTDAT S3C2410_WDOGREG(0x04) 21 - #define S3C2410_WTCNT S3C2410_WDOGREG(0x08) 19 + #define S3C2410_WTCON S3C_WDOGREG(0x00) 20 + #define S3C2410_WTDAT S3C_WDOGREG(0x04) 21 + #define S3C2410_WTCNT S3C_WDOGREG(0x08) 22 22 23 23 /* the watchdog can either generate a reset pulse, or an 24 24 * interrupt.
+1 -1
include/asm-arm/arch-s3c2410/system.h
··· 17 17 #include <asm/arch/idle.h> 18 18 #include <asm/arch/reset.h> 19 19 20 - #include <asm/arch/regs-watchdog.h> 20 + #include <asm/plat-s3c/regs-watchdog.h> 21 21 #include <asm/arch/regs-clock.h> 22 22 23 23 void (*s3c24xx_idle)(void);
include/asm-arm/arch-s3c2410/udc.h include/asm-arm/plat-s3c24xx/udc.h
+17 -130
include/asm-arm/arch-s3c2410/uncompress.h
··· 1 1 /* linux/include/asm-arm/arch-s3c2410/uncompress.h 2 2 * 3 - * Copyright (c) 2003 Simtec Electronics 3 + * Copyright (c) 2003, 2007 Simtec Electronics 4 + * http://armlinux.simtec.co.uk/ 4 5 * Ben Dooks <ben@simtec.co.uk> 5 6 * 6 7 * S3C2410 - uncompress code ··· 14 13 #ifndef __ASM_ARCH_UNCOMPRESS_H 15 14 #define __ASM_ARCH_UNCOMPRESS_H 16 15 17 - typedef unsigned int upf_t; /* cannot include linux/serial_core.h */ 18 - 19 - /* defines for UART registers */ 20 - #include "asm/arch/regs-serial.h" 21 - #include "asm/arch/regs-gpio.h" 22 - #include "asm/arch/regs-watchdog.h" 23 - 16 + #include <asm/arch/regs-gpio.h> 24 17 #include <asm/arch/map.h> 25 18 26 19 /* working in physical space... */ 27 20 #undef S3C2410_GPIOREG 28 - #undef S3C2410_WDOGREG 29 - 30 21 #define S3C2410_GPIOREG(x) ((S3C24XX_PA_GPIO + (x))) 31 - #define S3C2410_WDOGREG(x) ((S3C24XX_PA_WATCHDOG + (x))) 32 22 33 - /* how many bytes we allow into the FIFO at a time in FIFO mode */ 34 - #define FIFO_MAX (14) 23 + #include <asm/plat-s3c/uncompress.h> 35 24 36 - #define uart_base S3C24XX_PA_UART + (0x4000*CONFIG_S3C2410_LOWLEVEL_UART_PORT) 37 - 38 - static __inline__ void 39 - uart_wr(unsigned int reg, unsigned int val) 25 + static inline int is_arm926(void) 40 26 { 41 - volatile unsigned int *ptr; 27 + unsigned int cpuid; 42 28 43 - ptr = (volatile unsigned int *)(reg + uart_base); 44 - *ptr = val; 29 + asm volatile ("mrc p15, 0, %0, c1, c0, 0" : "=r" (cpuid)); 30 + 31 + return ((cpuid & 0xff0) == 0x260); 45 32 } 46 33 47 - static __inline__ unsigned int 48 - uart_rd(unsigned int reg) 34 + static void arch_detect_cpu(void) 49 35 { 50 - volatile unsigned int *ptr; 36 + unsigned int cpuid; 51 37 52 - ptr = (volatile unsigned int *)(reg + uart_base); 53 - return *ptr; 54 - } 55 - 56 - 57 - /* we can deal with the case the UARTs are being run 58 - * in FIFO mode, so that we don't hold up our execution 59 - * waiting for tx to happen... 60 - */ 61 - 62 - static void putc(int ch) 63 - { 64 - int cpuid = S3C2410_GSTATUS1_2410; 65 - 66 - #ifndef CONFIG_CPU_S3C2400 67 38 cpuid = *((volatile unsigned int *)S3C2410_GSTATUS1); 68 39 cpuid &= S3C2410_GSTATUS1_IDMASK; 69 - #endif 70 40 71 - if (uart_rd(S3C2410_UFCON) & S3C2410_UFCON_FIFOMODE) { 72 - int level; 73 - 74 - while (1) { 75 - level = uart_rd(S3C2410_UFSTAT); 76 - 77 - if (cpuid == S3C2410_GSTATUS1_2440 || 78 - cpuid == S3C2410_GSTATUS1_2442) { 79 - level &= S3C2440_UFSTAT_TXMASK; 80 - level >>= S3C2440_UFSTAT_TXSHIFT; 81 - } else { 82 - level &= S3C2410_UFSTAT_TXMASK; 83 - level >>= S3C2410_UFSTAT_TXSHIFT; 84 - } 85 - 86 - if (level < FIFO_MAX) 87 - break; 88 - } 89 - 41 + if (is_arm926() || cpuid == S3C2410_GSTATUS1_2440 || 42 + cpuid == S3C2410_GSTATUS1_2442) { 43 + fifo_mask = S3C2440_UFSTAT_TXMASK; 44 + fifo_max = 63 << S3C2440_UFSTAT_TXSHIFT; 90 45 } else { 91 - /* not using fifos */ 92 - 93 - while ((uart_rd(S3C2410_UTRSTAT) & S3C2410_UTRSTAT_TXE) != S3C2410_UTRSTAT_TXE) 94 - barrier(); 46 + fifo_mask = S3C2410_UFSTAT_TXMASK; 47 + fifo_max = 15 << S3C2410_UFSTAT_TXSHIFT; 95 48 } 96 - 97 - /* write byte to transmission register */ 98 - uart_wr(S3C2410_UTXH, ch); 99 49 } 100 - 101 - static inline void flush(void) 102 - { 103 - } 104 - 105 - #define __raw_writel(d,ad) do { *((volatile unsigned int *)(ad)) = (d); } while(0) 106 - 107 - /* CONFIG_S3C2410_BOOT_WATCHDOG 108 - * 109 - * Simple boot-time watchdog setup, to reboot the system if there is 110 - * any problem with the boot process 111 - */ 112 - 113 - #ifdef CONFIG_S3C2410_BOOT_WATCHDOG 114 - 115 - #define WDOG_COUNT (0xff00) 116 - 117 - static inline void arch_decomp_wdog(void) 118 - { 119 - __raw_writel(WDOG_COUNT, S3C2410_WTCNT); 120 - } 121 - 122 - static void arch_decomp_wdog_start(void) 123 - { 124 - __raw_writel(WDOG_COUNT, S3C2410_WTDAT); 125 - __raw_writel(WDOG_COUNT, S3C2410_WTCNT); 126 - __raw_writel(S3C2410_WTCON_ENABLE | S3C2410_WTCON_DIV128 | S3C2410_WTCON_RSTEN | S3C2410_WTCON_PRESCALE(0x80), S3C2410_WTCON); 127 - } 128 - 129 - #else 130 - #define arch_decomp_wdog_start() 131 - #define arch_decomp_wdog() 132 - #endif 133 - 134 - #ifdef CONFIG_S3C2410_BOOT_ERROR_RESET 135 - 136 - static void arch_decomp_error(const char *x) 137 - { 138 - putstr("\n\n"); 139 - putstr(x); 140 - putstr("\n\n -- System resetting\n"); 141 - 142 - __raw_writel(0x4000, S3C2410_WTDAT); 143 - __raw_writel(0x4000, S3C2410_WTCNT); 144 - __raw_writel(S3C2410_WTCON_ENABLE | S3C2410_WTCON_DIV128 | S3C2410_WTCON_RSTEN | S3C2410_WTCON_PRESCALE(0x40), S3C2410_WTCON); 145 - 146 - while(1); 147 - } 148 - 149 - #define arch_error arch_decomp_error 150 - #endif 151 - 152 - static void error(char *err); 153 - 154 - static void 155 - arch_decomp_setup(void) 156 - { 157 - /* we may need to setup the uart(s) here if we are not running 158 - * on an BAST... the BAST will have left the uarts configured 159 - * after calling linux. 160 - */ 161 - 162 - arch_decomp_wdog_start(); 163 - } 164 - 165 50 166 51 #endif /* __ASM_ARCH_UNCOMPRESS_H */
+27
include/asm-arm/arch-sa1100/jornada720.h
··· 1 + /* 2 + * include/asm-arm/arch-sa1100/jornada720.h 3 + * 4 + * This file contains SSP/MCU communication definitions for HP Jornada 710/720/728 5 + * 6 + * Copyright (C) 2007 Kristoffer Ericson <Kristoffer.Ericson@gmail.com> 7 + * Copyright (C) 2000 John Ankcorn <jca@lcs.mit.edu> 8 + * 9 + * This program is free software; you can redistribute it and/or modify 10 + * it under the terms of the GNU General Public License version 2 as 11 + * published by the Free Software Foundation. 12 + * 13 + */ 14 + 15 + /* HP Jornada 7xx microprocessor commands */ 16 + #define GETBATTERYDATA 0xc0 17 + #define GETSCANKEYCODE 0x90 18 + #define GETTOUCHSAMPLES 0xa0 19 + #define GETCONTRAST 0xD0 20 + #define SETCONTRAST 0xD1 21 + #define GETBRIGHTNESS 0xD2 22 + #define SETBRIGHTNESS 0xD3 23 + #define CONTRASTOFF 0xD8 24 + #define BRIGHTNESSOFF 0xD9 25 + #define PWMOFF 0xDF 26 + #define TXDUMMY 0x11 27 + #define ERRORCODE 0x00
+2 -1
include/asm-arm/elf.h
··· 1 1 #ifndef __ASMARM_ELF_H 2 2 #define __ASMARM_ELF_H 3 3 4 + #include <asm/hwcap.h> 5 + 4 6 #ifndef __ASSEMBLY__ 5 7 /* 6 8 * ELF register definitions.. 7 9 */ 8 10 #include <asm/ptrace.h> 9 11 #include <asm/user.h> 10 - #include <asm/hwcap.h> 11 12 12 13 typedef unsigned long elf_greg_t; 13 14 typedef unsigned long elf_freg_t[3];
+12 -6
include/asm-arm/floppy.h
··· 30 30 #define fd_disable_irq() disable_irq(IRQ_FLOPPYDISK) 31 31 #define fd_enable_irq() enable_irq(IRQ_FLOPPYDISK) 32 32 33 + static inline int fd_dma_setup(void *data, unsigned int length, 34 + unsigned int mode, unsigned long addr) 35 + { 36 + set_dma_mode(DMA_FLOPPY, mode); 37 + __set_dma_addr(DMA_FLOPPY, data); 38 + set_dma_count(DMA_FLOPPY, length); 39 + virtual_dma_port = addr; 40 + enable_dma(DMA_FLOPPY); 41 + return 0; 42 + } 43 + #define fd_dma_setup fd_dma_setup 44 + 33 45 #define fd_request_dma() request_dma(DMA_FLOPPY,"floppy") 34 46 #define fd_free_dma() free_dma(DMA_FLOPPY) 35 47 #define fd_disable_dma() disable_dma(DMA_FLOPPY) 36 - #define fd_enable_dma() enable_dma(DMA_FLOPPY) 37 - #define fd_clear_dma_ff() clear_dma_ff(DMA_FLOPPY) 38 - #define fd_set_dma_mode(mode) set_dma_mode(DMA_FLOPPY, (mode)) 39 - #define fd_set_dma_addr(addr) set_dma_addr(DMA_FLOPPY, virt_to_bus((addr))) 40 - #define fd_set_dma_count(len) set_dma_count(DMA_FLOPPY, (len)) 41 - #define fd_cacheflush(addr,sz) 42 48 43 49 /* need to clean up dma.h */ 44 50 #define DMA_FLOPPYDISK DMA_FLOPPY
+33
include/asm-arm/hardware/iop3xx.h
··· 194 194 #define IOP_TMR_PRIVILEGED 0x08 195 195 #define IOP_TMR_RATIO_1_1 0x00 196 196 197 + /* Watchdog timer definitions */ 198 + #define IOP_WDTCR_EN_ARM 0x1e1e1e1e 199 + #define IOP_WDTCR_EN 0xe1e1e1e1 200 + /* iop3xx does not support stopping the watchdog, so we just re-arm */ 201 + #define IOP_WDTCR_DIS_ARM (IOP_WDTCR_EN_ARM) 202 + #define IOP_WDTCR_DIS (IOP_WDTCR_EN) 203 + 197 204 /* Application accelerator unit */ 198 205 #define IOP3XX_AAU_PHYS_BASE (IOP3XX_PERIPHERAL_PHYS_BASE + 0x800) 199 206 #define IOP3XX_AAU_UPPER_PA (IOP3XX_AAU_PHYS_BASE + 0xa7) ··· 279 272 static inline void write_tisr(u32 val) 280 273 { 281 274 asm volatile("mcr p6, 0, %0, c6, c1, 0" : : "r" (val)); 275 + } 276 + 277 + static inline u32 read_wdtcr(void) 278 + { 279 + u32 val; 280 + asm volatile("mrc p6, 0, %0, c7, c1, 0":"=r" (val)); 281 + return val; 282 + } 283 + static inline void write_wdtcr(u32 val) 284 + { 285 + asm volatile("mcr p6, 0, %0, c7, c1, 0"::"r" (val)); 286 + } 287 + 288 + extern unsigned long get_iop_tick_rate(void); 289 + 290 + /* only iop13xx has these registers, we define these to present a 291 + * common register interface for the iop_wdt driver. 292 + */ 293 + #define IOP_RCSR_WDT (0) 294 + static inline u32 read_rcsr(void) 295 + { 296 + return 0; 297 + } 298 + static inline void write_wdtsr(u32 val) 299 + { 300 + do { } while (0); 282 301 } 283 302 284 303 extern struct platform_device iop3xx_dma_0_channel;
+2 -1
include/asm-arm/pgtable-nommu.h
··· 102 102 #define v4_tlb_fns (0) 103 103 #define v4wb_tlb_fns (0) 104 104 #define v4wbi_tlb_fns (0) 105 - #define v6_tlb_fns (0) 105 + #define v6wbi_tlb_fns (0) 106 + #define v7wbi_tlb_fns (0) 106 107 107 108 #define v3_user_fns (0) 108 109 #define v4_user_fns (0)
+75
include/asm-arm/plat-s3c/debug-macro.S
··· 1 + /* linux/include/asm-arm/plat-s3c/debug-macro.S 2 + * 3 + * Copyright 2005, 2007 Simtec Electronics 4 + * http://armlinux.simtec.co.uk/ 5 + * Ben Dooks <ben@simtec.co.uk> 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 + #include <asm/plat-s3c/regs-serial.h> 13 + 14 + /* The S3C2440 implementations are used by default as they are the 15 + * most widely re-used */ 16 + 17 + .macro fifo_level_s3c2440 rd, rx 18 + ldr \rd, [ \rx, # S3C2410_UFSTAT ] 19 + and \rd, \rd, #S3C2440_UFSTAT_TXMASK 20 + .endm 21 + 22 + #ifndef fifo_level 23 + #define fifo_level fifo_level_s3c2410 24 + #endif 25 + 26 + .macro fifo_full_s3c2440 rd, rx 27 + ldr \rd, [ \rx, # S3C2410_UFSTAT ] 28 + tst \rd, #S3C2440_UFSTAT_TXFULL 29 + .endm 30 + 31 + #ifndef fifo_full 32 + #define fifo_full fifo_full_s3c2440 33 + #endif 34 + 35 + .macro senduart,rd,rx 36 + strb \rd, [\rx, # S3C2410_UTXH ] 37 + .endm 38 + 39 + .macro busyuart, rd, rx 40 + ldr \rd, [ \rx, # S3C2410_UFCON ] 41 + tst \rd, #S3C2410_UFCON_FIFOMODE @ fifo enabled? 42 + beq 1001f @ 43 + @ FIFO enabled... 44 + 1003: 45 + fifo_full \rd, \rx 46 + bne 1003b 47 + b 1002f 48 + 49 + 1001: 50 + @ busy waiting for non fifo 51 + ldr \rd, [ \rx, # S3C2410_UTRSTAT ] 52 + tst \rd, #S3C2410_UTRSTAT_TXFE 53 + beq 1001b 54 + 55 + 1002: @ exit busyuart 56 + .endm 57 + 58 + .macro waituart,rd,rx 59 + ldr \rd, [ \rx, # S3C2410_UFCON ] 60 + tst \rd, #S3C2410_UFCON_FIFOMODE @ fifo enabled? 61 + beq 1001f @ 62 + @ FIFO enabled... 63 + 1003: 64 + fifo_level \rd, \rx 65 + teq \rd, #0 66 + bne 1003b 67 + b 1002f 68 + 1001: 69 + @ idle waiting for non fifo 70 + ldr \rd, [ \rx, # S3C2410_UTRSTAT ] 71 + tst \rd, #S3C2410_UTRSTAT_TXFE 72 + beq 1001b 73 + 74 + 1002: @ exit busyuart 75 + .endm
+40
include/asm-arm/plat-s3c/map.h
··· 1 + /* linux/include/asm-arm/plat-s3c/map.h 2 + * 3 + * Copyright 2003, 2007 Simtec Electronics 4 + * http://armlinux.simtec.co.uk/ 5 + * Ben Dooks <ben@simtec.co.uk> 6 + * 7 + * S3C - Memory map definitions (virtual addresses) 8 + * 9 + * This program is free software; you can redistribute it and/or modify 10 + * it under the terms of the GNU General Public License version 2 as 11 + * published by the Free Software Foundation. 12 + */ 13 + 14 + #ifndef __ASM_PLAT_MAP_H 15 + #define __ASM_PLAT_MAP_H __FILE__ 16 + 17 + /* Fit all our registers in at 0xF4000000 upwards, trying to use as 18 + * little of the VA space as possible so vmalloc and friends have a 19 + * better chance of getting memory. 20 + * 21 + * we try to ensure stuff like the IRQ registers are available for 22 + * an single MOVS instruction (ie, only 8 bits of set data) 23 + */ 24 + 25 + #define S3C_ADDR_BASE (0xF4000000) 26 + 27 + #ifndef __ASSEMBLY__ 28 + #define S3C_ADDR(x) ((void __iomem __force *)S3C_ADDR_BASE + (x)) 29 + #else 30 + #define S3C_ADDR(x) (S3C_ADDR_BASE + (x)) 31 + #endif 32 + 33 + #define S3C_VA_IRQ S3C_ADDR(0x000000000) /* irq controller(s) */ 34 + #define S3C_VA_SYS S3C_ADDR(0x001000000) /* system control */ 35 + #define S3C_VA_MEM S3C_ADDR(0x002000000) /* system control */ 36 + #define S3C_VA_TIMER S3C_ADDR(0x003000000) /* timer block */ 37 + #define S3C_VA_WATCHDOG S3C_ADDR(0x004000000) /* watchdog */ 38 + #define S3C_VA_UART S3C_ADDR(0x010000000) /* UART */ 39 + 40 + #endif /* __ASM_PLAT_MAP_H */
+155
include/asm-arm/plat-s3c/uncompress.h
··· 1 + /* linux/include/asm-arm/plat-s3c/uncompress.h 2 + * 3 + * Copyright 2003, 2007 Simtec Electronics 4 + * http://armlinux.simtec.co.uk/ 5 + * Ben Dooks <ben@simtec.co.uk> 6 + * 7 + * S3C - uncompress code 8 + * 9 + * This program is free software; you can redistribute it and/or modify 10 + * it under the terms of the GNU General Public License version 2 as 11 + * published by the Free Software Foundation. 12 + */ 13 + 14 + #ifndef __ASM_PLAT_UNCOMPRESS_H 15 + #define __ASM_PLAT_UNCOMPRESS_H 16 + 17 + typedef unsigned int upf_t; /* cannot include linux/serial_core.h */ 18 + 19 + /* uart setup */ 20 + 21 + static unsigned int fifo_mask; 22 + static unsigned int fifo_max; 23 + 24 + /* forward declerations */ 25 + 26 + static void arch_detect_cpu(void); 27 + 28 + /* defines for UART registers */ 29 + 30 + #include "asm/plat-s3c/regs-serial.h" 31 + #include "asm/plat-s3c/regs-watchdog.h" 32 + 33 + /* working in physical space... */ 34 + #undef S3C2410_WDOGREG 35 + #define S3C2410_WDOGREG(x) ((S3C24XX_PA_WATCHDOG + (x))) 36 + 37 + /* how many bytes we allow into the FIFO at a time in FIFO mode */ 38 + #define FIFO_MAX (14) 39 + 40 + #define uart_base S3C24XX_PA_UART + (0x4000*CONFIG_S3C_LOWLEVEL_UART_PORT) 41 + 42 + static __inline__ void 43 + uart_wr(unsigned int reg, unsigned int val) 44 + { 45 + volatile unsigned int *ptr; 46 + 47 + ptr = (volatile unsigned int *)(reg + uart_base); 48 + *ptr = val; 49 + } 50 + 51 + static __inline__ unsigned int 52 + uart_rd(unsigned int reg) 53 + { 54 + volatile unsigned int *ptr; 55 + 56 + ptr = (volatile unsigned int *)(reg + uart_base); 57 + return *ptr; 58 + } 59 + 60 + /* we can deal with the case the UARTs are being run 61 + * in FIFO mode, so that we don't hold up our execution 62 + * waiting for tx to happen... 63 + */ 64 + 65 + static void putc(int ch) 66 + { 67 + if (uart_rd(S3C2410_UFCON) & S3C2410_UFCON_FIFOMODE) { 68 + int level; 69 + 70 + while (1) { 71 + level = uart_rd(S3C2410_UFSTAT); 72 + level &= fifo_mask; 73 + 74 + if (level < fifo_max) 75 + break; 76 + } 77 + 78 + } else { 79 + /* not using fifos */ 80 + 81 + while ((uart_rd(S3C2410_UTRSTAT) & S3C2410_UTRSTAT_TXE) != S3C2410_UTRSTAT_TXE) 82 + barrier(); 83 + } 84 + 85 + /* write byte to transmission register */ 86 + uart_wr(S3C2410_UTXH, ch); 87 + } 88 + 89 + static inline void flush(void) 90 + { 91 + } 92 + 93 + #define __raw_writel(d,ad) do { *((volatile unsigned int *)(ad)) = (d); } while(0) 94 + 95 + /* CONFIG_S3C_BOOT_WATCHDOG 96 + * 97 + * Simple boot-time watchdog setup, to reboot the system if there is 98 + * any problem with the boot process 99 + */ 100 + 101 + #ifdef CONFIG_S3C_BOOT_WATCHDOG 102 + 103 + #define WDOG_COUNT (0xff00) 104 + 105 + static inline void arch_decomp_wdog(void) 106 + { 107 + __raw_writel(WDOG_COUNT, S3C2410_WTCNT); 108 + } 109 + 110 + static void arch_decomp_wdog_start(void) 111 + { 112 + __raw_writel(WDOG_COUNT, S3C2410_WTDAT); 113 + __raw_writel(WDOG_COUNT, S3C2410_WTCNT); 114 + __raw_writel(S3C2410_WTCON_ENABLE | S3C2410_WTCON_DIV128 | S3C2410_WTCON_RSTEN | S3C2410_WTCON_PRESCALE(0x80), S3C2410_WTCON); 115 + } 116 + 117 + #else 118 + #define arch_decomp_wdog_start() 119 + #define arch_decomp_wdog() 120 + #endif 121 + 122 + #ifdef CONFIG_S3C_BOOT_ERROR_RESET 123 + 124 + static void arch_decomp_error(const char *x) 125 + { 126 + putstr("\n\n"); 127 + putstr(x); 128 + putstr("\n\n -- System resetting\n"); 129 + 130 + __raw_writel(0x4000, S3C2410_WTDAT); 131 + __raw_writel(0x4000, S3C2410_WTCNT); 132 + __raw_writel(S3C2410_WTCON_ENABLE | S3C2410_WTCON_DIV128 | S3C2410_WTCON_RSTEN | S3C2410_WTCON_PRESCALE(0x40), S3C2410_WTCON); 133 + 134 + while(1); 135 + } 136 + 137 + #define arch_error arch_decomp_error 138 + #endif 139 + 140 + static void error(char *err); 141 + 142 + static void 143 + arch_decomp_setup(void) 144 + { 145 + /* we may need to setup the uart(s) here if we are not running 146 + * on an BAST... the BAST will have left the uarts configured 147 + * after calling linux. 148 + */ 149 + 150 + arch_detect_cpu(); 151 + arch_decomp_wdog_start(); 152 + } 153 + 154 + 155 + #endif /* __ASM_PLAT_UNCOMPRESS_H */
-1
include/asm-arm/thread_info.h
··· 24 24 struct task_struct; 25 25 struct exec_domain; 26 26 27 - #include <asm/ptrace.h> 28 27 #include <asm/types.h> 29 28 #include <asm/domain.h> 30 29
-1
include/asm-arm/unistd.h
··· 441 441 /* 442 442 * Unimplemented (or alternatively implemented) syscalls 443 443 */ 444 - #define __IGNORE_sync_file_range 1 445 444 #define __IGNORE_fadvise64_64 1 446 445 447 446 #endif /* __KERNEL__ */
+2 -2
include/asm-arm/vfp.h
··· 26 26 #define FPSID_REV_MASK (0xF << FPSID_REV_BIT) 27 27 28 28 /* FPEXC bits */ 29 - #define FPEXC_EXCEPTION (1<<31) 30 - #define FPEXC_ENABLE (1<<30) 29 + #define FPEXC_EX (1 << 31) 30 + #define FPEXC_EN (1 << 30) 31 31 32 32 /* FPSCR bits */ 33 33 #define FPSCR_DEFAULT_NAN (1<<25)