aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/arm/00-INDEX22
-rw-r--r--arch/arm/Kconfig17
-rw-r--r--arch/arm/Kconfig-nommu2
-rw-r--r--arch/arm/Makefile2
-rw-r--r--arch/arm/common/dmabounce.c4
-rw-r--r--arch/arm/configs/omap_h2_1610_defconfig399
-rw-r--r--arch/arm/configs/omap_osk_5912_defconfig1073
-rw-r--r--arch/arm/kernel/calls.S1
-rw-r--r--arch/arm/kernel/relocate_kernel.S29
-rw-r--r--arch/arm/kernel/setup.c51
-rw-r--r--arch/arm/mach-at91/Kconfig25
-rw-r--r--arch/arm/mach-at91/Makefile5
-rw-r--r--arch/arm/mach-at91/at91rm9200_time.c195
-rw-r--r--arch/arm/mach-at91/at91x40.c67
-rw-r--r--arch/arm/mach-at91/at91x40_time.c80
-rw-r--r--arch/arm/mach-at91/board-eb01.c44
-rw-r--r--arch/arm/mach-at91/generic.h3
-rw-r--r--arch/arm/mach-clps7500/core.c6
-rw-r--r--arch/arm/mach-ep93xx/Kconfig6
-rw-r--r--arch/arm/mach-ep93xx/Makefile1
-rw-r--r--arch/arm/mach-ep93xx/edb9307.c91
-rw-r--r--arch/arm/mach-footbridge/isa.c45
-rw-r--r--arch/arm/mach-ns9xxx/Makefile2
-rw-r--r--arch/arm/mach-ns9xxx/board-a9m9750dev.c70
-rw-r--r--arch/arm/mach-ns9xxx/gpio.c190
-rw-r--r--arch/arm/mach-ns9xxx/irq.c50
-rw-r--r--arch/arm/mach-ns9xxx/time.c172
-rw-r--r--arch/arm/mach-omap1/Kconfig38
-rw-r--r--arch/arm/mach-omap1/Makefile3
-rw-r--r--arch/arm/mach-omap1/board-ams-delta.c120
-rw-r--r--arch/arm/mach-omap1/board-h2.c79
-rw-r--r--arch/arm/mach-omap1/board-h3.c41
-rw-r--r--arch/arm/mach-omap1/board-nokia770.c98
-rw-r--r--arch/arm/mach-omap1/board-osk.c55
-rw-r--r--arch/arm/mach-omap1/board-palmte.c377
-rw-r--r--arch/arm/mach-omap1/board-palmtt.c357
-rw-r--r--arch/arm/mach-omap1/board-palmz71.c383
-rw-r--r--arch/arm/mach-omap1/board-sx1.c494
-rw-r--r--arch/arm/mach-omap1/board-voiceblue.c2
-rw-r--r--arch/arm/mach-omap1/clock.c34
-rw-r--r--arch/arm/mach-omap1/clock.h35
-rw-r--r--arch/arm/mach-omap1/leds-innovator.c3
-rw-r--r--arch/arm/mach-omap1/mux.c24
-rw-r--r--arch/arm/mach-omap1/pm.c5
-rw-r--r--arch/arm/mach-omap2/Kconfig11
-rw-r--r--arch/arm/mach-omap2/Makefile1
-rw-r--r--arch/arm/mach-omap2/board-2430sdp.c218
-rw-r--r--arch/arm/mach-omap2/board-apollon.c99
-rw-r--r--arch/arm/mach-omap2/board-h4.c46
-rw-r--r--arch/arm/mach-omap2/devices.c6
-rw-r--r--arch/arm/mach-omap2/gpmc.c47
-rw-r--r--arch/arm/mach-omap2/id.c6
-rw-r--r--arch/arm/mach-omap2/io.c22
-rw-r--r--arch/arm/mach-omap2/irq.c19
-rw-r--r--arch/arm/mach-omap2/memory.c18
-rw-r--r--arch/arm/mach-omap2/mux.c38
-rw-r--r--arch/arm/mach-omap2/usb-tusb6010.c349
-rw-r--r--arch/arm/mach-s3c2410/dma.c2
-rw-r--r--arch/arm/mach-s3c2412/dma.c2
-rw-r--r--arch/arm/mach-s3c2412/irq.c58
-rw-r--r--arch/arm/mach-s3c2412/s3c2412.c5
-rw-r--r--arch/arm/mach-s3c2440/dma.c2
-rw-r--r--arch/arm/mach-s3c2443/dma.c2
-rw-r--r--arch/arm/mach-s3c2443/irq.c4
-rw-r--r--arch/arm/mm/consistent.c4
-rw-r--r--arch/arm/nwfpe/ARM-gcc.h2
-rw-r--r--arch/arm/nwfpe/entry.S25
-rw-r--r--arch/arm/nwfpe/fpa11.inl8
-rw-r--r--arch/arm/plat-omap/Kconfig9
-rw-r--r--arch/arm/plat-omap/Makefile1
-rw-r--r--arch/arm/plat-omap/debug-devices.c86
-rw-r--r--arch/arm/plat-omap/dma.c6
-rw-r--r--arch/arm/plat-s3c24xx/dma.c2
-rw-r--r--arch/arm/plat-s3c24xx/sleep.S8
-rw-r--r--include/asm-arm/arch-ixp23xx/platform.h6
-rw-r--r--include/asm-arm/arch-ns9xxx/clock.h6
-rw-r--r--include/asm-arm/arch-ns9xxx/gpio.h47
-rw-r--r--include/asm-arm/arch-ns9xxx/hardware.h47
-rw-r--r--include/asm-arm/arch-ns9xxx/regs-board-a9m9750dev.h4
-rw-r--r--include/asm-arm/arch-ns9xxx/system.h4
-rw-r--r--include/asm-arm/arch-omap/blizzard.h12
-rw-r--r--include/asm-arm/arch-omap/board-2430sdp.h44
-rw-r--r--include/asm-arm/arch-omap/board-palmte.h34
-rw-r--r--include/asm-arm/arch-omap/board-palmtt.h23
-rw-r--r--include/asm-arm/arch-omap/board-palmz71.h26
-rw-r--r--include/asm-arm/arch-omap/board-sx1.h46
-rw-r--r--include/asm-arm/arch-omap/board.h4
-rw-r--r--include/asm-arm/arch-omap/dma.h1
-rw-r--r--include/asm-arm/arch-omap/eac.h101
-rw-r--r--include/asm-arm/arch-omap/gpmc.h5
-rw-r--r--include/asm-arm/arch-omap/hardware.h20
-rw-r--r--include/asm-arm/arch-omap/io.h10
-rw-r--r--include/asm-arm/arch-omap/menelaus.h20
-rw-r--r--include/asm-arm/arch-omap/mmc.h66
-rw-r--r--include/asm-arm/arch-omap/mux.h23
-rw-r--r--include/asm-arm/arch-omap/omap24xx.h12
-rw-r--r--include/asm-arm/arch-omap/onenand.h21
-rw-r--r--include/asm-arm/arch-rpc/uncompress.h72
-rw-r--r--include/asm-arm/arch-s3c2410/irqs.h7
-rw-r--r--include/asm-arm/arch-s3c2410/regs-gpio.h10
-rw-r--r--include/asm-arm/arch-s3c2410/regs-power.h5
-rw-r--r--include/asm-arm/arch-s3c2410/regs-s3c2412.h2
-rw-r--r--include/asm-arm/arch-sa1100/SA-1101.h4
-rw-r--r--include/asm-arm/dma-mapping.h14
-rw-r--r--include/asm-arm/kexec.h2
-rw-r--r--include/asm-arm/unistd.h1
106 files changed, 5988 insertions, 617 deletions
diff --git a/Documentation/arm/00-INDEX b/Documentation/arm/00-INDEX
index 2c6a3b38967e..82e418d648d0 100644
--- a/Documentation/arm/00-INDEX
+++ b/Documentation/arm/00-INDEX
@@ -4,19 +4,29 @@ Booting
4 - requirements for booting 4 - requirements for booting
5Interrupts 5Interrupts
6 - ARM Interrupt subsystem documentation 6 - ARM Interrupt subsystem documentation
7IXP2000
8 - Release Notes for Linux on Intel's IXP2000 Network Processor
7Netwinder 9Netwinder
8 - Netwinder specific documentation 10 - Netwinder specific documentation
11Porting
12 - Symbol definitions for porting Linux to a new ARM machine.
13Setup
14 - Kernel initialization parameters on ARM Linux
9README 15README
10 - General ARM documentation 16 - General ARM documentation
11SA1100 17SA1100/
12 - SA1100 documentation 18 - SA1100 documentation
13XScale 19Samsung-S3C24XX
14 - XScale documentation 20 - S3C24XX ARM Linux Overview
15empeg 21Sharp-LH
16 - Empeg documentation 22 - Linux on Sharp LH79524 and LH7A40X System On a Chip (SOC)
23VFP/
24 - Release notes for Linux Kernel Vector Floating Point support code
25empeg/
26 - Ltd's Empeg MP3 Car Audio Player
17mem_alignment 27mem_alignment
18 - alignment abort handler documentation 28 - alignment abort handler documentation
19memory.txt 29memory.txt
20 - description of the virtual memory layout 30 - description of the virtual memory layout
21nwfpe 31nwfpe/
22 - NWFPE floating point emulator documentation 32 - NWFPE floating point emulator documentation
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index a25697be5fe9..0a0c88d0039c 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -318,6 +318,9 @@ config ARCH_KS8695
318 318
319config ARCH_NS9XXX 319config ARCH_NS9XXX
320 bool "NetSilicon NS9xxx" 320 bool "NetSilicon NS9xxx"
321 select GENERIC_GPIO
322 select GENERIC_TIME
323 select GENERIC_CLOCKEVENTS
321 help 324 help
322 Say Y here if you intend to run this kernel on a NetSilicon NS9xxx 325 Say Y here if you intend to run this kernel on a NetSilicon NS9xxx
323 System. 326 System.
@@ -994,6 +997,10 @@ source "drivers/pnp/Kconfig"
994 997
995source "drivers/block/Kconfig" 998source "drivers/block/Kconfig"
996 999
1000# misc before ide - BLK_DEV_SGIIOC4 depends on SGI_IOC4
1001
1002source "drivers/misc/Kconfig"
1003
997if PCMCIA || ARCH_CLPS7500 || ARCH_IOP32X || ARCH_IOP33X || ARCH_IXP4XX \ 1004if PCMCIA || ARCH_CLPS7500 || ARCH_IOP32X || ARCH_IOP33X || ARCH_IXP4XX \
998 || ARCH_L7200 || ARCH_LH7A40X || ARCH_PXA || ARCH_RPC \ 1005 || ARCH_L7200 || ARCH_LH7A40X || ARCH_PXA || ARCH_RPC \
999 || ARCH_S3C2410 || ARCH_SA1100 || ARCH_SHARK || FOOTBRIDGE \ 1006 || ARCH_S3C2410 || ARCH_SA1100 || ARCH_SHARK || FOOTBRIDGE \
@@ -1029,16 +1036,16 @@ source "drivers/spi/Kconfig"
1029 1036
1030source "drivers/w1/Kconfig" 1037source "drivers/w1/Kconfig"
1031 1038
1039source "drivers/power/Kconfig"
1040
1032source "drivers/hwmon/Kconfig" 1041source "drivers/hwmon/Kconfig"
1033 1042
1034#source "drivers/l3/Kconfig" 1043source "drivers/ssb/Kconfig"
1035 1044
1036source "drivers/misc/Kconfig" 1045#source "drivers/l3/Kconfig"
1037 1046
1038source "drivers/mfd/Kconfig" 1047source "drivers/mfd/Kconfig"
1039 1048
1040source "drivers/leds/Kconfig"
1041
1042source "drivers/media/Kconfig" 1049source "drivers/media/Kconfig"
1043 1050
1044source "drivers/video/Kconfig" 1051source "drivers/video/Kconfig"
@@ -1051,6 +1058,8 @@ source "drivers/usb/Kconfig"
1051 1058
1052source "drivers/mmc/Kconfig" 1059source "drivers/mmc/Kconfig"
1053 1060
1061source "drivers/leds/Kconfig"
1062
1054source "drivers/rtc/Kconfig" 1063source "drivers/rtc/Kconfig"
1055 1064
1056source "drivers/dma/Kconfig" 1065source "drivers/dma/Kconfig"
diff --git a/arch/arm/Kconfig-nommu b/arch/arm/Kconfig-nommu
index f087376748d1..901e6dff8437 100644
--- a/arch/arm/Kconfig-nommu
+++ b/arch/arm/Kconfig-nommu
@@ -26,7 +26,7 @@ config FLASH_SIZE
26 default 0x00400000 26 default 0x00400000
27 27
28config PROCESSOR_ID 28config PROCESSOR_ID
29 hex 29 hex 'Hard wire the processor ID'
30 default 0x00007700 30 default 0x00007700
31 depends on !CPU_CP15 31 depends on !CPU_CP15
32 help 32 help
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index fa4ea9ff0797..6c2d539cd22b 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -12,7 +12,7 @@
12 12
13LDFLAGS_vmlinux :=-p --no-undefined -X 13LDFLAGS_vmlinux :=-p --no-undefined -X
14CPPFLAGS_vmlinux.lds = -DTEXT_OFFSET=$(TEXT_OFFSET) 14CPPFLAGS_vmlinux.lds = -DTEXT_OFFSET=$(TEXT_OFFSET)
15OBJCOPYFLAGS :=-O binary -R .note -R .comment -S 15OBJCOPYFLAGS :=-O binary -R .note -R .note.gnu.build-id -R .comment -S
16GZFLAGS :=-9 16GZFLAGS :=-9
17#CFLAGS +=-pipe 17#CFLAGS +=-pipe
18# Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb: 18# Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb:
diff --git a/arch/arm/common/dmabounce.c b/arch/arm/common/dmabounce.c
index b36b1e8a105d..44ab0dad4035 100644
--- a/arch/arm/common/dmabounce.c
+++ b/arch/arm/common/dmabounce.c
@@ -263,7 +263,7 @@ map_single(struct device *dev, void *ptr, size_t size,
263 * We don't need to sync the DMA buffer since 263 * We don't need to sync the DMA buffer since
264 * it was allocated via the coherent allocators. 264 * it was allocated via the coherent allocators.
265 */ 265 */
266 consistent_sync(ptr, size, dir); 266 dma_cache_maint(ptr, size, dir);
267 } 267 }
268 268
269 return dma_addr; 269 return dma_addr;
@@ -383,7 +383,7 @@ sync_single(struct device *dev, dma_addr_t dma_addr, size_t size,
383 * via the coherent allocators. 383 * via the coherent allocators.
384 */ 384 */
385 } else { 385 } else {
386 consistent_sync(dma_to_virt(dev, dma_addr), size, dir); 386 dma_cache_maint(dma_to_virt(dev, dma_addr), size, dir);
387 } 387 }
388} 388}
389 389
diff --git a/arch/arm/configs/omap_h2_1610_defconfig b/arch/arm/configs/omap_h2_1610_defconfig
index b0efd4ca9935..b8a78ab49cdd 100644
--- a/arch/arm/configs/omap_h2_1610_defconfig
+++ b/arch/arm/configs/omap_h2_1610_defconfig
@@ -1,41 +1,58 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.17 3# Linux kernel version: 2.6.23-rc6
4# Thu Jun 29 15:25:18 2006 4# Mon Sep 17 14:21:45 2007
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_SYS_SUPPORTS_APM_EMULATION=y
8CONFIG_GENERIC_GPIO=y
9CONFIG_GENERIC_TIME=y
10CONFIG_GENERIC_CLOCKEVENTS=y
7CONFIG_MMU=y 11CONFIG_MMU=y
12# CONFIG_NO_IOPORT is not set
13CONFIG_GENERIC_HARDIRQS=y
14CONFIG_STACKTRACE_SUPPORT=y
15CONFIG_LOCKDEP_SUPPORT=y
16CONFIG_TRACE_IRQFLAGS_SUPPORT=y
17CONFIG_HARDIRQS_SW_RESEND=y
18CONFIG_GENERIC_IRQ_PROBE=y
8CONFIG_RWSEM_GENERIC_SPINLOCK=y 19CONFIG_RWSEM_GENERIC_SPINLOCK=y
20# CONFIG_ARCH_HAS_ILOG2_U32 is not set
21# CONFIG_ARCH_HAS_ILOG2_U64 is not set
9CONFIG_GENERIC_HWEIGHT=y 22CONFIG_GENERIC_HWEIGHT=y
10CONFIG_GENERIC_CALIBRATE_DELAY=y 23CONFIG_GENERIC_CALIBRATE_DELAY=y
24CONFIG_ZONE_DMA=y
11CONFIG_VECTORS_BASE=0xffff0000 25CONFIG_VECTORS_BASE=0xffff0000
12CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 26CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
13 27
14# 28#
15# Code maturity level options 29# General setup
16# 30#
17CONFIG_EXPERIMENTAL=y 31CONFIG_EXPERIMENTAL=y
18CONFIG_BROKEN_ON_SMP=y 32CONFIG_BROKEN_ON_SMP=y
19CONFIG_LOCK_KERNEL=y 33CONFIG_LOCK_KERNEL=y
20CONFIG_INIT_ENV_ARG_LIMIT=32 34CONFIG_INIT_ENV_ARG_LIMIT=32
21
22#
23# General setup
24#
25CONFIG_LOCALVERSION="" 35CONFIG_LOCALVERSION=""
26CONFIG_LOCALVERSION_AUTO=y 36CONFIG_LOCALVERSION_AUTO=y
27CONFIG_SWAP=y 37CONFIG_SWAP=y
28CONFIG_SYSVIPC=y 38CONFIG_SYSVIPC=y
39CONFIG_SYSVIPC_SYSCTL=y
29# CONFIG_POSIX_MQUEUE is not set 40# CONFIG_POSIX_MQUEUE is not set
30# CONFIG_BSD_PROCESS_ACCT is not set 41# CONFIG_BSD_PROCESS_ACCT is not set
31CONFIG_SYSCTL=y 42# CONFIG_TASKSTATS is not set
43# CONFIG_USER_NS is not set
32# CONFIG_AUDIT is not set 44# CONFIG_AUDIT is not set
33# CONFIG_IKCONFIG is not set 45# CONFIG_IKCONFIG is not set
46CONFIG_LOG_BUF_SHIFT=14
47# CONFIG_SYSFS_DEPRECATED is not set
34# CONFIG_RELAY is not set 48# CONFIG_RELAY is not set
49CONFIG_BLK_DEV_INITRD=y
35CONFIG_INITRAMFS_SOURCE="" 50CONFIG_INITRAMFS_SOURCE=""
36CONFIG_UID16=y
37CONFIG_CC_OPTIMIZE_FOR_SIZE=y 51CONFIG_CC_OPTIMIZE_FOR_SIZE=y
52CONFIG_SYSCTL=y
38# CONFIG_EMBEDDED is not set 53# CONFIG_EMBEDDED is not set
54CONFIG_UID16=y
55CONFIG_SYSCTL_SYSCALL=y
39CONFIG_KALLSYMS=y 56CONFIG_KALLSYMS=y
40# CONFIG_KALLSYMS_EXTRA_PASS is not set 57# CONFIG_KALLSYMS_EXTRA_PASS is not set
41CONFIG_HOTPLUG=y 58CONFIG_HOTPLUG=y
@@ -44,27 +61,30 @@ CONFIG_BUG=y
44CONFIG_ELF_CORE=y 61CONFIG_ELF_CORE=y
45CONFIG_BASE_FULL=y 62CONFIG_BASE_FULL=y
46CONFIG_FUTEX=y 63CONFIG_FUTEX=y
64CONFIG_ANON_INODES=y
47CONFIG_EPOLL=y 65CONFIG_EPOLL=y
66CONFIG_SIGNALFD=y
67CONFIG_TIMERFD=y
68CONFIG_EVENTFD=y
48CONFIG_SHMEM=y 69CONFIG_SHMEM=y
70CONFIG_VM_EVENT_COUNTERS=y
49CONFIG_SLAB=y 71CONFIG_SLAB=y
72# CONFIG_SLUB is not set
73# CONFIG_SLOB is not set
74CONFIG_RT_MUTEXES=y
50# CONFIG_TINY_SHMEM is not set 75# CONFIG_TINY_SHMEM is not set
51CONFIG_BASE_SMALL=0 76CONFIG_BASE_SMALL=0
52# CONFIG_SLOB is not set
53
54#
55# Loadable module support
56#
57CONFIG_MODULES=y 77CONFIG_MODULES=y
58CONFIG_MODULE_UNLOAD=y 78CONFIG_MODULE_UNLOAD=y
59# CONFIG_MODULE_FORCE_UNLOAD is not set 79# CONFIG_MODULE_FORCE_UNLOAD is not set
60# CONFIG_MODVERSIONS is not set 80# CONFIG_MODVERSIONS is not set
61# CONFIG_MODULE_SRCVERSION_ALL is not set 81# CONFIG_MODULE_SRCVERSION_ALL is not set
62# CONFIG_KMOD is not set 82# CONFIG_KMOD is not set
63 83CONFIG_BLOCK=y
64# 84# CONFIG_LBD is not set
65# Block layer
66#
67# CONFIG_BLK_DEV_IO_TRACE is not set 85# CONFIG_BLK_DEV_IO_TRACE is not set
86# CONFIG_LSF is not set
87# CONFIG_BLK_DEV_BSG is not set
68 88
69# 89#
70# IO Schedulers 90# IO Schedulers
@@ -86,7 +106,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
86# CONFIG_ARCH_INTEGRATOR is not set 106# CONFIG_ARCH_INTEGRATOR is not set
87# CONFIG_ARCH_REALVIEW is not set 107# CONFIG_ARCH_REALVIEW is not set
88# CONFIG_ARCH_VERSATILE is not set 108# CONFIG_ARCH_VERSATILE is not set
89# CONFIG_ARCH_AT91RM9200 is not set 109# CONFIG_ARCH_AT91 is not set
90# CONFIG_ARCH_CLPS7500 is not set 110# CONFIG_ARCH_CLPS7500 is not set
91# CONFIG_ARCH_CLPS711X is not set 111# CONFIG_ARCH_CLPS711X is not set
92# CONFIG_ARCH_CO285 is not set 112# CONFIG_ARCH_CO285 is not set
@@ -96,11 +116,16 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
96# CONFIG_ARCH_NETX is not set 116# CONFIG_ARCH_NETX is not set
97# CONFIG_ARCH_H720X is not set 117# CONFIG_ARCH_H720X is not set
98# CONFIG_ARCH_IMX is not set 118# CONFIG_ARCH_IMX is not set
99# CONFIG_ARCH_IOP3XX is not set 119# CONFIG_ARCH_IOP13XX is not set
100# CONFIG_ARCH_IXP4XX is not set 120# CONFIG_ARCH_IOP32X is not set
101# CONFIG_ARCH_IXP2000 is not set 121# CONFIG_ARCH_IOP33X is not set
102# CONFIG_ARCH_IXP23XX is not set 122# CONFIG_ARCH_IXP23XX is not set
123# CONFIG_ARCH_IXP2000 is not set
124# CONFIG_ARCH_IXP4XX is not set
103# CONFIG_ARCH_L7200 is not set 125# CONFIG_ARCH_L7200 is not set
126# CONFIG_ARCH_KS8695 is not set
127# CONFIG_ARCH_NS9XXX is not set
128# CONFIG_ARCH_MXC is not set
104# CONFIG_ARCH_PNX4008 is not set 129# CONFIG_ARCH_PNX4008 is not set
105# CONFIG_ARCH_PXA is not set 130# CONFIG_ARCH_PXA is not set
106# CONFIG_ARCH_RPC is not set 131# CONFIG_ARCH_RPC is not set
@@ -108,6 +133,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
108# CONFIG_ARCH_S3C2410 is not set 133# CONFIG_ARCH_S3C2410 is not set
109# CONFIG_ARCH_SHARK is not set 134# CONFIG_ARCH_SHARK is not set
110# CONFIG_ARCH_LH7A40X is not set 135# CONFIG_ARCH_LH7A40X is not set
136# CONFIG_ARCH_DAVINCI is not set
111CONFIG_ARCH_OMAP=y 137CONFIG_ARCH_OMAP=y
112 138
113# 139#
@@ -124,6 +150,7 @@ CONFIG_ARCH_OMAP1=y
124CONFIG_OMAP_MUX=y 150CONFIG_OMAP_MUX=y
125# CONFIG_OMAP_MUX_DEBUG is not set 151# CONFIG_OMAP_MUX_DEBUG is not set
126CONFIG_OMAP_MUX_WARNINGS=y 152CONFIG_OMAP_MUX_WARNINGS=y
153CONFIG_OMAP_MCBSP=y
127# CONFIG_OMAP_MPU_TIMER is not set 154# CONFIG_OMAP_MPU_TIMER is not set
128CONFIG_OMAP_32K_TIMER=y 155CONFIG_OMAP_32K_TIMER=y
129CONFIG_OMAP_32K_TIMER_HZ=128 156CONFIG_OMAP_32K_TIMER_HZ=128
@@ -162,6 +189,14 @@ CONFIG_OMAP_ARM_192MHZ=y
162# CONFIG_OMAP_ARM_30MHZ is not set 189# CONFIG_OMAP_ARM_30MHZ is not set
163 190
164# 191#
192# Boot options
193#
194
195#
196# Power management
197#
198
199#
165# Processor Type 200# Processor Type
166# 201#
167CONFIG_CPU_32=y 202CONFIG_CPU_32=y
@@ -171,6 +206,8 @@ CONFIG_CPU_ABRT_EV5TJ=y
171CONFIG_CPU_CACHE_VIVT=y 206CONFIG_CPU_CACHE_VIVT=y
172CONFIG_CPU_COPY_V4WB=y 207CONFIG_CPU_COPY_V4WB=y
173CONFIG_CPU_TLB_V4WBI=y 208CONFIG_CPU_TLB_V4WBI=y
209CONFIG_CPU_CP15=y
210CONFIG_CPU_CP15_MMU=y
174 211
175# 212#
176# Processor Features 213# Processor Features
@@ -180,10 +217,13 @@ CONFIG_ARM_THUMB=y
180# CONFIG_CPU_DCACHE_DISABLE is not set 217# CONFIG_CPU_DCACHE_DISABLE is not set
181# CONFIG_CPU_DCACHE_WRITETHROUGH is not set 218# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
182# CONFIG_CPU_CACHE_ROUND_ROBIN is not set 219# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
220# CONFIG_OUTER_CACHE is not set
183 221
184# 222#
185# Bus support 223# Bus support
186# 224#
225# CONFIG_PCI_SYSCALL is not set
226# CONFIG_ARCH_SUPPORTS_MSI is not set
187 227
188# 228#
189# PCCARD (PCMCIA/CardBus) support 229# PCCARD (PCMCIA/CardBus) support
@@ -193,10 +233,13 @@ CONFIG_ARM_THUMB=y
193# 233#
194# Kernel Features 234# Kernel Features
195# 235#
236CONFIG_TICK_ONESHOT=y
237CONFIG_NO_HZ=y
238CONFIG_HIGH_RES_TIMERS=y
196CONFIG_PREEMPT=y 239CONFIG_PREEMPT=y
197CONFIG_NO_IDLE_HZ=y
198CONFIG_HZ=128 240CONFIG_HZ=128
199# CONFIG_AEABI is not set 241CONFIG_AEABI=y
242CONFIG_OABI_COMPAT=y
200# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set 243# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
201CONFIG_SELECT_MEMORY_MODEL=y 244CONFIG_SELECT_MEMORY_MODEL=y
202CONFIG_FLATMEM_MANUAL=y 245CONFIG_FLATMEM_MANUAL=y
@@ -206,6 +249,10 @@ CONFIG_FLATMEM=y
206CONFIG_FLAT_NODE_MEM_MAP=y 249CONFIG_FLAT_NODE_MEM_MAP=y
207# CONFIG_SPARSEMEM_STATIC is not set 250# CONFIG_SPARSEMEM_STATIC is not set
208CONFIG_SPLIT_PTLOCK_CPUS=4096 251CONFIG_SPLIT_PTLOCK_CPUS=4096
252# CONFIG_RESOURCES_64BIT is not set
253CONFIG_ZONE_DMA_FLAG=1
254CONFIG_BOUNCE=y
255CONFIG_VIRT_TO_BUS=y
209# CONFIG_LEDS is not set 256# CONFIG_LEDS is not set
210CONFIG_ALIGNMENT_TRAP=y 257CONFIG_ALIGNMENT_TRAP=y
211 258
@@ -216,6 +263,7 @@ CONFIG_ZBOOT_ROM_TEXT=0x0
216CONFIG_ZBOOT_ROM_BSS=0x0 263CONFIG_ZBOOT_ROM_BSS=0x0
217CONFIG_CMDLINE="mem=32M console=ttyS0,115200n8 root=0801 ro init=/bin/sh" 264CONFIG_CMDLINE="mem=32M console=ttyS0,115200n8 root=0801 ro init=/bin/sh"
218# CONFIG_XIP_KERNEL is not set 265# CONFIG_XIP_KERNEL is not set
266# CONFIG_KEXEC is not set
219 267
220# 268#
221# CPU Frequency scaling 269# CPU Frequency scaling
@@ -251,7 +299,6 @@ CONFIG_FPE_NWFPE=y
251CONFIG_BINFMT_ELF=y 299CONFIG_BINFMT_ELF=y
252CONFIG_BINFMT_AOUT=y 300CONFIG_BINFMT_AOUT=y
253# CONFIG_BINFMT_MISC is not set 301# CONFIG_BINFMT_MISC is not set
254# CONFIG_ARTHUR is not set
255 302
256# 303#
257# Power management options 304# Power management options
@@ -259,7 +306,10 @@ CONFIG_BINFMT_AOUT=y
259CONFIG_PM=y 306CONFIG_PM=y
260# CONFIG_PM_LEGACY is not set 307# CONFIG_PM_LEGACY is not set
261# CONFIG_PM_DEBUG is not set 308# CONFIG_PM_DEBUG is not set
262# CONFIG_APM is not set 309CONFIG_PM_SLEEP=y
310CONFIG_SUSPEND_UP_POSSIBLE=y
311CONFIG_SUSPEND=y
312# CONFIG_APM_EMULATION is not set
263 313
264# 314#
265# Networking 315# Networking
@@ -269,12 +319,13 @@ CONFIG_NET=y
269# 319#
270# Networking options 320# Networking options
271# 321#
272# CONFIG_NETDEBUG is not set
273CONFIG_PACKET=y 322CONFIG_PACKET=y
274# CONFIG_PACKET_MMAP is not set 323# CONFIG_PACKET_MMAP is not set
275CONFIG_UNIX=y 324CONFIG_UNIX=y
276CONFIG_XFRM=y 325CONFIG_XFRM=y
277# CONFIG_XFRM_USER is not set 326# CONFIG_XFRM_USER is not set
327# CONFIG_XFRM_SUB_POLICY is not set
328# CONFIG_XFRM_MIGRATE is not set
278# CONFIG_NET_KEY is not set 329# CONFIG_NET_KEY is not set
279CONFIG_INET=y 330CONFIG_INET=y
280# CONFIG_IP_MULTICAST is not set 331# CONFIG_IP_MULTICAST is not set
@@ -295,29 +346,20 @@ CONFIG_IP_PNP_BOOTP=y
295# CONFIG_INET_TUNNEL is not set 346# CONFIG_INET_TUNNEL is not set
296CONFIG_INET_XFRM_MODE_TRANSPORT=y 347CONFIG_INET_XFRM_MODE_TRANSPORT=y
297CONFIG_INET_XFRM_MODE_TUNNEL=y 348CONFIG_INET_XFRM_MODE_TUNNEL=y
349CONFIG_INET_XFRM_MODE_BEET=y
298CONFIG_INET_DIAG=y 350CONFIG_INET_DIAG=y
299CONFIG_INET_TCP_DIAG=y 351CONFIG_INET_TCP_DIAG=y
300# CONFIG_TCP_CONG_ADVANCED is not set 352# CONFIG_TCP_CONG_ADVANCED is not set
301CONFIG_TCP_CONG_BIC=y 353CONFIG_TCP_CONG_CUBIC=y
354CONFIG_DEFAULT_TCP_CONG="cubic"
355# CONFIG_TCP_MD5SIG is not set
302# CONFIG_IPV6 is not set 356# CONFIG_IPV6 is not set
303# CONFIG_INET6_XFRM_TUNNEL is not set 357# CONFIG_INET6_XFRM_TUNNEL is not set
304# CONFIG_INET6_TUNNEL is not set 358# CONFIG_INET6_TUNNEL is not set
305# CONFIG_NETWORK_SECMARK is not set 359# CONFIG_NETWORK_SECMARK is not set
306# CONFIG_NETFILTER is not set 360# CONFIG_NETFILTER is not set
307
308#
309# DCCP Configuration (EXPERIMENTAL)
310#
311# CONFIG_IP_DCCP is not set 361# CONFIG_IP_DCCP is not set
312
313#
314# SCTP Configuration (EXPERIMENTAL)
315#
316# CONFIG_IP_SCTP is not set 362# CONFIG_IP_SCTP is not set
317
318#
319# TIPC Configuration (EXPERIMENTAL)
320#
321# CONFIG_TIPC is not set 363# CONFIG_TIPC is not set
322# CONFIG_ATM is not set 364# CONFIG_ATM is not set
323# CONFIG_BRIDGE is not set 365# CONFIG_BRIDGE is not set
@@ -328,7 +370,6 @@ CONFIG_TCP_CONG_BIC=y
328# CONFIG_ATALK is not set 370# CONFIG_ATALK is not set
329# CONFIG_X25 is not set 371# CONFIG_X25 is not set
330# CONFIG_LAPB is not set 372# CONFIG_LAPB is not set
331# CONFIG_NET_DIVERT is not set
332# CONFIG_ECONET is not set 373# CONFIG_ECONET is not set
333# CONFIG_WAN_ROUTER is not set 374# CONFIG_WAN_ROUTER is not set
334 375
@@ -344,7 +385,17 @@ CONFIG_TCP_CONG_BIC=y
344# CONFIG_HAMRADIO is not set 385# CONFIG_HAMRADIO is not set
345# CONFIG_IRDA is not set 386# CONFIG_IRDA is not set
346# CONFIG_BT is not set 387# CONFIG_BT is not set
388# CONFIG_AF_RXRPC is not set
389
390#
391# Wireless
392#
393# CONFIG_CFG80211 is not set
394# CONFIG_WIRELESS_EXT is not set
395# CONFIG_MAC80211 is not set
347# CONFIG_IEEE80211 is not set 396# CONFIG_IEEE80211 is not set
397# CONFIG_RFKILL is not set
398# CONFIG_NET_9P is not set
348 399
349# 400#
350# Device Drivers 401# Device Drivers
@@ -357,29 +408,10 @@ CONFIG_STANDALONE=y
357CONFIG_PREVENT_FIRMWARE_BUILD=y 408CONFIG_PREVENT_FIRMWARE_BUILD=y
358# CONFIG_FW_LOADER is not set 409# CONFIG_FW_LOADER is not set
359# CONFIG_SYS_HYPERVISOR is not set 410# CONFIG_SYS_HYPERVISOR is not set
360
361#
362# Connector - unified userspace <-> kernelspace linker
363#
364# CONFIG_CONNECTOR is not set 411# CONFIG_CONNECTOR is not set
365
366#
367# Memory Technology Devices (MTD)
368#
369# CONFIG_MTD is not set 412# CONFIG_MTD is not set
370
371#
372# Parallel port support
373#
374# CONFIG_PARPORT is not set 413# CONFIG_PARPORT is not set
375 414CONFIG_BLK_DEV=y
376#
377# Plug and Play support
378#
379
380#
381# Block devices
382#
383# CONFIG_BLK_DEV_COW_COMMON is not set 415# CONFIG_BLK_DEV_COW_COMMON is not set
384CONFIG_BLK_DEV_LOOP=y 416CONFIG_BLK_DEV_LOOP=y
385# CONFIG_BLK_DEV_CRYPTOLOOP is not set 417# CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -387,7 +419,7 @@ CONFIG_BLK_DEV_LOOP=y
387CONFIG_BLK_DEV_RAM=y 419CONFIG_BLK_DEV_RAM=y
388CONFIG_BLK_DEV_RAM_COUNT=16 420CONFIG_BLK_DEV_RAM_COUNT=16
389CONFIG_BLK_DEV_RAM_SIZE=8192 421CONFIG_BLK_DEV_RAM_SIZE=8192
390CONFIG_BLK_DEV_INITRD=y 422CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
391# CONFIG_CDROM_PKTCDVD is not set 423# CONFIG_CDROM_PKTCDVD is not set
392CONFIG_ATA_OVER_ETH=m 424CONFIG_ATA_OVER_ETH=m
393 425
@@ -396,6 +428,9 @@ CONFIG_ATA_OVER_ETH=m
396# 428#
397# CONFIG_RAID_ATTRS is not set 429# CONFIG_RAID_ATTRS is not set
398CONFIG_SCSI=y 430CONFIG_SCSI=y
431CONFIG_SCSI_DMA=y
432# CONFIG_SCSI_TGT is not set
433# CONFIG_SCSI_NETLINK is not set
399CONFIG_SCSI_PROC_FS=y 434CONFIG_SCSI_PROC_FS=y
400 435
401# 436#
@@ -414,82 +449,42 @@ CONFIG_SCSI_PROC_FS=y
414# CONFIG_SCSI_MULTI_LUN is not set 449# CONFIG_SCSI_MULTI_LUN is not set
415# CONFIG_SCSI_CONSTANTS is not set 450# CONFIG_SCSI_CONSTANTS is not set
416# CONFIG_SCSI_LOGGING is not set 451# CONFIG_SCSI_LOGGING is not set
452# CONFIG_SCSI_SCAN_ASYNC is not set
453CONFIG_SCSI_WAIT_SCAN=m
417 454
418# 455#
419# SCSI Transport Attributes 456# SCSI Transports
420# 457#
421# CONFIG_SCSI_SPI_ATTRS is not set 458# CONFIG_SCSI_SPI_ATTRS is not set
422# CONFIG_SCSI_FC_ATTRS is not set 459# CONFIG_SCSI_FC_ATTRS is not set
423# CONFIG_SCSI_ISCSI_ATTRS is not set 460# CONFIG_SCSI_ISCSI_ATTRS is not set
424# CONFIG_SCSI_SAS_ATTRS is not set 461# CONFIG_SCSI_SAS_LIBSAS is not set
425 462CONFIG_SCSI_LOWLEVEL=y
426#
427# SCSI low-level drivers
428#
429# CONFIG_ISCSI_TCP is not set 463# CONFIG_ISCSI_TCP is not set
430# CONFIG_SCSI_SATA is not set
431# CONFIG_SCSI_DEBUG is not set 464# CONFIG_SCSI_DEBUG is not set
432 465# CONFIG_ATA is not set
433#
434# Multi-device support (RAID and LVM)
435#
436# CONFIG_MD is not set 466# CONFIG_MD is not set
437
438#
439# Fusion MPT device support
440#
441# CONFIG_FUSION is not set
442
443#
444# IEEE 1394 (FireWire) support
445#
446
447#
448# I2O device support
449#
450
451#
452# Network device support
453#
454CONFIG_NETDEVICES=y 467CONFIG_NETDEVICES=y
468# CONFIG_NETDEVICES_MULTIQUEUE is not set
455# CONFIG_DUMMY is not set 469# CONFIG_DUMMY is not set
456# CONFIG_BONDING is not set 470# CONFIG_BONDING is not set
471# CONFIG_MACVLAN is not set
457# CONFIG_EQUALIZER is not set 472# CONFIG_EQUALIZER is not set
458# CONFIG_TUN is not set 473# CONFIG_TUN is not set
459
460#
461# PHY device support
462#
463# CONFIG_PHYLIB is not set 474# CONFIG_PHYLIB is not set
464
465#
466# Ethernet (10 or 100Mbit)
467#
468CONFIG_NET_ETHERNET=y 475CONFIG_NET_ETHERNET=y
469CONFIG_MII=y 476CONFIG_MII=y
477# CONFIG_AX88796 is not set
470CONFIG_SMC91X=y 478CONFIG_SMC91X=y
471# CONFIG_DM9000 is not set 479# CONFIG_DM9000 is not set
480CONFIG_NETDEV_1000=y
481CONFIG_NETDEV_10000=y
472 482
473# 483#
474# Ethernet (1000 Mbit) 484# Wireless LAN
475#
476
477#
478# Ethernet (10000 Mbit)
479#
480
481#
482# Token Ring devices
483#
484
485#
486# Wireless LAN (non-hamradio)
487#
488# CONFIG_NET_RADIO is not set
489
490#
491# Wan interfaces
492# 485#
486# CONFIG_WLAN_PRE80211 is not set
487# CONFIG_WLAN_80211 is not set
493# CONFIG_WAN is not set 488# CONFIG_WAN is not set
494CONFIG_PPP=y 489CONFIG_PPP=y
495# CONFIG_PPP_MULTILINK is not set 490# CONFIG_PPP_MULTILINK is not set
@@ -500,24 +495,24 @@ CONFIG_PPP=y
500# CONFIG_PPP_BSDCOMP is not set 495# CONFIG_PPP_BSDCOMP is not set
501# CONFIG_PPP_MPPE is not set 496# CONFIG_PPP_MPPE is not set
502# CONFIG_PPPOE is not set 497# CONFIG_PPPOE is not set
498# CONFIG_PPPOL2TP is not set
503CONFIG_SLIP=y 499CONFIG_SLIP=y
504CONFIG_SLIP_COMPRESSED=y 500CONFIG_SLIP_COMPRESSED=y
501CONFIG_SLHC=y
505# CONFIG_SLIP_SMART is not set 502# CONFIG_SLIP_SMART is not set
506# CONFIG_SLIP_MODE_SLIP6 is not set 503# CONFIG_SLIP_MODE_SLIP6 is not set
507# CONFIG_SHAPER is not set 504# CONFIG_SHAPER is not set
508# CONFIG_NETCONSOLE is not set 505# CONFIG_NETCONSOLE is not set
509# CONFIG_NETPOLL is not set 506# CONFIG_NETPOLL is not set
510# CONFIG_NET_POLL_CONTROLLER is not set 507# CONFIG_NET_POLL_CONTROLLER is not set
511
512#
513# ISDN subsystem
514#
515# CONFIG_ISDN is not set 508# CONFIG_ISDN is not set
516 509
517# 510#
518# Input device support 511# Input device support
519# 512#
520CONFIG_INPUT=y 513CONFIG_INPUT=y
514# CONFIG_INPUT_FF_MEMLESS is not set
515# CONFIG_INPUT_POLLDEV is not set
521 516
522# 517#
523# Userland interfaces 518# Userland interfaces
@@ -537,8 +532,14 @@ CONFIG_INPUT_EVBUG=y
537# CONFIG_INPUT_KEYBOARD is not set 532# CONFIG_INPUT_KEYBOARD is not set
538# CONFIG_INPUT_MOUSE is not set 533# CONFIG_INPUT_MOUSE is not set
539# CONFIG_INPUT_JOYSTICK is not set 534# CONFIG_INPUT_JOYSTICK is not set
535# CONFIG_INPUT_TABLET is not set
540# CONFIG_INPUT_TOUCHSCREEN is not set 536# CONFIG_INPUT_TOUCHSCREEN is not set
541CONFIG_INPUT_MISC=y 537CONFIG_INPUT_MISC=y
538# CONFIG_INPUT_ATI_REMOTE is not set
539# CONFIG_INPUT_ATI_REMOTE2 is not set
540# CONFIG_INPUT_KEYSPAN_REMOTE is not set
541# CONFIG_INPUT_POWERMATE is not set
542# CONFIG_INPUT_YEALINK is not set
542CONFIG_INPUT_UINPUT=y 543CONFIG_INPUT_UINPUT=y
543 544
544# 545#
@@ -574,15 +575,7 @@ CONFIG_SERIAL_CORE=y
574CONFIG_SERIAL_CORE_CONSOLE=y 575CONFIG_SERIAL_CORE_CONSOLE=y
575CONFIG_UNIX98_PTYS=y 576CONFIG_UNIX98_PTYS=y
576# CONFIG_LEGACY_PTYS is not set 577# CONFIG_LEGACY_PTYS is not set
577
578#
579# IPMI
580#
581# CONFIG_IPMI_HANDLER is not set 578# CONFIG_IPMI_HANDLER is not set
582
583#
584# Watchdog Cards
585#
586CONFIG_WATCHDOG=y 579CONFIG_WATCHDOG=y
587CONFIG_WATCHDOG_NOWAYOUT=y 580CONFIG_WATCHDOG_NOWAYOUT=y
588 581
@@ -590,25 +583,12 @@ CONFIG_WATCHDOG_NOWAYOUT=y
590# Watchdog Device Drivers 583# Watchdog Device Drivers
591# 584#
592# CONFIG_SOFT_WATCHDOG is not set 585# CONFIG_SOFT_WATCHDOG is not set
586# CONFIG_OMAP_WATCHDOG is not set
593# CONFIG_HW_RANDOM is not set 587# CONFIG_HW_RANDOM is not set
594# CONFIG_NVRAM is not set 588# CONFIG_NVRAM is not set
595# CONFIG_DTLK is not set
596# CONFIG_R3964 is not set 589# CONFIG_R3964 is not set
597
598#
599# Ftape, the floppy tape device driver
600#
601# CONFIG_RAW_DRIVER is not set 590# CONFIG_RAW_DRIVER is not set
602
603#
604# TPM devices
605#
606# CONFIG_TCG_TPM is not set 591# CONFIG_TCG_TPM is not set
607# CONFIG_TELCLOCK is not set
608
609#
610# I2C support
611#
612# CONFIG_I2C is not set 592# CONFIG_I2C is not set
613 593
614# 594#
@@ -616,61 +596,70 @@ CONFIG_WATCHDOG_NOWAYOUT=y
616# 596#
617# CONFIG_SPI is not set 597# CONFIG_SPI is not set
618# CONFIG_SPI_MASTER is not set 598# CONFIG_SPI_MASTER is not set
619 599# CONFIG_W1 is not set
620#
621# Dallas's 1-wire bus
622#
623
624#
625# Hardware Monitoring support
626#
627CONFIG_HWMON=y 600CONFIG_HWMON=y
628# CONFIG_HWMON_VID is not set 601# CONFIG_HWMON_VID is not set
629# CONFIG_SENSORS_ABITUGURU is not set 602# CONFIG_SENSORS_ABITUGURU is not set
603# CONFIG_SENSORS_ABITUGURU3 is not set
630# CONFIG_SENSORS_F71805F is not set 604# CONFIG_SENSORS_F71805F is not set
605# CONFIG_SENSORS_IT87 is not set
606# CONFIG_SENSORS_PC87360 is not set
607# CONFIG_SENSORS_PC87427 is not set
608# CONFIG_SENSORS_SMSC47M1 is not set
609# CONFIG_SENSORS_SMSC47B397 is not set
610# CONFIG_SENSORS_VT1211 is not set
611# CONFIG_SENSORS_W83627HF is not set
612# CONFIG_SENSORS_W83627EHF is not set
631# CONFIG_HWMON_DEBUG_CHIP is not set 613# CONFIG_HWMON_DEBUG_CHIP is not set
614CONFIG_MISC_DEVICES=y
615# CONFIG_EEPROM_93CX6 is not set
632 616
633# 617#
634# Misc devices 618# Multifunction device drivers
635#
636
637#
638# LED devices
639# 619#
620# CONFIG_MFD_SM501 is not set
640# CONFIG_NEW_LEDS is not set 621# CONFIG_NEW_LEDS is not set
641 622
642# 623#
643# LED drivers
644#
645
646#
647# LED Triggers
648#
649
650#
651# Multimedia devices 624# Multimedia devices
652# 625#
653# CONFIG_VIDEO_DEV is not set 626# CONFIG_VIDEO_DEV is not set
654CONFIG_VIDEO_V4L2=y 627# CONFIG_DVB_CORE is not set
628CONFIG_DAB=y
655 629
656# 630#
657# Digital Video Broadcasting Devices 631# Graphics support
658# 632#
659# CONFIG_DVB is not set 633# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
660 634
661# 635#
662# Graphics support 636# Display device support
663# 637#
664CONFIG_FIRMWARE_EDID=y 638# CONFIG_DISPLAY_SUPPORT is not set
639# CONFIG_VGASTATE is not set
640CONFIG_VIDEO_OUTPUT_CONTROL=m
665CONFIG_FB=y 641CONFIG_FB=y
642CONFIG_FIRMWARE_EDID=y
643# CONFIG_FB_DDC is not set
666# CONFIG_FB_CFB_FILLRECT is not set 644# CONFIG_FB_CFB_FILLRECT is not set
667# CONFIG_FB_CFB_COPYAREA is not set 645# CONFIG_FB_CFB_COPYAREA is not set
668# CONFIG_FB_CFB_IMAGEBLIT is not set 646# CONFIG_FB_CFB_IMAGEBLIT is not set
647# CONFIG_FB_SYS_FILLRECT is not set
648# CONFIG_FB_SYS_COPYAREA is not set
649# CONFIG_FB_SYS_IMAGEBLIT is not set
650# CONFIG_FB_SYS_FOPS is not set
651CONFIG_FB_DEFERRED_IO=y
652# CONFIG_FB_SVGALIB is not set
669# CONFIG_FB_MACMODES is not set 653# CONFIG_FB_MACMODES is not set
670# CONFIG_FB_BACKLIGHT is not set 654# CONFIG_FB_BACKLIGHT is not set
671CONFIG_FB_MODE_HELPERS=y 655CONFIG_FB_MODE_HELPERS=y
672# CONFIG_FB_TILEBLITTING is not set 656# CONFIG_FB_TILEBLITTING is not set
657
658#
659# Frame buffer hardware drivers
660#
673# CONFIG_FB_S1D13XXX is not set 661# CONFIG_FB_S1D13XXX is not set
662# CONFIG_FB_OMAP is not set
674# CONFIG_FB_VIRTUAL is not set 663# CONFIG_FB_VIRTUAL is not set
675 664
676# 665#
@@ -679,6 +668,7 @@ CONFIG_FB_MODE_HELPERS=y
679# CONFIG_VGA_CONSOLE is not set 668# CONFIG_VGA_CONSOLE is not set
680CONFIG_DUMMY_CONSOLE=y 669CONFIG_DUMMY_CONSOLE=y
681CONFIG_FRAMEBUFFER_CONSOLE=y 670CONFIG_FRAMEBUFFER_CONSOLE=y
671# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
682# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set 672# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
683CONFIG_FONTS=y 673CONFIG_FONTS=y
684CONFIG_FONT_8x8=y 674CONFIG_FONT_8x8=y
@@ -691,15 +681,10 @@ CONFIG_FONT_8x16=y
691# CONFIG_FONT_SUN8x16 is not set 681# CONFIG_FONT_SUN8x16 is not set
692# CONFIG_FONT_SUN12x22 is not set 682# CONFIG_FONT_SUN12x22 is not set
693# CONFIG_FONT_10x18 is not set 683# CONFIG_FONT_10x18 is not set
694
695#
696# Logo configuration
697#
698CONFIG_LOGO=y 684CONFIG_LOGO=y
699# CONFIG_LOGO_LINUX_MONO is not set 685# CONFIG_LOGO_LINUX_MONO is not set
700# CONFIG_LOGO_LINUX_VGA16 is not set 686# CONFIG_LOGO_LINUX_VGA16 is not set
701CONFIG_LOGO_LINUX_CLUT224=y 687CONFIG_LOGO_LINUX_CLUT224=y
702# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
703 688
704# 689#
705# Sound 690# Sound
@@ -717,10 +702,10 @@ CONFIG_SOUND=y
717CONFIG_SOUND_PRIME=y 702CONFIG_SOUND_PRIME=y
718# CONFIG_SOUND_MSNDCLAS is not set 703# CONFIG_SOUND_MSNDCLAS is not set
719# CONFIG_SOUND_MSNDPIN is not set 704# CONFIG_SOUND_MSNDPIN is not set
720 705CONFIG_HID_SUPPORT=y
721# 706CONFIG_HID=y
722# USB support 707CONFIG_HID_DEBUG=y
723# 708CONFIG_USB_SUPPORT=y
724CONFIG_USB_ARCH_HAS_HCD=y 709CONFIG_USB_ARCH_HAS_HCD=y
725CONFIG_USB_ARCH_HAS_OHCI=y 710CONFIG_USB_ARCH_HAS_OHCI=y
726# CONFIG_USB_ARCH_HAS_EHCI is not set 711# CONFIG_USB_ARCH_HAS_EHCI is not set
@@ -734,17 +719,22 @@ CONFIG_USB_ARCH_HAS_OHCI=y
734# USB Gadget Support 719# USB Gadget Support
735# 720#
736# CONFIG_USB_GADGET is not set 721# CONFIG_USB_GADGET is not set
722# CONFIG_MMC is not set
723CONFIG_RTC_LIB=y
724# CONFIG_RTC_CLASS is not set
737 725
738# 726#
739# MMC/SD Card support 727# DMA Engine support
740# 728#
741# CONFIG_MMC is not set 729# CONFIG_DMA_ENGINE is not set
742 730
743# 731#
744# Real Time Clock 732# DMA Clients
733#
734
735#
736# DMA Devices
745# 737#
746CONFIG_RTC_LIB=y
747# CONFIG_RTC_CLASS is not set
748 738
749# 739#
750# File systems 740# File systems
@@ -753,10 +743,12 @@ CONFIG_EXT2_FS=y
753# CONFIG_EXT2_FS_XATTR is not set 743# CONFIG_EXT2_FS_XATTR is not set
754# CONFIG_EXT2_FS_XIP is not set 744# CONFIG_EXT2_FS_XIP is not set
755# CONFIG_EXT3_FS is not set 745# CONFIG_EXT3_FS is not set
746# CONFIG_EXT4DEV_FS is not set
756# CONFIG_REISERFS_FS is not set 747# CONFIG_REISERFS_FS is not set
757# CONFIG_JFS_FS is not set 748# CONFIG_JFS_FS is not set
758# CONFIG_FS_POSIX_ACL is not set 749# CONFIG_FS_POSIX_ACL is not set
759# CONFIG_XFS_FS is not set 750# CONFIG_XFS_FS is not set
751# CONFIG_GFS2_FS is not set
760# CONFIG_OCFS2_FS is not set 752# CONFIG_OCFS2_FS is not set
761# CONFIG_MINIX_FS is not set 753# CONFIG_MINIX_FS is not set
762CONFIG_ROMFS_FS=y 754CONFIG_ROMFS_FS=y
@@ -787,6 +779,7 @@ CONFIG_FAT_DEFAULT_CODEPAGE=437
787# Pseudo filesystems 779# Pseudo filesystems
788# 780#
789CONFIG_PROC_FS=y 781CONFIG_PROC_FS=y
782CONFIG_PROC_SYSCTL=y
790CONFIG_SYSFS=y 783CONFIG_SYSFS=y
791# CONFIG_TMPFS is not set 784# CONFIG_TMPFS is not set
792# CONFIG_HUGETLB_PAGE is not set 785# CONFIG_HUGETLB_PAGE is not set
@@ -825,6 +818,7 @@ CONFIG_LOCKD_V4=y
825CONFIG_NFS_COMMON=y 818CONFIG_NFS_COMMON=y
826CONFIG_SUNRPC=y 819CONFIG_SUNRPC=y
827CONFIG_SUNRPC_GSS=y 820CONFIG_SUNRPC_GSS=y
821# CONFIG_SUNRPC_BIND34 is not set
828CONFIG_RPCSEC_GSS_KRB5=y 822CONFIG_RPCSEC_GSS_KRB5=y
829# CONFIG_RPCSEC_GSS_SPKM3 is not set 823# CONFIG_RPCSEC_GSS_SPKM3 is not set
830# CONFIG_SMB_FS is not set 824# CONFIG_SMB_FS is not set
@@ -832,7 +826,6 @@ CONFIG_RPCSEC_GSS_KRB5=y
832# CONFIG_NCP_FS is not set 826# CONFIG_NCP_FS is not set
833# CONFIG_CODA_FS is not set 827# CONFIG_CODA_FS is not set
834# CONFIG_AFS_FS is not set 828# CONFIG_AFS_FS is not set
835# CONFIG_9P_FS is not set
836 829
837# 830#
838# Partition Types 831# Partition Types
@@ -885,6 +878,11 @@ CONFIG_NLS_DEFAULT="iso8859-1"
885# CONFIG_NLS_UTF8 is not set 878# CONFIG_NLS_UTF8 is not set
886 879
887# 880#
881# Distributed Lock Manager
882#
883# CONFIG_DLM is not set
884
885#
888# Profiling support 886# Profiling support
889# 887#
890# CONFIG_PROFILING is not set 888# CONFIG_PROFILING is not set
@@ -893,13 +891,14 @@ CONFIG_NLS_DEFAULT="iso8859-1"
893# Kernel hacking 891# Kernel hacking
894# 892#
895# CONFIG_PRINTK_TIME is not set 893# CONFIG_PRINTK_TIME is not set
894CONFIG_ENABLE_MUST_CHECK=y
896# CONFIG_MAGIC_SYSRQ is not set 895# CONFIG_MAGIC_SYSRQ is not set
896# CONFIG_UNUSED_SYMBOLS is not set
897# CONFIG_DEBUG_FS is not set
898# CONFIG_HEADERS_CHECK is not set
897# CONFIG_DEBUG_KERNEL is not set 899# CONFIG_DEBUG_KERNEL is not set
898CONFIG_LOG_BUF_SHIFT=14
899CONFIG_DEBUG_BUGVERBOSE=y 900CONFIG_DEBUG_BUGVERBOSE=y
900# CONFIG_DEBUG_FS is not set
901CONFIG_FRAME_POINTER=y 901CONFIG_FRAME_POINTER=y
902# CONFIG_UNWIND_INFO is not set
903# CONFIG_DEBUG_USER is not set 902# CONFIG_DEBUG_USER is not set
904 903
905# 904#
@@ -907,12 +906,12 @@ CONFIG_FRAME_POINTER=y
907# 906#
908# CONFIG_KEYS is not set 907# CONFIG_KEYS is not set
909# CONFIG_SECURITY is not set 908# CONFIG_SECURITY is not set
910
911#
912# Cryptographic options
913#
914CONFIG_CRYPTO=y 909CONFIG_CRYPTO=y
910CONFIG_CRYPTO_ALGAPI=y
911CONFIG_CRYPTO_BLKCIPHER=y
912CONFIG_CRYPTO_MANAGER=y
915# CONFIG_CRYPTO_HMAC is not set 913# CONFIG_CRYPTO_HMAC is not set
914# CONFIG_CRYPTO_XCBC is not set
916# CONFIG_CRYPTO_NULL is not set 915# CONFIG_CRYPTO_NULL is not set
917# CONFIG_CRYPTO_MD4 is not set 916# CONFIG_CRYPTO_MD4 is not set
918CONFIG_CRYPTO_MD5=y 917CONFIG_CRYPTO_MD5=y
@@ -921,7 +920,14 @@ CONFIG_CRYPTO_MD5=y
921# CONFIG_CRYPTO_SHA512 is not set 920# CONFIG_CRYPTO_SHA512 is not set
922# CONFIG_CRYPTO_WP512 is not set 921# CONFIG_CRYPTO_WP512 is not set
923# CONFIG_CRYPTO_TGR192 is not set 922# CONFIG_CRYPTO_TGR192 is not set
923# CONFIG_CRYPTO_GF128MUL is not set
924CONFIG_CRYPTO_ECB=m
925CONFIG_CRYPTO_CBC=y
926CONFIG_CRYPTO_PCBC=m
927# CONFIG_CRYPTO_LRW is not set
928# CONFIG_CRYPTO_CRYPTD is not set
924CONFIG_CRYPTO_DES=y 929CONFIG_CRYPTO_DES=y
930# CONFIG_CRYPTO_FCRYPT is not set
925# CONFIG_CRYPTO_BLOWFISH is not set 931# CONFIG_CRYPTO_BLOWFISH is not set
926# CONFIG_CRYPTO_TWOFISH is not set 932# CONFIG_CRYPTO_TWOFISH is not set
927# CONFIG_CRYPTO_SERPENT is not set 933# CONFIG_CRYPTO_SERPENT is not set
@@ -935,17 +941,22 @@ CONFIG_CRYPTO_DES=y
935# CONFIG_CRYPTO_DEFLATE is not set 941# CONFIG_CRYPTO_DEFLATE is not set
936# CONFIG_CRYPTO_MICHAEL_MIC is not set 942# CONFIG_CRYPTO_MICHAEL_MIC is not set
937# CONFIG_CRYPTO_CRC32C is not set 943# CONFIG_CRYPTO_CRC32C is not set
944# CONFIG_CRYPTO_CAMELLIA is not set
938# CONFIG_CRYPTO_TEST is not set 945# CONFIG_CRYPTO_TEST is not set
939 946CONFIG_CRYPTO_HW=y
940#
941# Hardware crypto devices
942#
943 947
944# 948#
945# Library routines 949# Library routines
946# 950#
951CONFIG_BITREVERSE=y
947# CONFIG_CRC_CCITT is not set 952# CONFIG_CRC_CCITT is not set
948# CONFIG_CRC16 is not set 953# CONFIG_CRC16 is not set
954# CONFIG_CRC_ITU_T is not set
949CONFIG_CRC32=y 955CONFIG_CRC32=y
956# CONFIG_CRC7 is not set
950# CONFIG_LIBCRC32C is not set 957# CONFIG_LIBCRC32C is not set
951CONFIG_ZLIB_INFLATE=y 958CONFIG_ZLIB_INFLATE=y
959CONFIG_PLIST=y
960CONFIG_HAS_IOMEM=y
961CONFIG_HAS_IOPORT=y
962CONFIG_HAS_DMA=y
diff --git a/arch/arm/configs/omap_osk_5912_defconfig b/arch/arm/configs/omap_osk_5912_defconfig
new file mode 100644
index 000000000000..8c1f15c7c45c
--- /dev/null
+++ b/arch/arm/configs/omap_osk_5912_defconfig
@@ -0,0 +1,1073 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.23-rc6
4# Mon Sep 17 14:15:05 2007
5#
6CONFIG_ARM=y
7CONFIG_SYS_SUPPORTS_APM_EMULATION=y
8CONFIG_GENERIC_GPIO=y
9CONFIG_GENERIC_TIME=y
10CONFIG_GENERIC_CLOCKEVENTS=y
11CONFIG_MMU=y
12# CONFIG_NO_IOPORT is not set
13CONFIG_GENERIC_HARDIRQS=y
14CONFIG_STACKTRACE_SUPPORT=y
15CONFIG_LOCKDEP_SUPPORT=y
16CONFIG_TRACE_IRQFLAGS_SUPPORT=y
17CONFIG_HARDIRQS_SW_RESEND=y
18CONFIG_GENERIC_IRQ_PROBE=y
19CONFIG_RWSEM_GENERIC_SPINLOCK=y
20# CONFIG_ARCH_HAS_ILOG2_U32 is not set
21# CONFIG_ARCH_HAS_ILOG2_U64 is not set
22CONFIG_GENERIC_HWEIGHT=y
23CONFIG_GENERIC_CALIBRATE_DELAY=y
24CONFIG_ZONE_DMA=y
25CONFIG_VECTORS_BASE=0xffff0000
26CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
27
28#
29# General setup
30#
31CONFIG_EXPERIMENTAL=y
32CONFIG_BROKEN_ON_SMP=y
33CONFIG_INIT_ENV_ARG_LIMIT=32
34CONFIG_LOCALVERSION=""
35CONFIG_LOCALVERSION_AUTO=y
36CONFIG_SWAP=y
37CONFIG_SYSVIPC=y
38CONFIG_SYSVIPC_SYSCTL=y
39# CONFIG_POSIX_MQUEUE is not set
40# CONFIG_BSD_PROCESS_ACCT is not set
41# CONFIG_TASKSTATS is not set
42# CONFIG_USER_NS is not set
43# CONFIG_AUDIT is not set
44# CONFIG_IKCONFIG is not set
45CONFIG_LOG_BUF_SHIFT=14
46# CONFIG_SYSFS_DEPRECATED is not set
47# CONFIG_RELAY is not set
48CONFIG_BLK_DEV_INITRD=y
49CONFIG_INITRAMFS_SOURCE=""
50CONFIG_CC_OPTIMIZE_FOR_SIZE=y
51CONFIG_SYSCTL=y
52# CONFIG_EMBEDDED is not set
53CONFIG_UID16=y
54CONFIG_SYSCTL_SYSCALL=y
55CONFIG_KALLSYMS=y
56# CONFIG_KALLSYMS_EXTRA_PASS is not set
57CONFIG_HOTPLUG=y
58CONFIG_PRINTK=y
59CONFIG_BUG=y
60CONFIG_ELF_CORE=y
61CONFIG_BASE_FULL=y
62CONFIG_FUTEX=y
63CONFIG_ANON_INODES=y
64CONFIG_EPOLL=y
65CONFIG_SIGNALFD=y
66CONFIG_TIMERFD=y
67CONFIG_EVENTFD=y
68CONFIG_SHMEM=y
69CONFIG_VM_EVENT_COUNTERS=y
70CONFIG_SLAB=y
71# CONFIG_SLUB is not set
72# CONFIG_SLOB is not set
73CONFIG_RT_MUTEXES=y
74# CONFIG_TINY_SHMEM is not set
75CONFIG_BASE_SMALL=0
76CONFIG_MODULES=y
77CONFIG_MODULE_UNLOAD=y
78# CONFIG_MODULE_FORCE_UNLOAD is not set
79# CONFIG_MODVERSIONS is not set
80# CONFIG_MODULE_SRCVERSION_ALL is not set
81CONFIG_KMOD=y
82CONFIG_BLOCK=y
83# CONFIG_LBD is not set
84# CONFIG_BLK_DEV_IO_TRACE is not set
85# CONFIG_LSF is not set
86# CONFIG_BLK_DEV_BSG is not set
87
88#
89# IO Schedulers
90#
91CONFIG_IOSCHED_NOOP=y
92CONFIG_IOSCHED_AS=y
93CONFIG_IOSCHED_DEADLINE=y
94CONFIG_IOSCHED_CFQ=y
95# CONFIG_DEFAULT_AS is not set
96# CONFIG_DEFAULT_DEADLINE is not set
97CONFIG_DEFAULT_CFQ=y
98# CONFIG_DEFAULT_NOOP is not set
99CONFIG_DEFAULT_IOSCHED="cfq"
100
101#
102# System Type
103#
104# CONFIG_ARCH_AAEC2000 is not set
105# CONFIG_ARCH_INTEGRATOR is not set
106# CONFIG_ARCH_REALVIEW is not set
107# CONFIG_ARCH_VERSATILE is not set
108# CONFIG_ARCH_AT91 is not set
109# CONFIG_ARCH_CLPS7500 is not set
110# CONFIG_ARCH_CLPS711X is not set
111# CONFIG_ARCH_CO285 is not set
112# CONFIG_ARCH_EBSA110 is not set
113# CONFIG_ARCH_EP93XX is not set
114# CONFIG_ARCH_FOOTBRIDGE is not set
115# CONFIG_ARCH_NETX is not set
116# CONFIG_ARCH_H720X is not set
117# CONFIG_ARCH_IMX is not set
118# CONFIG_ARCH_IOP13XX is not set
119# CONFIG_ARCH_IOP32X is not set
120# CONFIG_ARCH_IOP33X is not set
121# CONFIG_ARCH_IXP23XX is not set
122# CONFIG_ARCH_IXP2000 is not set
123# CONFIG_ARCH_IXP4XX is not set
124# CONFIG_ARCH_L7200 is not set
125# CONFIG_ARCH_KS8695 is not set
126# CONFIG_ARCH_NS9XXX is not set
127# CONFIG_ARCH_MXC is not set
128# CONFIG_ARCH_PNX4008 is not set
129# CONFIG_ARCH_PXA is not set
130# CONFIG_ARCH_RPC is not set
131# CONFIG_ARCH_SA1100 is not set
132# CONFIG_ARCH_S3C2410 is not set
133# CONFIG_ARCH_SHARK is not set
134# CONFIG_ARCH_LH7A40X is not set
135# CONFIG_ARCH_DAVINCI is not set
136CONFIG_ARCH_OMAP=y
137
138#
139# TI OMAP Implementations
140#
141CONFIG_ARCH_OMAP_OTG=y
142CONFIG_ARCH_OMAP1=y
143# CONFIG_ARCH_OMAP2 is not set
144
145#
146# OMAP Feature Selections
147#
148CONFIG_OMAP_RESET_CLOCKS=y
149CONFIG_OMAP_MUX=y
150# CONFIG_OMAP_MUX_DEBUG is not set
151CONFIG_OMAP_MUX_WARNINGS=y
152CONFIG_OMAP_MCBSP=y
153# CONFIG_OMAP_MPU_TIMER is not set
154CONFIG_OMAP_32K_TIMER=y
155CONFIG_OMAP_32K_TIMER_HZ=128
156# CONFIG_OMAP_DM_TIMER is not set
157CONFIG_OMAP_LL_DEBUG_UART1=y
158# CONFIG_OMAP_LL_DEBUG_UART2 is not set
159# CONFIG_OMAP_LL_DEBUG_UART3 is not set
160CONFIG_OMAP_SERIAL_WAKE=y
161
162#
163# OMAP Core Type
164#
165# CONFIG_ARCH_OMAP730 is not set
166# CONFIG_ARCH_OMAP15XX is not set
167CONFIG_ARCH_OMAP16XX=y
168
169#
170# OMAP Board Type
171#
172# CONFIG_MACH_OMAP_INNOVATOR is not set
173# CONFIG_MACH_OMAP_H2 is not set
174# CONFIG_MACH_OMAP_H3 is not set
175CONFIG_MACH_OMAP_OSK=y
176# CONFIG_OMAP_OSK_MISTRAL is not set
177# CONFIG_MACH_NOKIA770 is not set
178# CONFIG_MACH_OMAP_GENERIC is not set
179
180#
181# OMAP CPU Speed
182#
183# CONFIG_OMAP_CLOCKS_SET_BY_BOOTLOADER is not set
184# CONFIG_OMAP_ARM_216MHZ is not set
185CONFIG_OMAP_ARM_192MHZ=y
186# CONFIG_OMAP_ARM_168MHZ is not set
187# CONFIG_OMAP_ARM_120MHZ is not set
188# CONFIG_OMAP_ARM_60MHZ is not set
189# CONFIG_OMAP_ARM_30MHZ is not set
190
191#
192# Boot options
193#
194
195#
196# Power management
197#
198
199#
200# Processor Type
201#
202CONFIG_CPU_32=y
203CONFIG_CPU_ARM926T=y
204CONFIG_CPU_32v5=y
205CONFIG_CPU_ABRT_EV5TJ=y
206CONFIG_CPU_CACHE_VIVT=y
207CONFIG_CPU_COPY_V4WB=y
208CONFIG_CPU_TLB_V4WBI=y
209CONFIG_CPU_CP15=y
210CONFIG_CPU_CP15_MMU=y
211
212#
213# Processor Features
214#
215# CONFIG_ARM_THUMB is not set
216# CONFIG_CPU_ICACHE_DISABLE is not set
217# CONFIG_CPU_DCACHE_DISABLE is not set
218# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
219# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
220# CONFIG_OUTER_CACHE is not set
221
222#
223# Bus support
224#
225# CONFIG_PCI_SYSCALL is not set
226# CONFIG_ARCH_SUPPORTS_MSI is not set
227
228#
229# PCCARD (PCMCIA/CardBus) support
230#
231CONFIG_PCCARD=y
232# CONFIG_PCMCIA_DEBUG is not set
233CONFIG_PCMCIA=y
234CONFIG_PCMCIA_LOAD_CIS=y
235CONFIG_PCMCIA_IOCTL=y
236
237#
238# PC-card bridges
239#
240CONFIG_OMAP_CF=y
241
242#
243# Kernel Features
244#
245CONFIG_TICK_ONESHOT=y
246CONFIG_NO_HZ=y
247CONFIG_HIGH_RES_TIMERS=y
248# CONFIG_PREEMPT is not set
249CONFIG_HZ=128
250CONFIG_AEABI=y
251CONFIG_OABI_COMPAT=y
252# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
253CONFIG_SELECT_MEMORY_MODEL=y
254CONFIG_FLATMEM_MANUAL=y
255# CONFIG_DISCONTIGMEM_MANUAL is not set
256# CONFIG_SPARSEMEM_MANUAL is not set
257CONFIG_FLATMEM=y
258CONFIG_FLAT_NODE_MEM_MAP=y
259# CONFIG_SPARSEMEM_STATIC is not set
260CONFIG_SPLIT_PTLOCK_CPUS=4096
261# CONFIG_RESOURCES_64BIT is not set
262CONFIG_ZONE_DMA_FLAG=1
263CONFIG_BOUNCE=y
264CONFIG_VIRT_TO_BUS=y
265# CONFIG_LEDS is not set
266CONFIG_ALIGNMENT_TRAP=y
267
268#
269# Boot options
270#
271CONFIG_ZBOOT_ROM_TEXT=0x0
272CONFIG_ZBOOT_ROM_BSS=0x0
273CONFIG_CMDLINE="mem=32M console=ttyS0,115200 initrd=0x10400000,8M root=/dev/ram0 rw"
274# CONFIG_XIP_KERNEL is not set
275# CONFIG_KEXEC is not set
276
277#
278# CPU Frequency scaling
279#
280# CONFIG_CPU_FREQ is not set
281
282#
283# Floating point emulation
284#
285
286#
287# At least one emulation must be selected
288#
289CONFIG_FPE_NWFPE=y
290# CONFIG_FPE_NWFPE_XP is not set
291# CONFIG_FPE_FASTFPE is not set
292# CONFIG_VFP is not set
293
294#
295# Userspace binary formats
296#
297CONFIG_BINFMT_ELF=y
298# CONFIG_BINFMT_AOUT is not set
299# CONFIG_BINFMT_MISC is not set
300
301#
302# Power management options
303#
304CONFIG_PM=y
305# CONFIG_PM_LEGACY is not set
306# CONFIG_PM_DEBUG is not set
307CONFIG_PM_SLEEP=y
308CONFIG_SUSPEND_UP_POSSIBLE=y
309CONFIG_SUSPEND=y
310# CONFIG_APM_EMULATION is not set
311
312#
313# Networking
314#
315CONFIG_NET=y
316
317#
318# Networking options
319#
320CONFIG_PACKET=m
321# CONFIG_PACKET_MMAP is not set
322CONFIG_UNIX=y
323CONFIG_XFRM=y
324# CONFIG_XFRM_USER is not set
325# CONFIG_XFRM_SUB_POLICY is not set
326# CONFIG_XFRM_MIGRATE is not set
327# CONFIG_NET_KEY is not set
328CONFIG_INET=y
329CONFIG_IP_MULTICAST=y
330# CONFIG_IP_ADVANCED_ROUTER is not set
331CONFIG_IP_FIB_HASH=y
332CONFIG_IP_PNP=y
333CONFIG_IP_PNP_DHCP=y
334CONFIG_IP_PNP_BOOTP=y
335# CONFIG_IP_PNP_RARP is not set
336# CONFIG_NET_IPIP is not set
337# CONFIG_NET_IPGRE is not set
338# CONFIG_IP_MROUTE is not set
339# CONFIG_ARPD is not set
340# CONFIG_SYN_COOKIES is not set
341# CONFIG_INET_AH is not set
342# CONFIG_INET_ESP is not set
343# CONFIG_INET_IPCOMP is not set
344# CONFIG_INET_XFRM_TUNNEL is not set
345# CONFIG_INET_TUNNEL is not set
346CONFIG_INET_XFRM_MODE_TRANSPORT=y
347CONFIG_INET_XFRM_MODE_TUNNEL=y
348CONFIG_INET_XFRM_MODE_BEET=y
349CONFIG_INET_DIAG=y
350CONFIG_INET_TCP_DIAG=y
351# CONFIG_TCP_CONG_ADVANCED is not set
352CONFIG_TCP_CONG_CUBIC=y
353CONFIG_DEFAULT_TCP_CONG="cubic"
354# CONFIG_TCP_MD5SIG is not set
355# CONFIG_IPV6 is not set
356# CONFIG_INET6_XFRM_TUNNEL is not set
357# CONFIG_INET6_TUNNEL is not set
358# CONFIG_NETWORK_SECMARK is not set
359# CONFIG_NETFILTER is not set
360# CONFIG_IP_DCCP is not set
361# CONFIG_IP_SCTP is not set
362# CONFIG_TIPC is not set
363# CONFIG_ATM is not set
364# CONFIG_BRIDGE is not set
365# CONFIG_VLAN_8021Q is not set
366# CONFIG_DECNET is not set
367# CONFIG_LLC2 is not set
368# CONFIG_IPX is not set
369# CONFIG_ATALK is not set
370# CONFIG_X25 is not set
371# CONFIG_LAPB is not set
372# CONFIG_ECONET is not set
373# CONFIG_WAN_ROUTER is not set
374
375#
376# QoS and/or fair queueing
377#
378# CONFIG_NET_SCHED is not set
379
380#
381# Network testing
382#
383# CONFIG_NET_PKTGEN is not set
384# CONFIG_HAMRADIO is not set
385# CONFIG_IRDA is not set
386# CONFIG_BT is not set
387# CONFIG_AF_RXRPC is not set
388
389#
390# Wireless
391#
392# CONFIG_CFG80211 is not set
393# CONFIG_WIRELESS_EXT is not set
394# CONFIG_MAC80211 is not set
395# CONFIG_IEEE80211 is not set
396# CONFIG_RFKILL is not set
397# CONFIG_NET_9P is not set
398
399#
400# Device Drivers
401#
402
403#
404# Generic Driver Options
405#
406CONFIG_STANDALONE=y
407CONFIG_PREVENT_FIRMWARE_BUILD=y
408CONFIG_FW_LOADER=y
409# CONFIG_SYS_HYPERVISOR is not set
410# CONFIG_CONNECTOR is not set
411CONFIG_MTD=y
412# CONFIG_MTD_DEBUG is not set
413# CONFIG_MTD_CONCAT is not set
414CONFIG_MTD_PARTITIONS=y
415# CONFIG_MTD_REDBOOT_PARTS is not set
416CONFIG_MTD_CMDLINE_PARTS=y
417# CONFIG_MTD_AFS_PARTS is not set
418
419#
420# User Modules And Translation Layers
421#
422CONFIG_MTD_CHAR=y
423CONFIG_MTD_BLKDEVS=y
424CONFIG_MTD_BLOCK=y
425# CONFIG_FTL is not set
426# CONFIG_NFTL is not set
427# CONFIG_INFTL is not set
428# CONFIG_RFD_FTL is not set
429# CONFIG_SSFDC is not set
430
431#
432# RAM/ROM/Flash chip drivers
433#
434CONFIG_MTD_CFI=y
435# CONFIG_MTD_JEDECPROBE is not set
436CONFIG_MTD_GEN_PROBE=y
437# CONFIG_MTD_CFI_ADV_OPTIONS is not set
438CONFIG_MTD_MAP_BANK_WIDTH_1=y
439CONFIG_MTD_MAP_BANK_WIDTH_2=y
440CONFIG_MTD_MAP_BANK_WIDTH_4=y
441# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
442# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
443# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
444CONFIG_MTD_CFI_I1=y
445CONFIG_MTD_CFI_I2=y
446# CONFIG_MTD_CFI_I4 is not set
447# CONFIG_MTD_CFI_I8 is not set
448CONFIG_MTD_CFI_INTELEXT=y
449# CONFIG_MTD_CFI_AMDSTD is not set
450# CONFIG_MTD_CFI_STAA is not set
451CONFIG_MTD_CFI_UTIL=y
452# CONFIG_MTD_RAM is not set
453# CONFIG_MTD_ROM is not set
454# CONFIG_MTD_ABSENT is not set
455
456#
457# Mapping drivers for chip access
458#
459# CONFIG_MTD_COMPLEX_MAPPINGS is not set
460# CONFIG_MTD_PHYSMAP is not set
461# CONFIG_MTD_ARM_INTEGRATOR is not set
462CONFIG_MTD_OMAP_NOR=y
463# CONFIG_MTD_PLATRAM is not set
464
465#
466# Self-contained MTD device drivers
467#
468# CONFIG_MTD_SLRAM is not set
469# CONFIG_MTD_PHRAM is not set
470# CONFIG_MTD_MTDRAM is not set
471# CONFIG_MTD_BLOCK2MTD is not set
472
473#
474# Disk-On-Chip Device Drivers
475#
476# CONFIG_MTD_DOC2000 is not set
477# CONFIG_MTD_DOC2001 is not set
478# CONFIG_MTD_DOC2001PLUS is not set
479# CONFIG_MTD_NAND is not set
480# CONFIG_MTD_ONENAND is not set
481
482#
483# UBI - Unsorted block images
484#
485# CONFIG_MTD_UBI is not set
486# CONFIG_PARPORT is not set
487CONFIG_BLK_DEV=y
488# CONFIG_BLK_DEV_COW_COMMON is not set
489CONFIG_BLK_DEV_LOOP=y
490# CONFIG_BLK_DEV_CRYPTOLOOP is not set
491# CONFIG_BLK_DEV_NBD is not set
492CONFIG_BLK_DEV_RAM=y
493CONFIG_BLK_DEV_RAM_COUNT=16
494CONFIG_BLK_DEV_RAM_SIZE=8192
495CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
496# CONFIG_CDROM_PKTCDVD is not set
497# CONFIG_ATA_OVER_ETH is not set
498CONFIG_IDE=m
499CONFIG_BLK_DEV_IDE=m
500
501#
502# Please see Documentation/ide.txt for help/info on IDE drives
503#
504# CONFIG_BLK_DEV_IDE_SATA is not set
505CONFIG_BLK_DEV_IDEDISK=m
506# CONFIG_IDEDISK_MULTI_MODE is not set
507CONFIG_BLK_DEV_IDECS=m
508# CONFIG_BLK_DEV_IDECD is not set
509# CONFIG_BLK_DEV_IDETAPE is not set
510# CONFIG_BLK_DEV_IDEFLOPPY is not set
511# CONFIG_IDE_TASK_IOCTL is not set
512CONFIG_IDE_PROC_FS=y
513
514#
515# IDE chipset support/bugfixes
516#
517# CONFIG_IDE_GENERIC is not set
518# CONFIG_IDEPCI_PCIBUS_ORDER is not set
519# CONFIG_IDE_ARM is not set
520# CONFIG_BLK_DEV_IDEDMA is not set
521# CONFIG_BLK_DEV_HD is not set
522
523#
524# SCSI device support
525#
526# CONFIG_RAID_ATTRS is not set
527# CONFIG_SCSI is not set
528# CONFIG_SCSI_DMA is not set
529# CONFIG_SCSI_NETLINK is not set
530# CONFIG_ATA is not set
531# CONFIG_MD is not set
532CONFIG_NETDEVICES=y
533# CONFIG_NETDEVICES_MULTIQUEUE is not set
534# CONFIG_DUMMY is not set
535# CONFIG_BONDING is not set
536# CONFIG_MACVLAN is not set
537# CONFIG_EQUALIZER is not set
538# CONFIG_TUN is not set
539# CONFIG_PHYLIB is not set
540CONFIG_NET_ETHERNET=y
541CONFIG_MII=y
542# CONFIG_AX88796 is not set
543CONFIG_SMC91X=y
544# CONFIG_DM9000 is not set
545CONFIG_NETDEV_1000=y
546CONFIG_NETDEV_10000=y
547
548#
549# Wireless LAN
550#
551# CONFIG_WLAN_PRE80211 is not set
552# CONFIG_WLAN_80211 is not set
553# CONFIG_NET_PCMCIA is not set
554# CONFIG_WAN is not set
555CONFIG_PPP=y
556CONFIG_PPP_MULTILINK=y
557# CONFIG_PPP_FILTER is not set
558# CONFIG_PPP_ASYNC is not set
559# CONFIG_PPP_SYNC_TTY is not set
560# CONFIG_PPP_DEFLATE is not set
561# CONFIG_PPP_BSDCOMP is not set
562# CONFIG_PPP_MPPE is not set
563# CONFIG_PPPOE is not set
564# CONFIG_PPPOL2TP is not set
565# CONFIG_SLIP is not set
566CONFIG_SLHC=y
567# CONFIG_SHAPER is not set
568# CONFIG_NETCONSOLE is not set
569# CONFIG_NETPOLL is not set
570# CONFIG_NET_POLL_CONTROLLER is not set
571# CONFIG_ISDN is not set
572
573#
574# Input device support
575#
576CONFIG_INPUT=y
577# CONFIG_INPUT_FF_MEMLESS is not set
578# CONFIG_INPUT_POLLDEV is not set
579
580#
581# Userland interfaces
582#
583CONFIG_INPUT_MOUSEDEV=y
584# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
585CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
586CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
587# CONFIG_INPUT_JOYDEV is not set
588# CONFIG_INPUT_TSDEV is not set
589CONFIG_INPUT_EVDEV=y
590# CONFIG_INPUT_EVBUG is not set
591
592#
593# Input Device Drivers
594#
595CONFIG_INPUT_KEYBOARD=y
596# CONFIG_KEYBOARD_ATKBD is not set
597# CONFIG_KEYBOARD_SUNKBD is not set
598# CONFIG_KEYBOARD_LKKBD is not set
599# CONFIG_KEYBOARD_XTKBD is not set
600# CONFIG_KEYBOARD_NEWTON is not set
601# CONFIG_KEYBOARD_STOWAWAY is not set
602CONFIG_KEYBOARD_OMAP=y
603# CONFIG_KEYBOARD_GPIO is not set
604# CONFIG_INPUT_MOUSE is not set
605# CONFIG_INPUT_JOYSTICK is not set
606# CONFIG_INPUT_TABLET is not set
607CONFIG_INPUT_TOUCHSCREEN=y
608# CONFIG_TOUCHSCREEN_FUJITSU is not set
609# CONFIG_TOUCHSCREEN_GUNZE is not set
610# CONFIG_TOUCHSCREEN_ELO is not set
611# CONFIG_TOUCHSCREEN_MTOUCH is not set
612# CONFIG_TOUCHSCREEN_MK712 is not set
613# CONFIG_TOUCHSCREEN_PENMOUNT is not set
614# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
615# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
616# CONFIG_TOUCHSCREEN_UCB1400 is not set
617# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
618# CONFIG_INPUT_MISC is not set
619
620#
621# Hardware I/O ports
622#
623# CONFIG_SERIO is not set
624# CONFIG_GAMEPORT is not set
625
626#
627# Character devices
628#
629CONFIG_VT=y
630CONFIG_VT_CONSOLE=y
631CONFIG_HW_CONSOLE=y
632# CONFIG_VT_HW_CONSOLE_BINDING is not set
633# CONFIG_SERIAL_NONSTANDARD is not set
634
635#
636# Serial drivers
637#
638CONFIG_SERIAL_8250=y
639CONFIG_SERIAL_8250_CONSOLE=y
640# CONFIG_SERIAL_8250_CS is not set
641CONFIG_SERIAL_8250_NR_UARTS=4
642CONFIG_SERIAL_8250_RUNTIME_UARTS=4
643# CONFIG_SERIAL_8250_EXTENDED is not set
644
645#
646# Non-8250 serial port support
647#
648CONFIG_SERIAL_CORE=y
649CONFIG_SERIAL_CORE_CONSOLE=y
650CONFIG_UNIX98_PTYS=y
651CONFIG_LEGACY_PTYS=y
652CONFIG_LEGACY_PTY_COUNT=256
653# CONFIG_IPMI_HANDLER is not set
654# CONFIG_WATCHDOG is not set
655CONFIG_HW_RANDOM=m
656CONFIG_HW_RANDOM_OMAP=m
657# CONFIG_NVRAM is not set
658# CONFIG_R3964 is not set
659
660#
661# PCMCIA character devices
662#
663# CONFIG_SYNCLINK_CS is not set
664# CONFIG_CARDMAN_4000 is not set
665# CONFIG_CARDMAN_4040 is not set
666# CONFIG_RAW_DRIVER is not set
667# CONFIG_TCG_TPM is not set
668CONFIG_I2C=y
669CONFIG_I2C_BOARDINFO=y
670CONFIG_I2C_CHARDEV=y
671
672#
673# I2C Algorithms
674#
675# CONFIG_I2C_ALGOBIT is not set
676# CONFIG_I2C_ALGOPCF is not set
677# CONFIG_I2C_ALGOPCA is not set
678
679#
680# I2C Hardware Bus support
681#
682# CONFIG_I2C_GPIO is not set
683# CONFIG_I2C_OCORES is not set
684CONFIG_I2C_OMAP=y
685# CONFIG_I2C_PARPORT_LIGHT is not set
686# CONFIG_I2C_SIMTEC is not set
687# CONFIG_I2C_TAOS_EVM is not set
688# CONFIG_I2C_STUB is not set
689
690#
691# Miscellaneous I2C Chip support
692#
693# CONFIG_SENSORS_DS1337 is not set
694# CONFIG_SENSORS_DS1374 is not set
695# CONFIG_DS1682 is not set
696# CONFIG_SENSORS_EEPROM is not set
697# CONFIG_SENSORS_PCF8574 is not set
698# CONFIG_SENSORS_PCA9539 is not set
699# CONFIG_SENSORS_PCF8591 is not set
700# CONFIG_ISP1301_OMAP is not set
701CONFIG_TPS65010=y
702# CONFIG_SENSORS_MAX6875 is not set
703# CONFIG_SENSORS_TSL2550 is not set
704# CONFIG_I2C_DEBUG_CORE is not set
705# CONFIG_I2C_DEBUG_ALGO is not set
706# CONFIG_I2C_DEBUG_BUS is not set
707# CONFIG_I2C_DEBUG_CHIP is not set
708
709#
710# SPI support
711#
712# CONFIG_SPI is not set
713# CONFIG_SPI_MASTER is not set
714# CONFIG_W1 is not set
715CONFIG_HWMON=y
716# CONFIG_HWMON_VID is not set
717# CONFIG_SENSORS_ABITUGURU is not set
718# CONFIG_SENSORS_ABITUGURU3 is not set
719# CONFIG_SENSORS_AD7418 is not set
720# CONFIG_SENSORS_ADM1021 is not set
721# CONFIG_SENSORS_ADM1025 is not set
722# CONFIG_SENSORS_ADM1026 is not set
723# CONFIG_SENSORS_ADM1029 is not set
724# CONFIG_SENSORS_ADM1031 is not set
725# CONFIG_SENSORS_ADM9240 is not set
726# CONFIG_SENSORS_ASB100 is not set
727# CONFIG_SENSORS_ATXP1 is not set
728# CONFIG_SENSORS_DS1621 is not set
729# CONFIG_SENSORS_F71805F is not set
730# CONFIG_SENSORS_FSCHER is not set
731# CONFIG_SENSORS_FSCPOS is not set
732# CONFIG_SENSORS_GL518SM is not set
733# CONFIG_SENSORS_GL520SM is not set
734# CONFIG_SENSORS_IT87 is not set
735# CONFIG_SENSORS_LM63 is not set
736# CONFIG_SENSORS_LM75 is not set
737# CONFIG_SENSORS_LM77 is not set
738# CONFIG_SENSORS_LM78 is not set
739# CONFIG_SENSORS_LM80 is not set
740# CONFIG_SENSORS_LM83 is not set
741# CONFIG_SENSORS_LM85 is not set
742# CONFIG_SENSORS_LM87 is not set
743# CONFIG_SENSORS_LM90 is not set
744# CONFIG_SENSORS_LM92 is not set
745# CONFIG_SENSORS_LM93 is not set
746# CONFIG_SENSORS_MAX1619 is not set
747# CONFIG_SENSORS_MAX6650 is not set
748# CONFIG_SENSORS_PC87360 is not set
749# CONFIG_SENSORS_PC87427 is not set
750# CONFIG_SENSORS_DME1737 is not set
751# CONFIG_SENSORS_SMSC47M1 is not set
752# CONFIG_SENSORS_SMSC47M192 is not set
753# CONFIG_SENSORS_SMSC47B397 is not set
754# CONFIG_SENSORS_THMC50 is not set
755# CONFIG_SENSORS_VT1211 is not set
756# CONFIG_SENSORS_W83781D is not set
757# CONFIG_SENSORS_W83791D is not set
758# CONFIG_SENSORS_W83792D is not set
759# CONFIG_SENSORS_W83793 is not set
760# CONFIG_SENSORS_W83L785TS is not set
761# CONFIG_SENSORS_W83627HF is not set
762# CONFIG_SENSORS_W83627EHF is not set
763# CONFIG_HWMON_DEBUG_CHIP is not set
764CONFIG_MISC_DEVICES=y
765# CONFIG_EEPROM_93CX6 is not set
766
767#
768# Multifunction device drivers
769#
770# CONFIG_MFD_SM501 is not set
771# CONFIG_NEW_LEDS is not set
772
773#
774# Multimedia devices
775#
776# CONFIG_VIDEO_DEV is not set
777# CONFIG_DVB_CORE is not set
778CONFIG_DAB=y
779
780#
781# Graphics support
782#
783# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
784
785#
786# Display device support
787#
788# CONFIG_DISPLAY_SUPPORT is not set
789# CONFIG_VGASTATE is not set
790CONFIG_VIDEO_OUTPUT_CONTROL=m
791CONFIG_FB=y
792CONFIG_FIRMWARE_EDID=y
793# CONFIG_FB_DDC is not set
794# CONFIG_FB_CFB_FILLRECT is not set
795# CONFIG_FB_CFB_COPYAREA is not set
796# CONFIG_FB_CFB_IMAGEBLIT is not set
797# CONFIG_FB_SYS_FILLRECT is not set
798# CONFIG_FB_SYS_COPYAREA is not set
799# CONFIG_FB_SYS_IMAGEBLIT is not set
800# CONFIG_FB_SYS_FOPS is not set
801CONFIG_FB_DEFERRED_IO=y
802# CONFIG_FB_SVGALIB is not set
803# CONFIG_FB_MACMODES is not set
804# CONFIG_FB_BACKLIGHT is not set
805CONFIG_FB_MODE_HELPERS=y
806# CONFIG_FB_TILEBLITTING is not set
807
808#
809# Frame buffer hardware drivers
810#
811# CONFIG_FB_S1D13XXX is not set
812# CONFIG_FB_OMAP is not set
813# CONFIG_FB_VIRTUAL is not set
814
815#
816# Console display driver support
817#
818# CONFIG_VGA_CONSOLE is not set
819CONFIG_DUMMY_CONSOLE=y
820CONFIG_FRAMEBUFFER_CONSOLE=y
821# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
822# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
823CONFIG_FONTS=y
824CONFIG_FONT_8x8=y
825# CONFIG_FONT_8x16 is not set
826# CONFIG_FONT_6x11 is not set
827# CONFIG_FONT_7x14 is not set
828# CONFIG_FONT_PEARL_8x8 is not set
829# CONFIG_FONT_ACORN_8x8 is not set
830# CONFIG_FONT_MINI_4x6 is not set
831# CONFIG_FONT_SUN8x16 is not set
832# CONFIG_FONT_SUN12x22 is not set
833# CONFIG_FONT_10x18 is not set
834CONFIG_LOGO=y
835# CONFIG_LOGO_LINUX_MONO is not set
836# CONFIG_LOGO_LINUX_VGA16 is not set
837CONFIG_LOGO_LINUX_CLUT224=y
838
839#
840# Sound
841#
842# CONFIG_SOUND is not set
843CONFIG_HID_SUPPORT=y
844CONFIG_HID=y
845CONFIG_HID_DEBUG=y
846CONFIG_USB_SUPPORT=y
847CONFIG_USB_ARCH_HAS_HCD=y
848CONFIG_USB_ARCH_HAS_OHCI=y
849# CONFIG_USB_ARCH_HAS_EHCI is not set
850# CONFIG_USB is not set
851
852#
853# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
854#
855
856#
857# USB Gadget Support
858#
859# CONFIG_USB_GADGET is not set
860# CONFIG_MMC is not set
861CONFIG_RTC_LIB=y
862# CONFIG_RTC_CLASS is not set
863
864#
865# DMA Engine support
866#
867# CONFIG_DMA_ENGINE is not set
868
869#
870# DMA Clients
871#
872
873#
874# DMA Devices
875#
876
877#
878# File systems
879#
880CONFIG_EXT2_FS=y
881# CONFIG_EXT2_FS_XATTR is not set
882# CONFIG_EXT2_FS_XIP is not set
883# CONFIG_EXT3_FS is not set
884# CONFIG_EXT4DEV_FS is not set
885# CONFIG_REISERFS_FS is not set
886# CONFIG_JFS_FS is not set
887# CONFIG_FS_POSIX_ACL is not set
888# CONFIG_XFS_FS is not set
889# CONFIG_GFS2_FS is not set
890# CONFIG_OCFS2_FS is not set
891# CONFIG_MINIX_FS is not set
892# CONFIG_ROMFS_FS is not set
893CONFIG_INOTIFY=y
894CONFIG_INOTIFY_USER=y
895# CONFIG_QUOTA is not set
896CONFIG_DNOTIFY=y
897CONFIG_AUTOFS_FS=y
898CONFIG_AUTOFS4_FS=y
899# CONFIG_FUSE_FS is not set
900
901#
902# CD-ROM/DVD Filesystems
903#
904# CONFIG_ISO9660_FS is not set
905# CONFIG_UDF_FS is not set
906
907#
908# DOS/FAT/NT Filesystems
909#
910CONFIG_FAT_FS=m
911CONFIG_MSDOS_FS=m
912CONFIG_VFAT_FS=m
913CONFIG_FAT_DEFAULT_CODEPAGE=437
914CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
915# CONFIG_NTFS_FS is not set
916
917#
918# Pseudo filesystems
919#
920CONFIG_PROC_FS=y
921CONFIG_PROC_SYSCTL=y
922CONFIG_SYSFS=y
923# CONFIG_TMPFS is not set
924# CONFIG_HUGETLB_PAGE is not set
925CONFIG_RAMFS=y
926# CONFIG_CONFIGFS_FS is not set
927
928#
929# Miscellaneous filesystems
930#
931# CONFIG_ADFS_FS is not set
932# CONFIG_AFFS_FS is not set
933# CONFIG_HFS_FS is not set
934# CONFIG_HFSPLUS_FS is not set
935# CONFIG_BEFS_FS is not set
936# CONFIG_BFS_FS is not set
937# CONFIG_EFS_FS is not set
938CONFIG_JFFS2_FS=y
939CONFIG_JFFS2_FS_DEBUG=0
940CONFIG_JFFS2_FS_WRITEBUFFER=y
941# CONFIG_JFFS2_SUMMARY is not set
942# CONFIG_JFFS2_FS_XATTR is not set
943# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
944CONFIG_JFFS2_ZLIB=y
945CONFIG_JFFS2_RTIME=y
946# CONFIG_JFFS2_RUBIN is not set
947# CONFIG_CRAMFS is not set
948# CONFIG_VXFS_FS is not set
949# CONFIG_HPFS_FS is not set
950# CONFIG_QNX4FS_FS is not set
951# CONFIG_SYSV_FS is not set
952# CONFIG_UFS_FS is not set
953
954#
955# Network File Systems
956#
957CONFIG_NFS_FS=y
958CONFIG_NFS_V3=y
959# CONFIG_NFS_V3_ACL is not set
960# CONFIG_NFS_V4 is not set
961# CONFIG_NFS_DIRECTIO is not set
962# CONFIG_NFSD is not set
963CONFIG_ROOT_NFS=y
964CONFIG_LOCKD=y
965CONFIG_LOCKD_V4=y
966CONFIG_NFS_COMMON=y
967CONFIG_SUNRPC=y
968# CONFIG_SUNRPC_BIND34 is not set
969# CONFIG_RPCSEC_GSS_KRB5 is not set
970# CONFIG_RPCSEC_GSS_SPKM3 is not set
971# CONFIG_SMB_FS is not set
972# CONFIG_CIFS is not set
973# CONFIG_NCP_FS is not set
974# CONFIG_CODA_FS is not set
975# CONFIG_AFS_FS is not set
976
977#
978# Partition Types
979#
980# CONFIG_PARTITION_ADVANCED is not set
981CONFIG_MSDOS_PARTITION=y
982
983#
984# Native Language Support
985#
986CONFIG_NLS=m
987CONFIG_NLS_DEFAULT="iso8859-1"
988CONFIG_NLS_CODEPAGE_437=m
989# CONFIG_NLS_CODEPAGE_737 is not set
990# CONFIG_NLS_CODEPAGE_775 is not set
991# CONFIG_NLS_CODEPAGE_850 is not set
992# CONFIG_NLS_CODEPAGE_852 is not set
993# CONFIG_NLS_CODEPAGE_855 is not set
994# CONFIG_NLS_CODEPAGE_857 is not set
995# CONFIG_NLS_CODEPAGE_860 is not set
996# CONFIG_NLS_CODEPAGE_861 is not set
997# CONFIG_NLS_CODEPAGE_862 is not set
998# CONFIG_NLS_CODEPAGE_863 is not set
999# CONFIG_NLS_CODEPAGE_864 is not set
1000# CONFIG_NLS_CODEPAGE_865 is not set
1001# CONFIG_NLS_CODEPAGE_866 is not set
1002# CONFIG_NLS_CODEPAGE_869 is not set
1003# CONFIG_NLS_CODEPAGE_936 is not set
1004# CONFIG_NLS_CODEPAGE_950 is not set
1005# CONFIG_NLS_CODEPAGE_932 is not set
1006# CONFIG_NLS_CODEPAGE_949 is not set
1007# CONFIG_NLS_CODEPAGE_874 is not set
1008# CONFIG_NLS_ISO8859_8 is not set
1009# CONFIG_NLS_CODEPAGE_1250 is not set
1010# CONFIG_NLS_CODEPAGE_1251 is not set
1011# CONFIG_NLS_ASCII is not set
1012CONFIG_NLS_ISO8859_1=m
1013# CONFIG_NLS_ISO8859_2 is not set
1014# CONFIG_NLS_ISO8859_3 is not set
1015# CONFIG_NLS_ISO8859_4 is not set
1016# CONFIG_NLS_ISO8859_5 is not set
1017# CONFIG_NLS_ISO8859_6 is not set
1018# CONFIG_NLS_ISO8859_7 is not set
1019# CONFIG_NLS_ISO8859_9 is not set
1020# CONFIG_NLS_ISO8859_13 is not set
1021# CONFIG_NLS_ISO8859_14 is not set
1022# CONFIG_NLS_ISO8859_15 is not set
1023# CONFIG_NLS_KOI8_R is not set
1024# CONFIG_NLS_KOI8_U is not set
1025# CONFIG_NLS_UTF8 is not set
1026
1027#
1028# Distributed Lock Manager
1029#
1030# CONFIG_DLM is not set
1031
1032#
1033# Profiling support
1034#
1035# CONFIG_PROFILING is not set
1036
1037#
1038# Kernel hacking
1039#
1040# CONFIG_PRINTK_TIME is not set
1041CONFIG_ENABLE_MUST_CHECK=y
1042# CONFIG_MAGIC_SYSRQ is not set
1043# CONFIG_UNUSED_SYMBOLS is not set
1044# CONFIG_DEBUG_FS is not set
1045# CONFIG_HEADERS_CHECK is not set
1046# CONFIG_DEBUG_KERNEL is not set
1047CONFIG_DEBUG_BUGVERBOSE=y
1048CONFIG_FRAME_POINTER=y
1049# CONFIG_DEBUG_USER is not set
1050
1051#
1052# Security options
1053#
1054# CONFIG_KEYS is not set
1055# CONFIG_SECURITY is not set
1056# CONFIG_CRYPTO is not set
1057
1058#
1059# Library routines
1060#
1061CONFIG_BITREVERSE=y
1062# CONFIG_CRC_CCITT is not set
1063# CONFIG_CRC16 is not set
1064# CONFIG_CRC_ITU_T is not set
1065CONFIG_CRC32=y
1066# CONFIG_CRC7 is not set
1067# CONFIG_LIBCRC32C is not set
1068CONFIG_ZLIB_INFLATE=y
1069CONFIG_ZLIB_DEFLATE=y
1070CONFIG_PLIST=y
1071CONFIG_HAS_IOMEM=y
1072CONFIG_HAS_IOPORT=y
1073CONFIG_HAS_DMA=y
diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S
index a98d0c933db0..cecf658e3625 100644
--- a/arch/arm/kernel/calls.S
+++ b/arch/arm/kernel/calls.S
@@ -361,6 +361,7 @@
361 CALL(sys_signalfd) 361 CALL(sys_signalfd)
362/* 350 */ CALL(sys_timerfd) 362/* 350 */ CALL(sys_timerfd)
363 CALL(sys_eventfd) 363 CALL(sys_eventfd)
364 CALL(sys_fallocate)
364#ifndef syscalls_counted 365#ifndef syscalls_counted
365.equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls 366.equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls
366#define syscalls_counted 367#define syscalls_counted
diff --git a/arch/arm/kernel/relocate_kernel.S b/arch/arm/kernel/relocate_kernel.S
index 7baadae7cb27..062c111c572f 100644
--- a/arch/arm/kernel/relocate_kernel.S
+++ b/arch/arm/kernel/relocate_kernel.S
@@ -7,6 +7,23 @@
7 .globl relocate_new_kernel 7 .globl relocate_new_kernel
8relocate_new_kernel: 8relocate_new_kernel:
9 9
10 /* Move boot params back to where the kernel expects them */
11
12 ldr r0,kexec_boot_params_address
13 teq r0,#0
14 beq 8f
15
16 ldr r1,kexec_boot_params_copy
17 mov r6,#KEXEC_BOOT_PARAMS_SIZE/4
187:
19 ldr r5,[r1],#4
20 str r5,[r0],#4
21 subs r6,r6,#1
22 bne 7b
23
248:
25 /* Boot params moved, now go on with the kernel */
26
10 ldr r0,kexec_indirection_page 27 ldr r0,kexec_indirection_page
11 ldr r1,kexec_start_address 28 ldr r1,kexec_start_address
12 29
@@ -50,7 +67,7 @@ relocate_new_kernel:
50 mov lr,r1 67 mov lr,r1
51 mov r0,#0 68 mov r0,#0
52 ldr r1,kexec_mach_type 69 ldr r1,kexec_mach_type
53 mov r2,#0 70 ldr r2,kexec_boot_params_address
54 mov pc,lr 71 mov pc,lr
55 72
56 .globl kexec_start_address 73 .globl kexec_start_address
@@ -65,6 +82,16 @@ kexec_indirection_page:
65kexec_mach_type: 82kexec_mach_type:
66 .long 0x0 83 .long 0x0
67 84
85 /* phy addr where new kernel will expect to find boot params */
86 .globl kexec_boot_params_address
87kexec_boot_params_address:
88 .long 0x0
89
90 /* phy addr where old kernel put a copy of orig boot params */
91 .globl kexec_boot_params_copy
92kexec_boot_params_copy:
93 .long 0x0
94
68relocate_new_kernel_end: 95relocate_new_kernel_end:
69 96
70 .globl relocate_new_kernel_size 97 .globl relocate_new_kernel_size
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 4de432ec903a..bf56eb337df1 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -24,6 +24,7 @@
24#include <linux/interrupt.h> 24#include <linux/interrupt.h>
25#include <linux/smp.h> 25#include <linux/smp.h>
26#include <linux/fs.h> 26#include <linux/fs.h>
27#include <linux/kexec.h>
27 28
28#include <asm/cpu.h> 29#include <asm/cpu.h>
29#include <asm/elf.h> 30#include <asm/elf.h>
@@ -304,10 +305,23 @@ int cpu_architecture(void)
304 cpu_arch = (processor_id >> 16) & 7; 305 cpu_arch = (processor_id >> 16) & 7;
305 if (cpu_arch) 306 if (cpu_arch)
306 cpu_arch += CPU_ARCH_ARMv3; 307 cpu_arch += CPU_ARCH_ARMv3;
307 } else { 308 } else if ((processor_id & 0x000f0000) == 0x000f0000) {
308 /* the revised CPUID */ 309 unsigned int mmfr0;
309 cpu_arch = ((processor_id >> 12) & 0xf) - 0xb + CPU_ARCH_ARMv6; 310
310 } 311 /* Revised CPUID format. Read the Memory Model Feature
312 * Register 0 and check for VMSAv7 or PMSAv7 */
313 asm("mrc p15, 0, %0, c0, c1, 4"
314 : "=r" (mmfr0));
315 if ((mmfr0 & 0x0000000f) == 0x00000003 ||
316 (mmfr0 & 0x000000f0) == 0x00000030)
317 cpu_arch = CPU_ARCH_ARMv7;
318 else if ((mmfr0 & 0x0000000f) == 0x00000002 ||
319 (mmfr0 & 0x000000f0) == 0x00000020)
320 cpu_arch = CPU_ARCH_ARMv6;
321 else
322 cpu_arch = CPU_ARCH_UNKNOWN;
323 } else
324 cpu_arch = CPU_ARCH_UNKNOWN;
311 325
312 return cpu_arch; 326 return cpu_arch;
313} 327}
@@ -770,6 +784,23 @@ static int __init customize_machine(void)
770} 784}
771arch_initcall(customize_machine); 785arch_initcall(customize_machine);
772 786
787#ifdef CONFIG_KEXEC
788
789/* Physical addr of where the boot params should be for this machine */
790extern unsigned long kexec_boot_params_address;
791
792/* Physical addr of the buffer into which the boot params are copied */
793extern unsigned long kexec_boot_params_copy;
794
795/* Pointer to the boot params buffer, for manipulation and display */
796unsigned long kexec_boot_params;
797EXPORT_SYMBOL(kexec_boot_params);
798
799/* The buffer itself - make sure it is sized correctly */
800static unsigned long kexec_boot_params_buf[(KEXEC_BOOT_PARAMS_SIZE + 3) / 4];
801
802#endif
803
773void __init setup_arch(char **cmdline_p) 804void __init setup_arch(char **cmdline_p)
774{ 805{
775 struct tag *tags = (struct tag *)&init_tags; 806 struct tag *tags = (struct tag *)&init_tags;
@@ -788,6 +819,18 @@ void __init setup_arch(char **cmdline_p)
788 else if (mdesc->boot_params) 819 else if (mdesc->boot_params)
789 tags = phys_to_virt(mdesc->boot_params); 820 tags = phys_to_virt(mdesc->boot_params);
790 821
822#ifdef CONFIG_KEXEC
823 kexec_boot_params_copy = virt_to_phys(kexec_boot_params_buf);
824 kexec_boot_params = (unsigned long)kexec_boot_params_buf;
825 if (__atags_pointer) {
826 kexec_boot_params_address = __atags_pointer;
827 memcpy((void *)kexec_boot_params, tags, KEXEC_BOOT_PARAMS_SIZE);
828 } else if (mdesc->boot_params) {
829 kexec_boot_params_address = mdesc->boot_params;
830 memcpy((void *)kexec_boot_params, tags, KEXEC_BOOT_PARAMS_SIZE);
831 }
832#endif
833
791 /* 834 /*
792 * If we have the old style parameters, convert them to 835 * If we have the old style parameters, convert them to
793 * a tag list. 836 * a tag list.
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index a31157f1655a..05a9f8a1b45e 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -7,6 +7,8 @@ choice
7 7
8config ARCH_AT91RM9200 8config ARCH_AT91RM9200
9 bool "AT91RM9200" 9 bool "AT91RM9200"
10 select GENERIC_TIME
11 select GENERIC_CLOCKEVENTS
10 12
11config ARCH_AT91SAM9260 13config ARCH_AT91SAM9260
12 bool "AT91SAM9260 or AT91SAM9XE" 14 bool "AT91SAM9260 or AT91SAM9XE"
@@ -20,8 +22,15 @@ config ARCH_AT91SAM9263
20config ARCH_AT91SAM9RL 22config ARCH_AT91SAM9RL
21 bool "AT91SAM9RL" 23 bool "AT91SAM9RL"
22 24
25config ARCH_AT91X40
26 bool "AT91x40"
27
23endchoice 28endchoice
24 29
30config AT91_PMC_UNIT
31 bool
32 default !ARCH_AT91X40
33
25# ---------------------------------------------------------- 34# ----------------------------------------------------------
26 35
27if ARCH_AT91RM9200 36if ARCH_AT91RM9200
@@ -169,6 +178,22 @@ endif
169 178
170# ---------------------------------------------------------- 179# ----------------------------------------------------------
171 180
181if ARCH_AT91X40
182
183comment "AT91X40 Board Type"
184
185config MACH_AT91EB01
186 bool "Atmel AT91EB01 Evaluation Kit"
187 help
188 Select this if you are using Atmel's AT91EB01 Evaluation Kit.
189 It is also a popular target for simulators such as GDB's
190 ARM simulator (commonly known as the ARMulator) and the
191 Skyeye simulator.
192
193endif
194
195# ----------------------------------------------------------
196
172comment "AT91 Board Options" 197comment "AT91 Board Options"
173 198
174config MTD_AT91_DATAFLASH_CARD 199config MTD_AT91_DATAFLASH_CARD
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile
index a4d80eb056ee..a21f08c64ea6 100644
--- a/arch/arm/mach-at91/Makefile
+++ b/arch/arm/mach-at91/Makefile
@@ -2,11 +2,12 @@
2# Makefile for the linux kernel. 2# Makefile for the linux kernel.
3# 3#
4 4
5obj-y := clock.o irq.o gpio.o 5obj-y := irq.o gpio.o
6obj-m := 6obj-m :=
7obj-n := 7obj-n :=
8obj- := 8obj- :=
9 9
10obj-$(CONFIG_AT91_PMC_UNIT) += clock.o
10obj-$(CONFIG_PM) += pm.o 11obj-$(CONFIG_PM) += pm.o
11 12
12# CPU-specific support 13# CPU-specific support
@@ -15,6 +16,7 @@ obj-$(CONFIG_ARCH_AT91SAM9260) += at91sam9260.o at91sam926x_time.o at91sam9260_d
15obj-$(CONFIG_ARCH_AT91SAM9261) += at91sam9261.o at91sam926x_time.o at91sam9261_devices.o 16obj-$(CONFIG_ARCH_AT91SAM9261) += at91sam9261.o at91sam926x_time.o at91sam9261_devices.o
16obj-$(CONFIG_ARCH_AT91SAM9263) += at91sam9263.o at91sam926x_time.o at91sam9263_devices.o 17obj-$(CONFIG_ARCH_AT91SAM9263) += at91sam9263.o at91sam926x_time.o at91sam9263_devices.o
17obj-$(CONFIG_ARCH_AT91SAM9RL) += at91sam9rl.o at91sam926x_time.o at91sam9rl_devices.o 18obj-$(CONFIG_ARCH_AT91SAM9RL) += at91sam9rl.o at91sam926x_time.o at91sam9rl_devices.o
19obj-$(CONFIG_ARCH_AT91X40) += at91x40.o at91x40_time.o
18 20
19# AT91RM9200 board-specific support 21# AT91RM9200 board-specific support
20obj-$(CONFIG_MACH_ONEARM) += board-1arm.o 22obj-$(CONFIG_MACH_ONEARM) += board-1arm.o
@@ -27,6 +29,7 @@ obj-$(CONFIG_MACH_KB9200) += board-kb9202.o
27obj-$(CONFIG_MACH_ATEB9200) += board-eb9200.o 29obj-$(CONFIG_MACH_ATEB9200) += board-eb9200.o
28obj-$(CONFIG_MACH_KAFA) += board-kafa.o 30obj-$(CONFIG_MACH_KAFA) += board-kafa.o
29obj-$(CONFIG_MACH_PICOTUX2XX) += board-picotux200.o 31obj-$(CONFIG_MACH_PICOTUX2XX) += board-picotux200.o
32obj-$(CONFIG_MACH_AT91EB01) += board-eb01.o
30 33
31# AT91SAM9260 board-specific support 34# AT91SAM9260 board-specific support
32obj-$(CONFIG_MACH_AT91SAM9260EK) += board-sam9260ek.o 35obj-$(CONFIG_MACH_AT91SAM9260EK) += board-sam9260ek.o
diff --git a/arch/arm/mach-at91/at91rm9200_time.c b/arch/arm/mach-at91/at91rm9200_time.c
index a6340357585d..50392ff71513 100644
--- a/arch/arm/mach-at91/at91rm9200_time.c
+++ b/arch/arm/mach-at91/at91rm9200_time.c
@@ -19,70 +19,64 @@
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */ 20 */
21 21
22#include <linux/init.h> 22#include <linux/kernel.h>
23#include <linux/interrupt.h> 23#include <linux/interrupt.h>
24#include <linux/irq.h> 24#include <linux/irq.h>
25#include <linux/kernel.h> 25#include <linux/clockchips.h>
26#include <linux/sched.h>
27#include <linux/time.h>
28 26
29#include <asm/hardware.h>
30#include <asm/io.h>
31#include <asm/mach/time.h> 27#include <asm/mach/time.h>
32 28
33#include <asm/arch/at91_st.h> 29#include <asm/arch/at91_st.h>
34 30
35static unsigned long last_crtr; 31static unsigned long last_crtr;
32static u32 irqmask;
33static struct clock_event_device clkevt;
36 34
37/* 35/*
38 * The ST_CRTR is updated asynchronously to the master clock. It is therefore 36 * The ST_CRTR is updated asynchronously to the master clock ... but
39 * necessary to read it twice (with the same value) to ensure accuracy. 37 * the updates as seen by the CPU don't seem to be strictly monotonic.
38 * Waiting until we read the same value twice avoids glitching.
40 */ 39 */
41static inline unsigned long read_CRTR(void) { 40static inline unsigned long read_CRTR(void)
41{
42 unsigned long x1, x2; 42 unsigned long x1, x2;
43 43
44 x1 = at91_sys_read(AT91_ST_CRTR);
44 do { 45 do {
45 x1 = at91_sys_read(AT91_ST_CRTR);
46 x2 = at91_sys_read(AT91_ST_CRTR); 46 x2 = at91_sys_read(AT91_ST_CRTR);
47 } while (x1 != x2); 47 if (x1 == x2)
48 48 break;
49 x1 = x2;
50 } while (1);
49 return x1; 51 return x1;
50} 52}
51 53
52/* 54/*
53 * Returns number of microseconds since last timer interrupt. Note that interrupts
54 * will have been disabled by do_gettimeofday()
55 * 'LATCH' is hwclock ticks (see CLOCK_TICK_RATE in timex.h) per jiffy.
56 * 'tick' is usecs per jiffy (linux/timex.h).
57 */
58static unsigned long at91rm9200_gettimeoffset(void)
59{
60 unsigned long elapsed;
61
62 elapsed = (read_CRTR() - last_crtr) & AT91_ST_ALMV;
63
64 return (unsigned long)(elapsed * (tick_nsec / 1000)) / LATCH;
65}
66
67/*
68 * IRQ handler for the timer. 55 * IRQ handler for the timer.
69 */ 56 */
70static irqreturn_t at91rm9200_timer_interrupt(int irq, void *dev_id) 57static irqreturn_t at91rm9200_timer_interrupt(int irq, void *dev_id)
71{ 58{
72 if (at91_sys_read(AT91_ST_SR) & AT91_ST_PITS) { /* This is a shared interrupt */ 59 u32 sr = at91_sys_read(AT91_ST_SR) & irqmask;
73 write_seqlock(&xtime_lock);
74 60
75 while (((read_CRTR() - last_crtr) & AT91_ST_ALMV) >= LATCH) { 61 /* simulate "oneshot" timer with alarm */
76 timer_tick(); 62 if (sr & AT91_ST_ALMS) {
77 last_crtr = (last_crtr + LATCH) & AT91_ST_ALMV; 63 clkevt.event_handler(&clkevt);
78 } 64 return IRQ_HANDLED;
65 }
79 66
80 write_sequnlock(&xtime_lock); 67 /* periodic mode should handle delayed ticks */
68 if (sr & AT91_ST_PITS) {
69 u32 crtr = read_CRTR();
81 70
71 while (((crtr - last_crtr) & AT91_ST_CRTV) >= LATCH) {
72 last_crtr += LATCH;
73 clkevt.event_handler(&clkevt);
74 }
82 return IRQ_HANDLED; 75 return IRQ_HANDLED;
83 } 76 }
84 else 77
85 return IRQ_NONE; /* not handled */ 78 /* this irq is shared ... */
79 return IRQ_NONE;
86} 80}
87 81
88static struct irqaction at91rm9200_timer_irq = { 82static struct irqaction at91rm9200_timer_irq = {
@@ -91,56 +85,127 @@ static struct irqaction at91rm9200_timer_irq = {
91 .handler = at91rm9200_timer_interrupt 85 .handler = at91rm9200_timer_interrupt
92}; 86};
93 87
94void at91rm9200_timer_reset(void) 88static cycle_t read_clk32k(void)
95{ 89{
96 last_crtr = 0; 90 return read_CRTR();
91}
97 92
98 /* Real time counter incremented every 30.51758 microseconds */ 93static struct clocksource clk32k = {
99 at91_sys_write(AT91_ST_RTMR, 1); 94 .name = "32k_counter",
95 .rating = 150,
96 .read = read_clk32k,
97 .mask = CLOCKSOURCE_MASK(20),
98 .shift = 10,
99 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
100};
101
102static void
103clkevt32k_mode(enum clock_event_mode mode, struct clock_event_device *dev)
104{
105 /* Disable and flush pending timer interrupts */
106 at91_sys_write(AT91_ST_IDR, AT91_ST_PITS | AT91_ST_ALMS);
107 (void) at91_sys_read(AT91_ST_SR);
100 108
101 /* Set Period Interval timer */ 109 last_crtr = read_CRTR();
102 at91_sys_write(AT91_ST_PIMR, LATCH); 110 switch (mode) {
111 case CLOCK_EVT_MODE_PERIODIC:
112 /* PIT for periodic irqs; fixed rate of 1/HZ */
113 irqmask = AT91_ST_PITS;
114 at91_sys_write(AT91_ST_PIMR, LATCH);
115 break;
116 case CLOCK_EVT_MODE_ONESHOT:
117 /* ALM for oneshot irqs, set by next_event()
118 * before 32 seconds have passed
119 */
120 irqmask = AT91_ST_ALMS;
121 at91_sys_write(AT91_ST_RTAR, last_crtr);
122 break;
123 case CLOCK_EVT_MODE_SHUTDOWN:
124 case CLOCK_EVT_MODE_UNUSED:
125 case CLOCK_EVT_MODE_RESUME:
126 irqmask = 0;
127 break;
128 }
129 at91_sys_write(AT91_ST_IER, irqmask);
130}
103 131
104 /* Clear any pending interrupts */ 132static int
133clkevt32k_next_event(unsigned long delta, struct clock_event_device *dev)
134{
135 unsigned long flags;
136 u32 alm;
137 int status = 0;
138
139 BUG_ON(delta < 2);
140
141 /* Use "raw" primitives so we behave correctly on RT kernels. */
142 raw_local_irq_save(flags);
143
144 /* The alarm IRQ uses absolute time (now+delta), not the relative
145 * time (delta) in our calling convention. Like all clockevents
146 * using such "match" hardware, we have a race to defend against.
147 *
148 * Our defense here is to have set up the clockevent device so the
149 * delta is at least two. That way we never end up writing RTAR
150 * with the value then held in CRTR ... which would mean the match
151 * wouldn't trigger until 32 seconds later, after CRTR wraps.
152 */
153 alm = read_CRTR();
154
155 /* Cancel any pending alarm; flush any pending IRQ */
156 at91_sys_write(AT91_ST_RTAR, alm);
105 (void) at91_sys_read(AT91_ST_SR); 157 (void) at91_sys_read(AT91_ST_SR);
106 158
107 /* Enable Period Interval Timer interrupt */ 159 /* Schedule alarm by writing RTAR. */
108 at91_sys_write(AT91_ST_IER, AT91_ST_PITS); 160 alm += delta;
161 at91_sys_write(AT91_ST_RTAR, alm);
162
163 raw_local_irq_restore(flags);
164 return status;
109} 165}
110 166
167static struct clock_event_device clkevt = {
168 .name = "at91_tick",
169 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
170 .shift = 32,
171 .rating = 150,
172 .cpumask = CPU_MASK_CPU0,
173 .set_next_event = clkevt32k_next_event,
174 .set_mode = clkevt32k_mode,
175};
176
111/* 177/*
112 * Set up timer interrupt. 178 * ST (system timer) module supports both clockevents and clocksource.
113 */ 179 */
114void __init at91rm9200_timer_init(void) 180void __init at91rm9200_timer_init(void)
115{ 181{
116 /* Disable all timer interrupts */ 182 /* Disable all timer interrupts, and clear any pending ones */
117 at91_sys_write(AT91_ST_IDR, AT91_ST_PITS | AT91_ST_WDOVF | AT91_ST_RTTINC | AT91_ST_ALMS); 183 at91_sys_write(AT91_ST_IDR,
118 (void) at91_sys_read(AT91_ST_SR); /* Clear any pending interrupts */ 184 AT91_ST_PITS | AT91_ST_WDOVF | AT91_ST_RTTINC | AT91_ST_ALMS);
185 (void) at91_sys_read(AT91_ST_SR);
119 186
120 /* Make IRQs happen for the system timer */ 187 /* Make IRQs happen for the system timer */
121 setup_irq(AT91_ID_SYS, &at91rm9200_timer_irq); 188 setup_irq(AT91_ID_SYS, &at91rm9200_timer_irq);
122 189
123 /* Change the kernel's 'tick' value to 10009 usec. (the default is 10000) */ 190 /* The 32KiHz "Slow Clock" (tick every 30517.58 nanoseconds) is used
124 tick_usec = (LATCH * 1000000) / CLOCK_TICK_RATE; 191 * directly for the clocksource and all clockevents, after adjusting
192 * its prescaler from the 1 Hz default.
193 */
194 at91_sys_write(AT91_ST_RTMR, 1);
125 195
126 /* Initialize and enable the timer interrupt */ 196 /* Setup timer clockevent, with minimum of two ticks (important!!) */
127 at91rm9200_timer_reset(); 197 clkevt.mult = div_sc(AT91_SLOW_CLOCK, NSEC_PER_SEC, clkevt.shift);
128} 198 clkevt.max_delta_ns = clockevent_delta2ns(AT91_ST_ALMV, &clkevt);
199 clkevt.min_delta_ns = clockevent_delta2ns(2, &clkevt) + 1;
200 clkevt.cpumask = cpumask_of_cpu(0);
201 clockevents_register_device(&clkevt);
129 202
130#ifdef CONFIG_PM 203 /* register clocksource */
131static void at91rm9200_timer_suspend(void) 204 clk32k.mult = clocksource_hz2mult(AT91_SLOW_CLOCK, clk32k.shift);
132{ 205 clocksource_register(&clk32k);
133 /* disable Period Interval Timer interrupt */
134 at91_sys_write(AT91_ST_IDR, AT91_ST_PITS);
135} 206}
136#else
137#define at91rm9200_timer_suspend NULL
138#endif
139 207
140struct sys_timer at91rm9200_timer = { 208struct sys_timer at91rm9200_timer = {
141 .init = at91rm9200_timer_init, 209 .init = at91rm9200_timer_init,
142 .offset = at91rm9200_gettimeoffset,
143 .suspend = at91rm9200_timer_suspend,
144 .resume = at91rm9200_timer_reset,
145}; 210};
146 211
diff --git a/arch/arm/mach-at91/at91x40.c b/arch/arm/mach-at91/at91x40.c
new file mode 100644
index 000000000000..1de121fc55f4
--- /dev/null
+++ b/arch/arm/mach-at91/at91x40.c
@@ -0,0 +1,67 @@
1/*
2 * arch/arm/mach-at91/at91x40.c
3 *
4 * (C) Copyright 2007, Greg Ungerer <gerg@snapgear.com>
5 * Copyright (C) 2005 SAN People
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12
13#include <linux/kernel.h>
14#include <linux/init.h>
15#include <linux/irq.h>
16#include <asm/mach/arch.h>
17#include <asm/arch/at91x40.h>
18#include <asm/arch/at91_st.h>
19#include "generic.h"
20
21/*
22 * This is used in the gpio code, stub locally.
23 */
24int clk_enable(struct clk *clk)
25{
26 return 0;
27}
28
29void __init at91x40_initialize(unsigned long main_clock)
30{
31 at91_extern_irq = (1 << AT91X40_ID_IRQ0) | (1 << AT91X40_ID_IRQ1)
32 | (1 << AT91X40_ID_IRQ2);
33}
34
35/*
36 * The default interrupt priority levels (0 = lowest, 7 = highest).
37 */
38static unsigned int at91x40_default_irq_priority[NR_AIC_IRQS] __initdata = {
39 7, /* Advanced Interrupt Controller (FIQ) */
40 0, /* System Peripherals */
41 0, /* USART 0 */
42 0, /* USART 1 */
43 2, /* Timer Counter 0 */
44 2, /* Timer Counter 1 */
45 2, /* Timer Counter 2 */
46 0, /* Watchdog timer */
47 0, /* Parallel IO Controller A */
48 0, /* Reserved */
49 0, /* Reserved */
50 0, /* Reserved */
51 0, /* Reserved */
52 0, /* Reserved */
53 0, /* Reserved */
54 0, /* Reserved */
55 0, /* External IRQ0 */
56 0, /* External IRQ1 */
57 0, /* External IRQ2 */
58};
59
60void __init at91x40_init_interrupts(unsigned int priority[NR_AIC_IRQS])
61{
62 if (!priority)
63 priority = at91x40_default_irq_priority;
64
65 at91_aic_init(priority);
66}
67
diff --git a/arch/arm/mach-at91/at91x40_time.c b/arch/arm/mach-at91/at91x40_time.c
new file mode 100644
index 000000000000..eddc882f1b4a
--- /dev/null
+++ b/arch/arm/mach-at91/at91x40_time.c
@@ -0,0 +1,80 @@
1/*
2 * arch/arm/mach-at91/at91x40_time.c
3 *
4 * (C) Copyright 2007, Greg Ungerer <gerg@snapgear.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#include <linux/kernel.h>
22#include <linux/init.h>
23#include <linux/interrupt.h>
24#include <linux/irq.h>
25#include <linux/time.h>
26#include <asm/hardware.h>
27#include <asm/io.h>
28#include <asm/mach/time.h>
29#include <asm/arch/at91_tc.h>
30
31/*
32 * 3 counter/timer units present.
33 */
34#define AT91_TC_CLK0BASE 0
35#define AT91_TC_CLK1BASE 0x40
36#define AT91_TC_CLK2BASE 0x80
37
38static unsigned long at91x40_gettimeoffset(void)
39{
40 return (at91_sys_read(AT91_TC + AT91_TC_CLK1BASE + AT91_TC_CV) * 1000000 / (AT91X40_MASTER_CLOCK / 128));
41}
42
43static irqreturn_t at91x40_timer_interrupt(int irq, void *dev_id)
44{
45 at91_sys_read(AT91_TC + AT91_TC_CLK1BASE + AT91_TC_SR);
46 timer_tick();
47 return IRQ_HANDLED;
48}
49
50static struct irqaction at91x40_timer_irq = {
51 .name = "at91_tick",
52 .flags = IRQF_DISABLED | IRQF_TIMER,
53 .handler = at91x40_timer_interrupt
54};
55
56void __init at91x40_timer_init(void)
57{
58 unsigned int v;
59
60 at91_sys_write(AT91_TC + AT91_TC_BCR, 0);
61 v = at91_sys_read(AT91_TC + AT91_TC_BMR);
62 v = (v & ~AT91_TC_TC1XC1S) | AT91_TC_TC1XC1S_NONE;
63 at91_sys_write(AT91_TC + AT91_TC_BMR, v);
64
65 at91_sys_write(AT91_TC + AT91_TC_CLK1BASE + AT91_TC_CCR, AT91_TC_CLKDIS);
66 at91_sys_write(AT91_TC + AT91_TC_CLK1BASE + AT91_TC_CMR, (AT91_TC_TIMER_CLOCK4 | AT91_TC_CPCTRG));
67 at91_sys_write(AT91_TC + AT91_TC_CLK1BASE + AT91_TC_IDR, 0xffffffff);
68 at91_sys_write(AT91_TC + AT91_TC_CLK1BASE + AT91_TC_RC, (AT91X40_MASTER_CLOCK / 128) / HZ - 1);
69 at91_sys_write(AT91_TC + AT91_TC_CLK1BASE + AT91_TC_IER, (1<<4));
70
71 setup_irq(AT91X40_ID_TC1, &at91x40_timer_irq);
72
73 at91_sys_write(AT91_TC + AT91_TC_CLK1BASE + AT91_TC_CCR, (AT91_TC_SWTRG | AT91_TC_CLKEN));
74}
75
76struct sys_timer at91x40_timer = {
77 .init = at91x40_timer_init,
78 .offset = at91x40_gettimeoffset,
79};
80
diff --git a/arch/arm/mach-at91/board-eb01.c b/arch/arm/mach-at91/board-eb01.c
new file mode 100644
index 000000000000..0c1e3858e7df
--- /dev/null
+++ b/arch/arm/mach-at91/board-eb01.c
@@ -0,0 +1,44 @@
1/*
2 * arch/arm/mach-at91/board-eb01.c
3 *
4 * (C) Copyright 2007, Greg Ungerer <gerg@snapgear.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#include <linux/kernel.h>
22#include <linux/init.h>
23#include <linux/module.h>
24#include <linux/platform_device.h>
25#include <linux/irq.h>
26#include <asm/mach-types.h>
27#include <asm/hardware.h>
28#include <asm/mach/arch.h>
29#include <asm/mach/map.h>
30#include <asm/arch/board.h>
31#include "generic.h"
32
33static void __init at91eb01_map_io(void)
34{
35 at91x40_initialize(40000000);
36}
37
38MACHINE_START(AT91EB01, "Atmel AT91 EB01")
39 /* Maintainer: Greg Ungerer <gerg@snapgear.com> */
40 .timer = &at91x40_timer,
41 .init_irq = at91x40_init_interrupts,
42 .map_io = at91eb01_map_io,
43MACHINE_END
44
diff --git a/arch/arm/mach-at91/generic.h b/arch/arm/mach-at91/generic.h
index 68ed71a3e6c6..77d4c0a37842 100644
--- a/arch/arm/mach-at91/generic.h
+++ b/arch/arm/mach-at91/generic.h
@@ -14,6 +14,7 @@ extern void __init at91sam9260_initialize(unsigned long main_clock);
14extern void __init at91sam9261_initialize(unsigned long main_clock); 14extern void __init at91sam9261_initialize(unsigned long main_clock);
15extern void __init at91sam9263_initialize(unsigned long main_clock); 15extern void __init at91sam9263_initialize(unsigned long main_clock);
16extern void __init at91sam9rl_initialize(unsigned long main_clock); 16extern void __init at91sam9rl_initialize(unsigned long main_clock);
17extern void __init at91x40_initialize(unsigned long main_clock);
17 18
18 /* Interrupts */ 19 /* Interrupts */
19extern void __init at91rm9200_init_interrupts(unsigned int priority[]); 20extern void __init at91rm9200_init_interrupts(unsigned int priority[]);
@@ -21,12 +22,14 @@ extern void __init at91sam9260_init_interrupts(unsigned int priority[]);
21extern void __init at91sam9261_init_interrupts(unsigned int priority[]); 22extern void __init at91sam9261_init_interrupts(unsigned int priority[]);
22extern void __init at91sam9263_init_interrupts(unsigned int priority[]); 23extern void __init at91sam9263_init_interrupts(unsigned int priority[]);
23extern void __init at91sam9rl_init_interrupts(unsigned int priority[]); 24extern void __init at91sam9rl_init_interrupts(unsigned int priority[]);
25extern void __init at91x40_init_interrupts(unsigned int priority[]);
24extern void __init at91_aic_init(unsigned int priority[]); 26extern void __init at91_aic_init(unsigned int priority[]);
25 27
26 /* Timer */ 28 /* Timer */
27struct sys_timer; 29struct sys_timer;
28extern struct sys_timer at91rm9200_timer; 30extern struct sys_timer at91rm9200_timer;
29extern struct sys_timer at91sam926x_timer; 31extern struct sys_timer at91sam926x_timer;
32extern struct sys_timer at91x40_timer;
30 33
31 /* Clocks */ 34 /* Clocks */
32extern int __init at91_clock_init(unsigned long main_clock); 35extern int __init at91_clock_init(unsigned long main_clock);
diff --git a/arch/arm/mach-clps7500/core.c b/arch/arm/mach-clps7500/core.c
index 4dde34f25e63..986205ec9269 100644
--- a/arch/arm/mach-clps7500/core.c
+++ b/arch/arm/mach-clps7500/core.c
@@ -193,7 +193,11 @@ static struct irq_chip clps7500_no_chip = {
193 .unmask = cl7500_no_action, 193 .unmask = cl7500_no_action,
194}; 194};
195 195
196static struct irqaction irq_isa = { no_action, 0, CPU_MASK_NONE, "isa", NULL, NULL }; 196static struct irqaction irq_isa = {
197 .handler = no_action,
198 .mask = CPU_MASK_NONE,
199 .name = "isa",
200};
197 201
198static void __init clps7500_init_irq(void) 202static void __init clps7500_init_irq(void)
199{ 203{
diff --git a/arch/arm/mach-ep93xx/Kconfig b/arch/arm/mach-ep93xx/Kconfig
index 575a21dabd2f..ea8549bfbef2 100644
--- a/arch/arm/mach-ep93xx/Kconfig
+++ b/arch/arm/mach-ep93xx/Kconfig
@@ -27,6 +27,12 @@ config MACH_EDB9302A
27 Say 'Y' here if you want your kernel to support the Cirrus 27 Say 'Y' here if you want your kernel to support the Cirrus
28 Logic EDB9302A Evaluation Board. 28 Logic EDB9302A Evaluation Board.
29 29
30config MACH_EDB9307
31 bool "Support Cirrus Logic EDB9307"
32 help
33 Say 'Y' here if you want your kernel to support the Cirrus
34 Logic EDB9307 Evaluation Board.
35
30config MACH_EDB9312 36config MACH_EDB9312
31 bool "Support Cirrus Logic EDB9312" 37 bool "Support Cirrus Logic EDB9312"
32 help 38 help
diff --git a/arch/arm/mach-ep93xx/Makefile b/arch/arm/mach-ep93xx/Makefile
index 0d3bf932654e..0ecf99761feb 100644
--- a/arch/arm/mach-ep93xx/Makefile
+++ b/arch/arm/mach-ep93xx/Makefile
@@ -9,6 +9,7 @@ obj- :=
9obj-$(CONFIG_MACH_ADSSPHERE) += adssphere.o 9obj-$(CONFIG_MACH_ADSSPHERE) += adssphere.o
10obj-$(CONFIG_MACH_EDB9302) += edb9302.o 10obj-$(CONFIG_MACH_EDB9302) += edb9302.o
11obj-$(CONFIG_MACH_EDB9302A) += edb9302a.o 11obj-$(CONFIG_MACH_EDB9302A) += edb9302a.o
12obj-$(CONFIG_MACH_EDB9307) += edb9307.o
12obj-$(CONFIG_MACH_EDB9312) += edb9312.o 13obj-$(CONFIG_MACH_EDB9312) += edb9312.o
13obj-$(CONFIG_MACH_EDB9315) += edb9315.o 14obj-$(CONFIG_MACH_EDB9315) += edb9315.o
14obj-$(CONFIG_MACH_EDB9315A) += edb9315a.o 15obj-$(CONFIG_MACH_EDB9315A) += edb9315a.o
diff --git a/arch/arm/mach-ep93xx/edb9307.c b/arch/arm/mach-ep93xx/edb9307.c
new file mode 100644
index 000000000000..d6a5698da91f
--- /dev/null
+++ b/arch/arm/mach-ep93xx/edb9307.c
@@ -0,0 +1,91 @@
1/*
2 * arch/arm/mach-ep93xx/edb9307.c
3 * Cirrus Logic EDB9307 support.
4 *
5 * Copyright (C) 2007 Herbert Valerio Riedel <hvr@gnu.org>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or (at
10 * your option) any later version.
11 */
12
13#include <linux/kernel.h>
14#include <linux/init.h>
15#include <linux/mm.h>
16#include <linux/sched.h>
17#include <linux/interrupt.h>
18#include <linux/ioport.h>
19#include <linux/mtd/physmap.h>
20#include <linux/platform_device.h>
21#include <asm/io.h>
22#include <asm/hardware.h>
23#include <asm/mach-types.h>
24#include <asm/mach/arch.h>
25
26static struct physmap_flash_data edb9307_flash_data = {
27 .width = 4,
28};
29
30static struct resource edb9307_flash_resource = {
31 .start = 0x60000000,
32 .end = 0x61ffffff,
33 .flags = IORESOURCE_MEM,
34};
35
36static struct platform_device edb9307_flash = {
37 .name = "physmap-flash",
38 .id = 0,
39 .dev = {
40 .platform_data = &edb9307_flash_data,
41 },
42 .num_resources = 1,
43 .resource = &edb9307_flash_resource,
44};
45
46static struct ep93xx_eth_data edb9307_eth_data = {
47 .phy_id = 1,
48};
49
50static struct resource edb9307_eth_resource[] = {
51 {
52 .start = EP93XX_ETHERNET_PHYS_BASE,
53 .end = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
54 .flags = IORESOURCE_MEM,
55 }, {
56 .start = IRQ_EP93XX_ETHERNET,
57 .end = IRQ_EP93XX_ETHERNET,
58 .flags = IORESOURCE_IRQ,
59 }
60};
61
62static struct platform_device edb9307_eth_device = {
63 .name = "ep93xx-eth",
64 .id = -1,
65 .dev = {
66 .platform_data = &edb9307_eth_data,
67 },
68 .num_resources = 2,
69 .resource = edb9307_eth_resource,
70};
71
72static void __init edb9307_init_machine(void)
73{
74 ep93xx_init_devices();
75 platform_device_register(&edb9307_flash);
76
77 memcpy(edb9307_eth_data.dev_addr,
78 (void *)(EP93XX_ETHERNET_BASE + 0x50), 6);
79 platform_device_register(&edb9307_eth_device);
80}
81
82MACHINE_START(EDB9307, "Cirrus Logic EDB9307 Evaluation Board")
83 /* Maintainer: Herbert Valerio Riedel <hvr@gnu.org> */
84 .phys_io = EP93XX_APB_PHYS_BASE,
85 .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
86 .boot_params = 0x00000100,
87 .map_io = ep93xx_map_io,
88 .init_irq = ep93xx_init_irq,
89 .timer = &ep93xx_timer,
90 .init_machine = edb9307_init_machine,
91MACHINE_END
diff --git a/arch/arm/mach-footbridge/isa.c b/arch/arm/mach-footbridge/isa.c
index 28846c7edaaf..725a219d0ed5 100644
--- a/arch/arm/mach-footbridge/isa.c
+++ b/arch/arm/mach-footbridge/isa.c
@@ -12,6 +12,39 @@
12 12
13#include <asm/irq.h> 13#include <asm/irq.h>
14 14
15static struct resource rtc_resources[] = {
16 [0] = {
17 .start = 0x70,
18 .end = 0x73,
19 .flags = IORESOURCE_IO,
20 },
21 [1] = {
22 .start = IRQ_ISA_RTC_ALARM,
23 .end = IRQ_ISA_RTC_ALARM,
24 .flags = IORESOURCE_IRQ,
25 }
26};
27
28static struct platform_device rtc_device = {
29 .name = "rtc_cmos",
30 .id = -1,
31 .resource = rtc_resources,
32 .num_resources = ARRAY_SIZE(rtc_resources),
33};
34
35static struct resource serial_resources[] = {
36 [0] = {
37 .start = 0x3f8,
38 .end = 0x3ff,
39 .flags = IORESOURCE_IO,
40 },
41 [1] = {
42 .start = 0x2f8,
43 .end = 0x2ff,
44 .flags = IORESOURCE_IO,
45 },
46};
47
15static struct plat_serial8250_port serial_platform_data[] = { 48static struct plat_serial8250_port serial_platform_data[] = {
16 { 49 {
17 .iobase = 0x3f8, 50 .iobase = 0x3f8,
@@ -38,11 +71,21 @@ static struct platform_device serial_device = {
38 .dev = { 71 .dev = {
39 .platform_data = serial_platform_data, 72 .platform_data = serial_platform_data,
40 }, 73 },
74 .resource = serial_resources,
75 .num_resources = ARRAY_SIZE(serial_resources),
41}; 76};
42 77
43static int __init footbridge_isa_init(void) 78static int __init footbridge_isa_init(void)
44{ 79{
45 return platform_device_register(&serial_device); 80 int err;
81
82 err = platform_device_register(&rtc_device);
83 if (err)
84 printk(KERN_ERR "Unable to register RTC device: %d\n", err);
85 err = platform_device_register(&serial_device);
86 if (err)
87 printk(KERN_ERR "Unable to register serial device: %d\n", err);
88 return 0;
46} 89}
47 90
48arch_initcall(footbridge_isa_init); 91arch_initcall(footbridge_isa_init);
diff --git a/arch/arm/mach-ns9xxx/Makefile b/arch/arm/mach-ns9xxx/Makefile
index 4476411b8140..6fb82b855a55 100644
--- a/arch/arm/mach-ns9xxx/Makefile
+++ b/arch/arm/mach-ns9xxx/Makefile
@@ -1,4 +1,4 @@
1obj-y := irq.o time.o generic.o 1obj-y := irq.o time.o generic.o gpio.o
2 2
3obj-$(CONFIG_MACH_CC9P9360DEV) += mach-cc9p9360dev.o 3obj-$(CONFIG_MACH_CC9P9360DEV) += mach-cc9p9360dev.o
4obj-$(CONFIG_MACH_CC9P9360JS) += mach-cc9p9360js.o 4obj-$(CONFIG_MACH_CC9P9360JS) += mach-cc9p9360js.o
diff --git a/arch/arm/mach-ns9xxx/board-a9m9750dev.c b/arch/arm/mach-ns9xxx/board-a9m9750dev.c
index 925048e7adfe..0f65177f9e5f 100644
--- a/arch/arm/mach-ns9xxx/board-a9m9750dev.c
+++ b/arch/arm/mach-ns9xxx/board-a9m9750dev.c
@@ -13,6 +13,7 @@
13#include <linux/irq.h> 13#include <linux/irq.h>
14 14
15#include <asm/mach/map.h> 15#include <asm/mach/map.h>
16#include <asm/gpio.h>
16 17
17#include <asm/arch-ns9xxx/board.h> 18#include <asm/arch-ns9xxx/board.h>
18#include <asm/arch-ns9xxx/regs-sys.h> 19#include <asm/arch-ns9xxx/regs-sys.h>
@@ -44,7 +45,13 @@ static void a9m9750dev_fpga_ack_irq(unsigned int irq)
44 45
45static void a9m9750dev_fpga_mask_irq(unsigned int irq) 46static void a9m9750dev_fpga_mask_irq(unsigned int irq)
46{ 47{
47 FPGA_IER &= ~(1 << (irq - FPGA_IRQ(0))); 48 u8 ier;
49
50 ier = __raw_readb(FPGA_IER);
51
52 ier &= ~(1 << (irq - FPGA_IRQ(0)));
53
54 __raw_writeb(ier, FPGA_IER);
48} 55}
49 56
50static void a9m9750dev_fpga_maskack_irq(unsigned int irq) 57static void a9m9750dev_fpga_maskack_irq(unsigned int irq)
@@ -55,7 +62,13 @@ static void a9m9750dev_fpga_maskack_irq(unsigned int irq)
55 62
56static void a9m9750dev_fpga_unmask_irq(unsigned int irq) 63static void a9m9750dev_fpga_unmask_irq(unsigned int irq)
57{ 64{
58 FPGA_IER |= 1 << (irq - FPGA_IRQ(0)); 65 u8 ier;
66
67 ier = __raw_readb(FPGA_IER);
68
69 ier |= 1 << (irq - FPGA_IRQ(0));
70
71 __raw_writeb(ier, FPGA_IER);
59} 72}
60 73
61static struct irq_chip a9m9750dev_fpga_chip = { 74static struct irq_chip a9m9750dev_fpga_chip = {
@@ -68,30 +81,34 @@ static struct irq_chip a9m9750dev_fpga_chip = {
68static void a9m9750dev_fpga_demux_handler(unsigned int irq, 81static void a9m9750dev_fpga_demux_handler(unsigned int irq,
69 struct irq_desc *desc) 82 struct irq_desc *desc)
70{ 83{
71 int stat = FPGA_ISR; 84 u8 stat = __raw_readb(FPGA_ISR);
85
86 desc->chip->mask_ack(irq);
72 87
73 while (stat != 0) { 88 while (stat != 0) {
74 int irqno = fls(stat) - 1; 89 int irqno = fls(stat) - 1;
90 struct irq_desc *fpgadesc;
75 91
76 stat &= ~(1 << irqno); 92 stat &= ~(1 << irqno);
77 93
78 desc = irq_desc + FPGA_IRQ(irqno); 94 fpgadesc = irq_desc + FPGA_IRQ(irqno);
79 95
80 desc_handle_irq(FPGA_IRQ(irqno), desc); 96 desc_handle_irq(FPGA_IRQ(irqno), fpgadesc);
81 } 97 }
98
99 desc->chip->unmask(irq);
82} 100}
83 101
84void __init board_a9m9750dev_init_irq(void) 102void __init board_a9m9750dev_init_irq(void)
85{ 103{
86 u32 reg; 104 u32 eic;
87 int i; 105 int i;
88 106
89 /* 107 if (gpio_request(11, "board a9m9750dev extirq2") == 0)
90 * configure gpio for IRQ_EXT2 108 ns9xxx_gpio_configure(11, 0, 1);
91 * use GPIO 11, because GPIO 32 is used for the LCD 109 else
92 */ 110 printk(KERN_ERR "%s: cannot get gpio 11 for IRQ_EXT2\n",
93 /* XXX: proper GPIO handling */ 111 __func__);
94 BBU_GCONFb1(1) &= ~0x2000;
95 112
96 for (i = FPGA_IRQ(0); i <= FPGA_IRQ(7); ++i) { 113 for (i = FPGA_IRQ(0); i <= FPGA_IRQ(7); ++i) {
97 set_irq_chip(i, &a9m9750dev_fpga_chip); 114 set_irq_chip(i, &a9m9750dev_fpga_chip);
@@ -100,10 +117,10 @@ void __init board_a9m9750dev_init_irq(void)
100 } 117 }
101 118
102 /* IRQ_EXT2: level sensitive + active low */ 119 /* IRQ_EXT2: level sensitive + active low */
103 reg = SYS_EIC(2); 120 eic = __raw_readl(SYS_EIC(2));
104 REGSET(reg, SYS_EIC, PLTY, AL); 121 REGSET(eic, SYS_EIC, PLTY, AL);
105 REGSET(reg, SYS_EIC, LVEDG, LEVEL); 122 REGSET(eic, SYS_EIC, LVEDG, LEVEL);
106 SYS_EIC(2) = reg; 123 __raw_writel(eic, SYS_EIC(2));
107 124
108 set_irq_chained_handler(IRQ_EXT2, 125 set_irq_chained_handler(IRQ_EXT2,
109 a9m9750dev_fpga_demux_handler); 126 a9m9750dev_fpga_demux_handler);
@@ -167,17 +184,18 @@ void __init board_a9m9750dev_init_machine(void)
167 u32 reg; 184 u32 reg;
168 185
169 /* setup static CS0: memory base ... */ 186 /* setup static CS0: memory base ... */
170 REGSETIM(SYS_SMCSSMB(0), SYS_SMCSSMB, CSxB, 187 reg = __raw_readl(SYS_SMCSSMB(0));
171 NS9XXX_CSxSTAT_PHYS(0) >> 12); 188 REGSETIM(reg, SYS_SMCSSMB, CSxB, NS9XXX_CSxSTAT_PHYS(0) >> 12);
189 __raw_writel(reg, SYS_SMCSSMB(0));
172 190
173 /* ... and mask */ 191 /* ... and mask */
174 reg = SYS_SMCSSMM(0); 192 reg = __raw_readl(SYS_SMCSSMM(0));
175 REGSETIM(reg, SYS_SMCSSMM, CSxM, 0xfffff); 193 REGSETIM(reg, SYS_SMCSSMM, CSxM, 0xfffff);
176 REGSET(reg, SYS_SMCSSMM, CSEx, EN); 194 REGSET(reg, SYS_SMCSSMM, CSEx, EN);
177 SYS_SMCSSMM(0) = reg; 195 __raw_writel(reg, SYS_SMCSSMM(0));
178 196
179 /* setup static CS0: memory configuration */ 197 /* setup static CS0: memory configuration */
180 reg = MEM_SMC(0); 198 reg = __raw_readl(MEM_SMC(0));
181 REGSET(reg, MEM_SMC, PSMC, OFF); 199 REGSET(reg, MEM_SMC, PSMC, OFF);
182 REGSET(reg, MEM_SMC, BSMC, OFF); 200 REGSET(reg, MEM_SMC, BSMC, OFF);
183 REGSET(reg, MEM_SMC, EW, OFF); 201 REGSET(reg, MEM_SMC, EW, OFF);
@@ -185,13 +203,13 @@ void __init board_a9m9750dev_init_machine(void)
185 REGSET(reg, MEM_SMC, PC, AL); 203 REGSET(reg, MEM_SMC, PC, AL);
186 REGSET(reg, MEM_SMC, PM, DIS); 204 REGSET(reg, MEM_SMC, PM, DIS);
187 REGSET(reg, MEM_SMC, MW, 8); 205 REGSET(reg, MEM_SMC, MW, 8);
188 MEM_SMC(0) = reg; 206 __raw_writel(reg, MEM_SMC(0));
189 207
190 /* setup static CS0: timing */ 208 /* setup static CS0: timing */
191 MEM_SMWED(0) = 0x2; 209 __raw_writel(0x2, MEM_SMWED(0));
192 MEM_SMOED(0) = 0x2; 210 __raw_writel(0x2, MEM_SMOED(0));
193 MEM_SMRD(0) = 0x6; 211 __raw_writel(0x6, MEM_SMRD(0));
194 MEM_SMWD(0) = 0x6; 212 __raw_writel(0x6, MEM_SMWD(0));
195 213
196 platform_add_devices(board_a9m9750dev_devices, 214 platform_add_devices(board_a9m9750dev_devices,
197 ARRAY_SIZE(board_a9m9750dev_devices)); 215 ARRAY_SIZE(board_a9m9750dev_devices));
diff --git a/arch/arm/mach-ns9xxx/gpio.c b/arch/arm/mach-ns9xxx/gpio.c
new file mode 100644
index 000000000000..b2230213b983
--- /dev/null
+++ b/arch/arm/mach-ns9xxx/gpio.c
@@ -0,0 +1,190 @@
1/*
2 * arch/arm/mach-ns9xxx/gpio.c
3 *
4 * Copyright (C) 2006 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#include <linux/compiler.h>
12#include <linux/init.h>
13#include <linux/spinlock.h>
14#include <linux/module.h>
15
16#include <asm/arch-ns9xxx/gpio.h>
17#include <asm/arch-ns9xxx/processor.h>
18#include <asm/arch-ns9xxx/regs-bbu.h>
19#include <asm/io.h>
20#include <asm/bug.h>
21#include <asm/types.h>
22#include <asm/bitops.h>
23
24#if defined(CONFIG_PROCESSOR_NS9360)
25#define GPIO_MAX 72
26#elif defined(CONFIG_PROCESSOR_NS9750)
27#define GPIO_MAX 49
28#endif
29
30/* protects BBU_GCONFx and BBU_GCTRLx */
31static spinlock_t gpio_lock = __SPIN_LOCK_UNLOCKED(gpio_lock);
32
33/* only access gpiores with atomic ops */
34static DECLARE_BITMAP(gpiores, GPIO_MAX);
35
36static inline int ns9xxx_valid_gpio(unsigned gpio)
37{
38#if defined(CONFIG_PROCESSOR_NS9360)
39 if (processor_is_ns9360())
40 return gpio <= 72;
41 else
42#endif
43#if defined(CONFIG_PROCESSOR_NS9750)
44 if (processor_is_ns9750())
45 return gpio <= 49;
46 else
47#endif
48 BUG();
49}
50
51static inline void __iomem *ns9xxx_gpio_get_gconfaddr(unsigned gpio)
52{
53 if (gpio < 56)
54 return BBU_GCONFb1(gpio / 8);
55 else
56 /*
57 * this could be optimised away on
58 * ns9750 only builds, but it isn't ...
59 */
60 return BBU_GCONFb2((gpio - 56) / 8);
61}
62
63static inline void __iomem *ns9xxx_gpio_get_gctrladdr(unsigned gpio)
64{
65 if (gpio < 32)
66 return BBU_GCTRL1;
67 else if (gpio < 64)
68 return BBU_GCTRL2;
69 else
70 /* this could be optimised away on ns9750 only builds */
71 return BBU_GCTRL3;
72}
73
74static inline void __iomem *ns9xxx_gpio_get_gstataddr(unsigned gpio)
75{
76 if (gpio < 32)
77 return BBU_GSTAT1;
78 else if (gpio < 64)
79 return BBU_GSTAT2;
80 else
81 /* this could be optimised away on ns9750 only builds */
82 return BBU_GSTAT3;
83}
84
85int gpio_request(unsigned gpio, const char *label)
86{
87 if (likely(ns9xxx_valid_gpio(gpio)))
88 return test_and_set_bit(gpio, gpiores) ? -EBUSY : 0;
89 else
90 return -EINVAL;
91}
92EXPORT_SYMBOL(gpio_request);
93
94void gpio_free(unsigned gpio)
95{
96 clear_bit(gpio, gpiores);
97 return;
98}
99EXPORT_SYMBOL(gpio_free);
100
101/*
102 * each gpio can serve for 4 different purposes [0..3]. These are called
103 * "functions" and passed in the parameter func. Functions 0-2 are always some
104 * special things, function 3 is GPIO. If func == 3 dir specifies input or
105 * output, and with inv you can enable an inverter (independent of func).
106 */
107static int __ns9xxx_gpio_configure(unsigned gpio, int dir, int inv, int func)
108{
109 void __iomem *conf = ns9xxx_gpio_get_gconfaddr(gpio);
110 u32 confval;
111 unsigned long flags;
112
113 spin_lock_irqsave(&gpio_lock, flags);
114
115 confval = __raw_readl(conf);
116 REGSETIM_IDX(confval, BBU_GCONFx, DIR, gpio & 7, dir);
117 REGSETIM_IDX(confval, BBU_GCONFx, INV, gpio & 7, inv);
118 REGSETIM_IDX(confval, BBU_GCONFx, FUNC, gpio & 7, func);
119 __raw_writel(confval, conf);
120
121 spin_unlock_irqrestore(&gpio_lock, flags);
122
123 return 0;
124}
125
126int ns9xxx_gpio_configure(unsigned gpio, int inv, int func)
127{
128 if (likely(ns9xxx_valid_gpio(gpio))) {
129 if (func == 3) {
130 printk(KERN_WARNING "use gpio_direction_input "
131 "or gpio_direction_output\n");
132 return -EINVAL;
133 } else
134 return __ns9xxx_gpio_configure(gpio, 0, inv, func);
135 } else
136 return -EINVAL;
137}
138EXPORT_SYMBOL(ns9xxx_gpio_configure);
139
140int gpio_direction_input(unsigned gpio)
141{
142 if (likely(ns9xxx_valid_gpio(gpio))) {
143 return __ns9xxx_gpio_configure(gpio, 0, 0, 3);
144 } else
145 return -EINVAL;
146}
147EXPORT_SYMBOL(gpio_direction_input);
148
149int gpio_direction_output(unsigned gpio, int value)
150{
151 if (likely(ns9xxx_valid_gpio(gpio))) {
152 gpio_set_value(gpio, value);
153
154 return __ns9xxx_gpio_configure(gpio, 1, 0, 3);
155 } else
156 return -EINVAL;
157}
158EXPORT_SYMBOL(gpio_direction_output);
159
160int gpio_get_value(unsigned gpio)
161{
162 void __iomem *stat = ns9xxx_gpio_get_gstataddr(gpio);
163 int ret;
164
165 ret = 1 & (__raw_readl(stat) >> (gpio & 31));
166
167 return ret;
168}
169EXPORT_SYMBOL(gpio_get_value);
170
171void gpio_set_value(unsigned gpio, int value)
172{
173 void __iomem *ctrl = ns9xxx_gpio_get_gctrladdr(gpio);
174 u32 ctrlval;
175 unsigned long flags;
176
177 spin_lock_irqsave(&gpio_lock, flags);
178
179 ctrlval = __raw_readl(ctrl);
180
181 if (value)
182 ctrlval |= 1 << (gpio & 31);
183 else
184 ctrlval &= ~(1 << (gpio & 31));
185
186 __raw_writel(ctrlval, ctrl);
187
188 spin_unlock_irqrestore(&gpio_lock, flags);
189}
190EXPORT_SYMBOL(gpio_set_value);
diff --git a/arch/arm/mach-ns9xxx/irq.c b/arch/arm/mach-ns9xxx/irq.c
index b8c7b00522e6..00001b874e97 100644
--- a/arch/arm/mach-ns9xxx/irq.c
+++ b/arch/arm/mach-ns9xxx/irq.c
@@ -9,6 +9,7 @@
9 * the Free Software Foundation. 9 * the Free Software Foundation.
10 */ 10 */
11#include <linux/interrupt.h> 11#include <linux/interrupt.h>
12#include <asm/io.h>
12#include <asm/mach/irq.h> 13#include <asm/mach/irq.h>
13#include <asm/mach-types.h> 14#include <asm/mach-types.h>
14#include <asm/arch-ns9xxx/regs-sys.h> 15#include <asm/arch-ns9xxx/regs-sys.h>
@@ -17,48 +18,17 @@
17 18
18#include "generic.h" 19#include "generic.h"
19 20
20static void ns9xxx_ack_irq_timer(unsigned int irq)
21{
22 u32 tc = SYS_TC(irq - IRQ_TIMER0);
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
33 REGSET(tc, SYS_TCx, INTC, SET);
34 SYS_TC(irq - IRQ_TIMER0) = tc;
35
36 REGSET(tc, SYS_TCx, INTC, UNSET);
37 SYS_TC(irq - IRQ_TIMER0) = tc;
38}
39
40static void (*ns9xxx_ack_irq_functions[NR_IRQS])(unsigned int) = {
41 [IRQ_TIMER0] = ns9xxx_ack_irq_timer,
42 [IRQ_TIMER1] = ns9xxx_ack_irq_timer,
43 [IRQ_TIMER2] = ns9xxx_ack_irq_timer,
44 [IRQ_TIMER3] = ns9xxx_ack_irq_timer,
45};
46
47static void ns9xxx_mask_irq(unsigned int irq) 21static void ns9xxx_mask_irq(unsigned int irq)
48{ 22{
49 /* XXX: better use cpp symbols */ 23 /* XXX: better use cpp symbols */
50 SYS_IC(irq / 4) &= ~(1 << (7 + 8 * (3 - (irq & 3)))); 24 u32 ic = __raw_readl(SYS_IC(irq / 4));
25 ic &= ~(1 << (7 + 8 * (3 - (irq & 3))));
26 __raw_writel(ic, SYS_IC(irq / 4));
51} 27}
52 28
53static void ns9xxx_ack_irq(unsigned int irq) 29static void ns9xxx_ack_irq(unsigned int irq)
54{ 30{
55 if (!ns9xxx_ack_irq_functions[irq]) { 31 __raw_writel(0, SYS_ISRADDR);
56 printk(KERN_ERR "no ack function for irq %u\n", irq);
57 BUG();
58 }
59
60 ns9xxx_ack_irq_functions[irq](irq);
61 SYS_ISRADDR = 0;
62} 32}
63 33
64static void ns9xxx_maskack_irq(unsigned int irq) 34static void ns9xxx_maskack_irq(unsigned int irq)
@@ -70,7 +40,9 @@ static void ns9xxx_maskack_irq(unsigned int irq)
70static void ns9xxx_unmask_irq(unsigned int irq) 40static void ns9xxx_unmask_irq(unsigned int irq)
71{ 41{
72 /* XXX: better use cpp symbols */ 42 /* XXX: better use cpp symbols */
73 SYS_IC(irq / 4) |= 1 << (7 + 8 * (3 - (irq & 3))); 43 u32 ic = __raw_readl(SYS_IC(irq / 4));
44 ic |= 1 << (7 + 8 * (3 - (irq & 3)));
45 __raw_writel(ic, SYS_IC(irq / 4));
74} 46}
75 47
76static struct irq_chip ns9xxx_chip = { 48static struct irq_chip ns9xxx_chip = {
@@ -86,14 +58,14 @@ void __init ns9xxx_init_irq(void)
86 58
87 /* disable all IRQs */ 59 /* disable all IRQs */
88 for (i = 0; i < 8; ++i) 60 for (i = 0; i < 8; ++i)
89 SYS_IC(i) = (4 * i) << 24 | (4 * i + 1) << 16 | 61 __raw_writel((4 * i) << 24 | (4 * i + 1) << 16 |
90 (4 * i + 2) << 8 | (4 * i + 3); 62 (4 * i + 2) << 8 | (4 * i + 3), SYS_IC(i));
91 63
92 /* simple interrupt prio table: 64 /* simple interrupt prio table:
93 * prio(x) < prio(y) <=> x < y 65 * prio(x) < prio(y) <=> x < y
94 */ 66 */
95 for (i = 0; i < 32; ++i) 67 for (i = 0; i < 32; ++i)
96 SYS_IVA(i) = i; 68 __raw_writel(i, SYS_IVA(i));
97 69
98 for (i = IRQ_WATCHDOG; i <= IRQ_EXT3; ++i) { 70 for (i = IRQ_WATCHDOG; i <= IRQ_EXT3; ++i) {
99 set_irq_chip(i, &ns9xxx_chip); 71 set_irq_chip(i, &ns9xxx_chip);
diff --git a/arch/arm/mach-ns9xxx/time.c b/arch/arm/mach-ns9xxx/time.c
index b97d0c54a388..c3dd1f4acb99 100644
--- a/arch/arm/mach-ns9xxx/time.c
+++ b/arch/arm/mach-ns9xxx/time.c
@@ -11,78 +11,174 @@
11#include <linux/jiffies.h> 11#include <linux/jiffies.h>
12#include <linux/interrupt.h> 12#include <linux/interrupt.h>
13#include <linux/irq.h> 13#include <linux/irq.h>
14#include <linux/stringify.h>
15#include <linux/clocksource.h>
16#include <linux/clockchips.h>
17
14#include <asm/arch-ns9xxx/regs-sys.h> 18#include <asm/arch-ns9xxx/regs-sys.h>
15#include <asm/arch-ns9xxx/clock.h> 19#include <asm/arch-ns9xxx/clock.h>
16#include <asm/arch-ns9xxx/irqs.h> 20#include <asm/arch-ns9xxx/irqs.h>
17#include <asm/arch/system.h> 21#include <asm/arch/system.h>
18#include "generic.h" 22#include "generic.h"
19 23
20#define TIMERCLOCKSELECT 64 24#define TIMER_CLOCKSOURCE 0
25#define TIMER_CLOCKEVENT 1
26static u32 latch;
27
28static cycle_t ns9xxx_clocksource_read(void)
29{
30 return __raw_readl(SYS_TR(TIMER_CLOCKSOURCE));
31}
21 32
22static u32 usecs_per_tick; 33static struct clocksource ns9xxx_clocksource = {
34 .name = "ns9xxx-timer" __stringify(TIMER_CLOCKSOURCE),
35 .rating = 300,
36 .read = ns9xxx_clocksource_read,
37 .mask = CLOCKSOURCE_MASK(32),
38 .shift = 20,
39 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
40};
23 41
24static irqreturn_t 42static void ns9xxx_clockevent_setmode(enum clock_event_mode mode,
25ns9xxx_timer_interrupt(int irq, void *dev_id) 43 struct clock_event_device *clk)
26{ 44{
27 write_seqlock(&xtime_lock); 45 u32 tc = __raw_readl(SYS_TC(TIMER_CLOCKEVENT));
28 timer_tick(); 46
29 write_sequnlock(&xtime_lock); 47 switch(mode) {
48 case CLOCK_EVT_MODE_PERIODIC:
49 __raw_writel(latch, SYS_TRC(TIMER_CLOCKEVENT));
50 REGSET(tc, SYS_TCx, REN, EN);
51 REGSET(tc, SYS_TCx, INTS, EN);
52 REGSET(tc, SYS_TCx, TEN, EN);
53 break;
54
55 case CLOCK_EVT_MODE_ONESHOT:
56 REGSET(tc, SYS_TCx, REN, DIS);
57 REGSET(tc, SYS_TCx, INTS, EN);
58
59 /* fall through */
60
61 case CLOCK_EVT_MODE_UNUSED:
62 case CLOCK_EVT_MODE_SHUTDOWN:
63 case CLOCK_EVT_MODE_RESUME:
64 default:
65 REGSET(tc, SYS_TCx, TEN, DIS);
66 break;
67 }
68
69 __raw_writel(tc, SYS_TC(TIMER_CLOCKEVENT));
70}
30 71
31 return IRQ_HANDLED; 72static int ns9xxx_clockevent_setnextevent(unsigned long evt,
73 struct clock_event_device *clk)
74{
75 u32 tc = __raw_readl(SYS_TC(TIMER_CLOCKEVENT));
76
77 if (REGGET(tc, SYS_TCx, TEN)) {
78 REGSET(tc, SYS_TCx, TEN, DIS);
79 __raw_writel(tc, SYS_TC(TIMER_CLOCKEVENT));
80 }
81
82 REGSET(tc, SYS_TCx, TEN, EN);
83
84 __raw_writel(evt, SYS_TRC(TIMER_CLOCKEVENT));
85
86 __raw_writel(tc, SYS_TC(TIMER_CLOCKEVENT));
87
88 return 0;
32} 89}
33 90
34static unsigned long ns9xxx_timer_gettimeoffset(void) 91static struct clock_event_device ns9xxx_clockevent_device = {
92 .name = "ns9xxx-timer" __stringify(TIMER_CLOCKEVENT),
93 .shift = 20,
94 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
95 .set_mode = ns9xxx_clockevent_setmode,
96 .set_next_event = ns9xxx_clockevent_setnextevent,
97};
98
99static irqreturn_t ns9xxx_clockevent_handler(int irq, void *dev_id)
35{ 100{
36 /* return the microseconds which have passed since the last interrupt 101 int timerno = irq - IRQ_TIMER0;
37 * was _serviced_. That is, if an interrupt is pending or the counter 102 u32 tc;
38 * reloads, return one period more. */
39 103
40 u32 counter1 = SYS_TR(0); 104 struct clock_event_device *evt = &ns9xxx_clockevent_device;
41 int pending = SYS_ISR & (1 << IRQ_TIMER0);
42 u32 counter2 = SYS_TR(0);
43 u32 elapsed;
44 105
45 if (pending || counter2 > counter1) 106 /* clear irq */
46 elapsed = 2 * SYS_TRC(0) - counter2; 107 tc = __raw_readl(SYS_TC(timerno));
47 else 108 if (REGGET(tc, SYS_TCx, REN) == SYS_TCx_REN_DIS) {
48 elapsed = SYS_TRC(0) - counter1; 109 REGSET(tc, SYS_TCx, TEN, DIS);
110 __raw_writel(tc, SYS_TC(timerno));
111 }
112 REGSET(tc, SYS_TCx, INTC, SET);
113 __raw_writel(tc, SYS_TC(timerno));
114 REGSET(tc, SYS_TCx, INTC, UNSET);
115 __raw_writel(tc, SYS_TC(timerno));
49 116
50 return (elapsed * usecs_per_tick) >> 16; 117 evt->event_handler(evt);
51 118
119 return IRQ_HANDLED;
52} 120}
53 121
54static struct irqaction ns9xxx_timer_irq = { 122static struct irqaction ns9xxx_clockevent_action = {
55 .name = "NS9xxx Timer Tick", 123 .name = "ns9xxx-timer" __stringify(TIMER_CLOCKEVENT),
56 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, 124 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
57 .handler = ns9xxx_timer_interrupt, 125 .handler = ns9xxx_clockevent_handler,
58}; 126};
59 127
60static void __init ns9xxx_timer_init(void) 128static void __init ns9xxx_timer_init(void)
61{ 129{
62 int tc; 130 int tc;
63 131
64 usecs_per_tick = 132 tc = __raw_readl(SYS_TC(TIMER_CLOCKSOURCE));
65 SH_DIV(1000000 * TIMERCLOCKSELECT, ns9xxx_cpuclock(), 16); 133 if (REGGET(tc, SYS_TCx, TEN)) {
134 REGSET(tc, SYS_TCx, TEN, DIS);
135 __raw_writel(tc, SYS_TC(TIMER_CLOCKSOURCE));
136 }
66 137
67 /* disable timer */ 138 __raw_writel(0, SYS_TRC(TIMER_CLOCKSOURCE));
68 if ((tc = SYS_TC(0)) & SYS_TCx_TEN)
69 SYS_TC(0) = tc & ~SYS_TCx_TEN;
70
71 SYS_TRC(0) = SH_DIV(ns9xxx_cpuclock(), (TIMERCLOCKSELECT * HZ), 0);
72 139
73 REGSET(tc, SYS_TCx, TEN, EN); 140 REGSET(tc, SYS_TCx, TEN, EN);
74 REGSET(tc, SYS_TCx, TLCS, DIV64); /* This must match TIMERCLOCKSELECT */
75 REGSET(tc, SYS_TCx, INTS, EN);
76 REGSET(tc, SYS_TCx, UDS, DOWN);
77 REGSET(tc, SYS_TCx, TDBG, STOP); 141 REGSET(tc, SYS_TCx, TDBG, STOP);
142 REGSET(tc, SYS_TCx, TLCS, CPU);
143 REGSET(tc, SYS_TCx, TM, IEE);
144 REGSET(tc, SYS_TCx, INTS, DIS);
145 REGSET(tc, SYS_TCx, UDS, UP);
78 REGSET(tc, SYS_TCx, TSZ, 32); 146 REGSET(tc, SYS_TCx, TSZ, 32);
79 REGSET(tc, SYS_TCx, REN, EN); 147 REGSET(tc, SYS_TCx, REN, EN);
80 SYS_TC(0) = tc;
81 148
82 setup_irq(IRQ_TIMER0, &ns9xxx_timer_irq); 149 __raw_writel(tc, SYS_TC(TIMER_CLOCKSOURCE));
150
151 ns9xxx_clocksource.mult = clocksource_hz2mult(ns9xxx_cpuclock(),
152 ns9xxx_clocksource.shift);
153
154 clocksource_register(&ns9xxx_clocksource);
155
156 latch = SH_DIV(ns9xxx_cpuclock(), HZ, 0);
157
158 tc = __raw_readl(SYS_TC(TIMER_CLOCKEVENT));
159 REGSET(tc, SYS_TCx, TEN, DIS);
160 REGSET(tc, SYS_TCx, TDBG, STOP);
161 REGSET(tc, SYS_TCx, TLCS, CPU);
162 REGSET(tc, SYS_TCx, TM, IEE);
163 REGSET(tc, SYS_TCx, INTS, DIS);
164 REGSET(tc, SYS_TCx, UDS, DOWN);
165 REGSET(tc, SYS_TCx, TSZ, 32);
166 REGSET(tc, SYS_TCx, REN, EN);
167 __raw_writel(tc, SYS_TC(TIMER_CLOCKEVENT));
168
169 ns9xxx_clockevent_device.mult = div_sc(ns9xxx_cpuclock(),
170 NSEC_PER_SEC, ns9xxx_clockevent_device.shift);
171 ns9xxx_clockevent_device.max_delta_ns =
172 clockevent_delta2ns(-1, &ns9xxx_clockevent_device);
173 ns9xxx_clockevent_device.min_delta_ns =
174 clockevent_delta2ns(1, &ns9xxx_clockevent_device);
175
176 ns9xxx_clockevent_device.cpumask = cpumask_of_cpu(0);
177 clockevents_register_device(&ns9xxx_clockevent_device);
178
179 setup_irq(IRQ_TIMER0 + TIMER_CLOCKEVENT, &ns9xxx_clockevent_action);
83} 180}
84 181
85struct sys_timer ns9xxx_timer = { 182struct sys_timer ns9xxx_timer = {
86 .init = ns9xxx_timer_init, 183 .init = ns9xxx_timer_init,
87 .offset = ns9xxx_timer_gettimeoffset,
88}; 184};
diff --git a/arch/arm/mach-omap1/Kconfig b/arch/arm/mach-omap1/Kconfig
index f6ecdd3a2478..79f0b1f8497b 100644
--- a/arch/arm/mach-omap1/Kconfig
+++ b/arch/arm/mach-omap1/Kconfig
@@ -84,11 +84,39 @@ config MACH_OMAP_PALMTE
84 bool "Palm Tungsten E" 84 bool "Palm Tungsten E"
85 depends on ARCH_OMAP1 && ARCH_OMAP15XX 85 depends on ARCH_OMAP1 && ARCH_OMAP15XX
86 help 86 help
87 Support for the Palm Tungsten E PDA. Currently only the LCD panel 87 Support for the Palm Tungsten E PDA. To boot the kernel, you'll
88 is supported. To boot the kernel, you'll need a PalmOS compatible 88 need a PalmOS compatible bootloader; check out
89 bootloader; check out http://palmtelinux.sourceforge.net for more 89 http://palmtelinux.sourceforge.net/ for more information.
90 information. 90 Say Y here if you have this PDA model, say N otherwise.
91 Say Y here if you have such a PDA, say NO otherwise. 91
92config MACH_OMAP_PALMZ71
93 bool "Palm Zire71"
94 depends on ARCH_OMAP1 && ARCH_OMAP15XX
95 help
96 Support for the Palm Zire71 PDA. To boot the kernel,
97 you'll need a PalmOS compatible bootloader; check out
98 http://hackndev.com/palm/z71 for more informations.
99 Say Y here if you have such a PDA, say N otherwise.
100
101config MACH_OMAP_PALMTT
102 bool "Palm Tungsten|T"
103 depends on ARCH_OMAP1 && ARCH_OMAP15XX
104 help
105 Support for the Palm Tungsten|T PDA. To boot the kernel, you'll
106 need a PalmOS compatible bootloader (Garux); check out
107 http://www.hackndev.com/palm/tt/ for more information.
108 Say Y here if you have this PDA model, say N otherwise.
109
110config MACH_SX1
111 bool "Siemens SX1"
112 depends on ARCH_OMAP1 && ARCH_OMAP15XX
113 help
114 Support for the Siemens SX1 phone. To boot the kernel,
115 you'll need a SX1 compatible bootloader; check out
116 http://forum.oslik.ru and
117 http://www.handhelds.org/moin/moin.cgi/SiemensSX1
118 for more information.
119 Say Y here if you have such a phone, say NO otherwise.
92 120
93config MACH_NOKIA770 121config MACH_NOKIA770
94 bool "Nokia 770" 122 bool "Nokia 770"
diff --git a/arch/arm/mach-omap1/Makefile b/arch/arm/mach-omap1/Makefile
index a8b9a00cea22..391b6f4827f6 100644
--- a/arch/arm/mach-omap1/Makefile
+++ b/arch/arm/mach-omap1/Makefile
@@ -22,8 +22,11 @@ obj-$(CONFIG_MACH_OMAP_OSK) += board-osk.o
22obj-$(CONFIG_MACH_OMAP_H3) += board-h3.o 22obj-$(CONFIG_MACH_OMAP_H3) += board-h3.o
23obj-$(CONFIG_MACH_VOICEBLUE) += board-voiceblue.o 23obj-$(CONFIG_MACH_VOICEBLUE) += board-voiceblue.o
24obj-$(CONFIG_MACH_OMAP_PALMTE) += board-palmte.o 24obj-$(CONFIG_MACH_OMAP_PALMTE) += board-palmte.o
25obj-$(CONFIG_MACH_OMAP_PALMZ71) += board-palmz71.o
26obj-$(CONFIG_MACH_OMAP_PALMTT) += board-palmtt.o
25obj-$(CONFIG_MACH_NOKIA770) += board-nokia770.o 27obj-$(CONFIG_MACH_NOKIA770) += board-nokia770.o
26obj-$(CONFIG_MACH_AMS_DELTA) += board-ams-delta.o 28obj-$(CONFIG_MACH_AMS_DELTA) += board-ams-delta.o
29obj-$(CONFIG_MACH_SX1) += board-sx1.o
27 30
28ifeq ($(CONFIG_ARCH_OMAP15XX),y) 31ifeq ($(CONFIG_ARCH_OMAP15XX),y)
29# Innovator-1510 FPGA 32# Innovator-1510 FPGA
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c
index 8437d065ada5..c73ca61e585e 100644
--- a/arch/arm/mach-omap1/board-ams-delta.c
+++ b/arch/arm/mach-omap1/board-ams-delta.c
@@ -14,6 +14,7 @@
14 14
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/input.h>
17#include <linux/platform_device.h> 18#include <linux/platform_device.h>
18 19
19#include <asm/hardware.h> 20#include <asm/hardware.h>
@@ -23,6 +24,7 @@
23 24
24#include <asm/arch/board-ams-delta.h> 25#include <asm/arch/board-ams-delta.h>
25#include <asm/arch/gpio.h> 26#include <asm/arch/gpio.h>
27#include <asm/arch/keypad.h>
26#include <asm/arch/mux.h> 28#include <asm/arch/mux.h>
27#include <asm/arch/usb.h> 29#include <asm/arch/usb.h>
28#include <asm/arch/board.h> 30#include <asm/arch/board.h>
@@ -31,6 +33,86 @@
31static u8 ams_delta_latch1_reg; 33static u8 ams_delta_latch1_reg;
32static u16 ams_delta_latch2_reg; 34static u16 ams_delta_latch2_reg;
33 35
36static int ams_delta_keymap[] = {
37 KEY(0, 0, KEY_F1), /* Advert */
38
39 KEY(3, 0, KEY_COFFEE), /* Games */
40 KEY(2, 0, KEY_QUESTION), /* Directory */
41 KEY(3, 2, KEY_CONNECT), /* Internet */
42 KEY(2, 1, KEY_SHOP), /* Services */
43 KEY(1, 1, KEY_PHONE), /* VoiceMail */
44
45 KEY(1, 0, KEY_DELETE), /* Delete */
46 KEY(2, 2, KEY_PLAY), /* Play */
47 KEY(0, 1, KEY_PAGEUP), /* Up */
48 KEY(3, 1, KEY_PAGEDOWN), /* Down */
49 KEY(0, 2, KEY_EMAIL), /* ReadEmail */
50 KEY(1, 2, KEY_STOP), /* Stop */
51
52 /* Numeric keypad portion */
53 KEY(7, 0, KEY_KP1),
54 KEY(6, 0, KEY_KP2),
55 KEY(5, 0, KEY_KP3),
56 KEY(7, 1, KEY_KP4),
57 KEY(6, 1, KEY_KP5),
58 KEY(5, 1, KEY_KP6),
59 KEY(7, 2, KEY_KP7),
60 KEY(6, 2, KEY_KP8),
61 KEY(5, 2, KEY_KP9),
62 KEY(6, 3, KEY_KP0),
63 KEY(7, 3, KEY_KPASTERISK),
64 KEY(5, 3, KEY_KPDOT), /* # key */
65 KEY(2, 7, KEY_NUMLOCK), /* Mute */
66 KEY(1, 7, KEY_KPMINUS), /* Recall */
67 KEY(1, 6, KEY_KPPLUS), /* Redial */
68 KEY(6, 7, KEY_KPSLASH), /* Handsfree */
69 KEY(0, 6, KEY_ENTER), /* Video */
70
71 KEY(4, 7, KEY_CAMERA), /* Photo */
72
73 KEY(4, 0, KEY_F2), /* Home */
74 KEY(4, 1, KEY_F3), /* Office */
75 KEY(4, 2, KEY_F4), /* Mobile */
76 KEY(7, 7, KEY_F5), /* SMS */
77 KEY(5, 7, KEY_F6), /* Email */
78
79 /* QWERTY portion of keypad */
80 KEY(4, 3, KEY_Q),
81 KEY(3, 3, KEY_W),
82 KEY(2, 3, KEY_E),
83 KEY(1, 3, KEY_R),
84 KEY(0, 3, KEY_T),
85 KEY(7, 4, KEY_Y),
86 KEY(6, 4, KEY_U),
87 KEY(5, 4, KEY_I),
88 KEY(4, 4, KEY_O),
89 KEY(3, 4, KEY_P),
90
91 KEY(2, 4, KEY_A),
92 KEY(1, 4, KEY_S),
93 KEY(0, 4, KEY_D),
94 KEY(7, 5, KEY_F),
95 KEY(6, 5, KEY_G),
96 KEY(5, 5, KEY_H),
97 KEY(4, 5, KEY_J),
98 KEY(3, 5, KEY_K),
99 KEY(2, 5, KEY_L),
100
101 KEY(1, 5, KEY_Z),
102 KEY(0, 5, KEY_X),
103 KEY(7, 6, KEY_C),
104 KEY(6, 6, KEY_V),
105 KEY(5, 6, KEY_B),
106 KEY(4, 6, KEY_N),
107 KEY(3, 6, KEY_M),
108 KEY(2, 6, KEY_SPACE),
109
110 KEY(0, 7, KEY_LEFTSHIFT), /* Vol up */
111 KEY(3, 7, KEY_LEFTCTRL), /* Vol down */
112
113 0
114};
115
34void ams_delta_latch1_write(u8 mask, u8 value) 116void ams_delta_latch1_write(u8 mask, u8 value)
35{ 117{
36 ams_delta_latch1_reg &= ~mask; 118 ams_delta_latch1_reg &= ~mask;
@@ -76,6 +158,10 @@ static struct map_desc ams_delta_io_desc[] __initdata = {
76 } 158 }
77}; 159};
78 160
161static struct omap_lcd_config ams_delta_lcd_config __initdata = {
162 .ctrl_name = "internal",
163};
164
79static struct omap_uart_config ams_delta_uart_config __initdata = { 165static struct omap_uart_config ams_delta_uart_config __initdata = {
80 .enabled_uarts = 1, 166 .enabled_uarts = 1,
81}; 167};
@@ -87,16 +173,50 @@ static struct omap_usb_config ams_delta_usb_config __initdata = {
87}; 173};
88 174
89static struct omap_board_config_kernel ams_delta_config[] = { 175static struct omap_board_config_kernel ams_delta_config[] = {
176 { OMAP_TAG_LCD, &ams_delta_lcd_config },
90 { OMAP_TAG_UART, &ams_delta_uart_config }, 177 { OMAP_TAG_UART, &ams_delta_uart_config },
91 { OMAP_TAG_USB, &ams_delta_usb_config }, 178 { OMAP_TAG_USB, &ams_delta_usb_config },
92}; 179};
93 180
181static struct resource ams_delta_kp_resources[] = {
182 [0] = {
183 .start = INT_KEYBOARD,
184 .end = INT_KEYBOARD,
185 .flags = IORESOURCE_IRQ,
186 },
187};
188
189static struct omap_kp_platform_data ams_delta_kp_data = {
190 .rows = 8,
191 .cols = 8,
192 .keymap = ams_delta_keymap,
193 .keymapsize = ARRAY_SIZE(ams_delta_keymap),
194 .delay = 9,
195};
196
197static struct platform_device ams_delta_kp_device = {
198 .name = "omap-keypad",
199 .id = -1,
200 .dev = {
201 .platform_data = &ams_delta_kp_data,
202 },
203 .num_resources = ARRAY_SIZE(ams_delta_kp_resources),
204 .resource = ams_delta_kp_resources,
205};
206
207static struct platform_device ams_delta_lcd_device = {
208 .name = "lcd_ams_delta",
209 .id = -1,
210};
211
94static struct platform_device ams_delta_led_device = { 212static struct platform_device ams_delta_led_device = {
95 .name = "ams-delta-led", 213 .name = "ams-delta-led",
96 .id = -1 214 .id = -1
97}; 215};
98 216
99static struct platform_device *ams_delta_devices[] __initdata = { 217static struct platform_device *ams_delta_devices[] __initdata = {
218 &ams_delta_kp_device,
219 &ams_delta_lcd_device,
100 &ams_delta_led_device, 220 &ams_delta_led_device,
101}; 221};
102 222
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
index 48c8c9195dc3..d901dcbe8066 100644
--- a/arch/arm/mach-omap1/board-h2.c
+++ b/arch/arm/mach-omap1/board-h2.c
@@ -139,6 +139,66 @@ static struct platform_device h2_nor_device = {
139 .resource = &h2_nor_resource, 139 .resource = &h2_nor_resource,
140}; 140};
141 141
142#if 0 /* REVISIT: Enable when nand_platform_data is applied */
143
144static struct mtd_partition h2_nand_partitions[] = {
145#if 0
146 /* REVISIT: enable these partitions if you make NAND BOOT
147 * work on your H2 (rev C or newer); published versions of
148 * x-load only support P2 and H3.
149 */
150 {
151 .name = "xloader",
152 .offset = 0,
153 .size = 64 * 1024,
154 .mask_flags = MTD_WRITEABLE, /* force read-only */
155 },
156 {
157 .name = "bootloader",
158 .offset = MTDPART_OFS_APPEND,
159 .size = 256 * 1024,
160 .mask_flags = MTD_WRITEABLE, /* force read-only */
161 },
162 {
163 .name = "params",
164 .offset = MTDPART_OFS_APPEND,
165 .size = 192 * 1024,
166 },
167 {
168 .name = "kernel",
169 .offset = MTDPART_OFS_APPEND,
170 .size = 2 * SZ_1M,
171 },
172#endif
173 {
174 .name = "filesystem",
175 .size = MTDPART_SIZ_FULL,
176 .offset = MTDPART_OFS_APPEND,
177 },
178};
179
180/* dip switches control NAND chip access: 8 bit, 16 bit, or neither */
181static struct nand_platform_data h2_nand_data = {
182 .options = NAND_SAMSUNG_LP_OPTIONS,
183 .parts = h2_nand_partitions,
184 .nr_parts = ARRAY_SIZE(h2_nand_partitions),
185};
186
187static struct resource h2_nand_resource = {
188 .flags = IORESOURCE_MEM,
189};
190
191static struct platform_device h2_nand_device = {
192 .name = "omapnand",
193 .id = 0,
194 .dev = {
195 .platform_data = &h2_nand_data,
196 },
197 .num_resources = 1,
198 .resource = &h2_nand_resource,
199};
200#endif
201
142static struct resource h2_smc91x_resources[] = { 202static struct resource h2_smc91x_resources[] = {
143 [0] = { 203 [0] = {
144 .start = OMAP1610_ETHR_START, /* Physical */ 204 .start = OMAP1610_ETHR_START, /* Physical */
@@ -218,11 +278,15 @@ static struct resource h2_irda_resources[] = {
218 .flags = IORESOURCE_IRQ, 278 .flags = IORESOURCE_IRQ,
219 }, 279 },
220}; 280};
281
282static u64 irda_dmamask = 0xffffffff;
283
221static struct platform_device h2_irda_device = { 284static struct platform_device h2_irda_device = {
222 .name = "omapirda", 285 .name = "omapirda",
223 .id = 0, 286 .id = 0,
224 .dev = { 287 .dev = {
225 .platform_data = &h2_irda_data, 288 .platform_data = &h2_irda_data,
289 .dma_mask = &irda_dmamask,
226 }, 290 },
227 .num_resources = ARRAY_SIZE(h2_irda_resources), 291 .num_resources = ARRAY_SIZE(h2_irda_resources),
228 .resource = h2_irda_resources, 292 .resource = h2_irda_resources,
@@ -270,6 +334,7 @@ static struct platform_device h2_mcbsp1_device = {
270 334
271static struct platform_device *h2_devices[] __initdata = { 335static struct platform_device *h2_devices[] __initdata = {
272 &h2_nor_device, 336 &h2_nor_device,
337 //&h2_nand_device,
273 &h2_smc91x_device, 338 &h2_smc91x_device,
274 &h2_irda_device, 339 &h2_irda_device,
275 &h2_kp_device, 340 &h2_kp_device,
@@ -333,6 +398,13 @@ static struct omap_board_config_kernel h2_config[] __initdata = {
333 { OMAP_TAG_LCD, &h2_lcd_config }, 398 { OMAP_TAG_LCD, &h2_lcd_config },
334}; 399};
335 400
401#define H2_NAND_RB_GPIO_PIN 62
402
403static int h2_nand_dev_ready(struct nand_platform_data *data)
404{
405 return omap_get_gpio_datain(H2_NAND_RB_GPIO_PIN);
406}
407
336static void __init h2_init(void) 408static void __init h2_init(void)
337{ 409{
338 /* Here we assume the NOR boot config: NOR on CS3 (possibly swapped 410 /* Here we assume the NOR boot config: NOR on CS3 (possibly swapped
@@ -347,6 +419,13 @@ static void __init h2_init(void)
347 h2_nor_resource.end = h2_nor_resource.start = omap_cs3_phys(); 419 h2_nor_resource.end = h2_nor_resource.start = omap_cs3_phys();
348 h2_nor_resource.end += SZ_32M - 1; 420 h2_nor_resource.end += SZ_32M - 1;
349 421
422#if 0 /* REVISIT: Enable when nand_platform_data is applied */
423 h2_nand_resource.end = h2_nand_resource.start = OMAP_CS2B_PHYS;
424 h2_nand_resource.end += SZ_4K - 1;
425 if (!(omap_request_gpio(H2_NAND_RB_GPIO_PIN)))
426 h2_nand_data.dev_ready = h2_nand_dev_ready;
427#endif
428
350 omap_cfg_reg(L3_1610_FLASH_CS2B_OE); 429 omap_cfg_reg(L3_1610_FLASH_CS2B_OE);
351 omap_cfg_reg(M8_1610_FLASH_CS2B_WE); 430 omap_cfg_reg(M8_1610_FLASH_CS2B_WE);
352 431
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c
index 79d4ef4c54d4..4167f3480974 100644
--- a/arch/arm/mach-omap1/board-h3.c
+++ b/arch/arm/mach-omap1/board-h3.c
@@ -44,6 +44,8 @@
44#include <asm/arch/keypad.h> 44#include <asm/arch/keypad.h>
45#include <asm/arch/dma.h> 45#include <asm/arch/dma.h>
46#include <asm/arch/common.h> 46#include <asm/arch/common.h>
47#include <asm/arch/mcbsp.h>
48#include <asm/arch/omap-alsa.h>
47 49
48extern int omap_gpio_init(void); 50extern int omap_gpio_init(void);
49 51
@@ -351,11 +353,14 @@ static struct resource h3_irda_resources[] = {
351 }, 353 },
352}; 354};
353 355
356static u64 irda_dmamask = 0xffffffff;
357
354static struct platform_device h3_irda_device = { 358static struct platform_device h3_irda_device = {
355 .name = "omapirda", 359 .name = "omapirda",
356 .id = 0, 360 .id = 0,
357 .dev = { 361 .dev = {
358 .platform_data = &h3_irda_data, 362 .platform_data = &h3_irda_data,
363 .dma_mask = &irda_dmamask,
359 }, 364 },
360 .num_resources = ARRAY_SIZE(h3_irda_resources), 365 .num_resources = ARRAY_SIZE(h3_irda_resources),
361 .resource = h3_irda_resources, 366 .resource = h3_irda_resources,
@@ -366,6 +371,41 @@ static struct platform_device h3_lcd_device = {
366 .id = -1, 371 .id = -1,
367}; 372};
368 373
374static struct omap_mcbsp_reg_cfg mcbsp_regs = {
375 .spcr2 = FREE | FRST | GRST | XRST | XINTM(3),
376 .spcr1 = RINTM(3) | RRST,
377 .rcr2 = RPHASE | RFRLEN2(OMAP_MCBSP_WORD_8) |
378 RWDLEN2(OMAP_MCBSP_WORD_16) | RDATDLY(1),
379 .rcr1 = RFRLEN1(OMAP_MCBSP_WORD_8) | RWDLEN1(OMAP_MCBSP_WORD_16),
380 .xcr2 = XPHASE | XFRLEN2(OMAP_MCBSP_WORD_8) |
381 XWDLEN2(OMAP_MCBSP_WORD_16) | XDATDLY(1) | XFIG,
382 .xcr1 = XFRLEN1(OMAP_MCBSP_WORD_8) | XWDLEN1(OMAP_MCBSP_WORD_16),
383 .srgr1 = FWID(15),
384 .srgr2 = GSYNC | CLKSP | FSGM | FPER(31),
385
386 .pcr0 = CLKRM | SCLKME | FSXP | FSRP | CLKXP | CLKRP,
387 //.pcr0 = CLKXP | CLKRP, /* mcbsp: slave */
388};
389
390static struct omap_alsa_codec_config alsa_config = {
391 .name = "H3 TSC2101",
392 .mcbsp_regs_alsa = &mcbsp_regs,
393 .codec_configure_dev = NULL, // tsc2101_configure,
394 .codec_set_samplerate = NULL, // tsc2101_set_samplerate,
395 .codec_clock_setup = NULL, // tsc2101_clock_setup,
396 .codec_clock_on = NULL, // tsc2101_clock_on,
397 .codec_clock_off = NULL, // tsc2101_clock_off,
398 .get_default_samplerate = NULL, // tsc2101_get_default_samplerate,
399};
400
401static struct platform_device h3_mcbsp1_device = {
402 .name = "omap_alsa_mcbsp",
403 .id = 1,
404 .dev = {
405 .platform_data = &alsa_config,
406 },
407};
408
369static struct platform_device *devices[] __initdata = { 409static struct platform_device *devices[] __initdata = {
370 &nor_device, 410 &nor_device,
371 &nand_device, 411 &nand_device,
@@ -374,6 +414,7 @@ static struct platform_device *devices[] __initdata = {
374 &h3_irda_device, 414 &h3_irda_device,
375 &h3_kp_device, 415 &h3_kp_device,
376 &h3_lcd_device, 416 &h3_lcd_device,
417 &h3_mcbsp1_device,
377}; 418};
378 419
379static struct omap_usb_config h3_usb_config __initdata = { 420static struct omap_usb_config h3_usb_config __initdata = {
diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c
index 70014f751bc4..22db19a53647 100644
--- a/arch/arm/mach-omap1/board-nokia770.c
+++ b/arch/arm/mach-omap1/board-nokia770.c
@@ -33,6 +33,12 @@
33#include <asm/arch/dsp_common.h> 33#include <asm/arch/dsp_common.h>
34#include <asm/arch/aic23.h> 34#include <asm/arch/aic23.h>
35#include <asm/arch/gpio.h> 35#include <asm/arch/gpio.h>
36#include <asm/arch/omapfb.h>
37#include <asm/arch/lcd_mipid.h>
38
39#include "../plat-omap/dsp/dsp_common.h"
40
41#define ADS7846_PENDOWN_GPIO 15
36 42
37static void __init omap_nokia770_init_irq(void) 43static void __init omap_nokia770_init_irq(void)
38{ 44{
@@ -91,9 +97,44 @@ static struct platform_device nokia770_kp_device = {
91}; 97};
92 98
93static struct platform_device *nokia770_devices[] __initdata = { 99static struct platform_device *nokia770_devices[] __initdata = {
94 &nokia770_kp_device, 100 &nokia770_kp_device,
101};
102
103static void mipid_shutdown(struct mipid_platform_data *pdata)
104{
105 if (pdata->nreset_gpio != -1) {
106 printk(KERN_INFO "shutdown LCD\n");
107 omap_set_gpio_dataout(pdata->nreset_gpio, 0);
108 msleep(120);
109 }
110}
111
112static struct mipid_platform_data nokia770_mipid_platform_data = {
113 .shutdown = mipid_shutdown,
95}; 114};
96 115
116static void mipid_dev_init(void)
117{
118 const struct omap_lcd_config *conf;
119
120 conf = omap_get_config(OMAP_TAG_LCD, struct omap_lcd_config);
121 if (conf != NULL) {
122 nokia770_mipid_platform_data.nreset_gpio = conf->nreset_gpio;
123 nokia770_mipid_platform_data.data_lines = conf->data_lines;
124 }
125}
126
127static void ads7846_dev_init(void)
128{
129 if (omap_request_gpio(ADS7846_PENDOWN_GPIO) < 0)
130 printk(KERN_ERR "can't get ads7846 pen down GPIO\n");
131}
132
133static int ads7846_get_pendown_state(void)
134{
135 return !omap_get_gpio_datain(ADS7846_PENDOWN_GPIO);
136}
137
97static struct ads7846_platform_data nokia770_ads7846_platform_data __initdata = { 138static struct ads7846_platform_data nokia770_ads7846_platform_data __initdata = {
98 .x_max = 0x0fff, 139 .x_max = 0x0fff,
99 .y_max = 0x0fff, 140 .y_max = 0x0fff,
@@ -101,14 +142,17 @@ static struct ads7846_platform_data nokia770_ads7846_platform_data __initdata =
101 .pressure_max = 255, 142 .pressure_max = 255,
102 .debounce_max = 10, 143 .debounce_max = 10,
103 .debounce_tol = 3, 144 .debounce_tol = 3,
145 .debounce_rep = 1,
146 .get_pendown_state = ads7846_get_pendown_state,
104}; 147};
105 148
106static struct spi_board_info nokia770_spi_board_info[] __initdata = { 149static struct spi_board_info nokia770_spi_board_info[] __initdata = {
107 [0] = { 150 [0] = {
108 .modalias = "lcd_mipid", 151 .modalias = "lcd_mipid",
109 .bus_num = 2, 152 .bus_num = 2,
110 .chip_select = 3, 153 .chip_select = 3,
111 .max_speed_hz = 12000000, 154 .max_speed_hz = 12000000,
155 .platform_data = &nokia770_mipid_platform_data,
112 }, 156 },
113 [1] = { 157 [1] = {
114 .modalias = "ads7846", 158 .modalias = "ads7846",
@@ -153,6 +197,7 @@ static struct omap_board_config_kernel nokia770_config[] = {
153 { OMAP_TAG_MMC, &nokia770_mmc_config }, 197 { OMAP_TAG_MMC, &nokia770_mmc_config },
154}; 198};
155 199
200#if defined(CONFIG_OMAP_DSP)
156/* 201/*
157 * audio power control 202 * audio power control
158 */ 203 */
@@ -183,7 +228,7 @@ static void nokia770_audio_pwr_up(void)
183 clk_enable(dspxor_ck); 228 clk_enable(dspxor_ck);
184 229
185 /* Turn on codec */ 230 /* Turn on codec */
186 tlv320aic23_power_up(); 231 aic23_power_up();
187 232
188 if (omap_get_gpio_datain(HEADPHONE_GPIO)) 233 if (omap_get_gpio_datain(HEADPHONE_GPIO))
189 /* HP not connected, turn on amplifier */ 234 /* HP not connected, turn on amplifier */
@@ -197,7 +242,7 @@ static void codec_delayed_power_down(struct work_struct *work)
197{ 242{
198 down(&audio_pwr_sem); 243 down(&audio_pwr_sem);
199 if (audio_pwr_state == -1) 244 if (audio_pwr_state == -1)
200 tlv320aic23_power_down(); 245 aic23_power_down();
201 clk_disable(dspxor_ck); 246 clk_disable(dspxor_ck);
202 up(&audio_pwr_sem); 247 up(&audio_pwr_sem);
203} 248}
@@ -213,7 +258,8 @@ static void nokia770_audio_pwr_down(void)
213 schedule_delayed_work(&codec_power_down_work, HZ / 20); /* 50ms */ 258 schedule_delayed_work(&codec_power_down_work, HZ / 20); /* 50ms */
214} 259}
215 260
216void nokia770_audio_pwr_up_request(int stage) 261static int
262nokia770_audio_pwr_up_request(struct dsp_kfunc_device *kdev, int stage)
217{ 263{
218 down(&audio_pwr_sem); 264 down(&audio_pwr_sem);
219 if (audio_pwr_state == -1) 265 if (audio_pwr_state == -1)
@@ -221,9 +267,11 @@ void nokia770_audio_pwr_up_request(int stage)
221 /* force audio_pwr_state = 0, even if it was 1. */ 267 /* force audio_pwr_state = 0, even if it was 1. */
222 audio_pwr_state = 0; 268 audio_pwr_state = 0;
223 up(&audio_pwr_sem); 269 up(&audio_pwr_sem);
270 return 0;
224} 271}
225 272
226void nokia770_audio_pwr_down_request(int stage) 273static int
274nokia770_audio_pwr_down_request(struct dsp_kfunc_device *kdev, int stage)
227{ 275{
228 down(&audio_pwr_sem); 276 down(&audio_pwr_sem);
229 switch (stage) { 277 switch (stage) {
@@ -239,8 +287,39 @@ void nokia770_audio_pwr_down_request(int stage)
239 break; 287 break;
240 } 288 }
241 up(&audio_pwr_sem); 289 up(&audio_pwr_sem);
290 return 0;
242} 291}
243 292
293static struct dsp_kfunc_device nokia770_audio_device = {
294 .name = "audio",
295 .type = DSP_KFUNC_DEV_TYPE_AUDIO,
296 .enable = nokia770_audio_pwr_up_request,
297 .disable = nokia770_audio_pwr_down_request,
298};
299
300static __init int omap_dsp_init(void)
301{
302 int ret;
303
304 dspxor_ck = clk_get(0, "dspxor_ck");
305 if (IS_ERR(dspxor_ck)) {
306 printk(KERN_ERR "couldn't acquire dspxor_ck\n");
307 return PTR_ERR(dspxor_ck);
308 }
309
310 ret = dsp_kfunc_device_register(&nokia770_audio_device);
311 if (ret) {
312 printk(KERN_ERR
313 "KFUNC device registration faild: %s\n",
314 nokia770_audio_device.name);
315 goto out;
316 }
317 return 0;
318 out:
319 return ret;
320}
321#endif /* CONFIG_OMAP_DSP */
322
244static void __init omap_nokia770_init(void) 323static void __init omap_nokia770_init(void)
245{ 324{
246 nokia770_config[0].data = &nokia770_usb_config; 325 nokia770_config[0].data = &nokia770_usb_config;
@@ -250,10 +329,11 @@ static void __init omap_nokia770_init(void)
250 ARRAY_SIZE(nokia770_spi_board_info)); 329 ARRAY_SIZE(nokia770_spi_board_info));
251 omap_board_config = nokia770_config; 330 omap_board_config = nokia770_config;
252 omap_board_config_size = ARRAY_SIZE(nokia770_config); 331 omap_board_config_size = ARRAY_SIZE(nokia770_config);
332 omap_gpio_init();
253 omap_serial_init(); 333 omap_serial_init();
254 omap_dsp_audio_pwr_up_request = nokia770_audio_pwr_up_request; 334 omap_dsp_init();
255 omap_dsp_audio_pwr_down_request = nokia770_audio_pwr_down_request; 335 ads7846_dev_init();
256 dspxor_ck = clk_get(0, "dspxor_ck"); 336 mipid_dev_init();
257} 337}
258 338
259static void __init omap_nokia770_map_io(void) 339static void __init omap_nokia770_map_io(void)
diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c
index e7130293a03f..1825781f4354 100644
--- a/arch/arm/mach-omap1/board-osk.c
+++ b/arch/arm/mach-omap1/board-osk.c
@@ -29,6 +29,7 @@
29#include <linux/kernel.h> 29#include <linux/kernel.h>
30#include <linux/init.h> 30#include <linux/init.h>
31#include <linux/platform_device.h> 31#include <linux/platform_device.h>
32#include <linux/interrupt.h>
32#include <linux/irq.h> 33#include <linux/irq.h>
33#include <linux/interrupt.h> 34#include <linux/interrupt.h>
34 35
@@ -292,6 +293,18 @@ static struct platform_device osk5912_kp_device = {
292 .resource = osk5912_kp_resources, 293 .resource = osk5912_kp_resources,
293}; 294};
294 295
296static struct omap_backlight_config mistral_bl_data = {
297 .default_intensity = 0xa0,
298};
299
300static struct platform_device mistral_bl_device = {
301 .name = "omap-bl",
302 .id = -1,
303 .dev = {
304 .platform_data = &mistral_bl_data,
305 },
306};
307
295static struct platform_device osk5912_lcd_device = { 308static struct platform_device osk5912_lcd_device = {
296 .name = "lcd_osk", 309 .name = "lcd_osk",
297 .id = -1, 310 .id = -1,
@@ -299,6 +312,7 @@ static struct platform_device osk5912_lcd_device = {
299 312
300static struct platform_device *mistral_devices[] __initdata = { 313static struct platform_device *mistral_devices[] __initdata = {
301 &osk5912_kp_device, 314 &osk5912_kp_device,
315 &mistral_bl_device,
302 &osk5912_lcd_device, 316 &osk5912_lcd_device,
303}; 317};
304 318
@@ -342,6 +356,38 @@ static void __init osk_mistral_init(void)
342 * can't talk to the ads or even the i2c eeprom. 356 * can't talk to the ads or even the i2c eeprom.
343 */ 357 */
344 358
359 /* parallel camera interface */
360 omap_cfg_reg(J15_1610_CAM_LCLK);
361 omap_cfg_reg(J18_1610_CAM_D7);
362 omap_cfg_reg(J19_1610_CAM_D6);
363 omap_cfg_reg(J14_1610_CAM_D5);
364 omap_cfg_reg(K18_1610_CAM_D4);
365 omap_cfg_reg(K19_1610_CAM_D3);
366 omap_cfg_reg(K15_1610_CAM_D2);
367 omap_cfg_reg(K14_1610_CAM_D1);
368 omap_cfg_reg(L19_1610_CAM_D0);
369 omap_cfg_reg(L18_1610_CAM_VS);
370 omap_cfg_reg(L15_1610_CAM_HS);
371 omap_cfg_reg(M19_1610_CAM_RSTZ);
372 omap_cfg_reg(Y15_1610_CAM_OUTCLK);
373
374 /* serial camera interface */
375 omap_cfg_reg(H19_1610_CAM_EXCLK);
376 omap_cfg_reg(W13_1610_CCP_CLKM);
377 omap_cfg_reg(Y12_1610_CCP_CLKP);
378 /* CCP_DATAM CONFLICTS WITH UART1.TX (and serial console) */
379 // omap_cfg_reg(Y14_1610_CCP_DATAM);
380 omap_cfg_reg(W14_1610_CCP_DATAP);
381
382 /* CAM_PWDN */
383 if (omap_request_gpio(11) == 0) {
384 omap_cfg_reg(N20_1610_GPIO11);
385 omap_set_gpio_direction(11, 0 /* out */);
386 omap_set_gpio_dataout(11, 0 /* off */);
387 } else
388 pr_debug("OSK+Mistral: CAM_PWDN is awol\n");
389
390
345 // omap_cfg_reg(P19_1610_GPIO6); // BUSY 391 // omap_cfg_reg(P19_1610_GPIO6); // BUSY
346 omap_cfg_reg(P20_1610_GPIO4); // PENIRQ 392 omap_cfg_reg(P20_1610_GPIO4); // PENIRQ
347 set_irq_type(OMAP_GPIO_IRQ(4), IRQT_FALLING); 393 set_irq_type(OMAP_GPIO_IRQ(4), IRQT_FALLING);
@@ -372,6 +418,15 @@ static void __init osk_mistral_init(void)
372 } else 418 } else
373 printk(KERN_ERR "OSK+Mistral: wakeup button is awol\n"); 419 printk(KERN_ERR "OSK+Mistral: wakeup button is awol\n");
374 420
421 /* LCD: backlight, and power; power controls other devices on the
422 * board, like the touchscreen, EEPROM, and wakeup (!) switch.
423 */
424 omap_cfg_reg(PWL);
425 if (omap_request_gpio(2) == 0) {
426 omap_set_gpio_direction(2, 0 /* out */);
427 omap_set_gpio_dataout(2, 1 /* on */);
428 }
429
375 platform_add_devices(mistral_devices, ARRAY_SIZE(mistral_devices)); 430 platform_add_devices(mistral_devices, ARRAY_SIZE(mistral_devices));
376} 431}
377#else 432#else
diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c
index 015824185629..2f9d00a00135 100644
--- a/arch/arm/mach-omap1/board-palmte.c
+++ b/arch/arm/mach-omap1/board-palmte.c
@@ -17,49 +17,189 @@
17 17
18#include <linux/kernel.h> 18#include <linux/kernel.h>
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/input.h>
20#include <linux/platform_device.h> 21#include <linux/platform_device.h>
21#include <linux/notifier.h> 22#include <linux/mtd/mtd.h>
22#include <linux/clk.h> 23#include <linux/mtd/partitions.h>
24#include <linux/spi/spi.h>
25#include <linux/spi/tsc2102.h>
26#include <linux/interrupt.h>
23 27
28#include <asm/apm.h>
24#include <asm/hardware.h> 29#include <asm/hardware.h>
25#include <asm/mach-types.h> 30#include <asm/mach-types.h>
26#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
27#include <asm/mach/map.h> 32#include <asm/mach/map.h>
33#include <asm/mach/flash.h>
28 34
29#include <asm/arch/gpio.h> 35#include <asm/arch/gpio.h>
30#include <asm/arch/mux.h> 36#include <asm/arch/mux.h>
31#include <asm/arch/usb.h> 37#include <asm/arch/usb.h>
38#include <asm/arch/tc.h>
39#include <asm/arch/dma.h>
32#include <asm/arch/board.h> 40#include <asm/arch/board.h>
41#include <asm/arch/irda.h>
42#include <asm/arch/keypad.h>
33#include <asm/arch/common.h> 43#include <asm/arch/common.h>
44#include <asm/arch/mcbsp.h>
45#include <asm/arch/omap-alsa.h>
34 46
35static void __init omap_generic_init_irq(void) 47static void __init omap_palmte_init_irq(void)
36{ 48{
37 omap1_init_common_hw(); 49 omap1_init_common_hw();
38 omap_init_irq(); 50 omap_init_irq();
51 omap_gpio_init();
39} 52}
40 53
54static int palmte_keymap[] = {
55 KEY(0, 0, KEY_F1),
56 KEY(0, 1, KEY_F2),
57 KEY(0, 2, KEY_F3),
58 KEY(0, 3, KEY_F4),
59 KEY(0, 4, KEY_POWER),
60 KEY(1, 0, KEY_LEFT),
61 KEY(1, 1, KEY_DOWN),
62 KEY(1, 2, KEY_UP),
63 KEY(1, 3, KEY_RIGHT),
64 KEY(1, 4, KEY_CENTER),
65 0,
66};
67
68static struct omap_kp_platform_data palmte_kp_data = {
69 .rows = 8,
70 .cols = 8,
71 .keymap = palmte_keymap,
72 .rep = 1,
73 .delay = 12,
74};
75
76static struct resource palmte_kp_resources[] = {
77 [0] = {
78 .start = INT_KEYBOARD,
79 .end = INT_KEYBOARD,
80 .flags = IORESOURCE_IRQ,
81 },
82};
83
84static struct platform_device palmte_kp_device = {
85 .name = "omap-keypad",
86 .id = -1,
87 .dev = {
88 .platform_data = &palmte_kp_data,
89 },
90 .num_resources = ARRAY_SIZE(palmte_kp_resources),
91 .resource = palmte_kp_resources,
92};
93
94static struct mtd_partition palmte_rom_partitions[] = {
95 /* PalmOS "Small ROM", contains the bootloader and the debugger */
96 {
97 .name = "smallrom",
98 .offset = 0,
99 .size = 0xa000,
100 .mask_flags = MTD_WRITEABLE,
101 },
102 /* PalmOS "Big ROM", a filesystem with all the OS code and data */
103 {
104 .name = "bigrom",
105 .offset = SZ_128K,
106 /*
107 * 0x5f0000 bytes big in the multi-language ("EFIGS") version,
108 * 0x7b0000 bytes in the English-only ("enUS") version.
109 */
110 .size = 0x7b0000,
111 .mask_flags = MTD_WRITEABLE,
112 },
113};
114
115static struct flash_platform_data palmte_rom_data = {
116 .map_name = "map_rom",
117 .width = 2,
118 .parts = palmte_rom_partitions,
119 .nr_parts = ARRAY_SIZE(palmte_rom_partitions),
120};
121
122static struct resource palmte_rom_resource = {
123 .start = OMAP_CS0_PHYS,
124 .end = OMAP_CS0_PHYS + SZ_8M - 1,
125 .flags = IORESOURCE_MEM,
126};
127
128static struct platform_device palmte_rom_device = {
129 .name = "omapflash",
130 .id = -1,
131 .dev = {
132 .platform_data = &palmte_rom_data,
133 },
134 .num_resources = 1,
135 .resource = &palmte_rom_resource,
136};
137
41static struct platform_device palmte_lcd_device = { 138static struct platform_device palmte_lcd_device = {
42 .name = "lcd_palmte", 139 .name = "lcd_palmte",
43 .id = -1, 140 .id = -1,
44}; 141};
45 142
143static struct omap_backlight_config palmte_backlight_config = {
144 .default_intensity = 0xa0,
145};
146
147static struct platform_device palmte_backlight_device = {
148 .name = "omap-bl",
149 .id = -1,
150 .dev = {
151 .platform_data = &palmte_backlight_config,
152 },
153};
154
155static struct omap_irda_config palmte_irda_config = {
156 .transceiver_cap = IR_SIRMODE,
157 .rx_channel = OMAP_DMA_UART3_RX,
158 .tx_channel = OMAP_DMA_UART3_TX,
159 .dest_start = UART3_THR,
160 .src_start = UART3_RHR,
161 .tx_trigger = 0,
162 .rx_trigger = 0,
163};
164
165static struct resource palmte_irda_resources[] = {
166 [0] = {
167 .start = INT_UART3,
168 .end = INT_UART3,
169 .flags = IORESOURCE_IRQ,
170 },
171};
172
173static struct platform_device palmte_irda_device = {
174 .name = "omapirda",
175 .id = -1,
176 .dev = {
177 .platform_data = &palmte_irda_config,
178 },
179 .num_resources = ARRAY_SIZE(palmte_irda_resources),
180 .resource = palmte_irda_resources,
181};
182
46static struct platform_device *devices[] __initdata = { 183static struct platform_device *devices[] __initdata = {
184 &palmte_rom_device,
185 &palmte_kp_device,
47 &palmte_lcd_device, 186 &palmte_lcd_device,
187 &palmte_backlight_device,
188 &palmte_irda_device,
48}; 189};
49 190
50static struct omap_usb_config palmte_usb_config __initdata = { 191static struct omap_usb_config palmte_usb_config __initdata = {
51 .register_dev = 1, 192 .register_dev = 1, /* Mini-B only receptacle */
52 .hmc_mode = 0, 193 .hmc_mode = 0,
53 .pins[0] = 3, 194 .pins[0] = 2,
54}; 195};
55 196
56static struct omap_mmc_config palmte_mmc_config __initdata = { 197static struct omap_mmc_config palmte_mmc_config __initdata = {
57 .mmc [0] = { 198 .mmc[0] = {
58 .enabled = 1, 199 .enabled = 1,
59 .wire4 = 1, 200 .wp_pin = PALMTE_MMC_WP_GPIO,
60 .wp_pin = OMAP_MPUIO(3), 201 .power_pin = PALMTE_MMC_POWER_GPIO,
61 .power_pin = -1, 202 .switch_pin = PALMTE_MMC_SWITCH_GPIO,
62 .switch_pin = -1,
63 }, 203 },
64}; 204};
65 205
@@ -67,21 +207,222 @@ static struct omap_lcd_config palmte_lcd_config __initdata = {
67 .ctrl_name = "internal", 207 .ctrl_name = "internal",
68}; 208};
69 209
210static struct omap_uart_config palmte_uart_config __initdata = {
211 .enabled_uarts = (1 << 0) | (1 << 1) | (0 << 2),
212};
213
214static struct omap_mcbsp_reg_cfg palmte_mcbsp1_regs = {
215 .spcr2 = FRST | GRST | XRST | XINTM(3),
216 .xcr2 = XDATDLY(1) | XFIG,
217 .xcr1 = XWDLEN1(OMAP_MCBSP_WORD_32),
218 .pcr0 = SCLKME | FSXP | CLKXP,
219};
220
221static struct omap_alsa_codec_config palmte_alsa_config = {
222 .name = "TSC2102 audio",
223 .mcbsp_regs_alsa = &palmte_mcbsp1_regs,
224 .codec_configure_dev = NULL, /* tsc2102_configure, */
225 .codec_set_samplerate = NULL, /* tsc2102_set_samplerate, */
226 .codec_clock_setup = NULL, /* tsc2102_clock_setup, */
227 .codec_clock_on = NULL, /* tsc2102_clock_on, */
228 .codec_clock_off = NULL, /* tsc2102_clock_off, */
229 .get_default_samplerate = NULL, /* tsc2102_get_default_samplerate, */
230};
231
232#ifdef CONFIG_APM
233/*
234 * Values measured in 10 minute intervals averaged over 10 samples.
235 * May differ slightly from device to device but should be accurate
236 * enough to give basic idea of battery life left and trigger
237 * potential alerts.
238 */
239static const int palmte_battery_sample[] = {
240 2194, 2157, 2138, 2120,
241 2104, 2089, 2075, 2061,
242 2048, 2038, 2026, 2016,
243 2008, 1998, 1989, 1980,
244 1970, 1958, 1945, 1928,
245 1910, 1888, 1860, 1827,
246 1791, 1751, 1709, 1656,
247};
248
249#define INTERVAL 10
250#define BATTERY_HIGH_TRESHOLD 66
251#define BATTERY_LOW_TRESHOLD 33
252
253static void palmte_get_power_status(struct apm_power_info *info, int *battery)
254{
255 int charging, batt, hi, lo, mid;
256
257 charging = !omap_get_gpio_datain(PALMTE_DC_GPIO);
258 batt = battery[0];
259 if (charging)
260 batt -= 60;
261
262 hi = ARRAY_SIZE(palmte_battery_sample);
263 lo = 0;
264
265 info->battery_flag = 0;
266 info->units = APM_UNITS_MINS;
267
268 if (batt > palmte_battery_sample[lo]) {
269 info->battery_life = 100;
270 info->time = INTERVAL * ARRAY_SIZE(palmte_battery_sample);
271 } else if (batt <= palmte_battery_sample[hi - 1]) {
272 info->battery_life = 0;
273 info->time = 0;
274 } else {
275 while (hi > lo + 1) {
276 mid = (hi + lo) >> 2;
277 if (batt <= palmte_battery_sample[mid])
278 lo = mid;
279 else
280 hi = mid;
281 }
282
283 mid = palmte_battery_sample[lo] - palmte_battery_sample[hi];
284 hi = palmte_battery_sample[lo] - batt;
285 info->battery_life = 100 - (100 * lo + 100 * hi / mid) /
286 ARRAY_SIZE(palmte_battery_sample);
287 info->time = INTERVAL * (ARRAY_SIZE(palmte_battery_sample) -
288 lo) - INTERVAL * hi / mid;
289 }
290
291 if (charging) {
292 info->ac_line_status = APM_AC_ONLINE;
293 info->battery_status = APM_BATTERY_STATUS_CHARGING;
294 info->battery_flag |= APM_BATTERY_FLAG_CHARGING;
295 } else {
296 info->ac_line_status = APM_AC_OFFLINE;
297 if (info->battery_life > BATTERY_HIGH_TRESHOLD)
298 info->battery_status = APM_BATTERY_STATUS_HIGH;
299 else if (info->battery_life > BATTERY_LOW_TRESHOLD)
300 info->battery_status = APM_BATTERY_STATUS_LOW;
301 else
302 info->battery_status = APM_BATTERY_STATUS_CRITICAL;
303 }
304
305 if (info->battery_life > BATTERY_HIGH_TRESHOLD)
306 info->battery_flag |= APM_BATTERY_FLAG_HIGH;
307 else if (info->battery_life > BATTERY_LOW_TRESHOLD)
308 info->battery_flag |= APM_BATTERY_FLAG_LOW;
309 else
310 info->battery_flag |= APM_BATTERY_FLAG_CRITICAL;
311}
312#else
313#define palmte_get_power_status NULL
314#endif
315
316static struct tsc2102_config palmte_tsc2102_config = {
317 .use_internal = 0,
318 .monitor = TSC_BAT1 | TSC_AUX | TSC_TEMP,
319 .temp_at25c = { 2200, 2615 },
320 .apm_report = palmte_get_power_status,
321 .alsa_config = &palmte_alsa_config,
322};
323
70static struct omap_board_config_kernel palmte_config[] = { 324static struct omap_board_config_kernel palmte_config[] = {
71 { OMAP_TAG_USB, &palmte_usb_config }, 325 { OMAP_TAG_USB, &palmte_usb_config },
72 { OMAP_TAG_MMC, &palmte_mmc_config }, 326 { OMAP_TAG_MMC, &palmte_mmc_config },
73 { OMAP_TAG_LCD, &palmte_lcd_config }, 327 { OMAP_TAG_LCD, &palmte_lcd_config },
328 { OMAP_TAG_UART, &palmte_uart_config },
74}; 329};
75 330
76static void __init omap_generic_init(void) 331static struct spi_board_info palmte_spi_info[] __initdata = {
332 {
333 .modalias = "tsc2102",
334 .bus_num = 2, /* uWire (officially) */
335 .chip_select = 0, /* As opposed to 3 */
336 .irq = OMAP_GPIO_IRQ(PALMTE_PINTDAV_GPIO),
337 .platform_data = &palmte_tsc2102_config,
338 .max_speed_hz = 8000000,
339 },
340};
341
342/* Periodically check for changes on important input pins */
343struct timer_list palmte_pin_timer;
344int prev_power, prev_headphones;
345
346static void palmte_pin_handler(unsigned long data) {
347 int power, headphones;
348
349 power = !omap_get_gpio_datain(PALMTE_DC_GPIO);
350 headphones = omap_get_gpio_datain(PALMTE_HEADPHONES_GPIO);
351
352 if (power && !prev_power)
353 printk(KERN_INFO "PM: cable connected\n");
354 else if (!power && prev_power)
355 printk(KERN_INFO "PM: cable disconnected\n");
356
357 if (headphones && !prev_headphones) {
358 /* Headphones connected, disable speaker */
359 omap_set_gpio_dataout(PALMTE_SPEAKER_GPIO, 0);
360 printk(KERN_INFO "PM: speaker off\n");
361 } else if (!headphones && prev_headphones) {
362 /* Headphones unplugged, re-enable speaker */
363 omap_set_gpio_dataout(PALMTE_SPEAKER_GPIO, 1);
364 printk(KERN_INFO "PM: speaker on\n");
365 }
366
367 prev_power = power;
368 prev_headphones = headphones;
369 mod_timer(&palmte_pin_timer, jiffies + msecs_to_jiffies(500));
370}
371
372static void __init palmte_gpio_setup(void)
373{
374 /* Set TSC2102 PINTDAV pin as input */
375 if (omap_request_gpio(PALMTE_PINTDAV_GPIO)) {
376 printk(KERN_ERR "Could not reserve PINTDAV GPIO!\n");
377 return;
378 }
379 omap_set_gpio_direction(PALMTE_PINTDAV_GPIO, 1);
380
381 /* Monitor cable-connected signals */
382 if (omap_request_gpio(PALMTE_DC_GPIO) ||
383 omap_request_gpio(PALMTE_USB_OR_DC_GPIO) ||
384 omap_request_gpio(PALMTE_USBDETECT_GPIO)) {
385 printk(KERN_ERR "Could not reserve cable signal GPIO!\n");
386 return;
387 }
388 omap_set_gpio_direction(PALMTE_DC_GPIO, 1);
389 omap_set_gpio_direction(PALMTE_USB_OR_DC_GPIO, 1);
390 omap_set_gpio_direction(PALMTE_USBDETECT_GPIO, 1);
391
392 /* Set speaker-enable pin as output */
393 if (omap_request_gpio(PALMTE_SPEAKER_GPIO)) {
394 printk(KERN_ERR "Could not reserve speaker GPIO!\n");
395 return;
396 }
397 omap_set_gpio_direction(PALMTE_SPEAKER_GPIO, 0);
398
399 /* Monitor the headphones-connected signal */
400 if (omap_request_gpio(PALMTE_HEADPHONES_GPIO)) {
401 printk(KERN_ERR "Could not reserve headphones signal GPIO!\n");
402 return;
403 }
404 omap_set_gpio_direction(PALMTE_HEADPHONES_GPIO, 1);
405
406 prev_power = omap_get_gpio_datain(PALMTE_DC_GPIO);
407 prev_headphones = !omap_get_gpio_datain(PALMTE_HEADPHONES_GPIO);
408 setup_timer(&palmte_pin_timer, palmte_pin_handler, 0);
409 palmte_pin_handler(0);
410}
411
412static void __init omap_palmte_init(void)
77{ 413{
78 omap_board_config = palmte_config; 414 omap_board_config = palmte_config;
79 omap_board_config_size = ARRAY_SIZE(palmte_config); 415 omap_board_config_size = ARRAY_SIZE(palmte_config);
80 416
81 platform_add_devices(devices, ARRAY_SIZE(devices)); 417 platform_add_devices(devices, ARRAY_SIZE(devices));
418
419 spi_register_board_info(palmte_spi_info, ARRAY_SIZE(palmte_spi_info));
420
421 omap_serial_init();
422 palmte_gpio_setup();
82} 423}
83 424
84static void __init omap_generic_map_io(void) 425static void __init omap_palmte_map_io(void)
85{ 426{
86 omap1_map_common_io(); 427 omap1_map_common_io();
87} 428}
@@ -90,8 +431,8 @@ MACHINE_START(OMAP_PALMTE, "OMAP310 based Palm Tungsten E")
90 .phys_io = 0xfff00000, 431 .phys_io = 0xfff00000,
91 .io_pg_offst = ((0xfef00000) >> 18) & 0xfffc, 432 .io_pg_offst = ((0xfef00000) >> 18) & 0xfffc,
92 .boot_params = 0x10000100, 433 .boot_params = 0x10000100,
93 .map_io = omap_generic_map_io, 434 .map_io = omap_palmte_map_io,
94 .init_irq = omap_generic_init_irq, 435 .init_irq = omap_palmte_init_irq,
95 .init_machine = omap_generic_init, 436 .init_machine = omap_palmte_init,
96 .timer = &omap_timer, 437 .timer = &omap_timer,
97MACHINE_END 438MACHINE_END
diff --git a/arch/arm/mach-omap1/board-palmtt.c b/arch/arm/mach-omap1/board-palmtt.c
new file mode 100644
index 000000000000..e47010fec275
--- /dev/null
+++ b/arch/arm/mach-omap1/board-palmtt.c
@@ -0,0 +1,357 @@
1/*
2 * linux/arch/arm/mach-omap1/board-palmtt.c
3 *
4 * Modified from board-palmtt2.c
5 *
6 * Modified and amended for Palm Tungsten|T
7 * by Marek Vasut <marek.vasut@gmail.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 version 2 as
11 * published by the Free Software Foundation.
12 */
13
14#include <linux/delay.h>
15#include <linux/kernel.h>
16#include <linux/init.h>
17#include <linux/platform_device.h>
18#include <linux/notifier.h>
19#include <linux/clk.h>
20#include <linux/input.h>
21#include <linux/interrupt.h>
22#include <linux/mtd/mtd.h>
23#include <linux/mtd/partitions.h>
24#include <linux/leds.h>
25
26#include <asm/hardware.h>
27#include <asm/mach-types.h>
28#include <asm/mach/arch.h>
29#include <asm/mach/map.h>
30#include <asm/mach/flash.h>
31
32#include <asm/arch/led.h>
33#include <asm/arch/mcbsp.h>
34#include <asm/arch/gpio.h>
35#include <asm/arch/mux.h>
36#include <asm/arch/usb.h>
37#include <asm/arch/dma.h>
38#include <asm/arch/tc.h>
39#include <asm/arch/board.h>
40#include <asm/arch/irda.h>
41#include <asm/arch/keypad.h>
42#include <asm/arch/common.h>
43#include <asm/arch/omap-alsa.h>
44
45#include <linux/input.h>
46#include <linux/spi/spi.h>
47#include <linux/spi/ads7846.h>
48
49static int palmtt_keymap[] = {
50 KEY(0, 0, KEY_ESC),
51 KEY(0, 1, KEY_SPACE),
52 KEY(0, 2, KEY_LEFTCTRL),
53 KEY(0, 3, KEY_TAB),
54 KEY(0, 4, KEY_ENTER),
55 KEY(1, 0, KEY_LEFT),
56 KEY(1, 1, KEY_DOWN),
57 KEY(1, 2, KEY_UP),
58 KEY(1, 3, KEY_RIGHT),
59 KEY(2, 0, KEY_SLEEP),
60 KEY(2, 4, KEY_Y),
61 0
62};
63
64static struct mtd_partition palmtt_partitions[] = {
65 {
66 .name = "write8k",
67 .offset = 0,
68 .size = SZ_8K,
69 .mask_flags = 0,
70 },
71 {
72 .name = "PalmOS-BootLoader(ro)",
73 .offset = SZ_8K,
74 .size = 7 * SZ_8K,
75 .mask_flags = MTD_WRITEABLE,
76 },
77 {
78 .name = "u-boot",
79 .offset = MTDPART_OFS_APPEND,
80 .size = 8 * SZ_8K,
81 .mask_flags = 0,
82 },
83 {
84 .name = "PalmOS-FS(ro)",
85 .offset = MTDPART_OFS_APPEND,
86 .size = 7 * SZ_1M + 4 * SZ_64K - 16 * SZ_8K,
87 .mask_flags = MTD_WRITEABLE,
88 },
89 {
90 .name = "u-boot(rez)",
91 .offset = MTDPART_OFS_APPEND,
92 .size = SZ_128K,
93 .mask_flags = 0
94 },
95 {
96 .name = "empty",
97 .offset = MTDPART_OFS_APPEND,
98 .size = MTDPART_SIZ_FULL,
99 .mask_flags = 0
100 }
101};
102
103static struct flash_platform_data palmtt_flash_data = {
104 .map_name = "cfi_probe",
105 .width = 2,
106 .parts = palmtt_partitions,
107 .nr_parts = ARRAY_SIZE(palmtt_partitions),
108};
109
110static struct resource palmtt_flash_resource = {
111 .start = OMAP_CS0_PHYS,
112 .end = OMAP_CS0_PHYS + SZ_8M - 1,
113 .flags = IORESOURCE_MEM,
114};
115
116static struct platform_device palmtt_flash_device = {
117 .name = "omapflash",
118 .id = 0,
119 .dev = {
120 .platform_data = &palmtt_flash_data,
121 },
122 .num_resources = 1,
123 .resource = &palmtt_flash_resource,
124};
125
126#define DEFAULT_BITPERSAMPLE 16
127
128static struct omap_mcbsp_reg_cfg mcbsp_regs = {
129 .spcr2 = FREE | FRST | GRST | XRST | XINTM(3),
130 .spcr1 = RINTM(3) | RRST,
131 .rcr2 = RPHASE | RFRLEN2(OMAP_MCBSP_WORD_8) |
132 RWDLEN2(OMAP_MCBSP_WORD_16) | RDATDLY(0),
133 .rcr1 = RFRLEN1(OMAP_MCBSP_WORD_8) |
134 RWDLEN1(OMAP_MCBSP_WORD_16),
135 .xcr2 = XPHASE | XFRLEN2(OMAP_MCBSP_WORD_8) |
136 XWDLEN2(OMAP_MCBSP_WORD_16) | XDATDLY(0) | XFIG,
137 .xcr1 = XFRLEN1(OMAP_MCBSP_WORD_8) |
138 XWDLEN1(OMAP_MCBSP_WORD_16),
139 .srgr1 = FWID(DEFAULT_BITPERSAMPLE - 1),
140 .srgr2 = GSYNC | CLKSP | FSGM |
141 FPER(DEFAULT_BITPERSAMPLE * 2 - 1),
142 .pcr0 = CLKXP | CLKRP, /* mcbsp: slave */
143};
144
145static struct omap_alsa_codec_config alsa_config = {
146 .name = "PalmTT AIC23",
147 .mcbsp_regs_alsa = &mcbsp_regs,
148 .codec_configure_dev = NULL, // aic23_configure,
149 .codec_set_samplerate = NULL, // aic23_set_samplerate,
150 .codec_clock_setup = NULL, // aic23_clock_setup,
151 .codec_clock_on = NULL, // aic23_clock_on,
152 .codec_clock_off = NULL, // aic23_clock_off,
153 .get_default_samplerate = NULL, // aic23_get_default_samplerate,
154};
155
156static struct platform_device palmtt_mcbsp1_device = {
157 .name = "omap_alsa_mcbsp",
158 .id = 1,
159 .dev = {
160 .platform_data = &alsa_config,
161 },
162};
163
164static struct resource palmtt_kp_resources[] = {
165 [0] = {
166 .start = INT_KEYBOARD,
167 .end = INT_KEYBOARD,
168 .flags = IORESOURCE_IRQ,
169 },
170};
171
172static struct omap_kp_platform_data palmtt_kp_data = {
173 .rows = 6,
174 .cols = 3,
175 .keymap = palmtt_keymap,
176};
177
178static struct platform_device palmtt_kp_device = {
179 .name = "omap-keypad",
180 .id = -1,
181 .dev = {
182 .platform_data = &palmtt_kp_data,
183 },
184 .num_resources = ARRAY_SIZE(palmtt_kp_resources),
185 .resource = palmtt_kp_resources,
186};
187
188static struct platform_device palmtt_lcd_device = {
189 .name = "lcd_palmtt",
190 .id = -1,
191};
192static struct omap_irda_config palmtt_irda_config = {
193 .transceiver_cap = IR_SIRMODE,
194 .rx_channel = OMAP_DMA_UART3_RX,
195 .tx_channel = OMAP_DMA_UART3_TX,
196 .dest_start = UART3_THR,
197 .src_start = UART3_RHR,
198 .tx_trigger = 0,
199 .rx_trigger = 0,
200};
201
202static struct resource palmtt_irda_resources[] = {
203 [0] = {
204 .start = INT_UART3,
205 .end = INT_UART3,
206 .flags = IORESOURCE_IRQ,
207 },
208};
209
210static struct platform_device palmtt_irda_device = {
211 .name = "omapirda",
212 .id = -1,
213 .dev = {
214 .platform_data = &palmtt_irda_config,
215 },
216 .num_resources = ARRAY_SIZE(palmtt_irda_resources),
217 .resource = palmtt_irda_resources,
218};
219
220static struct platform_device palmtt_spi_device = {
221 .name = "spi_palmtt",
222 .id = -1,
223};
224
225static struct omap_backlight_config palmtt_backlight_config = {
226 .default_intensity = 0xa0,
227};
228
229static struct platform_device palmtt_backlight_device = {
230 .name = "omap-bl",
231 .id = -1,
232 .dev = {
233 .platform_data= &palmtt_backlight_config,
234 },
235};
236
237static struct omap_led_config palmtt_led_config[] = {
238 {
239 .cdev = {
240 .name = "palmtt:led0",
241 },
242 .gpio = PALMTT_LED_GPIO,
243 },
244};
245
246static struct omap_led_platform_data palmtt_led_data = {
247 .nr_leds = ARRAY_SIZE(palmtt_led_config),
248 .leds = palmtt_led_config,
249};
250
251static struct platform_device palmtt_led_device = {
252 .name = "omap-led",
253 .id = -1,
254 .dev = {
255 .platform_data = &palmtt_led_data,
256 },
257};
258
259static struct platform_device *palmtt_devices[] __initdata = {
260 &palmtt_flash_device,
261 &palmtt_mcbsp1_device,
262 &palmtt_kp_device,
263 &palmtt_lcd_device,
264 &palmtt_irda_device,
265 &palmtt_spi_device,
266 &palmtt_backlight_device,
267 &palmtt_led_device,
268};
269
270static int palmtt_get_pendown_state(void)
271{
272 return !omap_get_gpio_datain(6);
273}
274
275static const struct ads7846_platform_data palmtt_ts_info = {
276 .model = 7846,
277 .vref_delay_usecs = 100, /* internal, no capacitor */
278 .x_plate_ohms = 419,
279 .y_plate_ohms = 486,
280 .get_pendown_state = palmtt_get_pendown_state,
281};
282
283static struct spi_board_info __initdata palmtt_boardinfo[] = {
284 {
285 /* MicroWire (bus 2) CS0 has an ads7846e */
286 .modalias = "ads7846",
287 .platform_data = &palmtt_ts_info,
288 .irq = OMAP_GPIO_IRQ(6),
289 .max_speed_hz = 120000 /* max sample rate at 3V */
290 * 26 /* command + data + overhead */,
291 .bus_num = 2,
292 .chip_select = 0,
293 }
294};
295
296static void __init omap_palmtt_init_irq(void)
297{
298 omap1_init_common_hw();
299 omap_init_irq();
300}
301
302static struct omap_usb_config palmtt_usb_config __initdata = {
303 .register_dev = 1,
304 .hmc_mode = 0,
305 .pins[0] = 2,
306};
307
308static struct omap_lcd_config palmtt_lcd_config __initdata = {
309 .ctrl_name = "internal",
310};
311
312static struct omap_uart_config palmtt_uart_config __initdata = {
313 .enabled_uarts = (1 << 0) | (1 << 1) | (0 << 2),
314};
315
316static struct omap_board_config_kernel palmtt_config[] = {
317 { OMAP_TAG_USB, &palmtt_usb_config },
318 { OMAP_TAG_LCD, &palmtt_lcd_config },
319 { OMAP_TAG_UART, &palmtt_uart_config },
320};
321
322static void __init omap_mpu_wdt_mode(int mode) {
323 if (mode)
324 omap_writew(0x8000, OMAP_WDT_TIMER_MODE);
325 else {
326 omap_writew(0x00f5, OMAP_WDT_TIMER_MODE);
327 omap_writew(0x00a0, OMAP_WDT_TIMER_MODE);
328 }
329}
330
331static void __init omap_palmtt_init(void)
332{
333 omap_mpu_wdt_mode(0);
334
335 omap_board_config = palmtt_config;
336 omap_board_config_size = ARRAY_SIZE(palmtt_config);
337
338 platform_add_devices(palmtt_devices, ARRAY_SIZE(palmtt_devices));
339
340 spi_register_board_info(palmtt_boardinfo,ARRAY_SIZE(palmtt_boardinfo));
341 omap_serial_init();
342}
343
344static void __init omap_palmtt_map_io(void)
345{
346 omap1_map_common_io();
347}
348
349MACHINE_START(OMAP_PALMTT, "OMAP1510 based Palm Tungsten|T")
350 .phys_io = 0xfff00000,
351 .io_pg_offst = ((0xfef00000) >> 18) & 0xfffc,
352 .boot_params = 0x10000100,
353 .map_io = omap_palmtt_map_io,
354 .init_irq = omap_palmtt_init_irq,
355 .init_machine = omap_palmtt_init,
356 .timer = &omap_timer,
357MACHINE_END
diff --git a/arch/arm/mach-omap1/board-palmz71.c b/arch/arm/mach-omap1/board-palmz71.c
new file mode 100644
index 000000000000..c275d517764a
--- /dev/null
+++ b/arch/arm/mach-omap1/board-palmz71.c
@@ -0,0 +1,383 @@
1/*
2 * linux/arch/arm/mach-omap1/board-palmz71.c
3 *
4 * Modified from board-generic.c
5 *
6 * Support for the Palm Zire71 PDA.
7 *
8 * Original version : Laurent Gonzalez
9 *
10 * Modified for zire71 : Marek Vasut
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
15 */
16
17#include <linux/delay.h>
18#include <linux/kernel.h>
19#include <linux/init.h>
20#include <linux/platform_device.h>
21#include <linux/notifier.h>
22#include <linux/clk.h>
23#include <linux/irq.h>
24#include <linux/input.h>
25#include <linux/interrupt.h>
26#include <linux/mtd/mtd.h>
27#include <linux/mtd/partitions.h>
28
29#include <asm/hardware.h>
30#include <asm/mach-types.h>
31#include <asm/mach/arch.h>
32#include <asm/mach/map.h>
33#include <asm/mach/flash.h>
34
35#include <asm/arch/mcbsp.h>
36#include <asm/arch/gpio.h>
37#include <asm/arch/mux.h>
38#include <asm/arch/usb.h>
39#include <asm/arch/dma.h>
40#include <asm/arch/tc.h>
41#include <asm/arch/board.h>
42#include <asm/arch/irda.h>
43#include <asm/arch/keypad.h>
44#include <asm/arch/common.h>
45#include <asm/arch/omap-alsa.h>
46
47#include <linux/input.h>
48#include <linux/spi/spi.h>
49#include <linux/spi/ads7846.h>
50
51static void __init
52omap_palmz71_init_irq(void)
53{
54 omap1_init_common_hw();
55 omap_init_irq();
56 omap_gpio_init();
57}
58
59static int palmz71_keymap[] = {
60 KEY(0, 0, KEY_F1),
61 KEY(0, 1, KEY_F2),
62 KEY(0, 2, KEY_F3),
63 KEY(0, 3, KEY_F4),
64 KEY(0, 4, KEY_POWER),
65 KEY(1, 0, KEY_LEFT),
66 KEY(1, 1, KEY_DOWN),
67 KEY(1, 2, KEY_UP),
68 KEY(1, 3, KEY_RIGHT),
69 KEY(1, 4, KEY_CENTER),
70 KEY(2, 0, KEY_CAMERA),
71 0,
72};
73
74static struct omap_kp_platform_data palmz71_kp_data = {
75 .rows = 8,
76 .cols = 8,
77 .keymap = palmz71_keymap,
78 .rep = 1,
79 .delay = 80,
80};
81
82static struct resource palmz71_kp_resources[] = {
83 [0] = {
84 .start = INT_KEYBOARD,
85 .end = INT_KEYBOARD,
86 .flags = IORESOURCE_IRQ,
87 },
88};
89
90static struct platform_device palmz71_kp_device = {
91 .name = "omap-keypad",
92 .id = -1,
93 .dev = {
94 .platform_data = &palmz71_kp_data,
95 },
96 .num_resources = ARRAY_SIZE(palmz71_kp_resources),
97 .resource = palmz71_kp_resources,
98};
99
100static struct mtd_partition palmz71_rom_partitions[] = {
101 /* PalmOS "Small ROM", contains the bootloader and the debugger */
102 {
103 .name = "smallrom",
104 .offset = 0,
105 .size = 0xa000,
106 .mask_flags = MTD_WRITEABLE,
107 },
108 /* PalmOS "Big ROM", a filesystem with all the OS code and data */
109 {
110 .name = "bigrom",
111 .offset = SZ_128K,
112 /*
113 * 0x5f0000 bytes big in the multi-language ("EFIGS") version,
114 * 0x7b0000 bytes in the English-only ("enUS") version.
115 */
116 .size = 0x7b0000,
117 .mask_flags = MTD_WRITEABLE,
118 },
119};
120
121static struct flash_platform_data palmz71_rom_data = {
122 .map_name = "map_rom",
123 .name = "onboardrom",
124 .width = 2,
125 .parts = palmz71_rom_partitions,
126 .nr_parts = ARRAY_SIZE(palmz71_rom_partitions),
127};
128
129static struct resource palmz71_rom_resource = {
130 .start = OMAP_CS0_PHYS,
131 .end = OMAP_CS0_PHYS + SZ_8M - 1,
132 .flags = IORESOURCE_MEM,
133};
134
135static struct platform_device palmz71_rom_device = {
136 .name = "omapflash",
137 .id = -1,
138 .dev = {
139 .platform_data = &palmz71_rom_data,
140 },
141 .num_resources = 1,
142 .resource = &palmz71_rom_resource,
143};
144
145static struct platform_device palmz71_lcd_device = {
146 .name = "lcd_palmz71",
147 .id = -1,
148};
149
150static struct omap_irda_config palmz71_irda_config = {
151 .transceiver_cap = IR_SIRMODE,
152 .rx_channel = OMAP_DMA_UART3_RX,
153 .tx_channel = OMAP_DMA_UART3_TX,
154 .dest_start = UART3_THR,
155 .src_start = UART3_RHR,
156 .tx_trigger = 0,
157 .rx_trigger = 0,
158};
159
160static struct resource palmz71_irda_resources[] = {
161 [0] = {
162 .start = INT_UART3,
163 .end = INT_UART3,
164 .flags = IORESOURCE_IRQ,
165 },
166};
167
168static struct platform_device palmz71_irda_device = {
169 .name = "omapirda",
170 .id = -1,
171 .dev = {
172 .platform_data = &palmz71_irda_config,
173 },
174 .num_resources = ARRAY_SIZE(palmz71_irda_resources),
175 .resource = palmz71_irda_resources,
176};
177
178static struct platform_device palmz71_spi_device = {
179 .name = "spi_palmz71",
180 .id = -1,
181};
182
183#define DEFAULT_BITPERSAMPLE 16
184
185static struct omap_mcbsp_reg_cfg mcbsp_regs = {
186 .spcr2 = FREE | FRST | GRST | XRST | XINTM(3),
187 .spcr1 = RINTM(3) | RRST,
188 .rcr2 = RPHASE | RFRLEN2(OMAP_MCBSP_WORD_8) |
189 RWDLEN2(OMAP_MCBSP_WORD_16) | RDATDLY(0),
190 .rcr1 = RFRLEN1(OMAP_MCBSP_WORD_8) | RWDLEN1(OMAP_MCBSP_WORD_16),
191 .xcr2 = XPHASE | XFRLEN2(OMAP_MCBSP_WORD_8) |
192 XWDLEN2(OMAP_MCBSP_WORD_16) | XDATDLY(0) | XFIG,
193 .xcr1 = XFRLEN1(OMAP_MCBSP_WORD_8) | XWDLEN1(OMAP_MCBSP_WORD_16),
194 .srgr1 = FWID(DEFAULT_BITPERSAMPLE - 1),
195 .srgr2 = GSYNC | CLKSP | FSGM | FPER(DEFAULT_BITPERSAMPLE * 2 - 1),
196 .pcr0 = CLKXP | CLKRP, /* mcbsp: slave */
197};
198
199static struct omap_alsa_codec_config alsa_config = {
200 .name = "PalmZ71 AIC23",
201 .mcbsp_regs_alsa = &mcbsp_regs,
202 .codec_configure_dev = NULL, /* aic23_configure */
203 .codec_set_samplerate = NULL, /* aic23_set_samplerate */
204 .codec_clock_setup = NULL, /* aic23_clock_setup */
205 .codec_clock_on = NULL, /* aic23_clock_on */
206 .codec_clock_off = NULL, /* aic23_clock_off */
207 .get_default_samplerate = NULL, /* aic23_get_default_samplerate */
208};
209
210static struct platform_device palmz71_mcbsp1_device = {
211 .name = "omap_alsa_mcbsp",
212 .id = 1,
213 .dev = {
214 .platform_data = &alsa_config,
215 },
216};
217
218static struct omap_backlight_config palmz71_backlight_config = {
219 .default_intensity = 0xa0,
220};
221
222static struct platform_device palmz71_backlight_device = {
223 .name = "omap-bl",
224 .id = -1,
225 .dev = {
226 .platform_data = &palmz71_backlight_config,
227 },
228};
229
230static struct platform_device *devices[] __initdata = {
231 &palmz71_rom_device,
232 &palmz71_kp_device,
233 &palmz71_mcbsp1_device,
234 &palmz71_lcd_device,
235 &palmz71_irda_device,
236 &palmz71_spi_device,
237 &palmz71_backlight_device,
238};
239
240static int
241palmz71_get_pendown_state(void)
242{
243 return !omap_get_gpio_datain(PALMZ71_PENIRQ_GPIO);
244}
245
246static const struct ads7846_platform_data palmz71_ts_info = {
247 .model = 7846,
248 .vref_delay_usecs = 100, /* internal, no capacitor */
249 .x_plate_ohms = 419,
250 .y_plate_ohms = 486,
251 .get_pendown_state = palmz71_get_pendown_state,
252};
253
254static struct spi_board_info __initdata palmz71_boardinfo[] = { {
255 /* MicroWire (bus 2) CS0 has an ads7846e */
256 .modalias = "ads7846",
257 .platform_data = &palmz71_ts_info,
258 .irq = OMAP_GPIO_IRQ(PALMZ71_PENIRQ_GPIO),
259 .max_speed_hz = 120000 /* max sample rate at 3V */
260 * 26 /* command + data + overhead */,
261 .bus_num = 2,
262 .chip_select = 0,
263} };
264
265static struct omap_usb_config palmz71_usb_config __initdata = {
266 .register_dev = 1, /* Mini-B only receptacle */
267 .hmc_mode = 0,
268 .pins[0] = 2,
269};
270
271static struct omap_mmc_config palmz71_mmc_config __initdata = {
272 .mmc[0] = {
273 .enabled = 1,
274 .wire4 = 0,
275 .wp_pin = PALMZ71_MMC_WP_GPIO,
276 .power_pin = -1,
277 .switch_pin = PALMZ71_MMC_IN_GPIO,
278 },
279};
280
281static struct omap_lcd_config palmz71_lcd_config __initdata = {
282 .ctrl_name = "internal",
283};
284
285static struct omap_uart_config palmz71_uart_config __initdata = {
286 .enabled_uarts = (1 << 0) | (1 << 1) | (0 << 2),
287};
288
289static struct omap_board_config_kernel palmz71_config[] = {
290 {OMAP_TAG_USB, &palmz71_usb_config},
291 {OMAP_TAG_MMC, &palmz71_mmc_config},
292 {OMAP_TAG_LCD, &palmz71_lcd_config},
293 {OMAP_TAG_UART, &palmz71_uart_config},
294};
295
296static irqreturn_t
297palmz71_powercable(int irq, void *dev_id)
298{
299 if (omap_get_gpio_datain(PALMZ71_USBDETECT_GPIO)) {
300 printk(KERN_INFO "PM: Power cable connected\n");
301 set_irq_type(OMAP_GPIO_IRQ(PALMZ71_USBDETECT_GPIO),
302 IRQT_FALLING);
303 } else {
304 printk(KERN_INFO "PM: Power cable disconnected\n");
305 set_irq_type(OMAP_GPIO_IRQ(PALMZ71_USBDETECT_GPIO),
306 IRQT_RISING);
307 }
308 return IRQ_HANDLED;
309}
310
311static void __init
312omap_mpu_wdt_mode(int mode)
313{
314 if (mode)
315 omap_writew(0x8000, OMAP_WDT_TIMER_MODE);
316 else {
317 omap_writew(0x00f5, OMAP_WDT_TIMER_MODE);
318 omap_writew(0x00a0, OMAP_WDT_TIMER_MODE);
319 }
320}
321
322static void __init
323palmz71_gpio_setup(int early)
324{
325 if (early) {
326 /* Only set GPIO1 so we have a working serial */
327 omap_set_gpio_dataout(1, 1);
328 omap_set_gpio_direction(1, 0);
329 } else {
330 /* Set MMC/SD host WP pin as input */
331 if (omap_request_gpio(PALMZ71_MMC_WP_GPIO)) {
332 printk(KERN_ERR "Could not reserve WP GPIO!\n");
333 return;
334 }
335 omap_set_gpio_direction(PALMZ71_MMC_WP_GPIO, 1);
336
337 /* Monitor the Power-cable-connected signal */
338 if (omap_request_gpio(PALMZ71_USBDETECT_GPIO)) {
339 printk(KERN_ERR
340 "Could not reserve cable signal GPIO!\n");
341 return;
342 }
343 omap_set_gpio_direction(PALMZ71_USBDETECT_GPIO, 1);
344 if (request_irq(OMAP_GPIO_IRQ(PALMZ71_USBDETECT_GPIO),
345 palmz71_powercable, IRQF_SAMPLE_RANDOM,
346 "palmz71-cable", 0))
347 printk(KERN_ERR
348 "IRQ request for power cable failed!\n");
349 palmz71_powercable(OMAP_GPIO_IRQ(PALMZ71_USBDETECT_GPIO), 0);
350 }
351}
352
353static void __init
354omap_palmz71_init(void)
355{
356 palmz71_gpio_setup(1);
357 omap_mpu_wdt_mode(0);
358
359 omap_board_config = palmz71_config;
360 omap_board_config_size = ARRAY_SIZE(palmz71_config);
361
362 platform_add_devices(devices, ARRAY_SIZE(devices));
363
364 spi_register_board_info(palmz71_boardinfo,
365 ARRAY_SIZE(palmz71_boardinfo));
366 omap_serial_init();
367 palmz71_gpio_setup(0);
368}
369
370static void __init
371omap_palmz71_map_io(void)
372{
373 omap1_map_common_io();
374}
375
376MACHINE_START(OMAP_PALMZ71, "OMAP310 based Palm Zire71")
377 .phys_io = 0xfff00000,
378 .io_pg_offst = ((0xfef00000) >> 18) & 0xfffc,
379 .boot_params = 0x10000100,.map_io = omap_palmz71_map_io,
380 .init_irq = omap_palmz71_init_irq,
381 .init_machine = omap_palmz71_init,
382 .timer = &omap_timer,
383MACHINE_END
diff --git a/arch/arm/mach-omap1/board-sx1.c b/arch/arm/mach-omap1/board-sx1.c
new file mode 100644
index 000000000000..2743d639aa05
--- /dev/null
+++ b/arch/arm/mach-omap1/board-sx1.c
@@ -0,0 +1,494 @@
1/*
2* linux/arch/arm/mach-omap1/board-sx1.c
3*
4* Modified from board-generic.c
5*
6* Support for the Siemens SX1 mobile phone.
7*
8* Original version : Vladimir Ananiev (Vovan888-at-gmail com)
9*
10* Maintainters : Vladimir Ananiev (aka Vovan888), Sergge
11* oslik.ru
12*
13* This program is free software; you can redistribute it and/or modify
14* it under the terms of the GNU General Public License version 2 as
15* published by the Free Software Foundation.
16*/
17
18#include <linux/kernel.h>
19#include <linux/init.h>
20#include <linux/input.h>
21#include <linux/platform_device.h>
22#include <linux/notifier.h>
23#include <linux/mtd/mtd.h>
24#include <linux/mtd/partitions.h>
25#include <linux/types.h>
26#include <linux/i2c.h>
27#include <linux/errno.h>
28
29#include <asm/hardware.h>
30#include <asm/mach-types.h>
31#include <asm/mach/arch.h>
32#include <asm/mach/flash.h>
33#include <asm/mach/map.h>
34
35#include <asm/arch/gpio.h>
36#include <asm/arch/mux.h>
37#include <asm/arch/irda.h>
38#include <asm/arch/usb.h>
39#include <asm/arch/tc.h>
40#include <asm/arch/board.h>
41#include <asm/arch/common.h>
42#include <asm/arch/mcbsp.h>
43#include <asm/arch/omap-alsa.h>
44#include <asm/arch/keypad.h>
45
46/* Write to I2C device */
47int i2c_write_byte(u8 devaddr, u8 regoffset, u8 value)
48{
49 struct i2c_adapter *adap;
50 int err;
51 struct i2c_msg msg[1];
52 unsigned char data[2];
53
54 adap = i2c_get_adapter(0);
55 if (!adap)
56 return -ENODEV;
57 msg->addr = devaddr; /* I2C address of chip */
58 msg->flags = 0;
59 msg->len = 2;
60 msg->buf = data;
61 data[0] = regoffset; /* register num */
62 data[1] = value; /* register data */
63 err = i2c_transfer(adap, msg, 1);
64 if (err >= 0)
65 return 0;
66 return err;
67}
68
69/* Read from I2C device */
70int i2c_read_byte(u8 devaddr, u8 regoffset, u8 * value)
71{
72 struct i2c_adapter *adap;
73 int err;
74 struct i2c_msg msg[1];
75 unsigned char data[2];
76
77 adap = i2c_get_adapter(0);
78 if (!adap)
79 return -ENODEV;
80
81 msg->addr = devaddr; /* I2C address of chip */
82 msg->flags = 0;
83 msg->len = 1;
84 msg->buf = data;
85 data[0] = regoffset; /* register num */
86 err = i2c_transfer(adap, msg, 1);
87
88 msg->addr = devaddr; /* I2C address */
89 msg->flags = I2C_M_RD;
90 msg->len = 1;
91 msg->buf = data;
92 err = i2c_transfer(adap, msg, 1);
93 *value = data[0];
94
95 if (err >= 0)
96 return 0;
97 return err;
98}
99/* set keyboard backlight intensity */
100int sx1_setkeylight(u8 keylight)
101{
102 if (keylight > SOFIA_MAX_LIGHT_VAL)
103 keylight = SOFIA_MAX_LIGHT_VAL;
104 return i2c_write_byte(SOFIA_I2C_ADDR, SOFIA_KEYLIGHT_REG, keylight);
105}
106/* get current keylight intensity */
107int sx1_getkeylight(u8 * keylight)
108{
109 return i2c_read_byte(SOFIA_I2C_ADDR, SOFIA_KEYLIGHT_REG, keylight);
110}
111/* set LCD backlight intensity */
112int sx1_setbacklight(u8 backlight)
113{
114 if (backlight > SOFIA_MAX_LIGHT_VAL)
115 backlight = SOFIA_MAX_LIGHT_VAL;
116 return i2c_write_byte(SOFIA_I2C_ADDR, SOFIA_BACKLIGHT_REG, backlight);
117}
118/* get current LCD backlight intensity */
119int sx1_getbacklight (u8 * backlight)
120{
121 return i2c_read_byte(SOFIA_I2C_ADDR, SOFIA_BACKLIGHT_REG, backlight);
122}
123/* set LCD backlight power on/off */
124int sx1_setmmipower(u8 onoff)
125{
126 int err;
127 u8 dat = 0;
128 err = i2c_read_byte(SOFIA_I2C_ADDR, SOFIA_POWER1_REG, &dat);
129 if (err < 0)
130 return err;
131 if (onoff)
132 dat |= SOFIA_MMILIGHT_POWER;
133 else
134 dat &= ~SOFIA_MMILIGHT_POWER;
135 return i2c_write_byte(SOFIA_I2C_ADDR, SOFIA_POWER1_REG, dat);
136}
137/* set MMC power on/off */
138int sx1_setmmcpower(u8 onoff)
139{
140 int err;
141 u8 dat = 0;
142 err = i2c_read_byte(SOFIA_I2C_ADDR, SOFIA_POWER1_REG, &dat);
143 if (err < 0)
144 return err;
145 if (onoff)
146 dat |= SOFIA_MMC_POWER;
147 else
148 dat &= ~SOFIA_MMC_POWER;
149 return i2c_write_byte(SOFIA_I2C_ADDR, SOFIA_POWER1_REG, dat);
150}
151/* set USB power on/off */
152int sx1_setusbpower(u8 onoff)
153{
154 int err;
155 u8 dat = 0;
156 err = i2c_read_byte(SOFIA_I2C_ADDR, SOFIA_POWER1_REG, &dat);
157 if (err < 0)
158 return err;
159 if (onoff)
160 dat |= SOFIA_USB_POWER;
161 else
162 dat &= ~SOFIA_USB_POWER;
163 return i2c_write_byte(SOFIA_I2C_ADDR, SOFIA_POWER1_REG, dat);
164}
165
166EXPORT_SYMBOL(sx1_setkeylight);
167EXPORT_SYMBOL(sx1_getkeylight);
168EXPORT_SYMBOL(sx1_setbacklight);
169EXPORT_SYMBOL(sx1_getbacklight);
170EXPORT_SYMBOL(sx1_setmmipower);
171EXPORT_SYMBOL(sx1_setmmcpower);
172EXPORT_SYMBOL(sx1_setusbpower);
173
174/*----------- Keypad -------------------------*/
175
176static int sx1_keymap[] = {
177 KEY(5, 3, GROUP_0 | 117), /* camera Qt::Key_F17 */
178 KEY(0, 4, GROUP_0 | 114), /* voice memo Qt::Key_F14 */
179 KEY(1, 4, GROUP_2 | 114), /* voice memo */
180 KEY(2, 4, GROUP_3 | 114), /* voice memo */
181 KEY(0, 0, GROUP_1 | KEY_F12), /* red button Qt::Key_Hangup */
182 KEY(4, 3, GROUP_1 | KEY_LEFT),
183 KEY(2, 3, GROUP_1 | KEY_DOWN),
184 KEY(1, 3, GROUP_1 | KEY_RIGHT),
185 KEY(0, 3, GROUP_1 | KEY_UP),
186 KEY(3, 3, GROUP_1 | KEY_POWER), /* joystick press or Qt::Key_Select */
187 KEY(5, 0, GROUP_1 | KEY_1),
188 KEY(4, 0, GROUP_1 | KEY_2),
189 KEY(3, 0, GROUP_1 | KEY_3),
190 KEY(3, 4, GROUP_1 | KEY_4),
191 KEY(4, 4, GROUP_1 | KEY_5),
192 KEY(5, 4, GROUP_1 | KEY_KPASTERISK),/* "*" */
193 KEY(4, 1, GROUP_1 | KEY_6),
194 KEY(5, 1, GROUP_1 | KEY_7),
195 KEY(3, 1, GROUP_1 | KEY_8),
196 KEY(3, 2, GROUP_1 | KEY_9),
197 KEY(5, 2, GROUP_1 | KEY_0),
198 KEY(4, 2, GROUP_1 | 113), /* # F13 Toggle input method Qt::Key_F13 */
199 KEY(0, 1, GROUP_1 | KEY_F11), /* green button Qt::Key_Call */
200 KEY(1, 2, GROUP_1 | KEY_YEN), /* left soft Qt::Key_Context1 */
201 KEY(2, 2, GROUP_1 | KEY_F8), /* right soft Qt::Key_Back */
202 KEY(2, 1, GROUP_1 | KEY_LEFTSHIFT), /* shift */
203 KEY(1, 1, GROUP_1 | KEY_BACKSPACE), /* C (clear) */
204 KEY(0, 2, GROUP_1 | KEY_F7), /* menu Qt::Key_Menu */
205 0
206};
207
208static struct resource sx1_kp_resources[] = {
209 [0] = {
210 .start = INT_KEYBOARD,
211 .end = INT_KEYBOARD,
212 .flags = IORESOURCE_IRQ,
213 },
214};
215
216static struct omap_kp_platform_data sx1_kp_data = {
217 .rows = 6,
218 .cols = 6,
219 .keymap = sx1_keymap,
220 .keymapsize = ARRAY_SIZE(sx1_keymap),
221 .delay = 80,
222};
223
224static struct platform_device sx1_kp_device = {
225 .name = "omap-keypad",
226 .id = -1,
227 .dev = {
228 .platform_data = &sx1_kp_data,
229 },
230 .num_resources = ARRAY_SIZE(sx1_kp_resources),
231 .resource = sx1_kp_resources,
232};
233
234/*----------- IRDA -------------------------*/
235
236static struct omap_irda_config sx1_irda_data = {
237 .transceiver_cap = IR_SIRMODE,
238 .rx_channel = OMAP_DMA_UART3_RX,
239 .tx_channel = OMAP_DMA_UART3_TX,
240 .dest_start = UART3_THR,
241 .src_start = UART3_RHR,
242 .tx_trigger = 0,
243 .rx_trigger = 0,
244};
245
246static struct resource sx1_irda_resources[] = {
247 [0] = {
248 .start = INT_UART3,
249 .end = INT_UART3,
250 .flags = IORESOURCE_IRQ,
251 },
252};
253
254static u64 irda_dmamask = 0xffffffff;
255
256static struct platform_device sx1_irda_device = {
257 .name = "omapirda",
258 .id = 0,
259 .dev = {
260 .platform_data = &sx1_irda_data,
261 .dma_mask = &irda_dmamask,
262 },
263 .num_resources = ARRAY_SIZE(sx1_irda_resources),
264 .resource = sx1_irda_resources,
265};
266
267/*----------- McBSP & Sound -------------------------*/
268
269/* Playback interface - McBSP1 */
270static struct omap_mcbsp_reg_cfg mcbsp1_regs = {
271 .spcr2 = XINTM(3), /* SPCR2=30 */
272 .spcr1 = RINTM(3), /* SPCR1=30 */
273 .rcr2 = 0, /* RCR2 =00 */
274 .rcr1 = RFRLEN1(1) | RWDLEN1(OMAP_MCBSP_WORD_16), /* RCR1=140 */
275 .xcr2 = 0, /* XCR2 = 0 */
276 .xcr1 = XFRLEN1(1) | XWDLEN1(OMAP_MCBSP_WORD_16), /* XCR1 = 140 */
277 .srgr1 = FWID(15) | CLKGDV(12), /* SRGR1=0f0c */
278 .srgr2 = FSGM | FPER(31), /* SRGR2=101f */
279 .pcr0 = FSXM | FSRM | CLKXM | CLKRM | FSXP | FSRP | CLKXP | CLKRP,
280 /* PCR0 =0f0f */
281};
282
283/* TODO: PCM interface - McBSP2 */
284static struct omap_mcbsp_reg_cfg mcbsp2_regs = {
285 .spcr2 = FRST | GRST | XRST | XINTM(3), /* SPCR2=F1 */
286 .spcr1 = RINTM(3) | RRST, /* SPCR1=30 */
287 .rcr2 = 0, /* RCR2 =00 */
288 .rcr1 = RFRLEN1(1) | RWDLEN1(OMAP_MCBSP_WORD_16), /* RCR1 = 140 */
289 .xcr2 = 0, /* XCR2 = 0 */
290 .xcr1 = XFRLEN1(1) | XWDLEN1(OMAP_MCBSP_WORD_16), /* XCR1 = 140 */
291 .srgr1 = FWID(15) | CLKGDV(12), /* SRGR1=0f0c */
292 .srgr2 = FSGM | FPER(31), /* SRGR2=101f */
293 .pcr0 = FSXM | FSRM | CLKXM | CLKRM | FSXP | FSRP | CLKXP | CLKRP,
294 /* PCR0=0f0f */
295 /* mcbsp: slave */
296};
297
298static struct omap_alsa_codec_config sx1_alsa_config = {
299 .name = "SX1 EGold",
300 .mcbsp_regs_alsa = &mcbsp1_regs,
301};
302
303static struct platform_device sx1_mcbsp1_device = {
304 .name = "omap_alsa_mcbsp",
305 .id = 1,
306 .dev = {
307 .platform_data = &sx1_alsa_config,
308 },
309};
310
311/*----------- MTD -------------------------*/
312
313static struct mtd_partition sx1_partitions[] = {
314 /* bootloader (U-Boot, etc) in first sector */
315 {
316 .name = "bootloader",
317 .offset = 0x01800000,
318 .size = SZ_128K,
319 .mask_flags = MTD_WRITEABLE, /* force read-only */
320 },
321 /* bootloader params in the next sector */
322 {
323 .name = "params",
324 .offset = MTDPART_OFS_APPEND,
325 .size = SZ_128K,
326 .mask_flags = 0,
327 },
328 /* kernel */
329 {
330 .name = "kernel",
331 .offset = MTDPART_OFS_APPEND,
332 .size = SZ_2M - 2 * SZ_128K,
333 .mask_flags = 0
334 },
335 /* file system */
336 {
337 .name = "filesystem",
338 .offset = MTDPART_OFS_APPEND,
339 .size = MTDPART_SIZ_FULL,
340 .mask_flags = 0
341 }
342};
343
344static struct flash_platform_data sx1_flash_data = {
345 .map_name = "cfi_probe",
346 .width = 2,
347 .parts = sx1_partitions,
348 .nr_parts = ARRAY_SIZE(sx1_partitions),
349};
350
351#ifdef CONFIG_SX1_OLD_FLASH
352/* MTD Intel StrataFlash - old flashes */
353static struct resource sx1_old_flash_resource[] = {
354 [0] = {
355 .start = OMAP_CS0_PHYS, /* Physical */
356 .end = OMAP_CS0_PHYS + SZ_16M - 1,,
357 .flags = IORESOURCE_MEM,
358 },
359 [1] = {
360 .start = OMAP_CS1_PHYS,
361 .end = OMAP_CS1_PHYS + SZ_8M - 1,
362 .flags = IORESOURCE_MEM,
363 },
364};
365
366static struct platform_device sx1_flash_device = {
367 .name = "omapflash",
368 .id = 0,
369 .dev = {
370 .platform_data = &sx1_flash_data,
371 },
372 .num_resources = 2,
373 .resource = &sx1_old_flash_resource,
374};
375#else
376/* MTD Intel 4000 flash - new flashes */
377static struct resource sx1_new_flash_resource = {
378 .start = OMAP_CS0_PHYS,
379 .end = OMAP_CS0_PHYS + SZ_32M - 1,
380 .flags = IORESOURCE_MEM,
381};
382
383static struct platform_device sx1_flash_device = {
384 .name = "omapflash",
385 .id = 0,
386 .dev = {
387 .platform_data = &sx1_flash_data,
388 },
389 .num_resources = 1,
390 .resource = &sx1_new_flash_resource,
391};
392#endif
393
394/*----------- USB -------------------------*/
395
396static struct omap_usb_config sx1_usb_config __initdata = {
397 .otg = 0,
398 .register_dev = 1,
399 .register_host = 0,
400 .hmc_mode = 0,
401 .pins[0] = 2,
402 .pins[1] = 0,
403 .pins[2] = 0,
404};
405
406/*----------- MMC -------------------------*/
407
408static struct omap_mmc_config sx1_mmc_config __initdata = {
409 .mmc [0] = {
410 .enabled = 1,
411 .wire4 = 0,
412 .wp_pin = -1,
413 .power_pin = -1, /* power is in Sofia */
414 .switch_pin = OMAP_MPUIO(3),
415 },
416};
417
418/*----------- LCD -------------------------*/
419
420static struct platform_device sx1_lcd_device = {
421 .name = "lcd_sx1",
422 .id = -1,
423};
424
425static struct omap_lcd_config sx1_lcd_config __initdata = {
426 .ctrl_name = "internal",
427};
428
429/*-----------------------------------------*/
430static struct platform_device *sx1_devices[] __initdata = {
431 &sx1_flash_device,
432 &sx1_kp_device,
433 &sx1_lcd_device,
434 &sx1_mcbsp1_device,
435 &sx1_irda_device,
436};
437/*-----------------------------------------*/
438
439static struct omap_uart_config sx1_uart_config __initdata = {
440 .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
441};
442
443static struct omap_board_config_kernel sx1_config[] = {
444 { OMAP_TAG_USB, &sx1_usb_config },
445 { OMAP_TAG_MMC, &sx1_mmc_config },
446 { OMAP_TAG_LCD, &sx1_lcd_config },
447 { OMAP_TAG_UART, &sx1_uart_config },
448};
449/*-----------------------------------------*/
450static void __init omap_sx1_init(void)
451{
452 platform_add_devices(sx1_devices, ARRAY_SIZE(sx1_devices));
453
454 omap_board_config = sx1_config;
455 omap_board_config_size = ARRAY_SIZE(sx1_config);
456 omap_serial_init();
457
458 /* turn on USB power */
459 /* sx1_setusbpower(1); cant do it here because i2c is not ready */
460 omap_request_gpio(1); /* A_IRDA_OFF */
461 omap_request_gpio(11); /* A_SWITCH */
462 omap_request_gpio(15); /* A_USB_ON */
463 omap_set_gpio_direction(1, 0);/* gpio1 -> output */
464 omap_set_gpio_direction(11, 0);/* gpio11 -> output */
465 omap_set_gpio_direction(15, 0);/* gpio15 -> output */
466 /* set GPIO data */
467 omap_set_gpio_dataout(1, 1);/*A_IRDA_OFF = 1 */
468 omap_set_gpio_dataout(11, 0);/*A_SWITCH = 0 */
469 omap_set_gpio_dataout(15, 0);/*A_USB_ON = 0 */
470
471}
472/*----------------------------------------*/
473static void __init omap_sx1_init_irq(void)
474{
475 omap1_init_common_hw();
476 omap_init_irq();
477 omap_gpio_init();
478}
479/*----------------------------------------*/
480
481static void __init omap_sx1_map_io(void)
482{
483 omap1_map_common_io();
484}
485
486MACHINE_START(SX1, "OMAP310 based Siemens SX1")
487 .phys_io = 0xfff00000,
488 .io_pg_offst = ((0xfef00000) >> 18) & 0xfffc,
489 .boot_params = 0x10000100,
490 .map_io = omap_sx1_map_io,
491 .init_irq = omap_sx1_init_irq,
492 .init_machine = omap_sx1_init,
493 .timer = &omap_timer,
494MACHINE_END
diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c
index 447a586eb334..214dd19889ac 100644
--- a/arch/arm/mach-omap1/board-voiceblue.c
+++ b/arch/arm/mach-omap1/board-voiceblue.c
@@ -235,7 +235,7 @@ static struct notifier_block panic_block = {
235static int __init voiceblue_setup(void) 235static int __init voiceblue_setup(void)
236{ 236{
237 /* Setup panic notifier */ 237 /* Setup panic notifier */
238 notifier_chain_register(&panic_notifier_list, &panic_block); 238 atomic_notifier_chain_register(&panic_notifier_list, &panic_block);
239 239
240 return 0; 240 return 0;
241} 241}
diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c
index f625f6dd228a..5d9faa68d2ec 100644
--- a/arch/arm/mach-omap1/clock.c
+++ b/arch/arm/mach-omap1/clock.c
@@ -49,6 +49,15 @@ static void omap1_uart_recalc(struct clk * clk)
49 clk->rate = 12000000; 49 clk->rate = 12000000;
50} 50}
51 51
52static void omap1_sossi_recalc(struct clk *clk)
53{
54 u32 div = omap_readl(MOD_CONF_CTRL_1);
55
56 div = (div >> 17) & 0x7;
57 div++;
58 clk->rate = clk->parent->rate / div;
59}
60
52static int omap1_clk_enable_dsp_domain(struct clk *clk) 61static int omap1_clk_enable_dsp_domain(struct clk *clk)
53{ 62{
54 int retval; 63 int retval;
@@ -396,6 +405,31 @@ static int omap1_set_ext_clk_rate(struct clk * clk, unsigned long rate)
396 return 0; 405 return 0;
397} 406}
398 407
408static int omap1_set_sossi_rate(struct clk *clk, unsigned long rate)
409{
410 u32 l;
411 int div;
412 unsigned long p_rate;
413
414 p_rate = clk->parent->rate;
415 /* Round towards slower frequency */
416 div = (p_rate + rate - 1) / rate;
417 div--;
418 if (div < 0 || div > 7)
419 return -EINVAL;
420
421 l = omap_readl(MOD_CONF_CTRL_1);
422 l &= ~(7 << 17);
423 l |= div << 17;
424 omap_writel(l, MOD_CONF_CTRL_1);
425
426 clk->rate = p_rate / (div + 1);
427 if (unlikely(clk->flags & RATE_PROPAGATES))
428 propagate_rate(clk);
429
430 return 0;
431}
432
399static long omap1_round_ext_clk_rate(struct clk * clk, unsigned long rate) 433static long omap1_round_ext_clk_rate(struct clk * clk, unsigned long rate)
400{ 434{
401 return 96000000 / calc_ext_dsor(rate); 435 return 96000000 / calc_ext_dsor(rate);
diff --git a/arch/arm/mach-omap1/clock.h b/arch/arm/mach-omap1/clock.h
index f7df00205c4a..6eadf72828d8 100644
--- a/arch/arm/mach-omap1/clock.h
+++ b/arch/arm/mach-omap1/clock.h
@@ -17,6 +17,8 @@ static int omap1_clk_enable_generic(struct clk * clk);
17static void omap1_clk_disable_generic(struct clk * clk); 17static void omap1_clk_disable_generic(struct clk * clk);
18static void omap1_ckctl_recalc(struct clk * clk); 18static void omap1_ckctl_recalc(struct clk * clk);
19static void omap1_watchdog_recalc(struct clk * clk); 19static void omap1_watchdog_recalc(struct clk * clk);
20static int omap1_set_sossi_rate(struct clk *clk, unsigned long rate);
21static void omap1_sossi_recalc(struct clk *clk);
20static void omap1_ckctl_recalc_dsp_domain(struct clk * clk); 22static void omap1_ckctl_recalc_dsp_domain(struct clk * clk);
21static int omap1_clk_enable_dsp_domain(struct clk * clk); 23static int omap1_clk_enable_dsp_domain(struct clk * clk);
22static int omap1_clk_set_rate_dsp_domain(struct clk * clk, unsigned long rate); 24static int omap1_clk_set_rate_dsp_domain(struct clk * clk, unsigned long rate);
@@ -168,9 +170,10 @@ static struct clk ck_dpll1 = {
168 170
169static struct arm_idlect1_clk ck_dpll1out = { 171static struct arm_idlect1_clk ck_dpll1out = {
170 .clk = { 172 .clk = {
171 .name = "ck_dpll1out", 173 .name = "ck_dpll1out",
172 .parent = &ck_dpll1, 174 .parent = &ck_dpll1,
173 .flags = CLOCK_IN_OMAP16XX | CLOCK_IDLE_CONTROL, 175 .flags = CLOCK_IN_OMAP16XX | CLOCK_IDLE_CONTROL |
176 ENABLE_REG_32BIT | RATE_PROPAGATES,
174 .enable_reg = (void __iomem *)ARM_IDLECT2, 177 .enable_reg = (void __iomem *)ARM_IDLECT2,
175 .enable_bit = EN_CKOUT_ARM, 178 .enable_bit = EN_CKOUT_ARM,
176 .recalc = &followparent_recalc, 179 .recalc = &followparent_recalc,
@@ -180,6 +183,19 @@ static struct arm_idlect1_clk ck_dpll1out = {
180 .idlect_shift = 12, 183 .idlect_shift = 12,
181}; 184};
182 185
186static struct clk sossi_ck = {
187 .name = "ck_sossi",
188 .parent = &ck_dpll1out.clk,
189 .flags = CLOCK_IN_OMAP16XX | CLOCK_NO_IDLE_PARENT |
190 ENABLE_REG_32BIT,
191 .enable_reg = (void __iomem *)MOD_CONF_CTRL_1,
192 .enable_bit = 16,
193 .recalc = &omap1_sossi_recalc,
194 .set_rate = &omap1_set_sossi_rate,
195 .enable = &omap1_clk_enable_generic,
196 .disable = &omap1_clk_disable_generic,
197};
198
183static struct clk arm_ck = { 199static struct clk arm_ck = {
184 .name = "arm_ck", 200 .name = "arm_ck",
185 .parent = &ck_dpll1, 201 .parent = &ck_dpll1,
@@ -282,7 +298,7 @@ static struct clk arminth_ck16xx = {
282static struct clk dsp_ck = { 298static struct clk dsp_ck = {
283 .name = "dsp_ck", 299 .name = "dsp_ck",
284 .parent = &ck_dpll1, 300 .parent = &ck_dpll1,
285 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | 301 .flags = CLOCK_IN_OMAP310 | CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
286 RATE_CKCTL, 302 RATE_CKCTL,
287 .enable_reg = (void __iomem *)ARM_CKCTL, 303 .enable_reg = (void __iomem *)ARM_CKCTL,
288 .enable_bit = EN_DSPCK, 304 .enable_bit = EN_DSPCK,
@@ -295,7 +311,7 @@ static struct clk dsp_ck = {
295static struct clk dspmmu_ck = { 311static struct clk dspmmu_ck = {
296 .name = "dspmmu_ck", 312 .name = "dspmmu_ck",
297 .parent = &ck_dpll1, 313 .parent = &ck_dpll1,
298 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | 314 .flags = CLOCK_IN_OMAP310 | CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
299 RATE_CKCTL | ALWAYS_ENABLED, 315 RATE_CKCTL | ALWAYS_ENABLED,
300 .rate_offset = CKCTL_DSPMMUDIV_OFFSET, 316 .rate_offset = CKCTL_DSPMMUDIV_OFFSET,
301 .recalc = &omap1_ckctl_recalc, 317 .recalc = &omap1_ckctl_recalc,
@@ -306,7 +322,7 @@ static struct clk dspmmu_ck = {
306static struct clk dspper_ck = { 322static struct clk dspper_ck = {
307 .name = "dspper_ck", 323 .name = "dspper_ck",
308 .parent = &ck_dpll1, 324 .parent = &ck_dpll1,
309 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | 325 .flags = CLOCK_IN_OMAP310 | CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
310 RATE_CKCTL | VIRTUAL_IO_ADDRESS, 326 RATE_CKCTL | VIRTUAL_IO_ADDRESS,
311 .enable_reg = (void __iomem *)DSP_IDLECT2, 327 .enable_reg = (void __iomem *)DSP_IDLECT2,
312 .enable_bit = EN_PERCK, 328 .enable_bit = EN_PERCK,
@@ -320,7 +336,7 @@ static struct clk dspper_ck = {
320static struct clk dspxor_ck = { 336static struct clk dspxor_ck = {
321 .name = "dspxor_ck", 337 .name = "dspxor_ck",
322 .parent = &ck_ref, 338 .parent = &ck_ref,
323 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | 339 .flags = CLOCK_IN_OMAP310 | CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
324 VIRTUAL_IO_ADDRESS, 340 VIRTUAL_IO_ADDRESS,
325 .enable_reg = (void __iomem *)DSP_IDLECT2, 341 .enable_reg = (void __iomem *)DSP_IDLECT2,
326 .enable_bit = EN_XORPCK, 342 .enable_bit = EN_XORPCK,
@@ -332,7 +348,7 @@ static struct clk dspxor_ck = {
332static struct clk dsptim_ck = { 348static struct clk dsptim_ck = {
333 .name = "dsptim_ck", 349 .name = "dsptim_ck",
334 .parent = &ck_ref, 350 .parent = &ck_ref,
335 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | 351 .flags = CLOCK_IN_OMAP310 | CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
336 VIRTUAL_IO_ADDRESS, 352 VIRTUAL_IO_ADDRESS,
337 .enable_reg = (void __iomem *)DSP_IDLECT2, 353 .enable_reg = (void __iomem *)DSP_IDLECT2,
338 .enable_bit = EN_DSPTIMCK, 354 .enable_bit = EN_DSPTIMCK,
@@ -374,7 +390,7 @@ static struct clk arminth_ck1510 = {
374 390
375static struct clk tipb_ck = { 391static struct clk tipb_ck = {
376 /* No-idle controlled by "tc_ck" */ 392 /* No-idle controlled by "tc_ck" */
377 .name = "tibp_ck", 393 .name = "tipb_ck",
378 .parent = &tc_ck.clk, 394 .parent = &tc_ck.clk,
379 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 | 395 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 |
380 ALWAYS_ENABLED, 396 ALWAYS_ENABLED,
@@ -733,7 +749,7 @@ remains active during MPU idle whenever this is enabled */
733static struct clk i2c_fck = { 749static struct clk i2c_fck = {
734 .name = "i2c_fck", 750 .name = "i2c_fck",
735 .id = 1, 751 .id = 1,
736 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | 752 .flags = CLOCK_IN_OMAP310 | CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
737 VIRTUAL_CLOCK | CLOCK_NO_IDLE_PARENT | 753 VIRTUAL_CLOCK | CLOCK_NO_IDLE_PARENT |
738 ALWAYS_ENABLED, 754 ALWAYS_ENABLED,
739 .parent = &armxor_ck.clk, 755 .parent = &armxor_ck.clk,
@@ -760,6 +776,7 @@ static struct clk * onchip_clks[] = {
760 &ck_dpll1, 776 &ck_dpll1,
761 /* CK_GEN1 clocks */ 777 /* CK_GEN1 clocks */
762 &ck_dpll1out.clk, 778 &ck_dpll1out.clk,
779 &sossi_ck,
763 &arm_ck, 780 &arm_ck,
764 &armper_ck.clk, 781 &armper_ck.clk,
765 &arm_gpio_ck, 782 &arm_gpio_ck,
diff --git a/arch/arm/mach-omap1/leds-innovator.c b/arch/arm/mach-omap1/leds-innovator.c
index a0cd001ac39a..e7835d6f53a0 100644
--- a/arch/arm/mach-omap1/leds-innovator.c
+++ b/arch/arm/mach-omap1/leds-innovator.c
@@ -95,8 +95,5 @@ void innovator_leds_event(led_event_t evt)
95 break; 95 break;
96 } 96 }
97 97
98 if (led_state & LED_STATE_ENABLED)
99 ;
100
101 local_irq_restore(flags); 98 local_irq_restore(flags);
102} 99}
diff --git a/arch/arm/mach-omap1/mux.c b/arch/arm/mach-omap1/mux.c
index 5432335bc493..52c70e5fcf65 100644
--- a/arch/arm/mach-omap1/mux.c
+++ b/arch/arm/mach-omap1/mux.c
@@ -283,6 +283,30 @@ MUX_CFG("R11_1610_CF_IOIS16", B, 0, 3, 2, 16, 1, 2, 1, 1)
283MUX_CFG("V10_1610_CF_IREQ", A, 24, 3, 2, 14, 0, 2, 0, 1) 283MUX_CFG("V10_1610_CF_IREQ", A, 24, 3, 2, 14, 0, 2, 0, 1)
284MUX_CFG("W10_1610_CF_RESET", A, 18, 3, 2, 12, 1, 2, 1, 1) 284MUX_CFG("W10_1610_CF_RESET", A, 18, 3, 2, 12, 1, 2, 1, 1)
285MUX_CFG("W11_1610_CF_CD1", 10, 15, 3, 3, 8, 1, 3, 1, 1) 285MUX_CFG("W11_1610_CF_CD1", 10, 15, 3, 3, 8, 1, 3, 1, 1)
286
287/* parallel camera */
288MUX_CFG("J15_1610_CAM_LCLK", 4, 24, 0, 0, 18, 1, 0, 0, 0)
289MUX_CFG("J18_1610_CAM_D7", 4, 27, 0, 0, 19, 1, 0, 0, 0)
290MUX_CFG("J19_1610_CAM_D6", 5, 0, 0, 0, 20, 1, 0, 0, 0)
291MUX_CFG("J14_1610_CAM_D5", 5, 3, 0, 0, 21, 1, 0, 0, 0)
292MUX_CFG("K18_1610_CAM_D4", 5, 6, 0, 0, 22, 1, 0, 0, 0)
293MUX_CFG("K19_1610_CAM_D3", 5, 9, 0, 0, 23, 1, 0, 0, 0)
294MUX_CFG("K15_1610_CAM_D2", 5, 12, 0, 0, 24, 1, 0, 0, 0)
295MUX_CFG("K14_1610_CAM_D1", 5, 15, 0, 0, 25, 1, 0, 0, 0)
296MUX_CFG("L19_1610_CAM_D0", 5, 18, 0, 0, 26, 1, 0, 0, 0)
297MUX_CFG("L18_1610_CAM_VS", 5, 21, 0, 0, 27, 1, 0, 0, 0)
298MUX_CFG("L15_1610_CAM_HS", 5, 24, 0, 0, 28, 1, 0, 0, 0)
299MUX_CFG("M19_1610_CAM_RSTZ", 5, 27, 0, 0, 29, 0, 0, 0, 0)
300MUX_CFG("Y15_1610_CAM_OUTCLK", A, 0, 6, 2, 6, 0, 2, 0, 0)
301
302/* serial camera */
303MUX_CFG("H19_1610_CAM_EXCLK", 4, 21, 0, 0, 17, 0, 0, 0, 0)
304 /* REVISIT 5912 spec sez CCP_* can't pullup or pulldown ... ? */
305MUX_CFG("Y12_1610_CCP_CLKP", 8, 18, 6, 1, 24, 1, 1, 0, 0)
306MUX_CFG("W13_1610_CCP_CLKM", 9, 0, 6, 1, 28, 1, 1, 0, 0)
307MUX_CFG("W14_1610_CCP_DATAP", 9, 24, 6, 2, 4, 1, 2, 0, 0)
308MUX_CFG("Y14_1610_CCP_DATAM", 9, 21, 6, 2, 3, 1, 2, 0, 0)
309
286}; 310};
287#endif /* CONFIG_ARCH_OMAP15XX || CONFIG_ARCH_OMAP16XX */ 311#endif /* CONFIG_ARCH_OMAP15XX || CONFIG_ARCH_OMAP16XX */
288 312
diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c
index 2e68be607295..089b8208de0e 100644
--- a/arch/arm/mach-omap1/pm.c
+++ b/arch/arm/mach-omap1/pm.c
@@ -153,11 +153,8 @@ void omap_pm_idle(void)
153 use_idlect1 = omap_dm_timer_modify_idlect_mask(use_idlect1); 153 use_idlect1 = omap_dm_timer_modify_idlect_mask(use_idlect1);
154#endif 154#endif
155 155
156 if (omap_dma_running()) { 156 if (omap_dma_running())
157 use_idlect1 &= ~(1 << 6); 157 use_idlect1 &= ~(1 << 6);
158 if (omap_lcd_dma_ext_running())
159 use_idlect1 &= ~(1 << 12);
160 }
161 158
162 /* We should be able to remove the do_sleep variable and multiple 159 /* We should be able to remove the do_sleep variable and multiple
163 * tests above as soon as drivers, timer and DMA code have been fixed. 160 * tests above as soon as drivers, timer and DMA code have been fixed.
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 7393109f5c30..7069c9d536f1 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -11,6 +11,10 @@ config ARCH_OMAP2420
11 select OMAP_DM_TIMER 11 select OMAP_DM_TIMER
12 select ARCH_OMAP_OTG 12 select ARCH_OMAP_OTG
13 13
14config ARCH_OMAP2430
15 bool "OMAP2430 support"
16 depends on ARCH_OMAP24XX
17
14comment "OMAP Board Type" 18comment "OMAP Board Type"
15 depends on ARCH_OMAP2 19 depends on ARCH_OMAP2
16 20
@@ -21,8 +25,13 @@ config MACH_OMAP_GENERIC
21config MACH_OMAP_H4 25config MACH_OMAP_H4
22 bool "OMAP 2420 H4 board" 26 bool "OMAP 2420 H4 board"
23 depends on ARCH_OMAP2 && ARCH_OMAP24XX 27 depends on ARCH_OMAP2 && ARCH_OMAP24XX
24 select OMAP_DEBUG_LEDS if LEDS || LEDS_OMAP_DEBUG 28 select OMAP_DEBUG_DEVICES
25 29
26config MACH_OMAP_APOLLON 30config MACH_OMAP_APOLLON
27 bool "OMAP 2420 Apollon board" 31 bool "OMAP 2420 Apollon board"
28 depends on ARCH_OMAP2 && ARCH_OMAP24XX 32 depends on ARCH_OMAP2 && ARCH_OMAP24XX
33
34config MACH_OMAP_2430SDP
35 bool "OMAP 2430 SDP board"
36 depends on ARCH_OMAP2 && ARCH_OMAP24XX
37
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 266d88e77bdc..b05b738d31e6 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -14,5 +14,6 @@ obj-$(CONFIG_PM) += pm.o pm-domain.o sleep.o
14# Specific board support 14# Specific board support
15obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o 15obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o
16obj-$(CONFIG_MACH_OMAP_H4) += board-h4.o 16obj-$(CONFIG_MACH_OMAP_H4) += board-h4.o
17obj-$(CONFIG_MACH_OMAP_2430SDP) += board-2430sdp.o
17obj-$(CONFIG_MACH_OMAP_APOLLON) += board-apollon.o 18obj-$(CONFIG_MACH_OMAP_APOLLON) += board-apollon.o
18 19
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
new file mode 100644
index 000000000000..7e76fbf19b5d
--- /dev/null
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -0,0 +1,218 @@
1/*
2 * linux/arch/arm/mach-omap2/board-2430sdp.c
3 *
4 * Copyright (C) 2006 Texas Instruments
5 *
6 * Modified from mach-omap2/board-generic.c
7 *
8 * Initial Code : Based on a patch from Komal Shah and Richard Woodruff
9 * Updated the Code for 2430 SDP : Syed Mohammed Khasim
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#include <linux/kernel.h>
17#include <linux/init.h>
18#include <linux/platform_device.h>
19#include <linux/mtd/mtd.h>
20#include <linux/mtd/partitions.h>
21#include <linux/delay.h>
22#include <linux/err.h>
23#include <linux/clk.h>
24
25#include <asm/hardware.h>
26#include <asm/mach-types.h>
27#include <asm/mach/arch.h>
28#include <asm/mach/map.h>
29#include <asm/mach/flash.h>
30
31#include <asm/arch/gpio.h>
32#include <asm/arch/mux.h>
33#include <asm/arch/board.h>
34#include <asm/arch/common.h>
35#include <asm/arch/gpmc.h>
36#include "prcm-regs.h"
37
38#include <asm/io.h>
39
40
41#define SDP2430_FLASH_CS 0
42#define SDP2430_SMC91X_CS 5
43
44static struct mtd_partition sdp2430_partitions[] = {
45 /* bootloader (U-Boot, etc) in first sector */
46 {
47 .name = "bootloader",
48 .offset = 0,
49 .size = SZ_256K,
50 .mask_flags = MTD_WRITEABLE, /* force read-only */
51 },
52 /* bootloader params in the next sector */
53 {
54 .name = "params",
55 .offset = MTDPART_OFS_APPEND,
56 .size = SZ_128K,
57 .mask_flags = 0,
58 },
59 /* kernel */
60 {
61 .name = "kernel",
62 .offset = MTDPART_OFS_APPEND,
63 .size = SZ_2M,
64 .mask_flags = 0
65 },
66 /* file system */
67 {
68 .name = "filesystem",
69 .offset = MTDPART_OFS_APPEND,
70 .size = MTDPART_SIZ_FULL,
71 .mask_flags = 0
72 }
73};
74
75static struct flash_platform_data sdp2430_flash_data = {
76 .map_name = "cfi_probe",
77 .width = 2,
78 .parts = sdp2430_partitions,
79 .nr_parts = ARRAY_SIZE(sdp2430_partitions),
80};
81
82static struct resource sdp2430_flash_resource = {
83 .start = SDP2430_CS0_BASE,
84 .end = SDP2430_CS0_BASE + SZ_64M - 1,
85 .flags = IORESOURCE_MEM,
86};
87
88static struct platform_device sdp2430_flash_device = {
89 .name = "omapflash",
90 .id = 0,
91 .dev = {
92 .platform_data = &sdp2430_flash_data,
93 },
94 .num_resources = 1,
95 .resource = &sdp2430_flash_resource,
96};
97
98static struct resource sdp2430_smc91x_resources[] = {
99 [0] = {
100 .start = SDP2430_CS0_BASE,
101 .end = SDP2430_CS0_BASE + SZ_64M - 1,
102 .flags = IORESOURCE_MEM,
103 },
104 [1] = {
105 .start = OMAP_GPIO_IRQ(OMAP24XX_ETHR_GPIO_IRQ),
106 .end = OMAP_GPIO_IRQ(OMAP24XX_ETHR_GPIO_IRQ),
107 .flags = IORESOURCE_IRQ,
108 },
109};
110
111static struct platform_device sdp2430_smc91x_device = {
112 .name = "smc91x",
113 .id = -1,
114 .num_resources = ARRAY_SIZE(sdp2430_smc91x_resources),
115 .resource = sdp2430_smc91x_resources,
116};
117
118static struct platform_device *sdp2430_devices[] __initdata = {
119 &sdp2430_smc91x_device,
120 &sdp2430_flash_device,
121};
122
123static inline void __init sdp2430_init_smc91x(void)
124{
125 int eth_cs;
126 unsigned long cs_mem_base;
127 unsigned int rate;
128 struct clk *l3ck;
129
130 eth_cs = SDP2430_SMC91X_CS;
131
132 l3ck = clk_get(NULL, "core_l3_ck");
133 if (IS_ERR(l3ck))
134 rate = 100000000;
135 else
136 rate = clk_get_rate(l3ck);
137
138 /* Make sure CS1 timings are correct, for 2430 always muxed */
139 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG1, 0x00011200);
140
141 if (rate >= 160000000) {
142 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG2, 0x001f1f01);
143 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG3, 0x00080803);
144 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG4, 0x1c0b1c0a);
145 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG5, 0x041f1F1F);
146 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG6, 0x000004C4);
147 } else if (rate >= 130000000) {
148 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG2, 0x001f1f00);
149 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG3, 0x00080802);
150 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG4, 0x1C091C09);
151 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG5, 0x041f1F1F);
152 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG6, 0x000004C4);
153 } else { /* rate = 100000000 */
154 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG2, 0x001f1f00);
155 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG3, 0x00080802);
156 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG4, 0x1C091C09);
157 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG5, 0x031A1F1F);
158 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG6, 0x000003C2);
159 }
160
161 if (gpmc_cs_request(eth_cs, SZ_16M, &cs_mem_base) < 0) {
162 printk(KERN_ERR "Failed to request GPMC mem for smc91x\n");
163 return;
164 }
165
166 sdp2430_smc91x_resources[0].start = cs_mem_base + 0x300;
167 sdp2430_smc91x_resources[0].end = cs_mem_base + 0x30f;
168 udelay(100);
169
170 if (omap_request_gpio(OMAP24XX_ETHR_GPIO_IRQ) < 0) {
171 printk(KERN_ERR "Failed to request GPIO%d for smc91x IRQ\n",
172 OMAP24XX_ETHR_GPIO_IRQ);
173 gpmc_cs_free(eth_cs);
174 return;
175 }
176 omap_set_gpio_direction(OMAP24XX_ETHR_GPIO_IRQ, 1);
177
178}
179
180static void __init omap_2430sdp_init_irq(void)
181{
182 omap2_init_common_hw();
183 omap_init_irq();
184 omap_gpio_init();
185 sdp2430_init_smc91x();
186}
187
188static struct omap_uart_config sdp2430_uart_config __initdata = {
189 .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
190};
191
192static struct omap_board_config_kernel sdp2430_config[] = {
193 {OMAP_TAG_UART, &sdp2430_uart_config},
194};
195
196static void __init omap_2430sdp_init(void)
197{
198 platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices));
199 omap_board_config = sdp2430_config;
200 omap_board_config_size = ARRAY_SIZE(sdp2430_config);
201 omap_serial_init();
202}
203
204static void __init omap_2430sdp_map_io(void)
205{
206 omap2_map_common_io();
207}
208
209MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board")
210 /* Maintainer: Syed Khasim - Texas Instruments Inc */
211 .phys_io = 0x48000000,
212 .io_pg_offst = ((0xd8000000) >> 18) & 0xfffc,
213 .boot_params = 0x80000100,
214 .map_io = omap_2430sdp_map_io,
215 .init_irq = omap_2430sdp_init_irq,
216 .init_machine = omap_2430sdp_init,
217 .timer = &omap_timer,
218MACHINE_END
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c
index 878ff9181d0e..3bb49c17c858 100644
--- a/arch/arm/mach-omap2/board-apollon.c
+++ b/arch/arm/mach-omap2/board-apollon.c
@@ -25,6 +25,8 @@
25#include <linux/irq.h> 25#include <linux/irq.h>
26#include <linux/interrupt.h> 26#include <linux/interrupt.h>
27#include <linux/delay.h> 27#include <linux/delay.h>
28#include <linux/leds.h>
29#include <linux/irq.h>
28 30
29#include <asm/hardware.h> 31#include <asm/hardware.h>
30#include <asm/mach-types.h> 32#include <asm/mach-types.h>
@@ -32,10 +34,12 @@
32#include <asm/mach/flash.h> 34#include <asm/mach/flash.h>
33 35
34#include <asm/arch/gpio.h> 36#include <asm/arch/gpio.h>
37#include <asm/arch/led.h>
35#include <asm/arch/mux.h> 38#include <asm/arch/mux.h>
36#include <asm/arch/usb.h> 39#include <asm/arch/usb.h>
37#include <asm/arch/board.h> 40#include <asm/arch/board.h>
38#include <asm/arch/common.h> 41#include <asm/arch/common.h>
42#include <asm/arch/gpmc.h>
39#include "prcm-regs.h" 43#include "prcm-regs.h"
40 44
41/* LED & Switch macros */ 45/* LED & Switch macros */
@@ -46,6 +50,9 @@
46#define SW_UP_GPIO17 17 50#define SW_UP_GPIO17 17
47#define SW_DOWN_GPIO58 58 51#define SW_DOWN_GPIO58 58
48 52
53#define APOLLON_FLASH_CS 0
54#define APOLLON_ETH_CS 1
55
49static struct mtd_partition apollon_partitions[] = { 56static struct mtd_partition apollon_partitions[] = {
50 { 57 {
51 .name = "X-Loader + U-Boot", 58 .name = "X-Loader + U-Boot",
@@ -85,10 +92,10 @@ static struct flash_platform_data apollon_flash_data = {
85 .nr_parts = ARRAY_SIZE(apollon_partitions), 92 .nr_parts = ARRAY_SIZE(apollon_partitions),
86}; 93};
87 94
88static struct resource apollon_flash_resource = { 95static struct resource apollon_flash_resource[] = {
89 .start = APOLLON_CS0_BASE, 96 [0] = {
90 .end = APOLLON_CS0_BASE + SZ_128K, 97 .flags = IORESOURCE_MEM,
91 .flags = IORESOURCE_MEM, 98 },
92}; 99};
93 100
94static struct platform_device apollon_onenand_device = { 101static struct platform_device apollon_onenand_device = {
@@ -97,14 +104,24 @@ static struct platform_device apollon_onenand_device = {
97 .dev = { 104 .dev = {
98 .platform_data = &apollon_flash_data, 105 .platform_data = &apollon_flash_data,
99 }, 106 },
100 .num_resources = ARRAY_SIZE(&apollon_flash_resource), 107 .num_resources = ARRAY_SIZE(apollon_flash_resource),
101 .resource = &apollon_flash_resource, 108 .resource = apollon_flash_resource,
102}; 109};
103 110
111static void __init apollon_flash_init(void)
112{
113 unsigned long base;
114
115 if (gpmc_cs_request(APOLLON_FLASH_CS, SZ_128K, &base) < 0) {
116 printk(KERN_ERR "Cannot request OneNAND GPMC CS\n");
117 return;
118 }
119 apollon_flash_resource[0].start = base;
120 apollon_flash_resource[0].end = base + SZ_128K - 1;
121}
122
104static struct resource apollon_smc91x_resources[] = { 123static struct resource apollon_smc91x_resources[] = {
105 [0] = { 124 [0] = {
106 .start = APOLLON_ETHR_START, /* Physical */
107 .end = APOLLON_ETHR_START + 0xf,
108 .flags = IORESOURCE_MEM, 125 .flags = IORESOURCE_MEM,
109 }, 126 },
110 [1] = { 127 [1] = {
@@ -126,14 +143,51 @@ static struct platform_device apollon_lcd_device = {
126 .id = -1, 143 .id = -1,
127}; 144};
128 145
146static struct omap_led_config apollon_led_config[] = {
147 {
148 .cdev = {
149 .name = "apollon:led0",
150 },
151 .gpio = LED0_GPIO13,
152 },
153 {
154 .cdev = {
155 .name = "apollon:led1",
156 },
157 .gpio = LED1_GPIO14,
158 },
159 {
160 .cdev = {
161 .name = "apollon:led2",
162 },
163 .gpio = LED2_GPIO15,
164 },
165};
166
167static struct omap_led_platform_data apollon_led_data = {
168 .nr_leds = ARRAY_SIZE(apollon_led_config),
169 .leds = apollon_led_config,
170};
171
172static struct platform_device apollon_led_device = {
173 .name = "omap-led",
174 .id = -1,
175 .dev = {
176 .platform_data = &apollon_led_data,
177 },
178};
179
129static struct platform_device *apollon_devices[] __initdata = { 180static struct platform_device *apollon_devices[] __initdata = {
130 &apollon_onenand_device, 181 &apollon_onenand_device,
131 &apollon_smc91x_device, 182 &apollon_smc91x_device,
132 &apollon_lcd_device, 183 &apollon_lcd_device,
184 &apollon_led_device,
133}; 185};
134 186
135static inline void __init apollon_init_smc91x(void) 187static inline void __init apollon_init_smc91x(void)
136{ 188{
189 unsigned long base;
190
137 /* Make sure CS1 timings are correct */ 191 /* Make sure CS1 timings are correct */
138 GPMC_CONFIG1_1 = 0x00011203; 192 GPMC_CONFIG1_1 = 0x00011203;
139 GPMC_CONFIG2_1 = 0x001f1f01; 193 GPMC_CONFIG2_1 = 0x001f1f01;
@@ -141,13 +195,20 @@ static inline void __init apollon_init_smc91x(void)
141 GPMC_CONFIG4_1 = 0x1c091c09; 195 GPMC_CONFIG4_1 = 0x1c091c09;
142 GPMC_CONFIG5_1 = 0x041f1f1f; 196 GPMC_CONFIG5_1 = 0x041f1f1f;
143 GPMC_CONFIG6_1 = 0x000004c4; 197 GPMC_CONFIG6_1 = 0x000004c4;
144 GPMC_CONFIG7_1 = 0x00000f40 | (APOLLON_CS1_BASE >> 24); 198
199 if (gpmc_cs_request(APOLLON_ETH_CS, SZ_16M, &base) < 0) {
200 printk(KERN_ERR "Failed to request GPMC CS for smc91x\n");
201 return;
202 }
203 apollon_smc91x_resources[0].start = base + 0x300;
204 apollon_smc91x_resources[0].end = base + 0x30f;
145 udelay(100); 205 udelay(100);
146 206
147 omap_cfg_reg(W4__24XX_GPIO74); 207 omap_cfg_reg(W4__24XX_GPIO74);
148 if (omap_request_gpio(APOLLON_ETHR_GPIO_IRQ) < 0) { 208 if (omap_request_gpio(APOLLON_ETHR_GPIO_IRQ) < 0) {
149 printk(KERN_ERR "Failed to request GPIO%d for smc91x IRQ\n", 209 printk(KERN_ERR "Failed to request GPIO%d for smc91x IRQ\n",
150 APOLLON_ETHR_GPIO_IRQ); 210 APOLLON_ETHR_GPIO_IRQ);
211 gpmc_cs_free(APOLLON_ETH_CS);
151 return; 212 return;
152 } 213 }
153 omap_set_gpio_direction(APOLLON_ETHR_GPIO_IRQ, 1); 214 omap_set_gpio_direction(APOLLON_ETHR_GPIO_IRQ, 1);
@@ -175,6 +236,13 @@ static struct omap_mmc_config apollon_mmc_config __initdata = {
175 }, 236 },
176}; 237};
177 238
239static struct omap_usb_config apollon_usb_config __initdata = {
240 .register_dev = 1,
241 .hmc_mode = 0x14, /* 0:dev 1:host1 2:disable */
242
243 .pins[0] = 6,
244};
245
178static struct omap_lcd_config apollon_lcd_config __initdata = { 246static struct omap_lcd_config apollon_lcd_config __initdata = {
179 .ctrl_name = "internal", 247 .ctrl_name = "internal",
180}; 248};
@@ -182,6 +250,7 @@ static struct omap_lcd_config apollon_lcd_config __initdata = {
182static struct omap_board_config_kernel apollon_config[] = { 250static struct omap_board_config_kernel apollon_config[] = {
183 { OMAP_TAG_UART, &apollon_uart_config }, 251 { OMAP_TAG_UART, &apollon_uart_config },
184 { OMAP_TAG_MMC, &apollon_mmc_config }, 252 { OMAP_TAG_MMC, &apollon_mmc_config },
253 { OMAP_TAG_USB, &apollon_usb_config },
185 { OMAP_TAG_LCD, &apollon_lcd_config }, 254 { OMAP_TAG_LCD, &apollon_lcd_config },
186}; 255};
187 256
@@ -250,10 +319,22 @@ static void __init apollon_sw_init(void)
250 return; 319 return;
251} 320}
252 321
322static void __init apollon_usb_init(void)
323{
324 /* USB device */
325 /* DEVICE_SUSPEND */
326 omap_cfg_reg(P21_242X_GPIO12);
327 omap_request_gpio(12);
328 omap_set_gpio_direction(12, 0); /* OUT */
329 omap_set_gpio_dataout(12, 0);
330}
331
253static void __init omap_apollon_init(void) 332static void __init omap_apollon_init(void)
254{ 333{
255 apollon_led_init(); 334 apollon_led_init();
256 apollon_sw_init(); 335 apollon_sw_init();
336 apollon_flash_init();
337 apollon_usb_init();
257 338
258 /* REVISIT: where's the correct place */ 339 /* REVISIT: where's the correct place */
259 omap_cfg_reg(W19_24XX_SYS_NIRQ); 340 omap_cfg_reg(W19_24XX_SYS_NIRQ);
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index 452193f01531..f125f432cc3e 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -131,26 +131,6 @@ static struct platform_device h4_flash_device = {
131 .resource = &h4_flash_resource, 131 .resource = &h4_flash_resource,
132}; 132};
133 133
134static struct resource h4_smc91x_resources[] = {
135 [0] = {
136 .start = OMAP24XX_ETHR_START, /* Physical */
137 .end = OMAP24XX_ETHR_START + 0xf,
138 .flags = IORESOURCE_MEM,
139 },
140 [1] = {
141 .start = OMAP_GPIO_IRQ(OMAP24XX_ETHR_GPIO_IRQ),
142 .end = OMAP_GPIO_IRQ(OMAP24XX_ETHR_GPIO_IRQ),
143 .flags = IORESOURCE_IRQ,
144 },
145};
146
147static struct platform_device h4_smc91x_device = {
148 .name = "smc91x",
149 .id = -1,
150 .num_resources = ARRAY_SIZE(h4_smc91x_resources),
151 .resource = h4_smc91x_resources,
152};
153
154/* Select between the IrDA and aGPS module 134/* Select between the IrDA and aGPS module
155 */ 135 */
156static int h4_select_irda(struct device *dev, int state) 136static int h4_select_irda(struct device *dev, int state)
@@ -266,29 +246,14 @@ static struct platform_device h4_lcd_device = {
266 .id = -1, 246 .id = -1,
267}; 247};
268 248
269static struct resource h4_led_resources[] = {
270 [0] = {
271 .flags = IORESOURCE_MEM,
272 },
273};
274
275static struct platform_device h4_led_device = {
276 .name = "omap_dbg_led",
277 .id = -1,
278 .num_resources = ARRAY_SIZE(h4_led_resources),
279 .resource = h4_led_resources,
280};
281
282static struct platform_device *h4_devices[] __initdata = { 249static struct platform_device *h4_devices[] __initdata = {
283 &h4_smc91x_device,
284 &h4_flash_device, 250 &h4_flash_device,
285 &h4_irda_device, 251 &h4_irda_device,
286 &h4_kp_device, 252 &h4_kp_device,
287 &h4_lcd_device, 253 &h4_lcd_device,
288 &h4_led_device,
289}; 254};
290 255
291static inline void __init h4_init_smc91x(void) 256static inline void __init h4_init_debug(void)
292{ 257{
293 /* Make sure CS1 timings are correct */ 258 /* Make sure CS1 timings are correct */
294 GPMC_CONFIG1_1 = 0x00011200; 259 GPMC_CONFIG1_1 = 0x00011200;
@@ -301,12 +266,8 @@ static inline void __init h4_init_smc91x(void)
301 udelay(100); 266 udelay(100);
302 267
303 omap_cfg_reg(M15_24XX_GPIO92); 268 omap_cfg_reg(M15_24XX_GPIO92);
304 if (omap_request_gpio(OMAP24XX_ETHR_GPIO_IRQ) < 0) { 269 if (debug_card_init(cs_mem_base, OMAP24XX_ETHR_GPIO_IRQ) < 0)
305 printk(KERN_ERR "Failed to request GPIO%d for smc91x IRQ\n", 270 gpmc_cs_free(eth_cs);
306 OMAP24XX_ETHR_GPIO_IRQ);
307 return;
308 }
309 omap_set_gpio_direction(OMAP24XX_ETHR_GPIO_IRQ, 1);
310} 271}
311 272
312static void __init omap_h4_init_irq(void) 273static void __init omap_h4_init_irq(void)
@@ -314,7 +275,6 @@ static void __init omap_h4_init_irq(void)
314 omap2_init_common_hw(); 275 omap2_init_common_hw();
315 omap_init_irq(); 276 omap_init_irq();
316 omap_gpio_init(); 277 omap_gpio_init();
317 h4_init_smc91x();
318} 278}
319 279
320static struct omap_uart_config h4_uart_config __initdata = { 280static struct omap_uart_config h4_uart_config __initdata = {
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 52ec2f2d6360..b603bc5f8e5b 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -55,8 +55,10 @@ static void omap_init_i2c(void)
55 if (machine_is_omap_h4()) 55 if (machine_is_omap_h4())
56 return; 56 return;
57 57
58 omap_cfg_reg(J15_24XX_I2C2_SCL); 58 if (!cpu_is_omap2430()) {
59 omap_cfg_reg(H19_24XX_I2C2_SDA); 59 omap_cfg_reg(J15_24XX_I2C2_SCL);
60 omap_cfg_reg(H19_24XX_I2C2_SDA);
61 }
60 (void) platform_device_register(&omap_i2c_device2); 62 (void) platform_device_register(&omap_i2c_device2);
61} 63}
62 64
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index e290b989aa94..5a4cc2076a7d 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -22,7 +22,14 @@
22 22
23#undef DEBUG 23#undef DEBUG
24 24
25#ifdef CONFIG_ARCH_OMAP2420
25#define GPMC_BASE 0x6800a000 26#define GPMC_BASE 0x6800a000
27#endif
28
29#ifdef CONFIG_ARCH_OMAP2430
30#define GPMC_BASE 0x6E000000
31#endif
32
26#define GPMC_REVISION 0x00 33#define GPMC_REVISION 0x00
27#define GPMC_SYSCONFIG 0x10 34#define GPMC_SYSCONFIG 0x10
28#define GPMC_SYSSTATUS 0x14 35#define GPMC_SYSSTATUS 0x14
@@ -88,7 +95,7 @@ u32 gpmc_cs_read_reg(int cs, int idx)
88} 95}
89 96
90/* TODO: Add support for gpmc_fck to clock framework and use it */ 97/* TODO: Add support for gpmc_fck to clock framework and use it */
91static unsigned long gpmc_get_fclk_period(void) 98unsigned long gpmc_get_fclk_period(void)
92{ 99{
93 /* In picoseconds */ 100 /* In picoseconds */
94 return 1000000000 / ((clk_get_rate(gpmc_l3_clk)) / 1000); 101 return 1000000000 / ((clk_get_rate(gpmc_l3_clk)) / 1000);
@@ -104,6 +111,13 @@ unsigned int gpmc_ns_to_ticks(unsigned int time_ns)
104 return (time_ns * 1000 + tick_ps - 1) / tick_ps; 111 return (time_ns * 1000 + tick_ps - 1) / tick_ps;
105} 112}
106 113
114unsigned int gpmc_round_ns_to_ticks(unsigned int time_ns)
115{
116 unsigned long ticks = gpmc_ns_to_ticks(time_ns);
117
118 return ticks * gpmc_get_fclk_period() / 1000;
119}
120
107#ifdef DEBUG 121#ifdef DEBUG
108static int set_gpmc_timing_reg(int cs, int reg, int st_bit, int end_bit, 122static int set_gpmc_timing_reg(int cs, int reg, int st_bit, int end_bit,
109 int time, const char *name) 123 int time, const char *name)
@@ -120,15 +134,21 @@ static int set_gpmc_timing_reg(int cs, int reg, int st_bit, int end_bit,
120 else 134 else
121 ticks = gpmc_ns_to_ticks(time); 135 ticks = gpmc_ns_to_ticks(time);
122 nr_bits = end_bit - st_bit + 1; 136 nr_bits = end_bit - st_bit + 1;
123 if (ticks >= 1 << nr_bits) 137 if (ticks >= 1 << nr_bits) {
138#ifdef DEBUG
139 printk(KERN_INFO "GPMC CS%d: %-10s* %3d ns, %3d ticks >= %d\n",
140 cs, name, time, ticks, 1 << nr_bits);
141#endif
124 return -1; 142 return -1;
143 }
125 144
126 mask = (1 << nr_bits) - 1; 145 mask = (1 << nr_bits) - 1;
127 l = gpmc_cs_read_reg(cs, reg); 146 l = gpmc_cs_read_reg(cs, reg);
128#ifdef DEBUG 147#ifdef DEBUG
129 printk(KERN_INFO "GPMC CS%d: %-10s: %d ticks, %3lu ns (was %i ticks)\n", 148 printk(KERN_INFO
149 "GPMC CS%d: %-10s: %3d ticks, %3lu ns (was %3i ticks) %3d ns\n",
130 cs, name, ticks, gpmc_get_fclk_period() * ticks / 1000, 150 cs, name, ticks, gpmc_get_fclk_period() * ticks / 1000,
131 (l >> st_bit) & mask); 151 (l >> st_bit) & mask, time);
132#endif 152#endif
133 l &= ~(mask << st_bit); 153 l &= ~(mask << st_bit);
134 l |= ticks << st_bit; 154 l |= ticks << st_bit;
@@ -157,7 +177,7 @@ int gpmc_cs_calc_divider(int cs, unsigned int sync_clk)
157 div = l / gpmc_get_fclk_period(); 177 div = l / gpmc_get_fclk_period();
158 if (div > 4) 178 if (div > 4)
159 return -1; 179 return -1;
160 if (div < 0) 180 if (div <= 0)
161 div = 1; 181 div = 1;
162 182
163 return div; 183 return div;
@@ -191,14 +211,19 @@ int gpmc_cs_set_timings(int cs, const struct gpmc_timings *t)
191 211
192 GPMC_SET_ONE(GPMC_CS_CONFIG5, 24, 27, page_burst_access); 212 GPMC_SET_ONE(GPMC_CS_CONFIG5, 24, 27, page_burst_access);
193 213
214 /* caller is expected to have initialized CONFIG1 to cover
215 * at least sync vs async
216 */
217 l = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG1);
218 if (l & (GPMC_CONFIG1_READTYPE_SYNC | GPMC_CONFIG1_WRITETYPE_SYNC)) {
194#ifdef DEBUG 219#ifdef DEBUG
195 printk(KERN_INFO "GPMC CS%d CLK period is %lu (div %d)\n", 220 printk(KERN_INFO "GPMC CS%d CLK period is %lu ns (div %d)\n",
196 cs, gpmc_get_fclk_period(), div); 221 cs, (div * gpmc_get_fclk_period()) / 1000, div);
197#endif 222#endif
198 223 l &= ~0x03;
199 l = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG1); 224 l |= (div - 1);
200 l &= ~0x03; 225 gpmc_cs_write_reg(cs, GPMC_CS_CONFIG1, l);
201 l |= (div - 1); 226 }
202 227
203 return 0; 228 return 0;
204} 229}
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 871ace4fccb8..4dfd878d7968 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -17,7 +17,13 @@
17 17
18#include <asm/io.h> 18#include <asm/io.h>
19 19
20#if defined(CONFIG_ARCH_OMAP2420)
20#define OMAP24XX_TAP_BASE io_p2v(0x48014000) 21#define OMAP24XX_TAP_BASE io_p2v(0x48014000)
22#endif
23
24#if defined(CONFIG_ARCH_OMAP2430)
25#define OMAP24XX_TAP_BASE io_p2v(0x4900A000)
26#endif
21 27
22#define OMAP_TAP_IDCODE 0x0204 28#define OMAP_TAP_IDCODE 0x0204
23#define OMAP_TAP_PROD_ID 0x0208 29#define OMAP_TAP_PROD_ID 0x0208
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 82dc70f6b779..5a4091f582ed 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -5,6 +5,7 @@
5 * 5 *
6 * Copyright (C) 2005 Nokia Corporation 6 * Copyright (C) 2005 Nokia Corporation
7 * Author: Juha Yrjölä <juha.yrjola@nokia.com> 7 * Author: Juha Yrjölä <juha.yrjola@nokia.com>
8 * Updated map desc to add 2430 support : <x0khasim@ti.com>
8 * 9 *
9 * This program is free software; you can redistribute it and/or modify 10 * 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 * it under the terms of the GNU General Public License version 2 as
@@ -26,6 +27,7 @@
26extern void omap_sram_init(void); 27extern void omap_sram_init(void);
27extern int omap2_clk_init(void); 28extern int omap2_clk_init(void);
28extern void omap2_check_revision(void); 29extern void omap2_check_revision(void);
30extern void omap2_init_memory(void);
29extern void gpmc_init(void); 31extern void gpmc_init(void);
30extern void omapfb_reserve_sdram(void); 32extern void omapfb_reserve_sdram(void);
31 33
@@ -40,6 +42,20 @@ static struct map_desc omap2_io_desc[] __initdata = {
40 .length = L3_24XX_SIZE, 42 .length = L3_24XX_SIZE,
41 .type = MT_DEVICE 43 .type = MT_DEVICE
42 }, 44 },
45#ifdef CONFIG_ARCH_OMAP2430
46 {
47 .virtual = L4_WK_243X_VIRT,
48 .pfn = __phys_to_pfn(L4_WK_243X_PHYS),
49 .length = L4_WK_243X_SIZE,
50 .type = MT_DEVICE
51 },
52 {
53 .virtual = OMAP243X_GPMC_VIRT,
54 .pfn = __phys_to_pfn(OMAP243X_GPMC_PHYS),
55 .length = OMAP243X_GPMC_SIZE,
56 .type = MT_DEVICE
57 },
58#endif
43 { 59 {
44 .virtual = DSP_MEM_24XX_VIRT, 60 .virtual = DSP_MEM_24XX_VIRT,
45 .pfn = __phys_to_pfn(DSP_MEM_24XX_PHYS), 61 .pfn = __phys_to_pfn(DSP_MEM_24XX_PHYS),
@@ -80,5 +96,11 @@ void __init omap2_init_common_hw(void)
80{ 96{
81 omap2_mux_init(); 97 omap2_mux_init();
82 omap2_clk_init(); 98 omap2_clk_init();
99/*
100 * Need to Fix this for 2430
101 */
102#ifndef CONFIG_ARCH_OMAP2430
103 omap2_init_memory();
104#endif
83 gpmc_init(); 105 gpmc_init();
84} 106}
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index a39d30680300..f064f725e724 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -37,7 +37,7 @@ static struct omap_irq_bank {
37} __attribute__ ((aligned(4))) irq_banks[] = { 37} __attribute__ ((aligned(4))) irq_banks[] = {
38 { 38 {
39 /* MPU INTC */ 39 /* MPU INTC */
40 .base_reg = OMAP24XX_IC_BASE, 40 .base_reg = IO_ADDRESS(OMAP24XX_IC_BASE),
41 .nr_irqs = 96, 41 .nr_irqs = 96,
42 }, { 42 }, {
43 /* XXX: DSP INTC */ 43 /* XXX: DSP INTC */
@@ -47,7 +47,7 @@ static struct omap_irq_bank {
47/* XXX: FIQ and additional INTC support (only MPU at the moment) */ 47/* XXX: FIQ and additional INTC support (only MPU at the moment) */
48static void omap_ack_irq(unsigned int irq) 48static void omap_ack_irq(unsigned int irq)
49{ 49{
50 omap_writel(0x1, irq_banks[0].base_reg + INTC_CONTROL); 50 __raw_writel(0x1, irq_banks[0].base_reg + INTC_CONTROL);
51} 51}
52 52
53static void omap_mask_irq(unsigned int irq) 53static void omap_mask_irq(unsigned int irq)
@@ -60,7 +60,7 @@ static void omap_mask_irq(unsigned int irq)
60 irq %= 32; 60 irq %= 32;
61 } 61 }
62 62
63 omap_writel(1 << irq, irq_banks[0].base_reg + INTC_MIR_SET0 + offset); 63 __raw_writel(1 << irq, irq_banks[0].base_reg + INTC_MIR_SET0 + offset);
64} 64}
65 65
66static void omap_unmask_irq(unsigned int irq) 66static void omap_unmask_irq(unsigned int irq)
@@ -73,7 +73,7 @@ static void omap_unmask_irq(unsigned int irq)
73 irq %= 32; 73 irq %= 32;
74 } 74 }
75 75
76 omap_writel(1 << irq, irq_banks[0].base_reg + INTC_MIR_CLEAR0 + offset); 76 __raw_writel(1 << irq, irq_banks[0].base_reg + INTC_MIR_CLEAR0 + offset);
77} 77}
78 78
79static void omap_mask_ack_irq(unsigned int irq) 79static void omap_mask_ack_irq(unsigned int irq)
@@ -93,17 +93,20 @@ static void __init omap_irq_bank_init_one(struct omap_irq_bank *bank)
93{ 93{
94 unsigned long tmp; 94 unsigned long tmp;
95 95
96 tmp = omap_readl(bank->base_reg + INTC_REVISION) & 0xff; 96 tmp = __raw_readl(bank->base_reg + INTC_REVISION) & 0xff;
97 printk(KERN_INFO "IRQ: Found an INTC at 0x%08lx " 97 printk(KERN_INFO "IRQ: Found an INTC at 0x%08lx "
98 "(revision %ld.%ld) with %d interrupts\n", 98 "(revision %ld.%ld) with %d interrupts\n",
99 bank->base_reg, tmp >> 4, tmp & 0xf, bank->nr_irqs); 99 bank->base_reg, tmp >> 4, tmp & 0xf, bank->nr_irqs);
100 100
101 tmp = omap_readl(bank->base_reg + INTC_SYSCONFIG); 101 tmp = __raw_readl(bank->base_reg + INTC_SYSCONFIG);
102 tmp |= 1 << 1; /* soft reset */ 102 tmp |= 1 << 1; /* soft reset */
103 omap_writel(tmp, bank->base_reg + INTC_SYSCONFIG); 103 __raw_writel(tmp, bank->base_reg + INTC_SYSCONFIG);
104 104
105 while (!(omap_readl(bank->base_reg + INTC_SYSSTATUS) & 0x1)) 105 while (!(__raw_readl(bank->base_reg + INTC_SYSSTATUS) & 0x1))
106 /* Wait for reset to complete */; 106 /* Wait for reset to complete */;
107
108 /* Enable autoidle */
109 __raw_writel(1 << 0, bank->base_reg + INTC_SYSCONFIG);
107} 110}
108 111
109void __init omap_init_irq(void) 112void __init omap_init_irq(void)
diff --git a/arch/arm/mach-omap2/memory.c b/arch/arm/mach-omap2/memory.c
index 85cbc2a2e663..3e5d8cd4ea4f 100644
--- a/arch/arm/mach-omap2/memory.c
+++ b/arch/arm/mach-omap2/memory.c
@@ -30,6 +30,7 @@
30#include "prcm-regs.h" 30#include "prcm-regs.h"
31#include "memory.h" 31#include "memory.h"
32 32
33
33static struct memory_timings mem_timings; 34static struct memory_timings mem_timings;
34 35
35u32 omap2_memory_get_slow_dll_ctrl(void) 36u32 omap2_memory_get_slow_dll_ctrl(void)
@@ -99,3 +100,20 @@ void omap2_init_memory_params(u32 force_lock_to_unlock_mode)
99 /* 90 degree phase for anything below 133Mhz + disable DLL filter */ 100 /* 90 degree phase for anything below 133Mhz + disable DLL filter */
100 mem_timings.slow_dll_ctrl |= ((1 << 1) | (3 << 8)); 101 mem_timings.slow_dll_ctrl |= ((1 << 1) | (3 << 8));
101} 102}
103
104/* turn on smart idle modes for SDRAM scheduler and controller */
105void __init omap2_init_memory(void)
106{
107 u32 l;
108
109 l = SMS_SYSCONFIG;
110 l &= ~(0x3 << 3);
111 l |= (0x2 << 3);
112 SMS_SYSCONFIG = l;
113
114 l = SDRC_SYSCONFIG;
115 l &= ~(0x3 << 3);
116 l |= (0x2 << 3);
117 SDRC_SYSCONFIG = l;
118
119}
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index 0439906d5da7..05750975d746 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -53,8 +53,8 @@ MUX_CFG_24XX("W19_24XX_SYS_NIRQ", 0x12c, 0, 1, 1, 1)
53MUX_CFG_24XX("W14_24XX_SYS_CLKOUT", 0x137, 0, 1, 1, 1) 53MUX_CFG_24XX("W14_24XX_SYS_CLKOUT", 0x137, 0, 1, 1, 1)
54 54
55/* 24xx GPMC chipselects, wait pin monitoring */ 55/* 24xx GPMC chipselects, wait pin monitoring */
56MUX_CFG_24XX("E2_GPMC_NCS2", 0x08e, 0, 1, 1, 1) 56MUX_CFG_24XX("E2_GPMC_NCS2", 0x08e, 0, 1, 1, 1)
57MUX_CFG_24XX("L2_GPMC_NCS7", 0x093, 0, 1, 1, 1) 57MUX_CFG_24XX("L2_GPMC_NCS7", 0x093, 0, 1, 1, 1)
58MUX_CFG_24XX("L3_GPMC_WAIT0", 0x09a, 0, 1, 1, 1) 58MUX_CFG_24XX("L3_GPMC_WAIT0", 0x09a, 0, 1, 1, 1)
59MUX_CFG_24XX("N7_GPMC_WAIT1", 0x09b, 0, 1, 1, 1) 59MUX_CFG_24XX("N7_GPMC_WAIT1", 0x09b, 0, 1, 1, 1)
60MUX_CFG_24XX("M1_GPMC_WAIT2", 0x09c, 0, 1, 1, 1) 60MUX_CFG_24XX("M1_GPMC_WAIT2", 0x09c, 0, 1, 1, 1)
@@ -67,18 +67,18 @@ MUX_CFG_24XX("W15_24XX_MCBSP2_DR", 0x126, 1, 1, 0, 1)
67MUX_CFG_24XX("V15_24XX_MCBSP2_DX", 0x127, 1, 1, 0, 1) 67MUX_CFG_24XX("V15_24XX_MCBSP2_DX", 0x127, 1, 1, 0, 1)
68 68
69/* 24xx GPIO */ 69/* 24xx GPIO */
70MUX_CFG_24XX("M21_242X_GPIO11", 0x0c9, 3, 1, 1, 1) 70MUX_CFG_24XX("M21_242X_GPIO11", 0x0c9, 3, 1, 1, 1)
71MUX_CFG_24XX("P21_242X_GPIO12", 0x0ca, 3, 0, 0, 1) 71MUX_CFG_24XX("P21_242X_GPIO12", 0x0ca, 3, 0, 0, 1)
72MUX_CFG_24XX("AA10_242X_GPIO13", 0x0e5, 3, 0, 0, 1) 72MUX_CFG_24XX("AA10_242X_GPIO13", 0x0e5, 3, 0, 0, 1)
73MUX_CFG_24XX("AA6_242X_GPIO14", 0x0e6, 3, 0, 0, 1) 73MUX_CFG_24XX("AA6_242X_GPIO14", 0x0e6, 3, 0, 0, 1)
74MUX_CFG_24XX("AA4_242X_GPIO15", 0x0e7, 3, 0, 0, 1) 74MUX_CFG_24XX("AA4_242X_GPIO15", 0x0e7, 3, 0, 0, 1)
75MUX_CFG_24XX("Y11_242X_GPIO16", 0x0e8, 3, 0, 0, 1) 75MUX_CFG_24XX("Y11_242X_GPIO16", 0x0e8, 3, 0, 0, 1)
76MUX_CFG_24XX("AA12_242X_GPIO17", 0x0e9, 3, 0, 0, 1) 76MUX_CFG_24XX("AA12_242X_GPIO17", 0x0e9, 3, 0, 0, 1)
77MUX_CFG_24XX("AA8_242X_GPIO58", 0x0ea, 3, 0, 0, 1) 77MUX_CFG_24XX("AA8_242X_GPIO58", 0x0ea, 3, 0, 0, 1)
78MUX_CFG_24XX("Y20_24XX_GPIO60", 0x12c, 3, 0, 0, 1) 78MUX_CFG_24XX("Y20_24XX_GPIO60", 0x12c, 3, 0, 0, 1)
79MUX_CFG_24XX("W4__24XX_GPIO74", 0x0f2, 3, 0, 0, 1) 79MUX_CFG_24XX("W4__24XX_GPIO74", 0x0f2, 3, 0, 0, 1)
80MUX_CFG_24XX("M15_24XX_GPIO92", 0x10a, 3, 0, 0, 1) 80MUX_CFG_24XX("M15_24XX_GPIO92", 0x10a, 3, 0, 0, 1)
81MUX_CFG_24XX("J15_24XX_GPIO99", 0x113, 3, 1, 1, 1) 81MUX_CFG_24XX("J15_24XX_GPIO99", 0x113, 3, 1, 1, 1)
82MUX_CFG_24XX("V14_24XX_GPIO117", 0x128, 3, 1, 0, 1) 82MUX_CFG_24XX("V14_24XX_GPIO117", 0x128, 3, 1, 0, 1)
83MUX_CFG_24XX("P14_24XX_GPIO125", 0x140, 3, 1, 1, 1) 83MUX_CFG_24XX("P14_24XX_GPIO125", 0x140, 3, 1, 1, 1)
84 84
@@ -95,17 +95,17 @@ MUX_CFG_24XX("T3_242X_GPIO55", 0xd9, 3, 0, 0, 1)
95MUX_CFG_24XX("U2_242X_GPIO56", 0xda, 3, 0, 0, 1) 95MUX_CFG_24XX("U2_242X_GPIO56", 0xda, 3, 0, 0, 1)
96 96
97/* 24xx external DMA requests */ 97/* 24xx external DMA requests */
98MUX_CFG_24XX("AA10_242X_DMAREQ0", 0x0e5, 2, 0, 0, 1) 98MUX_CFG_24XX("AA10_242X_DMAREQ0", 0x0e5, 2, 0, 0, 1)
99MUX_CFG_24XX("AA6_242X_DMAREQ1", 0x0e6, 2, 0, 0, 1) 99MUX_CFG_24XX("AA6_242X_DMAREQ1", 0x0e6, 2, 0, 0, 1)
100MUX_CFG_24XX("E4_242X_DMAREQ2", 0x074, 2, 0, 0, 1) 100MUX_CFG_24XX("E4_242X_DMAREQ2", 0x074, 2, 0, 0, 1)
101MUX_CFG_24XX("G4_242X_DMAREQ3", 0x073, 2, 0, 0, 1) 101MUX_CFG_24XX("G4_242X_DMAREQ3", 0x073, 2, 0, 0, 1)
102MUX_CFG_24XX("D3_242X_DMAREQ4", 0x072, 2, 0, 0, 1) 102MUX_CFG_24XX("D3_242X_DMAREQ4", 0x072, 2, 0, 0, 1)
103MUX_CFG_24XX("E3_242X_DMAREQ5", 0x071, 2, 0, 0, 1) 103MUX_CFG_24XX("E3_242X_DMAREQ5", 0x071, 2, 0, 0, 1)
104 104
105/* TSC IRQ */ 105/* TSC IRQ */
106MUX_CFG_24XX("P20_24XX_TSC_IRQ", 0x108, 0, 0, 0, 1) 106MUX_CFG_24XX("P20_24XX_TSC_IRQ", 0x108, 0, 0, 0, 1)
107 107
108/* UART3 */ 108/* UART3 */
109MUX_CFG_24XX("K15_24XX_UART3_TX", 0x118, 0, 0, 0, 1) 109MUX_CFG_24XX("K15_24XX_UART3_TX", 0x118, 0, 0, 0, 1)
110MUX_CFG_24XX("K14_24XX_UART3_RX", 0x119, 0, 0, 0, 1) 110MUX_CFG_24XX("K14_24XX_UART3_RX", 0x119, 0, 0, 0, 1)
111 111
diff --git a/arch/arm/mach-omap2/usb-tusb6010.c b/arch/arm/mach-omap2/usb-tusb6010.c
new file mode 100644
index 000000000000..80bb42eb5082
--- /dev/null
+++ b/arch/arm/mach-omap2/usb-tusb6010.c
@@ -0,0 +1,349 @@
1/*
2 * linux/arch/arm/mach-omap2/usb-tusb6010.c
3 *
4 * Copyright (C) 2006 Nokia Corporation
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/types.h>
12#include <linux/errno.h>
13#include <linux/delay.h>
14#include <linux/platform_device.h>
15
16#include <linux/usb/musb.h>
17
18#include <asm/arch/gpmc.h>
19#include <asm/arch/gpio.h>
20#include <asm/arch/mux.h>
21
22
23static u8 async_cs, sync_cs;
24static unsigned refclk_psec;
25
26
27/* t2_ps, when quantized to fclk units, must happen no earlier than
28 * the clock after after t1_NS.
29 *
30 * Return a possibly updated value of t2_ps, converted to nsec.
31 */
32static unsigned
33next_clk(unsigned t1_NS, unsigned t2_ps, unsigned fclk_ps)
34{
35 unsigned t1_ps = t1_NS * 1000;
36 unsigned t1_f, t2_f;
37
38 if ((t1_ps + fclk_ps) < t2_ps)
39 return t2_ps / 1000;
40
41 t1_f = (t1_ps + fclk_ps - 1) / fclk_ps;
42 t2_f = (t2_ps + fclk_ps - 1) / fclk_ps;
43
44 if (t1_f >= t2_f)
45 t2_f = t1_f + 1;
46
47 return (t2_f * fclk_ps) / 1000;
48}
49
50/* NOTE: timings are from tusb 6010 datasheet Rev 1.8, 12-Sept 2006 */
51
52static int tusb_set_async_mode(unsigned sysclk_ps, unsigned fclk_ps)
53{
54 struct gpmc_timings t;
55 unsigned t_acsnh_advnh = sysclk_ps + 3000;
56 unsigned tmp;
57
58 memset(&t, 0, sizeof(t));
59
60 /* CS_ON = t_acsnh_acsnl */
61 t.cs_on = 8;
62 /* ADV_ON = t_acsnh_advnh - t_advn */
63 t.adv_on = next_clk(t.cs_on, t_acsnh_advnh - 7000, fclk_ps);
64
65 /*
66 * READ ... from omap2420 TRM fig 12-13
67 */
68
69 /* ADV_RD_OFF = t_acsnh_advnh */
70 t.adv_rd_off = next_clk(t.adv_on, t_acsnh_advnh, fclk_ps);
71
72 /* OE_ON = t_acsnh_advnh + t_advn_oen (then wait for nRDY) */
73 t.oe_on = next_clk(t.adv_on, t_acsnh_advnh + 1000, fclk_ps);
74
75 /* ACCESS = counters continue only after nRDY */
76 tmp = t.oe_on * 1000 + 300;
77 t.access = next_clk(t.oe_on, tmp, fclk_ps);
78
79 /* OE_OFF = after data gets sampled */
80 tmp = t.access * 1000;
81 t.oe_off = next_clk(t.access, tmp, fclk_ps);
82
83 t.cs_rd_off = t.oe_off;
84
85 tmp = t.cs_rd_off * 1000 + 7000 /* t_acsn_rdy_z */;
86 t.rd_cycle = next_clk(t.cs_rd_off, tmp, fclk_ps);
87
88 /*
89 * WRITE ... from omap2420 TRM fig 12-15
90 */
91
92 /* ADV_WR_OFF = t_acsnh_advnh */
93 t.adv_wr_off = t.adv_rd_off;
94
95 /* WE_ON = t_acsnh_advnh + t_advn_wen (then wait for nRDY) */
96 t.we_on = next_clk(t.adv_wr_off, t_acsnh_advnh + 1000, fclk_ps);
97
98 /* WE_OFF = after data gets sampled */
99 tmp = t.we_on * 1000 + 300;
100 t.we_off = next_clk(t.we_on, tmp, fclk_ps);
101
102 t.cs_wr_off = t.we_off;
103
104 tmp = t.cs_wr_off * 1000 + 7000 /* t_acsn_rdy_z */;
105 t.wr_cycle = next_clk(t.cs_wr_off, tmp, fclk_ps);
106
107 return gpmc_cs_set_timings(async_cs, &t);
108}
109
110static int tusb_set_sync_mode(unsigned sysclk_ps, unsigned fclk_ps)
111{
112 struct gpmc_timings t;
113 unsigned t_scsnh_advnh = sysclk_ps + 3000;
114 unsigned tmp;
115
116 memset(&t, 0, sizeof(t));
117 t.cs_on = 8;
118
119 /* ADV_ON = t_acsnh_advnh - t_advn */
120 t.adv_on = next_clk(t.cs_on, t_scsnh_advnh - 7000, fclk_ps);
121
122 /* GPMC_CLK rate = fclk rate / div */
123 t.sync_clk = 12 /* 11.1 nsec */;
124 tmp = (t.sync_clk * 1000 + fclk_ps - 1) / fclk_ps;
125 if (tmp > 4)
126 return -ERANGE;
127 if (tmp <= 0)
128 tmp = 1;
129 t.page_burst_access = (fclk_ps * tmp) / 1000;
130
131 /*
132 * READ ... based on omap2420 TRM fig 12-19, 12-20
133 */
134
135 /* ADV_RD_OFF = t_scsnh_advnh */
136 t.adv_rd_off = next_clk(t.adv_on, t_scsnh_advnh, fclk_ps);
137
138 /* OE_ON = t_scsnh_advnh + t_advn_oen * fclk_ps (then wait for nRDY) */
139 tmp = (t.adv_rd_off * 1000) + (3 * fclk_ps);
140 t.oe_on = next_clk(t.adv_on, tmp, fclk_ps);
141
142 /* ACCESS = number of clock cycles after t_adv_eon */
143 tmp = (t.oe_on * 1000) + (5 * fclk_ps);
144 t.access = next_clk(t.oe_on, tmp, fclk_ps);
145
146 /* OE_OFF = after data gets sampled */
147 tmp = (t.access * 1000) + (1 * fclk_ps);
148 t.oe_off = next_clk(t.access, tmp, fclk_ps);
149
150 t.cs_rd_off = t.oe_off;
151
152 tmp = t.cs_rd_off * 1000 + 7000 /* t_scsn_rdy_z */;
153 t.rd_cycle = next_clk(t.cs_rd_off, tmp, fclk_ps);
154
155 /*
156 * WRITE ... based on omap2420 TRM fig 12-21
157 */
158
159 /* ADV_WR_OFF = t_scsnh_advnh */
160 t.adv_wr_off = t.adv_rd_off;
161
162 /* WE_ON = t_scsnh_advnh + t_advn_wen * fclk_ps (then wait for nRDY) */
163 tmp = (t.adv_wr_off * 1000) + (3 * fclk_ps);
164 t.we_on = next_clk(t.adv_wr_off, tmp, fclk_ps);
165
166 /* WE_OFF = number of clock cycles after t_adv_wen */
167 tmp = (t.we_on * 1000) + (6 * fclk_ps);
168 t.we_off = next_clk(t.we_on, tmp, fclk_ps);
169
170 t.cs_wr_off = t.we_off;
171
172 tmp = t.cs_wr_off * 1000 + 7000 /* t_scsn_rdy_z */;
173 t.wr_cycle = next_clk(t.cs_wr_off, tmp, fclk_ps);
174
175 return gpmc_cs_set_timings(sync_cs, &t);
176}
177
178extern unsigned long gpmc_get_fclk_period(void);
179
180/* tusb driver calls this when it changes the chip's clocking */
181int tusb6010_platform_retime(unsigned is_refclk)
182{
183 static const char error[] =
184 KERN_ERR "tusb6010 %s retime error %d\n";
185
186 unsigned fclk_ps = gpmc_get_fclk_period();
187 unsigned sysclk_ps;
188 int status;
189
190 if (!refclk_psec)
191 return -ENODEV;
192
193 sysclk_ps = is_refclk ? refclk_psec : TUSB6010_OSCCLK_60;
194
195 status = tusb_set_async_mode(sysclk_ps, fclk_ps);
196 if (status < 0) {
197 printk(error, "async", status);
198 goto done;
199 }
200 status = tusb_set_sync_mode(sysclk_ps, fclk_ps);
201 if (status < 0)
202 printk(error, "sync", status);
203done:
204 return status;
205}
206EXPORT_SYMBOL_GPL(tusb6010_platform_retime);
207
208static struct resource tusb_resources[] = {
209 /* Order is significant! The start/end fields
210 * are updated during setup..
211 */
212 { /* Asynchronous access */
213 .flags = IORESOURCE_MEM,
214 },
215 { /* Synchronous access */
216 .flags = IORESOURCE_MEM,
217 },
218 { /* IRQ */
219 .flags = IORESOURCE_IRQ,
220 },
221};
222
223static u64 tusb_dmamask = ~(u32)0;
224
225static struct platform_device tusb_device = {
226 .name = "musb_hdrc",
227 .id = -1,
228 .dev = {
229 .dma_mask = &tusb_dmamask,
230 .coherent_dma_mask = 0xffffffff,
231 },
232 .num_resources = ARRAY_SIZE(tusb_resources),
233 .resource = tusb_resources,
234};
235
236
237/* this may be called only from board-*.c setup code */
238int __init
239tusb6010_setup_interface(struct musb_hdrc_platform_data *data,
240 unsigned ps_refclk, unsigned waitpin,
241 unsigned async, unsigned sync,
242 unsigned irq, unsigned dmachan)
243{
244 int status;
245 static char error[] __initdata =
246 KERN_ERR "tusb6010 init error %d, %d\n";
247
248 /* ASYNC region, primarily for PIO */
249 status = gpmc_cs_request(async, SZ_16M, (unsigned long *)
250 &tusb_resources[0].start);
251 if (status < 0) {
252 printk(error, 1, status);
253 return status;
254 }
255 tusb_resources[0].end = tusb_resources[0].start + 0x9ff;
256 async_cs = async;
257 gpmc_cs_write_reg(async, GPMC_CS_CONFIG1,
258 GPMC_CONFIG1_PAGE_LEN(2)
259 | GPMC_CONFIG1_WAIT_READ_MON
260 | GPMC_CONFIG1_WAIT_WRITE_MON
261 | GPMC_CONFIG1_WAIT_PIN_SEL(waitpin)
262 | GPMC_CONFIG1_READTYPE_ASYNC
263 | GPMC_CONFIG1_WRITETYPE_ASYNC
264 | GPMC_CONFIG1_DEVICESIZE_16
265 | GPMC_CONFIG1_DEVICETYPE_NOR
266 | GPMC_CONFIG1_MUXADDDATA);
267
268
269 /* SYNC region, primarily for DMA */
270 status = gpmc_cs_request(sync, SZ_16M, (unsigned long *)
271 &tusb_resources[1].start);
272 if (status < 0) {
273 printk(error, 2, status);
274 return status;
275 }
276 tusb_resources[1].end = tusb_resources[1].start + 0x9ff;
277 sync_cs = sync;
278 gpmc_cs_write_reg(sync, GPMC_CS_CONFIG1,
279 GPMC_CONFIG1_READMULTIPLE_SUPP
280 | GPMC_CONFIG1_READTYPE_SYNC
281 | GPMC_CONFIG1_WRITEMULTIPLE_SUPP
282 | GPMC_CONFIG1_WRITETYPE_SYNC
283 | GPMC_CONFIG1_CLKACTIVATIONTIME(1)
284 | GPMC_CONFIG1_PAGE_LEN(2)
285 | GPMC_CONFIG1_WAIT_READ_MON
286 | GPMC_CONFIG1_WAIT_WRITE_MON
287 | GPMC_CONFIG1_WAIT_PIN_SEL(waitpin)
288 | GPMC_CONFIG1_DEVICESIZE_16
289 | GPMC_CONFIG1_DEVICETYPE_NOR
290 | GPMC_CONFIG1_MUXADDDATA
291 /* fclk divider gets set later */
292 );
293
294 /* IRQ */
295 status = omap_request_gpio(irq);
296 if (status < 0) {
297 printk(error, 3, status);
298 return status;
299 }
300 omap_set_gpio_direction(irq, 1);
301 tusb_resources[2].start = irq + IH_GPIO_BASE;
302
303 /* set up memory timings ... can speed them up later */
304 if (!ps_refclk) {
305 printk(error, 4, status);
306 return -ENODEV;
307 }
308 refclk_psec = ps_refclk;
309 status = tusb6010_platform_retime(1);
310 if (status < 0) {
311 printk(error, 5, status);
312 return status;
313 }
314
315 /* finish device setup ... */
316 if (!data) {
317 printk(error, 6, status);
318 return -ENODEV;
319 }
320 data->multipoint = 1;
321 tusb_device.dev.platform_data = data;
322
323 /* REVISIT let the driver know what DMA channels work */
324 if (!dmachan)
325 tusb_device.dev.dma_mask = NULL;
326 else {
327 /* assume OMAP 2420 ES2.0 and later */
328 if (dmachan & (1 << 0))
329 omap_cfg_reg(AA10_242X_DMAREQ0);
330 if (dmachan & (1 << 1))
331 omap_cfg_reg(AA6_242X_DMAREQ1);
332 if (dmachan & (1 << 2))
333 omap_cfg_reg(E4_242X_DMAREQ2);
334 if (dmachan & (1 << 3))
335 omap_cfg_reg(G4_242X_DMAREQ3);
336 if (dmachan & (1 << 4))
337 omap_cfg_reg(D3_242X_DMAREQ4);
338 if (dmachan & (1 << 5))
339 omap_cfg_reg(E3_242X_DMAREQ5);
340 }
341
342 /* so far so good ... register the device */
343 status = platform_device_register(&tusb_device);
344 if (status < 0) {
345 printk(error, 7, status);
346 return status;
347 }
348 return 0;
349}
diff --git a/arch/arm/mach-s3c2410/dma.c b/arch/arm/mach-s3c2410/dma.c
index 80d83739ab9f..8f12e855ef5f 100644
--- a/arch/arm/mach-s3c2410/dma.c
+++ b/arch/arm/mach-s3c2410/dma.c
@@ -145,7 +145,7 @@ static struct s3c24xx_dma_order __initdata s3c2410_dma_order = {
145 }, 145 },
146}; 146};
147 147
148static int s3c2410_dma_add(struct sys_device *sysdev) 148static int __init s3c2410_dma_add(struct sys_device *sysdev)
149{ 149{
150 s3c2410_dma_init(); 150 s3c2410_dma_init();
151 s3c24xx_dma_order_set(&s3c2410_dma_order); 151 s3c24xx_dma_order_set(&s3c2410_dma_order);
diff --git a/arch/arm/mach-s3c2412/dma.c b/arch/arm/mach-s3c2412/dma.c
index 4b9425c1bf72..53c1d5bbce19 100644
--- a/arch/arm/mach-s3c2412/dma.c
+++ b/arch/arm/mach-s3c2412/dma.c
@@ -144,7 +144,7 @@ static struct s3c24xx_dma_selection __initdata s3c2412_dma_sel = {
144 .map_size = ARRAY_SIZE(s3c2412_dma_mappings), 144 .map_size = ARRAY_SIZE(s3c2412_dma_mappings),
145}; 145};
146 146
147static int s3c2412_dma_add(struct sys_device *sysdev) 147static int __init s3c2412_dma_add(struct sys_device *sysdev)
148{ 148{
149 s3c2410_dma_init(); 149 s3c2410_dma_init();
150 return s3c24xx_dma_init_map(&s3c2412_dma_sel); 150 return s3c24xx_dma_init_map(&s3c2412_dma_sel);
diff --git a/arch/arm/mach-s3c2412/irq.c b/arch/arm/mach-s3c2412/irq.c
index f0d66828f965..e9d0c769f5da 100644
--- a/arch/arm/mach-s3c2412/irq.c
+++ b/arch/arm/mach-s3c2412/irq.c
@@ -38,6 +38,9 @@
38#include <asm/plat-s3c24xx/irq.h> 38#include <asm/plat-s3c24xx/irq.h>
39#include <asm/plat-s3c24xx/pm.h> 39#include <asm/plat-s3c24xx/pm.h>
40 40
41#define INTMSK(start, end) ((1 << ((end) + 1 - (start))) - 1)
42#define INTMSK_SUB(start, end) (INTMSK(start, end) << ((start - S3C2410_IRQSUB(0))))
43
41/* the s3c2412 changes the behaviour of IRQ_EINT0 through IRQ_EINT3 by 44/* the s3c2412 changes the behaviour of IRQ_EINT0 through IRQ_EINT3 by
42 * having them turn up in both the INT* and the EINT* registers. Whilst 45 * having them turn up in both the INT* and the EINT* registers. Whilst
43 * both show the status, they both now need to be acked when the IRQs 46 * both show the status, they both now need to be acked when the IRQs
@@ -105,6 +108,51 @@ static struct irq_chip s3c2412_irq_eint0t4 = {
105 .set_type = s3c_irqext_type, 108 .set_type = s3c_irqext_type,
106}; 109};
107 110
111#define INTBIT(x) (1 << ((x) - S3C2410_IRQSUB(0)))
112
113/* CF and SDI sub interrupts */
114
115static void s3c2412_irq_demux_cfsdi(unsigned int irq, struct irq_desc *desc)
116{
117 unsigned int subsrc, submsk;
118
119 subsrc = __raw_readl(S3C2410_SUBSRCPND);
120 submsk = __raw_readl(S3C2410_INTSUBMSK);
121
122 subsrc &= ~submsk;
123
124 if (subsrc & INTBIT(IRQ_S3C2412_SDI))
125 desc_handle_irq(IRQ_S3C2412_SDI, irq_desc + IRQ_S3C2412_SDI);
126
127 if (subsrc & INTBIT(IRQ_S3C2412_CF))
128 desc_handle_irq(IRQ_S3C2412_CF, irq_desc + IRQ_S3C2412_CF);
129}
130
131#define INTMSK_CFSDI (1UL << (IRQ_S3C2412_CFSDI - IRQ_EINT0))
132#define SUBMSK_CFSDI INTMSK_SUB(IRQ_S3C2412_SDI, IRQ_S3C2412_CF)
133
134static void s3c2412_irq_cfsdi_mask(unsigned int irqno)
135{
136 s3c_irqsub_mask(irqno, INTMSK_CFSDI, SUBMSK_CFSDI);
137}
138
139static void s3c2412_irq_cfsdi_unmask(unsigned int irqno)
140{
141 s3c_irqsub_unmask(irqno, INTMSK_CFSDI);
142}
143
144static void s3c2412_irq_cfsdi_ack(unsigned int irqno)
145{
146 s3c_irqsub_maskack(irqno, INTMSK_CFSDI, SUBMSK_CFSDI);
147}
148
149static struct irq_chip s3c2412_irq_cfsdi = {
150 .name = "s3c2412-cfsdi",
151 .ack = s3c2412_irq_cfsdi_ack,
152 .mask = s3c2412_irq_cfsdi_mask,
153 .unmask = s3c2412_irq_cfsdi_unmask,
154};
155
108static int s3c2412_irq_add(struct sys_device *sysdev) 156static int s3c2412_irq_add(struct sys_device *sysdev)
109{ 157{
110 unsigned int irqno; 158 unsigned int irqno;
@@ -115,6 +163,16 @@ static int s3c2412_irq_add(struct sys_device *sysdev)
115 set_irq_flags(irqno, IRQF_VALID); 163 set_irq_flags(irqno, IRQF_VALID);
116 } 164 }
117 165
166 /* add demux support for CF/SDI */
167
168 set_irq_chained_handler(IRQ_S3C2412_CFSDI, s3c2412_irq_demux_cfsdi);
169
170 for (irqno = IRQ_S3C2412_SDI; irqno <= IRQ_S3C2412_CF; irqno++) {
171 set_irq_chip(irqno, &s3c2412_irq_cfsdi);
172 set_irq_handler(irqno, handle_level_irq);
173 set_irq_flags(irqno, IRQF_VALID);
174 }
175
118 return 0; 176 return 0;
119} 177}
120 178
diff --git a/arch/arm/mach-s3c2412/s3c2412.c b/arch/arm/mach-s3c2412/s3c2412.c
index e0ccb404623f..4f92a1562d77 100644
--- a/arch/arm/mach-s3c2412/s3c2412.c
+++ b/arch/arm/mach-s3c2412/s3c2412.c
@@ -78,6 +78,11 @@ void __init s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no)
78 s3c_device_lcd.name = "s3c2412-lcd"; 78 s3c_device_lcd.name = "s3c2412-lcd";
79 s3c_device_nand.name = "s3c2412-nand"; 79 s3c_device_nand.name = "s3c2412-nand";
80 80
81 /* alter IRQ of SDI controller */
82
83 s3c_device_sdi.resource[1].start = IRQ_S3C2412_SDI;
84 s3c_device_sdi.resource[1].end = IRQ_S3C2412_SDI;
85
81 /* spi channel related changes, s3c2412/13 specific */ 86 /* spi channel related changes, s3c2412/13 specific */
82 s3c_device_spi0.name = "s3c2412-spi"; 87 s3c_device_spi0.name = "s3c2412-spi";
83 s3c_device_spi0.resource[0].end = S3C24XX_PA_SPI + 0x24; 88 s3c_device_spi0.resource[0].end = S3C24XX_PA_SPI + 0x24;
diff --git a/arch/arm/mach-s3c2440/dma.c b/arch/arm/mach-s3c2440/dma.c
index f509f062e749..0b1260827ac6 100644
--- a/arch/arm/mach-s3c2440/dma.c
+++ b/arch/arm/mach-s3c2440/dma.c
@@ -190,7 +190,7 @@ static struct s3c24xx_dma_order __initdata s3c2440_dma_order = {
190 }, 190 },
191}; 191};
192 192
193static int s3c2440_dma_add(struct sys_device *sysdev) 193static int __init s3c2440_dma_add(struct sys_device *sysdev)
194{ 194{
195 s3c2410_dma_init(); 195 s3c2410_dma_init();
196 s3c24xx_dma_order_set(&s3c2440_dma_order); 196 s3c24xx_dma_order_set(&s3c2440_dma_order);
diff --git a/arch/arm/mach-s3c2443/dma.c b/arch/arm/mach-s3c2443/dma.c
index fc3ede82af8f..f6c006d4297b 100644
--- a/arch/arm/mach-s3c2443/dma.c
+++ b/arch/arm/mach-s3c2443/dma.c
@@ -162,7 +162,7 @@ static struct s3c24xx_dma_selection __initdata s3c2443_dma_sel = {
162 .map_size = ARRAY_SIZE(s3c2443_dma_mappings), 162 .map_size = ARRAY_SIZE(s3c2443_dma_mappings),
163}; 163};
164 164
165static int s3c2443_dma_add(struct sys_device *sysdev) 165static int __init s3c2443_dma_add(struct sys_device *sysdev)
166{ 166{
167 s3c24xx_dma_init(6, IRQ_S3C2443_DMA0, 0x100); 167 s3c24xx_dma_init(6, IRQ_S3C2443_DMA0, 0x100);
168 return s3c24xx_dma_init_map(&s3c2443_dma_sel); 168 return s3c24xx_dma_init_map(&s3c2443_dma_sel);
diff --git a/arch/arm/mach-s3c2443/irq.c b/arch/arm/mach-s3c2443/irq.c
index 6cd4818f3f0d..f9ad498a6fc0 100644
--- a/arch/arm/mach-s3c2443/irq.c
+++ b/arch/arm/mach-s3c2443/irq.c
@@ -252,7 +252,7 @@ static int __init s3c2443_add_sub(unsigned int base,
252 return 0; 252 return 0;
253} 253}
254 254
255static int s3c2443_irq_add(struct sys_device *sysdev) 255static int __init s3c2443_irq_add(struct sys_device *sysdev)
256{ 256{
257 printk("S3C2443: IRQ Support\n"); 257 printk("S3C2443: IRQ Support\n");
258 258
@@ -280,7 +280,7 @@ static struct sysdev_driver s3c2443_irq_driver = {
280 .add = s3c2443_irq_add, 280 .add = s3c2443_irq_add,
281}; 281};
282 282
283static int s3c2443_irq_init(void) 283static int __init s3c2443_irq_init(void)
284{ 284{
285 return sysdev_driver_register(&s3c2443_sysclass, &s3c2443_irq_driver); 285 return sysdev_driver_register(&s3c2443_sysclass, &s3c2443_irq_driver);
286} 286}
diff --git a/arch/arm/mm/consistent.c b/arch/arm/mm/consistent.c
index 1f9f94f9af4b..cefdf2f9f26e 100644
--- a/arch/arm/mm/consistent.c
+++ b/arch/arm/mm/consistent.c
@@ -481,7 +481,7 @@ core_initcall(consistent_init);
481 * platforms with CONFIG_DMABOUNCE. 481 * platforms with CONFIG_DMABOUNCE.
482 * Use the driver DMA support - see dma-mapping.h (dma_sync_*) 482 * Use the driver DMA support - see dma-mapping.h (dma_sync_*)
483 */ 483 */
484void consistent_sync(const void *start, size_t size, int direction) 484void dma_cache_maint(const void *start, size_t size, int direction)
485{ 485{
486 const void *end = start + size; 486 const void *end = start + size;
487 487
@@ -504,4 +504,4 @@ void consistent_sync(const void *start, size_t size, int direction)
504 BUG(); 504 BUG();
505 } 505 }
506} 506}
507EXPORT_SYMBOL(consistent_sync); 507EXPORT_SYMBOL(dma_cache_maint);
diff --git a/arch/arm/nwfpe/ARM-gcc.h b/arch/arm/nwfpe/ARM-gcc.h
index e6598470b076..436e54aa02ec 100644
--- a/arch/arm/nwfpe/ARM-gcc.h
+++ b/arch/arm/nwfpe/ARM-gcc.h
@@ -68,7 +68,7 @@ a compiler does not support explicit inlining, this macro should be defined
68to be `static'. 68to be `static'.
69------------------------------------------------------------------------------- 69-------------------------------------------------------------------------------
70*/ 70*/
71#define INLINE extern __inline__ 71#define INLINE static inline
72 72
73 73
74/* For use as a GCC soft-float library we need some special function names. */ 74/* For use as a GCC soft-float library we need some special function names. */
diff --git a/arch/arm/nwfpe/entry.S b/arch/arm/nwfpe/entry.S
index 1dc13bc6d810..48bca0db4607 100644
--- a/arch/arm/nwfpe/entry.S
+++ b/arch/arm/nwfpe/entry.S
@@ -70,13 +70,24 @@ floating point instructions. GCC attempts to group floating point
70instructions to allow the emulator to spread the cost of the trap over 70instructions to allow the emulator to spread the cost of the trap over
71several floating point instructions. */ 71several floating point instructions. */
72 72
73#include <asm/asm-offsets.h>
74
73 .globl nwfpe_enter 75 .globl nwfpe_enter
74nwfpe_enter: 76nwfpe_enter:
75 mov r4, lr @ save the failure-return addresses 77 mov r4, lr @ save the failure-return addresses
76 mov sl, sp @ we access the registers via 'sl' 78 mov sl, sp @ we access the registers via 'sl'
77 79
78 ldr r5, [sp, #60] @ get contents of PC; 80 ldr r5, [sp, #S_PC] @ get contents of PC;
81 mov r6, r0 @ save the opcode
79emulate: 82emulate:
83 ldr r1, [sp, #S_PSR] @ fetch the PSR
84 bl checkCondition @ check the condition
85 cmp r0, #0 @ r0 = 0 ==> condition failed
86
87 @ if condition code failed to match, next insn
88 beq next @ get the next instruction;
89
90 mov r0, r6 @ prepare for EmulateAll()
80 bl EmulateAll @ emulate the instruction 91 bl EmulateAll @ emulate the instruction
81 cmp r0, #0 @ was emulation successful 92 cmp r0, #0 @ was emulation successful
82 moveq pc, r4 @ no, return failure 93 moveq pc, r4 @ no, return failure
@@ -91,18 +102,10 @@ next:
91 teqne r2, #0x0E000000 102 teqne r2, #0x0E000000
92 movne pc, r9 @ return ok if not a fp insn 103 movne pc, r9 @ return ok if not a fp insn
93 104
94 str r5, [sp, #60] @ update PC copy in regs 105 str r5, [sp, #S_PC] @ update PC copy in regs
95 106
96 mov r0, r6 @ save a copy 107 mov r0, r6 @ save a copy
97 ldr r1, [sp, #64] @ fetch the condition codes 108 b emulate @ check condition and emulate
98 bl checkCondition @ check the condition
99 cmp r0, #0 @ r0 = 0 ==> condition failed
100
101 @ if condition code failed to match, next insn
102 beq next @ get the next instruction;
103
104 mov r0, r6 @ prepare for EmulateAll()
105 b emulate @ if r0 != 0, goto EmulateAll
106 109
107 @ We need to be prepared for the instructions at .Lx1 and .Lx2 110 @ We need to be prepared for the instructions at .Lx1 and .Lx2
108 @ to fault. Emit the appropriate exception gunk to fix things up. 111 @ to fault. Emit the appropriate exception gunk to fix things up.
diff --git a/arch/arm/nwfpe/fpa11.inl b/arch/arm/nwfpe/fpa11.inl
index 10c3caf2868f..ab8d6826245f 100644
--- a/arch/arm/nwfpe/fpa11.inl
+++ b/arch/arm/nwfpe/fpa11.inl
@@ -22,13 +22,13 @@
22#include "fpa11.h" 22#include "fpa11.h"
23 23
24/* Read and write floating point status register */ 24/* Read and write floating point status register */
25extern __inline__ unsigned int readFPSR(void) 25static inline unsigned int readFPSR(void)
26{ 26{
27 FPA11 *fpa11 = GET_FPA11(); 27 FPA11 *fpa11 = GET_FPA11();
28 return (fpa11->fpsr); 28 return (fpa11->fpsr);
29} 29}
30 30
31extern __inline__ void writeFPSR(FPSR reg) 31static inline void writeFPSR(FPSR reg)
32{ 32{
33 FPA11 *fpa11 = GET_FPA11(); 33 FPA11 *fpa11 = GET_FPA11();
34 /* the sysid byte in the status register is readonly */ 34 /* the sysid byte in the status register is readonly */
@@ -36,14 +36,14 @@ extern __inline__ void writeFPSR(FPSR reg)
36} 36}
37 37
38/* Read and write floating point control register */ 38/* Read and write floating point control register */
39extern __inline__ FPCR readFPCR(void) 39static inline FPCR readFPCR(void)
40{ 40{
41 FPA11 *fpa11 = GET_FPA11(); 41 FPA11 *fpa11 = GET_FPA11();
42 /* clear SB, AB and DA bits before returning FPCR */ 42 /* clear SB, AB and DA bits before returning FPCR */
43 return (fpa11->fpcr & ~MASK_RFC); 43 return (fpa11->fpcr & ~MASK_RFC);
44} 44}
45 45
46extern __inline__ void writeFPCR(FPCR reg) 46static inline void writeFPCR(FPCR reg)
47{ 47{
48 FPA11 *fpa11 = GET_FPA11(); 48 FPA11 *fpa11 = GET_FPA11();
49 fpa11->fpcr &= ~MASK_WFC; /* clear SB, AB and DA bits */ 49 fpa11->fpcr &= ~MASK_WFC; /* clear SB, AB and DA bits */
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
index cfc69f3842fd..c1f7e5a819a3 100644
--- a/arch/arm/plat-omap/Kconfig
+++ b/arch/arm/plat-omap/Kconfig
@@ -20,10 +20,15 @@ endchoice
20 20
21comment "OMAP Feature Selections" 21comment "OMAP Feature Selections"
22 22
23config OMAP_DEBUG_LEDS 23config OMAP_DEBUG_DEVICES
24 bool 24 bool
25 help 25 help
26 For debug card leds on TI reference boards. 26 For debug cards on TI reference boards.
27
28config OMAP_DEBUG_LEDS
29 bool
30 depends on OMAP_DEBUG_DEVICES
31 default y if LEDS || LEDS_OMAP_DEBUG
27 32
28config OMAP_RESET_CLOCKS 33config OMAP_RESET_CLOCKS
29 bool "Reset unused clocks during boot" 34 bool "Reset unused clocks during boot"
diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile
index 41a3c1cf3bd4..2549129aabc6 100644
--- a/arch/arm/plat-omap/Makefile
+++ b/arch/arm/plat-omap/Makefile
@@ -17,4 +17,5 @@ obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o
17 17
18obj-$(CONFIG_CPU_FREQ) += cpu-omap.o 18obj-$(CONFIG_CPU_FREQ) += cpu-omap.o
19obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o 19obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o
20obj-$(CONFIG_OMAP_DEBUG_DEVICES) += debug-devices.o
20obj-$(CONFIG_OMAP_DEBUG_LEDS) += debug-leds.o 21obj-$(CONFIG_OMAP_DEBUG_LEDS) += debug-leds.o
diff --git a/arch/arm/plat-omap/debug-devices.c b/arch/arm/plat-omap/debug-devices.c
new file mode 100644
index 000000000000..83a5f8b91857
--- /dev/null
+++ b/arch/arm/plat-omap/debug-devices.c
@@ -0,0 +1,86 @@
1/*
2 * linux/arch/arm/plat-omap/debug-devices.c
3 *
4 * Copyright (C) 2005 Nokia Corporation
5 * Modified from mach-omap2/board-h4.c
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/kernel.h>
13#include <linux/init.h>
14#include <linux/platform_device.h>
15
16#include <asm/hardware.h>
17#include <asm/io.h>
18
19#include <asm/arch/board.h>
20#include <asm/arch/gpio.h>
21
22
23/* Many OMAP development platforms reuse the same "debug board"; these
24 * platforms include H2, H3, H4, and Perseus2.
25 */
26
27static struct resource smc91x_resources[] = {
28 [0] = {
29 .flags = IORESOURCE_MEM,
30 },
31 [1] = {
32 .flags = IORESOURCE_IRQ,
33 },
34};
35
36static struct platform_device smc91x_device = {
37 .name = "smc91x",
38 .id = -1,
39 .num_resources = ARRAY_SIZE(smc91x_resources),
40 .resource = smc91x_resources,
41};
42
43static struct resource led_resources[] = {
44 [0] = {
45 .flags = IORESOURCE_MEM,
46 },
47};
48
49static struct platform_device led_device = {
50 .name = "omap_dbg_led",
51 .id = -1,
52 .num_resources = ARRAY_SIZE(led_resources),
53 .resource = led_resources,
54};
55
56static struct platform_device *debug_devices[] __initdata = {
57 &smc91x_device,
58 &led_device,
59 /* ps2 kbd + mouse ports */
60 /* 4 extra uarts */
61 /* 6 input dip switches */
62 /* 8 output pins */
63};
64
65int __init debug_card_init(u32 addr, unsigned gpio)
66{
67 int status;
68
69 smc91x_resources[0].start = addr + 0x300;
70 smc91x_resources[0].end = addr + 0x30f;
71
72 smc91x_resources[1].start = OMAP_GPIO_IRQ(gpio);
73 smc91x_resources[1].end = OMAP_GPIO_IRQ(gpio);
74
75 status = omap_request_gpio(gpio);
76 if (status < 0) {
77 printk(KERN_ERR "GPIO%d unavailable for smc91x IRQ\n", gpio);
78 return status;
79 }
80 omap_set_gpio_direction(gpio, 1);
81
82 led_resources[0].start = addr;
83 led_resources[0].end = addr + SZ_4K - 1;
84
85 return platform_add_devices(debug_devices, ARRAY_SIZE(debug_devices));
86}
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index 88d5b6d9f950..05a38498cbe0 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -1347,11 +1347,6 @@ void omap_stop_lcd_dma(void)
1347 omap_writew(w, OMAP1610_DMA_LCD_CTRL); 1347 omap_writew(w, OMAP1610_DMA_LCD_CTRL);
1348} 1348}
1349 1349
1350int omap_lcd_dma_ext_running(void)
1351{
1352 return lcd_dma.ext_ctrl && lcd_dma.active;
1353}
1354
1355/*----------------------------------------------------------------------------*/ 1350/*----------------------------------------------------------------------------*/
1356 1351
1357static int __init omap_init_dma(void) 1352static int __init omap_init_dma(void)
@@ -1493,7 +1488,6 @@ EXPORT_SYMBOL(omap_free_lcd_dma);
1493EXPORT_SYMBOL(omap_enable_lcd_dma); 1488EXPORT_SYMBOL(omap_enable_lcd_dma);
1494EXPORT_SYMBOL(omap_setup_lcd_dma); 1489EXPORT_SYMBOL(omap_setup_lcd_dma);
1495EXPORT_SYMBOL(omap_stop_lcd_dma); 1490EXPORT_SYMBOL(omap_stop_lcd_dma);
1496EXPORT_SYMBOL(omap_lcd_dma_ext_running);
1497EXPORT_SYMBOL(omap_set_lcd_dma_b1); 1491EXPORT_SYMBOL(omap_set_lcd_dma_b1);
1498EXPORT_SYMBOL(omap_set_lcd_dma_single_transfer); 1492EXPORT_SYMBOL(omap_set_lcd_dma_single_transfer);
1499EXPORT_SYMBOL(omap_set_lcd_dma_ext_controller); 1493EXPORT_SYMBOL(omap_set_lcd_dma_ext_controller);
diff --git a/arch/arm/plat-s3c24xx/dma.c b/arch/arm/plat-s3c24xx/dma.c
index 6d048490c559..992ca435a922 100644
--- a/arch/arm/plat-s3c24xx/dma.c
+++ b/arch/arm/plat-s3c24xx/dma.c
@@ -1372,7 +1372,7 @@ int __init s3c24xx_dma_init(unsigned int channels, unsigned int irq,
1372 return ret; 1372 return ret;
1373} 1373}
1374 1374
1375int s3c2410_dma_init(void) 1375int __init s3c2410_dma_init(void)
1376{ 1376{
1377 return s3c24xx_dma_init(4, IRQ_DMA0, 0x40); 1377 return s3c24xx_dma_init(4, IRQ_DMA0, 0x40);
1378} 1378}
diff --git a/arch/arm/plat-s3c24xx/sleep.S b/arch/arm/plat-s3c24xx/sleep.S
index d47113bbc34c..a646cbe8244c 100644
--- a/arch/arm/plat-s3c24xx/sleep.S
+++ b/arch/arm/plat-s3c24xx/sleep.S
@@ -96,6 +96,14 @@ resume_with_mmu:
96s3c2410_sleep_save_phys: 96s3c2410_sleep_save_phys:
97 .word 0 97 .word 0
98 98
99
100 /* sleep magic, to allow the bootloader to check for an valid
101 * image to resume to. Must be the first word before the
102 * s3c2410_cpu_resume entry.
103 */
104
105 .word 0x2bedf00d
106
99 /* s3c2410_cpu_resume 107 /* s3c2410_cpu_resume
100 * 108 *
101 * resume code entry for bootloader to call 109 * resume code entry for bootloader to call
diff --git a/include/asm-arm/arch-ixp23xx/platform.h b/include/asm-arm/arch-ixp23xx/platform.h
index 56e16d66645a..db8aa304c93d 100644
--- a/include/asm-arm/arch-ixp23xx/platform.h
+++ b/include/asm-arm/arch-ixp23xx/platform.h
@@ -14,17 +14,17 @@
14 14
15#ifndef __ASSEMBLY__ 15#ifndef __ASSEMBLY__
16 16
17extern inline unsigned long ixp2000_reg_read(volatile void *reg) 17static inline unsigned long ixp2000_reg_read(volatile void *reg)
18{ 18{
19 return *((volatile unsigned long *)reg); 19 return *((volatile unsigned long *)reg);
20} 20}
21 21
22extern inline void ixp2000_reg_write(volatile void *reg, unsigned long val) 22static inline void ixp2000_reg_write(volatile void *reg, unsigned long val)
23{ 23{
24 *((volatile unsigned long *)reg) = val; 24 *((volatile unsigned long *)reg) = val;
25} 25}
26 26
27extern inline void ixp2000_reg_wrb(volatile void *reg, unsigned long val) 27static inline void ixp2000_reg_wrb(volatile void *reg, unsigned long val)
28{ 28{
29 *((volatile unsigned long *)reg) = val; 29 *((volatile unsigned long *)reg) = val;
30} 30}
diff --git a/include/asm-arm/arch-ns9xxx/clock.h b/include/asm-arm/arch-ns9xxx/clock.h
index bf30cbdcc2bf..b943d3a92a1d 100644
--- a/include/asm-arm/arch-ns9xxx/clock.h
+++ b/include/asm-arm/arch-ns9xxx/clock.h
@@ -19,7 +19,7 @@
19static inline u32 ns9xxx_systemclock(void) __attribute__((const)); 19static inline u32 ns9xxx_systemclock(void) __attribute__((const));
20static inline u32 ns9xxx_systemclock(void) 20static inline u32 ns9xxx_systemclock(void)
21{ 21{
22 u32 pll = SYS_PLL; 22 u32 pll = __raw_readl(SYS_PLL);
23 23
24 /* 24 /*
25 * The system clock should be a multiple of HZ * TIMERCLOCKSELECT (in 25 * The system clock should be a multiple of HZ * TIMERCLOCKSELECT (in
@@ -46,8 +46,8 @@ static inline u32 ns9xxx_systemclock(void)
46 * 46 *
47 * Fine. 47 * Fine.
48 */ 48 */
49 return CRYSTAL * (REGGET(pll, SYS_PLL, ND) + 1) 49 return CRYSTAL * (REGGETIM(pll, SYS_PLL, ND) + 1)
50 >> REGGET(pll, SYS_PLL, FS); 50 >> REGGETIM(pll, SYS_PLL, FS);
51} 51}
52 52
53static inline u32 ns9xxx_cpuclock(void) __attribute__((const)); 53static inline u32 ns9xxx_cpuclock(void) __attribute__((const));
diff --git a/include/asm-arm/arch-ns9xxx/gpio.h b/include/asm-arm/arch-ns9xxx/gpio.h
new file mode 100644
index 000000000000..adbca08583c0
--- /dev/null
+++ b/include/asm-arm/arch-ns9xxx/gpio.h
@@ -0,0 +1,47 @@
1/*
2 * include/asm-arm/arch-ns9xxx/gpio.h
3 *
4 * Copyright (C) 2007 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10*/
11#ifndef __ASM_ARCH_GPIO_H
12#define __ASM_ARCH_GPIO_H
13
14#include <asm/errno.h>
15
16int gpio_request(unsigned gpio, const char *label);
17
18void gpio_free(unsigned gpio);
19
20int ns9xxx_gpio_configure(unsigned gpio, int inv, int func);
21
22int gpio_direction_input(unsigned gpio);
23
24int gpio_direction_output(unsigned gpio, int value);
25
26int gpio_get_value(unsigned gpio);
27
28void gpio_set_value(unsigned gpio, int value);
29
30/*
31 * ns9xxx can use gpio pins to trigger an irq, but it's not generic
32 * enough to be supported by the gpio_to_irq/irq_to_gpio interface
33 */
34static inline int gpio_to_irq(unsigned gpio)
35{
36 return -EINVAL;
37}
38
39static inline int irq_to_gpio(unsigned irq)
40{
41 return -EINVAL;
42}
43
44/* get the cansleep() stubs */
45#include <asm-generic/gpio.h>
46
47#endif /* ifndef __ASM_ARCH_GPIO_H */
diff --git a/include/asm-arm/arch-ns9xxx/hardware.h b/include/asm-arm/arch-ns9xxx/hardware.h
index 25600554c4fe..0b7b34603f1c 100644
--- a/include/asm-arm/arch-ns9xxx/hardware.h
+++ b/include/asm-arm/arch-ns9xxx/hardware.h
@@ -27,42 +27,53 @@
27#define io_v2p(x) ((((x) & 0x0f000000) << 4) \ 27#define io_v2p(x) ((((x) & 0x0f000000) << 4) \
28 + ((x) & 0x00ffffff)) 28 + ((x) & 0x00ffffff))
29 29
30#define __REGSHIFT(mask) ((mask) & (-(mask)))
31
30#define __REGBIT(bit) ((u32)1 << (bit)) 32#define __REGBIT(bit) ((u32)1 << (bit))
31#define __REGBITS(hbit, lbit) ((((u32)1 << ((hbit) - (lbit) + 1)) - 1) << (lbit)) 33#define __REGBITS(hbit, lbit) ((((u32)1 << ((hbit) - (lbit) + 1)) - 1) << (lbit))
32#define __REGVAL(mask, value) (((value) * ((mask) & (-(mask))) & (mask))) 34#define __REGVAL(mask, value) (((value) * __REGSHIFT(mask)) & (mask))
33 35
34#ifndef __ASSEMBLY__ 36#ifndef __ASSEMBLY__
35 37
36# define __REG(x) (*((volatile u32 *)io_p2v((x)))) 38# define __REG(x) ((void __iomem __force *)io_p2v((x)))
37# define __REG2(x, y) (*((volatile u32 *)io_p2v((x)) + (y))) 39# define __REG2(x, y) ((void __iomem __force *)(io_p2v((x)) + 4 * (y)))
38 40
39# define __REGB(x) (*((volatile u8 *)io_p2v((x)))) 41# define __REGSET(var, field, value) \
40# define __REGB2(x) (*((volatile u8 *)io_p2v((x)) + (y))) 42 ((var) = (((var) & ~((field) & ~(value))) | (value)))
41 43
42# define REGSET(var, reg, field, value) \ 44# define REGSET(var, reg, field, value) \
43 ((var) = (((var) \ 45 __REGSET(var, reg ## _ ## field, reg ## _ ## field ## _ ## value)
44 & ~(reg ## _ ## field & \ 46
45 ~ reg ## _ ## field ## _ ## value)) \ 47# define REGSET_IDX(var, reg, field, idx, value) \
46 | (reg ## _ ## field ## _ ## value))) 48 __REGSET(var, reg ## _ ## field((idx)), reg ## _ ## field ## _ ## value((idx)))
47 49
48# define REGSETIM(var, reg, field, value) \ 50# define REGSETIM(var, reg, field, value) \
49 ((var) = (((var) \ 51 __REGSET(var, reg ## _ ## field, __REGVAL(reg ## _ ## field, (value)))
50 & ~(reg ## _ ## field & \ 52
51 ~(__REGVAL(reg ## _ ## field, value)))) \ 53# define REGSETIM_IDX(var, reg, field, idx, value) \
52 | (__REGVAL(reg ## _ ## field, value)))) 54 __REGSET(var, reg ## _ ## field((idx)), __REGVAL(reg ## _ ## field((idx)), (value)))
55
56# define __REGGET(var, field) \
57 (((var) & (field)))
53 58
54# define REGGET(var, reg, field) \ 59# define REGGET(var, reg, field) \
55 ((var & (reg ## _ ## field)) / \ 60 __REGGET(var, reg ## _ ## field)
56 ((reg ## _ ## field) & (-(reg ## _ ## field)))) 61
62# define REGGET_IDX(var, reg, field, idx) \
63 __REGGET(var, reg ## _ ## field((idx)))
64
65# define REGGETIM(var, reg, field) \
66 __REGGET(var, reg ## _ ## field) / __REGSHIFT(reg ## _ ## field)
67
68# define REGGETIM_IDX(var, reg, field, idx) \
69 __REGGET(var, reg ## _ ## field((idx))) / \
70 __REGSHIFT(reg ## _ ## field((idx)))
57 71
58#else 72#else
59 73
60# define __REG(x) io_p2v(x) 74# define __REG(x) io_p2v(x)
61# define __REG2(x, y) io_p2v((x) + (y)) 75# define __REG2(x, y) io_p2v((x) + (y))
62 76
63# define __REGB(x) __REG((x))
64# define __REGB2(x, y) __REG2((x), (y))
65
66#endif 77#endif
67 78
68#endif /* ifndef __ASM_ARCH_HARDWARE_H */ 79#endif /* ifndef __ASM_ARCH_HARDWARE_H */
diff --git a/include/asm-arm/arch-ns9xxx/regs-board-a9m9750dev.h b/include/asm-arm/arch-ns9xxx/regs-board-a9m9750dev.h
index c3dc532dd20c..afa3a9db3e1d 100644
--- a/include/asm-arm/arch-ns9xxx/regs-board-a9m9750dev.h
+++ b/include/asm-arm/arch-ns9xxx/regs-board-a9m9750dev.h
@@ -18,7 +18,7 @@
18#define FPGA_UARTC_BASE io_p2v(NS9XXX_CSxSTAT_PHYS(0) + 0x10) 18#define FPGA_UARTC_BASE io_p2v(NS9XXX_CSxSTAT_PHYS(0) + 0x10)
19#define FPGA_UARTD_BASE io_p2v(NS9XXX_CSxSTAT_PHYS(0) + 0x18) 19#define FPGA_UARTD_BASE io_p2v(NS9XXX_CSxSTAT_PHYS(0) + 0x18)
20 20
21#define FPGA_IER __REGB(NS9XXX_CSxSTAT_PHYS(0) + 0x50) 21#define FPGA_IER __REG(NS9XXX_CSxSTAT_PHYS(0) + 0x50)
22#define FPGA_ISR __REGB(NS9XXX_CSxSTAT_PHYS(0) + 0x60) 22#define FPGA_ISR __REG(NS9XXX_CSxSTAT_PHYS(0) + 0x60)
23 23
24#endif /* ifndef __ASM_ARCH_REGSBOARDA9M9750_H */ 24#endif /* ifndef __ASM_ARCH_REGSBOARDA9M9750_H */
diff --git a/include/asm-arm/arch-ns9xxx/system.h b/include/asm-arm/arch-ns9xxx/system.h
index e3cd4d31b3f3..c1082bd8977c 100644
--- a/include/asm-arm/arch-ns9xxx/system.h
+++ b/include/asm-arm/arch-ns9xxx/system.h
@@ -24,9 +24,9 @@ static inline void arch_reset(char mode)
24{ 24{
25 u32 reg; 25 u32 reg;
26 26
27 reg = SYS_PLL >> 16; 27 reg = __raw_readl(SYS_PLL) >> 16;
28 REGSET(reg, SYS_PLL, SWC, YES); 28 REGSET(reg, SYS_PLL, SWC, YES);
29 SYS_PLL = reg; 29 __raw_writel(reg, SYS_PLL);
30 30
31 BUG(); 31 BUG();
32} 32}
diff --git a/include/asm-arm/arch-omap/blizzard.h b/include/asm-arm/arch-omap/blizzard.h
new file mode 100644
index 000000000000..8d160f171372
--- /dev/null
+++ b/include/asm-arm/arch-omap/blizzard.h
@@ -0,0 +1,12 @@
1#ifndef _BLIZZARD_H
2#define _BLIZZARD_H
3
4struct blizzard_platform_data {
5 void (*power_up)(struct device *dev);
6 void (*power_down)(struct device *dev);
7 unsigned long (*get_clock_rate)(struct device *dev);
8
9 unsigned te_connected : 1;
10};
11
12#endif
diff --git a/include/asm-arm/arch-omap/board-2430sdp.h b/include/asm-arm/arch-omap/board-2430sdp.h
new file mode 100644
index 000000000000..e9c65ce3cb12
--- /dev/null
+++ b/include/asm-arm/arch-omap/board-2430sdp.h
@@ -0,0 +1,44 @@
1/*
2 * linux/include/asm-arm/arch-omap/board-2430sdp.h
3 *
4 * Hardware definitions for TI OMAP2430 SDP board.
5 *
6 * Based on board-h4.h by Dirk Behme <dirk.behme@de.bosch.com>
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
12 *
13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
14 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
15 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
16 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
19 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 *
24 * You should have received a copy of the GNU General Public License along
25 * with this program; if not, write to the Free Software Foundation, Inc.,
26 * 675 Mass Ave, Cambridge, MA 02139, USA.
27 */
28
29#ifndef __ASM_ARCH_OMAP_2430SDP_H
30#define __ASM_ARCH_OMAP_2430SDP_H
31
32/* Placeholder for 2430SDP specific defines */
33#define OMAP24XX_ETHR_START 0x08000300
34#define OMAP24XX_ETHR_GPIO_IRQ 149
35#define SDP2430_CS0_BASE 0x04000000
36
37#define TWL4030_IRQNUM INT_24XX_SYS_NIRQ
38
39/* TWL4030 Primary Interrupt Handler (PIH) interrupts */
40#define IH_TWL4030_BASE IH_BOARD_BASE
41#define IH_TWL4030_END (IH_TWL4030_BASE+8)
42#define NR_IRQS (IH_TWL4030_END)
43
44#endif /* __ASM_ARCH_OMAP_2430SDP_H */
diff --git a/include/asm-arm/arch-omap/board-palmte.h b/include/asm-arm/arch-omap/board-palmte.h
new file mode 100644
index 000000000000..cd22035a7160
--- /dev/null
+++ b/include/asm-arm/arch-omap/board-palmte.h
@@ -0,0 +1,34 @@
1/*
2 * linux/include/asm-arm/arch-omap/board-palmte.h
3 *
4 * Hardware definitions for the Palm Tungsten E device.
5 *
6 * Maintainters : http://palmtelinux.sf.net
7 * palmtelinux-developpers@lists.sf.net
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 __OMAP_BOARD_PALMTE_H
15#define __OMAP_BOARD_PALMTE_H
16
17#include <asm/arch/gpio.h>
18
19#define PALMTE_USBDETECT_GPIO 0
20#define PALMTE_USB_OR_DC_GPIO 1
21#define PALMTE_TSC_GPIO 4
22#define PALMTE_PINTDAV_GPIO 6
23#define PALMTE_MMC_WP_GPIO 8
24#define PALMTE_MMC_POWER_GPIO 9
25#define PALMTE_HDQ_GPIO 11
26#define PALMTE_HEADPHONES_GPIO 14
27#define PALMTE_SPEAKER_GPIO 15
28#define PALMTE_DC_GPIO OMAP_MPUIO(2)
29#define PALMTE_MMC_SWITCH_GPIO OMAP_MPUIO(4)
30#define PALMTE_MMC1_GPIO OMAP_MPUIO(6)
31#define PALMTE_MMC2_GPIO OMAP_MPUIO(7)
32#define PALMTE_MMC3_GPIO OMAP_MPUIO(11)
33
34#endif /* __OMAP_BOARD_PALMTE_H */
diff --git a/include/asm-arm/arch-omap/board-palmtt.h b/include/asm-arm/arch-omap/board-palmtt.h
new file mode 100644
index 000000000000..d9590b0ec90e
--- /dev/null
+++ b/include/asm-arm/arch-omap/board-palmtt.h
@@ -0,0 +1,23 @@
1/*
2 * linux/include/asm-arm/arch-omap/board-palmte.h
3 *
4 * Hardware definitions for the Palm Tungsten|T device.
5 *
6 * Maintainters : Marek Vasut <marek.vasut@gmail.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#ifndef __OMAP_BOARD_PALMTT_H
14#define __OMAP_BOARD_PALMTT_H
15
16#define PALMTT_USBDETECT_GPIO 0
17#define PALMTT_CABLE_GPIO 1
18#define PALMTT_LED_GPIO 3
19#define PALMTT_PENIRQ_GPIO 6
20#define PALMTT_MMC_WP_GPIO 8
21#define PALMTT_HDQ_GPIO 11
22
23#endif /* __OMAP_BOARD_PALMTT_H */
diff --git a/include/asm-arm/arch-omap/board-palmz71.h b/include/asm-arm/arch-omap/board-palmz71.h
new file mode 100644
index 000000000000..1252a859787d
--- /dev/null
+++ b/include/asm-arm/arch-omap/board-palmz71.h
@@ -0,0 +1,26 @@
1/*
2 * linux/include/asm-arm/arch-omap/board-palmz71.h
3 *
4 * Hardware definitions for the Palm Zire71 device.
5 *
6 * Maintainters : Marek Vasut <marek.vasut@gmail.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#ifndef __OMAP_BOARD_PALMZ71_H
14#define __OMAP_BOARD_PALMZ71_H
15
16#define PALMZ71_USBDETECT_GPIO 0
17#define PALMZ71_PENIRQ_GPIO 6
18#define PALMZ71_MMC_WP_GPIO 8
19#define PALMZ71_HDQ_GPIO 11
20
21#define PALMZ71_HOTSYNC_GPIO OMAP_MPUIO(1)
22#define PALMZ71_CABLE_GPIO OMAP_MPUIO(2)
23#define PALMZ71_SLIDER_GPIO OMAP_MPUIO(3)
24#define PALMZ71_MMC_IN_GPIO OMAP_MPUIO(4)
25
26#endif /* __OMAP_BOARD_PALMZ71_H */
diff --git a/include/asm-arm/arch-omap/board-sx1.h b/include/asm-arm/arch-omap/board-sx1.h
new file mode 100644
index 000000000000..2bb8dd6e2d14
--- /dev/null
+++ b/include/asm-arm/arch-omap/board-sx1.h
@@ -0,0 +1,46 @@
1/*
2 * Siemens SX1 board definitions
3 *
4 * Copyright: Vovan888 at gmail com
5 *
6 * This package 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 * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
11 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
12 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13 */
14
15#ifndef __ASM_ARCH_SX1_I2C_CHIPS_H
16#define __ASM_ARCH_SX1_I2C_CHIPS_H
17
18#define SOFIA_MAX_LIGHT_VAL 0x2B
19
20#define SOFIA_I2C_ADDR 0x32
21/* Sofia reg 3 bits masks */
22#define SOFIA_POWER1_REG 0x03
23
24#define SOFIA_USB_POWER 0x01
25#define SOFIA_MMC_POWER 0x04
26#define SOFIA_BLUETOOTH_POWER 0x08
27#define SOFIA_MMILIGHT_POWER 0x20
28
29#define SOFIA_POWER2_REG 0x04
30#define SOFIA_BACKLIGHT_REG 0x06
31#define SOFIA_KEYLIGHT_REG 0x07
32#define SOFIA_DIMMING_REG 0x09
33
34
35/* Function Prototypes for SX1 devices control on I2C bus */
36
37int sx1_setbacklight(u8 backlight);
38int sx1_getbacklight(u8 *backlight);
39int sx1_setkeylight(u8 keylight);
40int sx1_getkeylight(u8 *keylight);
41
42int sx1_setmmipower(u8 onoff);
43int sx1_setusbpower(u8 onoff);
44int sx1_setmmcpower(u8 onoff);
45
46#endif /* __ASM_ARCH_SX1_I2C_CHIPS_H */
diff --git a/include/asm-arm/arch-omap/board.h b/include/asm-arm/arch-omap/board.h
index 031672c56377..db44c5d1f1a0 100644
--- a/include/asm-arm/arch-omap/board.h
+++ b/include/asm-arm/arch-omap/board.h
@@ -179,4 +179,8 @@ extern const void *omap_get_var_config(u16 tag, size_t *len);
179extern struct omap_board_config_kernel *omap_board_config; 179extern struct omap_board_config_kernel *omap_board_config;
180extern int omap_board_config_size; 180extern int omap_board_config_size;
181 181
182
183/* for TI reference platforms sharing the same debug card */
184extern int debug_card_init(u32 addr, unsigned gpio);
185
182#endif 186#endif
diff --git a/include/asm-arm/arch-omap/dma.h b/include/asm-arm/arch-omap/dma.h
index f7774192a41e..f33b467fddb7 100644
--- a/include/asm-arm/arch-omap/dma.h
+++ b/include/asm-arm/arch-omap/dma.h
@@ -417,7 +417,6 @@ extern void omap_free_lcd_dma(void);
417extern void omap_setup_lcd_dma(void); 417extern void omap_setup_lcd_dma(void);
418extern void omap_enable_lcd_dma(void); 418extern void omap_enable_lcd_dma(void);
419extern void omap_stop_lcd_dma(void); 419extern void omap_stop_lcd_dma(void);
420extern int omap_lcd_dma_ext_running(void);
421extern void omap_set_lcd_dma_ext_controller(int external); 420extern void omap_set_lcd_dma_ext_controller(int external);
422extern void omap_set_lcd_dma_single_transfer(int single); 421extern void omap_set_lcd_dma_single_transfer(int single);
423extern void omap_set_lcd_dma_b1(unsigned long addr, u16 fb_xres, u16 fb_yres, 422extern void omap_set_lcd_dma_b1(unsigned long addr, u16 fb_xres, u16 fb_yres,
diff --git a/include/asm-arm/arch-omap/eac.h b/include/asm-arm/arch-omap/eac.h
new file mode 100644
index 000000000000..6662cb02bafc
--- /dev/null
+++ b/include/asm-arm/arch-omap/eac.h
@@ -0,0 +1,101 @@
1/*
2 * linux/include/asm-arm/arch-omap2/eac.h
3 *
4 * Defines for Enhanced Audio Controller
5 *
6 * Contact: Jarkko Nikula <jarkko.nikula@nokia.com>
7 *
8 * Copyright (C) 2006 Nokia Corporation
9 * Copyright (C) 2004 Texas Instruments, Inc.
10 *
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * version 2 as published by the Free Software Foundation.
14 *
15 * This program is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
23 * 02110-1301 USA
24 *
25 */
26
27#ifndef __ASM_ARM_ARCH_OMAP2_EAC_H
28#define __ASM_ARM_ARCH_OMAP2_EAC_H
29
30#include <asm/arch/io.h>
31#include <asm/arch/hardware.h>
32#include <asm/irq.h>
33
34#include <sound/driver.h>
35#include <sound/core.h>
36
37/* master codec clock source */
38#define EAC_MCLK_EXT_MASK 0x100
39enum eac_mclk_src {
40 EAC_MCLK_INT_11290000, /* internal 96 MHz / 8.5 = 11.29 Mhz */
41 EAC_MCLK_EXT_11289600 = EAC_MCLK_EXT_MASK,
42 EAC_MCLK_EXT_12288000,
43 EAC_MCLK_EXT_2x11289600,
44 EAC_MCLK_EXT_2x12288000,
45};
46
47/* codec port interface mode */
48enum eac_codec_mode {
49 EAC_CODEC_PCM,
50 EAC_CODEC_AC97,
51 EAC_CODEC_I2S_MASTER, /* codec port, I.e. EAC is the master */
52 EAC_CODEC_I2S_SLAVE,
53};
54
55/* configuration structure for I2S mode */
56struct eac_i2s_conf {
57 /* if enabled, then first data slot (left channel) is signaled as
58 * positive level of frame sync EAC.AC_FS */
59 unsigned polarity_changed_mode:1;
60 /* if enabled, then serial data starts one clock cycle after the
61 * of EAC.AC_FS for first audio slot */
62 unsigned sync_delay_enable:1;
63};
64
65/* configuration structure for EAC codec port */
66struct eac_codec {
67 enum eac_mclk_src mclk_src;
68
69 enum eac_codec_mode codec_mode;
70 union {
71 struct eac_i2s_conf i2s;
72 } codec_conf;
73
74 int default_rate; /* audio sampling rate */
75
76 int (* set_power)(void *private_data, int dac, int adc);
77 int (* register_controls)(void *private_data,
78 struct snd_card *card);
79 const char *short_name;
80
81 void *private_data;
82};
83
84/* structure for passing platform dependent data to the EAC driver */
85struct eac_platform_data {
86 int (* init)(struct device *eac_dev);
87 void (* cleanup)(struct device *eac_dev);
88 /* these callbacks are used to configure & control external MCLK
89 * source. NULL if not used */
90 int (* enable_ext_clocks)(struct device *eac_dev);
91 void (* disable_ext_clocks)(struct device *eac_dev);
92};
93
94extern void omap_init_eac(struct eac_platform_data *pdata);
95
96extern int eac_register_codec(struct device *eac_dev, struct eac_codec *codec);
97extern void eac_unregister_codec(struct device *eac_dev);
98
99extern int eac_set_mode(struct device *eac_dev, int play, int rec);
100
101#endif /* __ASM_ARM_ARCH_OMAP2_EAC_H */
diff --git a/include/asm-arm/arch-omap/gpmc.h b/include/asm-arm/arch-omap/gpmc.h
index 995cc83482eb..6a8e07ffc2d0 100644
--- a/include/asm-arm/arch-omap/gpmc.h
+++ b/include/asm-arm/arch-omap/gpmc.h
@@ -23,9 +23,10 @@
23#define GPMC_CS_NAND_DATA 0x24 23#define GPMC_CS_NAND_DATA 0x24
24 24
25#define GPMC_CONFIG1_WRAPBURST_SUPP (1 << 31) 25#define GPMC_CONFIG1_WRAPBURST_SUPP (1 << 31)
26#define GPMC_CONFIG1_READMULTIPLE_SUPP (1 << 20) 26#define GPMC_CONFIG1_READMULTIPLE_SUPP (1 << 30)
27#define GPMC_CONFIG1_READTYPE_ASYNC (0 << 29) 27#define GPMC_CONFIG1_READTYPE_ASYNC (0 << 29)
28#define GPMC_CONFIG1_READTYPE_SYNC (1 << 29) 28#define GPMC_CONFIG1_READTYPE_SYNC (1 << 29)
29#define GPMC_CONFIG1_WRITEMULTIPLE_SUPP (1 << 28)
29#define GPMC_CONFIG1_WRITETYPE_ASYNC (0 << 27) 30#define GPMC_CONFIG1_WRITETYPE_ASYNC (0 << 27)
30#define GPMC_CONFIG1_WRITETYPE_SYNC (1 << 27) 31#define GPMC_CONFIG1_WRITETYPE_SYNC (1 << 27)
31#define GPMC_CONFIG1_CLKACTIVATIONTIME(val) ((val & 3) << 25) 32#define GPMC_CONFIG1_CLKACTIVATIONTIME(val) ((val & 3) << 25)
@@ -80,6 +81,8 @@ struct gpmc_timings {
80}; 81};
81 82
82extern unsigned int gpmc_ns_to_ticks(unsigned int time_ns); 83extern unsigned int gpmc_ns_to_ticks(unsigned int time_ns);
84extern unsigned int gpmc_round_ns_to_ticks(unsigned int time_ns);
85extern unsigned long gpmc_get_fclk_period(void);
83 86
84extern void gpmc_cs_write_reg(int cs, int idx, u32 val); 87extern void gpmc_cs_write_reg(int cs, int idx, u32 val);
85extern u32 gpmc_cs_read_reg(int cs, int idx); 88extern u32 gpmc_cs_read_reg(int cs, int idx);
diff --git a/include/asm-arm/arch-omap/hardware.h b/include/asm-arm/arch-omap/hardware.h
index e225f4f39b34..da572092e255 100644
--- a/include/asm-arm/arch-omap/hardware.h
+++ b/include/asm-arm/arch-omap/hardware.h
@@ -318,6 +318,10 @@
318#include "board-h4.h" 318#include "board-h4.h"
319#endif 319#endif
320 320
321#ifdef CONFIG_MACH_OMAP_2430SDP
322#include "board-2430sdp.h"
323#endif
324
321#ifdef CONFIG_MACH_OMAP_APOLLON 325#ifdef CONFIG_MACH_OMAP_APOLLON
322#include "board-apollon.h" 326#include "board-apollon.h"
323#endif 327#endif
@@ -330,6 +334,22 @@
330#include "board-voiceblue.h" 334#include "board-voiceblue.h"
331#endif 335#endif
332 336
337#ifdef CONFIG_MACH_OMAP_PALMTE
338#include "board-palmte.h"
339#endif
340
341#ifdef CONFIG_MACH_OMAP_PALMZ71
342#include "board-palmz71.h"
343#endif
344
345#ifdef CONFIG_MACH_OMAP_PALMTT
346#include "board-palmtt.h"
347#endif
348
349#ifdef CONFIG_MACH_SX1
350#include "board-sx1.h"
351#endif
352
333#endif /* !__ASSEMBLER__ */ 353#endif /* !__ASSEMBLER__ */
334 354
335#endif /* __ASM_ARCH_OMAP_HARDWARE_H */ 355#endif /* __ASM_ARCH_OMAP_HARDWARE_H */
diff --git a/include/asm-arm/arch-omap/io.h b/include/asm-arm/arch-omap/io.h
index 4aca7e3d7566..289082d07f14 100644
--- a/include/asm-arm/arch-omap/io.h
+++ b/include/asm-arm/arch-omap/io.h
@@ -72,6 +72,16 @@
72#define L4_24XX_PHYS L4_24XX_BASE /* 0x48000000 */ 72#define L4_24XX_PHYS L4_24XX_BASE /* 0x48000000 */
73#define L4_24XX_VIRT 0xd8000000 73#define L4_24XX_VIRT 0xd8000000
74#define L4_24XX_SIZE SZ_1M /* 1MB of 128MB used, want 1MB sect */ 74#define L4_24XX_SIZE SZ_1M /* 1MB of 128MB used, want 1MB sect */
75
76#ifdef CONFIG_ARCH_OMAP2430
77#define L4_WK_243X_PHYS L4_WK_243X_BASE /* 0x49000000 */
78#define L4_WK_243X_VIRT 0xd9000000
79#define L4_WK_243X_SIZE SZ_1M
80#define OMAP243X_GPMC_PHYS OMAP243X_GPMC_BASE /* 0x49000000 */
81#define OMAP243X_GPMC_VIRT 0xFE000000
82#define OMAP243X_GPMC_SIZE SZ_1M
83#endif
84
75#define IO_OFFSET 0x90000000 85#define IO_OFFSET 0x90000000
76#define IO_ADDRESS(pa) ((pa) + IO_OFFSET) /* Works for L3 and L4 */ 86#define IO_ADDRESS(pa) ((pa) + IO_OFFSET) /* Works for L3 and L4 */
77#define io_p2v(pa) ((pa) + IO_OFFSET) /* Works for L3 and L4 */ 87#define io_p2v(pa) ((pa) + IO_OFFSET) /* Works for L3 and L4 */
diff --git a/include/asm-arm/arch-omap/menelaus.h b/include/asm-arm/arch-omap/menelaus.h
index 82d276a6bd95..69ed7ee40179 100644
--- a/include/asm-arm/arch-omap/menelaus.h
+++ b/include/asm-arm/arch-omap/menelaus.h
@@ -7,6 +7,12 @@
7#ifndef __ASM_ARCH_MENELAUS_H 7#ifndef __ASM_ARCH_MENELAUS_H
8#define __ASM_ARCH_MENELAUS_H 8#define __ASM_ARCH_MENELAUS_H
9 9
10struct device;
11
12struct menelaus_platform_data {
13 int (* late_init)(struct device *dev);
14};
15
10extern int menelaus_register_mmc_callback(void (*callback)(void *data, u8 card_mask), 16extern int menelaus_register_mmc_callback(void (*callback)(void *data, u8 card_mask),
11 void *data); 17 void *data);
12extern void menelaus_unregister_mmc_callback(void); 18extern void menelaus_unregister_mmc_callback(void);
@@ -20,6 +26,19 @@ extern int menelaus_set_vaux(unsigned int mV);
20extern int menelaus_set_vdcdc(int dcdc, unsigned int mV); 26extern int menelaus_set_vdcdc(int dcdc, unsigned int mV);
21extern int menelaus_set_slot_sel(int enable); 27extern int menelaus_set_slot_sel(int enable);
22extern int menelaus_get_slot_pin_states(void); 28extern int menelaus_get_slot_pin_states(void);
29extern int menelaus_set_vcore_sw(unsigned int mV);
30extern int menelaus_set_vcore_hw(unsigned int roof_mV, unsigned int floor_mV);
31
32#define EN_VPLL_SLEEP (1 << 7)
33#define EN_VMMC_SLEEP (1 << 6)
34#define EN_VAUX_SLEEP (1 << 5)
35#define EN_VIO_SLEEP (1 << 4)
36#define EN_VMEM_SLEEP (1 << 3)
37#define EN_DC3_SLEEP (1 << 2)
38#define EN_DC2_SLEEP (1 << 1)
39#define EN_VC_SLEEP (1 << 0)
40
41extern int menelaus_set_regulator_sleep(int enable, u32 val);
23 42
24#if defined(CONFIG_ARCH_OMAP24XX) && defined(CONFIG_MENELAUS) 43#if defined(CONFIG_ARCH_OMAP24XX) && defined(CONFIG_MENELAUS)
25#define omap_has_menelaus() 1 44#define omap_has_menelaus() 1
@@ -28,4 +47,3 @@ extern int menelaus_get_slot_pin_states(void);
28#endif 47#endif
29 48
30#endif 49#endif
31
diff --git a/include/asm-arm/arch-omap/mmc.h b/include/asm-arm/arch-omap/mmc.h
new file mode 100644
index 000000000000..b70e37b61242
--- /dev/null
+++ b/include/asm-arm/arch-omap/mmc.h
@@ -0,0 +1,66 @@
1/*
2 * MMC definitions for OMAP2
3 *
4 * Copyright (C) 2006 Nokia Corporation
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 __OMAP2_MMC_H
12#define __OMAP2_MMC_H
13
14#include <linux/types.h>
15#include <linux/device.h>
16#include <linux/mmc/host.h>
17
18#define OMAP_MMC_MAX_SLOTS 2
19
20struct omap_mmc_platform_data {
21 unsigned enabled:1;
22 /* number of slots on board */
23 unsigned nr_slots:2;
24 /* nomux means "standard" muxing is wrong on this board, and that
25 * board-specific code handled it before common init logic.
26 */
27 unsigned nomux:1;
28 /* 4 wire signaling is optional, and is only used for SD/SDIO and
29 * MMCv4 */
30 unsigned wire4:1;
31 /* set if your board has components or wiring that limits the
32 * maximum frequency on the MMC bus */
33 unsigned int max_freq;
34
35 /* switch the bus to a new slot */
36 int (* switch_slot)(struct device *dev, int slot);
37 /* initialize board-specific MMC functionality, can be NULL if
38 * not supported */
39 int (* init)(struct device *dev);
40 void (* cleanup)(struct device *dev);
41
42 struct omap_mmc_slot_data {
43 int (* set_bus_mode)(struct device *dev, int slot, int bus_mode);
44 int (* set_power)(struct device *dev, int slot, int power_on, int vdd);
45 int (* get_ro)(struct device *dev, int slot);
46
47 /* return MMC cover switch state, can be NULL if not supported.
48 *
49 * possible return values:
50 * 0 - open
51 * 1 - closed
52 */
53 int (* get_cover_state)(struct device *dev, int slot);
54
55 const char *name;
56 u32 ocr_mask;
57 } slots[OMAP_MMC_MAX_SLOTS];
58};
59
60extern void omap_set_mmc_info(int host, const struct omap_mmc_platform_data *info);
61
62/* called from board-specific card detection service routine */
63extern void omap_mmc_notify_card_detect(struct device *dev, int slot, int detected);
64extern void omap_mmc_notify_cover_event(struct device *dev, int slot, int is_closed);
65
66#endif
diff --git a/include/asm-arm/arch-omap/mux.h b/include/asm-arm/arch-omap/mux.h
index f1ec2edd4040..b8fff50e6a87 100644
--- a/include/asm-arm/arch-omap/mux.h
+++ b/include/asm-arm/arch-omap/mux.h
@@ -406,6 +406,29 @@ enum omap1xxx_index {
406 V10_1610_CF_IREQ, 406 V10_1610_CF_IREQ,
407 W10_1610_CF_RESET, 407 W10_1610_CF_RESET,
408 W11_1610_CF_CD1, 408 W11_1610_CF_CD1,
409
410 /* parallel camera */
411 J15_1610_CAM_LCLK,
412 J18_1610_CAM_D7,
413 J19_1610_CAM_D6,
414 J14_1610_CAM_D5,
415 K18_1610_CAM_D4,
416 K19_1610_CAM_D3,
417 K15_1610_CAM_D2,
418 K14_1610_CAM_D1,
419 L19_1610_CAM_D0,
420 L18_1610_CAM_VS,
421 L15_1610_CAM_HS,
422 M19_1610_CAM_RSTZ,
423 Y15_1610_CAM_OUTCLK,
424
425 /* serial camera */
426 H19_1610_CAM_EXCLK,
427 Y12_1610_CCP_CLKP,
428 W13_1610_CCP_CLKM,
429 W14_1610_CCP_DATAP,
430 Y14_1610_CCP_DATAM,
431
409}; 432};
410 433
411enum omap24xx_index { 434enum omap24xx_index {
diff --git a/include/asm-arm/arch-omap/omap24xx.h b/include/asm-arm/arch-omap/omap24xx.h
index 708b2fac77f2..14c0f9496579 100644
--- a/include/asm-arm/arch-omap/omap24xx.h
+++ b/include/asm-arm/arch-omap/omap24xx.h
@@ -8,6 +8,7 @@
8 */ 8 */
9 9
10#define L4_24XX_BASE 0x48000000 10#define L4_24XX_BASE 0x48000000
11#define L4_WK_243X_BASE 0x49000000
11#define L3_24XX_BASE 0x68000000 12#define L3_24XX_BASE 0x68000000
12 13
13/* interrupt controller */ 14/* interrupt controller */
@@ -16,9 +17,20 @@
16#define OMAP24XX_IVA_INTC_BASE 0x40000000 17#define OMAP24XX_IVA_INTC_BASE 0x40000000
17#define IRQ_SIR_IRQ 0x0040 18#define IRQ_SIR_IRQ 0x0040
18 19
20#ifdef CONFIG_ARCH_OMAP2420
19#define OMAP24XX_32KSYNCT_BASE (L4_24XX_BASE + 0x4000) 21#define OMAP24XX_32KSYNCT_BASE (L4_24XX_BASE + 0x4000)
20#define OMAP24XX_PRCM_BASE (L4_24XX_BASE + 0x8000) 22#define OMAP24XX_PRCM_BASE (L4_24XX_BASE + 0x8000)
21#define OMAP24XX_SDRC_BASE (L3_24XX_BASE + 0x9000) 23#define OMAP24XX_SDRC_BASE (L3_24XX_BASE + 0x9000)
24#define OMAP242X_CONTROL_STATUS (L4_24XX_BASE + 0x2f8)
25#endif
26
27#ifdef CONFIG_ARCH_OMAP2430
28#define OMAP24XX_32KSYNCT_BASE (L4_WK_243X_BASE + 0x20000)
29#define OMAP24XX_PRCM_BASE (L4_WK_243X_BASE + 0x6000)
30#define OMAP24XX_SDRC_BASE (0x6D000000)
31#define OMAP242X_CONTROL_STATUS (L4_24XX_BASE + 0x2f8)
32#define OMAP243X_GPMC_BASE 0x6E000000
33#endif
22 34
23/* DSP SS */ 35/* DSP SS */
24#define OMAP24XX_DSP_BASE 0x58000000 36#define OMAP24XX_DSP_BASE 0x58000000
diff --git a/include/asm-arm/arch-omap/onenand.h b/include/asm-arm/arch-omap/onenand.h
new file mode 100644
index 000000000000..6c959d0ce470
--- /dev/null
+++ b/include/asm-arm/arch-omap/onenand.h
@@ -0,0 +1,21 @@
1/*
2 * include/asm-arm/arch-omap/onenand.h
3 *
4 * Copyright (C) 2006 Nokia Corporation
5 * Author: Juha Yrjola
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/mtd/partitions.h>
13
14struct omap_onenand_platform_data {
15 int cs;
16 int gpio_irq;
17 struct mtd_partition *parts;
18 int nr_parts;
19 int (*onenand_setup)(void __iomem *);
20 int dma_channel;
21};
diff --git a/include/asm-arm/arch-rpc/uncompress.h b/include/asm-arm/arch-rpc/uncompress.h
index 06231ede54e5..b8e29efd8c5b 100644
--- a/include/asm-arm/arch-rpc/uncompress.h
+++ b/include/asm-arm/arch-rpc/uncompress.h
@@ -11,9 +11,11 @@
11 11
12#include <asm/hardware.h> 12#include <asm/hardware.h>
13#include <asm/io.h> 13#include <asm/io.h>
14#include <asm/setup.h>
15#include <asm/page.h>
14 16
15int video_num_columns, video_num_lines, video_size_row; 17int video_size_row;
16int white, bytes_per_char_h; 18unsigned char bytes_per_char_h;
17extern unsigned long con_charconvtable[256]; 19extern unsigned long con_charconvtable[256];
18 20
19struct param_struct { 21struct param_struct {
@@ -64,6 +66,13 @@ extern __attribute__((pure)) struct param_struct *params(void);
64#define params (params()) 66#define params (params())
65 67
66#ifndef STANDALONE_DEBUG 68#ifndef STANDALONE_DEBUG
69static unsigned long video_num_cols;
70static unsigned long video_num_rows;
71static unsigned long video_x;
72static unsigned long video_y;
73static unsigned char bytes_per_char_v;
74static int white;
75
67/* 76/*
68 * This does not append a newline 77 * This does not append a newline
69 */ 78 */
@@ -73,27 +82,27 @@ static void putc(int c)
73 int x,y; 82 int x,y;
74 char *ptr; 83 char *ptr;
75 84
76 x = params->video_x; 85 x = video_x;
77 y = params->video_y; 86 y = video_y;
78 87
79 if (c == '\n') { 88 if (c == '\n') {
80 if (++y >= video_num_lines) 89 if (++y >= video_num_rows)
81 y--; 90 y--;
82 } else if (c == '\r') { 91 } else if (c == '\r') {
83 x = 0; 92 x = 0;
84 } else { 93 } else {
85 ptr = VIDMEM + ((y*video_num_columns*params->bytes_per_char_v+x)*bytes_per_char_h); 94 ptr = VIDMEM + ((y*video_num_cols*bytes_per_char_v+x)*bytes_per_char_h);
86 ll_write_char(ptr, c, white); 95 ll_write_char(ptr, c, white);
87 if (++x >= video_num_columns) { 96 if (++x >= video_num_cols) {
88 x = 0; 97 x = 0;
89 if ( ++y >= video_num_lines ) { 98 if ( ++y >= video_num_rows ) {
90 y--; 99 y--;
91 } 100 }
92 } 101 }
93 } 102 }
94 103
95 params->video_x = x; 104 video_x = x;
96 params->video_y = y; 105 video_y = y;
97} 106}
98 107
99static inline void flush(void) 108static inline void flush(void)
@@ -108,11 +117,44 @@ static void error(char *x);
108static void arch_decomp_setup(void) 117static void arch_decomp_setup(void)
109{ 118{
110 int i; 119 int i;
120 struct tag *t = (struct tag *)params;
121 unsigned int nr_pages = 0, page_size = PAGE_SIZE;
122
123 if (t->hdr.tag == ATAG_CORE)
124 {
125 for (; t->hdr.size; t = tag_next(t))
126 {
127 if (t->hdr.tag == ATAG_VIDEOTEXT)
128 {
129 video_num_rows = t->u.videotext.video_lines;
130 video_num_cols = t->u.videotext.video_cols;
131 bytes_per_char_h = t->u.videotext.video_points;
132 bytes_per_char_v = t->u.videotext.video_points;
133 video_x = t->u.videotext.x;
134 video_y = t->u.videotext.y;
135 }
136
137 if (t->hdr.tag == ATAG_MEM)
138 {
139 page_size = PAGE_SIZE;
140 nr_pages += (t->u.mem.size / PAGE_SIZE);
141 }
142 }
143 }
144 else
145 {
146 nr_pages = params->nr_pages;
147 page_size = params->page_size;
148 video_num_rows = params->video_num_rows;
149 video_num_cols = params->video_num_cols;
150 video_x = params->video_x;
151 video_y = params->video_y;
152 bytes_per_char_h = params->bytes_per_char_h;
153 bytes_per_char_v = params->bytes_per_char_v;
154 }
155
156 video_size_row = video_num_cols * bytes_per_char_h;
111 157
112 video_num_lines = params->video_num_rows;
113 video_num_columns = params->video_num_cols;
114 bytes_per_char_h = params->bytes_per_char_h;
115 video_size_row = video_num_columns * bytes_per_char_h;
116 if (bytes_per_char_h == 4) 158 if (bytes_per_char_h == 4)
117 for (i = 0; i < 256; i++) 159 for (i = 0; i < 256; i++)
118 con_charconvtable[i] = 160 con_charconvtable[i] =
@@ -146,7 +188,7 @@ static void arch_decomp_setup(void)
146 white = 7; 188 white = 7;
147 } 189 }
148 190
149 if (params->nr_pages * params->page_size < 4096*1024) error("<4M of mem\n"); 191 if (nr_pages * page_size < 4096*1024) error("<4M of mem\n");
150} 192}
151#endif 193#endif
152 194
diff --git a/include/asm-arm/arch-s3c2410/irqs.h b/include/asm-arm/arch-s3c2410/irqs.h
index 3b49cd1c345c..996f65488d2d 100644
--- a/include/asm-arm/arch-s3c2410/irqs.h
+++ b/include/asm-arm/arch-s3c2410/irqs.h
@@ -112,6 +112,13 @@
112#define IRQ_TC S3C2410_IRQSUB(9) 112#define IRQ_TC S3C2410_IRQSUB(9)
113#define IRQ_ADC S3C2410_IRQSUB(10) 113#define IRQ_ADC S3C2410_IRQSUB(10)
114 114
115/* extra irqs for s3c2412 */
116
117#define IRQ_S3C2412_CFSDI S3C2410_IRQ(21)
118
119#define IRQ_S3C2412_SDI S3C2410_IRQSUB(13)
120#define IRQ_S3C2412_CF S3C2410_IRQSUB(14)
121
115/* extra irqs for s3c2440 */ 122/* extra irqs for s3c2440 */
116 123
117#define IRQ_S3C2440_CAM_C S3C2410_IRQSUB(11) /* S3C2443 too */ 124#define IRQ_S3C2440_CAM_C S3C2410_IRQSUB(11) /* S3C2443 too */
diff --git a/include/asm-arm/arch-s3c2410/regs-gpio.h b/include/asm-arm/arch-s3c2410/regs-gpio.h
index dea578b8f7f6..b693158b2d3c 100644
--- a/include/asm-arm/arch-s3c2410/regs-gpio.h
+++ b/include/asm-arm/arch-s3c2410/regs-gpio.h
@@ -1140,10 +1140,16 @@
1140 1140
1141/* definitions for each pin bit */ 1141/* definitions for each pin bit */
1142#define S3C2412_SLPCON_LOW(x) ( 0x00 << ((x) * 2)) 1142#define S3C2412_SLPCON_LOW(x) ( 0x00 << ((x) * 2))
1143#define S3C2412_SLPCON_HI(x) ( 0x01 << ((x) * 2)) 1143#define S3C2412_SLPCON_HIGH(x) ( 0x01 << ((x) * 2))
1144#define S3C2412_SLPCON_IN(x) ( 0x02 << ((x) * 2)) 1144#define S3C2412_SLPCON_IN(x) ( 0x02 << ((x) * 2))
1145#define S3C2412_SLPCON_PDWN(x) ( 0x03 << ((x) * 2)) 1145#define S3C2412_SLPCON_PULL(x) ( 0x03 << ((x) * 2))
1146#define S3C2412_SLPCON_EINT(x) ( 0x02 << ((x) * 2)) /* only IRQ pins */
1146#define S3C2412_SLPCON_MASK(x) ( 0x03 << ((x) * 2)) 1147#define S3C2412_SLPCON_MASK(x) ( 0x03 << ((x) * 2))
1147 1148
1149#define S3C2412_SLPCON_ALL_LOW (0x0)
1150#define S3C2412_SLPCON_ALL_HIGH (0x11111111 | 0x44444444)
1151#define S3C2412_SLPCON_ALL_IN (0x22222222 | 0x88888888)
1152#define S3C2412_SLPCON_ALL_PULL (0x33333333)
1153
1148#endif /* __ASM_ARCH_REGS_GPIO_H */ 1154#endif /* __ASM_ARCH_REGS_GPIO_H */
1149 1155
diff --git a/include/asm-arm/arch-s3c2410/regs-power.h b/include/asm-arm/arch-s3c2410/regs-power.h
index 94ff96505b6a..f79987be55e8 100644
--- a/include/asm-arm/arch-s3c2410/regs-power.h
+++ b/include/asm-arm/arch-s3c2410/regs-power.h
@@ -18,6 +18,11 @@
18#define S3C2412_PWRMODECON S3C24XX_PWRREG(0x20) 18#define S3C2412_PWRMODECON S3C24XX_PWRREG(0x20)
19#define S3C2412_PWRCFG S3C24XX_PWRREG(0x24) 19#define S3C2412_PWRCFG S3C24XX_PWRREG(0x24)
20 20
21#define S3C2412_INFORM0 S3C24XX_PWRREG(0x70)
22#define S3C2412_INFORM1 S3C24XX_PWRREG(0x74)
23#define S3C2412_INFORM2 S3C24XX_PWRREG(0x78)
24#define S3C2412_INFORM3 S3C24XX_PWRREG(0x7C)
25
21#define S3C2412_PWRCFG_BATF_IGNORE (0<<0) 26#define S3C2412_PWRCFG_BATF_IGNORE (0<<0)
22#define S3C2412_PWRCFG_BATF_SLEEP (3<<0) 27#define S3C2412_PWRCFG_BATF_SLEEP (3<<0)
23#define S3C2412_PWRCFG_BATF_MASK (3<<0) 28#define S3C2412_PWRCFG_BATF_MASK (3<<0)
diff --git a/include/asm-arm/arch-s3c2410/regs-s3c2412.h b/include/asm-arm/arch-s3c2410/regs-s3c2412.h
index 8ca6a3bc8555..783b18f5bcea 100644
--- a/include/asm-arm/arch-s3c2410/regs-s3c2412.h
+++ b/include/asm-arm/arch-s3c2410/regs-s3c2412.h
@@ -17,5 +17,7 @@
17#define S3C2412_SWRST (S3C24XX_VA_CLKPWR + 0x30) 17#define S3C2412_SWRST (S3C24XX_VA_CLKPWR + 0x30)
18#define S3C2412_SWRST_RESET (0x533C2412) 18#define S3C2412_SWRST_RESET (0x533C2412)
19 19
20/* see regs-power.h for the other registers in the power block. */
21
20#endif /* __ASM_ARCH_REGS_S3C2412_H */ 22#endif /* __ASM_ARCH_REGS_S3C2412_H */
21 23
diff --git a/include/asm-arm/arch-sa1100/SA-1101.h b/include/asm-arm/arch-sa1100/SA-1101.h
index 527d887f1ee3..65ca8c79e6d2 100644
--- a/include/asm-arm/arch-sa1100/SA-1101.h
+++ b/include/asm-arm/arch-sa1100/SA-1101.h
@@ -106,7 +106,7 @@
106#define SMCR_ColAdrBits( x ) /* col. addr bits 8..11 */ \ 106#define SMCR_ColAdrBits( x ) /* col. addr bits 8..11 */ \
107 (( (x) - 8 ) << FShft (SMCR_DCAC)) 107 (( (x) - 8 ) << FShft (SMCR_DCAC))
108#define SMCR_RowAdrBits( x ) /* row addr bits 9..12 */\ 108#define SMCR_RowAdrBits( x ) /* row addr bits 9..12 */\
109 (( (x) - 9 ) << FShft (SMCR_DRAC) 109 (( (x) - 9 ) << FShft (SMCR_DRAC))
110 110
111#define SNPR_VFBstart Fld(12,0) /* Video frame buffer addr */ 111#define SNPR_VFBstart Fld(12,0) /* Video frame buffer addr */
112#define SNPR_VFBsize Fld(11,12) /* Video frame buffer size */ 112#define SNPR_VFBsize Fld(11,12) /* Video frame buffer size */
@@ -394,7 +394,7 @@
394#define VgaStatus (*((volatile Word *) SA1101_p2v (_VgaStatus))) 394#define VgaStatus (*((volatile Word *) SA1101_p2v (_VgaStatus)))
395#define VgaInterruptMask (*((volatile Word *) SA1101_p2v (_VgaInterruptMask))) 395#define VgaInterruptMask (*((volatile Word *) SA1101_p2v (_VgaInterruptMask)))
396#define VgaPalette (*((volatile Word *) SA1101_p2v (_VgaPalette))) 396#define VgaPalette (*((volatile Word *) SA1101_p2v (_VgaPalette)))
397#define DacControl (*((volatile Word *) SA1101_p2v (_DacControl)) 397#define DacControl (*((volatile Word *) SA1101_p2v (_DacControl)))
398#define VgaTest (*((volatile Word *) SA1101_p2v (_VgaTest))) 398#define VgaTest (*((volatile Word *) SA1101_p2v (_VgaTest)))
399 399
400#define VideoControl_VgaEn 0x00000000 400#define VideoControl_VgaEn 0x00000000
diff --git a/include/asm-arm/dma-mapping.h b/include/asm-arm/dma-mapping.h
index c8b5d0db0cf0..678134bf2475 100644
--- a/include/asm-arm/dma-mapping.h
+++ b/include/asm-arm/dma-mapping.h
@@ -17,7 +17,7 @@
17 * platforms with CONFIG_DMABOUNCE. 17 * platforms with CONFIG_DMABOUNCE.
18 * Use the driver DMA support - see dma-mapping.h (dma_sync_*) 18 * Use the driver DMA support - see dma-mapping.h (dma_sync_*)
19 */ 19 */
20extern void consistent_sync(const void *kaddr, size_t size, int rw); 20extern void dma_cache_maint(const void *kaddr, size_t size, int rw);
21 21
22/* 22/*
23 * Return whether the given device DMA address mask can be supported 23 * Return whether the given device DMA address mask can be supported
@@ -165,7 +165,7 @@ dma_map_single(struct device *dev, void *cpu_addr, size_t size,
165 enum dma_data_direction dir) 165 enum dma_data_direction dir)
166{ 166{
167 if (!arch_is_coherent()) 167 if (!arch_is_coherent())
168 consistent_sync(cpu_addr, size, dir); 168 dma_cache_maint(cpu_addr, size, dir);
169 169
170 return virt_to_dma(dev, (unsigned long)cpu_addr); 170 return virt_to_dma(dev, (unsigned long)cpu_addr);
171} 171}
@@ -278,7 +278,7 @@ dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
278 virt = page_address(sg->page) + sg->offset; 278 virt = page_address(sg->page) + sg->offset;
279 279
280 if (!arch_is_coherent()) 280 if (!arch_is_coherent())
281 consistent_sync(virt, sg->length, dir); 281 dma_cache_maint(virt, sg->length, dir);
282 } 282 }
283 283
284 return nents; 284 return nents;
@@ -334,7 +334,7 @@ dma_sync_single_for_cpu(struct device *dev, dma_addr_t handle, size_t size,
334 enum dma_data_direction dir) 334 enum dma_data_direction dir)
335{ 335{
336 if (!arch_is_coherent()) 336 if (!arch_is_coherent())
337 consistent_sync((void *)dma_to_virt(dev, handle), size, dir); 337 dma_cache_maint((void *)dma_to_virt(dev, handle), size, dir);
338} 338}
339 339
340static inline void 340static inline void
@@ -342,7 +342,7 @@ dma_sync_single_for_device(struct device *dev, dma_addr_t handle, size_t size,
342 enum dma_data_direction dir) 342 enum dma_data_direction dir)
343{ 343{
344 if (!arch_is_coherent()) 344 if (!arch_is_coherent())
345 consistent_sync((void *)dma_to_virt(dev, handle), size, dir); 345 dma_cache_maint((void *)dma_to_virt(dev, handle), size, dir);
346} 346}
347#else 347#else
348extern void dma_sync_single_for_cpu(struct device*, dma_addr_t, size_t, enum dma_data_direction); 348extern void dma_sync_single_for_cpu(struct device*, dma_addr_t, size_t, enum dma_data_direction);
@@ -373,7 +373,7 @@ dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nents,
373 for (i = 0; i < nents; i++, sg++) { 373 for (i = 0; i < nents; i++, sg++) {
374 char *virt = page_address(sg->page) + sg->offset; 374 char *virt = page_address(sg->page) + sg->offset;
375 if (!arch_is_coherent()) 375 if (!arch_is_coherent())
376 consistent_sync(virt, sg->length, dir); 376 dma_cache_maint(virt, sg->length, dir);
377 } 377 }
378} 378}
379 379
@@ -386,7 +386,7 @@ dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nents,
386 for (i = 0; i < nents; i++, sg++) { 386 for (i = 0; i < nents; i++, sg++) {
387 char *virt = page_address(sg->page) + sg->offset; 387 char *virt = page_address(sg->page) + sg->offset;
388 if (!arch_is_coherent()) 388 if (!arch_is_coherent())
389 consistent_sync(virt, sg->length, dir); 389 dma_cache_maint(virt, sg->length, dir);
390 } 390 }
391} 391}
392#else 392#else
diff --git a/include/asm-arm/kexec.h b/include/asm-arm/kexec.h
index b5b030ef633d..46dcc4d0b9bd 100644
--- a/include/asm-arm/kexec.h
+++ b/include/asm-arm/kexec.h
@@ -14,6 +14,8 @@
14 14
15#define KEXEC_ARCH KEXEC_ARCH_ARM 15#define KEXEC_ARCH KEXEC_ARCH_ARM
16 16
17#define KEXEC_BOOT_PARAMS_SIZE 1536
18
17#ifndef __ASSEMBLY__ 19#ifndef __ASSEMBLY__
18 20
19struct kimage; 21struct kimage;
diff --git a/include/asm-arm/unistd.h b/include/asm-arm/unistd.h
index d327b25c986c..88e868b7aae0 100644
--- a/include/asm-arm/unistd.h
+++ b/include/asm-arm/unistd.h
@@ -378,6 +378,7 @@
378#define __NR_signalfd (__NR_SYSCALL_BASE+349) 378#define __NR_signalfd (__NR_SYSCALL_BASE+349)
379#define __NR_timerfd (__NR_SYSCALL_BASE+350) 379#define __NR_timerfd (__NR_SYSCALL_BASE+350)
380#define __NR_eventfd (__NR_SYSCALL_BASE+351) 380#define __NR_eventfd (__NR_SYSCALL_BASE+351)
381#define __NR_fallocate (__NR_SYSCALL_BASE+352)
381 382
382/* 383/*
383 * The following SWIs are ARM private. 384 * The following SWIs are ARM private.