diff options
81 files changed, 2108 insertions, 1214 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 | ||
| 224 | source "arch/arm/mach-sa1100/Kconfig" | 224 | source "arch/arm/mach-sa1100/Kconfig" |
| 225 | 225 | ||
| 226 | source "arch/arm/mach-omap/Kconfig" | 226 | source "arch/arm/plat-omap/Kconfig" |
| 227 | |||
| 228 | source "arch/arm/mach-omap1/Kconfig" | ||
| 227 | 229 | ||
| 228 | source "arch/arm/mach-s3c2410/Kconfig" | 230 | source "arch/arm/mach-s3c2410/Kconfig" |
| 229 | 231 | ||
| @@ -514,7 +516,7 @@ config XIP_PHYS_ADDR | |||
| 514 | 516 | ||
| 515 | endmenu | 517 | endmenu |
| 516 | 518 | ||
| 517 | if (ARCH_SA1100 || ARCH_INTEGRATOR) | 519 | if (ARCH_SA1100 || ARCH_INTEGRATOR || ARCH_OMAP1) |
| 518 | 520 | ||
| 519 | menu "CPU Frequency scaling" | 521 | menu "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/ | |||
| 142 | core-$(CONFIG_FPE_FASTFPE) += $(FASTFPE_OBJ) | 143 | core-$(CONFIG_FPE_FASTFPE) += $(FASTFPE_OBJ) |
| 143 | core-$(CONFIG_VFP) += arch/arm/vfp/ | 144 | core-$(CONFIG_VFP) += arch/arm/vfp/ |
| 144 | 145 | ||
| 146 | # If we have a common platform directory, then include it in the build. | ||
| 147 | core-$(CONFIG_ARCH_OMAP) += arch/arm/plat-omap/ | ||
| 148 | |||
| 145 | drivers-$(CONFIG_OPROFILE) += arch/arm/oprofile/ | 149 | drivers-$(CONFIG_OPROFILE) += arch/arm/oprofile/ |
| 146 | drivers-$(CONFIG_ARCH_CLPS7500) += drivers/acorn/char/ | 150 | drivers-$(CONFIG_ARCH_CLPS7500) += drivers/acorn/char/ |
| 147 | drivers-$(CONFIG_ARCH_L7200) += drivers/acorn/char/ | 151 | drivers-$(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 | # |
| 6 | CONFIG_ARM=y | 6 | CONFIG_ARM=y |
| 7 | CONFIG_MMU=y | 7 | CONFIG_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 |
| 141 | CONFIG_SELECT_MEMORY_MODEL=y | 142 | CONFIG_SELECT_MEMORY_MODEL=y |
| 142 | CONFIG_FLATMEM_MANUAL=y | 143 | CONFIG_FLATMEM_MANUAL=y |
| @@ -345,10 +346,9 @@ CONFIG_PACKET_MMAP=y | |||
| 345 | CONFIG_UNIX=y | 346 | CONFIG_UNIX=y |
| 346 | # CONFIG_NET_KEY is not set | 347 | # CONFIG_NET_KEY is not set |
| 347 | CONFIG_INET=y | 348 | CONFIG_INET=y |
| 348 | CONFIG_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 |
| 351 | CONFIG_IP_FIB_HASH=y | ||
| 352 | CONFIG_IP_PNP=y | 352 | CONFIG_IP_PNP=y |
| 353 | CONFIG_IP_PNP_DHCP=y | 353 | CONFIG_IP_PNP_DHCP=y |
| 354 | CONFIG_IP_PNP_BOOTP=y | 354 | CONFIG_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 | # | ||
| 370 | CONFIG_TCP_CONG_BIC=y | 367 | CONFIG_TCP_CONG_BIC=y |
| 371 | CONFIG_TCP_CONG_WESTWOOD=m | ||
| 372 | CONFIG_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 |
| 932 | CONFIG_ZLIB_INFLATE=y | 923 | CONFIG_ZLIB_INFLATE=y |
| 933 | CONFIG_ZLIB_DEFLATE=y | 924 | CONFIG_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 | # |
| 6 | CONFIG_ARM=y | 6 | CONFIG_ARM=y |
| 7 | CONFIG_MMU=y | 7 | CONFIG_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 |
| 142 | CONFIG_SELECT_MEMORY_MODEL=y | 143 | CONFIG_SELECT_MEMORY_MODEL=y |
| 143 | CONFIG_FLATMEM_MANUAL=y | 144 | CONFIG_FLATMEM_MANUAL=y |
| @@ -346,10 +347,9 @@ CONFIG_PACKET_MMAP=y | |||
| 346 | CONFIG_UNIX=y | 347 | CONFIG_UNIX=y |
| 347 | # CONFIG_NET_KEY is not set | 348 | # CONFIG_NET_KEY is not set |
| 348 | CONFIG_INET=y | 349 | CONFIG_INET=y |
| 349 | CONFIG_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 |
| 352 | CONFIG_IP_FIB_HASH=y | ||
| 353 | CONFIG_IP_PNP=y | 353 | CONFIG_IP_PNP=y |
| 354 | CONFIG_IP_PNP_DHCP=y | 354 | CONFIG_IP_PNP_DHCP=y |
| 355 | CONFIG_IP_PNP_BOOTP=y | 355 | CONFIG_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 | # | ||
| 371 | CONFIG_TCP_CONG_BIC=y | 368 | CONFIG_TCP_CONG_BIC=y |
| 372 | CONFIG_TCP_CONG_WESTWOOD=m | ||
| 373 | CONFIG_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 |
| 933 | CONFIG_ZLIB_INFLATE=y | 924 | CONFIG_ZLIB_INFLATE=y |
| 934 | CONFIG_ZLIB_DEFLATE=y | 925 | CONFIG_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 | # |
| 6 | CONFIG_ARM=y | 6 | CONFIG_ARM=y |
| 7 | CONFIG_MMU=y | 7 | CONFIG_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 |
| 142 | CONFIG_SELECT_MEMORY_MODEL=y | 143 | CONFIG_SELECT_MEMORY_MODEL=y |
| 143 | CONFIG_FLATMEM_MANUAL=y | 144 | CONFIG_FLATMEM_MANUAL=y |
| @@ -346,10 +347,9 @@ CONFIG_PACKET_MMAP=y | |||
| 346 | CONFIG_UNIX=y | 347 | CONFIG_UNIX=y |
| 347 | # CONFIG_NET_KEY is not set | 348 | # CONFIG_NET_KEY is not set |
| 348 | CONFIG_INET=y | 349 | CONFIG_INET=y |
| 349 | CONFIG_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 |
| 352 | CONFIG_IP_FIB_HASH=y | ||
| 353 | CONFIG_IP_PNP=y | 353 | CONFIG_IP_PNP=y |
| 354 | CONFIG_IP_PNP_DHCP=y | 354 | CONFIG_IP_PNP_DHCP=y |
| 355 | CONFIG_IP_PNP_BOOTP=y | 355 | CONFIG_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=y | 365 | CONFIG_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 | # | ||
| 371 | CONFIG_TCP_CONG_BIC=y | 368 | CONFIG_TCP_CONG_BIC=y |
| 372 | CONFIG_TCP_CONG_WESTWOOD=m | ||
| 373 | CONFIG_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 |
| 934 | CONFIG_ZLIB_INFLATE=y | 925 | CONFIG_ZLIB_INFLATE=y |
| 935 | CONFIG_ZLIB_DEFLATE=y | 926 | CONFIG_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 | # |
| 6 | CONFIG_ARM=y | 6 | CONFIG_ARM=y |
| 7 | CONFIG_MMU=y | 7 | CONFIG_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 |
| 142 | CONFIG_SELECT_MEMORY_MODEL=y | 143 | CONFIG_SELECT_MEMORY_MODEL=y |
| 143 | CONFIG_FLATMEM_MANUAL=y | 144 | CONFIG_FLATMEM_MANUAL=y |
| @@ -346,10 +347,9 @@ CONFIG_PACKET_MMAP=y | |||
| 346 | CONFIG_UNIX=y | 347 | CONFIG_UNIX=y |
| 347 | # CONFIG_NET_KEY is not set | 348 | # CONFIG_NET_KEY is not set |
| 348 | CONFIG_INET=y | 349 | CONFIG_INET=y |
| 349 | CONFIG_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 |
| 352 | CONFIG_IP_FIB_HASH=y | ||
| 353 | CONFIG_IP_PNP=y | 353 | CONFIG_IP_PNP=y |
| 354 | CONFIG_IP_PNP_DHCP=y | 354 | CONFIG_IP_PNP_DHCP=y |
| 355 | CONFIG_IP_PNP_BOOTP=y | 355 | CONFIG_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 | # | ||
| 371 | CONFIG_TCP_CONG_BIC=y | 368 | CONFIG_TCP_CONG_BIC=y |
| 372 | CONFIG_TCP_CONG_WESTWOOD=m | ||
| 373 | CONFIG_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 |
| 933 | CONFIG_ZLIB_INFLATE=y | 924 | CONFIG_ZLIB_INFLATE=y |
| 934 | CONFIG_ZLIB_DEFLATE=y | 925 | CONFIG_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 | # |
| 6 | CONFIG_ARM=y | 6 | CONFIG_ARM=y |
| 7 | CONFIG_MMU=y | 7 | CONFIG_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 |
| 142 | CONFIG_SELECT_MEMORY_MODEL=y | 143 | CONFIG_SELECT_MEMORY_MODEL=y |
| 143 | CONFIG_FLATMEM_MANUAL=y | 144 | CONFIG_FLATMEM_MANUAL=y |
| @@ -346,10 +347,9 @@ CONFIG_PACKET_MMAP=y | |||
| 346 | CONFIG_UNIX=y | 347 | CONFIG_UNIX=y |
| 347 | # CONFIG_NET_KEY is not set | 348 | # CONFIG_NET_KEY is not set |
| 348 | CONFIG_INET=y | 349 | CONFIG_INET=y |
| 349 | CONFIG_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 |
| 352 | CONFIG_IP_FIB_HASH=y | ||
| 353 | CONFIG_IP_PNP=y | 353 | CONFIG_IP_PNP=y |
| 354 | CONFIG_IP_PNP_DHCP=y | 354 | CONFIG_IP_PNP_DHCP=y |
| 355 | CONFIG_IP_PNP_BOOTP=y | 355 | CONFIG_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 | # | ||
| 371 | CONFIG_TCP_CONG_BIC=y | 368 | CONFIG_TCP_CONG_BIC=y |
| 372 | CONFIG_TCP_CONG_WESTWOOD=m | ||
| 373 | CONFIG_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 |
| 934 | CONFIG_ZLIB_INFLATE=y | 925 | CONFIG_ZLIB_INFLATE=y |
| 935 | CONFIG_ZLIB_DEFLATE=y | 926 | CONFIG_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 | # |
| 6 | CONFIG_ARM=y | 6 | CONFIG_ARM=y |
| 7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
| 8 | CONFIG_UID16=y | 8 | CONFIG_UID16=y |
| 9 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 9 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
| 10 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 10 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
| 11 | CONFIG_GENERIC_IOMAP=y | ||
| 12 | 11 | ||
| 13 | # | 12 | # |
| 14 | # Code maturity level options | 13 | # Code maturity level options |
| @@ -17,6 +16,7 @@ CONFIG_EXPERIMENTAL=y | |||
| 17 | CONFIG_CLEAN_COMPILE=y | 16 | CONFIG_CLEAN_COMPILE=y |
| 18 | CONFIG_BROKEN_ON_SMP=y | 17 | CONFIG_BROKEN_ON_SMP=y |
| 19 | CONFIG_LOCK_KERNEL=y | 18 | CONFIG_LOCK_KERNEL=y |
| 19 | CONFIG_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 |
| 35 | CONFIG_KALLSYMS=y | 35 | CONFIG_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 |
| 37 | CONFIG_PRINTK=y | ||
| 38 | CONFIG_BUG=y | ||
| 38 | CONFIG_BASE_FULL=y | 39 | CONFIG_BASE_FULL=y |
| 39 | CONFIG_FUTEX=y | 40 | CONFIG_FUTEX=y |
| 40 | CONFIG_EPOLL=y | 41 | CONFIG_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 | # |
| 91 | CONFIG_ARCH_OMAP_OTG=y | ||
| 92 | CONFIG_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 | ||
| 99 | CONFIG_OMAP_MUX=y | ||
| 100 | # CONFIG_OMAP_MUX_DEBUG is not set | ||
| 101 | CONFIG_OMAP_MUX_WARNINGS=y | ||
| 102 | # CONFIG_OMAP_MPU_TIMER is not set | ||
| 103 | CONFIG_OMAP_32K_TIMER=y | ||
| 104 | CONFIG_OMAP_32K_TIMER_HZ=128 | ||
| 105 | CONFIG_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 |
| 95 | CONFIG_ARCH_OMAP16XX=y | 114 | CONFIG_ARCH_OMAP16XX=y |
| 96 | CONFIG_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 |
| 102 | CONFIG_MACH_OMAP_H2=y | 120 | CONFIG_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 | # |
| 111 | CONFIG_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 |
| 113 | CONFIG_OMAP_MUX_WARNINGS=y | ||
| 114 | CONFIG_OMAP_MPU_TIMER=y | ||
| 115 | # CONFIG_OMAP_32K_TIMER is not set | ||
| 116 | CONFIG_OMAP_LL_DEBUG_UART1=y | ||
| 117 | # CONFIG_OMAP_LL_DEBUG_UART2 is not set | ||
| 118 | # CONFIG_OMAP_LL_DEBUG_UART3 is not set | ||
| 119 | CONFIG_OMAP_ARM_192MHZ=y | 130 | CONFIG_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 | # |
| 159 | CONFIG_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 | ||
| 157 | CONFIG_PREEMPT=y | 170 | CONFIG_PREEMPT=y |
| 171 | CONFIG_NO_IDLE_HZ=y | ||
| 172 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set | ||
| 173 | CONFIG_SELECT_MEMORY_MODEL=y | ||
| 174 | CONFIG_FLATMEM_MANUAL=y | ||
| 175 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
| 176 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
| 177 | CONFIG_FLATMEM=y | ||
| 178 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
| 158 | # CONFIG_LEDS is not set | 179 | # CONFIG_LEDS is not set |
| 159 | CONFIG_ALIGNMENT_TRAP=y | 180 | CONFIG_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 | # | ||
| 193 | CONFIG_CPU_FREQ=y | ||
| 194 | CONFIG_CPU_FREQ_TABLE=y | ||
| 195 | # CONFIG_CPU_FREQ_DEBUG is not set | ||
| 196 | CONFIG_CPU_FREQ_STAT=y | ||
| 197 | # CONFIG_CPU_FREQ_STAT_DETAILS is not set | ||
| 198 | # CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set | ||
| 199 | CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y | ||
| 200 | # CONFIG_CPU_FREQ_GOV_PERFORMANCE is not set | ||
| 201 | # CONFIG_CPU_FREQ_GOV_POWERSAVE is not set | ||
| 202 | CONFIG_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 | |||
| 202 | CONFIG_STANDALONE=y | 239 | CONFIG_STANDALONE=y |
| 203 | CONFIG_PREVENT_FIRMWARE_BUILD=y | 240 | CONFIG_PREVENT_FIRMWARE_BUILD=y |
| 204 | # CONFIG_FW_LOADER is not set | 241 | # CONFIG_FW_LOADER is not set |
| 205 | CONFIG_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 |
| 297 | CONFIG_BLK_DEV_LOOP=y | 332 | CONFIG_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 | # |
| 376 | CONFIG_PACKET=y | 413 | CONFIG_PACKET=y |
| 377 | # CONFIG_PACKET_MMAP is not set | 414 | # CONFIG_PACKET_MMAP is not set |
| 378 | # CONFIG_NETLINK_DEV is not set | ||
| 379 | CONFIG_UNIX=y | 415 | CONFIG_UNIX=y |
| 380 | # CONFIG_NET_KEY is not set | 416 | # CONFIG_NET_KEY is not set |
| 381 | CONFIG_INET=y | 417 | CONFIG_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 |
| 420 | CONFIG_IP_FIB_HASH=y | ||
| 384 | CONFIG_IP_PNP=y | 421 | CONFIG_IP_PNP=y |
| 385 | CONFIG_IP_PNP_DHCP=y | 422 | CONFIG_IP_PNP_DHCP=y |
| 386 | CONFIG_IP_PNP_BOOTP=y | 423 | CONFIG_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 |
| 396 | CONFIG_IP_TCPDIAG=y | 433 | CONFIG_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 | ||
| 436 | CONFIG_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 | |||
| 442 | CONFIG_NET_ETHERNET=y | 481 | CONFIG_NET_ETHERNET=y |
| 443 | CONFIG_MII=y | 482 | CONFIG_MII=y |
| 444 | CONFIG_SMC91X=y | 483 | CONFIG_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 | |||
| 518 | CONFIG_SERIO_SERPORT=y | 558 | CONFIG_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 |
| 521 | CONFIG_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 |
| 638 | CONFIG_ISP1301_OMAP=y | 682 | CONFIG_ISP1301_OMAP=y |
| 683 | CONFIG_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 | ||
| 666 | CONFIG_FB_MODE_HELPERS=y | 713 | CONFIG_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 | |||
| 677 | CONFIG_FONT_8x8=y | 725 | CONFIG_FONT_8x8=y |
| 678 | CONFIG_FONT_8x16=y | 726 | CONFIG_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 | # |
| 730 | CONFIG_USB_GADGET=y | 780 | CONFIG_USB_GADGET=y |
| 731 | # CONFIG_USB_GADGET_DEBUG_FILES is not set | 781 | # CONFIG_USB_GADGET_DEBUG_FILES is not set |
| 782 | CONFIG_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 | ||
| 738 | CONFIG_USB_GADGET_OMAP=y | 787 | CONFIG_USB_GADGET_OMAP=y |
| 739 | CONFIG_USB_OMAP=y | 788 | CONFIG_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 |
| 742 | CONFIG_USB_ETH=y | 792 | CONFIG_USB_ETH=y |
| @@ -755,6 +805,7 @@ CONFIG_USB_ETH_RNDIS=y | |||
| 755 | # | 805 | # |
| 756 | CONFIG_EXT2_FS=y | 806 | CONFIG_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 | # |
| 792 | CONFIG_PROC_FS=y | 843 | CONFIG_PROC_FS=y |
| 793 | CONFIG_SYSFS=y | 844 | CONFIG_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 | # |
| 829 | CONFIG_NFS_FS=y | 879 | CONFIG_NFS_FS=y |
| 830 | CONFIG_NFS_V3=y | 880 | CONFIG_NFS_V3=y |
| 881 | # CONFIG_NFS_V3_ACL is not set | ||
| 831 | CONFIG_NFS_V4=y | 882 | CONFIG_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 |
| 834 | CONFIG_ROOT_NFS=y | 885 | CONFIG_ROOT_NFS=y |
| 835 | CONFIG_LOCKD=y | 886 | CONFIG_LOCKD=y |
| 836 | CONFIG_LOCKD_V4=y | 887 | CONFIG_LOCKD_V4=y |
| 888 | CONFIG_NFS_COMMON=y | ||
| 837 | CONFIG_SUNRPC=y | 889 | CONFIG_SUNRPC=y |
| 838 | CONFIG_SUNRPC_GSS=y | 890 | CONFIG_SUNRPC_GSS=y |
| 839 | CONFIG_RPCSEC_GSS_KRB5=y | 891 | CONFIG_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 |
| 906 | CONFIG_DEBUG_KERNEL=y | 958 | # CONFIG_DEBUG_KERNEL is not set |
| 907 | # CONFIG_MAGIC_SYSRQ is not set | ||
| 908 | CONFIG_LOG_BUF_SHIFT=14 | 959 | CONFIG_LOG_BUF_SHIFT=14 |
| 909 | # CONFIG_SCHEDSTATS is not set | ||
| 910 | # CONFIG_DEBUG_SLAB is not set | ||
| 911 | CONFIG_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 | ||
| 915 | CONFIG_DEBUG_BUGVERBOSE=y | 960 | CONFIG_DEBUG_BUGVERBOSE=y |
| 916 | CONFIG_DEBUG_INFO=y | ||
| 917 | # CONFIG_DEBUG_FS is not set | ||
| 918 | CONFIG_FRAME_POINTER=y | 961 | CONFIG_FRAME_POINTER=y |
| 919 | CONFIG_DEBUG_USER=y | 962 | # CONFIG_DEBUG_USER is not set |
| 920 | # CONFIG_DEBUG_WAITQ is not set | ||
| 921 | CONFIG_DEBUG_ERRORS=y | ||
| 922 | CONFIG_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 | ||
| 128 | static 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 | |||
| 141 | void __init ixp2000_map_io(void) | 128 | void __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 | *************************************************************************/ | ||
| 156 | static 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 | |||
| 169 | static struct resource ixp2000_uart_resource = { | ||
| 170 | .start = IXP2000_UART_PHYS_BASE, | ||
| 171 | .end = IXP2000_UART_PHYS_BASE + 0xffff, | ||
| 172 | .flags = IORESOURCE_MEM, | ||
| 173 | }; | ||
| 174 | |||
| 175 | static 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 | |||
| 185 | void __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 = { | |||
| 219 | static void __init enp2611_init_machine(void) | 219 | static 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 @@ | |||
| 1 | if ARCH_OMAP | ||
| 2 | |||
| 3 | menu "TI OMAP Implementations" | ||
| 4 | |||
| 5 | comment "OMAP Core Type" | ||
| 6 | |||
| 7 | config ARCH_OMAP730 | ||
| 8 | depends on ARCH_OMAP | ||
| 9 | bool "OMAP730 Based System" | ||
| 10 | select ARCH_OMAP_OTG | ||
| 11 | |||
| 12 | config ARCH_OMAP1510 | ||
| 13 | depends on ARCH_OMAP | ||
| 14 | default y | ||
| 15 | bool "OMAP1510 Based System" | ||
| 16 | |||
| 17 | config ARCH_OMAP16XX | ||
| 18 | depends on ARCH_OMAP | ||
| 19 | bool "OMAP16XX Based System" | ||
| 20 | select ARCH_OMAP_OTG | ||
| 21 | |||
| 22 | config ARCH_OMAP_OTG | ||
| 23 | bool | ||
| 24 | |||
| 25 | comment "OMAP Board Type" | ||
| 26 | |||
| 27 | config 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 | |||
| 34 | config 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 | |||
| 41 | config 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 | |||
| 48 | config 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 | |||
| 55 | config 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 | |||
| 62 | config 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 | |||
| 69 | config 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 | |||
| 76 | config 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 | |||
| 82 | config 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 | |||
| 91 | comment "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 | |||
| 101 | config 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 | |||
| 110 | config 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 | |||
| 119 | config 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 | |||
| 128 | choice | ||
| 129 | prompt "System timer" | ||
| 130 | default OMAP_MPU_TIMER | ||
| 131 | |||
| 132 | config 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 | |||
| 139 | config 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 | |||
| 149 | endchoice | ||
| 150 | |||
| 151 | config 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 | |||
| 160 | choice | ||
| 161 | prompt "Low-level debug console UART" | ||
| 162 | depends on ARCH_OMAP | ||
| 163 | default OMAP_LL_DEBUG_UART1 | ||
| 164 | |||
| 165 | config OMAP_LL_DEBUG_UART1 | ||
| 166 | bool "UART1" | ||
| 167 | |||
| 168 | config OMAP_LL_DEBUG_UART2 | ||
| 169 | bool "UART2" | ||
| 170 | |||
| 171 | config OMAP_LL_DEBUG_UART3 | ||
| 172 | bool "UART3" | ||
| 173 | |||
| 174 | endchoice | ||
| 175 | |||
| 176 | config 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 | |||
| 182 | config 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 | |||
| 188 | config 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 | |||
| 194 | config 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 | |||
| 200 | config 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 | |||
| 206 | config 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 | |||
| 213 | config 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 | |||
| 219 | endmenu | ||
| 220 | |||
| 221 | endif | ||
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 | ||
| 6 | obj-y := common.o time.o irq.o dma.o clock.o mux.o gpio.o mcbsp.o usb.o | ||
| 7 | obj-m := | ||
| 8 | obj-n := | ||
| 9 | obj- := | ||
| 10 | led-y := leds.o | ||
| 11 | |||
| 12 | # Specific board support | ||
| 13 | obj-$(CONFIG_MACH_OMAP_H2) += board-h2.o | ||
| 14 | obj-$(CONFIG_MACH_OMAP_INNOVATOR) += board-innovator.o | ||
| 15 | obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o | ||
| 16 | obj-$(CONFIG_MACH_OMAP_PERSEUS2) += board-perseus2.o | ||
| 17 | obj-$(CONFIG_MACH_OMAP_OSK) += board-osk.o | ||
| 18 | obj-$(CONFIG_MACH_OMAP_H3) += board-h3.o | ||
| 19 | obj-$(CONFIG_MACH_VOICEBLUE) += board-voiceblue.o | ||
| 20 | obj-$(CONFIG_MACH_NETSTAR) += board-netstar.o | ||
| 21 | |||
| 22 | # OCPI interconnect support for 1710, 1610 and 5912 | ||
| 23 | obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o | ||
| 24 | |||
| 25 | # LEDs support | ||
| 26 | led-$(CONFIG_MACH_OMAP_H2) += leds-h2p2-debug.o | ||
| 27 | led-$(CONFIG_MACH_OMAP_INNOVATOR) += leds-innovator.o | ||
| 28 | led-$(CONFIG_MACH_OMAP_PERSEUS2) += leds-h2p2-debug.o | ||
| 29 | obj-$(CONFIG_LEDS) += $(led-y) | ||
| 30 | |||
| 31 | # Power Management | ||
| 32 | obj-$(CONFIG_PM) += pm.o sleep.o | ||
| 33 | |||
| 34 | ifeq ($(CONFIG_ARCH_OMAP1510),y) | ||
| 35 | # Innovator-1510 FPGA | ||
| 36 | obj-$(CONFIG_MACH_OMAP_INNOVATOR) += fpga.o | ||
| 37 | endif | ||
| 38 | |||
| 39 | # kgdb support | ||
| 40 | obj-$(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 | |||
| 38 | struct 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 */ | ||
| 46 | static 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 | */ | ||
| 75 | static 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 | */ | ||
| 103 | static 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 | |||
| 122 | static 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 | |||
| 215 | static struct map_desc omap_io_desc[] __initdata = { | ||
| 216 | { IO_VIRT, IO_PHYS, IO_SIZE, MT_DEVICE }, | ||
| 217 | }; | ||
| 218 | |||
| 219 | #ifdef CONFIG_ARCH_OMAP730 | ||
| 220 | static 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 | ||
| 228 | static 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) | ||
| 236 | static 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 | |||
| 242 | static 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 | |||
| 255 | static int initialized = 0; | ||
| 256 | |||
| 257 | static 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 | */ | ||
| 299 | void omap_map_io(void) | ||
| 300 | { | ||
| 301 | if (!initialized) | ||
| 302 | _omap_map_io(); | ||
| 303 | } | ||
| 304 | |||
| 305 | static 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 | |||
| 312 | static 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 | */ | ||
| 324 | static 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 | |||
| 336 | static 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 | |||
| 367 | static 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 | */ | ||
| 380 | void __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 | |||
| 445 | static int __init omap_init(void) | ||
| 446 | { | ||
| 447 | return platform_device_register(&serial_device); | ||
| 448 | } | ||
| 449 | arch_initcall(omap_init); | ||
| 450 | |||
| 451 | #define NO_LENGTH_CHECK 0xffffffff | ||
| 452 | |||
| 453 | extern int omap_bootloader_tag_len; | ||
| 454 | extern u8 omap_bootloader_tag[]; | ||
| 455 | |||
| 456 | struct omap_board_config_kernel *omap_board_config; | ||
| 457 | int omap_board_config_size = 0; | ||
| 458 | |||
| 459 | static 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 | |||
| 521 | const void *__omap_get_config(u16 tag, size_t len, int nr) | ||
| 522 | { | ||
| 523 | return get_config(tag, len, nr, NULL); | ||
| 524 | } | ||
| 525 | EXPORT_SYMBOL(__omap_get_config); | ||
| 526 | |||
| 527 | const void *omap_get_var_config(u16 tag, size_t *len) | ||
| 528 | { | ||
| 529 | return get_config(tag, NO_LENGTH_CHECK, 0, len); | ||
| 530 | } | ||
| 531 | EXPORT_SYMBOL(omap_get_var_config); | ||
| 532 | |||
| 533 | static 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 | } | ||
| 549 | console_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 @@ | |||
| 1 | comment "OMAP Core Type" | ||
| 2 | depends on ARCH_OMAP1 | ||
| 3 | |||
| 4 | config ARCH_OMAP730 | ||
| 5 | depends on ARCH_OMAP1 | ||
| 6 | bool "OMAP730 Based System" | ||
| 7 | select ARCH_OMAP_OTG | ||
| 8 | |||
| 9 | config ARCH_OMAP1510 | ||
| 10 | depends on ARCH_OMAP1 | ||
| 11 | default y | ||
| 12 | bool "OMAP1510 Based System" | ||
| 13 | |||
| 14 | config ARCH_OMAP16XX | ||
| 15 | depends on ARCH_OMAP1 | ||
| 16 | bool "OMAP16xx Based System" | ||
| 17 | select ARCH_OMAP_OTG | ||
| 18 | |||
| 19 | comment "OMAP Board Type" | ||
| 20 | depends on ARCH_OMAP1 | ||
| 21 | |||
| 22 | config 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 | |||
| 29 | config 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 | |||
| 36 | config 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 | |||
| 43 | config 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 | |||
| 50 | config 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 | |||
| 57 | config 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 | |||
| 64 | config 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 | |||
| 70 | config 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 | |||
| 79 | comment "OMAP CPU Speed" | ||
| 80 | depends on ARCH_OMAP1 | ||
| 81 | |||
| 82 | config 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 | |||
| 90 | config 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 | |||
| 96 | config 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 | |||
| 102 | config 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 | |||
| 108 | config 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 | |||
| 114 | config 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 | |||
| 120 | config 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 | |||
| 126 | config 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 | |||
| 132 | config 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 | |||
| 139 | config 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 | ||
| 6 | obj-y := io.o id.o irq.o time.o serial.o | ||
| 7 | led-y := leds.o | ||
| 8 | |||
| 9 | # Specific board support | ||
| 10 | obj-$(CONFIG_MACH_OMAP_H2) += board-h2.o | ||
| 11 | obj-$(CONFIG_MACH_OMAP_INNOVATOR) += board-innovator.o | ||
| 12 | obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o | ||
| 13 | obj-$(CONFIG_MACH_OMAP_PERSEUS2) += board-perseus2.o | ||
| 14 | obj-$(CONFIG_MACH_OMAP_OSK) += board-osk.o | ||
| 15 | obj-$(CONFIG_MACH_OMAP_H3) += board-h3.o | ||
| 16 | obj-$(CONFIG_MACH_VOICEBLUE) += board-voiceblue.o | ||
| 17 | obj-$(CONFIG_MACH_NETSTAR) += board-netstar.o | ||
| 18 | |||
| 19 | ifeq ($(CONFIG_ARCH_OMAP1510),y) | ||
| 20 | # Innovator-1510 FPGA | ||
| 21 | obj-$(CONFIG_MACH_OMAP_INNOVATOR) += fpga.o | ||
| 22 | endif | ||
| 23 | |||
| 24 | # LEDs support | ||
| 25 | led-$(CONFIG_MACH_OMAP_H2) += leds-h2p2-debug.o | ||
| 26 | led-$(CONFIG_MACH_OMAP_INNOVATOR) += leds-innovator.o | ||
| 27 | led-$(CONFIG_MACH_OMAP_PERSEUS2) += leds-h2p2-debug.o | ||
| 28 | led-$(CONFIG_MACH_OMAP_OSK) += leds-osk.o | ||
| 29 | obj-$(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 |
| 2 | params_phys-y := 0x10000100 | 2 | params_phys-y := 0x10000100 |
| 3 | initrd_phys-y := 0x10800000 | 3 | initrd_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 | ||
| 32 | static int __initdata generic_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1}; | 31 | static 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 | ||
| 85 | static void __init omap_generic_map_io(void) | 84 | static void __init omap_generic_map_io(void) |
| 86 | { | 85 | { |
| 87 | omap_map_io(); | 86 | omap_map_common_io() |
| 88 | } | 87 | } |
| 89 | 88 | ||
| 90 | MACHINE_START(OMAP_GENERIC, "Generic OMAP1510/1610/1710") | 89 | MACHINE_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 | ||
| 41 | extern int omap_gpio_init(void); | 40 | extern int omap_gpio_init(void); |
| 42 | 41 | ||
| @@ -172,7 +171,7 @@ static void __init h2_init(void) | |||
| 172 | 171 | ||
| 173 | static void __init h2_map_io(void) | 172 | static 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 | ||
| 43 | extern int omap_gpio_init(void); | 42 | extern int omap_gpio_init(void); |
| 44 | 43 | ||
| @@ -190,7 +189,7 @@ void h3_init_irq(void) | |||
| 190 | 189 | ||
| 191 | static void __init h3_map_io(void) | 190 | static 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 | ||
| 39 | static int __initdata innovator_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1}; | 38 | static 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 | ||
| 253 | static void __init innovator_map_io(void) | 252 | static 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 | ||
| 32 | extern void __init omap_init_time(void); | 31 | extern void __init omap_init_time(void); |
| 33 | extern int omap_gpio_init(void); | 32 | extern int omap_gpio_init(void); |
| @@ -100,7 +99,7 @@ static int __initdata omap_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1}; | |||
| 100 | 99 | ||
| 101 | static void __init netstar_map_io(void) | 100 | static 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 | ||
| 45 | static struct map_desc osk5912_io_desc[] __initdata = { | 44 | static 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 | ||
| 154 | static void __init osk_map_io(void) | 153 | static 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 | ||
| 33 | static struct resource smc91x_resources[] = { | 32 | static struct resource smc91x_resources[] = { |
| 34 | [0] = { | 33 | [0] = { |
| @@ -140,7 +139,7 @@ static struct map_desc omap_perseus2_io_desc[] __initdata = { | |||
| 140 | 139 | ||
| 141 | static void __init omap_perseus2_map_io(void) | 140 | static 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 | ||
| 37 | extern void omap_init_time(void); | 36 | extern void omap_init_time(void); |
| 38 | extern int omap_gpio_init(void); | 37 | extern int omap_gpio_init(void); |
| @@ -170,7 +169,7 @@ static int __initdata omap_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1}; | |||
| 170 | 169 | ||
| 171 | static void __init voiceblue_map_io(void) | 170 | static 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 | |||
| 21 | struct 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 */ | ||
| 29 | static 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 | */ | ||
| 58 | static 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 | */ | ||
| 86 | static 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 | |||
| 105 | void __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 | |||
| 20 | extern int clk_init(void); | ||
| 21 | extern 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 | */ | ||
| 27 | static struct map_desc omap_io_desc[] __initdata = { | ||
| 28 | { IO_VIRT, IO_PHYS, IO_SIZE, MT_DEVICE }, | ||
| 29 | }; | ||
| 30 | |||
| 31 | #ifdef CONFIG_ARCH_OMAP730 | ||
| 32 | static 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 | ||
| 40 | static 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) | ||
| 48 | static 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 | |||
| 54 | static 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 | |||
| 67 | static int initialized = 0; | ||
| 68 | |||
| 69 | static 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 | */ | ||
| 111 | void 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 @@ | |||
| 56 | struct omap_irq_bank { | 56 | struct 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 | ||
| 61 | static unsigned int irq_bank_count = 0; | 62 | static 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 | ||
| 109 | static 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[] = { | |||
| 145 | static struct omap_irq_bank omap1610_irq_banks[] = { | 159 | static 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 | ||
| 159 | void __init omap_init_irq(void) | 174 | void __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 | |||
| 29 | static struct clk * uart1_ck = NULL; | ||
| 30 | static struct clk * uart2_ck = NULL; | ||
| 31 | static struct clk * uart3_ck = NULL; | ||
| 32 | |||
| 33 | static 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 | |||
| 40 | static 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 | */ | ||
| 52 | static 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 | |||
| 64 | static 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 | |||
| 95 | static 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 | */ | ||
| 108 | void __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 | |||
| 196 | static int __init omap_init(void) | ||
| 197 | { | ||
| 198 | return platform_device_register(&serial_device); | ||
| 199 | } | ||
| 200 | arch_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) | ||
| 255 | static 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 | */ |
| 410 | void __init omap_timer_init(void) | 422 | static 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 |
| 103 | config CPU_ARM925T | 103 | config 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 @@ | |||
| 1 | if ARCH_OMAP | ||
| 2 | |||
| 3 | menu "TI OMAP Implementations" | ||
| 4 | |||
| 5 | config ARCH_OMAP_OTG | ||
| 6 | bool | ||
| 7 | |||
| 8 | choice | ||
| 9 | prompt "OMAP System Type" | ||
| 10 | default ARCH_OMAP1 | ||
| 11 | |||
| 12 | config ARCH_OMAP1 | ||
| 13 | bool "TI OMAP1" | ||
| 14 | |||
| 15 | config ARCH_OMAP2 | ||
| 16 | bool "TI OMAP2" | ||
| 17 | |||
| 18 | endchoice | ||
| 19 | |||
| 20 | comment "OMAP Feature Selections" | ||
| 21 | |||
| 22 | config 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 | |||
| 35 | config 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 | |||
| 44 | config 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 | |||
| 53 | config 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 | |||
| 62 | choice | ||
| 63 | prompt "System timer" | ||
| 64 | default OMAP_MPU_TIMER | ||
| 65 | |||
| 66 | config 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 | |||
| 73 | config 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 | |||
| 83 | endchoice | ||
| 84 | |||
| 85 | config 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 | |||
| 94 | choice | ||
| 95 | prompt "Low-level debug console UART" | ||
| 96 | depends on ARCH_OMAP | ||
| 97 | default OMAP_LL_DEBUG_UART1 | ||
| 98 | |||
| 99 | config OMAP_LL_DEBUG_UART1 | ||
| 100 | bool "UART1" | ||
| 101 | |||
| 102 | config OMAP_LL_DEBUG_UART2 | ||
| 103 | bool "UART2" | ||
| 104 | |||
| 105 | config OMAP_LL_DEBUG_UART3 | ||
| 106 | bool "UART3" | ||
| 107 | |||
| 108 | endchoice | ||
| 109 | |||
| 110 | endmenu | ||
| 111 | |||
| 112 | endif | ||
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 | ||
| 6 | obj-y := common.o dma.o clock.o mux.o gpio.o mcbsp.o usb.o | ||
| 7 | obj-m := | ||
| 8 | obj-n := | ||
| 9 | obj- := | ||
| 10 | |||
| 11 | # OCPI interconnect support for 1710, 1610 and 5912 | ||
| 12 | obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o | ||
| 13 | |||
| 14 | # Power Management | ||
| 15 | obj-$(CONFIG_PM) += pm.o sleep.o | ||
| 16 | |||
| 17 | obj-$(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); | |||
| 25 | static DECLARE_MUTEX(clocks_sem); | 26 | static DECLARE_MUTEX(clocks_sem); |
| 26 | static DEFINE_SPINLOCK(clockfw_lock); | 27 | static DEFINE_SPINLOCK(clockfw_lock); |
| 27 | static void propagate_rate(struct clk * clk); | 28 | static void propagate_rate(struct clk * clk); |
| 29 | /* UART clock function */ | ||
| 30 | static int set_uart_rate(struct clk * clk, unsigned long rate); | ||
| 28 | /* External clock (MCLK & BCLK) functions */ | 31 | /* External clock (MCLK & BCLK) functions */ |
| 29 | static int set_ext_clk_rate(struct clk * clk, unsigned long rate); | 32 | static int set_ext_clk_rate(struct clk * clk, unsigned long rate); |
| 30 | static long round_ext_clk_rate(struct clk * clk, unsigned long rate); | 33 | static 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); | |||
| 34 | static long round_to_table_rate(struct clk * clk, unsigned long rate); | 37 | static long round_to_table_rate(struct clk * clk, unsigned long rate); |
| 35 | void clk_setdpll(__u16, __u16); | 38 | void clk_setdpll(__u16, __u16); |
| 36 | 39 | ||
| 37 | struct mpu_rate rate_table[] = { | 40 | static 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 | ||
| 79 | static void ckctl_recalc(struct clk * clk) | 82 | static void ckctl_recalc(struct clk * clk); |
| 80 | { | 83 | int __clk_enable(struct clk *clk); |
| 81 | int dsor; | 84 | void __clk_disable(struct clk *clk); |
| 82 | 85 | void __clk_unuse(struct clk *clk); | |
| 83 | /* Calculate divisor encoded as 2-bit exponent */ | 86 | int __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 | ||
| 94 | static void followparent_recalc(struct clk * clk) | 89 | static 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 | ||
| 100 | static 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 | ||
| 106 | static struct clk ck_ref = { | 109 | static struct clk ck_ref = { |
| 107 | .name = "ck_ref", | 110 | .name = "ck_ref", |
| @@ -138,7 +141,7 @@ static struct clk arm_ck = { | |||
| 138 | static struct clk armper_ck = { | 141 | static 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 = { | |||
| 185 | static struct clk arminth_ck16xx = { | 188 | static 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 | ||
| 220 | static 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 | |||
| 232 | static 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 | |||
| 242 | static 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 | |||
| 217 | static struct clk tc_ck = { | 252 | static 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 = { | |||
| 226 | static struct clk arminth_ck1510 = { | 261 | static 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 = { | |||
| 237 | static struct clk tipb_ck = { | 272 | static 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 = { | |||
| 271 | static struct clk dma_ck = { | 306 | static 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 | ||
| 278 | static struct clk dma_lcdfree_ck = { | 314 | static 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 = { | |||
| 303 | static struct clk rhea1_ck = { | 339 | static 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 | ||
| 310 | static struct clk rhea2_ck = { | 346 | static 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 | ||
| 328 | static struct clk uart1_ck = { | 364 | static 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 | |||
| 375 | static 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 | ||
| 341 | static struct clk uart2_ck = { | 384 | static 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 | ||
| 354 | static struct clk uart3_ck = { | 395 | static 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 | |||
| 406 | static 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 | ||
| 367 | static struct clk usb_clko = { /* 6 MHz output on W4_USB_CLKO */ | 415 | static 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 | |||
| 863 | static 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 | |||
| 769 | long clk_round_rate(struct clk *clk, unsigned long rate) | 889 | long 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 */ | ||
| 1048 | static 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 | ||
| 925 | static int set_ext_clk_rate(struct clk * clk, unsigned long rate) | 1065 | static 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 | } |
| 986 | EXPORT_SYMBOL(clk_unregister); | 1126 | EXPORT_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 | */ | ||
| 1133 | static 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 | ||
| 990 | int __init clk_init(void) | 1141 | int __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 | |||
| 1268 | static 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 | |||
| 1321 | late_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 | ||
| 108 | int clk_register(struct clk *clk); | 116 | int clk_register(struct clk *clk); |
| 109 | void clk_unregister(struct clk *clk); | 117 | void 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 | |||
| 38 | extern int omap_bootloader_tag_len; | ||
| 39 | extern u8 omap_bootloader_tag[]; | ||
| 40 | |||
| 41 | struct omap_board_config_kernel *omap_board_config; | ||
| 42 | int omap_board_config_size = 0; | ||
| 43 | |||
| 44 | static 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 | |||
| 106 | const void *__omap_get_config(u16 tag, size_t len, int nr) | ||
| 107 | { | ||
| 108 | return get_config(tag, len, nr, NULL); | ||
| 109 | } | ||
| 110 | EXPORT_SYMBOL(__omap_get_config); | ||
| 111 | |||
| 112 | const void *omap_get_var_config(u16 tag, size_t *len) | ||
| 113 | { | ||
| 114 | return get_config(tag, NO_LENGTH_CHECK, 0, len); | ||
| 115 | } | ||
| 116 | EXPORT_SYMBOL(omap_get_var_config); | ||
| 117 | |||
| 118 | static 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 | } | ||
| 135 | console_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 | |||
| 32 | int 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 | |||
| 53 | unsigned 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 | |||
| 70 | static 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 | |||
| 94 | static 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 | |||
| 114 | static 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 | |||
| 123 | static int __init omap_cpufreq_init(void) | ||
| 124 | { | ||
| 125 | return cpufreq_register_driver(&omap_driver); | ||
| 126 | } | ||
| 127 | |||
| 128 | arch_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 | ||
| 923 | void omap_stop_lcd_dma(void) | 925 | void 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 | ||
| 986 | int 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 | |||
| 975 | static int __init omap_init_dma(void) | 1005 | static 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 { | |||
| 66 | static struct omap_mcbsp mcbsp[OMAP_MAX_MCBSP_COUNT]; | 66 | static struct omap_mcbsp mcbsp[OMAP_MAX_MCBSP_COUNT]; |
| 67 | static struct clk *mcbsp_dsp_ck = 0; | 67 | static struct clk *mcbsp_dsp_ck = 0; |
| 68 | static struct clk *mcbsp_api_ck = 0; | 68 | static struct clk *mcbsp_api_ck = 0; |
| 69 | static struct clk *mcbsp_dspxor_ck = 0; | ||
| 69 | 70 | ||
| 70 | 71 | ||
| 71 | static void omap_mcbsp_dump_reg(u8 id) | 72 | static 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 | ||
| 192 | static void omap_mcbsp_dsp_request(void) | 193 | static 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 | ||
| 208 | static void omap_mcbsp_dsp_free(void) | 206 | static 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 | |||
| 214 | int omap_mcbsp_request(unsigned int id) | 215 | int 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 */ | ||
| 355 | int 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 | |||
| 388 | int 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 = ®_cfg_table[reg_cfg]; | 56 | cfg = (reg_cfg_set *)®_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; | |||
| 326 | static struct resource ohci_resources[] = { | 326 | static 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/arch/xtensa/kernel/syscalls.c b/arch/xtensa/kernel/syscalls.c index 3540d8b119f3..7270509c44de 100644 --- a/arch/xtensa/kernel/syscalls.c +++ b/arch/xtensa/kernel/syscalls.c | |||
| @@ -42,7 +42,6 @@ | |||
| 42 | #include <asm/mman.h> | 42 | #include <asm/mman.h> |
| 43 | #include <asm/shmparam.h> | 43 | #include <asm/shmparam.h> |
| 44 | #include <asm/page.h> | 44 | #include <asm/page.h> |
| 45 | #include <asm/ipc.h> | ||
| 46 | 45 | ||
| 47 | extern void do_syscall_trace(void); | 46 | extern void do_syscall_trace(void); |
| 48 | typedef int (*syscall_t)(void *a0,...); | 47 | typedef int (*syscall_t)(void *a0,...); |
diff --git a/drivers/char/drm/i915_drv.h b/drivers/char/drm/i915_drv.h index e58bdac16407..9c37d2367dd5 100644 --- a/drivers/char/drm/i915_drv.h +++ b/drivers/char/drm/i915_drv.h | |||
| @@ -121,7 +121,7 @@ extern void i915_mem_release(drm_device_t * dev, | |||
| 121 | DRMFILE filp, struct mem_block *heap); | 121 | DRMFILE filp, struct mem_block *heap); |
| 122 | 122 | ||
| 123 | extern long i915_compat_ioctl(struct file *filp, unsigned int cmd, | 123 | extern long i915_compat_ioctl(struct file *filp, unsigned int cmd, |
| 124 | unsigned long arg) | 124 | unsigned long arg); |
| 125 | 125 | ||
| 126 | 126 | ||
| 127 | #define I915_READ(reg) DRM_READ32(dev_priv->mmio_map, reg) | 127 | #define I915_READ(reg) DRM_READ32(dev_priv->mmio_map, reg) |
diff --git a/drivers/ieee1394/Kconfig b/drivers/ieee1394/Kconfig index 7d58af1ae306..25103a0ef9b3 100644 --- a/drivers/ieee1394/Kconfig +++ b/drivers/ieee1394/Kconfig | |||
| @@ -66,6 +66,18 @@ config IEEE1394_CONFIG_ROM_IP1394 | |||
| 66 | with MacOSX and WinXP IP-over-1394), enable this option and the | 66 | with MacOSX and WinXP IP-over-1394), enable this option and the |
| 67 | eth1394 option below. | 67 | eth1394 option below. |
| 68 | 68 | ||
| 69 | config IEEE1394_EXPORT_FULL_API | ||
| 70 | bool "Export all symbols of ieee1394's API" | ||
| 71 | depends on IEEE1394 | ||
| 72 | default n | ||
| 73 | help | ||
| 74 | Export all symbols of ieee1394's driver programming interface, even | ||
| 75 | those that are not currently used by the standard IEEE 1394 drivers. | ||
| 76 | |||
| 77 | This option does not affect the interface to userspace applications. | ||
| 78 | Say Y here if you want to compile externally developed drivers that | ||
| 79 | make extended use of ieee1394's API. It is otherwise safe to say N. | ||
| 80 | |||
| 69 | comment "Device Drivers" | 81 | comment "Device Drivers" |
| 70 | depends on IEEE1394 | 82 | depends on IEEE1394 |
| 71 | 83 | ||
diff --git a/drivers/ieee1394/csr.c b/drivers/ieee1394/csr.c index 1b98684aebcd..149573db91c5 100644 --- a/drivers/ieee1394/csr.c +++ b/drivers/ieee1394/csr.c | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | #include "hosts.h" | 28 | #include "hosts.h" |
| 29 | #include "ieee1394.h" | 29 | #include "ieee1394.h" |
| 30 | #include "highlevel.h" | 30 | #include "highlevel.h" |
| 31 | #include "ieee1394_core.h" | ||
| 31 | 32 | ||
| 32 | /* Module Parameters */ | 33 | /* Module Parameters */ |
| 33 | /* this module parameter can be used to disable mapping of the FCP registers */ | 34 | /* this module parameter can be used to disable mapping of the FCP registers */ |
| @@ -232,7 +233,7 @@ static void add_host(struct hpsb_host *host) | |||
| 232 | host->csr.generation = 2; | 233 | host->csr.generation = 2; |
| 233 | 234 | ||
| 234 | bus_info[1] = __constant_cpu_to_be32(0x31333934); | 235 | bus_info[1] = __constant_cpu_to_be32(0x31333934); |
| 235 | bus_info[2] = cpu_to_be32((1 << CSR_IRMC_SHIFT) | | 236 | bus_info[2] = cpu_to_be32((hpsb_disable_irm ? 0 : 1 << CSR_IRMC_SHIFT) | |
| 236 | (1 << CSR_CMC_SHIFT) | | 237 | (1 << CSR_CMC_SHIFT) | |
| 237 | (1 << CSR_ISC_SHIFT) | | 238 | (1 << CSR_ISC_SHIFT) | |
| 238 | (0 << CSR_BMC_SHIFT) | | 239 | (0 << CSR_BMC_SHIFT) | |
diff --git a/drivers/ieee1394/csr1212.c b/drivers/ieee1394/csr1212.c index 7c4330e2e875..61ddd5d37eff 100644 --- a/drivers/ieee1394/csr1212.c +++ b/drivers/ieee1394/csr1212.c | |||
| @@ -209,7 +209,15 @@ void csr1212_init_local_csr(struct csr1212_csr *csr, | |||
| 209 | { | 209 | { |
| 210 | static const int mr_map[] = { 4, 64, 1024, 0 }; | 210 | static const int mr_map[] = { 4, 64, 1024, 0 }; |
| 211 | 211 | ||
| 212 | #ifdef __KERNEL__ | ||
| 213 | BUG_ON(max_rom & ~0x3); | ||
| 212 | csr->max_rom = mr_map[max_rom]; | 214 | csr->max_rom = mr_map[max_rom]; |
| 215 | #else | ||
| 216 | if (max_rom & ~0x3) /* caller supplied invalid argument */ | ||
| 217 | csr->max_rom = 0; | ||
| 218 | else | ||
| 219 | csr->max_rom = mr_map[max_rom]; | ||
| 220 | #endif | ||
| 213 | memcpy(csr->bus_info_data, bus_info_data, csr->bus_info_len); | 221 | memcpy(csr->bus_info_data, bus_info_data, csr->bus_info_len); |
| 214 | } | 222 | } |
| 215 | 223 | ||
| @@ -533,12 +541,15 @@ struct csr1212_keyval *csr1212_new_icon_descriptor_leaf(u_int32_t version, | |||
| 533 | static const int pd[4] = { 0, 4, 16, 256 }; | 541 | static const int pd[4] = { 0, 4, 16, 256 }; |
| 534 | static const int cs[16] = { 4, 2 }; | 542 | static const int cs[16] = { 4, 2 }; |
| 535 | struct csr1212_keyval *kv; | 543 | struct csr1212_keyval *kv; |
| 536 | int palette_size = pd[palette_depth] * cs[color_space]; | 544 | int palette_size; |
| 537 | int pixel_size = (hscan * vscan + 3) & ~0x3; | 545 | int pixel_size = (hscan * vscan + 3) & ~0x3; |
| 538 | 546 | ||
| 539 | if ((palette_depth && !palette) || !pixels) | 547 | if (!pixels || (!palette && palette_depth) || |
| 548 | (palette_depth & ~0x3) || (color_space & ~0xf)) | ||
| 540 | return NULL; | 549 | return NULL; |
| 541 | 550 | ||
| 551 | palette_size = pd[palette_depth] * cs[color_space]; | ||
| 552 | |||
| 542 | kv = csr1212_new_descriptor_leaf(1, 0, NULL, | 553 | kv = csr1212_new_descriptor_leaf(1, 0, NULL, |
| 543 | palette_size + pixel_size + | 554 | palette_size + pixel_size + |
| 544 | CSR1212_ICON_DESCRIPTOR_LEAF_OVERHEAD); | 555 | CSR1212_ICON_DESCRIPTOR_LEAF_OVERHEAD); |
| @@ -760,9 +771,9 @@ static int csr1212_append_new_cache(struct csr1212_csr *csr, size_t romsize) | |||
| 760 | struct csr1212_csr_rom_cache *cache; | 771 | struct csr1212_csr_rom_cache *cache; |
| 761 | u_int64_t csr_addr; | 772 | u_int64_t csr_addr; |
| 762 | 773 | ||
| 763 | if (!csr || !csr->ops->allocate_addr_range || | 774 | if (!csr || !csr->ops || !csr->ops->allocate_addr_range || |
| 764 | !csr->ops->release_addr) | 775 | !csr->ops->release_addr || csr->max_rom < 1) |
| 765 | return CSR1212_ENOMEM; | 776 | return CSR1212_EINVAL; |
| 766 | 777 | ||
| 767 | /* ROM size must be a multiple of csr->max_rom */ | 778 | /* ROM size must be a multiple of csr->max_rom */ |
| 768 | romsize = (romsize + (csr->max_rom - 1)) & ~(csr->max_rom - 1); | 779 | romsize = (romsize + (csr->max_rom - 1)) & ~(csr->max_rom - 1); |
| @@ -1145,6 +1156,8 @@ int csr1212_generate_csr_image(struct csr1212_csr *csr) | |||
| 1145 | 1156 | ||
| 1146 | /* Make sure the Extended ROM leaf is a multiple of | 1157 | /* Make sure the Extended ROM leaf is a multiple of |
| 1147 | * max_rom in size. */ | 1158 | * max_rom in size. */ |
| 1159 | if (csr->max_rom < 1) | ||
| 1160 | return CSR1212_EINVAL; | ||
| 1148 | leaf_size = (cache->len + (csr->max_rom - 1)) & | 1161 | leaf_size = (cache->len + (csr->max_rom - 1)) & |
| 1149 | ~(csr->max_rom - 1); | 1162 | ~(csr->max_rom - 1); |
| 1150 | 1163 | ||
| @@ -1409,7 +1422,7 @@ int _csr1212_read_keyval(struct csr1212_csr *csr, struct csr1212_keyval *kv) | |||
| 1409 | u_int32_t *cache_ptr; | 1422 | u_int32_t *cache_ptr; |
| 1410 | u_int16_t kv_len = 0; | 1423 | u_int16_t kv_len = 0; |
| 1411 | 1424 | ||
| 1412 | if (!csr || !kv) | 1425 | if (!csr || !kv || csr->max_rom < 1) |
| 1413 | return CSR1212_EINVAL; | 1426 | return CSR1212_EINVAL; |
| 1414 | 1427 | ||
| 1415 | /* First find which cache the data should be in (or go in if not read | 1428 | /* First find which cache the data should be in (or go in if not read |
| @@ -1572,7 +1585,7 @@ int csr1212_parse_csr(struct csr1212_csr *csr) | |||
| 1572 | struct csr1212_dentry *dentry; | 1585 | struct csr1212_dentry *dentry; |
| 1573 | int ret; | 1586 | int ret; |
| 1574 | 1587 | ||
| 1575 | if (!csr || !csr->ops->bus_read) | 1588 | if (!csr || !csr->ops || !csr->ops->bus_read) |
| 1576 | return CSR1212_EINVAL; | 1589 | return CSR1212_EINVAL; |
| 1577 | 1590 | ||
| 1578 | ret = csr1212_parse_bus_info_block(csr); | 1591 | ret = csr1212_parse_bus_info_block(csr); |
| @@ -1581,9 +1594,13 @@ int csr1212_parse_csr(struct csr1212_csr *csr) | |||
| 1581 | 1594 | ||
| 1582 | if (!csr->ops->get_max_rom) | 1595 | if (!csr->ops->get_max_rom) |
| 1583 | csr->max_rom = mr_map[0]; /* default value */ | 1596 | csr->max_rom = mr_map[0]; /* default value */ |
| 1584 | else | 1597 | else { |
| 1585 | csr->max_rom = mr_map[csr->ops->get_max_rom(csr->bus_info_data, | 1598 | int i = csr->ops->get_max_rom(csr->bus_info_data, |
| 1586 | csr->private)]; | 1599 | csr->private); |
| 1600 | if (i & ~0x3) | ||
| 1601 | return CSR1212_EINVAL; | ||
| 1602 | csr->max_rom = mr_map[i]; | ||
| 1603 | } | ||
| 1587 | 1604 | ||
| 1588 | csr->cache_head->layout_head = csr->root_kv; | 1605 | csr->cache_head->layout_head = csr->root_kv; |
| 1589 | csr->cache_head->layout_tail = csr->root_kv; | 1606 | csr->cache_head->layout_tail = csr->root_kv; |
diff --git a/drivers/ieee1394/dma.c b/drivers/ieee1394/dma.c index 758819d1999d..b79ddb43e746 100644 --- a/drivers/ieee1394/dma.c +++ b/drivers/ieee1394/dma.c | |||
| @@ -158,7 +158,7 @@ static inline int dma_region_find(struct dma_region *dma, unsigned long offset, | |||
| 158 | 158 | ||
| 159 | dma_addr_t dma_region_offset_to_bus(struct dma_region *dma, unsigned long offset) | 159 | dma_addr_t dma_region_offset_to_bus(struct dma_region *dma, unsigned long offset) |
| 160 | { | 160 | { |
| 161 | unsigned long rem; | 161 | unsigned long rem = 0; |
| 162 | 162 | ||
| 163 | struct scatterlist *sg = &dma->sglist[dma_region_find(dma, offset, &rem)]; | 163 | struct scatterlist *sg = &dma->sglist[dma_region_find(dma, offset, &rem)]; |
| 164 | return sg_dma_address(sg) + rem; | 164 | return sg_dma_address(sg) + rem; |
diff --git a/drivers/ieee1394/eth1394.c b/drivers/ieee1394/eth1394.c index 654da76bf811..cd53c174ced1 100644 --- a/drivers/ieee1394/eth1394.c +++ b/drivers/ieee1394/eth1394.c | |||
| @@ -89,7 +89,7 @@ | |||
| 89 | #define TRACE() printk(KERN_ERR "%s:%s[%d] ---- TRACE\n", driver_name, __FUNCTION__, __LINE__) | 89 | #define TRACE() printk(KERN_ERR "%s:%s[%d] ---- TRACE\n", driver_name, __FUNCTION__, __LINE__) |
| 90 | 90 | ||
| 91 | static char version[] __devinitdata = | 91 | static char version[] __devinitdata = |
| 92 | "$Rev: 1247 $ Ben Collins <bcollins@debian.org>"; | 92 | "$Rev: 1264 $ Ben Collins <bcollins@debian.org>"; |
| 93 | 93 | ||
| 94 | struct fragment_info { | 94 | struct fragment_info { |
| 95 | struct list_head list; | 95 | struct list_head list; |
| @@ -706,7 +706,7 @@ static void ether1394_host_reset (struct hpsb_host *host) | |||
| 706 | return; | 706 | return; |
| 707 | 707 | ||
| 708 | dev = hi->dev; | 708 | dev = hi->dev; |
| 709 | priv = netdev_priv(dev); | 709 | priv = (struct eth1394_priv *)netdev_priv(dev); |
| 710 | 710 | ||
| 711 | /* Reset our private host data, but not our mtu */ | 711 | /* Reset our private host data, but not our mtu */ |
| 712 | netif_stop_queue (dev); | 712 | netif_stop_queue (dev); |
| @@ -1770,7 +1770,7 @@ fail: | |||
| 1770 | static void ether1394_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) | 1770 | static void ether1394_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) |
| 1771 | { | 1771 | { |
| 1772 | strcpy (info->driver, driver_name); | 1772 | strcpy (info->driver, driver_name); |
| 1773 | strcpy (info->version, "$Rev: 1247 $"); | 1773 | strcpy (info->version, "$Rev: 1264 $"); |
| 1774 | /* FIXME XXX provide sane businfo */ | 1774 | /* FIXME XXX provide sane businfo */ |
| 1775 | strcpy (info->bus_info, "ieee1394"); | 1775 | strcpy (info->bus_info, "ieee1394"); |
| 1776 | } | 1776 | } |
diff --git a/drivers/ieee1394/ieee1394_core.c b/drivers/ieee1394/ieee1394_core.c index 629070b83a33..b248d89de8b4 100644 --- a/drivers/ieee1394/ieee1394_core.c +++ b/drivers/ieee1394/ieee1394_core.c | |||
| @@ -52,7 +52,7 @@ | |||
| 52 | /* | 52 | /* |
| 53 | * Disable the nodemgr detection and config rom reading functionality. | 53 | * Disable the nodemgr detection and config rom reading functionality. |
| 54 | */ | 54 | */ |
| 55 | static int disable_nodemgr = 0; | 55 | static int disable_nodemgr; |
| 56 | module_param(disable_nodemgr, int, 0444); | 56 | module_param(disable_nodemgr, int, 0444); |
| 57 | MODULE_PARM_DESC(disable_nodemgr, "Disable nodemgr functionality."); | 57 | MODULE_PARM_DESC(disable_nodemgr, "Disable nodemgr functionality."); |
| 58 | 58 | ||
| @@ -520,6 +520,9 @@ int hpsb_send_packet(struct hpsb_packet *packet) | |||
| 520 | 520 | ||
| 521 | if (!packet->no_waiter || packet->expect_response) { | 521 | if (!packet->no_waiter || packet->expect_response) { |
| 522 | atomic_inc(&packet->refcnt); | 522 | atomic_inc(&packet->refcnt); |
| 523 | /* Set the initial "sendtime" to 10 seconds from now, to | ||
| 524 | prevent premature expiry. If a packet takes more than | ||
| 525 | 10 seconds to hit the wire, we have bigger problems :) */ | ||
| 523 | packet->sendtime = jiffies + 10 * HZ; | 526 | packet->sendtime = jiffies + 10 * HZ; |
| 524 | skb_queue_tail(&host->pending_packet_queue, packet->skb); | 527 | skb_queue_tail(&host->pending_packet_queue, packet->skb); |
| 525 | } | 528 | } |
| @@ -1223,9 +1226,7 @@ EXPORT_SYMBOL(hpsb_protocol_class); | |||
| 1223 | EXPORT_SYMBOL(hpsb_set_packet_complete_task); | 1226 | EXPORT_SYMBOL(hpsb_set_packet_complete_task); |
| 1224 | EXPORT_SYMBOL(hpsb_alloc_packet); | 1227 | EXPORT_SYMBOL(hpsb_alloc_packet); |
| 1225 | EXPORT_SYMBOL(hpsb_free_packet); | 1228 | EXPORT_SYMBOL(hpsb_free_packet); |
| 1226 | EXPORT_SYMBOL(hpsb_send_phy_config); | ||
| 1227 | EXPORT_SYMBOL(hpsb_send_packet); | 1229 | EXPORT_SYMBOL(hpsb_send_packet); |
| 1228 | EXPORT_SYMBOL(hpsb_send_packet_and_wait); | ||
| 1229 | EXPORT_SYMBOL(hpsb_reset_bus); | 1230 | EXPORT_SYMBOL(hpsb_reset_bus); |
| 1230 | EXPORT_SYMBOL(hpsb_bus_reset); | 1231 | EXPORT_SYMBOL(hpsb_bus_reset); |
| 1231 | EXPORT_SYMBOL(hpsb_selfid_received); | 1232 | EXPORT_SYMBOL(hpsb_selfid_received); |
| @@ -1233,6 +1234,10 @@ EXPORT_SYMBOL(hpsb_selfid_complete); | |||
| 1233 | EXPORT_SYMBOL(hpsb_packet_sent); | 1234 | EXPORT_SYMBOL(hpsb_packet_sent); |
| 1234 | EXPORT_SYMBOL(hpsb_packet_received); | 1235 | EXPORT_SYMBOL(hpsb_packet_received); |
| 1235 | EXPORT_SYMBOL_GPL(hpsb_disable_irm); | 1236 | EXPORT_SYMBOL_GPL(hpsb_disable_irm); |
| 1237 | #ifdef CONFIG_IEEE1394_EXPORT_FULL_API | ||
| 1238 | EXPORT_SYMBOL(hpsb_send_phy_config); | ||
| 1239 | EXPORT_SYMBOL(hpsb_send_packet_and_wait); | ||
| 1240 | #endif | ||
| 1236 | 1241 | ||
| 1237 | /** ieee1394_transactions.c **/ | 1242 | /** ieee1394_transactions.c **/ |
| 1238 | EXPORT_SYMBOL(hpsb_get_tlabel); | 1243 | EXPORT_SYMBOL(hpsb_get_tlabel); |
| @@ -1262,9 +1267,11 @@ EXPORT_SYMBOL(hpsb_destroy_hostinfo); | |||
| 1262 | EXPORT_SYMBOL(hpsb_set_hostinfo_key); | 1267 | EXPORT_SYMBOL(hpsb_set_hostinfo_key); |
| 1263 | EXPORT_SYMBOL(hpsb_get_hostinfo_bykey); | 1268 | EXPORT_SYMBOL(hpsb_get_hostinfo_bykey); |
| 1264 | EXPORT_SYMBOL(hpsb_set_hostinfo); | 1269 | EXPORT_SYMBOL(hpsb_set_hostinfo); |
| 1270 | EXPORT_SYMBOL(highlevel_host_reset); | ||
| 1271 | #ifdef CONFIG_IEEE1394_EXPORT_FULL_API | ||
| 1265 | EXPORT_SYMBOL(highlevel_add_host); | 1272 | EXPORT_SYMBOL(highlevel_add_host); |
| 1266 | EXPORT_SYMBOL(highlevel_remove_host); | 1273 | EXPORT_SYMBOL(highlevel_remove_host); |
| 1267 | EXPORT_SYMBOL(highlevel_host_reset); | 1274 | #endif |
| 1268 | 1275 | ||
| 1269 | /** nodemgr.c **/ | 1276 | /** nodemgr.c **/ |
| 1270 | EXPORT_SYMBOL(hpsb_node_fill_packet); | 1277 | EXPORT_SYMBOL(hpsb_node_fill_packet); |
| @@ -1272,7 +1279,9 @@ EXPORT_SYMBOL(hpsb_node_write); | |||
| 1272 | EXPORT_SYMBOL(hpsb_register_protocol); | 1279 | EXPORT_SYMBOL(hpsb_register_protocol); |
| 1273 | EXPORT_SYMBOL(hpsb_unregister_protocol); | 1280 | EXPORT_SYMBOL(hpsb_unregister_protocol); |
| 1274 | EXPORT_SYMBOL(ieee1394_bus_type); | 1281 | EXPORT_SYMBOL(ieee1394_bus_type); |
| 1282 | #ifdef CONFIG_IEEE1394_EXPORT_FULL_API | ||
| 1275 | EXPORT_SYMBOL(nodemgr_for_each_host); | 1283 | EXPORT_SYMBOL(nodemgr_for_each_host); |
| 1284 | #endif | ||
| 1276 | 1285 | ||
| 1277 | /** csr.c **/ | 1286 | /** csr.c **/ |
| 1278 | EXPORT_SYMBOL(hpsb_update_config_rom); | 1287 | EXPORT_SYMBOL(hpsb_update_config_rom); |
| @@ -1309,19 +1318,21 @@ EXPORT_SYMBOL(hpsb_iso_wake); | |||
| 1309 | EXPORT_SYMBOL(hpsb_iso_recv_flush); | 1318 | EXPORT_SYMBOL(hpsb_iso_recv_flush); |
| 1310 | 1319 | ||
| 1311 | /** csr1212.c **/ | 1320 | /** csr1212.c **/ |
| 1312 | EXPORT_SYMBOL(csr1212_create_csr); | ||
| 1313 | EXPORT_SYMBOL(csr1212_init_local_csr); | ||
| 1314 | EXPORT_SYMBOL(csr1212_new_immediate); | ||
| 1315 | EXPORT_SYMBOL(csr1212_new_directory); | 1321 | EXPORT_SYMBOL(csr1212_new_directory); |
| 1316 | EXPORT_SYMBOL(csr1212_associate_keyval); | ||
| 1317 | EXPORT_SYMBOL(csr1212_attach_keyval_to_directory); | 1322 | EXPORT_SYMBOL(csr1212_attach_keyval_to_directory); |
| 1318 | EXPORT_SYMBOL(csr1212_new_string_descriptor_leaf); | ||
| 1319 | EXPORT_SYMBOL(csr1212_detach_keyval_from_directory); | 1323 | EXPORT_SYMBOL(csr1212_detach_keyval_from_directory); |
| 1320 | EXPORT_SYMBOL(csr1212_release_keyval); | 1324 | EXPORT_SYMBOL(csr1212_release_keyval); |
| 1321 | EXPORT_SYMBOL(csr1212_destroy_csr); | ||
| 1322 | EXPORT_SYMBOL(csr1212_read); | 1325 | EXPORT_SYMBOL(csr1212_read); |
| 1323 | EXPORT_SYMBOL(csr1212_generate_csr_image); | ||
| 1324 | EXPORT_SYMBOL(csr1212_parse_keyval); | 1326 | EXPORT_SYMBOL(csr1212_parse_keyval); |
| 1325 | EXPORT_SYMBOL(csr1212_parse_csr); | ||
| 1326 | EXPORT_SYMBOL(_csr1212_read_keyval); | 1327 | EXPORT_SYMBOL(_csr1212_read_keyval); |
| 1327 | EXPORT_SYMBOL(_csr1212_destroy_keyval); | 1328 | EXPORT_SYMBOL(_csr1212_destroy_keyval); |
| 1329 | #ifdef CONFIG_IEEE1394_EXPORT_FULL_API | ||
| 1330 | EXPORT_SYMBOL(csr1212_create_csr); | ||
| 1331 | EXPORT_SYMBOL(csr1212_init_local_csr); | ||
| 1332 | EXPORT_SYMBOL(csr1212_new_immediate); | ||
| 1333 | EXPORT_SYMBOL(csr1212_associate_keyval); | ||
| 1334 | EXPORT_SYMBOL(csr1212_new_string_descriptor_leaf); | ||
| 1335 | EXPORT_SYMBOL(csr1212_destroy_csr); | ||
| 1336 | EXPORT_SYMBOL(csr1212_generate_csr_image); | ||
| 1337 | EXPORT_SYMBOL(csr1212_parse_csr); | ||
| 1338 | #endif | ||
diff --git a/drivers/ieee1394/iso.c b/drivers/ieee1394/iso.c index f05759107f7e..615541b8b90f 100644 --- a/drivers/ieee1394/iso.c +++ b/drivers/ieee1394/iso.c | |||
| @@ -62,10 +62,10 @@ static struct hpsb_iso* hpsb_iso_common_init(struct hpsb_host *host, enum hpsb_i | |||
| 62 | if ((dma_mode < HPSB_ISO_DMA_DEFAULT) || (dma_mode > HPSB_ISO_DMA_PACKET_PER_BUFFER)) | 62 | if ((dma_mode < HPSB_ISO_DMA_DEFAULT) || (dma_mode > HPSB_ISO_DMA_PACKET_PER_BUFFER)) |
| 63 | dma_mode=HPSB_ISO_DMA_DEFAULT; | 63 | dma_mode=HPSB_ISO_DMA_DEFAULT; |
| 64 | 64 | ||
| 65 | if ((irq_interval < 0) || (irq_interval > buf_packets / 4)) | ||
| 66 | irq_interval = buf_packets / 4; | ||
| 65 | if (irq_interval == 0) /* really interrupt for each packet*/ | 67 | if (irq_interval == 0) /* really interrupt for each packet*/ |
| 66 | irq_interval = 1; | 68 | irq_interval = 1; |
| 67 | else if ((irq_interval < 0) || (irq_interval > buf_packets / 4)) | ||
| 68 | irq_interval = buf_packets / 4; | ||
| 69 | 69 | ||
| 70 | if (channel < -1 || channel >= 64) | 70 | if (channel < -1 || channel >= 64) |
| 71 | return NULL; | 71 | return NULL; |
| @@ -106,6 +106,7 @@ static struct hpsb_iso* hpsb_iso_common_init(struct hpsb_host *host, enum hpsb_i | |||
| 106 | } | 106 | } |
| 107 | 107 | ||
| 108 | atomic_set(&iso->overflows, 0); | 108 | atomic_set(&iso->overflows, 0); |
| 109 | iso->bytes_discarded = 0; | ||
| 109 | iso->flags = 0; | 110 | iso->flags = 0; |
| 110 | iso->prebuffer = 0; | 111 | iso->prebuffer = 0; |
| 111 | 112 | ||
| @@ -241,12 +242,12 @@ int hpsb_iso_xmit_start(struct hpsb_iso *iso, int cycle, int prebuffer) | |||
| 241 | iso->xmit_cycle = cycle; | 242 | iso->xmit_cycle = cycle; |
| 242 | 243 | ||
| 243 | if (prebuffer < 0) | 244 | if (prebuffer < 0) |
| 244 | prebuffer = iso->buf_packets; | 245 | prebuffer = iso->buf_packets - 1; |
| 245 | else if (prebuffer == 0) | 246 | else if (prebuffer == 0) |
| 246 | prebuffer = 1; | 247 | prebuffer = 1; |
| 247 | 248 | ||
| 248 | if (prebuffer > iso->buf_packets) | 249 | if (prebuffer >= iso->buf_packets) |
| 249 | prebuffer = iso->buf_packets; | 250 | prebuffer = iso->buf_packets - 1; |
| 250 | 251 | ||
| 251 | iso->prebuffer = prebuffer; | 252 | iso->prebuffer = prebuffer; |
| 252 | 253 | ||
| @@ -395,7 +396,7 @@ void hpsb_iso_packet_sent(struct hpsb_iso *iso, int cycle, int error) | |||
| 395 | } | 396 | } |
| 396 | 397 | ||
| 397 | void hpsb_iso_packet_received(struct hpsb_iso *iso, u32 offset, u16 len, | 398 | void hpsb_iso_packet_received(struct hpsb_iso *iso, u32 offset, u16 len, |
| 398 | u16 cycle, u8 channel, u8 tag, u8 sy) | 399 | u16 total_len, u16 cycle, u8 channel, u8 tag, u8 sy) |
| 399 | { | 400 | { |
| 400 | unsigned long flags; | 401 | unsigned long flags; |
| 401 | spin_lock_irqsave(&iso->lock, flags); | 402 | spin_lock_irqsave(&iso->lock, flags); |
| @@ -403,10 +404,13 @@ void hpsb_iso_packet_received(struct hpsb_iso *iso, u32 offset, u16 len, | |||
| 403 | if (iso->n_ready_packets == iso->buf_packets) { | 404 | if (iso->n_ready_packets == iso->buf_packets) { |
| 404 | /* overflow! */ | 405 | /* overflow! */ |
| 405 | atomic_inc(&iso->overflows); | 406 | atomic_inc(&iso->overflows); |
| 407 | /* Record size of this discarded packet */ | ||
| 408 | iso->bytes_discarded += total_len; | ||
| 406 | } else { | 409 | } else { |
| 407 | struct hpsb_iso_packet_info *info = &iso->infos[iso->pkt_dma]; | 410 | struct hpsb_iso_packet_info *info = &iso->infos[iso->pkt_dma]; |
| 408 | info->offset = offset; | 411 | info->offset = offset; |
| 409 | info->len = len; | 412 | info->len = len; |
| 413 | info->total_len = total_len; | ||
| 410 | info->cycle = cycle; | 414 | info->cycle = cycle; |
| 411 | info->channel = channel; | 415 | info->channel = channel; |
| 412 | info->tag = tag; | 416 | info->tag = tag; |
| @@ -437,6 +441,17 @@ int hpsb_iso_recv_release_packets(struct hpsb_iso *iso, unsigned int n_packets) | |||
| 437 | 441 | ||
| 438 | iso->first_packet = (iso->first_packet+1) % iso->buf_packets; | 442 | iso->first_packet = (iso->first_packet+1) % iso->buf_packets; |
| 439 | iso->n_ready_packets--; | 443 | iso->n_ready_packets--; |
| 444 | |||
| 445 | /* release memory from packets discarded when queue was full */ | ||
| 446 | if (iso->n_ready_packets == 0) { /* Release only after all prior packets handled */ | ||
| 447 | if (iso->bytes_discarded != 0) { | ||
| 448 | struct hpsb_iso_packet_info inf; | ||
| 449 | inf.total_len = iso->bytes_discarded; | ||
| 450 | iso->host->driver->isoctl(iso, RECV_RELEASE, | ||
| 451 | (unsigned long) &inf); | ||
| 452 | iso->bytes_discarded = 0; | ||
| 453 | } | ||
| 454 | } | ||
| 440 | } | 455 | } |
| 441 | spin_unlock_irqrestore(&iso->lock, flags); | 456 | spin_unlock_irqrestore(&iso->lock, flags); |
| 442 | return rv; | 457 | return rv; |
diff --git a/drivers/ieee1394/iso.h b/drivers/ieee1394/iso.h index fb654d9639a7..3efc60b33a88 100644 --- a/drivers/ieee1394/iso.h +++ b/drivers/ieee1394/iso.h | |||
| @@ -47,6 +47,14 @@ struct hpsb_iso_packet_info { | |||
| 47 | /* 2-bit 'tag' and 4-bit 'sy' fields of the isochronous header */ | 47 | /* 2-bit 'tag' and 4-bit 'sy' fields of the isochronous header */ |
| 48 | __u8 tag; | 48 | __u8 tag; |
| 49 | __u8 sy; | 49 | __u8 sy; |
| 50 | |||
| 51 | /* | ||
| 52 | * length in bytes of the packet including header/trailer. | ||
| 53 | * MUST be at structure end, since the first part of this structure is also | ||
| 54 | * defined in raw1394.h (i.e. struct raw1394_iso_packet_info), is copied to | ||
| 55 | * userspace and is accessed there through libraw1394. | ||
| 56 | */ | ||
| 57 | __u16 total_len; | ||
| 50 | }; | 58 | }; |
| 51 | 59 | ||
| 52 | enum hpsb_iso_type { HPSB_ISO_RECV = 0, HPSB_ISO_XMIT = 1 }; | 60 | enum hpsb_iso_type { HPSB_ISO_RECV = 0, HPSB_ISO_XMIT = 1 }; |
| @@ -111,6 +119,9 @@ struct hpsb_iso { | |||
| 111 | /* how many times the buffer has overflowed or underflowed */ | 119 | /* how many times the buffer has overflowed or underflowed */ |
| 112 | atomic_t overflows; | 120 | atomic_t overflows; |
| 113 | 121 | ||
| 122 | /* Current number of bytes lost in discarded packets */ | ||
| 123 | int bytes_discarded; | ||
| 124 | |||
| 114 | /* private flags to track initialization progress */ | 125 | /* private flags to track initialization progress */ |
| 115 | #define HPSB_ISO_DRIVER_INIT (1<<0) | 126 | #define HPSB_ISO_DRIVER_INIT (1<<0) |
| 116 | #define HPSB_ISO_DRIVER_STARTED (1<<1) | 127 | #define HPSB_ISO_DRIVER_STARTED (1<<1) |
| @@ -193,7 +204,7 @@ void hpsb_iso_packet_sent(struct hpsb_iso *iso, int cycle, int error); | |||
| 193 | 204 | ||
| 194 | /* call after a packet has been received (interrupt context OK) */ | 205 | /* call after a packet has been received (interrupt context OK) */ |
| 195 | void hpsb_iso_packet_received(struct hpsb_iso *iso, u32 offset, u16 len, | 206 | void hpsb_iso_packet_received(struct hpsb_iso *iso, u32 offset, u16 len, |
| 196 | u16 cycle, u8 channel, u8 tag, u8 sy); | 207 | u16 total_len, u16 cycle, u8 channel, u8 tag, u8 sy); |
| 197 | 208 | ||
| 198 | /* call to wake waiting processes after buffer space has opened up. */ | 209 | /* call to wake waiting processes after buffer space has opened up. */ |
| 199 | void hpsb_iso_wake(struct hpsb_iso *iso); | 210 | void hpsb_iso_wake(struct hpsb_iso *iso); |
diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c index 9a46c3b44bf8..bebcc47ab06c 100644 --- a/drivers/ieee1394/nodemgr.c +++ b/drivers/ieee1394/nodemgr.c | |||
| @@ -30,7 +30,7 @@ | |||
| 30 | #include "csr.h" | 30 | #include "csr.h" |
| 31 | #include "nodemgr.h" | 31 | #include "nodemgr.h" |
| 32 | 32 | ||
| 33 | static int ignore_drivers = 0; | 33 | static int ignore_drivers; |
| 34 | module_param(ignore_drivers, int, 0444); | 34 | module_param(ignore_drivers, int, 0444); |
| 35 | MODULE_PARM_DESC(ignore_drivers, "Disable automatic probing for drivers."); | 35 | MODULE_PARM_DESC(ignore_drivers, "Disable automatic probing for drivers."); |
| 36 | 36 | ||
diff --git a/drivers/ieee1394/ohci1394.c b/drivers/ieee1394/ohci1394.c index b3d3d22fde64..a485f47bb21e 100644 --- a/drivers/ieee1394/ohci1394.c +++ b/drivers/ieee1394/ohci1394.c | |||
| @@ -162,7 +162,7 @@ printk(level "%s: " fmt "\n" , OHCI1394_DRIVER_NAME , ## args) | |||
| 162 | printk(level "%s: fw-host%d: " fmt "\n" , OHCI1394_DRIVER_NAME, ohci->host->id , ## args) | 162 | printk(level "%s: fw-host%d: " fmt "\n" , OHCI1394_DRIVER_NAME, ohci->host->id , ## args) |
| 163 | 163 | ||
| 164 | static char version[] __devinitdata = | 164 | static char version[] __devinitdata = |
| 165 | "$Rev: 1250 $ Ben Collins <bcollins@debian.org>"; | 165 | "$Rev: 1299 $ Ben Collins <bcollins@debian.org>"; |
| 166 | 166 | ||
| 167 | /* Module Parameters */ | 167 | /* Module Parameters */ |
| 168 | static int phys_dma = 1; | 168 | static int phys_dma = 1; |
| @@ -483,7 +483,9 @@ static void ohci_initialize(struct ti_ohci *ohci) | |||
| 483 | /* Put some defaults to these undefined bus options */ | 483 | /* Put some defaults to these undefined bus options */ |
| 484 | buf = reg_read(ohci, OHCI1394_BusOptions); | 484 | buf = reg_read(ohci, OHCI1394_BusOptions); |
| 485 | buf |= 0x60000000; /* Enable CMC and ISC */ | 485 | buf |= 0x60000000; /* Enable CMC and ISC */ |
| 486 | if (!hpsb_disable_irm) | 486 | if (hpsb_disable_irm) |
| 487 | buf &= ~0x80000000; | ||
| 488 | else | ||
| 487 | buf |= 0x80000000; /* Enable IRMC */ | 489 | buf |= 0x80000000; /* Enable IRMC */ |
| 488 | buf &= ~0x00ff0000; /* XXX: Set cyc_clk_acc to zero for now */ | 490 | buf &= ~0x00ff0000; /* XXX: Set cyc_clk_acc to zero for now */ |
| 489 | buf &= ~0x18000000; /* Disable PMC and BMC */ | 491 | buf &= ~0x18000000; /* Disable PMC and BMC */ |
| @@ -503,8 +505,12 @@ static void ohci_initialize(struct ti_ohci *ohci) | |||
| 503 | reg_write(ohci, OHCI1394_LinkControlSet, | 505 | reg_write(ohci, OHCI1394_LinkControlSet, |
| 504 | OHCI1394_LinkControl_CycleTimerEnable | | 506 | OHCI1394_LinkControl_CycleTimerEnable | |
| 505 | OHCI1394_LinkControl_CycleMaster); | 507 | OHCI1394_LinkControl_CycleMaster); |
| 506 | set_phy_reg_mask(ohci, 4, PHY_04_LCTRL | | 508 | i = get_phy_reg(ohci, 4) | PHY_04_LCTRL; |
| 507 | (hpsb_disable_irm ? 0 : PHY_04_CONTENDER)); | 509 | if (hpsb_disable_irm) |
| 510 | i &= ~PHY_04_CONTENDER; | ||
| 511 | else | ||
| 512 | i |= PHY_04_CONTENDER; | ||
| 513 | set_phy_reg(ohci, 4, i); | ||
| 508 | 514 | ||
| 509 | /* Set up self-id dma buffer */ | 515 | /* Set up self-id dma buffer */ |
| 510 | reg_write(ohci, OHCI1394_SelfIDBuffer, ohci->selfid_buf_bus); | 516 | reg_write(ohci, OHCI1394_SelfIDBuffer, ohci->selfid_buf_bus); |
| @@ -1566,6 +1572,10 @@ static void ohci_iso_recv_release_block(struct ohci_iso_recv *recv, int block) | |||
| 1566 | 1572 | ||
| 1567 | struct dma_cmd *next = &recv->block[next_i]; | 1573 | struct dma_cmd *next = &recv->block[next_i]; |
| 1568 | struct dma_cmd *prev = &recv->block[prev_i]; | 1574 | struct dma_cmd *prev = &recv->block[prev_i]; |
| 1575 | |||
| 1576 | /* ignore out-of-range requests */ | ||
| 1577 | if ((block < 0) || (block > recv->nblocks)) | ||
| 1578 | return; | ||
| 1569 | 1579 | ||
| 1570 | /* 'next' becomes the new end of the DMA chain, | 1580 | /* 'next' becomes the new end of the DMA chain, |
| 1571 | so disable branch and enable interrupt */ | 1581 | so disable branch and enable interrupt */ |
| @@ -1593,19 +1603,8 @@ static void ohci_iso_recv_release_block(struct ohci_iso_recv *recv, int block) | |||
| 1593 | static void ohci_iso_recv_bufferfill_release(struct ohci_iso_recv *recv, | 1603 | static void ohci_iso_recv_bufferfill_release(struct ohci_iso_recv *recv, |
| 1594 | struct hpsb_iso_packet_info *info) | 1604 | struct hpsb_iso_packet_info *info) |
| 1595 | { | 1605 | { |
| 1596 | int len; | ||
| 1597 | |||
| 1598 | /* release the memory where the packet was */ | 1606 | /* release the memory where the packet was */ |
| 1599 | len = info->len; | 1607 | recv->released_bytes += info->total_len; |
| 1600 | |||
| 1601 | /* add the wasted space for padding to 4 bytes */ | ||
| 1602 | if (len % 4) | ||
| 1603 | len += 4 - (len % 4); | ||
| 1604 | |||
| 1605 | /* add 8 bytes for the OHCI DMA data format overhead */ | ||
| 1606 | len += 8; | ||
| 1607 | |||
| 1608 | recv->released_bytes += len; | ||
| 1609 | 1608 | ||
| 1610 | /* have we released enough memory for one block? */ | 1609 | /* have we released enough memory for one block? */ |
| 1611 | while (recv->released_bytes > recv->buf_stride) { | 1610 | while (recv->released_bytes > recv->buf_stride) { |
| @@ -1637,7 +1636,7 @@ static void ohci_iso_recv_bufferfill_parse(struct hpsb_iso *iso, struct ohci_iso | |||
| 1637 | /* note: packet layout is as shown in section 10.6.1.1 of the OHCI spec */ | 1636 | /* note: packet layout is as shown in section 10.6.1.1 of the OHCI spec */ |
| 1638 | 1637 | ||
| 1639 | unsigned int offset; | 1638 | unsigned int offset; |
| 1640 | unsigned short len, cycle; | 1639 | unsigned short len, cycle, total_len; |
| 1641 | unsigned char channel, tag, sy; | 1640 | unsigned char channel, tag, sy; |
| 1642 | 1641 | ||
| 1643 | unsigned char *p = iso->data_buf.kvirt; | 1642 | unsigned char *p = iso->data_buf.kvirt; |
| @@ -1688,9 +1687,11 @@ static void ohci_iso_recv_bufferfill_parse(struct hpsb_iso *iso, struct ohci_iso | |||
| 1688 | /* advance to xferStatus/timeStamp */ | 1687 | /* advance to xferStatus/timeStamp */ |
| 1689 | recv->dma_offset += len; | 1688 | recv->dma_offset += len; |
| 1690 | 1689 | ||
| 1690 | total_len = len + 8; /* 8 bytes header+trailer in OHCI packet */ | ||
| 1691 | /* payload is padded to 4 bytes */ | 1691 | /* payload is padded to 4 bytes */ |
| 1692 | if (len % 4) { | 1692 | if (len % 4) { |
| 1693 | recv->dma_offset += 4 - (len%4); | 1693 | recv->dma_offset += 4 - (len%4); |
| 1694 | total_len += 4 - (len%4); | ||
| 1694 | } | 1695 | } |
| 1695 | 1696 | ||
| 1696 | /* check for wrap-around */ | 1697 | /* check for wrap-around */ |
| @@ -1724,7 +1725,7 @@ static void ohci_iso_recv_bufferfill_parse(struct hpsb_iso *iso, struct ohci_iso | |||
| 1724 | recv->dma_offset -= recv->buf_stride*recv->nblocks; | 1725 | recv->dma_offset -= recv->buf_stride*recv->nblocks; |
| 1725 | } | 1726 | } |
| 1726 | 1727 | ||
| 1727 | hpsb_iso_packet_received(iso, offset, len, cycle, channel, tag, sy); | 1728 | hpsb_iso_packet_received(iso, offset, len, total_len, cycle, channel, tag, sy); |
| 1728 | } | 1729 | } |
| 1729 | 1730 | ||
| 1730 | if (wake) | 1731 | if (wake) |
| @@ -1850,7 +1851,8 @@ static void ohci_iso_recv_packetperbuf_task(struct hpsb_iso *iso, struct ohci_is | |||
| 1850 | tag = hdr[5] >> 6; | 1851 | tag = hdr[5] >> 6; |
| 1851 | sy = hdr[4] & 0xF; | 1852 | sy = hdr[4] & 0xF; |
| 1852 | 1853 | ||
| 1853 | hpsb_iso_packet_received(iso, offset, packet_len, cycle, channel, tag, sy); | 1854 | hpsb_iso_packet_received(iso, offset, packet_len, |
| 1855 | recv->buf_stride, cycle, channel, tag, sy); | ||
| 1854 | } | 1856 | } |
| 1855 | 1857 | ||
| 1856 | /* reset the DMA descriptor */ | 1858 | /* reset the DMA descriptor */ |
diff --git a/drivers/ieee1394/pcilynx.c b/drivers/ieee1394/pcilynx.c index bdb3a85cafa6..36074e6eeebb 100644 --- a/drivers/ieee1394/pcilynx.c +++ b/drivers/ieee1394/pcilynx.c | |||
| @@ -76,7 +76,7 @@ | |||
| 76 | 76 | ||
| 77 | 77 | ||
| 78 | /* Module Parameters */ | 78 | /* Module Parameters */ |
| 79 | static int skip_eeprom = 0; | 79 | static int skip_eeprom; |
| 80 | module_param(skip_eeprom, int, 0444); | 80 | module_param(skip_eeprom, int, 0444); |
| 81 | MODULE_PARM_DESC(skip_eeprom, "Use generic bus info block instead of serial eeprom (default = 0)."); | 81 | MODULE_PARM_DESC(skip_eeprom, "Use generic bus info block instead of serial eeprom (default = 0)."); |
| 82 | 82 | ||
| @@ -1422,7 +1422,7 @@ static int __devinit add_card(struct pci_dev *dev, | |||
| 1422 | i = get_phy_reg(lynx, 4); | 1422 | i = get_phy_reg(lynx, 4); |
| 1423 | i |= PHY_04_LCTRL; | 1423 | i |= PHY_04_LCTRL; |
| 1424 | if (hpsb_disable_irm) | 1424 | if (hpsb_disable_irm) |
| 1425 | i &= !PHY_04_CONTENDER; | 1425 | i &= ~PHY_04_CONTENDER; |
| 1426 | else | 1426 | else |
| 1427 | i |= PHY_04_CONTENDER; | 1427 | i |= PHY_04_CONTENDER; |
| 1428 | if (i != -1) set_phy_reg(lynx, 4, i); | 1428 | if (i != -1) set_phy_reg(lynx, 4, i); |
diff --git a/drivers/ieee1394/raw1394.c b/drivers/ieee1394/raw1394.c index 7419af450bd1..b4fa14793fe5 100644 --- a/drivers/ieee1394/raw1394.c +++ b/drivers/ieee1394/raw1394.c | |||
| @@ -98,7 +98,7 @@ static struct hpsb_address_ops arm_ops = { | |||
| 98 | 98 | ||
| 99 | static void queue_complete_cb(struct pending_request *req); | 99 | static void queue_complete_cb(struct pending_request *req); |
| 100 | 100 | ||
| 101 | static struct pending_request *__alloc_pending_request(int flags) | 101 | static struct pending_request *__alloc_pending_request(unsigned int __nocast flags) |
| 102 | { | 102 | { |
| 103 | struct pending_request *req; | 103 | struct pending_request *req; |
| 104 | 104 | ||
| @@ -2506,9 +2506,12 @@ static int raw1394_iso_send_packets(struct file_info *fi, void __user * uaddr) | |||
| 2506 | if (copy_from_user(&upackets, uaddr, sizeof(upackets))) | 2506 | if (copy_from_user(&upackets, uaddr, sizeof(upackets))) |
| 2507 | return -EFAULT; | 2507 | return -EFAULT; |
| 2508 | 2508 | ||
| 2509 | if (upackets.n_packets > hpsb_iso_n_ready(fi->iso_handle)) | 2509 | if (upackets.n_packets >= fi->iso_handle->buf_packets) |
| 2510 | return -EINVAL; | 2510 | return -EINVAL; |
| 2511 | 2511 | ||
| 2512 | if (upackets.n_packets >= hpsb_iso_n_ready(fi->iso_handle)) | ||
| 2513 | return -EAGAIN; | ||
| 2514 | |||
| 2512 | /* ensure user-supplied buffer is accessible and big enough */ | 2515 | /* ensure user-supplied buffer is accessible and big enough */ |
| 2513 | if (!access_ok(VERIFY_READ, upackets.infos, | 2516 | if (!access_ok(VERIFY_READ, upackets.infos, |
| 2514 | upackets.n_packets * | 2517 | upackets.n_packets * |
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c index 32368f3428ec..fe3e1703fa61 100644 --- a/drivers/ieee1394/sbp2.c +++ b/drivers/ieee1394/sbp2.c | |||
| @@ -81,7 +81,7 @@ | |||
| 81 | #include "sbp2.h" | 81 | #include "sbp2.h" |
| 82 | 82 | ||
| 83 | static char version[] __devinitdata = | 83 | static char version[] __devinitdata = |
| 84 | "$Rev: 1219 $ Ben Collins <bcollins@debian.org>"; | 84 | "$Rev: 1306 $ Ben Collins <bcollins@debian.org>"; |
| 85 | 85 | ||
| 86 | /* | 86 | /* |
| 87 | * Module load parameter definitions | 87 | * Module load parameter definitions |
| @@ -104,7 +104,7 @@ MODULE_PARM_DESC(max_speed, "Force max speed (3 = 800mb, 2 = 400mb default, 1 = | |||
| 104 | * down to us at a time (debugging). This might be necessary for very | 104 | * down to us at a time (debugging). This might be necessary for very |
| 105 | * badly behaved sbp2 devices. | 105 | * badly behaved sbp2 devices. |
| 106 | */ | 106 | */ |
| 107 | static int serialize_io = 0; | 107 | static int serialize_io; |
| 108 | module_param(serialize_io, int, 0444); | 108 | module_param(serialize_io, int, 0444); |
| 109 | MODULE_PARM_DESC(serialize_io, "Serialize all I/O coming down from the scsi drivers (default = 0)"); | 109 | MODULE_PARM_DESC(serialize_io, "Serialize all I/O coming down from the scsi drivers (default = 0)"); |
| 110 | 110 | ||
| @@ -145,7 +145,7 @@ MODULE_PARM_DESC(exclusive_login, "Exclusive login to sbp2 device (default = 1)" | |||
| 145 | * please submit the logged sbp2_firmware_revision value of this device to | 145 | * please submit the logged sbp2_firmware_revision value of this device to |
| 146 | * the linux1394-devel mailing list. | 146 | * the linux1394-devel mailing list. |
| 147 | */ | 147 | */ |
| 148 | static int force_inquiry_hack = 0; | 148 | static int force_inquiry_hack; |
| 149 | module_param(force_inquiry_hack, int, 0444); | 149 | module_param(force_inquiry_hack, int, 0444); |
| 150 | MODULE_PARM_DESC(force_inquiry_hack, "Force SCSI inquiry hack (default = 0)"); | 150 | MODULE_PARM_DESC(force_inquiry_hack, "Force SCSI inquiry hack (default = 0)"); |
| 151 | 151 | ||
| @@ -2112,6 +2112,102 @@ static int sbp2_send_command(struct scsi_id_instance_data *scsi_id, | |||
| 2112 | */ | 2112 | */ |
| 2113 | static void sbp2_check_sbp2_command(struct scsi_id_instance_data *scsi_id, unchar *cmd) | 2113 | static void sbp2_check_sbp2_command(struct scsi_id_instance_data *scsi_id, unchar *cmd) |
| 2114 | { | 2114 | { |
| 2115 | unchar new_cmd[16]; | ||
| 2116 | u8 device_type = SBP2_DEVICE_TYPE (scsi_id->sbp2_device_type_and_lun); | ||
| 2117 | |||
| 2118 | SBP2_DEBUG("sbp2_check_sbp2_command"); | ||
| 2119 | |||
| 2120 | switch (*cmd) { | ||
| 2121 | |||
| 2122 | case READ_6: | ||
| 2123 | |||
| 2124 | if (sbp2_command_conversion_device_type(device_type)) { | ||
| 2125 | |||
| 2126 | SBP2_DEBUG("Convert READ_6 to READ_10"); | ||
| 2127 | |||
| 2128 | /* | ||
| 2129 | * Need to turn read_6 into read_10 | ||
| 2130 | */ | ||
| 2131 | new_cmd[0] = 0x28; | ||
| 2132 | new_cmd[1] = (cmd[1] & 0xe0); | ||
| 2133 | new_cmd[2] = 0x0; | ||
| 2134 | new_cmd[3] = (cmd[1] & 0x1f); | ||
| 2135 | new_cmd[4] = cmd[2]; | ||
| 2136 | new_cmd[5] = cmd[3]; | ||
| 2137 | new_cmd[6] = 0x0; | ||
| 2138 | new_cmd[7] = 0x0; | ||
| 2139 | new_cmd[8] = cmd[4]; | ||
| 2140 | new_cmd[9] = cmd[5]; | ||
| 2141 | |||
| 2142 | memcpy(cmd, new_cmd, 10); | ||
| 2143 | |||
| 2144 | } | ||
| 2145 | |||
| 2146 | break; | ||
| 2147 | |||
| 2148 | case WRITE_6: | ||
| 2149 | |||
| 2150 | if (sbp2_command_conversion_device_type(device_type)) { | ||
| 2151 | |||
| 2152 | SBP2_DEBUG("Convert WRITE_6 to WRITE_10"); | ||
| 2153 | |||
| 2154 | /* | ||
| 2155 | * Need to turn write_6 into write_10 | ||
| 2156 | */ | ||
| 2157 | new_cmd[0] = 0x2a; | ||
| 2158 | new_cmd[1] = (cmd[1] & 0xe0); | ||
| 2159 | new_cmd[2] = 0x0; | ||
| 2160 | new_cmd[3] = (cmd[1] & 0x1f); | ||
| 2161 | new_cmd[4] = cmd[2]; | ||
| 2162 | new_cmd[5] = cmd[3]; | ||
| 2163 | new_cmd[6] = 0x0; | ||
| 2164 | new_cmd[7] = 0x0; | ||
| 2165 | new_cmd[8] = cmd[4]; | ||
| 2166 | new_cmd[9] = cmd[5]; | ||
| 2167 | |||
| 2168 | memcpy(cmd, new_cmd, 10); | ||
| 2169 | |||
| 2170 | } | ||
| 2171 | |||
| 2172 | break; | ||
| 2173 | |||
| 2174 | case MODE_SENSE: | ||
| 2175 | |||
| 2176 | if (sbp2_command_conversion_device_type(device_type)) { | ||
| 2177 | |||
| 2178 | SBP2_DEBUG("Convert MODE_SENSE_6 to MODE_SENSE_10"); | ||
| 2179 | |||
| 2180 | /* | ||
| 2181 | * Need to turn mode_sense_6 into mode_sense_10 | ||
| 2182 | */ | ||
| 2183 | new_cmd[0] = 0x5a; | ||
| 2184 | new_cmd[1] = cmd[1]; | ||
| 2185 | new_cmd[2] = cmd[2]; | ||
| 2186 | new_cmd[3] = 0x0; | ||
| 2187 | new_cmd[4] = 0x0; | ||
| 2188 | new_cmd[5] = 0x0; | ||
| 2189 | new_cmd[6] = 0x0; | ||
| 2190 | new_cmd[7] = 0x0; | ||
| 2191 | new_cmd[8] = cmd[4]; | ||
| 2192 | new_cmd[9] = cmd[5]; | ||
| 2193 | |||
| 2194 | memcpy(cmd, new_cmd, 10); | ||
| 2195 | |||
| 2196 | } | ||
| 2197 | |||
| 2198 | break; | ||
| 2199 | |||
| 2200 | case MODE_SELECT: | ||
| 2201 | |||
| 2202 | /* | ||
| 2203 | * TODO. Probably need to change mode select to 10 byte version | ||
| 2204 | */ | ||
| 2205 | |||
| 2206 | default: | ||
| 2207 | break; | ||
| 2208 | } | ||
| 2209 | |||
| 2210 | return; | ||
| 2115 | } | 2211 | } |
| 2116 | 2212 | ||
| 2117 | /* | 2213 | /* |
| @@ -2152,6 +2248,7 @@ static void sbp2_check_sbp2_response(struct scsi_id_instance_data *scsi_id, | |||
| 2152 | struct scsi_cmnd *SCpnt) | 2248 | struct scsi_cmnd *SCpnt) |
| 2153 | { | 2249 | { |
| 2154 | u8 *scsi_buf = SCpnt->request_buffer; | 2250 | u8 *scsi_buf = SCpnt->request_buffer; |
| 2251 | u8 device_type = SBP2_DEVICE_TYPE (scsi_id->sbp2_device_type_and_lun); | ||
| 2155 | 2252 | ||
| 2156 | SBP2_DEBUG("sbp2_check_sbp2_response"); | 2253 | SBP2_DEBUG("sbp2_check_sbp2_response"); |
| 2157 | 2254 | ||
| @@ -2176,6 +2273,14 @@ static void sbp2_check_sbp2_response(struct scsi_id_instance_data *scsi_id, | |||
| 2176 | } | 2273 | } |
| 2177 | 2274 | ||
| 2178 | /* | 2275 | /* |
| 2276 | * Check for Simple Direct Access Device and change it to TYPE_DISK | ||
| 2277 | */ | ||
| 2278 | if ((scsi_buf[0] & 0x1f) == TYPE_RBC) { | ||
| 2279 | SBP2_DEBUG("Changing TYPE_RBC to TYPE_DISK"); | ||
| 2280 | scsi_buf[0] &= 0xe0; | ||
| 2281 | } | ||
| 2282 | |||
| 2283 | /* | ||
| 2179 | * Fix ansi revision and response data format | 2284 | * Fix ansi revision and response data format |
| 2180 | */ | 2285 | */ |
| 2181 | scsi_buf[2] |= 2; | 2286 | scsi_buf[2] |= 2; |
| @@ -2183,6 +2288,27 @@ static void sbp2_check_sbp2_response(struct scsi_id_instance_data *scsi_id, | |||
| 2183 | 2288 | ||
| 2184 | break; | 2289 | break; |
| 2185 | 2290 | ||
| 2291 | case MODE_SENSE: | ||
| 2292 | |||
| 2293 | if (sbp2_command_conversion_device_type(device_type)) { | ||
| 2294 | |||
| 2295 | SBP2_DEBUG("Modify mode sense response (10 byte version)"); | ||
| 2296 | |||
| 2297 | scsi_buf[0] = scsi_buf[1]; /* Mode data length */ | ||
| 2298 | scsi_buf[1] = scsi_buf[2]; /* Medium type */ | ||
| 2299 | scsi_buf[2] = scsi_buf[3]; /* Device specific parameter */ | ||
| 2300 | scsi_buf[3] = scsi_buf[7]; /* Block descriptor length */ | ||
| 2301 | memcpy(scsi_buf + 4, scsi_buf + 8, scsi_buf[0]); | ||
| 2302 | } | ||
| 2303 | |||
| 2304 | break; | ||
| 2305 | |||
| 2306 | case MODE_SELECT: | ||
| 2307 | |||
| 2308 | /* | ||
| 2309 | * TODO. Probably need to change mode select to 10 byte version | ||
| 2310 | */ | ||
| 2311 | |||
| 2186 | default: | 2312 | default: |
| 2187 | break; | 2313 | break; |
| 2188 | } | 2314 | } |
| @@ -2559,8 +2685,7 @@ static void sbp2scsi_complete_command(struct scsi_id_instance_data *scsi_id, | |||
| 2559 | static int sbp2scsi_slave_configure (struct scsi_device *sdev) | 2685 | static int sbp2scsi_slave_configure (struct scsi_device *sdev) |
| 2560 | { | 2686 | { |
| 2561 | blk_queue_dma_alignment(sdev->request_queue, (512 - 1)); | 2687 | blk_queue_dma_alignment(sdev->request_queue, (512 - 1)); |
| 2562 | sdev->use_10_for_rw = 1; | 2688 | |
| 2563 | sdev->use_10_for_ms = 1; | ||
| 2564 | return 0; | 2689 | return 0; |
| 2565 | } | 2690 | } |
| 2566 | 2691 | ||
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 | ||
| 117 | void ixp2000_map_io(void); | 117 | void ixp2000_map_io(void); |
| 118 | void ixp2000_uart_init(void); | ||
| 118 | void ixp2000_init_irq(void); | 119 | void ixp2000_init_irq(void); |
| 119 | void ixp2000_init_time(unsigned long); | 120 | void ixp2000_init_time(unsigned long); |
| 120 | unsigned long ixp2000_gettimeoffset(void); | 121 | unsigned 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 | ||
| 38 | struct omap_uart_config { | 39 | struct 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 | ||
| 86 | struct omap_gpio_switch_config { | 88 | struct 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 | ||
| 104 | struct omap_uart_config { | ||
| 105 | /* Bit field of UARTs present; bit 0 --> UART1 */ | ||
| 106 | unsigned int enabled_uarts; | ||
| 107 | }; | ||
| 102 | 108 | ||
| 103 | struct omap_board_config_entry { | 109 | struct 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 | ||
| 30 | struct sys_timer; | 30 | struct sys_timer; |
| 31 | 31 | ||
| 32 | extern void omap_map_io(void); | 32 | extern void omap_map_common_io(void); |
| 33 | extern struct sys_timer omap_timer; | 33 | extern struct sys_timer omap_timer; |
| 34 | extern void omap_serial_init(int ports[]); | 34 | extern 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); | |||
| 241 | extern dma_addr_t omap_get_dma_src_pos(int lch); | 241 | extern dma_addr_t omap_get_dma_src_pos(int lch); |
| 242 | extern dma_addr_t omap_get_dma_dst_pos(int lch); | 242 | extern dma_addr_t omap_get_dma_dst_pos(int lch); |
| 243 | extern void omap_clear_dma(int lch); | 243 | extern void omap_clear_dma(int lch); |
| 244 | extern 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 */ |
| 246 | extern int omap_dma_in_1510_mode(void); | 247 | extern 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__ |
| 242 | extern void omap_init_irq(void); | 245 | extern 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 | */ |
| 335 | static reg_cfg_set __initdata_or_module | 339 | static const reg_cfg_set __initdata_or_module |
| 336 | reg_cfg_table[] = { | 340 | reg_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) | |||
| 455 | MUX_CFG("J19_1610_ETM_D6", 5, 0, 1, 0, 20, 0, 0, 0, 1) | 459 | MUX_CFG("J19_1610_ETM_D6", 5, 0, 1, 0, 20, 0, 0, 0, 1) |
| 456 | MUX_CFG("J18_1610_ETM_D7", 5, 27, 1, 0, 19, 0, 0, 0, 1) | 460 | MUX_CFG("J18_1610_ETM_D7", 5, 27, 1, 0, 19, 0, 0, 0, 1) |
| 457 | 461 | ||
| 458 | /* OMAP-1610 GPIO */ | 462 | /* OMAP16XX GPIO */ |
| 459 | MUX_CFG("P20_1610_GPIO4", 6, 27, 0, 1, 7, 0, 1, 1, 1) | 463 | MUX_CFG("P20_1610_GPIO4", 6, 27, 0, 1, 7, 0, 1, 1, 1) |
| 460 | MUX_CFG("V9_1610_GPIO7", B, 12, 1, 2, 20, 0, 2, 1, 1) | 464 | MUX_CFG("V9_1610_GPIO7", B, 12, 1, 2, 20, 0, 2, 1, 1) |
| 461 | MUX_CFG("W8_1610_GPIO9", B, 21, 0, 2, 23, 0, 2, 1, 1) | 465 | MUX_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) | |||
| 465 | MUX_CFG("AA20_1610_GPIO_41", 9, 9, 7, 1, 31, 0, 1, 1, 1) | 469 | MUX_CFG("AA20_1610_GPIO_41", 9, 9, 7, 1, 31, 0, 1, 1, 1) |
| 466 | MUX_CFG("W19_1610_GPIO48", 8, 15, 7, 1, 23, 1, 1, 0, 1) | 470 | MUX_CFG("W19_1610_GPIO48", 8, 15, 7, 1, 23, 1, 1, 0, 1) |
| 467 | MUX_CFG("M7_1610_GPIO62", 10, 0, 0, 4, 24, 0, 4, 0, 1) | 471 | MUX_CFG("M7_1610_GPIO62", 10, 0, 0, 4, 24, 0, 4, 0, 1) |
| 472 | MUX_CFG("V14_16XX_GPIO37", 9, 18, 7, 2, 2, 0, 2, 2, 0) | ||
| 473 | MUX_CFG("R9_16XX_GPIO18", C, 18, 7, 3, 0, 0, 3, 0, 0) | ||
| 474 | MUX_CFG("L14_16XX_GPIO49", 6, 3, 7, 0, 31, 0, 0, 31, 0) | ||
| 468 | 475 | ||
| 469 | /* OMAP-1610 uWire */ | 476 | /* OMAP-1610 uWire */ |
| 470 | MUX_CFG("V19_1610_UWIRE_SCLK", 8, 6, 0, 1, 20, 0, 1, 1, 1) | 477 | MUX_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) | |||
| 503 | MUX_CFG("W9_USB2_TXEN", B, 9, 1, NA, 0, 0, NA, 0, 1) | 510 | MUX_CFG("W9_USB2_TXEN", B, 9, 1, NA, 0, 0, NA, 0, 1) |
| 504 | MUX_CFG("AA9_USB2_VP", B, 6, 1, NA, 0, 0, NA, 0, 1) | 511 | MUX_CFG("AA9_USB2_VP", B, 6, 1, NA, 0, 0, NA, 0, 1) |
| 505 | MUX_CFG("Y5_USB2_RCV", C, 21, 1, NA, 0, 0, NA, 0, 1) | 512 | MUX_CFG("Y5_USB2_RCV", C, 21, 1, NA, 0, 0, NA, 0, 1) |
| 506 | MUX_CFG("R8_USB2_VM", C, 18, 1, NA, 0, 0, NA, 0, 1) | 513 | MUX_CFG("R9_USB2_VM", C, 18, 1, NA, 0, 0, NA, 0, 1) |
| 507 | MUX_CFG("V6_USB2_TXD", C, 27, 2, NA, 0, 0, NA, 0, 1) | 514 | MUX_CFG("V6_USB2_TXD", C, 27, 2, NA, 0, 0, NA, 0, 1) |
| 508 | MUX_CFG("W5_USB2_SE0", C, 24, 2, NA, 0, 0, NA, 0, 1) | 515 | MUX_CFG("W5_USB2_SE0", C, 24, 2, NA, 0, 0, NA, 0, 1) |
| 509 | 516 | ||
| 510 | 517 | /* 16XX UART */ | |
| 511 | /* UART1 */ | ||
| 512 | MUX_CFG("R13_1610_UART1_TX", A, 12, 6, 2, 10, 0, 2, 10, 1) | 518 | MUX_CFG("R13_1610_UART1_TX", A, 12, 6, 2, 10, 0, 2, 10, 1) |
| 513 | MUX_CFG("V14_1610_UART1_RX", 9, 18, 0, 2, 2, 0, 2, 2, 1) | 519 | MUX_CFG("V14_16XX_UART1_RX", 9, 18, 0, 2, 2, 0, 2, 2, 1) |
| 514 | MUX_CFG("R14_1610_UART1_CTS", 9, 15, 0, 2, 1, 0, 2, 1, 1) | 520 | MUX_CFG("R14_1610_UART1_CTS", 9, 15, 0, 2, 1, 0, 2, 1, 1) |
| 515 | MUX_CFG("AA15_1610_UART1_RTS", 9, 12, 1, 2, 0, 0, 2, 0, 1) | 521 | MUX_CFG("AA15_1610_UART1_RTS", 9, 12, 1, 2, 0, 0, 2, 0, 1) |
| 522 | MUX_CFG("R9_16XX_UART2_RX", C, 18, 0, 3, 0, 0, 3, 0, 1) | ||
| 523 | MUX_CFG("L14_16XX_UART3_RX", 6, 3, 0, 0, 31, 0, 0, 31, 1) | ||
| 516 | 524 | ||
| 517 | /* I2C interface */ | 525 | /* I2C interface */ |
| 518 | MUX_CFG("I2C_SCL", 7, 24, 0, NA, 0, 0, NA, 0, 0) | 526 | MUX_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 | ||
| 10 | static inline void arch_idle(void) | 12 | static inline void arch_idle(void) |
| 11 | { | 13 | { |
| @@ -14,7 +16,24 @@ static inline void arch_idle(void) | |||
| 14 | 16 | ||
| 15 | static inline void arch_reset(char mode) | 17 | static 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 |
diff --git a/include/asm-xtensa/ipc.h b/include/asm-xtensa/ipc.h deleted file mode 100644 index a9eed4e21cb9..000000000000 --- a/include/asm-xtensa/ipc.h +++ /dev/null | |||
| @@ -1,16 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * include/asm-xtensa/ipc.h | ||
| 3 | * | ||
| 4 | * This file is subject to the terms and conditions of the GNU General | ||
| 5 | * Public License. See the file "COPYING" in the main directory of | ||
| 6 | * this archive for more details. | ||
| 7 | * | ||
| 8 | * Copyright (C) 2001 - 2005 Tensilica Inc. | ||
| 9 | */ | ||
| 10 | |||
| 11 | #ifndef _XTENSA_IPC_H | ||
| 12 | #define _XTENSA_IPC_H | ||
| 13 | |||
| 14 | #include <asm-generic/ipc.h> | ||
| 15 | |||
| 16 | #endif /* _XTENSA_IPC_H */ | ||
