aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/Kconfig6
-rw-r--r--arch/arm/Makefile6
-rw-r--r--arch/arm/configs/enp2611_defconfig20
-rw-r--r--arch/arm/configs/ixdp2400_defconfig20
-rw-r--r--arch/arm/configs/ixdp2401_defconfig20
-rw-r--r--arch/arm/configs/ixdp2800_defconfig20
-rw-r--r--arch/arm/configs/ixdp2801_defconfig20
-rw-r--r--arch/arm/configs/omap_h2_1610_defconfig117
-rw-r--r--arch/arm/mach-ixp2000/core.c55
-rw-r--r--arch/arm/mach-ixp2000/enp2611.c1
-rw-r--r--arch/arm/mach-ixp2000/ixdp2x00.c1
-rw-r--r--arch/arm/mach-ixp2000/ixdp2x01.c1
-rw-r--r--arch/arm/mach-omap/Kconfig221
-rw-r--r--arch/arm/mach-omap/Makefile40
-rw-r--r--arch/arm/mach-omap/common.c549
-rw-r--r--arch/arm/mach-omap1/Kconfig144
-rw-r--r--arch/arm/mach-omap1/Makefile30
-rw-r--r--arch/arm/mach-omap1/Makefile.boot (renamed from arch/arm/mach-omap/Makefile.boot)1
-rw-r--r--arch/arm/mach-omap1/board-generic.c (renamed from arch/arm/mach-omap/board-generic.c)7
-rw-r--r--arch/arm/mach-omap1/board-h2.c (renamed from arch/arm/mach-omap/board-h2.c)7
-rw-r--r--arch/arm/mach-omap1/board-h3.c (renamed from arch/arm/mach-omap/board-h3.c)7
-rw-r--r--arch/arm/mach-omap1/board-innovator.c (renamed from arch/arm/mach-omap/board-innovator.c)7
-rw-r--r--arch/arm/mach-omap1/board-netstar.c (renamed from arch/arm/mach-omap/board-netstar.c)5
-rw-r--r--arch/arm/mach-omap1/board-osk.c (renamed from arch/arm/mach-omap/board-osk.c)7
-rw-r--r--arch/arm/mach-omap1/board-perseus2.c (renamed from arch/arm/mach-omap/board-perseus2.c)7
-rw-r--r--arch/arm/mach-omap1/board-voiceblue.c (renamed from arch/arm/mach-omap/board-voiceblue.c)7
-rw-r--r--arch/arm/mach-omap1/fpga.c (renamed from arch/arm/mach-omap/fpga.c)0
-rw-r--r--arch/arm/mach-omap1/id.c188
-rw-r--r--arch/arm/mach-omap1/io.c115
-rw-r--r--arch/arm/mach-omap1/irq.c (renamed from arch/arm/mach-omap/irq.c)17
-rw-r--r--arch/arm/mach-omap1/leds-h2p2-debug.c (renamed from arch/arm/mach-omap/leds-h2p2-debug.c)0
-rw-r--r--arch/arm/mach-omap1/leds-innovator.c (renamed from arch/arm/mach-omap/leds-innovator.c)0
-rw-r--r--arch/arm/mach-omap1/leds-osk.c (renamed from arch/arm/mach-omap/leds-osk.c)4
-rw-r--r--arch/arm/mach-omap1/leds.c (renamed from arch/arm/mach-omap/leds.c)0
-rw-r--r--arch/arm/mach-omap1/leds.h (renamed from arch/arm/mach-omap/leds.h)0
-rw-r--r--arch/arm/mach-omap1/serial.c200
-rw-r--r--arch/arm/mach-omap1/time.c (renamed from arch/arm/mach-omap/time.c)32
-rw-r--r--arch/arm/mm/Kconfig2
-rw-r--r--arch/arm/mm/mm-armv.c4
-rw-r--r--arch/arm/plat-omap/Kconfig112
-rw-r--r--arch/arm/plat-omap/Makefile17
-rw-r--r--arch/arm/plat-omap/clock.c (renamed from arch/arm/mach-omap/clock.c)371
-rw-r--r--arch/arm/plat-omap/clock.h (renamed from arch/arm/mach-omap/clock.h)12
-rw-r--r--arch/arm/plat-omap/common.c135
-rw-r--r--arch/arm/plat-omap/cpu-omap.c128
-rw-r--r--arch/arm/plat-omap/dma.c (renamed from arch/arm/mach-omap/dma.c)46
-rw-r--r--arch/arm/plat-omap/gpio.c (renamed from arch/arm/mach-omap/gpio.c)2
-rw-r--r--arch/arm/plat-omap/mcbsp.c (renamed from arch/arm/mach-omap/mcbsp.c)99
-rw-r--r--arch/arm/plat-omap/mux.c (renamed from arch/arm/mach-omap/mux.c)19
-rw-r--r--arch/arm/plat-omap/ocpi.c (renamed from arch/arm/mach-omap/ocpi.c)2
-rw-r--r--arch/arm/plat-omap/pm.c (renamed from arch/arm/mach-omap/pm.c)2
-rw-r--r--arch/arm/plat-omap/sleep.S (renamed from arch/arm/mach-omap/sleep.S)2
-rw-r--r--arch/arm/plat-omap/usb.c (renamed from arch/arm/mach-omap/usb.c)4
-rw-r--r--include/asm-arm/arch-ixp2000/platform.h1
-rw-r--r--include/asm-arm/arch-omap/board-h2.h5
-rw-r--r--include/asm-arm/arch-omap/board-h3.h5
-rw-r--r--include/asm-arm/arch-omap/board-osk.h5
-rw-r--r--include/asm-arm/arch-omap/board.h12
-rw-r--r--include/asm-arm/arch-omap/common.h (renamed from arch/arm/mach-omap/common.h)4
-rw-r--r--include/asm-arm/arch-omap/dma.h1
-rw-r--r--include/asm-arm/arch-omap/hardware.h24
-rw-r--r--include/asm-arm/arch-omap/irqs.h3
-rw-r--r--include/asm-arm/arch-omap/mux.h28
-rw-r--r--include/asm-arm/arch-omap/omap16xx.h32
-rw-r--r--include/asm-arm/arch-omap/system.h21
65 files changed, 1847 insertions, 1133 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 620f2ca94ed2..8752751f9985 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -223,7 +223,9 @@ source "arch/arm/mach-pxa/Kconfig"
223 223
224source "arch/arm/mach-sa1100/Kconfig" 224source "arch/arm/mach-sa1100/Kconfig"
225 225
226source "arch/arm/mach-omap/Kconfig" 226source "arch/arm/plat-omap/Kconfig"
227
228source "arch/arm/mach-omap1/Kconfig"
227 229
228source "arch/arm/mach-s3c2410/Kconfig" 230source "arch/arm/mach-s3c2410/Kconfig"
229 231
@@ -514,7 +516,7 @@ config XIP_PHYS_ADDR
514 516
515endmenu 517endmenu
516 518
517if (ARCH_SA1100 || ARCH_INTEGRATOR) 519if (ARCH_SA1100 || ARCH_INTEGRATOR || ARCH_OMAP1)
518 520
519menu "CPU Frequency scaling" 521menu "CPU Frequency scaling"
520 522
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index eb933dcafba0..67f1453ade05 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -91,7 +91,8 @@ textaddr-$(CONFIG_ARCH_FORTUNET) := 0xc0008000
91 machine-$(CONFIG_ARCH_IOP3XX) := iop3xx 91 machine-$(CONFIG_ARCH_IOP3XX) := iop3xx
92 machine-$(CONFIG_ARCH_IXP4XX) := ixp4xx 92 machine-$(CONFIG_ARCH_IXP4XX) := ixp4xx
93 machine-$(CONFIG_ARCH_IXP2000) := ixp2000 93 machine-$(CONFIG_ARCH_IXP2000) := ixp2000
94 machine-$(CONFIG_ARCH_OMAP) := omap 94 machine-$(CONFIG_ARCH_OMAP1) := omap1
95 incdir-$(CONFIG_ARCH_OMAP) := omap
95 machine-$(CONFIG_ARCH_S3C2410) := s3c2410 96 machine-$(CONFIG_ARCH_S3C2410) := s3c2410
96 machine-$(CONFIG_ARCH_LH7A40X) := lh7a40x 97 machine-$(CONFIG_ARCH_LH7A40X) := lh7a40x
97 machine-$(CONFIG_ARCH_VERSATILE) := versatile 98 machine-$(CONFIG_ARCH_VERSATILE) := versatile
@@ -142,6 +143,9 @@ core-$(CONFIG_FPE_NWFPE) += arch/arm/nwfpe/
142core-$(CONFIG_FPE_FASTFPE) += $(FASTFPE_OBJ) 143core-$(CONFIG_FPE_FASTFPE) += $(FASTFPE_OBJ)
143core-$(CONFIG_VFP) += arch/arm/vfp/ 144core-$(CONFIG_VFP) += arch/arm/vfp/
144 145
146# If we have a common platform directory, then include it in the build.
147core-$(CONFIG_ARCH_OMAP) += arch/arm/plat-omap/
148
145drivers-$(CONFIG_OPROFILE) += arch/arm/oprofile/ 149drivers-$(CONFIG_OPROFILE) += arch/arm/oprofile/
146drivers-$(CONFIG_ARCH_CLPS7500) += drivers/acorn/char/ 150drivers-$(CONFIG_ARCH_CLPS7500) += drivers/acorn/char/
147drivers-$(CONFIG_ARCH_L7200) += drivers/acorn/char/ 151drivers-$(CONFIG_ARCH_L7200) += drivers/acorn/char/
diff --git a/arch/arm/configs/enp2611_defconfig b/arch/arm/configs/enp2611_defconfig
index b8c51ee7f1bb..f67ca01b4982 100644
--- a/arch/arm/configs/enp2611_defconfig
+++ b/arch/arm/configs/enp2611_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.12-git6 3# Linux kernel version: 2.6.13-rc2
4# Sat Jun 25 00:57:29 2005 4# Thu Jul 7 16:41:21 2005
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -137,6 +137,7 @@ CONFIG_PCI_NAMES=y
137# 137#
138# CONFIG_SMP is not set 138# CONFIG_SMP is not set
139# CONFIG_PREEMPT is not set 139# CONFIG_PREEMPT is not set
140# CONFIG_NO_IDLE_HZ is not set
140# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set 141# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
141CONFIG_SELECT_MEMORY_MODEL=y 142CONFIG_SELECT_MEMORY_MODEL=y
142CONFIG_FLATMEM_MANUAL=y 143CONFIG_FLATMEM_MANUAL=y
@@ -345,10 +346,9 @@ CONFIG_PACKET_MMAP=y
345CONFIG_UNIX=y 346CONFIG_UNIX=y
346# CONFIG_NET_KEY is not set 347# CONFIG_NET_KEY is not set
347CONFIG_INET=y 348CONFIG_INET=y
348CONFIG_IP_FIB_HASH=y
349# CONFIG_IP_FIB_TRIE is not set
350# CONFIG_IP_MULTICAST is not set 349# CONFIG_IP_MULTICAST is not set
351# CONFIG_IP_ADVANCED_ROUTER is not set 350# CONFIG_IP_ADVANCED_ROUTER is not set
351CONFIG_IP_FIB_HASH=y
352CONFIG_IP_PNP=y 352CONFIG_IP_PNP=y
353CONFIG_IP_PNP_DHCP=y 353CONFIG_IP_PNP_DHCP=y
354CONFIG_IP_PNP_BOOTP=y 354CONFIG_IP_PNP_BOOTP=y
@@ -363,17 +363,8 @@ CONFIG_SYN_COOKIES=y
363# CONFIG_INET_TUNNEL is not set 363# CONFIG_INET_TUNNEL is not set
364# CONFIG_IP_TCPDIAG is not set 364# CONFIG_IP_TCPDIAG is not set
365# CONFIG_IP_TCPDIAG_IPV6 is not set 365# CONFIG_IP_TCPDIAG_IPV6 is not set
366 366# CONFIG_TCP_CONG_ADVANCED is not set
367#
368# TCP congestion control
369#
370CONFIG_TCP_CONG_BIC=y 367CONFIG_TCP_CONG_BIC=y
371CONFIG_TCP_CONG_WESTWOOD=m
372CONFIG_TCP_CONG_HTCP=m
373# CONFIG_TCP_CONG_HSTCP is not set
374# CONFIG_TCP_CONG_HYBLA is not set
375# CONFIG_TCP_CONG_VEGAS is not set
376# CONFIG_TCP_CONG_SCALABLE is not set
377# CONFIG_IPV6 is not set 368# CONFIG_IPV6 is not set
378# CONFIG_NETFILTER is not set 369# CONFIG_NETFILTER is not set
379 370
@@ -931,4 +922,3 @@ CONFIG_CRC32=y
931# CONFIG_LIBCRC32C is not set 922# CONFIG_LIBCRC32C is not set
932CONFIG_ZLIB_INFLATE=y 923CONFIG_ZLIB_INFLATE=y
933CONFIG_ZLIB_DEFLATE=y 924CONFIG_ZLIB_DEFLATE=y
934# CONFIG_TEXTSEARCH is not set
diff --git a/arch/arm/configs/ixdp2400_defconfig b/arch/arm/configs/ixdp2400_defconfig
index 3cfbe2ec29ca..5c6c928215d0 100644
--- a/arch/arm/configs/ixdp2400_defconfig
+++ b/arch/arm/configs/ixdp2400_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.12-git6 3# Linux kernel version: 2.6.13-rc2
4# Sat Jun 25 00:58:38 2005 4# Thu Jul 7 16:49:01 2005
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -138,6 +138,7 @@ CONFIG_PCI_NAMES=y
138# 138#
139# CONFIG_SMP is not set 139# CONFIG_SMP is not set
140# CONFIG_PREEMPT is not set 140# CONFIG_PREEMPT is not set
141# CONFIG_NO_IDLE_HZ is not set
141# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set 142# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
142CONFIG_SELECT_MEMORY_MODEL=y 143CONFIG_SELECT_MEMORY_MODEL=y
143CONFIG_FLATMEM_MANUAL=y 144CONFIG_FLATMEM_MANUAL=y
@@ -346,10 +347,9 @@ CONFIG_PACKET_MMAP=y
346CONFIG_UNIX=y 347CONFIG_UNIX=y
347# CONFIG_NET_KEY is not set 348# CONFIG_NET_KEY is not set
348CONFIG_INET=y 349CONFIG_INET=y
349CONFIG_IP_FIB_HASH=y
350# CONFIG_IP_FIB_TRIE is not set
351# CONFIG_IP_MULTICAST is not set 350# CONFIG_IP_MULTICAST is not set
352# CONFIG_IP_ADVANCED_ROUTER is not set 351# CONFIG_IP_ADVANCED_ROUTER is not set
352CONFIG_IP_FIB_HASH=y
353CONFIG_IP_PNP=y 353CONFIG_IP_PNP=y
354CONFIG_IP_PNP_DHCP=y 354CONFIG_IP_PNP_DHCP=y
355CONFIG_IP_PNP_BOOTP=y 355CONFIG_IP_PNP_BOOTP=y
@@ -364,17 +364,8 @@ CONFIG_SYN_COOKIES=y
364# CONFIG_INET_TUNNEL is not set 364# CONFIG_INET_TUNNEL is not set
365# CONFIG_IP_TCPDIAG is not set 365# CONFIG_IP_TCPDIAG is not set
366# CONFIG_IP_TCPDIAG_IPV6 is not set 366# CONFIG_IP_TCPDIAG_IPV6 is not set
367 367# CONFIG_TCP_CONG_ADVANCED is not set
368#
369# TCP congestion control
370#
371CONFIG_TCP_CONG_BIC=y 368CONFIG_TCP_CONG_BIC=y
372CONFIG_TCP_CONG_WESTWOOD=m
373CONFIG_TCP_CONG_HTCP=m
374# CONFIG_TCP_CONG_HSTCP is not set
375# CONFIG_TCP_CONG_HYBLA is not set
376# CONFIG_TCP_CONG_VEGAS is not set
377# CONFIG_TCP_CONG_SCALABLE is not set
378# CONFIG_IPV6 is not set 369# CONFIG_IPV6 is not set
379# CONFIG_NETFILTER is not set 370# CONFIG_NETFILTER is not set
380 371
@@ -932,4 +923,3 @@ CONFIG_CRC32=y
932# CONFIG_LIBCRC32C is not set 923# CONFIG_LIBCRC32C is not set
933CONFIG_ZLIB_INFLATE=y 924CONFIG_ZLIB_INFLATE=y
934CONFIG_ZLIB_DEFLATE=y 925CONFIG_ZLIB_DEFLATE=y
935# CONFIG_TEXTSEARCH is not set
diff --git a/arch/arm/configs/ixdp2401_defconfig b/arch/arm/configs/ixdp2401_defconfig
index 5c87e8e6969b..6dc40f6be0ef 100644
--- a/arch/arm/configs/ixdp2401_defconfig
+++ b/arch/arm/configs/ixdp2401_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.12-git6 3# Linux kernel version: 2.6.13-rc2
4# Sat Jun 25 00:59:35 2005 4# Thu Jul 7 16:49:08 2005
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -138,6 +138,7 @@ CONFIG_PCI_NAMES=y
138# 138#
139# CONFIG_SMP is not set 139# CONFIG_SMP is not set
140# CONFIG_PREEMPT is not set 140# CONFIG_PREEMPT is not set
141# CONFIG_NO_IDLE_HZ is not set
141# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set 142# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
142CONFIG_SELECT_MEMORY_MODEL=y 143CONFIG_SELECT_MEMORY_MODEL=y
143CONFIG_FLATMEM_MANUAL=y 144CONFIG_FLATMEM_MANUAL=y
@@ -346,10 +347,9 @@ CONFIG_PACKET_MMAP=y
346CONFIG_UNIX=y 347CONFIG_UNIX=y
347# CONFIG_NET_KEY is not set 348# CONFIG_NET_KEY is not set
348CONFIG_INET=y 349CONFIG_INET=y
349CONFIG_IP_FIB_HASH=y
350# CONFIG_IP_FIB_TRIE is not set
351# CONFIG_IP_MULTICAST is not set 350# CONFIG_IP_MULTICAST is not set
352# CONFIG_IP_ADVANCED_ROUTER is not set 351# CONFIG_IP_ADVANCED_ROUTER is not set
352CONFIG_IP_FIB_HASH=y
353CONFIG_IP_PNP=y 353CONFIG_IP_PNP=y
354CONFIG_IP_PNP_DHCP=y 354CONFIG_IP_PNP_DHCP=y
355CONFIG_IP_PNP_BOOTP=y 355CONFIG_IP_PNP_BOOTP=y
@@ -364,17 +364,8 @@ CONFIG_SYN_COOKIES=y
364# CONFIG_INET_TUNNEL is not set 364# CONFIG_INET_TUNNEL is not set
365CONFIG_IP_TCPDIAG=y 365CONFIG_IP_TCPDIAG=y
366# CONFIG_IP_TCPDIAG_IPV6 is not set 366# CONFIG_IP_TCPDIAG_IPV6 is not set
367 367# CONFIG_TCP_CONG_ADVANCED is not set
368#
369# TCP congestion control
370#
371CONFIG_TCP_CONG_BIC=y 368CONFIG_TCP_CONG_BIC=y
372CONFIG_TCP_CONG_WESTWOOD=m
373CONFIG_TCP_CONG_HTCP=m
374# CONFIG_TCP_CONG_HSTCP is not set
375# CONFIG_TCP_CONG_HYBLA is not set
376# CONFIG_TCP_CONG_VEGAS is not set
377# CONFIG_TCP_CONG_SCALABLE is not set
378# CONFIG_IPV6 is not set 369# CONFIG_IPV6 is not set
379# CONFIG_NETFILTER is not set 370# CONFIG_NETFILTER is not set
380 371
@@ -933,4 +924,3 @@ CONFIG_CRC32=y
933# CONFIG_LIBCRC32C is not set 924# CONFIG_LIBCRC32C is not set
934CONFIG_ZLIB_INFLATE=y 925CONFIG_ZLIB_INFLATE=y
935CONFIG_ZLIB_DEFLATE=y 926CONFIG_ZLIB_DEFLATE=y
936# CONFIG_TEXTSEARCH is not set
diff --git a/arch/arm/configs/ixdp2800_defconfig b/arch/arm/configs/ixdp2800_defconfig
index 3cb561a551cb..d2bb0b7153fe 100644
--- a/arch/arm/configs/ixdp2800_defconfig
+++ b/arch/arm/configs/ixdp2800_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.12-git6 3# Linux kernel version: 2.6.13-rc2
4# Sat Jun 25 01:00:27 2005 4# Thu Jul 7 16:49:20 2005
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -138,6 +138,7 @@ CONFIG_PCI_NAMES=y
138# 138#
139# CONFIG_SMP is not set 139# CONFIG_SMP is not set
140# CONFIG_PREEMPT is not set 140# CONFIG_PREEMPT is not set
141# CONFIG_NO_IDLE_HZ is not set
141# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set 142# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
142CONFIG_SELECT_MEMORY_MODEL=y 143CONFIG_SELECT_MEMORY_MODEL=y
143CONFIG_FLATMEM_MANUAL=y 144CONFIG_FLATMEM_MANUAL=y
@@ -346,10 +347,9 @@ CONFIG_PACKET_MMAP=y
346CONFIG_UNIX=y 347CONFIG_UNIX=y
347# CONFIG_NET_KEY is not set 348# CONFIG_NET_KEY is not set
348CONFIG_INET=y 349CONFIG_INET=y
349CONFIG_IP_FIB_HASH=y
350# CONFIG_IP_FIB_TRIE is not set
351# CONFIG_IP_MULTICAST is not set 350# CONFIG_IP_MULTICAST is not set
352# CONFIG_IP_ADVANCED_ROUTER is not set 351# CONFIG_IP_ADVANCED_ROUTER is not set
352CONFIG_IP_FIB_HASH=y
353CONFIG_IP_PNP=y 353CONFIG_IP_PNP=y
354CONFIG_IP_PNP_DHCP=y 354CONFIG_IP_PNP_DHCP=y
355CONFIG_IP_PNP_BOOTP=y 355CONFIG_IP_PNP_BOOTP=y
@@ -364,17 +364,8 @@ CONFIG_SYN_COOKIES=y
364# CONFIG_INET_TUNNEL is not set 364# CONFIG_INET_TUNNEL is not set
365# CONFIG_IP_TCPDIAG is not set 365# CONFIG_IP_TCPDIAG is not set
366# CONFIG_IP_TCPDIAG_IPV6 is not set 366# CONFIG_IP_TCPDIAG_IPV6 is not set
367 367# CONFIG_TCP_CONG_ADVANCED is not set
368#
369# TCP congestion control
370#
371CONFIG_TCP_CONG_BIC=y 368CONFIG_TCP_CONG_BIC=y
372CONFIG_TCP_CONG_WESTWOOD=m
373CONFIG_TCP_CONG_HTCP=m
374# CONFIG_TCP_CONG_HSTCP is not set
375# CONFIG_TCP_CONG_HYBLA is not set
376# CONFIG_TCP_CONG_VEGAS is not set
377# CONFIG_TCP_CONG_SCALABLE is not set
378# CONFIG_IPV6 is not set 369# CONFIG_IPV6 is not set
379# CONFIG_NETFILTER is not set 370# CONFIG_NETFILTER is not set
380 371
@@ -932,4 +923,3 @@ CONFIG_CRC32=y
932# CONFIG_LIBCRC32C is not set 923# CONFIG_LIBCRC32C is not set
933CONFIG_ZLIB_INFLATE=y 924CONFIG_ZLIB_INFLATE=y
934CONFIG_ZLIB_DEFLATE=y 925CONFIG_ZLIB_DEFLATE=y
935# CONFIG_TEXTSEARCH is not set
diff --git a/arch/arm/configs/ixdp2801_defconfig b/arch/arm/configs/ixdp2801_defconfig
index b1e162f29cb9..2d6f960e3395 100644
--- a/arch/arm/configs/ixdp2801_defconfig
+++ b/arch/arm/configs/ixdp2801_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.12-git6 3# Linux kernel version: 2.6.13-rc2
4# Sat Jun 25 01:01:18 2005 4# Thu Jul 7 16:49:13 2005
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -138,6 +138,7 @@ CONFIG_PCI_NAMES=y
138# 138#
139# CONFIG_SMP is not set 139# CONFIG_SMP is not set
140# CONFIG_PREEMPT is not set 140# CONFIG_PREEMPT is not set
141# CONFIG_NO_IDLE_HZ is not set
141# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set 142# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
142CONFIG_SELECT_MEMORY_MODEL=y 143CONFIG_SELECT_MEMORY_MODEL=y
143CONFIG_FLATMEM_MANUAL=y 144CONFIG_FLATMEM_MANUAL=y
@@ -346,10 +347,9 @@ CONFIG_PACKET_MMAP=y
346CONFIG_UNIX=y 347CONFIG_UNIX=y
347# CONFIG_NET_KEY is not set 348# CONFIG_NET_KEY is not set
348CONFIG_INET=y 349CONFIG_INET=y
349CONFIG_IP_FIB_HASH=y
350# CONFIG_IP_FIB_TRIE is not set
351# CONFIG_IP_MULTICAST is not set 350# CONFIG_IP_MULTICAST is not set
352# CONFIG_IP_ADVANCED_ROUTER is not set 351# CONFIG_IP_ADVANCED_ROUTER is not set
352CONFIG_IP_FIB_HASH=y
353CONFIG_IP_PNP=y 353CONFIG_IP_PNP=y
354CONFIG_IP_PNP_DHCP=y 354CONFIG_IP_PNP_DHCP=y
355CONFIG_IP_PNP_BOOTP=y 355CONFIG_IP_PNP_BOOTP=y
@@ -364,17 +364,8 @@ CONFIG_SYN_COOKIES=y
364# CONFIG_INET_TUNNEL is not set 364# CONFIG_INET_TUNNEL is not set
365# CONFIG_IP_TCPDIAG is not set 365# CONFIG_IP_TCPDIAG is not set
366# CONFIG_IP_TCPDIAG_IPV6 is not set 366# CONFIG_IP_TCPDIAG_IPV6 is not set
367 367# CONFIG_TCP_CONG_ADVANCED is not set
368#
369# TCP congestion control
370#
371CONFIG_TCP_CONG_BIC=y 368CONFIG_TCP_CONG_BIC=y
372CONFIG_TCP_CONG_WESTWOOD=m
373CONFIG_TCP_CONG_HTCP=m
374# CONFIG_TCP_CONG_HSTCP is not set
375# CONFIG_TCP_CONG_HYBLA is not set
376# CONFIG_TCP_CONG_VEGAS is not set
377# CONFIG_TCP_CONG_SCALABLE is not set
378# CONFIG_IPV6 is not set 369# CONFIG_IPV6 is not set
379# CONFIG_NETFILTER is not set 370# CONFIG_NETFILTER is not set
380 371
@@ -933,4 +924,3 @@ CONFIG_CRC32=y
933# CONFIG_LIBCRC32C is not set 924# CONFIG_LIBCRC32C is not set
934CONFIG_ZLIB_INFLATE=y 925CONFIG_ZLIB_INFLATE=y
935CONFIG_ZLIB_DEFLATE=y 926CONFIG_ZLIB_DEFLATE=y
936# CONFIG_TEXTSEARCH is not set
diff --git a/arch/arm/configs/omap_h2_1610_defconfig b/arch/arm/configs/omap_h2_1610_defconfig
index 4e58d9341bce..24955263b096 100644
--- a/arch/arm/configs/omap_h2_1610_defconfig
+++ b/arch/arm/configs/omap_h2_1610_defconfig
@@ -1,14 +1,13 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.12-rc1-bk2 3# Linux kernel version: 2.6.13-rc2
4# Sun Mar 27 17:52:41 2005 4# Fri Jul 8 04:49:34 2005
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_MMU=y 7CONFIG_MMU=y
8CONFIG_UID16=y 8CONFIG_UID16=y
9CONFIG_RWSEM_GENERIC_SPINLOCK=y 9CONFIG_RWSEM_GENERIC_SPINLOCK=y
10CONFIG_GENERIC_CALIBRATE_DELAY=y 10CONFIG_GENERIC_CALIBRATE_DELAY=y
11CONFIG_GENERIC_IOMAP=y
12 11
13# 12#
14# Code maturity level options 13# Code maturity level options
@@ -17,6 +16,7 @@ CONFIG_EXPERIMENTAL=y
17CONFIG_CLEAN_COMPILE=y 16CONFIG_CLEAN_COMPILE=y
18CONFIG_BROKEN_ON_SMP=y 17CONFIG_BROKEN_ON_SMP=y
19CONFIG_LOCK_KERNEL=y 18CONFIG_LOCK_KERNEL=y
19CONFIG_INIT_ENV_ARG_LIMIT=32
20 20
21# 21#
22# General setup 22# General setup
@@ -33,8 +33,9 @@ CONFIG_KOBJECT_UEVENT=y
33# CONFIG_IKCONFIG is not set 33# CONFIG_IKCONFIG is not set
34# CONFIG_EMBEDDED is not set 34# CONFIG_EMBEDDED is not set
35CONFIG_KALLSYMS=y 35CONFIG_KALLSYMS=y
36# CONFIG_KALLSYMS_ALL is not set
37# CONFIG_KALLSYMS_EXTRA_PASS is not set 36# CONFIG_KALLSYMS_EXTRA_PASS is not set
37CONFIG_PRINTK=y
38CONFIG_BUG=y
38CONFIG_BASE_FULL=y 39CONFIG_BASE_FULL=y
39CONFIG_FUTEX=y 40CONFIG_FUTEX=y
40CONFIG_EPOLL=y 41CONFIG_EPOLL=y
@@ -82,10 +83,28 @@ CONFIG_ARCH_OMAP=y
82# CONFIG_ARCH_VERSATILE is not set 83# CONFIG_ARCH_VERSATILE is not set
83# CONFIG_ARCH_IMX is not set 84# CONFIG_ARCH_IMX is not set
84# CONFIG_ARCH_H720X is not set 85# CONFIG_ARCH_H720X is not set
86# CONFIG_ARCH_AAEC2000 is not set
85 87
86# 88#
87# TI OMAP Implementations 89# TI OMAP Implementations
88# 90#
91CONFIG_ARCH_OMAP_OTG=y
92CONFIG_ARCH_OMAP1=y
93# CONFIG_ARCH_OMAP2 is not set
94
95#
96# OMAP Feature Selections
97#
98# CONFIG_OMAP_RESET_CLOCKS is not set
99CONFIG_OMAP_MUX=y
100# CONFIG_OMAP_MUX_DEBUG is not set
101CONFIG_OMAP_MUX_WARNINGS=y
102# CONFIG_OMAP_MPU_TIMER is not set
103CONFIG_OMAP_32K_TIMER=y
104CONFIG_OMAP_32K_TIMER_HZ=128
105CONFIG_OMAP_LL_DEBUG_UART1=y
106# CONFIG_OMAP_LL_DEBUG_UART2 is not set
107# CONFIG_OMAP_LL_DEBUG_UART3 is not set
89 108
90# 109#
91# OMAP Core Type 110# OMAP Core Type
@@ -93,7 +112,6 @@ CONFIG_ARCH_OMAP=y
93# CONFIG_ARCH_OMAP730 is not set 112# CONFIG_ARCH_OMAP730 is not set
94# CONFIG_ARCH_OMAP1510 is not set 113# CONFIG_ARCH_OMAP1510 is not set
95CONFIG_ARCH_OMAP16XX=y 114CONFIG_ARCH_OMAP16XX=y
96CONFIG_ARCH_OMAP_OTG=y
97 115
98# 116#
99# OMAP Board Type 117# OMAP Board Type
@@ -101,21 +119,14 @@ CONFIG_ARCH_OMAP_OTG=y
101# CONFIG_MACH_OMAP_INNOVATOR is not set 119# CONFIG_MACH_OMAP_INNOVATOR is not set
102CONFIG_MACH_OMAP_H2=y 120CONFIG_MACH_OMAP_H2=y
103# CONFIG_MACH_OMAP_H3 is not set 121# CONFIG_MACH_OMAP_H3 is not set
104# CONFIG_MACH_OMAP_H4 is not set
105# CONFIG_MACH_OMAP_OSK is not set 122# CONFIG_MACH_OMAP_OSK is not set
106# CONFIG_MACH_OMAP_GENERIC is not set 123# CONFIG_MACH_OMAP_GENERIC is not set
107 124
108# 125#
109# OMAP Feature Selections 126# OMAP CPU Speed
110# 127#
111CONFIG_OMAP_MUX=y 128# CONFIG_OMAP_CLOCKS_SET_BY_BOOTLOADER is not set
112# CONFIG_OMAP_MUX_DEBUG is not set 129# CONFIG_OMAP_ARM_216MHZ is not set
113CONFIG_OMAP_MUX_WARNINGS=y
114CONFIG_OMAP_MPU_TIMER=y
115# CONFIG_OMAP_32K_TIMER is not set
116CONFIG_OMAP_LL_DEBUG_UART1=y
117# CONFIG_OMAP_LL_DEBUG_UART2 is not set
118# CONFIG_OMAP_LL_DEBUG_UART3 is not set
119CONFIG_OMAP_ARM_192MHZ=y 130CONFIG_OMAP_ARM_192MHZ=y
120# CONFIG_OMAP_ARM_168MHZ is not set 131# CONFIG_OMAP_ARM_168MHZ is not set
121# CONFIG_OMAP_ARM_120MHZ is not set 132# CONFIG_OMAP_ARM_120MHZ is not set
@@ -145,6 +156,7 @@ CONFIG_ARM_THUMB=y
145# 156#
146# Bus support 157# Bus support
147# 158#
159CONFIG_ISA_DMA_API=y
148 160
149# 161#
150# PCCARD (PCMCIA/CardBus) support 162# PCCARD (PCMCIA/CardBus) support
@@ -154,7 +166,16 @@ CONFIG_ARM_THUMB=y
154# 166#
155# Kernel Features 167# Kernel Features
156# 168#
169# CONFIG_SMP is not set
157CONFIG_PREEMPT=y 170CONFIG_PREEMPT=y
171CONFIG_NO_IDLE_HZ=y
172# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
173CONFIG_SELECT_MEMORY_MODEL=y
174CONFIG_FLATMEM_MANUAL=y
175# CONFIG_DISCONTIGMEM_MANUAL is not set
176# CONFIG_SPARSEMEM_MANUAL is not set
177CONFIG_FLATMEM=y
178CONFIG_FLAT_NODE_MEM_MAP=y
158# CONFIG_LEDS is not set 179# CONFIG_LEDS is not set
159CONFIG_ALIGNMENT_TRAP=y 180CONFIG_ALIGNMENT_TRAP=y
160 181
@@ -167,6 +188,22 @@ CONFIG_CMDLINE="mem=32M console=ttyS0,115200n8 root=0801 ro init=/bin/sh"
167# CONFIG_XIP_KERNEL is not set 188# CONFIG_XIP_KERNEL is not set
168 189
169# 190#
191# CPU Frequency scaling
192#
193CONFIG_CPU_FREQ=y
194CONFIG_CPU_FREQ_TABLE=y
195# CONFIG_CPU_FREQ_DEBUG is not set
196CONFIG_CPU_FREQ_STAT=y
197# CONFIG_CPU_FREQ_STAT_DETAILS is not set
198# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
199CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
200# CONFIG_CPU_FREQ_GOV_PERFORMANCE is not set
201# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
202CONFIG_CPU_FREQ_GOV_USERSPACE=y
203# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set
204# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
205
206#
170# Floating point emulation 207# Floating point emulation
171# 208#
172 209
@@ -202,7 +239,6 @@ CONFIG_PM=y
202CONFIG_STANDALONE=y 239CONFIG_STANDALONE=y
203CONFIG_PREVENT_FIRMWARE_BUILD=y 240CONFIG_PREVENT_FIRMWARE_BUILD=y
204# CONFIG_FW_LOADER is not set 241# CONFIG_FW_LOADER is not set
205CONFIG_DEBUG_DRIVER=y
206 242
207# 243#
208# Memory Technology Devices (MTD) 244# Memory Technology Devices (MTD)
@@ -292,7 +328,6 @@ CONFIG_MTD_CFI_UTIL=y
292# 328#
293# Block devices 329# Block devices
294# 330#
295# CONFIG_BLK_DEV_FD is not set
296# CONFIG_BLK_DEV_COW_COMMON is not set 331# CONFIG_BLK_DEV_COW_COMMON is not set
297CONFIG_BLK_DEV_LOOP=y 332CONFIG_BLK_DEV_LOOP=y
298# CONFIG_BLK_DEV_CRYPTOLOOP is not set 333# CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -327,6 +362,7 @@ CONFIG_SCSI_PROC_FS=y
327# CONFIG_CHR_DEV_OSST is not set 362# CONFIG_CHR_DEV_OSST is not set
328# CONFIG_BLK_DEV_SR is not set 363# CONFIG_BLK_DEV_SR is not set
329# CONFIG_CHR_DEV_SG is not set 364# CONFIG_CHR_DEV_SG is not set
365# CONFIG_CHR_DEV_SCH is not set
330 366
331# 367#
332# Some SCSI devices (e.g. CD jukebox) support multiple LUNs 368# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
@@ -356,6 +392,7 @@ CONFIG_SCSI_PROC_FS=y
356# 392#
357# Fusion MPT device support 393# Fusion MPT device support
358# 394#
395# CONFIG_FUSION is not set
359 396
360# 397#
361# IEEE 1394 (FireWire) support 398# IEEE 1394 (FireWire) support
@@ -375,12 +412,12 @@ CONFIG_NET=y
375# 412#
376CONFIG_PACKET=y 413CONFIG_PACKET=y
377# CONFIG_PACKET_MMAP is not set 414# CONFIG_PACKET_MMAP is not set
378# CONFIG_NETLINK_DEV is not set
379CONFIG_UNIX=y 415CONFIG_UNIX=y
380# CONFIG_NET_KEY is not set 416# CONFIG_NET_KEY is not set
381CONFIG_INET=y 417CONFIG_INET=y
382# CONFIG_IP_MULTICAST is not set 418# CONFIG_IP_MULTICAST is not set
383# CONFIG_IP_ADVANCED_ROUTER is not set 419# CONFIG_IP_ADVANCED_ROUTER is not set
420CONFIG_IP_FIB_HASH=y
384CONFIG_IP_PNP=y 421CONFIG_IP_PNP=y
385CONFIG_IP_PNP_DHCP=y 422CONFIG_IP_PNP_DHCP=y
386CONFIG_IP_PNP_BOOTP=y 423CONFIG_IP_PNP_BOOTP=y
@@ -395,6 +432,8 @@ CONFIG_IP_PNP_BOOTP=y
395# CONFIG_INET_TUNNEL is not set 432# CONFIG_INET_TUNNEL is not set
396CONFIG_IP_TCPDIAG=y 433CONFIG_IP_TCPDIAG=y
397# CONFIG_IP_TCPDIAG_IPV6 is not set 434# CONFIG_IP_TCPDIAG_IPV6 is not set
435# CONFIG_TCP_CONG_ADVANCED is not set
436CONFIG_TCP_CONG_BIC=y
398# CONFIG_IPV6 is not set 437# CONFIG_IPV6 is not set
399# CONFIG_NETFILTER is not set 438# CONFIG_NETFILTER is not set
400 439
@@ -442,6 +481,7 @@ CONFIG_NETDEVICES=y
442CONFIG_NET_ETHERNET=y 481CONFIG_NET_ETHERNET=y
443CONFIG_MII=y 482CONFIG_MII=y
444CONFIG_SMC91X=y 483CONFIG_SMC91X=y
484# CONFIG_DM9000 is not set
445 485
446# 486#
447# Ethernet (1000 Mbit) 487# Ethernet (1000 Mbit)
@@ -518,7 +558,6 @@ CONFIG_SERIO=y
518CONFIG_SERIO_SERPORT=y 558CONFIG_SERIO_SERPORT=y
519# CONFIG_SERIO_RAW is not set 559# CONFIG_SERIO_RAW is not set
520# CONFIG_GAMEPORT is not set 560# CONFIG_GAMEPORT is not set
521CONFIG_SOUND_GAMEPORT=y
522 561
523# 562#
524# Character devices 563# Character devices
@@ -567,13 +606,11 @@ CONFIG_WATCHDOG_NOWAYOUT=y
567# 606#
568# Ftape, the floppy tape device driver 607# Ftape, the floppy tape device driver
569# 608#
570# CONFIG_DRM is not set
571# CONFIG_RAW_DRIVER is not set 609# CONFIG_RAW_DRIVER is not set
572 610
573# 611#
574# TPM devices 612# TPM devices
575# 613#
576# CONFIG_TCG_TPM is not set
577 614
578# 615#
579# I2C support 616# I2C support
@@ -604,7 +641,9 @@ CONFIG_I2C_CHARDEV=y
604# CONFIG_SENSORS_ADM1025 is not set 641# CONFIG_SENSORS_ADM1025 is not set
605# CONFIG_SENSORS_ADM1026 is not set 642# CONFIG_SENSORS_ADM1026 is not set
606# CONFIG_SENSORS_ADM1031 is not set 643# CONFIG_SENSORS_ADM1031 is not set
644# CONFIG_SENSORS_ADM9240 is not set
607# CONFIG_SENSORS_ASB100 is not set 645# CONFIG_SENSORS_ASB100 is not set
646# CONFIG_SENSORS_ATXP1 is not set
608# CONFIG_SENSORS_DS1621 is not set 647# CONFIG_SENSORS_DS1621 is not set
609# CONFIG_SENSORS_FSCHER is not set 648# CONFIG_SENSORS_FSCHER is not set
610# CONFIG_SENSORS_FSCPOS is not set 649# CONFIG_SENSORS_FSCPOS is not set
@@ -620,6 +659,7 @@ CONFIG_I2C_CHARDEV=y
620# CONFIG_SENSORS_LM85 is not set 659# CONFIG_SENSORS_LM85 is not set
621# CONFIG_SENSORS_LM87 is not set 660# CONFIG_SENSORS_LM87 is not set
622# CONFIG_SENSORS_LM90 is not set 661# CONFIG_SENSORS_LM90 is not set
662# CONFIG_SENSORS_LM92 is not set
623# CONFIG_SENSORS_MAX1619 is not set 663# CONFIG_SENSORS_MAX1619 is not set
624# CONFIG_SENSORS_PC87360 is not set 664# CONFIG_SENSORS_PC87360 is not set
625# CONFIG_SENSORS_SMSC47B397 is not set 665# CONFIG_SENSORS_SMSC47B397 is not set
@@ -627,15 +667,21 @@ CONFIG_I2C_CHARDEV=y
627# CONFIG_SENSORS_W83781D is not set 667# CONFIG_SENSORS_W83781D is not set
628# CONFIG_SENSORS_W83L785TS is not set 668# CONFIG_SENSORS_W83L785TS is not set
629# CONFIG_SENSORS_W83627HF is not set 669# CONFIG_SENSORS_W83627HF is not set
670# CONFIG_SENSORS_W83627EHF is not set
630 671
631# 672#
632# Other I2C Chip support 673# Other I2C Chip support
633# 674#
675# CONFIG_SENSORS_DS1337 is not set
676# CONFIG_SENSORS_DS1374 is not set
634# CONFIG_SENSORS_EEPROM is not set 677# CONFIG_SENSORS_EEPROM is not set
635# CONFIG_SENSORS_PCF8574 is not set 678# CONFIG_SENSORS_PCF8574 is not set
679# CONFIG_SENSORS_PCA9539 is not set
636# CONFIG_SENSORS_PCF8591 is not set 680# CONFIG_SENSORS_PCF8591 is not set
637# CONFIG_SENSORS_RTC8564 is not set 681# CONFIG_SENSORS_RTC8564 is not set
638CONFIG_ISP1301_OMAP=y 682CONFIG_ISP1301_OMAP=y
683CONFIG_TPS65010=y
684# CONFIG_SENSORS_MAX6875 is not set
639# CONFIG_I2C_DEBUG_CORE is not set 685# CONFIG_I2C_DEBUG_CORE is not set
640# CONFIG_I2C_DEBUG_ALGO is not set 686# CONFIG_I2C_DEBUG_ALGO is not set
641# CONFIG_I2C_DEBUG_BUS is not set 687# CONFIG_I2C_DEBUG_BUS is not set
@@ -663,8 +709,10 @@ CONFIG_FB=y
663# CONFIG_FB_CFB_COPYAREA is not set 709# CONFIG_FB_CFB_COPYAREA is not set
664# CONFIG_FB_CFB_IMAGEBLIT is not set 710# CONFIG_FB_CFB_IMAGEBLIT is not set
665# CONFIG_FB_SOFT_CURSOR is not set 711# CONFIG_FB_SOFT_CURSOR is not set
712# CONFIG_FB_MACMODES is not set
666CONFIG_FB_MODE_HELPERS=y 713CONFIG_FB_MODE_HELPERS=y
667# CONFIG_FB_TILEBLITTING is not set 714# CONFIG_FB_TILEBLITTING is not set
715# CONFIG_FB_S1D13XXX is not set
668# CONFIG_FB_VIRTUAL is not set 716# CONFIG_FB_VIRTUAL is not set
669 717
670# 718#
@@ -677,11 +725,13 @@ CONFIG_FONTS=y
677CONFIG_FONT_8x8=y 725CONFIG_FONT_8x8=y
678CONFIG_FONT_8x16=y 726CONFIG_FONT_8x16=y
679# CONFIG_FONT_6x11 is not set 727# CONFIG_FONT_6x11 is not set
728# CONFIG_FONT_7x14 is not set
680# CONFIG_FONT_PEARL_8x8 is not set 729# CONFIG_FONT_PEARL_8x8 is not set
681# CONFIG_FONT_ACORN_8x8 is not set 730# CONFIG_FONT_ACORN_8x8 is not set
682# CONFIG_FONT_MINI_4x6 is not set 731# CONFIG_FONT_MINI_4x6 is not set
683# CONFIG_FONT_SUN8x16 is not set 732# CONFIG_FONT_SUN8x16 is not set
684# CONFIG_FONT_SUN12x22 is not set 733# CONFIG_FONT_SUN12x22 is not set
734# CONFIG_FONT_10x18 is not set
685 735
686# 736#
687# Logo configuration 737# Logo configuration
@@ -729,14 +779,14 @@ CONFIG_USB_ARCH_HAS_OHCI=y
729# 779#
730CONFIG_USB_GADGET=y 780CONFIG_USB_GADGET=y
731# CONFIG_USB_GADGET_DEBUG_FILES is not set 781# CONFIG_USB_GADGET_DEBUG_FILES is not set
782CONFIG_USB_GADGET_SELECTED=y
732# CONFIG_USB_GADGET_NET2280 is not set 783# CONFIG_USB_GADGET_NET2280 is not set
733# CONFIG_USB_GADGET_PXA2XX is not set 784# CONFIG_USB_GADGET_PXA2XX is not set
734# CONFIG_USB_GADGET_GOKU is not set 785# CONFIG_USB_GADGET_GOKU is not set
735# CONFIG_USB_GADGET_SA1100 is not set
736# CONFIG_USB_GADGET_LH7A40X is not set 786# CONFIG_USB_GADGET_LH7A40X is not set
737# CONFIG_USB_GADGET_DUMMY_HCD is not set
738CONFIG_USB_GADGET_OMAP=y 787CONFIG_USB_GADGET_OMAP=y
739CONFIG_USB_OMAP=y 788CONFIG_USB_OMAP=y
789# CONFIG_USB_GADGET_DUMMY_HCD is not set
740# CONFIG_USB_GADGET_DUALSPEED is not set 790# CONFIG_USB_GADGET_DUALSPEED is not set
741# CONFIG_USB_ZERO is not set 791# CONFIG_USB_ZERO is not set
742CONFIG_USB_ETH=y 792CONFIG_USB_ETH=y
@@ -755,6 +805,7 @@ CONFIG_USB_ETH_RNDIS=y
755# 805#
756CONFIG_EXT2_FS=y 806CONFIG_EXT2_FS=y
757# CONFIG_EXT2_FS_XATTR is not set 807# CONFIG_EXT2_FS_XATTR is not set
808# CONFIG_EXT2_FS_XIP is not set
758# CONFIG_EXT3_FS is not set 809# CONFIG_EXT3_FS is not set
759# CONFIG_JBD is not set 810# CONFIG_JBD is not set
760# CONFIG_REISERFS_FS is not set 811# CONFIG_REISERFS_FS is not set
@@ -791,7 +842,6 @@ CONFIG_FAT_DEFAULT_CODEPAGE=437
791# 842#
792CONFIG_PROC_FS=y 843CONFIG_PROC_FS=y
793CONFIG_SYSFS=y 844CONFIG_SYSFS=y
794# CONFIG_DEVFS_FS is not set
795# CONFIG_DEVPTS_FS_XATTR is not set 845# CONFIG_DEVPTS_FS_XATTR is not set
796# CONFIG_TMPFS is not set 846# CONFIG_TMPFS is not set
797# CONFIG_HUGETLB_PAGE is not set 847# CONFIG_HUGETLB_PAGE is not set
@@ -828,12 +878,14 @@ CONFIG_CRAMFS=y
828# 878#
829CONFIG_NFS_FS=y 879CONFIG_NFS_FS=y
830CONFIG_NFS_V3=y 880CONFIG_NFS_V3=y
881# CONFIG_NFS_V3_ACL is not set
831CONFIG_NFS_V4=y 882CONFIG_NFS_V4=y
832# CONFIG_NFS_DIRECTIO is not set 883# CONFIG_NFS_DIRECTIO is not set
833# CONFIG_NFSD is not set 884# CONFIG_NFSD is not set
834CONFIG_ROOT_NFS=y 885CONFIG_ROOT_NFS=y
835CONFIG_LOCKD=y 886CONFIG_LOCKD=y
836CONFIG_LOCKD_V4=y 887CONFIG_LOCKD_V4=y
888CONFIG_NFS_COMMON=y
837CONFIG_SUNRPC=y 889CONFIG_SUNRPC=y
838CONFIG_SUNRPC_GSS=y 890CONFIG_SUNRPC_GSS=y
839CONFIG_RPCSEC_GSS_KRB5=y 891CONFIG_RPCSEC_GSS_KRB5=y
@@ -903,24 +955,11 @@ CONFIG_NLS_DEFAULT="iso8859-1"
903# Kernel hacking 955# Kernel hacking
904# 956#
905# CONFIG_PRINTK_TIME is not set 957# CONFIG_PRINTK_TIME is not set
906CONFIG_DEBUG_KERNEL=y 958# CONFIG_DEBUG_KERNEL is not set
907# CONFIG_MAGIC_SYSRQ is not set
908CONFIG_LOG_BUF_SHIFT=14 959CONFIG_LOG_BUF_SHIFT=14
909# CONFIG_SCHEDSTATS is not set
910# CONFIG_DEBUG_SLAB is not set
911CONFIG_DEBUG_PREEMPT=y
912# CONFIG_DEBUG_SPINLOCK is not set
913# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
914# CONFIG_DEBUG_KOBJECT is not set
915CONFIG_DEBUG_BUGVERBOSE=y 960CONFIG_DEBUG_BUGVERBOSE=y
916CONFIG_DEBUG_INFO=y
917# CONFIG_DEBUG_FS is not set
918CONFIG_FRAME_POINTER=y 961CONFIG_FRAME_POINTER=y
919CONFIG_DEBUG_USER=y 962# CONFIG_DEBUG_USER is not set
920# CONFIG_DEBUG_WAITQ is not set
921CONFIG_DEBUG_ERRORS=y
922CONFIG_DEBUG_LL=y
923# CONFIG_DEBUG_ICEDCC is not set
924 963
925# 964#
926# Security options 965# Security options
diff --git a/arch/arm/mach-ixp2000/core.c b/arch/arm/mach-ixp2000/core.c
index 4b9d841e04c1..45b18658499f 100644
--- a/arch/arm/mach-ixp2000/core.c
+++ b/arch/arm/mach-ixp2000/core.c
@@ -23,7 +23,7 @@
23#include <linux/serial.h> 23#include <linux/serial.h>
24#include <linux/tty.h> 24#include <linux/tty.h>
25#include <linux/bitops.h> 25#include <linux/bitops.h>
26#include <linux/serial_core.h> 26#include <linux/serial_8250.h>
27#include <linux/mm.h> 27#include <linux/mm.h>
28 28
29#include <asm/types.h> 29#include <asm/types.h>
@@ -125,19 +125,6 @@ static struct map_desc ixp2000_io_desc[] __initdata = {
125 } 125 }
126}; 126};
127 127
128static struct uart_port ixp2000_serial_port = {
129 .membase = (char *)(IXP2000_UART_VIRT_BASE + 3),
130 .mapbase = IXP2000_UART_PHYS_BASE + 3,
131 .irq = IRQ_IXP2000_UART,
132 .flags = UPF_SKIP_TEST,
133 .iotype = UPIO_MEM,
134 .regshift = 2,
135 .uartclk = 50000000,
136 .line = 0,
137 .type = PORT_XSCALE,
138 .fifosize = 16
139};
140
141void __init ixp2000_map_io(void) 128void __init ixp2000_map_io(void)
142{ 129{
143 extern unsigned int processor_id; 130 extern unsigned int processor_id;
@@ -157,12 +144,50 @@ void __init ixp2000_map_io(void)
157 } 144 }
158 145
159 iotable_init(ixp2000_io_desc, ARRAY_SIZE(ixp2000_io_desc)); 146 iotable_init(ixp2000_io_desc, ARRAY_SIZE(ixp2000_io_desc));
160 early_serial_setup(&ixp2000_serial_port);
161 147
162 /* Set slowport to 8-bit mode. */ 148 /* Set slowport to 8-bit mode. */
163 ixp2000_reg_write(IXP2000_SLOWPORT_FRM, 1); 149 ixp2000_reg_write(IXP2000_SLOWPORT_FRM, 1);
164} 150}
165 151
152
153/*************************************************************************
154 * Serial port support for IXP2000
155 *************************************************************************/
156static struct plat_serial8250_port ixp2000_serial_port[] = {
157 {
158 .mapbase = IXP2000_UART_PHYS_BASE,
159 .membase = (char *)(IXP2000_UART_VIRT_BASE + 3),
160 .irq = IRQ_IXP2000_UART,
161 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
162 .iotype = UPIO_MEM,
163 .regshift = 2,
164 .uartclk = 50000000,
165 },
166 { },
167};
168
169static struct resource ixp2000_uart_resource = {
170 .start = IXP2000_UART_PHYS_BASE,
171 .end = IXP2000_UART_PHYS_BASE + 0xffff,
172 .flags = IORESOURCE_MEM,
173};
174
175static struct platform_device ixp2000_serial_device = {
176 .name = "serial8250",
177 .id = 0,
178 .dev = {
179 .platform_data = ixp2000_serial_port,
180 },
181 .num_resources = 1,
182 .resource = &ixp2000_uart_resource,
183};
184
185void __init ixp2000_uart_init(void)
186{
187 platform_device_register(&ixp2000_serial_device);
188}
189
190
166/************************************************************************* 191/*************************************************************************
167 * Timer-tick functions for IXP2000 192 * Timer-tick functions for IXP2000
168 *************************************************************************/ 193 *************************************************************************/
diff --git a/arch/arm/mach-ixp2000/enp2611.c b/arch/arm/mach-ixp2000/enp2611.c
index b7ebf3898fc5..9aa54de44740 100644
--- a/arch/arm/mach-ixp2000/enp2611.c
+++ b/arch/arm/mach-ixp2000/enp2611.c
@@ -219,6 +219,7 @@ static struct platform_device *enp2611_devices[] __initdata = {
219static void __init enp2611_init_machine(void) 219static void __init enp2611_init_machine(void)
220{ 220{
221 platform_add_devices(enp2611_devices, ARRAY_SIZE(enp2611_devices)); 221 platform_add_devices(enp2611_devices, ARRAY_SIZE(enp2611_devices));
222 ixp2000_uart_init();
222} 223}
223 224
224 225
diff --git a/arch/arm/mach-ixp2000/ixdp2x00.c b/arch/arm/mach-ixp2000/ixdp2x00.c
index 5e4380747b53..a43369ad876c 100644
--- a/arch/arm/mach-ixp2000/ixdp2x00.c
+++ b/arch/arm/mach-ixp2000/ixdp2x00.c
@@ -303,5 +303,6 @@ void __init ixdp2x00_init_machine(void)
303 gpio_line_config(IXDP2X00_GPIO_I2C_ENABLE, GPIO_OUT); 303 gpio_line_config(IXDP2X00_GPIO_I2C_ENABLE, GPIO_OUT);
304 304
305 platform_add_devices(ixdp2x00_devices, ARRAY_SIZE(ixdp2x00_devices)); 305 platform_add_devices(ixdp2x00_devices, ARRAY_SIZE(ixdp2x00_devices));
306 ixp2000_uart_init();
306} 307}
307 308
diff --git a/arch/arm/mach-ixp2000/ixdp2x01.c b/arch/arm/mach-ixp2000/ixdp2x01.c
index c73588743ee1..43447dad1657 100644
--- a/arch/arm/mach-ixp2000/ixdp2x01.c
+++ b/arch/arm/mach-ixp2000/ixdp2x01.c
@@ -370,6 +370,7 @@ static void __init ixdp2x01_init_machine(void)
370 ((*IXDP2X01_CPLD_FLASH_REG & IXDP2X01_CPLD_FLASH_BANK_MASK) + 1); 370 ((*IXDP2X01_CPLD_FLASH_REG & IXDP2X01_CPLD_FLASH_BANK_MASK) + 1);
371 371
372 platform_add_devices(ixdp2x01_devices, ARRAY_SIZE(ixdp2x01_devices)); 372 platform_add_devices(ixdp2x01_devices, ARRAY_SIZE(ixdp2x01_devices));
373 ixp2000_uart_init();
373} 374}
374 375
375 376
diff --git a/arch/arm/mach-omap/Kconfig b/arch/arm/mach-omap/Kconfig
deleted file mode 100644
index 9e42efa66b2b..000000000000
--- a/arch/arm/mach-omap/Kconfig
+++ /dev/null
@@ -1,221 +0,0 @@
1if ARCH_OMAP
2
3menu "TI OMAP Implementations"
4
5comment "OMAP Core Type"
6
7config ARCH_OMAP730
8 depends on ARCH_OMAP
9 bool "OMAP730 Based System"
10 select ARCH_OMAP_OTG
11
12config ARCH_OMAP1510
13 depends on ARCH_OMAP
14 default y
15 bool "OMAP1510 Based System"
16
17config ARCH_OMAP16XX
18 depends on ARCH_OMAP
19 bool "OMAP16XX Based System"
20 select ARCH_OMAP_OTG
21
22config ARCH_OMAP_OTG
23 bool
24
25comment "OMAP Board Type"
26
27config MACH_OMAP_INNOVATOR
28 bool "TI Innovator"
29 depends on ARCH_OMAP1510 || ARCH_OMAP16XX
30 help
31 TI OMAP 1510 or 1610 Innovator board support. Say Y here if you
32 have such a board.
33
34config MACH_OMAP_H2
35 bool "TI H2 Support"
36 depends on ARCH_OMAP16XX
37 help
38 TI OMAP 1610/1611B H2 board support. Say Y here if you have such
39 a board.
40
41config MACH_OMAP_H3
42 bool "TI H3 Support"
43 depends on ARCH_OMAP16XX
44 help
45 TI OMAP 1710 H3 board support. Say Y here if you have such
46 a board.
47
48config MACH_OMAP_H4
49 bool "TI H4 Support"
50 depends on ARCH_OMAP16XX
51 help
52 TI OMAP 1610 H4 board support. Say Y here if you have such
53 a board.
54
55config MACH_OMAP_OSK
56 bool "TI OSK Support"
57 depends on ARCH_OMAP16XX
58 help
59 TI OMAP 5912 OSK (OMAP Starter Kit) board support. Say Y here
60 if you have such a board.
61
62config MACH_OMAP_PERSEUS2
63 bool "TI Perseus2"
64 depends on ARCH_OMAP730
65 help
66 Support for TI OMAP 730 Perseus2 board. Say Y here if you have such
67 a board.
68
69config MACH_VOICEBLUE
70 bool "Voiceblue"
71 depends on ARCH_OMAP1510
72 help
73 Support for Voiceblue GSM/VoIP gateway. Say Y here if you have such
74 board.
75
76config MACH_NETSTAR
77 bool "NetStar"
78 depends on ARCH_OMAP1510
79 help
80 Support for NetStar PBX. Say Y here if you have such a board.
81
82config MACH_OMAP_GENERIC
83 bool "Generic OMAP board"
84 depends on ARCH_OMAP1510 || ARCH_OMAP16XX
85 help
86 Support for generic OMAP-1510, 1610 or 1710 board with
87 no FPGA. Can be used as template for porting Linux to
88 custom OMAP boards. Say Y here if you have a custom
89 board.
90
91comment "OMAP Feature Selections"
92
93#config OMAP_BOOT_TAG
94# bool "OMAP bootloader information passing"
95# depends on ARCH_OMAP
96# default n
97# help
98# Say Y, if you have a bootloader which passes information
99# about your board and its peripheral configuration.
100
101config OMAP_MUX
102 bool "OMAP multiplexing support"
103 depends on ARCH_OMAP
104 default y
105 help
106 Pin multiplexing support for OMAP boards. If your bootloader
107 sets the multiplexing correctly, say N. Otherwise, or if unsure,
108 say Y.
109
110config OMAP_MUX_DEBUG
111 bool "Multiplexing debug output"
112 depends on OMAP_MUX
113 default n
114 help
115 Makes the multiplexing functions print out a lot of debug info.
116 This is useful if you want to find out the correct values of the
117 multiplexing registers.
118
119config OMAP_MUX_WARNINGS
120 bool "Warn about pins the bootloader didn't set up"
121 depends on OMAP_MUX
122 default y
123 help
124 Choose Y here to warn whenever driver initialization logic needs
125 to change the pin multiplexing setup. When there are no warnings
126 printed, it's safe to deselect OMAP_MUX for your product.
127
128choice
129 prompt "System timer"
130 default OMAP_MPU_TIMER
131
132config OMAP_MPU_TIMER
133 bool "Use mpu timer"
134 help
135 Select this option if you want to use the OMAP mpu timer. This
136 timer provides more intra-tick resolution than the 32KHz timer,
137 but consumes more power.
138
139config OMAP_32K_TIMER
140 bool "Use 32KHz timer"
141 depends on ARCH_OMAP16XX
142 help
143 Select this option if you want to enable the OMAP 32KHz timer.
144 This timer saves power compared to the OMAP_MPU_TIMER, and has
145 support for no tick during idle. The 32KHz timer provides less
146 intra-tick resolution than OMAP_MPU_TIMER. The 32KHz timer is
147 currently only available for OMAP-16xx.
148
149endchoice
150
151config OMAP_32K_TIMER_HZ
152 int "Kernel internal timer frequency for 32KHz timer"
153 range 32 1024
154 depends on OMAP_32K_TIMER
155 default "128"
156 help
157 Kernel internal timer frequency should be a divisor of 32768,
158 such as 64 or 128.
159
160choice
161 prompt "Low-level debug console UART"
162 depends on ARCH_OMAP
163 default OMAP_LL_DEBUG_UART1
164
165config OMAP_LL_DEBUG_UART1
166 bool "UART1"
167
168config OMAP_LL_DEBUG_UART2
169 bool "UART2"
170
171config OMAP_LL_DEBUG_UART3
172 bool "UART3"
173
174endchoice
175
176config OMAP_ARM_195MHZ
177 bool "OMAP ARM 195 MHz CPU"
178 depends on ARCH_OMAP730
179 help
180 Enable 195MHz clock for OMAP CPU. If unsure, say N.
181
182config OMAP_ARM_192MHZ
183 bool "OMAP ARM 192 MHz CPU"
184 depends on ARCH_OMAP16XX
185 help
186 Enable 192MHz clock for OMAP CPU. If unsure, say N.
187
188config OMAP_ARM_182MHZ
189 bool "OMAP ARM 182 MHz CPU"
190 depends on ARCH_OMAP730
191 help
192 Enable 182MHz clock for OMAP CPU. If unsure, say N.
193
194config OMAP_ARM_168MHZ
195 bool "OMAP ARM 168 MHz CPU"
196 depends on ARCH_OMAP1510 || ARCH_OMAP16XX || ARCH_OMAP730
197 help
198 Enable 168MHz clock for OMAP CPU. If unsure, say N.
199
200config OMAP_ARM_120MHZ
201 bool "OMAP ARM 120 MHz CPU"
202 depends on ARCH_OMAP1510 || ARCH_OMAP16XX || ARCH_OMAP730
203 help
204 Enable 120MHz clock for OMAP CPU. If unsure, say N.
205
206config OMAP_ARM_60MHZ
207 bool "OMAP ARM 60 MHz CPU"
208 depends on ARCH_OMAP1510 || ARCH_OMAP16XX || ARCH_OMAP730
209 default y
210 help
211 Enable 60MHz clock for OMAP CPU. If unsure, say Y.
212
213config OMAP_ARM_30MHZ
214 bool "OMAP ARM 30 MHz CPU"
215 depends on ARCH_OMAP1510 || ARCH_OMAP16XX || ARCH_OMAP730
216 help
217 Enable 30MHz clock for OMAP CPU. If unsure, say N.
218
219endmenu
220
221endif
diff --git a/arch/arm/mach-omap/Makefile b/arch/arm/mach-omap/Makefile
deleted file mode 100644
index 4cafb11d2c02..000000000000
--- a/arch/arm/mach-omap/Makefile
+++ /dev/null
@@ -1,40 +0,0 @@
1#
2# Makefile for the linux kernel.
3#
4
5# Common support
6obj-y := common.o time.o irq.o dma.o clock.o mux.o gpio.o mcbsp.o usb.o
7obj-m :=
8obj-n :=
9obj- :=
10led-y := leds.o
11
12# Specific board support
13obj-$(CONFIG_MACH_OMAP_H2) += board-h2.o
14obj-$(CONFIG_MACH_OMAP_INNOVATOR) += board-innovator.o
15obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o
16obj-$(CONFIG_MACH_OMAP_PERSEUS2) += board-perseus2.o
17obj-$(CONFIG_MACH_OMAP_OSK) += board-osk.o
18obj-$(CONFIG_MACH_OMAP_H3) += board-h3.o
19obj-$(CONFIG_MACH_VOICEBLUE) += board-voiceblue.o
20obj-$(CONFIG_MACH_NETSTAR) += board-netstar.o
21
22# OCPI interconnect support for 1710, 1610 and 5912
23obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o
24
25# LEDs support
26led-$(CONFIG_MACH_OMAP_H2) += leds-h2p2-debug.o
27led-$(CONFIG_MACH_OMAP_INNOVATOR) += leds-innovator.o
28led-$(CONFIG_MACH_OMAP_PERSEUS2) += leds-h2p2-debug.o
29obj-$(CONFIG_LEDS) += $(led-y)
30
31# Power Management
32obj-$(CONFIG_PM) += pm.o sleep.o
33
34ifeq ($(CONFIG_ARCH_OMAP1510),y)
35# Innovator-1510 FPGA
36obj-$(CONFIG_MACH_OMAP_INNOVATOR) += fpga.o
37endif
38
39# kgdb support
40obj-$(CONFIG_KGDB_SERIAL) += kgdb-serial.o
diff --git a/arch/arm/mach-omap/common.c b/arch/arm/mach-omap/common.c
deleted file mode 100644
index 265cde48586f..000000000000
--- a/arch/arm/mach-omap/common.c
+++ /dev/null
@@ -1,549 +0,0 @@
1/*
2 * linux/arch/arm/mach-omap/common.c
3 *
4 * Code common to all OMAP machines.
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#include <linux/config.h>
11#include <linux/module.h>
12#include <linux/kernel.h>
13#include <linux/init.h>
14#include <linux/delay.h>
15#include <linux/pm.h>
16#include <linux/console.h>
17#include <linux/serial.h>
18#include <linux/tty.h>
19#include <linux/serial_8250.h>
20#include <linux/serial_reg.h>
21
22#include <asm/hardware.h>
23#include <asm/system.h>
24#include <asm/pgtable.h>
25#include <asm/mach/map.h>
26#include <asm/hardware/clock.h>
27#include <asm/io.h>
28#include <asm/mach-types.h>
29
30#include <asm/arch/board.h>
31#include <asm/arch/mux.h>
32#include <asm/arch/fpga.h>
33
34#include "clock.h"
35
36#define DEBUG 1
37
38struct omap_id {
39 u16 jtag_id; /* Used to determine OMAP type */
40 u8 die_rev; /* Processor revision */
41 u32 omap_id; /* OMAP revision */
42 u32 type; /* Cpu id bits [31:08], cpu class bits [07:00] */
43};
44
45/* Register values to detect the OMAP version */
46static struct omap_id omap_ids[] __initdata = {
47 { .jtag_id = 0x355f, .die_rev = 0x0, .omap_id = 0x03320000, .type = 0x07300100},
48 { .jtag_id = 0xb55f, .die_rev = 0x0, .omap_id = 0x03320000, .type = 0x07300300},
49 { .jtag_id = 0xb470, .die_rev = 0x0, .omap_id = 0x03310100, .type = 0x15100000},
50 { .jtag_id = 0xb576, .die_rev = 0x0, .omap_id = 0x03320000, .type = 0x16100000},
51 { .jtag_id = 0xb576, .die_rev = 0x2, .omap_id = 0x03320100, .type = 0x16110000},
52 { .jtag_id = 0xb576, .die_rev = 0x3, .omap_id = 0x03320100, .type = 0x16100c00},
53 { .jtag_id = 0xb576, .die_rev = 0x0, .omap_id = 0x03320200, .type = 0x16100d00},
54 { .jtag_id = 0xb613, .die_rev = 0x0, .omap_id = 0x03320300, .type = 0x1610ef00},
55 { .jtag_id = 0xb613, .die_rev = 0x0, .omap_id = 0x03320300, .type = 0x1610ef00},
56 { .jtag_id = 0xb576, .die_rev = 0x1, .omap_id = 0x03320100, .type = 0x16110000},
57 { .jtag_id = 0xb58c, .die_rev = 0x2, .omap_id = 0x03320200, .type = 0x16110b00},
58 { .jtag_id = 0xb58c, .die_rev = 0x3, .omap_id = 0x03320200, .type = 0x16110c00},
59 { .jtag_id = 0xb65f, .die_rev = 0x0, .omap_id = 0x03320400, .type = 0x16212300},
60 { .jtag_id = 0xb65f, .die_rev = 0x1, .omap_id = 0x03320400, .type = 0x16212300},
61 { .jtag_id = 0xb65f, .die_rev = 0x1, .omap_id = 0x03320500, .type = 0x16212300},
62 { .jtag_id = 0xb5f7, .die_rev = 0x0, .omap_id = 0x03330000, .type = 0x17100000},
63 { .jtag_id = 0xb5f7, .die_rev = 0x1, .omap_id = 0x03330100, .type = 0x17100000},
64 { .jtag_id = 0xb5f7, .die_rev = 0x2, .omap_id = 0x03330100, .type = 0x17100000},
65};
66
67/*
68 * Get OMAP type from PROD_ID.
69 * 1710 has the PROD_ID in bits 15:00, not in 16:01 as documented in TRM.
70 * 1510 PROD_ID is empty, and 1610 PROD_ID does not make sense.
71 * Undocumented register in TEST BLOCK is used as fallback; This seems to
72 * work on 1510, 1610 & 1710. The official way hopefully will work in future
73 * processors.
74 */
75static u16 __init omap_get_jtag_id(void)
76{
77 u32 prod_id, omap_id;
78
79 prod_id = omap_readl(OMAP_PRODUCTION_ID_1);
80 omap_id = omap_readl(OMAP32_ID_1);
81
82 /* Check for unusable OMAP_PRODUCTION_ID_1 on 1611B/5912 and 730 */
83 if (((prod_id >> 20) == 0) || (prod_id == omap_id))
84 prod_id = 0;
85 else
86 prod_id &= 0xffff;
87
88 if (prod_id)
89 return prod_id;
90
91 /* Use OMAP32_ID_1 as fallback */
92 prod_id = ((omap_id >> 12) & 0xffff);
93
94 return prod_id;
95}
96
97/*
98 * Get OMAP revision from DIE_REV.
99 * Early 1710 processors may have broken OMAP_DIE_ID, it contains PROD_ID.
100 * Undocumented register in the TEST BLOCK is used as fallback.
101 * REVISIT: This does not seem to work on 1510
102 */
103static u8 __init omap_get_die_rev(void)
104{
105 u32 die_rev;
106
107 die_rev = omap_readl(OMAP_DIE_ID_1);
108
109 /* Check for broken OMAP_DIE_ID on early 1710 */
110 if (((die_rev >> 12) & 0xffff) == omap_get_jtag_id())
111 die_rev = 0;
112
113 die_rev = (die_rev >> 17) & 0xf;
114 if (die_rev)
115 return die_rev;
116
117 die_rev = (omap_readl(OMAP32_ID_1) >> 28) & 0xf;
118
119 return die_rev;
120}
121
122static void __init omap_check_revision(void)
123{
124 int i;
125 u16 jtag_id;
126 u8 die_rev;
127 u32 omap_id;
128 u8 cpu_type;
129
130 jtag_id = omap_get_jtag_id();
131 die_rev = omap_get_die_rev();
132 omap_id = omap_readl(OMAP32_ID_0);
133
134#ifdef DEBUG
135 printk("OMAP_DIE_ID_0: 0x%08x\n", omap_readl(OMAP_DIE_ID_0));
136 printk("OMAP_DIE_ID_1: 0x%08x DIE_REV: %i\n",
137 omap_readl(OMAP_DIE_ID_1),
138 (omap_readl(OMAP_DIE_ID_1) >> 17) & 0xf);
139 printk("OMAP_PRODUCTION_ID_0: 0x%08x\n", omap_readl(OMAP_PRODUCTION_ID_0));
140 printk("OMAP_PRODUCTION_ID_1: 0x%08x JTAG_ID: 0x%04x\n",
141 omap_readl(OMAP_PRODUCTION_ID_1),
142 omap_readl(OMAP_PRODUCTION_ID_1) & 0xffff);
143 printk("OMAP32_ID_0: 0x%08x\n", omap_readl(OMAP32_ID_0));
144 printk("OMAP32_ID_1: 0x%08x\n", omap_readl(OMAP32_ID_1));
145 printk("JTAG_ID: 0x%04x DIE_REV: %i\n", jtag_id, die_rev);
146#endif
147
148 system_serial_high = omap_readl(OMAP_DIE_ID_0);
149 system_serial_low = omap_readl(OMAP_DIE_ID_1);
150
151 /* First check only the major version in a safe way */
152 for (i = 0; i < ARRAY_SIZE(omap_ids); i++) {
153 if (jtag_id == (omap_ids[i].jtag_id)) {
154 system_rev = omap_ids[i].type;
155 break;
156 }
157 }
158
159 /* Check if we can find the die revision */
160 for (i = 0; i < ARRAY_SIZE(omap_ids); i++) {
161 if (jtag_id == omap_ids[i].jtag_id && die_rev == omap_ids[i].die_rev) {
162 system_rev = omap_ids[i].type;
163 break;
164 }
165 }
166
167 /* Finally check also the omap_id */
168 for (i = 0; i < ARRAY_SIZE(omap_ids); i++) {
169 if (jtag_id == omap_ids[i].jtag_id
170 && die_rev == omap_ids[i].die_rev
171 && omap_id == omap_ids[i].omap_id) {
172 system_rev = omap_ids[i].type;
173 break;
174 }
175 }
176
177 /* Add the cpu class info (7xx, 15xx, 16xx, 24xx) */
178 cpu_type = system_rev >> 24;
179
180 switch (cpu_type) {
181 case 0x07:
182 system_rev |= 0x07;
183 break;
184 case 0x15:
185 system_rev |= 0x15;
186 break;
187 case 0x16:
188 case 0x17:
189 system_rev |= 0x16;
190 break;
191 case 0x24:
192 system_rev |= 0x24;
193 break;
194 default:
195 printk("Unknown OMAP cpu type: 0x%02x\n", cpu_type);
196 }
197
198 printk("OMAP%04x", system_rev >> 16);
199 if ((system_rev >> 8) & 0xff)
200 printk("%x", (system_rev >> 8) & 0xff);
201 printk(" revision %i handled as %02xxx id: %08x%08x\n",
202 die_rev, system_rev & 0xff, system_serial_low,
203 system_serial_high);
204}
205
206/*
207 * ----------------------------------------------------------------------------
208 * OMAP I/O mapping
209 *
210 * The machine specific code may provide the extra mapping besides the
211 * default mapping provided here.
212 * ----------------------------------------------------------------------------
213 */
214
215static struct map_desc omap_io_desc[] __initdata = {
216 { IO_VIRT, IO_PHYS, IO_SIZE, MT_DEVICE },
217};
218
219#ifdef CONFIG_ARCH_OMAP730
220static struct map_desc omap730_io_desc[] __initdata = {
221 { OMAP730_DSP_BASE, OMAP730_DSP_START, OMAP730_DSP_SIZE, MT_DEVICE },
222 { OMAP730_DSPREG_BASE, OMAP730_DSPREG_START, OMAP730_DSPREG_SIZE, MT_DEVICE },
223 { OMAP730_SRAM_BASE, OMAP730_SRAM_START, OMAP730_SRAM_SIZE, MT_DEVICE }
224};
225#endif
226
227#ifdef CONFIG_ARCH_OMAP1510
228static struct map_desc omap1510_io_desc[] __initdata = {
229 { OMAP1510_DSP_BASE, OMAP1510_DSP_START, OMAP1510_DSP_SIZE, MT_DEVICE },
230 { OMAP1510_DSPREG_BASE, OMAP1510_DSPREG_START, OMAP1510_DSPREG_SIZE, MT_DEVICE },
231 { OMAP1510_SRAM_BASE, OMAP1510_SRAM_START, OMAP1510_SRAM_SIZE, MT_DEVICE }
232};
233#endif
234
235#if defined(CONFIG_ARCH_OMAP16XX)
236static struct map_desc omap1610_io_desc[] __initdata = {
237 { OMAP16XX_DSP_BASE, OMAP16XX_DSP_START, OMAP16XX_DSP_SIZE, MT_DEVICE },
238 { OMAP16XX_DSPREG_BASE, OMAP16XX_DSPREG_START, OMAP16XX_DSPREG_SIZE, MT_DEVICE },
239 { OMAP16XX_SRAM_BASE, OMAP16XX_SRAM_START, OMAP1610_SRAM_SIZE, MT_DEVICE }
240};
241
242static struct map_desc omap5912_io_desc[] __initdata = {
243 { OMAP16XX_DSP_BASE, OMAP16XX_DSP_START, OMAP16XX_DSP_SIZE, MT_DEVICE },
244 { OMAP16XX_DSPREG_BASE, OMAP16XX_DSPREG_START, OMAP16XX_DSPREG_SIZE, MT_DEVICE },
245/*
246 * The OMAP5912 has 250kByte internal SRAM. Because the mapping is baseed on page
247 * size (4kByte), it seems that the last 2kByte (=0x800) of the 250kByte are not mapped.
248 * Add additional 2kByte (0x800) so that the last page is mapped and the last 2kByte
249 * can be used.
250 */
251 { OMAP16XX_SRAM_BASE, OMAP16XX_SRAM_START, OMAP5912_SRAM_SIZE + 0x800, MT_DEVICE }
252};
253#endif
254
255static int initialized = 0;
256
257static void __init _omap_map_io(void)
258{
259 initialized = 1;
260
261 /* We have to initialize the IO space mapping before we can run
262 * cpu_is_omapxxx() macros. */
263 iotable_init(omap_io_desc, ARRAY_SIZE(omap_io_desc));
264 omap_check_revision();
265
266#ifdef CONFIG_ARCH_OMAP730
267 if (cpu_is_omap730()) {
268 iotable_init(omap730_io_desc, ARRAY_SIZE(omap730_io_desc));
269 }
270#endif
271#ifdef CONFIG_ARCH_OMAP1510
272 if (cpu_is_omap1510()) {
273 iotable_init(omap1510_io_desc, ARRAY_SIZE(omap1510_io_desc));
274 }
275#endif
276#if defined(CONFIG_ARCH_OMAP16XX)
277 if (cpu_is_omap1610() || cpu_is_omap1710()) {
278 iotable_init(omap1610_io_desc, ARRAY_SIZE(omap1610_io_desc));
279 }
280 if (cpu_is_omap5912()) {
281 iotable_init(omap5912_io_desc, ARRAY_SIZE(omap5912_io_desc));
282 }
283#endif
284
285 /* REVISIT: Refer to OMAP5910 Errata, Advisory SYS_1: "Timeout Abort
286 * on a Posted Write in the TIPB Bridge".
287 */
288 omap_writew(0x0, MPU_PUBLIC_TIPB_CNTL);
289 omap_writew(0x0, MPU_PRIVATE_TIPB_CNTL);
290
291 /* Must init clocks early to assure that timer interrupt works
292 */
293 clk_init();
294}
295
296/*
297 * This should only get called from board specific init
298 */
299void omap_map_io(void)
300{
301 if (!initialized)
302 _omap_map_io();
303}
304
305static inline unsigned int omap_serial_in(struct plat_serial8250_port *up,
306 int offset)
307{
308 offset <<= up->regshift;
309 return (unsigned int)__raw_readb(up->membase + offset);
310}
311
312static inline void omap_serial_outp(struct plat_serial8250_port *p, int offset,
313 int value)
314{
315 offset <<= p->regshift;
316 __raw_writeb(value, p->membase + offset);
317}
318
319/*
320 * Internal UARTs need to be initialized for the 8250 autoconfig to work
321 * properly. Note that the TX watermark initialization may not be needed
322 * once the 8250.c watermark handling code is merged.
323 */
324static void __init omap_serial_reset(struct plat_serial8250_port *p)
325{
326 omap_serial_outp(p, UART_OMAP_MDR1, 0x07); /* disable UART */
327 omap_serial_outp(p, UART_OMAP_SCR, 0x08); /* TX watermark */
328 omap_serial_outp(p, UART_OMAP_MDR1, 0x00); /* enable UART */
329
330 if (!cpu_is_omap1510()) {
331 omap_serial_outp(p, UART_OMAP_SYSC, 0x01);
332 while (!(omap_serial_in(p, UART_OMAP_SYSC) & 0x01));
333 }
334}
335
336static struct plat_serial8250_port serial_platform_data[] = {
337 {
338 .membase = (char*)IO_ADDRESS(OMAP_UART1_BASE),
339 .mapbase = (unsigned long)OMAP_UART1_BASE,
340 .irq = INT_UART1,
341 .flags = UPF_BOOT_AUTOCONF,
342 .iotype = UPIO_MEM,
343 .regshift = 2,
344 .uartclk = OMAP16XX_BASE_BAUD * 16,
345 },
346 {
347 .membase = (char*)IO_ADDRESS(OMAP_UART2_BASE),
348 .mapbase = (unsigned long)OMAP_UART2_BASE,
349 .irq = INT_UART2,
350 .flags = UPF_BOOT_AUTOCONF,
351 .iotype = UPIO_MEM,
352 .regshift = 2,
353 .uartclk = OMAP16XX_BASE_BAUD * 16,
354 },
355 {
356 .membase = (char*)IO_ADDRESS(OMAP_UART3_BASE),
357 .mapbase = (unsigned long)OMAP_UART3_BASE,
358 .irq = INT_UART3,
359 .flags = UPF_BOOT_AUTOCONF,
360 .iotype = UPIO_MEM,
361 .regshift = 2,
362 .uartclk = OMAP16XX_BASE_BAUD * 16,
363 },
364 { },
365};
366
367static struct platform_device serial_device = {
368 .name = "serial8250",
369 .id = 0,
370 .dev = {
371 .platform_data = serial_platform_data,
372 },
373};
374
375/*
376 * Note that on Innovator-1510 UART2 pins conflict with USB2.
377 * By default UART2 does not work on Innovator-1510 if you have
378 * USB OHCI enabled. To use UART2, you must disable USB2 first.
379 */
380void __init omap_serial_init(int ports[OMAP_MAX_NR_PORTS])
381{
382 int i;
383
384 if (cpu_is_omap730()) {
385 serial_platform_data[0].regshift = 0;
386 serial_platform_data[1].regshift = 0;
387 serial_platform_data[0].irq = INT_730_UART_MODEM_1;
388 serial_platform_data[1].irq = INT_730_UART_MODEM_IRDA_2;
389 }
390
391 if (cpu_is_omap1510()) {
392 serial_platform_data[0].uartclk = OMAP1510_BASE_BAUD * 16;
393 serial_platform_data[1].uartclk = OMAP1510_BASE_BAUD * 16;
394 serial_platform_data[2].uartclk = OMAP1510_BASE_BAUD * 16;
395 }
396
397 for (i = 0; i < OMAP_MAX_NR_PORTS; i++) {
398 unsigned char reg;
399
400 if (ports[i] == 0) {
401 serial_platform_data[i].membase = 0;
402 serial_platform_data[i].mapbase = 0;
403 continue;
404 }
405
406 switch (i) {
407 case 0:
408 if (cpu_is_omap1510()) {
409 omap_cfg_reg(UART1_TX);
410 omap_cfg_reg(UART1_RTS);
411 if (machine_is_omap_innovator()) {
412 reg = fpga_read(OMAP1510_FPGA_POWER);
413 reg |= OMAP1510_FPGA_PCR_COM1_EN;
414 fpga_write(reg, OMAP1510_FPGA_POWER);
415 udelay(10);
416 }
417 }
418 break;
419 case 1:
420 if (cpu_is_omap1510()) {
421 omap_cfg_reg(UART2_TX);
422 omap_cfg_reg(UART2_RTS);
423 if (machine_is_omap_innovator()) {
424 reg = fpga_read(OMAP1510_FPGA_POWER);
425 reg |= OMAP1510_FPGA_PCR_COM2_EN;
426 fpga_write(reg, OMAP1510_FPGA_POWER);
427 udelay(10);
428 }
429 }
430 break;
431 case 2:
432 if (cpu_is_omap1510()) {
433 omap_cfg_reg(UART3_TX);
434 omap_cfg_reg(UART3_RX);
435 }
436 if (cpu_is_omap1710()) {
437 clk_enable(clk_get(0, "uart3_ck"));
438 }
439 break;
440 }
441 omap_serial_reset(&serial_platform_data[i]);
442 }
443}
444
445static int __init omap_init(void)
446{
447 return platform_device_register(&serial_device);
448}
449arch_initcall(omap_init);
450
451#define NO_LENGTH_CHECK 0xffffffff
452
453extern int omap_bootloader_tag_len;
454extern u8 omap_bootloader_tag[];
455
456struct omap_board_config_kernel *omap_board_config;
457int omap_board_config_size = 0;
458
459static const void *get_config(u16 tag, size_t len, int skip, size_t *len_out)
460{
461 struct omap_board_config_kernel *kinfo = NULL;
462 int i;
463
464#ifdef CONFIG_OMAP_BOOT_TAG
465 struct omap_board_config_entry *info = NULL;
466
467 if (omap_bootloader_tag_len > 4)
468 info = (struct omap_board_config_entry *) omap_bootloader_tag;
469 while (info != NULL) {
470 u8 *next;
471
472 if (info->tag == tag) {
473 if (skip == 0)
474 break;
475 skip--;
476 }
477
478 if ((info->len & 0x03) != 0) {
479 /* We bail out to avoid an alignment fault */
480 printk(KERN_ERR "OMAP peripheral config: Length (%d) not word-aligned (tag %04x)\n",
481 info->len, info->tag);
482 return NULL;
483 }
484 next = (u8 *) info + sizeof(*info) + info->len;
485 if (next >= omap_bootloader_tag + omap_bootloader_tag_len)
486 info = NULL;
487 else
488 info = (struct omap_board_config_entry *) next;
489 }
490 if (info != NULL) {
491 /* Check the length as a lame attempt to check for
492 * binary inconsistancy. */
493 if (len != NO_LENGTH_CHECK) {
494 /* Word-align len */
495 if (len & 0x03)
496 len = (len + 3) & ~0x03;
497 if (info->len != len) {
498 printk(KERN_ERR "OMAP peripheral config: Length mismatch with tag %x (want %d, got %d)\n",
499 tag, len, info->len);
500 return NULL;
501 }
502 }
503 if (len_out != NULL)
504 *len_out = info->len;
505 return info->data;
506 }
507#endif
508 /* Try to find the config from the board-specific structures
509 * in the kernel. */
510 for (i = 0; i < omap_board_config_size; i++) {
511 if (omap_board_config[i].tag == tag) {
512 kinfo = &omap_board_config[i];
513 break;
514 }
515 }
516 if (kinfo == NULL)
517 return NULL;
518 return kinfo->data;
519}
520
521const void *__omap_get_config(u16 tag, size_t len, int nr)
522{
523 return get_config(tag, len, nr, NULL);
524}
525EXPORT_SYMBOL(__omap_get_config);
526
527const void *omap_get_var_config(u16 tag, size_t *len)
528{
529 return get_config(tag, NO_LENGTH_CHECK, 0, len);
530}
531EXPORT_SYMBOL(omap_get_var_config);
532
533static int __init omap_add_serial_console(void)
534{
535 const struct omap_uart_config *info;
536
537 info = omap_get_config(OMAP_TAG_UART, struct omap_uart_config);
538 if (info != NULL && info->console_uart) {
539 static char speed[11], *opt = NULL;
540
541 if (info->console_speed) {
542 snprintf(speed, sizeof(speed), "%u", info->console_speed);
543 opt = speed;
544 }
545 return add_preferred_console("ttyS", info->console_uart - 1, opt);
546 }
547 return 0;
548}
549console_initcall(omap_add_serial_console);
diff --git a/arch/arm/mach-omap1/Kconfig b/arch/arm/mach-omap1/Kconfig
new file mode 100644
index 000000000000..7408ac94f771
--- /dev/null
+++ b/arch/arm/mach-omap1/Kconfig
@@ -0,0 +1,144 @@
1comment "OMAP Core Type"
2 depends on ARCH_OMAP1
3
4config ARCH_OMAP730
5 depends on ARCH_OMAP1
6 bool "OMAP730 Based System"
7 select ARCH_OMAP_OTG
8
9config ARCH_OMAP1510
10 depends on ARCH_OMAP1
11 default y
12 bool "OMAP1510 Based System"
13
14config ARCH_OMAP16XX
15 depends on ARCH_OMAP1
16 bool "OMAP16xx Based System"
17 select ARCH_OMAP_OTG
18
19comment "OMAP Board Type"
20 depends on ARCH_OMAP1
21
22config MACH_OMAP_INNOVATOR
23 bool "TI Innovator"
24 depends on ARCH_OMAP1 && (ARCH_OMAP1510 || ARCH_OMAP16XX)
25 help
26 TI OMAP 1510 or 1610 Innovator board support. Say Y here if you
27 have such a board.
28
29config MACH_OMAP_H2
30 bool "TI H2 Support"
31 depends on ARCH_OMAP1 && ARCH_OMAP16XX
32 help
33 TI OMAP 1610/1611B H2 board support. Say Y here if you have such
34 a board.
35
36config MACH_OMAP_H3
37 bool "TI H3 Support"
38 depends on ARCH_OMAP1 && ARCH_OMAP16XX
39 help
40 TI OMAP 1710 H3 board support. Say Y here if you have such
41 a board.
42
43config MACH_OMAP_OSK
44 bool "TI OSK Support"
45 depends on ARCH_OMAP1 && ARCH_OMAP16XX
46 help
47 TI OMAP 5912 OSK (OMAP Starter Kit) board support. Say Y here
48 if you have such a board.
49
50config MACH_OMAP_PERSEUS2
51 bool "TI Perseus2"
52 depends on ARCH_OMAP1 && ARCH_OMAP730
53 help
54 Support for TI OMAP 730 Perseus2 board. Say Y here if you have such
55 a board.
56
57config MACH_VOICEBLUE
58 bool "Voiceblue"
59 depends on ARCH_OMAP1 && ARCH_OMAP1510
60 help
61 Support for Voiceblue GSM/VoIP gateway. Say Y here if you have
62 such a board.
63
64config MACH_NETSTAR
65 bool "NetStar"
66 depends on ARCH_OMAP1 && ARCH_OMAP1510
67 help
68 Support for NetStar PBX. Say Y here if you have such a board.
69
70config MACH_OMAP_GENERIC
71 bool "Generic OMAP board"
72 depends on ARCH_OMAP1 && (ARCH_OMAP1510 || ARCH_OMAP16XX)
73 help
74 Support for generic OMAP-1510, 1610 or 1710 board with
75 no FPGA. Can be used as template for porting Linux to
76 custom OMAP boards. Say Y here if you have a custom
77 board.
78
79comment "OMAP CPU Speed"
80 depends on ARCH_OMAP1
81
82config OMAP_CLOCKS_SET_BY_BOOTLOADER
83 bool "OMAP clocks set by bootloader"
84 depends on ARCH_OMAP1
85 help
86 Enable this option to prevent the kernel from overriding the clock
87 frequencies programmed by bootloader for MPU, DSP, MMUs, TC,
88 internal LCD controller and MPU peripherals.
89
90config OMAP_ARM_216MHZ
91 bool "OMAP ARM 216 MHz CPU (1710 only)"
92 depends on ARCH_OMAP1 && ARCH_OMAP16XX
93 help
94 Enable 216 MHz clock for OMAP1710 CPU. If unsure, say N.
95
96config OMAP_ARM_195MHZ
97 bool "OMAP ARM 195 MHz CPU"
98 depends on ARCH_OMAP1 && ARCH_OMAP730
99 help
100 Enable 195MHz clock for OMAP CPU. If unsure, say N.
101
102config OMAP_ARM_192MHZ
103 bool "OMAP ARM 192 MHz CPU"
104 depends on ARCH_OMAP1 && ARCH_OMAP16XX
105 help
106 Enable 192MHz clock for OMAP CPU. If unsure, say N.
107
108config OMAP_ARM_182MHZ
109 bool "OMAP ARM 182 MHz CPU"
110 depends on ARCH_OMAP1 && ARCH_OMAP730
111 help
112 Enable 182MHz clock for OMAP CPU. If unsure, say N.
113
114config OMAP_ARM_168MHZ
115 bool "OMAP ARM 168 MHz CPU"
116 depends on ARCH_OMAP1 && (ARCH_OMAP1510 || ARCH_OMAP16XX || ARCH_OMAP730)
117 help
118 Enable 168MHz clock for OMAP CPU. If unsure, say N.
119
120config OMAP_ARM_150MHZ
121 bool "OMAP ARM 150 MHz CPU"
122 depends on ARCH_OMAP1 && ARCH_OMAP1510
123 help
124 Enable 150MHz clock for OMAP CPU. If unsure, say N.
125
126config OMAP_ARM_120MHZ
127 bool "OMAP ARM 120 MHz CPU"
128 depends on ARCH_OMAP1 && (ARCH_OMAP1510 || ARCH_OMAP16XX || ARCH_OMAP730)
129 help
130 Enable 120MHz clock for OMAP CPU. If unsure, say N.
131
132config OMAP_ARM_60MHZ
133 bool "OMAP ARM 60 MHz CPU"
134 depends on ARCH_OMAP1 && (ARCH_OMAP1510 || ARCH_OMAP16XX || ARCH_OMAP730)
135 default y
136 help
137 Enable 60MHz clock for OMAP CPU. If unsure, say Y.
138
139config OMAP_ARM_30MHZ
140 bool "OMAP ARM 30 MHz CPU"
141 depends on ARCH_OMAP1 && (ARCH_OMAP1510 || ARCH_OMAP16XX || ARCH_OMAP730)
142 help
143 Enable 30MHz clock for OMAP CPU. If unsure, say N.
144
diff --git a/arch/arm/mach-omap1/Makefile b/arch/arm/mach-omap1/Makefile
new file mode 100644
index 000000000000..d386fd913f0c
--- /dev/null
+++ b/arch/arm/mach-omap1/Makefile
@@ -0,0 +1,30 @@
1#
2# Makefile for the linux kernel.
3#
4
5# Common support
6obj-y := io.o id.o irq.o time.o serial.o
7led-y := leds.o
8
9# Specific board support
10obj-$(CONFIG_MACH_OMAP_H2) += board-h2.o
11obj-$(CONFIG_MACH_OMAP_INNOVATOR) += board-innovator.o
12obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o
13obj-$(CONFIG_MACH_OMAP_PERSEUS2) += board-perseus2.o
14obj-$(CONFIG_MACH_OMAP_OSK) += board-osk.o
15obj-$(CONFIG_MACH_OMAP_H3) += board-h3.o
16obj-$(CONFIG_MACH_VOICEBLUE) += board-voiceblue.o
17obj-$(CONFIG_MACH_NETSTAR) += board-netstar.o
18
19ifeq ($(CONFIG_ARCH_OMAP1510),y)
20# Innovator-1510 FPGA
21obj-$(CONFIG_MACH_OMAP_INNOVATOR) += fpga.o
22endif
23
24# LEDs support
25led-$(CONFIG_MACH_OMAP_H2) += leds-h2p2-debug.o
26led-$(CONFIG_MACH_OMAP_INNOVATOR) += leds-innovator.o
27led-$(CONFIG_MACH_OMAP_PERSEUS2) += leds-h2p2-debug.o
28led-$(CONFIG_MACH_OMAP_OSK) += leds-osk.o
29obj-$(CONFIG_LEDS) += $(led-y)
30
diff --git a/arch/arm/mach-omap/Makefile.boot b/arch/arm/mach-omap1/Makefile.boot
index fee1a6a15b54..292d56c5a888 100644
--- a/arch/arm/mach-omap/Makefile.boot
+++ b/arch/arm/mach-omap1/Makefile.boot
@@ -1,4 +1,3 @@
1 zreladdr-y := 0x10008000 1 zreladdr-y := 0x10008000
2params_phys-y := 0x10000100 2params_phys-y := 0x10000100
3initrd_phys-y := 0x10800000 3initrd_phys-y := 0x10800000
4
diff --git a/arch/arm/mach-omap/board-generic.c b/arch/arm/mach-omap1/board-generic.c
index 384bc7cec1db..122796ebe8f5 100644
--- a/arch/arm/mach-omap/board-generic.c
+++ b/arch/arm/mach-omap1/board-generic.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-omap/board-generic.c 2 * linux/arch/arm/mach-omap1/board-generic.c
3 * 3 *
4 * Modified from board-innovator1510.c 4 * Modified from board-innovator1510.c
5 * 5 *
@@ -26,8 +26,7 @@
26#include <asm/arch/mux.h> 26#include <asm/arch/mux.h>
27#include <asm/arch/usb.h> 27#include <asm/arch/usb.h>
28#include <asm/arch/board.h> 28#include <asm/arch/board.h>
29 29#include <asm/arch/common.h>
30#include "common.h"
31 30
32static int __initdata generic_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1}; 31static int __initdata generic_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1};
33 32
@@ -84,7 +83,7 @@ static void __init omap_generic_init(void)
84 83
85static void __init omap_generic_map_io(void) 84static void __init omap_generic_map_io(void)
86{ 85{
87 omap_map_io(); 86 omap_map_common_io()
88} 87}
89 88
90MACHINE_START(OMAP_GENERIC, "Generic OMAP1510/1610/1710") 89MACHINE_START(OMAP_GENERIC, "Generic OMAP1510/1610/1710")
diff --git a/arch/arm/mach-omap/board-h2.c b/arch/arm/mach-omap1/board-h2.c
index f37c76a9b163..f4983ee95ab4 100644
--- a/arch/arm/mach-omap/board-h2.c
+++ b/arch/arm/mach-omap1/board-h2.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-omap/board-h2.c 2 * linux/arch/arm/mach-omap1/board-h2.c
3 * 3 *
4 * Board specific inits for OMAP-1610 H2 4 * Board specific inits for OMAP-1610 H2
5 * 5 *
@@ -35,8 +35,7 @@
35#include <asm/arch/gpio.h> 35#include <asm/arch/gpio.h>
36#include <asm/arch/tc.h> 36#include <asm/arch/tc.h>
37#include <asm/arch/usb.h> 37#include <asm/arch/usb.h>
38 38#include <asm/arch/common.h>
39#include "common.h"
40 39
41extern int omap_gpio_init(void); 40extern int omap_gpio_init(void);
42 41
@@ -172,7 +171,7 @@ static void __init h2_init(void)
172 171
173static void __init h2_map_io(void) 172static void __init h2_map_io(void)
174{ 173{
175 omap_map_io(); 174 omap_map_common_io();
176 omap_serial_init(h2_serial_ports); 175 omap_serial_init(h2_serial_ports);
177} 176}
178 177
diff --git a/arch/arm/mach-omap/board-h3.c b/arch/arm/mach-omap1/board-h3.c
index 705e48594e9a..7cd419d61b40 100644
--- a/arch/arm/mach-omap/board-h3.c
+++ b/arch/arm/mach-omap1/board-h3.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-omap/board-h3.c 2 * linux/arch/arm/mach-omap1/board-h3.c
3 * 3 *
4 * This file contains OMAP1710 H3 specific code. 4 * This file contains OMAP1710 H3 specific code.
5 * 5 *
@@ -37,8 +37,7 @@
37#include <asm/arch/mux.h> 37#include <asm/arch/mux.h>
38#include <asm/arch/tc.h> 38#include <asm/arch/tc.h>
39#include <asm/arch/usb.h> 39#include <asm/arch/usb.h>
40 40#include <asm/arch/common.h>
41#include "common.h"
42 41
43extern int omap_gpio_init(void); 42extern int omap_gpio_init(void);
44 43
@@ -190,7 +189,7 @@ void h3_init_irq(void)
190 189
191static void __init h3_map_io(void) 190static void __init h3_map_io(void)
192{ 191{
193 omap_map_io(); 192 omap_map_common_io();
194 omap_serial_init(h3_serial_ports); 193 omap_serial_init(h3_serial_ports);
195} 194}
196 195
diff --git a/arch/arm/mach-omap/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c
index 523363f18cc0..91de60a91ef8 100644
--- a/arch/arm/mach-omap/board-innovator.c
+++ b/arch/arm/mach-omap1/board-innovator.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-omap/board-innovator.c 2 * linux/arch/arm/mach-omap1/board-innovator.c
3 * 3 *
4 * Board specific inits for OMAP-1510 and OMAP-1610 Innovator 4 * Board specific inits for OMAP-1510 and OMAP-1610 Innovator
5 * 5 *
@@ -33,8 +33,7 @@
33#include <asm/arch/gpio.h> 33#include <asm/arch/gpio.h>
34#include <asm/arch/tc.h> 34#include <asm/arch/tc.h>
35#include <asm/arch/usb.h> 35#include <asm/arch/usb.h>
36 36#include <asm/arch/common.h>
37#include "common.h"
38 37
39static int __initdata innovator_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1}; 38static int __initdata innovator_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1};
40 39
@@ -252,7 +251,7 @@ static void __init innovator_init(void)
252 251
253static void __init innovator_map_io(void) 252static void __init innovator_map_io(void)
254{ 253{
255 omap_map_io(); 254 omap_map_common_io();
256 255
257#ifdef CONFIG_ARCH_OMAP1510 256#ifdef CONFIG_ARCH_OMAP1510
258 if (cpu_is_omap1510()) { 257 if (cpu_is_omap1510()) {
diff --git a/arch/arm/mach-omap/board-netstar.c b/arch/arm/mach-omap1/board-netstar.c
index 8c653734d5a3..6750b2014092 100644
--- a/arch/arm/mach-omap/board-netstar.c
+++ b/arch/arm/mach-omap1/board-netstar.c
@@ -26,8 +26,7 @@
26#include <asm/arch/gpio.h> 26#include <asm/arch/gpio.h>
27#include <asm/arch/mux.h> 27#include <asm/arch/mux.h>
28#include <asm/arch/usb.h> 28#include <asm/arch/usb.h>
29 29#include <asm/arch/common.h>
30#include "common.h"
31 30
32extern void __init omap_init_time(void); 31extern void __init omap_init_time(void);
33extern int omap_gpio_init(void); 32extern int omap_gpio_init(void);
@@ -100,7 +99,7 @@ static int __initdata omap_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1};
100 99
101static void __init netstar_map_io(void) 100static void __init netstar_map_io(void)
102{ 101{
103 omap_map_io(); 102 omap_map_common_io();
104 omap_serial_init(omap_serial_ports); 103 omap_serial_init(omap_serial_ports);
105} 104}
106 105
diff --git a/arch/arm/mach-omap/board-osk.c b/arch/arm/mach-omap1/board-osk.c
index cb433436aa08..6844e536c698 100644
--- a/arch/arm/mach-omap/board-osk.c
+++ b/arch/arm/mach-omap1/board-osk.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-omap/board-osk.c 2 * linux/arch/arm/mach-omap1/board-osk.c
3 * 3 *
4 * Board specific init for OMAP5912 OSK 4 * Board specific init for OMAP5912 OSK
5 * 5 *
@@ -39,8 +39,7 @@
39#include <asm/arch/usb.h> 39#include <asm/arch/usb.h>
40#include <asm/arch/mux.h> 40#include <asm/arch/mux.h>
41#include <asm/arch/tc.h> 41#include <asm/arch/tc.h>
42 42#include <asm/arch/common.h>
43#include "common.h"
44 43
45static struct map_desc osk5912_io_desc[] __initdata = { 44static struct map_desc osk5912_io_desc[] __initdata = {
46{ OMAP_OSK_NOR_FLASH_BASE, OMAP_OSK_NOR_FLASH_START, OMAP_OSK_NOR_FLASH_SIZE, 45{ OMAP_OSK_NOR_FLASH_BASE, OMAP_OSK_NOR_FLASH_START, OMAP_OSK_NOR_FLASH_SIZE,
@@ -153,7 +152,7 @@ static void __init osk_init(void)
153 152
154static void __init osk_map_io(void) 153static void __init osk_map_io(void)
155{ 154{
156 omap_map_io(); 155 omap_map_common_io();
157 iotable_init(osk5912_io_desc, ARRAY_SIZE(osk5912_io_desc)); 156 iotable_init(osk5912_io_desc, ARRAY_SIZE(osk5912_io_desc));
158 omap_serial_init(osk_serial_ports); 157 omap_serial_init(osk_serial_ports);
159} 158}
diff --git a/arch/arm/mach-omap/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c
index d5342043d48f..213317392d9b 100644
--- a/arch/arm/mach-omap/board-perseus2.c
+++ b/arch/arm/mach-omap1/board-perseus2.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-omap/board-perseus2.c 2 * linux/arch/arm/mach-omap1/board-perseus2.c
3 * 3 *
4 * Modified from board-generic.c 4 * Modified from board-generic.c
5 * 5 *
@@ -27,8 +27,7 @@
27#include <asm/arch/gpio.h> 27#include <asm/arch/gpio.h>
28#include <asm/arch/mux.h> 28#include <asm/arch/mux.h>
29#include <asm/arch/fpga.h> 29#include <asm/arch/fpga.h>
30 30#include <asm/arch/common.h>
31#include "common.h"
32 31
33static struct resource smc91x_resources[] = { 32static struct resource smc91x_resources[] = {
34 [0] = { 33 [0] = {
@@ -140,7 +139,7 @@ static struct map_desc omap_perseus2_io_desc[] __initdata = {
140 139
141static void __init omap_perseus2_map_io(void) 140static void __init omap_perseus2_map_io(void)
142{ 141{
143 omap_map_io(); 142 omap_map_common_io();
144 iotable_init(omap_perseus2_io_desc, 143 iotable_init(omap_perseus2_io_desc,
145 ARRAY_SIZE(omap_perseus2_io_desc)); 144 ARRAY_SIZE(omap_perseus2_io_desc));
146 145
diff --git a/arch/arm/mach-omap/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c
index 6b0c5003d719..e42281988990 100644
--- a/arch/arm/mach-omap/board-voiceblue.c
+++ b/arch/arm/mach-omap1/board-voiceblue.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-omap/board-voiceblue.c 2 * linux/arch/arm/mach-omap1/board-voiceblue.c
3 * 3 *
4 * Modified from board-generic.c 4 * Modified from board-generic.c
5 * 5 *
@@ -31,8 +31,7 @@
31#include <asm/arch/tc.h> 31#include <asm/arch/tc.h>
32#include <asm/arch/mux.h> 32#include <asm/arch/mux.h>
33#include <asm/arch/usb.h> 33#include <asm/arch/usb.h>
34 34#include <asm/arch/common.h>
35#include "common.h"
36 35
37extern void omap_init_time(void); 36extern void omap_init_time(void);
38extern int omap_gpio_init(void); 37extern int omap_gpio_init(void);
@@ -170,7 +169,7 @@ static int __initdata omap_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1};
170 169
171static void __init voiceblue_map_io(void) 170static void __init voiceblue_map_io(void)
172{ 171{
173 omap_map_io(); 172 omap_map_common_io();
174 omap_serial_init(omap_serial_ports); 173 omap_serial_init(omap_serial_ports);
175} 174}
176 175
diff --git a/arch/arm/mach-omap/fpga.c b/arch/arm/mach-omap1/fpga.c
index 7c08f6c2e1d0..7c08f6c2e1d0 100644
--- a/arch/arm/mach-omap/fpga.c
+++ b/arch/arm/mach-omap1/fpga.c
diff --git a/arch/arm/mach-omap1/id.c b/arch/arm/mach-omap1/id.c
new file mode 100644
index 000000000000..986c3b7e09bb
--- /dev/null
+++ b/arch/arm/mach-omap1/id.c
@@ -0,0 +1,188 @@
1/*
2 * linux/arch/arm/mach-omap1/id.c
3 *
4 * OMAP1 CPU identification code
5 *
6 * Copyright (C) 2004 Nokia Corporation
7 * Written by Tony Lindgren <tony@atomide.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/config.h>
15#include <linux/module.h>
16#include <linux/kernel.h>
17#include <linux/init.h>
18
19#include <asm/io.h>
20
21struct omap_id {
22 u16 jtag_id; /* Used to determine OMAP type */
23 u8 die_rev; /* Processor revision */
24 u32 omap_id; /* OMAP revision */
25 u32 type; /* Cpu id bits [31:08], cpu class bits [07:00] */
26};
27
28/* Register values to detect the OMAP version */
29static struct omap_id omap_ids[] __initdata = {
30 { .jtag_id = 0x355f, .die_rev = 0x0, .omap_id = 0x03320000, .type = 0x07300100},
31 { .jtag_id = 0xb55f, .die_rev = 0x0, .omap_id = 0x03320000, .type = 0x07300300},
32 { .jtag_id = 0xb470, .die_rev = 0x0, .omap_id = 0x03310100, .type = 0x15100000},
33 { .jtag_id = 0xb576, .die_rev = 0x0, .omap_id = 0x03320000, .type = 0x16100000},
34 { .jtag_id = 0xb576, .die_rev = 0x2, .omap_id = 0x03320100, .type = 0x16110000},
35 { .jtag_id = 0xb576, .die_rev = 0x3, .omap_id = 0x03320100, .type = 0x16100c00},
36 { .jtag_id = 0xb576, .die_rev = 0x0, .omap_id = 0x03320200, .type = 0x16100d00},
37 { .jtag_id = 0xb613, .die_rev = 0x0, .omap_id = 0x03320300, .type = 0x1610ef00},
38 { .jtag_id = 0xb613, .die_rev = 0x0, .omap_id = 0x03320300, .type = 0x1610ef00},
39 { .jtag_id = 0xb576, .die_rev = 0x1, .omap_id = 0x03320100, .type = 0x16110000},
40 { .jtag_id = 0xb58c, .die_rev = 0x2, .omap_id = 0x03320200, .type = 0x16110b00},
41 { .jtag_id = 0xb58c, .die_rev = 0x3, .omap_id = 0x03320200, .type = 0x16110c00},
42 { .jtag_id = 0xb65f, .die_rev = 0x0, .omap_id = 0x03320400, .type = 0x16212300},
43 { .jtag_id = 0xb65f, .die_rev = 0x1, .omap_id = 0x03320400, .type = 0x16212300},
44 { .jtag_id = 0xb65f, .die_rev = 0x1, .omap_id = 0x03320500, .type = 0x16212300},
45 { .jtag_id = 0xb5f7, .die_rev = 0x0, .omap_id = 0x03330000, .type = 0x17100000},
46 { .jtag_id = 0xb5f7, .die_rev = 0x1, .omap_id = 0x03330100, .type = 0x17100000},
47 { .jtag_id = 0xb5f7, .die_rev = 0x2, .omap_id = 0x03330100, .type = 0x17100000},
48};
49
50/*
51 * Get OMAP type from PROD_ID.
52 * 1710 has the PROD_ID in bits 15:00, not in 16:01 as documented in TRM.
53 * 1510 PROD_ID is empty, and 1610 PROD_ID does not make sense.
54 * Undocumented register in TEST BLOCK is used as fallback; This seems to
55 * work on 1510, 1610 & 1710. The official way hopefully will work in future
56 * processors.
57 */
58static u16 __init omap_get_jtag_id(void)
59{
60 u32 prod_id, omap_id;
61
62 prod_id = omap_readl(OMAP_PRODUCTION_ID_1);
63 omap_id = omap_readl(OMAP32_ID_1);
64
65 /* Check for unusable OMAP_PRODUCTION_ID_1 on 1611B/5912 and 730 */
66 if (((prod_id >> 20) == 0) || (prod_id == omap_id))
67 prod_id = 0;
68 else
69 prod_id &= 0xffff;
70
71 if (prod_id)
72 return prod_id;
73
74 /* Use OMAP32_ID_1 as fallback */
75 prod_id = ((omap_id >> 12) & 0xffff);
76
77 return prod_id;
78}
79
80/*
81 * Get OMAP revision from DIE_REV.
82 * Early 1710 processors may have broken OMAP_DIE_ID, it contains PROD_ID.
83 * Undocumented register in the TEST BLOCK is used as fallback.
84 * REVISIT: This does not seem to work on 1510
85 */
86static u8 __init omap_get_die_rev(void)
87{
88 u32 die_rev;
89
90 die_rev = omap_readl(OMAP_DIE_ID_1);
91
92 /* Check for broken OMAP_DIE_ID on early 1710 */
93 if (((die_rev >> 12) & 0xffff) == omap_get_jtag_id())
94 die_rev = 0;
95
96 die_rev = (die_rev >> 17) & 0xf;
97 if (die_rev)
98 return die_rev;
99
100 die_rev = (omap_readl(OMAP32_ID_1) >> 28) & 0xf;
101
102 return die_rev;
103}
104
105void __init omap_check_revision(void)
106{
107 int i;
108 u16 jtag_id;
109 u8 die_rev;
110 u32 omap_id;
111 u8 cpu_type;
112
113 jtag_id = omap_get_jtag_id();
114 die_rev = omap_get_die_rev();
115 omap_id = omap_readl(OMAP32_ID_0);
116
117#ifdef DEBUG
118 printk("OMAP_DIE_ID_0: 0x%08x\n", omap_readl(OMAP_DIE_ID_0));
119 printk("OMAP_DIE_ID_1: 0x%08x DIE_REV: %i\n",
120 omap_readl(OMAP_DIE_ID_1),
121 (omap_readl(OMAP_DIE_ID_1) >> 17) & 0xf);
122 printk("OMAP_PRODUCTION_ID_0: 0x%08x\n", omap_readl(OMAP_PRODUCTION_ID_0));
123 printk("OMAP_PRODUCTION_ID_1: 0x%08x JTAG_ID: 0x%04x\n",
124 omap_readl(OMAP_PRODUCTION_ID_1),
125 omap_readl(OMAP_PRODUCTION_ID_1) & 0xffff);
126 printk("OMAP32_ID_0: 0x%08x\n", omap_readl(OMAP32_ID_0));
127 printk("OMAP32_ID_1: 0x%08x\n", omap_readl(OMAP32_ID_1));
128 printk("JTAG_ID: 0x%04x DIE_REV: %i\n", jtag_id, die_rev);
129#endif
130
131 system_serial_high = omap_readl(OMAP_DIE_ID_0);
132 system_serial_low = omap_readl(OMAP_DIE_ID_1);
133
134 /* First check only the major version in a safe way */
135 for (i = 0; i < ARRAY_SIZE(omap_ids); i++) {
136 if (jtag_id == (omap_ids[i].jtag_id)) {
137 system_rev = omap_ids[i].type;
138 break;
139 }
140 }
141
142 /* Check if we can find the die revision */
143 for (i = 0; i < ARRAY_SIZE(omap_ids); i++) {
144 if (jtag_id == omap_ids[i].jtag_id && die_rev == omap_ids[i].die_rev) {
145 system_rev = omap_ids[i].type;
146 break;
147 }
148 }
149
150 /* Finally check also the omap_id */
151 for (i = 0; i < ARRAY_SIZE(omap_ids); i++) {
152 if (jtag_id == omap_ids[i].jtag_id
153 && die_rev == omap_ids[i].die_rev
154 && omap_id == omap_ids[i].omap_id) {
155 system_rev = omap_ids[i].type;
156 break;
157 }
158 }
159
160 /* Add the cpu class info (7xx, 15xx, 16xx, 24xx) */
161 cpu_type = system_rev >> 24;
162
163 switch (cpu_type) {
164 case 0x07:
165 system_rev |= 0x07;
166 break;
167 case 0x15:
168 system_rev |= 0x15;
169 break;
170 case 0x16:
171 case 0x17:
172 system_rev |= 0x16;
173 break;
174 case 0x24:
175 system_rev |= 0x24;
176 break;
177 default:
178 printk("Unknown OMAP cpu type: 0x%02x\n", cpu_type);
179 }
180
181 printk("OMAP%04x", system_rev >> 16);
182 if ((system_rev >> 8) & 0xff)
183 printk("%x", (system_rev >> 8) & 0xff);
184 printk(" revision %i handled as %02xxx id: %08x%08x\n",
185 die_rev, system_rev & 0xff, system_serial_low,
186 system_serial_high);
187}
188
diff --git a/arch/arm/mach-omap1/io.c b/arch/arm/mach-omap1/io.c
new file mode 100644
index 000000000000..207df0fe934d
--- /dev/null
+++ b/arch/arm/mach-omap1/io.c
@@ -0,0 +1,115 @@
1/*
2 * linux/arch/arm/mach-omap1/io.c
3 *
4 * OMAP1 I/O mapping code
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/config.h>
12#include <linux/module.h>
13#include <linux/kernel.h>
14#include <linux/init.h>
15
16#include <asm/mach/map.h>
17#include <asm/io.h>
18#include <asm/arch/tc.h>
19
20extern int clk_init(void);
21extern void omap_check_revision(void);
22
23/*
24 * The machine specific code may provide the extra mapping besides the
25 * default mapping provided here.
26 */
27static struct map_desc omap_io_desc[] __initdata = {
28 { IO_VIRT, IO_PHYS, IO_SIZE, MT_DEVICE },
29};
30
31#ifdef CONFIG_ARCH_OMAP730
32static struct map_desc omap730_io_desc[] __initdata = {
33 { OMAP730_DSP_BASE, OMAP730_DSP_START, OMAP730_DSP_SIZE, MT_DEVICE },
34 { OMAP730_DSPREG_BASE, OMAP730_DSPREG_START, OMAP730_DSPREG_SIZE, MT_DEVICE },
35 { OMAP730_SRAM_BASE, OMAP730_SRAM_START, OMAP730_SRAM_SIZE, MT_DEVICE }
36};
37#endif
38
39#ifdef CONFIG_ARCH_OMAP1510
40static struct map_desc omap1510_io_desc[] __initdata = {
41 { OMAP1510_DSP_BASE, OMAP1510_DSP_START, OMAP1510_DSP_SIZE, MT_DEVICE },
42 { OMAP1510_DSPREG_BASE, OMAP1510_DSPREG_START, OMAP1510_DSPREG_SIZE, MT_DEVICE },
43 { OMAP1510_SRAM_BASE, OMAP1510_SRAM_START, OMAP1510_SRAM_SIZE, MT_DEVICE }
44};
45#endif
46
47#if defined(CONFIG_ARCH_OMAP16XX)
48static struct map_desc omap1610_io_desc[] __initdata = {
49 { OMAP16XX_DSP_BASE, OMAP16XX_DSP_START, OMAP16XX_DSP_SIZE, MT_DEVICE },
50 { OMAP16XX_DSPREG_BASE, OMAP16XX_DSPREG_START, OMAP16XX_DSPREG_SIZE, MT_DEVICE },
51 { OMAP16XX_SRAM_BASE, OMAP16XX_SRAM_START, OMAP1610_SRAM_SIZE, MT_DEVICE }
52};
53
54static struct map_desc omap5912_io_desc[] __initdata = {
55 { OMAP16XX_DSP_BASE, OMAP16XX_DSP_START, OMAP16XX_DSP_SIZE, MT_DEVICE },
56 { OMAP16XX_DSPREG_BASE, OMAP16XX_DSPREG_START, OMAP16XX_DSPREG_SIZE, MT_DEVICE },
57/*
58 * The OMAP5912 has 250kByte internal SRAM. Because the mapping is baseed on page
59 * size (4kByte), it seems that the last 2kByte (=0x800) of the 250kByte are not mapped.
60 * Add additional 2kByte (0x800) so that the last page is mapped and the last 2kByte
61 * can be used.
62 */
63 { OMAP16XX_SRAM_BASE, OMAP16XX_SRAM_START, OMAP5912_SRAM_SIZE + 0x800, MT_DEVICE }
64};
65#endif
66
67static int initialized = 0;
68
69static void __init _omap_map_io(void)
70{
71 initialized = 1;
72
73 /* We have to initialize the IO space mapping before we can run
74 * cpu_is_omapxxx() macros. */
75 iotable_init(omap_io_desc, ARRAY_SIZE(omap_io_desc));
76 omap_check_revision();
77
78#ifdef CONFIG_ARCH_OMAP730
79 if (cpu_is_omap730()) {
80 iotable_init(omap730_io_desc, ARRAY_SIZE(omap730_io_desc));
81 }
82#endif
83#ifdef CONFIG_ARCH_OMAP1510
84 if (cpu_is_omap1510()) {
85 iotable_init(omap1510_io_desc, ARRAY_SIZE(omap1510_io_desc));
86 }
87#endif
88#if defined(CONFIG_ARCH_OMAP16XX)
89 if (cpu_is_omap1610() || cpu_is_omap1710()) {
90 iotable_init(omap1610_io_desc, ARRAY_SIZE(omap1610_io_desc));
91 }
92 if (cpu_is_omap5912()) {
93 iotable_init(omap5912_io_desc, ARRAY_SIZE(omap5912_io_desc));
94 }
95#endif
96
97 /* REVISIT: Refer to OMAP5910 Errata, Advisory SYS_1: "Timeout Abort
98 * on a Posted Write in the TIPB Bridge".
99 */
100 omap_writew(0x0, MPU_PUBLIC_TIPB_CNTL);
101 omap_writew(0x0, MPU_PRIVATE_TIPB_CNTL);
102
103 /* Must init clocks early to assure that timer interrupt works
104 */
105 clk_init();
106}
107
108/*
109 * This should only get called from board specific init
110 */
111void omap_map_common_io(void)
112{
113 if (!initialized)
114 _omap_map_io();
115}
diff --git a/arch/arm/mach-omap/irq.c b/arch/arm/mach-omap1/irq.c
index f01c99266a86..a11b6d807352 100644
--- a/arch/arm/mach-omap/irq.c
+++ b/arch/arm/mach-omap1/irq.c
@@ -56,6 +56,7 @@
56struct omap_irq_bank { 56struct omap_irq_bank {
57 unsigned long base_reg; 57 unsigned long base_reg;
58 unsigned long trigger_map; 58 unsigned long trigger_map;
59 unsigned long wake_enable;
59}; 60};
60 61
61static unsigned int irq_bank_count = 0; 62static unsigned int irq_bank_count = 0;
@@ -105,6 +106,19 @@ static void omap_mask_ack_irq(unsigned int irq)
105 omap_ack_irq(irq); 106 omap_ack_irq(irq);
106} 107}
107 108
109static int omap_wake_irq(unsigned int irq, unsigned int enable)
110{
111 int bank = IRQ_BANK(irq);
112
113 if (enable)
114 irq_banks[bank].wake_enable |= IRQ_BIT(irq);
115 else
116 irq_banks[bank].wake_enable &= ~IRQ_BIT(irq);
117
118 return 0;
119}
120
121
108/* 122/*
109 * Allows tuning the IRQ type and priority 123 * Allows tuning the IRQ type and priority
110 * 124 *
@@ -145,7 +159,7 @@ static struct omap_irq_bank omap1510_irq_banks[] = {
145static struct omap_irq_bank omap1610_irq_banks[] = { 159static struct omap_irq_bank omap1610_irq_banks[] = {
146 { .base_reg = OMAP_IH1_BASE, .trigger_map = 0xb3fefe8f }, 160 { .base_reg = OMAP_IH1_BASE, .trigger_map = 0xb3fefe8f },
147 { .base_reg = OMAP_IH2_BASE, .trigger_map = 0xfdb7c1fd }, 161 { .base_reg = OMAP_IH2_BASE, .trigger_map = 0xfdb7c1fd },
148 { .base_reg = OMAP_IH2_BASE + 0x100, .trigger_map = 0xfffff7ff }, 162 { .base_reg = OMAP_IH2_BASE + 0x100, .trigger_map = 0xffffb7ff },
149 { .base_reg = OMAP_IH2_BASE + 0x200, .trigger_map = 0xffffffff }, 163 { .base_reg = OMAP_IH2_BASE + 0x200, .trigger_map = 0xffffffff },
150}; 164};
151#endif 165#endif
@@ -154,6 +168,7 @@ static struct irqchip omap_irq_chip = {
154 .ack = omap_mask_ack_irq, 168 .ack = omap_mask_ack_irq,
155 .mask = omap_mask_irq, 169 .mask = omap_mask_irq,
156 .unmask = omap_unmask_irq, 170 .unmask = omap_unmask_irq,
171 .wake = omap_wake_irq,
157}; 172};
158 173
159void __init omap_init_irq(void) 174void __init omap_init_irq(void)
diff --git a/arch/arm/mach-omap/leds-h2p2-debug.c b/arch/arm/mach-omap1/leds-h2p2-debug.c
index 6e98290cca5c..6e98290cca5c 100644
--- a/arch/arm/mach-omap/leds-h2p2-debug.c
+++ b/arch/arm/mach-omap1/leds-h2p2-debug.c
diff --git a/arch/arm/mach-omap/leds-innovator.c b/arch/arm/mach-omap1/leds-innovator.c
index 8043b7d0f66e..8043b7d0f66e 100644
--- a/arch/arm/mach-omap/leds-innovator.c
+++ b/arch/arm/mach-omap1/leds-innovator.c
diff --git a/arch/arm/mach-omap/leds-osk.c b/arch/arm/mach-omap1/leds-osk.c
index f5177f430793..4a0e8b9d4fc3 100644
--- a/arch/arm/mach-omap/leds-osk.c
+++ b/arch/arm/mach-omap1/leds-osk.c
@@ -129,14 +129,11 @@ void osk_leds_event(led_event_t evt)
129 129
130#ifdef CONFIG_FB_OMAP 130#ifdef CONFIG_FB_OMAP
131 131
132#ifdef CONFIG_LEDS_TIMER
133 case led_timer: 132 case led_timer:
134 hw_led_state ^= TIMER_LED; 133 hw_led_state ^= TIMER_LED;
135 mistral_setled(); 134 mistral_setled();
136 break; 135 break;
137#endif
138 136
139#ifdef CONFIG_LEDS_CPU
140 case led_idle_start: 137 case led_idle_start:
141 hw_led_state |= IDLE_LED; 138 hw_led_state |= IDLE_LED;
142 mistral_setled(); 139 mistral_setled();
@@ -146,7 +143,6 @@ void osk_leds_event(led_event_t evt)
146 hw_led_state &= ~IDLE_LED; 143 hw_led_state &= ~IDLE_LED;
147 mistral_setled(); 144 mistral_setled();
148 break; 145 break;
149#endif
150 146
151#endif /* CONFIG_FB_OMAP */ 147#endif /* CONFIG_FB_OMAP */
152 148
diff --git a/arch/arm/mach-omap/leds.c b/arch/arm/mach-omap1/leds.c
index 8ab21fe98e1b..8ab21fe98e1b 100644
--- a/arch/arm/mach-omap/leds.c
+++ b/arch/arm/mach-omap1/leds.c
diff --git a/arch/arm/mach-omap/leds.h b/arch/arm/mach-omap1/leds.h
index a1e9fedc376c..a1e9fedc376c 100644
--- a/arch/arm/mach-omap/leds.h
+++ b/arch/arm/mach-omap1/leds.h
diff --git a/arch/arm/mach-omap1/serial.c b/arch/arm/mach-omap1/serial.c
new file mode 100644
index 000000000000..214e5d17c8b5
--- /dev/null
+++ b/arch/arm/mach-omap1/serial.c
@@ -0,0 +1,200 @@
1/*
2 * linux/arch/arm/mach-omap1/id.c
3 *
4 * OMAP1 CPU identification code
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/config.h>
12#include <linux/module.h>
13#include <linux/kernel.h>
14#include <linux/init.h>
15#include <linux/delay.h>
16#include <linux/serial.h>
17#include <linux/tty.h>
18#include <linux/serial_8250.h>
19#include <linux/serial_reg.h>
20
21#include <asm/io.h>
22#include <asm/mach-types.h>
23#include <asm/hardware/clock.h>
24
25#include <asm/arch/board.h>
26#include <asm/arch/mux.h>
27#include <asm/arch/fpga.h>
28
29static struct clk * uart1_ck = NULL;
30static struct clk * uart2_ck = NULL;
31static struct clk * uart3_ck = NULL;
32
33static inline unsigned int omap_serial_in(struct plat_serial8250_port *up,
34 int offset)
35{
36 offset <<= up->regshift;
37 return (unsigned int)__raw_readb(up->membase + offset);
38}
39
40static inline void omap_serial_outp(struct plat_serial8250_port *p, int offset,
41 int value)
42{
43 offset <<= p->regshift;
44 __raw_writeb(value, p->membase + offset);
45}
46
47/*
48 * Internal UARTs need to be initialized for the 8250 autoconfig to work
49 * properly. Note that the TX watermark initialization may not be needed
50 * once the 8250.c watermark handling code is merged.
51 */
52static void __init omap_serial_reset(struct plat_serial8250_port *p)
53{
54 omap_serial_outp(p, UART_OMAP_MDR1, 0x07); /* disable UART */
55 omap_serial_outp(p, UART_OMAP_SCR, 0x08); /* TX watermark */
56 omap_serial_outp(p, UART_OMAP_MDR1, 0x00); /* enable UART */
57
58 if (!cpu_is_omap1510()) {
59 omap_serial_outp(p, UART_OMAP_SYSC, 0x01);
60 while (!(omap_serial_in(p, UART_OMAP_SYSC) & 0x01));
61 }
62}
63
64static struct plat_serial8250_port serial_platform_data[] = {
65 {
66 .membase = (char*)IO_ADDRESS(OMAP_UART1_BASE),
67 .mapbase = (unsigned long)OMAP_UART1_BASE,
68 .irq = INT_UART1,
69 .flags = UPF_BOOT_AUTOCONF,
70 .iotype = UPIO_MEM,
71 .regshift = 2,
72 .uartclk = OMAP16XX_BASE_BAUD * 16,
73 },
74 {
75 .membase = (char*)IO_ADDRESS(OMAP_UART2_BASE),
76 .mapbase = (unsigned long)OMAP_UART2_BASE,
77 .irq = INT_UART2,
78 .flags = UPF_BOOT_AUTOCONF,
79 .iotype = UPIO_MEM,
80 .regshift = 2,
81 .uartclk = OMAP16XX_BASE_BAUD * 16,
82 },
83 {
84 .membase = (char*)IO_ADDRESS(OMAP_UART3_BASE),
85 .mapbase = (unsigned long)OMAP_UART3_BASE,
86 .irq = INT_UART3,
87 .flags = UPF_BOOT_AUTOCONF,
88 .iotype = UPIO_MEM,
89 .regshift = 2,
90 .uartclk = OMAP16XX_BASE_BAUD * 16,
91 },
92 { },
93};
94
95static struct platform_device serial_device = {
96 .name = "serial8250",
97 .id = 0,
98 .dev = {
99 .platform_data = serial_platform_data,
100 },
101};
102
103/*
104 * Note that on Innovator-1510 UART2 pins conflict with USB2.
105 * By default UART2 does not work on Innovator-1510 if you have
106 * USB OHCI enabled. To use UART2, you must disable USB2 first.
107 */
108void __init omap_serial_init(int ports[OMAP_MAX_NR_PORTS])
109{
110 int i;
111
112 if (cpu_is_omap730()) {
113 serial_platform_data[0].regshift = 0;
114 serial_platform_data[1].regshift = 0;
115 serial_platform_data[0].irq = INT_730_UART_MODEM_1;
116 serial_platform_data[1].irq = INT_730_UART_MODEM_IRDA_2;
117 }
118
119 if (cpu_is_omap1510()) {
120 serial_platform_data[0].uartclk = OMAP1510_BASE_BAUD * 16;
121 serial_platform_data[1].uartclk = OMAP1510_BASE_BAUD * 16;
122 serial_platform_data[2].uartclk = OMAP1510_BASE_BAUD * 16;
123 }
124
125 for (i = 0; i < OMAP_MAX_NR_PORTS; i++) {
126 unsigned char reg;
127
128 if (ports[i] == 0) {
129 serial_platform_data[i].membase = NULL;
130 serial_platform_data[i].mapbase = 0;
131 continue;
132 }
133
134 switch (i) {
135 case 0:
136 uart1_ck = clk_get(NULL, "uart1_ck");
137 if (IS_ERR(uart1_ck))
138 printk("Could not get uart1_ck\n");
139 else {
140 clk_use(uart1_ck);
141 if (cpu_is_omap1510())
142 clk_set_rate(uart1_ck, 12000000);
143 }
144 if (cpu_is_omap1510()) {
145 omap_cfg_reg(UART1_TX);
146 omap_cfg_reg(UART1_RTS);
147 if (machine_is_omap_innovator()) {
148 reg = fpga_read(OMAP1510_FPGA_POWER);
149 reg |= OMAP1510_FPGA_PCR_COM1_EN;
150 fpga_write(reg, OMAP1510_FPGA_POWER);
151 udelay(10);
152 }
153 }
154 break;
155 case 1:
156 uart2_ck = clk_get(NULL, "uart2_ck");
157 if (IS_ERR(uart2_ck))
158 printk("Could not get uart2_ck\n");
159 else {
160 clk_use(uart2_ck);
161 if (cpu_is_omap1510())
162 clk_set_rate(uart2_ck, 12000000);
163 else
164 clk_set_rate(uart2_ck, 48000000);
165 }
166 if (cpu_is_omap1510()) {
167 omap_cfg_reg(UART2_TX);
168 omap_cfg_reg(UART2_RTS);
169 if (machine_is_omap_innovator()) {
170 reg = fpga_read(OMAP1510_FPGA_POWER);
171 reg |= OMAP1510_FPGA_PCR_COM2_EN;
172 fpga_write(reg, OMAP1510_FPGA_POWER);
173 udelay(10);
174 }
175 }
176 break;
177 case 2:
178 uart3_ck = clk_get(NULL, "uart3_ck");
179 if (IS_ERR(uart3_ck))
180 printk("Could not get uart3_ck\n");
181 else {
182 clk_use(uart3_ck);
183 if (cpu_is_omap1510())
184 clk_set_rate(uart3_ck, 12000000);
185 }
186 if (cpu_is_omap1510()) {
187 omap_cfg_reg(UART3_TX);
188 omap_cfg_reg(UART3_RX);
189 }
190 break;
191 }
192 omap_serial_reset(&serial_platform_data[i]);
193 }
194}
195
196static int __init omap_init(void)
197{
198 return platform_device_register(&serial_device);
199}
200arch_initcall(omap_init);
diff --git a/arch/arm/mach-omap/time.c b/arch/arm/mach-omap1/time.c
index dd34e9f4c413..d540539c9bbb 100644
--- a/arch/arm/mach-omap/time.c
+++ b/arch/arm/mach-omap1/time.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-omap/time.c 2 * linux/arch/arm/mach-omap1/time.c
3 * 3 *
4 * OMAP Timers 4 * OMAP Timers
5 * 5 *
@@ -58,17 +58,9 @@ struct sys_timer omap_timer;
58 * MPU timer 58 * MPU timer
59 * --------------------------------------------------------------------------- 59 * ---------------------------------------------------------------------------
60 */ 60 */
61#define OMAP_MPU_TIMER1_BASE (0xfffec500)
62#define OMAP_MPU_TIMER2_BASE (0xfffec600)
63#define OMAP_MPU_TIMER3_BASE (0xfffec700)
64#define OMAP_MPU_TIMER_BASE OMAP_MPU_TIMER1_BASE 61#define OMAP_MPU_TIMER_BASE OMAP_MPU_TIMER1_BASE
65#define OMAP_MPU_TIMER_OFFSET 0x100 62#define OMAP_MPU_TIMER_OFFSET 0x100
66 63
67#define MPU_TIMER_FREE (1 << 6)
68#define MPU_TIMER_CLOCK_ENABLE (1 << 5)
69#define MPU_TIMER_AR (1 << 1)
70#define MPU_TIMER_ST (1 << 0)
71
72/* cycles to nsec conversions taken from arch/i386/kernel/timers/timer_tsc.c, 64/* cycles to nsec conversions taken from arch/i386/kernel/timers/timer_tsc.c,
73 * converted to use kHz by Kevin Hilman */ 65 * converted to use kHz by Kevin Hilman */
74/* convert from cycles(64bits) => nanoseconds (64bits) 66/* convert from cycles(64bits) => nanoseconds (64bits)
@@ -255,6 +247,13 @@ unsigned long long sched_clock(void)
255#define OMAP_32K_TIMER_TCR 0x04 247#define OMAP_32K_TIMER_TCR 0x04
256 248
257#define OMAP_32K_TICKS_PER_HZ (32768 / HZ) 249#define OMAP_32K_TICKS_PER_HZ (32768 / HZ)
250#if (32768 % HZ) != 0
251/* We cannot ignore modulo.
252 * Potential error can be as high as several percent.
253 */
254#define OMAP_32K_TICK_MODULO (32768 % HZ)
255static unsigned modulo_count = 0; /* Counts 1/HZ units */
256#endif
258 257
259/* 258/*
260 * TRM says 1 / HZ = ( TVR + 1) / 32768, so TRV = (32768 / HZ) - 1 259 * TRM says 1 / HZ = ( TVR + 1) / 32768, so TRV = (32768 / HZ) - 1
@@ -331,6 +330,19 @@ static irqreturn_t omap_32k_timer_interrupt(int irq, void *dev_id,
331 now = omap_32k_sync_timer_read(); 330 now = omap_32k_sync_timer_read();
332 331
333 while (now - omap_32k_last_tick >= OMAP_32K_TICKS_PER_HZ) { 332 while (now - omap_32k_last_tick >= OMAP_32K_TICKS_PER_HZ) {
333#ifdef OMAP_32K_TICK_MODULO
334 /* Modulo addition may put omap_32k_last_tick ahead of now
335 * and cause unwanted repetition of the while loop.
336 */
337 if (unlikely(now - omap_32k_last_tick == ~0))
338 break;
339
340 modulo_count += OMAP_32K_TICK_MODULO;
341 if (modulo_count > HZ) {
342 ++omap_32k_last_tick;
343 modulo_count -= HZ;
344 }
345#endif
334 omap_32k_last_tick += OMAP_32K_TICKS_PER_HZ; 346 omap_32k_last_tick += OMAP_32K_TICKS_PER_HZ;
335 timer_tick(regs); 347 timer_tick(regs);
336 } 348 }
@@ -407,7 +419,7 @@ static __init void omap_init_32k_timer(void)
407 * Timer initialization 419 * Timer initialization
408 * --------------------------------------------------------------------------- 420 * ---------------------------------------------------------------------------
409 */ 421 */
410void __init omap_timer_init(void) 422static void __init omap_timer_init(void)
411{ 423{
412#if defined(CONFIG_OMAP_MPU_TIMER) 424#if defined(CONFIG_OMAP_MPU_TIMER)
413 omap_init_mpu_timer(); 425 omap_init_mpu_timer();
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
index 95606b4a3ba6..afbbeb6f4658 100644
--- a/arch/arm/mm/Kconfig
+++ b/arch/arm/mm/Kconfig
@@ -101,7 +101,7 @@ config CPU_ARM922T
101 101
102# ARM925T 102# ARM925T
103config CPU_ARM925T 103config CPU_ARM925T
104 bool "Support ARM925T processor" if ARCH_OMAP 104 bool "Support ARM925T processor" if ARCH_OMAP1
105 depends on ARCH_OMAP1510 105 depends on ARCH_OMAP1510
106 default y if ARCH_OMAP1510 106 default y if ARCH_OMAP1510
107 select CPU_32v4 107 select CPU_32v4
diff --git a/arch/arm/mm/mm-armv.c b/arch/arm/mm/mm-armv.c
index c3bd503b43a2..b19f00e99a21 100644
--- a/arch/arm/mm/mm-armv.c
+++ b/arch/arm/mm/mm-armv.c
@@ -399,7 +399,7 @@ static void __init build_mem_type_table(void)
399 ecc_mask = 0; 399 ecc_mask = 0;
400 } 400 }
401 401
402 if (cpu_arch <= CPU_ARCH_ARMv5) { 402 if (cpu_arch <= CPU_ARCH_ARMv5TEJ) {
403 for (i = 0; i < ARRAY_SIZE(mem_types); i++) { 403 for (i = 0; i < ARRAY_SIZE(mem_types); i++) {
404 if (mem_types[i].prot_l1) 404 if (mem_types[i].prot_l1)
405 mem_types[i].prot_l1 |= PMD_BIT4; 405 mem_types[i].prot_l1 |= PMD_BIT4;
@@ -584,7 +584,7 @@ void setup_mm_for_reboot(char mode)
584 pmdval = (i << PGDIR_SHIFT) | 584 pmdval = (i << PGDIR_SHIFT) |
585 PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | 585 PMD_SECT_AP_WRITE | PMD_SECT_AP_READ |
586 PMD_TYPE_SECT; 586 PMD_TYPE_SECT;
587 if (cpu_arch <= CPU_ARCH_ARMv5) 587 if (cpu_arch <= CPU_ARCH_ARMv5TEJ)
588 pmdval |= PMD_BIT4; 588 pmdval |= PMD_BIT4;
589 pmd = pmd_off(pgd, i << PGDIR_SHIFT); 589 pmd = pmd_off(pgd, i << PGDIR_SHIFT);
590 pmd[0] = __pmd(pmdval); 590 pmd[0] = __pmd(pmdval);
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
new file mode 100644
index 000000000000..345365852f8c
--- /dev/null
+++ b/arch/arm/plat-omap/Kconfig
@@ -0,0 +1,112 @@
1if ARCH_OMAP
2
3menu "TI OMAP Implementations"
4
5config ARCH_OMAP_OTG
6 bool
7
8choice
9 prompt "OMAP System Type"
10 default ARCH_OMAP1
11
12config ARCH_OMAP1
13 bool "TI OMAP1"
14
15config ARCH_OMAP2
16 bool "TI OMAP2"
17
18endchoice
19
20comment "OMAP Feature Selections"
21
22config OMAP_RESET_CLOCKS
23 bool "Reset unused clocks during boot"
24 depends on ARCH_OMAP
25 default n
26 help
27 Say Y if you want to reset unused clocks during boot.
28 This option saves power, but assumes all drivers are
29 using the clock framework. Broken drivers that do not
30 yet use clock framework may not work with this option.
31 If you are booting from another operating system, you
32 probably do not want this option enabled until your
33 device drivers work properly.
34
35config OMAP_MUX
36 bool "OMAP multiplexing support"
37 depends on ARCH_OMAP
38 default y
39 help
40 Pin multiplexing support for OMAP boards. If your bootloader
41 sets the multiplexing correctly, say N. Otherwise, or if unsure,
42 say Y.
43
44config OMAP_MUX_DEBUG
45 bool "Multiplexing debug output"
46 depends on OMAP_MUX
47 default n
48 help
49 Makes the multiplexing functions print out a lot of debug info.
50 This is useful if you want to find out the correct values of the
51 multiplexing registers.
52
53config OMAP_MUX_WARNINGS
54 bool "Warn about pins the bootloader didn't set up"
55 depends on OMAP_MUX
56 default y
57 help
58 Choose Y here to warn whenever driver initialization logic needs
59 to change the pin multiplexing setup. When there are no warnings
60 printed, it's safe to deselect OMAP_MUX for your product.
61
62choice
63 prompt "System timer"
64 default OMAP_MPU_TIMER
65
66config OMAP_MPU_TIMER
67 bool "Use mpu timer"
68 help
69 Select this option if you want to use the OMAP mpu timer. This
70 timer provides more intra-tick resolution than the 32KHz timer,
71 but consumes more power.
72
73config OMAP_32K_TIMER
74 bool "Use 32KHz timer"
75 depends on ARCH_OMAP16XX
76 help
77 Select this option if you want to enable the OMAP 32KHz timer.
78 This timer saves power compared to the OMAP_MPU_TIMER, and has
79 support for no tick during idle. The 32KHz timer provides less
80 intra-tick resolution than OMAP_MPU_TIMER. The 32KHz timer is
81 currently only available for OMAP-16xx.
82
83endchoice
84
85config OMAP_32K_TIMER_HZ
86 int "Kernel internal timer frequency for 32KHz timer"
87 range 32 1024
88 depends on OMAP_32K_TIMER
89 default "128"
90 help
91 Kernel internal timer frequency should be a divisor of 32768,
92 such as 64 or 128.
93
94choice
95 prompt "Low-level debug console UART"
96 depends on ARCH_OMAP
97 default OMAP_LL_DEBUG_UART1
98
99config OMAP_LL_DEBUG_UART1
100 bool "UART1"
101
102config OMAP_LL_DEBUG_UART2
103 bool "UART2"
104
105config OMAP_LL_DEBUG_UART3
106 bool "UART3"
107
108endchoice
109
110endmenu
111
112endif
diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile
new file mode 100644
index 000000000000..531e11af54d4
--- /dev/null
+++ b/arch/arm/plat-omap/Makefile
@@ -0,0 +1,17 @@
1#
2# Makefile for the linux kernel.
3#
4
5# Common support
6obj-y := common.o dma.o clock.o mux.o gpio.o mcbsp.o usb.o
7obj-m :=
8obj-n :=
9obj- :=
10
11# OCPI interconnect support for 1710, 1610 and 5912
12obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o
13
14# Power Management
15obj-$(CONFIG_PM) += pm.o sleep.o
16
17obj-$(CONFIG_CPU_FREQ) += cpu-omap.o
diff --git a/arch/arm/mach-omap/clock.c b/arch/arm/plat-omap/clock.c
index e91186b5341a..59d91b3262ba 100644
--- a/arch/arm/mach-omap/clock.c
+++ b/arch/arm/plat-omap/clock.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-omap/clock.c 2 * linux/arch/arm/plat-omap/clock.c
3 * 3 *
4 * Copyright (C) 2004 Nokia corporation 4 * Copyright (C) 2004 Nokia corporation
5 * Written by Tuukka Tikkanen <tuukka.tikkanen@elektrobit.com> 5 * Written by Tuukka Tikkanen <tuukka.tikkanen@elektrobit.com>
@@ -14,6 +14,7 @@
14#include <linux/errno.h> 14#include <linux/errno.h>
15#include <linux/err.h> 15#include <linux/err.h>
16 16
17#include <asm/io.h>
17#include <asm/semaphore.h> 18#include <asm/semaphore.h>
18#include <asm/hardware/clock.h> 19#include <asm/hardware/clock.h>
19#include <asm/arch/board.h> 20#include <asm/arch/board.h>
@@ -25,6 +26,8 @@ static LIST_HEAD(clocks);
25static DECLARE_MUTEX(clocks_sem); 26static DECLARE_MUTEX(clocks_sem);
26static DEFINE_SPINLOCK(clockfw_lock); 27static DEFINE_SPINLOCK(clockfw_lock);
27static void propagate_rate(struct clk * clk); 28static void propagate_rate(struct clk * clk);
29/* UART clock function */
30static int set_uart_rate(struct clk * clk, unsigned long rate);
28/* External clock (MCLK & BCLK) functions */ 31/* External clock (MCLK & BCLK) functions */
29static int set_ext_clk_rate(struct clk * clk, unsigned long rate); 32static int set_ext_clk_rate(struct clk * clk, unsigned long rate);
30static long round_ext_clk_rate(struct clk * clk, unsigned long rate); 33static long round_ext_clk_rate(struct clk * clk, unsigned long rate);
@@ -34,7 +37,7 @@ static int select_table_rate(struct clk * clk, unsigned long rate);
34static long round_to_table_rate(struct clk * clk, unsigned long rate); 37static long round_to_table_rate(struct clk * clk, unsigned long rate);
35void clk_setdpll(__u16, __u16); 38void clk_setdpll(__u16, __u16);
36 39
37struct mpu_rate rate_table[] = { 40static struct mpu_rate rate_table[] = {
38 /* MPU MHz, xtal MHz, dpll1 MHz, CKCTL, DPLL_CTL 41 /* MPU MHz, xtal MHz, dpll1 MHz, CKCTL, DPLL_CTL
39 * armdiv, dspdiv, dspmmu, tcdiv, perdiv, lcddiv 42 * armdiv, dspdiv, dspmmu, tcdiv, perdiv, lcddiv
40 */ 43 */
@@ -48,7 +51,7 @@ struct mpu_rate rate_table[] = {
48 { 192000000, 19200000, 192000000, 0x050f, 0x2510 }, /* 1/1/2/2/8/8 */ 51 { 192000000, 19200000, 192000000, 0x050f, 0x2510 }, /* 1/1/2/2/8/8 */
49 { 192000000, 12000000, 192000000, 0x050f, 0x2810 }, /* 1/1/2/2/8/8 */ 52 { 192000000, 12000000, 192000000, 0x050f, 0x2810 }, /* 1/1/2/2/8/8 */
50 { 96000000, 12000000, 192000000, 0x055f, 0x2810 }, /* 2/2/2/2/8/8 */ 53 { 96000000, 12000000, 192000000, 0x055f, 0x2810 }, /* 2/2/2/2/8/8 */
51 { 48000000, 12000000, 192000000, 0x0ccf, 0x2810 }, /* 4/4/4/4/8/8 */ 54 { 48000000, 12000000, 192000000, 0x0baf, 0x2810 }, /* 4/8/4/4/8/8 */
52 { 24000000, 12000000, 192000000, 0x0fff, 0x2810 }, /* 8/8/8/8/8/8 */ 55 { 24000000, 12000000, 192000000, 0x0fff, 0x2810 }, /* 8/8/8/8/8/8 */
53#endif 56#endif
54#if defined(CONFIG_OMAP_ARM_182MHZ) 57#if defined(CONFIG_OMAP_ARM_182MHZ)
@@ -58,7 +61,7 @@ struct mpu_rate rate_table[] = {
58 { 168000000, 12000000, 168000000, 0x010f, 0x2710 }, /* 1/1/1/2/8/8 */ 61 { 168000000, 12000000, 168000000, 0x010f, 0x2710 }, /* 1/1/1/2/8/8 */
59#endif 62#endif
60#if defined(CONFIG_OMAP_ARM_150MHZ) 63#if defined(CONFIG_OMAP_ARM_150MHZ)
61 { 150000000, 12000000, 150000000, 0x150a, 0x2cb0 }, /* 0/0/1/1/2/2 */ 64 { 150000000, 12000000, 150000000, 0x010a, 0x2cb0 }, /* 1/1/1/2/4/4 */
62#endif 65#endif
63#if defined(CONFIG_OMAP_ARM_120MHZ) 66#if defined(CONFIG_OMAP_ARM_120MHZ)
64 { 120000000, 12000000, 120000000, 0x010a, 0x2510 }, /* 1/1/1/2/4/4 */ 67 { 120000000, 12000000, 120000000, 0x010a, 0x2510 }, /* 1/1/1/2/4/4 */
@@ -76,19 +79,11 @@ struct mpu_rate rate_table[] = {
76}; 79};
77 80
78 81
79static void ckctl_recalc(struct clk * clk) 82static void ckctl_recalc(struct clk * clk);
80{ 83int __clk_enable(struct clk *clk);
81 int dsor; 84void __clk_disable(struct clk *clk);
82 85void __clk_unuse(struct clk *clk);
83 /* Calculate divisor encoded as 2-bit exponent */ 86int __clk_use(struct clk *clk);
84 dsor = 1 << (3 & (omap_readw(ARM_CKCTL) >> clk->rate_offset));
85 if (unlikely(clk->rate == clk->parent->rate / dsor))
86 return; /* No change, quick exit */
87 clk->rate = clk->parent->rate / dsor;
88
89 if (unlikely(clk->flags & RATE_PROPAGATES))
90 propagate_rate(clk);
91}
92 87
93 88
94static void followparent_recalc(struct clk * clk) 89static void followparent_recalc(struct clk * clk)
@@ -102,6 +97,14 @@ static void watchdog_recalc(struct clk * clk)
102 clk->rate = clk->parent->rate / 14; 97 clk->rate = clk->parent->rate / 14;
103} 98}
104 99
100static void uart_recalc(struct clk * clk)
101{
102 unsigned int val = omap_readl(clk->enable_reg);
103 if (val & clk->enable_bit)
104 clk->rate = 48000000;
105 else
106 clk->rate = 12000000;
107}
105 108
106static struct clk ck_ref = { 109static struct clk ck_ref = {
107 .name = "ck_ref", 110 .name = "ck_ref",
@@ -138,7 +141,7 @@ static struct clk arm_ck = {
138static struct clk armper_ck = { 141static struct clk armper_ck = {
139 .name = "armper_ck", 142 .name = "armper_ck",
140 .parent = &ck_dpll1, 143 .parent = &ck_dpll1,
141 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | 144 .flags = CLOCK_IN_OMAP730 | CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
142 RATE_CKCTL, 145 RATE_CKCTL,
143 .enable_reg = ARM_IDLECT2, 146 .enable_reg = ARM_IDLECT2,
144 .enable_bit = EN_PERCK, 147 .enable_bit = EN_PERCK,
@@ -185,7 +188,7 @@ static struct clk armwdt_ck = {
185static struct clk arminth_ck16xx = { 188static struct clk arminth_ck16xx = {
186 .name = "arminth_ck", 189 .name = "arminth_ck",
187 .parent = &arm_ck, 190 .parent = &arm_ck,
188 .flags = CLOCK_IN_OMAP16XX, 191 .flags = CLOCK_IN_OMAP16XX | ALWAYS_ENABLED,
189 .recalc = &followparent_recalc, 192 .recalc = &followparent_recalc,
190 /* Note: On 16xx the frequency can be divided by 2 by programming 193 /* Note: On 16xx the frequency can be divided by 2 by programming
191 * ARM_CKCTL:ARM_INTHCK_SEL(14) to 1 194 * ARM_CKCTL:ARM_INTHCK_SEL(14) to 1
@@ -214,6 +217,38 @@ static struct clk dspmmu_ck = {
214 .recalc = &ckctl_recalc, 217 .recalc = &ckctl_recalc,
215}; 218};
216 219
220static struct clk dspper_ck = {
221 .name = "dspper_ck",
222 .parent = &ck_dpll1,
223 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
224 RATE_CKCTL | DSP_DOMAIN_CLOCK | VIRTUAL_IO_ADDRESS,
225 .enable_reg = DSP_IDLECT2,
226 .enable_bit = EN_PERCK,
227 .rate_offset = CKCTL_PERDIV_OFFSET,
228 .recalc = &followparent_recalc,
229 //.recalc = &ckctl_recalc,
230};
231
232static struct clk dspxor_ck = {
233 .name = "dspxor_ck",
234 .parent = &ck_ref,
235 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
236 DSP_DOMAIN_CLOCK | VIRTUAL_IO_ADDRESS,
237 .enable_reg = DSP_IDLECT2,
238 .enable_bit = EN_XORPCK,
239 .recalc = &followparent_recalc,
240};
241
242static struct clk dsptim_ck = {
243 .name = "dsptim_ck",
244 .parent = &ck_ref,
245 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
246 DSP_DOMAIN_CLOCK | VIRTUAL_IO_ADDRESS,
247 .enable_reg = DSP_IDLECT2,
248 .enable_bit = EN_DSPTIMCK,
249 .recalc = &followparent_recalc,
250};
251
217static struct clk tc_ck = { 252static struct clk tc_ck = {
218 .name = "tc_ck", 253 .name = "tc_ck",
219 .parent = &ck_dpll1, 254 .parent = &ck_dpll1,
@@ -226,7 +261,7 @@ static struct clk tc_ck = {
226static struct clk arminth_ck1510 = { 261static struct clk arminth_ck1510 = {
227 .name = "arminth_ck", 262 .name = "arminth_ck",
228 .parent = &tc_ck, 263 .parent = &tc_ck,
229 .flags = CLOCK_IN_OMAP1510, 264 .flags = CLOCK_IN_OMAP1510 | ALWAYS_ENABLED,
230 .recalc = &followparent_recalc, 265 .recalc = &followparent_recalc,
231 /* Note: On 1510 the frequency follows TC_CK 266 /* Note: On 1510 the frequency follows TC_CK
232 * 267 *
@@ -237,7 +272,7 @@ static struct clk arminth_ck1510 = {
237static struct clk tipb_ck = { 272static struct clk tipb_ck = {
238 .name = "tibp_ck", 273 .name = "tibp_ck",
239 .parent = &tc_ck, 274 .parent = &tc_ck,
240 .flags = CLOCK_IN_OMAP1510, 275 .flags = CLOCK_IN_OMAP1510 | ALWAYS_ENABLED,
241 .recalc = &followparent_recalc, 276 .recalc = &followparent_recalc,
242}; 277};
243 278
@@ -271,14 +306,15 @@ static struct clk tc2_ck = {
271static struct clk dma_ck = { 306static struct clk dma_ck = {
272 .name = "dma_ck", 307 .name = "dma_ck",
273 .parent = &tc_ck, 308 .parent = &tc_ck,
274 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX, 309 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
310 ALWAYS_ENABLED,
275 .recalc = &followparent_recalc, 311 .recalc = &followparent_recalc,
276}; 312};
277 313
278static struct clk dma_lcdfree_ck = { 314static struct clk dma_lcdfree_ck = {
279 .name = "dma_lcdfree_ck", 315 .name = "dma_lcdfree_ck",
280 .parent = &tc_ck, 316 .parent = &tc_ck,
281 .flags = CLOCK_IN_OMAP16XX, 317 .flags = CLOCK_IN_OMAP16XX | ALWAYS_ENABLED,
282 .recalc = &followparent_recalc, 318 .recalc = &followparent_recalc,
283}; 319};
284 320
@@ -303,14 +339,14 @@ static struct clk lb_ck = {
303static struct clk rhea1_ck = { 339static struct clk rhea1_ck = {
304 .name = "rhea1_ck", 340 .name = "rhea1_ck",
305 .parent = &tc_ck, 341 .parent = &tc_ck,
306 .flags = CLOCK_IN_OMAP16XX, 342 .flags = CLOCK_IN_OMAP16XX | ALWAYS_ENABLED,
307 .recalc = &followparent_recalc, 343 .recalc = &followparent_recalc,
308}; 344};
309 345
310static struct clk rhea2_ck = { 346static struct clk rhea2_ck = {
311 .name = "rhea2_ck", 347 .name = "rhea2_ck",
312 .parent = &tc_ck, 348 .parent = &tc_ck,
313 .flags = CLOCK_IN_OMAP16XX, 349 .flags = CLOCK_IN_OMAP16XX | ALWAYS_ENABLED,
314 .recalc = &followparent_recalc, 350 .recalc = &followparent_recalc,
315}; 351};
316 352
@@ -325,43 +361,55 @@ static struct clk lcd_ck = {
325 .recalc = &ckctl_recalc, 361 .recalc = &ckctl_recalc,
326}; 362};
327 363
328static struct clk uart1_ck = { 364static struct clk uart1_1510 = {
365 .name = "uart1_ck",
366 /* Direct from ULPD, no parent */
367 .rate = 12000000,
368 .flags = CLOCK_IN_OMAP1510 | ENABLE_REG_32BIT | ALWAYS_ENABLED,
369 .enable_reg = MOD_CONF_CTRL_0,
370 .enable_bit = 29, /* Chooses between 12MHz and 48MHz */
371 .set_rate = &set_uart_rate,
372 .recalc = &uart_recalc,
373};
374
375static struct clk uart1_16xx = {
329 .name = "uart1_ck", 376 .name = "uart1_ck",
330 /* Direct from ULPD, no parent */ 377 /* Direct from ULPD, no parent */
331 .rate = 48000000, 378 .rate = 48000000,
332 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | 379 .flags = CLOCK_IN_OMAP16XX | RATE_FIXED | ENABLE_REG_32BIT,
333 RATE_FIXED | ENABLE_REG_32BIT,
334 .enable_reg = MOD_CONF_CTRL_0, 380 .enable_reg = MOD_CONF_CTRL_0,
335 .enable_bit = 29, 381 .enable_bit = 29,
336 /* (Only on 1510)
337 * The "enable bit" actually chooses between 48MHz and 12MHz.
338 */
339}; 382};
340 383
341static struct clk uart2_ck = { 384static struct clk uart2_ck = {
342 .name = "uart2_ck", 385 .name = "uart2_ck",
343 /* Direct from ULPD, no parent */ 386 /* Direct from ULPD, no parent */
344 .rate = 48000000, 387 .rate = 12000000,
345 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | 388 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | ENABLE_REG_32BIT,
346 RATE_FIXED | ENABLE_REG_32BIT,
347 .enable_reg = MOD_CONF_CTRL_0, 389 .enable_reg = MOD_CONF_CTRL_0,
348 .enable_bit = 30, 390 .enable_bit = 30, /* Chooses between 12MHz and 48MHz */
349 /* (for both 1510 and 16xx) 391 .set_rate = &set_uart_rate,
350 * The "enable bit" actually chooses between 48MHz and 12MHz/32kHz. 392 .recalc = &uart_recalc,
351 */
352}; 393};
353 394
354static struct clk uart3_ck = { 395static struct clk uart3_1510 = {
396 .name = "uart3_ck",
397 /* Direct from ULPD, no parent */
398 .rate = 12000000,
399 .flags = CLOCK_IN_OMAP1510 | ENABLE_REG_32BIT | ALWAYS_ENABLED,
400 .enable_reg = MOD_CONF_CTRL_0,
401 .enable_bit = 31, /* Chooses between 12MHz and 48MHz */
402 .set_rate = &set_uart_rate,
403 .recalc = &uart_recalc,
404};
405
406static struct clk uart3_16xx = {
355 .name = "uart3_ck", 407 .name = "uart3_ck",
356 /* Direct from ULPD, no parent */ 408 /* Direct from ULPD, no parent */
357 .rate = 48000000, 409 .rate = 48000000,
358 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | 410 .flags = CLOCK_IN_OMAP16XX | RATE_FIXED | ENABLE_REG_32BIT,
359 RATE_FIXED | ENABLE_REG_32BIT,
360 .enable_reg = MOD_CONF_CTRL_0, 411 .enable_reg = MOD_CONF_CTRL_0,
361 .enable_bit = 31, 412 .enable_bit = 31,
362 /* (Only on 1510)
363 * The "enable bit" actually chooses between 48MHz and 12MHz.
364 */
365}; 413};
366 414
367static struct clk usb_clko = { /* 6 MHz output on W4_USB_CLKO */ 415static struct clk usb_clko = { /* 6 MHz output on W4_USB_CLKO */
@@ -480,6 +528,9 @@ static struct clk * onchip_clks[] = {
480 /* CK_GEN2 clocks */ 528 /* CK_GEN2 clocks */
481 &dsp_ck, 529 &dsp_ck,
482 &dspmmu_ck, 530 &dspmmu_ck,
531 &dspper_ck,
532 &dspxor_ck,
533 &dsptim_ck,
483 /* CK_GEN3 clocks */ 534 /* CK_GEN3 clocks */
484 &tc_ck, 535 &tc_ck,
485 &tipb_ck, 536 &tipb_ck,
@@ -494,9 +545,11 @@ static struct clk * onchip_clks[] = {
494 &rhea2_ck, 545 &rhea2_ck,
495 &lcd_ck, 546 &lcd_ck,
496 /* ULPD clocks */ 547 /* ULPD clocks */
497 &uart1_ck, 548 &uart1_1510,
549 &uart1_16xx,
498 &uart2_ck, 550 &uart2_ck,
499 &uart3_ck, 551 &uart3_1510,
552 &uart3_16xx,
500 &usb_clko, 553 &usb_clko,
501 &usb_hhc_ck1510, &usb_hhc_ck16xx, 554 &usb_hhc_ck1510, &usb_hhc_ck16xx,
502 &mclk_1510, &mclk_16xx, 555 &mclk_1510, &mclk_16xx,
@@ -547,14 +600,34 @@ int __clk_enable(struct clk *clk)
547 return 0; 600 return 0;
548 } 601 }
549 602
603 if (clk->flags & DSP_DOMAIN_CLOCK) {
604 __clk_use(&api_ck);
605 }
606
550 if (clk->flags & ENABLE_REG_32BIT) { 607 if (clk->flags & ENABLE_REG_32BIT) {
551 regval32 = omap_readl(clk->enable_reg); 608 if (clk->flags & VIRTUAL_IO_ADDRESS) {
552 regval32 |= (1 << clk->enable_bit); 609 regval32 = __raw_readl(clk->enable_reg);
553 omap_writel(regval32, clk->enable_reg); 610 regval32 |= (1 << clk->enable_bit);
611 __raw_writel(regval32, clk->enable_reg);
612 } else {
613 regval32 = omap_readl(clk->enable_reg);
614 regval32 |= (1 << clk->enable_bit);
615 omap_writel(regval32, clk->enable_reg);
616 }
554 } else { 617 } else {
555 regval16 = omap_readw(clk->enable_reg); 618 if (clk->flags & VIRTUAL_IO_ADDRESS) {
556 regval16 |= (1 << clk->enable_bit); 619 regval16 = __raw_readw(clk->enable_reg);
557 omap_writew(regval16, clk->enable_reg); 620 regval16 |= (1 << clk->enable_bit);
621 __raw_writew(regval16, clk->enable_reg);
622 } else {
623 regval16 = omap_readw(clk->enable_reg);
624 regval16 |= (1 << clk->enable_bit);
625 omap_writew(regval16, clk->enable_reg);
626 }
627 }
628
629 if (clk->flags & DSP_DOMAIN_CLOCK) {
630 __clk_unuse(&api_ck);
558 } 631 }
559 632
560 return 0; 633 return 0;
@@ -569,14 +642,34 @@ void __clk_disable(struct clk *clk)
569 if (clk->enable_reg == 0) 642 if (clk->enable_reg == 0)
570 return; 643 return;
571 644
645 if (clk->flags & DSP_DOMAIN_CLOCK) {
646 __clk_use(&api_ck);
647 }
648
572 if (clk->flags & ENABLE_REG_32BIT) { 649 if (clk->flags & ENABLE_REG_32BIT) {
573 regval32 = omap_readl(clk->enable_reg); 650 if (clk->flags & VIRTUAL_IO_ADDRESS) {
574 regval32 &= ~(1 << clk->enable_bit); 651 regval32 = __raw_readl(clk->enable_reg);
575 omap_writel(regval32, clk->enable_reg); 652 regval32 &= ~(1 << clk->enable_bit);
653 __raw_writel(regval32, clk->enable_reg);
654 } else {
655 regval32 = omap_readl(clk->enable_reg);
656 regval32 &= ~(1 << clk->enable_bit);
657 omap_writel(regval32, clk->enable_reg);
658 }
576 } else { 659 } else {
577 regval16 = omap_readw(clk->enable_reg); 660 if (clk->flags & VIRTUAL_IO_ADDRESS) {
578 regval16 &= ~(1 << clk->enable_bit); 661 regval16 = __raw_readw(clk->enable_reg);
579 omap_writew(regval16, clk->enable_reg); 662 regval16 &= ~(1 << clk->enable_bit);
663 __raw_writew(regval16, clk->enable_reg);
664 } else {
665 regval16 = omap_readw(clk->enable_reg);
666 regval16 &= ~(1 << clk->enable_bit);
667 omap_writew(regval16, clk->enable_reg);
668 }
669 }
670
671 if (clk->flags & DSP_DOMAIN_CLOCK) {
672 __clk_unuse(&api_ck);
580 } 673 }
581} 674}
582 675
@@ -766,6 +859,33 @@ static int calc_dsor_exp(struct clk *clk, unsigned long rate)
766 return dsor_exp; 859 return dsor_exp;
767} 860}
768 861
862
863static void ckctl_recalc(struct clk * clk)
864{
865 int dsor;
866
867 /* Calculate divisor encoded as 2-bit exponent */
868 if (clk->flags & DSP_DOMAIN_CLOCK) {
869 /* The clock control bits are in DSP domain,
870 * so api_ck is needed for access.
871 * Note that DSP_CKCTL virt addr = phys addr, so
872 * we must use __raw_readw() instead of omap_readw().
873 */
874 __clk_use(&api_ck);
875 dsor = 1 << (3 & (__raw_readw(DSP_CKCTL) >> clk->rate_offset));
876 __clk_unuse(&api_ck);
877 } else {
878 dsor = 1 << (3 & (omap_readw(ARM_CKCTL) >> clk->rate_offset));
879 }
880 if (unlikely(clk->rate == clk->parent->rate / dsor))
881 return; /* No change, quick exit */
882 clk->rate = clk->parent->rate / dsor;
883
884 if (unlikely(clk->flags & RATE_PROPAGATES))
885 propagate_rate(clk);
886}
887
888
769long clk_round_rate(struct clk *clk, unsigned long rate) 889long clk_round_rate(struct clk *clk, unsigned long rate)
770{ 890{
771 int dsor_exp; 891 int dsor_exp;
@@ -826,6 +946,9 @@ static int select_table_rate(struct clk * clk, unsigned long rate)
826 if (!ptr->rate) 946 if (!ptr->rate)
827 return -EINVAL; 947 return -EINVAL;
828 948
949 if (!ptr->rate)
950 return -EINVAL;
951
829 if (unlikely(ck_dpll1.rate == 0)) { 952 if (unlikely(ck_dpll1.rate == 0)) {
830 omap_writew(ptr->dpllctl_val, DPLL_CTL); 953 omap_writew(ptr->dpllctl_val, DPLL_CTL);
831 ck_dpll1.rate = ptr->pll_rate; 954 ck_dpll1.rate = ptr->pll_rate;
@@ -921,6 +1044,23 @@ static unsigned calc_ext_dsor(unsigned long rate)
921 return dsor; 1044 return dsor;
922} 1045}
923 1046
1047/* Only needed on 1510 */
1048static int set_uart_rate(struct clk * clk, unsigned long rate)
1049{
1050 unsigned int val;
1051
1052 val = omap_readl(clk->enable_reg);
1053 if (rate == 12000000)
1054 val &= ~(1 << clk->enable_bit);
1055 else if (rate == 48000000)
1056 val |= (1 << clk->enable_bit);
1057 else
1058 return -EINVAL;
1059 omap_writel(val, clk->enable_reg);
1060 clk->rate = rate;
1061
1062 return 0;
1063}
924 1064
925static int set_ext_clk_rate(struct clk * clk, unsigned long rate) 1065static int set_ext_clk_rate(struct clk * clk, unsigned long rate)
926{ 1066{
@@ -985,7 +1125,18 @@ void clk_unregister(struct clk *clk)
985} 1125}
986EXPORT_SYMBOL(clk_unregister); 1126EXPORT_SYMBOL(clk_unregister);
987 1127
988 1128#ifdef CONFIG_OMAP_RESET_CLOCKS
1129/*
1130 * Resets some clocks that may be left on from bootloader,
1131 * but leaves serial clocks on. See also omap_late_clk_reset().
1132 */
1133static inline void omap_early_clk_reset(void)
1134{
1135 //omap_writel(0x3 << 29, MOD_CONF_CTRL_0);
1136}
1137#else
1138#define omap_early_clk_reset() {}
1139#endif
989 1140
990int __init clk_init(void) 1141int __init clk_init(void)
991{ 1142{
@@ -993,6 +1144,8 @@ int __init clk_init(void)
993 const struct omap_clock_config *info; 1144 const struct omap_clock_config *info;
994 int crystal_type = 0; /* Default 12 MHz */ 1145 int crystal_type = 0; /* Default 12 MHz */
995 1146
1147 omap_early_clk_reset();
1148
996 for (clkp = onchip_clks; clkp < onchip_clks+ARRAY_SIZE(onchip_clks); clkp++) { 1149 for (clkp = onchip_clks; clkp < onchip_clks+ARRAY_SIZE(onchip_clks); clkp++) {
997 if (((*clkp)->flags &CLOCK_IN_OMAP1510) && cpu_is_omap1510()) { 1150 if (((*clkp)->flags &CLOCK_IN_OMAP1510) && cpu_is_omap1510()) {
998 clk_register(*clkp); 1151 clk_register(*clkp);
@@ -1023,9 +1176,42 @@ int __init clk_init(void)
1023 ck_ref.rate = 19200000; 1176 ck_ref.rate = 19200000;
1024#endif 1177#endif
1025 1178
1179 printk("Clocks: ARM_SYSST: 0x%04x DPLL_CTL: 0x%04x ARM_CKCTL: 0x%04x\n",
1180 omap_readw(ARM_SYSST), omap_readw(DPLL_CTL),
1181 omap_readw(ARM_CKCTL));
1182
1026 /* We want to be in syncronous scalable mode */ 1183 /* We want to be in syncronous scalable mode */
1027 omap_writew(0x1000, ARM_SYSST); 1184 omap_writew(0x1000, ARM_SYSST);
1028 1185
1186#ifdef CONFIG_OMAP_CLOCKS_SET_BY_BOOTLOADER
1187 /* Use values set by bootloader. Determine PLL rate and recalculate
1188 * dependent clocks as if kernel had changed PLL or divisors.
1189 */
1190 {
1191 unsigned pll_ctl_val = omap_readw(DPLL_CTL);
1192
1193 ck_dpll1.rate = ck_ref.rate; /* Base xtal rate */
1194 if (pll_ctl_val & 0x10) {
1195 /* PLL enabled, apply multiplier and divisor */
1196 if (pll_ctl_val & 0xf80)
1197 ck_dpll1.rate *= (pll_ctl_val & 0xf80) >> 7;
1198 ck_dpll1.rate /= ((pll_ctl_val & 0x60) >> 5) + 1;
1199 } else {
1200 /* PLL disabled, apply bypass divisor */
1201 switch (pll_ctl_val & 0xc) {
1202 case 0:
1203 break;
1204 case 0x4:
1205 ck_dpll1.rate /= 2;
1206 break;
1207 default:
1208 ck_dpll1.rate /= 4;
1209 break;
1210 }
1211 }
1212 }
1213 propagate_rate(&ck_dpll1);
1214#else
1029 /* Find the highest supported frequency and enable it */ 1215 /* Find the highest supported frequency and enable it */
1030 if (select_table_rate(&virtual_ck_mpu, ~0)) { 1216 if (select_table_rate(&virtual_ck_mpu, ~0)) {
1031 printk(KERN_ERR "System frequencies not set. Check your config.\n"); 1217 printk(KERN_ERR "System frequencies not set. Check your config.\n");
@@ -1034,12 +1220,13 @@ int __init clk_init(void)
1034 omap_writew(0x1005, ARM_CKCTL); 1220 omap_writew(0x1005, ARM_CKCTL);
1035 ck_dpll1.rate = 60000000; 1221 ck_dpll1.rate = 60000000;
1036 propagate_rate(&ck_dpll1); 1222 propagate_rate(&ck_dpll1);
1037 printk(KERN_INFO "Clocking rate (xtal/DPLL1/MPU): %ld/%ld/%ld\n",
1038 ck_ref.rate, ck_dpll1.rate, arm_ck.rate);
1039 } 1223 }
1040 1224#endif
1041 /* Cache rates for clocks connected to ck_ref (not dpll1) */ 1225 /* Cache rates for clocks connected to ck_ref (not dpll1) */
1042 propagate_rate(&ck_ref); 1226 propagate_rate(&ck_ref);
1227 printk(KERN_INFO "Clocking rate (xtal/DPLL1/MPU): %ld.%01ld/%ld/%ld MHz\n",
1228 ck_ref.rate / 1000000, (ck_ref.rate / 100000) % 10,
1229 ck_dpll1.rate, arm_ck.rate);
1043 1230
1044#ifdef CONFIG_MACH_OMAP_PERSEUS2 1231#ifdef CONFIG_MACH_OMAP_PERSEUS2
1045 /* Select slicer output as OMAP input clock */ 1232 /* Select slicer output as OMAP input clock */
@@ -1074,3 +1261,63 @@ int __init clk_init(void)
1074 1261
1075 return 0; 1262 return 0;
1076} 1263}
1264
1265
1266#ifdef CONFIG_OMAP_RESET_CLOCKS
1267
1268static int __init omap_late_clk_reset(void)
1269{
1270 /* Turn off all unused clocks */
1271 struct clk *p;
1272 __u32 regval32;
1273
1274 omap_writew(0, SOFT_REQ_REG);
1275 omap_writew(0, SOFT_REQ_REG2);
1276
1277 list_for_each_entry(p, &clocks, node) {
1278 if (p->usecount > 0 || (p->flags & ALWAYS_ENABLED) ||
1279 p->enable_reg == 0)
1280 continue;
1281
1282 /* Assume no DSP clocks have been activated by bootloader */
1283 if (p->flags & DSP_DOMAIN_CLOCK)
1284 continue;
1285
1286 /* Is the clock already disabled? */
1287 if (p->flags & ENABLE_REG_32BIT) {
1288 if (p->flags & VIRTUAL_IO_ADDRESS)
1289 regval32 = __raw_readl(p->enable_reg);
1290 else
1291 regval32 = omap_readl(p->enable_reg);
1292 } else {
1293 if (p->flags & VIRTUAL_IO_ADDRESS)
1294 regval32 = __raw_readw(p->enable_reg);
1295 else
1296 regval32 = omap_readw(p->enable_reg);
1297 }
1298
1299 if ((regval32 & (1 << p->enable_bit)) == 0)
1300 continue;
1301
1302 /* FIXME: This clock seems to be necessary but no-one
1303 * has asked for its activation. */
1304 if (p == &tc2_ck // FIX: pm.c (SRAM), CCP, Camera
1305 || p == &ck_dpll1out // FIX: SoSSI, SSR
1306 || p == &arm_gpio_ck // FIX: GPIO code for 1510
1307 ) {
1308 printk(KERN_INFO "FIXME: Clock \"%s\" seems unused\n",
1309 p->name);
1310 continue;
1311 }
1312
1313 printk(KERN_INFO "Disabling unused clock \"%s\"... ", p->name);
1314 __clk_disable(p);
1315 printk(" done\n");
1316 }
1317
1318 return 0;
1319}
1320
1321late_initcall(omap_late_clk_reset);
1322
1323#endif
diff --git a/arch/arm/mach-omap/clock.h b/arch/arm/plat-omap/clock.h
index 08c0ddde1835..a89e1e8c2519 100644
--- a/arch/arm/mach-omap/clock.h
+++ b/arch/arm/plat-omap/clock.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-omap/clock.h 2 * linux/arch/arm/plat-omap/clock.h
3 * 3 *
4 * Copyright (C) 2004 Nokia corporation 4 * Copyright (C) 2004 Nokia corporation
5 * Written by Tuukka Tikkanen <tuukka.tikkanen@elektrobit.com> 5 * Written by Tuukka Tikkanen <tuukka.tikkanen@elektrobit.com>
@@ -52,6 +52,8 @@ struct mpu_rate {
52#define CLOCK_IN_OMAP16XX 64 52#define CLOCK_IN_OMAP16XX 64
53#define CLOCK_IN_OMAP1510 128 53#define CLOCK_IN_OMAP1510 128
54#define CLOCK_IN_OMAP730 256 54#define CLOCK_IN_OMAP730 256
55#define DSP_DOMAIN_CLOCK 512
56#define VIRTUAL_IO_ADDRESS 1024
55 57
56/* ARM_CKCTL bit shifts */ 58/* ARM_CKCTL bit shifts */
57#define CKCTL_PERDIV_OFFSET 0 59#define CKCTL_PERDIV_OFFSET 0
@@ -63,6 +65,8 @@ struct mpu_rate {
63/*#define ARM_TIMXO 12*/ 65/*#define ARM_TIMXO 12*/
64#define EN_DSPCK 13 66#define EN_DSPCK 13
65/*#define ARM_INTHCK_SEL 14*/ /* Divide-by-2 for mpu inth_ck */ 67/*#define ARM_INTHCK_SEL 14*/ /* Divide-by-2 for mpu inth_ck */
68/* DSP_CKCTL bit shifts */
69#define CKCTL_DSPPERDIV_OFFSET 0
66 70
67/* ARM_IDLECT1 bit shifts */ 71/* ARM_IDLECT1 bit shifts */
68/*#define IDLWDT_ARM 0*/ 72/*#define IDLWDT_ARM 0*/
@@ -96,6 +100,9 @@ struct mpu_rate {
96#define EN_TC1_CK 2 100#define EN_TC1_CK 2
97#define EN_TC2_CK 4 101#define EN_TC2_CK 4
98 102
103/* DSP_IDLECT2 bit shifts (0,1,2 are same as for ARM_IDLECT2) */
104#define EN_DSPTIMCK 5
105
99/* Various register defines for clock controls scattered around OMAP chip */ 106/* Various register defines for clock controls scattered around OMAP chip */
100#define USB_MCLK_EN_BIT 4 /* In ULPD_CLKC_CTRL */ 107#define USB_MCLK_EN_BIT 4 /* In ULPD_CLKC_CTRL */
101#define USB_HOST_HHC_UHOST_EN 9 /* In MOD_CONF_CTRL_0 */ 108#define USB_HOST_HHC_UHOST_EN 9 /* In MOD_CONF_CTRL_0 */
@@ -103,7 +110,8 @@ struct mpu_rate {
103#define COM_ULPD_PLL_CLK_REQ 1 /* In COM_CLK_DIV_CTRL_SEL */ 110#define COM_ULPD_PLL_CLK_REQ 1 /* In COM_CLK_DIV_CTRL_SEL */
104#define SWD_CLK_DIV_CTRL_SEL 0xfffe0874 111#define SWD_CLK_DIV_CTRL_SEL 0xfffe0874
105#define COM_CLK_DIV_CTRL_SEL 0xfffe0878 112#define COM_CLK_DIV_CTRL_SEL 0xfffe0878
106 113#define SOFT_REQ_REG 0xfffe0834
114#define SOFT_REQ_REG2 0xfffe0880
107 115
108int clk_register(struct clk *clk); 116int clk_register(struct clk *clk);
109void clk_unregister(struct clk *clk); 117void clk_unregister(struct clk *clk);
diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c
new file mode 100644
index 000000000000..ea967a8f6ce5
--- /dev/null
+++ b/arch/arm/plat-omap/common.c
@@ -0,0 +1,135 @@
1/*
2 * linux/arch/arm/plat-omap/common.c
3 *
4 * Code common to all OMAP machines.
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#include <linux/config.h>
11#include <linux/module.h>
12#include <linux/kernel.h>
13#include <linux/init.h>
14#include <linux/delay.h>
15#include <linux/pm.h>
16#include <linux/console.h>
17#include <linux/serial.h>
18#include <linux/tty.h>
19#include <linux/serial_8250.h>
20#include <linux/serial_reg.h>
21
22#include <asm/hardware.h>
23#include <asm/system.h>
24#include <asm/pgtable.h>
25#include <asm/mach/map.h>
26#include <asm/hardware/clock.h>
27#include <asm/io.h>
28#include <asm/mach-types.h>
29
30#include <asm/arch/board.h>
31#include <asm/arch/mux.h>
32#include <asm/arch/fpga.h>
33
34#include "clock.h"
35
36#define NO_LENGTH_CHECK 0xffffffff
37
38extern int omap_bootloader_tag_len;
39extern u8 omap_bootloader_tag[];
40
41struct omap_board_config_kernel *omap_board_config;
42int omap_board_config_size = 0;
43
44static const void *get_config(u16 tag, size_t len, int skip, size_t *len_out)
45{
46 struct omap_board_config_kernel *kinfo = NULL;
47 int i;
48
49#ifdef CONFIG_OMAP_BOOT_TAG
50 struct omap_board_config_entry *info = NULL;
51
52 if (omap_bootloader_tag_len > 4)
53 info = (struct omap_board_config_entry *) omap_bootloader_tag;
54 while (info != NULL) {
55 u8 *next;
56
57 if (info->tag == tag) {
58 if (skip == 0)
59 break;
60 skip--;
61 }
62
63 if ((info->len & 0x03) != 0) {
64 /* We bail out to avoid an alignment fault */
65 printk(KERN_ERR "OMAP peripheral config: Length (%d) not word-aligned (tag %04x)\n",
66 info->len, info->tag);
67 return NULL;
68 }
69 next = (u8 *) info + sizeof(*info) + info->len;
70 if (next >= omap_bootloader_tag + omap_bootloader_tag_len)
71 info = NULL;
72 else
73 info = (struct omap_board_config_entry *) next;
74 }
75 if (info != NULL) {
76 /* Check the length as a lame attempt to check for
77 * binary inconsistancy. */
78 if (len != NO_LENGTH_CHECK) {
79 /* Word-align len */
80 if (len & 0x03)
81 len = (len + 3) & ~0x03;
82 if (info->len != len) {
83 printk(KERN_ERR "OMAP peripheral config: Length mismatch with tag %x (want %d, got %d)\n",
84 tag, len, info->len);
85 return NULL;
86 }
87 }
88 if (len_out != NULL)
89 *len_out = info->len;
90 return info->data;
91 }
92#endif
93 /* Try to find the config from the board-specific structures
94 * in the kernel. */
95 for (i = 0; i < omap_board_config_size; i++) {
96 if (omap_board_config[i].tag == tag) {
97 kinfo = &omap_board_config[i];
98 break;
99 }
100 }
101 if (kinfo == NULL)
102 return NULL;
103 return kinfo->data;
104}
105
106const void *__omap_get_config(u16 tag, size_t len, int nr)
107{
108 return get_config(tag, len, nr, NULL);
109}
110EXPORT_SYMBOL(__omap_get_config);
111
112const void *omap_get_var_config(u16 tag, size_t *len)
113{
114 return get_config(tag, NO_LENGTH_CHECK, 0, len);
115}
116EXPORT_SYMBOL(omap_get_var_config);
117
118static int __init omap_add_serial_console(void)
119{
120 const struct omap_serial_console_config *info;
121
122 info = omap_get_config(OMAP_TAG_SERIAL_CONSOLE,
123 struct omap_serial_console_config);
124 if (info != NULL && info->console_uart) {
125 static char speed[11], *opt = NULL;
126
127 if (info->console_speed) {
128 snprintf(speed, sizeof(speed), "%u", info->console_speed);
129 opt = speed;
130 }
131 return add_preferred_console("ttyS", info->console_uart - 1, opt);
132 }
133 return 0;
134}
135console_initcall(omap_add_serial_console);
diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c
new file mode 100644
index 000000000000..409aac2c4b9d
--- /dev/null
+++ b/arch/arm/plat-omap/cpu-omap.c
@@ -0,0 +1,128 @@
1/*
2 * linux/arch/arm/plat-omap/cpu-omap.c
3 *
4 * CPU frequency scaling for OMAP
5 *
6 * Copyright (C) 2005 Nokia Corporation
7 * Written by Tony Lindgren <tony@atomide.com>
8 *
9 * Based on cpu-sa1110.c, Copyright (C) 2001 Russell King
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#include <linux/types.h>
16#include <linux/kernel.h>
17#include <linux/sched.h>
18#include <linux/cpufreq.h>
19#include <linux/delay.h>
20#include <linux/init.h>
21#include <linux/err.h>
22
23#include <asm/hardware.h>
24#include <asm/mach-types.h>
25#include <asm/io.h>
26#include <asm/system.h>
27
28#include <asm/hardware/clock.h>
29
30/* TODO: Add support for SDRAM timing changes */
31
32int omap_verify_speed(struct cpufreq_policy *policy)
33{
34 struct clk * mpu_clk;
35
36 if (policy->cpu)
37 return -EINVAL;
38
39 cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq,
40 policy->cpuinfo.max_freq);
41 mpu_clk = clk_get(NULL, "mpu");
42 if (IS_ERR(mpu_clk))
43 return PTR_ERR(mpu_clk);
44 policy->min = clk_round_rate(mpu_clk, policy->min * 1000) / 1000;
45 policy->max = clk_round_rate(mpu_clk, policy->max * 1000) / 1000;
46 cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq,
47 policy->cpuinfo.max_freq);
48 clk_put(mpu_clk);
49
50 return 0;
51}
52
53unsigned int omap_getspeed(unsigned int cpu)
54{
55 struct clk * mpu_clk;
56 unsigned long rate;
57
58 if (cpu)
59 return 0;
60
61 mpu_clk = clk_get(NULL, "mpu");
62 if (IS_ERR(mpu_clk))
63 return 0;
64 rate = clk_get_rate(mpu_clk) / 1000;
65 clk_put(mpu_clk);
66
67 return rate;
68}
69
70static int omap_target(struct cpufreq_policy *policy,
71 unsigned int target_freq,
72 unsigned int relation)
73{
74 struct clk * mpu_clk;
75 struct cpufreq_freqs freqs;
76 int ret = 0;
77
78 mpu_clk = clk_get(NULL, "mpu");
79 if (IS_ERR(mpu_clk))
80 return PTR_ERR(mpu_clk);
81
82 freqs.old = omap_getspeed(0);
83 freqs.new = clk_round_rate(mpu_clk, target_freq * 1000) / 1000;
84 freqs.cpu = 0;
85
86 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
87 ret = clk_set_rate(mpu_clk, target_freq * 1000);
88 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
89 clk_put(mpu_clk);
90
91 return ret;
92}
93
94static int __init omap_cpu_init(struct cpufreq_policy *policy)
95{
96 struct clk * mpu_clk;
97
98 mpu_clk = clk_get(NULL, "mpu");
99 if (IS_ERR(mpu_clk))
100 return PTR_ERR(mpu_clk);
101
102 if (policy->cpu != 0)
103 return -EINVAL;
104 policy->cur = policy->min = policy->max = omap_getspeed(0);
105 policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
106 policy->cpuinfo.min_freq = clk_round_rate(mpu_clk, 0) / 1000;
107 policy->cpuinfo.max_freq = clk_round_rate(mpu_clk, 216000000) / 1000;
108 policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
109 clk_put(mpu_clk);
110
111 return 0;
112}
113
114static struct cpufreq_driver omap_driver = {
115 .flags = CPUFREQ_STICKY,
116 .verify = omap_verify_speed,
117 .target = omap_target,
118 .get = omap_getspeed,
119 .init = omap_cpu_init,
120 .name = "omap",
121};
122
123static int __init omap_cpufreq_init(void)
124{
125 return cpufreq_register_driver(&omap_driver);
126}
127
128arch_initcall(omap_cpufreq_init);
diff --git a/arch/arm/mach-omap/dma.c b/arch/arm/plat-omap/dma.c
index 7a9ebe80d6f8..c0a5c2fa42bd 100644
--- a/arch/arm/mach-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/omap/dma.c 2 * linux/arch/arm/plat-omap/dma.c
3 * 3 *
4 * Copyright (C) 2003 Nokia Corporation 4 * Copyright (C) 2003 Nokia Corporation
5 * Author: Juha Yrjölä <juha.yrjola@nokia.com> 5 * Author: Juha Yrjölä <juha.yrjola@nokia.com>
@@ -794,10 +794,6 @@ static void set_b1_regs(void)
794 w = omap_readw(OMAP1610_DMA_LCD_CTRL); 794 w = omap_readw(OMAP1610_DMA_LCD_CTRL);
795 /* Always set the source port as SDRAM for now*/ 795 /* Always set the source port as SDRAM for now*/
796 w &= ~(0x03 << 6); 796 w &= ~(0x03 << 6);
797 if (lcd_dma.ext_ctrl)
798 w |= 1 << 8;
799 else
800 w &= ~(1 << 8);
801 if (lcd_dma.callback != NULL) 797 if (lcd_dma.callback != NULL)
802 w |= 1 << 1; /* Block interrupt enable */ 798 w |= 1 << 1; /* Block interrupt enable */
803 else 799 else
@@ -889,9 +885,15 @@ void omap_enable_lcd_dma(void)
889 */ 885 */
890 if (enable_1510_mode || !lcd_dma.ext_ctrl) 886 if (enable_1510_mode || !lcd_dma.ext_ctrl)
891 return; 887 return;
888
889 w = omap_readw(OMAP1610_DMA_LCD_CTRL);
890 w |= 1 << 8;
891 omap_writew(w, OMAP1610_DMA_LCD_CTRL);
892
892 w = omap_readw(OMAP1610_DMA_LCD_CCR); 893 w = omap_readw(OMAP1610_DMA_LCD_CCR);
893 w |= 1 << 7; 894 w |= 1 << 7;
894 omap_writew(w, OMAP1610_DMA_LCD_CCR); 895 omap_writew(w, OMAP1610_DMA_LCD_CCR);
896
895 lcd_dma.active = 1; 897 lcd_dma.active = 1;
896} 898}
897 899
@@ -922,10 +924,19 @@ void omap_setup_lcd_dma(void)
922 924
923void omap_stop_lcd_dma(void) 925void omap_stop_lcd_dma(void)
924{ 926{
927 u16 w;
928
925 lcd_dma.active = 0; 929 lcd_dma.active = 0;
926 if (!enable_1510_mode && lcd_dma.ext_ctrl) 930 if (enable_1510_mode || !lcd_dma.ext_ctrl)
927 omap_writew(omap_readw(OMAP1610_DMA_LCD_CCR) & ~(1 << 7), 931 return;
928 OMAP1610_DMA_LCD_CCR); 932
933 w = omap_readw(OMAP1610_DMA_LCD_CCR);
934 w &= ~(1 << 7);
935 omap_writew(w, OMAP1610_DMA_LCD_CCR);
936
937 w = omap_readw(OMAP1610_DMA_LCD_CTRL);
938 w &= ~(1 << 8);
939 omap_writew(w, OMAP1610_DMA_LCD_CTRL);
929} 940}
930 941
931/* 942/*
@@ -972,6 +983,25 @@ dma_addr_t omap_get_dma_dst_pos(int lch)
972 (OMAP_DMA_CDSA_U(lch) << 16)); 983 (OMAP_DMA_CDSA_U(lch) << 16));
973} 984}
974 985
986int omap_dma_running(void)
987{
988 int lch;
989
990 /* Check if LCD DMA is running */
991 if (cpu_is_omap16xx())
992 if (omap_readw(OMAP1610_DMA_LCD_CCR) & OMAP_DMA_CCR_EN)
993 return 1;
994
995 for (lch = 0; lch < dma_chan_count; lch++) {
996 u16 w;
997
998 w = omap_readw(OMAP_DMA_CCR(lch));
999 if (w & OMAP_DMA_CCR_EN)
1000 return 1;
1001 }
1002 return 0;
1003}
1004
975static int __init omap_init_dma(void) 1005static int __init omap_init_dma(void)
976{ 1006{
977 int ch, r; 1007 int ch, r;
diff --git a/arch/arm/mach-omap/gpio.c b/arch/arm/plat-omap/gpio.c
index 9045dfd469ad..1c85b4e536c2 100644
--- a/arch/arm/mach-omap/gpio.c
+++ b/arch/arm/plat-omap/gpio.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-omap/gpio.c 2 * linux/arch/arm/plat-omap/gpio.c
3 * 3 *
4 * Support functions for OMAP GPIO 4 * Support functions for OMAP GPIO
5 * 5 *
diff --git a/arch/arm/mach-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c
index 7c4ad7713091..43567d5edddb 100644
--- a/arch/arm/mach-omap/mcbsp.c
+++ b/arch/arm/plat-omap/mcbsp.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/omap/mcbsp.c 2 * linux/arch/arm/plat-omap/mcbsp.c
3 * 3 *
4 * Copyright (C) 2004 Nokia Corporation 4 * Copyright (C) 2004 Nokia Corporation
5 * Author: Samuel Ortiz <samuel.ortiz@nokia.com> 5 * Author: Samuel Ortiz <samuel.ortiz@nokia.com>
@@ -66,6 +66,7 @@ struct omap_mcbsp {
66static struct omap_mcbsp mcbsp[OMAP_MAX_MCBSP_COUNT]; 66static struct omap_mcbsp mcbsp[OMAP_MAX_MCBSP_COUNT];
67static struct clk *mcbsp_dsp_ck = 0; 67static struct clk *mcbsp_dsp_ck = 0;
68static struct clk *mcbsp_api_ck = 0; 68static struct clk *mcbsp_api_ck = 0;
69static struct clk *mcbsp_dspxor_ck = 0;
69 70
70 71
71static void omap_mcbsp_dump_reg(u8 id) 72static void omap_mcbsp_dump_reg(u8 id)
@@ -175,7 +176,7 @@ static int omap_mcbsp_check(unsigned int id)
175 return 0; 176 return 0;
176 } 177 }
177 178
178 if (cpu_is_omap1510() || cpu_is_omap1610() || cpu_is_omap1710()) { 179 if (cpu_is_omap1510() || cpu_is_omap16xx()) {
179 if (id > OMAP_MAX_MCBSP_COUNT) { 180 if (id > OMAP_MAX_MCBSP_COUNT) {
180 printk(KERN_ERR "OMAP-McBSP: McBSP%d doesn't exist\n", id + 1); 181 printk(KERN_ERR "OMAP-McBSP: McBSP%d doesn't exist\n", id + 1);
181 return -1; 182 return -1;
@@ -191,15 +192,12 @@ static int omap_mcbsp_check(unsigned int id)
191 192
192static void omap_mcbsp_dsp_request(void) 193static void omap_mcbsp_dsp_request(void)
193{ 194{
194 if (cpu_is_omap1510() || cpu_is_omap1610() || cpu_is_omap1710()) { 195 if (cpu_is_omap1510() || cpu_is_omap16xx()) {
195 omap_writew((omap_readw(ARM_RSTCT1) | (1 << 1) | (1 << 2)), 196 clk_use(mcbsp_dsp_ck);
196 ARM_RSTCT1); 197 clk_use(mcbsp_api_ck);
197 clk_enable(mcbsp_dsp_ck);
198 clk_enable(mcbsp_api_ck);
199 198
200 /* enable 12MHz clock to mcbsp 1 & 3 */ 199 /* enable 12MHz clock to mcbsp 1 & 3 */
201 __raw_writew(__raw_readw(DSP_IDLECT2) | (1 << EN_XORPCK), 200 clk_use(mcbsp_dspxor_ck);
202 DSP_IDLECT2);
203 __raw_writew(__raw_readw(DSP_RSTCT2) | 1 | 1 << 1, 201 __raw_writew(__raw_readw(DSP_RSTCT2) | 1 | 1 << 1,
204 DSP_RSTCT2); 202 DSP_RSTCT2);
205 } 203 }
@@ -207,10 +205,13 @@ static void omap_mcbsp_dsp_request(void)
207 205
208static void omap_mcbsp_dsp_free(void) 206static void omap_mcbsp_dsp_free(void)
209{ 207{
210 /* Useless for now */ 208 if (cpu_is_omap1510() || cpu_is_omap16xx()) {
209 clk_unuse(mcbsp_dspxor_ck);
210 clk_unuse(mcbsp_dsp_ck);
211 clk_unuse(mcbsp_api_ck);
212 }
211} 213}
212 214
213
214int omap_mcbsp_request(unsigned int id) 215int omap_mcbsp_request(unsigned int id)
215{ 216{
216 int err; 217 int err;
@@ -350,6 +351,73 @@ void omap_mcbsp_stop(unsigned int id)
350} 351}
351 352
352 353
354/* polled mcbsp i/o operations */
355int omap_mcbsp_pollwrite(unsigned int id, u16 buf)
356{
357 u32 base = mcbsp[id].io_base;
358 writew(buf, base + OMAP_MCBSP_REG_DXR1);
359 /* if frame sync error - clear the error */
360 if (readw(base + OMAP_MCBSP_REG_SPCR2) & XSYNC_ERR) {
361 /* clear error */
362 writew(readw(base + OMAP_MCBSP_REG_SPCR2) & (~XSYNC_ERR),
363 base + OMAP_MCBSP_REG_SPCR2);
364 /* resend */
365 return -1;
366 } else {
367 /* wait for transmit confirmation */
368 int attemps = 0;
369 while (!(readw(base + OMAP_MCBSP_REG_SPCR2) & XRDY)) {
370 if (attemps++ > 1000) {
371 writew(readw(base + OMAP_MCBSP_REG_SPCR2) &
372 (~XRST),
373 base + OMAP_MCBSP_REG_SPCR2);
374 udelay(10);
375 writew(readw(base + OMAP_MCBSP_REG_SPCR2) |
376 (XRST),
377 base + OMAP_MCBSP_REG_SPCR2);
378 udelay(10);
379 printk(KERN_ERR
380 " Could not write to McBSP Register\n");
381 return -2;
382 }
383 }
384 }
385 return 0;
386}
387
388int omap_mcbsp_pollread(unsigned int id, u16 * buf)
389{
390 u32 base = mcbsp[id].io_base;
391 /* if frame sync error - clear the error */
392 if (readw(base + OMAP_MCBSP_REG_SPCR1) & RSYNC_ERR) {
393 /* clear error */
394 writew(readw(base + OMAP_MCBSP_REG_SPCR1) & (~RSYNC_ERR),
395 base + OMAP_MCBSP_REG_SPCR1);
396 /* resend */
397 return -1;
398 } else {
399 /* wait for recieve confirmation */
400 int attemps = 0;
401 while (!(readw(base + OMAP_MCBSP_REG_SPCR1) & RRDY)) {
402 if (attemps++ > 1000) {
403 writew(readw(base + OMAP_MCBSP_REG_SPCR1) &
404 (~RRST),
405 base + OMAP_MCBSP_REG_SPCR1);
406 udelay(10);
407 writew(readw(base + OMAP_MCBSP_REG_SPCR1) |
408 (RRST),
409 base + OMAP_MCBSP_REG_SPCR1);
410 udelay(10);
411 printk(KERN_ERR
412 " Could not read from McBSP Register\n");
413 return -2;
414 }
415 }
416 }
417 *buf = readw(base + OMAP_MCBSP_REG_DRR1);
418 return 0;
419}
420
353/* 421/*
354 * IRQ based word transmission. 422 * IRQ based word transmission.
355 */ 423 */
@@ -625,10 +693,15 @@ static int __init omap_mcbsp_init(void)
625 return PTR_ERR(mcbsp_dsp_ck); 693 return PTR_ERR(mcbsp_dsp_ck);
626 } 694 }
627 mcbsp_api_ck = clk_get(0, "api_ck"); 695 mcbsp_api_ck = clk_get(0, "api_ck");
628 if (IS_ERR(mcbsp_dsp_ck)) { 696 if (IS_ERR(mcbsp_api_ck)) {
629 printk(KERN_ERR "mcbsp: could not acquire api_ck handle.\n"); 697 printk(KERN_ERR "mcbsp: could not acquire api_ck handle.\n");
630 return PTR_ERR(mcbsp_api_ck); 698 return PTR_ERR(mcbsp_api_ck);
631 } 699 }
700 mcbsp_dspxor_ck = clk_get(0, "dspxor_ck");
701 if (IS_ERR(mcbsp_dspxor_ck)) {
702 printk(KERN_ERR "mcbsp: could not acquire dspxor_ck handle.\n");
703 return PTR_ERR(mcbsp_dspxor_ck);
704 }
632 705
633#ifdef CONFIG_ARCH_OMAP730 706#ifdef CONFIG_ARCH_OMAP730
634 if (cpu_is_omap730()) { 707 if (cpu_is_omap730()) {
@@ -643,7 +716,7 @@ static int __init omap_mcbsp_init(void)
643 } 716 }
644#endif 717#endif
645#if defined(CONFIG_ARCH_OMAP16XX) 718#if defined(CONFIG_ARCH_OMAP16XX)
646 if (cpu_is_omap1610() || cpu_is_omap1710()) { 719 if (cpu_is_omap16xx()) {
647 mcbsp_info = mcbsp_1610; 720 mcbsp_info = mcbsp_1610;
648 mcbsp_count = ARRAY_SIZE(mcbsp_1610); 721 mcbsp_count = ARRAY_SIZE(mcbsp_1610);
649 } 722 }
diff --git a/arch/arm/mach-omap/mux.c b/arch/arm/plat-omap/mux.c
index bcf3c6e5ecd0..ea7b955b9c81 100644
--- a/arch/arm/mach-omap/mux.c
+++ b/arch/arm/plat-omap/mux.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-omap/mux.c 2 * linux/arch/arm/plat-omap/mux.c
3 * 3 *
4 * Utility to set the Omap MUX and PULL_DWN registers from a table in mux.h 4 * Utility to set the Omap MUX and PULL_DWN registers from a table in mux.h
5 * 5 *
@@ -53,19 +53,13 @@ omap_cfg_reg(const reg_cfg_t reg_cfg)
53 return -EINVAL; 53 return -EINVAL;
54 } 54 }
55 55
56 cfg = &reg_cfg_table[reg_cfg]; 56 cfg = (reg_cfg_set *)&reg_cfg_table[reg_cfg];
57
58 /*
59 * We do a pretty long section here with lock on, but pin muxing
60 * should only happen on driver init for each driver, so it's not time
61 * critical.
62 */
63 spin_lock_irqsave(&mux_spin_lock, flags);
64 57
65 /* Check the mux register in question */ 58 /* Check the mux register in question */
66 if (cfg->mux_reg) { 59 if (cfg->mux_reg) {
67 unsigned tmp1, tmp2; 60 unsigned tmp1, tmp2;
68 61
62 spin_lock_irqsave(&mux_spin_lock, flags);
69 reg_orig = omap_readl(cfg->mux_reg); 63 reg_orig = omap_readl(cfg->mux_reg);
70 64
71 /* The mux registers always seem to be 3 bits long */ 65 /* The mux registers always seem to be 3 bits long */
@@ -80,11 +74,13 @@ omap_cfg_reg(const reg_cfg_t reg_cfg)
80 warn = 1; 74 warn = 1;
81 75
82 omap_writel(reg, cfg->mux_reg); 76 omap_writel(reg, cfg->mux_reg);
77 spin_unlock_irqrestore(&mux_spin_lock, flags);
83 } 78 }
84 79
85 /* Check for pull up or pull down selection on 1610 */ 80 /* Check for pull up or pull down selection on 1610 */
86 if (!cpu_is_omap1510()) { 81 if (!cpu_is_omap1510()) {
87 if (cfg->pu_pd_reg && cfg->pull_val) { 82 if (cfg->pu_pd_reg && cfg->pull_val) {
83 spin_lock_irqsave(&mux_spin_lock, flags);
88 pu_pd_orig = omap_readl(cfg->pu_pd_reg); 84 pu_pd_orig = omap_readl(cfg->pu_pd_reg);
89 mask = 1 << cfg->pull_bit; 85 mask = 1 << cfg->pull_bit;
90 86
@@ -100,11 +96,13 @@ omap_cfg_reg(const reg_cfg_t reg_cfg)
100 pu_pd = pu_pd_orig & ~mask; 96 pu_pd = pu_pd_orig & ~mask;
101 } 97 }
102 omap_writel(pu_pd, cfg->pu_pd_reg); 98 omap_writel(pu_pd, cfg->pu_pd_reg);
99 spin_unlock_irqrestore(&mux_spin_lock, flags);
103 } 100 }
104 } 101 }
105 102
106 /* Check for an associated pull down register */ 103 /* Check for an associated pull down register */
107 if (cfg->pull_reg) { 104 if (cfg->pull_reg) {
105 spin_lock_irqsave(&mux_spin_lock, flags);
108 pull_orig = omap_readl(cfg->pull_reg); 106 pull_orig = omap_readl(cfg->pull_reg);
109 mask = 1 << cfg->pull_bit; 107 mask = 1 << cfg->pull_bit;
110 108
@@ -121,6 +119,7 @@ omap_cfg_reg(const reg_cfg_t reg_cfg)
121 } 119 }
122 120
123 omap_writel(pull, cfg->pull_reg); 121 omap_writel(pull, cfg->pull_reg);
122 spin_unlock_irqrestore(&mux_spin_lock, flags);
124 } 123 }
125 124
126 if (warn) { 125 if (warn) {
@@ -149,8 +148,6 @@ omap_cfg_reg(const reg_cfg_t reg_cfg)
149 } 148 }
150#endif 149#endif
151 150
152 spin_unlock_irqrestore(&mux_spin_lock, flags);
153
154#ifdef CONFIG_OMAP_MUX_ERRORS 151#ifdef CONFIG_OMAP_MUX_ERRORS
155 return warn ? -ETXTBSY : 0; 152 return warn ? -ETXTBSY : 0;
156#else 153#else
diff --git a/arch/arm/mach-omap/ocpi.c b/arch/arm/plat-omap/ocpi.c
index c9ced134a75d..1fb16f9edfd5 100644
--- a/arch/arm/mach-omap/ocpi.c
+++ b/arch/arm/plat-omap/ocpi.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-omap/ocpi.c 2 * linux/arch/arm/plat-omap/ocpi.c
3 * 3 *
4 * Minimal OCP bus support for omap16xx 4 * Minimal OCP bus support for omap16xx
5 * 5 *
diff --git a/arch/arm/mach-omap/pm.c b/arch/arm/plat-omap/pm.c
index 6b03ccdc1e92..e6536b16c385 100644
--- a/arch/arm/mach-omap/pm.c
+++ b/arch/arm/plat-omap/pm.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-omap/pm.c 2 * linux/arch/arm/plat-omap/pm.c
3 * 3 *
4 * OMAP Power Management Routines 4 * OMAP Power Management Routines
5 * 5 *
diff --git a/arch/arm/mach-omap/sleep.S b/arch/arm/plat-omap/sleep.S
index 4d426d105828..279490ce772b 100644
--- a/arch/arm/mach-omap/sleep.S
+++ b/arch/arm/plat-omap/sleep.S
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-omap/sleep.S 2 * linux/arch/arm/plat-omap/sleep.S
3 * 3 *
4 * Low-level OMAP1510/1610 sleep/wakeUp support 4 * Low-level OMAP1510/1610 sleep/wakeUp support
5 * 5 *
diff --git a/arch/arm/mach-omap/usb.c b/arch/arm/plat-omap/usb.c
index fd483ff9f8fe..25bc4a8dd763 100644
--- a/arch/arm/mach-omap/usb.c
+++ b/arch/arm/plat-omap/usb.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * arch/arm/mach-omap/usb.c -- platform level USB initialization 2 * arch/arm/plat-omap/usb.c -- platform level USB initialization
3 * 3 *
4 * Copyright (C) 2004 Texas Instruments, Inc. 4 * Copyright (C) 2004 Texas Instruments, Inc.
5 * 5 *
@@ -326,7 +326,7 @@ static u64 ohci_dmamask = ~(u32)0;
326static struct resource ohci_resources[] = { 326static struct resource ohci_resources[] = {
327 { 327 {
328 .start = OMAP_OHCI_BASE, 328 .start = OMAP_OHCI_BASE,
329 .end = OMAP_OHCI_BASE + 4096, 329 .end = OMAP_OHCI_BASE + 4096 - 1,
330 .flags = IORESOURCE_MEM, 330 .flags = IORESOURCE_MEM,
331 }, 331 },
332 { 332 {
diff --git a/include/asm-arm/arch-ixp2000/platform.h b/include/asm-arm/arch-ixp2000/platform.h
index 52ded516ea5c..c0caf3e3e6fd 100644
--- a/include/asm-arm/arch-ixp2000/platform.h
+++ b/include/asm-arm/arch-ixp2000/platform.h
@@ -115,6 +115,7 @@ static inline unsigned int ixp2000_is_pcimaster(void)
115} 115}
116 116
117void ixp2000_map_io(void); 117void ixp2000_map_io(void);
118void ixp2000_uart_init(void);
118void ixp2000_init_irq(void); 119void ixp2000_init_irq(void);
119void ixp2000_init_time(unsigned long); 120void ixp2000_init_time(unsigned long);
120unsigned long ixp2000_gettimeoffset(void); 121unsigned long ixp2000_gettimeoffset(void);
diff --git a/include/asm-arm/arch-omap/board-h2.h b/include/asm-arm/arch-omap/board-h2.h
index 60f002b72983..39ca5a31aeea 100644
--- a/include/asm-arm/arch-omap/board-h2.h
+++ b/include/asm-arm/arch-omap/board-h2.h
@@ -34,11 +34,6 @@
34/* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */ 34/* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */
35#define OMAP1610_ETHR_START 0x04000300 35#define OMAP1610_ETHR_START 0x04000300
36 36
37/* Intel STRATA NOR flash at CS3 or CS2B(NAND Boot) */
38#define OMAP_NOR_FLASH_SIZE SZ_32M
39#define OMAP_NOR_FLASH_START1 0x0C000000 /* CS3 */
40#define OMAP_NOR_FLASH_START2 0x0A000000 /* CS2B */
41
42/* Samsung NAND flash at CS2B or CS3(NAND Boot) */ 37/* Samsung NAND flash at CS2B or CS3(NAND Boot) */
43#define OMAP_NAND_FLASH_START1 0x0A000000 /* CS2B */ 38#define OMAP_NAND_FLASH_START1 0x0A000000 /* CS2B */
44#define OMAP_NAND_FLASH_START2 0x0C000000 /* CS3 */ 39#define OMAP_NAND_FLASH_START2 0x0C000000 /* CS3 */
diff --git a/include/asm-arm/arch-omap/board-h3.h b/include/asm-arm/arch-omap/board-h3.h
index e4d1cd231731..1b12c1dcc2fa 100644
--- a/include/asm-arm/arch-omap/board-h3.h
+++ b/include/asm-arm/arch-omap/board-h3.h
@@ -30,11 +30,6 @@
30/* In OMAP1710 H3 the Ethernet is directly connected to CS1 */ 30/* In OMAP1710 H3 the Ethernet is directly connected to CS1 */
31#define OMAP1710_ETHR_START 0x04000300 31#define OMAP1710_ETHR_START 0x04000300
32 32
33/* Intel STRATA NOR flash at CS3 or CS2B(NAND Boot) */
34#define OMAP_NOR_FLASH_SIZE SZ_32M
35#define OMAP_NOR_FLASH_START1 0x0C000000 /* CS3 */
36#define OMAP_NOR_FLASH_START2 0x0A000000 /* CS2B */
37
38/* Samsung NAND flash at CS2B or CS3(NAND Boot) */ 33/* Samsung NAND flash at CS2B or CS3(NAND Boot) */
39#define OMAP_NAND_FLASH_START1 0x0A000000 /* CS2B */ 34#define OMAP_NAND_FLASH_START1 0x0A000000 /* CS2B */
40#define OMAP_NAND_FLASH_START2 0x0C000000 /* CS3 */ 35#define OMAP_NAND_FLASH_START2 0x0C000000 /* CS3 */
diff --git a/include/asm-arm/arch-omap/board-osk.h b/include/asm-arm/arch-omap/board-osk.h
index aaa49a0fbd21..2b1a8a4fe44e 100644
--- a/include/asm-arm/arch-omap/board-osk.h
+++ b/include/asm-arm/arch-omap/board-osk.h
@@ -32,10 +32,5 @@
32/* At OMAP5912 OSK the Ethernet is directly connected to CS1 */ 32/* At OMAP5912 OSK the Ethernet is directly connected to CS1 */
33#define OMAP_OSK_ETHR_START 0x04800300 33#define OMAP_OSK_ETHR_START 0x04800300
34 34
35/* Micron NOR flash at CS3 mapped to address 0x0 if BM bit is 1 */
36#define OMAP_OSK_NOR_FLASH_BASE 0xD8000000
37#define OMAP_OSK_NOR_FLASH_SIZE SZ_32M
38#define OMAP_OSK_NOR_FLASH_START 0x00000000
39
40#endif /* __ASM_ARCH_OMAP_OSK_H */ 35#endif /* __ASM_ARCH_OMAP_OSK_H */
41 36
diff --git a/include/asm-arm/arch-omap/board.h b/include/asm-arm/arch-omap/board.h
index 1cefd60b6f2a..95bd625480c1 100644
--- a/include/asm-arm/arch-omap/board.h
+++ b/include/asm-arm/arch-omap/board.h
@@ -16,10 +16,11 @@
16/* Different peripheral ids */ 16/* Different peripheral ids */
17#define OMAP_TAG_CLOCK 0x4f01 17#define OMAP_TAG_CLOCK 0x4f01
18#define OMAP_TAG_MMC 0x4f02 18#define OMAP_TAG_MMC 0x4f02
19#define OMAP_TAG_UART 0x4f03 19#define OMAP_TAG_SERIAL_CONSOLE 0x4f03
20#define OMAP_TAG_USB 0x4f04 20#define OMAP_TAG_USB 0x4f04
21#define OMAP_TAG_LCD 0x4f05 21#define OMAP_TAG_LCD 0x4f05
22#define OMAP_TAG_GPIO_SWITCH 0x4f06 22#define OMAP_TAG_GPIO_SWITCH 0x4f06
23#define OMAP_TAG_UART 0x4f07
23 24
24#define OMAP_TAG_BOOT_REASON 0x4f80 25#define OMAP_TAG_BOOT_REASON 0x4f80
25#define OMAP_TAG_FLASH_PART 0x4f81 26#define OMAP_TAG_FLASH_PART 0x4f81
@@ -35,7 +36,7 @@ struct omap_mmc_config {
35 s16 mmc1_switch_pin, mmc2_switch_pin; 36 s16 mmc1_switch_pin, mmc2_switch_pin;
36}; 37};
37 38
38struct omap_uart_config { 39struct omap_serial_console_config {
39 u8 console_uart; 40 u8 console_uart;
40 u32 console_speed; 41 u32 console_speed;
41}; 42};
@@ -82,7 +83,8 @@ struct omap_lcd_config {
82 */ 83 */
83#define OMAP_GPIO_SWITCH_TYPE_COVER 0x0000 84#define OMAP_GPIO_SWITCH_TYPE_COVER 0x0000
84#define OMAP_GPIO_SWITCH_TYPE_CONNECTION 0x0001 85#define OMAP_GPIO_SWITCH_TYPE_CONNECTION 0x0001
85#define OMAP_GPIO_SWITCH_FLAG_INVERTED 0x0001 86#define OMAP_GPIO_SWITCH_FLAG_INVERTED 0x0001
87#define OMAP_GPIO_SWITCH_FLAG_OUTPUT 0x0002
86struct omap_gpio_switch_config { 88struct omap_gpio_switch_config {
87 char name[12]; 89 char name[12];
88 u16 gpio; 90 u16 gpio;
@@ -99,6 +101,10 @@ struct omap_boot_reason_config {
99 char reason_str[12]; 101 char reason_str[12];
100}; 102};
101 103
104struct omap_uart_config {
105 /* Bit field of UARTs present; bit 0 --> UART1 */
106 unsigned int enabled_uarts;
107};
102 108
103struct omap_board_config_entry { 109struct omap_board_config_entry {
104 u16 tag; 110 u16 tag;
diff --git a/arch/arm/mach-omap/common.h b/include/asm-arm/arch-omap/common.h
index 9f62858c0df4..2a676b4f13b5 100644
--- a/arch/arm/mach-omap/common.h
+++ b/include/asm-arm/arch-omap/common.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-omap/common.h 2 * linux/include/asm-arm/arch-omap/common.h
3 * 3 *
4 * Header for code common to all OMAP machines. 4 * Header for code common to all OMAP machines.
5 * 5 *
@@ -29,7 +29,7 @@
29 29
30struct sys_timer; 30struct sys_timer;
31 31
32extern void omap_map_io(void); 32extern void omap_map_common_io(void);
33extern struct sys_timer omap_timer; 33extern struct sys_timer omap_timer;
34extern void omap_serial_init(int ports[]); 34extern void omap_serial_init(int ports[]);
35 35
diff --git a/include/asm-arm/arch-omap/dma.h b/include/asm-arm/arch-omap/dma.h
index d785248377db..ce114ce5af5d 100644
--- a/include/asm-arm/arch-omap/dma.h
+++ b/include/asm-arm/arch-omap/dma.h
@@ -241,6 +241,7 @@ extern void omap_dma_unlink_lch (int lch_head, int lch_queue);
241extern dma_addr_t omap_get_dma_src_pos(int lch); 241extern dma_addr_t omap_get_dma_src_pos(int lch);
242extern dma_addr_t omap_get_dma_dst_pos(int lch); 242extern dma_addr_t omap_get_dma_dst_pos(int lch);
243extern void omap_clear_dma(int lch); 243extern void omap_clear_dma(int lch);
244extern int omap_dma_running(void);
244 245
245/* Returns 1 if the DMA module is in OMAP1510-compatible mode, 0 otherwise */ 246/* Returns 1 if the DMA module is in OMAP1510-compatible mode, 0 otherwise */
246extern int omap_dma_in_1510_mode(void); 247extern int omap_dma_in_1510_mode(void);
diff --git a/include/asm-arm/arch-omap/hardware.h b/include/asm-arm/arch-omap/hardware.h
index 37e06c782bdf..48258c7f6541 100644
--- a/include/asm-arm/arch-omap/hardware.h
+++ b/include/asm-arm/arch-omap/hardware.h
@@ -54,6 +54,19 @@
54 54
55/* 55/*
56 * ---------------------------------------------------------------------------- 56 * ----------------------------------------------------------------------------
57 * Timers
58 * ----------------------------------------------------------------------------
59 */
60#define OMAP_MPU_TIMER1_BASE (0xfffec500)
61#define OMAP_MPU_TIMER2_BASE (0xfffec600)
62#define OMAP_MPU_TIMER3_BASE (0xfffec700)
63#define MPU_TIMER_FREE (1 << 6)
64#define MPU_TIMER_CLOCK_ENABLE (1 << 5)
65#define MPU_TIMER_AR (1 << 1)
66#define MPU_TIMER_ST (1 << 0)
67
68/*
69 * ----------------------------------------------------------------------------
57 * Clocks 70 * Clocks
58 * ---------------------------------------------------------------------------- 71 * ----------------------------------------------------------------------------
59 */ 72 */
@@ -78,6 +91,7 @@
78 91
79/* DSP clock control */ 92/* DSP clock control */
80#define DSP_CONFIG_REG_BASE (0xe1008000) 93#define DSP_CONFIG_REG_BASE (0xe1008000)
94#define DSP_CKCTL (DSP_CONFIG_REG_BASE + 0x0)
81#define DSP_IDLECT1 (DSP_CONFIG_REG_BASE + 0x4) 95#define DSP_IDLECT1 (DSP_CONFIG_REG_BASE + 0x4)
82#define DSP_IDLECT2 (DSP_CONFIG_REG_BASE + 0x8) 96#define DSP_IDLECT2 (DSP_CONFIG_REG_BASE + 0x8)
83 97
@@ -88,6 +102,7 @@
88 */ 102 */
89#define ULPD_REG_BASE (0xfffe0800) 103#define ULPD_REG_BASE (0xfffe0800)
90#define ULPD_IT_STATUS (ULPD_REG_BASE + 0x14) 104#define ULPD_IT_STATUS (ULPD_REG_BASE + 0x14)
105#define ULPD_SETUP_ANALOG_CELL_3 (ULPD_REG_BASE + 0x24)
91#define ULPD_CLOCK_CTRL (ULPD_REG_BASE + 0x30) 106#define ULPD_CLOCK_CTRL (ULPD_REG_BASE + 0x30)
92# define DIS_USB_PVCI_CLK (1 << 5) /* no USB/FAC synch */ 107# define DIS_USB_PVCI_CLK (1 << 5) /* no USB/FAC synch */
93# define USB_MCLK_EN (1 << 4) /* enable W4_USB_CLKO */ 108# define USB_MCLK_EN (1 << 4) /* enable W4_USB_CLKO */
@@ -268,17 +283,10 @@
268 * Processor specific defines 283 * Processor specific defines
269 * --------------------------------------------------------------------------- 284 * ---------------------------------------------------------------------------
270 */ 285 */
271#ifdef CONFIG_ARCH_OMAP730
272#include "omap730.h"
273#endif
274 286
275#ifdef CONFIG_ARCH_OMAP1510 287#include "omap730.h"
276#include "omap1510.h" 288#include "omap1510.h"
277#endif
278
279#ifdef CONFIG_ARCH_OMAP16XX
280#include "omap16xx.h" 289#include "omap16xx.h"
281#endif
282 290
283/* 291/*
284 * --------------------------------------------------------------------------- 292 * ---------------------------------------------------------------------------
diff --git a/include/asm-arm/arch-omap/irqs.h b/include/asm-arm/arch-omap/irqs.h
index 6701fd9e5f9b..0d05a7c957d1 100644
--- a/include/asm-arm/arch-omap/irqs.h
+++ b/include/asm-arm/arch-omap/irqs.h
@@ -159,6 +159,7 @@
159#define INT_1610_GPIO_BANK3 (41 + IH2_BASE) 159#define INT_1610_GPIO_BANK3 (41 + IH2_BASE)
160#define INT_1610_MMC2 (42 + IH2_BASE) 160#define INT_1610_MMC2 (42 + IH2_BASE)
161#define INT_1610_CF (43 + IH2_BASE) 161#define INT_1610_CF (43 + IH2_BASE)
162#define INT_1610_WAKE_UP_REQ (46 + IH2_BASE)
162#define INT_1610_GPIO_BANK4 (48 + IH2_BASE) 163#define INT_1610_GPIO_BANK4 (48 + IH2_BASE)
163#define INT_1610_SPI (49 + IH2_BASE) 164#define INT_1610_SPI (49 + IH2_BASE)
164#define INT_1610_DMA_CH6 (53 + IH2_BASE) 165#define INT_1610_DMA_CH6 (53 + IH2_BASE)
@@ -238,6 +239,8 @@
238#define IH_MPUIO_BASE (OMAP_MAX_GPIO_LINES + IH_GPIO_BASE) 239#define IH_MPUIO_BASE (OMAP_MAX_GPIO_LINES + IH_GPIO_BASE)
239#define IH_BOARD_BASE (16 + IH_MPUIO_BASE) 240#define IH_BOARD_BASE (16 + IH_MPUIO_BASE)
240 241
242#define OMAP_IRQ_BIT(irq) (1 << ((irq) % 32))
243
241#ifndef __ASSEMBLY__ 244#ifndef __ASSEMBLY__
242extern void omap_init_irq(void); 245extern void omap_init_irq(void);
243#endif 246#endif
diff --git a/include/asm-arm/arch-omap/mux.h b/include/asm-arm/arch-omap/mux.h
index 39f99decbb7b..5bd3f0097fc6 100644
--- a/include/asm-arm/arch-omap/mux.h
+++ b/include/asm-arm/arch-omap/mux.h
@@ -231,7 +231,7 @@ typedef enum {
231 J19_1610_ETM_D6, 231 J19_1610_ETM_D6,
232 J18_1610_ETM_D7, 232 J18_1610_ETM_D7,
233 233
234 /* OMAP-1610 GPIO */ 234 /* OMAP16XX GPIO */
235 P20_1610_GPIO4, 235 P20_1610_GPIO4,
236 V9_1610_GPIO7, 236 V9_1610_GPIO7,
237 W8_1610_GPIO9, 237 W8_1610_GPIO9,
@@ -241,6 +241,9 @@ typedef enum {
241 AA20_1610_GPIO_41, 241 AA20_1610_GPIO_41,
242 W19_1610_GPIO48, 242 W19_1610_GPIO48,
243 M7_1610_GPIO62, 243 M7_1610_GPIO62,
244 V14_16XX_GPIO37,
245 R9_16XX_GPIO18,
246 L14_16XX_GPIO49,
244 247
245 /* OMAP-1610 uWire */ 248 /* OMAP-1610 uWire */
246 V19_1610_UWIRE_SCLK, 249 V19_1610_UWIRE_SCLK,
@@ -285,12 +288,13 @@ typedef enum {
285 V6_USB2_TXD, 288 V6_USB2_TXD,
286 W5_USB2_SE0, 289 W5_USB2_SE0,
287 290
288 /* UART1 1610 */ 291 /* 16XX UART */
289
290 R13_1610_UART1_TX, 292 R13_1610_UART1_TX,
291 V14_1610_UART1_RX, 293 V14_16XX_UART1_RX,
292 R14_1610_UART1_CTS, 294 R14_1610_UART1_CTS,
293 AA15_1610_UART1_RTS, 295 AA15_1610_UART1_RTS,
296 R9_16XX_UART2_RX,
297 L14_16XX_UART3_RX,
294 298
295 /* I2C OMAP-1610 */ 299 /* I2C OMAP-1610 */
296 I2C_SCL, 300 I2C_SCL,
@@ -332,7 +336,7 @@ typedef enum {
332 * Table of various FUNC_MUX and PULL_DWN combinations for each device. 336 * Table of various FUNC_MUX and PULL_DWN combinations for each device.
333 * See also reg_cfg_t above for the lookup table. 337 * See also reg_cfg_t above for the lookup table.
334 */ 338 */
335static reg_cfg_set __initdata_or_module 339static const reg_cfg_set __initdata_or_module
336reg_cfg_table[] = { 340reg_cfg_table[] = {
337/* 341/*
338 * description mux mode mux pull pull pull pu_pd pu dbg 342 * description mux mode mux pull pull pull pu_pd pu dbg
@@ -455,7 +459,7 @@ MUX_CFG("L19_1610_ETM_D0", 5, 18, 1, 0, 26, 0, 0, 0, 1)
455MUX_CFG("J19_1610_ETM_D6", 5, 0, 1, 0, 20, 0, 0, 0, 1) 459MUX_CFG("J19_1610_ETM_D6", 5, 0, 1, 0, 20, 0, 0, 0, 1)
456MUX_CFG("J18_1610_ETM_D7", 5, 27, 1, 0, 19, 0, 0, 0, 1) 460MUX_CFG("J18_1610_ETM_D7", 5, 27, 1, 0, 19, 0, 0, 0, 1)
457 461
458/* OMAP-1610 GPIO */ 462/* OMAP16XX GPIO */
459MUX_CFG("P20_1610_GPIO4", 6, 27, 0, 1, 7, 0, 1, 1, 1) 463MUX_CFG("P20_1610_GPIO4", 6, 27, 0, 1, 7, 0, 1, 1, 1)
460MUX_CFG("V9_1610_GPIO7", B, 12, 1, 2, 20, 0, 2, 1, 1) 464MUX_CFG("V9_1610_GPIO7", B, 12, 1, 2, 20, 0, 2, 1, 1)
461MUX_CFG("W8_1610_GPIO9", B, 21, 0, 2, 23, 0, 2, 1, 1) 465MUX_CFG("W8_1610_GPIO9", B, 21, 0, 2, 23, 0, 2, 1, 1)
@@ -465,6 +469,9 @@ MUX_CFG("V5_1610_GPIO24", B, 15, 7, 2, 21, 0, 2, 1, 1)
465MUX_CFG("AA20_1610_GPIO_41", 9, 9, 7, 1, 31, 0, 1, 1, 1) 469MUX_CFG("AA20_1610_GPIO_41", 9, 9, 7, 1, 31, 0, 1, 1, 1)
466MUX_CFG("W19_1610_GPIO48", 8, 15, 7, 1, 23, 1, 1, 0, 1) 470MUX_CFG("W19_1610_GPIO48", 8, 15, 7, 1, 23, 1, 1, 0, 1)
467MUX_CFG("M7_1610_GPIO62", 10, 0, 0, 4, 24, 0, 4, 0, 1) 471MUX_CFG("M7_1610_GPIO62", 10, 0, 0, 4, 24, 0, 4, 0, 1)
472MUX_CFG("V14_16XX_GPIO37", 9, 18, 7, 2, 2, 0, 2, 2, 0)
473MUX_CFG("R9_16XX_GPIO18", C, 18, 7, 3, 0, 0, 3, 0, 0)
474MUX_CFG("L14_16XX_GPIO49", 6, 3, 7, 0, 31, 0, 0, 31, 0)
468 475
469/* OMAP-1610 uWire */ 476/* OMAP-1610 uWire */
470MUX_CFG("V19_1610_UWIRE_SCLK", 8, 6, 0, 1, 20, 0, 1, 1, 1) 477MUX_CFG("V19_1610_UWIRE_SCLK", 8, 6, 0, 1, 20, 0, 1, 1, 1)
@@ -503,16 +510,17 @@ MUX_CFG("Y10_USB0_SUSP", B, 3, 5, 2, 17, 0, 2, 0, 1)
503MUX_CFG("W9_USB2_TXEN", B, 9, 1, NA, 0, 0, NA, 0, 1) 510MUX_CFG("W9_USB2_TXEN", B, 9, 1, NA, 0, 0, NA, 0, 1)
504MUX_CFG("AA9_USB2_VP", B, 6, 1, NA, 0, 0, NA, 0, 1) 511MUX_CFG("AA9_USB2_VP", B, 6, 1, NA, 0, 0, NA, 0, 1)
505MUX_CFG("Y5_USB2_RCV", C, 21, 1, NA, 0, 0, NA, 0, 1) 512MUX_CFG("Y5_USB2_RCV", C, 21, 1, NA, 0, 0, NA, 0, 1)
506MUX_CFG("R8_USB2_VM", C, 18, 1, NA, 0, 0, NA, 0, 1) 513MUX_CFG("R9_USB2_VM", C, 18, 1, NA, 0, 0, NA, 0, 1)
507MUX_CFG("V6_USB2_TXD", C, 27, 2, NA, 0, 0, NA, 0, 1) 514MUX_CFG("V6_USB2_TXD", C, 27, 2, NA, 0, 0, NA, 0, 1)
508MUX_CFG("W5_USB2_SE0", C, 24, 2, NA, 0, 0, NA, 0, 1) 515MUX_CFG("W5_USB2_SE0", C, 24, 2, NA, 0, 0, NA, 0, 1)
509 516
510 517/* 16XX UART */
511/* UART1 */
512MUX_CFG("R13_1610_UART1_TX", A, 12, 6, 2, 10, 0, 2, 10, 1) 518MUX_CFG("R13_1610_UART1_TX", A, 12, 6, 2, 10, 0, 2, 10, 1)
513MUX_CFG("V14_1610_UART1_RX", 9, 18, 0, 2, 2, 0, 2, 2, 1) 519MUX_CFG("V14_16XX_UART1_RX", 9, 18, 0, 2, 2, 0, 2, 2, 1)
514MUX_CFG("R14_1610_UART1_CTS", 9, 15, 0, 2, 1, 0, 2, 1, 1) 520MUX_CFG("R14_1610_UART1_CTS", 9, 15, 0, 2, 1, 0, 2, 1, 1)
515MUX_CFG("AA15_1610_UART1_RTS", 9, 12, 1, 2, 0, 0, 2, 0, 1) 521MUX_CFG("AA15_1610_UART1_RTS", 9, 12, 1, 2, 0, 0, 2, 0, 1)
522MUX_CFG("R9_16XX_UART2_RX", C, 18, 0, 3, 0, 0, 3, 0, 1)
523MUX_CFG("L14_16XX_UART3_RX", 6, 3, 0, 0, 31, 0, 0, 31, 1)
516 524
517/* I2C interface */ 525/* I2C interface */
518MUX_CFG("I2C_SCL", 7, 24, 0, NA, 0, 0, NA, 0, 0) 526MUX_CFG("I2C_SCL", 7, 24, 0, NA, 0, 0, NA, 0, 0)
diff --git a/include/asm-arm/arch-omap/omap16xx.h b/include/asm-arm/arch-omap/omap16xx.h
index 88b1fe43ae9e..38a9b95e6a33 100644
--- a/include/asm-arm/arch-omap/omap16xx.h
+++ b/include/asm-arm/arch-omap/omap16xx.h
@@ -183,5 +183,37 @@
183#define OMAP16XX_PWL_ENABLE (OMAP16XX_PWL_BASE + 0x00) 183#define OMAP16XX_PWL_ENABLE (OMAP16XX_PWL_BASE + 0x00)
184#define OMAP16XX_PWL_CLK_ENABLE (OMAP16XX_PWL_BASE + 0x04) 184#define OMAP16XX_PWL_CLK_ENABLE (OMAP16XX_PWL_BASE + 0x04)
185 185
186/*
187 * ---------------------------------------------------------------------------
188 * Watchdog timer
189 * ---------------------------------------------------------------------------
190 */
191
192/* 32-bit Watchdog timer in OMAP 16XX */
193#define OMAP_16XX_WATCHDOG_BASE (0xfffeb000)
194#define OMAP_16XX_WIDR (OMAP_16XX_WATCHDOG_BASE + 0x00)
195#define OMAP_16XX_WD_SYSCONFIG (OMAP_16XX_WATCHDOG_BASE + 0x10)
196#define OMAP_16XX_WD_SYSSTATUS (OMAP_16XX_WATCHDOG_BASE + 0x14)
197#define OMAP_16XX_WCLR (OMAP_16XX_WATCHDOG_BASE + 0x24)
198#define OMAP_16XX_WCRR (OMAP_16XX_WATCHDOG_BASE + 0x28)
199#define OMAP_16XX_WLDR (OMAP_16XX_WATCHDOG_BASE + 0x2c)
200#define OMAP_16XX_WTGR (OMAP_16XX_WATCHDOG_BASE + 0x30)
201#define OMAP_16XX_WWPS (OMAP_16XX_WATCHDOG_BASE + 0x34)
202#define OMAP_16XX_WSPR (OMAP_16XX_WATCHDOG_BASE + 0x48)
203
204#define WCLR_PRE_SHIFT 5
205#define WCLR_PTV_SHIFT 2
206
207#define WWPS_W_PEND_WSPR (1 << 4)
208#define WWPS_W_PEND_WTGR (1 << 3)
209#define WWPS_W_PEND_WLDR (1 << 2)
210#define WWPS_W_PEND_WCRR (1 << 1)
211#define WWPS_W_PEND_WCLR (1 << 0)
212
213#define WSPR_ENABLE_0 (0x0000bbbb)
214#define WSPR_ENABLE_1 (0x00004444)
215#define WSPR_DISABLE_0 (0x0000aaaa)
216#define WSPR_DISABLE_1 (0x00005555)
217
186#endif /* __ASM_ARCH_OMAP16XX_H */ 218#endif /* __ASM_ARCH_OMAP16XX_H */
187 219
diff --git a/include/asm-arm/arch-omap/system.h b/include/asm-arm/arch-omap/system.h
index 17a2c4825f07..ff37bc27e603 100644
--- a/include/asm-arm/arch-omap/system.h
+++ b/include/asm-arm/arch-omap/system.h
@@ -5,7 +5,9 @@
5#ifndef __ASM_ARCH_SYSTEM_H 5#ifndef __ASM_ARCH_SYSTEM_H
6#define __ASM_ARCH_SYSTEM_H 6#define __ASM_ARCH_SYSTEM_H
7#include <linux/config.h> 7#include <linux/config.h>
8#include <asm/mach-types.h>
8#include <asm/arch/hardware.h> 9#include <asm/arch/hardware.h>
10#include <asm/mach-types.h>
9 11
10static inline void arch_idle(void) 12static inline void arch_idle(void)
11{ 13{
@@ -14,7 +16,24 @@ static inline void arch_idle(void)
14 16
15static inline void arch_reset(char mode) 17static inline void arch_reset(char mode)
16{ 18{
17 omap_writew(1, ARM_RSTCT1); 19
20#ifdef CONFIG_ARCH_OMAP16XX
21 /*
22 * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28
23 * "Global Software Reset Affects Traffic Controller Frequency".
24 */
25 if (cpu_is_omap5912()) {
26 omap_writew(omap_readw(DPLL_CTL) & ~(1 << 4),
27 DPLL_CTL);
28 omap_writew(0x8, ARM_RSTCT1);
29 }
30#endif
31#ifdef CONFIG_MACH_VOICEBLUE
32 if (machine_is_voiceblue())
33 voiceblue_reset();
34 else
35#endif
36 omap_writew(1, ARM_RSTCT1);
18} 37}
19 38
20#endif 39#endif