aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/kernel-parameters.txt12
-rw-r--r--arch/sh/Kconfig19
-rw-r--r--arch/sh/Kconfig.debug2
-rw-r--r--arch/sh/Makefile5
-rw-r--r--arch/sh/boards/Kconfig11
-rw-r--r--arch/sh/boards/Makefile1
-rw-r--r--arch/sh/boards/board-ap325rxa.c138
-rw-r--r--arch/sh/boards/board-edosk7760.c193
-rw-r--r--arch/sh/boards/board-magicpanelr2.c13
-rw-r--r--arch/sh/boards/board-rsk7203.c11
-rw-r--r--arch/sh/boards/board-sh7785lcr.c2
-rw-r--r--arch/sh/boards/board-shmin.c2
-rw-r--r--arch/sh/boards/mach-edosk7705/io.c2
-rw-r--r--arch/sh/boards/mach-edosk7705/setup.c2
-rw-r--r--arch/sh/boards/mach-highlander/irq-r7780mp.c2
-rw-r--r--arch/sh/boards/mach-highlander/irq-r7780rp.c2
-rw-r--r--arch/sh/boards/mach-highlander/irq-r7785rp.c2
-rw-r--r--arch/sh/boards/mach-highlander/psw.c2
-rw-r--r--arch/sh/boards/mach-highlander/setup.c2
-rw-r--r--arch/sh/boards/mach-hp6xx/hp6xx_apm.c2
-rw-r--r--arch/sh/boards/mach-hp6xx/pm.c2
-rw-r--r--arch/sh/boards/mach-hp6xx/setup.c2
-rw-r--r--arch/sh/boards/mach-lboxre2/irq.c2
-rw-r--r--arch/sh/boards/mach-lboxre2/setup.c2
-rw-r--r--arch/sh/boards/mach-microdev/io.c2
-rw-r--r--arch/sh/boards/mach-microdev/irq.c2
-rw-r--r--arch/sh/boards/mach-microdev/setup.c2
-rw-r--r--arch/sh/boards/mach-migor/lcd_qvga.c10
-rw-r--r--arch/sh/boards/mach-migor/setup.c195
-rw-r--r--arch/sh/boards/mach-r2d/irq.c2
-rw-r--r--arch/sh/boards/mach-r2d/setup.c2
-rw-r--r--arch/sh/boards/mach-sdk7780/irq.c2
-rw-r--r--arch/sh/boards/mach-sdk7780/setup.c2
-rw-r--r--arch/sh/boards/mach-sh7763rdp/irq.c2
-rw-r--r--arch/sh/boards/mach-sh7763rdp/setup.c2
-rw-r--r--arch/sh/boards/mach-snapgear/setup.c2
-rw-r--r--arch/sh/boards/mach-systemh/io.c2
-rw-r--r--arch/sh/boards/mach-systemh/irq.c2
-rw-r--r--arch/sh/boards/mach-systemh/setup.c2
-rw-r--r--arch/sh/boards/mach-titan/io.c2
-rw-r--r--arch/sh/boards/mach-titan/setup.c2
-rw-r--r--arch/sh/boot/.gitignore3
-rw-r--r--arch/sh/boot/Makefile6
-rw-r--r--arch/sh/boot/compressed/Makefile_325
-rw-r--r--arch/sh/boot/compressed/misc_32.c2
-rw-r--r--arch/sh/configs/edosk7760_defconfig1050
-rw-r--r--arch/sh/configs/rts7751r2dplus_qemu_defconfig909
-rw-r--r--arch/sh/drivers/pci/ops-lboxre2.c2
-rw-r--r--arch/sh/drivers/pci/ops-r7780rp.c2
-rw-r--r--arch/sh/drivers/pci/ops-rts7751r2d.c2
-rw-r--r--arch/sh/drivers/pci/ops-sdk7780.c2
-rw-r--r--arch/sh/drivers/pci/ops-titan.c2
-rw-r--r--arch/sh/include/asm/bitops-llsc.h144
-rw-r--r--arch/sh/include/asm/bitops.h2
-rw-r--r--arch/sh/include/asm/clock.h1
-rw-r--r--arch/sh/include/asm/cmpxchg-llsc.h71
-rw-r--r--arch/sh/include/asm/elf.h14
-rw-r--r--arch/sh/include/asm/fpu.h19
-rw-r--r--arch/sh/include/asm/ftrace.h8
-rw-r--r--arch/sh/include/asm/gpio.h92
-rw-r--r--arch/sh/include/asm/hw_irq.h92
-rw-r--r--arch/sh/include/asm/io.h300
-rw-r--r--arch/sh/include/asm/io_generic.h7
-rw-r--r--arch/sh/include/asm/irq.h3
-rw-r--r--arch/sh/include/asm/kprobes.h58
-rw-r--r--arch/sh/include/asm/machvec.h7
-rw-r--r--arch/sh/include/asm/mmzone.h2
-rw-r--r--arch/sh/include/asm/page.h2
-rw-r--r--arch/sh/include/asm/pgtable.h1
-rw-r--r--arch/sh/include/asm/processor.h44
-rw-r--r--arch/sh/include/asm/processor_32.h22
-rw-r--r--arch/sh/include/asm/processor_64.h45
-rw-r--r--arch/sh/include/asm/ptrace.h11
-rw-r--r--arch/sh/include/asm/rtc.h1
-rw-r--r--arch/sh/include/asm/setup.h1
-rw-r--r--arch/sh/include/asm/sizes.h61
-rw-r--r--arch/sh/include/asm/smp.h26
-rw-r--r--arch/sh/include/asm/syscall.h10
-rw-r--r--arch/sh/include/asm/syscall_32.h110
-rw-r--r--arch/sh/include/asm/syscall_64.h6
-rw-r--r--arch/sh/include/asm/syscalls.h25
-rw-r--r--arch/sh/include/asm/syscalls_32.h56
-rw-r--r--arch/sh/include/asm/syscalls_64.h34
-rw-r--r--arch/sh/include/asm/system.h8
-rw-r--r--arch/sh/include/asm/system_32.h44
-rw-r--r--arch/sh/include/asm/thread_info.h32
-rw-r--r--arch/sh/include/asm/uaccess_64.h26
-rw-r--r--arch/sh/include/cpu-sh2a/cpu/sh7203.h143
-rw-r--r--arch/sh/include/cpu-sh3/cpu/sh7720.h174
-rw-r--r--arch/sh/include/cpu-sh4/cpu/sh7722.h210
-rw-r--r--arch/sh/include/cpu-sh4/cpu/sh7723.h254
-rw-r--r--arch/sh/include/mach-common/mach/edosk7705.h (renamed from arch/sh/include/asm/edosk7705.h)0
-rw-r--r--arch/sh/include/mach-common/mach/highlander.h (renamed from arch/sh/include/asm/r7780rp.h)0
-rw-r--r--arch/sh/include/mach-common/mach/hp6xx.h (renamed from arch/sh/include/asm/hp6xx.h)0
-rw-r--r--arch/sh/include/mach-common/mach/lboxre2.h (renamed from arch/sh/include/asm/lboxre2.h)0
-rw-r--r--arch/sh/include/mach-common/mach/magicpanelr2.h (renamed from arch/sh/include/asm/magicpanelr2.h)0
-rw-r--r--arch/sh/include/mach-common/mach/microdev.h (renamed from arch/sh/include/asm/microdev.h)0
-rw-r--r--arch/sh/include/mach-common/mach/migor.h (renamed from arch/sh/include/asm/migor.h)4
-rw-r--r--arch/sh/include/mach-common/mach/r2d.h (renamed from arch/sh/include/asm/rts7751r2d.h)0
-rw-r--r--arch/sh/include/mach-common/mach/sdk7780.h (renamed from arch/sh/include/asm/sdk7780.h)0
-rw-r--r--arch/sh/include/mach-common/mach/sh7763rdp.h (renamed from arch/sh/include/asm/sh7763rdp.h)0
-rw-r--r--arch/sh/include/mach-common/mach/sh7785lcr.h (renamed from arch/sh/include/asm/sh7785lcr.h)0
-rw-r--r--arch/sh/include/mach-common/mach/shmin.h (renamed from arch/sh/include/asm/shmin.h)0
-rw-r--r--arch/sh/include/mach-common/mach/snapgear.h (renamed from arch/sh/include/asm/snapgear.h)0
-rw-r--r--arch/sh/include/mach-common/mach/systemh7751.h (renamed from arch/sh/include/asm/systemh7751.h)0
-rw-r--r--arch/sh/include/mach-common/mach/titan.h (renamed from arch/sh/include/asm/titan.h)0
-rw-r--r--arch/sh/kernel/Makefile_323
-rw-r--r--arch/sh/kernel/Makefile_642
-rw-r--r--arch/sh/kernel/cpu/clock.c5
-rw-r--r--arch/sh/kernel/cpu/irq/Makefile2
-rw-r--r--arch/sh/kernel/cpu/irq/ipr.c4
-rw-r--r--arch/sh/kernel/cpu/sh2a/Makefile5
-rw-r--r--arch/sh/kernel/cpu/sh2a/pinmux-sh7203.c1599
-rw-r--r--arch/sh/kernel/cpu/sh3/Makefile4
-rw-r--r--arch/sh/kernel/cpu/sh3/pinmux-sh7720.c1242
-rw-r--r--arch/sh/kernel/cpu/sh4/fpu.c25
-rw-r--r--arch/sh/kernel/cpu/sh4/setup-sh7760.c5
-rw-r--r--arch/sh/kernel/cpu/sh4/softfloat.c29
-rw-r--r--arch/sh/kernel/cpu/sh4a/Makefile5
-rw-r--r--arch/sh/kernel/cpu/sh4a/pinmux-sh7722.c1783
-rw-r--r--arch/sh/kernel/cpu/sh4a/pinmux-sh7723.c1909
-rw-r--r--arch/sh/kernel/cpu/sh4a/smp-shx3.c67
-rw-r--r--arch/sh/kernel/cpu/sh5/Makefile5
-rw-r--r--arch/sh/kernel/cpu/sh5/clock-sh5.c79
-rw-r--r--arch/sh/kernel/dump_task.c32
-rw-r--r--arch/sh/kernel/entry-common.S44
-rw-r--r--arch/sh/kernel/gpio.c498
-rw-r--r--arch/sh/kernel/io.c12
-rw-r--r--arch/sh/kernel/io_generic.c67
-rw-r--r--arch/sh/kernel/kprobes.c584
-rw-r--r--arch/sh/kernel/machvec.c4
-rw-r--r--arch/sh/kernel/process_32.c36
-rw-r--r--arch/sh/kernel/process_64.c11
-rw-r--r--arch/sh/kernel/ptrace_32.c298
-rw-r--r--arch/sh/kernel/ptrace_64.c1
-rw-r--r--arch/sh/kernel/setup.c65
-rw-r--r--arch/sh/kernel/sh_ksyms_32.c4
-rw-r--r--arch/sh/kernel/signal_32.c69
-rw-r--r--arch/sh/kernel/signal_64.c26
-rw-r--r--arch/sh/kernel/smp.c43
-rw-r--r--arch/sh/kernel/stacktrace.c23
-rw-r--r--arch/sh/kernel/sys_sh.c9
-rw-r--r--arch/sh/kernel/sys_sh32.c5
-rw-r--r--arch/sh/kernel/time_32.c11
-rw-r--r--arch/sh/kernel/time_64.c168
-rw-r--r--arch/sh/kernel/timers/Makefile1
-rw-r--r--arch/sh/kernel/timers/timer-broadcast.c57
-rw-r--r--arch/sh/kernel/timers/timer-cmt.c2
-rw-r--r--arch/sh/kernel/timers/timer-tmu.c177
-rw-r--r--arch/sh/kernel/traps_32.c95
-rw-r--r--arch/sh/lib/div64-generic.c1
-rw-r--r--arch/sh/lib/io.c8
-rw-r--r--arch/sh/mm/Kconfig6
-rw-r--r--arch/sh/mm/cache-debugfs.c6
-rw-r--r--arch/sh/mm/cache-sh4.c2
-rw-r--r--arch/sh/mm/consistent.c12
-rw-r--r--arch/sh/mm/fault_32.c63
-rw-r--r--arch/sh/mm/init.c74
-rw-r--r--arch/sh/mm/pg-nommu.c1
-rw-r--r--arch/sh/mm/pmb.c2
-rw-r--r--arch/sh/mm/tlb-nommu.c1
-rw-r--r--arch/sh/tools/mach-types1
-rw-r--r--drivers/input/touchscreen/hp680_ts_input.c2
-rw-r--r--drivers/leds/leds-hp6xx.c2
-rw-r--r--drivers/net/sh_eth.c5
-rw-r--r--drivers/rtc/rtc-ds1302.c2
-rw-r--r--drivers/rtc/rtc-sh.c21
-rw-r--r--drivers/serial/sh-sci.c90
-rw-r--r--drivers/serial/sh-sci.h23
-rw-r--r--drivers/sh/Makefile2
-rw-r--r--drivers/sh/intc.c (renamed from arch/sh/kernel/cpu/irq/intc.c)35
-rw-r--r--drivers/video/backlight/hp680_bl.c2
-rw-r--r--drivers/video/sh_mobile_lcdcfb.c14
-rw-r--r--include/linux/sh_intc.h91
-rw-r--r--include/video/sh_mobile_lcdc.h (renamed from arch/sh/include/asm/sh_mobile_lcdc.h)8
-rw-r--r--sound/oss/sh_dac_audio.c2
176 files changed, 13195 insertions, 1219 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index b49fcee5e9c..0f1544f6740 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -796,6 +796,8 @@ and is between 256 and 4096 characters. It is defined in the file
796 Defaults to the default architecture's huge page size 796 Defaults to the default architecture's huge page size
797 if not specified. 797 if not specified.
798 798
799 hlt [BUGS=ARM,SH]
800
799 i8042.debug [HW] Toggle i8042 debug mode 801 i8042.debug [HW] Toggle i8042 debug mode
800 i8042.direct [HW] Put keyboard port into non-translated mode 802 i8042.direct [HW] Put keyboard port into non-translated mode
801 i8042.dumbkbd [HW] Pretend that controller can only read data from 803 i8042.dumbkbd [HW] Pretend that controller can only read data from
@@ -1211,6 +1213,10 @@ and is between 256 and 4096 characters. It is defined in the file
1211 mem=nopentium [BUGS=X86-32] Disable usage of 4MB pages for kernel 1213 mem=nopentium [BUGS=X86-32] Disable usage of 4MB pages for kernel
1212 memory. 1214 memory.
1213 1215
1216 memchunk=nn[KMG]
1217 [KNL,SH] Allow user to override the default size for
1218 per-device physically contiguous DMA buffers.
1219
1214 memmap=exactmap [KNL,X86-32,X86_64] Enable setting of an exact 1220 memmap=exactmap [KNL,X86-32,X86_64] Enable setting of an exact
1215 E820 memory map, as specified by the user. 1221 E820 memory map, as specified by the user.
1216 Such memmap=exactmap lines can be constructed based on 1222 Such memmap=exactmap lines can be constructed based on
@@ -1393,6 +1399,8 @@ and is between 256 and 4096 characters. It is defined in the file
1393 1399
1394 nodisconnect [HW,SCSI,M68K] Disables SCSI disconnects. 1400 nodisconnect [HW,SCSI,M68K] Disables SCSI disconnects.
1395 1401
1402 nodsp [SH] Disable hardware DSP at boot time.
1403
1396 noefi [X86-32,X86-64] Disable EFI runtime services support. 1404 noefi [X86-32,X86-64] Disable EFI runtime services support.
1397 1405
1398 noexec [IA-64] 1406 noexec [IA-64]
@@ -1409,13 +1417,15 @@ and is between 256 and 4096 characters. It is defined in the file
1409 noexec32=off: disable non-executable mappings 1417 noexec32=off: disable non-executable mappings
1410 read implies executable mappings 1418 read implies executable mappings
1411 1419
1420 nofpu [SH] Disable hardware FPU at boot time.
1421
1412 nofxsr [BUGS=X86-32] Disables x86 floating point extended 1422 nofxsr [BUGS=X86-32] Disables x86 floating point extended
1413 register save and restore. The kernel will only save 1423 register save and restore. The kernel will only save
1414 legacy floating-point registers on task switch. 1424 legacy floating-point registers on task switch.
1415 1425
1416 noclflush [BUGS=X86] Don't use the CLFLUSH instruction 1426 noclflush [BUGS=X86] Don't use the CLFLUSH instruction
1417 1427
1418 nohlt [BUGS=ARM] 1428 nohlt [BUGS=ARM,SH]
1419 1429
1420 no-hlt [BUGS=X86-32] Tells the kernel that the hlt 1430 no-hlt [BUGS=X86-32] Tells the kernel that the hlt
1421 instruction doesn't work correctly and not to 1431 instruction doesn't work correctly and not to
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 2ed5713b754..cb2c87df70c 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -12,6 +12,7 @@ config SUPERH
12 select HAVE_IDE 12 select HAVE_IDE
13 select HAVE_OPROFILE 13 select HAVE_OPROFILE
14 select HAVE_GENERIC_DMA_COHERENT 14 select HAVE_GENERIC_DMA_COHERENT
15 select HAVE_IOREMAP_PROT if MMU
15 help 16 help
16 The SuperH is a RISC processor targeted for use in embedded systems 17 The SuperH is a RISC processor targeted for use in embedded systems
17 and consumer electronics; it was also used in the Sega Dreamcast 18 and consumer electronics; it was also used in the Sega Dreamcast
@@ -20,6 +21,10 @@ config SUPERH
20 21
21config SUPERH32 22config SUPERH32
22 def_bool !SUPERH64 23 def_bool !SUPERH64
24 select HAVE_KPROBES
25 select HAVE_KRETPROBES
26 select HAVE_ARCH_TRACEHOOK
27 select HAVE_FTRACE
23 28
24config SUPERH64 29config SUPERH64
25 def_bool y if CPU_SH5 30 def_bool y if CPU_SH5
@@ -54,8 +59,11 @@ config GENERIC_HARDIRQS_NO__DO_IRQ
54config GENERIC_IRQ_PROBE 59config GENERIC_IRQ_PROBE
55 def_bool y 60 def_bool y
56 61
62config GENERIC_GPIO
63 def_bool n
64
57config GENERIC_CALIBRATE_DELAY 65config GENERIC_CALIBRATE_DELAY
58 def_bool y 66 bool
59 67
60config GENERIC_IOMAP 68config GENERIC_IOMAP
61 bool 69 bool
@@ -66,6 +74,9 @@ config GENERIC_TIME
66config GENERIC_CLOCKEVENTS 74config GENERIC_CLOCKEVENTS
67 def_bool n 75 def_bool n
68 76
77config GENERIC_CLOCKEVENTS_BROADCAST
78 bool
79
69config GENERIC_LOCKBREAK 80config GENERIC_LOCKBREAK
70 def_bool y 81 def_bool y
71 depends on SMP && PREEMPT 82 depends on SMP && PREEMPT
@@ -92,6 +103,10 @@ config STACKTRACE_SUPPORT
92config LOCKDEP_SUPPORT 103config LOCKDEP_SUPPORT
93 def_bool y 104 def_bool y
94 105
106config HAVE_LATENCYTOP_SUPPORT
107 def_bool y
108 depends on !SMP
109
95config ARCH_HAS_ILOG2_U32 110config ARCH_HAS_ILOG2_U32
96 def_bool n 111 def_bool n
97 112
@@ -325,6 +340,7 @@ config CPU_SUBTYPE_SHX3
325 select ARCH_SPARSEMEM_ENABLE 340 select ARCH_SPARSEMEM_ENABLE
326 select SYS_SUPPORTS_NUMA 341 select SYS_SUPPORTS_NUMA
327 select SYS_SUPPORTS_SMP 342 select SYS_SUPPORTS_SMP
343 select GENERIC_CLOCKEVENTS_BROADCAST if SMP
328 344
329# SH4AL-DSP Processor Support 345# SH4AL-DSP Processor Support
330 346
@@ -492,7 +508,6 @@ config CRASH_DUMP
492config SECCOMP 508config SECCOMP
493 bool "Enable seccomp to safely compute untrusted bytecode" 509 bool "Enable seccomp to safely compute untrusted bytecode"
494 depends on PROC_FS 510 depends on PROC_FS
495 default y
496 help 511 help
497 This kernel feature is useful for number crunching applications 512 This kernel feature is useful for number crunching applications
498 that may need to compute untrusted bytecode during their 513 that may need to compute untrusted bytecode during their
diff --git a/arch/sh/Kconfig.debug b/arch/sh/Kconfig.debug
index 4d2d102e00d..e6d2c8b11ab 100644
--- a/arch/sh/Kconfig.debug
+++ b/arch/sh/Kconfig.debug
@@ -82,7 +82,7 @@ config DEBUG_STACK_USAGE
82 82
83config 4KSTACKS 83config 4KSTACKS
84 bool "Use 4Kb for kernel stacks instead of 8Kb" 84 bool "Use 4Kb for kernel stacks instead of 8Kb"
85 depends on DEBUG_KERNEL && (MMU || BROKEN) 85 depends on DEBUG_KERNEL && (MMU || BROKEN) && !PAGE_SIZE_64KB
86 help 86 help
87 If you say Y here the kernel will use a 4Kb stacksize for the 87 If you say Y here the kernel will use a 4Kb stacksize for the
88 kernel stack attached to each process/thread. This facilitates 88 kernel stack attached to each process/thread. This facilitates
diff --git a/arch/sh/Makefile b/arch/sh/Makefile
index 01d85c74481..1f409bf8180 100644
--- a/arch/sh/Makefile
+++ b/arch/sh/Makefile
@@ -76,8 +76,10 @@ KBUILD_IMAGE := $(defaultimage-y)
76# error messages during linking. 76# error messages during linking.
77# 77#
78ifdef CONFIG_SUPERH32 78ifdef CONFIG_SUPERH32
79UTS_MACHINE := sh
79LDFLAGS_vmlinux += -e _stext 80LDFLAGS_vmlinux += -e _stext
80else 81else
82UTS_MACHINE := sh64
81LDFLAGS_vmlinux += --defsym phys_stext=_stext-$(CONFIG_PAGE_OFFSET) \ 83LDFLAGS_vmlinux += --defsym phys_stext=_stext-$(CONFIG_PAGE_OFFSET) \
82 --defsym phys_stext_shmedia=phys_stext+1 \ 84 --defsym phys_stext_shmedia=phys_stext+1 \
83 -e phys_stext_shmedia 85 -e phys_stext_shmedia
@@ -123,6 +125,9 @@ core-y += $(addprefix arch/sh/boards/, \
123 $(filter-out ., $(patsubst %,%/,$(machdir-y)))) 125 $(filter-out ., $(patsubst %,%/,$(machdir-y))))
124endif 126endif
125 127
128# Common machine type headers. Not part of the arch/sh/boards/ hierarchy.
129machdir-y += mach-common
130
126# Companion chips 131# Companion chips
127core-$(CONFIG_HD6446X_SERIES) += arch/sh/cchips/hd6446x/ 132core-$(CONFIG_HD6446X_SERIES) += arch/sh/cchips/hd6446x/
128 133
diff --git a/arch/sh/boards/Kconfig b/arch/sh/boards/Kconfig
index ae194869fd6..50467f9d0d0 100644
--- a/arch/sh/boards/Kconfig
+++ b/arch/sh/boards/Kconfig
@@ -128,6 +128,7 @@ config SH_RTS7751R2D
128 128
129config SH_RSK7203 129config SH_RSK7203
130 bool "RSK7203" 130 bool "RSK7203"
131 select GENERIC_GPIO
131 depends on CPU_SUBTYPE_SH7203 132 depends on CPU_SUBTYPE_SH7203
132 133
133config SH_SDK7780 134config SH_SDK7780
@@ -162,6 +163,7 @@ config SH_SH7785LCR_29BIT_PHYSMAPS
162config SH_MIGOR 163config SH_MIGOR
163 bool "Migo-R" 164 bool "Migo-R"
164 depends on CPU_SUBTYPE_SH7722 165 depends on CPU_SUBTYPE_SH7722
166 select GENERIC_GPIO
165 help 167 help
166 Select Migo-R if configuring for the SH7722 Migo-R platform 168 Select Migo-R if configuring for the SH7722 Migo-R platform
167 by Renesas System Solutions Asia Pte. Ltd. 169 by Renesas System Solutions Asia Pte. Ltd.
@@ -169,6 +171,7 @@ config SH_MIGOR
169config SH_AP325RXA 171config SH_AP325RXA
170 bool "AP-325RXA" 172 bool "AP-325RXA"
171 depends on CPU_SUBTYPE_SH7723 173 depends on CPU_SUBTYPE_SH7723
174 select GENERIC_GPIO
172 help 175 help
173 Renesas "AP-325RXA" support. 176 Renesas "AP-325RXA" support.
174 Compatible with ALGO SYSTEM CO.,LTD. "AP-320A" 177 Compatible with ALGO SYSTEM CO.,LTD. "AP-320A"
@@ -184,6 +187,13 @@ config SH_EDOSK7705
184 bool "EDOSK7705" 187 bool "EDOSK7705"
185 depends on CPU_SUBTYPE_SH7705 188 depends on CPU_SUBTYPE_SH7705
186 189
190config SH_EDOSK7760
191 bool "EDOSK7760"
192 depends on CPU_SUBTYPE_SH7760
193 help
194 Select if configuring for a Renesas EDOSK7760
195 evaluation board.
196
187config SH_SH4202_MICRODEV 197config SH_SH4202_MICRODEV
188 bool "SH4-202 MicroDev" 198 bool "SH4-202 MicroDev"
189 depends on CPU_SUBTYPE_SH4_202 199 depends on CPU_SUBTYPE_SH4_202
@@ -228,6 +238,7 @@ config SH_X3PROTO
228config SH_MAGIC_PANEL_R2 238config SH_MAGIC_PANEL_R2
229 bool "Magic Panel R2" 239 bool "Magic Panel R2"
230 depends on CPU_SUBTYPE_SH7720 240 depends on CPU_SUBTYPE_SH7720
241 select GENERIC_GPIO
231 help 242 help
232 Select Magic Panel R2 if configuring for Magic Panel R2. 243 Select Magic Panel R2 if configuring for Magic Panel R2.
233 244
diff --git a/arch/sh/boards/Makefile b/arch/sh/boards/Makefile
index 463022c7df3..d9efa392372 100644
--- a/arch/sh/boards/Makefile
+++ b/arch/sh/boards/Makefile
@@ -6,3 +6,4 @@ obj-$(CONFIG_SH_MAGIC_PANEL_R2) += board-magicpanelr2.o
6obj-$(CONFIG_SH_RSK7203) += board-rsk7203.o 6obj-$(CONFIG_SH_RSK7203) += board-rsk7203.o
7obj-$(CONFIG_SH_SH7785LCR) += board-sh7785lcr.o 7obj-$(CONFIG_SH_SH7785LCR) += board-sh7785lcr.o
8obj-$(CONFIG_SH_SHMIN) += board-shmin.o 8obj-$(CONFIG_SH_SHMIN) += board-shmin.o
9obj-$(CONFIG_SH_EDOSK7760) += board-edosk7760.o
diff --git a/arch/sh/boards/board-ap325rxa.c b/arch/sh/boards/board-ap325rxa.c
index fd1612590bf..7c7874e6ac3 100644
--- a/arch/sh/boards/board-ap325rxa.c
+++ b/arch/sh/boards/board-ap325rxa.c
@@ -18,11 +18,13 @@
18#include <linux/delay.h> 18#include <linux/delay.h>
19#include <linux/i2c.h> 19#include <linux/i2c.h>
20#include <linux/smc911x.h> 20#include <linux/smc911x.h>
21#include <linux/gpio.h>
21#include <media/soc_camera_platform.h> 22#include <media/soc_camera_platform.h>
22#include <media/sh_mobile_ceu.h> 23#include <media/sh_mobile_ceu.h>
23#include <asm/sh_mobile_lcdc.h> 24#include <video/sh_mobile_lcdc.h>
24#include <asm/io.h> 25#include <asm/io.h>
25#include <asm/clock.h> 26#include <asm/clock.h>
27#include <cpu/sh7723.h>
26 28
27static struct smc911x_platdata smc911x_info = { 29static struct smc911x_platdata smc911x_info = {
28 .flags = SMC911X_USE_32BIT, 30 .flags = SMC911X_USE_32BIT,
@@ -52,20 +54,33 @@ static struct platform_device smc9118_device = {
52 }, 54 },
53}; 55};
54 56
57/*
58 * AP320 and AP325RXA has CPLD data in NOR Flash(0xA80000-0xABFFFF).
59 * If this area erased, this board can not boot.
60 */
55static struct mtd_partition ap325rxa_nor_flash_partitions[] = { 61static struct mtd_partition ap325rxa_nor_flash_partitions[] = {
56 { 62 {
57 .name = "uboot", 63 .name = "uboot",
58 .offset = 0, 64 .offset = 0,
59 .size = (1 * 1024 * 1024), 65 .size = (1 * 1024 * 1024),
60 .mask_flags = MTD_WRITEABLE, /* Read-only */ 66 .mask_flags = MTD_WRITEABLE, /* Read-only */
67 }, {
68 .name = "kernel",
69 .offset = MTDPART_OFS_APPEND,
70 .size = (2 * 1024 * 1024),
71 }, {
72 .name = "free-area0",
73 .offset = MTDPART_OFS_APPEND,
74 .size = ((7 * 1024 * 1024) + (512 * 1024)),
61 }, { 75 }, {
62 .name = "kernel", 76 .name = "CPLD-Data",
63 .offset = MTDPART_OFS_APPEND, 77 .offset = MTDPART_OFS_APPEND,
64 .size = (2 * 1024 * 1024), 78 .mask_flags = MTD_WRITEABLE, /* Read-only */
79 .size = (1024 * 128 * 2),
65 }, { 80 }, {
66 .name = "other", 81 .name = "free-area1",
67 .offset = MTDPART_OFS_APPEND, 82 .offset = MTDPART_OFS_APPEND,
68 .size = MTDPART_SIZ_FULL, 83 .size = MTDPART_SIZ_FULL,
69 }, 84 },
70}; 85};
71 86
@@ -96,17 +111,7 @@ static struct platform_device ap325rxa_nor_flash_device = {
96#define FPGA_LCDREG 0xB4100180 111#define FPGA_LCDREG 0xB4100180
97#define FPGA_BKLREG 0xB4100212 112#define FPGA_BKLREG 0xB4100212
98#define FPGA_LCDREG_VAL 0x0018 113#define FPGA_LCDREG_VAL 0x0018
99#define PORT_PHCR 0xA405010E
100#define PORT_PLCR 0xA4050114
101#define PORT_PMCR 0xA4050116
102#define PORT_PRCR 0xA405011C
103#define PORT_PSCR 0xA405011E
104#define PORT_PZCR 0xA405014C
105#define PORT_HIZCRA 0xA4050158
106#define PORT_MSELCRB 0xA4050182 114#define PORT_MSELCRB 0xA4050182
107#define PORT_PSDR 0xA405013E
108#define PORT_PZDR 0xA405016C
109#define PORT_PSELD 0xA4050154
110 115
111static void ap320_wvga_power_on(void *board_data) 116static void ap320_wvga_power_on(void *board_data)
112{ 117{
@@ -116,8 +121,7 @@ static void ap320_wvga_power_on(void *board_data)
116 ctrl_outw(FPGA_LCDREG_VAL, FPGA_LCDREG); 121 ctrl_outw(FPGA_LCDREG_VAL, FPGA_LCDREG);
117 122
118 /* backlight */ 123 /* backlight */
119 ctrl_outw((ctrl_inw(PORT_PSCR) & ~0x00C0) | 0x40, PORT_PSCR); 124 gpio_set_value(GPIO_PTS3, 0);
120 ctrl_outb(ctrl_inb(PORT_PSDR) & ~0x08, PORT_PSDR);
121 ctrl_outw(0x100, FPGA_BKLREG); 125 ctrl_outw(0x100, FPGA_BKLREG);
122} 126}
123 127
@@ -281,12 +285,84 @@ static struct platform_device *ap325rxa_devices[] __initdata = {
281}; 285};
282 286
283static struct i2c_board_info __initdata ap325rxa_i2c_devices[] = { 287static struct i2c_board_info __initdata ap325rxa_i2c_devices[] = {
288 {
289 I2C_BOARD_INFO("pcf8563", 0x51),
290 },
284}; 291};
285 292
286static int __init ap325rxa_devices_setup(void) 293static int __init ap325rxa_devices_setup(void)
287{ 294{
288 clk_always_enable("mstp200"); /* LCDC */ 295 /* LD3 and LD4 LEDs */
289 clk_always_enable("mstp203"); /* CEU */ 296 gpio_request(GPIO_PTX5, NULL); /* RUN */
297 gpio_direction_output(GPIO_PTX5, 1);
298 gpio_export(GPIO_PTX5, 0);
299
300 gpio_request(GPIO_PTX4, NULL); /* INDICATOR */
301 gpio_direction_output(GPIO_PTX4, 0);
302 gpio_export(GPIO_PTX4, 0);
303
304 /* SW1 input */
305 gpio_request(GPIO_PTF7, NULL); /* MODE */
306 gpio_direction_input(GPIO_PTF7);
307 gpio_export(GPIO_PTF7, 0);
308
309 /* LCDC */
310 clk_always_enable("mstp200");
311 gpio_request(GPIO_FN_LCDD15, NULL);
312 gpio_request(GPIO_FN_LCDD14, NULL);
313 gpio_request(GPIO_FN_LCDD13, NULL);
314 gpio_request(GPIO_FN_LCDD12, NULL);
315 gpio_request(GPIO_FN_LCDD11, NULL);
316 gpio_request(GPIO_FN_LCDD10, NULL);
317 gpio_request(GPIO_FN_LCDD9, NULL);
318 gpio_request(GPIO_FN_LCDD8, NULL);
319 gpio_request(GPIO_FN_LCDD7, NULL);
320 gpio_request(GPIO_FN_LCDD6, NULL);
321 gpio_request(GPIO_FN_LCDD5, NULL);
322 gpio_request(GPIO_FN_LCDD4, NULL);
323 gpio_request(GPIO_FN_LCDD3, NULL);
324 gpio_request(GPIO_FN_LCDD2, NULL);
325 gpio_request(GPIO_FN_LCDD1, NULL);
326 gpio_request(GPIO_FN_LCDD0, NULL);
327 gpio_request(GPIO_FN_LCDLCLK_PTR, NULL);
328 gpio_request(GPIO_FN_LCDDCK, NULL);
329 gpio_request(GPIO_FN_LCDVEPWC, NULL);
330 gpio_request(GPIO_FN_LCDVCPWC, NULL);
331 gpio_request(GPIO_FN_LCDVSYN, NULL);
332 gpio_request(GPIO_FN_LCDHSYN, NULL);
333 gpio_request(GPIO_FN_LCDDISP, NULL);
334 gpio_request(GPIO_FN_LCDDON, NULL);
335
336 /* LCD backlight */
337 gpio_request(GPIO_PTS3, NULL);
338 gpio_direction_output(GPIO_PTS3, 1);
339
340 /* CEU */
341 clk_always_enable("mstp203");
342 gpio_request(GPIO_FN_VIO_CLK2, NULL);
343 gpio_request(GPIO_FN_VIO_VD2, NULL);
344 gpio_request(GPIO_FN_VIO_HD2, NULL);
345 gpio_request(GPIO_FN_VIO_FLD, NULL);
346 gpio_request(GPIO_FN_VIO_CKO, NULL);
347 gpio_request(GPIO_FN_VIO_D15, NULL);
348 gpio_request(GPIO_FN_VIO_D14, NULL);
349 gpio_request(GPIO_FN_VIO_D13, NULL);
350 gpio_request(GPIO_FN_VIO_D12, NULL);
351 gpio_request(GPIO_FN_VIO_D11, NULL);
352 gpio_request(GPIO_FN_VIO_D10, NULL);
353 gpio_request(GPIO_FN_VIO_D9, NULL);
354 gpio_request(GPIO_FN_VIO_D8, NULL);
355
356 gpio_request(GPIO_PTZ7, NULL);
357 gpio_direction_output(GPIO_PTZ7, 0); /* OE_CAM */
358 gpio_request(GPIO_PTZ6, NULL);
359 gpio_direction_output(GPIO_PTZ6, 0); /* STBY_CAM */
360 gpio_request(GPIO_PTZ5, NULL);
361 gpio_direction_output(GPIO_PTZ5, 1); /* RST_CAM */
362 gpio_request(GPIO_PTZ4, NULL);
363 gpio_direction_output(GPIO_PTZ4, 0); /* SADDR */
364
365 ctrl_outw(ctrl_inw(PORT_MSELCRB) & ~0x0001, PORT_MSELCRB);
290 366
291 platform_resource_setup_memory(&ceu_device, "ceu", 4 << 20); 367 platform_resource_setup_memory(&ceu_device, "ceu", 4 << 20);
292 368
@@ -300,18 +376,6 @@ device_initcall(ap325rxa_devices_setup);
300 376
301static void __init ap325rxa_setup(char **cmdline_p) 377static void __init ap325rxa_setup(char **cmdline_p)
302{ 378{
303 /* LCDC configuration */
304 ctrl_outw(ctrl_inw(PORT_PHCR) & ~0xffff, PORT_PHCR);
305 ctrl_outw(ctrl_inw(PORT_PLCR) & ~0xffff, PORT_PLCR);
306 ctrl_outw(ctrl_inw(PORT_PMCR) & ~0xffff, PORT_PMCR);
307 ctrl_outw(ctrl_inw(PORT_PRCR) & ~0x03ff, PORT_PRCR);
308 ctrl_outw(ctrl_inw(PORT_HIZCRA) & ~0x01C0, PORT_HIZCRA);
309
310 /* CEU */
311 ctrl_outw(ctrl_inw(PORT_MSELCRB) & ~0x0001, PORT_MSELCRB);
312 ctrl_outw(ctrl_inw(PORT_PSELD) & ~0x0003, PORT_PSELD);
313 ctrl_outw((ctrl_inw(PORT_PZCR) & ~0xff00) | 0x5500, PORT_PZCR);
314 ctrl_outb((ctrl_inb(PORT_PZDR) & ~0xf0) | 0x20, PORT_PZDR);
315} 379}
316 380
317static struct sh_machine_vector mv_ap325rxa __initmv = { 381static struct sh_machine_vector mv_ap325rxa __initmv = {
diff --git a/arch/sh/boards/board-edosk7760.c b/arch/sh/boards/board-edosk7760.c
new file mode 100644
index 00000000000..35dc0994875
--- /dev/null
+++ b/arch/sh/boards/board-edosk7760.c
@@ -0,0 +1,193 @@
1/*
2 * Renesas Europe EDOSK7760 Board Support
3 *
4 * Copyright (C) 2008 SPES Societa' Progettazione Elettronica e Software Ltd.
5 * Author: Luca Santini <luca.santini@spesonline.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 */
21#include <linux/init.h>
22#include <linux/types.h>
23#include <linux/platform_device.h>
24#include <linux/smc91x.h>
25#include <linux/interrupt.h>
26#include <linux/i2c.h>
27#include <linux/mtd/physmap.h>
28#include <asm/machvec.h>
29#include <asm/io.h>
30#include <asm/addrspace.h>
31#include <asm/delay.h>
32#include <asm/i2c-sh7760.h>
33#include <asm/sizes.h>
34
35/* Bus state controller registers for CS4 area */
36#define BSC_CS4BCR 0xA4FD0010
37#define BSC_CS4WCR 0xA4FD0030
38
39#define SMC_IOBASE 0xA2000000
40#define SMC_IO_OFFSET 0x300
41#define SMC_IOADDR (SMC_IOBASE + SMC_IO_OFFSET)
42
43#define ETHERNET_IRQ 5
44
45/* NOR flash */
46static struct mtd_partition edosk7760_nor_flash_partitions[] = {
47 {
48 .name = "bootloader",
49 .offset = 0,
50 .size = SZ_256K,
51 .mask_flags = MTD_WRITEABLE, /* Read-only */
52 }, {
53 .name = "kernel",
54 .offset = MTDPART_OFS_APPEND,
55 .size = SZ_2M,
56 }, {
57 .name = "fs",
58 .offset = MTDPART_OFS_APPEND,
59 .size = SZ_26M,
60 }, {
61 .name = "other",
62 .offset = MTDPART_OFS_APPEND,
63 .size = MTDPART_SIZ_FULL,
64 },
65};
66
67static struct physmap_flash_data edosk7760_nor_flash_data = {
68 .width = 4,
69 .parts = edosk7760_nor_flash_partitions,
70 .nr_parts = ARRAY_SIZE(edosk7760_nor_flash_partitions),
71};
72
73static struct resource edosk7760_nor_flash_resources[] = {
74 [0] = {
75 .name = "NOR Flash",
76 .start = 0x00000000,
77 .end = 0x00000000 + SZ_32M - 1,
78 .flags = IORESOURCE_MEM,
79 }
80};
81
82static struct platform_device edosk7760_nor_flash_device = {
83 .name = "physmap-flash",
84 .resource = edosk7760_nor_flash_resources,
85 .num_resources = ARRAY_SIZE(edosk7760_nor_flash_resources),
86 .dev = {
87 .platform_data = &edosk7760_nor_flash_data,
88 },
89};
90
91/* i2c initialization functions */
92static struct sh7760_i2c_platdata i2c_pd = {
93 .speed_khz = 400,
94};
95
96static struct resource sh7760_i2c1_res[] = {
97 {
98 .start = SH7760_I2C1_MMIO,
99 .end = SH7760_I2C1_MMIOEND,
100 .flags = IORESOURCE_MEM,
101 },{
102 .start = SH7760_I2C1_IRQ,
103 .end = SH7760_I2C1_IRQ,
104 .flags = IORESOURCE_IRQ,
105 },
106};
107
108static struct platform_device sh7760_i2c1_dev = {
109 .dev = {
110 .platform_data = &i2c_pd,
111 },
112
113 .name = SH7760_I2C_DEVNAME,
114 .id = 1,
115 .resource = sh7760_i2c1_res,
116 .num_resources = ARRAY_SIZE(sh7760_i2c1_res),
117};
118
119static struct resource sh7760_i2c0_res[] = {
120 {
121 .start = SH7760_I2C0_MMIO,
122 .end = SH7760_I2C0_MMIOEND,
123 .flags = IORESOURCE_MEM,
124 }, {
125 .start = SH7760_I2C0_IRQ,
126 .end = SH7760_I2C0_IRQ,
127 .flags = IORESOURCE_IRQ,
128 },
129};
130
131static struct platform_device sh7760_i2c0_dev = {
132 .dev = {
133 .platform_data = &i2c_pd,
134 },
135 .name = SH7760_I2C_DEVNAME,
136 .id = 0,
137 .resource = sh7760_i2c0_res,
138 .num_resources = ARRAY_SIZE(sh7760_i2c0_res),
139};
140
141/* eth initialization functions */
142static struct smc91x_platdata smc91x_info = {
143 .flags = SMC91X_USE_16BIT | SMC91X_IO_SHIFT_1 | IORESOURCE_IRQ_LOWLEVEL,
144};
145
146static struct resource smc91x_res[] = {
147 [0] = {
148 .start = SMC_IOADDR,
149 .end = SMC_IOADDR + SZ_32 - 1,
150 .flags = IORESOURCE_MEM,
151 },
152 [1] = {
153 .start = ETHERNET_IRQ,
154 .end = ETHERNET_IRQ,
155 .flags = IORESOURCE_IRQ ,
156 }
157};
158
159static struct platform_device smc91x_dev = {
160 .name = "smc91x",
161 .id = -1,
162 .num_resources = ARRAY_SIZE(smc91x_res),
163 .resource = smc91x_res,
164
165 .dev = {
166 .platform_data = &smc91x_info,
167 },
168};
169
170/* platform init code */
171static struct platform_device *edosk7760_devices[] __initdata = {
172 &smc91x_dev,
173 &edosk7760_nor_flash_device,
174 &sh7760_i2c0_dev,
175 &sh7760_i2c1_dev,
176};
177
178static int __init init_edosk7760_devices(void)
179{
180 plat_irq_setup_pins(IRQ_MODE_IRQ);
181
182 return platform_add_devices(edosk7760_devices,
183 ARRAY_SIZE(edosk7760_devices));
184}
185__initcall(init_edosk7760_devices);
186
187/*
188 * The Machine Vector
189 */
190struct sh_machine_vector mv_edosk7760 __initmv = {
191 .mv_name = "EDOSK7760",
192 .mv_nr_irqs = 128,
193};
diff --git a/arch/sh/boards/board-magicpanelr2.c b/arch/sh/boards/board-magicpanelr2.c
index f3b8b07ea5d..3de22ccdeb7 100644
--- a/arch/sh/boards/board-magicpanelr2.c
+++ b/arch/sh/boards/board-magicpanelr2.c
@@ -13,12 +13,14 @@
13#include <linux/irq.h> 13#include <linux/irq.h>
14#include <linux/platform_device.h> 14#include <linux/platform_device.h>
15#include <linux/delay.h> 15#include <linux/delay.h>
16#include <linux/gpio.h>
16#include <linux/mtd/mtd.h> 17#include <linux/mtd/mtd.h>
17#include <linux/mtd/partitions.h> 18#include <linux/mtd/partitions.h>
18#include <linux/mtd/physmap.h> 19#include <linux/mtd/physmap.h>
19#include <linux/mtd/map.h> 20#include <linux/mtd/map.h>
20#include <asm/magicpanelr2.h> 21#include <mach/magicpanelr2.h>
21#include <asm/heartbeat.h> 22#include <asm/heartbeat.h>
23#include <cpu/sh7720.h>
22 24
23#define LAN9115_READY (ctrl_inl(0xA8000084UL) & 0x00000001UL) 25#define LAN9115_READY (ctrl_inl(0xA8000084UL) & 0x00000001UL)
24 26
@@ -170,7 +172,14 @@ static void __init setup_port_multiplexing(void)
170 /* R7 A25; R6 A24; R5 A23; R4 A22; 172 /* R7 A25; R6 A24; R5 A23; R4 A22;
171 * R3 A21; R2 A20; R1 A19; R0 A0; 173 * R3 A21; R2 A20; R1 A19; R0 A0;
172 */ 174 */
173 ctrl_outw(0x0000, PORT_PRCR); /* 00 00 00 00 00 00 00 00 */ 175 gpio_request(GPIO_FN_A25, NULL);
176 gpio_request(GPIO_FN_A24, NULL);
177 gpio_request(GPIO_FN_A23, NULL);
178 gpio_request(GPIO_FN_A22, NULL);
179 gpio_request(GPIO_FN_A21, NULL);
180 gpio_request(GPIO_FN_A20, NULL);
181 gpio_request(GPIO_FN_A19, NULL);
182 gpio_request(GPIO_FN_A0, NULL);
174 183
175 /* S7 (x); S6 (x); S5 (x); S4 GPO(EEPROM_CS2); 184 /* S7 (x); S6 (x); S5 (x); S4 GPO(EEPROM_CS2);
176 * S3 GPO(EEPROM_CS1); S2 SIOF0_TXD; S1 SIOF0_RXD; S0 SIOF0_SCK; 185 * S3 GPO(EEPROM_CS1); S2 SIOF0_TXD; S1 SIOF0_RXD; S0 SIOF0_SCK;
diff --git a/arch/sh/boards/board-rsk7203.c b/arch/sh/boards/board-rsk7203.c
index ffbedc59a97..ded799cf3ea 100644
--- a/arch/sh/boards/board-rsk7203.c
+++ b/arch/sh/boards/board-rsk7203.c
@@ -16,8 +16,10 @@
16#include <linux/mtd/physmap.h> 16#include <linux/mtd/physmap.h>
17#include <linux/mtd/map.h> 17#include <linux/mtd/map.h>
18#include <linux/smc911x.h> 18#include <linux/smc911x.h>
19#include <linux/gpio.h>
19#include <asm/machvec.h> 20#include <asm/machvec.h>
20#include <asm/io.h> 21#include <asm/io.h>
22#include <asm/sh7203.h>
21 23
22static struct smc911x_platdata smc911x_info = { 24static struct smc911x_platdata smc911x_info = {
23 .flags = SMC911X_USE_16BIT, 25 .flags = SMC911X_USE_16BIT,
@@ -122,6 +124,15 @@ static struct platform_device *rsk7203_devices[] __initdata = {
122 124
123static int __init rsk7203_devices_setup(void) 125static int __init rsk7203_devices_setup(void)
124{ 126{
127 /* Select pins for SCIF0 */
128 gpio_request(GPIO_FN_TXD0, NULL);
129 gpio_request(GPIO_FN_RXD0, NULL);
130
131 /* Lit LED0 */
132 gpio_request(GPIO_PE10, NULL);
133 gpio_direction_output(GPIO_PE10, 0);
134 gpio_export(GPIO_PE10, 0);
135
125 set_mtd_partitions(); 136 set_mtd_partitions();
126 return platform_add_devices(rsk7203_devices, 137 return platform_add_devices(rsk7203_devices,
127 ARRAY_SIZE(rsk7203_devices)); 138 ARRAY_SIZE(rsk7203_devices));
diff --git a/arch/sh/boards/board-sh7785lcr.c b/arch/sh/boards/board-sh7785lcr.c
index b95d674ee70..408bbddaf32 100644
--- a/arch/sh/boards/board-sh7785lcr.c
+++ b/arch/sh/boards/board-sh7785lcr.c
@@ -19,7 +19,7 @@
19#include <linux/i2c-pca-platform.h> 19#include <linux/i2c-pca-platform.h>
20#include <linux/i2c-algo-pca.h> 20#include <linux/i2c-algo-pca.h>
21#include <asm/heartbeat.h> 21#include <asm/heartbeat.h>
22#include <asm/sh7785lcr.h> 22#include <mach/sh7785lcr.h>
23 23
24/* 24/*
25 * NOTE: This board has 2 physical memory maps. 25 * NOTE: This board has 2 physical memory maps.
diff --git a/arch/sh/boards/board-shmin.c b/arch/sh/boards/board-shmin.c
index 16e5dae8ecf..5cc0867de5a 100644
--- a/arch/sh/boards/board-shmin.c
+++ b/arch/sh/boards/board-shmin.c
@@ -8,7 +8,7 @@
8#include <linux/init.h> 8#include <linux/init.h>
9#include <linux/irq.h> 9#include <linux/irq.h>
10#include <asm/machvec.h> 10#include <asm/machvec.h>
11#include <asm/shmin.h> 11#include <mach/shmin.h>
12#include <asm/clock.h> 12#include <asm/clock.h>
13#include <asm/io.h> 13#include <asm/io.h>
14 14
diff --git a/arch/sh/boards/mach-edosk7705/io.c b/arch/sh/boards/mach-edosk7705/io.c
index 541cea2a652..7d153e50a01 100644
--- a/arch/sh/boards/mach-edosk7705/io.c
+++ b/arch/sh/boards/mach-edosk7705/io.c
@@ -11,7 +11,7 @@
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12#include <linux/types.h> 12#include <linux/types.h>
13#include <asm/io.h> 13#include <asm/io.h>
14#include <asm/edosk7705/io.h> 14#include <mach/edosk7705.h>
15#include <asm/addrspace.h> 15#include <asm/addrspace.h>
16 16
17#define SMC_IOADDR 0xA2000000 17#define SMC_IOADDR 0xA2000000
diff --git a/arch/sh/boards/mach-edosk7705/setup.c b/arch/sh/boards/mach-edosk7705/setup.c
index f076c45308d..ab3f47bffdf 100644
--- a/arch/sh/boards/mach-edosk7705/setup.c
+++ b/arch/sh/boards/mach-edosk7705/setup.c
@@ -10,7 +10,7 @@
10 */ 10 */
11#include <linux/init.h> 11#include <linux/init.h>
12#include <asm/machvec.h> 12#include <asm/machvec.h>
13#include <asm/edosk7705/io.h> 13#include <mach/edosk7705.h>
14 14
15static void __init sh_edosk7705_init_irq(void) 15static void __init sh_edosk7705_init_irq(void)
16{ 16{
diff --git a/arch/sh/boards/mach-highlander/irq-r7780mp.c b/arch/sh/boards/mach-highlander/irq-r7780mp.c
index ae1cfcb2970..83c28bcd4d2 100644
--- a/arch/sh/boards/mach-highlander/irq-r7780mp.c
+++ b/arch/sh/boards/mach-highlander/irq-r7780mp.c
@@ -12,7 +12,7 @@
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/irq.h> 13#include <linux/irq.h>
14#include <linux/io.h> 14#include <linux/io.h>
15#include <asm/r7780rp.h> 15#include <mach/highlander.h>
16 16
17enum { 17enum {
18 UNUSED = 0, 18 UNUSED = 0,
diff --git a/arch/sh/boards/mach-highlander/irq-r7780rp.c b/arch/sh/boards/mach-highlander/irq-r7780rp.c
index 9d3921fe27c..b721e86b5af 100644
--- a/arch/sh/boards/mach-highlander/irq-r7780rp.c
+++ b/arch/sh/boards/mach-highlander/irq-r7780rp.c
@@ -12,7 +12,7 @@
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/irq.h> 13#include <linux/irq.h>
14#include <linux/io.h> 14#include <linux/io.h>
15#include <asm/r7780rp.h> 15#include <mach/highlander.h>
16 16
17enum { 17enum {
18 UNUSED = 0, 18 UNUSED = 0,
diff --git a/arch/sh/boards/mach-highlander/irq-r7785rp.c b/arch/sh/boards/mach-highlander/irq-r7785rp.c
index 896c045aa39..3811b060a39 100644
--- a/arch/sh/boards/mach-highlander/irq-r7785rp.c
+++ b/arch/sh/boards/mach-highlander/irq-r7785rp.c
@@ -12,7 +12,7 @@
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/irq.h> 13#include <linux/irq.h>
14#include <linux/io.h> 14#include <linux/io.h>
15#include <asm/r7780rp.h> 15#include <mach/highlander.h>
16 16
17enum { 17enum {
18 UNUSED = 0, 18 UNUSED = 0,
diff --git a/arch/sh/boards/mach-highlander/psw.c b/arch/sh/boards/mach-highlander/psw.c
index be8d5477fc6..37b1a2ee71a 100644
--- a/arch/sh/boards/mach-highlander/psw.c
+++ b/arch/sh/boards/mach-highlander/psw.c
@@ -13,7 +13,7 @@
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/interrupt.h> 14#include <linux/interrupt.h>
15#include <linux/platform_device.h> 15#include <linux/platform_device.h>
16#include <asm/r7780rp.h> 16#include <mach/highlander.h>
17#include <asm/push-switch.h> 17#include <asm/push-switch.h>
18 18
19static irqreturn_t psw_irq_handler(int irq, void *arg) 19static irqreturn_t psw_irq_handler(int irq, void *arg)
diff --git a/arch/sh/boards/mach-highlander/setup.c b/arch/sh/boards/mach-highlander/setup.c
index bc79afb6fc4..c5a40f7906d 100644
--- a/arch/sh/boards/mach-highlander/setup.c
+++ b/arch/sh/boards/mach-highlander/setup.c
@@ -20,7 +20,7 @@
20#include <linux/i2c.h> 20#include <linux/i2c.h>
21#include <net/ax88796.h> 21#include <net/ax88796.h>
22#include <asm/machvec.h> 22#include <asm/machvec.h>
23#include <asm/r7780rp.h> 23#include <mach/highlander.h>
24#include <asm/clock.h> 24#include <asm/clock.h>
25#include <asm/heartbeat.h> 25#include <asm/heartbeat.h>
26#include <asm/io.h> 26#include <asm/io.h>
diff --git a/arch/sh/boards/mach-hp6xx/hp6xx_apm.c b/arch/sh/boards/mach-hp6xx/hp6xx_apm.c
index 177f4f028e0..e85212faf40 100644
--- a/arch/sh/boards/mach-hp6xx/hp6xx_apm.c
+++ b/arch/sh/boards/mach-hp6xx/hp6xx_apm.c
@@ -14,7 +14,7 @@
14#include <linux/apm-emulation.h> 14#include <linux/apm-emulation.h>
15#include <linux/io.h> 15#include <linux/io.h>
16#include <asm/adc.h> 16#include <asm/adc.h>
17#include <asm/hp6xx.h> 17#include <mach/hp6xx.h>
18 18
19/* percentage values */ 19/* percentage values */
20#define APM_CRITICAL 10 20#define APM_CRITICAL 10
diff --git a/arch/sh/boards/mach-hp6xx/pm.c b/arch/sh/boards/mach-hp6xx/pm.c
index e96684def78..64af1f2eef0 100644
--- a/arch/sh/boards/mach-hp6xx/pm.c
+++ b/arch/sh/boards/mach-hp6xx/pm.c
@@ -12,7 +12,7 @@
12#include <linux/time.h> 12#include <linux/time.h>
13#include <asm/io.h> 13#include <asm/io.h>
14#include <asm/hd64461.h> 14#include <asm/hd64461.h>
15#include <asm/hp6xx.h> 15#include <mach/hp6xx.h>
16#include <cpu/dac.h> 16#include <cpu/dac.h>
17#include <asm/pm.h> 17#include <asm/pm.h>
18 18
diff --git a/arch/sh/boards/mach-hp6xx/setup.c b/arch/sh/boards/mach-hp6xx/setup.c
index 475b46caec1..48fece78ff5 100644
--- a/arch/sh/boards/mach-hp6xx/setup.c
+++ b/arch/sh/boards/mach-hp6xx/setup.c
@@ -15,7 +15,7 @@
15#include <asm/hd64461.h> 15#include <asm/hd64461.h>
16#include <asm/io.h> 16#include <asm/io.h>
17#include <asm/irq.h> 17#include <asm/irq.h>
18#include <asm/hp6xx.h> 18#include <mach/hp6xx.h>
19#include <cpu/dac.h> 19#include <cpu/dac.h>
20 20
21#define SCPCR 0xa4000116 21#define SCPCR 0xa4000116
diff --git a/arch/sh/boards/mach-lboxre2/irq.c b/arch/sh/boards/mach-lboxre2/irq.c
index 5a1c3bbe7b5..8aa171ab833 100644
--- a/arch/sh/boards/mach-lboxre2/irq.c
+++ b/arch/sh/boards/mach-lboxre2/irq.c
@@ -15,7 +15,7 @@
15#include <linux/irq.h> 15#include <linux/irq.h>
16#include <asm/irq.h> 16#include <asm/irq.h>
17#include <asm/io.h> 17#include <asm/io.h>
18#include <asm/lboxre2.h> 18#include <mach/lboxre2.h>
19 19
20/* 20/*
21 * Initialize IRQ setting 21 * Initialize IRQ setting
diff --git a/arch/sh/boards/mach-lboxre2/setup.c b/arch/sh/boards/mach-lboxre2/setup.c
index c74440d38ee..2b0b5818e1e 100644
--- a/arch/sh/boards/mach-lboxre2/setup.c
+++ b/arch/sh/boards/mach-lboxre2/setup.c
@@ -16,7 +16,7 @@
16#include <linux/ata_platform.h> 16#include <linux/ata_platform.h>
17#include <asm/machvec.h> 17#include <asm/machvec.h>
18#include <asm/addrspace.h> 18#include <asm/addrspace.h>
19#include <asm/lboxre2.h> 19#include <mach/lboxre2.h>
20#include <asm/io.h> 20#include <asm/io.h>
21 21
22static struct resource cf_ide_resources[] = { 22static struct resource cf_ide_resources[] = {
diff --git a/arch/sh/boards/mach-microdev/io.c b/arch/sh/boards/mach-microdev/io.c
index 9f8a540f7e1..52dd748211c 100644
--- a/arch/sh/boards/mach-microdev/io.c
+++ b/arch/sh/boards/mach-microdev/io.c
@@ -15,7 +15,7 @@
15#include <linux/pci.h> 15#include <linux/pci.h>
16#include <linux/wait.h> 16#include <linux/wait.h>
17#include <asm/io.h> 17#include <asm/io.h>
18#include <asm/microdev.h> 18#include <mach/microdev.h>
19 19
20 /* 20 /*
21 * we need to have a 'safe' address to re-direct all I/O requests 21 * we need to have a 'safe' address to re-direct all I/O requests
diff --git a/arch/sh/boards/mach-microdev/irq.c b/arch/sh/boards/mach-microdev/irq.c
index 4d335077a3f..702753cbd28 100644
--- a/arch/sh/boards/mach-microdev/irq.c
+++ b/arch/sh/boards/mach-microdev/irq.c
@@ -14,7 +14,7 @@
14#include <linux/interrupt.h> 14#include <linux/interrupt.h>
15#include <asm/system.h> 15#include <asm/system.h>
16#include <asm/io.h> 16#include <asm/io.h>
17#include <asm/microdev.h> 17#include <mach/microdev.h>
18 18
19#define NUM_EXTERNAL_IRQS 16 /* IRL0 .. IRL15 */ 19#define NUM_EXTERNAL_IRQS 16 /* IRL0 .. IRL15 */
20 20
diff --git a/arch/sh/boards/mach-microdev/setup.c b/arch/sh/boards/mach-microdev/setup.c
index fc8cd06d66c..a9202fe3cb5 100644
--- a/arch/sh/boards/mach-microdev/setup.c
+++ b/arch/sh/boards/mach-microdev/setup.c
@@ -14,7 +14,7 @@
14#include <linux/platform_device.h> 14#include <linux/platform_device.h>
15#include <linux/ioport.h> 15#include <linux/ioport.h>
16#include <video/s1d13xxxfb.h> 16#include <video/s1d13xxxfb.h>
17#include <asm/microdev.h> 17#include <mach/microdev.h>
18#include <asm/io.h> 18#include <asm/io.h>
19#include <asm/machvec.h> 19#include <asm/machvec.h>
20 20
diff --git a/arch/sh/boards/mach-migor/lcd_qvga.c b/arch/sh/boards/mach-migor/lcd_qvga.c
index 6e960959644..de9014a8a93 100644
--- a/arch/sh/boards/mach-migor/lcd_qvga.c
+++ b/arch/sh/boards/mach-migor/lcd_qvga.c
@@ -17,8 +17,10 @@
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/kernel.h> 18#include <linux/kernel.h>
19#include <linux/module.h> 19#include <linux/module.h>
20#include <asm/sh_mobile_lcdc.h> 20#include <linux/gpio.h>
21#include <asm/migor.h> 21#include <video/sh_mobile_lcdc.h>
22#include <cpu/sh7722.h>
23#include <mach/migor.h>
22 24
23/* LCD Module is a PH240320T according to board schematics. This module 25/* LCD Module is a PH240320T according to board schematics. This module
24 * is made up of a 240x320 LCD hooked up to a R61505U (or HX8347-A01?) 26 * is made up of a 240x320 LCD hooked up to a R61505U (or HX8347-A01?)
@@ -30,9 +32,9 @@
30 32
31static void reset_lcd_module(void) 33static void reset_lcd_module(void)
32{ 34{
33 ctrl_outb(ctrl_inb(PORT_PHDR) & ~0x04, PORT_PHDR); 35 gpio_set_value(GPIO_PTH2, 0);
34 mdelay(2); 36 mdelay(2);
35 ctrl_outb(ctrl_inb(PORT_PHDR) | 0x04, PORT_PHDR); 37 gpio_set_value(GPIO_PTH2, 1);
36 mdelay(1); 38 mdelay(1);
37} 39}
38 40
diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c
index 714dce91cc9..769d6304342 100644
--- a/arch/sh/boards/mach-migor/setup.c
+++ b/arch/sh/boards/mach-migor/setup.c
@@ -17,14 +17,16 @@
17#include <linux/smc91x.h> 17#include <linux/smc91x.h>
18#include <linux/delay.h> 18#include <linux/delay.h>
19#include <linux/clk.h> 19#include <linux/clk.h>
20#include <linux/gpio.h>
20#include <media/soc_camera_platform.h> 21#include <media/soc_camera_platform.h>
21#include <media/sh_mobile_ceu.h> 22#include <media/sh_mobile_ceu.h>
23#include <video/sh_mobile_lcdc.h>
22#include <asm/clock.h> 24#include <asm/clock.h>
23#include <asm/machvec.h> 25#include <asm/machvec.h>
24#include <asm/io.h> 26#include <asm/io.h>
25#include <asm/sh_keysc.h> 27#include <asm/sh_keysc.h>
26#include <asm/sh_mobile_lcdc.h> 28#include <mach/migor.h>
27#include <asm/migor.h> 29#include <cpu/sh7722.h>
28 30
29/* Address IRQ Size Bus Description 31/* Address IRQ Size Bus Description
30 * 0x00000000 64MB 16 NOR Flash (SP29PL256N) 32 * 0x00000000 64MB 16 NOR Flash (SP29PL256N)
@@ -35,7 +37,7 @@
35 */ 37 */
36 38
37static struct smc91x_platdata smc91x_info = { 39static struct smc91x_platdata smc91x_info = {
38 .flags = SMC91X_USE_16BIT, 40 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
39}; 41};
40 42
41static struct resource smc91x_eth_resources[] = { 43static struct resource smc91x_eth_resources[] = {
@@ -169,7 +171,7 @@ static void migor_nand_flash_cmd_ctl(struct mtd_info *mtd, int cmd,
169 171
170static int migor_nand_flash_ready(struct mtd_info *mtd) 172static int migor_nand_flash_ready(struct mtd_info *mtd)
171{ 173{
172 return ctrl_inb(PORT_PADR) & 0x02; /* PTA1 */ 174 return gpio_get_value(GPIO_PTA1); /* NAND_RBn */
173} 175}
174 176
175struct platform_nand_data migor_nand_flash_data = { 177struct platform_nand_data migor_nand_flash_data = {
@@ -286,22 +288,15 @@ static struct clk *camera_clk;
286 288
287static void camera_power_on(void) 289static void camera_power_on(void)
288{ 290{
289 unsigned char value;
290
291 camera_clk = clk_get(NULL, "video_clk"); 291 camera_clk = clk_get(NULL, "video_clk");
292 clk_set_rate(camera_clk, 24000000); 292 clk_set_rate(camera_clk, 24000000);
293 clk_enable(camera_clk); /* start VIO_CKO */ 293 clk_enable(camera_clk); /* start VIO_CKO */
294 294
295 /* use VIO_RST to take camera out of reset */
295 mdelay(10); 296 mdelay(10);
296 value = ctrl_inb(PORT_PTDR); 297 gpio_set_value(GPIO_PTT3, 0);
297 value &= ~0x09;
298#ifndef CONFIG_SH_MIGOR_RTA_WVGA
299 value |= 0x01;
300#endif
301 ctrl_outb(value, PORT_PTDR);
302 mdelay(10); 298 mdelay(10);
303 299 gpio_set_value(GPIO_PTT3, 1);
304 ctrl_outb(value | 8, PORT_PTDR);
305} 300}
306 301
307static void camera_power_off(void) 302static void camera_power_off(void)
@@ -309,7 +304,7 @@ static void camera_power_off(void)
309 clk_disable(camera_clk); /* stop VIO_CKO */ 304 clk_disable(camera_clk); /* stop VIO_CKO */
310 clk_put(camera_clk); 305 clk_put(camera_clk);
311 306
312 ctrl_outb(ctrl_inb(PORT_PTDR) & ~0x08, PORT_PTDR); 307 gpio_set_value(GPIO_PTT3, 0);
313} 308}
314 309
315#ifdef CONFIG_I2C 310#ifdef CONFIG_I2C
@@ -458,75 +453,135 @@ static struct i2c_board_info migor_i2c_devices[] = {
458 453
459static int __init migor_devices_setup(void) 454static int __init migor_devices_setup(void)
460{ 455{
456 /* Lit D11 LED */
457 gpio_request(GPIO_PTJ7, NULL);
458 gpio_direction_output(GPIO_PTJ7, 1);
459 gpio_export(GPIO_PTJ7, 0);
460
461 /* Lit D12 LED */
462 gpio_request(GPIO_PTJ5, NULL);
463 gpio_direction_output(GPIO_PTJ5, 1);
464 gpio_export(GPIO_PTJ5, 0);
465
466 /* SMC91C111 - Enable IRQ0, Setup CS4 for 16-bit fast access */
467 gpio_request(GPIO_FN_IRQ0, NULL);
468 ctrl_outl(0x00003400, BSC_CS4BCR);
469 ctrl_outl(0x00110080, BSC_CS4WCR);
470
471 /* KEYSC */
461 clk_always_enable("mstp214"); /* KEYSC */ 472 clk_always_enable("mstp214"); /* KEYSC */
473 gpio_request(GPIO_FN_KEYOUT0, NULL);
474 gpio_request(GPIO_FN_KEYOUT1, NULL);
475 gpio_request(GPIO_FN_KEYOUT2, NULL);
476 gpio_request(GPIO_FN_KEYOUT3, NULL);
477 gpio_request(GPIO_FN_KEYOUT4_IN6, NULL);
478 gpio_request(GPIO_FN_KEYIN1, NULL);
479 gpio_request(GPIO_FN_KEYIN2, NULL);
480 gpio_request(GPIO_FN_KEYIN3, NULL);
481 gpio_request(GPIO_FN_KEYIN4, NULL);
482 gpio_request(GPIO_FN_KEYOUT5_IN5, NULL);
483
484 /* NAND Flash */
485 gpio_request(GPIO_FN_CS6A_CE2B, NULL);
486 ctrl_outl((ctrl_inl(BSC_CS6ABCR) & ~0x0600) | 0x0200, BSC_CS6ABCR);
487 gpio_request(GPIO_PTA1, NULL);
488 gpio_direction_input(GPIO_PTA1);
489
490 /* Touch Panel */
491 gpio_request(GPIO_FN_IRQ6, NULL);
492
493 /* LCD Panel */
462 clk_always_enable("mstp200"); /* LCDC */ 494 clk_always_enable("mstp200"); /* LCDC */
495#ifdef CONFIG_SH_MIGOR_QVGA /* LCDC - QVGA - Enable SYS Interface signals */
496 gpio_request(GPIO_FN_LCDD17, NULL);
497 gpio_request(GPIO_FN_LCDD16, NULL);
498 gpio_request(GPIO_FN_LCDD15, NULL);
499 gpio_request(GPIO_FN_LCDD14, NULL);
500 gpio_request(GPIO_FN_LCDD13, NULL);
501 gpio_request(GPIO_FN_LCDD12, NULL);
502 gpio_request(GPIO_FN_LCDD11, NULL);
503 gpio_request(GPIO_FN_LCDD10, NULL);
504 gpio_request(GPIO_FN_LCDD8, NULL);
505 gpio_request(GPIO_FN_LCDD7, NULL);
506 gpio_request(GPIO_FN_LCDD6, NULL);
507 gpio_request(GPIO_FN_LCDD5, NULL);
508 gpio_request(GPIO_FN_LCDD4, NULL);
509 gpio_request(GPIO_FN_LCDD3, NULL);
510 gpio_request(GPIO_FN_LCDD2, NULL);
511 gpio_request(GPIO_FN_LCDD1, NULL);
512 gpio_request(GPIO_FN_LCDRS, NULL);
513 gpio_request(GPIO_FN_LCDCS, NULL);
514 gpio_request(GPIO_FN_LCDRD, NULL);
515 gpio_request(GPIO_FN_LCDWR, NULL);
516 gpio_request(GPIO_PTH2, NULL); /* LCD_DON */
517 gpio_direction_output(GPIO_PTH2, 1);
518#endif
519#ifdef CONFIG_SH_MIGOR_RTA_WVGA /* LCDC - WVGA - Enable RGB Interface signals */
520 gpio_request(GPIO_FN_LCDD15, NULL);
521 gpio_request(GPIO_FN_LCDD14, NULL);
522 gpio_request(GPIO_FN_LCDD13, NULL);
523 gpio_request(GPIO_FN_LCDD12, NULL);
524 gpio_request(GPIO_FN_LCDD11, NULL);
525 gpio_request(GPIO_FN_LCDD10, NULL);
526 gpio_request(GPIO_FN_LCDD9, NULL);
527 gpio_request(GPIO_FN_LCDD8, NULL);
528 gpio_request(GPIO_FN_LCDD7, NULL);
529 gpio_request(GPIO_FN_LCDD6, NULL);
530 gpio_request(GPIO_FN_LCDD5, NULL);
531 gpio_request(GPIO_FN_LCDD4, NULL);
532 gpio_request(GPIO_FN_LCDD3, NULL);
533 gpio_request(GPIO_FN_LCDD2, NULL);
534 gpio_request(GPIO_FN_LCDD1, NULL);
535 gpio_request(GPIO_FN_LCDD0, NULL);
536 gpio_request(GPIO_FN_LCDLCLK, NULL);
537 gpio_request(GPIO_FN_LCDDCK, NULL);
538 gpio_request(GPIO_FN_LCDVEPWC, NULL);
539 gpio_request(GPIO_FN_LCDVCPWC, NULL);
540 gpio_request(GPIO_FN_LCDVSYN, NULL);
541 gpio_request(GPIO_FN_LCDHSYN, NULL);
542 gpio_request(GPIO_FN_LCDDISP, NULL);
543 gpio_request(GPIO_FN_LCDDON, NULL);
544#endif
545
546 /* CEU */
463 clk_always_enable("mstp203"); /* CEU */ 547 clk_always_enable("mstp203"); /* CEU */
548 gpio_request(GPIO_FN_VIO_CLK2, NULL);
549 gpio_request(GPIO_FN_VIO_VD2, NULL);
550 gpio_request(GPIO_FN_VIO_HD2, NULL);
551 gpio_request(GPIO_FN_VIO_FLD, NULL);
552 gpio_request(GPIO_FN_VIO_CKO, NULL);
553 gpio_request(GPIO_FN_VIO_D15, NULL);
554 gpio_request(GPIO_FN_VIO_D14, NULL);
555 gpio_request(GPIO_FN_VIO_D13, NULL);
556 gpio_request(GPIO_FN_VIO_D12, NULL);
557 gpio_request(GPIO_FN_VIO_D11, NULL);
558 gpio_request(GPIO_FN_VIO_D10, NULL);
559 gpio_request(GPIO_FN_VIO_D9, NULL);
560 gpio_request(GPIO_FN_VIO_D8, NULL);
561
562 gpio_request(GPIO_PTT3, NULL); /* VIO_RST */
563 gpio_direction_output(GPIO_PTT3, 0);
564 gpio_request(GPIO_PTT2, NULL); /* TV_IN_EN */
565 gpio_direction_output(GPIO_PTT2, 1);
566 gpio_request(GPIO_PTT0, NULL); /* CAM_EN */
567#ifdef CONFIG_SH_MIGOR_RTA_WVGA
568 gpio_direction_output(GPIO_PTT0, 0);
569#else
570 gpio_direction_output(GPIO_PTT0, 1);
571#endif
572 ctrl_outw(ctrl_inw(PORT_MSELCRB) | 0x2000, PORT_MSELCRB); /* D15->D8 */
464 573
465 platform_resource_setup_memory(&migor_ceu_device, "ceu", 4 << 20); 574 platform_resource_setup_memory(&migor_ceu_device, "ceu", 4 << 20);
466 575
467 i2c_register_board_info(0, migor_i2c_devices, 576 i2c_register_board_info(0, migor_i2c_devices,
468 ARRAY_SIZE(migor_i2c_devices)); 577 ARRAY_SIZE(migor_i2c_devices));
469 578
470 return platform_add_devices(migor_devices, ARRAY_SIZE(migor_devices)); 579 return platform_add_devices(migor_devices, ARRAY_SIZE(migor_devices));
471} 580}
472__initcall(migor_devices_setup); 581__initcall(migor_devices_setup);
473 582
474static void __init migor_setup(char **cmdline_p) 583static void __init migor_setup(char **cmdline_p)
475{ 584{
476 /* SMC91C111 - Enable IRQ0 */
477 ctrl_outw(ctrl_inw(PORT_PJCR) & ~0x0003, PORT_PJCR);
478
479 /* KEYSC */
480 ctrl_outw(ctrl_inw(PORT_PYCR) & ~0x0fff, PORT_PYCR);
481 ctrl_outw(ctrl_inw(PORT_PZCR) & ~0x0ff0, PORT_PZCR);
482 ctrl_outw(ctrl_inw(PORT_PSELA) & ~0x4100, PORT_PSELA);
483 ctrl_outw(ctrl_inw(PORT_HIZCRA) & ~0x4000, PORT_HIZCRA);
484 ctrl_outw(ctrl_inw(PORT_HIZCRC) & ~0xc000, PORT_HIZCRC);
485
486 /* NAND Flash */
487 ctrl_outw(ctrl_inw(PORT_PXCR) & 0x0fff, PORT_PXCR);
488 ctrl_outl((ctrl_inl(BSC_CS6ABCR) & ~0x00000600) | 0x00000200,
489 BSC_CS6ABCR);
490
491 /* Touch Panel - Enable IRQ6 */
492 ctrl_outw(ctrl_inw(PORT_PZCR) & ~0xc, PORT_PZCR);
493 ctrl_outw((ctrl_inw(PORT_PSELA) | 0x8000), PORT_PSELA);
494 ctrl_outw((ctrl_inw(PORT_HIZCRC) & ~0x4000), PORT_HIZCRC);
495
496#ifdef CONFIG_SH_MIGOR_RTA_WVGA
497 /* LCDC - WVGA - Enable RGB Interface signals */
498 ctrl_outw(ctrl_inw(PORT_PACR) & ~0x0003, PORT_PACR);
499 ctrl_outw(0x0000, PORT_PHCR);
500 ctrl_outw(0x0000, PORT_PLCR);
501 ctrl_outw(0x0000, PORT_PMCR);
502 ctrl_outw(ctrl_inw(PORT_PRCR) & ~0x000f, PORT_PRCR);
503 ctrl_outw((ctrl_inw(PORT_PSELD) & ~0x000d) | 0x0400, PORT_PSELD);
504 ctrl_outw(ctrl_inw(PORT_MSELCRB) & ~0x0100, PORT_MSELCRB);
505 ctrl_outw(ctrl_inw(PORT_HIZCRA) & ~0x01e0, PORT_HIZCRA);
506#endif
507#ifdef CONFIG_SH_MIGOR_QVGA
508 /* LCDC - QVGA - Enable SYS Interface signals */
509 ctrl_outw(ctrl_inw(PORT_PACR) & ~0x0003, PORT_PACR);
510 ctrl_outw((ctrl_inw(PORT_PHCR) & ~0xcfff) | 0x0010, PORT_PHCR);
511 ctrl_outw(0x0000, PORT_PLCR);
512 ctrl_outw(0x0000, PORT_PMCR);
513 ctrl_outw(ctrl_inw(PORT_PRCR) & ~0x030f, PORT_PRCR);
514 ctrl_outw((ctrl_inw(PORT_PSELD) & ~0x0001) | 0x0420, PORT_PSELD);
515 ctrl_outw(ctrl_inw(PORT_MSELCRB) | 0x0100, PORT_MSELCRB);
516 ctrl_outw(ctrl_inw(PORT_HIZCRA) & ~0x01e0, PORT_HIZCRA);
517#endif
518
519 /* CEU */
520 ctrl_outw((ctrl_inw(PORT_PTCR) & ~0x03c3) | 0x0051, PORT_PTCR);
521 ctrl_outw(ctrl_inw(PORT_PUCR) & ~0x03ff, PORT_PUCR);
522 ctrl_outw(ctrl_inw(PORT_PVCR) & ~0x03ff, PORT_PVCR);
523 ctrl_outw(ctrl_inw(PORT_PWCR) & ~0x3c00, PORT_PWCR);
524 ctrl_outw(ctrl_inw(PORT_PSELC) | 0x0001, PORT_PSELC);
525 ctrl_outw(ctrl_inw(PORT_PSELD) & ~0x2000, PORT_PSELD);
526 ctrl_outw(ctrl_inw(PORT_PSELE) | 0x000f, PORT_PSELE);
527 ctrl_outw(ctrl_inw(PORT_MSELCRB) | 0x2200, PORT_MSELCRB);
528 ctrl_outw(ctrl_inw(PORT_HIZCRA) & ~0x0a00, PORT_HIZCRA);
529 ctrl_outw(ctrl_inw(PORT_HIZCRB) & ~0x0003, PORT_HIZCRB);
530} 585}
531 586
532static struct sh_machine_vector mv_migor __initmv = { 587static struct sh_machine_vector mv_migor __initmv = {
diff --git a/arch/sh/boards/mach-r2d/irq.c b/arch/sh/boards/mach-r2d/irq.c
index 8e49f6e5124..c70fecedcac 100644
--- a/arch/sh/boards/mach-r2d/irq.c
+++ b/arch/sh/boards/mach-r2d/irq.c
@@ -13,7 +13,7 @@
13#include <linux/irq.h> 13#include <linux/irq.h>
14#include <linux/interrupt.h> 14#include <linux/interrupt.h>
15#include <linux/io.h> 15#include <linux/io.h>
16#include <asm/rts7751r2d.h> 16#include <mach/r2d.h>
17 17
18#define R2D_NR_IRL 13 18#define R2D_NR_IRL 13
19 19
diff --git a/arch/sh/boards/mach-r2d/setup.c b/arch/sh/boards/mach-r2d/setup.c
index 2308e8753bc..c585be00956 100644
--- a/arch/sh/boards/mach-r2d/setup.c
+++ b/arch/sh/boards/mach-r2d/setup.c
@@ -18,7 +18,7 @@
18#include <linux/spi/spi.h> 18#include <linux/spi/spi.h>
19#include <linux/spi/spi_bitbang.h> 19#include <linux/spi/spi_bitbang.h>
20#include <asm/machvec.h> 20#include <asm/machvec.h>
21#include <asm/rts7751r2d.h> 21#include <mach/r2d.h>
22#include <asm/io.h> 22#include <asm/io.h>
23#include <asm/io_trapped.h> 23#include <asm/io_trapped.h>
24#include <asm/spi.h> 24#include <asm/spi.h>
diff --git a/arch/sh/boards/mach-sdk7780/irq.c b/arch/sh/boards/mach-sdk7780/irq.c
index 87cdc578f6f..855558163c5 100644
--- a/arch/sh/boards/mach-sdk7780/irq.c
+++ b/arch/sh/boards/mach-sdk7780/irq.c
@@ -12,7 +12,7 @@
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/irq.h> 13#include <linux/irq.h>
14#include <linux/io.h> 14#include <linux/io.h>
15#include <asm/sdk7780.h> 15#include <mach/sdk7780.h>
16 16
17enum { 17enum {
18 UNUSED = 0, 18 UNUSED = 0,
diff --git a/arch/sh/boards/mach-sdk7780/setup.c b/arch/sh/boards/mach-sdk7780/setup.c
index acc5932587f..aad94a78dc7 100644
--- a/arch/sh/boards/mach-sdk7780/setup.c
+++ b/arch/sh/boards/mach-sdk7780/setup.c
@@ -13,7 +13,7 @@
13#include <linux/platform_device.h> 13#include <linux/platform_device.h>
14#include <linux/ata_platform.h> 14#include <linux/ata_platform.h>
15#include <asm/machvec.h> 15#include <asm/machvec.h>
16#include <asm/sdk7780.h> 16#include <mach/sdk7780.h>
17#include <asm/heartbeat.h> 17#include <asm/heartbeat.h>
18#include <asm/io.h> 18#include <asm/io.h>
19#include <asm/addrspace.h> 19#include <asm/addrspace.h>
diff --git a/arch/sh/boards/mach-sh7763rdp/irq.c b/arch/sh/boards/mach-sh7763rdp/irq.c
index fd850bad2de..d8ebfa7d8c7 100644
--- a/arch/sh/boards/mach-sh7763rdp/irq.c
+++ b/arch/sh/boards/mach-sh7763rdp/irq.c
@@ -15,7 +15,7 @@
15#include <linux/irq.h> 15#include <linux/irq.h>
16#include <asm/io.h> 16#include <asm/io.h>
17#include <asm/irq.h> 17#include <asm/irq.h>
18#include <asm/sh7763rdp.h> 18#include <mach/sh7763rdp.h>
19 19
20#define INTC_BASE (0xFFD00000) 20#define INTC_BASE (0xFFD00000)
21#define INTC_INT2PRI7 (INTC_BASE+0x4001C) 21#define INTC_INT2PRI7 (INTC_BASE+0x4001C)
diff --git a/arch/sh/boards/mach-sh7763rdp/setup.c b/arch/sh/boards/mach-sh7763rdp/setup.c
index 23850da05e3..6f926fd2162 100644
--- a/arch/sh/boards/mach-sh7763rdp/setup.c
+++ b/arch/sh/boards/mach-sh7763rdp/setup.c
@@ -17,7 +17,7 @@
17#include <linux/mtd/physmap.h> 17#include <linux/mtd/physmap.h>
18#include <linux/fb.h> 18#include <linux/fb.h>
19#include <linux/io.h> 19#include <linux/io.h>
20#include <asm/sh7763rdp.h> 20#include <mach/sh7763rdp.h>
21#include <asm/sh_eth.h> 21#include <asm/sh_eth.h>
22#include <asm/sh7760fb.h> 22#include <asm/sh7760fb.h>
23 23
diff --git a/arch/sh/boards/mach-snapgear/setup.c b/arch/sh/boards/mach-snapgear/setup.c
index a5e349d3dda..a3277a23cf1 100644
--- a/arch/sh/boards/mach-snapgear/setup.c
+++ b/arch/sh/boards/mach-snapgear/setup.c
@@ -19,7 +19,7 @@
19#include <linux/module.h> 19#include <linux/module.h>
20#include <linux/sched.h> 20#include <linux/sched.h>
21#include <asm/machvec.h> 21#include <asm/machvec.h>
22#include <asm/snapgear.h> 22#include <mach/snapgear.h>
23#include <asm/irq.h> 23#include <asm/irq.h>
24#include <asm/io.h> 24#include <asm/io.h>
25#include <cpu/timer.h> 25#include <cpu/timer.h>
diff --git a/arch/sh/boards/mach-systemh/io.c b/arch/sh/boards/mach-systemh/io.c
index 1b767e1a142..dec3db0ee93 100644
--- a/arch/sh/boards/mach-systemh/io.c
+++ b/arch/sh/boards/mach-systemh/io.c
@@ -9,7 +9,7 @@
9#include <linux/kernel.h> 9#include <linux/kernel.h>
10#include <linux/types.h> 10#include <linux/types.h>
11#include <linux/pci.h> 11#include <linux/pci.h>
12#include <asm/systemh7751.h> 12#include <mach/systemh7751.h>
13#include <asm/addrspace.h> 13#include <asm/addrspace.h>
14#include <asm/io.h> 14#include <asm/io.h>
15 15
diff --git a/arch/sh/boards/mach-systemh/irq.c b/arch/sh/boards/mach-systemh/irq.c
index 601c9c8cdbe..538406872a8 100644
--- a/arch/sh/boards/mach-systemh/irq.c
+++ b/arch/sh/boards/mach-systemh/irq.c
@@ -14,7 +14,7 @@
14#include <linux/interrupt.h> 14#include <linux/interrupt.h>
15 15
16#include <asm/io.h> 16#include <asm/io.h>
17#include <asm/systemh7751.h> 17#include <mach/systemh7751.h>
18#include <asm/smc37c93x.h> 18#include <asm/smc37c93x.h>
19 19
20/* address of external interrupt mask register 20/* address of external interrupt mask register
diff --git a/arch/sh/boards/mach-systemh/setup.c b/arch/sh/boards/mach-systemh/setup.c
index ee78af84277..219fd800a43 100644
--- a/arch/sh/boards/mach-systemh/setup.c
+++ b/arch/sh/boards/mach-systemh/setup.c
@@ -16,7 +16,7 @@
16 */ 16 */
17#include <linux/init.h> 17#include <linux/init.h>
18#include <asm/machvec.h> 18#include <asm/machvec.h>
19#include <asm/systemh7751.h> 19#include <mach/systemh7751.h>
20 20
21extern void make_systemh_irq(unsigned int irq); 21extern void make_systemh_irq(unsigned int irq);
22 22
diff --git a/arch/sh/boards/mach-titan/io.c b/arch/sh/boards/mach-titan/io.c
index 4730c1dd697..4badad4c6f3 100644
--- a/arch/sh/boards/mach-titan/io.c
+++ b/arch/sh/boards/mach-titan/io.c
@@ -4,7 +4,7 @@
4#include <linux/pci.h> 4#include <linux/pci.h>
5#include <asm/machvec.h> 5#include <asm/machvec.h>
6#include <asm/addrspace.h> 6#include <asm/addrspace.h>
7#include <asm/titan.h> 7#include <mach/titan.h>
8#include <asm/io.h> 8#include <asm/io.h>
9 9
10static inline unsigned int port2adr(unsigned int port) 10static inline unsigned int port2adr(unsigned int port)
diff --git a/arch/sh/boards/mach-titan/setup.c b/arch/sh/boards/mach-titan/setup.c
index 5de3b2ad71a..81e7e0f0386 100644
--- a/arch/sh/boards/mach-titan/setup.c
+++ b/arch/sh/boards/mach-titan/setup.c
@@ -9,7 +9,7 @@
9 */ 9 */
10#include <linux/init.h> 10#include <linux/init.h>
11#include <linux/irq.h> 11#include <linux/irq.h>
12#include <asm/titan.h> 12#include <mach/titan.h>
13#include <asm/io.h> 13#include <asm/io.h>
14 14
15static void __init init_titan_irq(void) 15static void __init init_titan_irq(void)
diff --git a/arch/sh/boot/.gitignore b/arch/sh/boot/.gitignore
index b6718de2369..aad5edddf93 100644
--- a/arch/sh/boot/.gitignore
+++ b/arch/sh/boot/.gitignore
@@ -1 +1,4 @@
1zImage 1zImage
2vmlinux.srec
3uImage
4uImage.srec
diff --git a/arch/sh/boot/Makefile b/arch/sh/boot/Makefile
index 5b54965eef9..c16ccd4bfa1 100644
--- a/arch/sh/boot/Makefile
+++ b/arch/sh/boot/Makefile
@@ -33,10 +33,16 @@ $(obj)/zImage: $(obj)/compressed/vmlinux FORCE
33$(obj)/compressed/vmlinux: FORCE 33$(obj)/compressed/vmlinux: FORCE
34 $(Q)$(MAKE) $(build)=$(obj)/compressed $@ 34 $(Q)$(MAKE) $(build)=$(obj)/compressed $@
35 35
36ifeq ($(CONFIG_32BIT),y)
37KERNEL_LOAD := $(shell /bin/bash -c 'printf "0x%08x" \
38 $$[$(CONFIG_PAGE_OFFSET) + \
39 $(CONFIG_ZERO_PAGE_OFFSET)]')
40else
36KERNEL_LOAD := $(shell /bin/bash -c 'printf "0x%08x" \ 41KERNEL_LOAD := $(shell /bin/bash -c 'printf "0x%08x" \
37 $$[$(CONFIG_PAGE_OFFSET) + \ 42 $$[$(CONFIG_PAGE_OFFSET) + \
38 $(CONFIG_MEMORY_START) + \ 43 $(CONFIG_MEMORY_START) + \
39 $(CONFIG_ZERO_PAGE_OFFSET)]') 44 $(CONFIG_ZERO_PAGE_OFFSET)]')
45endif
40 46
41KERNEL_ENTRY := $(shell /bin/bash -c 'printf "0x%08x" \ 47KERNEL_ENTRY := $(shell /bin/bash -c 'printf "0x%08x" \
42 $$[$(CONFIG_PAGE_OFFSET) + \ 48 $$[$(CONFIG_PAGE_OFFSET) + \
diff --git a/arch/sh/boot/compressed/Makefile_32 b/arch/sh/boot/compressed/Makefile_32
index 47685f618ae..301e6d50325 100644
--- a/arch/sh/boot/compressed/Makefile_32
+++ b/arch/sh/boot/compressed/Makefile_32
@@ -23,6 +23,11 @@ IMAGE_OFFSET := $(shell /bin/bash -c 'printf "0x%08x" \
23 23
24LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) 24LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
25 25
26ifeq ($(CONFIG_FTRACE),y)
27ORIG_CFLAGS := $(KBUILD_CFLAGS)
28KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS))
29endif
30
26LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -e startup -T $(obj)/../../kernel/vmlinux.lds 31LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -e startup -T $(obj)/../../kernel/vmlinux.lds
27 32
28$(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o $(LIBGCC) FORCE 33$(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o $(LIBGCC) FORCE
diff --git a/arch/sh/boot/compressed/misc_32.c b/arch/sh/boot/compressed/misc_32.c
index f386997e4d9..efdba6b2957 100644
--- a/arch/sh/boot/compressed/misc_32.c
+++ b/arch/sh/boot/compressed/misc_32.c
@@ -191,7 +191,7 @@ long* stack_start = &user_stack[STACK_SIZE];
191 191
192void decompress_kernel(void) 192void decompress_kernel(void)
193{ 193{
194 output_data = 0; 194 output_data = NULL;
195 output_ptr = PHYSADDR((unsigned long)&_text+PAGE_SIZE); 195 output_ptr = PHYSADDR((unsigned long)&_text+PAGE_SIZE);
196#ifdef CONFIG_29BIT 196#ifdef CONFIG_29BIT
197 output_ptr |= P2SEG; 197 output_ptr |= P2SEG;
diff --git a/arch/sh/configs/edosk7760_defconfig b/arch/sh/configs/edosk7760_defconfig
new file mode 100644
index 00000000000..bef07fa8d85
--- /dev/null
+++ b/arch/sh/configs/edosk7760_defconfig
@@ -0,0 +1,1050 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.26
4# Tue Aug 26 11:36:09 2008
5#
6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y
8CONFIG_RWSEM_GENERIC_SPINLOCK=y
9CONFIG_GENERIC_BUG=y
10CONFIG_GENERIC_FIND_NEXT_BIT=y
11CONFIG_GENERIC_HWEIGHT=y
12CONFIG_GENERIC_HARDIRQS=y
13CONFIG_GENERIC_IRQ_PROBE=y
14CONFIG_GENERIC_CALIBRATE_DELAY=y
15CONFIG_GENERIC_TIME=y
16CONFIG_GENERIC_CLOCKEVENTS=y
17CONFIG_STACKTRACE_SUPPORT=y
18CONFIG_LOCKDEP_SUPPORT=y
19# CONFIG_ARCH_HAS_ILOG2_U32 is not set
20# CONFIG_ARCH_HAS_ILOG2_U64 is not set
21CONFIG_ARCH_NO_VIRT_TO_BUS=y
22CONFIG_ARCH_SUPPORTS_AOUT=y
23CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
24
25#
26# General setup
27#
28CONFIG_EXPERIMENTAL=y
29CONFIG_BROKEN_ON_SMP=y
30CONFIG_LOCK_KERNEL=y
31CONFIG_INIT_ENV_ARG_LIMIT=32
32CONFIG_LOCALVERSION="_edosk7760"
33CONFIG_LOCALVERSION_AUTO=y
34CONFIG_SWAP=y
35CONFIG_SYSVIPC=y
36CONFIG_SYSVIPC_SYSCTL=y
37CONFIG_POSIX_MQUEUE=y
38CONFIG_BSD_PROCESS_ACCT=y
39# CONFIG_BSD_PROCESS_ACCT_V3 is not set
40# CONFIG_TASKSTATS is not set
41# CONFIG_AUDIT is not set
42CONFIG_IKCONFIG=y
43CONFIG_IKCONFIG_PROC=y
44CONFIG_LOG_BUF_SHIFT=17
45# CONFIG_CGROUPS is not set
46# CONFIG_GROUP_SCHED is not set
47CONFIG_SYSFS_DEPRECATED=y
48CONFIG_SYSFS_DEPRECATED_V2=y
49# CONFIG_RELAY is not set
50# CONFIG_NAMESPACES is not set
51CONFIG_BLK_DEV_INITRD=y
52CONFIG_INITRAMFS_SOURCE=""
53CONFIG_CC_OPTIMIZE_FOR_SIZE=y
54CONFIG_SYSCTL=y
55CONFIG_EMBEDDED=y
56CONFIG_UID16=y
57CONFIG_SYSCTL_SYSCALL=y
58CONFIG_SYSCTL_SYSCALL_CHECK=y
59CONFIG_KALLSYMS=y
60CONFIG_KALLSYMS_ALL=y
61# CONFIG_KALLSYMS_EXTRA_PASS is not set
62CONFIG_HOTPLUG=y
63CONFIG_PRINTK=y
64CONFIG_BUG=y
65CONFIG_ELF_CORE=y
66CONFIG_COMPAT_BRK=y
67CONFIG_BASE_FULL=y
68CONFIG_FUTEX=y
69CONFIG_ANON_INODES=y
70CONFIG_EPOLL=y
71CONFIG_SIGNALFD=y
72CONFIG_TIMERFD=y
73CONFIG_EVENTFD=y
74CONFIG_SHMEM=y
75CONFIG_VM_EVENT_COUNTERS=y
76CONFIG_SLUB_DEBUG=y
77# CONFIG_SLAB is not set
78CONFIG_SLUB=y
79# CONFIG_SLOB is not set
80# CONFIG_PROFILING is not set
81# CONFIG_MARKERS is not set
82CONFIG_HAVE_OPROFILE=y
83# CONFIG_HAVE_KPROBES is not set
84# CONFIG_HAVE_KRETPROBES is not set
85# CONFIG_HAVE_DMA_ATTRS is not set
86CONFIG_PROC_PAGE_MONITOR=y
87CONFIG_SLABINFO=y
88CONFIG_RT_MUTEXES=y
89# CONFIG_TINY_SHMEM is not set
90CONFIG_BASE_SMALL=0
91CONFIG_MODULES=y
92# CONFIG_MODULE_FORCE_LOAD is not set
93CONFIG_MODULE_UNLOAD=y
94CONFIG_MODULE_FORCE_UNLOAD=y
95# CONFIG_MODVERSIONS is not set
96# CONFIG_MODULE_SRCVERSION_ALL is not set
97CONFIG_KMOD=y
98CONFIG_BLOCK=y
99# CONFIG_LBD is not set
100# CONFIG_BLK_DEV_IO_TRACE is not set
101# CONFIG_LSF is not set
102# CONFIG_BLK_DEV_BSG is not set
103
104#
105# IO Schedulers
106#
107CONFIG_IOSCHED_NOOP=y
108CONFIG_IOSCHED_AS=y
109CONFIG_IOSCHED_DEADLINE=y
110CONFIG_IOSCHED_CFQ=y
111# CONFIG_DEFAULT_AS is not set
112# CONFIG_DEFAULT_DEADLINE is not set
113CONFIG_DEFAULT_CFQ=y
114# CONFIG_DEFAULT_NOOP is not set
115CONFIG_DEFAULT_IOSCHED="cfq"
116CONFIG_CLASSIC_RCU=y
117
118#
119# System type
120#
121CONFIG_CPU_SH4=y
122# CONFIG_CPU_SUBTYPE_SH7619 is not set
123# CONFIG_CPU_SUBTYPE_SH7203 is not set
124# CONFIG_CPU_SUBTYPE_SH7206 is not set
125# CONFIG_CPU_SUBTYPE_SH7263 is not set
126# CONFIG_CPU_SUBTYPE_MXG is not set
127# CONFIG_CPU_SUBTYPE_SH7705 is not set
128# CONFIG_CPU_SUBTYPE_SH7706 is not set
129# CONFIG_CPU_SUBTYPE_SH7707 is not set
130# CONFIG_CPU_SUBTYPE_SH7708 is not set
131# CONFIG_CPU_SUBTYPE_SH7709 is not set
132# CONFIG_CPU_SUBTYPE_SH7710 is not set
133# CONFIG_CPU_SUBTYPE_SH7712 is not set
134# CONFIG_CPU_SUBTYPE_SH7720 is not set
135# CONFIG_CPU_SUBTYPE_SH7721 is not set
136# CONFIG_CPU_SUBTYPE_SH7750 is not set
137# CONFIG_CPU_SUBTYPE_SH7091 is not set
138# CONFIG_CPU_SUBTYPE_SH7750R is not set
139# CONFIG_CPU_SUBTYPE_SH7750S is not set
140# CONFIG_CPU_SUBTYPE_SH7751 is not set
141# CONFIG_CPU_SUBTYPE_SH7751R is not set
142CONFIG_CPU_SUBTYPE_SH7760=y
143# CONFIG_CPU_SUBTYPE_SH4_202 is not set
144# CONFIG_CPU_SUBTYPE_SH7723 is not set
145# CONFIG_CPU_SUBTYPE_SH7763 is not set
146# CONFIG_CPU_SUBTYPE_SH7770 is not set
147# CONFIG_CPU_SUBTYPE_SH7780 is not set
148# CONFIG_CPU_SUBTYPE_SH7785 is not set
149# CONFIG_CPU_SUBTYPE_SHX3 is not set
150# CONFIG_CPU_SUBTYPE_SH7343 is not set
151# CONFIG_CPU_SUBTYPE_SH7722 is not set
152# CONFIG_CPU_SUBTYPE_SH7366 is not set
153# CONFIG_CPU_SUBTYPE_SH5_101 is not set
154# CONFIG_CPU_SUBTYPE_SH5_103 is not set
155
156#
157# Memory management options
158#
159CONFIG_QUICKLIST=y
160CONFIG_MMU=y
161CONFIG_PAGE_OFFSET=0x80000000
162CONFIG_MEMORY_START=0x0c000000
163CONFIG_MEMORY_SIZE=0x04000000
164CONFIG_29BIT=y
165CONFIG_VSYSCALL=y
166CONFIG_ARCH_FLATMEM_ENABLE=y
167CONFIG_ARCH_SPARSEMEM_ENABLE=y
168CONFIG_ARCH_SPARSEMEM_DEFAULT=y
169CONFIG_MAX_ACTIVE_REGIONS=1
170CONFIG_ARCH_POPULATES_NODE_MAP=y
171CONFIG_ARCH_SELECT_MEMORY_MODEL=y
172CONFIG_PAGE_SIZE_4KB=y
173# CONFIG_PAGE_SIZE_8KB is not set
174# CONFIG_PAGE_SIZE_64KB is not set
175CONFIG_SELECT_MEMORY_MODEL=y
176CONFIG_FLATMEM_MANUAL=y
177# CONFIG_DISCONTIGMEM_MANUAL is not set
178# CONFIG_SPARSEMEM_MANUAL is not set
179CONFIG_FLATMEM=y
180CONFIG_FLAT_NODE_MEM_MAP=y
181CONFIG_SPARSEMEM_STATIC=y
182# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
183CONFIG_PAGEFLAGS_EXTENDED=y
184CONFIG_SPLIT_PTLOCK_CPUS=4
185# CONFIG_RESOURCES_64BIT is not set
186CONFIG_ZONE_DMA_FLAG=0
187CONFIG_NR_QUICK=2
188
189#
190# Cache configuration
191#
192# CONFIG_SH_DIRECT_MAPPED is not set
193CONFIG_CACHE_WRITEBACK=y
194# CONFIG_CACHE_WRITETHROUGH is not set
195# CONFIG_CACHE_OFF is not set
196
197#
198# Processor features
199#
200CONFIG_CPU_LITTLE_ENDIAN=y
201# CONFIG_CPU_BIG_ENDIAN is not set
202CONFIG_SH_FPU=y
203CONFIG_SH_STORE_QUEUES=y
204CONFIG_CPU_HAS_INTEVT=y
205CONFIG_CPU_HAS_SR_RB=y
206CONFIG_CPU_HAS_PTEA=y
207CONFIG_CPU_HAS_FPU=y
208
209#
210# Board support
211#
212CONFIG_SH_EDOSK7760=y
213
214#
215# Timer and clock configuration
216#
217CONFIG_SH_TMU=y
218CONFIG_SH_TIMER_IRQ=16
219CONFIG_SH_PCLK_FREQ=33333333
220CONFIG_TICK_ONESHOT=y
221# CONFIG_NO_HZ is not set
222CONFIG_HIGH_RES_TIMERS=y
223CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
224
225#
226# CPU Frequency scaling
227#
228# CONFIG_CPU_FREQ is not set
229
230#
231# DMA support
232#
233CONFIG_SH_DMA_API=y
234CONFIG_SH_DMA=y
235CONFIG_NR_ONCHIP_DMA_CHANNELS=4
236# CONFIG_NR_DMA_CHANNELS_BOOL is not set
237# CONFIG_SH_DMABRG is not set
238
239#
240# Companion Chips
241#
242
243#
244# Additional SuperH Device Drivers
245#
246# CONFIG_HEARTBEAT is not set
247# CONFIG_PUSH_SWITCH is not set
248
249#
250# Kernel features
251#
252# CONFIG_HZ_100 is not set
253CONFIG_HZ_250=y
254# CONFIG_HZ_300 is not set
255# CONFIG_HZ_1000 is not set
256CONFIG_HZ=250
257# CONFIG_SCHED_HRTICK is not set
258# CONFIG_KEXEC is not set
259# CONFIG_CRASH_DUMP is not set
260# CONFIG_PREEMPT_NONE is not set
261# CONFIG_PREEMPT_VOLUNTARY is not set
262CONFIG_PREEMPT=y
263# CONFIG_PREEMPT_RCU is not set
264CONFIG_GUSA=y
265# CONFIG_GUSA_RB is not set
266
267#
268# Boot options
269#
270CONFIG_ZERO_PAGE_OFFSET=0x00001000
271CONFIG_BOOT_LINK_OFFSET=0x02000000
272# CONFIG_UBC_WAKEUP is not set
273CONFIG_CMDLINE_BOOL=y
274CONFIG_CMDLINE="mem=64M console=ttySC2,115200 root=/dev/nfs rw nfsroot=192.168.0.3:/scripts/filesys ip=192.168.0.4"
275
276#
277# Bus options
278#
279# CONFIG_ARCH_SUPPORTS_MSI is not set
280# CONFIG_PCCARD is not set
281
282#
283# Executable file formats
284#
285CONFIG_BINFMT_ELF=y
286# CONFIG_BINFMT_MISC is not set
287
288#
289# Networking
290#
291CONFIG_NET=y
292
293#
294# Networking options
295#
296CONFIG_PACKET=y
297# CONFIG_PACKET_MMAP is not set
298CONFIG_UNIX=y
299# CONFIG_NET_KEY is not set
300CONFIG_INET=y
301# CONFIG_IP_MULTICAST is not set
302# CONFIG_IP_ADVANCED_ROUTER is not set
303CONFIG_IP_FIB_HASH=y
304CONFIG_IP_PNP=y
305# CONFIG_IP_PNP_DHCP is not set
306CONFIG_IP_PNP_BOOTP=y
307# CONFIG_IP_PNP_RARP is not set
308# CONFIG_NET_IPIP is not set
309# CONFIG_NET_IPGRE is not set
310# CONFIG_ARPD is not set
311# CONFIG_SYN_COOKIES is not set
312# CONFIG_INET_AH is not set
313# CONFIG_INET_ESP is not set
314# CONFIG_INET_IPCOMP is not set
315# CONFIG_INET_XFRM_TUNNEL is not set
316# CONFIG_INET_TUNNEL is not set
317# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
318# CONFIG_INET_XFRM_MODE_TUNNEL is not set
319# CONFIG_INET_XFRM_MODE_BEET is not set
320# CONFIG_INET_LRO is not set
321CONFIG_INET_DIAG=y
322CONFIG_INET_TCP_DIAG=y
323# CONFIG_TCP_CONG_ADVANCED is not set
324CONFIG_TCP_CONG_CUBIC=y
325CONFIG_DEFAULT_TCP_CONG="cubic"
326# CONFIG_TCP_MD5SIG is not set
327# CONFIG_IPV6 is not set
328# CONFIG_NETWORK_SECMARK is not set
329# CONFIG_NETFILTER is not set
330# CONFIG_IP_DCCP is not set
331# CONFIG_IP_SCTP is not set
332# CONFIG_TIPC is not set
333# CONFIG_ATM is not set
334# CONFIG_BRIDGE is not set
335# CONFIG_VLAN_8021Q is not set
336# CONFIG_DECNET is not set
337# CONFIG_LLC2 is not set
338# CONFIG_IPX is not set
339# CONFIG_ATALK is not set
340# CONFIG_X25 is not set
341# CONFIG_LAPB is not set
342# CONFIG_ECONET is not set
343# CONFIG_WAN_ROUTER is not set
344# CONFIG_NET_SCHED is not set
345
346#
347# Network testing
348#
349# CONFIG_NET_PKTGEN is not set
350# CONFIG_HAMRADIO is not set
351# CONFIG_CAN is not set
352# CONFIG_IRDA is not set
353# CONFIG_BT is not set
354# CONFIG_AF_RXRPC is not set
355
356#
357# Wireless
358#
359# CONFIG_CFG80211 is not set
360# CONFIG_WIRELESS_EXT is not set
361# CONFIG_MAC80211 is not set
362# CONFIG_IEEE80211 is not set
363# CONFIG_RFKILL is not set
364# CONFIG_NET_9P is not set
365
366#
367# Device Drivers
368#
369
370#
371# Generic Driver Options
372#
373CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
374CONFIG_STANDALONE=y
375CONFIG_PREVENT_FIRMWARE_BUILD=y
376# CONFIG_FW_LOADER is not set
377CONFIG_DEBUG_DRIVER=y
378CONFIG_DEBUG_DEVRES=y
379# CONFIG_SYS_HYPERVISOR is not set
380# CONFIG_CONNECTOR is not set
381CONFIG_MTD=y
382CONFIG_MTD_DEBUG=y
383CONFIG_MTD_DEBUG_VERBOSE=0
384CONFIG_MTD_CONCAT=y
385CONFIG_MTD_PARTITIONS=y
386# CONFIG_MTD_REDBOOT_PARTS is not set
387CONFIG_MTD_CMDLINE_PARTS=y
388# CONFIG_MTD_AR7_PARTS is not set
389
390#
391# User Modules And Translation Layers
392#
393CONFIG_MTD_CHAR=y
394CONFIG_MTD_BLKDEVS=y
395CONFIG_MTD_BLOCK=y
396# CONFIG_FTL is not set
397# CONFIG_NFTL is not set
398# CONFIG_INFTL is not set
399# CONFIG_RFD_FTL is not set
400# CONFIG_SSFDC is not set
401# CONFIG_MTD_OOPS is not set
402
403#
404# RAM/ROM/Flash chip drivers
405#
406CONFIG_MTD_CFI=y
407CONFIG_MTD_JEDECPROBE=y
408CONFIG_MTD_GEN_PROBE=y
409CONFIG_MTD_CFI_ADV_OPTIONS=y
410CONFIG_MTD_CFI_NOSWAP=y
411# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
412# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
413CONFIG_MTD_CFI_GEOMETRY=y
414CONFIG_MTD_MAP_BANK_WIDTH_1=y
415CONFIG_MTD_MAP_BANK_WIDTH_2=y
416CONFIG_MTD_MAP_BANK_WIDTH_4=y
417CONFIG_MTD_MAP_BANK_WIDTH_8=y
418CONFIG_MTD_MAP_BANK_WIDTH_16=y
419CONFIG_MTD_MAP_BANK_WIDTH_32=y
420CONFIG_MTD_CFI_I1=y
421CONFIG_MTD_CFI_I2=y
422CONFIG_MTD_CFI_I4=y
423CONFIG_MTD_CFI_I8=y
424# CONFIG_MTD_OTP is not set
425CONFIG_MTD_CFI_INTELEXT=y
426CONFIG_MTD_CFI_AMDSTD=y
427CONFIG_MTD_CFI_STAA=y
428CONFIG_MTD_CFI_UTIL=y
429CONFIG_MTD_RAM=y
430CONFIG_MTD_ROM=y
431CONFIG_MTD_ABSENT=y
432
433#
434# Mapping drivers for chip access
435#
436# CONFIG_MTD_COMPLEX_MAPPINGS is not set
437CONFIG_MTD_PHYSMAP=y
438CONFIG_MTD_PHYSMAP_START=0xffffffff
439CONFIG_MTD_PHYSMAP_LEN=0x0
440CONFIG_MTD_PHYSMAP_BANKWIDTH=4
441# CONFIG_MTD_PLATRAM is not set
442
443#
444# Self-contained MTD device drivers
445#
446# CONFIG_MTD_SLRAM is not set
447# CONFIG_MTD_PHRAM is not set
448# CONFIG_MTD_MTDRAM is not set
449# CONFIG_MTD_BLOCK2MTD is not set
450
451#
452# Disk-On-Chip Device Drivers
453#
454# CONFIG_MTD_DOC2000 is not set
455# CONFIG_MTD_DOC2001 is not set
456# CONFIG_MTD_DOC2001PLUS is not set
457# CONFIG_MTD_NAND is not set
458# CONFIG_MTD_ONENAND is not set
459
460#
461# UBI - Unsorted block images
462#
463# CONFIG_MTD_UBI is not set
464# CONFIG_PARPORT is not set
465CONFIG_BLK_DEV=y
466# CONFIG_BLK_DEV_COW_COMMON is not set
467# CONFIG_BLK_DEV_LOOP is not set
468# CONFIG_BLK_DEV_NBD is not set
469CONFIG_BLK_DEV_RAM=y
470CONFIG_BLK_DEV_RAM_COUNT=16
471CONFIG_BLK_DEV_RAM_SIZE=26000
472# CONFIG_BLK_DEV_XIP is not set
473# CONFIG_CDROM_PKTCDVD is not set
474# CONFIG_ATA_OVER_ETH is not set
475# CONFIG_MISC_DEVICES is not set
476CONFIG_HAVE_IDE=y
477# CONFIG_IDE is not set
478
479#
480# SCSI device support
481#
482# CONFIG_RAID_ATTRS is not set
483# CONFIG_SCSI is not set
484# CONFIG_SCSI_DMA is not set
485# CONFIG_SCSI_NETLINK is not set
486# CONFIG_ATA is not set
487# CONFIG_MD is not set
488CONFIG_NETDEVICES=y
489# CONFIG_NETDEVICES_MULTIQUEUE is not set
490# CONFIG_DUMMY is not set
491# CONFIG_BONDING is not set
492# CONFIG_MACVLAN is not set
493# CONFIG_EQUALIZER is not set
494# CONFIG_TUN is not set
495# CONFIG_VETH is not set
496# CONFIG_PHYLIB is not set
497CONFIG_NET_ETHERNET=y
498CONFIG_MII=y
499# CONFIG_AX88796 is not set
500# CONFIG_STNIC is not set
501# CONFIG_SMC9194 is not set
502CONFIG_SMC91X=y
503# CONFIG_IBM_NEW_EMAC_ZMII is not set
504# CONFIG_IBM_NEW_EMAC_RGMII is not set
505# CONFIG_IBM_NEW_EMAC_TAH is not set
506# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
507# CONFIG_B44 is not set
508# CONFIG_NETDEV_1000 is not set
509# CONFIG_NETDEV_10000 is not set
510
511#
512# Wireless LAN
513#
514# CONFIG_WLAN_PRE80211 is not set
515# CONFIG_WLAN_80211 is not set
516# CONFIG_IWLWIFI_LEDS is not set
517# CONFIG_WAN is not set
518# CONFIG_PPP is not set
519# CONFIG_SLIP is not set
520# CONFIG_NETCONSOLE is not set
521# CONFIG_NETPOLL is not set
522# CONFIG_NET_POLL_CONTROLLER is not set
523# CONFIG_ISDN is not set
524# CONFIG_PHONE is not set
525
526#
527# Input device support
528#
529CONFIG_INPUT=y
530# CONFIG_INPUT_FF_MEMLESS is not set
531# CONFIG_INPUT_POLLDEV is not set
532
533#
534# Userland interfaces
535#
536# CONFIG_INPUT_MOUSEDEV is not set
537# CONFIG_INPUT_JOYDEV is not set
538# CONFIG_INPUT_EVDEV is not set
539# CONFIG_INPUT_EVBUG is not set
540
541#
542# Input Device Drivers
543#
544# CONFIG_INPUT_KEYBOARD is not set
545# CONFIG_INPUT_MOUSE is not set
546# CONFIG_INPUT_JOYSTICK is not set
547# CONFIG_INPUT_TABLET is not set
548# CONFIG_INPUT_TOUCHSCREEN is not set
549# CONFIG_INPUT_MISC is not set
550
551#
552# Hardware I/O ports
553#
554# CONFIG_SERIO is not set
555# CONFIG_GAMEPORT is not set
556
557#
558# Character devices
559#
560CONFIG_VT=y
561CONFIG_VT_CONSOLE=y
562CONFIG_HW_CONSOLE=y
563# CONFIG_VT_HW_CONSOLE_BINDING is not set
564CONFIG_DEVKMEM=y
565# CONFIG_SERIAL_NONSTANDARD is not set
566
567#
568# Serial drivers
569#
570# CONFIG_SERIAL_8250 is not set
571
572#
573# Non-8250 serial port support
574#
575CONFIG_SERIAL_SH_SCI=y
576CONFIG_SERIAL_SH_SCI_NR_UARTS=3
577CONFIG_SERIAL_SH_SCI_CONSOLE=y
578CONFIG_SERIAL_CORE=y
579CONFIG_SERIAL_CORE_CONSOLE=y
580CONFIG_UNIX98_PTYS=y
581CONFIG_LEGACY_PTYS=y
582CONFIG_LEGACY_PTY_COUNT=256
583# CONFIG_IPMI_HANDLER is not set
584CONFIG_HW_RANDOM=y
585# CONFIG_R3964 is not set
586# CONFIG_RAW_DRIVER is not set
587# CONFIG_TCG_TPM is not set
588CONFIG_I2C=y
589CONFIG_I2C_BOARDINFO=y
590CONFIG_I2C_CHARDEV=y
591
592#
593# I2C Hardware Bus support
594#
595# CONFIG_I2C_OCORES is not set
596# CONFIG_I2C_PARPORT_LIGHT is not set
597# CONFIG_I2C_SIMTEC is not set
598# CONFIG_I2C_TAOS_EVM is not set
599# CONFIG_I2C_STUB is not set
600# CONFIG_I2C_PCA_PLATFORM is not set
601CONFIG_I2C_SH7760=y
602# CONFIG_I2C_SH_MOBILE is not set
603
604#
605# Miscellaneous I2C Chip support
606#
607# CONFIG_DS1682 is not set
608# CONFIG_SENSORS_EEPROM is not set
609# CONFIG_SENSORS_PCF8574 is not set
610# CONFIG_PCF8575 is not set
611# CONFIG_SENSORS_PCF8591 is not set
612# CONFIG_SENSORS_MAX6875 is not set
613# CONFIG_SENSORS_TSL2550 is not set
614CONFIG_I2C_DEBUG_CORE=y
615CONFIG_I2C_DEBUG_ALGO=y
616CONFIG_I2C_DEBUG_BUS=y
617CONFIG_I2C_DEBUG_CHIP=y
618# CONFIG_SPI is not set
619# CONFIG_W1 is not set
620# CONFIG_POWER_SUPPLY is not set
621# CONFIG_HWMON is not set
622# CONFIG_THERMAL is not set
623# CONFIG_THERMAL_HWMON is not set
624# CONFIG_WATCHDOG is not set
625
626#
627# Sonics Silicon Backplane
628#
629CONFIG_SSB_POSSIBLE=y
630# CONFIG_SSB is not set
631
632#
633# Multifunction device drivers
634#
635# CONFIG_MFD_SM501 is not set
636# CONFIG_HTC_PASIC3 is not set
637
638#
639# Multimedia devices
640#
641
642#
643# Multimedia core support
644#
645# CONFIG_VIDEO_DEV is not set
646# CONFIG_DVB_CORE is not set
647# CONFIG_VIDEO_MEDIA is not set
648
649#
650# Multimedia drivers
651#
652# CONFIG_DAB is not set
653
654#
655# Graphics support
656#
657# CONFIG_VGASTATE is not set
658# CONFIG_VIDEO_OUTPUT_CONTROL is not set
659CONFIG_FB=m
660# CONFIG_FIRMWARE_EDID is not set
661# CONFIG_FB_DDC is not set
662CONFIG_FB_CFB_FILLRECT=m
663CONFIG_FB_CFB_COPYAREA=m
664CONFIG_FB_CFB_IMAGEBLIT=m
665# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
666# CONFIG_FB_SYS_FILLRECT is not set
667# CONFIG_FB_SYS_COPYAREA is not set
668# CONFIG_FB_SYS_IMAGEBLIT is not set
669# CONFIG_FB_FOREIGN_ENDIAN is not set
670# CONFIG_FB_SYS_FOPS is not set
671# CONFIG_FB_SVGALIB is not set
672# CONFIG_FB_MACMODES is not set
673# CONFIG_FB_BACKLIGHT is not set
674# CONFIG_FB_MODE_HELPERS is not set
675CONFIG_FB_TILEBLITTING=y
676
677#
678# Frame buffer hardware drivers
679#
680# CONFIG_FB_MB86290_640X480_16BPP is not set
681# CONFIG_FB_S1D13XXX is not set
682# CONFIG_FB_VIRTUAL is not set
683# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
684
685#
686# Display device support
687#
688# CONFIG_DISPLAY_SUPPORT is not set
689
690#
691# Console display driver support
692#
693CONFIG_DUMMY_CONSOLE=y
694# CONFIG_FRAMEBUFFER_CONSOLE is not set
695# CONFIG_LOGO is not set
696
697#
698# Sound
699#
700CONFIG_SOUND=y
701
702#
703# Advanced Linux Sound Architecture
704#
705CONFIG_SND=y
706CONFIG_SND_TIMER=y
707CONFIG_SND_PCM=y
708# CONFIG_SND_SEQUENCER is not set
709# CONFIG_SND_MIXER_OSS is not set
710# CONFIG_SND_PCM_OSS is not set
711# CONFIG_SND_DYNAMIC_MINORS is not set
712# CONFIG_SND_SUPPORT_OLD_API is not set
713# CONFIG_SND_VERBOSE_PROCFS is not set
714CONFIG_SND_VERBOSE_PRINTK=y
715# CONFIG_SND_DEBUG is not set
716
717#
718# Generic devices
719#
720# CONFIG_SND_DUMMY is not set
721# CONFIG_SND_MTPAV is not set
722# CONFIG_SND_SERIAL_U16550 is not set
723# CONFIG_SND_MPU401 is not set
724
725#
726# SUPERH devices
727#
728
729#
730# System on Chip audio support
731#
732CONFIG_SND_SOC=y
733
734#
735# SoC Audio support for SuperH
736#
737
738#
739# ALSA SoC audio for Freescale SOCs
740#
741
742#
743# SoC Audio for the Texas Instruments OMAP
744#
745
746#
747# Open Sound System
748#
749# CONFIG_SOUND_PRIME is not set
750# CONFIG_HID_SUPPORT is not set
751# CONFIG_USB_SUPPORT is not set
752# CONFIG_MMC is not set
753# CONFIG_MEMSTICK is not set
754# CONFIG_NEW_LEDS is not set
755# CONFIG_ACCESSIBILITY is not set
756# CONFIG_RTC_CLASS is not set
757# CONFIG_UIO is not set
758
759#
760# File systems
761#
762CONFIG_EXT2_FS=y
763CONFIG_EXT2_FS_XATTR=y
764# CONFIG_EXT2_FS_POSIX_ACL is not set
765# CONFIG_EXT2_FS_SECURITY is not set
766CONFIG_EXT2_FS_XIP=y
767CONFIG_FS_XIP=y
768CONFIG_EXT3_FS=y
769CONFIG_EXT3_FS_XATTR=y
770# CONFIG_EXT3_FS_POSIX_ACL is not set
771# CONFIG_EXT3_FS_SECURITY is not set
772# CONFIG_EXT4DEV_FS is not set
773CONFIG_JBD=y
774CONFIG_FS_MBCACHE=y
775# CONFIG_REISERFS_FS is not set
776# CONFIG_JFS_FS is not set
777CONFIG_FS_POSIX_ACL=y
778# CONFIG_XFS_FS is not set
779# CONFIG_OCFS2_FS is not set
780CONFIG_DNOTIFY=y
781CONFIG_INOTIFY=y
782CONFIG_INOTIFY_USER=y
783# CONFIG_QUOTA is not set
784# CONFIG_AUTOFS_FS is not set
785# CONFIG_AUTOFS4_FS is not set
786# CONFIG_FUSE_FS is not set
787CONFIG_GENERIC_ACL=y
788
789#
790# CD-ROM/DVD Filesystems
791#
792# CONFIG_ISO9660_FS is not set
793# CONFIG_UDF_FS is not set
794
795#
796# DOS/FAT/NT Filesystems
797#
798# CONFIG_MSDOS_FS is not set
799# CONFIG_VFAT_FS is not set
800# CONFIG_NTFS_FS is not set
801
802#
803# Pseudo filesystems
804#
805CONFIG_PROC_FS=y
806# CONFIG_PROC_KCORE is not set
807CONFIG_PROC_SYSCTL=y
808CONFIG_SYSFS=y
809CONFIG_TMPFS=y
810CONFIG_TMPFS_POSIX_ACL=y
811# CONFIG_HUGETLBFS is not set
812# CONFIG_HUGETLB_PAGE is not set
813# CONFIG_CONFIGFS_FS is not set
814
815#
816# Miscellaneous filesystems
817#
818# CONFIG_ADFS_FS is not set
819# CONFIG_AFFS_FS is not set
820# CONFIG_HFS_FS is not set
821# CONFIG_HFSPLUS_FS is not set
822# CONFIG_BEFS_FS is not set
823# CONFIG_BFS_FS is not set
824# CONFIG_EFS_FS is not set
825# CONFIG_JFFS2_FS is not set
826# CONFIG_CRAMFS is not set
827# CONFIG_VXFS_FS is not set
828# CONFIG_MINIX_FS is not set
829# CONFIG_HPFS_FS is not set
830# CONFIG_QNX4FS_FS is not set
831# CONFIG_ROMFS_FS is not set
832# CONFIG_SYSV_FS is not set
833# CONFIG_UFS_FS is not set
834CONFIG_NETWORK_FILESYSTEMS=y
835CONFIG_NFS_FS=y
836# CONFIG_NFS_V3 is not set
837# CONFIG_NFS_V4 is not set
838# CONFIG_NFSD is not set
839CONFIG_ROOT_NFS=y
840CONFIG_LOCKD=y
841CONFIG_NFS_COMMON=y
842CONFIG_SUNRPC=y
843# CONFIG_SUNRPC_BIND34 is not set
844# CONFIG_RPCSEC_GSS_KRB5 is not set
845# CONFIG_RPCSEC_GSS_SPKM3 is not set
846# CONFIG_SMB_FS is not set
847# CONFIG_CIFS is not set
848# CONFIG_NCP_FS is not set
849# CONFIG_CODA_FS is not set
850# CONFIG_AFS_FS is not set
851
852#
853# Partition Types
854#
855# CONFIG_PARTITION_ADVANCED is not set
856CONFIG_MSDOS_PARTITION=y
857CONFIG_NLS=y
858CONFIG_NLS_DEFAULT="iso8859-1"
859CONFIG_NLS_CODEPAGE_437=y
860# CONFIG_NLS_CODEPAGE_737 is not set
861# CONFIG_NLS_CODEPAGE_775 is not set
862# CONFIG_NLS_CODEPAGE_850 is not set
863# CONFIG_NLS_CODEPAGE_852 is not set
864# CONFIG_NLS_CODEPAGE_855 is not set
865# CONFIG_NLS_CODEPAGE_857 is not set
866# CONFIG_NLS_CODEPAGE_860 is not set
867# CONFIG_NLS_CODEPAGE_861 is not set
868# CONFIG_NLS_CODEPAGE_862 is not set
869# CONFIG_NLS_CODEPAGE_863 is not set
870# CONFIG_NLS_CODEPAGE_864 is not set
871# CONFIG_NLS_CODEPAGE_865 is not set
872# CONFIG_NLS_CODEPAGE_866 is not set
873# CONFIG_NLS_CODEPAGE_869 is not set
874# CONFIG_NLS_CODEPAGE_936 is not set
875# CONFIG_NLS_CODEPAGE_950 is not set
876# CONFIG_NLS_CODEPAGE_932 is not set
877# CONFIG_NLS_CODEPAGE_949 is not set
878# CONFIG_NLS_CODEPAGE_874 is not set
879# CONFIG_NLS_ISO8859_8 is not set
880# CONFIG_NLS_CODEPAGE_1250 is not set
881# CONFIG_NLS_CODEPAGE_1251 is not set
882CONFIG_NLS_ASCII=y
883CONFIG_NLS_ISO8859_1=y
884# CONFIG_NLS_ISO8859_2 is not set
885# CONFIG_NLS_ISO8859_3 is not set
886# CONFIG_NLS_ISO8859_4 is not set
887# CONFIG_NLS_ISO8859_5 is not set
888# CONFIG_NLS_ISO8859_6 is not set
889# CONFIG_NLS_ISO8859_7 is not set
890# CONFIG_NLS_ISO8859_9 is not set
891# CONFIG_NLS_ISO8859_13 is not set
892# CONFIG_NLS_ISO8859_14 is not set
893CONFIG_NLS_ISO8859_15=y
894# CONFIG_NLS_KOI8_R is not set
895# CONFIG_NLS_KOI8_U is not set
896CONFIG_NLS_UTF8=y
897# CONFIG_DLM is not set
898
899#
900# Kernel hacking
901#
902CONFIG_TRACE_IRQFLAGS_SUPPORT=y
903CONFIG_PRINTK_TIME=y
904CONFIG_ENABLE_WARN_DEPRECATED=y
905# CONFIG_ENABLE_MUST_CHECK is not set
906CONFIG_FRAME_WARN=1024
907CONFIG_MAGIC_SYSRQ=y
908CONFIG_UNUSED_SYMBOLS=y
909# CONFIG_DEBUG_FS is not set
910# CONFIG_HEADERS_CHECK is not set
911CONFIG_DEBUG_KERNEL=y
912CONFIG_DEBUG_SHIRQ=y
913CONFIG_DETECT_SOFTLOCKUP=y
914# CONFIG_SCHED_DEBUG is not set
915# CONFIG_SCHEDSTATS is not set
916CONFIG_TIMER_STATS=y
917# CONFIG_DEBUG_OBJECTS is not set
918# CONFIG_SLUB_DEBUG_ON is not set
919# CONFIG_SLUB_STATS is not set
920CONFIG_DEBUG_PREEMPT=y
921# CONFIG_DEBUG_RT_MUTEXES is not set
922# CONFIG_RT_MUTEX_TESTER is not set
923# CONFIG_DEBUG_SPINLOCK is not set
924# CONFIG_DEBUG_MUTEXES is not set
925# CONFIG_DEBUG_LOCK_ALLOC is not set
926# CONFIG_PROVE_LOCKING is not set
927# CONFIG_LOCK_STAT is not set
928# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
929# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
930# CONFIG_DEBUG_KOBJECT is not set
931CONFIG_DEBUG_BUGVERBOSE=y
932CONFIG_DEBUG_INFO=y
933# CONFIG_DEBUG_VM is not set
934# CONFIG_DEBUG_WRITECOUNT is not set
935# CONFIG_DEBUG_LIST is not set
936# CONFIG_DEBUG_SG is not set
937# CONFIG_FRAME_POINTER is not set
938# CONFIG_BOOT_PRINTK_DELAY is not set
939# CONFIG_RCU_TORTURE_TEST is not set
940# CONFIG_BACKTRACE_SELF_TEST is not set
941# CONFIG_FAULT_INJECTION is not set
942# CONFIG_SAMPLES is not set
943# CONFIG_SH_STANDARD_BIOS is not set
944CONFIG_EARLY_SCIF_CONSOLE=y
945CONFIG_EARLY_SCIF_CONSOLE_PORT=0xffe80000
946CONFIG_EARLY_PRINTK=y
947# CONFIG_DEBUG_BOOTMEM is not set
948CONFIG_DEBUG_STACKOVERFLOW=y
949# CONFIG_DEBUG_STACK_USAGE is not set
950# CONFIG_4KSTACKS is not set
951# CONFIG_IRQSTACKS is not set
952# CONFIG_SH_KGDB is not set
953
954#
955# Security options
956#
957# CONFIG_KEYS is not set
958# CONFIG_SECURITY is not set
959# CONFIG_SECURITY_FILE_CAPABILITIES is not set
960CONFIG_CRYPTO=y
961
962#
963# Crypto core or helper
964#
965CONFIG_CRYPTO_ALGAPI=y
966# CONFIG_CRYPTO_MANAGER is not set
967# CONFIG_CRYPTO_GF128MUL is not set
968# CONFIG_CRYPTO_NULL is not set
969# CONFIG_CRYPTO_CRYPTD is not set
970# CONFIG_CRYPTO_AUTHENC is not set
971# CONFIG_CRYPTO_TEST is not set
972
973#
974# Authenticated Encryption with Associated Data
975#
976# CONFIG_CRYPTO_CCM is not set
977# CONFIG_CRYPTO_GCM is not set
978# CONFIG_CRYPTO_SEQIV is not set
979
980#
981# Block modes
982#
983# CONFIG_CRYPTO_CBC is not set
984# CONFIG_CRYPTO_CTR is not set
985# CONFIG_CRYPTO_CTS is not set
986# CONFIG_CRYPTO_ECB is not set
987# CONFIG_CRYPTO_LRW is not set
988# CONFIG_CRYPTO_PCBC is not set
989# CONFIG_CRYPTO_XTS is not set
990
991#
992# Hash modes
993#
994# CONFIG_CRYPTO_HMAC is not set
995# CONFIG_CRYPTO_XCBC is not set
996
997#
998# Digest
999#
1000# CONFIG_CRYPTO_CRC32C is not set
1001# CONFIG_CRYPTO_MD4 is not set
1002CONFIG_CRYPTO_MD5=y
1003# CONFIG_CRYPTO_MICHAEL_MIC is not set
1004# CONFIG_CRYPTO_SHA1 is not set
1005# CONFIG_CRYPTO_SHA256 is not set
1006# CONFIG_CRYPTO_SHA512 is not set
1007# CONFIG_CRYPTO_TGR192 is not set
1008# CONFIG_CRYPTO_WP512 is not set
1009
1010#
1011# Ciphers
1012#
1013# CONFIG_CRYPTO_AES is not set
1014# CONFIG_CRYPTO_ANUBIS is not set
1015# CONFIG_CRYPTO_ARC4 is not set
1016# CONFIG_CRYPTO_BLOWFISH is not set
1017# CONFIG_CRYPTO_CAMELLIA is not set
1018# CONFIG_CRYPTO_CAST5 is not set
1019# CONFIG_CRYPTO_CAST6 is not set
1020CONFIG_CRYPTO_DES=y
1021# CONFIG_CRYPTO_FCRYPT is not set
1022# CONFIG_CRYPTO_KHAZAD is not set
1023# CONFIG_CRYPTO_SALSA20 is not set
1024# CONFIG_CRYPTO_SEED is not set
1025# CONFIG_CRYPTO_SERPENT is not set
1026# CONFIG_CRYPTO_TEA is not set
1027# CONFIG_CRYPTO_TWOFISH is not set
1028
1029#
1030# Compression
1031#
1032# CONFIG_CRYPTO_DEFLATE is not set
1033# CONFIG_CRYPTO_LZO is not set
1034CONFIG_CRYPTO_HW=y
1035
1036#
1037# Library routines
1038#
1039CONFIG_BITREVERSE=y
1040# CONFIG_GENERIC_FIND_FIRST_BIT is not set
1041# CONFIG_CRC_CCITT is not set
1042# CONFIG_CRC16 is not set
1043# CONFIG_CRC_ITU_T is not set
1044CONFIG_CRC32=y
1045# CONFIG_CRC7 is not set
1046# CONFIG_LIBCRC32C is not set
1047CONFIG_PLIST=y
1048CONFIG_HAS_IOMEM=y
1049CONFIG_HAS_IOPORT=y
1050CONFIG_HAS_DMA=y
diff --git a/arch/sh/configs/rts7751r2dplus_qemu_defconfig b/arch/sh/configs/rts7751r2dplus_qemu_defconfig
new file mode 100644
index 00000000000..a72796c0293
--- /dev/null
+++ b/arch/sh/configs/rts7751r2dplus_qemu_defconfig
@@ -0,0 +1,909 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.27-rc2
4# Mon Aug 18 22:17:44 2008
5#
6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y
8CONFIG_ARCH_DEFCONFIG="arch/sh/configs/shx3_defconfig"
9CONFIG_RWSEM_GENERIC_SPINLOCK=y
10CONFIG_GENERIC_BUG=y
11CONFIG_GENERIC_FIND_NEXT_BIT=y
12CONFIG_GENERIC_HWEIGHT=y
13CONFIG_GENERIC_HARDIRQS=y
14CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
15CONFIG_GENERIC_IRQ_PROBE=y
16CONFIG_GENERIC_CALIBRATE_DELAY=y
17CONFIG_GENERIC_TIME=y
18CONFIG_GENERIC_CLOCKEVENTS=y
19CONFIG_SYS_SUPPORTS_PCI=y
20CONFIG_STACKTRACE_SUPPORT=y
21CONFIG_LOCKDEP_SUPPORT=y
22# CONFIG_ARCH_HAS_ILOG2_U32 is not set
23# CONFIG_ARCH_HAS_ILOG2_U64 is not set
24CONFIG_ARCH_NO_VIRT_TO_BUS=y
25CONFIG_IO_TRAPPED=y
26CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
27
28#
29# General setup
30#
31CONFIG_EXPERIMENTAL=y
32CONFIG_BROKEN_ON_SMP=y
33CONFIG_INIT_ENV_ARG_LIMIT=32
34CONFIG_LOCALVERSION=""
35CONFIG_LOCALVERSION_AUTO=y
36CONFIG_SWAP=y
37CONFIG_SYSVIPC=y
38CONFIG_SYSVIPC_SYSCTL=y
39# CONFIG_BSD_PROCESS_ACCT is not set
40CONFIG_IKCONFIG=y
41CONFIG_IKCONFIG_PROC=y
42CONFIG_LOG_BUF_SHIFT=14
43# CONFIG_CGROUPS is not set
44CONFIG_GROUP_SCHED=y
45CONFIG_FAIR_GROUP_SCHED=y
46# CONFIG_RT_GROUP_SCHED is not set
47CONFIG_USER_SCHED=y
48# CONFIG_CGROUP_SCHED is not set
49CONFIG_SYSFS_DEPRECATED=y
50CONFIG_SYSFS_DEPRECATED_V2=y
51# CONFIG_RELAY is not set
52# CONFIG_NAMESPACES is not set
53CONFIG_BLK_DEV_INITRD=y
54CONFIG_INITRAMFS_SOURCE=""
55# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
56CONFIG_SYSCTL=y
57CONFIG_EMBEDDED=y
58CONFIG_UID16=y
59# CONFIG_SYSCTL_SYSCALL is not set
60CONFIG_KALLSYMS=y
61# CONFIG_KALLSYMS_ALL is not set
62# CONFIG_KALLSYMS_EXTRA_PASS is not set
63# CONFIG_HOTPLUG is not set
64CONFIG_PRINTK=y
65CONFIG_BUG=y
66CONFIG_ELF_CORE=y
67CONFIG_COMPAT_BRK=y
68CONFIG_BASE_FULL=y
69CONFIG_FUTEX=y
70CONFIG_ANON_INODES=y
71CONFIG_EPOLL=y
72CONFIG_SIGNALFD=y
73CONFIG_TIMERFD=y
74CONFIG_EVENTFD=y
75CONFIG_SHMEM=y
76CONFIG_VM_EVENT_COUNTERS=y
77CONFIG_SLAB=y
78# CONFIG_SLUB is not set
79# CONFIG_SLOB is not set
80CONFIG_PROFILING=y
81# CONFIG_MARKERS is not set
82CONFIG_OPROFILE=y
83CONFIG_HAVE_OPROFILE=y
84# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set
85# CONFIG_HAVE_IOREMAP_PROT is not set
86# CONFIG_HAVE_KPROBES is not set
87# CONFIG_HAVE_KRETPROBES is not set
88# CONFIG_HAVE_ARCH_TRACEHOOK is not set
89# CONFIG_HAVE_DMA_ATTRS is not set
90# CONFIG_USE_GENERIC_SMP_HELPERS is not set
91CONFIG_HAVE_CLK=y
92CONFIG_PROC_PAGE_MONITOR=y
93CONFIG_HAVE_GENERIC_DMA_COHERENT=y
94CONFIG_SLABINFO=y
95CONFIG_RT_MUTEXES=y
96# CONFIG_TINY_SHMEM is not set
97CONFIG_BASE_SMALL=0
98CONFIG_MODULES=y
99# CONFIG_MODULE_FORCE_LOAD is not set
100# CONFIG_MODULE_UNLOAD is not set
101# CONFIG_MODVERSIONS is not set
102# CONFIG_MODULE_SRCVERSION_ALL is not set
103CONFIG_KMOD=y
104CONFIG_BLOCK=y
105# CONFIG_LBD is not set
106# CONFIG_BLK_DEV_IO_TRACE is not set
107# CONFIG_LSF is not set
108# CONFIG_BLK_DEV_BSG is not set
109# CONFIG_BLK_DEV_INTEGRITY is not set
110
111#
112# IO Schedulers
113#
114CONFIG_IOSCHED_NOOP=y
115CONFIG_IOSCHED_AS=y
116CONFIG_IOSCHED_DEADLINE=y
117CONFIG_IOSCHED_CFQ=y
118CONFIG_DEFAULT_AS=y
119# CONFIG_DEFAULT_DEADLINE is not set
120# CONFIG_DEFAULT_CFQ is not set
121# CONFIG_DEFAULT_NOOP is not set
122CONFIG_DEFAULT_IOSCHED="anticipatory"
123CONFIG_CLASSIC_RCU=y
124
125#
126# System type
127#
128CONFIG_CPU_SH4=y
129# CONFIG_CPU_SUBTYPE_SH7619 is not set
130# CONFIG_CPU_SUBTYPE_SH7203 is not set
131# CONFIG_CPU_SUBTYPE_SH7206 is not set
132# CONFIG_CPU_SUBTYPE_SH7263 is not set
133# CONFIG_CPU_SUBTYPE_MXG is not set
134# CONFIG_CPU_SUBTYPE_SH7705 is not set
135# CONFIG_CPU_SUBTYPE_SH7706 is not set
136# CONFIG_CPU_SUBTYPE_SH7707 is not set
137# CONFIG_CPU_SUBTYPE_SH7708 is not set
138# CONFIG_CPU_SUBTYPE_SH7709 is not set
139# CONFIG_CPU_SUBTYPE_SH7710 is not set
140# CONFIG_CPU_SUBTYPE_SH7712 is not set
141# CONFIG_CPU_SUBTYPE_SH7720 is not set
142# CONFIG_CPU_SUBTYPE_SH7721 is not set
143# CONFIG_CPU_SUBTYPE_SH7750 is not set
144# CONFIG_CPU_SUBTYPE_SH7091 is not set
145# CONFIG_CPU_SUBTYPE_SH7750R is not set
146# CONFIG_CPU_SUBTYPE_SH7750S is not set
147# CONFIG_CPU_SUBTYPE_SH7751 is not set
148CONFIG_CPU_SUBTYPE_SH7751R=y
149# CONFIG_CPU_SUBTYPE_SH7760 is not set
150# CONFIG_CPU_SUBTYPE_SH4_202 is not set
151# CONFIG_CPU_SUBTYPE_SH7723 is not set
152# CONFIG_CPU_SUBTYPE_SH7763 is not set
153# CONFIG_CPU_SUBTYPE_SH7770 is not set
154# CONFIG_CPU_SUBTYPE_SH7780 is not set
155# CONFIG_CPU_SUBTYPE_SH7785 is not set
156# CONFIG_CPU_SUBTYPE_SHX3 is not set
157# CONFIG_CPU_SUBTYPE_SH7343 is not set
158# CONFIG_CPU_SUBTYPE_SH7722 is not set
159# CONFIG_CPU_SUBTYPE_SH7366 is not set
160# CONFIG_CPU_SUBTYPE_SH5_101 is not set
161# CONFIG_CPU_SUBTYPE_SH5_103 is not set
162
163#
164# Memory management options
165#
166CONFIG_QUICKLIST=y
167CONFIG_MMU=y
168CONFIG_PAGE_OFFSET=0x80000000
169CONFIG_MEMORY_START=0x0c000000
170CONFIG_MEMORY_SIZE=0x04000000
171CONFIG_29BIT=y
172CONFIG_VSYSCALL=y
173CONFIG_ARCH_FLATMEM_ENABLE=y
174CONFIG_ARCH_SPARSEMEM_ENABLE=y
175CONFIG_ARCH_SPARSEMEM_DEFAULT=y
176CONFIG_MAX_ACTIVE_REGIONS=1
177CONFIG_ARCH_POPULATES_NODE_MAP=y
178CONFIG_ARCH_SELECT_MEMORY_MODEL=y
179CONFIG_PAGE_SIZE_4KB=y
180# CONFIG_PAGE_SIZE_8KB is not set
181# CONFIG_PAGE_SIZE_16KB is not set
182# CONFIG_PAGE_SIZE_64KB is not set
183CONFIG_ENTRY_OFFSET=0x00001000
184CONFIG_SELECT_MEMORY_MODEL=y
185CONFIG_FLATMEM_MANUAL=y
186# CONFIG_DISCONTIGMEM_MANUAL is not set
187# CONFIG_SPARSEMEM_MANUAL is not set
188CONFIG_FLATMEM=y
189CONFIG_FLAT_NODE_MEM_MAP=y
190CONFIG_SPARSEMEM_STATIC=y
191# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
192CONFIG_PAGEFLAGS_EXTENDED=y
193CONFIG_SPLIT_PTLOCK_CPUS=4
194# CONFIG_RESOURCES_64BIT is not set
195CONFIG_ZONE_DMA_FLAG=0
196CONFIG_NR_QUICK=2
197
198#
199# Cache configuration
200#
201# CONFIG_SH_DIRECT_MAPPED is not set
202CONFIG_CACHE_WRITEBACK=y
203# CONFIG_CACHE_WRITETHROUGH is not set
204# CONFIG_CACHE_OFF is not set
205
206#
207# Processor features
208#
209CONFIG_CPU_LITTLE_ENDIAN=y
210# CONFIG_CPU_BIG_ENDIAN is not set
211CONFIG_SH_FPU=y
212# CONFIG_SH_STORE_QUEUES is not set
213CONFIG_CPU_HAS_INTEVT=y
214CONFIG_CPU_HAS_SR_RB=y
215CONFIG_CPU_HAS_PTEA=y
216CONFIG_CPU_HAS_FPU=y
217
218#
219# Board support
220#
221# CONFIG_SH_7751_SYSTEMH is not set
222# CONFIG_SH_SECUREEDGE5410 is not set
223CONFIG_SH_RTS7751R2D=y
224# CONFIG_SH_LANDISK is not set
225# CONFIG_SH_TITAN is not set
226# CONFIG_SH_LBOX_RE2 is not set
227
228#
229# RTS7751R2D Board Revision
230#
231CONFIG_RTS7751R2D_PLUS=y
232# CONFIG_RTS7751R2D_1 is not set
233
234#
235# Timer and clock configuration
236#
237CONFIG_SH_TMU=y
238CONFIG_SH_TIMER_IRQ=16
239CONFIG_SH_PCLK_FREQ=60000000
240# CONFIG_TICK_ONESHOT is not set
241# CONFIG_NO_HZ is not set
242# CONFIG_HIGH_RES_TIMERS is not set
243CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
244
245#
246# CPU Frequency scaling
247#
248# CONFIG_CPU_FREQ is not set
249
250#
251# DMA support
252#
253# CONFIG_SH_DMA is not set
254
255#
256# Companion Chips
257#
258
259#
260# Additional SuperH Device Drivers
261#
262CONFIG_HEARTBEAT=y
263# CONFIG_PUSH_SWITCH is not set
264
265#
266# Kernel features
267#
268# CONFIG_HZ_100 is not set
269CONFIG_HZ_250=y
270# CONFIG_HZ_300 is not set
271# CONFIG_HZ_1000 is not set
272CONFIG_HZ=250
273# CONFIG_SCHED_HRTICK is not set
274# CONFIG_KEXEC is not set
275# CONFIG_CRASH_DUMP is not set
276CONFIG_SECCOMP=y
277CONFIG_PREEMPT_NONE=y
278# CONFIG_PREEMPT_VOLUNTARY is not set
279# CONFIG_PREEMPT is not set
280CONFIG_GUSA=y
281# CONFIG_GUSA_RB is not set
282
283#
284# Boot options
285#
286CONFIG_ZERO_PAGE_OFFSET=0x00010000
287CONFIG_BOOT_LINK_OFFSET=0x00800000
288# CONFIG_UBC_WAKEUP is not set
289CONFIG_CMDLINE_BOOL=y
290CONFIG_CMDLINE="console=tty0 console=ttySC0,115200 root=/dev/sda1 earlyprintk=serial"
291
292#
293# Bus options
294#
295# CONFIG_PCI is not set
296# CONFIG_ARCH_SUPPORTS_MSI is not set
297
298#
299# Executable file formats
300#
301CONFIG_BINFMT_ELF=y
302# CONFIG_BINFMT_MISC is not set
303# CONFIG_NET is not set
304
305#
306# Device Drivers
307#
308
309#
310# Generic Driver Options
311#
312CONFIG_STANDALONE=y
313CONFIG_PREVENT_FIRMWARE_BUILD=y
314# CONFIG_DEBUG_DRIVER is not set
315# CONFIG_DEBUG_DEVRES is not set
316# CONFIG_SYS_HYPERVISOR is not set
317# CONFIG_MTD is not set
318# CONFIG_PARPORT is not set
319CONFIG_BLK_DEV=y
320# CONFIG_BLK_DEV_COW_COMMON is not set
321# CONFIG_BLK_DEV_LOOP is not set
322CONFIG_BLK_DEV_RAM=y
323CONFIG_BLK_DEV_RAM_COUNT=16
324CONFIG_BLK_DEV_RAM_SIZE=4096
325# CONFIG_BLK_DEV_XIP is not set
326# CONFIG_CDROM_PKTCDVD is not set
327# CONFIG_BLK_DEV_HD is not set
328CONFIG_MISC_DEVICES=y
329# CONFIG_EEPROM_93CX6 is not set
330# CONFIG_ENCLOSURE_SERVICES is not set
331CONFIG_HAVE_IDE=y
332# CONFIG_IDE is not set
333
334#
335# SCSI device support
336#
337# CONFIG_RAID_ATTRS is not set
338CONFIG_SCSI=y
339CONFIG_SCSI_DMA=y
340# CONFIG_SCSI_TGT is not set
341# CONFIG_SCSI_NETLINK is not set
342CONFIG_SCSI_PROC_FS=y
343
344#
345# SCSI support type (disk, tape, CD-ROM)
346#
347CONFIG_BLK_DEV_SD=y
348# CONFIG_CHR_DEV_ST is not set
349# CONFIG_CHR_DEV_OSST is not set
350# CONFIG_BLK_DEV_SR is not set
351# CONFIG_CHR_DEV_SG is not set
352# CONFIG_CHR_DEV_SCH is not set
353
354#
355# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
356#
357# CONFIG_SCSI_MULTI_LUN is not set
358# CONFIG_SCSI_CONSTANTS is not set
359# CONFIG_SCSI_LOGGING is not set
360# CONFIG_SCSI_SCAN_ASYNC is not set
361CONFIG_SCSI_WAIT_SCAN=m
362
363#
364# SCSI Transports
365#
366# CONFIG_SCSI_SPI_ATTRS is not set
367# CONFIG_SCSI_FC_ATTRS is not set
368# CONFIG_SCSI_SAS_LIBSAS is not set
369# CONFIG_SCSI_SRP_ATTRS is not set
370CONFIG_SCSI_LOWLEVEL=y
371# CONFIG_SCSI_DEBUG is not set
372# CONFIG_SCSI_DH is not set
373CONFIG_ATA=y
374# CONFIG_ATA_NONSTANDARD is not set
375CONFIG_SATA_PMP=y
376CONFIG_ATA_SFF=y
377# CONFIG_SATA_MV is not set
378# CONFIG_PATA_PLATFORM is not set
379# CONFIG_MD is not set
380# CONFIG_PHONE is not set
381
382#
383# Input device support
384#
385CONFIG_INPUT=y
386# CONFIG_INPUT_FF_MEMLESS is not set
387# CONFIG_INPUT_POLLDEV is not set
388
389#
390# Userland interfaces
391#
392# CONFIG_INPUT_MOUSEDEV is not set
393# CONFIG_INPUT_JOYDEV is not set
394# CONFIG_INPUT_EVDEV is not set
395# CONFIG_INPUT_EVBUG is not set
396
397#
398# Input Device Drivers
399#
400# CONFIG_INPUT_KEYBOARD is not set
401# CONFIG_INPUT_MOUSE is not set
402# CONFIG_INPUT_JOYSTICK is not set
403# CONFIG_INPUT_TABLET is not set
404# CONFIG_INPUT_TOUCHSCREEN is not set
405# CONFIG_INPUT_MISC is not set
406
407#
408# Hardware I/O ports
409#
410# CONFIG_SERIO is not set
411# CONFIG_GAMEPORT is not set
412
413#
414# Character devices
415#
416CONFIG_VT=y
417CONFIG_CONSOLE_TRANSLATIONS=y
418CONFIG_VT_CONSOLE=y
419CONFIG_HW_CONSOLE=y
420CONFIG_VT_HW_CONSOLE_BINDING=y
421CONFIG_DEVKMEM=y
422# CONFIG_SERIAL_NONSTANDARD is not set
423
424#
425# Serial drivers
426#
427CONFIG_SERIAL_8250=y
428# CONFIG_SERIAL_8250_CONSOLE is not set
429CONFIG_SERIAL_8250_NR_UARTS=4
430CONFIG_SERIAL_8250_RUNTIME_UARTS=4
431# CONFIG_SERIAL_8250_EXTENDED is not set
432
433#
434# Non-8250 serial port support
435#
436CONFIG_SERIAL_SH_SCI=y
437CONFIG_SERIAL_SH_SCI_NR_UARTS=1
438CONFIG_SERIAL_SH_SCI_CONSOLE=y
439CONFIG_SERIAL_CORE=y
440CONFIG_SERIAL_CORE_CONSOLE=y
441CONFIG_UNIX98_PTYS=y
442CONFIG_LEGACY_PTYS=y
443CONFIG_LEGACY_PTY_COUNT=256
444# CONFIG_IPMI_HANDLER is not set
445CONFIG_HW_RANDOM=y
446# CONFIG_R3964 is not set
447# CONFIG_RAW_DRIVER is not set
448# CONFIG_TCG_TPM is not set
449# CONFIG_I2C is not set
450CONFIG_SPI=y
451# CONFIG_SPI_DEBUG is not set
452CONFIG_SPI_MASTER=y
453
454#
455# SPI Master Controller Drivers
456#
457CONFIG_SPI_BITBANG=y
458# CONFIG_SPI_SH_SCI is not set
459
460#
461# SPI Protocol Masters
462#
463# CONFIG_SPI_AT25 is not set
464# CONFIG_SPI_SPIDEV is not set
465# CONFIG_SPI_TLE62X0 is not set
466# CONFIG_W1 is not set
467# CONFIG_POWER_SUPPLY is not set
468CONFIG_HWMON=y
469# CONFIG_HWMON_VID is not set
470# CONFIG_SENSORS_F71805F is not set
471# CONFIG_SENSORS_F71882FG is not set
472# CONFIG_SENSORS_IT87 is not set
473# CONFIG_SENSORS_LM70 is not set
474# CONFIG_SENSORS_PC87360 is not set
475# CONFIG_SENSORS_PC87427 is not set
476# CONFIG_SENSORS_SMSC47M1 is not set
477# CONFIG_SENSORS_SMSC47B397 is not set
478# CONFIG_SENSORS_VT1211 is not set
479# CONFIG_SENSORS_W83627HF is not set
480# CONFIG_SENSORS_W83627EHF is not set
481# CONFIG_HWMON_DEBUG_CHIP is not set
482# CONFIG_THERMAL is not set
483# CONFIG_THERMAL_HWMON is not set
484# CONFIG_WATCHDOG is not set
485
486#
487# Sonics Silicon Backplane
488#
489CONFIG_SSB_POSSIBLE=y
490# CONFIG_SSB is not set
491
492#
493# Multifunction device drivers
494#
495# CONFIG_MFD_CORE is not set
496CONFIG_MFD_SM501=y
497# CONFIG_HTC_PASIC3 is not set
498
499#
500# Multimedia devices
501#
502
503#
504# Multimedia core support
505#
506# CONFIG_VIDEO_DEV is not set
507# CONFIG_VIDEO_MEDIA is not set
508
509#
510# Multimedia drivers
511#
512CONFIG_DAB=y
513
514#
515# Graphics support
516#
517# CONFIG_VGASTATE is not set
518CONFIG_VIDEO_OUTPUT_CONTROL=m
519CONFIG_FB=y
520# CONFIG_FIRMWARE_EDID is not set
521# CONFIG_FB_DDC is not set
522CONFIG_FB_CFB_FILLRECT=y
523CONFIG_FB_CFB_COPYAREA=y
524CONFIG_FB_CFB_IMAGEBLIT=y
525# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
526# CONFIG_FB_SYS_FILLRECT is not set
527# CONFIG_FB_SYS_COPYAREA is not set
528# CONFIG_FB_SYS_IMAGEBLIT is not set
529# CONFIG_FB_FOREIGN_ENDIAN is not set
530# CONFIG_FB_SYS_FOPS is not set
531# CONFIG_FB_SVGALIB is not set
532# CONFIG_FB_MACMODES is not set
533# CONFIG_FB_BACKLIGHT is not set
534# CONFIG_FB_MODE_HELPERS is not set
535# CONFIG_FB_TILEBLITTING is not set
536
537#
538# Frame buffer hardware drivers
539#
540# CONFIG_FB_S1D13XXX is not set
541CONFIG_FB_SH_MOBILE_LCDC=m
542CONFIG_FB_SM501=y
543# CONFIG_FB_VIRTUAL is not set
544# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
545
546#
547# Display device support
548#
549# CONFIG_DISPLAY_SUPPORT is not set
550
551#
552# Console display driver support
553#
554CONFIG_DUMMY_CONSOLE=y
555CONFIG_FRAMEBUFFER_CONSOLE=y
556# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
557# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
558# CONFIG_FONTS is not set
559CONFIG_FONT_8x8=y
560CONFIG_FONT_8x16=y
561CONFIG_LOGO=y
562# CONFIG_LOGO_LINUX_MONO is not set
563# CONFIG_LOGO_LINUX_VGA16 is not set
564# CONFIG_LOGO_LINUX_CLUT224 is not set
565# CONFIG_LOGO_SUPERH_MONO is not set
566# CONFIG_LOGO_SUPERH_VGA16 is not set
567CONFIG_LOGO_SUPERH_CLUT224=y
568CONFIG_SOUND=y
569CONFIG_SND=m
570# CONFIG_SND_SEQUENCER is not set
571# CONFIG_SND_MIXER_OSS is not set
572# CONFIG_SND_PCM_OSS is not set
573# CONFIG_SND_DYNAMIC_MINORS is not set
574CONFIG_SND_SUPPORT_OLD_API=y
575CONFIG_SND_VERBOSE_PROCFS=y
576# CONFIG_SND_VERBOSE_PRINTK is not set
577# CONFIG_SND_DEBUG is not set
578CONFIG_SND_DRIVERS=y
579# CONFIG_SND_DUMMY is not set
580# CONFIG_SND_MTPAV is not set
581# CONFIG_SND_SERIAL_U16550 is not set
582# CONFIG_SND_MPU401 is not set
583CONFIG_SND_SPI=y
584CONFIG_SND_SUPERH=y
585# CONFIG_SND_SOC is not set
586CONFIG_SOUND_PRIME=m
587CONFIG_HID_SUPPORT=y
588CONFIG_HID=y
589# CONFIG_HID_DEBUG is not set
590# CONFIG_HIDRAW is not set
591# CONFIG_USB_SUPPORT is not set
592# CONFIG_MMC is not set
593# CONFIG_MEMSTICK is not set
594# CONFIG_NEW_LEDS is not set
595# CONFIG_ACCESSIBILITY is not set
596CONFIG_RTC_LIB=y
597CONFIG_RTC_CLASS=y
598CONFIG_RTC_HCTOSYS=y
599CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
600# CONFIG_RTC_DEBUG is not set
601
602#
603# RTC interfaces
604#
605CONFIG_RTC_INTF_SYSFS=y
606CONFIG_RTC_INTF_PROC=y
607CONFIG_RTC_INTF_DEV=y
608# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
609# CONFIG_RTC_DRV_TEST is not set
610
611#
612# SPI RTC drivers
613#
614# CONFIG_RTC_DRV_M41T94 is not set
615# CONFIG_RTC_DRV_DS1305 is not set
616# CONFIG_RTC_DRV_MAX6902 is not set
617CONFIG_RTC_DRV_R9701=y
618# CONFIG_RTC_DRV_RS5C348 is not set
619
620#
621# Platform RTC drivers
622#
623# CONFIG_RTC_DRV_DS1511 is not set
624# CONFIG_RTC_DRV_DS1553 is not set
625# CONFIG_RTC_DRV_DS1742 is not set
626# CONFIG_RTC_DRV_STK17TA8 is not set
627# CONFIG_RTC_DRV_M48T86 is not set
628# CONFIG_RTC_DRV_M48T59 is not set
629# CONFIG_RTC_DRV_V3020 is not set
630
631#
632# on-CPU RTC drivers
633#
634# CONFIG_RTC_DRV_SH is not set
635# CONFIG_DMADEVICES is not set
636# CONFIG_UIO is not set
637
638#
639# File systems
640#
641CONFIG_EXT2_FS=y
642# CONFIG_EXT2_FS_XATTR is not set
643# CONFIG_EXT2_FS_XIP is not set
644# CONFIG_EXT3_FS is not set
645# CONFIG_EXT4DEV_FS is not set
646# CONFIG_REISERFS_FS is not set
647# CONFIG_JFS_FS is not set
648# CONFIG_FS_POSIX_ACL is not set
649# CONFIG_XFS_FS is not set
650CONFIG_DNOTIFY=y
651CONFIG_INOTIFY=y
652CONFIG_INOTIFY_USER=y
653# CONFIG_QUOTA is not set
654# CONFIG_AUTOFS_FS is not set
655# CONFIG_AUTOFS4_FS is not set
656# CONFIG_FUSE_FS is not set
657
658#
659# CD-ROM/DVD Filesystems
660#
661# CONFIG_ISO9660_FS is not set
662# CONFIG_UDF_FS is not set
663
664#
665# DOS/FAT/NT Filesystems
666#
667CONFIG_FAT_FS=y
668CONFIG_MSDOS_FS=y
669CONFIG_VFAT_FS=y
670CONFIG_FAT_DEFAULT_CODEPAGE=437
671CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
672# CONFIG_NTFS_FS is not set
673
674#
675# Pseudo filesystems
676#
677CONFIG_PROC_FS=y
678CONFIG_PROC_KCORE=y
679CONFIG_PROC_SYSCTL=y
680CONFIG_SYSFS=y
681CONFIG_TMPFS=y
682# CONFIG_TMPFS_POSIX_ACL is not set
683# CONFIG_HUGETLBFS is not set
684# CONFIG_HUGETLB_PAGE is not set
685# CONFIG_CONFIGFS_FS is not set
686
687#
688# Miscellaneous filesystems
689#
690# CONFIG_ADFS_FS is not set
691# CONFIG_AFFS_FS is not set
692# CONFIG_HFS_FS is not set
693# CONFIG_HFSPLUS_FS is not set
694# CONFIG_BEFS_FS is not set
695# CONFIG_BFS_FS is not set
696# CONFIG_EFS_FS is not set
697# CONFIG_CRAMFS is not set
698# CONFIG_VXFS_FS is not set
699CONFIG_MINIX_FS=y
700# CONFIG_OMFS_FS is not set
701# CONFIG_HPFS_FS is not set
702# CONFIG_QNX4FS_FS is not set
703# CONFIG_ROMFS_FS is not set
704# CONFIG_SYSV_FS is not set
705# CONFIG_UFS_FS is not set
706
707#
708# Partition Types
709#
710# CONFIG_PARTITION_ADVANCED is not set
711CONFIG_MSDOS_PARTITION=y
712CONFIG_NLS=y
713CONFIG_NLS_DEFAULT="iso8859-1"
714# CONFIG_NLS_CODEPAGE_437 is not set
715# CONFIG_NLS_CODEPAGE_737 is not set
716# CONFIG_NLS_CODEPAGE_775 is not set
717# CONFIG_NLS_CODEPAGE_850 is not set
718# CONFIG_NLS_CODEPAGE_852 is not set
719# CONFIG_NLS_CODEPAGE_855 is not set
720# CONFIG_NLS_CODEPAGE_857 is not set
721# CONFIG_NLS_CODEPAGE_860 is not set
722# CONFIG_NLS_CODEPAGE_861 is not set
723# CONFIG_NLS_CODEPAGE_862 is not set
724# CONFIG_NLS_CODEPAGE_863 is not set
725# CONFIG_NLS_CODEPAGE_864 is not set
726# CONFIG_NLS_CODEPAGE_865 is not set
727# CONFIG_NLS_CODEPAGE_866 is not set
728# CONFIG_NLS_CODEPAGE_869 is not set
729# CONFIG_NLS_CODEPAGE_936 is not set
730# CONFIG_NLS_CODEPAGE_950 is not set
731CONFIG_NLS_CODEPAGE_932=y
732# CONFIG_NLS_CODEPAGE_949 is not set
733# CONFIG_NLS_CODEPAGE_874 is not set
734# CONFIG_NLS_ISO8859_8 is not set
735# CONFIG_NLS_CODEPAGE_1250 is not set
736# CONFIG_NLS_CODEPAGE_1251 is not set
737# CONFIG_NLS_ASCII is not set
738# CONFIG_NLS_ISO8859_1 is not set
739# CONFIG_NLS_ISO8859_2 is not set
740# CONFIG_NLS_ISO8859_3 is not set
741# CONFIG_NLS_ISO8859_4 is not set
742# CONFIG_NLS_ISO8859_5 is not set
743# CONFIG_NLS_ISO8859_6 is not set
744# CONFIG_NLS_ISO8859_7 is not set
745# CONFIG_NLS_ISO8859_9 is not set
746# CONFIG_NLS_ISO8859_13 is not set
747# CONFIG_NLS_ISO8859_14 is not set
748# CONFIG_NLS_ISO8859_15 is not set
749# CONFIG_NLS_KOI8_R is not set
750# CONFIG_NLS_KOI8_U is not set
751# CONFIG_NLS_UTF8 is not set
752
753#
754# Kernel hacking
755#
756CONFIG_TRACE_IRQFLAGS_SUPPORT=y
757# CONFIG_PRINTK_TIME is not set
758CONFIG_ENABLE_WARN_DEPRECATED=y
759CONFIG_ENABLE_MUST_CHECK=y
760CONFIG_FRAME_WARN=1024
761# CONFIG_MAGIC_SYSRQ is not set
762# CONFIG_UNUSED_SYMBOLS is not set
763CONFIG_DEBUG_FS=y
764# CONFIG_HEADERS_CHECK is not set
765CONFIG_DEBUG_KERNEL=y
766# CONFIG_DEBUG_SHIRQ is not set
767CONFIG_DETECT_SOFTLOCKUP=y
768# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
769CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
770CONFIG_SCHED_DEBUG=y
771# CONFIG_SCHEDSTATS is not set
772# CONFIG_TIMER_STATS is not set
773# CONFIG_DEBUG_OBJECTS is not set
774# CONFIG_DEBUG_SLAB is not set
775# CONFIG_DEBUG_RT_MUTEXES is not set
776# CONFIG_RT_MUTEX_TESTER is not set
777# CONFIG_DEBUG_SPINLOCK is not set
778# CONFIG_DEBUG_MUTEXES is not set
779# CONFIG_DEBUG_LOCK_ALLOC is not set
780# CONFIG_PROVE_LOCKING is not set
781# CONFIG_LOCK_STAT is not set
782# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
783# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
784# CONFIG_DEBUG_KOBJECT is not set
785# CONFIG_DEBUG_BUGVERBOSE is not set
786CONFIG_DEBUG_INFO=y
787# CONFIG_DEBUG_VM is not set
788# CONFIG_DEBUG_WRITECOUNT is not set
789# CONFIG_DEBUG_MEMORY_INIT is not set
790# CONFIG_DEBUG_LIST is not set
791# CONFIG_DEBUG_SG is not set
792# CONFIG_FRAME_POINTER is not set
793# CONFIG_BOOT_PRINTK_DELAY is not set
794# CONFIG_RCU_TORTURE_TEST is not set
795# CONFIG_BACKTRACE_SELF_TEST is not set
796# CONFIG_FAULT_INJECTION is not set
797# CONFIG_SAMPLES is not set
798# CONFIG_SH_STANDARD_BIOS is not set
799CONFIG_EARLY_SCIF_CONSOLE=y
800CONFIG_EARLY_SCIF_CONSOLE_PORT=0xffe80000
801CONFIG_EARLY_PRINTK=y
802# CONFIG_DEBUG_BOOTMEM is not set
803# CONFIG_DEBUG_STACKOVERFLOW is not set
804# CONFIG_DEBUG_STACK_USAGE is not set
805# CONFIG_4KSTACKS is not set
806# CONFIG_IRQSTACKS is not set
807# CONFIG_SH_KGDB is not set
808
809#
810# Security options
811#
812# CONFIG_KEYS is not set
813# CONFIG_SECURITY is not set
814# CONFIG_SECURITY_FILE_CAPABILITIES is not set
815CONFIG_CRYPTO=y
816
817#
818# Crypto core or helper
819#
820# CONFIG_CRYPTO_MANAGER is not set
821# CONFIG_CRYPTO_GF128MUL is not set
822# CONFIG_CRYPTO_NULL is not set
823# CONFIG_CRYPTO_CRYPTD is not set
824# CONFIG_CRYPTO_AUTHENC is not set
825# CONFIG_CRYPTO_TEST is not set
826
827#
828# Authenticated Encryption with Associated Data
829#
830# CONFIG_CRYPTO_CCM is not set
831# CONFIG_CRYPTO_GCM is not set
832# CONFIG_CRYPTO_SEQIV is not set
833
834#
835# Block modes
836#
837# CONFIG_CRYPTO_CBC is not set
838# CONFIG_CRYPTO_CTR is not set
839# CONFIG_CRYPTO_CTS is not set
840# CONFIG_CRYPTO_ECB is not set
841# CONFIG_CRYPTO_LRW is not set
842# CONFIG_CRYPTO_PCBC is not set
843# CONFIG_CRYPTO_XTS is not set
844
845#
846# Hash modes
847#
848# CONFIG_CRYPTO_HMAC is not set
849# CONFIG_CRYPTO_XCBC is not set
850
851#
852# Digest
853#
854# CONFIG_CRYPTO_CRC32C is not set
855# CONFIG_CRYPTO_MD4 is not set
856# CONFIG_CRYPTO_MD5 is not set
857# CONFIG_CRYPTO_MICHAEL_MIC is not set
858# CONFIG_CRYPTO_RMD128 is not set
859# CONFIG_CRYPTO_RMD160 is not set
860# CONFIG_CRYPTO_RMD256 is not set
861# CONFIG_CRYPTO_RMD320 is not set
862# CONFIG_CRYPTO_SHA1 is not set
863# CONFIG_CRYPTO_SHA256 is not set
864# CONFIG_CRYPTO_SHA512 is not set
865# CONFIG_CRYPTO_TGR192 is not set
866# CONFIG_CRYPTO_WP512 is not set
867
868#
869# Ciphers
870#
871# CONFIG_CRYPTO_AES is not set
872# CONFIG_CRYPTO_ANUBIS is not set
873# CONFIG_CRYPTO_ARC4 is not set
874# CONFIG_CRYPTO_BLOWFISH is not set
875# CONFIG_CRYPTO_CAMELLIA is not set
876# CONFIG_CRYPTO_CAST5 is not set
877# CONFIG_CRYPTO_CAST6 is not set
878# CONFIG_CRYPTO_DES is not set
879# CONFIG_CRYPTO_FCRYPT is not set
880# CONFIG_CRYPTO_KHAZAD is not set
881# CONFIG_CRYPTO_SALSA20 is not set
882# CONFIG_CRYPTO_SEED is not set
883# CONFIG_CRYPTO_SERPENT is not set
884# CONFIG_CRYPTO_TEA is not set
885# CONFIG_CRYPTO_TWOFISH is not set
886
887#
888# Compression
889#
890# CONFIG_CRYPTO_DEFLATE is not set
891# CONFIG_CRYPTO_LZO is not set
892CONFIG_CRYPTO_HW=y
893
894#
895# Library routines
896#
897CONFIG_BITREVERSE=y
898# CONFIG_GENERIC_FIND_FIRST_BIT is not set
899# CONFIG_CRC_CCITT is not set
900# CONFIG_CRC16 is not set
901CONFIG_CRC_T10DIF=y
902# CONFIG_CRC_ITU_T is not set
903CONFIG_CRC32=y
904# CONFIG_CRC7 is not set
905# CONFIG_LIBCRC32C is not set
906CONFIG_PLIST=y
907CONFIG_HAS_IOMEM=y
908CONFIG_HAS_IOPORT=y
909CONFIG_HAS_DMA=y
diff --git a/arch/sh/drivers/pci/ops-lboxre2.c b/arch/sh/drivers/pci/ops-lboxre2.c
index a13cb764b0b..86c0b6fb737 100644
--- a/arch/sh/drivers/pci/ops-lboxre2.c
+++ b/arch/sh/drivers/pci/ops-lboxre2.c
@@ -10,7 +10,7 @@
10#include <linux/init.h> 10#include <linux/init.h>
11#include <linux/pci.h> 11#include <linux/pci.h>
12#include <linux/io.h> 12#include <linux/io.h>
13#include <asm/lboxre2.h> 13#include <mach/lboxre2.h>
14#include "pci-sh4.h" 14#include "pci-sh4.h"
15 15
16static char lboxre2_irq_tab[] __initdata = { 16static char lboxre2_irq_tab[] __initdata = {
diff --git a/arch/sh/drivers/pci/ops-r7780rp.c b/arch/sh/drivers/pci/ops-r7780rp.c
index 5fdadaeed6f..8555238e63e 100644
--- a/arch/sh/drivers/pci/ops-r7780rp.c
+++ b/arch/sh/drivers/pci/ops-r7780rp.c
@@ -13,7 +13,7 @@
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/delay.h> 14#include <linux/delay.h>
15#include <linux/pci.h> 15#include <linux/pci.h>
16#include <asm/r7780rp.h> 16#include <mach/highlander.h>
17#include <asm/io.h> 17#include <asm/io.h>
18#include "pci-sh4.h" 18#include "pci-sh4.h"
19 19
diff --git a/arch/sh/drivers/pci/ops-rts7751r2d.c b/arch/sh/drivers/pci/ops-rts7751r2d.c
index b3fa3e2ef18..d6ca74b25d5 100644
--- a/arch/sh/drivers/pci/ops-rts7751r2d.c
+++ b/arch/sh/drivers/pci/ops-rts7751r2d.c
@@ -15,7 +15,7 @@
15#include <linux/init.h> 15#include <linux/init.h>
16#include <linux/pci.h> 16#include <linux/pci.h>
17#include <linux/io.h> 17#include <linux/io.h>
18#include <asm/rts7751r2d.h> 18#include <mach/r2d.h>
19#include "pci-sh4.h" 19#include "pci-sh4.h"
20 20
21static u8 rts7751r2d_irq_tab[] __initdata = { 21static u8 rts7751r2d_irq_tab[] __initdata = {
diff --git a/arch/sh/drivers/pci/ops-sdk7780.c b/arch/sh/drivers/pci/ops-sdk7780.c
index 66a9b4047f2..4dcc64184b2 100644
--- a/arch/sh/drivers/pci/ops-sdk7780.c
+++ b/arch/sh/drivers/pci/ops-sdk7780.c
@@ -13,7 +13,7 @@
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/delay.h> 14#include <linux/delay.h>
15#include <linux/pci.h> 15#include <linux/pci.h>
16#include <asm/sdk7780.h> 16#include <mach/sdk7780.h>
17#include <asm/io.h> 17#include <asm/io.h>
18#include "pci-sh4.h" 18#include "pci-sh4.h"
19 19
diff --git a/arch/sh/drivers/pci/ops-titan.c b/arch/sh/drivers/pci/ops-titan.c
index ac8ee2312cd..a8f7801a34a 100644
--- a/arch/sh/drivers/pci/ops-titan.c
+++ b/arch/sh/drivers/pci/ops-titan.c
@@ -16,7 +16,7 @@
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/pci.h> 17#include <linux/pci.h>
18#include <linux/io.h> 18#include <linux/io.h>
19#include <asm/titan.h> 19#include <mach/titan.h>
20#include "pci-sh4.h" 20#include "pci-sh4.h"
21 21
22static char titan_irq_tab[] __initdata = { 22static char titan_irq_tab[] __initdata = {
diff --git a/arch/sh/include/asm/bitops-llsc.h b/arch/sh/include/asm/bitops-llsc.h
new file mode 100644
index 00000000000..43b8e1a8239
--- /dev/null
+++ b/arch/sh/include/asm/bitops-llsc.h
@@ -0,0 +1,144 @@
1#ifndef __ASM_SH_BITOPS_LLSC_H
2#define __ASM_SH_BITOPS_LLSC_H
3
4static inline void set_bit(int nr, volatile void * addr)
5{
6 int mask;
7 volatile unsigned int *a = addr;
8 unsigned long tmp;
9
10 a += nr >> 5;
11 mask = 1 << (nr & 0x1f);
12
13 __asm__ __volatile__ (
14 "1: \n\t"
15 "movli.l @%1, %0 ! set_bit \n\t"
16 "or %3, %0 \n\t"
17 "movco.l %0, @%1 \n\t"
18 "bf 1b \n\t"
19 : "=&z" (tmp), "=r" (a)
20 : "1" (a), "r" (mask)
21 : "t", "memory"
22 );
23}
24
25static inline void clear_bit(int nr, volatile void * addr)
26{
27 int mask;
28 volatile unsigned int *a = addr;
29 unsigned long tmp;
30
31 a += nr >> 5;
32 mask = 1 << (nr & 0x1f);
33
34 __asm__ __volatile__ (
35 "1: \n\t"
36 "movli.l @%1, %0 ! clear_bit \n\t"
37 "and %3, %0 \n\t"
38 "movco.l %0, @%1 \n\t"
39 "bf 1b \n\t"
40 : "=&z" (tmp), "=r" (a)
41 : "1" (a), "r" (~mask)
42 : "t", "memory"
43 );
44}
45
46static inline void change_bit(int nr, volatile void * addr)
47{
48 int mask;
49 volatile unsigned int *a = addr;
50 unsigned long tmp;
51
52 a += nr >> 5;
53 mask = 1 << (nr & 0x1f);
54
55 __asm__ __volatile__ (
56 "1: \n\t"
57 "movli.l @%1, %0 ! change_bit \n\t"
58 "xor %3, %0 \n\t"
59 "movco.l %0, @%1 \n\t"
60 "bf 1b \n\t"
61 : "=&z" (tmp), "=r" (a)
62 : "1" (a), "r" (mask)
63 : "t", "memory"
64 );
65}
66
67static inline int test_and_set_bit(int nr, volatile void * addr)
68{
69 int mask, retval;
70 volatile unsigned int *a = addr;
71 unsigned long tmp;
72
73 a += nr >> 5;
74 mask = 1 << (nr & 0x1f);
75
76 __asm__ __volatile__ (
77 "1: \n\t"
78 "movli.l @%1, %0 ! test_and_set_bit \n\t"
79 "mov %0, %2 \n\t"
80 "or %4, %0 \n\t"
81 "movco.l %0, @%1 \n\t"
82 "bf 1b \n\t"
83 "and %4, %2 \n\t"
84 : "=&z" (tmp), "=r" (a), "=&r" (retval)
85 : "1" (a), "r" (mask)
86 : "t", "memory"
87 );
88
89 return retval != 0;
90}
91
92static inline int test_and_clear_bit(int nr, volatile void * addr)
93{
94 int mask, retval;
95 volatile unsigned int *a = addr;
96 unsigned long tmp;
97
98 a += nr >> 5;
99 mask = 1 << (nr & 0x1f);
100
101 __asm__ __volatile__ (
102 "1: \n\t"
103 "movli.l @%1, %0 ! test_and_clear_bit \n\t"
104 "mov %0, %2 \n\t"
105 "and %5, %0 \n\t"
106 "movco.l %0, @%1 \n\t"
107 "bf 1b \n\t"
108 "and %4, %2 \n\t"
109 "synco \n\t"
110 : "=&z" (tmp), "=r" (a), "=&r" (retval)
111 : "1" (a), "r" (mask), "r" (~mask)
112 : "t", "memory"
113 );
114
115 return retval != 0;
116}
117
118static inline int test_and_change_bit(int nr, volatile void * addr)
119{
120 int mask, retval;
121 volatile unsigned int *a = addr;
122 unsigned long tmp;
123
124 a += nr >> 5;
125 mask = 1 << (nr & 0x1f);
126
127 __asm__ __volatile__ (
128 "1: \n\t"
129 "movli.l @%1, %0 ! test_and_change_bit \n\t"
130 "mov %0, %2 \n\t"
131 "xor %4, %0 \n\t"
132 "movco.l %0, @%1 \n\t"
133 "bf 1b \n\t"
134 "and %4, %2 \n\t"
135 "synco \n\t"
136 : "=&z" (tmp), "=r" (a), "=&r" (retval)
137 : "1" (a), "r" (mask)
138 : "t", "memory"
139 );
140
141 return retval != 0;
142}
143
144#endif /* __ASM_SH_BITOPS_LLSC_H */
diff --git a/arch/sh/include/asm/bitops.h b/arch/sh/include/asm/bitops.h
index d7d382f63ee..367930d8e5a 100644
--- a/arch/sh/include/asm/bitops.h
+++ b/arch/sh/include/asm/bitops.h
@@ -13,6 +13,8 @@
13 13
14#ifdef CONFIG_GUSA_RB 14#ifdef CONFIG_GUSA_RB
15#include <asm/bitops-grb.h> 15#include <asm/bitops-grb.h>
16#elif defined(CONFIG_CPU_SH4A)
17#include <asm/bitops-llsc.h>
16#else 18#else
17#include <asm/bitops-irq.h> 19#include <asm/bitops-irq.h>
18#endif 20#endif
diff --git a/arch/sh/include/asm/clock.h b/arch/sh/include/asm/clock.h
index 720dfab7b15..f9c88583d90 100644
--- a/arch/sh/include/asm/clock.h
+++ b/arch/sh/include/asm/clock.h
@@ -39,6 +39,7 @@ struct clk {
39 39
40/* Should be defined by processor-specific code */ 40/* Should be defined by processor-specific code */
41void arch_init_clk_ops(struct clk_ops **, int type); 41void arch_init_clk_ops(struct clk_ops **, int type);
42int __init arch_clk_init(void);
42 43
43/* arch/sh/kernel/cpu/clock.c */ 44/* arch/sh/kernel/cpu/clock.c */
44int clk_init(void); 45int clk_init(void);
diff --git a/arch/sh/include/asm/cmpxchg-llsc.h b/arch/sh/include/asm/cmpxchg-llsc.h
new file mode 100644
index 00000000000..aee3bf28658
--- /dev/null
+++ b/arch/sh/include/asm/cmpxchg-llsc.h
@@ -0,0 +1,71 @@
1#ifndef __ASM_SH_CMPXCHG_LLSC_H
2#define __ASM_SH_CMPXCHG_LLSC_H
3
4static inline unsigned long xchg_u32(volatile u32 *m, unsigned long val)
5{
6 unsigned long retval;
7 unsigned long tmp;
8
9 __asm__ __volatile__ (
10 "1: \n\t"
11 "movli.l @%1, %0 ! xchg_u32 \n\t"
12 "mov %0, %2 \n\t"
13 "mov %4, %0 \n\t"
14 "movco.l %0, @%1 \n\t"
15 "bf 1b \n\t"
16 "synco \n\t"
17 : "=&z"(tmp), "=r" (m), "=&r" (retval)
18 : "1" (m), "r" (val)
19 : "t", "memory"
20 );
21
22 return retval;
23}
24
25static inline unsigned long xchg_u8(volatile u8 *m, unsigned long val)
26{
27 unsigned long retval;
28 unsigned long tmp;
29
30 __asm__ __volatile__ (
31 "1: \n\t"
32 "movli.l @%1, %0 ! xchg_u8 \n\t"
33 "mov %0, %2 \n\t"
34 "mov %4, %0 \n\t"
35 "movco.l %0, @%1 \n\t"
36 "bf 1b \n\t"
37 "synco \n\t"
38 : "=&z"(tmp), "=r" (m), "=&r" (retval)
39 : "1" (m), "r" (val & 0xff)
40 : "t", "memory"
41 );
42
43 return retval;
44}
45
46static inline unsigned long
47__cmpxchg_u32(volatile int *m, unsigned long old, unsigned long new)
48{
49 unsigned long retval;
50 unsigned long tmp;
51
52 __asm__ __volatile__ (
53 "1: \n\t"
54 "movli.l @%1, %0 ! __cmpxchg_u32 \n\t"
55 "mov %0, %2 \n\t"
56 "cmp/eq %2, %4 \n\t"
57 "bf 2f \n\t"
58 "mov %5, %0 \n\t"
59 "2: \n\t"
60 "movco.l %0, @%1 \n\t"
61 "bf 1b \n\t"
62 "synco \n\t"
63 : "=&z" (tmp), "=r" (m), "=&r" (retval)
64 : "1" (m), "r" (old), "r" (new)
65 : "t", "memory"
66 );
67
68 return retval;
69}
70
71#endif /* __ASM_SH_CMPXCHG_LLSC_H */
diff --git a/arch/sh/include/asm/elf.h b/arch/sh/include/asm/elf.h
index ee02db110f0..9eb9036a1bd 100644
--- a/arch/sh/include/asm/elf.h
+++ b/arch/sh/include/asm/elf.h
@@ -108,6 +108,14 @@ typedef struct user_fpu_struct elf_fpregset_t;
108#define elf_check_fdpic(x) ((x)->e_flags & EF_SH_FDPIC) 108#define elf_check_fdpic(x) ((x)->e_flags & EF_SH_FDPIC)
109#define elf_check_const_displacement(x) ((x)->e_flags & EF_SH_PIC) 109#define elf_check_const_displacement(x) ((x)->e_flags & EF_SH_PIC)
110 110
111#ifdef CONFIG_SUPERH32
112/*
113 * Enable dump using regset.
114 * This covers all of general/DSP/FPU regs.
115 */
116#define CORE_DUMP_USE_REGSET
117#endif
118
111#define USE_ELF_CORE_DUMP 119#define USE_ELF_CORE_DUMP
112#define ELF_FDPIC_CORE_EFLAGS EF_SH_FDPIC 120#define ELF_FDPIC_CORE_EFLAGS EF_SH_FDPIC
113#define ELF_EXEC_PAGESIZE PAGE_SIZE 121#define ELF_EXEC_PAGESIZE PAGE_SIZE
@@ -190,12 +198,6 @@ do { \
190#endif 198#endif
191 199
192#define SET_PERSONALITY(ex) set_personality(PER_LINUX_32BIT) 200#define SET_PERSONALITY(ex) set_personality(PER_LINUX_32BIT)
193struct task_struct;
194extern int dump_task_regs (struct task_struct *, elf_gregset_t *);
195extern int dump_task_fpu (struct task_struct *, elf_fpregset_t *);
196
197#define ELF_CORE_COPY_TASK_REGS(tsk, elf_regs) dump_task_regs(tsk, elf_regs)
198#define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) dump_task_fpu(tsk, elf_fpregs)
199 201
200#ifdef CONFIG_VSYSCALL 202#ifdef CONFIG_VSYSCALL
201/* vDSO has arch_setup_additional_pages */ 203/* vDSO has arch_setup_additional_pages */
diff --git a/arch/sh/include/asm/fpu.h b/arch/sh/include/asm/fpu.h
index 91462fea150..1d3aee04b5c 100644
--- a/arch/sh/include/asm/fpu.h
+++ b/arch/sh/include/asm/fpu.h
@@ -30,8 +30,15 @@ static inline void save_fpu(struct task_struct *tsk, struct pt_regs *regs)
30} 30}
31#endif 31#endif
32 32
33struct user_regset;
34
33extern int do_fpu_inst(unsigned short, struct pt_regs *); 35extern int do_fpu_inst(unsigned short, struct pt_regs *);
34 36
37extern int fpregs_get(struct task_struct *target,
38 const struct user_regset *regset,
39 unsigned int pos, unsigned int count,
40 void *kbuf, void __user *ubuf);
41
35static inline void unlazy_fpu(struct task_struct *tsk, struct pt_regs *regs) 42static inline void unlazy_fpu(struct task_struct *tsk, struct pt_regs *regs)
36{ 43{
37 preempt_disable(); 44 preempt_disable();
@@ -50,6 +57,18 @@ static inline void clear_fpu(struct task_struct *tsk, struct pt_regs *regs)
50 preempt_enable(); 57 preempt_enable();
51} 58}
52 59
60static inline int init_fpu(struct task_struct *tsk)
61{
62 if (tsk_used_math(tsk)) {
63 if ((boot_cpu_data.flags & CPU_HAS_FPU) && tsk == current)
64 unlazy_fpu(tsk, task_pt_regs(tsk));
65 return 0;
66 }
67
68 set_stopped_child_used_math(tsk);
69 return 0;
70}
71
53#endif /* __ASSEMBLY__ */ 72#endif /* __ASSEMBLY__ */
54 73
55#endif /* __ASM_SH_FPU_H */ 74#endif /* __ASM_SH_FPU_H */
diff --git a/arch/sh/include/asm/ftrace.h b/arch/sh/include/asm/ftrace.h
new file mode 100644
index 00000000000..3aed362c946
--- /dev/null
+++ b/arch/sh/include/asm/ftrace.h
@@ -0,0 +1,8 @@
1#ifndef __ASM_SH_FTRACE_H
2#define __ASM_SH_FTRACE_H
3
4#ifndef __ASSEMBLY__
5extern void mcount(void);
6#endif
7
8#endif /* __ASM_SH_FTRACE_H */
diff --git a/arch/sh/include/asm/gpio.h b/arch/sh/include/asm/gpio.h
index cf32bd2df88..9650e7c9c39 100644
--- a/arch/sh/include/asm/gpio.h
+++ b/arch/sh/include/asm/gpio.h
@@ -1,9 +1,9 @@
1/* 1/*
2 * include/asm-sh/gpio.h 2 * include/asm-sh/gpio.h
3 * 3 *
4 * Copyright (C) 2007 Markus Brunner, Mark Jonas 4 * Generic GPIO API and pinmux table support for SuperH.
5 * 5 *
6 * Addresses for the Pin Function Controller 6 * Copyright (c) 2008 Magnus Damm
7 * 7 *
8 * This file is subject to the terms and conditions of the GNU General Public 8 * This file is subject to the terms and conditions of the GNU General Public
9 * License. See the file "COPYING" in the main directory of this archive 9 * License. See the file "COPYING" in the main directory of this archive
@@ -16,4 +16,92 @@
16#include <cpu/gpio.h> 16#include <cpu/gpio.h>
17#endif 17#endif
18 18
19typedef unsigned short pinmux_enum_t;
20typedef unsigned char pinmux_flag_t;
21
22#define PINMUX_TYPE_NONE 0
23#define PINMUX_TYPE_FUNCTION 1
24#define PINMUX_TYPE_GPIO 2
25#define PINMUX_TYPE_OUTPUT 3
26#define PINMUX_TYPE_INPUT 4
27#define PINMUX_TYPE_INPUT_PULLUP 5
28#define PINMUX_TYPE_INPUT_PULLDOWN 6
29
30#define PINMUX_FLAG_TYPE (0x7)
31#define PINMUX_FLAG_WANT_PULLUP (1 << 3)
32#define PINMUX_FLAG_WANT_PULLDOWN (1 << 4)
33
34struct pinmux_gpio {
35 pinmux_enum_t enum_id;
36 pinmux_flag_t flags;
37};
38
39#define PINMUX_GPIO(gpio, data_or_mark) [gpio] = { data_or_mark }
40#define PINMUX_DATA(data_or_mark, ids...) data_or_mark, ids, 0
41
42struct pinmux_cfg_reg {
43 unsigned long reg, reg_width, field_width;
44 unsigned long *cnt;
45 pinmux_enum_t *enum_ids;
46};
47
48#define PINMUX_CFG_REG(name, r, r_width, f_width) \
49 .reg = r, .reg_width = r_width, .field_width = f_width, \
50 .cnt = (unsigned long [r_width / f_width]) {}, \
51 .enum_ids = (pinmux_enum_t [(r_width / f_width) * (1 << f_width)]) \
52
53struct pinmux_data_reg {
54 unsigned long reg, reg_width;
55 pinmux_enum_t *enum_ids;
56};
57
58#define PINMUX_DATA_REG(name, r, r_width) \
59 .reg = r, .reg_width = r_width, \
60 .enum_ids = (pinmux_enum_t [r_width]) \
61
62struct pinmux_range {
63 pinmux_enum_t begin;
64 pinmux_enum_t end;
65};
66
67struct pinmux_info {
68 char *name;
69 pinmux_enum_t reserved_id;
70 struct pinmux_range data;
71 struct pinmux_range input;
72 struct pinmux_range input_pd;
73 struct pinmux_range input_pu;
74 struct pinmux_range output;
75 struct pinmux_range mark;
76 struct pinmux_range function;
77
78 unsigned first_gpio, last_gpio;
79
80 struct pinmux_gpio *gpios;
81 struct pinmux_cfg_reg *cfg_regs;
82 struct pinmux_data_reg *data_regs;
83
84 pinmux_enum_t *gpio_data;
85 unsigned int gpio_data_size;
86
87 unsigned long *gpio_in_use;
88};
89
90int register_pinmux(struct pinmux_info *pip);
91
92int __gpio_request(unsigned gpio);
93static inline int gpio_request(unsigned gpio, const char *label)
94{
95 return __gpio_request(gpio);
96}
97void gpio_free(unsigned gpio);
98int gpio_direction_input(unsigned gpio);
99int gpio_direction_output(unsigned gpio, int value);
100int gpio_get_value(unsigned gpio);
101void gpio_set_value(unsigned gpio, int value);
102static inline int gpio_export(unsigned gpio, bool direction_may_change)
103{
104 return 0;
105}
106
19#endif /* __ASM_SH_GPIO_H */ 107#endif /* __ASM_SH_GPIO_H */
diff --git a/arch/sh/include/asm/hw_irq.h b/arch/sh/include/asm/hw_irq.h
index d557b00111b..603cdde813d 100644
--- a/arch/sh/include/asm/hw_irq.h
+++ b/arch/sh/include/asm/hw_irq.h
@@ -2,6 +2,7 @@
2#define __ASM_SH_HW_IRQ_H 2#define __ASM_SH_HW_IRQ_H
3 3
4#include <linux/init.h> 4#include <linux/init.h>
5#include <linux/sh_intc.h>
5#include <asm/atomic.h> 6#include <asm/atomic.h>
6 7
7extern atomic_t irq_err_count; 8extern atomic_t irq_err_count;
@@ -23,101 +24,12 @@ struct ipr_desc {
23 24
24void register_ipr_controller(struct ipr_desc *); 25void register_ipr_controller(struct ipr_desc *);
25 26
26typedef unsigned char intc_enum;
27
28struct intc_vect {
29 intc_enum enum_id;
30 unsigned short vect;
31};
32
33#define INTC_VECT(enum_id, vect) { enum_id, vect }
34#define INTC_IRQ(enum_id, irq) INTC_VECT(enum_id, irq2evt(irq))
35
36struct intc_group {
37 intc_enum enum_id;
38 intc_enum enum_ids[32];
39};
40
41#define INTC_GROUP(enum_id, ids...) { enum_id, { ids } }
42
43struct intc_mask_reg {
44 unsigned long set_reg, clr_reg, reg_width;
45 intc_enum enum_ids[32];
46#ifdef CONFIG_SMP
47 unsigned long smp;
48#endif
49};
50
51struct intc_prio_reg {
52 unsigned long set_reg, clr_reg, reg_width, field_width;
53 intc_enum enum_ids[16];
54#ifdef CONFIG_SMP
55 unsigned long smp;
56#endif
57};
58
59struct intc_sense_reg {
60 unsigned long reg, reg_width, field_width;
61 intc_enum enum_ids[16];
62};
63
64#ifdef CONFIG_SMP
65#define INTC_SMP(stride, nr) .smp = (stride) | ((nr) << 8)
66#else
67#define INTC_SMP(stride, nr)
68#endif
69
70struct intc_desc {
71 struct intc_vect *vectors;
72 unsigned int nr_vectors;
73 struct intc_group *groups;
74 unsigned int nr_groups;
75 struct intc_mask_reg *mask_regs;
76 unsigned int nr_mask_regs;
77 struct intc_prio_reg *prio_regs;
78 unsigned int nr_prio_regs;
79 struct intc_sense_reg *sense_regs;
80 unsigned int nr_sense_regs;
81 char *name;
82#if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4A)
83 struct intc_mask_reg *ack_regs;
84 unsigned int nr_ack_regs;
85#endif
86};
87
88#define _INTC_ARRAY(a) a, sizeof(a)/sizeof(*a)
89#define DECLARE_INTC_DESC(symbol, chipname, vectors, groups, \
90 mask_regs, prio_regs, sense_regs) \
91struct intc_desc symbol __initdata = { \
92 _INTC_ARRAY(vectors), _INTC_ARRAY(groups), \
93 _INTC_ARRAY(mask_regs), _INTC_ARRAY(prio_regs), \
94 _INTC_ARRAY(sense_regs), \
95 chipname, \
96}
97
98#if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4A)
99#define DECLARE_INTC_DESC_ACK(symbol, chipname, vectors, groups, \
100 mask_regs, prio_regs, sense_regs, ack_regs) \
101struct intc_desc symbol __initdata = { \
102 _INTC_ARRAY(vectors), _INTC_ARRAY(groups), \
103 _INTC_ARRAY(mask_regs), _INTC_ARRAY(prio_regs), \
104 _INTC_ARRAY(sense_regs), \
105 chipname, \
106 _INTC_ARRAY(ack_regs), \
107}
108#endif
109
110void __init register_intc_controller(struct intc_desc *desc);
111int intc_set_priority(unsigned int irq, unsigned int prio);
112
113void __init plat_irq_setup(void); 27void __init plat_irq_setup(void);
114#ifdef CONFIG_CPU_SH3
115void __init plat_irq_setup_sh3(void); 28void __init plat_irq_setup_sh3(void);
116#endif 29void __init plat_irq_setup_pins(int mode);
117 30
118enum { IRQ_MODE_IRQ, IRQ_MODE_IRQ7654, IRQ_MODE_IRQ3210, 31enum { IRQ_MODE_IRQ, IRQ_MODE_IRQ7654, IRQ_MODE_IRQ3210,
119 IRQ_MODE_IRL7654_MASK, IRQ_MODE_IRL3210_MASK, 32 IRQ_MODE_IRL7654_MASK, IRQ_MODE_IRL3210_MASK,
120 IRQ_MODE_IRL7654, IRQ_MODE_IRL3210 }; 33 IRQ_MODE_IRL7654, IRQ_MODE_IRL3210 };
121void __init plat_irq_setup_pins(int mode);
122 34
123#endif /* __ASM_SH_HW_IRQ_H */ 35#endif /* __ASM_SH_HW_IRQ_H */
diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h
index a4fbf0c84fb..436c2853957 100644
--- a/arch/sh/include/asm/io.h
+++ b/arch/sh/include/asm/io.h
@@ -1,27 +1,26 @@
1#ifndef __ASM_SH_IO_H 1#ifndef __ASM_SH_IO_H
2#define __ASM_SH_IO_H 2#define __ASM_SH_IO_H
3
4/* 3/*
5 * Convention: 4 * Convention:
6 * read{b,w,l}/write{b,w,l} are for PCI, 5 * read{b,w,l,q}/write{b,w,l,q} are for PCI,
7 * while in{b,w,l}/out{b,w,l} are for ISA 6 * while in{b,w,l}/out{b,w,l} are for ISA
8 * These may (will) be platform specific function. 7 *
9 * In addition we have 'pausing' versions: in{b,w,l}_p/out{b,w,l}_p 8 * In addition we have 'pausing' versions: in{b,w,l}_p/out{b,w,l}_p
10 * and 'string' versions: ins{b,w,l}/outs{b,w,l} 9 * and 'string' versions: ins{b,w,l}/outs{b,w,l}
11 * For read{b,w,l} and write{b,w,l} there are also __raw versions, which
12 * do not have a memory barrier after them.
13 * 10 *
14 * In addition, we have 11 * While read{b,w,l,q} and write{b,w,l,q} contain memory barriers
15 * ctrl_in{b,w,l}/ctrl_out{b,w,l} for SuperH specific I/O. 12 * automatically, there are also __raw versions, which do not.
16 * which are processor specific. 13 *
17 */ 14 * Historically, we have also had ctrl_in{b,w,l,q}/ctrl_out{b,w,l,q} for
18 15 * SuperH specific I/O (raw I/O to on-chip CPU peripherals). In practice
19/* 16 * these have the same semantics as the __raw variants, and as such, all
20 * We follow the Alpha convention here: 17 * new code should be using the __raw versions.
21 * __inb expands to an inline function call (which calls via the mv) 18 *
22 * _inb is a real function call (note ___raw fns are _ version of __raw) 19 * All ISA I/O routines are wrapped through the machine vector. If a
23 * inb by default expands to _inb, but the machine specific code may 20 * board does not provide overrides, a generic set that are copied in
24 * define it to __inb if it chooses. 21 * from the default machine vector are used instead. These are largely
22 * for old compat code for I/O offseting to SuperIOs, all of which are
23 * better handled through the machvec ioport mapping routines these days.
25 */ 24 */
26#include <asm/cache.h> 25#include <asm/cache.h>
27#include <asm/system.h> 26#include <asm/system.h>
@@ -31,7 +30,6 @@
31#include <asm-generic/iomap.h> 30#include <asm-generic/iomap.h>
32 31
33#ifdef __KERNEL__ 32#ifdef __KERNEL__
34
35/* 33/*
36 * Depending on which platform we are running on, we need different 34 * Depending on which platform we are running on, we need different
37 * I/O functions. 35 * I/O functions.
@@ -40,105 +38,68 @@
40#include <asm/io_generic.h> 38#include <asm/io_generic.h>
41#include <asm/io_trapped.h> 39#include <asm/io_trapped.h>
42 40
43#define maybebadio(port) \ 41#define inb(p) sh_mv.mv_inb((p))
44 printk(KERN_ERR "bad PC-like io %s:%u for port 0x%lx at 0x%08x\n", \ 42#define inw(p) sh_mv.mv_inw((p))
45 __FUNCTION__, __LINE__, (port), (u32)__builtin_return_address(0)) 43#define inl(p) sh_mv.mv_inl((p))
46 44#define outb(x,p) sh_mv.mv_outb((x),(p))
47/* 45#define outw(x,p) sh_mv.mv_outw((x),(p))
48 * Since boards are able to define their own set of I/O routines through 46#define outl(x,p) sh_mv.mv_outl((x),(p))
49 * their respective machine vector, we always wrap through the mv. 47
50 * 48#define inb_p(p) sh_mv.mv_inb_p((p))
51 * Also, in the event that a board hasn't provided its own definition for 49#define inw_p(p) sh_mv.mv_inw_p((p))
52 * a given routine, it will be wrapped to generic code at run-time. 50#define inl_p(p) sh_mv.mv_inl_p((p))
53 */ 51#define outb_p(x,p) sh_mv.mv_outb_p((x),(p))
52#define outw_p(x,p) sh_mv.mv_outw_p((x),(p))
53#define outl_p(x,p) sh_mv.mv_outl_p((x),(p))
54
55#define insb(p,b,c) sh_mv.mv_insb((p), (b), (c))
56#define insw(p,b,c) sh_mv.mv_insw((p), (b), (c))
57#define insl(p,b,c) sh_mv.mv_insl((p), (b), (c))
58#define outsb(p,b,c) sh_mv.mv_outsb((p), (b), (c))
59#define outsw(p,b,c) sh_mv.mv_outsw((p), (b), (c))
60#define outsl(p,b,c) sh_mv.mv_outsl((p), (b), (c))
61
62#define __raw_writeb(v,a) (__chk_io_ptr(a), *(volatile u8 __force *)(a) = (v))
63#define __raw_writew(v,a) (__chk_io_ptr(a), *(volatile u16 __force *)(a) = (v))
64#define __raw_writel(v,a) (__chk_io_ptr(a), *(volatile u32 __force *)(a) = (v))
65#define __raw_writeq(v,a) (__chk_io_ptr(a), *(volatile u64 __force *)(a) = (v))
66
67#define __raw_readb(a) (__chk_io_ptr(a), *(volatile u8 __force *)(a))
68#define __raw_readw(a) (__chk_io_ptr(a), *(volatile u16 __force *)(a))
69#define __raw_readl(a) (__chk_io_ptr(a), *(volatile u32 __force *)(a))
70#define __raw_readq(a) (__chk_io_ptr(a), *(volatile u64 __force *)(a))
71
72#define readb(a) ({ u8 r_ = __raw_readb(a); mb(); r_; })
73#define readw(a) ({ u16 r_ = __raw_readw(a); mb(); r_; })
74#define readl(a) ({ u32 r_ = __raw_readl(a); mb(); r_; })
75#define readq(a) ({ u64 r_ = __raw_readq(a); mb(); r_; })
76
77#define writeb(v,a) ({ __raw_writeb((v),(a)); mb(); })
78#define writew(v,a) ({ __raw_writew((v),(a)); mb(); })
79#define writel(v,a) ({ __raw_writel((v),(a)); mb(); })
80#define writeq(v,a) ({ __raw_writeq((v),(a)); mb(); })
54 81
55#define __inb(p) sh_mv.mv_inb((p)) 82/* SuperH on-chip I/O functions */
56#define __inw(p) sh_mv.mv_inw((p)) 83#define ctrl_inb __raw_readb
57#define __inl(p) sh_mv.mv_inl((p)) 84#define ctrl_inw __raw_readw
58#define __outb(x,p) sh_mv.mv_outb((x),(p)) 85#define ctrl_inl __raw_readl
59#define __outw(x,p) sh_mv.mv_outw((x),(p)) 86#define ctrl_inq __raw_readq
60#define __outl(x,p) sh_mv.mv_outl((x),(p))
61
62#define __inb_p(p) sh_mv.mv_inb_p((p))
63#define __inw_p(p) sh_mv.mv_inw_p((p))
64#define __inl_p(p) sh_mv.mv_inl_p((p))
65#define __outb_p(x,p) sh_mv.mv_outb_p((x),(p))
66#define __outw_p(x,p) sh_mv.mv_outw_p((x),(p))
67#define __outl_p(x,p) sh_mv.mv_outl_p((x),(p))
68
69#define __insb(p,b,c) sh_mv.mv_insb((p), (b), (c))
70#define __insw(p,b,c) sh_mv.mv_insw((p), (b), (c))
71#define __insl(p,b,c) sh_mv.mv_insl((p), (b), (c))
72#define __outsb(p,b,c) sh_mv.mv_outsb((p), (b), (c))
73#define __outsw(p,b,c) sh_mv.mv_outsw((p), (b), (c))
74#define __outsl(p,b,c) sh_mv.mv_outsl((p), (b), (c))
75
76#define __readb(a) sh_mv.mv_readb((a))
77#define __readw(a) sh_mv.mv_readw((a))
78#define __readl(a) sh_mv.mv_readl((a))
79#define __writeb(v,a) sh_mv.mv_writeb((v),(a))
80#define __writew(v,a) sh_mv.mv_writew((v),(a))
81#define __writel(v,a) sh_mv.mv_writel((v),(a))
82
83#define inb __inb
84#define inw __inw
85#define inl __inl
86#define outb __outb
87#define outw __outw
88#define outl __outl
89
90#define inb_p __inb_p
91#define inw_p __inw_p
92#define inl_p __inl_p
93#define outb_p __outb_p
94#define outw_p __outw_p
95#define outl_p __outl_p
96
97#define insb __insb
98#define insw __insw
99#define insl __insl
100#define outsb __outsb
101#define outsw __outsw
102#define outsl __outsl
103
104#define __raw_readb(a) __readb((void __iomem *)(a))
105#define __raw_readw(a) __readw((void __iomem *)(a))
106#define __raw_readl(a) __readl((void __iomem *)(a))
107#define __raw_writeb(v, a) __writeb(v, (void __iomem *)(a))
108#define __raw_writew(v, a) __writew(v, (void __iomem *)(a))
109#define __raw_writel(v, a) __writel(v, (void __iomem *)(a))
110
111void __raw_writesl(unsigned long addr, const void *data, int longlen);
112void __raw_readsl(unsigned long addr, void *data, int longlen);
113 87
114/* 88#define ctrl_outb __raw_writeb
115 * The platform header files may define some of these macros to use 89#define ctrl_outw __raw_writew
116 * the inlined versions where appropriate. These macros may also be 90#define ctrl_outl __raw_writel
117 * redefined by userlevel programs. 91#define ctrl_outq __raw_writeq
118 */
119#ifdef __readb
120# define readb(a) ({ unsigned int r_ = __raw_readb(a); mb(); r_; })
121#endif
122#ifdef __raw_readw
123# define readw(a) ({ unsigned int r_ = __raw_readw(a); mb(); r_; })
124#endif
125#ifdef __raw_readl
126# define readl(a) ({ unsigned int r_ = __raw_readl(a); mb(); r_; })
127#endif
128 92
129#ifdef __raw_writeb 93static inline void ctrl_delay(void)
130# define writeb(v,a) ({ __raw_writeb((v),(a)); mb(); }) 94{
131#endif 95#ifdef P2SEG
132#ifdef __raw_writew 96 __raw_readw(P2SEG);
133# define writew(v,a) ({ __raw_writew((v),(a)); mb(); })
134#endif
135#ifdef __raw_writel
136# define writel(v,a) ({ __raw_writel((v),(a)); mb(); })
137#endif 97#endif
98}
138 99
139#define __BUILD_MEMORY_STRING(bwlq, type) \ 100#define __BUILD_MEMORY_STRING(bwlq, type) \
140 \ 101 \
141static inline void writes##bwlq(volatile void __iomem *mem, \ 102static inline void __raw_writes##bwlq(volatile void __iomem *mem, \
142 const void *addr, unsigned int count) \ 103 const void *addr, unsigned int count) \
143{ \ 104{ \
144 const volatile type *__addr = addr; \ 105 const volatile type *__addr = addr; \
@@ -149,8 +110,8 @@ static inline void writes##bwlq(volatile void __iomem *mem, \
149 } \ 110 } \
150} \ 111} \
151 \ 112 \
152static inline void reads##bwlq(volatile void __iomem *mem, void *addr, \ 113static inline void __raw_reads##bwlq(volatile void __iomem *mem, \
153 unsigned int count) \ 114 void *addr, unsigned int count) \
154{ \ 115{ \
155 volatile type *__addr = addr; \ 116 volatile type *__addr = addr; \
156 \ 117 \
@@ -162,106 +123,71 @@ static inline void reads##bwlq(volatile void __iomem *mem, void *addr, \
162 123
163__BUILD_MEMORY_STRING(b, u8) 124__BUILD_MEMORY_STRING(b, u8)
164__BUILD_MEMORY_STRING(w, u16) 125__BUILD_MEMORY_STRING(w, u16)
165#define writesl __raw_writesl 126__BUILD_MEMORY_STRING(q, u64)
166#define readsl __raw_readsl 127
128void __raw_writesl(void __iomem *addr, const void *data, int longlen);
129void __raw_readsl(const void __iomem *addr, void *data, int longlen);
130
131#define writesb __raw_writesb
132#define writesw __raw_writesw
133#define writesl __raw_writesl
134
135#define readsb __raw_readsb
136#define readsw __raw_readsw
137#define readsl __raw_readsl
167 138
168#define readb_relaxed(a) readb(a) 139#define readb_relaxed(a) readb(a)
169#define readw_relaxed(a) readw(a) 140#define readw_relaxed(a) readw(a)
170#define readl_relaxed(a) readl(a) 141#define readl_relaxed(a) readl(a)
142#define readq_relaxed(a) readq(a)
171 143
172/* Simple MMIO */ 144/* Simple MMIO */
173#define ioread8(a) readb(a) 145#define ioread8(a) __raw_readb(a)
174#define ioread16(a) readw(a) 146#define ioread16(a) __raw_readw(a)
175#define ioread16be(a) be16_to_cpu(__raw_readw((a))) 147#define ioread16be(a) be16_to_cpu(__raw_readw((a)))
176#define ioread32(a) readl(a) 148#define ioread32(a) __raw_readl(a)
177#define ioread32be(a) be32_to_cpu(__raw_readl((a))) 149#define ioread32be(a) be32_to_cpu(__raw_readl((a)))
178 150
179#define iowrite8(v,a) writeb((v),(a)) 151#define iowrite8(v,a) __raw_writeb((v),(a))
180#define iowrite16(v,a) writew((v),(a)) 152#define iowrite16(v,a) __raw_writew((v),(a))
181#define iowrite16be(v,a) __raw_writew(cpu_to_be16((v)),(a)) 153#define iowrite16be(v,a) __raw_writew(cpu_to_be16((v)),(a))
182#define iowrite32(v,a) writel((v),(a)) 154#define iowrite32(v,a) __raw_writel((v),(a))
183#define iowrite32be(v,a) __raw_writel(cpu_to_be32((v)),(a)) 155#define iowrite32be(v,a) __raw_writel(cpu_to_be32((v)),(a))
184 156
185#define ioread8_rep(a, d, c) readsb((a), (d), (c)) 157#define ioread8_rep(a, d, c) __raw_readsb((a), (d), (c))
186#define ioread16_rep(a, d, c) readsw((a), (d), (c)) 158#define ioread16_rep(a, d, c) __raw_readsw((a), (d), (c))
187#define ioread32_rep(a, d, c) readsl((a), (d), (c)) 159#define ioread32_rep(a, d, c) __raw_readsl((a), (d), (c))
188 160
189#define iowrite8_rep(a, s, c) writesb((a), (s), (c)) 161#define iowrite8_rep(a, s, c) __raw_writesb((a), (s), (c))
190#define iowrite16_rep(a, s, c) writesw((a), (s), (c)) 162#define iowrite16_rep(a, s, c) __raw_writesw((a), (s), (c))
191#define iowrite32_rep(a, s, c) writesl((a), (s), (c)) 163#define iowrite32_rep(a, s, c) __raw_writesl((a), (s), (c))
192 164
193#define mmiowb() wmb() /* synco on SH-4A, otherwise a nop */ 165/* synco on SH-4A, otherwise a nop */
166#define mmiowb() wmb()
194 167
195#define IO_SPACE_LIMIT 0xffffffff 168#define IO_SPACE_LIMIT 0xffffffff
196 169
170extern unsigned long generic_io_base;
171
197/* 172/*
198 * This function provides a method for the generic case where a board-specific 173 * This function provides a method for the generic case where a
199 * ioport_map simply needs to return the port + some arbitrary port base. 174 * board-specific ioport_map simply needs to return the port + some
175 * arbitrary port base.
200 * 176 *
201 * We use this at board setup time to implicitly set the port base, and 177 * We use this at board setup time to implicitly set the port base, and
202 * as a result, we can use the generic ioport_map. 178 * as a result, we can use the generic ioport_map.
203 */ 179 */
204static inline void __set_io_port_base(unsigned long pbase) 180static inline void __set_io_port_base(unsigned long pbase)
205{ 181{
206 extern unsigned long generic_io_base;
207
208 generic_io_base = pbase; 182 generic_io_base = pbase;
209} 183}
210 184
211#define __ioport_map(p, n) sh_mv.mv_ioport_map((p), (n)) 185#define __ioport_map(p, n) sh_mv.mv_ioport_map((p), (n))
212 186
213/* We really want to try and get these to memcpy etc */ 187/* We really want to try and get these to memcpy etc */
214extern void memcpy_fromio(void *, volatile void __iomem *, unsigned long); 188void memcpy_fromio(void *, const volatile void __iomem *, unsigned long);
215extern void memcpy_toio(volatile void __iomem *, const void *, unsigned long); 189void memcpy_toio(volatile void __iomem *, const void *, unsigned long);
216extern void memset_io(volatile void __iomem *, int, unsigned long); 190void memset_io(volatile void __iomem *, int, unsigned long);
217
218/* SuperH on-chip I/O functions */
219static inline unsigned char ctrl_inb(unsigned long addr)
220{
221 return *(volatile unsigned char*)addr;
222}
223
224static inline unsigned short ctrl_inw(unsigned long addr)
225{
226 return *(volatile unsigned short*)addr;
227}
228
229static inline unsigned int ctrl_inl(unsigned long addr)
230{
231 return *(volatile unsigned long*)addr;
232}
233
234static inline unsigned long long ctrl_inq(unsigned long addr)
235{
236 return *(volatile unsigned long long*)addr;
237}
238
239static inline void ctrl_outb(unsigned char b, unsigned long addr)
240{
241 *(volatile unsigned char*)addr = b;
242}
243
244static inline void ctrl_outw(unsigned short b, unsigned long addr)
245{
246 *(volatile unsigned short*)addr = b;
247}
248
249static inline void ctrl_outl(unsigned int b, unsigned long addr)
250{
251 *(volatile unsigned long*)addr = b;
252}
253
254static inline void ctrl_outq(unsigned long long b, unsigned long addr)
255{
256 *(volatile unsigned long long*)addr = b;
257}
258
259static inline void ctrl_delay(void)
260{
261#ifdef P2SEG
262 ctrl_inw(P2SEG);
263#endif
264}
265 191
266/* Quad-word real-mode I/O, don't ask.. */ 192/* Quad-word real-mode I/O, don't ask.. */
267unsigned long long peek_real_address_q(unsigned long long addr); 193unsigned long long peek_real_address_q(unsigned long long addr);
@@ -347,9 +273,15 @@ __ioremap_mode(unsigned long offset, unsigned long size, unsigned long flags)
347 __ioremap_mode((offset), (size), _PAGE_CACHABLE) 273 __ioremap_mode((offset), (size), _PAGE_CACHABLE)
348#define p3_ioremap(offset, size, flags) \ 274#define p3_ioremap(offset, size, flags) \
349 __ioremap((offset), (size), (flags)) 275 __ioremap((offset), (size), (flags))
276#define ioremap_prot(offset, size, flags) \
277 __ioremap_mode((offset), (size), (flags))
350#define iounmap(addr) \ 278#define iounmap(addr) \
351 __iounmap((addr)) 279 __iounmap((addr))
352 280
281#define maybebadio(port) \
282 printk(KERN_ERR "bad PC-like io %s:%u for port 0x%lx at 0x%08x\n", \
283 __func__, __LINE__, (port), (u32)__builtin_return_address(0))
284
353/* 285/*
354 * Convert a physical pointer to a virtual kernel pointer for /dev/mem 286 * Convert a physical pointer to a virtual kernel pointer for /dev/mem
355 * access 287 * access
diff --git a/arch/sh/include/asm/io_generic.h b/arch/sh/include/asm/io_generic.h
index 92fc6070d7b..1e5d375f55d 100644
--- a/arch/sh/include/asm/io_generic.h
+++ b/arch/sh/include/asm/io_generic.h
@@ -33,13 +33,6 @@ void IO_CONCAT(__IO_PREFIX,outsb)(unsigned long, const void *src, unsigned long
33void IO_CONCAT(__IO_PREFIX,outsw)(unsigned long, const void *src, unsigned long count); 33void IO_CONCAT(__IO_PREFIX,outsw)(unsigned long, const void *src, unsigned long count);
34void IO_CONCAT(__IO_PREFIX,outsl)(unsigned long, const void *src, unsigned long count); 34void IO_CONCAT(__IO_PREFIX,outsl)(unsigned long, const void *src, unsigned long count);
35 35
36u8 IO_CONCAT(__IO_PREFIX,readb)(void __iomem *);
37u16 IO_CONCAT(__IO_PREFIX,readw)(void __iomem *);
38u32 IO_CONCAT(__IO_PREFIX,readl)(void __iomem *);
39void IO_CONCAT(__IO_PREFIX,writeb)(u8, void __iomem *);
40void IO_CONCAT(__IO_PREFIX,writew)(u16, void __iomem *);
41void IO_CONCAT(__IO_PREFIX,writel)(u32, void __iomem *);
42
43void *IO_CONCAT(__IO_PREFIX,ioremap)(unsigned long offset, unsigned long size); 36void *IO_CONCAT(__IO_PREFIX,ioremap)(unsigned long offset, unsigned long size);
44void IO_CONCAT(__IO_PREFIX,iounmap)(void *addr); 37void IO_CONCAT(__IO_PREFIX,iounmap)(void *addr);
45 38
diff --git a/arch/sh/include/asm/irq.h b/arch/sh/include/asm/irq.h
index 6195a531c1b..d319baaf4fb 100644
--- a/arch/sh/include/asm/irq.h
+++ b/arch/sh/include/asm/irq.h
@@ -41,6 +41,9 @@ static inline int generic_irq_demux(int irq)
41#define irq_canonicalize(irq) (irq) 41#define irq_canonicalize(irq) (irq)
42#define irq_demux(irq) sh_mv.mv_irq_demux(irq) 42#define irq_demux(irq) sh_mv.mv_irq_demux(irq)
43 43
44void init_IRQ(void);
45asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs);
46
44#ifdef CONFIG_IRQSTACKS 47#ifdef CONFIG_IRQSTACKS
45extern void irq_ctx_init(int cpu); 48extern void irq_ctx_init(int cpu);
46extern void irq_ctx_exit(int cpu); 49extern void irq_ctx_exit(int cpu);
diff --git a/arch/sh/include/asm/kprobes.h b/arch/sh/include/asm/kprobes.h
new file mode 100644
index 00000000000..6078d8e551d
--- /dev/null
+++ b/arch/sh/include/asm/kprobes.h
@@ -0,0 +1,58 @@
1#ifndef __ASM_SH_KPROBES_H
2#define __ASM_SH_KPROBES_H
3
4#ifdef CONFIG_KPROBES
5
6#include <linux/types.h>
7#include <linux/ptrace.h>
8
9typedef u16 kprobe_opcode_t;
10#define BREAKPOINT_INSTRUCTION 0xc33a
11
12#define MAX_INSN_SIZE 16
13#define MAX_STACK_SIZE 64
14#define MIN_STACK_SIZE(ADDR) (((MAX_STACK_SIZE) < \
15 (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR))) \
16 ? (MAX_STACK_SIZE) \
17 : (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR)))
18
19#define regs_return_value(regs) ((regs)->regs[0])
20#define flush_insn_slot(p) do { } while (0)
21#define kretprobe_blacklist_size 0
22
23struct kprobe;
24
25void arch_remove_kprobe(struct kprobe *);
26void kretprobe_trampoline(void);
27void jprobe_return_end(void);
28
29/* Architecture specific copy of original instruction*/
30struct arch_specific_insn {
31 /* copy of the original instruction */
32 kprobe_opcode_t insn[MAX_INSN_SIZE];
33};
34
35struct prev_kprobe {
36 struct kprobe *kp;
37 unsigned long status;
38};
39
40/* per-cpu kprobe control block */
41struct kprobe_ctlblk {
42 unsigned long kprobe_status;
43 unsigned long jprobe_saved_r15;
44 struct pt_regs jprobe_saved_regs;
45 kprobe_opcode_t jprobes_stack[MAX_STACK_SIZE];
46 struct prev_kprobe prev_kprobe;
47};
48
49extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
50extern int kprobe_exceptions_notify(struct notifier_block *self,
51 unsigned long val, void *data);
52extern int kprobe_handle_illslot(unsigned long pc);
53#else
54
55#define kprobe_handle_illslot(pc) (-1)
56
57#endif /* CONFIG_KPROBES */
58#endif /* __ASM_SH_KPROBES_H */
diff --git a/arch/sh/include/asm/machvec.h b/arch/sh/include/asm/machvec.h
index b2e4124070a..f1bae02ef7b 100644
--- a/arch/sh/include/asm/machvec.h
+++ b/arch/sh/include/asm/machvec.h
@@ -42,13 +42,6 @@ struct sh_machine_vector {
42 void (*mv_outsw)(unsigned long, const void *src, unsigned long count); 42 void (*mv_outsw)(unsigned long, const void *src, unsigned long count);
43 void (*mv_outsl)(unsigned long, const void *src, unsigned long count); 43 void (*mv_outsl)(unsigned long, const void *src, unsigned long count);
44 44
45 u8 (*mv_readb)(void __iomem *);
46 u16 (*mv_readw)(void __iomem *);
47 u32 (*mv_readl)(void __iomem *);
48 void (*mv_writeb)(u8, void __iomem *);
49 void (*mv_writew)(u16, void __iomem *);
50 void (*mv_writel)(u32, void __iomem *);
51
52 int (*mv_irq_demux)(int irq); 45 int (*mv_irq_demux)(int irq);
53 46
54 void (*mv_init_irq)(void); 47 void (*mv_init_irq)(void);
diff --git a/arch/sh/include/asm/mmzone.h b/arch/sh/include/asm/mmzone.h
index 2969253c404..7f5363b29ba 100644
--- a/arch/sh/include/asm/mmzone.h
+++ b/arch/sh/include/asm/mmzone.h
@@ -4,6 +4,8 @@
4#ifdef __KERNEL__ 4#ifdef __KERNEL__
5 5
6#ifdef CONFIG_NEED_MULTIPLE_NODES 6#ifdef CONFIG_NEED_MULTIPLE_NODES
7#include <linux/numa.h>
8
7extern struct pglist_data *node_data[]; 9extern struct pglist_data *node_data[];
8#define NODE_DATA(nid) (node_data[nid]) 10#define NODE_DATA(nid) (node_data[nid])
9 11
diff --git a/arch/sh/include/asm/page.h b/arch/sh/include/asm/page.h
index 77fb8bf02e4..5871d78e47e 100644
--- a/arch/sh/include/asm/page.h
+++ b/arch/sh/include/asm/page.h
@@ -104,6 +104,8 @@ typedef struct { unsigned long pgd; } pgd_t;
104 104
105typedef struct page *pgtable_t; 105typedef struct page *pgtable_t;
106 106
107#define pte_pgprot(x) __pgprot(pte_val(x) & PTE_FLAGS_MASK)
108
107#endif /* !__ASSEMBLY__ */ 109#endif /* !__ASSEMBLY__ */
108 110
109/* 111/*
diff --git a/arch/sh/include/asm/pgtable.h b/arch/sh/include/asm/pgtable.h
index a4a8f8b9346..52220d70a09 100644
--- a/arch/sh/include/asm/pgtable.h
+++ b/arch/sh/include/asm/pgtable.h
@@ -76,6 +76,7 @@ extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)];
76#endif 76#endif
77 77
78#define PTE_PHYS_MASK (PHYS_ADDR_MASK & PAGE_MASK) 78#define PTE_PHYS_MASK (PHYS_ADDR_MASK & PAGE_MASK)
79#define PTE_FLAGS_MASK (~(PTE_PHYS_MASK) << PAGE_SHIFT)
79 80
80#ifdef CONFIG_SUPERH32 81#ifdef CONFIG_SUPERH32
81#define VMALLOC_START (P3SEG) 82#define VMALLOC_START (P3SEG)
diff --git a/arch/sh/include/asm/processor.h b/arch/sh/include/asm/processor.h
index 15d9f92ca38..693364a20ad 100644
--- a/arch/sh/include/asm/processor.h
+++ b/arch/sh/include/asm/processor.h
@@ -3,6 +3,7 @@
3 3
4#include <asm/cpu-features.h> 4#include <asm/cpu-features.h>
5#include <asm/segment.h> 5#include <asm/segment.h>
6#include <asm/cache.h>
6 7
7#ifndef __ASSEMBLY__ 8#ifndef __ASSEMBLY__
8/* 9/*
@@ -43,11 +44,52 @@ enum cpu_type {
43 CPU_SH_NONE 44 CPU_SH_NONE
44}; 45};
45 46
47/*
48 * TLB information structure
49 *
50 * Defined for both I and D tlb, per-processor.
51 */
52struct tlb_info {
53 unsigned long long next;
54 unsigned long long first;
55 unsigned long long last;
56
57 unsigned int entries;
58 unsigned int step;
59
60 unsigned long flags;
61};
62
63struct sh_cpuinfo {
64 unsigned int type;
65 int cut_major, cut_minor;
66 unsigned long loops_per_jiffy;
67 unsigned long asid_cache;
68
69 struct cache_info icache; /* Primary I-cache */
70 struct cache_info dcache; /* Primary D-cache */
71 struct cache_info scache; /* Secondary cache */
72
73 /* TLB info */
74 struct tlb_info itlb;
75 struct tlb_info dtlb;
76
77 unsigned long flags;
78} __attribute__ ((aligned(L1_CACHE_BYTES)));
79
80extern struct sh_cpuinfo cpu_data[];
81#define boot_cpu_data cpu_data[0]
82#define current_cpu_data cpu_data[smp_processor_id()]
83#define raw_current_cpu_data cpu_data[raw_smp_processor_id()]
84
46/* Forward decl */ 85/* Forward decl */
47struct sh_cpuinfo; 86struct seq_operations;
87
88extern struct pt_regs fake_swapper_regs;
48 89
49/* arch/sh/kernel/setup.c */ 90/* arch/sh/kernel/setup.c */
50const char *get_cpu_subtype(struct sh_cpuinfo *c); 91const char *get_cpu_subtype(struct sh_cpuinfo *c);
92extern const struct seq_operations cpuinfo_op;
51 93
52#ifdef CONFIG_VSYSCALL 94#ifdef CONFIG_VSYSCALL
53int vsyscall_init(void); 95int vsyscall_init(void);
diff --git a/arch/sh/include/asm/processor_32.h b/arch/sh/include/asm/processor_32.h
index 0dadd75bd93..a46a0207e97 100644
--- a/arch/sh/include/asm/processor_32.h
+++ b/arch/sh/include/asm/processor_32.h
@@ -10,9 +10,9 @@
10#ifdef __KERNEL__ 10#ifdef __KERNEL__
11 11
12#include <linux/compiler.h> 12#include <linux/compiler.h>
13#include <linux/linkage.h>
13#include <asm/page.h> 14#include <asm/page.h>
14#include <asm/types.h> 15#include <asm/types.h>
15#include <asm/cache.h>
16#include <asm/ptrace.h> 16#include <asm/ptrace.h>
17 17
18/* 18/*
@@ -26,23 +26,7 @@
26#define CCN_CVR 0xff000040 26#define CCN_CVR 0xff000040
27#define CCN_PRR 0xff000044 27#define CCN_PRR 0xff000044
28 28
29struct sh_cpuinfo { 29asmlinkage void __init sh_cpu_init(void);
30 unsigned int type;
31 int cut_major, cut_minor;
32 unsigned long loops_per_jiffy;
33 unsigned long asid_cache;
34
35 struct cache_info icache; /* Primary I-cache */
36 struct cache_info dcache; /* Primary D-cache */
37 struct cache_info scache; /* Secondary cache */
38
39 unsigned long flags;
40} __attribute__ ((aligned(L1_CACHE_BYTES)));
41
42extern struct sh_cpuinfo cpu_data[];
43#define boot_cpu_data cpu_data[0]
44#define current_cpu_data cpu_data[smp_processor_id()]
45#define raw_current_cpu_data cpu_data[raw_smp_processor_id()]
46 30
47/* 31/*
48 * User space process size: 2GB. 32 * User space process size: 2GB.
@@ -196,6 +180,8 @@ extern unsigned long get_wchan(struct task_struct *p);
196#define KSTK_EIP(tsk) (task_pt_regs(tsk)->pc) 180#define KSTK_EIP(tsk) (task_pt_regs(tsk)->pc)
197#define KSTK_ESP(tsk) (task_pt_regs(tsk)->regs[15]) 181#define KSTK_ESP(tsk) (task_pt_regs(tsk)->regs[15])
198 182
183#define user_stack_pointer(regs) ((regs)->regs[15])
184
199#define cpu_sleep() __asm__ __volatile__ ("sleep" : : : "memory") 185#define cpu_sleep() __asm__ __volatile__ ("sleep" : : : "memory")
200#define cpu_relax() barrier() 186#define cpu_relax() barrier()
201 187
diff --git a/arch/sh/include/asm/processor_64.h b/arch/sh/include/asm/processor_64.h
index 770d5169983..b0b4824dfc4 100644
--- a/arch/sh/include/asm/processor_64.h
+++ b/arch/sh/include/asm/processor_64.h
@@ -17,7 +17,6 @@
17#include <linux/compiler.h> 17#include <linux/compiler.h>
18#include <asm/page.h> 18#include <asm/page.h>
19#include <asm/types.h> 19#include <asm/types.h>
20#include <asm/cache.h>
21#include <asm/ptrace.h> 20#include <asm/ptrace.h>
22#include <cpu/registers.h> 21#include <cpu/registers.h>
23 22
@@ -36,46 +35,6 @@ __asm__("gettr tr0, %1\n\t" \
36 : "1" (__dummy)); \ 35 : "1" (__dummy)); \
37pc; }) 36pc; })
38 37
39/*
40 * TLB information structure
41 *
42 * Defined for both I and D tlb, per-processor.
43 */
44struct tlb_info {
45 unsigned long long next;
46 unsigned long long first;
47 unsigned long long last;
48
49 unsigned int entries;
50 unsigned int step;
51
52 unsigned long flags;
53};
54
55struct sh_cpuinfo {
56 enum cpu_type type;
57 unsigned long loops_per_jiffy;
58 unsigned long asid_cache;
59
60 unsigned int cpu_clock, master_clock, bus_clock, module_clock;
61
62 /* Cache info */
63 struct cache_info icache;
64 struct cache_info dcache;
65 struct cache_info scache;
66
67 /* TLB info */
68 struct tlb_info itlb;
69 struct tlb_info dtlb;
70
71 unsigned long flags;
72};
73
74extern struct sh_cpuinfo cpu_data[];
75#define boot_cpu_data cpu_data[0]
76#define current_cpu_data cpu_data[smp_processor_id()]
77#define raw_current_cpu_data cpu_data[raw_smp_processor_id()]
78
79#endif 38#endif
80 39
81/* 40/*
@@ -169,8 +128,6 @@ struct thread_struct {
169#define INIT_MMAP \ 128#define INIT_MMAP \
170{ &init_mm, 0, 0, NULL, PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC, 1, NULL, NULL } 129{ &init_mm, 0, 0, NULL, PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC, 1, NULL, NULL }
171 130
172extern struct pt_regs fake_swapper_regs;
173
174#define INIT_THREAD { \ 131#define INIT_THREAD { \
175 .sp = sizeof(init_stack) + \ 132 .sp = sizeof(init_stack) + \
176 (long) &init_stack, \ 133 (long) &init_stack, \
@@ -269,6 +226,8 @@ extern unsigned long get_wchan(struct task_struct *p);
269#define KSTK_EIP(tsk) ((tsk)->thread.pc) 226#define KSTK_EIP(tsk) ((tsk)->thread.pc)
270#define KSTK_ESP(tsk) ((tsk)->thread.sp) 227#define KSTK_ESP(tsk) ((tsk)->thread.sp)
271 228
229#define user_stack_pointer(regs) ((regs)->sp)
230
272#define cpu_relax() barrier() 231#define cpu_relax() barrier()
273 232
274#endif /* __ASSEMBLY__ */ 233#endif /* __ASSEMBLY__ */
diff --git a/arch/sh/include/asm/ptrace.h b/arch/sh/include/asm/ptrace.h
index b86aeabba61..3ad18e91bca 100644
--- a/arch/sh/include/asm/ptrace.h
+++ b/arch/sh/include/asm/ptrace.h
@@ -87,12 +87,18 @@ struct pt_dspregs {
87 unsigned long mod; 87 unsigned long mod;
88}; 88};
89 89
90#define PTRACE_GETREGS 12 /* General registers */
91#define PTRACE_SETREGS 13
92
93#define PTRACE_GETFPREGS 14 /* FPU registers */
94#define PTRACE_SETFPREGS 15
95
90#define PTRACE_GETFDPIC 31 /* get the ELF fdpic loadmap address */ 96#define PTRACE_GETFDPIC 31 /* get the ELF fdpic loadmap address */
91 97
92#define PTRACE_GETFDPIC_EXEC 0 /* [addr] request the executable loadmap */ 98#define PTRACE_GETFDPIC_EXEC 0 /* [addr] request the executable loadmap */
93#define PTRACE_GETFDPIC_INTERP 1 /* [addr] request the interpreter loadmap */ 99#define PTRACE_GETFDPIC_INTERP 1 /* [addr] request the interpreter loadmap */
94 100
95#define PTRACE_GETDSPREGS 55 101#define PTRACE_GETDSPREGS 55 /* DSP registers */
96#define PTRACE_SETDSPREGS 56 102#define PTRACE_SETDSPREGS 56
97#endif 103#endif
98 104
@@ -117,6 +123,9 @@ extern void user_disable_single_step(struct task_struct *);
117#define task_pt_regs(task) \ 123#define task_pt_regs(task) \
118 ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE \ 124 ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE \
119 - sizeof(struct pt_dspregs) - sizeof(unsigned long)) - 1) 125 - sizeof(struct pt_dspregs) - sizeof(unsigned long)) - 1)
126#define task_pt_dspregs(task) \
127 ((struct pt_dspregs *) (task_stack_page(task) + THREAD_SIZE \
128 - sizeof(unsigned long)) - 1)
120#else 129#else
121#define task_pt_regs(task) \ 130#define task_pt_regs(task) \
122 ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE \ 131 ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE \
diff --git a/arch/sh/include/asm/rtc.h b/arch/sh/include/asm/rtc.h
index 1813f4202a2..f7b010d48af 100644
--- a/arch/sh/include/asm/rtc.h
+++ b/arch/sh/include/asm/rtc.h
@@ -1,6 +1,7 @@
1#ifndef _ASM_RTC_H 1#ifndef _ASM_RTC_H
2#define _ASM_RTC_H 2#define _ASM_RTC_H
3 3
4void time_init(void);
4extern void (*board_time_init)(void); 5extern void (*board_time_init)(void);
5extern void (*rtc_sh_get_time)(struct timespec *); 6extern void (*rtc_sh_get_time)(struct timespec *);
6extern int (*rtc_sh_set_time)(const time_t); 7extern int (*rtc_sh_set_time)(const time_t);
diff --git a/arch/sh/include/asm/setup.h b/arch/sh/include/asm/setup.h
index 55a2bd328d9..d450bcf59ee 100644
--- a/arch/sh/include/asm/setup.h
+++ b/arch/sh/include/asm/setup.h
@@ -4,7 +4,6 @@
4#define COMMAND_LINE_SIZE 256 4#define COMMAND_LINE_SIZE 256
5 5
6#ifdef __KERNEL__ 6#ifdef __KERNEL__
7
8/* 7/*
9 * This is set up by the setup-routine at boot-time 8 * This is set up by the setup-routine at boot-time
10 */ 9 */
diff --git a/arch/sh/include/asm/sizes.h b/arch/sh/include/asm/sizes.h
new file mode 100644
index 00000000000..3a1fb97770f
--- /dev/null
+++ b/arch/sh/include/asm/sizes.h
@@ -0,0 +1,61 @@
1/*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 2 of the License, or
5 * (at your option) any later version.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15 */
16/* DO NOT EDIT!! - this file automatically generated
17 * from .s file by awk -f s2h.awk
18 */
19/* Size definitions
20 * Copyright (C) ARM Limited 1998. All rights reserved.
21 */
22
23#ifndef __sizes_h
24#define __sizes_h 1
25
26/* handy sizes */
27#define SZ_16 0x00000010
28#define SZ_32 0x00000020
29#define SZ_64 0x00000040
30#define SZ_128 0x00000080
31#define SZ_256 0x00000100
32#define SZ_512 0x00000200
33
34#define SZ_1K 0x00000400
35#define SZ_4K 0x00001000
36#define SZ_8K 0x00002000
37#define SZ_16K 0x00004000
38#define SZ_32K 0x00008000
39#define SZ_64K 0x00010000
40#define SZ_128K 0x00020000
41#define SZ_256K 0x00040000
42#define SZ_512K 0x00080000
43
44#define SZ_1M 0x00100000
45#define SZ_2M 0x00200000
46#define SZ_4M 0x00400000
47#define SZ_8M 0x00800000
48#define SZ_16M 0x01000000
49#define SZ_26M 0x01a00000
50#define SZ_32M 0x02000000
51#define SZ_64M 0x04000000
52#define SZ_128M 0x08000000
53#define SZ_256M 0x10000000
54#define SZ_512M 0x20000000
55
56#define SZ_1G 0x40000000
57#define SZ_2G 0x80000000
58
59#endif
60
61/* END */
diff --git a/arch/sh/include/asm/smp.h b/arch/sh/include/asm/smp.h
index 593343cd26e..85b660c17eb 100644
--- a/arch/sh/include/asm/smp.h
+++ b/arch/sh/include/asm/smp.h
@@ -21,25 +21,29 @@ extern int __cpu_number_map[NR_CPUS];
21extern int __cpu_logical_map[NR_CPUS]; 21extern int __cpu_logical_map[NR_CPUS];
22#define cpu_logical_map(cpu) __cpu_logical_map[cpu] 22#define cpu_logical_map(cpu) __cpu_logical_map[cpu]
23 23
24/* I've no idea what the real meaning of this is */ 24enum {
25#define PROC_CHANGE_PENALTY 20 25 SMP_MSG_FUNCTION,
26 SMP_MSG_RESCHEDULE,
27 SMP_MSG_FUNCTION_SINGLE,
28 SMP_MSG_TIMER,
26 29
27#define NO_PROC_ID (-1) 30 SMP_MSG_NR, /* must be last */
31};
28 32
29#define SMP_MSG_FUNCTION 0 33void smp_message_recv(unsigned int msg);
30#define SMP_MSG_RESCHEDULE 1 34void smp_timer_broadcast(cpumask_t mask);
31#define SMP_MSG_FUNCTION_SINGLE 2 35
32#define SMP_MSG_NR 3 36void local_timer_interrupt(void);
37void local_timer_setup(unsigned int cpu);
33 38
34void plat_smp_setup(void); 39void plat_smp_setup(void);
35void plat_prepare_cpus(unsigned int max_cpus); 40void plat_prepare_cpus(unsigned int max_cpus);
36int plat_smp_processor_id(void); 41int plat_smp_processor_id(void);
37void plat_start_cpu(unsigned int cpu, unsigned long entry_point); 42void plat_start_cpu(unsigned int cpu, unsigned long entry_point);
38void plat_send_ipi(unsigned int cpu, unsigned int message); 43void plat_send_ipi(unsigned int cpu, unsigned int message);
39int plat_register_ipi_handler(unsigned int message, 44
40 void (*handler)(void *), void *arg); 45void arch_send_call_function_single_ipi(int cpu);
41extern void arch_send_call_function_single_ipi(int cpu); 46void arch_send_call_function_ipi(cpumask_t mask);
42extern void arch_send_call_function_ipi(cpumask_t mask);
43 47
44#else 48#else
45 49
diff --git a/arch/sh/include/asm/syscall.h b/arch/sh/include/asm/syscall.h
new file mode 100644
index 00000000000..6a381429ee9
--- /dev/null
+++ b/arch/sh/include/asm/syscall.h
@@ -0,0 +1,10 @@
1#ifndef __ASM_SH_SYSCALL_H
2#define __ASM_SH_SYSCALL_H
3
4#ifdef CONFIG_SUPERH32
5# include "syscall_32.h"
6#else
7# include "syscall_64.h"
8#endif
9
10#endif /* __ASM_SH_SYSCALL_H */
diff --git a/arch/sh/include/asm/syscall_32.h b/arch/sh/include/asm/syscall_32.h
new file mode 100644
index 00000000000..54773f26cd4
--- /dev/null
+++ b/arch/sh/include/asm/syscall_32.h
@@ -0,0 +1,110 @@
1#ifndef __ASM_SH_SYSCALL_32_H
2#define __ASM_SH_SYSCALL_32_H
3
4#include <linux/kernel.h>
5#include <linux/sched.h>
6#include <asm/ptrace.h>
7
8/* The system call number is given by the user in %g1 */
9static inline long syscall_get_nr(struct task_struct *task,
10 struct pt_regs *regs)
11{
12 return (regs->tra >= 0) ? regs->regs[3] : -1L;
13}
14
15static inline void syscall_rollback(struct task_struct *task,
16 struct pt_regs *regs)
17{
18 /*
19 * XXX: This needs some thought. On SH we don't
20 * save away the original r0 value anywhere.
21 */
22}
23
24static inline bool syscall_has_error(struct pt_regs *regs)
25{
26 return (regs->sr & 0x1) ? true : false;
27}
28static inline void syscall_set_error(struct pt_regs *regs)
29{
30 regs->sr |= 0x1;
31}
32static inline void syscall_clear_error(struct pt_regs *regs)
33{
34 regs->sr &= ~0x1;
35}
36
37static inline long syscall_get_error(struct task_struct *task,
38 struct pt_regs *regs)
39{
40 return syscall_has_error(regs) ? regs->regs[0] : 0;
41}
42
43static inline long syscall_get_return_value(struct task_struct *task,
44 struct pt_regs *regs)
45{
46 return regs->regs[0];
47}
48
49static inline void syscall_set_return_value(struct task_struct *task,
50 struct pt_regs *regs,
51 int error, long val)
52{
53 if (error) {
54 syscall_set_error(regs);
55 regs->regs[0] = -error;
56 } else {
57 syscall_clear_error(regs);
58 regs->regs[0] = val;
59 }
60}
61
62static inline void syscall_get_arguments(struct task_struct *task,
63 struct pt_regs *regs,
64 unsigned int i, unsigned int n,
65 unsigned long *args)
66{
67 /*
68 * Do this simply for now. If we need to start supporting
69 * fetching arguments from arbitrary indices, this will need some
70 * extra logic. Presently there are no in-tree users that depend
71 * on this behaviour.
72 */
73 BUG_ON(i);
74
75 /* Argument pattern is: R4, R5, R6, R7, R0, R1 */
76 switch (n) {
77 case 6: args[5] = regs->regs[1];
78 case 5: args[4] = regs->regs[0];
79 case 4: args[3] = regs->regs[7];
80 case 3: args[2] = regs->regs[6];
81 case 2: args[1] = regs->regs[5];
82 case 1: args[0] = regs->regs[4];
83 break;
84 default:
85 BUG();
86 }
87}
88
89static inline void syscall_set_arguments(struct task_struct *task,
90 struct pt_regs *regs,
91 unsigned int i, unsigned int n,
92 const unsigned long *args)
93{
94 /* Same note as above applies */
95 BUG_ON(i);
96
97 switch (n) {
98 case 6: regs->regs[1] = args[5];
99 case 5: regs->regs[0] = args[4];
100 case 4: regs->regs[7] = args[3];
101 case 3: regs->regs[6] = args[2];
102 case 2: regs->regs[5] = args[1];
103 case 1: regs->regs[4] = args[0];
104 break;
105 default:
106 BUG();
107 }
108}
109
110#endif /* __ASM_SH_SYSCALL_32_H */
diff --git a/arch/sh/include/asm/syscall_64.h b/arch/sh/include/asm/syscall_64.h
new file mode 100644
index 00000000000..bcaaa8ca4d7
--- /dev/null
+++ b/arch/sh/include/asm/syscall_64.h
@@ -0,0 +1,6 @@
1#ifndef __ASM_SH_SYSCALL_64_H
2#define __ASM_SH_SYSCALL_64_H
3
4#include <asm-generic/syscall.h>
5
6#endif /* __ASM_SH_SYSCALL_64_H */
diff --git a/arch/sh/include/asm/syscalls.h b/arch/sh/include/asm/syscalls.h
new file mode 100644
index 00000000000..c1e2b8deb83
--- /dev/null
+++ b/arch/sh/include/asm/syscalls.h
@@ -0,0 +1,25 @@
1#ifndef __ASM_SH_SYSCALLS_H
2#define __ASM_SH_SYSCALLS_H
3
4#ifdef __KERNEL__
5
6struct old_utsname;
7
8asmlinkage int old_mmap(unsigned long addr, unsigned long len,
9 unsigned long prot, unsigned long flags,
10 int fd, unsigned long off);
11asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
12 unsigned long prot, unsigned long flags,
13 unsigned long fd, unsigned long pgoff);
14asmlinkage int sys_ipc(uint call, int first, int second,
15 int third, void __user *ptr, long fifth);
16asmlinkage int sys_uname(struct old_utsname __user *name);
17
18#ifdef CONFIG_SUPERH32
19# include "syscalls_32.h"
20#else
21# include "syscalls_64.h"
22#endif
23
24#endif /* __KERNEL__ */
25#endif /* __ASM_SH_SYSCALLS_H */
diff --git a/arch/sh/include/asm/syscalls_32.h b/arch/sh/include/asm/syscalls_32.h
new file mode 100644
index 00000000000..104c5e68610
--- /dev/null
+++ b/arch/sh/include/asm/syscalls_32.h
@@ -0,0 +1,56 @@
1#ifndef __ASM_SH_SYSCALLS_32_H
2#define __ASM_SH_SYSCALLS_32_H
3
4#ifdef __KERNEL__
5
6#include <linux/compiler.h>
7#include <linux/linkage.h>
8#include <linux/types.h>
9
10struct pt_regs;
11
12asmlinkage int sys_fork(unsigned long r4, unsigned long r5,
13 unsigned long r6, unsigned long r7,
14 struct pt_regs __regs);
15asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp,
16 unsigned long parent_tidptr,
17 unsigned long child_tidptr,
18 struct pt_regs __regs);
19asmlinkage int sys_vfork(unsigned long r4, unsigned long r5,
20 unsigned long r6, unsigned long r7,
21 struct pt_regs __regs);
22asmlinkage int sys_execve(char __user *ufilename, char __user * __user *uargv,
23 char __user * __user *uenvp, unsigned long r7,
24 struct pt_regs __regs);
25asmlinkage int sys_sigsuspend(old_sigset_t mask, unsigned long r5,
26 unsigned long r6, unsigned long r7,
27 struct pt_regs __regs);
28asmlinkage int sys_sigaction(int sig, const struct old_sigaction __user *act,
29 struct old_sigaction __user *oact);
30asmlinkage int sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,
31 unsigned long r6, unsigned long r7,
32 struct pt_regs __regs);
33asmlinkage int sys_sigreturn(unsigned long r4, unsigned long r5,
34 unsigned long r6, unsigned long r7,
35 struct pt_regs __regs);
36asmlinkage int sys_rt_sigreturn(unsigned long r4, unsigned long r5,
37 unsigned long r6, unsigned long r7,
38 struct pt_regs __regs);
39asmlinkage int sys_pipe(unsigned long r4, unsigned long r5,
40 unsigned long r6, unsigned long r7,
41 struct pt_regs __regs);
42asmlinkage ssize_t sys_pread_wrapper(unsigned int fd, char __user *buf,
43 size_t count, long dummy, loff_t pos);
44asmlinkage ssize_t sys_pwrite_wrapper(unsigned int fd, const char __user *buf,
45 size_t count, long dummy, loff_t pos);
46asmlinkage int sys_fadvise64_64_wrapper(int fd, u32 offset0, u32 offset1,
47 u32 len0, u32 len1, int advice);
48
49/* Misc syscall related bits */
50asmlinkage long do_syscall_trace_enter(struct pt_regs *regs);
51asmlinkage void do_syscall_trace_leave(struct pt_regs *regs);
52asmlinkage void do_notify_resume(struct pt_regs *regs, unsigned int save_r0,
53 unsigned long thread_info_flags);
54
55#endif /* __KERNEL__ */
56#endif /* __ASM_SH_SYSCALLS_32_H */
diff --git a/arch/sh/include/asm/syscalls_64.h b/arch/sh/include/asm/syscalls_64.h
new file mode 100644
index 00000000000..751fd881136
--- /dev/null
+++ b/arch/sh/include/asm/syscalls_64.h
@@ -0,0 +1,34 @@
1#ifndef __ASM_SH_SYSCALLS_64_H
2#define __ASM_SH_SYSCALLS_64_H
3
4#ifdef __KERNEL__
5
6#include <linux/compiler.h>
7#include <linux/linkage.h>
8#include <linux/types.h>
9
10struct pt_regs;
11
12asmlinkage int sys_fork(unsigned long r2, unsigned long r3,
13 unsigned long r4, unsigned long r5,
14 unsigned long r6, unsigned long r7,
15 struct pt_regs *pregs);
16asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp,
17 unsigned long r4, unsigned long r5,
18 unsigned long r6, unsigned long r7,
19 struct pt_regs *pregs);
20asmlinkage int sys_vfork(unsigned long r2, unsigned long r3,
21 unsigned long r4, unsigned long r5,
22 unsigned long r6, unsigned long r7,
23 struct pt_regs *pregs);
24asmlinkage int sys_execve(char *ufilename, char **uargv,
25 char **uenvp, unsigned long r5,
26 unsigned long r6, unsigned long r7,
27 struct pt_regs *pregs);
28
29/* Misc syscall related bits */
30asmlinkage long long do_syscall_trace_enter(struct pt_regs *regs);
31asmlinkage void do_syscall_trace_leave(struct pt_regs *regs);
32
33#endif /* __KERNEL__ */
34#endif /* __ASM_SH_SYSCALLS_64_H */
diff --git a/arch/sh/include/asm/system.h b/arch/sh/include/asm/system.h
index 056d68cd210..6160fe44516 100644
--- a/arch/sh/include/asm/system.h
+++ b/arch/sh/include/asm/system.h
@@ -70,6 +70,8 @@
70 70
71#ifdef CONFIG_GUSA_RB 71#ifdef CONFIG_GUSA_RB
72#include <asm/cmpxchg-grb.h> 72#include <asm/cmpxchg-grb.h>
73#elif defined(CONFIG_CPU_SH4A)
74#include <asm/cmpxchg-llsc.h>
73#else 75#else
74#include <asm/cmpxchg-irq.h> 76#include <asm/cmpxchg-irq.h>
75#endif 77#endif
@@ -125,6 +127,8 @@ static inline unsigned long __cmpxchg(volatile void * ptr, unsigned long old,
125 }) 127 })
126 128
127extern void die(const char *str, struct pt_regs *regs, long err) __attribute__ ((noreturn)); 129extern void die(const char *str, struct pt_regs *regs, long err) __attribute__ ((noreturn));
130void free_initmem(void);
131void free_initrd_mem(unsigned long start, unsigned long end);
128 132
129extern void *set_exception_table_vec(unsigned int vec, void *handler); 133extern void *set_exception_table_vec(unsigned int vec, void *handler);
130 134
@@ -177,8 +181,8 @@ BUILD_TRAP_HANDLER(fpu_state_restore);
177#define arch_align_stack(x) (x) 181#define arch_align_stack(x) (x)
178 182
179struct mem_access { 183struct mem_access {
180 unsigned long (*from)(void *dst, const void *src, unsigned long cnt); 184 unsigned long (*from)(void *dst, const void __user *src, unsigned long cnt);
181 unsigned long (*to)(void *dst, const void *src, unsigned long cnt); 185 unsigned long (*to)(void __user *dst, const void *src, unsigned long cnt);
182}; 186};
183 187
184#ifdef CONFIG_SUPERH32 188#ifdef CONFIG_SUPERH32
diff --git a/arch/sh/include/asm/system_32.h b/arch/sh/include/asm/system_32.h
index f11bcf0855e..a726d5d0727 100644
--- a/arch/sh/include/asm/system_32.h
+++ b/arch/sh/include/asm/system_32.h
@@ -58,7 +58,8 @@ do { \
58 last = __last; \ 58 last = __last; \
59} while (0) 59} while (0)
60 60
61#define __uses_jump_to_uncached __attribute__ ((__section__ (".uncached.text"))) 61#define __uses_jump_to_uncached \
62 noinline __attribute__ ((__section__ (".uncached.text")))
62 63
63/* 64/*
64 * Jump to uncached area. 65 * Jump to uncached area.
@@ -96,7 +97,48 @@ do { \
96 : "=&r" (__dummy)); \ 97 : "=&r" (__dummy)); \
97} while (0) 98} while (0)
98 99
100#ifdef CONFIG_CPU_HAS_SR_RB
101#define lookup_exception_vector() \
102({ \
103 unsigned long _vec; \
104 \
105 __asm__ __volatile__ ( \
106 "stc r2_bank, %0\n\t" \
107 : "=r" (_vec) \
108 ); \
109 \
110 _vec; \
111})
112#else
113#define lookup_exception_vector() \
114({ \
115 unsigned long _vec; \
116 __asm__ __volatile__ ( \
117 "mov r4, %0\n\t" \
118 : "=r" (_vec) \
119 ); \
120 \
121 _vec; \
122})
123#endif
124
99int handle_unaligned_access(opcode_t instruction, struct pt_regs *regs, 125int handle_unaligned_access(opcode_t instruction, struct pt_regs *regs,
100 struct mem_access *ma); 126 struct mem_access *ma);
101 127
128asmlinkage void do_address_error(struct pt_regs *regs,
129 unsigned long writeaccess,
130 unsigned long address);
131asmlinkage void do_divide_error(unsigned long r4, unsigned long r5,
132 unsigned long r6, unsigned long r7,
133 struct pt_regs __regs);
134asmlinkage void do_reserved_inst(unsigned long r4, unsigned long r5,
135 unsigned long r6, unsigned long r7,
136 struct pt_regs __regs);
137asmlinkage void do_illegal_slot_inst(unsigned long r4, unsigned long r5,
138 unsigned long r6, unsigned long r7,
139 struct pt_regs __regs);
140asmlinkage void do_exception_error(unsigned long r4, unsigned long r5,
141 unsigned long r6, unsigned long r7,
142 struct pt_regs __regs);
143
102#endif /* __ASM_SH_SYSTEM_32_H */ 144#endif /* __ASM_SH_SYSTEM_32_H */
diff --git a/arch/sh/include/asm/thread_info.h b/arch/sh/include/asm/thread_info.h
index 0a894cafb1d..f09ac480629 100644
--- a/arch/sh/include/asm/thread_info.h
+++ b/arch/sh/include/asm/thread_info.h
@@ -33,20 +33,12 @@ struct thread_info {
33#define PREEMPT_ACTIVE 0x10000000 33#define PREEMPT_ACTIVE 0x10000000
34 34
35#if defined(CONFIG_4KSTACKS) 35#if defined(CONFIG_4KSTACKS)
36#define THREAD_SIZE_ORDER (0) 36#define THREAD_SHIFT 12
37#elif defined(CONFIG_PAGE_SIZE_4KB)
38#define THREAD_SIZE_ORDER (1)
39#elif defined(CONFIG_PAGE_SIZE_8KB)
40#define THREAD_SIZE_ORDER (1)
41#elif defined(CONFIG_PAGE_SIZE_16KB)
42#define THREAD_SIZE_ORDER (0)
43#elif defined(CONFIG_PAGE_SIZE_64KB)
44#define THREAD_SIZE_ORDER (0)
45#else 37#else
46#error "Unknown thread size" 38#define THREAD_SHIFT 13
47#endif 39#endif
48 40
49#define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER) 41#define THREAD_SIZE (1 << THREAD_SHIFT)
50#define STACK_WARN (THREAD_SIZE >> 3) 42#define STACK_WARN (THREAD_SIZE >> 3)
51 43
52/* 44/*
@@ -94,15 +86,19 @@ static inline struct thread_info *current_thread_info(void)
94 return ti; 86 return ti;
95} 87}
96 88
89/* thread information allocation */
90#if THREAD_SHIFT >= PAGE_SHIFT
91
92#define THREAD_SIZE_ORDER (THREAD_SHIFT - PAGE_SHIFT)
93
94#else /* THREAD_SHIFT < PAGE_SHIFT */
95
97#define __HAVE_ARCH_THREAD_INFO_ALLOCATOR 96#define __HAVE_ARCH_THREAD_INFO_ALLOCATOR
98 97
99/* thread information allocation */ 98extern struct thread_info *alloc_thread_info(struct task_struct *tsk);
100#ifdef CONFIG_DEBUG_STACK_USAGE 99extern void free_thread_info(struct thread_info *ti);
101#define alloc_thread_info(ti) kzalloc(THREAD_SIZE, GFP_KERNEL) 100
102#else 101#endif /* THREAD_SHIFT < PAGE_SHIFT */
103#define alloc_thread_info(ti) kmalloc(THREAD_SIZE, GFP_KERNEL)
104#endif
105#define free_thread_info(ti) kfree(ti)
106 102
107#endif /* __ASSEMBLY__ */ 103#endif /* __ASSEMBLY__ */
108 104
diff --git a/arch/sh/include/asm/uaccess_64.h b/arch/sh/include/asm/uaccess_64.h
index 5580fd47100..56fd20b8cdc 100644
--- a/arch/sh/include/asm/uaccess_64.h
+++ b/arch/sh/include/asm/uaccess_64.h
@@ -26,16 +26,20 @@ do { \
26 retval = 0; \ 26 retval = 0; \
27 switch (size) { \ 27 switch (size) { \
28 case 1: \ 28 case 1: \
29 retval = __get_user_asm_b(x, ptr); \ 29 retval = __get_user_asm_b((void *)&x, \
30 (long)ptr); \
30 break; \ 31 break; \
31 case 2: \ 32 case 2: \
32 retval = __get_user_asm_w(x, ptr); \ 33 retval = __get_user_asm_w((void *)&x, \
34 (long)ptr); \
33 break; \ 35 break; \
34 case 4: \ 36 case 4: \
35 retval = __get_user_asm_l(x, ptr); \ 37 retval = __get_user_asm_l((void *)&x, \
38 (long)ptr); \
36 break; \ 39 break; \
37 case 8: \ 40 case 8: \
38 retval = __get_user_asm_q(x, ptr); \ 41 retval = __get_user_asm_q((void *)&x, \
42 (long)ptr); \
39 break; \ 43 break; \
40 default: \ 44 default: \
41 __get_user_unknown(); \ 45 __get_user_unknown(); \
@@ -54,16 +58,20 @@ do { \
54 retval = 0; \ 58 retval = 0; \
55 switch (size) { \ 59 switch (size) { \
56 case 1: \ 60 case 1: \
57 retval = __put_user_asm_b(x, ptr); \ 61 retval = __put_user_asm_b((void *)&x, \
62 (long)ptr); \
58 break; \ 63 break; \
59 case 2: \ 64 case 2: \
60 retval = __put_user_asm_w(x, ptr); \ 65 retval = __put_user_asm_w((void *)&x, \
66 (long)ptr); \
61 break; \ 67 break; \
62 case 4: \ 68 case 4: \
63 retval = __put_user_asm_l(x, ptr); \ 69 retval = __put_user_asm_l((void *)&x, \
70 (long)ptr); \
64 break; \ 71 break; \
65 case 8: \ 72 case 8: \
66 retval = __put_user_asm_q(x, ptr); \ 73 retval = __put_user_asm_q((void *)&x, \
74 (long)ptr); \
67 break; \ 75 break; \
68 default: \ 76 default: \
69 __put_user_unknown(); \ 77 __put_user_unknown(); \
@@ -77,5 +85,7 @@ extern long __put_user_asm_q(void *, long);
77extern void __put_user_unknown(void); 85extern void __put_user_unknown(void);
78 86
79extern long __strnlen_user(const char *__s, long __n); 87extern long __strnlen_user(const char *__s, long __n);
88extern int __strncpy_from_user(unsigned long __dest,
89 unsigned long __user __src, int __count);
80 90
81#endif /* __ASM_SH_UACCESS_64_H */ 91#endif /* __ASM_SH_UACCESS_64_H */
diff --git a/arch/sh/include/cpu-sh2a/cpu/sh7203.h b/arch/sh/include/cpu-sh2a/cpu/sh7203.h
new file mode 100644
index 00000000000..79f93159018
--- /dev/null
+++ b/arch/sh/include/cpu-sh2a/cpu/sh7203.h
@@ -0,0 +1,143 @@
1#ifndef __ASM_SH7203_H__
2#define __ASM_SH7203_H__
3
4enum {
5 /* PA */
6 GPIO_PA7, GPIO_PA6, GPIO_PA5, GPIO_PA4,
7 GPIO_PA3, GPIO_PA2, GPIO_PA1, GPIO_PA0,
8
9 /* PB */
10 GPIO_PB12,
11 GPIO_PB11, GPIO_PB10, GPIO_PB9, GPIO_PB8,
12 GPIO_PB7, GPIO_PB6, GPIO_PB5, GPIO_PB4,
13 GPIO_PB3, GPIO_PB2, GPIO_PB1, GPIO_PB0,
14
15 /* PC */
16 GPIO_PC14, GPIO_PC13, GPIO_PC12,
17 GPIO_PC11, GPIO_PC10, GPIO_PC9, GPIO_PC8,
18 GPIO_PC7, GPIO_PC6, GPIO_PC5, GPIO_PC4,
19 GPIO_PC3, GPIO_PC2, GPIO_PC1, GPIO_PC0,
20
21 /* PD */
22 GPIO_PD15, GPIO_PD14, GPIO_PD13, GPIO_PD12,
23 GPIO_PD11, GPIO_PD10, GPIO_PD9, GPIO_PD8,
24 GPIO_PD7, GPIO_PD6, GPIO_PD5, GPIO_PD4,
25 GPIO_PD3, GPIO_PD2, GPIO_PD1, GPIO_PD0,
26
27 /* PE */
28 GPIO_PE15, GPIO_PE14, GPIO_PE13, GPIO_PE12,
29 GPIO_PE11, GPIO_PE10, GPIO_PE9, GPIO_PE8,
30 GPIO_PE7, GPIO_PE6, GPIO_PE5, GPIO_PE4,
31 GPIO_PE3, GPIO_PE2, GPIO_PE1, GPIO_PE0,
32
33 /* PF */
34 GPIO_PF30, GPIO_PF29, GPIO_PF28,
35 GPIO_PF27, GPIO_PF26, GPIO_PF25, GPIO_PF24,
36 GPIO_PF23, GPIO_PF22, GPIO_PF21, GPIO_PF20,
37 GPIO_PF19, GPIO_PF18, GPIO_PF17, GPIO_PF16,
38 GPIO_PF15, GPIO_PF14, GPIO_PF13, GPIO_PF12,
39 GPIO_PF11, GPIO_PF10, GPIO_PF9, GPIO_PF8,
40 GPIO_PF7, GPIO_PF6, GPIO_PF5, GPIO_PF4,
41 GPIO_PF3, GPIO_PF2, GPIO_PF1, GPIO_PF0,
42
43 /* INTC: IRQ and PINT on PB/PD/PE */
44 GPIO_FN_PINT7_PB, GPIO_FN_PINT6_PB, GPIO_FN_PINT5_PB, GPIO_FN_PINT4_PB,
45 GPIO_FN_PINT3_PB, GPIO_FN_PINT2_PB, GPIO_FN_PINT1_PB, GPIO_FN_PINT0_PB,
46 GPIO_FN_PINT7_PD, GPIO_FN_PINT6_PD, GPIO_FN_PINT5_PD, GPIO_FN_PINT4_PD,
47 GPIO_FN_PINT3_PD, GPIO_FN_PINT2_PD, GPIO_FN_PINT1_PD, GPIO_FN_PINT0_PD,
48 GPIO_FN_IRQ7_PB, GPIO_FN_IRQ6_PB, GPIO_FN_IRQ5_PB, GPIO_FN_IRQ4_PB,
49 GPIO_FN_IRQ3_PB, GPIO_FN_IRQ2_PB, GPIO_FN_IRQ1_PB, GPIO_FN_IRQ0_PB,
50 GPIO_FN_IRQ7_PD, GPIO_FN_IRQ6_PD, GPIO_FN_IRQ5_PD, GPIO_FN_IRQ4_PD,
51 GPIO_FN_IRQ3_PD, GPIO_FN_IRQ2_PD, GPIO_FN_IRQ1_PD, GPIO_FN_IRQ0_PD,
52 GPIO_FN_IRQ7_PE, GPIO_FN_IRQ6_PE, GPIO_FN_IRQ5_PE, GPIO_FN_IRQ4_PE,
53 GPIO_FN_IRQ3_PE, GPIO_FN_IRQ2_PE, GPIO_FN_IRQ1_PE, GPIO_FN_IRQ0_PE,
54
55 GPIO_FN_WDTOVF, GPIO_FN_IRQOUT, GPIO_FN_REFOUT, GPIO_FN_IRQOUT_REFOUT,
56 GPIO_FN_UBCTRG,
57
58 /* CAN */
59 GPIO_FN_CTX1, GPIO_FN_CRX1, GPIO_FN_CTX0, GPIO_FN_CTX0_CTX1,
60 GPIO_FN_CRX0, GPIO_FN_CRX0_CRX1,
61
62 /* IIC3 */
63 GPIO_FN_SDA3, GPIO_FN_SCL3,
64 GPIO_FN_SDA2, GPIO_FN_SCL2,
65 GPIO_FN_SDA1, GPIO_FN_SCL1,
66 GPIO_FN_SDA0, GPIO_FN_SCL0,
67
68 /* DMAC */
69 GPIO_FN_TEND0_PD, GPIO_FN_TEND0_PE, GPIO_FN_DACK0_PD,
70 GPIO_FN_DACK0_PE, GPIO_FN_DREQ0_PD, GPIO_FN_DREQ0_PE,
71 GPIO_FN_TEND1_PD, GPIO_FN_TEND1_PE, GPIO_FN_DACK1_PD,
72 GPIO_FN_DACK1_PE, GPIO_FN_DREQ1_PD, GPIO_FN_DREQ1_PE,
73 GPIO_FN_DACK2, GPIO_FN_DREQ2,
74 GPIO_FN_DACK3, GPIO_FN_DREQ3,
75
76 /* ADC */
77 GPIO_FN_ADTRG_PD, GPIO_FN_ADTRG_PE,
78
79 /* BSC */
80 GPIO_FN_D31, GPIO_FN_D30, GPIO_FN_D29, GPIO_FN_D28,
81 GPIO_FN_D27, GPIO_FN_D26, GPIO_FN_D25, GPIO_FN_D24,
82 GPIO_FN_D23, GPIO_FN_D22, GPIO_FN_D21, GPIO_FN_D20,
83 GPIO_FN_D19, GPIO_FN_D18, GPIO_FN_D17, GPIO_FN_D16,
84 GPIO_FN_A25, GPIO_FN_A24, GPIO_FN_A23, GPIO_FN_A22,
85 GPIO_FN_A21, GPIO_FN_CS4, GPIO_FN_MRES, GPIO_FN_BS,
86 GPIO_FN_IOIS16, GPIO_FN_CS1, GPIO_FN_CS6_CE1B,
87 GPIO_FN_CE2B, GPIO_FN_CS5_CE1A, GPIO_FN_CE2A,
88 GPIO_FN_FRAME, GPIO_FN_WAIT, GPIO_FN_RDWR,
89 GPIO_FN_CKE, GPIO_FN_CASU, GPIO_FN_BREQ, GPIO_FN_RASU,
90 GPIO_FN_BACK, GPIO_FN_CASL, GPIO_FN_RASL,
91 GPIO_FN_WE3_DQMUU_AH_ICIO_WR, GPIO_FN_WE2_DQMUL_ICIORD,
92 GPIO_FN_WE1_DQMLU_WE, GPIO_FN_WE0_DQMLL,
93 GPIO_FN_CS3, GPIO_FN_CS2, GPIO_FN_A1, GPIO_FN_A0, GPIO_FN_CS7,
94
95 /* TMU */
96 GPIO_FN_TIOC4D, GPIO_FN_TIOC4C, GPIO_FN_TIOC4B, GPIO_FN_TIOC4A,
97 GPIO_FN_TIOC3D, GPIO_FN_TIOC3C, GPIO_FN_TIOC3B, GPIO_FN_TIOC3A,
98 GPIO_FN_TIOC2B, GPIO_FN_TIOC1B, GPIO_FN_TIOC2A, GPIO_FN_TIOC1A,
99 GPIO_FN_TIOC0D, GPIO_FN_TIOC0C, GPIO_FN_TIOC0B, GPIO_FN_TIOC0A,
100 GPIO_FN_TCLKD_PD, GPIO_FN_TCLKC_PD, GPIO_FN_TCLKB_PD, GPIO_FN_TCLKA_PD,
101 GPIO_FN_TCLKD_PF, GPIO_FN_TCLKC_PF, GPIO_FN_TCLKB_PF, GPIO_FN_TCLKA_PF,
102
103 /* SSU */
104 GPIO_FN_SCS0_PD, GPIO_FN_SSO0_PD, GPIO_FN_SSI0_PD, GPIO_FN_SSCK0_PD,
105 GPIO_FN_SCS0_PF, GPIO_FN_SSO0_PF, GPIO_FN_SSI0_PF, GPIO_FN_SSCK0_PF,
106 GPIO_FN_SCS1_PD, GPIO_FN_SSO1_PD, GPIO_FN_SSI1_PD, GPIO_FN_SSCK1_PD,
107 GPIO_FN_SCS1_PF, GPIO_FN_SSO1_PF, GPIO_FN_SSI1_PF, GPIO_FN_SSCK1_PF,
108
109 /* SCIF */
110 GPIO_FN_TXD0, GPIO_FN_RXD0, GPIO_FN_SCK0,
111 GPIO_FN_TXD1, GPIO_FN_RXD1, GPIO_FN_SCK1,
112 GPIO_FN_TXD2, GPIO_FN_RXD2, GPIO_FN_SCK2,
113 GPIO_FN_RTS3, GPIO_FN_CTS3, GPIO_FN_TXD3, GPIO_FN_RXD3, GPIO_FN_SCK3,
114
115 /* SSI */
116 GPIO_FN_AUDIO_CLK,
117 GPIO_FN_SSIDATA3, GPIO_FN_SSIWS3, GPIO_FN_SSISCK3,
118 GPIO_FN_SSIDATA2, GPIO_FN_SSIWS2, GPIO_FN_SSISCK2,
119 GPIO_FN_SSIDATA1, GPIO_FN_SSIWS1, GPIO_FN_SSISCK1,
120 GPIO_FN_SSIDATA0, GPIO_FN_SSIWS0, GPIO_FN_SSISCK0,
121
122 /* FLCTL */
123 GPIO_FN_FCE, GPIO_FN_FRB,
124 GPIO_FN_NAF7, GPIO_FN_NAF6, GPIO_FN_NAF5, GPIO_FN_NAF4,
125 GPIO_FN_NAF3, GPIO_FN_NAF2, GPIO_FN_NAF1, GPIO_FN_NAF0,
126 GPIO_FN_FSC, GPIO_FN_FOE, GPIO_FN_FCDE, GPIO_FN_FWE,
127
128 /* LCDC */
129 GPIO_FN_LCD_VEPWC, GPIO_FN_LCD_VCPWC,
130 GPIO_FN_LCD_CLK, GPIO_FN_LCD_FLM,
131 GPIO_FN_LCD_M_DISP, GPIO_FN_LCD_CL2,
132 GPIO_FN_LCD_CL1, GPIO_FN_LCD_DON,
133 GPIO_FN_LCD_DATA15, GPIO_FN_LCD_DATA14,
134 GPIO_FN_LCD_DATA13, GPIO_FN_LCD_DATA12,
135 GPIO_FN_LCD_DATA11, GPIO_FN_LCD_DATA10,
136 GPIO_FN_LCD_DATA9, GPIO_FN_LCD_DATA8,
137 GPIO_FN_LCD_DATA7, GPIO_FN_LCD_DATA6,
138 GPIO_FN_LCD_DATA5, GPIO_FN_LCD_DATA4,
139 GPIO_FN_LCD_DATA3, GPIO_FN_LCD_DATA2,
140 GPIO_FN_LCD_DATA1, GPIO_FN_LCD_DATA0,
141};
142
143#endif /* __ASM_SH7203_H__ */
diff --git a/arch/sh/include/cpu-sh3/cpu/sh7720.h b/arch/sh/include/cpu-sh3/cpu/sh7720.h
new file mode 100644
index 00000000000..41c1406d6da
--- /dev/null
+++ b/arch/sh/include/cpu-sh3/cpu/sh7720.h
@@ -0,0 +1,174 @@
1#ifndef __ASM_SH7720_H__
2#define __ASM_SH7720_H__
3
4enum {
5 /* PTA */
6 GPIO_PTA7, GPIO_PTA6, GPIO_PTA5, GPIO_PTA4,
7 GPIO_PTA3, GPIO_PTA2, GPIO_PTA1, GPIO_PTA0,
8
9 /* PTB */
10 GPIO_PTB7, GPIO_PTB6, GPIO_PTB5, GPIO_PTB4,
11 GPIO_PTB3, GPIO_PTB2, GPIO_PTB1, GPIO_PTB0,
12
13 /* PTC */
14 GPIO_PTC7, GPIO_PTC6, GPIO_PTC5, GPIO_PTC4,
15 GPIO_PTC3, GPIO_PTC2, GPIO_PTC1, GPIO_PTC0,
16
17 /* PTD */
18 GPIO_PTD7, GPIO_PTD6, GPIO_PTD5, GPIO_PTD4,
19 GPIO_PTD3, GPIO_PTD2, GPIO_PTD1, GPIO_PTD0,
20
21 /* PTE */
22 GPIO_PTE6, GPIO_PTE5, GPIO_PTE4, GPIO_PTE3,
23 GPIO_PTE2, GPIO_PTE1, GPIO_PTE0,
24
25 /* PTF */
26 GPIO_PTF6, GPIO_PTF5, GPIO_PTF4, GPIO_PTF3,
27 GPIO_PTF2, GPIO_PTF1, GPIO_PTF0, GPIO_PTG6,
28
29 /* PTG */
30 GPIO_PTG5, GPIO_PTG4, GPIO_PTG3, GPIO_PTG2,
31 GPIO_PTG1, GPIO_PTG0,
32
33 /* PTH */
34 GPIO_PTH6, GPIO_PTH5, GPIO_PTH4, GPIO_PTH3,
35 GPIO_PTH2, GPIO_PTH1, GPIO_PTH0,
36
37 /* PTJ */
38 GPIO_PTJ6, GPIO_PTJ5, GPIO_PTJ4, GPIO_PTJ3,
39 GPIO_PTJ2, GPIO_PTJ1, GPIO_PTJ0,
40
41 /* PTK */
42 GPIO_PTK3, GPIO_PTK2, GPIO_PTK1, GPIO_PTK0,
43
44 /* PTL */
45 GPIO_PTL7, GPIO_PTL6, GPIO_PTL5, GPIO_PTL4, GPIO_PTL3,
46
47 /* PTM */
48 GPIO_PTM7, GPIO_PTM6, GPIO_PTM5, GPIO_PTM4,
49 GPIO_PTM3, GPIO_PTM2, GPIO_PTM1, GPIO_PTM0,
50
51 /* PTP */
52 GPIO_PTP4, GPIO_PTP3, GPIO_PTP2, GPIO_PTP1, GPIO_PTP0,
53
54 /* PTR */
55 GPIO_PTR7, GPIO_PTR6, GPIO_PTR5, GPIO_PTR4,
56 GPIO_PTR3, GPIO_PTR2, GPIO_PTR1, GPIO_PTR0,
57
58 /* PTS */
59 GPIO_PTS4, GPIO_PTS3, GPIO_PTS2, GPIO_PTS1, GPIO_PTS0,
60
61 /* PTT */
62 GPIO_PTT4, GPIO_PTT3, GPIO_PTT2, GPIO_PTT1, GPIO_PTT0,
63
64 /* PTU */
65 GPIO_PTU4, GPIO_PTU3, GPIO_PTU2, GPIO_PTU1, GPIO_PTU0,
66
67 /* PTV */
68 GPIO_PTV4, GPIO_PTV3, GPIO_PTV2, GPIO_PTV1, GPIO_PTV0,
69
70 /* BSC */
71 GPIO_FN_D31, GPIO_FN_D30, GPIO_FN_D29, GPIO_FN_D28,
72 GPIO_FN_D27, GPIO_FN_D26, GPIO_FN_D25, GPIO_FN_D24,
73 GPIO_FN_D23, GPIO_FN_D22, GPIO_FN_D21, GPIO_FN_D20,
74 GPIO_FN_D19, GPIO_FN_D18, GPIO_FN_D17, GPIO_FN_D16,
75 GPIO_FN_IOIS16, GPIO_FN_RAS, GPIO_FN_CAS, GPIO_FN_CKE,
76 GPIO_FN_CS5B_CE1A, GPIO_FN_CS6B_CE1B,
77 GPIO_FN_A25, GPIO_FN_A24, GPIO_FN_A23, GPIO_FN_A22,
78 GPIO_FN_A21, GPIO_FN_A20, GPIO_FN_A19, GPIO_FN_A0,
79 GPIO_FN_REFOUT, GPIO_FN_IRQOUT,
80
81 /* LCDC */
82 GPIO_FN_LCD_DATA15, GPIO_FN_LCD_DATA14,
83 GPIO_FN_LCD_DATA13, GPIO_FN_LCD_DATA12,
84 GPIO_FN_LCD_DATA11, GPIO_FN_LCD_DATA10,
85 GPIO_FN_LCD_DATA9, GPIO_FN_LCD_DATA8,
86 GPIO_FN_LCD_DATA7, GPIO_FN_LCD_DATA6,
87 GPIO_FN_LCD_DATA5, GPIO_FN_LCD_DATA4,
88 GPIO_FN_LCD_DATA3, GPIO_FN_LCD_DATA2,
89 GPIO_FN_LCD_DATA1, GPIO_FN_LCD_DATA0,
90 GPIO_FN_LCD_M_DISP,
91 GPIO_FN_LCD_CL1, GPIO_FN_LCD_CL2,
92 GPIO_FN_LCD_DON, GPIO_FN_LCD_FLM,
93 GPIO_FN_LCD_VEPWC, GPIO_FN_LCD_VCPWC,
94
95 /* AFEIF */
96 GPIO_FN_AFE_RXIN, GPIO_FN_AFE_RDET,
97 GPIO_FN_AFE_FS, GPIO_FN_AFE_TXOUT,
98 GPIO_FN_AFE_SCLK, GPIO_FN_AFE_RLYCNT,
99 GPIO_FN_AFE_HC1,
100
101 /* IIC */
102 GPIO_FN_IIC_SCL, GPIO_FN_IIC_SDA,
103
104 /* DAC */
105 GPIO_FN_DA1, GPIO_FN_DA0,
106
107 /* ADC */
108 GPIO_FN_AN3, GPIO_FN_AN2, GPIO_FN_AN1, GPIO_FN_AN0, GPIO_FN_ADTRG,
109
110 /* USB */
111 GPIO_FN_USB1D_RCV, GPIO_FN_USB1D_TXSE0,
112 GPIO_FN_USB1D_TXDPLS, GPIO_FN_USB1D_DMNS,
113 GPIO_FN_USB1D_DPLS, GPIO_FN_USB1D_SPEED,
114 GPIO_FN_USB1D_TXENL, GPIO_FN_USB2_PWR_EN,
115 GPIO_FN_USB1_PWR_EN_USBF_UPLUP, GPIO_FN_USB1D_SUSPEND,
116
117 /* INTC */
118 GPIO_FN_IRQ5, GPIO_FN_IRQ4,
119 GPIO_FN_IRQ3_IRL3, GPIO_FN_IRQ2_IRL2,
120 GPIO_FN_IRQ1_IRL1, GPIO_FN_IRQ0_IRL0,
121
122 /* PCC */
123 GPIO_FN_PCC_REG, GPIO_FN_PCC_DRV,
124 GPIO_FN_PCC_BVD2, GPIO_FN_PCC_BVD1,
125 GPIO_FN_PCC_CD2, GPIO_FN_PCC_CD1,
126 GPIO_FN_PCC_RESET, GPIO_FN_PCC_RDY,
127 GPIO_FN_PCC_VS2, GPIO_FN_PCC_VS1,
128
129 /* HUDI */
130 GPIO_FN_AUDATA3, GPIO_FN_AUDATA2, GPIO_FN_AUDATA1, GPIO_FN_AUDATA0,
131 GPIO_FN_AUDCK, GPIO_FN_AUDSYNC, GPIO_FN_ASEBRKAK, GPIO_FN_TRST,
132 GPIO_FN_TMS, GPIO_FN_TDO, GPIO_FN_TDI, GPIO_FN_TCK,
133
134 /* DMAC */
135 GPIO_FN_DACK1, GPIO_FN_DREQ1, GPIO_FN_DACK0, GPIO_FN_DREQ0,
136 GPIO_FN_TEND1, GPIO_FN_TEND0,
137
138 /* SIOF0 */
139 GPIO_FN_SIOF0_SYNC, GPIO_FN_SIOF0_MCLK,
140 GPIO_FN_SIOF0_TXD, GPIO_FN_SIOF0_RXD,
141 GPIO_FN_SIOF0_SCK,
142
143 /* SIOF1 */
144 GPIO_FN_SIOF1_SYNC, GPIO_FN_SIOF1_MCLK,
145 GPIO_FN_SIOF1_TXD, GPIO_FN_SIOF1_RXD,
146 GPIO_FN_SIOF1_SCK,
147
148 /* SCIF0 */
149 GPIO_FN_SCIF0_TXD, GPIO_FN_SCIF0_RXD,
150 GPIO_FN_SCIF0_RTS, GPIO_FN_SCIF0_CTS, GPIO_FN_SCIF0_SCK,
151
152 /* SCIF1 */
153 GPIO_FN_SCIF1_TXD, GPIO_FN_SCIF1_RXD,
154 GPIO_FN_SCIF1_RTS, GPIO_FN_SCIF1_CTS, GPIO_FN_SCIF1_SCK,
155
156 /* TPU */
157 GPIO_FN_TPU_TO1, GPIO_FN_TPU_TO0,
158 GPIO_FN_TPU_TI3B, GPIO_FN_TPU_TI3A,
159 GPIO_FN_TPU_TI2B, GPIO_FN_TPU_TI2A,
160 GPIO_FN_TPU_TO3, GPIO_FN_TPU_TO2,
161
162 /* SIM */
163 GPIO_FN_SIM_D, GPIO_FN_SIM_CLK, GPIO_FN_SIM_RST,
164
165 /* MMC */
166 GPIO_FN_MMC_DAT, GPIO_FN_MMC_CMD,
167 GPIO_FN_MMC_CLK, GPIO_FN_MMC_VDDON,
168 GPIO_FN_MMC_ODMOD,
169
170 /* SYSC */
171 GPIO_FN_STATUS0, GPIO_FN_STATUS1,
172};
173
174#endif /* __ASM_SH7720_H__ */
diff --git a/arch/sh/include/cpu-sh4/cpu/sh7722.h b/arch/sh/include/cpu-sh4/cpu/sh7722.h
new file mode 100644
index 00000000000..4b3096f5307
--- /dev/null
+++ b/arch/sh/include/cpu-sh4/cpu/sh7722.h
@@ -0,0 +1,210 @@
1#ifndef __ASM_SH7722_H__
2#define __ASM_SH7722_H__
3
4enum {
5 /* PTA */
6 GPIO_PTA7, GPIO_PTA6, GPIO_PTA5, GPIO_PTA4,
7 GPIO_PTA3, GPIO_PTA2, GPIO_PTA1, GPIO_PTA0,
8
9 /* PTB */
10 GPIO_PTB7, GPIO_PTB6, GPIO_PTB5, GPIO_PTB4,
11 GPIO_PTB3, GPIO_PTB2, GPIO_PTB1, GPIO_PTB0,
12
13 /* PTC */
14 GPIO_PTC7, GPIO_PTC5, GPIO_PTC4, GPIO_PTC3,
15 GPIO_PTC2, GPIO_PTC0,
16
17 /* PTD */
18 GPIO_PTD7, GPIO_PTD6, GPIO_PTD5, GPIO_PTD4,
19 GPIO_PTD3, GPIO_PTD2, GPIO_PTD1, GPIO_PTD0,
20
21 /* PTE */
22 GPIO_PTE7, GPIO_PTE6, GPIO_PTE5, GPIO_PTE4,
23 GPIO_PTE1, GPIO_PTE0,
24
25 /* PTF */
26 GPIO_PTF6, GPIO_PTF5, GPIO_PTF4, GPIO_PTF3,
27 GPIO_PTF2, GPIO_PTF1, GPIO_PTF0,
28
29 /* PTG */
30 GPIO_PTG4, GPIO_PTG3, GPIO_PTG2, GPIO_PTG1, GPIO_PTG0,
31
32 /* PTH */
33 GPIO_PTH7, GPIO_PTH6, GPIO_PTH5, GPIO_PTH4,
34 GPIO_PTH3, GPIO_PTH2, GPIO_PTH1, GPIO_PTH0,
35
36 /* PTJ */
37 GPIO_PTJ7, GPIO_PTJ6, GPIO_PTJ5, GPIO_PTJ1, GPIO_PTJ0,
38
39 /* PTK */
40 GPIO_PTK6, GPIO_PTK5, GPIO_PTK4, GPIO_PTK3,
41 GPIO_PTK2, GPIO_PTK1, GPIO_PTK0,
42
43 /* PTL */
44 GPIO_PTL7, GPIO_PTL6, GPIO_PTL5, GPIO_PTL4,
45 GPIO_PTL3, GPIO_PTL2, GPIO_PTL1, GPIO_PTL0,
46
47 /* PTM */
48 GPIO_PTM7, GPIO_PTM6, GPIO_PTM5, GPIO_PTM4,
49 GPIO_PTM3, GPIO_PTM2, GPIO_PTM1, GPIO_PTM0,
50
51 /* PTN */
52 GPIO_PTN7, GPIO_PTN6, GPIO_PTN5, GPIO_PTN4,
53 GPIO_PTN3, GPIO_PTN2, GPIO_PTN1, GPIO_PTN0,
54
55 /* PTQ */
56 GPIO_PTQ7, GPIO_PTQ6, GPIO_PTQ5, GPIO_PTQ4,
57 GPIO_PTQ3, GPIO_PTQ2, GPIO_PTQ1, GPIO_PTQ0,
58
59 /* PTR */
60 GPIO_PTR4, GPIO_PTR3, GPIO_PTR2, GPIO_PTR1, GPIO_PTR0,
61
62 /* PTS */
63 GPIO_PTS4, GPIO_PTS3, GPIO_PTS2, GPIO_PTS1, GPIO_PTS0,
64
65 /* PTT */
66 GPIO_PTT4, GPIO_PTT3, GPIO_PTT2, GPIO_PTT1, GPIO_PTT0,
67
68 /* PTU */
69 GPIO_PTU4, GPIO_PTU3, GPIO_PTU2, GPIO_PTU1, GPIO_PTU0,
70
71 /* PTV */
72 GPIO_PTV4, GPIO_PTV3, GPIO_PTV2, GPIO_PTV1, GPIO_PTV0,
73
74 /* PTW */
75 GPIO_PTW6, GPIO_PTW5, GPIO_PTW4, GPIO_PTW3,
76 GPIO_PTW2, GPIO_PTW1, GPIO_PTW0,
77
78 /* PTX */
79 GPIO_PTX6, GPIO_PTX5, GPIO_PTX4, GPIO_PTX3,
80 GPIO_PTX2, GPIO_PTX1, GPIO_PTX0,
81
82 /* PTY */
83 GPIO_PTY5, GPIO_PTY4, GPIO_PTY3, GPIO_PTY2,
84 GPIO_PTY1, GPIO_PTY0,
85
86 /* PTZ */
87 GPIO_PTZ5, GPIO_PTZ4, GPIO_PTZ3, GPIO_PTZ2, GPIO_PTZ1,
88
89 /* SCIF0 */
90 GPIO_FN_SCIF0_TXD, GPIO_FN_SCIF0_RXD,
91 GPIO_FN_SCIF0_RTS, GPIO_FN_SCIF0_CTS, GPIO_FN_SCIF0_SCK,
92
93 /* SCIF1 */
94 GPIO_FN_SCIF1_TXD, GPIO_FN_SCIF1_RXD,
95 GPIO_FN_SCIF1_RTS, GPIO_FN_SCIF1_CTS, GPIO_FN_SCIF1_SCK,
96
97 /* SCIF2 */
98 GPIO_FN_SCIF2_TXD, GPIO_FN_SCIF2_RXD,
99 GPIO_FN_SCIF2_RTS, GPIO_FN_SCIF2_CTS, GPIO_FN_SCIF2_SCK,
100
101 /* SIO */
102 GPIO_FN_SIOTXD, GPIO_FN_SIORXD,
103 GPIO_FN_SIOD, GPIO_FN_SIOSTRB0, GPIO_FN_SIOSTRB1,
104 GPIO_FN_SIOSCK, GPIO_FN_SIOMCK,
105
106 /* CEU */
107 GPIO_FN_VIO_D15, GPIO_FN_VIO_D14, GPIO_FN_VIO_D13, GPIO_FN_VIO_D12,
108 GPIO_FN_VIO_D11, GPIO_FN_VIO_D10, GPIO_FN_VIO_D9, GPIO_FN_VIO_D8,
109 GPIO_FN_VIO_D7, GPIO_FN_VIO_D6, GPIO_FN_VIO_D5, GPIO_FN_VIO_D4,
110 GPIO_FN_VIO_D3, GPIO_FN_VIO_D2, GPIO_FN_VIO_D1, GPIO_FN_VIO_D0,
111 GPIO_FN_VIO_FLD, GPIO_FN_VIO_CKO, GPIO_FN_VIO_STEX, GPIO_FN_VIO_STEM,
112 GPIO_FN_VIO_VD, GPIO_FN_VIO_HD, GPIO_FN_VIO_CLK,
113 GPIO_FN_VIO_VD2, GPIO_FN_VIO_HD2, GPIO_FN_VIO_CLK2,
114
115 /* LCDC */
116 GPIO_FN_LCDD23, GPIO_FN_LCDD22, GPIO_FN_LCDD21, GPIO_FN_LCDD20,
117 GPIO_FN_LCDD19, GPIO_FN_LCDD18, GPIO_FN_LCDD17, GPIO_FN_LCDD16,
118 GPIO_FN_LCDD15, GPIO_FN_LCDD14, GPIO_FN_LCDD13, GPIO_FN_LCDD12,
119 GPIO_FN_LCDD11, GPIO_FN_LCDD10, GPIO_FN_LCDD9, GPIO_FN_LCDD8,
120 GPIO_FN_LCDD7, GPIO_FN_LCDD6, GPIO_FN_LCDD5, GPIO_FN_LCDD4,
121 GPIO_FN_LCDD3, GPIO_FN_LCDD2, GPIO_FN_LCDD1, GPIO_FN_LCDD0,
122 GPIO_FN_LCDLCLK,
123 /* Main LCD */
124 GPIO_FN_LCDDON, GPIO_FN_LCDVCPWC, GPIO_FN_LCDVEPWC, GPIO_FN_LCDVSYN,
125 /* Main LCD - RGB Mode */
126 GPIO_FN_LCDDCK, GPIO_FN_LCDHSYN, GPIO_FN_LCDDISP,
127 /* Main LCD - SYS Mode */
128 GPIO_FN_LCDRS, GPIO_FN_LCDCS, GPIO_FN_LCDWR, GPIO_FN_LCDRD,
129 /* Sub LCD - SYS Mode */
130 GPIO_FN_LCDDON2, GPIO_FN_LCDVCPWC2, GPIO_FN_LCDVEPWC2,
131 GPIO_FN_LCDVSYN2, GPIO_FN_LCDCS2,
132
133 /* BSC */
134 GPIO_FN_IOIS16, GPIO_FN_A25, GPIO_FN_A24, GPIO_FN_A23, GPIO_FN_A22,
135 GPIO_FN_BS, GPIO_FN_CS6B_CE1B, GPIO_FN_WAIT, GPIO_FN_CS6A_CE2B,
136
137 /* SBSC */
138 GPIO_FN_HPD63, GPIO_FN_HPD62, GPIO_FN_HPD61, GPIO_FN_HPD60,
139 GPIO_FN_HPD59, GPIO_FN_HPD58, GPIO_FN_HPD57, GPIO_FN_HPD56,
140 GPIO_FN_HPD55, GPIO_FN_HPD54, GPIO_FN_HPD53, GPIO_FN_HPD52,
141 GPIO_FN_HPD51, GPIO_FN_HPD50, GPIO_FN_HPD49, GPIO_FN_HPD48,
142 GPIO_FN_HPDQM7, GPIO_FN_HPDQM6, GPIO_FN_HPDQM5, GPIO_FN_HPDQM4,
143
144 /* IRQ */
145 GPIO_FN_IRQ0, GPIO_FN_IRQ1, GPIO_FN_IRQ2, GPIO_FN_IRQ3,
146 GPIO_FN_IRQ4, GPIO_FN_IRQ5, GPIO_FN_IRQ6, GPIO_FN_IRQ7,
147
148 /* SDHI */
149 GPIO_FN_SDHICD, GPIO_FN_SDHIWP, GPIO_FN_SDHID3, GPIO_FN_SDHID2,
150 GPIO_FN_SDHID1, GPIO_FN_SDHID0, GPIO_FN_SDHICMD, GPIO_FN_SDHICLK,
151
152 /* SIU - Port A */
153 GPIO_FN_SIUAOLR, GPIO_FN_SIUAOBT, GPIO_FN_SIUAISLD, GPIO_FN_SIUAILR,
154 GPIO_FN_SIUAIBT, GPIO_FN_SIUAOSLD, GPIO_FN_SIUMCKA, GPIO_FN_SIUFCKA,
155
156 /* SIU - Port B */
157 GPIO_FN_SIUBOLR, GPIO_FN_SIUBOBT, GPIO_FN_SIUBISLD, GPIO_FN_SIUBILR,
158 GPIO_FN_SIUBIBT, GPIO_FN_SIUBOSLD, GPIO_FN_SIUMCKB, GPIO_FN_SIUFCKB,
159
160 /* AUD */
161 GPIO_FN_AUDSYNC, GPIO_FN_AUDATA3, GPIO_FN_AUDATA2, GPIO_FN_AUDATA1,
162 GPIO_FN_AUDATA0,
163
164 /* DMAC */
165 GPIO_FN_DACK, GPIO_FN_DREQ0,
166
167 /* VOU */
168 GPIO_FN_DV_CLKI, GPIO_FN_DV_CLK, GPIO_FN_DV_HSYNC, GPIO_FN_DV_VSYNC,
169 GPIO_FN_DV_D15, GPIO_FN_DV_D14, GPIO_FN_DV_D13, GPIO_FN_DV_D12,
170 GPIO_FN_DV_D11, GPIO_FN_DV_D10, GPIO_FN_DV_D9, GPIO_FN_DV_D8,
171 GPIO_FN_DV_D7, GPIO_FN_DV_D6, GPIO_FN_DV_D5, GPIO_FN_DV_D4,
172 GPIO_FN_DV_D3, GPIO_FN_DV_D2, GPIO_FN_DV_D1, GPIO_FN_DV_D0,
173
174 /* CPG */
175 GPIO_FN_STATUS0, GPIO_FN_PDSTATUS,
176
177 /* SIOF0 */
178 GPIO_FN_SIOF0_MCK, GPIO_FN_SIOF0_SCK,
179 GPIO_FN_SIOF0_SYNC, GPIO_FN_SIOF0_SS1, GPIO_FN_SIOF0_SS2,
180 GPIO_FN_SIOF0_TXD, GPIO_FN_SIOF0_RXD,
181
182 /* SIOF1 */
183 GPIO_FN_SIOF1_MCK, GPIO_FN_SIOF1_SCK,
184 GPIO_FN_SIOF1_SYNC, GPIO_FN_SIOF1_SS1, GPIO_FN_SIOF1_SS2,
185 GPIO_FN_SIOF1_TXD, GPIO_FN_SIOF1_RXD,
186
187 /* SIM */
188 GPIO_FN_SIM_D, GPIO_FN_SIM_CLK, GPIO_FN_SIM_RST,
189
190 /* TSIF */
191 GPIO_FN_TS_SDAT, GPIO_FN_TS_SCK, GPIO_FN_TS_SDEN, GPIO_FN_TS_SPSYNC,
192
193 /* IRDA */
194 GPIO_FN_IRDA_IN, GPIO_FN_IRDA_OUT,
195
196 /* TPU */
197 GPIO_FN_TPUTO,
198
199 /* FLCTL */
200 GPIO_FN_FCE, GPIO_FN_NAF7, GPIO_FN_NAF6, GPIO_FN_NAF5, GPIO_FN_NAF4,
201 GPIO_FN_NAF3, GPIO_FN_NAF2, GPIO_FN_NAF1, GPIO_FN_NAF0, GPIO_FN_FCDE,
202 GPIO_FN_FOE, GPIO_FN_FSC, GPIO_FN_FWE, GPIO_FN_FRB,
203
204 /* KEYSC */
205 GPIO_FN_KEYIN0, GPIO_FN_KEYIN1, GPIO_FN_KEYIN2, GPIO_FN_KEYIN3,
206 GPIO_FN_KEYIN4, GPIO_FN_KEYOUT0, GPIO_FN_KEYOUT1, GPIO_FN_KEYOUT2,
207 GPIO_FN_KEYOUT3, GPIO_FN_KEYOUT4_IN6, GPIO_FN_KEYOUT5_IN5,
208};
209
210#endif /* __ASM_SH7722_H__ */
diff --git a/arch/sh/include/cpu-sh4/cpu/sh7723.h b/arch/sh/include/cpu-sh4/cpu/sh7723.h
new file mode 100644
index 00000000000..9d2f6d7aa93
--- /dev/null
+++ b/arch/sh/include/cpu-sh4/cpu/sh7723.h
@@ -0,0 +1,254 @@
1#ifndef __ASM_SH7723_H__
2#define __ASM_SH7723_H__
3
4enum {
5 /* PTA */
6 GPIO_PTA7, GPIO_PTA6, GPIO_PTA5, GPIO_PTA4,
7 GPIO_PTA3, GPIO_PTA2, GPIO_PTA1, GPIO_PTA0,
8
9 /* PTB */
10 GPIO_PTB7, GPIO_PTB6, GPIO_PTB5, GPIO_PTB4,
11 GPIO_PTB3, GPIO_PTB2, GPIO_PTB1, GPIO_PTB0,
12
13 /* PTC */
14 GPIO_PTC7, GPIO_PTC6, GPIO_PTC5, GPIO_PTC4,
15 GPIO_PTC3, GPIO_PTC2, GPIO_PTC1, GPIO_PTC0,
16
17 /* PTD */
18 GPIO_PTD7, GPIO_PTD6, GPIO_PTD5, GPIO_PTD4,
19 GPIO_PTD3, GPIO_PTD2, GPIO_PTD1, GPIO_PTD0,
20
21 /* PTE */
22 GPIO_PTE5, GPIO_PTE4, GPIO_PTE3, GPIO_PTE2,
23 GPIO_PTE1, GPIO_PTE0,
24
25 /* PTF */
26 GPIO_PTF7, GPIO_PTF6, GPIO_PTF5, GPIO_PTF4,
27 GPIO_PTF3, GPIO_PTF2, GPIO_PTF1, GPIO_PTF0,
28
29 /* PTG */
30 GPIO_PTG5, GPIO_PTG4, GPIO_PTG3, GPIO_PTG2,
31 GPIO_PTG1, GPIO_PTG0,
32
33 /* PTH */
34 GPIO_PTH7, GPIO_PTH6, GPIO_PTH5, GPIO_PTH4,
35 GPIO_PTH3, GPIO_PTH2, GPIO_PTH1, GPIO_PTH0,
36
37 /* PTJ */
38 GPIO_PTJ7, GPIO_PTJ5, GPIO_PTJ3, GPIO_PTJ2,
39 GPIO_PTJ1, GPIO_PTJ0,
40
41 /* PTK */
42 GPIO_PTK7, GPIO_PTK6, GPIO_PTK5, GPIO_PTK4,
43 GPIO_PTK3, GPIO_PTK2, GPIO_PTK1, GPIO_PTK0,
44
45 /* PTL */
46 GPIO_PTL7, GPIO_PTL6, GPIO_PTL5, GPIO_PTL4,
47 GPIO_PTL3, GPIO_PTL2, GPIO_PTL1, GPIO_PTL0,
48
49 /* PTM */
50 GPIO_PTM7, GPIO_PTM6, GPIO_PTM5, GPIO_PTM4,
51 GPIO_PTM3, GPIO_PTM2, GPIO_PTM1, GPIO_PTM0,
52
53 /* PTN */
54 GPIO_PTN7, GPIO_PTN6, GPIO_PTN5, GPIO_PTN4,
55 GPIO_PTN3, GPIO_PTN2, GPIO_PTN1, GPIO_PTN0,
56
57 /* PTQ */
58 GPIO_PTQ3, GPIO_PTQ2, GPIO_PTQ1, GPIO_PTQ0,
59
60 /* PTR */
61 GPIO_PTR7, GPIO_PTR6, GPIO_PTR5, GPIO_PTR4,
62 GPIO_PTR3, GPIO_PTR2, GPIO_PTR1, GPIO_PTR0,
63
64 /* PTS */
65 GPIO_PTS7, GPIO_PTS6, GPIO_PTS5, GPIO_PTS4,
66 GPIO_PTS3, GPIO_PTS2, GPIO_PTS1, GPIO_PTS0,
67
68 /* PTT */
69 GPIO_PTT5, GPIO_PTT4, GPIO_PTT3, GPIO_PTT2,
70 GPIO_PTT1, GPIO_PTT0,
71
72 /* PTU */
73 GPIO_PTU5, GPIO_PTU4, GPIO_PTU3, GPIO_PTU2,
74 GPIO_PTU1, GPIO_PTU0,
75
76 /* PTV */
77 GPIO_PTV7, GPIO_PTV6, GPIO_PTV5, GPIO_PTV4,
78 GPIO_PTV3, GPIO_PTV2, GPIO_PTV1, GPIO_PTV0,
79
80 /* PTW */
81 GPIO_PTW7, GPIO_PTW6, GPIO_PTW5, GPIO_PTW4,
82 GPIO_PTW3, GPIO_PTW2, GPIO_PTW1, GPIO_PTW0,
83
84 /* PTX */
85 GPIO_PTX7, GPIO_PTX6, GPIO_PTX5, GPIO_PTX4,
86 GPIO_PTX3, GPIO_PTX2, GPIO_PTX1, GPIO_PTX0,
87
88 /* PTY */
89 GPIO_PTY7, GPIO_PTY6, GPIO_PTY5, GPIO_PTY4,
90 GPIO_PTY3, GPIO_PTY2, GPIO_PTY1, GPIO_PTY0,
91
92 /* PTZ */
93 GPIO_PTZ7, GPIO_PTZ6, GPIO_PTZ5, GPIO_PTZ4,
94 GPIO_PTZ3, GPIO_PTZ2, GPIO_PTZ1, GPIO_PTZ0,
95
96 /* SCIF0 (SCIF: 3 pin PTT/PTU) */
97 GPIO_FN_SCIF0_PTT_TXD, GPIO_FN_SCIF0_PTT_RXD, GPIO_FN_SCIF0_PTT_SCK,
98 GPIO_FN_SCIF0_PTU_TXD, GPIO_FN_SCIF0_PTU_RXD, GPIO_FN_SCIF0_PTU_SCK,
99
100 /* SCIF1 (SCIF: 3 pin PTS/PTV) */
101 GPIO_FN_SCIF1_PTS_TXD, GPIO_FN_SCIF1_PTS_RXD, GPIO_FN_SCIF1_PTS_SCK,
102 GPIO_FN_SCIF1_PTV_TXD, GPIO_FN_SCIF1_PTV_RXD, GPIO_FN_SCIF1_PTV_SCK,
103
104 /* SCIF2 (SCIF: 3 pin PTT/PTU) */
105 GPIO_FN_SCIF2_PTT_TXD, GPIO_FN_SCIF2_PTT_RXD, GPIO_FN_SCIF2_PTT_SCK,
106 GPIO_FN_SCIF2_PTU_TXD, GPIO_FN_SCIF2_PTU_RXD, GPIO_FN_SCIF2_PTU_SCK,
107
108 /* SCIF3 (SCIFA: 5 pin PTS/PTV) */
109 GPIO_FN_SCIF3_PTS_TXD, GPIO_FN_SCIF3_PTS_RXD, GPIO_FN_SCIF3_PTS_SCK,
110 GPIO_FN_SCIF3_PTS_RTS, GPIO_FN_SCIF3_PTS_CTS,
111 GPIO_FN_SCIF3_PTV_TXD, GPIO_FN_SCIF3_PTV_RXD, GPIO_FN_SCIF3_PTV_SCK,
112 GPIO_FN_SCIF3_PTV_RTS, GPIO_FN_SCIF3_PTV_CTS,
113
114 /* SCIF4 (SCIFA: 3 pin PTE/PTN) */
115 GPIO_FN_SCIF4_PTE_TXD, GPIO_FN_SCIF4_PTE_RXD, GPIO_FN_SCIF4_PTE_SCK,
116 GPIO_FN_SCIF4_PTN_TXD, GPIO_FN_SCIF4_PTN_RXD, GPIO_FN_SCIF4_PTN_SCK,
117
118 /* SCIF5 (SCIFA: 3 pin PTE/PTN) */
119 GPIO_FN_SCIF5_PTE_TXD, GPIO_FN_SCIF5_PTE_RXD, GPIO_FN_SCIF5_PTE_SCK,
120 GPIO_FN_SCIF5_PTN_TXD, GPIO_FN_SCIF5_PTN_RXD, GPIO_FN_SCIF5_PTN_SCK,
121
122 /* CEU */
123 GPIO_FN_VIO_D15, GPIO_FN_VIO_D14, GPIO_FN_VIO_D13, GPIO_FN_VIO_D12,
124 GPIO_FN_VIO_D11, GPIO_FN_VIO_D10, GPIO_FN_VIO_D9, GPIO_FN_VIO_D8,
125 GPIO_FN_VIO_D7, GPIO_FN_VIO_D6, GPIO_FN_VIO_D5, GPIO_FN_VIO_D4,
126 GPIO_FN_VIO_D3, GPIO_FN_VIO_D2, GPIO_FN_VIO_D1, GPIO_FN_VIO_D0,
127 GPIO_FN_VIO_FLD, GPIO_FN_VIO_CKO,
128 GPIO_FN_VIO_VD1, GPIO_FN_VIO_HD1, GPIO_FN_VIO_CLK1,
129 GPIO_FN_VIO_VD2, GPIO_FN_VIO_HD2, GPIO_FN_VIO_CLK2,
130
131 /* LCDC */
132 GPIO_FN_LCDD23, GPIO_FN_LCDD22, GPIO_FN_LCDD21, GPIO_FN_LCDD20,
133 GPIO_FN_LCDD19, GPIO_FN_LCDD18, GPIO_FN_LCDD17, GPIO_FN_LCDD16,
134 GPIO_FN_LCDD15, GPIO_FN_LCDD14, GPIO_FN_LCDD13, GPIO_FN_LCDD12,
135 GPIO_FN_LCDD11, GPIO_FN_LCDD10, GPIO_FN_LCDD9, GPIO_FN_LCDD8,
136 GPIO_FN_LCDD7, GPIO_FN_LCDD6, GPIO_FN_LCDD5, GPIO_FN_LCDD4,
137 GPIO_FN_LCDD3, GPIO_FN_LCDD2, GPIO_FN_LCDD1, GPIO_FN_LCDD0,
138 GPIO_FN_LCDLCLK_PTR, GPIO_FN_LCDLCLK_PTW,
139 /* Main LCD */
140 GPIO_FN_LCDDON, GPIO_FN_LCDVCPWC, GPIO_FN_LCDVEPWC, GPIO_FN_LCDVSYN,
141 /* Main LCD - RGB Mode */
142 GPIO_FN_LCDDCK, GPIO_FN_LCDHSYN, GPIO_FN_LCDDISP,
143 /* Main LCD - SYS Mode */
144 GPIO_FN_LCDRS, GPIO_FN_LCDCS, GPIO_FN_LCDWR, GPIO_FN_LCDRD,
145
146 /* IRQ */
147 GPIO_FN_IRQ0, GPIO_FN_IRQ1, GPIO_FN_IRQ2, GPIO_FN_IRQ3,
148 GPIO_FN_IRQ4, GPIO_FN_IRQ5, GPIO_FN_IRQ6, GPIO_FN_IRQ7,
149
150 /* AUD */
151 GPIO_FN_AUDATA3, GPIO_FN_AUDATA2, GPIO_FN_AUDATA1, GPIO_FN_AUDATA0,
152 GPIO_FN_AUDCK, GPIO_FN_AUDSYNC,
153
154 /* SDHI0 (PTD) */
155 GPIO_FN_SDHI0CD_PTD, GPIO_FN_SDHI0WP_PTD,
156 GPIO_FN_SDHI0D3_PTD, GPIO_FN_SDHI0D2_PTD,
157 GPIO_FN_SDHI0D1_PTD, GPIO_FN_SDHI0D0_PTD,
158 GPIO_FN_SDHI0CMD_PTD, GPIO_FN_SDHI0CLK_PTD,
159
160 /* SDHI0 (PTS) */
161 GPIO_FN_SDHI0CD_PTS, GPIO_FN_SDHI0WP_PTS,
162 GPIO_FN_SDHI0D3_PTS, GPIO_FN_SDHI0D2_PTS,
163 GPIO_FN_SDHI0D1_PTS, GPIO_FN_SDHI0D0_PTS,
164 GPIO_FN_SDHI0CMD_PTS, GPIO_FN_SDHI0CLK_PTS,
165
166 /* SDHI1 */
167 GPIO_FN_SDHI1CD, GPIO_FN_SDHI1WP, GPIO_FN_SDHI1D3, GPIO_FN_SDHI1D2,
168 GPIO_FN_SDHI1D1, GPIO_FN_SDHI1D0, GPIO_FN_SDHI1CMD, GPIO_FN_SDHI1CLK,
169
170 /* SIUA */
171 GPIO_FN_SIUAFCK, GPIO_FN_SIUAILR, GPIO_FN_SIUAIBT, GPIO_FN_SIUAISLD,
172 GPIO_FN_SIUAOLR, GPIO_FN_SIUAOBT, GPIO_FN_SIUAOSLD, GPIO_FN_SIUAMCK,
173 GPIO_FN_SIUAISPD, GPIO_FN_SIUOSPD,
174
175 /* SIUB */
176 GPIO_FN_SIUBFCK, GPIO_FN_SIUBILR, GPIO_FN_SIUBIBT, GPIO_FN_SIUBISLD,
177 GPIO_FN_SIUBOLR, GPIO_FN_SIUBOBT, GPIO_FN_SIUBOSLD, GPIO_FN_SIUBMCK,
178
179 /* IRDA */
180 GPIO_FN_IRDA_IN, GPIO_FN_IRDA_OUT,
181
182 /* VOU */
183 GPIO_FN_DV_CLKI, GPIO_FN_DV_CLK, GPIO_FN_DV_HSYNC, GPIO_FN_DV_VSYNC,
184 GPIO_FN_DV_D15, GPIO_FN_DV_D14, GPIO_FN_DV_D13, GPIO_FN_DV_D12,
185 GPIO_FN_DV_D11, GPIO_FN_DV_D10, GPIO_FN_DV_D9, GPIO_FN_DV_D8,
186 GPIO_FN_DV_D7, GPIO_FN_DV_D6, GPIO_FN_DV_D5, GPIO_FN_DV_D4,
187 GPIO_FN_DV_D3, GPIO_FN_DV_D2, GPIO_FN_DV_D1, GPIO_FN_DV_D0,
188
189 /* KEYSC */
190 GPIO_FN_KEYIN0, GPIO_FN_KEYIN1, GPIO_FN_KEYIN2, GPIO_FN_KEYIN3,
191 GPIO_FN_KEYIN4, GPIO_FN_KEYOUT0, GPIO_FN_KEYOUT1, GPIO_FN_KEYOUT2,
192 GPIO_FN_KEYOUT3, GPIO_FN_KEYOUT4_IN6, GPIO_FN_KEYOUT5_IN5,
193
194 /* MSIOF0 (PTF) */
195 GPIO_FN_MSIOF0_PTF_TXD, GPIO_FN_MSIOF0_PTF_RXD, GPIO_FN_MSIOF0_PTF_MCK,
196 GPIO_FN_MSIOF0_PTF_TSYNC, GPIO_FN_MSIOF0_PTF_TSCK,
197 GPIO_FN_MSIOF0_PTF_RSYNC, GPIO_FN_MSIOF0_PTF_RSCK,
198 GPIO_FN_MSIOF0_PTF_SS1, GPIO_FN_MSIOF0_PTF_SS2,
199
200 /* MSIOF0 (PTT+PTX) */
201 GPIO_FN_MSIOF0_PTT_TXD, GPIO_FN_MSIOF0_PTT_RXD, GPIO_FN_MSIOF0_PTX_MCK,
202 GPIO_FN_MSIOF0_PTT_TSYNC, GPIO_FN_MSIOF0_PTT_TSCK,
203 GPIO_FN_MSIOF0_PTT_RSYNC, GPIO_FN_MSIOF0_PTT_RSCK,
204 GPIO_FN_MSIOF0_PTT_SS1, GPIO_FN_MSIOF0_PTT_SS2,
205
206 /* MSIOF1 */
207 GPIO_FN_MSIOF1_TXD, GPIO_FN_MSIOF1_RXD, GPIO_FN_MSIOF1_MCK,
208 GPIO_FN_MSIOF1_TSYNC, GPIO_FN_MSIOF1_TSCK,
209 GPIO_FN_MSIOF1_RSYNC, GPIO_FN_MSIOF1_RSCK,
210 GPIO_FN_MSIOF1_SS1, GPIO_FN_MSIOF1_SS2,
211
212 /* TSIF */
213 GPIO_FN_TS0_SDAT, GPIO_FN_TS0_SCK, GPIO_FN_TS0_SDEN, GPIO_FN_TS0_SPSYNC,
214
215 /* FLCTL */
216 GPIO_FN_FCE, GPIO_FN_NAF7, GPIO_FN_NAF6, GPIO_FN_NAF5, GPIO_FN_NAF4,
217 GPIO_FN_NAF3, GPIO_FN_NAF2, GPIO_FN_NAF1, GPIO_FN_NAF0, GPIO_FN_FCDE,
218 GPIO_FN_FOE, GPIO_FN_FSC, GPIO_FN_FWE, GPIO_FN_FRB,
219
220 /* DMAC */
221 GPIO_FN_DACK1, GPIO_FN_DREQ1, GPIO_FN_DACK0, GPIO_FN_DREQ0,
222
223 /* ADC */
224 GPIO_FN_AN3, GPIO_FN_AN2, GPIO_FN_AN1, GPIO_FN_AN0, GPIO_FN_ADTRG,
225
226 /* CPG */
227 GPIO_FN_STATUS0, GPIO_FN_PDSTATUS,
228
229 /* TPU */
230 GPIO_FN_TPUTO3, GPIO_FN_TPUTO2, GPIO_FN_TPUTO1, GPIO_FN_TPUTO0,
231
232 /* BSC */
233 GPIO_FN_D31, GPIO_FN_D30, GPIO_FN_D29, GPIO_FN_D28,
234 GPIO_FN_D27, GPIO_FN_D26, GPIO_FN_D25, GPIO_FN_D24,
235 GPIO_FN_D23, GPIO_FN_D22, GPIO_FN_D21, GPIO_FN_D20,
236 GPIO_FN_D19, GPIO_FN_D18, GPIO_FN_D17, GPIO_FN_D16,
237 GPIO_FN_IOIS16, GPIO_FN_WAIT, GPIO_FN_BS,
238 GPIO_FN_A25, GPIO_FN_A24, GPIO_FN_A23, GPIO_FN_A22,
239 GPIO_FN_CS6B_CE1B, GPIO_FN_CS6A_CE2B,
240 GPIO_FN_CS5B_CE1A, GPIO_FN_CS5A_CE2A,
241 GPIO_FN_WE3_ICIOWR, GPIO_FN_WE2_ICIORD,
242
243 /* ATAPI */
244 GPIO_FN_IDED15, GPIO_FN_IDED14, GPIO_FN_IDED13, GPIO_FN_IDED12,
245 GPIO_FN_IDED11, GPIO_FN_IDED10, GPIO_FN_IDED9, GPIO_FN_IDED8,
246 GPIO_FN_IDED7, GPIO_FN_IDED6, GPIO_FN_IDED5, GPIO_FN_IDED4,
247 GPIO_FN_IDED3, GPIO_FN_IDED2, GPIO_FN_IDED1, GPIO_FN_IDED0,
248 GPIO_FN_DIRECTION, GPIO_FN_EXBUF_ENB, GPIO_FN_IDERST, GPIO_FN_IODACK,
249 GPIO_FN_IODREQ, GPIO_FN_IDEIORDY, GPIO_FN_IDEINT, GPIO_FN_IDEIOWR,
250 GPIO_FN_IDEIORD, GPIO_FN_IDECS1, GPIO_FN_IDECS0, GPIO_FN_IDEA2,
251 GPIO_FN_IDEA1, GPIO_FN_IDEA0,
252};
253
254#endif /* __ASM_SH7723_H__ */
diff --git a/arch/sh/include/asm/edosk7705.h b/arch/sh/include/mach-common/mach/edosk7705.h
index 5bdc9d9be3d..5bdc9d9be3d 100644
--- a/arch/sh/include/asm/edosk7705.h
+++ b/arch/sh/include/mach-common/mach/edosk7705.h
diff --git a/arch/sh/include/asm/r7780rp.h b/arch/sh/include/mach-common/mach/highlander.h
index 306f7359f7d..306f7359f7d 100644
--- a/arch/sh/include/asm/r7780rp.h
+++ b/arch/sh/include/mach-common/mach/highlander.h
diff --git a/arch/sh/include/asm/hp6xx.h b/arch/sh/include/mach-common/mach/hp6xx.h
index 0d4165a32dc..0d4165a32dc 100644
--- a/arch/sh/include/asm/hp6xx.h
+++ b/arch/sh/include/mach-common/mach/hp6xx.h
diff --git a/arch/sh/include/asm/lboxre2.h b/arch/sh/include/mach-common/mach/lboxre2.h
index e6d16050492..e6d16050492 100644
--- a/arch/sh/include/asm/lboxre2.h
+++ b/arch/sh/include/mach-common/mach/lboxre2.h
diff --git a/arch/sh/include/asm/magicpanelr2.h b/arch/sh/include/mach-common/mach/magicpanelr2.h
index c644a77ee35..c644a77ee35 100644
--- a/arch/sh/include/asm/magicpanelr2.h
+++ b/arch/sh/include/mach-common/mach/magicpanelr2.h
diff --git a/arch/sh/include/asm/microdev.h b/arch/sh/include/mach-common/mach/microdev.h
index 1aed15856e1..1aed15856e1 100644
--- a/arch/sh/include/asm/microdev.h
+++ b/arch/sh/include/mach-common/mach/microdev.h
diff --git a/arch/sh/include/asm/migor.h b/arch/sh/include/mach-common/mach/migor.h
index c12b632c540..e451f0229e0 100644
--- a/arch/sh/include/asm/migor.h
+++ b/arch/sh/include/mach-common/mach/migor.h
@@ -52,9 +52,11 @@
52#define PORT_HIZCRB 0xa405015a 52#define PORT_HIZCRB 0xa405015a
53#define PORT_HIZCRC 0xa405015c 53#define PORT_HIZCRC 0xa405015c
54 54
55#define BSC_CS4BCR 0xfec10010
55#define BSC_CS6ABCR 0xfec1001c 56#define BSC_CS6ABCR 0xfec1001c
57#define BSC_CS4WCR 0xfec10030
56 58
57#include <asm/sh_mobile_lcdc.h> 59#include <video/sh_mobile_lcdc.h>
58 60
59int migor_lcd_qvga_setup(void *board_data, void *sys_ops_handle, 61int migor_lcd_qvga_setup(void *board_data, void *sys_ops_handle,
60 struct sh_mobile_lcdc_sys_bus_ops *sys_ops); 62 struct sh_mobile_lcdc_sys_bus_ops *sys_ops);
diff --git a/arch/sh/include/asm/rts7751r2d.h b/arch/sh/include/mach-common/mach/r2d.h
index 0a800157b82..0a800157b82 100644
--- a/arch/sh/include/asm/rts7751r2d.h
+++ b/arch/sh/include/mach-common/mach/r2d.h
diff --git a/arch/sh/include/asm/sdk7780.h b/arch/sh/include/mach-common/mach/sdk7780.h
index 697dc865f21..697dc865f21 100644
--- a/arch/sh/include/asm/sdk7780.h
+++ b/arch/sh/include/mach-common/mach/sdk7780.h
diff --git a/arch/sh/include/asm/sh7763rdp.h b/arch/sh/include/mach-common/mach/sh7763rdp.h
index 8750cc85297..8750cc85297 100644
--- a/arch/sh/include/asm/sh7763rdp.h
+++ b/arch/sh/include/mach-common/mach/sh7763rdp.h
diff --git a/arch/sh/include/asm/sh7785lcr.h b/arch/sh/include/mach-common/mach/sh7785lcr.h
index 1ce27d5c749..1ce27d5c749 100644
--- a/arch/sh/include/asm/sh7785lcr.h
+++ b/arch/sh/include/mach-common/mach/sh7785lcr.h
diff --git a/arch/sh/include/asm/shmin.h b/arch/sh/include/mach-common/mach/shmin.h
index 36ba138a81f..36ba138a81f 100644
--- a/arch/sh/include/asm/shmin.h
+++ b/arch/sh/include/mach-common/mach/shmin.h
diff --git a/arch/sh/include/asm/snapgear.h b/arch/sh/include/mach-common/mach/snapgear.h
index 042d95f51c4..042d95f51c4 100644
--- a/arch/sh/include/asm/snapgear.h
+++ b/arch/sh/include/mach-common/mach/snapgear.h
diff --git a/arch/sh/include/asm/systemh7751.h b/arch/sh/include/mach-common/mach/systemh7751.h
index 4161122c84e..4161122c84e 100644
--- a/arch/sh/include/asm/systemh7751.h
+++ b/arch/sh/include/mach-common/mach/systemh7751.h
diff --git a/arch/sh/include/asm/titan.h b/arch/sh/include/mach-common/mach/titan.h
index 03f3583c891..03f3583c891 100644
--- a/arch/sh/include/asm/titan.h
+++ b/arch/sh/include/mach-common/mach/titan.h
diff --git a/arch/sh/kernel/Makefile_32 b/arch/sh/kernel/Makefile_32
index 0e6905fe9fe..48edfb145fb 100644
--- a/arch/sh/kernel/Makefile_32
+++ b/arch/sh/kernel/Makefile_32
@@ -21,7 +21,8 @@ obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o
21obj-$(CONFIG_CRASH_DUMP) += crash_dump.o 21obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
22obj-$(CONFIG_PM) += pm.o 22obj-$(CONFIG_PM) += pm.o
23obj-$(CONFIG_STACKTRACE) += stacktrace.o 23obj-$(CONFIG_STACKTRACE) += stacktrace.o
24obj-$(CONFIG_ELF_CORE) += dump_task.o
25obj-$(CONFIG_IO_TRAPPED) += io_trapped.o 24obj-$(CONFIG_IO_TRAPPED) += io_trapped.o
25obj-$(CONFIG_KPROBES) += kprobes.o
26obj-$(CONFIG_GENERIC_GPIO) += gpio.o
26 27
27EXTRA_CFLAGS += -Werror 28EXTRA_CFLAGS += -Werror
diff --git a/arch/sh/kernel/Makefile_64 b/arch/sh/kernel/Makefile_64
index 6edf53b93d9..c97660b2b48 100644
--- a/arch/sh/kernel/Makefile_64
+++ b/arch/sh/kernel/Makefile_64
@@ -17,7 +17,7 @@ obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o
17obj-$(CONFIG_CRASH_DUMP) += crash_dump.o 17obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
18obj-$(CONFIG_PM) += pm.o 18obj-$(CONFIG_PM) += pm.o
19obj-$(CONFIG_STACKTRACE) += stacktrace.o 19obj-$(CONFIG_STACKTRACE) += stacktrace.o
20obj-$(CONFIG_BINFMT_ELF) += dump_task.o
21obj-$(CONFIG_IO_TRAPPED) += io_trapped.o 20obj-$(CONFIG_IO_TRAPPED) += io_trapped.o
21obj-$(CONFIG_GENERIC_GPIO) += gpio.o
22 22
23EXTRA_CFLAGS += -Werror 23EXTRA_CFLAGS += -Werror
diff --git a/arch/sh/kernel/cpu/clock.c b/arch/sh/kernel/cpu/clock.c
index f5eb56e6bc5..b7e46d5bba4 100644
--- a/arch/sh/kernel/cpu/clock.c
+++ b/arch/sh/kernel/cpu/clock.c
@@ -294,9 +294,10 @@ arch_init_clk_ops(struct clk_ops **ops, int type)
294{ 294{
295} 295}
296 296
297void __init __attribute__ ((weak)) 297int __init __attribute__ ((weak))
298arch_clk_init(void) 298arch_clk_init(void)
299{ 299{
300 return 0;
300} 301}
301 302
302static int show_clocks(char *buf, char **start, off_t off, 303static int show_clocks(char *buf, char **start, off_t off,
@@ -331,7 +332,7 @@ int __init clk_init(void)
331 ret |= clk_register(clk); 332 ret |= clk_register(clk);
332 } 333 }
333 334
334 arch_clk_init(); 335 ret |= arch_clk_init();
335 336
336 /* Kick the child clocks.. */ 337 /* Kick the child clocks.. */
337 propagate_rate(&master_clk); 338 propagate_rate(&master_clk);
diff --git a/arch/sh/kernel/cpu/irq/Makefile b/arch/sh/kernel/cpu/irq/Makefile
index 462a8f6dfee..f0c7025a67d 100644
--- a/arch/sh/kernel/cpu/irq/Makefile
+++ b/arch/sh/kernel/cpu/irq/Makefile
@@ -1,8 +1,6 @@
1# 1#
2# Makefile for the Linux/SuperH CPU-specifc IRQ handlers. 2# Makefile for the Linux/SuperH CPU-specifc IRQ handlers.
3# 3#
4obj-y += intc.o
5
6obj-$(CONFIG_SUPERH32) += imask.o 4obj-$(CONFIG_SUPERH32) += imask.o
7obj-$(CONFIG_CPU_SH5) += intc-sh5.o 5obj-$(CONFIG_CPU_SH5) += intc-sh5.o
8obj-$(CONFIG_CPU_HAS_IPR_IRQ) += ipr.o 6obj-$(CONFIG_CPU_HAS_IPR_IRQ) += ipr.o
diff --git a/arch/sh/kernel/cpu/irq/ipr.c b/arch/sh/kernel/cpu/irq/ipr.c
index 56ea7b269b5..3eb17ee5540 100644
--- a/arch/sh/kernel/cpu/irq/ipr.c
+++ b/arch/sh/kernel/cpu/irq/ipr.c
@@ -33,7 +33,7 @@ static void disable_ipr_irq(unsigned int irq)
33 struct ipr_data *p = get_irq_chip_data(irq); 33 struct ipr_data *p = get_irq_chip_data(irq);
34 unsigned long addr = get_ipr_desc(irq)->ipr_offsets[p->ipr_idx]; 34 unsigned long addr = get_ipr_desc(irq)->ipr_offsets[p->ipr_idx];
35 /* Set the priority in IPR to 0 */ 35 /* Set the priority in IPR to 0 */
36 ctrl_outw(ctrl_inw(addr) & (0xffff ^ (0xf << p->shift)), addr); 36 __raw_writew(__raw_readw(addr) & (0xffff ^ (0xf << p->shift)), addr);
37} 37}
38 38
39static void enable_ipr_irq(unsigned int irq) 39static void enable_ipr_irq(unsigned int irq)
@@ -41,7 +41,7 @@ static void enable_ipr_irq(unsigned int irq)
41 struct ipr_data *p = get_irq_chip_data(irq); 41 struct ipr_data *p = get_irq_chip_data(irq);
42 unsigned long addr = get_ipr_desc(irq)->ipr_offsets[p->ipr_idx]; 42 unsigned long addr = get_ipr_desc(irq)->ipr_offsets[p->ipr_idx];
43 /* Set priority in IPR back to original value */ 43 /* Set priority in IPR back to original value */
44 ctrl_outw(ctrl_inw(addr) | (p->priority << p->shift), addr); 44 __raw_writew(__raw_readw(addr) | (p->priority << p->shift), addr);
45} 45}
46 46
47/* 47/*
diff --git a/arch/sh/kernel/cpu/sh2a/Makefile b/arch/sh/kernel/cpu/sh2a/Makefile
index 1ab1ecf4c76..428450cc080 100644
--- a/arch/sh/kernel/cpu/sh2a/Makefile
+++ b/arch/sh/kernel/cpu/sh2a/Makefile
@@ -12,3 +12,8 @@ obj-$(CONFIG_CPU_SUBTYPE_SH7206) += setup-sh7206.o clock-sh7206.o
12obj-$(CONFIG_CPU_SUBTYPE_SH7203) += setup-sh7203.o clock-sh7203.o 12obj-$(CONFIG_CPU_SUBTYPE_SH7203) += setup-sh7203.o clock-sh7203.o
13obj-$(CONFIG_CPU_SUBTYPE_SH7263) += setup-sh7203.o clock-sh7203.o 13obj-$(CONFIG_CPU_SUBTYPE_SH7263) += setup-sh7203.o clock-sh7203.o
14obj-$(CONFIG_CPU_SUBTYPE_MXG) += setup-mxg.o clock-sh7206.o 14obj-$(CONFIG_CPU_SUBTYPE_MXG) += setup-mxg.o clock-sh7206.o
15
16# Pinmux setup
17pinmux-$(CONFIG_CPU_SUBTYPE_SH7203) := pinmux-sh7203.o
18
19obj-$(CONFIG_GENERIC_GPIO) += $(pinmux-y)
diff --git a/arch/sh/kernel/cpu/sh2a/pinmux-sh7203.c b/arch/sh/kernel/cpu/sh2a/pinmux-sh7203.c
new file mode 100644
index 00000000000..39a5b880418
--- /dev/null
+++ b/arch/sh/kernel/cpu/sh2a/pinmux-sh7203.c
@@ -0,0 +1,1599 @@
1/*
2 * SH7203 Pinmux
3 *
4 * Copyright (C) 2008 Magnus Damm
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 */
10
11#include <linux/init.h>
12#include <linux/kernel.h>
13#include <linux/gpio.h>
14#include <asm/sh7203.h>
15
16enum {
17 PINMUX_RESERVED = 0,
18
19 PINMUX_DATA_BEGIN,
20 PA7_DATA, PA6_DATA, PA5_DATA, PA4_DATA,
21 PA3_DATA, PA2_DATA, PA1_DATA, PA0_DATA,
22 PB12_DATA,
23 PB11_DATA, PB10_DATA, PB9_DATA, PB8_DATA,
24 PB7_DATA, PB6_DATA, PB5_DATA, PB4_DATA,
25 PB3_DATA, PB2_DATA, PB1_DATA, PB0_DATA,
26 PC14_DATA, PC13_DATA, PC12_DATA,
27 PC11_DATA, PC10_DATA, PC9_DATA, PC8_DATA,
28 PC7_DATA, PC6_DATA, PC5_DATA, PC4_DATA,
29 PC3_DATA, PC2_DATA, PC1_DATA, PC0_DATA,
30 PD15_DATA, PD14_DATA, PD13_DATA, PD12_DATA,
31 PD11_DATA, PD10_DATA, PD9_DATA, PD8_DATA,
32 PD7_DATA, PD6_DATA, PD5_DATA, PD4_DATA,
33 PD3_DATA, PD2_DATA, PD1_DATA, PD0_DATA,
34 PE15_DATA, PE14_DATA, PE13_DATA, PE12_DATA,
35 PE11_DATA, PE10_DATA, PE9_DATA, PE8_DATA,
36 PE7_DATA, PE6_DATA, PE5_DATA, PE4_DATA,
37 PE3_DATA, PE2_DATA, PE1_DATA, PE0_DATA,
38 PF30_DATA, PF29_DATA, PF28_DATA,
39 PF27_DATA, PF26_DATA, PF25_DATA, PF24_DATA,
40 PF23_DATA, PF22_DATA, PF21_DATA, PF20_DATA,
41 PF19_DATA, PF18_DATA, PF17_DATA, PF16_DATA,
42 PF15_DATA, PF14_DATA, PF13_DATA, PF12_DATA,
43 PF11_DATA, PF10_DATA, PF9_DATA, PF8_DATA,
44 PF7_DATA, PF6_DATA, PF5_DATA, PF4_DATA,
45 PF3_DATA, PF2_DATA, PF1_DATA, PF0_DATA,
46 PINMUX_DATA_END,
47
48 PINMUX_INPUT_BEGIN,
49 PA7_IN, PA6_IN, PA5_IN, PA4_IN,
50 PA3_IN, PA2_IN, PA1_IN, PA0_IN,
51 PB11_IN, PB10_IN, PB9_IN, PB8_IN,
52 PB7_IN, PB6_IN, PB5_IN, PB4_IN,
53 PB3_IN, PB2_IN, PB1_IN, PB0_IN,
54 PC14_IN, PC13_IN, PC12_IN,
55 PC11_IN, PC10_IN, PC9_IN, PC8_IN,
56 PC7_IN, PC6_IN, PC5_IN, PC4_IN,
57 PC3_IN, PC2_IN, PC1_IN, PC0_IN,
58 PD15_IN, PD14_IN, PD13_IN, PD12_IN,
59 PD11_IN, PD10_IN, PD9_IN, PD8_IN,
60 PD7_IN, PD6_IN, PD5_IN, PD4_IN,
61 PD3_IN, PD2_IN, PD1_IN, PD0_IN,
62 PE15_IN, PE14_IN, PE13_IN, PE12_IN,
63 PE11_IN, PE10_IN, PE9_IN, PE8_IN,
64 PE7_IN, PE6_IN, PE5_IN, PE4_IN,
65 PE3_IN, PE2_IN, PE1_IN, PE0_IN,
66 PF30_IN, PF29_IN, PF28_IN,
67 PF27_IN, PF26_IN, PF25_IN, PF24_IN,
68 PF23_IN, PF22_IN, PF21_IN, PF20_IN,
69 PF19_IN, PF18_IN, PF17_IN, PF16_IN,
70 PF15_IN, PF14_IN, PF13_IN, PF12_IN,
71 PF11_IN, PF10_IN, PF9_IN, PF8_IN,
72 PF7_IN, PF6_IN, PF5_IN, PF4_IN,
73 PF3_IN, PF2_IN, PF1_IN, PF0_IN,
74 PINMUX_INPUT_END,
75
76 PINMUX_OUTPUT_BEGIN,
77 PB12_OUT,
78 PB11_OUT, PB10_OUT, PB9_OUT, PB8_OUT,
79 PC14_OUT, PC13_OUT, PC12_OUT,
80 PC11_OUT, PC10_OUT, PC9_OUT, PC8_OUT,
81 PC7_OUT, PC6_OUT, PC5_OUT, PC4_OUT,
82 PC3_OUT, PC2_OUT, PC1_OUT, PC0_OUT,
83 PD15_OUT, PD14_OUT, PD13_OUT, PD12_OUT,
84 PD11_OUT, PD10_OUT, PD9_OUT, PD8_OUT,
85 PD7_OUT, PD6_OUT, PD5_OUT, PD4_OUT,
86 PD3_OUT, PD2_OUT, PD1_OUT, PD0_OUT,
87 PE15_OUT, PE14_OUT, PE13_OUT, PE12_OUT,
88 PE11_OUT, PE10_OUT, PE9_OUT, PE8_OUT,
89 PE7_OUT, PE6_OUT, PE5_OUT, PE4_OUT,
90 PE3_OUT, PE2_OUT, PE1_OUT, PE0_OUT,
91 PF30_OUT, PF29_OUT, PF28_OUT,
92 PF27_OUT, PF26_OUT, PF25_OUT, PF24_OUT,
93 PF23_OUT, PF22_OUT, PF21_OUT, PF20_OUT,
94 PF19_OUT, PF18_OUT, PF17_OUT, PF16_OUT,
95 PF15_OUT, PF14_OUT, PF13_OUT, PF12_OUT,
96 PF11_OUT, PF10_OUT, PF9_OUT, PF8_OUT,
97 PF7_OUT, PF6_OUT, PF5_OUT, PF4_OUT,
98 PF3_OUT, PF2_OUT, PF1_OUT, PF0_OUT,
99 PINMUX_OUTPUT_END,
100
101 PINMUX_FUNCTION_BEGIN,
102 PB11_IOR_IN, PB11_IOR_OUT,
103 PB10_IOR_IN, PB10_IOR_OUT,
104 PB9_IOR_IN, PB9_IOR_OUT,
105 PB8_IOR_IN, PB8_IOR_OUT,
106 PB12MD_00, PB12MD_01, PB12MD_10, PB12MD_11,
107 PB11MD_0, PB11MD_1,
108 PB10MD_0, PB10MD_1,
109 PB9MD_00, PB9MD_01, PB9MD_10,
110 PB8MD_00, PB8MD_01, PB8MD_10,
111 PB7MD_00, PB7MD_01, PB7MD_10, PB7MD_11,
112 PB6MD_00, PB6MD_01, PB6MD_10, PB6MD_11,
113 PB5MD_00, PB5MD_01, PB5MD_10, PB5MD_11,
114 PB4MD_00, PB4MD_01, PB4MD_10, PB4MD_11,
115 PB3MD_00, PB3MD_01, PB3MD_10, PB3MD_11,
116 PB2MD_00, PB2MD_01, PB2MD_10, PB2MD_11,
117 PB1MD_00, PB1MD_01, PB1MD_10, PB1MD_11,
118 PB0MD_00, PB0MD_01, PB0MD_10, PB0MD_11,
119
120 PB12IRQ_00, PB12IRQ_01, PB12IRQ_10,
121
122 PC14MD_0, PC14MD_1,
123 PC13MD_0, PC13MD_1,
124 PC12MD_0, PC12MD_1,
125 PC11MD_00, PC11MD_01, PC11MD_10,
126 PC10MD_00, PC10MD_01, PC10MD_10,
127 PC9MD_0, PC9MD_1,
128 PC8MD_0, PC8MD_1,
129 PC7MD_0, PC7MD_1,
130 PC6MD_0, PC6MD_1,
131 PC5MD_0, PC5MD_1,
132 PC4MD_0, PC4MD_1,
133 PC3MD_0, PC3MD_1,
134 PC2MD_0, PC2MD_1,
135 PC1MD_0, PC1MD_1,
136 PC0MD_00, PC0MD_01, PC0MD_10,
137
138 PD15MD_000, PD15MD_001, PD15MD_010, PD15MD_100, PD15MD_101,
139 PD14MD_000, PD14MD_001, PD14MD_010, PD14MD_101,
140 PD13MD_000, PD13MD_001, PD13MD_010, PD13MD_100, PD13MD_101,
141 PD12MD_000, PD12MD_001, PD12MD_010, PD12MD_100, PD12MD_101,
142 PD11MD_000, PD11MD_001, PD11MD_010, PD11MD_100, PD11MD_101,
143 PD10MD_000, PD10MD_001, PD10MD_010, PD10MD_100, PD10MD_101,
144 PD9MD_000, PD9MD_001, PD9MD_010, PD9MD_100, PD9MD_101,
145 PD8MD_000, PD8MD_001, PD8MD_010, PD8MD_100, PD8MD_101,
146 PD7MD_000, PD7MD_001, PD7MD_010, PD7MD_011, PD7MD_100, PD7MD_101,
147 PD6MD_000, PD6MD_001, PD6MD_010, PD6MD_011, PD6MD_100, PD6MD_101,
148 PD5MD_000, PD5MD_001, PD5MD_010, PD5MD_011, PD5MD_100, PD5MD_101,
149 PD4MD_000, PD4MD_001, PD4MD_010, PD4MD_011, PD4MD_100, PD4MD_101,
150 PD3MD_000, PD3MD_001, PD3MD_010, PD3MD_011, PD3MD_100, PD3MD_101,
151 PD2MD_000, PD2MD_001, PD2MD_010, PD2MD_011, PD2MD_100, PD2MD_101,
152 PD1MD_000, PD1MD_001, PD1MD_010, PD1MD_011, PD1MD_100, PD1MD_101,
153 PD0MD_000, PD0MD_001, PD0MD_010, PD0MD_011, PD0MD_100, PD0MD_101,
154
155 PE15MD_00, PE15MD_01, PE15MD_11,
156 PE14MD_00, PE14MD_01, PE14MD_11,
157 PE13MD_00, PE13MD_11,
158 PE12MD_00, PE12MD_11,
159 PE11MD_000, PE11MD_001, PE11MD_010, PE11MD_100,
160 PE10MD_000, PE10MD_001, PE10MD_010, PE10MD_100,
161 PE9MD_00, PE9MD_01, PE9MD_10, PE9MD_11,
162 PE8MD_00, PE8MD_01, PE8MD_10, PE8MD_11,
163 PE7MD_000, PE7MD_001, PE7MD_010, PE7MD_011, PE7MD_100,
164 PE6MD_000, PE6MD_001, PE6MD_010, PE6MD_011, PE6MD_100,
165 PE5MD_000, PE5MD_001, PE5MD_010, PE5MD_011, PE5MD_100,
166 PE4MD_000, PE4MD_001, PE4MD_010, PE4MD_011, PE4MD_100,
167 PE3MD_00, PE3MD_01, PE3MD_11,
168 PE2MD_00, PE2MD_01, PE2MD_11,
169 PE1MD_00, PE1MD_01, PE1MD_10, PE1MD_11,
170 PE0MD_000, PE0MD_001, PE0MD_011, PE0MD_100,
171
172 PF30MD_0, PF30MD_1,
173 PF29MD_0, PF29MD_1,
174 PF28MD_0, PF28MD_1,
175 PF27MD_0, PF27MD_1,
176 PF26MD_0, PF26MD_1,
177 PF25MD_0, PF25MD_1,
178 PF24MD_0, PF24MD_1,
179 PF23MD_00, PF23MD_01, PF23MD_10,
180 PF22MD_00, PF22MD_01, PF22MD_10,
181 PF21MD_00, PF21MD_01, PF21MD_10,
182 PF20MD_00, PF20MD_01, PF20MD_10,
183 PF19MD_00, PF19MD_01, PF19MD_10,
184 PF18MD_00, PF18MD_01, PF18MD_10,
185 PF17MD_00, PF17MD_01, PF17MD_10,
186 PF16MD_00, PF16MD_01, PF16MD_10,
187 PF15MD_00, PF15MD_01, PF15MD_10,
188 PF14MD_00, PF14MD_01, PF14MD_10,
189 PF13MD_00, PF13MD_01, PF13MD_10,
190 PF12MD_00, PF12MD_01, PF12MD_10,
191 PF11MD_00, PF11MD_01, PF11MD_10,
192 PF10MD_00, PF10MD_01, PF10MD_10,
193 PF9MD_00, PF9MD_01, PF9MD_10,
194 PF8MD_00, PF8MD_01, PF8MD_10,
195 PF7MD_00, PF7MD_01, PF7MD_10, PF7MD_11,
196 PF6MD_00, PF6MD_01, PF6MD_10, PF6MD_11,
197 PF5MD_00, PF5MD_01, PF5MD_10, PF5MD_11,
198 PF4MD_00, PF4MD_01, PF4MD_10, PF4MD_11,
199 PF3MD_00, PF3MD_01, PF3MD_10, PF3MD_11,
200 PF2MD_00, PF2MD_01, PF2MD_10, PF2MD_11,
201 PF1MD_00, PF1MD_01, PF1MD_10, PF1MD_11,
202 PF0MD_00, PF0MD_01, PF0MD_10, PF0MD_11,
203 PINMUX_FUNCTION_END,
204
205 PINMUX_MARK_BEGIN,
206 PINT7_PB_MARK, PINT6_PB_MARK, PINT5_PB_MARK, PINT4_PB_MARK,
207 PINT3_PB_MARK, PINT2_PB_MARK, PINT1_PB_MARK, PINT0_PB_MARK,
208 PINT7_PD_MARK, PINT6_PD_MARK, PINT5_PD_MARK, PINT4_PD_MARK,
209 PINT3_PD_MARK, PINT2_PD_MARK, PINT1_PD_MARK, PINT0_PD_MARK,
210 IRQ7_PB_MARK, IRQ6_PB_MARK, IRQ5_PB_MARK, IRQ4_PB_MARK,
211 IRQ3_PB_MARK, IRQ2_PB_MARK, IRQ1_PB_MARK, IRQ0_PB_MARK,
212 IRQ7_PD_MARK, IRQ6_PD_MARK, IRQ5_PD_MARK, IRQ4_PD_MARK,
213 IRQ3_PD_MARK, IRQ2_PD_MARK, IRQ1_PD_MARK, IRQ0_PD_MARK,
214 IRQ7_PE_MARK, IRQ6_PE_MARK, IRQ5_PE_MARK, IRQ4_PE_MARK,
215 IRQ3_PE_MARK, IRQ2_PE_MARK, IRQ1_PE_MARK, IRQ0_PE_MARK,
216 WDTOVF_MARK, IRQOUT_MARK, REFOUT_MARK, IRQOUT_REFOUT_MARK,
217 UBCTRG_MARK,
218 CTX1_MARK, CRX1_MARK, CTX0_MARK, CTX0_CTX1_MARK,
219 CRX0_MARK, CRX0_CRX1_MARK,
220 SDA3_MARK, SCL3_MARK,
221 SDA2_MARK, SCL2_MARK,
222 SDA1_MARK, SCL1_MARK,
223 SDA0_MARK, SCL0_MARK,
224 TEND0_PD_MARK, TEND0_PE_MARK, DACK0_PD_MARK, DACK0_PE_MARK,
225 DREQ0_PD_MARK, DREQ0_PE_MARK, TEND1_PD_MARK, TEND1_PE_MARK,
226 DACK1_PD_MARK, DACK1_PE_MARK, DREQ1_PD_MARK, DREQ1_PE_MARK,
227 DACK2_MARK, DREQ2_MARK, DACK3_MARK, DREQ3_MARK,
228 ADTRG_PD_MARK, ADTRG_PE_MARK,
229 D31_MARK, D30_MARK, D29_MARK, D28_MARK,
230 D27_MARK, D26_MARK, D25_MARK, D24_MARK,
231 D23_MARK, D22_MARK, D21_MARK, D20_MARK,
232 D19_MARK, D18_MARK, D17_MARK, D16_MARK,
233 A25_MARK, A24_MARK, A23_MARK, A22_MARK,
234 A21_MARK, CS4_MARK, MRES_MARK, BS_MARK,
235 IOIS16_MARK, CS1_MARK, CS6_CE1B_MARK, CE2B_MARK,
236 CS5_CE1A_MARK, CE2A_MARK, FRAME_MARK, WAIT_MARK,
237 RDWR_MARK, CKE_MARK, CASU_MARK, BREQ_MARK,
238 RASU_MARK, BACK_MARK, CASL_MARK, RASL_MARK,
239 WE3_DQMUU_AH_ICIO_WR_MARK, WE2_DQMUL_ICIORD_MARK,
240 WE1_DQMLU_WE_MARK, WE0_DQMLL_MARK,
241 CS3_MARK, CS2_MARK, A1_MARK, A0_MARK, CS7_MARK,
242 TIOC4D_MARK, TIOC4C_MARK, TIOC4B_MARK, TIOC4A_MARK,
243 TIOC3D_MARK, TIOC3C_MARK, TIOC3B_MARK, TIOC3A_MARK,
244 TIOC2B_MARK, TIOC1B_MARK, TIOC2A_MARK, TIOC1A_MARK,
245 TIOC0D_MARK, TIOC0C_MARK, TIOC0B_MARK, TIOC0A_MARK,
246 TCLKD_PD_MARK, TCLKC_PD_MARK, TCLKB_PD_MARK, TCLKA_PD_MARK,
247 TCLKD_PF_MARK, TCLKC_PF_MARK, TCLKB_PF_MARK, TCLKA_PF_MARK,
248 SCS0_PD_MARK, SSO0_PD_MARK, SSI0_PD_MARK, SSCK0_PD_MARK,
249 SCS0_PF_MARK, SSO0_PF_MARK, SSI0_PF_MARK, SSCK0_PF_MARK,
250 SCS1_PD_MARK, SSO1_PD_MARK, SSI1_PD_MARK, SSCK1_PD_MARK,
251 SCS1_PF_MARK, SSO1_PF_MARK, SSI1_PF_MARK, SSCK1_PF_MARK,
252 TXD0_MARK, RXD0_MARK, SCK0_MARK,
253 TXD1_MARK, RXD1_MARK, SCK1_MARK,
254 TXD2_MARK, RXD2_MARK, SCK2_MARK,
255 RTS3_MARK, CTS3_MARK, TXD3_MARK,
256 RXD3_MARK, SCK3_MARK,
257 AUDIO_CLK_MARK,
258 SSIDATA3_MARK, SSIWS3_MARK, SSISCK3_MARK,
259 SSIDATA2_MARK, SSIWS2_MARK, SSISCK2_MARK,
260 SSIDATA1_MARK, SSIWS1_MARK, SSISCK1_MARK,
261 SSIDATA0_MARK, SSIWS0_MARK, SSISCK0_MARK,
262 FCE_MARK, FRB_MARK,
263 NAF7_MARK, NAF6_MARK, NAF5_MARK, NAF4_MARK,
264 NAF3_MARK, NAF2_MARK, NAF1_MARK, NAF0_MARK,
265 FSC_MARK, FOE_MARK, FCDE_MARK, FWE_MARK,
266 LCD_VEPWC_MARK, LCD_VCPWC_MARK, LCD_CLK_MARK, LCD_FLM_MARK,
267 LCD_M_DISP_MARK, LCD_CL2_MARK, LCD_CL1_MARK, LCD_DON_MARK,
268 LCD_DATA15_MARK, LCD_DATA14_MARK, LCD_DATA13_MARK, LCD_DATA12_MARK,
269 LCD_DATA11_MARK, LCD_DATA10_MARK, LCD_DATA9_MARK, LCD_DATA8_MARK,
270 LCD_DATA7_MARK, LCD_DATA6_MARK, LCD_DATA5_MARK, LCD_DATA4_MARK,
271 LCD_DATA3_MARK, LCD_DATA2_MARK, LCD_DATA1_MARK, LCD_DATA0_MARK,
272 PINMUX_MARK_END,
273};
274
275static pinmux_enum_t pinmux_data[] = {
276
277 /* PA */
278 PINMUX_DATA(PA7_DATA, PA7_IN),
279 PINMUX_DATA(PA6_DATA, PA6_IN),
280 PINMUX_DATA(PA5_DATA, PA5_IN),
281 PINMUX_DATA(PA4_DATA, PA4_IN),
282 PINMUX_DATA(PA3_DATA, PA3_IN),
283 PINMUX_DATA(PA2_DATA, PA2_IN),
284 PINMUX_DATA(PA1_DATA, PA1_IN),
285 PINMUX_DATA(PA0_DATA, PA0_IN),
286
287 /* PB */
288 PINMUX_DATA(PB12_DATA, PB12MD_00, PB12_OUT),
289 PINMUX_DATA(WDTOVF_MARK, PB12MD_01),
290 PINMUX_DATA(IRQOUT_MARK, PB12MD_10, PB12IRQ_00),
291 PINMUX_DATA(REFOUT_MARK, PB12MD_10, PB12IRQ_01),
292 PINMUX_DATA(IRQOUT_REFOUT_MARK, PB12MD_10, PB12IRQ_10),
293 PINMUX_DATA(UBCTRG_MARK, PB12MD_11),
294
295 PINMUX_DATA(PB11_DATA, PB11MD_0, PB11_IN, PB11_OUT),
296 PINMUX_DATA(CTX1_MARK, PB11MD_1),
297
298 PINMUX_DATA(PB10_DATA, PB10MD_0, PB10_IN, PB10_OUT),
299 PINMUX_DATA(CRX1_MARK, PB10MD_1),
300
301 PINMUX_DATA(PB9_DATA, PB9MD_00, PB9_IN, PB9_OUT),
302 PINMUX_DATA(CTX0_MARK, PB9MD_01),
303 PINMUX_DATA(CTX0_CTX1_MARK, PB9MD_10),
304
305 PINMUX_DATA(PB8_DATA, PB8MD_00, PB8_IN, PB8_OUT),
306 PINMUX_DATA(CRX0_MARK, PB8MD_01),
307 PINMUX_DATA(CRX0_CRX1_MARK, PB8MD_10),
308
309 PINMUX_DATA(PB7_DATA, PB7MD_00, PB7_IN),
310 PINMUX_DATA(SDA3_MARK, PB7MD_01),
311 PINMUX_DATA(PINT7_PB_MARK, PB7MD_10),
312 PINMUX_DATA(IRQ7_PB_MARK, PB7MD_11),
313
314 PINMUX_DATA(PB6_DATA, PB6MD_00, PB6_IN),
315 PINMUX_DATA(SCL3_MARK, PB6MD_01),
316 PINMUX_DATA(PINT6_PB_MARK, PB6MD_10),
317 PINMUX_DATA(IRQ6_PB_MARK, PB6MD_11),
318
319 PINMUX_DATA(PB5_DATA, PB5MD_00, PB5_IN),
320 PINMUX_DATA(SDA2_MARK, PB6MD_01),
321 PINMUX_DATA(PINT5_PB_MARK, PB6MD_10),
322 PINMUX_DATA(IRQ5_PB_MARK, PB6MD_11),
323
324 PINMUX_DATA(PB4_DATA, PB4MD_00, PB4_IN),
325 PINMUX_DATA(SCL2_MARK, PB4MD_01),
326 PINMUX_DATA(PINT4_PB_MARK, PB4MD_10),
327 PINMUX_DATA(IRQ4_PB_MARK, PB4MD_11),
328
329 PINMUX_DATA(PB3_DATA, PB3MD_00, PB3_IN),
330 PINMUX_DATA(SDA1_MARK, PB3MD_01),
331 PINMUX_DATA(PINT3_PB_MARK, PB3MD_10),
332 PINMUX_DATA(IRQ3_PB_MARK, PB3MD_11),
333
334 PINMUX_DATA(PB2_DATA, PB2MD_00, PB2_IN),
335 PINMUX_DATA(SCL1_MARK, PB2MD_01),
336 PINMUX_DATA(PINT2_PB_MARK, PB2MD_10),
337 PINMUX_DATA(IRQ2_PB_MARK, PB2MD_11),
338
339 PINMUX_DATA(PB1_DATA, PB1MD_00, PB1_IN),
340 PINMUX_DATA(SDA0_MARK, PB1MD_01),
341 PINMUX_DATA(PINT1_PB_MARK, PB1MD_10),
342 PINMUX_DATA(IRQ1_PB_MARK, PB1MD_11),
343
344 PINMUX_DATA(PB0_DATA, PB0MD_00, PB0_IN),
345 PINMUX_DATA(SCL0_MARK, PB0MD_01),
346 PINMUX_DATA(PINT0_PB_MARK, PB0MD_10),
347 PINMUX_DATA(IRQ0_PB_MARK, PB0MD_11),
348
349 /* PC */
350 PINMUX_DATA(PC14_DATA, PC14MD_0, PC14_IN, PC14_OUT),
351 PINMUX_DATA(WAIT_MARK, PC14MD_1),
352
353 PINMUX_DATA(PC13_DATA, PC13MD_0, PC13_IN, PC13_OUT),
354 PINMUX_DATA(RDWR_MARK, PC13MD_1),
355
356 PINMUX_DATA(PC12_DATA, PC12MD_0, PC12_IN, PC12_OUT),
357 PINMUX_DATA(CKE_MARK, PC12MD_1),
358
359 PINMUX_DATA(PC11_DATA, PC11MD_00, PC11_IN, PC11_OUT),
360 PINMUX_DATA(CASU_MARK, PC11MD_01),
361 PINMUX_DATA(BREQ_MARK, PC11MD_10),
362
363 PINMUX_DATA(PC10_DATA, PC10MD_00, PC10_IN, PC10_OUT),
364 PINMUX_DATA(RASU_MARK, PC10MD_01),
365 PINMUX_DATA(BACK_MARK, PC10MD_10),
366
367 PINMUX_DATA(PC9_DATA, PC9MD_0, PC9_IN, PC9_OUT),
368 PINMUX_DATA(CASL_MARK, PC9MD_1),
369
370 PINMUX_DATA(PC8_DATA, PC8MD_0, PC8_IN, PC8_OUT),
371 PINMUX_DATA(RASL_MARK, PC8MD_1),
372
373 PINMUX_DATA(PC7_DATA, PC7MD_0, PC7_IN, PC7_OUT),
374 PINMUX_DATA(WE3_DQMUU_AH_ICIO_WR_MARK, PC7MD_1),
375
376 PINMUX_DATA(PC6_DATA, PC6MD_0, PC6_IN, PC6_OUT),
377 PINMUX_DATA(WE2_DQMUL_ICIORD_MARK, PC6MD_1),
378
379 PINMUX_DATA(PC5_DATA, PC5MD_0, PC5_IN, PC5_OUT),
380 PINMUX_DATA(WE1_DQMLU_WE_MARK, PC5MD_1),
381
382 PINMUX_DATA(PC4_DATA, PC4MD_0, PC4_IN, PC4_OUT),
383 PINMUX_DATA(WE0_DQMLL_MARK, PC4MD_1),
384
385 PINMUX_DATA(PC3_DATA, PC3MD_0, PC3_IN, PC3_OUT),
386 PINMUX_DATA(CS3_MARK, PC3MD_1),
387
388 PINMUX_DATA(PC2_DATA, PC2MD_0, PC2_IN, PC2_OUT),
389 PINMUX_DATA(CS2_MARK, PC2MD_1),
390
391 PINMUX_DATA(PC1_DATA, PC1MD_0, PC1_IN, PC1_OUT),
392 PINMUX_DATA(A1_MARK, PC1MD_1),
393
394 PINMUX_DATA(PC0_DATA, PC0MD_00, PC0_IN, PC0_OUT),
395 PINMUX_DATA(A0_MARK, PC0MD_01),
396 PINMUX_DATA(CS7_MARK, PC0MD_10),
397
398 /* PD */
399 PINMUX_DATA(PD15_DATA, PD15MD_000, PD15_IN, PD15_OUT),
400 PINMUX_DATA(D31_MARK, PD15MD_001),
401 PINMUX_DATA(PINT7_PD_MARK, PD15MD_010),
402 PINMUX_DATA(ADTRG_PD_MARK, PD15MD_100),
403 PINMUX_DATA(TIOC4D_MARK, PD15MD_101),
404
405 PINMUX_DATA(PD14_DATA, PD14MD_000, PD14_IN, PD14_OUT),
406 PINMUX_DATA(D30_MARK, PD14MD_001),
407 PINMUX_DATA(PINT6_PD_MARK, PD14MD_010),
408 PINMUX_DATA(TIOC4C_MARK, PD14MD_101),
409
410 PINMUX_DATA(PD13_DATA, PD13MD_000, PD13_IN, PD13_OUT),
411 PINMUX_DATA(D29_MARK, PD13MD_001),
412 PINMUX_DATA(PINT5_PD_MARK, PD13MD_010),
413 PINMUX_DATA(TEND1_PD_MARK, PD13MD_100),
414 PINMUX_DATA(TIOC4B_MARK, PD13MD_101),
415
416 PINMUX_DATA(PD12_DATA, PD12MD_000, PD12_IN, PD12_OUT),
417 PINMUX_DATA(D28_MARK, PD12MD_001),
418 PINMUX_DATA(PINT4_PD_MARK, PD12MD_010),
419 PINMUX_DATA(DACK1_PD_MARK, PD12MD_100),
420 PINMUX_DATA(TIOC4A_MARK, PD12MD_101),
421
422 PINMUX_DATA(PD11_DATA, PD11MD_000, PD11_IN, PD11_OUT),
423 PINMUX_DATA(D27_MARK, PD11MD_001),
424 PINMUX_DATA(PINT3_PD_MARK, PD11MD_010),
425 PINMUX_DATA(DREQ1_PD_MARK, PD11MD_100),
426 PINMUX_DATA(TIOC3D_MARK, PD11MD_101),
427
428 PINMUX_DATA(PD10_DATA, PD10MD_000, PD10_IN, PD10_OUT),
429 PINMUX_DATA(D26_MARK, PD10MD_001),
430 PINMUX_DATA(PINT2_PD_MARK, PD10MD_010),
431 PINMUX_DATA(TEND0_PD_MARK, PD10MD_100),
432 PINMUX_DATA(TIOC3C_MARK, PD10MD_101),
433
434 PINMUX_DATA(PD9_DATA, PD9MD_000, PD9_IN, PD9_OUT),
435 PINMUX_DATA(D25_MARK, PD9MD_001),
436 PINMUX_DATA(PINT1_PD_MARK, PD9MD_010),
437 PINMUX_DATA(DACK0_PD_MARK, PD9MD_100),
438 PINMUX_DATA(TIOC3B_MARK, PD9MD_101),
439
440 PINMUX_DATA(PD8_DATA, PD8MD_000, PD8_IN, PD8_OUT),
441 PINMUX_DATA(D24_MARK, PD8MD_001),
442 PINMUX_DATA(PINT0_PD_MARK, PD8MD_010),
443 PINMUX_DATA(DREQ0_PD_MARK, PD8MD_100),
444 PINMUX_DATA(TIOC3A_MARK, PD8MD_101),
445
446 PINMUX_DATA(PD7_DATA, PD7MD_000, PD7_IN, PD7_OUT),
447 PINMUX_DATA(D23_MARK, PD7MD_001),
448 PINMUX_DATA(IRQ7_PD_MARK, PD7MD_010),
449 PINMUX_DATA(SCS1_PD_MARK, PD7MD_011),
450 PINMUX_DATA(TCLKD_PD_MARK, PD7MD_100),
451 PINMUX_DATA(TIOC2B_MARK, PD7MD_101),
452
453 PINMUX_DATA(PD6_DATA, PD6MD_000, PD6_IN, PD6_OUT),
454 PINMUX_DATA(D22_MARK, PD6MD_001),
455 PINMUX_DATA(IRQ6_PD_MARK, PD6MD_010),
456 PINMUX_DATA(SSO1_PD_MARK, PD6MD_011),
457 PINMUX_DATA(TCLKC_PD_MARK, PD6MD_100),
458 PINMUX_DATA(TIOC2A_MARK, PD6MD_101),
459
460 PINMUX_DATA(PD5_DATA, PD5MD_000, PD5_IN, PD5_OUT),
461 PINMUX_DATA(D21_MARK, PD5MD_001),
462 PINMUX_DATA(IRQ5_PD_MARK, PD5MD_010),
463 PINMUX_DATA(SSI1_PD_MARK, PD5MD_011),
464 PINMUX_DATA(TCLKB_PD_MARK, PD5MD_100),
465 PINMUX_DATA(TIOC1B_MARK, PD5MD_101),
466
467 PINMUX_DATA(PD4_DATA, PD4MD_000, PD4_IN, PD4_OUT),
468 PINMUX_DATA(D20_MARK, PD4MD_001),
469 PINMUX_DATA(IRQ4_PD_MARK, PD4MD_010),
470 PINMUX_DATA(SSCK1_PD_MARK, PD4MD_011),
471 PINMUX_DATA(TCLKA_PD_MARK, PD4MD_100),
472 PINMUX_DATA(TIOC1A_MARK, PD4MD_101),
473
474 PINMUX_DATA(PD3_DATA, PD3MD_000, PD3_IN, PD3_OUT),
475 PINMUX_DATA(D19_MARK, PD3MD_001),
476 PINMUX_DATA(IRQ3_PD_MARK, PD3MD_010),
477 PINMUX_DATA(SCS0_PD_MARK, PD3MD_011),
478 PINMUX_DATA(DACK3_MARK, PD3MD_100),
479 PINMUX_DATA(TIOC0D_MARK, PD3MD_101),
480
481 PINMUX_DATA(PD2_DATA, PD2MD_000, PD2_IN, PD2_OUT),
482 PINMUX_DATA(D18_MARK, PD2MD_001),
483 PINMUX_DATA(IRQ2_PD_MARK, PD2MD_010),
484 PINMUX_DATA(SSO0_PD_MARK, PD2MD_011),
485 PINMUX_DATA(DREQ3_MARK, PD2MD_100),
486 PINMUX_DATA(TIOC0C_MARK, PD2MD_101),
487
488 PINMUX_DATA(PD1_DATA, PD1MD_000, PD1_IN, PD1_OUT),
489 PINMUX_DATA(D17_MARK, PD1MD_001),
490 PINMUX_DATA(IRQ1_PD_MARK, PD1MD_010),
491 PINMUX_DATA(SSI0_PD_MARK, PD1MD_011),
492 PINMUX_DATA(DACK2_MARK, PD1MD_100),
493 PINMUX_DATA(TIOC0B_MARK, PD1MD_101),
494
495 PINMUX_DATA(PD0_DATA, PD0MD_000, PD0_IN, PD0_OUT),
496 PINMUX_DATA(D16_MARK, PD0MD_001),
497 PINMUX_DATA(IRQ0_PD_MARK, PD0MD_010),
498 PINMUX_DATA(SSCK0_PD_MARK, PD0MD_011),
499 PINMUX_DATA(DREQ2_MARK, PD0MD_100),
500 PINMUX_DATA(TIOC0A_MARK, PD0MD_101),
501
502 /* PE */
503 PINMUX_DATA(PE15_DATA, PE15MD_00, PE15_IN, PE15_OUT),
504 PINMUX_DATA(IOIS16_MARK, PE15MD_01),
505 PINMUX_DATA(RTS3_MARK, PE15MD_11),
506
507 PINMUX_DATA(PE14_DATA, PE14MD_00, PE14_IN, PE14_OUT),
508 PINMUX_DATA(CS1_MARK, PE14MD_01),
509 PINMUX_DATA(CTS3_MARK, PE14MD_11),
510
511 PINMUX_DATA(PE13_DATA, PE13MD_00, PE13_IN, PE13_OUT),
512 PINMUX_DATA(TXD3_MARK, PE13MD_11),
513
514 PINMUX_DATA(PE12_DATA, PE12MD_00, PE12_IN, PE12_OUT),
515 PINMUX_DATA(RXD3_MARK, PE12MD_11),
516
517 PINMUX_DATA(PE11_DATA, PE11MD_000, PE11_IN, PE11_OUT),
518 PINMUX_DATA(CS6_CE1B_MARK, PE11MD_001),
519 PINMUX_DATA(IRQ7_PE_MARK, PE11MD_010),
520 PINMUX_DATA(TEND1_PE_MARK, PE11MD_100),
521
522 PINMUX_DATA(PE10_DATA, PE10MD_000, PE10_IN, PE10_OUT),
523 PINMUX_DATA(CE2B_MARK, PE10MD_001),
524 PINMUX_DATA(IRQ6_PE_MARK, PE10MD_010),
525 PINMUX_DATA(TEND0_PE_MARK, PE10MD_100),
526
527 PINMUX_DATA(PE9_DATA, PE9MD_00, PE9_IN, PE9_OUT),
528 PINMUX_DATA(CS5_CE1A_MARK, PE9MD_01),
529 PINMUX_DATA(IRQ5_PE_MARK, PE9MD_10),
530 PINMUX_DATA(SCK3_MARK, PE9MD_11),
531
532 PINMUX_DATA(PE8_DATA, PE8MD_00, PE8_IN, PE8_OUT),
533 PINMUX_DATA(CE2A_MARK, PE8MD_01),
534 PINMUX_DATA(IRQ4_PE_MARK, PE8MD_10),
535 PINMUX_DATA(SCK2_MARK, PE8MD_11),
536
537 PINMUX_DATA(PE7_DATA, PE7MD_000, PE7_IN, PE7_OUT),
538 PINMUX_DATA(FRAME_MARK, PE7MD_001),
539 PINMUX_DATA(IRQ3_PE_MARK, PE7MD_010),
540 PINMUX_DATA(TXD2_MARK, PE7MD_011),
541 PINMUX_DATA(DACK1_PE_MARK, PE7MD_100),
542
543 PINMUX_DATA(PE6_DATA, PE6MD_000, PE6_IN, PE6_OUT),
544 PINMUX_DATA(A25_MARK, PE6MD_001),
545 PINMUX_DATA(IRQ2_PE_MARK, PE6MD_010),
546 PINMUX_DATA(RXD2_MARK, PE6MD_011),
547 PINMUX_DATA(DREQ1_PE_MARK, PE6MD_100),
548
549 PINMUX_DATA(PE5_DATA, PE5MD_000, PE5_IN, PE5_OUT),
550 PINMUX_DATA(A24_MARK, PE5MD_001),
551 PINMUX_DATA(IRQ1_PE_MARK, PE5MD_010),
552 PINMUX_DATA(TXD1_MARK, PE5MD_011),
553 PINMUX_DATA(DACK0_PE_MARK, PE5MD_100),
554
555 PINMUX_DATA(PE4_DATA, PE4MD_000, PE4_IN, PE4_OUT),
556 PINMUX_DATA(A23_MARK, PE4MD_001),
557 PINMUX_DATA(IRQ0_PE_MARK, PE4MD_010),
558 PINMUX_DATA(RXD1_MARK, PE4MD_011),
559 PINMUX_DATA(DREQ0_PE_MARK, PE4MD_100),
560
561 PINMUX_DATA(PE3_DATA, PE3MD_00, PE3_IN, PE3_OUT),
562 PINMUX_DATA(A22_MARK, PE3MD_01),
563 PINMUX_DATA(SCK1_MARK, PE3MD_11),
564
565 PINMUX_DATA(PE2_DATA, PE2MD_00, PE2_IN, PE2_OUT),
566 PINMUX_DATA(A21_MARK, PE2MD_01),
567 PINMUX_DATA(SCK0_MARK, PE2MD_11),
568
569 PINMUX_DATA(PE1_DATA, PE1MD_00, PE1_IN, PE1_OUT),
570 PINMUX_DATA(CS4_MARK, PE1MD_01),
571 PINMUX_DATA(MRES_MARK, PE1MD_10),
572 PINMUX_DATA(TXD0_MARK, PE1MD_11),
573
574 PINMUX_DATA(PE0_DATA, PE0MD_000, PE0_IN, PE0_OUT),
575 PINMUX_DATA(BS_MARK, PE0MD_001),
576 PINMUX_DATA(RXD0_MARK, PE0MD_011),
577 PINMUX_DATA(ADTRG_PE_MARK, PE0MD_100),
578
579 /* PF */
580 PINMUX_DATA(PF30_DATA, PF30MD_0, PF30_IN, PF30_OUT),
581 PINMUX_DATA(AUDIO_CLK_MARK, PF30MD_1),
582
583 PINMUX_DATA(PF29_DATA, PF29MD_0, PF29_IN, PF29_OUT),
584 PINMUX_DATA(SSIDATA3_MARK, PF29MD_1),
585
586 PINMUX_DATA(PF28_DATA, PF28MD_0, PF28_IN, PF28_OUT),
587 PINMUX_DATA(SSIWS3_MARK, PF28MD_1),
588
589 PINMUX_DATA(PF27_DATA, PF27MD_0, PF27_IN, PF27_OUT),
590 PINMUX_DATA(SSISCK3_MARK, PF27MD_1),
591
592 PINMUX_DATA(PF26_DATA, PF26MD_0, PF26_IN, PF26_OUT),
593 PINMUX_DATA(SSIDATA2_MARK, PF26MD_1),
594
595 PINMUX_DATA(PF25_DATA, PF25MD_0, PF25_IN, PF25_OUT),
596 PINMUX_DATA(SSIWS2_MARK, PF25MD_1),
597
598 PINMUX_DATA(PF24_DATA, PF24MD_0, PF24_IN, PF24_OUT),
599 PINMUX_DATA(SSISCK2_MARK, PF24MD_1),
600
601 PINMUX_DATA(PF23_DATA, PF23MD_00, PF23_IN, PF23_OUT),
602 PINMUX_DATA(SSIDATA1_MARK, PF23MD_01),
603 PINMUX_DATA(LCD_VEPWC_MARK, PF23MD_10),
604
605 PINMUX_DATA(PF22_DATA, PF22MD_00, PF22_IN, PF22_OUT),
606 PINMUX_DATA(SSIWS1_MARK, PF22MD_01),
607 PINMUX_DATA(LCD_VCPWC_MARK, PF22MD_10),
608
609 PINMUX_DATA(PF21_DATA, PF21MD_00, PF21_IN, PF21_OUT),
610 PINMUX_DATA(SSISCK1_MARK, PF21MD_01),
611 PINMUX_DATA(LCD_CLK_MARK, PF21MD_10),
612
613 PINMUX_DATA(PF20_DATA, PF20MD_00, PF20_IN, PF20_OUT),
614 PINMUX_DATA(SSIDATA0_MARK, PF20MD_01),
615 PINMUX_DATA(LCD_FLM_MARK, PF20MD_10),
616
617 PINMUX_DATA(PF19_DATA, PF19MD_00, PF19_IN, PF19_OUT),
618 PINMUX_DATA(SSIWS0_MARK, PF19MD_01),
619 PINMUX_DATA(LCD_M_DISP_MARK, PF19MD_10),
620
621 PINMUX_DATA(PF18_DATA, PF18MD_00, PF18_IN, PF18_OUT),
622 PINMUX_DATA(SSISCK0_MARK, PF18MD_01),
623 PINMUX_DATA(LCD_CL2_MARK, PF18MD_10),
624
625 PINMUX_DATA(PF17_DATA, PF17MD_00, PF17_IN, PF17_OUT),
626 PINMUX_DATA(FCE_MARK, PF17MD_01),
627 PINMUX_DATA(LCD_CL1_MARK, PF17MD_10),
628
629 PINMUX_DATA(PF16_DATA, PF16MD_00, PF16_IN, PF16_OUT),
630 PINMUX_DATA(FRB_MARK, PF16MD_01),
631 PINMUX_DATA(LCD_DON_MARK, PF16MD_10),
632
633 PINMUX_DATA(PF15_DATA, PF15MD_00, PF15_IN, PF15_OUT),
634 PINMUX_DATA(NAF7_MARK, PF15MD_01),
635 PINMUX_DATA(LCD_DATA15_MARK, PF15MD_10),
636
637 PINMUX_DATA(PF14_DATA, PF14MD_00, PF14_IN, PF14_OUT),
638 PINMUX_DATA(NAF6_MARK, PF14MD_01),
639 PINMUX_DATA(LCD_DATA14_MARK, PF14MD_10),
640
641 PINMUX_DATA(PF13_DATA, PF13MD_00, PF13_IN, PF13_OUT),
642 PINMUX_DATA(NAF5_MARK, PF13MD_01),
643 PINMUX_DATA(LCD_DATA13_MARK, PF13MD_10),
644
645 PINMUX_DATA(PF12_DATA, PF12MD_00, PF12_IN, PF12_OUT),
646 PINMUX_DATA(NAF4_MARK, PF12MD_01),
647 PINMUX_DATA(LCD_DATA12_MARK, PF12MD_10),
648
649 PINMUX_DATA(PF11_DATA, PF11MD_00, PF11_IN, PF11_OUT),
650 PINMUX_DATA(NAF3_MARK, PF11MD_01),
651 PINMUX_DATA(LCD_DATA11_MARK, PF11MD_10),
652
653 PINMUX_DATA(PF10_DATA, PF10MD_00, PF10_IN, PF10_OUT),
654 PINMUX_DATA(NAF2_MARK, PF10MD_01),
655 PINMUX_DATA(LCD_DATA10_MARK, PF10MD_10),
656
657 PINMUX_DATA(PF9_DATA, PF9MD_00, PF9_IN, PF9_OUT),
658 PINMUX_DATA(NAF1_MARK, PF9MD_01),
659 PINMUX_DATA(LCD_DATA9_MARK, PF9MD_10),
660
661 PINMUX_DATA(PF8_DATA, PF8MD_00, PF8_IN, PF8_OUT),
662 PINMUX_DATA(NAF0_MARK, PF8MD_01),
663 PINMUX_DATA(LCD_DATA8_MARK, PF8MD_10),
664
665 PINMUX_DATA(PF7_DATA, PF7MD_00, PF7_IN, PF7_OUT),
666 PINMUX_DATA(FSC_MARK, PF7MD_01),
667 PINMUX_DATA(LCD_DATA7_MARK, PF7MD_10),
668 PINMUX_DATA(SCS1_PF_MARK, PF7MD_11),
669
670 PINMUX_DATA(PF6_DATA, PF6MD_00, PF6_IN, PF6_OUT),
671 PINMUX_DATA(FOE_MARK, PF6MD_01),
672 PINMUX_DATA(LCD_DATA6_MARK, PF6MD_10),
673 PINMUX_DATA(SSO1_PF_MARK, PF6MD_11),
674
675 PINMUX_DATA(PF5_DATA, PF5MD_00, PF5_IN, PF5_OUT),
676 PINMUX_DATA(FCDE_MARK, PF5MD_01),
677 PINMUX_DATA(LCD_DATA5_MARK, PF5MD_10),
678 PINMUX_DATA(SSI1_PF_MARK, PF5MD_11),
679
680 PINMUX_DATA(PF4_DATA, PF4MD_00, PF4_IN, PF4_OUT),
681 PINMUX_DATA(FWE_MARK, PF4MD_01),
682 PINMUX_DATA(LCD_DATA4_MARK, PF4MD_10),
683 PINMUX_DATA(SSCK1_PF_MARK, PF4MD_11),
684
685 PINMUX_DATA(PF3_DATA, PF3MD_00, PF3_IN, PF3_OUT),
686 PINMUX_DATA(TCLKD_PF_MARK, PF3MD_01),
687 PINMUX_DATA(LCD_DATA3_MARK, PF3MD_10),
688 PINMUX_DATA(SCS0_PF_MARK, PF3MD_11),
689
690 PINMUX_DATA(PF2_DATA, PF2MD_00, PF2_IN, PF2_OUT),
691 PINMUX_DATA(TCLKC_PF_MARK, PF2MD_01),
692 PINMUX_DATA(LCD_DATA2_MARK, PF2MD_10),
693 PINMUX_DATA(SSO0_PF_MARK, PF2MD_11),
694
695 PINMUX_DATA(PF1_DATA, PF1MD_00, PF1_IN, PF1_OUT),
696 PINMUX_DATA(TCLKB_PF_MARK, PF1MD_01),
697 PINMUX_DATA(LCD_DATA1_MARK, PF1MD_10),
698 PINMUX_DATA(SSI0_PF_MARK, PF1MD_11),
699
700 PINMUX_DATA(PF0_DATA, PF0MD_00, PF0_IN, PF0_OUT),
701 PINMUX_DATA(TCLKA_PF_MARK, PF0MD_01),
702 PINMUX_DATA(LCD_DATA0_MARK, PF0MD_10),
703 PINMUX_DATA(SSCK0_PF_MARK, PF0MD_11),
704};
705
706static struct pinmux_gpio pinmux_gpios[] = {
707
708 /* PA */
709 PINMUX_GPIO(GPIO_PA7, PA7_DATA),
710 PINMUX_GPIO(GPIO_PA6, PA6_DATA),
711 PINMUX_GPIO(GPIO_PA5, PA5_DATA),
712 PINMUX_GPIO(GPIO_PA4, PA4_DATA),
713 PINMUX_GPIO(GPIO_PA3, PA3_DATA),
714 PINMUX_GPIO(GPIO_PA2, PA2_DATA),
715 PINMUX_GPIO(GPIO_PA1, PA1_DATA),
716 PINMUX_GPIO(GPIO_PA0, PA0_DATA),
717
718 /* PB */
719 PINMUX_GPIO(GPIO_PB12, PB12_DATA),
720 PINMUX_GPIO(GPIO_PB11, PB11_DATA),
721 PINMUX_GPIO(GPIO_PB10, PB10_DATA),
722 PINMUX_GPIO(GPIO_PB9, PB9_DATA),
723 PINMUX_GPIO(GPIO_PB8, PB8_DATA),
724 PINMUX_GPIO(GPIO_PB7, PB7_DATA),
725 PINMUX_GPIO(GPIO_PB6, PB6_DATA),
726 PINMUX_GPIO(GPIO_PB5, PB5_DATA),
727 PINMUX_GPIO(GPIO_PB4, PB4_DATA),
728 PINMUX_GPIO(GPIO_PB3, PB3_DATA),
729 PINMUX_GPIO(GPIO_PB2, PB2_DATA),
730 PINMUX_GPIO(GPIO_PB1, PB1_DATA),
731 PINMUX_GPIO(GPIO_PB0, PB0_DATA),
732
733 /* PC */
734 PINMUX_GPIO(GPIO_PC14, PC14_DATA),
735 PINMUX_GPIO(GPIO_PC13, PC13_DATA),
736 PINMUX_GPIO(GPIO_PC12, PC12_DATA),
737 PINMUX_GPIO(GPIO_PC11, PC11_DATA),
738 PINMUX_GPIO(GPIO_PC10, PC10_DATA),
739 PINMUX_GPIO(GPIO_PC9, PC9_DATA),
740 PINMUX_GPIO(GPIO_PC8, PC8_DATA),
741 PINMUX_GPIO(GPIO_PC7, PC7_DATA),
742 PINMUX_GPIO(GPIO_PC6, PC6_DATA),
743 PINMUX_GPIO(GPIO_PC5, PC5_DATA),
744 PINMUX_GPIO(GPIO_PC4, PC4_DATA),
745 PINMUX_GPIO(GPIO_PC3, PC3_DATA),
746 PINMUX_GPIO(GPIO_PC2, PC2_DATA),
747 PINMUX_GPIO(GPIO_PC1, PC1_DATA),
748 PINMUX_GPIO(GPIO_PC0, PC0_DATA),
749
750 /* PD */
751 PINMUX_GPIO(GPIO_PD15, PD15_DATA),
752 PINMUX_GPIO(GPIO_PD14, PD14_DATA),
753 PINMUX_GPIO(GPIO_PD13, PD13_DATA),
754 PINMUX_GPIO(GPIO_PD12, PD12_DATA),
755 PINMUX_GPIO(GPIO_PD11, PD11_DATA),
756 PINMUX_GPIO(GPIO_PD10, PD10_DATA),
757 PINMUX_GPIO(GPIO_PD9, PD9_DATA),
758 PINMUX_GPIO(GPIO_PD8, PD8_DATA),
759 PINMUX_GPIO(GPIO_PD7, PD7_DATA),
760 PINMUX_GPIO(GPIO_PD6, PD6_DATA),
761 PINMUX_GPIO(GPIO_PD5, PD5_DATA),
762 PINMUX_GPIO(GPIO_PD4, PD4_DATA),
763 PINMUX_GPIO(GPIO_PD3, PD3_DATA),
764 PINMUX_GPIO(GPIO_PD2, PD2_DATA),
765 PINMUX_GPIO(GPIO_PD1, PD1_DATA),
766 PINMUX_GPIO(GPIO_PD0, PD0_DATA),
767
768 /* PE */
769 PINMUX_GPIO(GPIO_PE15, PE15_DATA),
770 PINMUX_GPIO(GPIO_PE14, PE14_DATA),
771 PINMUX_GPIO(GPIO_PE13, PE13_DATA),
772 PINMUX_GPIO(GPIO_PE12, PE12_DATA),
773 PINMUX_GPIO(GPIO_PE11, PE11_DATA),
774 PINMUX_GPIO(GPIO_PE10, PE10_DATA),
775 PINMUX_GPIO(GPIO_PE9, PE9_DATA),
776 PINMUX_GPIO(GPIO_PE8, PE8_DATA),
777 PINMUX_GPIO(GPIO_PE7, PE7_DATA),
778 PINMUX_GPIO(GPIO_PE6, PE6_DATA),
779 PINMUX_GPIO(GPIO_PE5, PE5_DATA),
780 PINMUX_GPIO(GPIO_PE4, PE4_DATA),
781 PINMUX_GPIO(GPIO_PE3, PE3_DATA),
782 PINMUX_GPIO(GPIO_PE2, PE2_DATA),
783 PINMUX_GPIO(GPIO_PE1, PE1_DATA),
784 PINMUX_GPIO(GPIO_PE0, PE0_DATA),
785
786 /* PF */
787 PINMUX_GPIO(GPIO_PF30, PF30_DATA),
788 PINMUX_GPIO(GPIO_PF29, PF29_DATA),
789 PINMUX_GPIO(GPIO_PF28, PF28_DATA),
790 PINMUX_GPIO(GPIO_PF27, PF27_DATA),
791 PINMUX_GPIO(GPIO_PF26, PF26_DATA),
792 PINMUX_GPIO(GPIO_PF25, PF25_DATA),
793 PINMUX_GPIO(GPIO_PF24, PF24_DATA),
794 PINMUX_GPIO(GPIO_PF23, PF23_DATA),
795 PINMUX_GPIO(GPIO_PF22, PF22_DATA),
796 PINMUX_GPIO(GPIO_PF21, PF21_DATA),
797 PINMUX_GPIO(GPIO_PF20, PF20_DATA),
798 PINMUX_GPIO(GPIO_PF19, PF19_DATA),
799 PINMUX_GPIO(GPIO_PF18, PF18_DATA),
800 PINMUX_GPIO(GPIO_PF17, PF17_DATA),
801 PINMUX_GPIO(GPIO_PF16, PF16_DATA),
802 PINMUX_GPIO(GPIO_PF15, PF15_DATA),
803 PINMUX_GPIO(GPIO_PF14, PF14_DATA),
804 PINMUX_GPIO(GPIO_PF13, PF13_DATA),
805 PINMUX_GPIO(GPIO_PF12, PF12_DATA),
806 PINMUX_GPIO(GPIO_PF11, PF11_DATA),
807 PINMUX_GPIO(GPIO_PF10, PF10_DATA),
808 PINMUX_GPIO(GPIO_PF9, PF9_DATA),
809 PINMUX_GPIO(GPIO_PF8, PF8_DATA),
810 PINMUX_GPIO(GPIO_PF7, PF7_DATA),
811 PINMUX_GPIO(GPIO_PF6, PF6_DATA),
812 PINMUX_GPIO(GPIO_PF5, PF5_DATA),
813 PINMUX_GPIO(GPIO_PF4, PF4_DATA),
814 PINMUX_GPIO(GPIO_PF3, PF3_DATA),
815 PINMUX_GPIO(GPIO_PF2, PF2_DATA),
816 PINMUX_GPIO(GPIO_PF1, PF1_DATA),
817 PINMUX_GPIO(GPIO_PF0, PF0_DATA),
818
819 /* INTC */
820 PINMUX_GPIO(GPIO_FN_PINT7_PB, PINT7_PB_MARK),
821 PINMUX_GPIO(GPIO_FN_PINT6_PB, PINT6_PB_MARK),
822 PINMUX_GPIO(GPIO_FN_PINT5_PB, PINT5_PB_MARK),
823 PINMUX_GPIO(GPIO_FN_PINT4_PB, PINT4_PB_MARK),
824 PINMUX_GPIO(GPIO_FN_PINT3_PB, PINT3_PB_MARK),
825 PINMUX_GPIO(GPIO_FN_PINT2_PB, PINT2_PB_MARK),
826 PINMUX_GPIO(GPIO_FN_PINT1_PB, PINT1_PB_MARK),
827 PINMUX_GPIO(GPIO_FN_PINT0_PB, PINT0_PB_MARK),
828 PINMUX_GPIO(GPIO_FN_PINT7_PD, PINT7_PD_MARK),
829 PINMUX_GPIO(GPIO_FN_PINT6_PD, PINT6_PD_MARK),
830 PINMUX_GPIO(GPIO_FN_PINT5_PD, PINT5_PD_MARK),
831 PINMUX_GPIO(GPIO_FN_PINT4_PD, PINT4_PD_MARK),
832 PINMUX_GPIO(GPIO_FN_PINT3_PD, PINT3_PD_MARK),
833 PINMUX_GPIO(GPIO_FN_PINT2_PD, PINT2_PD_MARK),
834 PINMUX_GPIO(GPIO_FN_PINT1_PD, PINT1_PD_MARK),
835 PINMUX_GPIO(GPIO_FN_PINT0_PD, PINT0_PD_MARK),
836 PINMUX_GPIO(GPIO_FN_IRQ7_PB, IRQ7_PB_MARK),
837 PINMUX_GPIO(GPIO_FN_IRQ6_PB, IRQ6_PB_MARK),
838 PINMUX_GPIO(GPIO_FN_IRQ5_PB, IRQ5_PB_MARK),
839 PINMUX_GPIO(GPIO_FN_IRQ4_PB, IRQ4_PB_MARK),
840 PINMUX_GPIO(GPIO_FN_IRQ3_PB, IRQ3_PB_MARK),
841 PINMUX_GPIO(GPIO_FN_IRQ2_PB, IRQ2_PB_MARK),
842 PINMUX_GPIO(GPIO_FN_IRQ1_PB, IRQ1_PB_MARK),
843 PINMUX_GPIO(GPIO_FN_IRQ0_PB, IRQ0_PB_MARK),
844 PINMUX_GPIO(GPIO_FN_IRQ7_PD, IRQ7_PD_MARK),
845 PINMUX_GPIO(GPIO_FN_IRQ6_PD, IRQ6_PD_MARK),
846 PINMUX_GPIO(GPIO_FN_IRQ5_PD, IRQ5_PD_MARK),
847 PINMUX_GPIO(GPIO_FN_IRQ4_PD, IRQ4_PD_MARK),
848 PINMUX_GPIO(GPIO_FN_IRQ3_PD, IRQ3_PD_MARK),
849 PINMUX_GPIO(GPIO_FN_IRQ2_PD, IRQ2_PD_MARK),
850 PINMUX_GPIO(GPIO_FN_IRQ1_PD, IRQ1_PD_MARK),
851 PINMUX_GPIO(GPIO_FN_IRQ0_PD, IRQ0_PD_MARK),
852 PINMUX_GPIO(GPIO_FN_IRQ7_PE, IRQ7_PE_MARK),
853 PINMUX_GPIO(GPIO_FN_IRQ6_PE, IRQ6_PE_MARK),
854 PINMUX_GPIO(GPIO_FN_IRQ5_PE, IRQ5_PE_MARK),
855 PINMUX_GPIO(GPIO_FN_IRQ4_PE, IRQ4_PE_MARK),
856 PINMUX_GPIO(GPIO_FN_IRQ3_PE, IRQ3_PE_MARK),
857 PINMUX_GPIO(GPIO_FN_IRQ2_PE, IRQ2_PE_MARK),
858 PINMUX_GPIO(GPIO_FN_IRQ1_PE, IRQ1_PE_MARK),
859 PINMUX_GPIO(GPIO_FN_IRQ0_PE, IRQ0_PE_MARK),
860
861 PINMUX_GPIO(GPIO_FN_WDTOVF, WDTOVF_MARK),
862 PINMUX_GPIO(GPIO_FN_IRQOUT, IRQOUT_MARK),
863 PINMUX_GPIO(GPIO_FN_REFOUT, REFOUT_MARK),
864 PINMUX_GPIO(GPIO_FN_IRQOUT_REFOUT, IRQOUT_REFOUT_MARK),
865 PINMUX_GPIO(GPIO_FN_UBCTRG, UBCTRG_MARK),
866
867 /* CAN */
868 PINMUX_GPIO(GPIO_FN_CTX1, CTX1_MARK),
869 PINMUX_GPIO(GPIO_FN_CRX1, CRX1_MARK),
870 PINMUX_GPIO(GPIO_FN_CTX0, CTX0_MARK),
871 PINMUX_GPIO(GPIO_FN_CTX0_CTX1, CTX0_CTX1_MARK),
872 PINMUX_GPIO(GPIO_FN_CRX0, CRX0_MARK),
873 PINMUX_GPIO(GPIO_FN_CRX0_CRX1, CRX0_CRX1_MARK),
874
875 /* IIC3 */
876 PINMUX_GPIO(GPIO_FN_SDA3, SDA3_MARK),
877 PINMUX_GPIO(GPIO_FN_SCL3, SCL3_MARK),
878 PINMUX_GPIO(GPIO_FN_SDA2, SDA2_MARK),
879 PINMUX_GPIO(GPIO_FN_SCL2, SCL2_MARK),
880 PINMUX_GPIO(GPIO_FN_SDA1, SDA1_MARK),
881 PINMUX_GPIO(GPIO_FN_SCL1, SCL1_MARK),
882 PINMUX_GPIO(GPIO_FN_SDA0, SDA0_MARK),
883 PINMUX_GPIO(GPIO_FN_SCL0, SCL0_MARK),
884
885 /* DMAC */
886 PINMUX_GPIO(GPIO_FN_TEND0_PD, TEND0_PD_MARK),
887 PINMUX_GPIO(GPIO_FN_TEND0_PE, TEND0_PE_MARK),
888 PINMUX_GPIO(GPIO_FN_DACK0_PD, DACK0_PD_MARK),
889 PINMUX_GPIO(GPIO_FN_DACK0_PE, DACK0_PE_MARK),
890 PINMUX_GPIO(GPIO_FN_DREQ0_PD, DREQ0_PD_MARK),
891 PINMUX_GPIO(GPIO_FN_DREQ0_PE, DREQ0_PE_MARK),
892 PINMUX_GPIO(GPIO_FN_TEND1_PD, TEND1_PD_MARK),
893 PINMUX_GPIO(GPIO_FN_TEND1_PE, TEND1_PE_MARK),
894 PINMUX_GPIO(GPIO_FN_DACK1_PD, DACK1_PD_MARK),
895 PINMUX_GPIO(GPIO_FN_DACK1_PE, DACK1_PE_MARK),
896 PINMUX_GPIO(GPIO_FN_DREQ1_PD, DREQ1_PD_MARK),
897 PINMUX_GPIO(GPIO_FN_DREQ1_PE, DREQ1_PE_MARK),
898 PINMUX_GPIO(GPIO_FN_DACK2, DACK2_MARK),
899 PINMUX_GPIO(GPIO_FN_DREQ2, DREQ2_MARK),
900 PINMUX_GPIO(GPIO_FN_DACK3, DACK3_MARK),
901 PINMUX_GPIO(GPIO_FN_DREQ3, DREQ3_MARK),
902
903 /* ADC */
904 PINMUX_GPIO(GPIO_FN_ADTRG_PD, ADTRG_PD_MARK),
905 PINMUX_GPIO(GPIO_FN_ADTRG_PE, ADTRG_PE_MARK),
906
907 /* BSC */
908 PINMUX_GPIO(GPIO_FN_D31, D31_MARK),
909 PINMUX_GPIO(GPIO_FN_D30, D30_MARK),
910 PINMUX_GPIO(GPIO_FN_D29, D29_MARK),
911 PINMUX_GPIO(GPIO_FN_D28, D28_MARK),
912 PINMUX_GPIO(GPIO_FN_D27, D27_MARK),
913 PINMUX_GPIO(GPIO_FN_D26, D26_MARK),
914 PINMUX_GPIO(GPIO_FN_D25, D25_MARK),
915 PINMUX_GPIO(GPIO_FN_D24, D24_MARK),
916 PINMUX_GPIO(GPIO_FN_D23, D23_MARK),
917 PINMUX_GPIO(GPIO_FN_D22, D22_MARK),
918 PINMUX_GPIO(GPIO_FN_D21, D21_MARK),
919 PINMUX_GPIO(GPIO_FN_D20, D20_MARK),
920 PINMUX_GPIO(GPIO_FN_D19, D19_MARK),
921 PINMUX_GPIO(GPIO_FN_D18, D18_MARK),
922 PINMUX_GPIO(GPIO_FN_D17, D17_MARK),
923 PINMUX_GPIO(GPIO_FN_D16, D16_MARK),
924 PINMUX_GPIO(GPIO_FN_A25, A25_MARK),
925 PINMUX_GPIO(GPIO_FN_A24, A24_MARK),
926 PINMUX_GPIO(GPIO_FN_A23, A23_MARK),
927 PINMUX_GPIO(GPIO_FN_A22, A22_MARK),
928 PINMUX_GPIO(GPIO_FN_A21, A21_MARK),
929 PINMUX_GPIO(GPIO_FN_CS4, CS4_MARK),
930 PINMUX_GPIO(GPIO_FN_MRES, MRES_MARK),
931 PINMUX_GPIO(GPIO_FN_BS, BS_MARK),
932 PINMUX_GPIO(GPIO_FN_IOIS16, IOIS16_MARK),
933 PINMUX_GPIO(GPIO_FN_CS1, CS1_MARK),
934 PINMUX_GPIO(GPIO_FN_CS6_CE1B, CS6_CE1B_MARK),
935 PINMUX_GPIO(GPIO_FN_CE2B, CE2B_MARK),
936 PINMUX_GPIO(GPIO_FN_CS5_CE1A, CS5_CE1A_MARK),
937 PINMUX_GPIO(GPIO_FN_CE2A, CE2A_MARK),
938 PINMUX_GPIO(GPIO_FN_FRAME, FRAME_MARK),
939 PINMUX_GPIO(GPIO_FN_WAIT, WAIT_MARK),
940 PINMUX_GPIO(GPIO_FN_RDWR, RDWR_MARK),
941 PINMUX_GPIO(GPIO_FN_CKE, CKE_MARK),
942 PINMUX_GPIO(GPIO_FN_CASU, CASU_MARK),
943 PINMUX_GPIO(GPIO_FN_BREQ, BREQ_MARK),
944 PINMUX_GPIO(GPIO_FN_RASU, RASU_MARK),
945 PINMUX_GPIO(GPIO_FN_BACK, BACK_MARK),
946 PINMUX_GPIO(GPIO_FN_CASL, CASL_MARK),
947 PINMUX_GPIO(GPIO_FN_RASL, RASL_MARK),
948 PINMUX_GPIO(GPIO_FN_WE3_DQMUU_AH_ICIO_WR, WE3_DQMUU_AH_ICIO_WR_MARK),
949 PINMUX_GPIO(GPIO_FN_WE2_DQMUL_ICIORD, WE2_DQMUL_ICIORD_MARK),
950 PINMUX_GPIO(GPIO_FN_WE1_DQMLU_WE, WE1_DQMLU_WE_MARK),
951 PINMUX_GPIO(GPIO_FN_WE0_DQMLL, WE0_DQMLL_MARK),
952 PINMUX_GPIO(GPIO_FN_CS3, CS3_MARK),
953 PINMUX_GPIO(GPIO_FN_CS2, CS2_MARK),
954 PINMUX_GPIO(GPIO_FN_A1, A1_MARK),
955 PINMUX_GPIO(GPIO_FN_A0, A0_MARK),
956 PINMUX_GPIO(GPIO_FN_CS7, CS7_MARK),
957
958 /* TMU */
959 PINMUX_GPIO(GPIO_FN_TIOC4D, TIOC4D_MARK),
960 PINMUX_GPIO(GPIO_FN_TIOC4C, TIOC4C_MARK),
961 PINMUX_GPIO(GPIO_FN_TIOC4B, TIOC4B_MARK),
962 PINMUX_GPIO(GPIO_FN_TIOC4A, TIOC4A_MARK),
963 PINMUX_GPIO(GPIO_FN_TIOC3D, TIOC3D_MARK),
964 PINMUX_GPIO(GPIO_FN_TIOC3C, TIOC3C_MARK),
965 PINMUX_GPIO(GPIO_FN_TIOC3B, TIOC3B_MARK),
966 PINMUX_GPIO(GPIO_FN_TIOC3A, TIOC3A_MARK),
967 PINMUX_GPIO(GPIO_FN_TIOC2B, TIOC2B_MARK),
968 PINMUX_GPIO(GPIO_FN_TIOC1B, TIOC1B_MARK),
969 PINMUX_GPIO(GPIO_FN_TIOC2A, TIOC2A_MARK),
970 PINMUX_GPIO(GPIO_FN_TIOC1A, TIOC1A_MARK),
971 PINMUX_GPIO(GPIO_FN_TIOC0D, TIOC0D_MARK),
972 PINMUX_GPIO(GPIO_FN_TIOC0C, TIOC0C_MARK),
973 PINMUX_GPIO(GPIO_FN_TIOC0B, TIOC0B_MARK),
974 PINMUX_GPIO(GPIO_FN_TIOC0A, TIOC0A_MARK),
975 PINMUX_GPIO(GPIO_FN_TCLKD_PD, TCLKD_PD_MARK),
976 PINMUX_GPIO(GPIO_FN_TCLKC_PD, TCLKC_PD_MARK),
977 PINMUX_GPIO(GPIO_FN_TCLKB_PD, TCLKB_PD_MARK),
978 PINMUX_GPIO(GPIO_FN_TCLKA_PD, TCLKA_PD_MARK),
979 PINMUX_GPIO(GPIO_FN_TCLKD_PF, TCLKD_PF_MARK),
980 PINMUX_GPIO(GPIO_FN_TCLKC_PF, TCLKC_PF_MARK),
981 PINMUX_GPIO(GPIO_FN_TCLKB_PF, TCLKB_PF_MARK),
982 PINMUX_GPIO(GPIO_FN_TCLKA_PF, TCLKA_PF_MARK),
983
984 /* SSU */
985 PINMUX_GPIO(GPIO_FN_SCS0_PD, SCS0_PD_MARK),
986 PINMUX_GPIO(GPIO_FN_SSO0_PD, SSO0_PD_MARK),
987 PINMUX_GPIO(GPIO_FN_SSI0_PD, SSI0_PD_MARK),
988 PINMUX_GPIO(GPIO_FN_SSCK0_PD, SSCK0_PD_MARK),
989 PINMUX_GPIO(GPIO_FN_SCS0_PF, SCS0_PF_MARK),
990 PINMUX_GPIO(GPIO_FN_SSO0_PF, SSO0_PF_MARK),
991 PINMUX_GPIO(GPIO_FN_SSI0_PF, SSI0_PF_MARK),
992 PINMUX_GPIO(GPIO_FN_SSCK0_PF, SSCK0_PF_MARK),
993 PINMUX_GPIO(GPIO_FN_SCS1_PD, SCS1_PD_MARK),
994 PINMUX_GPIO(GPIO_FN_SSO1_PD, SSO1_PD_MARK),
995 PINMUX_GPIO(GPIO_FN_SSI1_PD, SSI1_PD_MARK),
996 PINMUX_GPIO(GPIO_FN_SSCK1_PD, SSCK1_PD_MARK),
997 PINMUX_GPIO(GPIO_FN_SCS1_PF, SCS1_PF_MARK),
998 PINMUX_GPIO(GPIO_FN_SSO1_PF, SSO1_PF_MARK),
999 PINMUX_GPIO(GPIO_FN_SSI1_PF, SSI1_PF_MARK),
1000 PINMUX_GPIO(GPIO_FN_SSCK1_PF, SSCK1_PF_MARK),
1001
1002 /* SCIF */
1003 PINMUX_GPIO(GPIO_FN_TXD0, TXD0_MARK),
1004 PINMUX_GPIO(GPIO_FN_RXD0, RXD0_MARK),
1005 PINMUX_GPIO(GPIO_FN_SCK0, SCK0_MARK),
1006 PINMUX_GPIO(GPIO_FN_TXD1, TXD1_MARK),
1007 PINMUX_GPIO(GPIO_FN_RXD1, RXD1_MARK),
1008 PINMUX_GPIO(GPIO_FN_SCK1, SCK1_MARK),
1009 PINMUX_GPIO(GPIO_FN_TXD2, TXD2_MARK),
1010 PINMUX_GPIO(GPIO_FN_RXD2, RXD2_MARK),
1011 PINMUX_GPIO(GPIO_FN_SCK2, SCK2_MARK),
1012 PINMUX_GPIO(GPIO_FN_RTS3, RTS3_MARK),
1013 PINMUX_GPIO(GPIO_FN_CTS3, CTS3_MARK),
1014 PINMUX_GPIO(GPIO_FN_TXD3, TXD3_MARK),
1015 PINMUX_GPIO(GPIO_FN_RXD3, RXD3_MARK),
1016 PINMUX_GPIO(GPIO_FN_SCK3, SCK3_MARK),
1017
1018 /* SSI */
1019 PINMUX_GPIO(GPIO_FN_AUDIO_CLK, AUDIO_CLK_MARK),
1020 PINMUX_GPIO(GPIO_FN_SSIDATA3, SSIDATA3_MARK),
1021 PINMUX_GPIO(GPIO_FN_SSIWS3, SSIWS3_MARK),
1022 PINMUX_GPIO(GPIO_FN_SSISCK3, SSISCK3_MARK),
1023 PINMUX_GPIO(GPIO_FN_SSIDATA2, SSIDATA2_MARK),
1024 PINMUX_GPIO(GPIO_FN_SSIWS2, SSIWS2_MARK),
1025 PINMUX_GPIO(GPIO_FN_SSISCK2, SSISCK2_MARK),
1026 PINMUX_GPIO(GPIO_FN_SSIDATA1, SSIDATA1_MARK),
1027 PINMUX_GPIO(GPIO_FN_SSIWS1, SSIWS1_MARK),
1028 PINMUX_GPIO(GPIO_FN_SSISCK1, SSISCK1_MARK),
1029 PINMUX_GPIO(GPIO_FN_SSIDATA0, SSIDATA0_MARK),
1030 PINMUX_GPIO(GPIO_FN_SSIWS0, SSIWS0_MARK),
1031 PINMUX_GPIO(GPIO_FN_SSISCK0, SSISCK0_MARK),
1032
1033 /* FLCTL */
1034 PINMUX_GPIO(GPIO_FN_FCE, FCE_MARK),
1035 PINMUX_GPIO(GPIO_FN_FRB, FRB_MARK),
1036 PINMUX_GPIO(GPIO_FN_NAF7, NAF7_MARK),
1037 PINMUX_GPIO(GPIO_FN_NAF6, NAF6_MARK),
1038 PINMUX_GPIO(GPIO_FN_NAF5, NAF5_MARK),
1039 PINMUX_GPIO(GPIO_FN_NAF4, NAF4_MARK),
1040 PINMUX_GPIO(GPIO_FN_NAF3, NAF3_MARK),
1041 PINMUX_GPIO(GPIO_FN_NAF2, NAF2_MARK),
1042 PINMUX_GPIO(GPIO_FN_NAF1, NAF1_MARK),
1043 PINMUX_GPIO(GPIO_FN_NAF0, NAF0_MARK),
1044 PINMUX_GPIO(GPIO_FN_FSC, FSC_MARK),
1045 PINMUX_GPIO(GPIO_FN_FOE, FOE_MARK),
1046 PINMUX_GPIO(GPIO_FN_FCDE, FCDE_MARK),
1047 PINMUX_GPIO(GPIO_FN_FWE, FWE_MARK),
1048
1049 /* LCDC */
1050 PINMUX_GPIO(GPIO_FN_LCD_VEPWC, LCD_VEPWC_MARK),
1051 PINMUX_GPIO(GPIO_FN_LCD_VCPWC, LCD_VCPWC_MARK),
1052 PINMUX_GPIO(GPIO_FN_LCD_CLK, LCD_CLK_MARK),
1053 PINMUX_GPIO(GPIO_FN_LCD_FLM, LCD_FLM_MARK),
1054 PINMUX_GPIO(GPIO_FN_LCD_M_DISP, LCD_M_DISP_MARK),
1055 PINMUX_GPIO(GPIO_FN_LCD_CL2, LCD_CL2_MARK),
1056 PINMUX_GPIO(GPIO_FN_LCD_CL1, LCD_CL1_MARK),
1057 PINMUX_GPIO(GPIO_FN_LCD_DON, LCD_DON_MARK),
1058 PINMUX_GPIO(GPIO_FN_LCD_DATA15, LCD_DATA15_MARK),
1059 PINMUX_GPIO(GPIO_FN_LCD_DATA14, LCD_DATA14_MARK),
1060 PINMUX_GPIO(GPIO_FN_LCD_DATA13, LCD_DATA13_MARK),
1061 PINMUX_GPIO(GPIO_FN_LCD_DATA12, LCD_DATA12_MARK),
1062 PINMUX_GPIO(GPIO_FN_LCD_DATA11, LCD_DATA11_MARK),
1063 PINMUX_GPIO(GPIO_FN_LCD_DATA10, LCD_DATA10_MARK),
1064 PINMUX_GPIO(GPIO_FN_LCD_DATA9, LCD_DATA9_MARK),
1065 PINMUX_GPIO(GPIO_FN_LCD_DATA8, LCD_DATA8_MARK),
1066 PINMUX_GPIO(GPIO_FN_LCD_DATA7, LCD_DATA7_MARK),
1067 PINMUX_GPIO(GPIO_FN_LCD_DATA6, LCD_DATA6_MARK),
1068 PINMUX_GPIO(GPIO_FN_LCD_DATA5, LCD_DATA5_MARK),
1069 PINMUX_GPIO(GPIO_FN_LCD_DATA4, LCD_DATA4_MARK),
1070 PINMUX_GPIO(GPIO_FN_LCD_DATA3, LCD_DATA3_MARK),
1071 PINMUX_GPIO(GPIO_FN_LCD_DATA2, LCD_DATA2_MARK),
1072 PINMUX_GPIO(GPIO_FN_LCD_DATA1, LCD_DATA1_MARK),
1073 PINMUX_GPIO(GPIO_FN_LCD_DATA0, LCD_DATA0_MARK),
1074};
1075
1076static struct pinmux_cfg_reg pinmux_config_regs[] = {
1077 { PINMUX_CFG_REG("PBIORL", 0xfffe3886, 16, 1) {
1078 0, 0,
1079 0, 0,
1080 0, 0,
1081 0, 0,
1082 PB11_IN, PB11_OUT,
1083 PB10_IN, PB10_OUT,
1084 PB9_IN, PB9_OUT,
1085 PB8_IN, PB8_OUT,
1086 0, 0,
1087 0, 0,
1088 0, 0,
1089 0, 0,
1090 0, 0,
1091 0, 0,
1092 0, 0,
1093 0, 0 }
1094 },
1095 { PINMUX_CFG_REG("PBCRL4", 0xfffe3890, 16, 4) {
1096 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1097
1098 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1099
1100 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1101
1102 PB12MD_00, PB12MD_01, PB12MD_10, PB12MD_11,
1103 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
1104 },
1105 { PINMUX_CFG_REG("PBCRL3", 0xfffe3892, 16, 4) {
1106 PB11MD_0, PB11MD_1,
1107 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1108
1109 PB10MD_0, PB10MD_1,
1110 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1111
1112 PB9MD_00, PB9MD_01, PB9MD_10, 0,
1113 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1114
1115 PB8MD_00, PB8MD_01, PB8MD_10, 0,
1116 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
1117 },
1118 { PINMUX_CFG_REG("PBCRL2", 0xfffe3894, 16, 4) {
1119 PB7MD_00, PB7MD_01, PB7MD_10, PB7MD_11,
1120 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1121
1122 PB6MD_00, PB6MD_01, PB6MD_10, PB6MD_11,
1123 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1124
1125 PB5MD_00, PB5MD_01, PB5MD_10, PB5MD_11,
1126 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1127
1128 PB4MD_00, PB4MD_01, PB4MD_10, PB4MD_11,
1129 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
1130 },
1131 { PINMUX_CFG_REG("PBCRL1", 0xfffe3896, 16, 4) {
1132 PB3MD_00, PB3MD_01, PB3MD_10, PB3MD_11,
1133 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1134
1135 PB2MD_00, PB2MD_01, PB2MD_10, PB2MD_11,
1136 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1137
1138 PB1MD_00, PB1MD_01, PB1MD_10, PB1MD_11,
1139 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1140
1141 PB0MD_00, PB0MD_01, PB0MD_10, PB0MD_11,
1142 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
1143 },
1144 { PINMUX_CFG_REG("IFCR", 0xfffe38a2, 16, 4) {
1145 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1146
1147 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1148
1149 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1150
1151 PB12IRQ_00, PB12IRQ_01, PB12IRQ_10, 0,
1152 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
1153 },
1154 { PINMUX_CFG_REG("PCIORL", 0xfffe3906, 16, 1) {
1155 0, 0,
1156 PC14_IN, PC14_OUT,
1157 PC13_IN, PC13_OUT,
1158 PC12_IN, PC12_OUT,
1159 PC11_IN, PC11_OUT,
1160 PC10_IN, PC10_OUT,
1161 PC9_IN, PC9_OUT,
1162 PC8_IN, PC8_OUT,
1163 PC7_IN, PC7_OUT,
1164 PC6_IN, PC6_OUT,
1165 PC5_IN, PC5_OUT,
1166 PC4_IN, PC4_OUT,
1167 PC3_IN, PC3_OUT,
1168 PC2_IN, PC2_OUT,
1169 PC1_IN, PC1_OUT,
1170 PC0_IN, PC0_OUT }
1171 },
1172 { PINMUX_CFG_REG("PCCRL4", 0xfffe3910, 16, 4) {
1173 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1174
1175 PC14MD_0, PC14MD_1,
1176 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1177
1178 PC13MD_0, PC13MD_1,
1179 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1180
1181 PC12MD_0, PC12MD_1,
1182 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
1183 },
1184 { PINMUX_CFG_REG("PCCRL3", 0xfffe3912, 16, 4) {
1185 PC11MD_00, PC11MD_01, PC11MD_10, 0,
1186 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1187
1188 PC10MD_00, PC10MD_01, PC10MD_10, 0,
1189 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1190
1191 PC9MD_0, PC9MD_1,
1192 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1193
1194 PC8MD_0, PC8MD_1,
1195 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
1196 },
1197 { PINMUX_CFG_REG("PCCRL2", 0xfffe3914, 16, 4) {
1198 PC7MD_0, PC7MD_1,
1199 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1200
1201 PC6MD_0, PC6MD_1,
1202 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1203
1204 PC5MD_0, PC5MD_1,
1205 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1206
1207 PC4MD_0, PC4MD_1,
1208 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
1209 },
1210 { PINMUX_CFG_REG("PCCRL1", 0xfffe3916, 16, 4) {
1211 PC3MD_0, PC3MD_1,
1212 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1213
1214 PC2MD_0, PC2MD_1,
1215 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1216
1217 PC1MD_0, PC1MD_1,
1218 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1219
1220 PC0MD_00, PC0MD_01, PC0MD_10, 0,
1221 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
1222 },
1223 { PINMUX_CFG_REG("PDIORL", 0xfffe3986, 16, 1) {
1224 PD15_IN, PD15_OUT,
1225 PD14_IN, PD14_OUT,
1226 PD13_IN, PD13_OUT,
1227 PD12_IN, PD12_OUT,
1228 PD11_IN, PD11_OUT,
1229 PD10_IN, PD10_OUT,
1230 PD9_IN, PD9_OUT,
1231 PD8_IN, PD8_OUT,
1232 PD7_IN, PD7_OUT,
1233 PD6_IN, PD6_OUT,
1234 PD5_IN, PD5_OUT,
1235 PD4_IN, PD4_OUT,
1236 PD3_IN, PD3_OUT,
1237 PD2_IN, PD2_OUT,
1238 PD1_IN, PD1_OUT,
1239 PD0_IN, PD0_OUT }
1240 },
1241 { PINMUX_CFG_REG("PDCRL4", 0xfffe3990, 16, 4) {
1242 PD15MD_000, PD15MD_001, PD15MD_010, 0,
1243 PD15MD_100, PD15MD_101, 0, 0,
1244 0, 0, 0, 0, 0, 0, 0, 0,
1245
1246 PD14MD_000, PD14MD_001, PD14MD_010, 0,
1247 0, PD14MD_101, 0, 0,
1248 0, 0, 0, 0, 0, 0, 0, 0,
1249
1250 PD13MD_000, PD13MD_001, PD13MD_010, 0,
1251 PD13MD_100, PD13MD_101, 0, 0,
1252 0, 0, 0, 0, 0, 0, 0, 0,
1253
1254 PD12MD_000, PD12MD_001, PD12MD_010, 0,
1255 PD12MD_100, PD12MD_101, 0, 0,
1256 0, 0, 0, 0, 0, 0, 0, 0 }
1257 },
1258 { PINMUX_CFG_REG("PDCRL3", 0xfffe3992, 16, 4) {
1259 PD11MD_000, PD11MD_001, PD11MD_010, 0,
1260 PD11MD_100, PD11MD_101, 0, 0,
1261 0, 0, 0, 0, 0, 0, 0, 0,
1262
1263 PD10MD_000, PD10MD_001, PD10MD_010, 0,
1264 PD10MD_100, PD10MD_101, 0, 0,
1265 0, 0, 0, 0, 0, 0, 0, 0,
1266
1267 PD9MD_000, PD9MD_001, PD9MD_010, 0,
1268 PD9MD_100, PD9MD_101, 0, 0,
1269 0, 0, 0, 0, 0, 0, 0, 0,
1270
1271 PD8MD_000, PD8MD_001, PD8MD_010, 0,
1272 PD8MD_100, PD8MD_101, 0, 0,
1273 0, 0, 0, 0, 0, 0, 0, 0 }
1274 },
1275 { PINMUX_CFG_REG("PDCRL2", 0xfffe3994, 16, 4) {
1276 PD7MD_000, PD7MD_001, PD7MD_010, PD7MD_011,
1277 PD7MD_100, PD7MD_101, 0, 0,
1278 0, 0, 0, 0, 0, 0, 0, 0,
1279
1280 PD6MD_000, PD6MD_001, PD6MD_010, PD6MD_011,
1281 PD6MD_100, PD6MD_101, 0, 0,
1282 0, 0, 0, 0, 0, 0, 0, 0,
1283
1284 PD5MD_000, PD5MD_001, PD5MD_010, PD5MD_011,
1285 PD5MD_100, PD5MD_101, 0, 0,
1286 0, 0, 0, 0, 0, 0, 0, 0,
1287
1288 PD4MD_000, PD4MD_001, PD4MD_010, PD4MD_011,
1289 PD4MD_100, PD4MD_101, 0, 0,
1290 0, 0, 0, 0, 0, 0, 0, 0 }
1291 },
1292 { PINMUX_CFG_REG("PDCRL1", 0xfffe3996, 16, 4) {
1293 PD3MD_000, PD3MD_001, PD3MD_010, PD3MD_011,
1294 PD3MD_100, PD3MD_101, 0, 0,
1295 0, 0, 0, 0, 0, 0, 0, 0,
1296
1297 PD2MD_000, PD2MD_001, PD2MD_010, PD2MD_011,
1298 PD2MD_100, PD2MD_101, 0, 0,
1299 0, 0, 0, 0, 0, 0, 0, 0,
1300
1301 PD1MD_000, PD1MD_001, PD1MD_010, PD1MD_011,
1302 PD1MD_100, PD1MD_101, 0, 0,
1303 0, 0, 0, 0, 0, 0, 0, 0,
1304
1305 PD0MD_000, PD0MD_001, PD0MD_010, PD0MD_011,
1306 PD0MD_100, PD0MD_101, 0, 0,
1307 0, 0, 0, 0, 0, 0, 0, 0 }
1308 },
1309 { PINMUX_CFG_REG("PEIORL", 0xfffe3a06, 16, 1) {
1310 PE15_IN, PE15_OUT,
1311 PE14_IN, PE14_OUT,
1312 PE13_IN, PE13_OUT,
1313 PE12_IN, PE12_OUT,
1314 PE11_IN, PE11_OUT,
1315 PE10_IN, PE10_OUT,
1316 PE9_IN, PE9_OUT,
1317 PE8_IN, PE8_OUT,
1318 PE7_IN, PE7_OUT,
1319 PE6_IN, PE6_OUT,
1320 PE5_IN, PE5_OUT,
1321 PE4_IN, PE4_OUT,
1322 PE3_IN, PE3_OUT,
1323 PE2_IN, PE2_OUT,
1324 PE1_IN, PE1_OUT,
1325 PE0_IN, PE0_OUT }
1326 },
1327 { PINMUX_CFG_REG("PECRL4", 0xfffe3a10, 16, 4) {
1328 PE15MD_00, PE15MD_01, 0, PE15MD_11,
1329 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1330
1331 PE14MD_00, PE14MD_01, 0, PE14MD_11,
1332 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1333
1334 PE13MD_00, 0, 0, PE13MD_11,
1335 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1336
1337 PE12MD_00, 0, 0, PE12MD_11,
1338 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
1339 },
1340 { PINMUX_CFG_REG("PECRL3", 0xfffe3a12, 16, 4) {
1341 PE11MD_000, PE11MD_001, PE11MD_010, 0,
1342 PE11MD_100, 0, 0, 0,
1343 0, 0, 0, 0, 0, 0, 0, 0,
1344
1345 PE10MD_000, PE10MD_001, PE10MD_010, 0,
1346 PE10MD_100, 0, 0, 0,
1347 0, 0, 0, 0, 0, 0, 0, 0,
1348
1349 PE9MD_00, PE9MD_01, PE9MD_10, PE9MD_11,
1350 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1351
1352 PE8MD_00, PE8MD_01, PE8MD_10, PE8MD_11,
1353 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
1354 },
1355 { PINMUX_CFG_REG("PECRL2", 0xfffe3a14, 16, 4) {
1356 PE7MD_000, PE7MD_001, PE7MD_010, PE7MD_011,
1357 PE7MD_100, 0, 0, 0,
1358 0, 0, 0, 0, 0, 0, 0, 0,
1359
1360 PE6MD_000, PE6MD_001, PE6MD_010, PE6MD_011,
1361 PE6MD_100, 0, 0, 0,
1362 0, 0, 0, 0, 0, 0, 0, 0,
1363
1364 PE5MD_000, PE5MD_001, PE5MD_010, PE5MD_011,
1365 PE5MD_100, 0, 0, 0,
1366 0, 0, 0, 0, 0, 0, 0, 0,
1367
1368 PE4MD_000, PE4MD_001, PE4MD_010, PE4MD_011,
1369 PE4MD_100, 0, 0, 0,
1370 0, 0, 0, 0, 0, 0, 0, 0 }
1371 },
1372 { PINMUX_CFG_REG("PECRL1", 0xfffe3a16, 16, 4) {
1373 PE3MD_00, PE3MD_01, 0, PE3MD_11,
1374 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1375
1376 PE2MD_00, PE2MD_01, 0, PE2MD_11,
1377 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1378
1379 PE1MD_00, PE1MD_01, PE1MD_10, PE1MD_11,
1380 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1381
1382 PE0MD_000, PE0MD_001, 0, PE0MD_011,
1383 PE0MD_100, 0, 0, 0,
1384 0, 0, 0, 0, 0, 0, 0, 0 }
1385 },
1386 { PINMUX_CFG_REG("PFIORH", 0xfffe3a84, 16, 1) {
1387 0, 0,
1388 PF30_IN, PF30_OUT,
1389 PF29_IN, PF29_OUT,
1390 PF28_IN, PF28_OUT,
1391 PF27_IN, PF27_OUT,
1392 PF26_IN, PF26_OUT,
1393 PF25_IN, PF25_OUT,
1394 PF24_IN, PF24_OUT,
1395 PF23_IN, PF23_OUT,
1396 PF22_IN, PF22_OUT,
1397 PF21_IN, PF21_OUT,
1398 PF20_IN, PF20_OUT,
1399 PF19_IN, PF19_OUT,
1400 PF18_IN, PF18_OUT,
1401 PF17_IN, PF17_OUT,
1402 PF16_IN, PF16_OUT }
1403 },
1404 { PINMUX_CFG_REG("PFIORL", 0xfffe3a86, 16, 1) {
1405 PF15_IN, PF15_OUT,
1406 PF14_IN, PF14_OUT,
1407 PF13_IN, PF13_OUT,
1408 PF12_IN, PF12_OUT,
1409 PF11_IN, PF11_OUT,
1410 PF10_IN, PF10_OUT,
1411 PF9_IN, PF9_OUT,
1412 PF8_IN, PF8_OUT,
1413 PF7_IN, PF7_OUT,
1414 PF6_IN, PF6_OUT,
1415 PF5_IN, PF5_OUT,
1416 PF4_IN, PF4_OUT,
1417 PF3_IN, PF3_OUT,
1418 PF2_IN, PF2_OUT,
1419 PF1_IN, PF1_OUT,
1420 PF0_IN, PF0_OUT }
1421 },
1422 { PINMUX_CFG_REG("PFCRH4", 0xfffe3a88, 16, 4) {
1423 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1424
1425 PF30MD_0, PF30MD_1,
1426 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1427
1428 PF29MD_0, PF29MD_1,
1429 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1430
1431 PF28MD_0, PF28MD_1,
1432 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
1433 },
1434 { PINMUX_CFG_REG("PFCRH3", 0xfffe3a8a, 16, 4) {
1435 PF27MD_0, PF27MD_1,
1436 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1437
1438 PF26MD_0, PF26MD_1,
1439 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1440
1441 PF25MD_0, PF25MD_1,
1442 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1443
1444 PF24MD_0, PF24MD_1,
1445 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
1446 },
1447 { PINMUX_CFG_REG("PFCRH2", 0xfffe3a8c, 16, 4) {
1448 PF23MD_00, PF23MD_01, PF23MD_10, 0,
1449 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1450
1451 PF22MD_00, PF22MD_01, PF22MD_10, 0,
1452 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1453
1454 PF21MD_00, PF21MD_01, PF21MD_10, 0,
1455 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1456
1457 PF20MD_00, PF20MD_01, PF20MD_10, 0,
1458 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
1459 },
1460 { PINMUX_CFG_REG("PFCRH1", 0xfffe3a8e, 16, 4) {
1461 PF19MD_00, PF19MD_01, PF19MD_10, 0,
1462 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1463
1464 PF18MD_00, PF18MD_01, PF18MD_10, 0,
1465 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1466
1467 PF17MD_00, PF17MD_01, PF17MD_10, 0,
1468 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1469
1470 PF16MD_00, PF16MD_01, PF16MD_10, 0,
1471 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
1472 },
1473 { PINMUX_CFG_REG("PFCRL4", 0xfffe3a90, 16, 4) {
1474 PF15MD_00, PF15MD_01, PF15MD_10, 0,
1475 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1476
1477 PF14MD_00, PF14MD_01, PF14MD_10, 0,
1478 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1479
1480 PF13MD_00, PF13MD_01, PF13MD_10, 0,
1481 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1482
1483 PF12MD_00, PF12MD_01, PF12MD_10, 0,
1484 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
1485 },
1486 { PINMUX_CFG_REG("PFCRL3", 0xfffe3a92, 16, 4) {
1487 PF11MD_00, PF11MD_01, PF11MD_10, 0,
1488 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1489
1490 PF10MD_00, PF10MD_01, PF10MD_10, 0,
1491 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1492
1493 PF9MD_00, PF9MD_01, PF9MD_10, 0,
1494 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1495
1496 PF8MD_00, PF8MD_01, PF8MD_10, 0,
1497 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
1498 },
1499 { PINMUX_CFG_REG("PFCRL2", 0xfffe3a94, 16, 4) {
1500 PF7MD_00, PF7MD_01, PF7MD_10, PF7MD_11,
1501 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1502
1503 PF6MD_00, PF6MD_01, PF6MD_10, PF6MD_11,
1504 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1505
1506 PF5MD_00, PF5MD_01, PF5MD_10, PF5MD_11,
1507 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1508
1509 PF4MD_00, PF4MD_01, PF4MD_10, PF4MD_11,
1510 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
1511 },
1512 { PINMUX_CFG_REG("PFCRL1", 0xfffe3a96, 16, 4) {
1513 PF3MD_00, PF3MD_01, PF3MD_10, PF3MD_11,
1514 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1515
1516 PF2MD_00, PF2MD_01, PF2MD_10, PF2MD_11,
1517 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1518
1519 PF1MD_00, PF1MD_01, PF1MD_10, PF1MD_11,
1520 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1521
1522 PF0MD_00, PF0MD_01, PF0MD_10, PF0MD_11,
1523 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
1524 },
1525 {}
1526};
1527
1528static struct pinmux_data_reg pinmux_data_regs[] = {
1529 { PINMUX_DATA_REG("PADRL", 0xfffe3802, 16) {
1530 0, 0, 0, 0,
1531 0, 0, 0, 0,
1532 PA7_DATA, PA6_DATA, PA5_DATA, PA4_DATA,
1533 PA3_DATA, PA2_DATA, PA1_DATA, PA0_DATA }
1534 },
1535 { PINMUX_DATA_REG("PBDRL", 0xfffe3882, 16) {
1536 0, 0, 0, PB12_DATA,
1537 PB11_DATA, PB10_DATA, PB9_DATA, PB8_DATA,
1538 PB7_DATA, PB6_DATA, PB5_DATA, PB4_DATA,
1539 PB3_DATA, PB2_DATA, PB1_DATA, PB0_DATA }
1540 },
1541 { PINMUX_DATA_REG("PCDRL", 0xfffe3902, 16) {
1542 0, PC14_DATA, PC13_DATA, PC12_DATA,
1543 PC11_DATA, PC10_DATA, PC9_DATA, PC8_DATA,
1544 PC7_DATA, PC6_DATA, PC5_DATA, PC4_DATA,
1545 PC3_DATA, PC2_DATA, PC1_DATA, PC0_DATA }
1546 },
1547 { PINMUX_DATA_REG("PDDRL", 0xfffe3982, 16) {
1548 PD15_DATA, PD14_DATA, PD13_DATA, PD12_DATA,
1549 PD11_DATA, PD10_DATA, PD9_DATA, PD8_DATA,
1550 PD7_DATA, PD6_DATA, PD5_DATA, PD4_DATA,
1551 PD3_DATA, PD2_DATA, PD1_DATA, PD0_DATA }
1552 },
1553 { PINMUX_DATA_REG("PEDRL", 0xfffe3a02, 16) {
1554 PE15_DATA, PE14_DATA, PE13_DATA, PE12_DATA,
1555 PE11_DATA, PE10_DATA, PE9_DATA, PE8_DATA,
1556 PE7_DATA, PE6_DATA, PE5_DATA, PE4_DATA,
1557 PE3_DATA, PE2_DATA, PE1_DATA, PE0_DATA }
1558 },
1559 { PINMUX_DATA_REG("PFDRH", 0xfffe3a80, 16) {
1560 0, PF30_DATA, PF29_DATA, PF28_DATA,
1561 PF27_DATA, PF26_DATA, PF25_DATA, PF24_DATA,
1562 PF23_DATA, PF22_DATA, PF21_DATA, PF20_DATA,
1563 PF19_DATA, PF18_DATA, PF17_DATA, PF16_DATA }
1564 },
1565 { PINMUX_DATA_REG("PFDRL", 0xfffe3a82, 16) {
1566 PF15_DATA, PF14_DATA, PF13_DATA, PF12_DATA,
1567 PF11_DATA, PF10_DATA, PF9_DATA, PF8_DATA,
1568 PF7_DATA, PF6_DATA, PF5_DATA, PF4_DATA,
1569 PF3_DATA, PF2_DATA, PF1_DATA, PF0_DATA }
1570 },
1571 { },
1572};
1573
1574static struct pinmux_info sh7203_pinmux_info = {
1575 .name = "sh7203_pfc",
1576 .reserved_id = PINMUX_RESERVED,
1577 .data = { PINMUX_DATA_BEGIN, PINMUX_DATA_END },
1578 .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END },
1579 .output = { PINMUX_OUTPUT_BEGIN, PINMUX_OUTPUT_END },
1580 .mark = { PINMUX_MARK_BEGIN, PINMUX_MARK_END },
1581 .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
1582
1583 .first_gpio = GPIO_PA7,
1584 .last_gpio = GPIO_FN_LCD_DATA0,
1585
1586 .gpios = pinmux_gpios,
1587 .cfg_regs = pinmux_config_regs,
1588 .data_regs = pinmux_data_regs,
1589
1590 .gpio_data = pinmux_data,
1591 .gpio_data_size = ARRAY_SIZE(pinmux_data),
1592};
1593
1594static int __init plat_pinmux_setup(void)
1595{
1596 return register_pinmux(&sh7203_pinmux_info);
1597}
1598
1599arch_initcall(plat_pinmux_setup);
diff --git a/arch/sh/kernel/cpu/sh3/Makefile b/arch/sh/kernel/cpu/sh3/Makefile
index 511de55af83..e07c69e16d9 100644
--- a/arch/sh/kernel/cpu/sh3/Makefile
+++ b/arch/sh/kernel/cpu/sh3/Makefile
@@ -24,4 +24,8 @@ clock-$(CONFIG_CPU_SUBTYPE_SH7710) := clock-sh7710.o
24clock-$(CONFIG_CPU_SUBTYPE_SH7720) := clock-sh7710.o 24clock-$(CONFIG_CPU_SUBTYPE_SH7720) := clock-sh7710.o
25clock-$(CONFIG_CPU_SUBTYPE_SH7712) := clock-sh7712.o 25clock-$(CONFIG_CPU_SUBTYPE_SH7712) := clock-sh7712.o
26 26
27# Pinmux setup
28pinmux-$(CONFIG_CPU_SUBTYPE_SH7720) := pinmux-sh7720.o
29
27obj-y += $(clock-y) 30obj-y += $(clock-y)
31obj-$(CONFIG_GENERIC_GPIO) += $(pinmux-y)
diff --git a/arch/sh/kernel/cpu/sh3/pinmux-sh7720.c b/arch/sh/kernel/cpu/sh3/pinmux-sh7720.c
new file mode 100644
index 00000000000..9ca15462714
--- /dev/null
+++ b/arch/sh/kernel/cpu/sh3/pinmux-sh7720.c
@@ -0,0 +1,1242 @@
1/*
2 * SH7720 Pinmux
3 *
4 * Copyright (C) 2008 Magnus Damm
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 */
10
11#include <linux/init.h>
12#include <linux/kernel.h>
13#include <linux/gpio.h>
14#include <cpu/sh7720.h>
15
16enum {
17 PINMUX_RESERVED = 0,
18
19 PINMUX_DATA_BEGIN,
20 PTA7_DATA, PTA6_DATA, PTA5_DATA, PTA4_DATA,
21 PTA3_DATA, PTA2_DATA, PTA1_DATA, PTA0_DATA,
22 PTB7_DATA, PTB6_DATA, PTB5_DATA, PTB4_DATA,
23 PTB3_DATA, PTB2_DATA, PTB1_DATA, PTB0_DATA,
24 PTC7_DATA, PTC6_DATA, PTC5_DATA, PTC4_DATA,
25 PTC3_DATA, PTC2_DATA, PTC1_DATA, PTC0_DATA,
26 PTD7_DATA, PTD6_DATA, PTD5_DATA, PTD4_DATA,
27 PTD3_DATA, PTD2_DATA, PTD1_DATA, PTD0_DATA,
28 PTE6_DATA, PTE5_DATA, PTE4_DATA,
29 PTE3_DATA, PTE2_DATA, PTE1_DATA, PTE0_DATA,
30 PTF6_DATA, PTF5_DATA, PTF4_DATA,
31 PTF3_DATA, PTF2_DATA, PTF1_DATA, PTF0_DATA,
32 PTG6_DATA, PTG5_DATA, PTG4_DATA,
33 PTG3_DATA, PTG2_DATA, PTG1_DATA, PTG0_DATA,
34 PTH6_DATA, PTH5_DATA, PTH4_DATA,
35 PTH3_DATA, PTH2_DATA, PTH1_DATA, PTH0_DATA,
36 PTJ6_DATA, PTJ5_DATA, PTJ4_DATA,
37 PTJ3_DATA, PTJ2_DATA, PTJ1_DATA, PTJ0_DATA,
38 PTK3_DATA, PTK2_DATA, PTK1_DATA, PTK0_DATA,
39 PTL7_DATA, PTL6_DATA, PTL5_DATA, PTL4_DATA, PTL3_DATA,
40 PTM7_DATA, PTM6_DATA, PTM5_DATA, PTM4_DATA,
41 PTM3_DATA, PTM2_DATA, PTM1_DATA, PTM0_DATA,
42 PTP4_DATA, PTP3_DATA, PTP2_DATA, PTP1_DATA, PTP0_DATA,
43 PTR7_DATA, PTR6_DATA, PTR5_DATA, PTR4_DATA,
44 PTR3_DATA, PTR2_DATA, PTR1_DATA, PTR0_DATA,
45 PTS4_DATA, PTS3_DATA, PTS2_DATA, PTS1_DATA, PTS0_DATA,
46 PTT4_DATA, PTT3_DATA, PTT2_DATA, PTT1_DATA, PTT0_DATA,
47 PTU4_DATA, PTU3_DATA, PTU2_DATA, PTU1_DATA, PTU0_DATA,
48 PTV4_DATA, PTV3_DATA, PTV2_DATA, PTV1_DATA, PTV0_DATA,
49 PINMUX_DATA_END,
50
51 PINMUX_INPUT_BEGIN,
52 PTA7_IN, PTA6_IN, PTA5_IN, PTA4_IN,
53 PTA3_IN, PTA2_IN, PTA1_IN, PTA0_IN,
54 PTB7_IN, PTB6_IN, PTB5_IN, PTB4_IN,
55 PTB3_IN, PTB2_IN, PTB1_IN, PTB0_IN,
56 PTC7_IN, PTC6_IN, PTC5_IN, PTC4_IN,
57 PTC3_IN, PTC2_IN, PTC1_IN, PTC0_IN,
58 PTD7_IN, PTD6_IN, PTD5_IN, PTD4_IN,
59 PTD3_IN, PTD2_IN, PTD1_IN, PTD0_IN,
60 PTE6_IN, PTE5_IN, PTE4_IN,
61 PTE3_IN, PTE2_IN, PTE1_IN, PTE0_IN,
62 PTF6_IN, PTF5_IN, PTF4_IN,
63 PTF3_IN, PTF2_IN, PTF1_IN, PTF0_IN,
64 PTG6_IN, PTG5_IN, PTG4_IN,
65 PTG3_IN, PTG2_IN, PTG1_IN, PTG0_IN,
66 PTH6_IN, PTH5_IN, PTH4_IN,
67 PTH3_IN, PTH2_IN, PTH1_IN, PTH0_IN,
68 PTJ6_IN, PTJ5_IN, PTJ4_IN,
69 PTJ3_IN, PTJ2_IN, PTJ1_IN, PTJ0_IN,
70 PTK3_IN, PTK2_IN, PTK1_IN, PTK0_IN,
71 PTL7_IN, PTL6_IN, PTL5_IN, PTL4_IN, PTL3_IN,
72 PTM7_IN, PTM6_IN, PTM5_IN, PTM4_IN,
73 PTM3_IN, PTM2_IN, PTM1_IN, PTM0_IN,
74 PTP4_IN, PTP3_IN, PTP2_IN, PTP1_IN, PTP0_IN,
75 PTR7_IN, PTR6_IN, PTR5_IN, PTR4_IN,
76 PTR3_IN, PTR2_IN, PTR1_IN, PTR0_IN,
77 PTS4_IN, PTS3_IN, PTS2_IN, PTS1_IN, PTS0_IN,
78 PTT4_IN, PTT3_IN, PTT2_IN, PTT1_IN, PTT0_IN,
79 PTU4_IN, PTU3_IN, PTU2_IN, PTU1_IN, PTU0_IN,
80 PTV4_IN, PTV3_IN, PTV2_IN, PTV1_IN, PTV0_IN,
81 PINMUX_INPUT_END,
82
83 PINMUX_INPUT_PULLUP_BEGIN,
84 PTA7_IN_PU, PTA6_IN_PU, PTA5_IN_PU, PTA4_IN_PU,
85 PTA3_IN_PU, PTA2_IN_PU, PTA1_IN_PU, PTA0_IN_PU,
86 PTB7_IN_PU, PTB6_IN_PU, PTB5_IN_PU, PTB4_IN_PU,
87 PTB3_IN_PU, PTB2_IN_PU, PTB1_IN_PU, PTB0_IN_PU,
88 PTC7_IN_PU, PTC6_IN_PU, PTC5_IN_PU, PTC4_IN_PU,
89 PTC3_IN_PU, PTC2_IN_PU, PTC1_IN_PU, PTC0_IN_PU,
90 PTD7_IN_PU, PTD6_IN_PU, PTD5_IN_PU, PTD4_IN_PU,
91 PTD3_IN_PU, PTD2_IN_PU, PTD1_IN_PU, PTD0_IN_PU,
92 PTE4_IN_PU, PTE3_IN_PU, PTE2_IN_PU, PTE1_IN_PU, PTE0_IN_PU,
93 PTF0_IN_PU,
94 PTG6_IN_PU, PTG5_IN_PU, PTG4_IN_PU,
95 PTG3_IN_PU, PTG2_IN_PU, PTG1_IN_PU, PTG0_IN_PU,
96 PTH6_IN_PU, PTH5_IN_PU, PTH4_IN_PU,
97 PTH3_IN_PU, PTH2_IN_PU, PTH1_IN_PU, PTH0_IN_PU,
98 PTJ6_IN_PU, PTJ5_IN_PU, PTJ4_IN_PU,
99 PTJ3_IN_PU, PTJ2_IN_PU, PTJ1_IN_PU, PTJ0_IN_PU,
100 PTK3_IN_PU, PTK2_IN_PU, PTK1_IN_PU, PTK0_IN_PU,
101 PTL7_IN_PU, PTL6_IN_PU, PTL5_IN_PU, PTL4_IN_PU, PTL3_IN_PU,
102 PTM7_IN_PU, PTM6_IN_PU, PTM5_IN_PU, PTM4_IN_PU,
103 PTM3_IN_PU, PTM2_IN_PU, PTM1_IN_PU, PTM0_IN_PU,
104 PTP4_IN_PU, PTP3_IN_PU, PTP2_IN_PU, PTP1_IN_PU, PTP0_IN_PU,
105 PTR7_IN_PU, PTR6_IN_PU, PTR5_IN_PU, PTR4_IN_PU,
106 PTR3_IN_PU, PTR2_IN_PU, PTR1_IN_PU, PTR0_IN_PU,
107 PTS4_IN_PU, PTS3_IN_PU, PTS2_IN_PU, PTS1_IN_PU, PTS0_IN_PU,
108 PTT4_IN_PU, PTT3_IN_PU, PTT2_IN_PU, PTT1_IN_PU, PTT0_IN_PU,
109 PTU4_IN_PU, PTU3_IN_PU, PTU2_IN_PU, PTU1_IN_PU, PTU0_IN_PU,
110 PTV4_IN_PU, PTV3_IN_PU, PTV2_IN_PU, PTV1_IN_PU, PTV0_IN_PU,
111 PINMUX_INPUT_PULLUP_END,
112
113 PINMUX_OUTPUT_BEGIN,
114 PTA7_OUT, PTA6_OUT, PTA5_OUT, PTA4_OUT,
115 PTA3_OUT, PTA2_OUT, PTA1_OUT, PTA0_OUT,
116 PTB7_OUT, PTB6_OUT, PTB5_OUT, PTB4_OUT,
117 PTB3_OUT, PTB2_OUT, PTB1_OUT, PTB0_OUT,
118 PTC7_OUT, PTC6_OUT, PTC5_OUT, PTC4_OUT,
119 PTC3_OUT, PTC2_OUT, PTC1_OUT, PTC0_OUT,
120 PTD7_OUT, PTD6_OUT, PTD5_OUT, PTD4_OUT,
121 PTD3_OUT, PTD2_OUT, PTD1_OUT, PTD0_OUT,
122 PTE4_OUT, PTE3_OUT, PTE2_OUT, PTE1_OUT, PTE0_OUT,
123 PTF0_OUT,
124 PTG6_OUT, PTG5_OUT, PTG4_OUT,
125 PTG3_OUT, PTG2_OUT, PTG1_OUT, PTG0_OUT,
126 PTH6_OUT, PTH5_OUT, PTH4_OUT,
127 PTH3_OUT, PTH2_OUT, PTH1_OUT, PTH0_OUT,
128 PTJ6_OUT, PTJ5_OUT, PTJ4_OUT,
129 PTJ3_OUT, PTJ2_OUT, PTJ1_OUT, PTJ0_OUT,
130 PTK3_OUT, PTK2_OUT, PTK1_OUT, PTK0_OUT,
131 PTL7_OUT, PTL6_OUT, PTL5_OUT, PTL4_OUT, PTL3_OUT,
132 PTM7_OUT, PTM6_OUT, PTM5_OUT, PTM4_OUT,
133 PTM3_OUT, PTM2_OUT, PTM1_OUT, PTM0_OUT,
134 PTP4_OUT, PTP3_OUT, PTP2_OUT, PTP1_OUT, PTP0_OUT,
135 PTR7_OUT, PTR6_OUT, PTR5_OUT, PTR4_OUT,
136 PTR3_OUT, PTR2_OUT, PTR1_OUT, PTR0_OUT,
137 PTS4_OUT, PTS3_OUT, PTS2_OUT, PTS1_OUT, PTS0_OUT,
138 PTT4_OUT, PTT3_OUT, PTT2_OUT, PTT1_OUT, PTT0_OUT,
139 PTU4_OUT, PTU3_OUT, PTU2_OUT, PTU1_OUT, PTU0_OUT,
140 PTV4_OUT, PTV3_OUT, PTV2_OUT, PTV1_OUT, PTV0_OUT,
141 PINMUX_OUTPUT_END,
142
143 PINMUX_FUNCTION_BEGIN,
144 PTA7_FN, PTA6_FN, PTA5_FN, PTA4_FN,
145 PTA3_FN, PTA2_FN, PTA1_FN, PTA0_FN,
146 PTB7_FN, PTB6_FN, PTB5_FN, PTB4_FN,
147 PTB3_FN, PTB2_FN, PTB1_FN, PTB0_FN,
148 PTC7_FN, PTC6_FN, PTC5_FN, PTC4_FN,
149 PTC3_FN, PTC2_FN, PTC1_FN, PTC0_FN,
150 PTD7_FN, PTD6_FN, PTD5_FN, PTD4_FN,
151 PTD3_FN, PTD2_FN, PTD1_FN, PTD0_FN,
152 PTE6_FN, PTE5_FN, PTE4_FN,
153 PTE3_FN, PTE2_FN, PTE1_FN, PTE0_FN,
154 PTF6_FN, PTF5_FN, PTF4_FN,
155 PTF3_FN, PTF2_FN, PTF1_FN, PTF0_FN,
156 PTG6_FN, PTG5_FN, PTG4_FN,
157 PTG3_FN, PTG2_FN, PTG1_FN, PTG0_FN,
158 PTH6_FN, PTH5_FN, PTH4_FN,
159 PTH3_FN, PTH2_FN, PTH1_FN, PTH0_FN,
160 PTJ6_FN, PTJ5_FN, PTJ4_FN,
161 PTJ3_FN, PTJ2_FN, PTJ1_FN, PTJ0_FN,
162 PTK3_FN, PTK2_FN, PTK1_FN, PTK0_FN,
163 PTL7_FN, PTL6_FN, PTL5_FN, PTL4_FN, PTL3_FN,
164 PTM7_FN, PTM6_FN, PTM5_FN, PTM4_FN,
165 PTM3_FN, PTM2_FN, PTM1_FN, PTM0_FN,
166 PTP4_FN, PTP3_FN, PTP2_FN, PTP1_FN, PTP0_FN,
167 PTR7_FN, PTR6_FN, PTR5_FN, PTR4_FN,
168 PTR3_FN, PTR2_FN, PTR1_FN, PTR0_FN,
169 PTS4_FN, PTS3_FN, PTS2_FN, PTS1_FN, PTS0_FN,
170 PTT4_FN, PTT3_FN, PTT2_FN, PTT1_FN, PTT0_FN,
171 PTU4_FN, PTU3_FN, PTU2_FN, PTU1_FN, PTU0_FN,
172 PTV4_FN, PTV3_FN, PTV2_FN, PTV1_FN, PTV0_FN,
173
174 PSELA_1_0_00, PSELA_1_0_01, PSELA_1_0_10,
175 PSELA_3_2_00, PSELA_3_2_01, PSELA_3_2_10, PSELA_3_2_11,
176 PSELA_5_4_00, PSELA_5_4_01, PSELA_5_4_10, PSELA_5_4_11,
177 PSELA_7_6_00, PSELA_7_6_01, PSELA_7_6_10,
178 PSELA_9_8_00, PSELA_9_8_01, PSELA_9_8_10,
179 PSELA_11_10_00, PSELA_11_10_01, PSELA_11_10_10,
180 PSELA_13_12_00, PSELA_13_12_10,
181 PSELA_15_14_00, PSELA_15_14_10,
182 PSELB_9_8_00, PSELB_9_8_11,
183 PSELB_11_10_00, PSELB_11_10_01, PSELB_11_10_10, PSELB_11_10_11,
184 PSELB_13_12_00, PSELB_13_12_01, PSELB_13_12_10, PSELB_13_12_11,
185 PSELB_15_14_00, PSELB_15_14_11,
186 PSELC_9_8_00, PSELC_9_8_10,
187 PSELC_11_10_00, PSELC_11_10_10,
188 PSELC_13_12_00, PSELC_13_12_01, PSELC_13_12_10,
189 PSELC_15_14_00, PSELC_15_14_01, PSELC_15_14_10,
190 PSELD_1_0_00, PSELD_1_0_10,
191 PSELD_11_10_00, PSELD_11_10_01,
192 PSELD_15_14_00, PSELD_15_14_01, PSELD_15_14_10,
193 PINMUX_FUNCTION_END,
194
195 PINMUX_MARK_BEGIN,
196 D31_MARK, D30_MARK, D29_MARK, D28_MARK,
197 D27_MARK, D26_MARK, D25_MARK, D24_MARK,
198 D23_MARK, D22_MARK, D21_MARK, D20_MARK,
199 D19_MARK, D18_MARK, D17_MARK, D16_MARK,
200 IOIS16_MARK, RAS_MARK, CAS_MARK, CKE_MARK,
201 CS5B_CE1A_MARK, CS6B_CE1B_MARK,
202 A25_MARK, A24_MARK, A23_MARK, A22_MARK,
203 A21_MARK, A20_MARK, A19_MARK, A0_MARK,
204 REFOUT_MARK, IRQOUT_MARK,
205 LCD_DATA15_MARK, LCD_DATA14_MARK,
206 LCD_DATA13_MARK, LCD_DATA12_MARK,
207 LCD_DATA11_MARK, LCD_DATA10_MARK,
208 LCD_DATA9_MARK, LCD_DATA8_MARK,
209 LCD_DATA7_MARK, LCD_DATA6_MARK,
210 LCD_DATA5_MARK, LCD_DATA4_MARK,
211 LCD_DATA3_MARK, LCD_DATA2_MARK,
212 LCD_DATA1_MARK, LCD_DATA0_MARK,
213 LCD_M_DISP_MARK,
214 LCD_CL1_MARK, LCD_CL2_MARK,
215 LCD_DON_MARK, LCD_FLM_MARK,
216 LCD_VEPWC_MARK, LCD_VCPWC_MARK,
217 AFE_RXIN_MARK, AFE_RDET_MARK,
218 AFE_FS_MARK, AFE_TXOUT_MARK,
219 AFE_SCLK_MARK, AFE_RLYCNT_MARK,
220 AFE_HC1_MARK,
221 IIC_SCL_MARK, IIC_SDA_MARK,
222 DA1_MARK, DA0_MARK,
223 AN3_MARK, AN2_MARK, AN1_MARK, AN0_MARK, ADTRG_MARK,
224 USB1D_RCV_MARK, USB1D_TXSE0_MARK,
225 USB1D_TXDPLS_MARK, USB1D_DMNS_MARK,
226 USB1D_DPLS_MARK, USB1D_SPEED_MARK,
227 USB1D_TXENL_MARK,
228 USB2_PWR_EN_MARK, USB1_PWR_EN_USBF_UPLUP_MARK, USB1D_SUSPEND_MARK,
229 IRQ5_MARK, IRQ4_MARK,
230 IRQ3_IRL3_MARK, IRQ2_IRL2_MARK,
231 IRQ1_IRL1_MARK, IRQ0_IRL0_MARK,
232 PCC_REG_MARK, PCC_DRV_MARK,
233 PCC_BVD2_MARK, PCC_BVD1_MARK,
234 PCC_CD2_MARK, PCC_CD1_MARK,
235 PCC_RESET_MARK, PCC_RDY_MARK,
236 PCC_VS2_MARK, PCC_VS1_MARK,
237 AUDATA3_MARK, AUDATA2_MARK, AUDATA1_MARK, AUDATA0_MARK,
238 AUDCK_MARK, AUDSYNC_MARK, ASEBRKAK_MARK, TRST_MARK,
239 TMS_MARK, TDO_MARK, TDI_MARK, TCK_MARK,
240 DACK1_MARK, DREQ1_MARK, DACK0_MARK, DREQ0_MARK,
241 TEND1_MARK, TEND0_MARK,
242 SIOF0_SYNC_MARK, SIOF0_MCLK_MARK,
243 SIOF0_TXD_MARK, SIOF0_RXD_MARK,
244 SIOF0_SCK_MARK,
245 SIOF1_SYNC_MARK, SIOF1_MCLK_MARK,
246 SIOF1_TXD_MARK, SIOF1_RXD_MARK,
247 SIOF1_SCK_MARK,
248 SCIF0_TXD_MARK, SCIF0_RXD_MARK,
249 SCIF0_RTS_MARK, SCIF0_CTS_MARK, SCIF0_SCK_MARK,
250 SCIF1_TXD_MARK, SCIF1_RXD_MARK,
251 SCIF1_RTS_MARK, SCIF1_CTS_MARK, SCIF1_SCK_MARK,
252 TPU_TO1_MARK, TPU_TO0_MARK,
253 TPU_TI3B_MARK, TPU_TI3A_MARK,
254 TPU_TI2B_MARK, TPU_TI2A_MARK,
255 TPU_TO3_MARK, TPU_TO2_MARK,
256 SIM_D_MARK, SIM_CLK_MARK, SIM_RST_MARK,
257 MMC_DAT_MARK, MMC_CMD_MARK,
258 MMC_CLK_MARK, MMC_VDDON_MARK,
259 MMC_ODMOD_MARK,
260 STATUS0_MARK, STATUS1_MARK,
261 PINMUX_MARK_END,
262};
263
264static pinmux_enum_t pinmux_data[] = {
265 /* PTA GPIO */
266 PINMUX_DATA(PTA7_DATA, PTA7_IN, PTA7_OUT, PTA7_IN_PU),
267 PINMUX_DATA(PTA6_DATA, PTA6_IN, PTA6_OUT, PTA6_IN_PU),
268 PINMUX_DATA(PTA5_DATA, PTA5_IN, PTA5_OUT, PTA5_IN_PU),
269 PINMUX_DATA(PTA4_DATA, PTA4_IN, PTA4_OUT, PTA4_IN_PU),
270 PINMUX_DATA(PTA3_DATA, PTA3_IN, PTA3_OUT, PTA3_IN_PU),
271 PINMUX_DATA(PTA2_DATA, PTA2_IN, PTA2_OUT, PTA2_IN_PU),
272 PINMUX_DATA(PTA1_DATA, PTA1_IN, PTA1_OUT, PTA1_IN_PU),
273 PINMUX_DATA(PTA0_DATA, PTA0_IN, PTA0_OUT, PTA0_IN_PU),
274
275 /* PTB GPIO */
276 PINMUX_DATA(PTB7_DATA, PTB7_IN, PTB7_OUT, PTB7_IN_PU),
277 PINMUX_DATA(PTB6_DATA, PTB6_IN, PTB6_OUT, PTB6_IN_PU),
278 PINMUX_DATA(PTB5_DATA, PTB5_IN, PTB5_OUT, PTB5_IN_PU),
279 PINMUX_DATA(PTB4_DATA, PTB4_IN, PTB4_OUT, PTB4_IN_PU),
280 PINMUX_DATA(PTB3_DATA, PTB3_IN, PTB3_OUT, PTB3_IN_PU),
281 PINMUX_DATA(PTB2_DATA, PTB2_IN, PTB2_OUT, PTB2_IN_PU),
282 PINMUX_DATA(PTB1_DATA, PTB1_IN, PTB1_OUT, PTB1_IN_PU),
283 PINMUX_DATA(PTB0_DATA, PTB0_IN, PTB0_OUT, PTB0_IN_PU),
284
285 /* PTC GPIO */
286 PINMUX_DATA(PTC7_DATA, PTC7_IN, PTC7_OUT, PTC7_IN_PU),
287 PINMUX_DATA(PTC6_DATA, PTC6_IN, PTC6_OUT, PTC6_IN_PU),
288 PINMUX_DATA(PTC5_DATA, PTC5_IN, PTC5_OUT, PTC5_IN_PU),
289 PINMUX_DATA(PTC4_DATA, PTC4_IN, PTC4_OUT, PTC4_IN_PU),
290 PINMUX_DATA(PTC3_DATA, PTC3_IN, PTC3_OUT, PTC3_IN_PU),
291 PINMUX_DATA(PTC2_DATA, PTC2_IN, PTC2_OUT, PTC2_IN_PU),
292 PINMUX_DATA(PTC1_DATA, PTC1_IN, PTC1_OUT, PTC1_IN_PU),
293 PINMUX_DATA(PTC0_DATA, PTC0_IN, PTC0_OUT, PTC0_IN_PU),
294
295 /* PTD GPIO */
296 PINMUX_DATA(PTD7_DATA, PTD7_IN, PTD7_OUT, PTD7_IN_PU),
297 PINMUX_DATA(PTD6_DATA, PTD6_IN, PTD6_OUT, PTD6_IN_PU),
298 PINMUX_DATA(PTD5_DATA, PTD5_IN, PTD5_OUT, PTD5_IN_PU),
299 PINMUX_DATA(PTD4_DATA, PTD4_IN, PTD4_OUT, PTD4_IN_PU),
300 PINMUX_DATA(PTD3_DATA, PTD3_IN, PTD3_OUT, PTD3_IN_PU),
301 PINMUX_DATA(PTD2_DATA, PTD2_IN, PTD2_OUT, PTD2_IN_PU),
302 PINMUX_DATA(PTD1_DATA, PTD1_IN, PTD1_OUT, PTD1_IN_PU),
303 PINMUX_DATA(PTD0_DATA, PTD0_IN, PTD0_OUT, PTD0_IN_PU),
304
305 /* PTE GPIO */
306 PINMUX_DATA(PTE6_DATA, PTE6_IN),
307 PINMUX_DATA(PTE5_DATA, PTE5_IN),
308 PINMUX_DATA(PTE4_DATA, PTE4_IN, PTE4_OUT, PTE4_IN_PU),
309 PINMUX_DATA(PTE3_DATA, PTE3_IN, PTE3_OUT, PTE3_IN_PU),
310 PINMUX_DATA(PTE2_DATA, PTE2_IN, PTE2_OUT, PTE2_IN_PU),
311 PINMUX_DATA(PTE1_DATA, PTE1_IN, PTE1_OUT, PTE1_IN_PU),
312 PINMUX_DATA(PTE0_DATA, PTE0_IN, PTE0_OUT, PTE0_IN_PU),
313
314 /* PTF GPIO */
315 PINMUX_DATA(PTF6_DATA, PTF6_IN),
316 PINMUX_DATA(PTF5_DATA, PTF5_IN),
317 PINMUX_DATA(PTF4_DATA, PTF4_IN),
318 PINMUX_DATA(PTF3_DATA, PTF3_IN),
319 PINMUX_DATA(PTF2_DATA, PTF2_IN),
320 PINMUX_DATA(PTF1_DATA, PTF1_IN),
321 PINMUX_DATA(PTF0_DATA, PTF0_IN, PTF0_OUT, PTF0_IN_PU),
322
323 /* PTG GPIO */
324 PINMUX_DATA(PTG6_DATA, PTG6_IN, PTG6_OUT, PTG6_IN_PU),
325 PINMUX_DATA(PTG5_DATA, PTG5_IN, PTG5_OUT, PTG5_IN_PU),
326 PINMUX_DATA(PTG4_DATA, PTG4_IN, PTG4_OUT, PTG4_IN_PU),
327 PINMUX_DATA(PTG3_DATA, PTG3_IN, PTG3_OUT, PTG3_IN_PU),
328 PINMUX_DATA(PTG2_DATA, PTG2_IN, PTG2_OUT, PTG2_IN_PU),
329 PINMUX_DATA(PTG1_DATA, PTG1_IN, PTG1_OUT, PTG1_IN_PU),
330 PINMUX_DATA(PTG0_DATA, PTG0_IN, PTG0_OUT, PTG0_IN_PU),
331
332 /* PTH GPIO */
333 PINMUX_DATA(PTH6_DATA, PTH6_IN, PTH6_OUT, PTH6_IN_PU),
334 PINMUX_DATA(PTH5_DATA, PTH5_IN, PTH5_OUT, PTH5_IN_PU),
335 PINMUX_DATA(PTH4_DATA, PTH4_IN, PTH4_OUT, PTH4_IN_PU),
336 PINMUX_DATA(PTH3_DATA, PTH3_IN, PTH3_OUT, PTH3_IN_PU),
337 PINMUX_DATA(PTH2_DATA, PTH2_IN, PTH2_OUT, PTH2_IN_PU),
338 PINMUX_DATA(PTH1_DATA, PTH1_IN, PTH1_OUT, PTH1_IN_PU),
339 PINMUX_DATA(PTH0_DATA, PTH0_IN, PTH0_OUT, PTH0_IN_PU),
340
341 /* PTJ GPIO */
342 PINMUX_DATA(PTJ6_DATA, PTJ6_IN, PTJ6_OUT, PTJ6_IN_PU),
343 PINMUX_DATA(PTJ5_DATA, PTJ5_IN, PTJ5_OUT, PTJ5_IN_PU),
344 PINMUX_DATA(PTJ4_DATA, PTJ4_IN, PTJ4_OUT, PTJ4_IN_PU),
345 PINMUX_DATA(PTJ3_DATA, PTJ3_IN, PTJ3_OUT, PTJ3_IN_PU),
346 PINMUX_DATA(PTJ2_DATA, PTJ2_IN, PTJ2_OUT, PTJ2_IN_PU),
347 PINMUX_DATA(PTJ1_DATA, PTJ1_IN, PTJ1_OUT, PTJ1_IN_PU),
348 PINMUX_DATA(PTJ0_DATA, PTJ0_IN, PTJ0_OUT, PTJ0_IN_PU),
349
350 /* PTK GPIO */
351 PINMUX_DATA(PTK3_DATA, PTK3_IN, PTK3_OUT, PTK3_IN_PU),
352 PINMUX_DATA(PTK2_DATA, PTK2_IN, PTK2_OUT, PTK2_IN_PU),
353 PINMUX_DATA(PTK1_DATA, PTK1_IN, PTK1_OUT, PTK1_IN_PU),
354 PINMUX_DATA(PTK0_DATA, PTK0_IN, PTK0_OUT, PTK0_IN_PU),
355
356 /* PTL GPIO */
357 PINMUX_DATA(PTL7_DATA, PTL7_IN, PTL7_OUT, PTL7_IN_PU),
358 PINMUX_DATA(PTL6_DATA, PTL6_IN, PTL6_OUT, PTL6_IN_PU),
359 PINMUX_DATA(PTL5_DATA, PTL5_IN, PTL5_OUT, PTL5_IN_PU),
360 PINMUX_DATA(PTL4_DATA, PTL4_IN, PTL4_OUT, PTL4_IN_PU),
361 PINMUX_DATA(PTL3_DATA, PTL3_IN, PTL3_OUT, PTL3_IN_PU),
362
363 /* PTM GPIO */
364 PINMUX_DATA(PTM7_DATA, PTM7_IN, PTM7_OUT, PTM7_IN_PU),
365 PINMUX_DATA(PTM6_DATA, PTM6_IN, PTM6_OUT, PTM6_IN_PU),
366 PINMUX_DATA(PTM5_DATA, PTM5_IN, PTM5_OUT, PTM5_IN_PU),
367 PINMUX_DATA(PTM4_DATA, PTM4_IN, PTM4_OUT, PTM4_IN_PU),
368 PINMUX_DATA(PTM3_DATA, PTM3_IN, PTM3_OUT, PTM3_IN_PU),
369 PINMUX_DATA(PTM2_DATA, PTM2_IN, PTM2_OUT, PTM2_IN_PU),
370 PINMUX_DATA(PTM1_DATA, PTM1_IN, PTM1_OUT, PTM1_IN_PU),
371 PINMUX_DATA(PTM0_DATA, PTM0_IN, PTM0_OUT, PTM0_IN_PU),
372
373 /* PTP GPIO */
374 PINMUX_DATA(PTP4_DATA, PTP4_IN, PTP4_OUT, PTP4_IN_PU),
375 PINMUX_DATA(PTP3_DATA, PTP3_IN, PTP3_OUT, PTP3_IN_PU),
376 PINMUX_DATA(PTP2_DATA, PTP2_IN, PTP2_OUT, PTP2_IN_PU),
377 PINMUX_DATA(PTP1_DATA, PTP1_IN, PTP1_OUT, PTP1_IN_PU),
378 PINMUX_DATA(PTP0_DATA, PTP0_IN, PTP0_OUT, PTP0_IN_PU),
379
380 /* PTR GPIO */
381 PINMUX_DATA(PTR7_DATA, PTR7_IN, PTR7_OUT, PTR7_IN_PU),
382 PINMUX_DATA(PTR6_DATA, PTR6_IN, PTR6_OUT, PTR6_IN_PU),
383 PINMUX_DATA(PTR5_DATA, PTR5_IN, PTR5_OUT, PTR5_IN_PU),
384 PINMUX_DATA(PTR4_DATA, PTR4_IN, PTR4_OUT, PTR4_IN_PU),
385 PINMUX_DATA(PTR3_DATA, PTR3_IN, PTR3_OUT, PTR3_IN_PU),
386 PINMUX_DATA(PTR2_DATA, PTR2_IN, PTR2_OUT, PTR2_IN_PU),
387 PINMUX_DATA(PTR1_DATA, PTR1_IN, PTR1_OUT, PTR1_IN_PU),
388 PINMUX_DATA(PTR0_DATA, PTR0_IN, PTR0_OUT, PTR0_IN_PU),
389
390 /* PTS GPIO */
391 PINMUX_DATA(PTS4_DATA, PTS4_IN, PTS4_OUT, PTS4_IN_PU),
392 PINMUX_DATA(PTS3_DATA, PTS3_IN, PTS3_OUT, PTS3_IN_PU),
393 PINMUX_DATA(PTS2_DATA, PTS2_IN, PTS2_OUT, PTS2_IN_PU),
394 PINMUX_DATA(PTS1_DATA, PTS1_IN, PTS1_OUT, PTS1_IN_PU),
395 PINMUX_DATA(PTS0_DATA, PTS0_IN, PTS0_OUT, PTS0_IN_PU),
396
397 /* PTT GPIO */
398 PINMUX_DATA(PTT4_DATA, PTT4_IN, PTT4_OUT, PTT4_IN_PU),
399 PINMUX_DATA(PTT3_DATA, PTT3_IN, PTT3_OUT, PTT3_IN_PU),
400 PINMUX_DATA(PTT2_DATA, PTT2_IN, PTT2_OUT, PTT2_IN_PU),
401 PINMUX_DATA(PTT1_DATA, PTT1_IN, PTT1_OUT, PTT1_IN_PU),
402 PINMUX_DATA(PTT0_DATA, PTT0_IN, PTT0_OUT, PTT0_IN_PU),
403
404 /* PTU GPIO */
405 PINMUX_DATA(PTU4_DATA, PTU4_IN, PTU4_OUT, PTU4_IN_PU),
406 PINMUX_DATA(PTU3_DATA, PTU3_IN, PTU3_OUT, PTU3_IN_PU),
407 PINMUX_DATA(PTU2_DATA, PTU2_IN, PTU2_OUT, PTU2_IN_PU),
408 PINMUX_DATA(PTU1_DATA, PTU1_IN, PTU1_OUT, PTU1_IN_PU),
409 PINMUX_DATA(PTU0_DATA, PTU0_IN, PTU0_OUT, PTU0_IN_PU),
410
411 /* PTV GPIO */
412 PINMUX_DATA(PTV4_DATA, PTV4_IN, PTV4_OUT, PTV4_IN_PU),
413 PINMUX_DATA(PTV3_DATA, PTV3_IN, PTV3_OUT, PTV3_IN_PU),
414 PINMUX_DATA(PTV2_DATA, PTV2_IN, PTV2_OUT, PTV2_IN_PU),
415 PINMUX_DATA(PTV1_DATA, PTV1_IN, PTV1_OUT, PTV1_IN_PU),
416 PINMUX_DATA(PTV0_DATA, PTV0_IN, PTV0_OUT, PTV0_IN_PU),
417
418 /* PTA FN */
419 PINMUX_DATA(D23_MARK, PTA7_FN),
420 PINMUX_DATA(D22_MARK, PTA6_FN),
421 PINMUX_DATA(D21_MARK, PTA5_FN),
422 PINMUX_DATA(D20_MARK, PTA4_FN),
423 PINMUX_DATA(D19_MARK, PTA3_FN),
424 PINMUX_DATA(D18_MARK, PTA2_FN),
425 PINMUX_DATA(D17_MARK, PTA1_FN),
426 PINMUX_DATA(D16_MARK, PTA0_FN),
427
428 /* PTB FN */
429 PINMUX_DATA(D31_MARK, PTB7_FN),
430 PINMUX_DATA(D30_MARK, PTB6_FN),
431 PINMUX_DATA(D29_MARK, PTB5_FN),
432 PINMUX_DATA(D28_MARK, PTB4_FN),
433 PINMUX_DATA(D27_MARK, PTB3_FN),
434 PINMUX_DATA(D26_MARK, PTB2_FN),
435 PINMUX_DATA(D25_MARK, PTB1_FN),
436 PINMUX_DATA(D24_MARK, PTB0_FN),
437
438 /* PTC FN */
439 PINMUX_DATA(LCD_DATA7_MARK, PTC7_FN),
440 PINMUX_DATA(LCD_DATA6_MARK, PTC6_FN),
441 PINMUX_DATA(LCD_DATA5_MARK, PTC5_FN),
442 PINMUX_DATA(LCD_DATA4_MARK, PTC4_FN),
443 PINMUX_DATA(LCD_DATA3_MARK, PTC3_FN),
444 PINMUX_DATA(LCD_DATA2_MARK, PTC2_FN),
445 PINMUX_DATA(LCD_DATA1_MARK, PTC1_FN),
446 PINMUX_DATA(LCD_DATA0_MARK, PTC0_FN),
447
448 /* PTD FN */
449 PINMUX_DATA(LCD_DATA15_MARK, PTD7_FN),
450 PINMUX_DATA(LCD_DATA14_MARK, PTD6_FN),
451 PINMUX_DATA(LCD_DATA13_MARK, PTD5_FN),
452 PINMUX_DATA(LCD_DATA12_MARK, PTD4_FN),
453 PINMUX_DATA(LCD_DATA11_MARK, PTD3_FN),
454 PINMUX_DATA(LCD_DATA10_MARK, PTD2_FN),
455 PINMUX_DATA(LCD_DATA9_MARK, PTD1_FN),
456 PINMUX_DATA(LCD_DATA8_MARK, PTD0_FN),
457
458 /* PTE FN */
459 PINMUX_DATA(IIC_SCL_MARK, PSELB_9_8_00, PTE6_FN),
460 PINMUX_DATA(AFE_RXIN_MARK, PSELB_9_8_11, PTE6_FN),
461 PINMUX_DATA(IIC_SDA_MARK, PSELB_9_8_00, PTE5_FN),
462 PINMUX_DATA(AFE_RDET_MARK, PSELB_9_8_11, PTE5_FN),
463 PINMUX_DATA(LCD_M_DISP_MARK, PTE4_FN),
464 PINMUX_DATA(LCD_CL1_MARK, PTE3_FN),
465 PINMUX_DATA(LCD_CL2_MARK, PTE2_FN),
466 PINMUX_DATA(LCD_DON_MARK, PTE1_FN),
467 PINMUX_DATA(LCD_FLM_MARK, PTE0_FN),
468
469 /* PTF FN */
470 PINMUX_DATA(DA1_MARK, PTF6_FN),
471 PINMUX_DATA(DA0_MARK, PTF5_FN),
472 PINMUX_DATA(AN3_MARK, PTF4_FN),
473 PINMUX_DATA(AN2_MARK, PTF3_FN),
474 PINMUX_DATA(AN1_MARK, PTF2_FN),
475 PINMUX_DATA(AN0_MARK, PTF1_FN),
476 PINMUX_DATA(ADTRG_MARK, PTF0_FN),
477
478 /* PTG FN */
479 PINMUX_DATA(USB1D_RCV_MARK, PSELA_3_2_00, PTG6_FN),
480 PINMUX_DATA(AFE_FS_MARK, PSELA_3_2_01, PTG6_FN),
481 PINMUX_DATA(PCC_REG_MARK, PSELA_3_2_10, PTG6_FN),
482 PINMUX_DATA(IRQ5_MARK, PSELA_3_2_11, PTG6_FN),
483 PINMUX_DATA(USB1D_TXSE0_MARK, PSELA_5_4_00, PTG5_FN),
484 PINMUX_DATA(AFE_TXOUT_MARK, PSELA_5_4_01, PTG5_FN),
485 PINMUX_DATA(PCC_DRV_MARK, PSELA_5_4_10, PTG5_FN),
486 PINMUX_DATA(IRQ4_MARK, PSELA_5_4_11, PTG5_FN),
487 PINMUX_DATA(USB1D_TXDPLS_MARK, PSELA_7_6_00, PTG4_FN),
488 PINMUX_DATA(AFE_SCLK_MARK, PSELA_7_6_01, PTG4_FN),
489 PINMUX_DATA(IOIS16_MARK, PSELA_7_6_10, PTG4_FN),
490 PINMUX_DATA(USB1D_DMNS_MARK, PSELA_9_8_00, PTG3_FN),
491 PINMUX_DATA(AFE_RLYCNT_MARK, PSELA_9_8_01, PTG3_FN),
492 PINMUX_DATA(PCC_BVD2_MARK, PSELA_9_8_10, PTG3_FN),
493 PINMUX_DATA(USB1D_DPLS_MARK, PSELA_11_10_00, PTG2_FN),
494 PINMUX_DATA(AFE_HC1_MARK, PSELA_11_10_01, PTG2_FN),
495 PINMUX_DATA(PCC_BVD1_MARK, PSELA_11_10_10, PTG2_FN),
496 PINMUX_DATA(USB1D_SPEED_MARK, PSELA_13_12_00, PTG1_FN),
497 PINMUX_DATA(PCC_CD2_MARK, PSELA_13_12_10, PTG1_FN),
498 PINMUX_DATA(USB1D_TXENL_MARK, PSELA_15_14_00, PTG0_FN),
499 PINMUX_DATA(PCC_CD1_MARK, PSELA_15_14_10, PTG0_FN),
500
501 /* PTH FN */
502 PINMUX_DATA(RAS_MARK, PTH6_FN),
503 PINMUX_DATA(CAS_MARK, PTH5_FN),
504 PINMUX_DATA(CKE_MARK, PTH4_FN),
505 PINMUX_DATA(STATUS1_MARK, PTH3_FN),
506 PINMUX_DATA(STATUS0_MARK, PTH2_FN),
507 PINMUX_DATA(USB2_PWR_EN_MARK, PTH1_FN),
508 PINMUX_DATA(USB1_PWR_EN_USBF_UPLUP_MARK, PTH0_FN),
509
510 /* PTJ FN */
511 PINMUX_DATA(AUDCK_MARK, PTJ6_FN),
512 PINMUX_DATA(ASEBRKAK_MARK, PTJ5_FN),
513 PINMUX_DATA(AUDATA3_MARK, PTJ4_FN),
514 PINMUX_DATA(AUDATA2_MARK, PTJ3_FN),
515 PINMUX_DATA(AUDATA1_MARK, PTJ2_FN),
516 PINMUX_DATA(AUDATA0_MARK, PTJ1_FN),
517 PINMUX_DATA(AUDSYNC_MARK, PTJ0_FN),
518
519 /* PTK FN */
520 PINMUX_DATA(PCC_RESET_MARK, PTK3_FN),
521 PINMUX_DATA(PCC_RDY_MARK, PTK2_FN),
522 PINMUX_DATA(PCC_VS2_MARK, PTK1_FN),
523 PINMUX_DATA(PCC_VS1_MARK, PTK0_FN),
524
525 /* PTL FN */
526 PINMUX_DATA(TRST_MARK, PTL7_FN),
527 PINMUX_DATA(TMS_MARK, PTL6_FN),
528 PINMUX_DATA(TDO_MARK, PTL5_FN),
529 PINMUX_DATA(TDI_MARK, PTL4_FN),
530 PINMUX_DATA(TCK_MARK, PTL3_FN),
531
532 /* PTM FN */
533 PINMUX_DATA(DREQ1_MARK, PTM7_FN),
534 PINMUX_DATA(DREQ0_MARK, PTM6_FN),
535 PINMUX_DATA(DACK1_MARK, PTM5_FN),
536 PINMUX_DATA(DACK0_MARK, PTM4_FN),
537 PINMUX_DATA(TEND1_MARK, PTM3_FN),
538 PINMUX_DATA(TEND0_MARK, PTM2_FN),
539 PINMUX_DATA(CS5B_CE1A_MARK, PTM1_FN),
540 PINMUX_DATA(CS6B_CE1B_MARK, PTM0_FN),
541
542 /* PTP FN */
543 PINMUX_DATA(USB1D_SUSPEND_MARK, PSELA_1_0_00, PTP4_FN),
544 PINMUX_DATA(REFOUT_MARK, PSELA_1_0_01, PTP4_FN),
545 PINMUX_DATA(IRQOUT_MARK, PSELA_1_0_10, PTP4_FN),
546 PINMUX_DATA(IRQ3_IRL3_MARK, PTP3_FN),
547 PINMUX_DATA(IRQ2_IRL2_MARK, PTP2_FN),
548 PINMUX_DATA(IRQ1_IRL1_MARK, PTP1_FN),
549 PINMUX_DATA(IRQ0_IRL0_MARK, PTP0_FN),
550
551 /* PTR FN */
552 PINMUX_DATA(A25_MARK, PTR7_FN),
553 PINMUX_DATA(A24_MARK, PTR6_FN),
554 PINMUX_DATA(A23_MARK, PTR5_FN),
555 PINMUX_DATA(A22_MARK, PTR4_FN),
556 PINMUX_DATA(A21_MARK, PTR3_FN),
557 PINMUX_DATA(A20_MARK, PTR2_FN),
558 PINMUX_DATA(A19_MARK, PTR1_FN),
559 PINMUX_DATA(A0_MARK, PTR0_FN),
560
561 /* PTS FN */
562 PINMUX_DATA(SIOF0_SYNC_MARK, PTS4_FN),
563 PINMUX_DATA(SIOF0_MCLK_MARK, PTS3_FN),
564 PINMUX_DATA(SIOF0_TXD_MARK, PTS2_FN),
565 PINMUX_DATA(SIOF0_RXD_MARK, PTS1_FN),
566 PINMUX_DATA(SIOF0_SCK_MARK, PTS0_FN),
567
568 /* PTT FN */
569 PINMUX_DATA(SCIF0_CTS_MARK, PSELB_15_14_00, PTT4_FN),
570 PINMUX_DATA(TPU_TO1_MARK, PSELB_15_14_11, PTT4_FN),
571 PINMUX_DATA(SCIF0_RTS_MARK, PSELB_15_14_00, PTT3_FN),
572 PINMUX_DATA(TPU_TO0_MARK, PSELB_15_14_11, PTT3_FN),
573 PINMUX_DATA(SCIF0_TXD_MARK, PTT2_FN),
574 PINMUX_DATA(SCIF0_RXD_MARK, PTT1_FN),
575 PINMUX_DATA(SCIF0_SCK_MARK, PTT0_FN),
576
577 /* PTU FN */
578 PINMUX_DATA(SIOF1_SYNC_MARK, PTU4_FN),
579 PINMUX_DATA(SIOF1_MCLK_MARK, PSELD_11_10_00, PTU3_FN),
580 PINMUX_DATA(TPU_TI3B_MARK, PSELD_11_10_01, PTU3_FN),
581 PINMUX_DATA(SIOF1_TXD_MARK, PSELD_15_14_00, PTU2_FN),
582 PINMUX_DATA(TPU_TI3A_MARK, PSELD_15_14_01, PTU2_FN),
583 PINMUX_DATA(MMC_DAT_MARK, PSELD_15_14_10, PTU2_FN),
584 PINMUX_DATA(SIOF1_RXD_MARK, PSELC_13_12_00, PTU1_FN),
585 PINMUX_DATA(TPU_TI2B_MARK, PSELC_13_12_01, PTU1_FN),
586 PINMUX_DATA(MMC_CMD_MARK, PSELC_13_12_10, PTU1_FN),
587 PINMUX_DATA(SIOF1_SCK_MARK, PSELC_15_14_00, PTU0_FN),
588 PINMUX_DATA(TPU_TI2A_MARK, PSELC_15_14_01, PTU0_FN),
589 PINMUX_DATA(MMC_CLK_MARK, PSELC_15_14_10, PTU0_FN),
590
591 /* PTV FN */
592 PINMUX_DATA(SCIF1_CTS_MARK, PSELB_11_10_00, PTV4_FN),
593 PINMUX_DATA(TPU_TO3_MARK, PSELB_11_10_01, PTV4_FN),
594 PINMUX_DATA(MMC_VDDON_MARK, PSELB_11_10_10, PTV4_FN),
595 PINMUX_DATA(LCD_VEPWC_MARK, PSELB_11_10_11, PTV4_FN),
596 PINMUX_DATA(SCIF1_RTS_MARK, PSELB_13_12_00, PTV3_FN),
597 PINMUX_DATA(TPU_TO2_MARK, PSELB_13_12_01, PTV3_FN),
598 PINMUX_DATA(MMC_ODMOD_MARK, PSELB_13_12_10, PTV3_FN),
599 PINMUX_DATA(LCD_VCPWC_MARK, PSELB_13_12_11, PTV3_FN),
600 PINMUX_DATA(SCIF1_TXD_MARK, PSELC_9_8_00, PTV2_FN),
601 PINMUX_DATA(SIM_D_MARK, PSELC_9_8_10, PTV2_FN),
602 PINMUX_DATA(SCIF1_RXD_MARK, PSELC_11_10_00, PTV1_FN),
603 PINMUX_DATA(SIM_RST_MARK, PSELC_11_10_10, PTV1_FN),
604 PINMUX_DATA(SCIF1_SCK_MARK, PSELD_1_0_00, PTV0_FN),
605 PINMUX_DATA(SIM_CLK_MARK, PSELD_1_0_10, PTV0_FN),
606};
607
608static struct pinmux_gpio pinmux_gpios[] = {
609 /* PTA */
610 PINMUX_GPIO(GPIO_PTA7, PTA7_DATA),
611 PINMUX_GPIO(GPIO_PTA6, PTA6_DATA),
612 PINMUX_GPIO(GPIO_PTA5, PTA5_DATA),
613 PINMUX_GPIO(GPIO_PTA4, PTA4_DATA),
614 PINMUX_GPIO(GPIO_PTA3, PTA3_DATA),
615 PINMUX_GPIO(GPIO_PTA2, PTA2_DATA),
616 PINMUX_GPIO(GPIO_PTA1, PTA1_DATA),
617 PINMUX_GPIO(GPIO_PTA0, PTA0_DATA),
618
619 /* PTB */
620 PINMUX_GPIO(GPIO_PTB7, PTB7_DATA),
621 PINMUX_GPIO(GPIO_PTB6, PTB6_DATA),
622 PINMUX_GPIO(GPIO_PTB5, PTB5_DATA),
623 PINMUX_GPIO(GPIO_PTB4, PTB4_DATA),
624 PINMUX_GPIO(GPIO_PTB3, PTB3_DATA),
625 PINMUX_GPIO(GPIO_PTB2, PTB2_DATA),
626 PINMUX_GPIO(GPIO_PTB1, PTB1_DATA),
627 PINMUX_GPIO(GPIO_PTB0, PTB0_DATA),
628
629 /* PTC */
630 PINMUX_GPIO(GPIO_PTC7, PTC7_DATA),
631 PINMUX_GPIO(GPIO_PTC6, PTC6_DATA),
632 PINMUX_GPIO(GPIO_PTC5, PTC5_DATA),
633 PINMUX_GPIO(GPIO_PTC4, PTC4_DATA),
634 PINMUX_GPIO(GPIO_PTC3, PTC3_DATA),
635 PINMUX_GPIO(GPIO_PTC2, PTC2_DATA),
636 PINMUX_GPIO(GPIO_PTC1, PTC1_DATA),
637 PINMUX_GPIO(GPIO_PTC0, PTC0_DATA),
638
639 /* PTD */
640 PINMUX_GPIO(GPIO_PTD7, PTD7_DATA),
641 PINMUX_GPIO(GPIO_PTD6, PTD6_DATA),
642 PINMUX_GPIO(GPIO_PTD5, PTD5_DATA),
643 PINMUX_GPIO(GPIO_PTD4, PTD4_DATA),
644 PINMUX_GPIO(GPIO_PTD3, PTD3_DATA),
645 PINMUX_GPIO(GPIO_PTD2, PTD2_DATA),
646 PINMUX_GPIO(GPIO_PTD1, PTD1_DATA),
647 PINMUX_GPIO(GPIO_PTD0, PTD0_DATA),
648
649 /* PTE */
650 PINMUX_GPIO(GPIO_PTE6, PTE6_DATA),
651 PINMUX_GPIO(GPIO_PTE5, PTE5_DATA),
652 PINMUX_GPIO(GPIO_PTE4, PTE4_DATA),
653 PINMUX_GPIO(GPIO_PTE3, PTE3_DATA),
654 PINMUX_GPIO(GPIO_PTE2, PTE2_DATA),
655 PINMUX_GPIO(GPIO_PTE1, PTE1_DATA),
656 PINMUX_GPIO(GPIO_PTE0, PTE0_DATA),
657
658 /* PTF */
659 PINMUX_GPIO(GPIO_PTF6, PTF6_DATA),
660 PINMUX_GPIO(GPIO_PTF5, PTF5_DATA),
661 PINMUX_GPIO(GPIO_PTF4, PTF4_DATA),
662 PINMUX_GPIO(GPIO_PTF3, PTF3_DATA),
663 PINMUX_GPIO(GPIO_PTF2, PTF2_DATA),
664 PINMUX_GPIO(GPIO_PTF1, PTF1_DATA),
665 PINMUX_GPIO(GPIO_PTF0, PTF0_DATA),
666
667 /* PTG */
668 PINMUX_GPIO(GPIO_PTG6, PTG6_DATA),
669 PINMUX_GPIO(GPIO_PTG5, PTG5_DATA),
670 PINMUX_GPIO(GPIO_PTG4, PTG4_DATA),
671 PINMUX_GPIO(GPIO_PTG3, PTG3_DATA),
672 PINMUX_GPIO(GPIO_PTG2, PTG2_DATA),
673 PINMUX_GPIO(GPIO_PTG1, PTG1_DATA),
674 PINMUX_GPIO(GPIO_PTG0, PTG0_DATA),
675
676 /* PTH */
677 PINMUX_GPIO(GPIO_PTH6, PTH6_DATA),
678 PINMUX_GPIO(GPIO_PTH5, PTH5_DATA),
679 PINMUX_GPIO(GPIO_PTH4, PTH4_DATA),
680 PINMUX_GPIO(GPIO_PTH3, PTH3_DATA),
681 PINMUX_GPIO(GPIO_PTH2, PTH2_DATA),
682 PINMUX_GPIO(GPIO_PTH1, PTH1_DATA),
683 PINMUX_GPIO(GPIO_PTH0, PTH0_DATA),
684
685 /* PTJ */
686 PINMUX_GPIO(GPIO_PTJ6, PTJ6_DATA),
687 PINMUX_GPIO(GPIO_PTJ5, PTJ5_DATA),
688 PINMUX_GPIO(GPIO_PTJ4, PTJ4_DATA),
689 PINMUX_GPIO(GPIO_PTJ3, PTJ3_DATA),
690 PINMUX_GPIO(GPIO_PTJ2, PTJ2_DATA),
691 PINMUX_GPIO(GPIO_PTJ1, PTJ1_DATA),
692 PINMUX_GPIO(GPIO_PTJ0, PTJ0_DATA),
693
694 /* PTK */
695 PINMUX_GPIO(GPIO_PTK3, PTK3_DATA),
696 PINMUX_GPIO(GPIO_PTK2, PTK2_DATA),
697 PINMUX_GPIO(GPIO_PTK1, PTK1_DATA),
698 PINMUX_GPIO(GPIO_PTK0, PTK0_DATA),
699
700 /* PTL */
701 PINMUX_GPIO(GPIO_PTL7, PTL7_DATA),
702 PINMUX_GPIO(GPIO_PTL6, PTL6_DATA),
703 PINMUX_GPIO(GPIO_PTL5, PTL5_DATA),
704 PINMUX_GPIO(GPIO_PTL4, PTL4_DATA),
705 PINMUX_GPIO(GPIO_PTL3, PTL3_DATA),
706
707 /* PTM */
708 PINMUX_GPIO(GPIO_PTM7, PTM7_DATA),
709 PINMUX_GPIO(GPIO_PTM6, PTM6_DATA),
710 PINMUX_GPIO(GPIO_PTM5, PTM5_DATA),
711 PINMUX_GPIO(GPIO_PTM4, PTM4_DATA),
712 PINMUX_GPIO(GPIO_PTM3, PTM3_DATA),
713 PINMUX_GPIO(GPIO_PTM2, PTM2_DATA),
714 PINMUX_GPIO(GPIO_PTM1, PTM1_DATA),
715 PINMUX_GPIO(GPIO_PTM0, PTM0_DATA),
716
717 /* PTP */
718 PINMUX_GPIO(GPIO_PTP4, PTP4_DATA),
719 PINMUX_GPIO(GPIO_PTP3, PTP3_DATA),
720 PINMUX_GPIO(GPIO_PTP2, PTP2_DATA),
721 PINMUX_GPIO(GPIO_PTP1, PTP1_DATA),
722 PINMUX_GPIO(GPIO_PTP0, PTP0_DATA),
723
724 /* PTR */
725 PINMUX_GPIO(GPIO_PTR7, PTR7_DATA),
726 PINMUX_GPIO(GPIO_PTR6, PTR6_DATA),
727 PINMUX_GPIO(GPIO_PTR5, PTR5_DATA),
728 PINMUX_GPIO(GPIO_PTR4, PTR4_DATA),
729 PINMUX_GPIO(GPIO_PTR3, PTR3_DATA),
730 PINMUX_GPIO(GPIO_PTR2, PTR2_DATA),
731 PINMUX_GPIO(GPIO_PTR1, PTR1_DATA),
732 PINMUX_GPIO(GPIO_PTR0, PTR0_DATA),
733
734 /* PTS */
735 PINMUX_GPIO(GPIO_PTS4, PTS4_DATA),
736 PINMUX_GPIO(GPIO_PTS3, PTS3_DATA),
737 PINMUX_GPIO(GPIO_PTS2, PTS2_DATA),
738 PINMUX_GPIO(GPIO_PTS1, PTS1_DATA),
739 PINMUX_GPIO(GPIO_PTS0, PTS0_DATA),
740
741 /* PTT */
742 PINMUX_GPIO(GPIO_PTT4, PTT4_DATA),
743 PINMUX_GPIO(GPIO_PTT3, PTT3_DATA),
744 PINMUX_GPIO(GPIO_PTT2, PTT2_DATA),
745 PINMUX_GPIO(GPIO_PTT1, PTT1_DATA),
746 PINMUX_GPIO(GPIO_PTT0, PTT0_DATA),
747
748 /* PTU */
749 PINMUX_GPIO(GPIO_PTU4, PTU4_DATA),
750 PINMUX_GPIO(GPIO_PTU3, PTU3_DATA),
751 PINMUX_GPIO(GPIO_PTU2, PTU2_DATA),
752 PINMUX_GPIO(GPIO_PTU1, PTU1_DATA),
753 PINMUX_GPIO(GPIO_PTU0, PTU0_DATA),
754
755 /* PTV */
756 PINMUX_GPIO(GPIO_PTV4, PTV4_DATA),
757 PINMUX_GPIO(GPIO_PTV3, PTV3_DATA),
758 PINMUX_GPIO(GPIO_PTV2, PTV2_DATA),
759 PINMUX_GPIO(GPIO_PTV1, PTV1_DATA),
760 PINMUX_GPIO(GPIO_PTV0, PTV0_DATA),
761
762 /* BSC */
763 PINMUX_GPIO(GPIO_FN_D31, D31_MARK),
764 PINMUX_GPIO(GPIO_FN_D30, D30_MARK),
765 PINMUX_GPIO(GPIO_FN_D29, D29_MARK),
766 PINMUX_GPIO(GPIO_FN_D28, D28_MARK),
767 PINMUX_GPIO(GPIO_FN_D27, D27_MARK),
768 PINMUX_GPIO(GPIO_FN_D26, D26_MARK),
769 PINMUX_GPIO(GPIO_FN_D25, D25_MARK),
770 PINMUX_GPIO(GPIO_FN_D24, D24_MARK),
771 PINMUX_GPIO(GPIO_FN_D23, D23_MARK),
772 PINMUX_GPIO(GPIO_FN_D22, D22_MARK),
773 PINMUX_GPIO(GPIO_FN_D21, D21_MARK),
774 PINMUX_GPIO(GPIO_FN_D20, D20_MARK),
775 PINMUX_GPIO(GPIO_FN_D19, D19_MARK),
776 PINMUX_GPIO(GPIO_FN_D18, D18_MARK),
777 PINMUX_GPIO(GPIO_FN_D17, D17_MARK),
778 PINMUX_GPIO(GPIO_FN_D16, D16_MARK),
779 PINMUX_GPIO(GPIO_FN_IOIS16, IOIS16_MARK),
780 PINMUX_GPIO(GPIO_FN_RAS, RAS_MARK),
781 PINMUX_GPIO(GPIO_FN_CAS, CAS_MARK),
782 PINMUX_GPIO(GPIO_FN_CKE, CKE_MARK),
783 PINMUX_GPIO(GPIO_FN_CS5B_CE1A, CS5B_CE1A_MARK),
784 PINMUX_GPIO(GPIO_FN_CS6B_CE1B, CS6B_CE1B_MARK),
785 PINMUX_GPIO(GPIO_FN_A25, A25_MARK),
786 PINMUX_GPIO(GPIO_FN_A24, A24_MARK),
787 PINMUX_GPIO(GPIO_FN_A23, A23_MARK),
788 PINMUX_GPIO(GPIO_FN_A22, A22_MARK),
789 PINMUX_GPIO(GPIO_FN_A21, A21_MARK),
790 PINMUX_GPIO(GPIO_FN_A20, A20_MARK),
791 PINMUX_GPIO(GPIO_FN_A19, A19_MARK),
792 PINMUX_GPIO(GPIO_FN_A0, A0_MARK),
793 PINMUX_GPIO(GPIO_FN_REFOUT, REFOUT_MARK),
794 PINMUX_GPIO(GPIO_FN_IRQOUT, IRQOUT_MARK),
795
796 /* LCDC */
797 PINMUX_GPIO(GPIO_FN_LCD_DATA15, LCD_DATA15_MARK),
798 PINMUX_GPIO(GPIO_FN_LCD_DATA14, LCD_DATA14_MARK),
799 PINMUX_GPIO(GPIO_FN_LCD_DATA13, LCD_DATA13_MARK),
800 PINMUX_GPIO(GPIO_FN_LCD_DATA12, LCD_DATA12_MARK),
801 PINMUX_GPIO(GPIO_FN_LCD_DATA11, LCD_DATA11_MARK),
802 PINMUX_GPIO(GPIO_FN_LCD_DATA10, LCD_DATA10_MARK),
803 PINMUX_GPIO(GPIO_FN_LCD_DATA9, LCD_DATA9_MARK),
804 PINMUX_GPIO(GPIO_FN_LCD_DATA8, LCD_DATA8_MARK),
805 PINMUX_GPIO(GPIO_FN_LCD_DATA7, LCD_DATA7_MARK),
806 PINMUX_GPIO(GPIO_FN_LCD_DATA6, LCD_DATA6_MARK),
807 PINMUX_GPIO(GPIO_FN_LCD_DATA5, LCD_DATA5_MARK),
808 PINMUX_GPIO(GPIO_FN_LCD_DATA4, LCD_DATA4_MARK),
809 PINMUX_GPIO(GPIO_FN_LCD_DATA3, LCD_DATA3_MARK),
810 PINMUX_GPIO(GPIO_FN_LCD_DATA2, LCD_DATA2_MARK),
811 PINMUX_GPIO(GPIO_FN_LCD_DATA1, LCD_DATA1_MARK),
812 PINMUX_GPIO(GPIO_FN_LCD_DATA0, LCD_DATA0_MARK),
813 PINMUX_GPIO(GPIO_FN_LCD_M_DISP, LCD_M_DISP_MARK),
814 PINMUX_GPIO(GPIO_FN_LCD_CL1, LCD_CL1_MARK),
815 PINMUX_GPIO(GPIO_FN_LCD_CL2, LCD_CL2_MARK),
816 PINMUX_GPIO(GPIO_FN_LCD_DON, LCD_DON_MARK),
817 PINMUX_GPIO(GPIO_FN_LCD_FLM, LCD_FLM_MARK),
818 PINMUX_GPIO(GPIO_FN_LCD_VEPWC, LCD_VEPWC_MARK),
819 PINMUX_GPIO(GPIO_FN_LCD_VCPWC, LCD_VCPWC_MARK),
820
821 /* AFEIF */
822 PINMUX_GPIO(GPIO_FN_AFE_RXIN, AFE_RXIN_MARK),
823 PINMUX_GPIO(GPIO_FN_AFE_RDET, AFE_RDET_MARK),
824 PINMUX_GPIO(GPIO_FN_AFE_FS, AFE_FS_MARK),
825 PINMUX_GPIO(GPIO_FN_AFE_TXOUT, AFE_TXOUT_MARK),
826 PINMUX_GPIO(GPIO_FN_AFE_SCLK, AFE_SCLK_MARK),
827 PINMUX_GPIO(GPIO_FN_AFE_RLYCNT, AFE_RLYCNT_MARK),
828 PINMUX_GPIO(GPIO_FN_AFE_HC1, AFE_HC1_MARK),
829
830 /* IIC */
831 PINMUX_GPIO(GPIO_FN_IIC_SCL, IIC_SCL_MARK),
832 PINMUX_GPIO(GPIO_FN_IIC_SDA, IIC_SDA_MARK),
833
834 /* DAC */
835 PINMUX_GPIO(GPIO_FN_DA1, DA1_MARK),
836 PINMUX_GPIO(GPIO_FN_DA0, DA0_MARK),
837
838 /* ADC */
839 PINMUX_GPIO(GPIO_FN_AN3, AN3_MARK),
840 PINMUX_GPIO(GPIO_FN_AN2, AN2_MARK),
841 PINMUX_GPIO(GPIO_FN_AN1, AN1_MARK),
842 PINMUX_GPIO(GPIO_FN_AN0, AN0_MARK),
843 PINMUX_GPIO(GPIO_FN_ADTRG, ADTRG_MARK),
844
845 /* USB */
846 PINMUX_GPIO(GPIO_FN_USB1D_RCV, USB1D_RCV_MARK),
847 PINMUX_GPIO(GPIO_FN_USB1D_TXSE0, USB1D_TXSE0_MARK),
848 PINMUX_GPIO(GPIO_FN_USB1D_TXDPLS, USB1D_TXDPLS_MARK),
849 PINMUX_GPIO(GPIO_FN_USB1D_DMNS, USB1D_DMNS_MARK),
850 PINMUX_GPIO(GPIO_FN_USB1D_DPLS, USB1D_DPLS_MARK),
851 PINMUX_GPIO(GPIO_FN_USB1D_SPEED, USB1D_SPEED_MARK),
852 PINMUX_GPIO(GPIO_FN_USB1D_TXENL, USB1D_TXENL_MARK),
853
854 PINMUX_GPIO(GPIO_FN_USB2_PWR_EN, USB2_PWR_EN_MARK),
855 PINMUX_GPIO(GPIO_FN_USB1_PWR_EN_USBF_UPLUP,
856 USB1_PWR_EN_USBF_UPLUP_MARK),
857 PINMUX_GPIO(GPIO_FN_USB1D_SUSPEND, USB1D_SUSPEND_MARK),
858
859 /* INTC */
860 PINMUX_GPIO(GPIO_FN_IRQ5, IRQ5_MARK),
861 PINMUX_GPIO(GPIO_FN_IRQ4, IRQ4_MARK),
862 PINMUX_GPIO(GPIO_FN_IRQ3_IRL3, IRQ3_IRL3_MARK),
863 PINMUX_GPIO(GPIO_FN_IRQ2_IRL2, IRQ2_IRL2_MARK),
864 PINMUX_GPIO(GPIO_FN_IRQ1_IRL1, IRQ1_IRL1_MARK),
865 PINMUX_GPIO(GPIO_FN_IRQ0_IRL0, IRQ0_IRL0_MARK),
866
867 /* PCC */
868 PINMUX_GPIO(GPIO_FN_PCC_REG, PCC_REG_MARK),
869 PINMUX_GPIO(GPIO_FN_PCC_DRV, PCC_DRV_MARK),
870 PINMUX_GPIO(GPIO_FN_PCC_BVD2, PCC_BVD2_MARK),
871 PINMUX_GPIO(GPIO_FN_PCC_BVD1, PCC_BVD1_MARK),
872 PINMUX_GPIO(GPIO_FN_PCC_CD2, PCC_CD2_MARK),
873 PINMUX_GPIO(GPIO_FN_PCC_CD1, PCC_CD1_MARK),
874 PINMUX_GPIO(GPIO_FN_PCC_RESET, PCC_RESET_MARK),
875 PINMUX_GPIO(GPIO_FN_PCC_RDY, PCC_RDY_MARK),
876 PINMUX_GPIO(GPIO_FN_PCC_VS2, PCC_VS2_MARK),
877 PINMUX_GPIO(GPIO_FN_PCC_VS1, PCC_VS1_MARK),
878
879 /* HUDI */
880 PINMUX_GPIO(GPIO_FN_AUDATA3, AUDATA3_MARK),
881 PINMUX_GPIO(GPIO_FN_AUDATA2, AUDATA2_MARK),
882 PINMUX_GPIO(GPIO_FN_AUDATA1, AUDATA1_MARK),
883 PINMUX_GPIO(GPIO_FN_AUDATA0, AUDATA0_MARK),
884 PINMUX_GPIO(GPIO_FN_AUDCK, AUDCK_MARK),
885 PINMUX_GPIO(GPIO_FN_AUDSYNC, AUDSYNC_MARK),
886 PINMUX_GPIO(GPIO_FN_ASEBRKAK, ASEBRKAK_MARK),
887 PINMUX_GPIO(GPIO_FN_TRST, TRST_MARK),
888 PINMUX_GPIO(GPIO_FN_TMS, TMS_MARK),
889 PINMUX_GPIO(GPIO_FN_TDO, TDO_MARK),
890 PINMUX_GPIO(GPIO_FN_TDI, TDI_MARK),
891 PINMUX_GPIO(GPIO_FN_TCK, TCK_MARK),
892
893 /* DMAC */
894 PINMUX_GPIO(GPIO_FN_DACK1, DACK1_MARK),
895 PINMUX_GPIO(GPIO_FN_DREQ1, DREQ1_MARK),
896 PINMUX_GPIO(GPIO_FN_DACK0, DACK0_MARK),
897 PINMUX_GPIO(GPIO_FN_DREQ0, DREQ0_MARK),
898 PINMUX_GPIO(GPIO_FN_TEND1, TEND1_MARK),
899 PINMUX_GPIO(GPIO_FN_TEND0, TEND0_MARK),
900
901 /* SIOF0 */
902 PINMUX_GPIO(GPIO_FN_SIOF0_SYNC, SIOF0_SYNC_MARK),
903 PINMUX_GPIO(GPIO_FN_SIOF0_MCLK, SIOF0_MCLK_MARK),
904 PINMUX_GPIO(GPIO_FN_SIOF0_TXD, SIOF0_TXD_MARK),
905 PINMUX_GPIO(GPIO_FN_SIOF0_RXD, SIOF0_RXD_MARK),
906 PINMUX_GPIO(GPIO_FN_SIOF0_SCK, SIOF0_SCK_MARK),
907
908 /* SIOF1 */
909 PINMUX_GPIO(GPIO_FN_SIOF1_SYNC, SIOF1_SYNC_MARK),
910 PINMUX_GPIO(GPIO_FN_SIOF1_MCLK, SIOF1_MCLK_MARK),
911 PINMUX_GPIO(GPIO_FN_SIOF1_TXD, SIOF1_TXD_MARK),
912 PINMUX_GPIO(GPIO_FN_SIOF1_RXD, SIOF1_RXD_MARK),
913 PINMUX_GPIO(GPIO_FN_SIOF1_SCK, SIOF1_SCK_MARK),
914
915 /* SCIF0 */
916 PINMUX_GPIO(GPIO_FN_SCIF0_TXD, SCIF0_TXD_MARK),
917 PINMUX_GPIO(GPIO_FN_SCIF0_RXD, SCIF0_RXD_MARK),
918 PINMUX_GPIO(GPIO_FN_SCIF0_RTS, SCIF0_RTS_MARK),
919 PINMUX_GPIO(GPIO_FN_SCIF0_CTS, SCIF0_CTS_MARK),
920 PINMUX_GPIO(GPIO_FN_SCIF0_SCK, SCIF0_SCK_MARK),
921
922 /* SCIF1 */
923 PINMUX_GPIO(GPIO_FN_SCIF1_TXD, SCIF1_TXD_MARK),
924 PINMUX_GPIO(GPIO_FN_SCIF1_RXD, SCIF1_RXD_MARK),
925 PINMUX_GPIO(GPIO_FN_SCIF1_RTS, SCIF1_RTS_MARK),
926 PINMUX_GPIO(GPIO_FN_SCIF1_CTS, SCIF1_CTS_MARK),
927 PINMUX_GPIO(GPIO_FN_SCIF1_SCK, SCIF1_SCK_MARK),
928
929 /* TPU */
930 PINMUX_GPIO(GPIO_FN_TPU_TO1, TPU_TO1_MARK),
931 PINMUX_GPIO(GPIO_FN_TPU_TO0, TPU_TO0_MARK),
932 PINMUX_GPIO(GPIO_FN_TPU_TI3B, TPU_TI3B_MARK),
933 PINMUX_GPIO(GPIO_FN_TPU_TI3A, TPU_TI3A_MARK),
934 PINMUX_GPIO(GPIO_FN_TPU_TI2B, TPU_TI2B_MARK),
935 PINMUX_GPIO(GPIO_FN_TPU_TI2A, TPU_TI2A_MARK),
936 PINMUX_GPIO(GPIO_FN_TPU_TO3, TPU_TO3_MARK),
937 PINMUX_GPIO(GPIO_FN_TPU_TO2, TPU_TO2_MARK),
938
939 /* SIM */
940 PINMUX_GPIO(GPIO_FN_SIM_D, SIM_D_MARK),
941 PINMUX_GPIO(GPIO_FN_SIM_CLK, SIM_CLK_MARK),
942 PINMUX_GPIO(GPIO_FN_SIM_RST, SIM_RST_MARK),
943
944 /* MMC */
945 PINMUX_GPIO(GPIO_FN_MMC_DAT, MMC_DAT_MARK),
946 PINMUX_GPIO(GPIO_FN_MMC_CMD, MMC_CMD_MARK),
947 PINMUX_GPIO(GPIO_FN_MMC_CLK, MMC_CLK_MARK),
948 PINMUX_GPIO(GPIO_FN_MMC_VDDON, MMC_VDDON_MARK),
949 PINMUX_GPIO(GPIO_FN_MMC_ODMOD, MMC_ODMOD_MARK),
950
951 /* SYSC */
952 PINMUX_GPIO(GPIO_FN_STATUS0, STATUS0_MARK),
953 PINMUX_GPIO(GPIO_FN_STATUS1, STATUS1_MARK),
954};
955
956static struct pinmux_cfg_reg pinmux_config_regs[] = {
957 { PINMUX_CFG_REG("PACR", 0xa4050100, 16, 2) {
958 PTA7_FN, PTA7_OUT, PTA7_IN_PU, PTA7_IN,
959 PTA6_FN, PTA6_OUT, PTA6_IN_PU, PTA6_IN,
960 PTA5_FN, PTA5_OUT, PTA5_IN_PU, PTA5_IN,
961 PTA4_FN, PTA4_OUT, PTA4_IN_PU, PTA4_IN,
962 PTA3_FN, PTA3_OUT, PTA3_IN_PU, PTA3_IN,
963 PTA2_FN, PTA2_OUT, PTA2_IN_PU, PTA2_IN,
964 PTA1_FN, PTA1_OUT, PTA1_IN_PU, PTA1_IN,
965 PTA0_FN, PTA0_OUT, PTA0_IN_PU, PTA0_IN }
966 },
967 { PINMUX_CFG_REG("PBCR", 0xa4050102, 16, 2) {
968 PTB7_FN, PTB7_OUT, PTB7_IN_PU, PTB7_IN,
969 PTB6_FN, PTB6_OUT, PTB6_IN_PU, PTB6_IN,
970 PTB5_FN, PTB5_OUT, PTB5_IN_PU, PTB5_IN,
971 PTB4_FN, PTB4_OUT, PTB4_IN_PU, PTB4_IN,
972 PTB3_FN, PTB3_OUT, PTB3_IN_PU, PTB3_IN,
973 PTB2_FN, PTB2_OUT, PTB2_IN_PU, PTB2_IN,
974 PTB1_FN, PTB1_OUT, PTB1_IN_PU, PTB1_IN,
975 PTB0_FN, PTB0_OUT, PTB0_IN_PU, PTB0_IN }
976 },
977 { PINMUX_CFG_REG("PCCR", 0xa4050104, 16, 2) {
978 PTC7_FN, PTC7_OUT, PTC7_IN_PU, PTC7_IN,
979 PTC6_FN, PTC6_OUT, PTC6_IN_PU, PTC6_IN,
980 PTC5_FN, PTC5_OUT, PTC5_IN_PU, PTC5_IN,
981 PTC4_FN, PTC4_OUT, PTC4_IN_PU, PTC4_IN,
982 PTC3_FN, PTC3_OUT, PTC3_IN_PU, PTC3_IN,
983 PTC2_FN, PTC2_OUT, PTC2_IN_PU, PTC2_IN,
984 PTC1_FN, PTC1_OUT, PTC1_IN_PU, PTC1_IN,
985 PTC0_FN, PTC0_OUT, PTC0_IN_PU, PTC0_IN }
986 },
987 { PINMUX_CFG_REG("PDCR", 0xa4050106, 16, 2) {
988 PTD7_FN, PTD7_OUT, PTD7_IN_PU, PTD7_IN,
989 PTD6_FN, PTD6_OUT, PTD6_IN_PU, PTD6_IN,
990 PTD5_FN, PTD5_OUT, PTD5_IN_PU, PTD5_IN,
991 PTD4_FN, PTD4_OUT, PTD4_IN_PU, PTD4_IN,
992 PTD3_FN, PTD3_OUT, PTD3_IN_PU, PTD3_IN,
993 PTD2_FN, PTD2_OUT, PTD2_IN_PU, PTD2_IN,
994 PTD1_FN, PTD1_OUT, PTD1_IN_PU, PTD1_IN,
995 PTD0_FN, PTD0_OUT, PTD0_IN_PU, PTD0_IN }
996 },
997 { PINMUX_CFG_REG("PECR", 0xa4050108, 16, 2) {
998 0, 0, 0, 0,
999 PTE6_FN, 0, 0, PTE6_IN,
1000 PTE5_FN, 0, 0, PTE5_IN,
1001 PTE4_FN, PTE4_OUT, PTE4_IN_PU, PTE4_IN,
1002 PTE3_FN, PTE3_OUT, PTE3_IN_PU, PTE3_IN,
1003 PTE2_FN, PTE2_OUT, PTE2_IN_PU, PTE2_IN,
1004 PTE1_FN, PTE1_OUT, PTE1_IN_PU, PTE1_IN,
1005 PTE0_FN, PTE0_OUT, PTE0_IN_PU, PTE0_IN }
1006 },
1007 { PINMUX_CFG_REG("PFCR", 0xa405010a, 16, 2) {
1008 0, 0, 0, 0,
1009 PTF6_FN, 0, 0, PTF6_IN,
1010 PTF5_FN, 0, 0, PTF5_IN,
1011 PTF4_FN, 0, 0, PTF4_IN,
1012 PTF3_FN, 0, 0, PTF3_IN,
1013 PTF2_FN, 0, 0, PTF2_IN,
1014 PTF1_FN, 0, 0, PTF1_IN,
1015 PTF0_FN, 0, 0, PTF0_IN }
1016 },
1017 { PINMUX_CFG_REG("PGCR", 0xa405010c, 16, 2) {
1018 0, 0, 0, 0,
1019 PTG6_FN, PTG6_OUT, PTG6_IN_PU, PTG6_IN,
1020 PTG5_FN, PTG5_OUT, PTG5_IN_PU, PTG5_IN,
1021 PTG4_FN, PTG4_OUT, PTG4_IN_PU, PTG4_IN,
1022 PTG3_FN, PTG3_OUT, PTG3_IN_PU, PTG3_IN,
1023 PTG2_FN, PTG2_OUT, PTG2_IN_PU, PTG2_IN,
1024 PTG1_FN, PTG1_OUT, PTG1_IN_PU, PTG1_IN,
1025 PTG0_FN, PTG0_OUT, PTG0_IN_PU, PTG0_IN }
1026 },
1027 { PINMUX_CFG_REG("PHCR", 0xa405010e, 16, 2) {
1028 0, 0, 0, 0,
1029 PTH6_FN, PTH6_OUT, PTH6_IN_PU, PTH6_IN,
1030 PTH5_FN, PTH5_OUT, PTH5_IN_PU, PTH5_IN,
1031 PTH4_FN, PTH4_OUT, PTH4_IN_PU, PTH4_IN,
1032 PTH3_FN, PTH3_OUT, PTH3_IN_PU, PTH3_IN,
1033 PTH2_FN, PTH2_OUT, PTH2_IN_PU, PTH2_IN,
1034 PTH1_FN, PTH1_OUT, PTH1_IN_PU, PTH1_IN,
1035 PTH0_FN, PTH0_OUT, PTH0_IN_PU, PTH0_IN }
1036 },
1037 { PINMUX_CFG_REG("PJCR", 0xa4050110, 16, 2) {
1038 0, 0, 0, 0,
1039 PTJ6_FN, PTJ6_OUT, PTJ6_IN_PU, PTJ6_IN,
1040 PTJ5_FN, PTJ5_OUT, PTJ5_IN_PU, PTJ5_IN,
1041 PTJ4_FN, PTJ4_OUT, PTJ4_IN_PU, PTJ4_IN,
1042 PTJ3_FN, PTJ3_OUT, PTJ3_IN_PU, PTJ3_IN,
1043 PTJ2_FN, PTJ2_OUT, PTJ2_IN_PU, PTJ2_IN,
1044 PTJ1_FN, PTJ1_OUT, PTJ1_IN_PU, PTJ1_IN,
1045 PTJ0_FN, PTJ0_OUT, PTJ0_IN_PU, PTJ0_IN }
1046 },
1047 { PINMUX_CFG_REG("PKCR", 0xa4050112, 16, 2) {
1048 0, 0, 0, 0,
1049 0, 0, 0, 0,
1050 0, 0, 0, 0,
1051 0, 0, 0, 0,
1052 PTK3_FN, PTK3_OUT, PTK3_IN_PU, PTK3_IN,
1053 PTK2_FN, PTK2_OUT, PTK2_IN_PU, PTK2_IN,
1054 PTK1_FN, PTK1_OUT, PTK1_IN_PU, PTK1_IN,
1055 PTK0_FN, PTK0_OUT, PTK0_IN_PU, PTK0_IN }
1056 },
1057 { PINMUX_CFG_REG("PLCR", 0xa4050114, 16, 2) {
1058 PTL7_FN, PTL7_OUT, PTL7_IN_PU, PTL7_IN,
1059 PTL6_FN, PTL6_OUT, PTL6_IN_PU, PTL6_IN,
1060 PTL5_FN, PTL5_OUT, PTL5_IN_PU, PTL5_IN,
1061 PTL4_FN, PTL4_OUT, PTL4_IN_PU, PTL4_IN,
1062 PTL3_FN, PTL3_OUT, PTL3_IN_PU, PTL3_IN,
1063 0, 0, 0, 0,
1064 0, 0, 0, 0,
1065 0, 0, 0, 0 }
1066 },
1067 { PINMUX_CFG_REG("PMCR", 0xa4050116, 16, 2) {
1068 PTM7_FN, PTM7_OUT, PTM7_IN_PU, PTM7_IN,
1069 PTM6_FN, PTM6_OUT, PTM6_IN_PU, PTM6_IN,
1070 PTM5_FN, PTM5_OUT, PTM5_IN_PU, PTM5_IN,
1071 PTM4_FN, PTM4_OUT, PTM4_IN_PU, PTM4_IN,
1072 PTM3_FN, PTM3_OUT, PTM3_IN_PU, PTM3_IN,
1073 PTM2_FN, PTM2_OUT, PTM2_IN_PU, PTM2_IN,
1074 PTM1_FN, PTM1_OUT, PTM1_IN_PU, PTM1_IN,
1075 PTM0_FN, PTM0_OUT, PTM0_IN_PU, PTM0_IN }
1076 },
1077 { PINMUX_CFG_REG("PPCR", 0xa4050118, 16, 2) {
1078 0, 0, 0, 0,
1079 0, 0, 0, 0,
1080 0, 0, 0, 0,
1081 PTP4_FN, PTP4_OUT, PTP4_IN_PU, PTP4_IN,
1082 PTP3_FN, PTP3_OUT, PTP3_IN_PU, PTP3_IN,
1083 PTP2_FN, PTP2_OUT, PTP2_IN_PU, PTP2_IN,
1084 PTP1_FN, PTP1_OUT, PTP1_IN_PU, PTP1_IN,
1085 PTP0_FN, PTP0_OUT, PTP0_IN_PU, PTP0_IN }
1086 },
1087 { PINMUX_CFG_REG("PRCR", 0xa405011a, 16, 2) {
1088 PTR7_FN, PTR7_OUT, PTR7_IN_PU, PTR7_IN,
1089 PTR6_FN, PTR6_OUT, PTR6_IN_PU, PTR6_IN,
1090 PTR5_FN, PTR5_OUT, PTR5_IN_PU, PTR5_IN,
1091 PTR4_FN, PTR4_OUT, PTR4_IN_PU, PTR4_IN,
1092 PTR3_FN, PTR3_OUT, PTR3_IN_PU, PTR3_IN,
1093 PTR2_FN, PTR2_OUT, PTR2_IN_PU, PTR2_IN,
1094 PTR1_FN, PTR1_OUT, PTR1_IN_PU, PTR1_IN,
1095 PTR0_FN, PTR0_OUT, PTR0_IN_PU, PTR0_IN }
1096 },
1097 { PINMUX_CFG_REG("PSCR", 0xa405011c, 16, 2) {
1098 0, 0, 0, 0,
1099 0, 0, 0, 0,
1100 0, 0, 0, 0,
1101 PTS4_FN, PTS4_OUT, PTS4_IN_PU, PTS4_IN,
1102 PTS3_FN, PTS3_OUT, PTS3_IN_PU, PTS3_IN,
1103 PTS2_FN, PTS2_OUT, PTS2_IN_PU, PTS2_IN,
1104 PTS1_FN, PTS1_OUT, PTS1_IN_PU, PTS1_IN,
1105 PTS0_FN, PTS0_OUT, PTS0_IN_PU, PTS0_IN }
1106 },
1107 { PINMUX_CFG_REG("PTCR", 0xa405011e, 16, 2) {
1108 0, 0, 0, 0,
1109 0, 0, 0, 0,
1110 0, 0, 0, 0,
1111 PTT4_FN, PTT4_OUT, PTT4_IN_PU, PTT4_IN,
1112 PTT3_FN, PTT3_OUT, PTT3_IN_PU, PTT3_IN,
1113 PTT2_FN, PTT2_OUT, PTT2_IN_PU, PTT2_IN,
1114 PTT1_FN, PTT1_OUT, PTT1_IN_PU, PTT1_IN,
1115 PTT0_FN, PTT0_OUT, PTT0_IN_PU, PTT0_IN }
1116 },
1117 { PINMUX_CFG_REG("PUCR", 0xa4050120, 16, 2) {
1118 0, 0, 0, 0,
1119 0, 0, 0, 0,
1120 0, 0, 0, 0,
1121 PTU4_FN, PTU4_OUT, PTU4_IN_PU, PTU4_IN,
1122 PTU3_FN, PTU3_OUT, PTU3_IN_PU, PTU3_IN,
1123 PTU2_FN, PTU2_OUT, PTU2_IN_PU, PTU2_IN,
1124 PTU1_FN, PTU1_OUT, PTU1_IN_PU, PTU1_IN,
1125 PTU0_FN, PTU0_OUT, PTU0_IN_PU, PTU0_IN }
1126 },
1127 { PINMUX_CFG_REG("PVCR", 0xa4050122, 16, 2) {
1128 0, 0, 0, 0,
1129 0, 0, 0, 0,
1130 0, 0, 0, 0,
1131 PTV4_FN, PTV4_OUT, PTV4_IN_PU, PTV4_IN,
1132 PTV3_FN, PTV3_OUT, PTV3_IN_PU, PTV3_IN,
1133 PTV2_FN, PTV2_OUT, PTV2_IN_PU, PTV2_IN,
1134 PTV1_FN, PTV1_OUT, PTV1_IN_PU, PTV1_IN,
1135 PTV0_FN, PTV0_OUT, PTV0_IN_PU, PTV0_IN }
1136 },
1137 {}
1138};
1139
1140static struct pinmux_data_reg pinmux_data_regs[] = {
1141 { PINMUX_DATA_REG("PADR", 0xa4050140, 8) {
1142 PTA7_DATA, PTA6_DATA, PTA5_DATA, PTA4_DATA,
1143 PTA3_DATA, PTA2_DATA, PTA1_DATA, PTA0_DATA }
1144 },
1145 { PINMUX_DATA_REG("PBDR", 0xa4050142, 8) {
1146 PTB7_DATA, PTB6_DATA, PTB5_DATA, PTB4_DATA,
1147 PTB3_DATA, PTB2_DATA, PTB1_DATA, PTB0_DATA }
1148 },
1149 { PINMUX_DATA_REG("PCDR", 0xa4050144, 8) {
1150 PTC7_DATA, PTC6_DATA, PTC5_DATA, PTC4_DATA,
1151 PTC3_DATA, PTC2_DATA, PTC1_DATA, PTC0_DATA }
1152 },
1153 { PINMUX_DATA_REG("PDDR", 0xa4050126, 8) {
1154 PTD7_DATA, PTD6_DATA, PTD5_DATA, PTD4_DATA,
1155 PTD3_DATA, PTD2_DATA, PTD1_DATA, PTD0_DATA }
1156 },
1157 { PINMUX_DATA_REG("PEDR", 0xa4050148, 8) {
1158 0, PTE6_DATA, PTE5_DATA, PTE4_DATA,
1159 PTE3_DATA, PTE2_DATA, PTE1_DATA, PTE0_DATA }
1160 },
1161 { PINMUX_DATA_REG("PFDR", 0xa405014a, 8) {
1162 0, PTF6_DATA, PTF5_DATA, PTF4_DATA,
1163 PTF3_DATA, PTF2_DATA, PTF1_DATA, PTF0_DATA }
1164 },
1165 { PINMUX_DATA_REG("PGDR", 0xa405014c, 8) {
1166 0, PTG6_DATA, PTG5_DATA, PTG4_DATA,
1167 PTG3_DATA, PTG2_DATA, PTG1_DATA, PTG0_DATA }
1168 },
1169 { PINMUX_DATA_REG("PHDR", 0xa405014e, 8) {
1170 0, PTH6_DATA, PTH5_DATA, PTH4_DATA,
1171 PTH3_DATA, PTH2_DATA, PTH1_DATA, PTH0_DATA }
1172 },
1173 { PINMUX_DATA_REG("PJDR", 0xa4050150, 8) {
1174 0, PTJ6_DATA, PTJ5_DATA, PTJ4_DATA,
1175 PTJ3_DATA, PTJ2_DATA, PTJ1_DATA, PTJ0_DATA }
1176 },
1177 { PINMUX_DATA_REG("PKDR", 0xa4050152, 8) {
1178 0, 0, 0, 0,
1179 PTK3_DATA, PTK2_DATA, PTK1_DATA, PTK0_DATA }
1180 },
1181 { PINMUX_DATA_REG("PLDR", 0xa4050154, 8) {
1182 PTL7_DATA, PTL6_DATA, PTL5_DATA, PTL4_DATA,
1183 PTL3_DATA, 0, 0, 0 }
1184 },
1185 { PINMUX_DATA_REG("PMDR", 0xa4050156, 8) {
1186 PTM7_DATA, PTM6_DATA, PTM5_DATA, PTM4_DATA,
1187 PTM3_DATA, PTM2_DATA, PTM1_DATA, PTM0_DATA }
1188 },
1189 { PINMUX_DATA_REG("PPDR", 0xa4050158, 8) {
1190 0, 0, 0, PTP4_DATA,
1191 PTP3_DATA, PTP2_DATA, PTP1_DATA, PTP0_DATA }
1192 },
1193 { PINMUX_DATA_REG("PRDR", 0xa405015a, 8) {
1194 PTR7_DATA, PTR6_DATA, PTR5_DATA, PTR4_DATA,
1195 PTR3_DATA, PTR2_DATA, PTR1_DATA, PTR0_DATA }
1196 },
1197 { PINMUX_DATA_REG("PSDR", 0xa405015c, 8) {
1198 0, 0, 0, PTS4_DATA,
1199 PTS3_DATA, PTS2_DATA, PTS1_DATA, PTS0_DATA }
1200 },
1201 { PINMUX_DATA_REG("PTDR", 0xa405015e, 8) {
1202 0, 0, 0, PTT4_DATA,
1203 PTT3_DATA, PTT2_DATA, PTT1_DATA, PTT0_DATA }
1204 },
1205 { PINMUX_DATA_REG("PUDR", 0xa4050160, 8) {
1206 0, 0, 0, PTU4_DATA,
1207 PTU3_DATA, PTU2_DATA, PTU1_DATA, PTU0_DATA }
1208 },
1209 { PINMUX_DATA_REG("PVDR", 0xa4050162, 8) {
1210 0, 0, 0, PTV4_DATA,
1211 PTV3_DATA, PTV2_DATA, PTV1_DATA, PTV0_DATA }
1212 },
1213 { },
1214};
1215
1216static struct pinmux_info sh7720_pinmux_info = {
1217 .name = "sh7720_pfc",
1218 .reserved_id = PINMUX_RESERVED,
1219 .data = { PINMUX_DATA_BEGIN, PINMUX_DATA_END },
1220 .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END },
1221 .input_pu = { PINMUX_INPUT_PULLUP_BEGIN, PINMUX_INPUT_PULLUP_END },
1222 .output = { PINMUX_OUTPUT_BEGIN, PINMUX_OUTPUT_END },
1223 .mark = { PINMUX_MARK_BEGIN, PINMUX_MARK_END },
1224 .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
1225
1226 .first_gpio = GPIO_PTA7,
1227 .last_gpio = GPIO_FN_STATUS1,
1228
1229 .gpios = pinmux_gpios,
1230 .cfg_regs = pinmux_config_regs,
1231 .data_regs = pinmux_data_regs,
1232
1233 .gpio_data = pinmux_data,
1234 .gpio_data_size = ARRAY_SIZE(pinmux_data),
1235};
1236
1237static int __init plat_pinmux_setup(void)
1238{
1239 return register_pinmux(&sh7720_pinmux_info);
1240}
1241
1242arch_initcall(plat_pinmux_setup);
diff --git a/arch/sh/kernel/cpu/sh4/fpu.c b/arch/sh/kernel/cpu/sh4/fpu.c
index 2d452f67fb8..2780917c008 100644
--- a/arch/sh/kernel/cpu/sh4/fpu.c
+++ b/arch/sh/kernel/cpu/sh4/fpu.c
@@ -36,7 +36,7 @@ extern unsigned long int float32_add(unsigned long int a, unsigned long int b);
36extern unsigned long long float64_sub(unsigned long long a, 36extern unsigned long long float64_sub(unsigned long long a,
37 unsigned long long b); 37 unsigned long long b);
38extern unsigned long int float32_sub(unsigned long int a, unsigned long int b); 38extern unsigned long int float32_sub(unsigned long int a, unsigned long int b);
39 39extern unsigned long int float64_to_float32(unsigned long long a);
40static unsigned int fpu_exception_flags; 40static unsigned int fpu_exception_flags;
41 41
42/* 42/*
@@ -417,6 +417,29 @@ static int ieee_fpe_handler(struct pt_regs *regs)
417 417
418 regs->pc = nextpc; 418 regs->pc = nextpc;
419 return 1; 419 return 1;
420 } else if ((finsn & 0xf0bd) == 0xf0bd) {
421 /* fcnvds - double to single precision convert */
422 struct task_struct *tsk = current;
423 int m;
424 unsigned int hx;
425
426 m = (finsn >> 9) & 0x7;
427 hx = tsk->thread.fpu.hard.fp_regs[m];
428
429 if ((tsk->thread.fpu.hard.fpscr & FPSCR_CAUSE_ERROR)
430 && ((hx & 0x7fffffff) < 0x00100000)) {
431 /* subnormal double to float conversion */
432 long long llx;
433
434 llx = ((long long)tsk->thread.fpu.hard.fp_regs[m] << 32)
435 | tsk->thread.fpu.hard.fp_regs[m + 1];
436
437 tsk->thread.fpu.hard.fpul = float64_to_float32(llx);
438 } else
439 return 0;
440
441 regs->pc = nextpc;
442 return 1;
420 } 443 }
421 444
422 return 0; 445 return 0;
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7760.c b/arch/sh/kernel/cpu/sh4/setup-sh7760.c
index 254c5c55ab9..d9bdc931ac0 100644
--- a/arch/sh/kernel/cpu/sh4/setup-sh7760.c
+++ b/arch/sh/kernel/cpu/sh4/setup-sh7760.c
@@ -11,6 +11,7 @@
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/serial.h> 12#include <linux/serial.h>
13#include <linux/serial_sci.h> 13#include <linux/serial_sci.h>
14#include <linux/io.h>
14 15
15enum { 16enum {
16 UNUSED = 0, 17 UNUSED = 0,
@@ -178,10 +179,14 @@ static int __init sh7760_devices_setup(void)
178} 179}
179__initcall(sh7760_devices_setup); 180__initcall(sh7760_devices_setup);
180 181
182#define INTC_ICR 0xffd00000UL
183#define INTC_ICR_IRLM (1 << 7)
184
181void __init plat_irq_setup_pins(int mode) 185void __init plat_irq_setup_pins(int mode)
182{ 186{
183 switch (mode) { 187 switch (mode) {
184 case IRQ_MODE_IRQ: 188 case IRQ_MODE_IRQ:
189 ctrl_outw(ctrl_inw(INTC_ICR) | INTC_ICR_IRLM, INTC_ICR);
185 register_intc_controller(&intc_desc_irq); 190 register_intc_controller(&intc_desc_irq);
186 break; 191 break;
187 default: 192 default:
diff --git a/arch/sh/kernel/cpu/sh4/softfloat.c b/arch/sh/kernel/cpu/sh4/softfloat.c
index 828cb57cb95..2b747f3b02b 100644
--- a/arch/sh/kernel/cpu/sh4/softfloat.c
+++ b/arch/sh/kernel/cpu/sh4/softfloat.c
@@ -85,6 +85,7 @@ float64 float64_div(float64 a, float64 b);
85float32 float32_div(float32 a, float32 b); 85float32 float32_div(float32 a, float32 b);
86float32 float32_mul(float32 a, float32 b); 86float32 float32_mul(float32 a, float32 b);
87float64 float64_mul(float64 a, float64 b); 87float64 float64_mul(float64 a, float64 b);
88float32 float64_to_float32(float64 a);
88inline void add128(bits64 a0, bits64 a1, bits64 b0, bits64 b1, bits64 * z0Ptr, 89inline void add128(bits64 a0, bits64 a1, bits64 b0, bits64 b1, bits64 * z0Ptr,
89 bits64 * z1Ptr); 90 bits64 * z1Ptr);
90inline void sub128(bits64 a0, bits64 a1, bits64 b0, bits64 b1, bits64 * z0Ptr, 91inline void sub128(bits64 a0, bits64 a1, bits64 b0, bits64 b1, bits64 * z0Ptr,
@@ -890,3 +891,31 @@ float64 float64_mul(float64 a, float64 b)
890 } 891 }
891 return roundAndPackFloat64(zSign, zExp, zSig0); 892 return roundAndPackFloat64(zSign, zExp, zSig0);
892} 893}
894
895/*
896 * -------------------------------------------------------------------------------
897 * Returns the result of converting the double-precision floating-point value
898 * `a' to the single-precision floating-point format. The conversion is
899 * performed according to the IEC/IEEE Standard for Binary Floating-point
900 * Arithmetic.
901 * -------------------------------------------------------------------------------
902 * */
903float32 float64_to_float32(float64 a)
904{
905 flag aSign;
906 int16 aExp;
907 bits64 aSig;
908 bits32 zSig;
909
910 aSig = extractFloat64Frac( a );
911 aExp = extractFloat64Exp( a );
912 aSign = extractFloat64Sign( a );
913
914 shift64RightJamming( aSig, 22, &aSig );
915 zSig = aSig;
916 if ( aExp || zSig ) {
917 zSig |= 0x40000000;
918 aExp -= 0x381;
919 }
920 return roundAndPackFloat32(aSign, aExp, zSig);
921}
diff --git a/arch/sh/kernel/cpu/sh4a/Makefile b/arch/sh/kernel/cpu/sh4a/Makefile
index 9381ad8da26..be9a0c18595 100644
--- a/arch/sh/kernel/cpu/sh4a/Makefile
+++ b/arch/sh/kernel/cpu/sh4a/Makefile
@@ -27,5 +27,10 @@ clock-$(CONFIG_CPU_SUBTYPE_SH7723) := clock-sh7722.o
27clock-$(CONFIG_CPU_SUBTYPE_SH7366) := clock-sh7722.o 27clock-$(CONFIG_CPU_SUBTYPE_SH7366) := clock-sh7722.o
28clock-$(CONFIG_CPU_SUBTYPE_SHX3) := clock-shx3.o 28clock-$(CONFIG_CPU_SUBTYPE_SHX3) := clock-shx3.o
29 29
30# Pinmux setup
31pinmux-$(CONFIG_CPU_SUBTYPE_SH7722) := pinmux-sh7722.o
32pinmux-$(CONFIG_CPU_SUBTYPE_SH7723) := pinmux-sh7723.o
33
30obj-y += $(clock-y) 34obj-y += $(clock-y)
31obj-$(CONFIG_SMP) += $(smp-y) 35obj-$(CONFIG_SMP) += $(smp-y)
36obj-$(CONFIG_GENERIC_GPIO) += $(pinmux-y)
diff --git a/arch/sh/kernel/cpu/sh4a/pinmux-sh7722.c b/arch/sh/kernel/cpu/sh4a/pinmux-sh7722.c
new file mode 100644
index 00000000000..cb9d07bd59f
--- /dev/null
+++ b/arch/sh/kernel/cpu/sh4a/pinmux-sh7722.c
@@ -0,0 +1,1783 @@
1#include <linux/init.h>
2#include <linux/kernel.h>
3#include <linux/gpio.h>
4#include <cpu/sh7722.h>
5
6enum {
7 PINMUX_RESERVED = 0,
8
9 PINMUX_DATA_BEGIN,
10 PTA7_DATA, PTA6_DATA, PTA5_DATA, PTA4_DATA,
11 PTA3_DATA, PTA2_DATA, PTA1_DATA, PTA0_DATA,
12 PTB7_DATA, PTB6_DATA, PTB5_DATA, PTB4_DATA,
13 PTB3_DATA, PTB2_DATA, PTB1_DATA, PTB0_DATA,
14 PTC7_DATA, PTC5_DATA, PTC4_DATA, PTC3_DATA, PTC2_DATA, PTC0_DATA,
15 PTD7_DATA, PTD6_DATA, PTD5_DATA, PTD4_DATA,
16 PTD3_DATA, PTD2_DATA, PTD1_DATA, PTD0_DATA,
17 PTE7_DATA, PTE6_DATA, PTE5_DATA, PTE4_DATA, PTE1_DATA, PTE0_DATA,
18 PTF6_DATA, PTF5_DATA, PTF4_DATA,
19 PTF3_DATA, PTF2_DATA, PTF1_DATA, PTF0_DATA,
20 PTG4_DATA, PTG3_DATA, PTG2_DATA, PTG1_DATA, PTG0_DATA,
21 PTH7_DATA, PTH6_DATA, PTH5_DATA, PTH4_DATA,
22 PTH3_DATA, PTH2_DATA, PTH1_DATA, PTH0_DATA,
23 PTJ7_DATA, PTJ6_DATA, PTJ5_DATA, PTJ1_DATA, PTJ0_DATA,
24 PTK6_DATA, PTK5_DATA, PTK4_DATA,
25 PTK3_DATA, PTK2_DATA, PTK1_DATA, PTK0_DATA,
26 PTL7_DATA, PTL6_DATA, PTL5_DATA, PTL4_DATA,
27 PTL3_DATA, PTL2_DATA, PTL1_DATA, PTL0_DATA,
28 PTM7_DATA, PTM6_DATA, PTM5_DATA, PTM4_DATA,
29 PTM3_DATA, PTM2_DATA, PTM1_DATA, PTM0_DATA,
30 PTN7_DATA, PTN6_DATA, PTN5_DATA, PTN4_DATA,
31 PTN3_DATA, PTN2_DATA, PTN1_DATA, PTN0_DATA,
32 PTQ6_DATA, PTQ5_DATA, PTQ4_DATA,
33 PTQ3_DATA, PTQ2_DATA, PTQ1_DATA, PTQ0_DATA,
34 PTR4_DATA, PTR3_DATA, PTR2_DATA, PTR1_DATA, PTR0_DATA,
35 PTS4_DATA, PTS3_DATA, PTS2_DATA, PTS1_DATA, PTS0_DATA,
36 PTT4_DATA, PTT3_DATA, PTT2_DATA, PTT1_DATA, PTT0_DATA,
37 PTU4_DATA, PTU3_DATA, PTU2_DATA, PTU1_DATA, PTU0_DATA,
38 PTV4_DATA, PTV3_DATA, PTV2_DATA, PTV1_DATA, PTV0_DATA,
39 PTW6_DATA, PTW5_DATA, PTW4_DATA,
40 PTW3_DATA, PTW2_DATA, PTW1_DATA, PTW0_DATA,
41 PTX6_DATA, PTX5_DATA, PTX4_DATA,
42 PTX3_DATA, PTX2_DATA, PTX1_DATA, PTX0_DATA,
43 PTY6_DATA, PTY5_DATA, PTY4_DATA,
44 PTY3_DATA, PTY2_DATA, PTY1_DATA, PTY0_DATA,
45 PTZ5_DATA, PTZ4_DATA, PTZ3_DATA, PTZ2_DATA, PTZ1_DATA, PTZ0_DATA,
46 PINMUX_DATA_END,
47
48 PINMUX_INPUT_BEGIN,
49 PTA7_IN, PTA6_IN, PTA5_IN, PTA4_IN,
50 PTA3_IN, PTA2_IN, PTA1_IN, PTA0_IN,
51 PTB7_IN, PTB6_IN, PTB5_IN, PTB4_IN,
52 PTB3_IN, PTB2_IN, PTB1_IN, PTB0_IN,
53 PTC7_IN, PTC5_IN, PTC4_IN, PTC3_IN, PTC2_IN, PTC0_IN,
54 PTD7_IN, PTD6_IN, PTD5_IN, PTD4_IN, PTD3_IN, PTD2_IN, PTD1_IN,
55 PTE7_IN, PTE6_IN, PTE5_IN, PTE4_IN, PTE1_IN, PTE0_IN,
56 PTF6_IN, PTF5_IN, PTF4_IN, PTF3_IN, PTF2_IN, PTF1_IN,
57 PTH6_IN, PTH5_IN, PTH1_IN, PTH0_IN,
58 PTJ1_IN, PTJ0_IN,
59 PTK6_IN, PTK5_IN, PTK4_IN, PTK3_IN, PTK2_IN, PTK0_IN,
60 PTL7_IN, PTL6_IN, PTL5_IN, PTL4_IN,
61 PTL3_IN, PTL2_IN, PTL1_IN, PTL0_IN,
62 PTM7_IN, PTM6_IN, PTM5_IN, PTM4_IN,
63 PTM3_IN, PTM2_IN, PTM1_IN, PTM0_IN,
64 PTN7_IN, PTN6_IN, PTN5_IN, PTN4_IN,
65 PTN3_IN, PTN2_IN, PTN1_IN, PTN0_IN,
66 PTQ5_IN, PTQ4_IN, PTQ3_IN, PTQ2_IN, PTQ0_IN,
67 PTR2_IN,
68 PTS4_IN, PTS2_IN, PTS1_IN,
69 PTT4_IN, PTT3_IN, PTT2_IN, PTT1_IN,
70 PTU4_IN, PTU3_IN, PTU2_IN, PTU1_IN, PTU0_IN,
71 PTV4_IN, PTV3_IN, PTV2_IN, PTV1_IN, PTV0_IN,
72 PTW6_IN, PTW4_IN, PTW3_IN, PTW2_IN, PTW1_IN, PTW0_IN,
73 PTX6_IN, PTX5_IN, PTX4_IN, PTX3_IN, PTX2_IN, PTX1_IN, PTX0_IN,
74 PTY5_IN, PTY4_IN, PTY3_IN, PTY2_IN, PTY0_IN,
75 PTZ5_IN, PTZ4_IN, PTZ3_IN, PTZ2_IN, PTZ1_IN,
76 PINMUX_INPUT_END,
77
78 PINMUX_INPUT_PULLDOWN_BEGIN,
79 PTA7_IN_PD, PTA6_IN_PD, PTA5_IN_PD, PTA4_IN_PD,
80 PTA3_IN_PD, PTA2_IN_PD, PTA1_IN_PD, PTA0_IN_PD,
81 PTE7_IN_PD, PTE6_IN_PD, PTE5_IN_PD, PTE4_IN_PD, PTE1_IN_PD, PTE0_IN_PD,
82 PTF6_IN_PD, PTF5_IN_PD, PTF4_IN_PD, PTF3_IN_PD, PTF2_IN_PD, PTF1_IN_PD,
83 PTH6_IN_PD, PTH5_IN_PD, PTH1_IN_PD, PTH0_IN_PD,
84 PTK6_IN_PD, PTK5_IN_PD, PTK4_IN_PD, PTK3_IN_PD, PTK2_IN_PD, PTK0_IN_PD,
85 PTL7_IN_PD, PTL6_IN_PD, PTL5_IN_PD, PTL4_IN_PD,
86 PTL3_IN_PD, PTL2_IN_PD, PTL1_IN_PD, PTL0_IN_PD,
87 PTM7_IN_PD, PTM6_IN_PD, PTM5_IN_PD, PTM4_IN_PD,
88 PTM3_IN_PD, PTM2_IN_PD, PTM1_IN_PD, PTM0_IN_PD,
89 PTQ5_IN_PD, PTQ4_IN_PD, PTQ3_IN_PD, PTQ2_IN_PD,
90 PTS4_IN_PD, PTS2_IN_PD, PTS1_IN_PD,
91 PTT4_IN_PD, PTT3_IN_PD, PTT2_IN_PD, PTT1_IN_PD,
92 PTU4_IN_PD, PTU3_IN_PD, PTU2_IN_PD, PTU1_IN_PD, PTU0_IN_PD,
93 PTV4_IN_PD, PTV3_IN_PD, PTV2_IN_PD, PTV1_IN_PD, PTV0_IN_PD,
94 PTW6_IN_PD, PTW4_IN_PD, PTW3_IN_PD, PTW2_IN_PD, PTW1_IN_PD, PTW0_IN_PD,
95 PTX6_IN_PD, PTX5_IN_PD, PTX4_IN_PD,
96 PTX3_IN_PD, PTX2_IN_PD, PTX1_IN_PD, PTX0_IN_PD,
97 PINMUX_INPUT_PULLDOWN_END,
98
99 PINMUX_INPUT_PULLUP_BEGIN,
100 PTC7_IN_PU, PTC5_IN_PU,
101 PTD7_IN_PU, PTD6_IN_PU, PTD5_IN_PU, PTD4_IN_PU,
102 PTD3_IN_PU, PTD2_IN_PU, PTD1_IN_PU,
103 PTJ1_IN_PU, PTJ0_IN_PU,
104 PTQ0_IN_PU,
105 PTR2_IN_PU,
106 PTX6_IN_PU,
107 PTY5_IN_PU, PTY4_IN_PU, PTY3_IN_PU, PTY2_IN_PU, PTY0_IN_PU,
108 PTZ5_IN_PU, PTZ4_IN_PU, PTZ3_IN_PU, PTZ2_IN_PU, PTZ1_IN_PU,
109 PINMUX_INPUT_PULLUP_END,
110
111 PINMUX_OUTPUT_BEGIN,
112 PTA7_OUT, PTA5_OUT,
113 PTB7_OUT, PTB6_OUT, PTB5_OUT, PTB4_OUT,
114 PTB3_OUT, PTB2_OUT, PTB1_OUT, PTB0_OUT,
115 PTC4_OUT, PTC3_OUT, PTC2_OUT, PTC0_OUT,
116 PTD6_OUT, PTD5_OUT, PTD4_OUT,
117 PTD3_OUT, PTD2_OUT, PTD1_OUT, PTD0_OUT,
118 PTE7_OUT, PTE6_OUT, PTE5_OUT, PTE4_OUT, PTE1_OUT, PTE0_OUT,
119 PTF6_OUT, PTF5_OUT, PTF4_OUT, PTF3_OUT, PTF2_OUT, PTF0_OUT,
120 PTG4_OUT, PTG3_OUT, PTG2_OUT, PTG1_OUT, PTG0_OUT,
121 PTH7_OUT, PTH6_OUT, PTH5_OUT, PTH4_OUT,
122 PTH3_OUT, PTH2_OUT, PTH1_OUT, PTH0_OUT,
123 PTJ7_OUT, PTJ6_OUT, PTJ5_OUT, PTJ1_OUT, PTJ0_OUT,
124 PTK6_OUT, PTK5_OUT, PTK4_OUT, PTK3_OUT, PTK1_OUT, PTK0_OUT,
125 PTL7_OUT, PTL6_OUT, PTL5_OUT, PTL4_OUT,
126 PTL3_OUT, PTL2_OUT, PTL1_OUT, PTL0_OUT,
127 PTM7_OUT, PTM6_OUT, PTM5_OUT, PTM4_OUT,
128 PTM3_OUT, PTM2_OUT, PTM1_OUT, PTM0_OUT,
129 PTN7_OUT, PTN6_OUT, PTN5_OUT, PTN4_OUT,
130 PTN3_OUT, PTN2_OUT, PTN1_OUT, PTN0_OUT, PTQ6_OUT, PTQ5_OUT, PTQ4_OUT,
131 PTQ3_OUT, PTQ2_OUT, PTQ1_OUT, PTQ0_OUT,
132 PTR4_OUT, PTR3_OUT, PTR1_OUT, PTR0_OUT,
133 PTS3_OUT, PTS2_OUT, PTS0_OUT,
134 PTT4_OUT, PTT3_OUT, PTT2_OUT, PTT0_OUT,
135 PTU4_OUT, PTU3_OUT, PTU2_OUT, PTU0_OUT,
136 PTV4_OUT, PTV3_OUT, PTV2_OUT, PTV1_OUT, PTV0_OUT,
137 PTW5_OUT, PTW4_OUT, PTW3_OUT, PTW2_OUT, PTW1_OUT, PTW0_OUT,
138 PTX6_OUT, PTX5_OUT, PTX4_OUT, PTX3_OUT, PTX2_OUT, PTX1_OUT, PTX0_OUT,
139 PTY5_OUT, PTY4_OUT, PTY3_OUT, PTY2_OUT, PTY1_OUT, PTY0_OUT,
140 PINMUX_OUTPUT_END,
141
142 PINMUX_MARK_BEGIN,
143 SCIF0_TXD_MARK, SCIF0_RXD_MARK,
144 SCIF0_RTS_MARK, SCIF0_CTS_MARK, SCIF0_SCK_MARK,
145 SCIF1_TXD_MARK, SCIF1_RXD_MARK,
146 SCIF1_RTS_MARK, SCIF1_CTS_MARK, SCIF1_SCK_MARK,
147 SCIF2_TXD_MARK, SCIF2_RXD_MARK,
148 SCIF2_RTS_MARK, SCIF2_CTS_MARK, SCIF2_SCK_MARK,
149 SIOTXD_MARK, SIORXD_MARK,
150 SIOD_MARK, SIOSTRB0_MARK, SIOSTRB1_MARK,
151 SIOSCK_MARK, SIOMCK_MARK,
152 VIO_D15_MARK, VIO_D14_MARK, VIO_D13_MARK, VIO_D12_MARK,
153 VIO_D11_MARK, VIO_D10_MARK, VIO_D9_MARK, VIO_D8_MARK,
154 VIO_D7_MARK, VIO_D6_MARK, VIO_D5_MARK, VIO_D4_MARK,
155 VIO_D3_MARK, VIO_D2_MARK, VIO_D1_MARK, VIO_D0_MARK,
156 VIO_CLK_MARK, VIO_VD_MARK, VIO_HD_MARK, VIO_FLD_MARK,
157 VIO_CKO_MARK, VIO_STEX_MARK, VIO_STEM_MARK, VIO_VD2_MARK,
158 VIO_HD2_MARK, VIO_CLK2_MARK,
159 LCDD23_MARK, LCDD22_MARK, LCDD21_MARK, LCDD20_MARK,
160 LCDD19_MARK, LCDD18_MARK, LCDD17_MARK, LCDD16_MARK,
161 LCDD15_MARK, LCDD14_MARK, LCDD13_MARK, LCDD12_MARK,
162 LCDD11_MARK, LCDD10_MARK, LCDD9_MARK, LCDD8_MARK,
163 LCDD7_MARK, LCDD6_MARK, LCDD5_MARK, LCDD4_MARK,
164 LCDD3_MARK, LCDD2_MARK, LCDD1_MARK, LCDD0_MARK,
165 LCDLCLK_MARK, LCDDON_MARK, LCDVCPWC_MARK, LCDVEPWC_MARK,
166 LCDVSYN_MARK, LCDDCK_MARK, LCDHSYN_MARK, LCDDISP_MARK,
167 LCDRS_MARK, LCDCS_MARK, LCDWR_MARK, LCDRD_MARK,
168 LCDDON2_MARK, LCDVCPWC2_MARK, LCDVEPWC2_MARK, LCDVSYN2_MARK,
169 LCDCS2_MARK,
170 IOIS16_MARK, A25_MARK, A24_MARK, A23_MARK, A22_MARK,
171 BS_MARK, CS6B_CE1B_MARK, WAIT_MARK, CS6A_CE2B_MARK,
172 HPD63_MARK, HPD62_MARK, HPD61_MARK, HPD60_MARK,
173 HPD59_MARK, HPD58_MARK, HPD57_MARK, HPD56_MARK,
174 HPD55_MARK, HPD54_MARK, HPD53_MARK, HPD52_MARK,
175 HPD51_MARK, HPD50_MARK, HPD49_MARK, HPD48_MARK,
176 HPDQM7_MARK, HPDQM6_MARK, HPDQM5_MARK, HPDQM4_MARK,
177 IRQ0_MARK, IRQ1_MARK, IRQ2_MARK, IRQ3_MARK,
178 IRQ4_MARK, IRQ5_MARK, IRQ6_MARK, IRQ7_MARK,
179 SDHICD_MARK, SDHIWP_MARK, SDHID3_MARK, SDHID2_MARK,
180 SDHID1_MARK, SDHID0_MARK, SDHICMD_MARK, SDHICLK_MARK,
181 SIUAOLR_MARK, SIUAOBT_MARK, SIUAISLD_MARK, SIUAILR_MARK,
182 SIUAIBT_MARK, SIUAOSLD_MARK, SIUMCKA_MARK, SIUFCKA_MARK,
183 SIUBOLR_MARK, SIUBOBT_MARK, SIUBISLD_MARK, SIUBILR_MARK,
184 SIUBIBT_MARK, SIUBOSLD_MARK, SIUMCKB_MARK, SIUFCKB_MARK,
185 AUDSYNC_MARK, AUDATA3_MARK, AUDATA2_MARK, AUDATA1_MARK, AUDATA0_MARK,
186 DACK_MARK, DREQ0_MARK,
187 DV_CLKI_MARK, DV_CLK_MARK, DV_HSYNC_MARK, DV_VSYNC_MARK,
188 DV_D15_MARK, DV_D14_MARK, DV_D13_MARK, DV_D12_MARK,
189 DV_D11_MARK, DV_D10_MARK, DV_D9_MARK, DV_D8_MARK,
190 DV_D7_MARK, DV_D6_MARK, DV_D5_MARK, DV_D4_MARK,
191 DV_D3_MARK, DV_D2_MARK, DV_D1_MARK, DV_D0_MARK,
192 STATUS0_MARK, PDSTATUS_MARK,
193 SIOF0_MCK_MARK, SIOF0_SCK_MARK,
194 SIOF0_SYNC_MARK, SIOF0_SS1_MARK, SIOF0_SS2_MARK,
195 SIOF0_TXD_MARK, SIOF0_RXD_MARK,
196 SIOF1_MCK_MARK, SIOF1_SCK_MARK,
197 SIOF1_SYNC_MARK, SIOF1_SS1_MARK, SIOF1_SS2_MARK,
198 SIOF1_TXD_MARK, SIOF1_RXD_MARK,
199 SIM_D_MARK, SIM_CLK_MARK, SIM_RST_MARK,
200 TS_SDAT_MARK, TS_SCK_MARK, TS_SDEN_MARK, TS_SPSYNC_MARK,
201 IRDA_IN_MARK, IRDA_OUT_MARK,
202 TPUTO_MARK,
203 FCE_MARK, NAF7_MARK, NAF6_MARK, NAF5_MARK, NAF4_MARK,
204 NAF3_MARK, NAF2_MARK, NAF1_MARK, NAF0_MARK, FCDE_MARK,
205 FOE_MARK, FSC_MARK, FWE_MARK, FRB_MARK,
206 KEYIN0_MARK, KEYIN1_MARK, KEYIN2_MARK, KEYIN3_MARK, KEYIN4_MARK,
207 KEYOUT0_MARK, KEYOUT1_MARK, KEYOUT2_MARK, KEYOUT3_MARK,
208 KEYOUT4_IN6_MARK, KEYOUT5_IN5_MARK,
209 PINMUX_MARK_END,
210
211 PINMUX_FUNCTION_BEGIN,
212 VIO_D7_SCIF1_SCK, VIO_D6_SCIF1_RXD, VIO_D5_SCIF1_TXD, VIO_D4,
213 VIO_D3, VIO_D2, VIO_D1, VIO_D0_LCDLCLK,
214 HPD55, HPD54, HPD53, HPD52, HPD51, HPD50, HPD49, HPD48,
215 IOIS16, HPDQM7, HPDQM6, HPDQM5, HPDQM4,
216 SDHICD, SDHIWP, SDHID3, IRQ2_SDHID2, SDHID1, SDHID0, SDHICMD, SDHICLK,
217 A25, A24, A23, A22, IRQ5, IRQ4_BS,
218 PTF6, SIOSCK_SIUBOBT, SIOSTRB1_SIUBOLR,
219 SIOSTRB0_SIUBIBT, SIOD_SIUBILR, SIORXD_SIUBISLD, SIOTXD_SIUBOSLD,
220 AUDSYNC, AUDATA3, AUDATA2, AUDATA1, AUDATA0,
221 LCDVCPWC_LCDVCPWC2, LCDVSYN2_DACK, LCDVSYN, LCDDISP_LCDRS,
222 LCDHSYN_LCDCS, LCDDON_LCDDON2, LCDD17_DV_HSYNC, LCDD16_DV_VSYNC,
223 STATUS0, PDSTATUS, IRQ1, IRQ0,
224 SIUAILR_SIOF1_SS2, SIUAIBT_SIOF1_SS1, SIUAOLR_SIOF1_SYNC,
225 SIUAOBT_SIOF1_SCK, SIUAISLD_SIOF1_RXD, SIUAOSLD_SIOF1_TXD, PTK0,
226 LCDD15_DV_D15, LCDD14_DV_D14, LCDD13_DV_D13, LCDD12_DV_D12,
227 LCDD11_DV_D11, LCDD10_DV_D10, LCDD9_DV_D9, LCDD8_DV_D8,
228 LCDD7_DV_D7, LCDD6_DV_D6, LCDD5_DV_D5, LCDD4_DV_D4,
229 LCDD3_DV_D3, LCDD2_DV_D2, LCDD1_DV_D1, LCDD0_DV_D0,
230 HPD63, HPD62, HPD61, HPD60, HPD59, HPD58, HPD57, HPD56,
231 SIOF0_SS2_SIM_RST, SIOF0_SS1_TS_SPSYNC, SIOF0_SYNC_TS_SDEN,
232 SIOF0_SCK_TS_SCK, PTQ2, PTQ1, PTQ0,
233 LCDRD, CS6B_CE1B_LCDCS2, WAIT, LCDDCK_LCDWR, LCDVEPWC_LCDVEPWC2,
234 SCIF0_CTS_SIUAISPD, SCIF0_RTS_SIUAOSPD,
235 SCIF0_SCK_TPUTO, SCIF0_RXD, SCIF0_TXD,
236 FOE_VIO_VD2, FWE, FSC, DREQ0, FCDE,
237 NAF2_VIO_D10, NAF1_VIO_D9, NAF0_VIO_D8,
238 FRB_VIO_CLK2, FCE_VIO_HD2,
239 NAF7_VIO_D15, NAF6_VIO_D14, NAF5_VIO_D13, NAF4_VIO_D12, NAF3_VIO_D11,
240 VIO_FLD_SCIF2_CTS, VIO_CKO_SCIF2_RTS, VIO_STEX_SCIF2_SCK,
241 VIO_STEM_SCIF2_TXD, VIO_HD_SCIF2_RXD,
242 VIO_VD_SCIF1_CTS, VIO_CLK_SCIF1_RTS,
243 CS6A_CE2B, LCDD23, LCDD22, LCDD21, LCDD20,
244 LCDD19_DV_CLKI, LCDD18_DV_CLK,
245 KEYOUT5_IN5, KEYOUT4_IN6, KEYOUT3, KEYOUT2, KEYOUT1, KEYOUT0,
246 KEYIN4_IRQ7, KEYIN3, KEYIN2, KEYIN1, KEYIN0_IRQ6,
247
248 PSA15_KEYIN0, PSA15_IRQ6, PSA14_KEYIN4, PSA14_IRQ7,
249 PSA9_IRQ4, PSA9_BS, PSA4_IRQ2, PSA4_SDHID2,
250 PSB15_SIOTXD, PSB15_SIUBOSLD, PSB14_SIORXD, PSB14_SIUBISLD,
251 PSB13_SIOD, PSB13_SIUBILR, PSB12_SIOSTRB0, PSB12_SIUBIBT,
252 PSB11_SIOSTRB1, PSB11_SIUBOLR, PSB10_SIOSCK, PSB10_SIUBOBT,
253 PSB9_SIOMCK, PSB9_SIUMCKB, PSB8_SIOF0_MCK, PSB8_IRQ3,
254 PSB7_SIOF0_TXD, PSB7_IRDA_OUT, PSB6_SIOF0_RXD, PSB6_IRDA_IN,
255 PSB5_SIOF0_SCK, PSB5_TS_SCK, PSB4_SIOF0_SYNC, PSB4_TS_SDEN,
256 PSB3_SIOF0_SS1, PSB3_TS_SPSYNC, PSB2_SIOF0_SS2, PSB2_SIM_RST,
257 PSB1_SIUMCKA, PSB1_SIOF1_MCK, PSB0_SIUAOSLD, PSB0_SIOF1_TXD,
258 PSC15_SIUAISLD, PSC15_SIOF1_RXD, PSC14_SIUAOBT, PSC14_SIOF1_SCK,
259 PSC13_SIUAOLR, PSC13_SIOF1_SYNC, PSC12_SIUAIBT, PSC12_SIOF1_SS1,
260 PSC11_SIUAILR, PSC11_SIOF1_SS2, PSC0_NAF, PSC0_VIO,
261 PSD13_VIO, PSD13_SCIF2, PSD12_VIO, PSD12_SCIF1,
262 PSD11_VIO, PSD11_SCIF1, PSD10_VIO_D0, PSD10_LCDLCLK,
263 PSD9_SIOMCK_SIUMCKB, PSD9_SIUFCKB, PSD8_SCIF0_SCK, PSD8_TPUTO,
264 PSD7_SCIF0_RTS, PSD7_SIUAOSPD, PSD6_SCIF0_CTS, PSD6_SIUAISPD,
265 PSD5_CS6B_CE1B, PSD5_LCDCS2,
266 PSD3_LCDVEPWC_LCDVCPWC, PSD3_LCDVEPWC2_LCDVCPWC2,
267 PSD2_LCDDON, PSD2_LCDDON2, PSD0_LCDD19_LCDD0, PSD0_DV,
268 PSE15_SIOF0_MCK_IRQ3, PSE15_SIM_D,
269 PSE14_SIOF0_TXD_IRDA_OUT, PSE14_SIM_CLK,
270 PSE13_SIOF0_RXD_IRDA_IN, PSE13_TS_SDAT, PSE12_LCDVSYN2, PSE12_DACK,
271 PSE11_SIUMCKA_SIOF1_MCK, PSE11_SIUFCKA,
272 PSE3_FLCTL, PSE3_VIO, PSE2_NAF2, PSE2_VIO_D10,
273 PSE1_NAF1, PSE1_VIO_D9, PSE0_NAF0, PSE0_VIO_D8,
274
275 HIZA14_KEYSC, HIZA14_HIZ,
276 HIZA10_NAF, HIZA10_HIZ,
277 HIZA9_VIO, HIZA9_HIZ,
278 HIZA8_LCDC, HIZA8_HIZ,
279 HIZA7_LCDC, HIZA7_HIZ,
280 HIZA6_LCDC, HIZA6_HIZ,
281 HIZB1_VIO, HIZB1_HIZ,
282 HIZB0_VIO, HIZB0_HIZ,
283 HIZC15_IRQ7, HIZC15_HIZ,
284 HIZC14_IRQ6, HIZC14_HIZ,
285 HIZC13_IRQ5, HIZC13_HIZ,
286 HIZC12_IRQ4, HIZC12_HIZ,
287 HIZC11_IRQ3, HIZC11_HIZ,
288 HIZC10_IRQ2, HIZC10_HIZ,
289 HIZC9_IRQ1, HIZC9_HIZ,
290 HIZC8_IRQ0, HIZC8_HIZ,
291 MSELB9_VIO, MSELB9_VIO2,
292 MSELB8_RGB, MSELB8_SYS,
293 PINMUX_FUNCTION_END,
294};
295
296static pinmux_enum_t pinmux_data[] = {
297 /* PTA */
298 PINMUX_DATA(PTA7_DATA, PTA7_IN, PTA7_IN_PD, PTA7_OUT),
299 PINMUX_DATA(PTA6_DATA, PTA6_IN, PTA6_IN_PD),
300 PINMUX_DATA(PTA5_DATA, PTA5_IN, PTA5_IN_PD, PTA5_OUT),
301 PINMUX_DATA(PTA4_DATA, PTA4_IN, PTA4_IN_PD),
302 PINMUX_DATA(PTA3_DATA, PTA3_IN, PTA3_IN_PD),
303 PINMUX_DATA(PTA2_DATA, PTA2_IN, PTA2_IN_PD),
304 PINMUX_DATA(PTA1_DATA, PTA1_IN, PTA1_IN_PD),
305 PINMUX_DATA(PTA0_DATA, PTA0_IN, PTA0_IN_PD),
306
307 /* PTB */
308 PINMUX_DATA(PTB7_DATA, PTB7_IN, PTB7_OUT),
309 PINMUX_DATA(PTB6_DATA, PTB6_IN, PTB6_OUT),
310 PINMUX_DATA(PTB5_DATA, PTB5_IN, PTB5_OUT),
311 PINMUX_DATA(PTB4_DATA, PTB4_IN, PTB4_OUT),
312 PINMUX_DATA(PTB3_DATA, PTB3_IN, PTB3_OUT),
313 PINMUX_DATA(PTB2_DATA, PTB2_IN, PTB2_OUT),
314 PINMUX_DATA(PTB1_DATA, PTB1_IN, PTB1_OUT),
315 PINMUX_DATA(PTB0_DATA, PTB0_IN, PTB0_OUT),
316
317 /* PTC */
318 PINMUX_DATA(PTC7_DATA, PTC7_IN, PTC7_IN_PU),
319 PINMUX_DATA(PTC5_DATA, PTC5_IN, PTC5_IN_PU),
320 PINMUX_DATA(PTC4_DATA, PTC4_IN, PTC4_OUT),
321 PINMUX_DATA(PTC3_DATA, PTC3_IN, PTC3_OUT),
322 PINMUX_DATA(PTC2_DATA, PTC2_IN, PTC2_OUT),
323 PINMUX_DATA(PTC0_DATA, PTC0_IN, PTC0_OUT),
324
325 /* PTD */
326 PINMUX_DATA(PTD7_DATA, PTD7_IN, PTD7_IN_PU),
327 PINMUX_DATA(PTD6_DATA, PTD6_OUT, PTD6_IN, PTD6_IN_PU),
328 PINMUX_DATA(PTD5_DATA, PTD5_OUT, PTD5_IN, PTD5_IN_PU),
329 PINMUX_DATA(PTD4_DATA, PTD4_OUT, PTD4_IN, PTD4_IN_PU),
330 PINMUX_DATA(PTD3_DATA, PTD3_OUT, PTD3_IN, PTD3_IN_PU),
331 PINMUX_DATA(PTD2_DATA, PTD2_OUT, PTD2_IN, PTD2_IN_PU),
332 PINMUX_DATA(PTD1_DATA, PTD1_OUT, PTD1_IN, PTD1_IN_PU),
333 PINMUX_DATA(PTD0_DATA, PTD0_OUT),
334
335 /* PTE */
336 PINMUX_DATA(PTE7_DATA, PTE7_OUT, PTE7_IN, PTE7_IN_PD),
337 PINMUX_DATA(PTE6_DATA, PTE6_OUT, PTE6_IN, PTE6_IN_PD),
338 PINMUX_DATA(PTE5_DATA, PTE5_OUT, PTE5_IN, PTE5_IN_PD),
339 PINMUX_DATA(PTE4_DATA, PTE4_OUT, PTE4_IN, PTE4_IN_PD),
340 PINMUX_DATA(PTE1_DATA, PTE1_OUT, PTE1_IN, PTE1_IN_PD),
341 PINMUX_DATA(PTE0_DATA, PTE0_OUT, PTE0_IN, PTE0_IN_PD),
342
343 /* PTF */
344 PINMUX_DATA(PTF6_DATA, PTF6_OUT, PTF6_IN, PTF6_IN_PD),
345 PINMUX_DATA(PTF5_DATA, PTF5_OUT, PTF5_IN, PTF5_IN_PD),
346 PINMUX_DATA(PTF4_DATA, PTF4_OUT, PTF4_IN, PTF4_IN_PD),
347 PINMUX_DATA(PTF3_DATA, PTF3_OUT, PTF3_IN, PTF3_IN_PD),
348 PINMUX_DATA(PTF2_DATA, PTF2_OUT, PTF2_IN, PTF2_IN_PD),
349 PINMUX_DATA(PTF1_DATA, PTF1_IN, PTF1_IN_PD),
350 PINMUX_DATA(PTF0_DATA, PTF0_OUT),
351
352 /* PTG */
353 PINMUX_DATA(PTG4_DATA, PTG4_OUT),
354 PINMUX_DATA(PTG3_DATA, PTG3_OUT),
355 PINMUX_DATA(PTG2_DATA, PTG2_OUT),
356 PINMUX_DATA(PTG1_DATA, PTG1_OUT),
357 PINMUX_DATA(PTG0_DATA, PTG0_OUT),
358
359 /* PTH */
360 PINMUX_DATA(PTH7_DATA, PTH7_OUT),
361 PINMUX_DATA(PTH6_DATA, PTH6_OUT, PTH6_IN, PTH6_IN_PD),
362 PINMUX_DATA(PTH5_DATA, PTH5_OUT, PTH5_IN, PTH5_IN_PD),
363 PINMUX_DATA(PTH4_DATA, PTH4_OUT),
364 PINMUX_DATA(PTH3_DATA, PTH3_OUT),
365 PINMUX_DATA(PTH2_DATA, PTH2_OUT),
366 PINMUX_DATA(PTH1_DATA, PTH1_OUT, PTH1_IN, PTH1_IN_PD),
367 PINMUX_DATA(PTH0_DATA, PTH0_OUT, PTH0_IN, PTH0_IN_PD),
368
369 /* PTJ */
370 PINMUX_DATA(PTJ7_DATA, PTJ7_OUT),
371 PINMUX_DATA(PTJ6_DATA, PTJ6_OUT),
372 PINMUX_DATA(PTJ5_DATA, PTJ5_OUT),
373 PINMUX_DATA(PTJ1_DATA, PTJ1_OUT, PTJ1_IN, PTJ1_IN_PU),
374 PINMUX_DATA(PTJ0_DATA, PTJ0_OUT, PTJ0_IN, PTJ0_IN_PU),
375
376 /* PTK */
377 PINMUX_DATA(PTK6_DATA, PTK6_OUT, PTK6_IN, PTK6_IN_PD),
378 PINMUX_DATA(PTK5_DATA, PTK5_OUT, PTK5_IN, PTK5_IN_PD),
379 PINMUX_DATA(PTK4_DATA, PTK4_OUT, PTK4_IN, PTK4_IN_PD),
380 PINMUX_DATA(PTK3_DATA, PTK3_OUT, PTK3_IN, PTK3_IN_PD),
381 PINMUX_DATA(PTK2_DATA, PTK2_IN, PTK2_IN_PD),
382 PINMUX_DATA(PTK1_DATA, PTK1_OUT),
383 PINMUX_DATA(PTK0_DATA, PTK0_OUT, PTK0_IN, PTK0_IN_PD),
384
385 /* PTL */
386 PINMUX_DATA(PTL7_DATA, PTL7_OUT, PTL7_IN, PTL7_IN_PD),
387 PINMUX_DATA(PTL6_DATA, PTL6_OUT, PTL6_IN, PTL6_IN_PD),
388 PINMUX_DATA(PTL5_DATA, PTL5_OUT, PTL5_IN, PTL5_IN_PD),
389 PINMUX_DATA(PTL4_DATA, PTL4_OUT, PTL4_IN, PTL4_IN_PD),
390 PINMUX_DATA(PTL3_DATA, PTL3_OUT, PTL3_IN, PTL3_IN_PD),
391 PINMUX_DATA(PTL2_DATA, PTL2_OUT, PTL2_IN, PTL2_IN_PD),
392 PINMUX_DATA(PTL1_DATA, PTL1_OUT, PTL1_IN, PTL1_IN_PD),
393 PINMUX_DATA(PTL0_DATA, PTL0_OUT, PTL0_IN, PTL0_IN_PD),
394
395 /* PTM */
396 PINMUX_DATA(PTM7_DATA, PTM7_OUT, PTM7_IN, PTM7_IN_PD),
397 PINMUX_DATA(PTM6_DATA, PTM6_OUT, PTM6_IN, PTM6_IN_PD),
398 PINMUX_DATA(PTM5_DATA, PTM5_OUT, PTM5_IN, PTM5_IN_PD),
399 PINMUX_DATA(PTM4_DATA, PTM4_OUT, PTM4_IN, PTM4_IN_PD),
400 PINMUX_DATA(PTM3_DATA, PTM3_OUT, PTM3_IN, PTM3_IN_PD),
401 PINMUX_DATA(PTM2_DATA, PTM2_OUT, PTM2_IN, PTM2_IN_PD),
402 PINMUX_DATA(PTM1_DATA, PTM1_OUT, PTM1_IN, PTM1_IN_PD),
403 PINMUX_DATA(PTM0_DATA, PTM0_OUT, PTM0_IN, PTM0_IN_PD),
404
405 /* PTN */
406 PINMUX_DATA(PTN7_DATA, PTN7_OUT, PTN7_IN),
407 PINMUX_DATA(PTN6_DATA, PTN6_OUT, PTN6_IN),
408 PINMUX_DATA(PTN5_DATA, PTN5_OUT, PTN5_IN),
409 PINMUX_DATA(PTN4_DATA, PTN4_OUT, PTN4_IN),
410 PINMUX_DATA(PTN3_DATA, PTN3_OUT, PTN3_IN),
411 PINMUX_DATA(PTN2_DATA, PTN2_OUT, PTN2_IN),
412 PINMUX_DATA(PTN1_DATA, PTN1_OUT, PTN1_IN),
413 PINMUX_DATA(PTN0_DATA, PTN0_OUT, PTN0_IN),
414
415 /* PTQ */
416 PINMUX_DATA(PTQ6_DATA, PTQ6_OUT),
417 PINMUX_DATA(PTQ5_DATA, PTQ5_OUT, PTQ5_IN, PTQ5_IN_PD),
418 PINMUX_DATA(PTQ4_DATA, PTQ4_OUT, PTQ4_IN, PTQ4_IN_PD),
419 PINMUX_DATA(PTQ3_DATA, PTQ3_OUT, PTQ3_IN, PTQ3_IN_PD),
420 PINMUX_DATA(PTQ2_DATA, PTQ2_IN, PTQ2_IN_PD),
421 PINMUX_DATA(PTQ1_DATA, PTQ1_OUT),
422 PINMUX_DATA(PTQ0_DATA, PTQ0_OUT, PTQ0_IN, PTQ0_IN_PU),
423
424 /* PTR */
425 PINMUX_DATA(PTR4_DATA, PTR4_OUT),
426 PINMUX_DATA(PTR3_DATA, PTR3_OUT),
427 PINMUX_DATA(PTR2_DATA, PTR2_IN, PTR2_IN_PU),
428 PINMUX_DATA(PTR1_DATA, PTR1_OUT),
429 PINMUX_DATA(PTR0_DATA, PTR0_OUT),
430
431 /* PTS */
432 PINMUX_DATA(PTS4_DATA, PTS4_IN, PTS4_IN_PD),
433 PINMUX_DATA(PTS3_DATA, PTS3_OUT),
434 PINMUX_DATA(PTS2_DATA, PTS2_OUT, PTS2_IN, PTS2_IN_PD),
435 PINMUX_DATA(PTS1_DATA, PTS1_IN, PTS1_IN_PD),
436 PINMUX_DATA(PTS0_DATA, PTS0_OUT),
437
438 /* PTT */
439 PINMUX_DATA(PTT4_DATA, PTT4_OUT, PTT4_IN, PTT4_IN_PD),
440 PINMUX_DATA(PTT3_DATA, PTT3_OUT, PTT3_IN, PTT3_IN_PD),
441 PINMUX_DATA(PTT2_DATA, PTT2_OUT, PTT2_IN, PTT2_IN_PD),
442 PINMUX_DATA(PTT1_DATA, PTT1_IN, PTT1_IN_PD),
443 PINMUX_DATA(PTT0_DATA, PTT0_OUT),
444
445 /* PTU */
446 PINMUX_DATA(PTU4_DATA, PTU4_OUT, PTU4_IN, PTU4_IN_PD),
447 PINMUX_DATA(PTU3_DATA, PTU3_OUT, PTU3_IN, PTU3_IN_PD),
448 PINMUX_DATA(PTU2_DATA, PTU2_OUT, PTU2_IN, PTU2_IN_PD),
449 PINMUX_DATA(PTU1_DATA, PTU1_IN, PTU1_IN_PD),
450 PINMUX_DATA(PTU0_DATA, PTU0_OUT, PTU0_IN, PTU0_IN_PD),
451
452 /* PTV */
453 PINMUX_DATA(PTV4_DATA, PTV4_OUT, PTV4_IN, PTV4_IN_PD),
454 PINMUX_DATA(PTV3_DATA, PTV3_OUT, PTV3_IN, PTV3_IN_PD),
455 PINMUX_DATA(PTV2_DATA, PTV2_OUT, PTV2_IN, PTV2_IN_PD),
456 PINMUX_DATA(PTV1_DATA, PTV1_OUT, PTV1_IN, PTV1_IN_PD),
457 PINMUX_DATA(PTV0_DATA, PTV0_OUT, PTV0_IN, PTV0_IN_PD),
458
459 /* PTW */
460 PINMUX_DATA(PTW6_DATA, PTW6_IN, PTW6_IN_PD),
461 PINMUX_DATA(PTW5_DATA, PTW5_OUT),
462 PINMUX_DATA(PTW4_DATA, PTW4_OUT, PTW4_IN, PTW4_IN_PD),
463 PINMUX_DATA(PTW3_DATA, PTW3_OUT, PTW3_IN, PTW3_IN_PD),
464 PINMUX_DATA(PTW2_DATA, PTW2_OUT, PTW2_IN, PTW2_IN_PD),
465 PINMUX_DATA(PTW1_DATA, PTW1_OUT, PTW1_IN, PTW1_IN_PD),
466 PINMUX_DATA(PTW0_DATA, PTW0_OUT, PTW0_IN, PTW0_IN_PD),
467
468 /* PTX */
469 PINMUX_DATA(PTX6_DATA, PTX6_OUT, PTX6_IN, PTX6_IN_PD),
470 PINMUX_DATA(PTX5_DATA, PTX5_OUT, PTX5_IN, PTX5_IN_PD),
471 PINMUX_DATA(PTX4_DATA, PTX4_OUT, PTX4_IN, PTX4_IN_PD),
472 PINMUX_DATA(PTX3_DATA, PTX3_OUT, PTX3_IN, PTX3_IN_PD),
473 PINMUX_DATA(PTX2_DATA, PTX2_OUT, PTX2_IN, PTX2_IN_PD),
474 PINMUX_DATA(PTX1_DATA, PTX1_OUT, PTX1_IN, PTX1_IN_PD),
475 PINMUX_DATA(PTX0_DATA, PTX0_OUT, PTX0_IN, PTX0_IN_PD),
476
477 /* PTY */
478 PINMUX_DATA(PTY5_DATA, PTY5_OUT, PTY5_IN, PTY5_IN_PU),
479 PINMUX_DATA(PTY4_DATA, PTY4_OUT, PTY4_IN, PTY4_IN_PU),
480 PINMUX_DATA(PTY3_DATA, PTY3_OUT, PTY3_IN, PTY3_IN_PU),
481 PINMUX_DATA(PTY2_DATA, PTY2_OUT, PTY2_IN, PTY2_IN_PU),
482 PINMUX_DATA(PTY1_DATA, PTY1_OUT),
483 PINMUX_DATA(PTY0_DATA, PTY0_OUT, PTY0_IN, PTY0_IN_PU),
484
485 /* PTZ */
486 PINMUX_DATA(PTZ5_DATA, PTZ5_IN, PTZ5_IN_PU),
487 PINMUX_DATA(PTZ4_DATA, PTZ4_IN, PTZ4_IN_PU),
488 PINMUX_DATA(PTZ3_DATA, PTZ3_IN, PTZ3_IN_PU),
489 PINMUX_DATA(PTZ2_DATA, PTZ2_IN, PTZ2_IN_PU),
490 PINMUX_DATA(PTZ1_DATA, PTZ1_IN, PTZ1_IN_PU),
491
492 /* SCIF0 */
493 PINMUX_DATA(SCIF0_TXD_MARK, SCIF0_TXD),
494 PINMUX_DATA(SCIF0_RXD_MARK, SCIF0_RXD),
495 PINMUX_DATA(SCIF0_RTS_MARK, PSD7_SCIF0_RTS, SCIF0_RTS_SIUAOSPD),
496 PINMUX_DATA(SCIF0_CTS_MARK, PSD6_SCIF0_CTS, SCIF0_CTS_SIUAISPD),
497 PINMUX_DATA(SCIF0_SCK_MARK, PSD8_SCIF0_SCK, SCIF0_SCK_TPUTO),
498
499 /* SCIF1 */
500 PINMUX_DATA(SCIF1_TXD_MARK, PSD11_SCIF1, VIO_D5_SCIF1_TXD),
501 PINMUX_DATA(SCIF1_RXD_MARK, PSD11_SCIF1, VIO_D6_SCIF1_RXD),
502 PINMUX_DATA(SCIF1_RTS_MARK, PSD12_SCIF1, VIO_CLK_SCIF1_RTS),
503 PINMUX_DATA(SCIF1_CTS_MARK, PSD12_SCIF1, VIO_VD_SCIF1_CTS),
504 PINMUX_DATA(SCIF1_SCK_MARK, PSD11_SCIF1, VIO_D7_SCIF1_SCK),
505
506 /* SCIF2 */
507 PINMUX_DATA(SCIF2_TXD_MARK, PSD13_SCIF2, VIO_STEM_SCIF2_TXD),
508 PINMUX_DATA(SCIF2_RXD_MARK, PSD13_SCIF2, VIO_HD_SCIF2_RXD),
509 PINMUX_DATA(SCIF2_RTS_MARK, PSD13_SCIF2, VIO_CKO_SCIF2_RTS),
510 PINMUX_DATA(SCIF2_CTS_MARK, PSD13_SCIF2, VIO_FLD_SCIF2_CTS),
511 PINMUX_DATA(SCIF2_SCK_MARK, PSD13_SCIF2, VIO_STEX_SCIF2_SCK),
512
513 /* SIO */
514 PINMUX_DATA(SIOTXD_MARK, PSB15_SIOTXD, SIOTXD_SIUBOSLD),
515 PINMUX_DATA(SIORXD_MARK, PSB14_SIORXD, SIORXD_SIUBISLD),
516 PINMUX_DATA(SIOD_MARK, PSB13_SIOD, SIOD_SIUBILR),
517 PINMUX_DATA(SIOSTRB0_MARK, PSB12_SIOSTRB0, SIOSTRB0_SIUBIBT),
518 PINMUX_DATA(SIOSTRB1_MARK, PSB11_SIOSTRB1, SIOSTRB1_SIUBOLR),
519 PINMUX_DATA(SIOSCK_MARK, PSB10_SIOSCK, SIOSCK_SIUBOBT),
520 PINMUX_DATA(SIOMCK_MARK, PSD9_SIOMCK_SIUMCKB, PSB9_SIOMCK, PTF6),
521
522 /* CEU */
523 PINMUX_DATA(VIO_D15_MARK, PSC0_VIO, HIZA10_NAF, NAF7_VIO_D15),
524 PINMUX_DATA(VIO_D14_MARK, PSC0_VIO, HIZA10_NAF, NAF6_VIO_D14),
525 PINMUX_DATA(VIO_D13_MARK, PSC0_VIO, HIZA10_NAF, NAF5_VIO_D13),
526 PINMUX_DATA(VIO_D12_MARK, PSC0_VIO, HIZA10_NAF, NAF4_VIO_D12),
527 PINMUX_DATA(VIO_D11_MARK, PSC0_VIO, HIZA10_NAF, NAF3_VIO_D11),
528 PINMUX_DATA(VIO_D10_MARK, PSE2_VIO_D10, HIZB0_VIO, NAF2_VIO_D10),
529 PINMUX_DATA(VIO_D9_MARK, PSE1_VIO_D9, HIZB0_VIO, NAF1_VIO_D9),
530 PINMUX_DATA(VIO_D8_MARK, PSE0_VIO_D8, HIZB0_VIO, NAF0_VIO_D8),
531 PINMUX_DATA(VIO_D7_MARK, PSD11_VIO, VIO_D7_SCIF1_SCK),
532 PINMUX_DATA(VIO_D6_MARK, PSD11_VIO, VIO_D6_SCIF1_RXD),
533 PINMUX_DATA(VIO_D5_MARK, PSD11_VIO, VIO_D5_SCIF1_TXD),
534 PINMUX_DATA(VIO_D4_MARK, VIO_D4),
535 PINMUX_DATA(VIO_D3_MARK, VIO_D3),
536 PINMUX_DATA(VIO_D2_MARK, VIO_D2),
537 PINMUX_DATA(VIO_D1_MARK, VIO_D1),
538 PINMUX_DATA(VIO_D0_MARK, PSD10_VIO_D0, VIO_D0_LCDLCLK),
539 PINMUX_DATA(VIO_CLK_MARK, PSD12_VIO, MSELB9_VIO, VIO_CLK_SCIF1_RTS),
540 PINMUX_DATA(VIO_VD_MARK, PSD12_VIO, MSELB9_VIO, VIO_VD_SCIF1_CTS),
541 PINMUX_DATA(VIO_HD_MARK, PSD13_VIO, MSELB9_VIO, VIO_HD_SCIF2_RXD),
542 PINMUX_DATA(VIO_FLD_MARK, PSD13_VIO, HIZA9_VIO, VIO_FLD_SCIF2_CTS),
543 PINMUX_DATA(VIO_CKO_MARK, PSD13_VIO, HIZA9_VIO, VIO_CKO_SCIF2_RTS),
544 PINMUX_DATA(VIO_STEX_MARK, PSD13_VIO, HIZA9_VIO, VIO_STEX_SCIF2_SCK),
545 PINMUX_DATA(VIO_STEM_MARK, PSD13_VIO, HIZA9_VIO, VIO_STEM_SCIF2_TXD),
546 PINMUX_DATA(VIO_VD2_MARK, PSE3_VIO, MSELB9_VIO2,
547 HIZB0_VIO, FOE_VIO_VD2),
548 PINMUX_DATA(VIO_HD2_MARK, PSE3_VIO, MSELB9_VIO2,
549 HIZB1_VIO, HIZB1_VIO, FCE_VIO_HD2),
550 PINMUX_DATA(VIO_CLK2_MARK, PSE3_VIO, MSELB9_VIO2,
551 HIZB1_VIO, FRB_VIO_CLK2),
552
553 /* LCDC */
554 PINMUX_DATA(LCDD23_MARK, HIZA8_LCDC, LCDD23),
555 PINMUX_DATA(LCDD22_MARK, HIZA8_LCDC, LCDD22),
556 PINMUX_DATA(LCDD21_MARK, HIZA8_LCDC, LCDD21),
557 PINMUX_DATA(LCDD20_MARK, HIZA8_LCDC, LCDD20),
558 PINMUX_DATA(LCDD19_MARK, PSD0_LCDD19_LCDD0, HIZA8_LCDC, LCDD19_DV_CLKI),
559 PINMUX_DATA(LCDD18_MARK, PSD0_LCDD19_LCDD0, HIZA8_LCDC, LCDD18_DV_CLK),
560 PINMUX_DATA(LCDD17_MARK, PSD0_LCDD19_LCDD0, HIZA8_LCDC,
561 LCDD17_DV_HSYNC),
562 PINMUX_DATA(LCDD16_MARK, PSD0_LCDD19_LCDD0, HIZA8_LCDC,
563 LCDD16_DV_VSYNC),
564 PINMUX_DATA(LCDD15_MARK, PSD0_LCDD19_LCDD0, HIZA8_LCDC, LCDD15_DV_D15),
565 PINMUX_DATA(LCDD14_MARK, PSD0_LCDD19_LCDD0, HIZA8_LCDC, LCDD14_DV_D14),
566 PINMUX_DATA(LCDD13_MARK, PSD0_LCDD19_LCDD0, HIZA8_LCDC, LCDD13_DV_D13),
567 PINMUX_DATA(LCDD12_MARK, PSD0_LCDD19_LCDD0, HIZA8_LCDC, LCDD12_DV_D12),
568 PINMUX_DATA(LCDD11_MARK, PSD0_LCDD19_LCDD0, HIZA8_LCDC, LCDD11_DV_D11),
569 PINMUX_DATA(LCDD10_MARK, PSD0_LCDD19_LCDD0, HIZA8_LCDC, LCDD10_DV_D10),
570 PINMUX_DATA(LCDD9_MARK, PSD0_LCDD19_LCDD0, HIZA8_LCDC, LCDD9_DV_D9),
571 PINMUX_DATA(LCDD8_MARK, PSD0_LCDD19_LCDD0, HIZA8_LCDC, LCDD8_DV_D8),
572 PINMUX_DATA(LCDD7_MARK, PSD0_LCDD19_LCDD0, HIZA8_LCDC, LCDD7_DV_D7),
573 PINMUX_DATA(LCDD6_MARK, PSD0_LCDD19_LCDD0, HIZA8_LCDC, LCDD6_DV_D6),
574 PINMUX_DATA(LCDD5_MARK, PSD0_LCDD19_LCDD0, HIZA8_LCDC, LCDD5_DV_D5),
575 PINMUX_DATA(LCDD4_MARK, PSD0_LCDD19_LCDD0, HIZA8_LCDC, LCDD4_DV_D4),
576 PINMUX_DATA(LCDD3_MARK, PSD0_LCDD19_LCDD0, HIZA8_LCDC, LCDD3_DV_D3),
577 PINMUX_DATA(LCDD2_MARK, PSD0_LCDD19_LCDD0, HIZA8_LCDC, LCDD2_DV_D2),
578 PINMUX_DATA(LCDD1_MARK, PSD0_LCDD19_LCDD0, HIZA8_LCDC, LCDD1_DV_D1),
579 PINMUX_DATA(LCDD0_MARK, PSD0_LCDD19_LCDD0, HIZA8_LCDC, LCDD0_DV_D0),
580 PINMUX_DATA(LCDLCLK_MARK, PSD10_LCDLCLK, VIO_D0_LCDLCLK),
581 /* Main LCD */
582 PINMUX_DATA(LCDDON_MARK, PSD2_LCDDON, HIZA7_LCDC, LCDDON_LCDDON2),
583 PINMUX_DATA(LCDVCPWC_MARK, PSD3_LCDVEPWC_LCDVCPWC,
584 HIZA6_LCDC, LCDVCPWC_LCDVCPWC2),
585 PINMUX_DATA(LCDVEPWC_MARK, PSD3_LCDVEPWC_LCDVCPWC,
586 HIZA6_LCDC, LCDVEPWC_LCDVEPWC2),
587 PINMUX_DATA(LCDVSYN_MARK, HIZA7_LCDC, LCDVSYN),
588 /* Main LCD - RGB Mode */
589 PINMUX_DATA(LCDDCK_MARK, MSELB8_RGB, HIZA8_LCDC, LCDDCK_LCDWR),
590 PINMUX_DATA(LCDHSYN_MARK, MSELB8_RGB, HIZA7_LCDC, LCDHSYN_LCDCS),
591 PINMUX_DATA(LCDDISP_MARK, MSELB8_RGB, HIZA7_LCDC, LCDDISP_LCDRS),
592 /* Main LCD - SYS Mode */
593 PINMUX_DATA(LCDRS_MARK, MSELB8_SYS, HIZA7_LCDC, LCDDISP_LCDRS),
594 PINMUX_DATA(LCDCS_MARK, MSELB8_SYS, HIZA7_LCDC, LCDHSYN_LCDCS),
595 PINMUX_DATA(LCDWR_MARK, MSELB8_SYS, HIZA8_LCDC, LCDDCK_LCDWR),
596 PINMUX_DATA(LCDRD_MARK, HIZA7_LCDC, LCDRD),
597 /* Sub LCD - SYS Mode */
598 PINMUX_DATA(LCDDON2_MARK, PSD2_LCDDON2, HIZA7_LCDC, LCDDON_LCDDON2),
599 PINMUX_DATA(LCDVCPWC2_MARK, PSD3_LCDVEPWC2_LCDVCPWC2,
600 HIZA6_LCDC, LCDVCPWC_LCDVCPWC2),
601 PINMUX_DATA(LCDVEPWC2_MARK, PSD3_LCDVEPWC2_LCDVCPWC2,
602 HIZA6_LCDC, LCDVEPWC_LCDVEPWC2),
603 PINMUX_DATA(LCDVSYN2_MARK, PSE12_LCDVSYN2, HIZA8_LCDC, LCDVSYN2_DACK),
604 PINMUX_DATA(LCDCS2_MARK, PSD5_LCDCS2, CS6B_CE1B_LCDCS2),
605
606 /* BSC */
607 PINMUX_DATA(IOIS16_MARK, IOIS16),
608 PINMUX_DATA(A25_MARK, A25),
609 PINMUX_DATA(A24_MARK, A24),
610 PINMUX_DATA(A23_MARK, A23),
611 PINMUX_DATA(A22_MARK, A22),
612 PINMUX_DATA(BS_MARK, PSA9_BS, IRQ4_BS),
613 PINMUX_DATA(CS6B_CE1B_MARK, PSD5_CS6B_CE1B, CS6B_CE1B_LCDCS2),
614 PINMUX_DATA(WAIT_MARK, WAIT),
615 PINMUX_DATA(CS6A_CE2B_MARK, CS6A_CE2B),
616
617 /* SBSC */
618 PINMUX_DATA(HPD63_MARK, HPD63),
619 PINMUX_DATA(HPD62_MARK, HPD62),
620 PINMUX_DATA(HPD61_MARK, HPD61),
621 PINMUX_DATA(HPD60_MARK, HPD60),
622 PINMUX_DATA(HPD59_MARK, HPD59),
623 PINMUX_DATA(HPD58_MARK, HPD58),
624 PINMUX_DATA(HPD57_MARK, HPD57),
625 PINMUX_DATA(HPD56_MARK, HPD56),
626 PINMUX_DATA(HPD55_MARK, HPD55),
627 PINMUX_DATA(HPD54_MARK, HPD54),
628 PINMUX_DATA(HPD53_MARK, HPD53),
629 PINMUX_DATA(HPD52_MARK, HPD52),
630 PINMUX_DATA(HPD51_MARK, HPD51),
631 PINMUX_DATA(HPD50_MARK, HPD50),
632 PINMUX_DATA(HPD49_MARK, HPD49),
633 PINMUX_DATA(HPD48_MARK, HPD48),
634 PINMUX_DATA(HPDQM7_MARK, HPDQM7),
635 PINMUX_DATA(HPDQM6_MARK, HPDQM6),
636 PINMUX_DATA(HPDQM5_MARK, HPDQM5),
637 PINMUX_DATA(HPDQM4_MARK, HPDQM4),
638
639 /* IRQ */
640 PINMUX_DATA(IRQ0_MARK, HIZC8_IRQ0, IRQ0),
641 PINMUX_DATA(IRQ1_MARK, HIZC9_IRQ1, IRQ1),
642 PINMUX_DATA(IRQ2_MARK, PSA4_IRQ2, HIZC10_IRQ2, IRQ2_SDHID2),
643 PINMUX_DATA(IRQ3_MARK, PSE15_SIOF0_MCK_IRQ3, PSB8_IRQ3,
644 HIZC11_IRQ3, PTQ0),
645 PINMUX_DATA(IRQ4_MARK, PSA9_IRQ4, HIZC12_IRQ4, IRQ4_BS),
646 PINMUX_DATA(IRQ5_MARK, HIZC13_IRQ5, IRQ5),
647 PINMUX_DATA(IRQ6_MARK, PSA15_IRQ6, HIZC14_IRQ6, KEYIN0_IRQ6),
648 PINMUX_DATA(IRQ7_MARK, PSA14_IRQ7, HIZC15_IRQ7, KEYIN4_IRQ7),
649
650 /* SDHI */
651 PINMUX_DATA(SDHICD_MARK, SDHICD),
652 PINMUX_DATA(SDHIWP_MARK, SDHIWP),
653 PINMUX_DATA(SDHID3_MARK, SDHID3),
654 PINMUX_DATA(SDHID2_MARK, PSA4_SDHID2, IRQ2_SDHID2),
655 PINMUX_DATA(SDHID1_MARK, SDHID1),
656 PINMUX_DATA(SDHID0_MARK, SDHID0),
657 PINMUX_DATA(SDHICMD_MARK, SDHICMD),
658 PINMUX_DATA(SDHICLK_MARK, SDHICLK),
659
660 /* SIU - Port A */
661 PINMUX_DATA(SIUAOLR_MARK, PSC13_SIUAOLR, SIUAOLR_SIOF1_SYNC),
662 PINMUX_DATA(SIUAOBT_MARK, PSC14_SIUAOBT, SIUAOBT_SIOF1_SCK),
663 PINMUX_DATA(SIUAISLD_MARK, PSC15_SIUAISLD, SIUAISLD_SIOF1_RXD),
664 PINMUX_DATA(SIUAILR_MARK, PSC11_SIUAILR, SIUAILR_SIOF1_SS2),
665 PINMUX_DATA(SIUAIBT_MARK, PSC12_SIUAIBT, SIUAIBT_SIOF1_SS1),
666 PINMUX_DATA(SIUAOSLD_MARK, PSB0_SIUAOSLD, SIUAOSLD_SIOF1_TXD),
667 PINMUX_DATA(SIUMCKA_MARK, PSE11_SIUMCKA_SIOF1_MCK, PSB1_SIUMCKA, PTK0),
668 PINMUX_DATA(SIUFCKA_MARK, PSE11_SIUFCKA, PTK0),
669
670 /* SIU - Port B */
671 PINMUX_DATA(SIUBOLR_MARK, PSB11_SIUBOLR, SIOSTRB1_SIUBOLR),
672 PINMUX_DATA(SIUBOBT_MARK, PSB10_SIUBOBT, SIOSCK_SIUBOBT),
673 PINMUX_DATA(SIUBISLD_MARK, PSB14_SIUBISLD, SIORXD_SIUBISLD),
674 PINMUX_DATA(SIUBILR_MARK, PSB13_SIUBILR, SIOD_SIUBILR),
675 PINMUX_DATA(SIUBIBT_MARK, PSB12_SIUBIBT, SIOSTRB0_SIUBIBT),
676 PINMUX_DATA(SIUBOSLD_MARK, PSB15_SIUBOSLD, SIOTXD_SIUBOSLD),
677 PINMUX_DATA(SIUMCKB_MARK, PSD9_SIOMCK_SIUMCKB, PSB9_SIUMCKB, PTF6),
678 PINMUX_DATA(SIUFCKB_MARK, PSD9_SIUFCKB, PTF6),
679
680 /* AUD */
681 PINMUX_DATA(AUDSYNC_MARK, AUDSYNC),
682 PINMUX_DATA(AUDATA3_MARK, AUDATA3),
683 PINMUX_DATA(AUDATA2_MARK, AUDATA2),
684 PINMUX_DATA(AUDATA1_MARK, AUDATA1),
685 PINMUX_DATA(AUDATA0_MARK, AUDATA0),
686
687 /* DMAC */
688 PINMUX_DATA(DACK_MARK, PSE12_DACK, LCDVSYN2_DACK),
689 PINMUX_DATA(DREQ0_MARK, DREQ0),
690
691 /* VOU */
692 PINMUX_DATA(DV_CLKI_MARK, PSD0_DV, LCDD19_DV_CLKI),
693 PINMUX_DATA(DV_CLK_MARK, PSD0_DV, LCDD18_DV_CLK),
694 PINMUX_DATA(DV_HSYNC_MARK, PSD0_DV, LCDD17_DV_HSYNC),
695 PINMUX_DATA(DV_VSYNC_MARK, PSD0_DV, LCDD16_DV_VSYNC),
696 PINMUX_DATA(DV_D15_MARK, PSD0_DV, LCDD15_DV_D15),
697 PINMUX_DATA(DV_D14_MARK, PSD0_DV, LCDD14_DV_D14),
698 PINMUX_DATA(DV_D13_MARK, PSD0_DV, LCDD13_DV_D13),
699 PINMUX_DATA(DV_D12_MARK, PSD0_DV, LCDD12_DV_D12),
700 PINMUX_DATA(DV_D11_MARK, PSD0_DV, LCDD11_DV_D11),
701 PINMUX_DATA(DV_D10_MARK, PSD0_DV, LCDD10_DV_D10),
702 PINMUX_DATA(DV_D9_MARK, PSD0_DV, LCDD9_DV_D9),
703 PINMUX_DATA(DV_D8_MARK, PSD0_DV, LCDD8_DV_D8),
704 PINMUX_DATA(DV_D7_MARK, PSD0_DV, LCDD7_DV_D7),
705 PINMUX_DATA(DV_D6_MARK, PSD0_DV, LCDD6_DV_D6),
706 PINMUX_DATA(DV_D5_MARK, PSD0_DV, LCDD5_DV_D5),
707 PINMUX_DATA(DV_D4_MARK, PSD0_DV, LCDD4_DV_D4),
708 PINMUX_DATA(DV_D3_MARK, PSD0_DV, LCDD3_DV_D3),
709 PINMUX_DATA(DV_D2_MARK, PSD0_DV, LCDD2_DV_D2),
710 PINMUX_DATA(DV_D1_MARK, PSD0_DV, LCDD1_DV_D1),
711 PINMUX_DATA(DV_D0_MARK, PSD0_DV, LCDD0_DV_D0),
712
713 /* CPG */
714 PINMUX_DATA(STATUS0_MARK, STATUS0),
715 PINMUX_DATA(PDSTATUS_MARK, PDSTATUS),
716
717 /* SIOF0 */
718 PINMUX_DATA(SIOF0_MCK_MARK, PSE15_SIOF0_MCK_IRQ3, PSB8_SIOF0_MCK, PTQ0),
719 PINMUX_DATA(SIOF0_SCK_MARK, PSB5_SIOF0_SCK, SIOF0_SCK_TS_SCK),
720 PINMUX_DATA(SIOF0_SYNC_MARK, PSB4_SIOF0_SYNC, SIOF0_SYNC_TS_SDEN),
721 PINMUX_DATA(SIOF0_SS1_MARK, PSB3_SIOF0_SS1, SIOF0_SS1_TS_SPSYNC),
722 PINMUX_DATA(SIOF0_SS2_MARK, PSB2_SIOF0_SS2, SIOF0_SS2_SIM_RST),
723 PINMUX_DATA(SIOF0_TXD_MARK, PSE14_SIOF0_TXD_IRDA_OUT,
724 PSB7_SIOF0_TXD, PTQ1),
725 PINMUX_DATA(SIOF0_RXD_MARK, PSE13_SIOF0_RXD_IRDA_IN,
726 PSB6_SIOF0_RXD, PTQ2),
727
728 /* SIOF1 */
729 PINMUX_DATA(SIOF1_MCK_MARK, PSE11_SIUMCKA_SIOF1_MCK,
730 PSB1_SIOF1_MCK, PTK0),
731 PINMUX_DATA(SIOF1_SCK_MARK, PSC14_SIOF1_SCK, SIUAOBT_SIOF1_SCK),
732 PINMUX_DATA(SIOF1_SYNC_MARK, PSC13_SIOF1_SYNC, SIUAOLR_SIOF1_SYNC),
733 PINMUX_DATA(SIOF1_SS1_MARK, PSC12_SIOF1_SS1, SIUAIBT_SIOF1_SS1),
734 PINMUX_DATA(SIOF1_SS2_MARK, PSC11_SIOF1_SS2, SIUAILR_SIOF1_SS2),
735 PINMUX_DATA(SIOF1_TXD_MARK, PSB0_SIOF1_TXD, SIUAOSLD_SIOF1_TXD),
736 PINMUX_DATA(SIOF1_RXD_MARK, PSC15_SIOF1_RXD, SIUAISLD_SIOF1_RXD),
737
738 /* SIM */
739 PINMUX_DATA(SIM_D_MARK, PSE15_SIM_D, PTQ0),
740 PINMUX_DATA(SIM_CLK_MARK, PSE14_SIM_CLK, PTQ1),
741 PINMUX_DATA(SIM_RST_MARK, PSB2_SIM_RST, SIOF0_SS2_SIM_RST),
742
743 /* TSIF */
744 PINMUX_DATA(TS_SDAT_MARK, PSE13_TS_SDAT, PTQ2),
745 PINMUX_DATA(TS_SCK_MARK, PSB5_TS_SCK, SIOF0_SCK_TS_SCK),
746 PINMUX_DATA(TS_SDEN_MARK, PSB4_TS_SDEN, SIOF0_SYNC_TS_SDEN),
747 PINMUX_DATA(TS_SPSYNC_MARK, PSB3_TS_SPSYNC, SIOF0_SS1_TS_SPSYNC),
748
749 /* IRDA */
750 PINMUX_DATA(IRDA_IN_MARK, PSE13_SIOF0_RXD_IRDA_IN, PSB6_IRDA_IN, PTQ2),
751 PINMUX_DATA(IRDA_OUT_MARK, PSE14_SIOF0_TXD_IRDA_OUT,
752 PSB7_IRDA_OUT, PTQ1),
753
754 /* TPU */
755 PINMUX_DATA(TPUTO_MARK, PSD8_TPUTO, SCIF0_SCK_TPUTO),
756
757 /* FLCTL */
758 PINMUX_DATA(FCE_MARK, PSE3_FLCTL, FCE_VIO_HD2),
759 PINMUX_DATA(NAF7_MARK, PSC0_NAF, HIZA10_NAF, NAF7_VIO_D15),
760 PINMUX_DATA(NAF6_MARK, PSC0_NAF, HIZA10_NAF, NAF6_VIO_D14),
761 PINMUX_DATA(NAF5_MARK, PSC0_NAF, HIZA10_NAF, NAF5_VIO_D13),
762 PINMUX_DATA(NAF4_MARK, PSC0_NAF, HIZA10_NAF, NAF4_VIO_D12),
763 PINMUX_DATA(NAF3_MARK, PSC0_NAF, HIZA10_NAF, NAF3_VIO_D11),
764 PINMUX_DATA(NAF2_MARK, PSE2_NAF2, HIZB0_VIO, NAF2_VIO_D10),
765 PINMUX_DATA(NAF1_MARK, PSE1_NAF1, HIZB0_VIO, NAF1_VIO_D9),
766 PINMUX_DATA(NAF0_MARK, PSE0_NAF0, HIZB0_VIO, NAF0_VIO_D8),
767 PINMUX_DATA(FCDE_MARK, FCDE),
768 PINMUX_DATA(FOE_MARK, PSE3_FLCTL, HIZB0_VIO, FOE_VIO_VD2),
769 PINMUX_DATA(FSC_MARK, FSC),
770 PINMUX_DATA(FWE_MARK, FWE),
771 PINMUX_DATA(FRB_MARK, PSE3_FLCTL, FRB_VIO_CLK2),
772
773 /* KEYSC */
774 PINMUX_DATA(KEYIN0_MARK, PSA15_KEYIN0, HIZC14_IRQ6, KEYIN0_IRQ6),
775 PINMUX_DATA(KEYIN1_MARK, HIZA14_KEYSC, KEYIN1),
776 PINMUX_DATA(KEYIN2_MARK, HIZA14_KEYSC, KEYIN2),
777 PINMUX_DATA(KEYIN3_MARK, HIZA14_KEYSC, KEYIN3),
778 PINMUX_DATA(KEYIN4_MARK, PSA14_KEYIN4, HIZC15_IRQ7, KEYIN4_IRQ7),
779 PINMUX_DATA(KEYOUT0_MARK, HIZA14_KEYSC, KEYOUT0),
780 PINMUX_DATA(KEYOUT1_MARK, HIZA14_KEYSC, KEYOUT1),
781 PINMUX_DATA(KEYOUT2_MARK, HIZA14_KEYSC, KEYOUT2),
782 PINMUX_DATA(KEYOUT3_MARK, HIZA14_KEYSC, KEYOUT3),
783 PINMUX_DATA(KEYOUT4_IN6_MARK, HIZA14_KEYSC, KEYOUT4_IN6),
784 PINMUX_DATA(KEYOUT5_IN5_MARK, HIZA14_KEYSC, KEYOUT5_IN5),
785};
786
787static struct pinmux_gpio pinmux_gpios[] = {
788 /* PTA */
789 PINMUX_GPIO(GPIO_PTA7, PTA7_DATA),
790 PINMUX_GPIO(GPIO_PTA6, PTA6_DATA),
791 PINMUX_GPIO(GPIO_PTA5, PTA5_DATA),
792 PINMUX_GPIO(GPIO_PTA4, PTA4_DATA),
793 PINMUX_GPIO(GPIO_PTA3, PTA3_DATA),
794 PINMUX_GPIO(GPIO_PTA2, PTA2_DATA),
795 PINMUX_GPIO(GPIO_PTA1, PTA1_DATA),
796 PINMUX_GPIO(GPIO_PTA0, PTA0_DATA),
797
798 /* PTB */
799 PINMUX_GPIO(GPIO_PTB7, PTB7_DATA),
800 PINMUX_GPIO(GPIO_PTB6, PTB6_DATA),
801 PINMUX_GPIO(GPIO_PTB5, PTB5_DATA),
802 PINMUX_GPIO(GPIO_PTB4, PTB4_DATA),
803 PINMUX_GPIO(GPIO_PTB3, PTB3_DATA),
804 PINMUX_GPIO(GPIO_PTB2, PTB2_DATA),
805 PINMUX_GPIO(GPIO_PTB1, PTB1_DATA),
806 PINMUX_GPIO(GPIO_PTB0, PTB0_DATA),
807
808 /* PTC */
809 PINMUX_GPIO(GPIO_PTC7, PTC7_DATA),
810 PINMUX_GPIO(GPIO_PTC5, PTC5_DATA),
811 PINMUX_GPIO(GPIO_PTC4, PTC4_DATA),
812 PINMUX_GPIO(GPIO_PTC3, PTC3_DATA),
813 PINMUX_GPIO(GPIO_PTC2, PTC2_DATA),
814 PINMUX_GPIO(GPIO_PTC0, PTC0_DATA),
815
816 /* PTD */
817 PINMUX_GPIO(GPIO_PTD7, PTD7_DATA),
818 PINMUX_GPIO(GPIO_PTD6, PTD6_DATA),
819 PINMUX_GPIO(GPIO_PTD5, PTD5_DATA),
820 PINMUX_GPIO(GPIO_PTD4, PTD4_DATA),
821 PINMUX_GPIO(GPIO_PTD3, PTD3_DATA),
822 PINMUX_GPIO(GPIO_PTD2, PTD2_DATA),
823 PINMUX_GPIO(GPIO_PTD1, PTD1_DATA),
824 PINMUX_GPIO(GPIO_PTD0, PTD0_DATA),
825
826 /* PTE */
827 PINMUX_GPIO(GPIO_PTE7, PTE7_DATA),
828 PINMUX_GPIO(GPIO_PTE6, PTE6_DATA),
829 PINMUX_GPIO(GPIO_PTE5, PTE5_DATA),
830 PINMUX_GPIO(GPIO_PTE4, PTE4_DATA),
831 PINMUX_GPIO(GPIO_PTE1, PTE1_DATA),
832 PINMUX_GPIO(GPIO_PTE0, PTE0_DATA),
833
834 /* PTF */
835 PINMUX_GPIO(GPIO_PTF6, PTF6_DATA),
836 PINMUX_GPIO(GPIO_PTF5, PTF5_DATA),
837 PINMUX_GPIO(GPIO_PTF4, PTF4_DATA),
838 PINMUX_GPIO(GPIO_PTF3, PTF3_DATA),
839 PINMUX_GPIO(GPIO_PTF2, PTF2_DATA),
840 PINMUX_GPIO(GPIO_PTF1, PTF1_DATA),
841 PINMUX_GPIO(GPIO_PTF0, PTF0_DATA),
842
843 /* PTG */
844 PINMUX_GPIO(GPIO_PTG4, PTG4_DATA),
845 PINMUX_GPIO(GPIO_PTG3, PTG3_DATA),
846 PINMUX_GPIO(GPIO_PTG2, PTG2_DATA),
847 PINMUX_GPIO(GPIO_PTG1, PTG1_DATA),
848 PINMUX_GPIO(GPIO_PTG0, PTG0_DATA),
849
850 /* PTH */
851 PINMUX_GPIO(GPIO_PTH7, PTH7_DATA),
852 PINMUX_GPIO(GPIO_PTH6, PTH6_DATA),
853 PINMUX_GPIO(GPIO_PTH5, PTH5_DATA),
854 PINMUX_GPIO(GPIO_PTH4, PTH4_DATA),
855 PINMUX_GPIO(GPIO_PTH3, PTH3_DATA),
856 PINMUX_GPIO(GPIO_PTH2, PTH2_DATA),
857 PINMUX_GPIO(GPIO_PTH1, PTH1_DATA),
858 PINMUX_GPIO(GPIO_PTH0, PTH0_DATA),
859
860 /* PTJ */
861 PINMUX_GPIO(GPIO_PTJ7, PTJ7_DATA),
862 PINMUX_GPIO(GPIO_PTJ6, PTJ6_DATA),
863 PINMUX_GPIO(GPIO_PTJ5, PTJ5_DATA),
864 PINMUX_GPIO(GPIO_PTJ1, PTJ1_DATA),
865 PINMUX_GPIO(GPIO_PTJ0, PTJ0_DATA),
866
867 /* PTK */
868 PINMUX_GPIO(GPIO_PTK6, PTK6_DATA),
869 PINMUX_GPIO(GPIO_PTK5, PTK5_DATA),
870 PINMUX_GPIO(GPIO_PTK4, PTK4_DATA),
871 PINMUX_GPIO(GPIO_PTK3, PTK3_DATA),
872 PINMUX_GPIO(GPIO_PTK2, PTK2_DATA),
873 PINMUX_GPIO(GPIO_PTK1, PTK1_DATA),
874 PINMUX_GPIO(GPIO_PTK0, PTK0_DATA),
875
876 /* PTL */
877 PINMUX_GPIO(GPIO_PTL7, PTL7_DATA),
878 PINMUX_GPIO(GPIO_PTL6, PTL6_DATA),
879 PINMUX_GPIO(GPIO_PTL5, PTL5_DATA),
880 PINMUX_GPIO(GPIO_PTL4, PTL4_DATA),
881 PINMUX_GPIO(GPIO_PTL3, PTL3_DATA),
882 PINMUX_GPIO(GPIO_PTL2, PTL2_DATA),
883 PINMUX_GPIO(GPIO_PTL1, PTL1_DATA),
884 PINMUX_GPIO(GPIO_PTL0, PTL0_DATA),
885
886 /* PTM */
887 PINMUX_GPIO(GPIO_PTM7, PTM7_DATA),
888 PINMUX_GPIO(GPIO_PTM6, PTM6_DATA),
889 PINMUX_GPIO(GPIO_PTM5, PTM5_DATA),
890 PINMUX_GPIO(GPIO_PTM4, PTM4_DATA),
891 PINMUX_GPIO(GPIO_PTM3, PTM3_DATA),
892 PINMUX_GPIO(GPIO_PTM2, PTM2_DATA),
893 PINMUX_GPIO(GPIO_PTM1, PTM1_DATA),
894 PINMUX_GPIO(GPIO_PTM0, PTM0_DATA),
895
896 /* PTN */
897 PINMUX_GPIO(GPIO_PTN7, PTN7_DATA),
898 PINMUX_GPIO(GPIO_PTN6, PTN6_DATA),
899 PINMUX_GPIO(GPIO_PTN5, PTN5_DATA),
900 PINMUX_GPIO(GPIO_PTN4, PTN4_DATA),
901 PINMUX_GPIO(GPIO_PTN3, PTN3_DATA),
902 PINMUX_GPIO(GPIO_PTN2, PTN2_DATA),
903 PINMUX_GPIO(GPIO_PTN1, PTN1_DATA),
904 PINMUX_GPIO(GPIO_PTN0, PTN0_DATA),
905
906 /* PTQ */
907 PINMUX_GPIO(GPIO_PTQ6, PTQ6_DATA),
908 PINMUX_GPIO(GPIO_PTQ5, PTQ5_DATA),
909 PINMUX_GPIO(GPIO_PTQ4, PTQ4_DATA),
910 PINMUX_GPIO(GPIO_PTQ3, PTQ3_DATA),
911 PINMUX_GPIO(GPIO_PTQ2, PTQ2_DATA),
912 PINMUX_GPIO(GPIO_PTQ1, PTQ1_DATA),
913 PINMUX_GPIO(GPIO_PTQ0, PTQ0_DATA),
914
915 /* PTR */
916 PINMUX_GPIO(GPIO_PTR4, PTR4_DATA),
917 PINMUX_GPIO(GPIO_PTR3, PTR3_DATA),
918 PINMUX_GPIO(GPIO_PTR2, PTR2_DATA),
919 PINMUX_GPIO(GPIO_PTR1, PTR1_DATA),
920 PINMUX_GPIO(GPIO_PTR0, PTR0_DATA),
921
922 /* PTS */
923 PINMUX_GPIO(GPIO_PTS4, PTS4_DATA),
924 PINMUX_GPIO(GPIO_PTS3, PTS3_DATA),
925 PINMUX_GPIO(GPIO_PTS2, PTS2_DATA),
926 PINMUX_GPIO(GPIO_PTS1, PTS1_DATA),
927 PINMUX_GPIO(GPIO_PTS0, PTS0_DATA),
928
929 /* PTT */
930 PINMUX_GPIO(GPIO_PTT4, PTT4_DATA),
931 PINMUX_GPIO(GPIO_PTT3, PTT3_DATA),
932 PINMUX_GPIO(GPIO_PTT2, PTT2_DATA),
933 PINMUX_GPIO(GPIO_PTT1, PTT1_DATA),
934 PINMUX_GPIO(GPIO_PTT0, PTT0_DATA),
935
936 /* PTU */
937 PINMUX_GPIO(GPIO_PTU4, PTU4_DATA),
938 PINMUX_GPIO(GPIO_PTU3, PTU3_DATA),
939 PINMUX_GPIO(GPIO_PTU2, PTU2_DATA),
940 PINMUX_GPIO(GPIO_PTU1, PTU1_DATA),
941 PINMUX_GPIO(GPIO_PTU0, PTU0_DATA),
942
943 /* PTV */
944 PINMUX_GPIO(GPIO_PTV4, PTV4_DATA),
945 PINMUX_GPIO(GPIO_PTV3, PTV3_DATA),
946 PINMUX_GPIO(GPIO_PTV2, PTV2_DATA),
947 PINMUX_GPIO(GPIO_PTV1, PTV1_DATA),
948 PINMUX_GPIO(GPIO_PTV0, PTV0_DATA),
949
950 /* PTW */
951 PINMUX_GPIO(GPIO_PTW6, PTW6_DATA),
952 PINMUX_GPIO(GPIO_PTW5, PTW5_DATA),
953 PINMUX_GPIO(GPIO_PTW4, PTW4_DATA),
954 PINMUX_GPIO(GPIO_PTW3, PTW3_DATA),
955 PINMUX_GPIO(GPIO_PTW2, PTW2_DATA),
956 PINMUX_GPIO(GPIO_PTW1, PTW1_DATA),
957 PINMUX_GPIO(GPIO_PTW0, PTW0_DATA),
958
959 /* PTX */
960 PINMUX_GPIO(GPIO_PTX6, PTX6_DATA),
961 PINMUX_GPIO(GPIO_PTX5, PTX5_DATA),
962 PINMUX_GPIO(GPIO_PTX4, PTX4_DATA),
963 PINMUX_GPIO(GPIO_PTX3, PTX3_DATA),
964 PINMUX_GPIO(GPIO_PTX2, PTX2_DATA),
965 PINMUX_GPIO(GPIO_PTX1, PTX1_DATA),
966 PINMUX_GPIO(GPIO_PTX0, PTX0_DATA),
967
968 /* PTY */
969 PINMUX_GPIO(GPIO_PTY5, PTY5_DATA),
970 PINMUX_GPIO(GPIO_PTY4, PTY4_DATA),
971 PINMUX_GPIO(GPIO_PTY3, PTY3_DATA),
972 PINMUX_GPIO(GPIO_PTY2, PTY2_DATA),
973 PINMUX_GPIO(GPIO_PTY1, PTY1_DATA),
974 PINMUX_GPIO(GPIO_PTY0, PTY0_DATA),
975
976 /* PTZ */
977 PINMUX_GPIO(GPIO_PTZ5, PTZ5_DATA),
978 PINMUX_GPIO(GPIO_PTZ4, PTZ4_DATA),
979 PINMUX_GPIO(GPIO_PTZ3, PTZ3_DATA),
980 PINMUX_GPIO(GPIO_PTZ2, PTZ2_DATA),
981 PINMUX_GPIO(GPIO_PTZ1, PTZ1_DATA),
982
983 /* SCIF0 */
984 PINMUX_GPIO(GPIO_FN_SCIF0_TXD, SCIF0_TXD_MARK),
985 PINMUX_GPIO(GPIO_FN_SCIF0_RXD, SCIF0_RXD_MARK),
986 PINMUX_GPIO(GPIO_FN_SCIF0_RTS, SCIF0_RTS_MARK),
987 PINMUX_GPIO(GPIO_FN_SCIF0_CTS, SCIF0_CTS_MARK),
988 PINMUX_GPIO(GPIO_FN_SCIF0_SCK, SCIF0_SCK_MARK),
989
990 /* SCIF1 */
991 PINMUX_GPIO(GPIO_FN_SCIF1_TXD, SCIF1_TXD_MARK),
992 PINMUX_GPIO(GPIO_FN_SCIF1_RXD, SCIF1_RXD_MARK),
993 PINMUX_GPIO(GPIO_FN_SCIF1_RTS, SCIF1_RTS_MARK),
994 PINMUX_GPIO(GPIO_FN_SCIF1_CTS, SCIF1_CTS_MARK),
995 PINMUX_GPIO(GPIO_FN_SCIF1_SCK, SCIF1_SCK_MARK),
996
997 /* SCIF2 */
998 PINMUX_GPIO(GPIO_FN_SCIF2_TXD, SCIF2_TXD_MARK),
999 PINMUX_GPIO(GPIO_FN_SCIF2_RXD, SCIF2_RXD_MARK),
1000 PINMUX_GPIO(GPIO_FN_SCIF2_RTS, SCIF2_RTS_MARK),
1001 PINMUX_GPIO(GPIO_FN_SCIF2_CTS, SCIF2_CTS_MARK),
1002 PINMUX_GPIO(GPIO_FN_SCIF2_SCK, SCIF2_SCK_MARK),
1003
1004 /* SIO */
1005 PINMUX_GPIO(GPIO_FN_SIOTXD, SIOTXD_MARK),
1006 PINMUX_GPIO(GPIO_FN_SIORXD, SIORXD_MARK),
1007 PINMUX_GPIO(GPIO_FN_SIOD, SIOD_MARK),
1008 PINMUX_GPIO(GPIO_FN_SIOSTRB0, SIOSTRB0_MARK),
1009 PINMUX_GPIO(GPIO_FN_SIOSTRB1, SIOSTRB1_MARK),
1010 PINMUX_GPIO(GPIO_FN_SIOSCK, SIOSCK_MARK),
1011 PINMUX_GPIO(GPIO_FN_SIOMCK, SIOMCK_MARK),
1012
1013 /* CEU */
1014 PINMUX_GPIO(GPIO_FN_VIO_D15, VIO_D15_MARK),
1015 PINMUX_GPIO(GPIO_FN_VIO_D14, VIO_D14_MARK),
1016 PINMUX_GPIO(GPIO_FN_VIO_D13, VIO_D13_MARK),
1017 PINMUX_GPIO(GPIO_FN_VIO_D12, VIO_D12_MARK),
1018 PINMUX_GPIO(GPIO_FN_VIO_D11, VIO_D11_MARK),
1019 PINMUX_GPIO(GPIO_FN_VIO_D10, VIO_D10_MARK),
1020 PINMUX_GPIO(GPIO_FN_VIO_D9, VIO_D9_MARK),
1021 PINMUX_GPIO(GPIO_FN_VIO_D8, VIO_D8_MARK),
1022 PINMUX_GPIO(GPIO_FN_VIO_D7, VIO_D7_MARK),
1023 PINMUX_GPIO(GPIO_FN_VIO_D6, VIO_D6_MARK),
1024 PINMUX_GPIO(GPIO_FN_VIO_D5, VIO_D5_MARK),
1025 PINMUX_GPIO(GPIO_FN_VIO_D4, VIO_D4_MARK),
1026 PINMUX_GPIO(GPIO_FN_VIO_D3, VIO_D3_MARK),
1027 PINMUX_GPIO(GPIO_FN_VIO_D2, VIO_D2_MARK),
1028 PINMUX_GPIO(GPIO_FN_VIO_D1, VIO_D1_MARK),
1029 PINMUX_GPIO(GPIO_FN_VIO_D0, VIO_D0_MARK),
1030 PINMUX_GPIO(GPIO_FN_VIO_CLK, VIO_CLK_MARK),
1031 PINMUX_GPIO(GPIO_FN_VIO_VD, VIO_VD_MARK),
1032 PINMUX_GPIO(GPIO_FN_VIO_HD, VIO_HD_MARK),
1033 PINMUX_GPIO(GPIO_FN_VIO_FLD, VIO_FLD_MARK),
1034 PINMUX_GPIO(GPIO_FN_VIO_CKO, VIO_CKO_MARK),
1035 PINMUX_GPIO(GPIO_FN_VIO_STEX, VIO_STEX_MARK),
1036 PINMUX_GPIO(GPIO_FN_VIO_STEM, VIO_STEM_MARK),
1037 PINMUX_GPIO(GPIO_FN_VIO_VD2, VIO_VD2_MARK),
1038 PINMUX_GPIO(GPIO_FN_VIO_HD2, VIO_HD2_MARK),
1039 PINMUX_GPIO(GPIO_FN_VIO_CLK2, VIO_CLK2_MARK),
1040
1041 /* LCDC */
1042 PINMUX_GPIO(GPIO_FN_LCDD23, LCDD23_MARK),
1043 PINMUX_GPIO(GPIO_FN_LCDD22, LCDD22_MARK),
1044 PINMUX_GPIO(GPIO_FN_LCDD21, LCDD21_MARK),
1045 PINMUX_GPIO(GPIO_FN_LCDD20, LCDD20_MARK),
1046 PINMUX_GPIO(GPIO_FN_LCDD19, LCDD19_MARK),
1047 PINMUX_GPIO(GPIO_FN_LCDD18, LCDD18_MARK),
1048 PINMUX_GPIO(GPIO_FN_LCDD17, LCDD17_MARK),
1049 PINMUX_GPIO(GPIO_FN_LCDD16, LCDD16_MARK),
1050 PINMUX_GPIO(GPIO_FN_LCDD15, LCDD15_MARK),
1051 PINMUX_GPIO(GPIO_FN_LCDD14, LCDD14_MARK),
1052 PINMUX_GPIO(GPIO_FN_LCDD13, LCDD13_MARK),
1053 PINMUX_GPIO(GPIO_FN_LCDD12, LCDD12_MARK),
1054 PINMUX_GPIO(GPIO_FN_LCDD11, LCDD11_MARK),
1055 PINMUX_GPIO(GPIO_FN_LCDD10, LCDD10_MARK),
1056 PINMUX_GPIO(GPIO_FN_LCDD9, LCDD9_MARK),
1057 PINMUX_GPIO(GPIO_FN_LCDD8, LCDD8_MARK),
1058 PINMUX_GPIO(GPIO_FN_LCDD7, LCDD7_MARK),
1059 PINMUX_GPIO(GPIO_FN_LCDD6, LCDD6_MARK),
1060 PINMUX_GPIO(GPIO_FN_LCDD5, LCDD5_MARK),
1061 PINMUX_GPIO(GPIO_FN_LCDD4, LCDD4_MARK),
1062 PINMUX_GPIO(GPIO_FN_LCDD3, LCDD3_MARK),
1063 PINMUX_GPIO(GPIO_FN_LCDD2, LCDD2_MARK),
1064 PINMUX_GPIO(GPIO_FN_LCDD1, LCDD1_MARK),
1065 PINMUX_GPIO(GPIO_FN_LCDD0, LCDD0_MARK),
1066 PINMUX_GPIO(GPIO_FN_LCDLCLK, LCDLCLK_MARK),
1067 /* Main LCD */
1068 PINMUX_GPIO(GPIO_FN_LCDDON, LCDDON_MARK),
1069 PINMUX_GPIO(GPIO_FN_LCDVCPWC, LCDVCPWC_MARK),
1070 PINMUX_GPIO(GPIO_FN_LCDVEPWC, LCDVEPWC_MARK),
1071 PINMUX_GPIO(GPIO_FN_LCDVSYN, LCDVSYN_MARK),
1072 /* Main LCD - RGB Mode */
1073 PINMUX_GPIO(GPIO_FN_LCDDCK, LCDDCK_MARK),
1074 PINMUX_GPIO(GPIO_FN_LCDHSYN, LCDHSYN_MARK),
1075 PINMUX_GPIO(GPIO_FN_LCDDISP, LCDDISP_MARK),
1076 /* Main LCD - SYS Mode */
1077 PINMUX_GPIO(GPIO_FN_LCDRS, LCDRS_MARK),
1078 PINMUX_GPIO(GPIO_FN_LCDCS, LCDCS_MARK),
1079 PINMUX_GPIO(GPIO_FN_LCDWR, LCDWR_MARK),
1080 PINMUX_GPIO(GPIO_FN_LCDRD, LCDRD_MARK),
1081 /* Sub LCD - SYS Mode */
1082 PINMUX_GPIO(GPIO_FN_LCDDON2, LCDDON2_MARK),
1083 PINMUX_GPIO(GPIO_FN_LCDVCPWC2, LCDVCPWC2_MARK),
1084 PINMUX_GPIO(GPIO_FN_LCDVEPWC2, LCDVEPWC2_MARK),
1085 PINMUX_GPIO(GPIO_FN_LCDVSYN2, LCDVSYN2_MARK),
1086 PINMUX_GPIO(GPIO_FN_LCDCS2, LCDCS2_MARK),
1087
1088 /* BSC */
1089 PINMUX_GPIO(GPIO_FN_IOIS16, IOIS16_MARK),
1090 PINMUX_GPIO(GPIO_FN_A25, A25_MARK),
1091 PINMUX_GPIO(GPIO_FN_A24, A24_MARK),
1092 PINMUX_GPIO(GPIO_FN_A23, A23_MARK),
1093 PINMUX_GPIO(GPIO_FN_A22, A22_MARK),
1094 PINMUX_GPIO(GPIO_FN_BS, BS_MARK),
1095 PINMUX_GPIO(GPIO_FN_CS6B_CE1B, CS6B_CE1B_MARK),
1096 PINMUX_GPIO(GPIO_FN_WAIT, WAIT_MARK),
1097 PINMUX_GPIO(GPIO_FN_CS6A_CE2B, CS6A_CE2B_MARK),
1098
1099 /* SBSC */
1100 PINMUX_GPIO(GPIO_FN_HPD63, HPD63_MARK),
1101 PINMUX_GPIO(GPIO_FN_HPD62, HPD62_MARK),
1102 PINMUX_GPIO(GPIO_FN_HPD61, HPD61_MARK),
1103 PINMUX_GPIO(GPIO_FN_HPD60, HPD60_MARK),
1104 PINMUX_GPIO(GPIO_FN_HPD59, HPD59_MARK),
1105 PINMUX_GPIO(GPIO_FN_HPD58, HPD58_MARK),
1106 PINMUX_GPIO(GPIO_FN_HPD57, HPD57_MARK),
1107 PINMUX_GPIO(GPIO_FN_HPD56, HPD56_MARK),
1108 PINMUX_GPIO(GPIO_FN_HPD55, HPD55_MARK),
1109 PINMUX_GPIO(GPIO_FN_HPD54, HPD54_MARK),
1110 PINMUX_GPIO(GPIO_FN_HPD53, HPD53_MARK),
1111 PINMUX_GPIO(GPIO_FN_HPD52, HPD52_MARK),
1112 PINMUX_GPIO(GPIO_FN_HPD51, HPD51_MARK),
1113 PINMUX_GPIO(GPIO_FN_HPD50, HPD50_MARK),
1114 PINMUX_GPIO(GPIO_FN_HPD49, HPD49_MARK),
1115 PINMUX_GPIO(GPIO_FN_HPD48, HPD48_MARK),
1116 PINMUX_GPIO(GPIO_FN_HPDQM7, HPDQM7_MARK),
1117 PINMUX_GPIO(GPIO_FN_HPDQM6, HPDQM6_MARK),
1118 PINMUX_GPIO(GPIO_FN_HPDQM5, HPDQM5_MARK),
1119 PINMUX_GPIO(GPIO_FN_HPDQM4, HPDQM4_MARK),
1120
1121 /* IRQ */
1122 PINMUX_GPIO(GPIO_FN_IRQ0, IRQ0_MARK),
1123 PINMUX_GPIO(GPIO_FN_IRQ1, IRQ1_MARK),
1124 PINMUX_GPIO(GPIO_FN_IRQ2, IRQ2_MARK),
1125 PINMUX_GPIO(GPIO_FN_IRQ3, IRQ3_MARK),
1126 PINMUX_GPIO(GPIO_FN_IRQ4, IRQ4_MARK),
1127 PINMUX_GPIO(GPIO_FN_IRQ5, IRQ5_MARK),
1128 PINMUX_GPIO(GPIO_FN_IRQ6, IRQ6_MARK),
1129 PINMUX_GPIO(GPIO_FN_IRQ7, IRQ7_MARK),
1130
1131 /* SDHI */
1132 PINMUX_GPIO(GPIO_FN_SDHICD, SDHICD_MARK),
1133 PINMUX_GPIO(GPIO_FN_SDHIWP, SDHIWP_MARK),
1134 PINMUX_GPIO(GPIO_FN_SDHID3, SDHID3_MARK),
1135 PINMUX_GPIO(GPIO_FN_SDHID2, SDHID2_MARK),
1136 PINMUX_GPIO(GPIO_FN_SDHID1, SDHID1_MARK),
1137 PINMUX_GPIO(GPIO_FN_SDHID0, SDHID0_MARK),
1138 PINMUX_GPIO(GPIO_FN_SDHICMD, SDHICMD_MARK),
1139 PINMUX_GPIO(GPIO_FN_SDHICLK, SDHICLK_MARK),
1140
1141 /* SIU - Port A */
1142 PINMUX_GPIO(GPIO_FN_SIUAOLR, SIUAOLR_MARK),
1143 PINMUX_GPIO(GPIO_FN_SIUAOBT, SIUAOBT_MARK),
1144 PINMUX_GPIO(GPIO_FN_SIUAISLD, SIUAISLD_MARK),
1145 PINMUX_GPIO(GPIO_FN_SIUAILR, SIUAILR_MARK),
1146 PINMUX_GPIO(GPIO_FN_SIUAIBT, SIUAIBT_MARK),
1147 PINMUX_GPIO(GPIO_FN_SIUAOSLD, SIUAOSLD_MARK),
1148 PINMUX_GPIO(GPIO_FN_SIUMCKA, SIUMCKA_MARK),
1149 PINMUX_GPIO(GPIO_FN_SIUFCKA, SIUFCKA_MARK),
1150
1151 /* SIU - Port B */
1152 PINMUX_GPIO(GPIO_FN_SIUBOLR, SIUBOLR_MARK),
1153 PINMUX_GPIO(GPIO_FN_SIUBOBT, SIUBOBT_MARK),
1154 PINMUX_GPIO(GPIO_FN_SIUBISLD, SIUBISLD_MARK),
1155 PINMUX_GPIO(GPIO_FN_SIUBILR, SIUBILR_MARK),
1156 PINMUX_GPIO(GPIO_FN_SIUBIBT, SIUBIBT_MARK),
1157 PINMUX_GPIO(GPIO_FN_SIUBOSLD, SIUBOSLD_MARK),
1158 PINMUX_GPIO(GPIO_FN_SIUMCKB, SIUMCKB_MARK),
1159 PINMUX_GPIO(GPIO_FN_SIUFCKB, SIUFCKB_MARK),
1160
1161 /* AUD */
1162 PINMUX_GPIO(GPIO_FN_AUDSYNC, AUDSYNC_MARK),
1163 PINMUX_GPIO(GPIO_FN_AUDATA3, AUDATA3_MARK),
1164 PINMUX_GPIO(GPIO_FN_AUDATA2, AUDATA2_MARK),
1165 PINMUX_GPIO(GPIO_FN_AUDATA1, AUDATA1_MARK),
1166 PINMUX_GPIO(GPIO_FN_AUDATA0, AUDATA0_MARK),
1167
1168 /* DMAC */
1169 PINMUX_GPIO(GPIO_FN_DACK, DACK_MARK),
1170 PINMUX_GPIO(GPIO_FN_DREQ0, DREQ0_MARK),
1171
1172 /* VOU */
1173 PINMUX_GPIO(GPIO_FN_DV_CLKI, DV_CLKI_MARK),
1174 PINMUX_GPIO(GPIO_FN_DV_CLK, DV_CLK_MARK),
1175 PINMUX_GPIO(GPIO_FN_DV_HSYNC, DV_HSYNC_MARK),
1176 PINMUX_GPIO(GPIO_FN_DV_VSYNC, DV_VSYNC_MARK),
1177 PINMUX_GPIO(GPIO_FN_DV_D15, DV_D15_MARK),
1178 PINMUX_GPIO(GPIO_FN_DV_D14, DV_D14_MARK),
1179 PINMUX_GPIO(GPIO_FN_DV_D13, DV_D13_MARK),
1180 PINMUX_GPIO(GPIO_FN_DV_D12, DV_D12_MARK),
1181 PINMUX_GPIO(GPIO_FN_DV_D11, DV_D11_MARK),
1182 PINMUX_GPIO(GPIO_FN_DV_D10, DV_D10_MARK),
1183 PINMUX_GPIO(GPIO_FN_DV_D9, DV_D9_MARK),
1184 PINMUX_GPIO(GPIO_FN_DV_D8, DV_D8_MARK),
1185 PINMUX_GPIO(GPIO_FN_DV_D7, DV_D7_MARK),
1186 PINMUX_GPIO(GPIO_FN_DV_D6, DV_D6_MARK),
1187 PINMUX_GPIO(GPIO_FN_DV_D5, DV_D5_MARK),
1188 PINMUX_GPIO(GPIO_FN_DV_D4, DV_D4_MARK),
1189 PINMUX_GPIO(GPIO_FN_DV_D3, DV_D3_MARK),
1190 PINMUX_GPIO(GPIO_FN_DV_D2, DV_D2_MARK),
1191 PINMUX_GPIO(GPIO_FN_DV_D1, DV_D1_MARK),
1192 PINMUX_GPIO(GPIO_FN_DV_D0, DV_D0_MARK),
1193
1194 /* CPG */
1195 PINMUX_GPIO(GPIO_FN_STATUS0, STATUS0_MARK),
1196 PINMUX_GPIO(GPIO_FN_PDSTATUS, PDSTATUS_MARK),
1197
1198 /* SIOF0 */
1199 PINMUX_GPIO(GPIO_FN_SIOF0_MCK, SIOF0_MCK_MARK),
1200 PINMUX_GPIO(GPIO_FN_SIOF0_SCK, SIOF0_SCK_MARK),
1201 PINMUX_GPIO(GPIO_FN_SIOF0_SYNC, SIOF0_SYNC_MARK),
1202 PINMUX_GPIO(GPIO_FN_SIOF0_SS1, SIOF0_SS1_MARK),
1203 PINMUX_GPIO(GPIO_FN_SIOF0_SS2, SIOF0_SS2_MARK),
1204 PINMUX_GPIO(GPIO_FN_SIOF0_TXD, SIOF0_TXD_MARK),
1205 PINMUX_GPIO(GPIO_FN_SIOF0_RXD, SIOF0_RXD_MARK),
1206
1207 /* SIOF1 */
1208 PINMUX_GPIO(GPIO_FN_SIOF1_MCK, SIOF1_MCK_MARK),
1209 PINMUX_GPIO(GPIO_FN_SIOF1_SCK, SIOF1_SCK_MARK),
1210 PINMUX_GPIO(GPIO_FN_SIOF1_SYNC, SIOF1_SYNC_MARK),
1211 PINMUX_GPIO(GPIO_FN_SIOF1_SS1, SIOF1_SS1_MARK),
1212 PINMUX_GPIO(GPIO_FN_SIOF1_SS2, SIOF1_SS2_MARK),
1213 PINMUX_GPIO(GPIO_FN_SIOF1_TXD, SIOF1_TXD_MARK),
1214 PINMUX_GPIO(GPIO_FN_SIOF1_RXD, SIOF1_RXD_MARK),
1215
1216 /* SIM */
1217 PINMUX_GPIO(GPIO_FN_SIM_D, SIM_D_MARK),
1218 PINMUX_GPIO(GPIO_FN_SIM_CLK, SIM_CLK_MARK),
1219 PINMUX_GPIO(GPIO_FN_SIM_RST, SIM_RST_MARK),
1220
1221 /* TSIF */
1222 PINMUX_GPIO(GPIO_FN_TS_SDAT, TS_SDAT_MARK),
1223 PINMUX_GPIO(GPIO_FN_TS_SCK, TS_SCK_MARK),
1224 PINMUX_GPIO(GPIO_FN_TS_SDEN, TS_SDEN_MARK),
1225 PINMUX_GPIO(GPIO_FN_TS_SPSYNC, TS_SPSYNC_MARK),
1226
1227 /* IRDA */
1228 PINMUX_GPIO(GPIO_FN_IRDA_IN, IRDA_IN_MARK),
1229 PINMUX_GPIO(GPIO_FN_IRDA_OUT, IRDA_OUT_MARK),
1230
1231 /* TPU */
1232 PINMUX_GPIO(GPIO_FN_TPUTO, TPUTO_MARK),
1233
1234 /* FLCTL */
1235 PINMUX_GPIO(GPIO_FN_FCE, FCE_MARK),
1236 PINMUX_GPIO(GPIO_FN_NAF7, NAF7_MARK),
1237 PINMUX_GPIO(GPIO_FN_NAF6, NAF6_MARK),
1238 PINMUX_GPIO(GPIO_FN_NAF5, NAF5_MARK),
1239 PINMUX_GPIO(GPIO_FN_NAF4, NAF4_MARK),
1240 PINMUX_GPIO(GPIO_FN_NAF3, NAF3_MARK),
1241 PINMUX_GPIO(GPIO_FN_NAF2, NAF2_MARK),
1242 PINMUX_GPIO(GPIO_FN_NAF1, NAF1_MARK),
1243 PINMUX_GPIO(GPIO_FN_NAF0, NAF0_MARK),
1244 PINMUX_GPIO(GPIO_FN_FCDE, FCDE_MARK),
1245 PINMUX_GPIO(GPIO_FN_FOE, FOE_MARK),
1246 PINMUX_GPIO(GPIO_FN_FSC, FSC_MARK),
1247 PINMUX_GPIO(GPIO_FN_FWE, FWE_MARK),
1248 PINMUX_GPIO(GPIO_FN_FRB, FRB_MARK),
1249
1250 /* KEYSC */
1251 PINMUX_GPIO(GPIO_FN_KEYIN0, KEYIN0_MARK),
1252 PINMUX_GPIO(GPIO_FN_KEYIN1, KEYIN1_MARK),
1253 PINMUX_GPIO(GPIO_FN_KEYIN2, KEYIN2_MARK),
1254 PINMUX_GPIO(GPIO_FN_KEYIN3, KEYIN3_MARK),
1255 PINMUX_GPIO(GPIO_FN_KEYIN4, KEYIN4_MARK),
1256 PINMUX_GPIO(GPIO_FN_KEYOUT0, KEYOUT0_MARK),
1257 PINMUX_GPIO(GPIO_FN_KEYOUT1, KEYOUT1_MARK),
1258 PINMUX_GPIO(GPIO_FN_KEYOUT2, KEYOUT2_MARK),
1259 PINMUX_GPIO(GPIO_FN_KEYOUT3, KEYOUT3_MARK),
1260 PINMUX_GPIO(GPIO_FN_KEYOUT4_IN6, KEYOUT4_IN6_MARK),
1261 PINMUX_GPIO(GPIO_FN_KEYOUT5_IN5, KEYOUT5_IN5_MARK),
1262};
1263
1264static struct pinmux_cfg_reg pinmux_config_regs[] = {
1265 { PINMUX_CFG_REG("PACR", 0xa4050100, 16, 2) {
1266 VIO_D7_SCIF1_SCK, PTA7_OUT, PTA7_IN_PD, PTA7_IN,
1267 VIO_D6_SCIF1_RXD, 0, PTA6_IN_PD, PTA6_IN,
1268 VIO_D5_SCIF1_TXD, PTA5_OUT, PTA5_IN_PD, PTA5_IN,
1269 VIO_D4, 0, PTA4_IN_PD, PTA4_IN,
1270 VIO_D3, 0, PTA3_IN_PD, PTA3_IN,
1271 VIO_D2, 0, PTA2_IN_PD, PTA2_IN,
1272 VIO_D1, 0, PTA1_IN_PD, PTA1_IN,
1273 VIO_D0_LCDLCLK, 0, PTA0_IN_PD, PTA0_IN }
1274 },
1275 { PINMUX_CFG_REG("PBCR", 0xa4050102, 16, 2) {
1276 HPD55, PTB7_OUT, 0, PTB7_IN,
1277 HPD54, PTB6_OUT, 0, PTB6_IN,
1278 HPD53, PTB5_OUT, 0, PTB5_IN,
1279 HPD52, PTB4_OUT, 0, PTB4_IN,
1280 HPD51, PTB3_OUT, 0, PTB3_IN,
1281 HPD50, PTB2_OUT, 0, PTB2_IN,
1282 HPD49, PTB1_OUT, 0, PTB1_IN,
1283 HPD48, PTB0_OUT, 0, PTB0_IN }
1284 },
1285 { PINMUX_CFG_REG("PCCR", 0xa4050104, 16, 2) {
1286 0, 0, PTC7_IN_PU, PTC7_IN,
1287 0, 0, 0, 0,
1288 IOIS16, 0, PTC5_IN_PU, PTC5_IN,
1289 HPDQM7, PTC4_OUT, 0, PTC4_IN,
1290 HPDQM6, PTC3_OUT, 0, PTC3_IN,
1291 HPDQM5, PTC2_OUT, 0, PTC2_IN,
1292 0, 0, 0, 0,
1293 HPDQM4, PTC0_OUT, 0, PTC0_IN }
1294 },
1295 { PINMUX_CFG_REG("PDCR", 0xa4050106, 16, 2) {
1296 SDHICD, 0, PTD7_IN_PU, PTD7_IN,
1297 SDHIWP, PTD6_OUT, PTD6_IN_PU, PTD6_IN,
1298 SDHID3, PTD5_OUT, PTD5_IN_PU, PTD5_IN,
1299 IRQ2_SDHID2, PTD4_OUT, PTD4_IN_PU, PTD4_IN,
1300 SDHID1, PTD3_OUT, PTD3_IN_PU, PTD3_IN,
1301 SDHID0, PTD2_OUT, PTD2_IN_PU, PTD2_IN,
1302 SDHICMD, PTD1_OUT, PTD1_IN_PU, PTD1_IN,
1303 SDHICLK, PTD0_OUT, 0, 0 }
1304 },
1305 { PINMUX_CFG_REG("PECR", 0xa4050108, 16, 2) {
1306 A25, PTE7_OUT, PTE7_IN_PD, PTE7_IN,
1307 A24, PTE6_OUT, PTE6_IN_PD, PTE6_IN,
1308 A23, PTE5_OUT, PTE5_IN_PD, PTE5_IN,
1309 A22, PTE4_OUT, PTE4_IN_PD, PTE4_IN,
1310 0, 0, 0, 0,
1311 0, 0, 0, 0,
1312 IRQ5, PTE1_OUT, PTE1_IN_PD, PTE1_IN,
1313 IRQ4_BS, PTE0_OUT, PTE0_IN_PD, PTE0_IN }
1314 },
1315 { PINMUX_CFG_REG("PFCR", 0xa405010a, 16, 2) {
1316 0, 0, 0, 0,
1317 PTF6, PTF6_OUT, PTF6_IN_PD, PTF6_IN,
1318 SIOSCK_SIUBOBT, PTF5_OUT, PTF5_IN_PD, PTF5_IN,
1319 SIOSTRB1_SIUBOLR, PTF4_OUT, PTF4_IN_PD, PTF4_IN,
1320 SIOSTRB0_SIUBIBT, PTF3_OUT, PTF3_IN_PD, PTF3_IN,
1321 SIOD_SIUBILR, PTF2_OUT, PTF2_IN_PD, PTF2_IN,
1322 SIORXD_SIUBISLD, 0, PTF1_IN_PD, PTF1_IN,
1323 SIOTXD_SIUBOSLD, PTF0_OUT, 0, 0 }
1324 },
1325 { PINMUX_CFG_REG("PGCR", 0xa405010c, 16, 2) {
1326 0, 0, 0, 0,
1327 0, 0, 0, 0,
1328 0, 0, 0, 0,
1329 AUDSYNC, PTG4_OUT, 0, 0,
1330 AUDATA3, PTG3_OUT, 0, 0,
1331 AUDATA2, PTG2_OUT, 0, 0,
1332 AUDATA1, PTG1_OUT, 0, 0,
1333 AUDATA0, PTG0_OUT, 0, 0 }
1334 },
1335 { PINMUX_CFG_REG("PHCR", 0xa405010e, 16, 2) {
1336 LCDVCPWC_LCDVCPWC2, PTH7_OUT, 0, 0,
1337 LCDVSYN2_DACK, PTH6_OUT, PTH6_IN_PD, PTH6_IN,
1338 LCDVSYN, PTH5_OUT, PTH5_IN_PD, PTH5_IN,
1339 LCDDISP_LCDRS, PTH4_OUT, 0, 0,
1340 LCDHSYN_LCDCS, PTH3_OUT, 0, 0,
1341 LCDDON_LCDDON2, PTH2_OUT, 0, 0,
1342 LCDD17_DV_HSYNC, PTH1_OUT, PTH1_IN_PD, PTH1_IN,
1343 LCDD16_DV_VSYNC, PTH0_OUT, PTH0_IN_PD, PTH0_IN }
1344 },
1345 { PINMUX_CFG_REG("PJCR", 0xa4050110, 16, 2) {
1346 STATUS0, PTJ7_OUT, 0, 0,
1347 0, PTJ6_OUT, 0, 0,
1348 PDSTATUS, PTJ5_OUT, 0, 0,
1349 0, 0, 0, 0,
1350 0, 0, 0, 0,
1351 0, 0, 0, 0,
1352 IRQ1, PTJ1_OUT, PTJ1_IN_PU, PTJ1_IN,
1353 IRQ0, PTJ0_OUT, PTJ0_IN_PU, PTJ0_IN }
1354 },
1355 { PINMUX_CFG_REG("PKCR", 0xa4050112, 16, 2) {
1356 0, 0, 0, 0,
1357 SIUAILR_SIOF1_SS2, PTK6_OUT, PTK6_IN_PD, PTK6_IN,
1358 SIUAIBT_SIOF1_SS1, PTK5_OUT, PTK5_IN_PD, PTK5_IN,
1359 SIUAOLR_SIOF1_SYNC, PTK4_OUT, PTK4_IN_PD, PTK4_IN,
1360 SIUAOBT_SIOF1_SCK, PTK3_OUT, PTK3_IN_PD, PTK3_IN,
1361 SIUAISLD_SIOF1_RXD, 0, PTK2_IN_PD, PTK2_IN,
1362 SIUAOSLD_SIOF1_TXD, PTK1_OUT, 0, 0,
1363 PTK0, PTK0_OUT, PTK0_IN_PD, PTK0_IN }
1364 },
1365 { PINMUX_CFG_REG("PLCR", 0xa4050114, 16, 2) {
1366 LCDD15_DV_D15, PTL7_OUT, PTL7_IN_PD, PTL7_IN,
1367 LCDD14_DV_D14, PTL6_OUT, PTL6_IN_PD, PTL6_IN,
1368 LCDD13_DV_D13, PTL5_OUT, PTL5_IN_PD, PTL5_IN,
1369 LCDD12_DV_D12, PTL4_OUT, PTL4_IN_PD, PTL4_IN,
1370 LCDD11_DV_D11, PTL3_OUT, PTL3_IN_PD, PTL3_IN,
1371 LCDD10_DV_D10, PTL2_OUT, PTL2_IN_PD, PTL2_IN,
1372 LCDD9_DV_D9, PTL1_OUT, PTL1_IN_PD, PTL1_IN,
1373 LCDD8_DV_D8, PTL0_OUT, PTL0_IN_PD, PTL0_IN }
1374 },
1375 { PINMUX_CFG_REG("PMCR", 0xa4050116, 16, 2) {
1376 LCDD7_DV_D7, PTM7_OUT, PTM7_IN_PD, PTM7_IN,
1377 LCDD6_DV_D6, PTM6_OUT, PTM6_IN_PD, PTM6_IN,
1378 LCDD5_DV_D5, PTM5_OUT, PTM5_IN_PD, PTM5_IN,
1379 LCDD4_DV_D4, PTM4_OUT, PTM4_IN_PD, PTM4_IN,
1380 LCDD3_DV_D3, PTM3_OUT, PTM3_IN_PD, PTM3_IN,
1381 LCDD2_DV_D2, PTM2_OUT, PTM2_IN_PD, PTM2_IN,
1382 LCDD1_DV_D1, PTM1_OUT, PTM1_IN_PD, PTM1_IN,
1383 LCDD0_DV_D0, PTM0_OUT, PTM0_IN_PD, PTM0_IN }
1384 },
1385 { PINMUX_CFG_REG("PNCR", 0xa4050118, 16, 2) {
1386 HPD63, PTN7_OUT, 0, PTN7_IN,
1387 HPD62, PTN6_OUT, 0, PTN6_IN,
1388 HPD61, PTN5_OUT, 0, PTN5_IN,
1389 HPD60, PTN4_OUT, 0, PTN4_IN,
1390 HPD59, PTN3_OUT, 0, PTN3_IN,
1391 HPD58, PTN2_OUT, 0, PTN2_IN,
1392 HPD57, PTN1_OUT, 0, PTN1_IN,
1393 HPD56, PTN0_OUT, 0, PTN0_IN }
1394 },
1395 { PINMUX_CFG_REG("PQCR", 0xa405011a, 16, 2) {
1396 0, 0, 0, 0,
1397 SIOF0_SS2_SIM_RST, PTQ6_OUT, 0, 0,
1398 SIOF0_SS1_TS_SPSYNC, PTQ5_OUT, PTQ5_IN_PD, PTQ5_IN,
1399 SIOF0_SYNC_TS_SDEN, PTQ4_OUT, PTQ4_IN_PD, PTQ4_IN,
1400 SIOF0_SCK_TS_SCK, PTQ3_OUT, PTQ3_IN_PD, PTQ3_IN,
1401 PTQ2, 0, PTQ2_IN_PD, PTQ2_IN,
1402 PTQ1, PTQ1_OUT, 0, 0,
1403 PTQ0, PTQ0_OUT, PTQ0_IN_PU, PTQ0_IN }
1404 },
1405 { PINMUX_CFG_REG("PRCR", 0xa405011c, 16, 2) {
1406 0, 0, 0, 0,
1407 0, 0, 0, 0,
1408 0, 0, 0, 0,
1409 LCDRD, PTR4_OUT, 0, 0,
1410 CS6B_CE1B_LCDCS2, PTR3_OUT, 0, 0,
1411 WAIT, 0, PTR2_IN_PU, PTR2_IN,
1412 LCDDCK_LCDWR, PTR1_OUT, 0, 0,
1413 LCDVEPWC_LCDVEPWC2, PTR0_OUT, 0, 0 }
1414 },
1415 { PINMUX_CFG_REG("PSCR", 0xa405011e, 16, 2) {
1416 0, 0, 0, 0,
1417 0, 0, 0, 0,
1418 0, 0, 0, 0,
1419 SCIF0_CTS_SIUAISPD, 0, PTS4_IN_PD, PTS4_IN,
1420 SCIF0_RTS_SIUAOSPD, PTS3_OUT, 0, 0,
1421 SCIF0_SCK_TPUTO, PTS2_OUT, PTS2_IN_PD, PTS2_IN,
1422 SCIF0_RXD, 0, PTS1_IN_PD, PTS1_IN,
1423 SCIF0_TXD, PTS0_OUT, 0, 0 }
1424 },
1425 { PINMUX_CFG_REG("PTCR", 0xa4050140, 16, 2) {
1426 0, 0, 0, 0,
1427 0, 0, 0, 0,
1428 0, 0, 0, 0,
1429 FOE_VIO_VD2, PTT4_OUT, PTT4_IN_PD, PTT4_IN,
1430 FWE, PTT3_OUT, PTT3_IN_PD, PTT3_IN,
1431 FSC, PTT2_OUT, PTT2_IN_PD, PTT2_IN,
1432 DREQ0, 0, PTT1_IN_PD, PTT1_IN,
1433 FCDE, PTT0_OUT, 0, 0 }
1434 },
1435 { PINMUX_CFG_REG("PUCR", 0xa4050142, 16, 2) {
1436 0, 0, 0, 0,
1437 0, 0, 0, 0,
1438 0, 0, 0, 0,
1439 NAF2_VIO_D10, PTU4_OUT, PTU4_IN_PD, PTU4_IN,
1440 NAF1_VIO_D9, PTU3_OUT, PTU3_IN_PD, PTU3_IN,
1441 NAF0_VIO_D8, PTU2_OUT, PTU2_IN_PD, PTU2_IN,
1442 FRB_VIO_CLK2, 0, PTU1_IN_PD, PTU1_IN,
1443 FCE_VIO_HD2, PTU0_OUT, PTU0_IN_PD, PTU0_IN }
1444 },
1445 { PINMUX_CFG_REG("PVCR", 0xa4050144, 16, 2) {
1446 0, 0, 0, 0,
1447 0, 0, 0, 0,
1448 0, 0, 0, 0,
1449 NAF7_VIO_D15, PTV4_OUT, PTV4_IN_PD, PTV4_IN,
1450 NAF6_VIO_D14, PTV3_OUT, PTV3_IN_PD, PTV3_IN,
1451 NAF5_VIO_D13, PTV2_OUT, PTV2_IN_PD, PTV2_IN,
1452 NAF4_VIO_D12, PTV1_OUT, PTV1_IN_PD, PTV1_IN,
1453 NAF3_VIO_D11, PTV0_OUT, PTV0_IN_PD, PTV0_IN }
1454 },
1455 { PINMUX_CFG_REG("PWCR", 0xa4050146, 16, 2) {
1456 0, 0, 0, 0,
1457 VIO_FLD_SCIF2_CTS, 0, PTW6_IN_PD, PTW6_IN,
1458 VIO_CKO_SCIF2_RTS, PTW5_OUT, 0, 0,
1459 VIO_STEX_SCIF2_SCK, PTW4_OUT, PTW4_IN_PD, PTW4_IN,
1460 VIO_STEM_SCIF2_TXD, PTW3_OUT, PTW3_IN_PD, PTW3_IN,
1461 VIO_HD_SCIF2_RXD, PTW2_OUT, PTW2_IN_PD, PTW2_IN,
1462 VIO_VD_SCIF1_CTS, PTW1_OUT, PTW1_IN_PD, PTW1_IN,
1463 VIO_CLK_SCIF1_RTS, PTW0_OUT, PTW0_IN_PD, PTW0_IN }
1464 },
1465 { PINMUX_CFG_REG("PXCR", 0xa4050148, 16, 2) {
1466 0, 0, 0, 0,
1467 CS6A_CE2B, PTX6_OUT, PTX6_IN_PU, PTX6_IN,
1468 LCDD23, PTX5_OUT, PTX5_IN_PD, PTX5_IN,
1469 LCDD22, PTX4_OUT, PTX4_IN_PD, PTX4_IN,
1470 LCDD21, PTX3_OUT, PTX3_IN_PD, PTX3_IN,
1471 LCDD20, PTX2_OUT, PTX2_IN_PD, PTX2_IN,
1472 LCDD19_DV_CLKI, PTX1_OUT, PTX1_IN_PD, PTX1_IN,
1473 LCDD18_DV_CLK, PTX0_OUT, PTX0_IN_PD, PTX0_IN }
1474 },
1475 { PINMUX_CFG_REG("PYCR", 0xa405014a, 16, 2) {
1476 0, 0, 0, 0,
1477 0, 0, 0, 0,
1478 KEYOUT5_IN5, PTY5_OUT, PTY5_IN_PU, PTY5_IN,
1479 KEYOUT4_IN6, PTY4_OUT, PTY4_IN_PU, PTY4_IN,
1480 KEYOUT3, PTY3_OUT, PTY3_IN_PU, PTY3_IN,
1481 KEYOUT2, PTY2_OUT, PTY2_IN_PU, PTY2_IN,
1482 KEYOUT1, PTY1_OUT, 0, 0,
1483 KEYOUT0, PTY0_OUT, PTY0_IN_PU, PTY0_IN }
1484 },
1485 { PINMUX_CFG_REG("PZCR", 0xa405014c, 16, 2) {
1486 0, 0, 0, 0,
1487 0, 0, 0, 0,
1488 KEYIN4_IRQ7, 0, PTZ5_IN_PU, PTZ5_IN,
1489 KEYIN3, 0, PTZ4_IN_PU, PTZ4_IN,
1490 KEYIN2, 0, PTZ3_IN_PU, PTZ3_IN,
1491 KEYIN1, 0, PTZ2_IN_PU, PTZ2_IN,
1492 KEYIN0_IRQ6, 0, PTZ1_IN_PU, PTZ1_IN,
1493 0, 0, 0, 0 }
1494 },
1495 { PINMUX_CFG_REG("PSELA", 0xa405014e, 16, 1) {
1496 PSA15_KEYIN0, PSA15_IRQ6,
1497 PSA14_KEYIN4, PSA14_IRQ7,
1498 0, 0,
1499 0, 0,
1500 0, 0,
1501 0, 0,
1502 PSA9_IRQ4, PSA9_BS,
1503 0, 0,
1504 0, 0,
1505 0, 0,
1506 0, 0,
1507 PSA4_IRQ2, PSA4_SDHID2,
1508 0, 0,
1509 0, 0,
1510 0, 0,
1511 0, 0 }
1512 },
1513 { PINMUX_CFG_REG("PSELB", 0xa4050150, 16, 1) {
1514 PSB15_SIOTXD, PSB15_SIUBOSLD,
1515 PSB14_SIORXD, PSB14_SIUBISLD,
1516 PSB13_SIOD, PSB13_SIUBILR,
1517 PSB12_SIOSTRB0, PSB12_SIUBIBT,
1518 PSB11_SIOSTRB1, PSB11_SIUBOLR,
1519 PSB10_SIOSCK, PSB10_SIUBOBT,
1520 PSB9_SIOMCK, PSB9_SIUMCKB,
1521 PSB8_SIOF0_MCK, PSB8_IRQ3,
1522 PSB7_SIOF0_TXD, PSB7_IRDA_OUT,
1523 PSB6_SIOF0_RXD, PSB6_IRDA_IN,
1524 PSB5_SIOF0_SCK, PSB5_TS_SCK,
1525 PSB4_SIOF0_SYNC, PSB4_TS_SDEN,
1526 PSB3_SIOF0_SS1, PSB3_TS_SPSYNC,
1527 PSB2_SIOF0_SS2, PSB2_SIM_RST,
1528 PSB1_SIUMCKA, PSB1_SIOF1_MCK,
1529 PSB0_SIUAOSLD, PSB0_SIOF1_TXD }
1530 },
1531 { PINMUX_CFG_REG("PSELC", 0xa4050152, 16, 1) {
1532 PSC15_SIUAISLD, PSC15_SIOF1_RXD,
1533 PSC14_SIUAOBT, PSC14_SIOF1_SCK,
1534 PSC13_SIUAOLR, PSC13_SIOF1_SYNC,
1535 PSC12_SIUAIBT, PSC12_SIOF1_SS1,
1536 PSC11_SIUAILR, PSC11_SIOF1_SS2,
1537 0, 0,
1538 0, 0,
1539 0, 0,
1540 0, 0,
1541 0, 0,
1542 0, 0,
1543 0, 0,
1544 0, 0,
1545 0, 0,
1546 0, 0,
1547 PSC0_NAF, PSC0_VIO }
1548 },
1549 { PINMUX_CFG_REG("PSELD", 0xa4050154, 16, 1) {
1550 0, 0,
1551 0, 0,
1552 PSD13_VIO, PSD13_SCIF2,
1553 PSD12_VIO, PSD12_SCIF1,
1554 PSD11_VIO, PSD11_SCIF1,
1555 PSD10_VIO_D0, PSD10_LCDLCLK,
1556 PSD9_SIOMCK_SIUMCKB, PSD9_SIUFCKB,
1557 PSD8_SCIF0_SCK, PSD8_TPUTO,
1558 PSD7_SCIF0_RTS, PSD7_SIUAOSPD,
1559 PSD6_SCIF0_CTS, PSD6_SIUAISPD,
1560 PSD5_CS6B_CE1B, PSD5_LCDCS2,
1561 0, 0,
1562 PSD3_LCDVEPWC_LCDVCPWC, PSD3_LCDVEPWC2_LCDVCPWC2,
1563 PSD2_LCDDON, PSD2_LCDDON2,
1564 0, 0,
1565 PSD0_LCDD19_LCDD0, PSD0_DV }
1566 },
1567 { PINMUX_CFG_REG("PSELE", 0xa4050156, 16, 1) {
1568 PSE15_SIOF0_MCK_IRQ3, PSE15_SIM_D,
1569 PSE14_SIOF0_TXD_IRDA_OUT, PSE14_SIM_CLK,
1570 PSE13_SIOF0_RXD_IRDA_IN, PSE13_TS_SDAT,
1571 PSE12_LCDVSYN2, PSE12_DACK,
1572 PSE11_SIUMCKA_SIOF1_MCK, PSE11_SIUFCKA,
1573 0, 0,
1574 0, 0,
1575 0, 0,
1576 0, 0,
1577 0, 0,
1578 0, 0,
1579 0, 0,
1580 PSE3_FLCTL, PSE3_VIO,
1581 PSE2_NAF2, PSE2_VIO_D10,
1582 PSE1_NAF1, PSE1_VIO_D9,
1583 PSE0_NAF0, PSE0_VIO_D8 }
1584 },
1585 { PINMUX_CFG_REG("HIZCRA", 0xa4050158, 16, 1) {
1586 0, 0,
1587 HIZA14_KEYSC, HIZA14_HIZ,
1588 0, 0,
1589 0, 0,
1590 0, 0,
1591 HIZA10_NAF, HIZA10_HIZ,
1592 HIZA9_VIO, HIZA9_HIZ,
1593 HIZA8_LCDC, HIZA8_HIZ,
1594 HIZA7_LCDC, HIZA7_HIZ,
1595 HIZA6_LCDC, HIZA6_HIZ,
1596 0, 0,
1597 0, 0,
1598 0, 0,
1599 0, 0,
1600 0, 0,
1601 0, 0 }
1602 },
1603 { PINMUX_CFG_REG("HIZCRB", 0xa405015a, 16, 1) {
1604 0, 0,
1605 0, 0,
1606 0, 0,
1607 0, 0,
1608 0, 0,
1609 0, 0,
1610 0, 0,
1611 0, 0,
1612 0, 0,
1613 0, 0,
1614 0, 0,
1615 0, 0,
1616 0, 0,
1617 0, 0,
1618 HIZB1_VIO, HIZB1_HIZ,
1619 HIZB0_VIO, HIZB0_HIZ }
1620 },
1621 { PINMUX_CFG_REG("HIZCRC", 0xa405015c, 16, 1) {
1622 HIZC15_IRQ7, HIZC15_HIZ,
1623 HIZC14_IRQ6, HIZC14_HIZ,
1624 HIZC13_IRQ5, HIZC13_HIZ,
1625 HIZC12_IRQ4, HIZC12_HIZ,
1626 HIZC11_IRQ3, HIZC11_HIZ,
1627 HIZC10_IRQ2, HIZC10_HIZ,
1628 HIZC9_IRQ1, HIZC9_HIZ,
1629 HIZC8_IRQ0, HIZC8_HIZ,
1630 0, 0,
1631 0, 0,
1632 0, 0,
1633 0, 0,
1634 0, 0,
1635 0, 0,
1636 0, 0,
1637 0, 0 }
1638 },
1639 { PINMUX_CFG_REG("MSELCRB", 0xa4050182, 16, 1) {
1640 0, 0,
1641 0, 0,
1642 0, 0,
1643 0, 0,
1644 0, 0,
1645 0, 0,
1646 MSELB9_VIO, MSELB9_VIO2,
1647 MSELB8_RGB, MSELB8_SYS,
1648 0, 0,
1649 0, 0,
1650 0, 0,
1651 0, 0,
1652 0, 0,
1653 0, 0,
1654 0, 0,
1655 0, 0 }
1656 },
1657 {}
1658};
1659
1660static struct pinmux_data_reg pinmux_data_regs[] = {
1661 { PINMUX_DATA_REG("PADR", 0xa4050120, 8) {
1662 PTA7_DATA, PTA6_DATA, PTA5_DATA, PTA4_DATA,
1663 PTA3_DATA, PTA2_DATA, PTA1_DATA, PTA0_DATA }
1664 },
1665 { PINMUX_DATA_REG("PBDR", 0xa4050122, 8) {
1666 PTB7_DATA, PTB6_DATA, PTB5_DATA, PTB4_DATA,
1667 PTB3_DATA, PTB2_DATA, PTB1_DATA, PTB0_DATA }
1668 },
1669 { PINMUX_DATA_REG("PCDR", 0xa4050124, 8) {
1670 PTC7_DATA, 0, PTC5_DATA, PTC4_DATA,
1671 PTC3_DATA, PTC2_DATA, 0, PTC0_DATA }
1672 },
1673 { PINMUX_DATA_REG("PDDR", 0xa4050126, 8) {
1674 PTD7_DATA, PTD6_DATA, PTD5_DATA, PTD4_DATA,
1675 PTD3_DATA, PTD2_DATA, PTD1_DATA, PTD0_DATA }
1676 },
1677 { PINMUX_DATA_REG("PEDR", 0xa4050128, 8) {
1678 PTE7_DATA, PTE6_DATA, PTE5_DATA, PTE4_DATA,
1679 0, 0, PTE1_DATA, PTE0_DATA }
1680 },
1681 { PINMUX_DATA_REG("PFDR", 0xa405012a, 8) {
1682 0, PTF6_DATA, PTF5_DATA, PTF4_DATA,
1683 PTF3_DATA, PTF2_DATA, PTF1_DATA, PTF0_DATA }
1684 },
1685 { PINMUX_DATA_REG("PGDR", 0xa405012c, 8) {
1686 0, 0, 0, PTG4_DATA,
1687 PTG3_DATA, PTG2_DATA, PTG1_DATA, PTG0_DATA }
1688 },
1689 { PINMUX_DATA_REG("PHDR", 0xa405012e, 8) {
1690 PTH7_DATA, PTH6_DATA, PTH5_DATA, PTH4_DATA,
1691 PTH3_DATA, PTH2_DATA, PTH1_DATA, PTH0_DATA }
1692 },
1693 { PINMUX_DATA_REG("PJDR", 0xa4050130, 8) {
1694 PTJ7_DATA, PTJ6_DATA, PTJ5_DATA, 0,
1695 0, 0, PTJ1_DATA, PTJ0_DATA }
1696 },
1697 { PINMUX_DATA_REG("PKDR", 0xa4050132, 8) {
1698 0, PTK6_DATA, PTK5_DATA, PTK4_DATA,
1699 PTK3_DATA, PTK2_DATA, PTK1_DATA, PTK0_DATA }
1700 },
1701 { PINMUX_DATA_REG("PLDR", 0xa4050134, 8) {
1702 PTL7_DATA, PTL6_DATA, PTL5_DATA, PTL4_DATA,
1703 PTL3_DATA, PTL2_DATA, PTL1_DATA, PTL0_DATA }
1704 },
1705 { PINMUX_DATA_REG("PMDR", 0xa4050136, 8) {
1706 PTM7_DATA, PTM6_DATA, PTM5_DATA, PTM4_DATA,
1707 PTM3_DATA, PTM2_DATA, PTM1_DATA, PTM0_DATA }
1708 },
1709 { PINMUX_DATA_REG("PNDR", 0xa4050138, 8) {
1710 PTN7_DATA, PTN6_DATA, PTN5_DATA, PTN4_DATA,
1711 PTN3_DATA, PTN2_DATA, PTN1_DATA, PTN0_DATA }
1712 },
1713 { PINMUX_DATA_REG("PQDR", 0xa405013a, 8) {
1714 0, PTQ6_DATA, PTQ5_DATA, PTQ4_DATA,
1715 PTQ3_DATA, PTQ2_DATA, PTQ1_DATA, PTQ0_DATA }
1716 },
1717 { PINMUX_DATA_REG("PRDR", 0xa405013c, 8) {
1718 0, 0, 0, PTR4_DATA,
1719 PTR3_DATA, PTR2_DATA, PTR1_DATA, PTR0_DATA }
1720 },
1721 { PINMUX_DATA_REG("PSDR", 0xa405013e, 8) {
1722 0, 0, 0, PTS4_DATA,
1723 PTS3_DATA, PTS2_DATA, PTS1_DATA, PTS0_DATA }
1724 },
1725 { PINMUX_DATA_REG("PTDR", 0xa4050160, 8) {
1726 0, 0, 0, PTT4_DATA,
1727 PTT3_DATA, PTT2_DATA, PTT1_DATA, PTT0_DATA }
1728 },
1729 { PINMUX_DATA_REG("PUDR", 0xa4050162, 8) {
1730 0, 0, 0, PTU4_DATA,
1731 PTU3_DATA, PTU2_DATA, PTU1_DATA, PTU0_DATA }
1732 },
1733 { PINMUX_DATA_REG("PVDR", 0xa4050164, 8) {
1734 0, 0, 0, PTV4_DATA,
1735 PTV3_DATA, PTV2_DATA, PTV1_DATA, PTV0_DATA }
1736 },
1737 { PINMUX_DATA_REG("PWDR", 0xa4050166, 8) {
1738 0, PTW6_DATA, PTW5_DATA, PTW4_DATA,
1739 PTW3_DATA, PTW2_DATA, PTW1_DATA, PTW0_DATA }
1740 },
1741 { PINMUX_DATA_REG("PXDR", 0xa4050168, 8) {
1742 0, PTX6_DATA, PTX5_DATA, PTX4_DATA,
1743 PTX3_DATA, PTX2_DATA, PTX1_DATA, PTX0_DATA }
1744 },
1745 { PINMUX_DATA_REG("PYDR", 0xa405016a, 8) {
1746 0, PTY6_DATA, PTY5_DATA, PTY4_DATA,
1747 PTY3_DATA, PTY2_DATA, PTY1_DATA, PTY0_DATA }
1748 },
1749 { PINMUX_DATA_REG("PZDR", 0xa405016c, 8) {
1750 0, 0, PTZ5_DATA, PTZ4_DATA,
1751 PTZ3_DATA, PTZ2_DATA, PTZ1_DATA, PTZ0_DATA }
1752 },
1753 { },
1754};
1755
1756static struct pinmux_info sh7722_pinmux_info = {
1757 .name = "sh7722_pfc",
1758 .reserved_id = PINMUX_RESERVED,
1759 .data = { PINMUX_DATA_BEGIN, PINMUX_DATA_END },
1760 .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END },
1761 .input_pd = { PINMUX_INPUT_PULLDOWN_BEGIN, PINMUX_INPUT_PULLDOWN_END },
1762 .input_pu = { PINMUX_INPUT_PULLUP_BEGIN, PINMUX_INPUT_PULLUP_END },
1763 .output = { PINMUX_OUTPUT_BEGIN, PINMUX_OUTPUT_END },
1764 .mark = { PINMUX_MARK_BEGIN, PINMUX_MARK_END },
1765 .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
1766
1767 .first_gpio = GPIO_PTA7,
1768 .last_gpio = GPIO_FN_KEYOUT5_IN5,
1769
1770 .gpios = pinmux_gpios,
1771 .cfg_regs = pinmux_config_regs,
1772 .data_regs = pinmux_data_regs,
1773
1774 .gpio_data = pinmux_data,
1775 .gpio_data_size = ARRAY_SIZE(pinmux_data),
1776};
1777
1778static int __init plat_pinmux_setup(void)
1779{
1780 return register_pinmux(&sh7722_pinmux_info);
1781}
1782
1783arch_initcall(plat_pinmux_setup);
diff --git a/arch/sh/kernel/cpu/sh4a/pinmux-sh7723.c b/arch/sh/kernel/cpu/sh4a/pinmux-sh7723.c
new file mode 100644
index 00000000000..88bf5ecda84
--- /dev/null
+++ b/arch/sh/kernel/cpu/sh4a/pinmux-sh7723.c
@@ -0,0 +1,1909 @@
1/*
2 * SH7723 Pinmux
3 *
4 * Copyright (C) 2008 Magnus Damm
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 */
10
11#include <linux/init.h>
12#include <linux/kernel.h>
13#include <linux/gpio.h>
14#include <cpu/sh7723.h>
15
16enum {
17 PINMUX_RESERVED = 0,
18
19 PINMUX_DATA_BEGIN,
20 PTA7_DATA, PTA6_DATA, PTA5_DATA, PTA4_DATA,
21 PTA3_DATA, PTA2_DATA, PTA1_DATA, PTA0_DATA,
22 PTB7_DATA, PTB6_DATA, PTB5_DATA, PTB4_DATA,
23 PTB3_DATA, PTB2_DATA, PTB1_DATA, PTB0_DATA,
24 PTC7_DATA, PTC6_DATA, PTC5_DATA, PTC4_DATA,
25 PTC3_DATA, PTC2_DATA, PTC1_DATA, PTC0_DATA,
26 PTD7_DATA, PTD6_DATA, PTD5_DATA, PTD4_DATA,
27 PTD3_DATA, PTD2_DATA, PTD1_DATA, PTD0_DATA,
28 PTE5_DATA, PTE4_DATA, PTE3_DATA, PTE2_DATA, PTE1_DATA, PTE0_DATA,
29 PTF7_DATA, PTF6_DATA, PTF5_DATA, PTF4_DATA,
30 PTF3_DATA, PTF2_DATA, PTF1_DATA, PTF0_DATA,
31 PTG5_DATA, PTG4_DATA, PTG3_DATA, PTG2_DATA, PTG1_DATA, PTG0_DATA,
32 PTH7_DATA, PTH6_DATA, PTH5_DATA, PTH4_DATA,
33 PTH3_DATA, PTH2_DATA, PTH1_DATA, PTH0_DATA,
34 PTJ7_DATA, PTJ5_DATA, PTJ3_DATA, PTJ2_DATA, PTJ1_DATA, PTJ0_DATA,
35 PTK7_DATA, PTK6_DATA, PTK5_DATA, PTK4_DATA,
36 PTK3_DATA, PTK2_DATA, PTK1_DATA, PTK0_DATA,
37 PTL7_DATA, PTL6_DATA, PTL5_DATA, PTL4_DATA,
38 PTL3_DATA, PTL2_DATA, PTL1_DATA, PTL0_DATA,
39 PTM7_DATA, PTM6_DATA, PTM5_DATA, PTM4_DATA,
40 PTM3_DATA, PTM2_DATA, PTM1_DATA, PTM0_DATA,
41 PTN7_DATA, PTN6_DATA, PTN5_DATA, PTN4_DATA,
42 PTN3_DATA, PTN2_DATA, PTN1_DATA, PTN0_DATA,
43 PTQ3_DATA, PTQ2_DATA, PTQ1_DATA, PTQ0_DATA,
44 PTR7_DATA, PTR6_DATA, PTR5_DATA, PTR4_DATA,
45 PTR3_DATA, PTR2_DATA, PTR1_DATA, PTR0_DATA,
46 PTS7_DATA, PTS6_DATA, PTS5_DATA, PTS4_DATA,
47 PTS3_DATA, PTS2_DATA, PTS1_DATA, PTS0_DATA,
48 PTT5_DATA, PTT4_DATA, PTT3_DATA, PTT2_DATA, PTT1_DATA, PTT0_DATA,
49 PTU5_DATA, PTU4_DATA, PTU3_DATA, PTU2_DATA, PTU1_DATA, PTU0_DATA,
50 PTV7_DATA, PTV6_DATA, PTV5_DATA, PTV4_DATA,
51 PTV3_DATA, PTV2_DATA, PTV1_DATA, PTV0_DATA,
52 PTW7_DATA, PTW6_DATA, PTW5_DATA, PTW4_DATA,
53 PTW3_DATA, PTW2_DATA, PTW1_DATA, PTW0_DATA,
54 PTX7_DATA, PTX6_DATA, PTX5_DATA, PTX4_DATA,
55 PTX3_DATA, PTX2_DATA, PTX1_DATA, PTX0_DATA,
56 PTY7_DATA, PTY6_DATA, PTY5_DATA, PTY4_DATA,
57 PTY3_DATA, PTY2_DATA, PTY1_DATA, PTY0_DATA,
58 PTZ7_DATA, PTZ6_DATA, PTZ5_DATA, PTZ4_DATA,
59 PTZ3_DATA, PTZ2_DATA, PTZ1_DATA, PTZ0_DATA,
60 PINMUX_DATA_END,
61
62 PINMUX_INPUT_BEGIN,
63 PTA7_IN, PTA6_IN, PTA5_IN, PTA4_IN,
64 PTA3_IN, PTA2_IN, PTA1_IN, PTA0_IN,
65 PTB7_IN, PTB6_IN, PTB5_IN, PTB4_IN,
66 PTB3_IN, PTB2_IN, PTB1_IN, PTB0_IN,
67 PTC7_IN, PTC6_IN, PTC5_IN, PTC4_IN,
68 PTC3_IN, PTC2_IN, PTC1_IN, PTC0_IN,
69 PTD7_IN, PTD6_IN, PTD5_IN, PTD4_IN,
70 PTD3_IN, PTD2_IN, PTD1_IN, PTD0_IN,
71 PTE5_IN, PTE4_IN, PTE3_IN, PTE2_IN, PTE1_IN, PTE0_IN,
72 PTF7_IN, PTF6_IN, PTF5_IN, PTF4_IN,
73 PTF3_IN, PTF2_IN, PTF1_IN, PTF0_IN,
74 PTH7_IN, PTH6_IN, PTH5_IN, PTH4_IN,
75 PTH3_IN, PTH2_IN, PTH1_IN, PTH0_IN,
76 PTJ3_IN, PTJ2_IN, PTJ1_IN, PTJ0_IN,
77 PTK7_IN, PTK6_IN, PTK5_IN, PTK4_IN,
78 PTK3_IN, PTK2_IN, PTK1_IN, PTK0_IN,
79 PTL7_IN, PTL6_IN, PTL5_IN, PTL4_IN,
80 PTL3_IN, PTL2_IN, PTL1_IN, PTL0_IN,
81 PTM7_IN, PTM6_IN, PTM5_IN, PTM4_IN,
82 PTM3_IN, PTM2_IN, PTM1_IN, PTM0_IN,
83 PTN7_IN, PTN6_IN, PTN5_IN, PTN4_IN,
84 PTN3_IN, PTN2_IN, PTN1_IN, PTN0_IN,
85 PTQ3_IN, PTQ2_IN, PTQ1_IN, PTQ0_IN,
86 PTR7_IN, PTR6_IN, PTR5_IN, PTR4_IN,
87 PTR3_IN, PTR2_IN, PTR1_IN, PTR0_IN,
88 PTS7_IN, PTS6_IN, PTS5_IN, PTS4_IN,
89 PTS3_IN, PTS2_IN, PTS1_IN, PTS0_IN,
90 PTT5_IN, PTT4_IN, PTT3_IN, PTT2_IN, PTT1_IN, PTT0_IN,
91 PTU5_IN, PTU4_IN, PTU3_IN, PTU2_IN, PTU1_IN, PTU0_IN,
92 PTV7_IN, PTV6_IN, PTV5_IN, PTV4_IN,
93 PTV3_IN, PTV2_IN, PTV1_IN, PTV0_IN,
94 PTW7_IN, PTW6_IN, PTW5_IN, PTW4_IN,
95 PTW3_IN, PTW2_IN, PTW1_IN, PTW0_IN,
96 PTX7_IN, PTX6_IN, PTX5_IN, PTX4_IN,
97 PTX3_IN, PTX2_IN, PTX1_IN, PTX0_IN,
98 PTY7_IN, PTY6_IN, PTY5_IN, PTY4_IN,
99 PTY3_IN, PTY2_IN, PTY1_IN, PTY0_IN,
100 PTZ7_IN, PTZ6_IN, PTZ5_IN, PTZ4_IN,
101 PTZ3_IN, PTZ2_IN, PTZ1_IN, PTZ0_IN,
102 PINMUX_INPUT_END,
103
104 PINMUX_INPUT_PULLUP_BEGIN,
105 PTA4_IN_PU, PTA3_IN_PU, PTA2_IN_PU, PTA1_IN_PU, PTA0_IN_PU,
106 PTB2_IN_PU, PTB1_IN_PU,
107 PTR2_IN_PU,
108 PINMUX_INPUT_PULLUP_END,
109
110 PINMUX_OUTPUT_BEGIN,
111 PTA7_OUT, PTA6_OUT, PTA5_OUT, PTA4_OUT,
112 PTA3_OUT, PTA2_OUT, PTA1_OUT, PTA0_OUT,
113 PTB7_OUT, PTB6_OUT, PTB5_OUT, PTB4_OUT,
114 PTB3_OUT, PTB2_OUT, PTB1_OUT, PTB0_OUT,
115 PTC7_OUT, PTC6_OUT, PTC5_OUT, PTC4_OUT,
116 PTC3_OUT, PTC2_OUT, PTC1_OUT, PTC0_OUT,
117 PTD7_OUT, PTD6_OUT, PTD5_OUT, PTD4_OUT,
118 PTD3_OUT, PTD2_OUT, PTD1_OUT, PTD0_OUT,
119 PTE5_OUT, PTE4_OUT, PTE3_OUT, PTE2_OUT, PTE1_OUT, PTE0_OUT,
120 PTF7_OUT, PTF6_OUT, PTF5_OUT, PTF4_OUT,
121 PTF3_OUT, PTF2_OUT, PTF1_OUT, PTF0_OUT,
122 PTG5_OUT, PTG4_OUT, PTG3_OUT, PTG2_OUT, PTG1_OUT, PTG0_OUT,
123 PTH7_OUT, PTH6_OUT, PTH5_OUT, PTH4_OUT,
124 PTH3_OUT, PTH2_OUT, PTH1_OUT, PTH0_OUT,
125 PTJ7_OUT, PTJ5_OUT, PTJ3_OUT, PTJ2_OUT, PTJ1_OUT, PTJ0_OUT,
126 PTK7_OUT, PTK6_OUT, PTK5_OUT, PTK4_OUT,
127 PTK3_OUT, PTK2_OUT, PTK1_OUT, PTK0_OUT,
128 PTL7_OUT, PTL6_OUT, PTL5_OUT, PTL4_OUT,
129 PTL3_OUT, PTL2_OUT, PTL1_OUT, PTL0_OUT,
130 PTM7_OUT, PTM6_OUT, PTM5_OUT, PTM4_OUT,
131 PTM3_OUT, PTM2_OUT, PTM1_OUT, PTM0_OUT,
132 PTN7_OUT, PTN6_OUT, PTN5_OUT, PTN4_OUT,
133 PTN3_OUT, PTN2_OUT, PTN1_OUT, PTN0_OUT,
134 PTR7_OUT, PTR6_OUT, PTR5_OUT, PTR4_OUT,
135 PTR1_OUT, PTR0_OUT,
136 PTS7_OUT, PTS6_OUT, PTS5_OUT, PTS4_OUT,
137 PTS3_OUT, PTS2_OUT, PTS1_OUT, PTS0_OUT,
138 PTT5_OUT, PTT4_OUT, PTT3_OUT, PTT2_OUT, PTT1_OUT, PTT0_OUT,
139 PTU5_OUT, PTU4_OUT, PTU3_OUT, PTU2_OUT, PTU1_OUT, PTU0_OUT,
140 PTV7_OUT, PTV6_OUT, PTV5_OUT, PTV4_OUT,
141 PTV3_OUT, PTV2_OUT, PTV1_OUT, PTV0_OUT,
142 PTW7_OUT, PTW6_OUT, PTW5_OUT, PTW4_OUT,
143 PTW3_OUT, PTW2_OUT, PTW1_OUT, PTW0_OUT,
144 PTX7_OUT, PTX6_OUT, PTX5_OUT, PTX4_OUT,
145 PTX3_OUT, PTX2_OUT, PTX1_OUT, PTX0_OUT,
146 PTY7_OUT, PTY6_OUT, PTY5_OUT, PTY4_OUT,
147 PTY3_OUT, PTY2_OUT, PTY1_OUT, PTY0_OUT,
148 PTZ7_OUT, PTZ6_OUT, PTZ5_OUT, PTZ4_OUT,
149 PTZ3_OUT, PTZ2_OUT, PTZ1_OUT, PTZ0_OUT,
150 PINMUX_OUTPUT_END,
151
152 PINMUX_FUNCTION_BEGIN,
153 PTA7_FN, PTA6_FN, PTA5_FN, PTA4_FN,
154 PTA3_FN, PTA2_FN, PTA1_FN, PTA0_FN,
155 PTB7_FN, PTB6_FN, PTB5_FN, PTB4_FN,
156 PTB3_FN, PTB2_FN, PTB1_FN, PTB0_FN,
157 PTC7_FN, PTC6_FN, PTC5_FN, PTC4_FN,
158 PTC3_FN, PTC2_FN, PTC1_FN, PTC0_FN,
159 PTD7_FN, PTD6_FN, PTD5_FN, PTD4_FN,
160 PTD3_FN, PTD2_FN, PTD1_FN, PTD0_FN,
161 PTE5_FN, PTE4_FN, PTE3_FN, PTE2_FN, PTE1_FN, PTE0_FN,
162 PTF7_FN, PTF6_FN, PTF5_FN, PTF4_FN,
163 PTF3_FN, PTF2_FN, PTF1_FN, PTF0_FN,
164 PTG5_FN, PTG4_FN, PTG3_FN, PTG2_FN, PTG1_FN, PTG0_FN,
165 PTH7_FN, PTH6_FN, PTH5_FN, PTH4_FN,
166 PTH3_FN, PTH2_FN, PTH1_FN, PTH0_FN,
167 PTJ7_FN, PTJ5_FN, PTJ3_FN, PTJ2_FN, PTJ1_FN, PTJ0_FN,
168 PTK7_FN, PTK6_FN, PTK5_FN, PTK4_FN,
169 PTK3_FN, PTK2_FN, PTK1_FN, PTK0_FN,
170 PTL7_FN, PTL6_FN, PTL5_FN, PTL4_FN,
171 PTL3_FN, PTL2_FN, PTL1_FN, PTL0_FN,
172 PTM7_FN, PTM6_FN, PTM5_FN, PTM4_FN,
173 PTM3_FN, PTM2_FN, PTM1_FN, PTM0_FN,
174 PTN7_FN, PTN6_FN, PTN5_FN, PTN4_FN,
175 PTN3_FN, PTN2_FN, PTN1_FN, PTN0_FN,
176 PTQ3_FN, PTQ2_FN, PTQ1_FN, PTQ0_FN,
177 PTR7_FN, PTR6_FN, PTR5_FN, PTR4_FN,
178 PTR3_FN, PTR2_FN, PTR1_FN, PTR0_FN,
179 PTS7_FN, PTS6_FN, PTS5_FN, PTS4_FN,
180 PTS3_FN, PTS2_FN, PTS1_FN, PTS0_FN,
181 PTT5_FN, PTT4_FN, PTT3_FN, PTT2_FN, PTT1_FN, PTT0_FN,
182 PTU5_FN, PTU4_FN, PTU3_FN, PTU2_FN, PTU1_FN, PTU0_FN,
183 PTV7_FN, PTV6_FN, PTV5_FN, PTV4_FN,
184 PTV3_FN, PTV2_FN, PTV1_FN, PTV0_FN,
185 PTW7_FN, PTW6_FN, PTW5_FN, PTW4_FN,
186 PTW3_FN, PTW2_FN, PTW1_FN, PTW0_FN,
187 PTX7_FN, PTX6_FN, PTX5_FN, PTX4_FN,
188 PTX3_FN, PTX2_FN, PTX1_FN, PTX0_FN,
189 PTY7_FN, PTY6_FN, PTY5_FN, PTY4_FN,
190 PTY3_FN, PTY2_FN, PTY1_FN, PTY0_FN,
191 PTZ7_FN, PTZ6_FN, PTZ5_FN, PTZ4_FN,
192 PTZ3_FN, PTZ2_FN, PTZ1_FN, PTZ0_FN,
193
194
195 PSA15_PSA14_FN1, PSA15_PSA14_FN2,
196 PSA13_PSA12_FN1, PSA13_PSA12_FN2,
197 PSA11_PSA10_FN1, PSA11_PSA10_FN2,
198 PSA5_PSA4_FN1, PSA5_PSA4_FN2, PSA5_PSA4_FN3,
199 PSA3_PSA2_FN1, PSA3_PSA2_FN2,
200 PSB15_PSB14_FN1, PSB15_PSB14_FN2,
201 PSB13_PSB12_LCDC_RGB, PSB13_PSB12_LCDC_SYS,
202 PSB9_PSB8_FN1, PSB9_PSB8_FN2, PSB9_PSB8_FN3,
203 PSB7_PSB6_FN1, PSB7_PSB6_FN2,
204 PSB5_PSB4_FN1, PSB5_PSB4_FN2,
205 PSB3_PSB2_FN1, PSB3_PSB2_FN2,
206 PSC15_PSC14_FN1, PSC15_PSC14_FN2,
207 PSC13_PSC12_FN1, PSC13_PSC12_FN2,
208 PSC11_PSC10_FN1, PSC11_PSC10_FN2, PSC11_PSC10_FN3,
209 PSC9_PSC8_FN1, PSC9_PSC8_FN2,
210 PSC7_PSC6_FN1, PSC7_PSC6_FN2, PSC7_PSC6_FN3,
211 PSD15_PSD14_FN1, PSD15_PSD14_FN2,
212 PSD13_PSD12_FN1, PSD13_PSD12_FN2,
213 PSD11_PSD10_FN1, PSD11_PSD10_FN2, PSD11_PSD10_FN3,
214 PSD9_PSD8_FN1, PSD9_PSD8_FN2,
215 PSD7_PSD6_FN1, PSD7_PSD6_FN2,
216 PSD5_PSD4_FN1, PSD5_PSD4_FN2,
217 PSD3_PSD2_FN1, PSD3_PSD2_FN2,
218 PSD1_PSD0_FN1, PSD1_PSD0_FN2,
219 PINMUX_FUNCTION_END,
220
221 PINMUX_MARK_BEGIN,
222 SCIF0_PTT_TXD_MARK, SCIF0_PTT_RXD_MARK,
223 SCIF0_PTT_SCK_MARK, SCIF0_PTU_TXD_MARK,
224 SCIF0_PTU_RXD_MARK, SCIF0_PTU_SCK_MARK,
225
226 SCIF1_PTS_TXD_MARK, SCIF1_PTS_RXD_MARK,
227 SCIF1_PTS_SCK_MARK, SCIF1_PTV_TXD_MARK,
228 SCIF1_PTV_RXD_MARK, SCIF1_PTV_SCK_MARK,
229
230 SCIF2_PTT_TXD_MARK, SCIF2_PTT_RXD_MARK,
231 SCIF2_PTT_SCK_MARK, SCIF2_PTU_TXD_MARK,
232 SCIF2_PTU_RXD_MARK, SCIF2_PTU_SCK_MARK,
233
234 SCIF3_PTS_TXD_MARK, SCIF3_PTS_RXD_MARK,
235 SCIF3_PTS_SCK_MARK, SCIF3_PTS_RTS_MARK,
236 SCIF3_PTS_CTS_MARK, SCIF3_PTV_TXD_MARK,
237 SCIF3_PTV_RXD_MARK, SCIF3_PTV_SCK_MARK,
238 SCIF3_PTV_RTS_MARK, SCIF3_PTV_CTS_MARK,
239
240 SCIF4_PTE_TXD_MARK, SCIF4_PTE_RXD_MARK,
241 SCIF4_PTE_SCK_MARK, SCIF4_PTN_TXD_MARK,
242 SCIF4_PTN_RXD_MARK, SCIF4_PTN_SCK_MARK,
243
244 SCIF5_PTE_TXD_MARK, SCIF5_PTE_RXD_MARK,
245 SCIF5_PTE_SCK_MARK, SCIF5_PTN_TXD_MARK,
246 SCIF5_PTN_RXD_MARK, SCIF5_PTN_SCK_MARK,
247
248 VIO_D15_MARK, VIO_D14_MARK, VIO_D13_MARK, VIO_D12_MARK,
249 VIO_D11_MARK, VIO_D10_MARK, VIO_D9_MARK, VIO_D8_MARK,
250 VIO_D7_MARK, VIO_D6_MARK, VIO_D5_MARK, VIO_D4_MARK,
251 VIO_D3_MARK, VIO_D2_MARK, VIO_D1_MARK, VIO_D0_MARK,
252 VIO_FLD_MARK, VIO_CKO_MARK,
253 VIO_VD1_MARK, VIO_HD1_MARK, VIO_CLK1_MARK,
254 VIO_HD2_MARK, VIO_VD2_MARK, VIO_CLK2_MARK,
255
256 LCDD23_MARK, LCDD22_MARK, LCDD21_MARK, LCDD20_MARK,
257 LCDD19_MARK, LCDD18_MARK, LCDD17_MARK, LCDD16_MARK,
258 LCDD15_MARK, LCDD14_MARK, LCDD13_MARK, LCDD12_MARK,
259 LCDD11_MARK, LCDD10_MARK, LCDD9_MARK, LCDD8_MARK,
260 LCDD7_MARK, LCDD6_MARK, LCDD5_MARK, LCDD4_MARK,
261 LCDD3_MARK, LCDD2_MARK, LCDD1_MARK, LCDD0_MARK,
262 LCDDON_MARK, LCDVCPWC_MARK, LCDVEPWC_MARK,
263 LCDVSYN_MARK, LCDDCK_MARK, LCDHSYN_MARK, LCDDISP_MARK,
264 LCDRS_MARK, LCDCS_MARK, LCDWR_MARK, LCDRD_MARK,
265 LCDLCLK_PTR_MARK, LCDLCLK_PTW_MARK,
266
267 IRQ0_MARK, IRQ1_MARK, IRQ2_MARK, IRQ3_MARK,
268 IRQ4_MARK, IRQ5_MARK, IRQ6_MARK, IRQ7_MARK,
269
270 AUDATA3_MARK, AUDATA2_MARK, AUDATA1_MARK, AUDATA0_MARK,
271 AUDCK_MARK, AUDSYNC_MARK,
272
273 SDHI0CD_PTD_MARK, SDHI0WP_PTD_MARK,
274 SDHI0D3_PTD_MARK, SDHI0D2_PTD_MARK,
275 SDHI0D1_PTD_MARK, SDHI0D0_PTD_MARK,
276 SDHI0CMD_PTD_MARK, SDHI0CLK_PTD_MARK,
277
278 SDHI0CD_PTS_MARK, SDHI0WP_PTS_MARK,
279 SDHI0D3_PTS_MARK, SDHI0D2_PTS_MARK,
280 SDHI0D1_PTS_MARK, SDHI0D0_PTS_MARK,
281 SDHI0CMD_PTS_MARK, SDHI0CLK_PTS_MARK,
282
283 SDHI1CD_MARK, SDHI1WP_MARK, SDHI1D3_MARK, SDHI1D2_MARK,
284 SDHI1D1_MARK, SDHI1D0_MARK, SDHI1CMD_MARK, SDHI1CLK_MARK,
285
286 SIUAFCK_MARK, SIUAILR_MARK, SIUAIBT_MARK, SIUAISLD_MARK,
287 SIUAOLR_MARK, SIUAOBT_MARK, SIUAOSLD_MARK, SIUAMCK_MARK,
288 SIUAISPD_MARK, SIUAOSPD_MARK,
289
290 SIUBFCK_MARK, SIUBILR_MARK, SIUBIBT_MARK, SIUBISLD_MARK,
291 SIUBOLR_MARK, SIUBOBT_MARK, SIUBOSLD_MARK, SIUBMCK_MARK,
292
293 IRDA_IN_MARK, IRDA_OUT_MARK,
294
295 DV_CLKI_MARK, DV_CLK_MARK, DV_HSYNC_MARK, DV_VSYNC_MARK,
296 DV_D15_MARK, DV_D14_MARK, DV_D13_MARK, DV_D12_MARK,
297 DV_D11_MARK, DV_D10_MARK, DV_D9_MARK, DV_D8_MARK,
298 DV_D7_MARK, DV_D6_MARK, DV_D5_MARK, DV_D4_MARK,
299 DV_D3_MARK, DV_D2_MARK, DV_D1_MARK, DV_D0_MARK,
300
301 KEYIN0_MARK, KEYIN1_MARK, KEYIN2_MARK, KEYIN3_MARK, KEYIN4_MARK,
302 KEYOUT0_MARK, KEYOUT1_MARK, KEYOUT2_MARK, KEYOUT3_MARK,
303 KEYOUT4_IN6_MARK, KEYOUT5_IN5_MARK,
304
305 MSIOF0_PTF_TXD_MARK, MSIOF0_PTF_RXD_MARK, MSIOF0_PTF_MCK_MARK,
306 MSIOF0_PTF_TSYNC_MARK, MSIOF0_PTF_TSCK_MARK, MSIOF0_PTF_RSYNC_MARK,
307 MSIOF0_PTF_RSCK_MARK, MSIOF0_PTF_SS1_MARK, MSIOF0_PTF_SS2_MARK,
308
309 MSIOF0_PTT_TXD_MARK, MSIOF0_PTT_RXD_MARK, MSIOF0_PTX_MCK_MARK,
310 MSIOF0_PTT_TSYNC_MARK, MSIOF0_PTT_TSCK_MARK, MSIOF0_PTT_RSYNC_MARK,
311 MSIOF0_PTT_RSCK_MARK, MSIOF0_PTT_SS1_MARK, MSIOF0_PTT_SS2_MARK,
312
313 MSIOF1_TXD_MARK, MSIOF1_RXD_MARK, MSIOF1_MCK_MARK,
314 MSIOF1_TSYNC_MARK, MSIOF1_TSCK_MARK, MSIOF1_RSYNC_MARK,
315 MSIOF1_RSCK_MARK, MSIOF1_SS1_MARK, MSIOF1_SS2_MARK,
316
317 TS0_SDAT_MARK, TS0_SCK_MARK, TS0_SDEN_MARK, TS0_SPSYNC_MARK,
318
319 FCE_MARK, NAF7_MARK, NAF6_MARK, NAF5_MARK, NAF4_MARK,
320 NAF3_MARK, NAF2_MARK, NAF1_MARK, NAF0_MARK, FCDE_MARK,
321 FOE_MARK, FSC_MARK, FWE_MARK, FRB_MARK,
322
323 DACK1_MARK, DREQ1_MARK, DACK0_MARK, DREQ0_MARK,
324
325 AN3_MARK, AN2_MARK, AN1_MARK, AN0_MARK, ADTRG_MARK,
326
327 STATUS0_MARK, PDSTATUS_MARK,
328
329 TPUTO3_MARK, TPUTO2_MARK, TPUTO1_MARK, TPUTO0_MARK,
330
331 D31_MARK, D30_MARK, D29_MARK, D28_MARK,
332 D27_MARK, D26_MARK, D25_MARK, D24_MARK,
333 D23_MARK, D22_MARK, D21_MARK, D20_MARK,
334 D19_MARK, D18_MARK, D17_MARK, D16_MARK,
335 IOIS16_MARK, WAIT_MARK, BS_MARK,
336 A25_MARK, A24_MARK, A23_MARK, A22_MARK,
337 CS6B_CE1B_MARK, CS6A_CE2B_MARK,
338 CS5B_CE1A_MARK, CS5A_CE2A_MARK,
339 WE3_ICIOWR_MARK, WE2_ICIORD_MARK,
340
341 IDED15_MARK, IDED14_MARK, IDED13_MARK, IDED12_MARK,
342 IDED11_MARK, IDED10_MARK, IDED9_MARK, IDED8_MARK,
343 IDED7_MARK, IDED6_MARK, IDED5_MARK, IDED4_MARK,
344 IDED3_MARK, IDED2_MARK, IDED1_MARK, IDED0_MARK,
345 DIRECTION_MARK, EXBUF_ENB_MARK, IDERST_MARK, IODACK_MARK,
346 IODREQ_MARK, IDEIORDY_MARK, IDEINT_MARK, IDEIOWR_MARK,
347 IDEIORD_MARK, IDECS1_MARK, IDECS0_MARK, IDEA2_MARK,
348 IDEA1_MARK, IDEA0_MARK,
349 PINMUX_MARK_END,
350};
351
352static pinmux_enum_t pinmux_data[] = {
353 /* PTA GPIO */
354 PINMUX_DATA(PTA7_DATA, PTA7_IN, PTA7_OUT),
355 PINMUX_DATA(PTA6_DATA, PTA6_IN, PTA6_OUT),
356 PINMUX_DATA(PTA5_DATA, PTA5_IN, PTA5_OUT),
357 PINMUX_DATA(PTA4_DATA, PTA4_IN, PTA4_OUT, PTA4_IN_PU),
358 PINMUX_DATA(PTA3_DATA, PTA3_IN, PTA3_OUT, PTA3_IN_PU),
359 PINMUX_DATA(PTA2_DATA, PTA2_IN, PTA2_OUT, PTA2_IN_PU),
360 PINMUX_DATA(PTA1_DATA, PTA1_IN, PTA1_OUT, PTA1_IN_PU),
361 PINMUX_DATA(PTA0_DATA, PTA0_IN, PTA0_OUT, PTA0_IN_PU),
362
363 /* PTB GPIO */
364 PINMUX_DATA(PTB7_DATA, PTB7_IN, PTB7_OUT),
365 PINMUX_DATA(PTB6_DATA, PTB6_IN, PTB6_OUT),
366 PINMUX_DATA(PTB5_DATA, PTB5_IN, PTB5_OUT),
367 PINMUX_DATA(PTB4_DATA, PTB4_IN, PTB4_OUT),
368 PINMUX_DATA(PTB3_DATA, PTB3_IN, PTB3_OUT),
369 PINMUX_DATA(PTB2_DATA, PTB2_IN, PTB2_OUT, PTB2_IN_PU),
370 PINMUX_DATA(PTB1_DATA, PTB1_IN, PTB1_OUT, PTB1_IN_PU),
371 PINMUX_DATA(PTB0_DATA, PTB0_IN, PTB0_OUT),
372
373 /* PTC GPIO */
374 PINMUX_DATA(PTC7_DATA, PTC7_IN, PTC7_OUT),
375 PINMUX_DATA(PTC6_DATA, PTC6_IN, PTC6_OUT),
376 PINMUX_DATA(PTC5_DATA, PTC5_IN, PTC5_OUT),
377 PINMUX_DATA(PTC4_DATA, PTC4_IN, PTC4_OUT),
378 PINMUX_DATA(PTC3_DATA, PTC3_IN, PTC3_OUT),
379 PINMUX_DATA(PTC2_DATA, PTC2_IN, PTC2_OUT),
380 PINMUX_DATA(PTC1_DATA, PTC1_IN, PTC1_OUT),
381 PINMUX_DATA(PTC0_DATA, PTC0_IN, PTC0_OUT),
382
383 /* PTD GPIO */
384 PINMUX_DATA(PTD7_DATA, PTD7_IN, PTD7_OUT),
385 PINMUX_DATA(PTD6_DATA, PTD6_IN, PTD6_OUT),
386 PINMUX_DATA(PTD5_DATA, PTD5_IN, PTD5_OUT),
387 PINMUX_DATA(PTD4_DATA, PTD4_IN, PTD4_OUT),
388 PINMUX_DATA(PTD3_DATA, PTD3_IN, PTD3_OUT),
389 PINMUX_DATA(PTD2_DATA, PTD2_IN, PTD2_OUT),
390 PINMUX_DATA(PTD1_DATA, PTD1_IN, PTD1_OUT),
391 PINMUX_DATA(PTD0_DATA, PTD0_IN, PTD0_OUT),
392
393 /* PTE GPIO */
394 PINMUX_DATA(PTE5_DATA, PTE5_IN, PTE5_OUT),
395 PINMUX_DATA(PTE4_DATA, PTE4_IN, PTE4_OUT),
396 PINMUX_DATA(PTE3_DATA, PTE3_IN, PTE3_OUT),
397 PINMUX_DATA(PTE2_DATA, PTE2_IN, PTE2_OUT),
398 PINMUX_DATA(PTE1_DATA, PTE1_IN, PTE1_OUT),
399 PINMUX_DATA(PTE0_DATA, PTE0_IN, PTE0_OUT),
400
401 /* PTF GPIO */
402 PINMUX_DATA(PTF7_DATA, PTF7_IN, PTF7_OUT),
403 PINMUX_DATA(PTF6_DATA, PTF6_IN, PTF6_OUT),
404 PINMUX_DATA(PTF5_DATA, PTF5_IN, PTF5_OUT),
405 PINMUX_DATA(PTF4_DATA, PTF4_IN, PTF4_OUT),
406 PINMUX_DATA(PTF3_DATA, PTF3_IN, PTF3_OUT),
407 PINMUX_DATA(PTF2_DATA, PTF2_IN, PTF2_OUT),
408 PINMUX_DATA(PTF1_DATA, PTF1_IN, PTF1_OUT),
409 PINMUX_DATA(PTF0_DATA, PTF0_IN, PTF0_OUT),
410
411 /* PTG GPIO */
412 PINMUX_DATA(PTG5_DATA, PTG5_OUT),
413 PINMUX_DATA(PTG4_DATA, PTG4_OUT),
414 PINMUX_DATA(PTG3_DATA, PTG3_OUT),
415 PINMUX_DATA(PTG2_DATA, PTG2_OUT),
416 PINMUX_DATA(PTG1_DATA, PTG1_OUT),
417 PINMUX_DATA(PTG0_DATA, PTG0_OUT),
418
419 /* PTH GPIO */
420 PINMUX_DATA(PTH7_DATA, PTH7_IN, PTH7_OUT),
421 PINMUX_DATA(PTH6_DATA, PTH6_IN, PTH6_OUT),
422 PINMUX_DATA(PTH5_DATA, PTH5_IN, PTH5_OUT),
423 PINMUX_DATA(PTH4_DATA, PTH4_IN, PTH4_OUT),
424 PINMUX_DATA(PTH3_DATA, PTH3_IN, PTH3_OUT),
425 PINMUX_DATA(PTH2_DATA, PTH2_IN, PTH2_OUT),
426 PINMUX_DATA(PTH1_DATA, PTH1_IN, PTH1_OUT),
427 PINMUX_DATA(PTH0_DATA, PTH0_IN, PTH0_OUT),
428
429 /* PTJ GPIO */
430 PINMUX_DATA(PTJ7_DATA, PTJ7_OUT),
431 PINMUX_DATA(PTJ5_DATA, PTJ5_OUT),
432 PINMUX_DATA(PTJ3_DATA, PTJ3_IN, PTJ3_OUT),
433 PINMUX_DATA(PTJ2_DATA, PTJ2_IN, PTJ2_OUT),
434 PINMUX_DATA(PTJ1_DATA, PTJ1_IN, PTJ1_OUT),
435 PINMUX_DATA(PTJ0_DATA, PTJ0_IN, PTJ0_OUT),
436
437 /* PTK GPIO */
438 PINMUX_DATA(PTK7_DATA, PTK7_IN, PTK7_OUT),
439 PINMUX_DATA(PTK6_DATA, PTK6_IN, PTK6_OUT),
440 PINMUX_DATA(PTK5_DATA, PTK5_IN, PTK5_OUT),
441 PINMUX_DATA(PTK4_DATA, PTK4_IN, PTK4_OUT),
442 PINMUX_DATA(PTK3_DATA, PTK3_IN, PTK3_OUT),
443 PINMUX_DATA(PTK2_DATA, PTK2_IN, PTK2_OUT),
444 PINMUX_DATA(PTK1_DATA, PTK1_IN, PTK1_OUT),
445 PINMUX_DATA(PTK0_DATA, PTK0_IN, PTK0_OUT),
446
447 /* PTL GPIO */
448 PINMUX_DATA(PTL7_DATA, PTL7_IN, PTL7_OUT),
449 PINMUX_DATA(PTL6_DATA, PTL6_IN, PTL6_OUT),
450 PINMUX_DATA(PTL5_DATA, PTL5_IN, PTL5_OUT),
451 PINMUX_DATA(PTL4_DATA, PTL4_IN, PTL4_OUT),
452 PINMUX_DATA(PTL3_DATA, PTL3_IN, PTL3_OUT),
453 PINMUX_DATA(PTL2_DATA, PTL2_IN, PTL2_OUT),
454 PINMUX_DATA(PTL1_DATA, PTL1_IN, PTL1_OUT),
455 PINMUX_DATA(PTL0_DATA, PTL0_IN, PTL0_OUT),
456
457 /* PTM GPIO */
458 PINMUX_DATA(PTM7_DATA, PTM7_IN, PTM7_OUT),
459 PINMUX_DATA(PTM6_DATA, PTM6_IN, PTM6_OUT),
460 PINMUX_DATA(PTM5_DATA, PTM5_IN, PTM5_OUT),
461 PINMUX_DATA(PTM4_DATA, PTM4_IN, PTM4_OUT),
462 PINMUX_DATA(PTM3_DATA, PTM3_IN, PTM3_OUT),
463 PINMUX_DATA(PTM2_DATA, PTM2_IN, PTM2_OUT),
464 PINMUX_DATA(PTM1_DATA, PTM1_IN, PTM1_OUT),
465 PINMUX_DATA(PTM0_DATA, PTM0_IN, PTM0_OUT),
466
467 /* PTN GPIO */
468 PINMUX_DATA(PTN7_DATA, PTN7_IN, PTN7_OUT),
469 PINMUX_DATA(PTN6_DATA, PTN6_IN, PTN6_OUT),
470 PINMUX_DATA(PTN5_DATA, PTN5_IN, PTN5_OUT),
471 PINMUX_DATA(PTN4_DATA, PTN4_IN, PTN4_OUT),
472 PINMUX_DATA(PTN3_DATA, PTN3_IN, PTN3_OUT),
473 PINMUX_DATA(PTN2_DATA, PTN2_IN, PTN2_OUT),
474 PINMUX_DATA(PTN1_DATA, PTN1_IN, PTN1_OUT),
475 PINMUX_DATA(PTN0_DATA, PTN0_IN, PTN0_OUT),
476
477 /* PTQ GPIO */
478 PINMUX_DATA(PTQ3_DATA, PTQ3_IN),
479 PINMUX_DATA(PTQ2_DATA, PTQ2_IN),
480 PINMUX_DATA(PTQ1_DATA, PTQ1_IN),
481 PINMUX_DATA(PTQ0_DATA, PTQ0_IN),
482
483 /* PTR GPIO */
484 PINMUX_DATA(PTR7_DATA, PTR7_IN, PTR7_OUT),
485 PINMUX_DATA(PTR6_DATA, PTR6_IN, PTR6_OUT),
486 PINMUX_DATA(PTR5_DATA, PTR5_IN, PTR5_OUT),
487 PINMUX_DATA(PTR4_DATA, PTR4_IN, PTR4_OUT),
488 PINMUX_DATA(PTR3_DATA, PTR3_IN),
489 PINMUX_DATA(PTR2_DATA, PTR2_IN, PTR2_IN_PU),
490 PINMUX_DATA(PTR1_DATA, PTR1_IN, PTR1_OUT),
491 PINMUX_DATA(PTR0_DATA, PTR0_IN, PTR0_OUT),
492
493 /* PTS GPIO */
494 PINMUX_DATA(PTS7_DATA, PTS7_IN, PTS7_OUT),
495 PINMUX_DATA(PTS6_DATA, PTS6_IN, PTS6_OUT),
496 PINMUX_DATA(PTS5_DATA, PTS5_IN, PTS5_OUT),
497 PINMUX_DATA(PTS4_DATA, PTS4_IN, PTS4_OUT),
498 PINMUX_DATA(PTS3_DATA, PTS3_IN, PTS3_OUT),
499 PINMUX_DATA(PTS2_DATA, PTS2_IN, PTS2_OUT),
500 PINMUX_DATA(PTS1_DATA, PTS1_IN, PTS1_OUT),
501 PINMUX_DATA(PTS0_DATA, PTS0_IN, PTS0_OUT),
502
503 /* PTT GPIO */
504 PINMUX_DATA(PTT5_DATA, PTT5_IN, PTT5_OUT),
505 PINMUX_DATA(PTT4_DATA, PTT4_IN, PTT4_OUT),
506 PINMUX_DATA(PTT3_DATA, PTT3_IN, PTT3_OUT),
507 PINMUX_DATA(PTT2_DATA, PTT2_IN, PTT2_OUT),
508 PINMUX_DATA(PTT1_DATA, PTT1_IN, PTT1_OUT),
509 PINMUX_DATA(PTT0_DATA, PTT0_IN, PTT0_OUT),
510
511 /* PTU GPIO */
512 PINMUX_DATA(PTU5_DATA, PTU5_IN, PTU5_OUT),
513 PINMUX_DATA(PTU4_DATA, PTU4_IN, PTU4_OUT),
514 PINMUX_DATA(PTU3_DATA, PTU3_IN, PTU3_OUT),
515 PINMUX_DATA(PTU2_DATA, PTU2_IN, PTU2_OUT),
516 PINMUX_DATA(PTU1_DATA, PTU1_IN, PTU1_OUT),
517 PINMUX_DATA(PTU0_DATA, PTU0_IN, PTU0_OUT),
518
519 /* PTV GPIO */
520 PINMUX_DATA(PTV7_DATA, PTV7_IN, PTV7_OUT),
521 PINMUX_DATA(PTV6_DATA, PTV6_IN, PTV6_OUT),
522 PINMUX_DATA(PTV5_DATA, PTV5_IN, PTV5_OUT),
523 PINMUX_DATA(PTV4_DATA, PTV4_IN, PTV4_OUT),
524 PINMUX_DATA(PTV3_DATA, PTV3_IN, PTV3_OUT),
525 PINMUX_DATA(PTV2_DATA, PTV2_IN, PTV2_OUT),
526 PINMUX_DATA(PTV1_DATA, PTV1_IN, PTV1_OUT),
527 PINMUX_DATA(PTV0_DATA, PTV0_IN, PTV0_OUT),
528
529 /* PTW GPIO */
530 PINMUX_DATA(PTW7_DATA, PTW7_IN, PTW7_OUT),
531 PINMUX_DATA(PTW6_DATA, PTW6_IN, PTW6_OUT),
532 PINMUX_DATA(PTW5_DATA, PTW5_IN, PTW5_OUT),
533 PINMUX_DATA(PTW4_DATA, PTW4_IN, PTW4_OUT),
534 PINMUX_DATA(PTW3_DATA, PTW3_IN, PTW3_OUT),
535 PINMUX_DATA(PTW2_DATA, PTW2_IN, PTW2_OUT),
536 PINMUX_DATA(PTW1_DATA, PTW1_IN, PTW1_OUT),
537 PINMUX_DATA(PTW0_DATA, PTW0_IN, PTW0_OUT),
538
539 /* PTX GPIO */
540 PINMUX_DATA(PTX7_DATA, PTX7_IN, PTX7_OUT),
541 PINMUX_DATA(PTX6_DATA, PTX6_IN, PTX6_OUT),
542 PINMUX_DATA(PTX5_DATA, PTX5_IN, PTX5_OUT),
543 PINMUX_DATA(PTX4_DATA, PTX4_IN, PTX4_OUT),
544 PINMUX_DATA(PTX3_DATA, PTX3_IN, PTX3_OUT),
545 PINMUX_DATA(PTX2_DATA, PTX2_IN, PTX2_OUT),
546 PINMUX_DATA(PTX1_DATA, PTX1_IN, PTX1_OUT),
547 PINMUX_DATA(PTX0_DATA, PTX0_IN, PTX0_OUT),
548
549 /* PTY GPIO */
550 PINMUX_DATA(PTY7_DATA, PTY7_IN, PTY7_OUT),
551 PINMUX_DATA(PTY6_DATA, PTY6_IN, PTY6_OUT),
552 PINMUX_DATA(PTY5_DATA, PTY5_IN, PTY5_OUT),
553 PINMUX_DATA(PTY4_DATA, PTY4_IN, PTY4_OUT),
554 PINMUX_DATA(PTY3_DATA, PTY3_IN, PTY3_OUT),
555 PINMUX_DATA(PTY2_DATA, PTY2_IN, PTY2_OUT),
556 PINMUX_DATA(PTY1_DATA, PTY1_IN, PTY1_OUT),
557 PINMUX_DATA(PTY0_DATA, PTY0_IN, PTY0_OUT),
558
559 /* PTZ GPIO */
560 PINMUX_DATA(PTZ7_DATA, PTZ7_IN, PTZ7_OUT),
561 PINMUX_DATA(PTZ6_DATA, PTZ6_IN, PTZ6_OUT),
562 PINMUX_DATA(PTZ5_DATA, PTZ5_IN, PTZ5_OUT),
563 PINMUX_DATA(PTZ4_DATA, PTZ4_IN, PTZ4_OUT),
564 PINMUX_DATA(PTZ3_DATA, PTZ3_IN, PTZ3_OUT),
565 PINMUX_DATA(PTZ2_DATA, PTZ2_IN, PTZ2_OUT),
566 PINMUX_DATA(PTZ1_DATA, PTZ1_IN, PTZ1_OUT),
567 PINMUX_DATA(PTZ0_DATA, PTZ0_IN, PTZ0_OUT),
568
569 /* PTA FN */
570 PINMUX_DATA(D23_MARK, PSA15_PSA14_FN1, PTA7_FN),
571 PINMUX_DATA(KEYOUT2_MARK, PSA15_PSA14_FN2, PTA7_FN),
572 PINMUX_DATA(D22_MARK, PSA15_PSA14_FN1, PTA6_FN),
573 PINMUX_DATA(KEYOUT1_MARK, PSA15_PSA14_FN2, PTA6_FN),
574 PINMUX_DATA(D21_MARK, PSA15_PSA14_FN1, PTA5_FN),
575 PINMUX_DATA(KEYOUT0_MARK, PSA15_PSA14_FN2, PTA5_FN),
576 PINMUX_DATA(D20_MARK, PSA15_PSA14_FN1, PTA4_FN),
577 PINMUX_DATA(KEYIN4_MARK, PSA15_PSA14_FN2, PTA4_FN),
578 PINMUX_DATA(D19_MARK, PSA15_PSA14_FN1, PTA3_FN),
579 PINMUX_DATA(KEYIN3_MARK, PSA15_PSA14_FN2, PTA3_FN),
580 PINMUX_DATA(D18_MARK, PSA15_PSA14_FN1, PTA2_FN),
581 PINMUX_DATA(KEYIN2_MARK, PSA15_PSA14_FN2, PTA2_FN),
582 PINMUX_DATA(D17_MARK, PSA15_PSA14_FN1, PTA1_FN),
583 PINMUX_DATA(KEYIN1_MARK, PSA15_PSA14_FN2, PTA1_FN),
584 PINMUX_DATA(D16_MARK, PSA15_PSA14_FN1, PTA0_FN),
585 PINMUX_DATA(KEYIN0_MARK, PSA15_PSA14_FN2, PTA0_FN),
586
587 /* PTB FN */
588 PINMUX_DATA(D31_MARK, PTB7_FN),
589 PINMUX_DATA(D30_MARK, PTB6_FN),
590 PINMUX_DATA(D29_MARK, PTB5_FN),
591 PINMUX_DATA(D28_MARK, PTB4_FN),
592 PINMUX_DATA(D27_MARK, PTB3_FN),
593 PINMUX_DATA(D26_MARK, PSA15_PSA14_FN1, PTB2_FN),
594 PINMUX_DATA(KEYOUT5_IN5_MARK, PSA15_PSA14_FN2, PTB2_FN),
595 PINMUX_DATA(D25_MARK, PSA15_PSA14_FN1, PTB1_FN),
596 PINMUX_DATA(KEYOUT4_IN6_MARK, PSA15_PSA14_FN2, PTB1_FN),
597 PINMUX_DATA(D24_MARK, PSA15_PSA14_FN1, PTB0_FN),
598 PINMUX_DATA(KEYOUT3_MARK, PSA15_PSA14_FN2, PTB0_FN),
599
600 /* PTC FN */
601 PINMUX_DATA(IDED15_MARK, PSA11_PSA10_FN1, PTC7_FN),
602 PINMUX_DATA(SDHI1CD_MARK, PSA11_PSA10_FN2, PTC7_FN),
603 PINMUX_DATA(IDED14_MARK, PSA11_PSA10_FN1, PTC6_FN),
604 PINMUX_DATA(SDHI1WP_MARK, PSA11_PSA10_FN2, PTC6_FN),
605 PINMUX_DATA(IDED13_MARK, PSA11_PSA10_FN1, PTC5_FN),
606 PINMUX_DATA(SDHI1D3_MARK, PSA11_PSA10_FN2, PTC5_FN),
607 PINMUX_DATA(IDED12_MARK, PSA11_PSA10_FN1, PTC4_FN),
608 PINMUX_DATA(SDHI1D2_MARK, PSA11_PSA10_FN2, PTC4_FN),
609 PINMUX_DATA(IDED11_MARK, PSA11_PSA10_FN1, PTC3_FN),
610 PINMUX_DATA(SDHI1D1_MARK, PSA11_PSA10_FN2, PTC3_FN),
611 PINMUX_DATA(IDED10_MARK, PSA11_PSA10_FN1, PTC2_FN),
612 PINMUX_DATA(SDHI1D0_MARK, PSA11_PSA10_FN2, PTC2_FN),
613 PINMUX_DATA(IDED9_MARK, PSA11_PSA10_FN1, PTC1_FN),
614 PINMUX_DATA(SDHI1CMD_MARK, PSA11_PSA10_FN2, PTC1_FN),
615 PINMUX_DATA(IDED8_MARK, PSA11_PSA10_FN1, PTC0_FN),
616 PINMUX_DATA(SDHI1CLK_MARK, PSA11_PSA10_FN2, PTC0_FN),
617
618 /* PTD FN */
619 PINMUX_DATA(IDED7_MARK, PSA11_PSA10_FN1, PTD7_FN),
620 PINMUX_DATA(SDHI0CD_PTD_MARK, PSA11_PSA10_FN2, PTD7_FN),
621 PINMUX_DATA(IDED6_MARK, PSA11_PSA10_FN1, PTD6_FN),
622 PINMUX_DATA(SDHI0WP_PTD_MARK, PSA11_PSA10_FN2, PTD6_FN),
623 PINMUX_DATA(IDED5_MARK, PSA11_PSA10_FN1, PTD5_FN),
624 PINMUX_DATA(SDHI0D3_PTD_MARK, PSA11_PSA10_FN2, PTD5_FN),
625 PINMUX_DATA(IDED4_MARK, PSA11_PSA10_FN1, PTD4_FN),
626 PINMUX_DATA(SDHI0D2_PTD_MARK, PSA11_PSA10_FN2, PTD4_FN),
627 PINMUX_DATA(IDED3_MARK, PSA11_PSA10_FN1, PTD3_FN),
628 PINMUX_DATA(SDHI0D1_PTD_MARK, PSA11_PSA10_FN2, PTD3_FN),
629 PINMUX_DATA(IDED2_MARK, PSA11_PSA10_FN1, PTD2_FN),
630 PINMUX_DATA(SDHI0D0_PTD_MARK, PSA11_PSA10_FN2, PTD2_FN),
631 PINMUX_DATA(IDED1_MARK, PSA11_PSA10_FN1, PTD1_FN),
632 PINMUX_DATA(SDHI0CMD_PTD_MARK, PSA11_PSA10_FN2, PTD1_FN),
633 PINMUX_DATA(IDED0_MARK, PSA11_PSA10_FN1, PTD0_FN),
634 PINMUX_DATA(SDHI0CLK_PTD_MARK, PSA11_PSA10_FN2, PTD0_FN),
635
636 /* PTE FN */
637 PINMUX_DATA(DIRECTION_MARK, PSA11_PSA10_FN1, PTE5_FN),
638 PINMUX_DATA(SCIF5_PTE_SCK_MARK, PSA11_PSA10_FN2, PTE5_FN),
639 PINMUX_DATA(EXBUF_ENB_MARK, PSA11_PSA10_FN1, PTE4_FN),
640 PINMUX_DATA(SCIF5_PTE_RXD_MARK, PSA11_PSA10_FN2, PTE4_FN),
641 PINMUX_DATA(IDERST_MARK, PSA11_PSA10_FN1, PTE3_FN),
642 PINMUX_DATA(SCIF5_PTE_TXD_MARK, PSA11_PSA10_FN2, PTE3_FN),
643 PINMUX_DATA(IODACK_MARK, PSA11_PSA10_FN1, PTE2_FN),
644 PINMUX_DATA(SCIF4_PTE_SCK_MARK, PSA11_PSA10_FN2, PTE2_FN),
645 PINMUX_DATA(IODREQ_MARK, PSA11_PSA10_FN1, PTE1_FN),
646 PINMUX_DATA(SCIF4_PTE_RXD_MARK, PSA11_PSA10_FN2, PTE1_FN),
647 PINMUX_DATA(IDEIORDY_MARK, PSA11_PSA10_FN1, PTE0_FN),
648 PINMUX_DATA(SCIF4_PTE_TXD_MARK, PSA11_PSA10_FN2, PTE0_FN),
649
650 /* PTF FN */
651 PINMUX_DATA(IDEINT_MARK, PTF7_FN),
652 PINMUX_DATA(IDEIOWR_MARK, PSA5_PSA4_FN1, PTF6_FN),
653 PINMUX_DATA(MSIOF0_PTF_SS2_MARK, PSA5_PSA4_FN2, PTF6_FN),
654 PINMUX_DATA(MSIOF0_PTF_RSYNC_MARK, PSA5_PSA4_FN3, PTF6_FN),
655 PINMUX_DATA(IDEIORD_MARK, PSA5_PSA4_FN1, PTF5_FN),
656 PINMUX_DATA(MSIOF0_PTF_SS1_MARK, PSA5_PSA4_FN2, PTF5_FN),
657 PINMUX_DATA(MSIOF0_PTF_RSCK_MARK, PSA5_PSA4_FN3, PTF5_FN),
658 PINMUX_DATA(IDECS1_MARK, PSA11_PSA10_FN1, PTF4_FN),
659 PINMUX_DATA(MSIOF0_PTF_TSYNC_MARK, PSA11_PSA10_FN2, PTF4_FN),
660 PINMUX_DATA(IDECS0_MARK, PSA11_PSA10_FN1, PTF3_FN),
661 PINMUX_DATA(MSIOF0_PTF_TSCK_MARK, PSA11_PSA10_FN2, PTF3_FN),
662 PINMUX_DATA(IDEA2_MARK, PSA11_PSA10_FN1, PTF2_FN),
663 PINMUX_DATA(MSIOF0_PTF_RXD_MARK, PSA11_PSA10_FN2, PTF2_FN),
664 PINMUX_DATA(IDEA1_MARK, PSA11_PSA10_FN1, PTF1_FN),
665 PINMUX_DATA(MSIOF0_PTF_TXD_MARK, PSA11_PSA10_FN2, PTF1_FN),
666 PINMUX_DATA(IDEA0_MARK, PSA11_PSA10_FN1, PTF0_FN),
667 PINMUX_DATA(MSIOF0_PTF_MCK_MARK, PSA11_PSA10_FN2, PTF0_FN),
668
669 /* PTG FN */
670 PINMUX_DATA(AUDCK_MARK, PTG5_FN),
671 PINMUX_DATA(AUDSYNC_MARK, PTG4_FN),
672 PINMUX_DATA(AUDATA3_MARK, PSA3_PSA2_FN1, PTG3_FN),
673 PINMUX_DATA(TPUTO3_MARK, PSA3_PSA2_FN2, PTG3_FN),
674 PINMUX_DATA(AUDATA2_MARK, PSA3_PSA2_FN1, PTG2_FN),
675 PINMUX_DATA(TPUTO2_MARK, PSA3_PSA2_FN2, PTG2_FN),
676 PINMUX_DATA(AUDATA1_MARK, PSA3_PSA2_FN1, PTG1_FN),
677 PINMUX_DATA(TPUTO1_MARK, PSA3_PSA2_FN2, PTG1_FN),
678 PINMUX_DATA(AUDATA0_MARK, PSA3_PSA2_FN1, PTG0_FN),
679 PINMUX_DATA(TPUTO0_MARK, PSA3_PSA2_FN2, PTG0_FN),
680
681 /* PTG FN */
682 PINMUX_DATA(LCDVCPWC_MARK, PTH7_FN),
683 PINMUX_DATA(LCDRD_MARK, PSB15_PSB14_FN1, PTH6_FN),
684 PINMUX_DATA(DV_CLKI_MARK, PSB15_PSB14_FN2, PTH6_FN),
685 PINMUX_DATA(LCDVSYN_MARK, PSB15_PSB14_FN1, PTH5_FN),
686 PINMUX_DATA(DV_CLK_MARK, PSB15_PSB14_FN2, PTH5_FN),
687 PINMUX_DATA(LCDDISP_MARK, PSB13_PSB12_LCDC_RGB, PTH4_FN),
688 PINMUX_DATA(LCDRS_MARK, PSB13_PSB12_LCDC_SYS, PTH4_FN),
689 PINMUX_DATA(LCDHSYN_MARK, PSB13_PSB12_LCDC_RGB, PTH3_FN),
690 PINMUX_DATA(LCDCS_MARK, PSB13_PSB12_LCDC_SYS, PTH3_FN),
691 PINMUX_DATA(LCDDON_MARK, PTH2_FN),
692 PINMUX_DATA(LCDDCK_MARK, PSB13_PSB12_LCDC_RGB, PTH1_FN),
693 PINMUX_DATA(LCDWR_MARK, PSB13_PSB12_LCDC_SYS, PTH1_FN),
694 PINMUX_DATA(LCDVEPWC_MARK, PTH0_FN),
695
696 /* PTJ FN */
697 PINMUX_DATA(STATUS0_MARK, PTJ7_FN),
698 PINMUX_DATA(PDSTATUS_MARK, PTJ5_FN),
699 PINMUX_DATA(A25_MARK, PTJ3_FN),
700 PINMUX_DATA(A24_MARK, PTJ2_FN),
701 PINMUX_DATA(A23_MARK, PTJ1_FN),
702 PINMUX_DATA(A22_MARK, PTJ0_FN),
703
704 /* PTK FN */
705 PINMUX_DATA(SIUAFCK_MARK, PTK7_FN),
706 PINMUX_DATA(SIUAILR_MARK, PSB9_PSB8_FN1, PTK6_FN),
707 PINMUX_DATA(MSIOF1_SS2_MARK, PSB9_PSB8_FN2, PTK6_FN),
708 PINMUX_DATA(MSIOF1_RSYNC_MARK, PSB9_PSB8_FN3, PTK6_FN),
709 PINMUX_DATA(SIUAIBT_MARK, PSB9_PSB8_FN1, PTK5_FN),
710 PINMUX_DATA(MSIOF1_SS1_MARK, PSB9_PSB8_FN2, PTK5_FN),
711 PINMUX_DATA(MSIOF1_RSCK_MARK, PSB9_PSB8_FN3, PTK5_FN),
712 PINMUX_DATA(SIUAISLD_MARK, PSB7_PSB6_FN1, PTK4_FN),
713 PINMUX_DATA(MSIOF1_RXD_MARK, PSB7_PSB6_FN2, PTK4_FN),
714 PINMUX_DATA(SIUAOLR_MARK, PSB7_PSB6_FN1, PTK3_FN),
715 PINMUX_DATA(MSIOF1_TSYNC_MARK, PSB7_PSB6_FN2, PTK3_FN),
716 PINMUX_DATA(SIUAOBT_MARK, PSB7_PSB6_FN1, PTK2_FN),
717 PINMUX_DATA(MSIOF1_TSCK_MARK, PSB7_PSB6_FN2, PTK2_FN),
718 PINMUX_DATA(SIUAOSLD_MARK, PSB7_PSB6_FN1, PTK1_FN),
719 PINMUX_DATA(MSIOF1_RXD_MARK, PSB7_PSB6_FN2, PTK1_FN),
720 PINMUX_DATA(SIUAMCK_MARK, PSB7_PSB6_FN1, PTK0_FN),
721 PINMUX_DATA(MSIOF1_MCK_MARK, PSB7_PSB6_FN2, PTK0_FN),
722
723 /* PTL FN */
724 PINMUX_DATA(LCDD15_MARK, PSB5_PSB4_FN1, PTL7_FN),
725 PINMUX_DATA(DV_D15_MARK, PSB5_PSB4_FN2, PTL7_FN),
726 PINMUX_DATA(LCDD14_MARK, PSB5_PSB4_FN1, PTL6_FN),
727 PINMUX_DATA(DV_D14_MARK, PSB5_PSB4_FN2, PTL6_FN),
728 PINMUX_DATA(LCDD13_MARK, PSB5_PSB4_FN1, PTL5_FN),
729 PINMUX_DATA(DV_D13_MARK, PSB5_PSB4_FN2, PTL5_FN),
730 PINMUX_DATA(LCDD12_MARK, PSB5_PSB4_FN1, PTL4_FN),
731 PINMUX_DATA(DV_D12_MARK, PSB5_PSB4_FN2, PTL4_FN),
732 PINMUX_DATA(LCDD11_MARK, PSB5_PSB4_FN1, PTL3_FN),
733 PINMUX_DATA(DV_D11_MARK, PSB5_PSB4_FN2, PTL3_FN),
734 PINMUX_DATA(LCDD10_MARK, PSB5_PSB4_FN1, PTL2_FN),
735 PINMUX_DATA(DV_D10_MARK, PSB5_PSB4_FN2, PTL2_FN),
736 PINMUX_DATA(LCDD9_MARK, PSB5_PSB4_FN1, PTL1_FN),
737 PINMUX_DATA(DV_D9_MARK, PSB5_PSB4_FN2, PTL1_FN),
738 PINMUX_DATA(LCDD8_MARK, PSB5_PSB4_FN1, PTL0_FN),
739 PINMUX_DATA(DV_D8_MARK, PSB5_PSB4_FN2, PTL0_FN),
740
741 /* PTM FN */
742 PINMUX_DATA(LCDD7_MARK, PSB5_PSB4_FN1, PTM7_FN),
743 PINMUX_DATA(DV_D7_MARK, PSB5_PSB4_FN2, PTM7_FN),
744 PINMUX_DATA(LCDD6_MARK, PSB5_PSB4_FN1, PTM6_FN),
745 PINMUX_DATA(DV_D6_MARK, PSB5_PSB4_FN2, PTM6_FN),
746 PINMUX_DATA(LCDD5_MARK, PSB5_PSB4_FN1, PTM5_FN),
747 PINMUX_DATA(DV_D5_MARK, PSB5_PSB4_FN2, PTM5_FN),
748 PINMUX_DATA(LCDD4_MARK, PSB5_PSB4_FN1, PTM4_FN),
749 PINMUX_DATA(DV_D4_MARK, PSB5_PSB4_FN2, PTM4_FN),
750 PINMUX_DATA(LCDD3_MARK, PSB5_PSB4_FN1, PTM3_FN),
751 PINMUX_DATA(DV_D3_MARK, PSB5_PSB4_FN2, PTM3_FN),
752 PINMUX_DATA(LCDD2_MARK, PSB5_PSB4_FN1, PTM2_FN),
753 PINMUX_DATA(DV_D2_MARK, PSB5_PSB4_FN2, PTM2_FN),
754 PINMUX_DATA(LCDD1_MARK, PSB5_PSB4_FN1, PTM1_FN),
755 PINMUX_DATA(DV_D1_MARK, PSB5_PSB4_FN2, PTM1_FN),
756 PINMUX_DATA(LCDD0_MARK, PSB5_PSB4_FN1, PTM0_FN),
757 PINMUX_DATA(DV_D0_MARK, PSB5_PSB4_FN2, PTM0_FN),
758
759 /* PTN FN */
760 PINMUX_DATA(LCDD23_MARK, PSB3_PSB2_FN1, PTN7_FN),
761 PINMUX_DATA(SCIF5_PTN_SCK_MARK, PSB3_PSB2_FN2, PTN7_FN),
762 PINMUX_DATA(LCDD22_MARK, PSB3_PSB2_FN1, PTN6_FN),
763 PINMUX_DATA(SCIF5_PTN_RXD_MARK, PSB3_PSB2_FN2, PTN6_FN),
764 PINMUX_DATA(LCDD21_MARK, PSB3_PSB2_FN1, PTN5_FN),
765 PINMUX_DATA(SCIF5_PTN_TXD_MARK, PSB3_PSB2_FN2, PTN5_FN),
766 PINMUX_DATA(LCDD20_MARK, PSB3_PSB2_FN1, PTN4_FN),
767 PINMUX_DATA(SCIF4_PTN_SCK_MARK, PSB3_PSB2_FN2, PTN4_FN),
768 PINMUX_DATA(LCDD19_MARK, PSB3_PSB2_FN1, PTN3_FN),
769 PINMUX_DATA(SCIF4_PTN_RXD_MARK, PSB3_PSB2_FN2, PTN3_FN),
770 PINMUX_DATA(LCDD18_MARK, PSB3_PSB2_FN1, PTN2_FN),
771 PINMUX_DATA(SCIF4_PTN_TXD_MARK, PSB3_PSB2_FN2, PTN2_FN),
772 PINMUX_DATA(LCDD17_MARK, PSB5_PSB4_FN1, PTN1_FN),
773 PINMUX_DATA(DV_VSYNC_MARK, PSB5_PSB4_FN2, PTN1_FN),
774 PINMUX_DATA(LCDD16_MARK, PSB5_PSB4_FN1, PTN0_FN),
775 PINMUX_DATA(DV_HSYNC_MARK, PSB5_PSB4_FN2, PTN0_FN),
776
777 /* PTQ FN */
778 PINMUX_DATA(AN3_MARK, PTQ3_FN),
779 PINMUX_DATA(AN2_MARK, PTQ2_FN),
780 PINMUX_DATA(AN1_MARK, PTQ1_FN),
781 PINMUX_DATA(AN0_MARK, PTQ0_FN),
782
783 /* PTR FN */
784 PINMUX_DATA(CS6B_CE1B_MARK, PTR7_FN),
785 PINMUX_DATA(CS6A_CE2B_MARK, PTR6_FN),
786 PINMUX_DATA(CS5B_CE1A_MARK, PTR5_FN),
787 PINMUX_DATA(CS5A_CE2A_MARK, PTR4_FN),
788 PINMUX_DATA(IOIS16_MARK, PSA13_PSA12_FN1, PTR3_FN),
789 PINMUX_DATA(LCDLCLK_PTR_MARK, PSA13_PSA12_FN2, PTR3_FN),
790 PINMUX_DATA(WAIT_MARK, PTR2_FN),
791 PINMUX_DATA(WE3_ICIOWR_MARK, PTR1_FN),
792 PINMUX_DATA(WE2_ICIORD_MARK, PTR0_FN),
793
794 /* PTS FN */
795 PINMUX_DATA(SCIF1_PTS_SCK_MARK, PSC15_PSC14_FN1, PTS7_FN),
796 PINMUX_DATA(SDHI0CD_PTS_MARK, PSC15_PSC14_FN2, PTS7_FN),
797 PINMUX_DATA(SCIF1_PTS_RXD_MARK, PSC15_PSC14_FN1, PTS6_FN),
798 PINMUX_DATA(SDHI0WP_PTS_MARK, PSC15_PSC14_FN2, PTS6_FN),
799 PINMUX_DATA(SCIF1_PTS_TXD_MARK, PSC15_PSC14_FN1, PTS5_FN),
800 PINMUX_DATA(SDHI0D3_PTS_MARK, PSC15_PSC14_FN2, PTS5_FN),
801 PINMUX_DATA(SCIF3_PTS_CTS_MARK, PSC15_PSC14_FN1, PTS4_FN),
802 PINMUX_DATA(SDHI0D2_PTS_MARK, PSC15_PSC14_FN2, PTS4_FN),
803 PINMUX_DATA(SCIF3_PTS_RTS_MARK, PSC15_PSC14_FN1, PTS3_FN),
804 PINMUX_DATA(SDHI0D1_PTS_MARK, PSC15_PSC14_FN2, PTS3_FN),
805 PINMUX_DATA(SCIF3_PTS_SCK_MARK, PSC15_PSC14_FN1, PTS2_FN),
806 PINMUX_DATA(SDHI0D0_PTS_MARK, PSC15_PSC14_FN2, PTS2_FN),
807 PINMUX_DATA(SCIF3_PTS_RXD_MARK, PSC15_PSC14_FN1, PTS1_FN),
808 PINMUX_DATA(SDHI0CMD_PTS_MARK, PSC15_PSC14_FN2, PTS1_FN),
809 PINMUX_DATA(SCIF3_PTS_TXD_MARK, PSC15_PSC14_FN1, PTS0_FN),
810 PINMUX_DATA(SDHI0CLK_PTS_MARK, PSC15_PSC14_FN2, PTS0_FN),
811
812 /* PTT FN */
813 PINMUX_DATA(SCIF0_PTT_SCK_MARK, PSC13_PSC12_FN1, PTT5_FN),
814 PINMUX_DATA(MSIOF0_PTT_TSCK_MARK, PSC13_PSC12_FN2, PTT5_FN),
815 PINMUX_DATA(SCIF0_PTT_RXD_MARK, PSC13_PSC12_FN1, PTT4_FN),
816 PINMUX_DATA(MSIOF0_PTT_RXD_MARK, PSC13_PSC12_FN2, PTT4_FN),
817 PINMUX_DATA(SCIF0_PTT_TXD_MARK, PSC13_PSC12_FN1, PTT3_FN),
818 PINMUX_DATA(MSIOF0_PTT_TXD_MARK, PSC13_PSC12_FN2, PTT3_FN),
819 PINMUX_DATA(SCIF2_PTT_SCK_MARK, PSC11_PSC10_FN1, PTT2_FN),
820 PINMUX_DATA(MSIOF0_PTT_TSYNC_MARK, PSC11_PSC10_FN2, PTT2_FN),
821 PINMUX_DATA(SCIF2_PTT_RXD_MARK, PSC11_PSC10_FN1, PTT1_FN),
822 PINMUX_DATA(MSIOF0_PTT_SS1_MARK, PSC11_PSC10_FN2, PTT1_FN),
823 PINMUX_DATA(MSIOF0_PTT_RSCK_MARK, PSC11_PSC10_FN3, PTT1_FN),
824 PINMUX_DATA(SCIF2_PTT_TXD_MARK, PSC11_PSC10_FN1, PTT0_FN),
825 PINMUX_DATA(MSIOF0_PTT_SS2_MARK, PSC11_PSC10_FN2, PTT0_FN),
826 PINMUX_DATA(MSIOF0_PTT_RSYNC_MARK, PSC11_PSC10_FN3, PTT0_FN),
827
828 /* PTU FN */
829 PINMUX_DATA(FCDE_MARK, PSC9_PSC8_FN1, PTU5_FN),
830 PINMUX_DATA(SCIF0_PTU_SCK_MARK, PSC9_PSC8_FN2, PTU5_FN),
831 PINMUX_DATA(FSC_MARK, PSC9_PSC8_FN1, PTU4_FN),
832 PINMUX_DATA(SCIF0_PTU_RXD_MARK, PSC9_PSC8_FN2, PTU4_FN),
833 PINMUX_DATA(FWE_MARK, PSC9_PSC8_FN1, PTU3_FN),
834 PINMUX_DATA(SCIF0_PTU_TXD_MARK, PSC9_PSC8_FN2, PTU3_FN),
835 PINMUX_DATA(FOE_MARK, PSC7_PSC6_FN1, PTU2_FN),
836 PINMUX_DATA(SCIF2_PTU_SCK_MARK, PSC7_PSC6_FN2, PTU2_FN),
837 PINMUX_DATA(VIO_VD2_MARK, PSC7_PSC6_FN3, PTU2_FN),
838 PINMUX_DATA(FRB_MARK, PSC7_PSC6_FN1, PTU1_FN),
839 PINMUX_DATA(SCIF2_PTU_RXD_MARK, PSC7_PSC6_FN2, PTU1_FN),
840 PINMUX_DATA(VIO_CLK2_MARK, PSC7_PSC6_FN3, PTU1_FN),
841 PINMUX_DATA(FCE_MARK, PSC7_PSC6_FN1, PTU0_FN),
842 PINMUX_DATA(SCIF2_PTU_TXD_MARK, PSC7_PSC6_FN2, PTU0_FN),
843 PINMUX_DATA(VIO_HD2_MARK, PSC7_PSC6_FN3, PTU0_FN),
844
845 /* PTV FN */
846 PINMUX_DATA(NAF7_MARK, PSC7_PSC6_FN1, PTV7_FN),
847 PINMUX_DATA(SCIF1_PTV_SCK_MARK, PSC7_PSC6_FN2, PTV7_FN),
848 PINMUX_DATA(VIO_D15_MARK, PSC7_PSC6_FN3, PTV7_FN),
849 PINMUX_DATA(NAF6_MARK, PSC7_PSC6_FN1, PTV6_FN),
850 PINMUX_DATA(SCIF1_PTV_RXD_MARK, PSC7_PSC6_FN2, PTV6_FN),
851 PINMUX_DATA(VIO_D14_MARK, PSC7_PSC6_FN3, PTV6_FN),
852 PINMUX_DATA(NAF5_MARK, PSC7_PSC6_FN1, PTV5_FN),
853 PINMUX_DATA(SCIF1_PTV_TXD_MARK, PSC7_PSC6_FN2, PTV5_FN),
854 PINMUX_DATA(VIO_D13_MARK, PSC7_PSC6_FN3, PTV5_FN),
855 PINMUX_DATA(NAF4_MARK, PSC7_PSC6_FN1, PTV4_FN),
856 PINMUX_DATA(SCIF3_PTV_CTS_MARK, PSC7_PSC6_FN2, PTV4_FN),
857 PINMUX_DATA(VIO_D12_MARK, PSC7_PSC6_FN3, PTV4_FN),
858 PINMUX_DATA(NAF3_MARK, PSC7_PSC6_FN1, PTV3_FN),
859 PINMUX_DATA(SCIF3_PTV_RTS_MARK, PSC7_PSC6_FN2, PTV3_FN),
860 PINMUX_DATA(VIO_D11_MARK, PSC7_PSC6_FN3, PTV3_FN),
861 PINMUX_DATA(NAF2_MARK, PSC7_PSC6_FN1, PTV2_FN),
862 PINMUX_DATA(SCIF3_PTV_SCK_MARK, PSC7_PSC6_FN2, PTV2_FN),
863 PINMUX_DATA(VIO_D10_MARK, PSC7_PSC6_FN3, PTV2_FN),
864 PINMUX_DATA(NAF1_MARK, PSC7_PSC6_FN1, PTV1_FN),
865 PINMUX_DATA(SCIF3_PTV_RXD_MARK, PSC7_PSC6_FN2, PTV1_FN),
866 PINMUX_DATA(VIO_D9_MARK, PSC7_PSC6_FN3, PTV1_FN),
867 PINMUX_DATA(NAF0_MARK, PSC7_PSC6_FN1, PTV0_FN),
868 PINMUX_DATA(SCIF3_PTV_TXD_MARK, PSC7_PSC6_FN2, PTV0_FN),
869 PINMUX_DATA(VIO_D8_MARK, PSC7_PSC6_FN3, PTV0_FN),
870
871 /* PTW FN */
872 PINMUX_DATA(IRQ7_MARK, PTW7_FN),
873 PINMUX_DATA(IRQ6_MARK, PTW6_FN),
874 PINMUX_DATA(IRQ5_MARK, PTW5_FN),
875 PINMUX_DATA(IRQ4_MARK, PSD15_PSD14_FN1, PTW4_FN),
876 PINMUX_DATA(LCDLCLK_PTW_MARK, PSD15_PSD14_FN2, PTW4_FN),
877 PINMUX_DATA(IRQ3_MARK, PSD13_PSD12_FN1, PTW3_FN),
878 PINMUX_DATA(ADTRG_MARK, PSD13_PSD12_FN2, PTW3_FN),
879 PINMUX_DATA(IRQ2_MARK, PSD11_PSD10_FN1, PTW2_FN),
880 PINMUX_DATA(BS_MARK, PSD11_PSD10_FN2, PTW2_FN),
881 PINMUX_DATA(VIO_CKO_MARK, PSD11_PSD10_FN3, PTW2_FN),
882 PINMUX_DATA(IRQ1_MARK, PSD9_PSD8_FN1, PTW1_FN),
883 PINMUX_DATA(SIUAISPD_MARK, PSD9_PSD8_FN2, PTW1_FN),
884 PINMUX_DATA(IRQ0_MARK, PSD7_PSD6_FN1, PTW0_FN),
885 PINMUX_DATA(SIUAOSPD_MARK, PSD7_PSD6_FN2, PTW0_FN),
886
887 /* PTX FN */
888 PINMUX_DATA(DACK1_MARK, PTX7_FN),
889 PINMUX_DATA(DREQ1_MARK, PSD3_PSD2_FN1, PTX6_FN),
890 PINMUX_DATA(MSIOF0_PTX_MCK_MARK, PSD3_PSD2_FN2, PTX6_FN),
891 PINMUX_DATA(DACK1_MARK, PTX5_FN),
892 PINMUX_DATA(IRDA_OUT_MARK, PSD5_PSD4_FN2, PTX5_FN),
893 PINMUX_DATA(DREQ1_MARK, PTX4_FN),
894 PINMUX_DATA(IRDA_IN_MARK, PSD5_PSD4_FN2, PTX4_FN),
895 PINMUX_DATA(TS0_SDAT_MARK, PTX3_FN),
896 PINMUX_DATA(TS0_SCK_MARK, PTX2_FN),
897 PINMUX_DATA(TS0_SDEN_MARK, PTX1_FN),
898 PINMUX_DATA(TS0_SPSYNC_MARK, PTX0_FN),
899
900 /* PTY FN */
901 PINMUX_DATA(VIO_D7_MARK, PTY7_FN),
902 PINMUX_DATA(VIO_D6_MARK, PTY6_FN),
903 PINMUX_DATA(VIO_D5_MARK, PTY5_FN),
904 PINMUX_DATA(VIO_D4_MARK, PTY4_FN),
905 PINMUX_DATA(VIO_D3_MARK, PTY3_FN),
906 PINMUX_DATA(VIO_D2_MARK, PTY2_FN),
907 PINMUX_DATA(VIO_D1_MARK, PTY1_FN),
908 PINMUX_DATA(VIO_D0_MARK, PTY0_FN),
909
910 /* PTZ FN */
911 PINMUX_DATA(SIUBOBT_MARK, PTZ7_FN),
912 PINMUX_DATA(SIUBOLR_MARK, PTZ6_FN),
913 PINMUX_DATA(SIUBOSLD_MARK, PTZ5_FN),
914 PINMUX_DATA(SIUBMCK_MARK, PTZ4_FN),
915 PINMUX_DATA(VIO_FLD_MARK, PSD1_PSD0_FN1, PTZ3_FN),
916 PINMUX_DATA(SIUBFCK_MARK, PSD1_PSD0_FN2, PTZ3_FN),
917 PINMUX_DATA(VIO_HD1_MARK, PSD1_PSD0_FN1, PTZ2_FN),
918 PINMUX_DATA(SIUBILR_MARK, PSD1_PSD0_FN2, PTZ2_FN),
919 PINMUX_DATA(VIO_VD1_MARK, PSD1_PSD0_FN1, PTZ1_FN),
920 PINMUX_DATA(SIUBIBT_MARK, PSD1_PSD0_FN2, PTZ1_FN),
921 PINMUX_DATA(VIO_CLK1_MARK, PSD1_PSD0_FN1, PTZ0_FN),
922 PINMUX_DATA(SIUBISLD_MARK, PSD1_PSD0_FN2, PTZ0_FN),
923};
924
925static struct pinmux_gpio pinmux_gpios[] = {
926 /* PTA */
927 PINMUX_GPIO(GPIO_PTA7, PTA7_DATA),
928 PINMUX_GPIO(GPIO_PTA6, PTA6_DATA),
929 PINMUX_GPIO(GPIO_PTA5, PTA5_DATA),
930 PINMUX_GPIO(GPIO_PTA4, PTA4_DATA),
931 PINMUX_GPIO(GPIO_PTA3, PTA3_DATA),
932 PINMUX_GPIO(GPIO_PTA2, PTA2_DATA),
933 PINMUX_GPIO(GPIO_PTA1, PTA1_DATA),
934 PINMUX_GPIO(GPIO_PTA0, PTA0_DATA),
935
936 /* PTB */
937 PINMUX_GPIO(GPIO_PTB7, PTB7_DATA),
938 PINMUX_GPIO(GPIO_PTB6, PTB6_DATA),
939 PINMUX_GPIO(GPIO_PTB5, PTB5_DATA),
940 PINMUX_GPIO(GPIO_PTB4, PTB4_DATA),
941 PINMUX_GPIO(GPIO_PTB3, PTB3_DATA),
942 PINMUX_GPIO(GPIO_PTB2, PTB2_DATA),
943 PINMUX_GPIO(GPIO_PTB1, PTB1_DATA),
944 PINMUX_GPIO(GPIO_PTB0, PTB0_DATA),
945
946 /* PTC */
947 PINMUX_GPIO(GPIO_PTC7, PTC7_DATA),
948 PINMUX_GPIO(GPIO_PTC6, PTC6_DATA),
949 PINMUX_GPIO(GPIO_PTC5, PTC5_DATA),
950 PINMUX_GPIO(GPIO_PTC4, PTC4_DATA),
951 PINMUX_GPIO(GPIO_PTC3, PTC3_DATA),
952 PINMUX_GPIO(GPIO_PTC2, PTC2_DATA),
953 PINMUX_GPIO(GPIO_PTC1, PTC1_DATA),
954 PINMUX_GPIO(GPIO_PTC0, PTC0_DATA),
955
956 /* PTD */
957 PINMUX_GPIO(GPIO_PTD7, PTD7_DATA),
958 PINMUX_GPIO(GPIO_PTD6, PTD6_DATA),
959 PINMUX_GPIO(GPIO_PTD5, PTD5_DATA),
960 PINMUX_GPIO(GPIO_PTD4, PTD4_DATA),
961 PINMUX_GPIO(GPIO_PTD3, PTD3_DATA),
962 PINMUX_GPIO(GPIO_PTD2, PTD2_DATA),
963 PINMUX_GPIO(GPIO_PTD1, PTD1_DATA),
964 PINMUX_GPIO(GPIO_PTD0, PTD0_DATA),
965
966 /* PTE */
967 PINMUX_GPIO(GPIO_PTE5, PTE5_DATA),
968 PINMUX_GPIO(GPIO_PTE4, PTE4_DATA),
969 PINMUX_GPIO(GPIO_PTE3, PTE3_DATA),
970 PINMUX_GPIO(GPIO_PTE2, PTE2_DATA),
971 PINMUX_GPIO(GPIO_PTE1, PTE1_DATA),
972 PINMUX_GPIO(GPIO_PTE0, PTE0_DATA),
973
974 /* PTF */
975 PINMUX_GPIO(GPIO_PTF7, PTF7_DATA),
976 PINMUX_GPIO(GPIO_PTF6, PTF6_DATA),
977 PINMUX_GPIO(GPIO_PTF5, PTF5_DATA),
978 PINMUX_GPIO(GPIO_PTF4, PTF4_DATA),
979 PINMUX_GPIO(GPIO_PTF3, PTF3_DATA),
980 PINMUX_GPIO(GPIO_PTF2, PTF2_DATA),
981 PINMUX_GPIO(GPIO_PTF1, PTF1_DATA),
982 PINMUX_GPIO(GPIO_PTF0, PTF0_DATA),
983
984 /* PTG */
985 PINMUX_GPIO(GPIO_PTG5, PTG5_DATA),
986 PINMUX_GPIO(GPIO_PTG4, PTG4_DATA),
987 PINMUX_GPIO(GPIO_PTG3, PTG3_DATA),
988 PINMUX_GPIO(GPIO_PTG2, PTG2_DATA),
989 PINMUX_GPIO(GPIO_PTG1, PTG1_DATA),
990 PINMUX_GPIO(GPIO_PTG0, PTG0_DATA),
991
992 /* PTH */
993 PINMUX_GPIO(GPIO_PTH7, PTH7_DATA),
994 PINMUX_GPIO(GPIO_PTH6, PTH6_DATA),
995 PINMUX_GPIO(GPIO_PTH5, PTH5_DATA),
996 PINMUX_GPIO(GPIO_PTH4, PTH4_DATA),
997 PINMUX_GPIO(GPIO_PTH3, PTH3_DATA),
998 PINMUX_GPIO(GPIO_PTH2, PTH2_DATA),
999 PINMUX_GPIO(GPIO_PTH1, PTH1_DATA),
1000 PINMUX_GPIO(GPIO_PTH0, PTH0_DATA),
1001
1002 /* PTJ */
1003 PINMUX_GPIO(GPIO_PTJ7, PTJ7_DATA),
1004 PINMUX_GPIO(GPIO_PTJ5, PTJ5_DATA),
1005 PINMUX_GPIO(GPIO_PTJ3, PTJ3_DATA),
1006 PINMUX_GPIO(GPIO_PTJ2, PTJ2_DATA),
1007 PINMUX_GPIO(GPIO_PTJ1, PTJ1_DATA),
1008 PINMUX_GPIO(GPIO_PTJ0, PTJ0_DATA),
1009
1010 /* PTK */
1011 PINMUX_GPIO(GPIO_PTK7, PTK7_DATA),
1012 PINMUX_GPIO(GPIO_PTK6, PTK6_DATA),
1013 PINMUX_GPIO(GPIO_PTK5, PTK5_DATA),
1014 PINMUX_GPIO(GPIO_PTK4, PTK4_DATA),
1015 PINMUX_GPIO(GPIO_PTK3, PTK3_DATA),
1016 PINMUX_GPIO(GPIO_PTK2, PTK2_DATA),
1017 PINMUX_GPIO(GPIO_PTK1, PTK1_DATA),
1018 PINMUX_GPIO(GPIO_PTK0, PTK0_DATA),
1019
1020 /* PTL */
1021 PINMUX_GPIO(GPIO_PTL7, PTL7_DATA),
1022 PINMUX_GPIO(GPIO_PTL6, PTL6_DATA),
1023 PINMUX_GPIO(GPIO_PTL5, PTL5_DATA),
1024 PINMUX_GPIO(GPIO_PTL4, PTL4_DATA),
1025 PINMUX_GPIO(GPIO_PTL3, PTL3_DATA),
1026 PINMUX_GPIO(GPIO_PTL2, PTL2_DATA),
1027 PINMUX_GPIO(GPIO_PTL1, PTL1_DATA),
1028 PINMUX_GPIO(GPIO_PTL0, PTL0_DATA),
1029
1030 /* PTM */
1031 PINMUX_GPIO(GPIO_PTM7, PTM7_DATA),
1032 PINMUX_GPIO(GPIO_PTM6, PTM6_DATA),
1033 PINMUX_GPIO(GPIO_PTM5, PTM5_DATA),
1034 PINMUX_GPIO(GPIO_PTM4, PTM4_DATA),
1035 PINMUX_GPIO(GPIO_PTM3, PTM3_DATA),
1036 PINMUX_GPIO(GPIO_PTM2, PTM2_DATA),
1037 PINMUX_GPIO(GPIO_PTM1, PTM1_DATA),
1038 PINMUX_GPIO(GPIO_PTM0, PTM0_DATA),
1039
1040 /* PTN */
1041 PINMUX_GPIO(GPIO_PTN7, PTN7_DATA),
1042 PINMUX_GPIO(GPIO_PTN6, PTN6_DATA),
1043 PINMUX_GPIO(GPIO_PTN5, PTN5_DATA),
1044 PINMUX_GPIO(GPIO_PTN4, PTN4_DATA),
1045 PINMUX_GPIO(GPIO_PTN3, PTN3_DATA),
1046 PINMUX_GPIO(GPIO_PTN2, PTN2_DATA),
1047 PINMUX_GPIO(GPIO_PTN1, PTN1_DATA),
1048 PINMUX_GPIO(GPIO_PTN0, PTN0_DATA),
1049
1050 /* PTQ */
1051 PINMUX_GPIO(GPIO_PTQ3, PTQ3_DATA),
1052 PINMUX_GPIO(GPIO_PTQ2, PTQ2_DATA),
1053 PINMUX_GPIO(GPIO_PTQ1, PTQ1_DATA),
1054 PINMUX_GPIO(GPIO_PTQ0, PTQ0_DATA),
1055
1056 /* PTR */
1057 PINMUX_GPIO(GPIO_PTR7, PTR7_DATA),
1058 PINMUX_GPIO(GPIO_PTR6, PTR6_DATA),
1059 PINMUX_GPIO(GPIO_PTR5, PTR5_DATA),
1060 PINMUX_GPIO(GPIO_PTR4, PTR4_DATA),
1061 PINMUX_GPIO(GPIO_PTR3, PTR3_DATA),
1062 PINMUX_GPIO(GPIO_PTR2, PTR2_DATA),
1063 PINMUX_GPIO(GPIO_PTR1, PTR1_DATA),
1064 PINMUX_GPIO(GPIO_PTR0, PTR0_DATA),
1065
1066 /* PTS */
1067 PINMUX_GPIO(GPIO_PTS7, PTS7_DATA),
1068 PINMUX_GPIO(GPIO_PTS6, PTS6_DATA),
1069 PINMUX_GPIO(GPIO_PTS5, PTS5_DATA),
1070 PINMUX_GPIO(GPIO_PTS4, PTS4_DATA),
1071 PINMUX_GPIO(GPIO_PTS3, PTS3_DATA),
1072 PINMUX_GPIO(GPIO_PTS2, PTS2_DATA),
1073 PINMUX_GPIO(GPIO_PTS1, PTS1_DATA),
1074 PINMUX_GPIO(GPIO_PTS0, PTS0_DATA),
1075
1076 /* PTT */
1077 PINMUX_GPIO(GPIO_PTT5, PTT5_DATA),
1078 PINMUX_GPIO(GPIO_PTT4, PTT4_DATA),
1079 PINMUX_GPIO(GPIO_PTT3, PTT3_DATA),
1080 PINMUX_GPIO(GPIO_PTT2, PTT2_DATA),
1081 PINMUX_GPIO(GPIO_PTT1, PTT1_DATA),
1082 PINMUX_GPIO(GPIO_PTT0, PTT0_DATA),
1083
1084 /* PTU */
1085 PINMUX_GPIO(GPIO_PTU5, PTU5_DATA),
1086 PINMUX_GPIO(GPIO_PTU4, PTU4_DATA),
1087 PINMUX_GPIO(GPIO_PTU3, PTU3_DATA),
1088 PINMUX_GPIO(GPIO_PTU2, PTU2_DATA),
1089 PINMUX_GPIO(GPIO_PTU1, PTU1_DATA),
1090 PINMUX_GPIO(GPIO_PTU0, PTU0_DATA),
1091
1092 /* PTV */
1093 PINMUX_GPIO(GPIO_PTV7, PTV7_DATA),
1094 PINMUX_GPIO(GPIO_PTV6, PTV6_DATA),
1095 PINMUX_GPIO(GPIO_PTV5, PTV5_DATA),
1096 PINMUX_GPIO(GPIO_PTV4, PTV4_DATA),
1097 PINMUX_GPIO(GPIO_PTV3, PTV3_DATA),
1098 PINMUX_GPIO(GPIO_PTV2, PTV2_DATA),
1099 PINMUX_GPIO(GPIO_PTV1, PTV1_DATA),
1100 PINMUX_GPIO(GPIO_PTV0, PTV0_DATA),
1101
1102 /* PTW */
1103 PINMUX_GPIO(GPIO_PTW7, PTW7_DATA),
1104 PINMUX_GPIO(GPIO_PTW6, PTW6_DATA),
1105 PINMUX_GPIO(GPIO_PTW5, PTW5_DATA),
1106 PINMUX_GPIO(GPIO_PTW4, PTW4_DATA),
1107 PINMUX_GPIO(GPIO_PTW3, PTW3_DATA),
1108 PINMUX_GPIO(GPIO_PTW2, PTW2_DATA),
1109 PINMUX_GPIO(GPIO_PTW1, PTW1_DATA),
1110 PINMUX_GPIO(GPIO_PTW0, PTW0_DATA),
1111
1112 /* PTX */
1113 PINMUX_GPIO(GPIO_PTX7, PTX7_DATA),
1114 PINMUX_GPIO(GPIO_PTX6, PTX6_DATA),
1115 PINMUX_GPIO(GPIO_PTX5, PTX5_DATA),
1116 PINMUX_GPIO(GPIO_PTX4, PTX4_DATA),
1117 PINMUX_GPIO(GPIO_PTX3, PTX3_DATA),
1118 PINMUX_GPIO(GPIO_PTX2, PTX2_DATA),
1119 PINMUX_GPIO(GPIO_PTX1, PTX1_DATA),
1120 PINMUX_GPIO(GPIO_PTX0, PTX0_DATA),
1121
1122 /* PTY */
1123 PINMUX_GPIO(GPIO_PTY7, PTY7_DATA),
1124 PINMUX_GPIO(GPIO_PTY6, PTY6_DATA),
1125 PINMUX_GPIO(GPIO_PTY5, PTY5_DATA),
1126 PINMUX_GPIO(GPIO_PTY4, PTY4_DATA),
1127 PINMUX_GPIO(GPIO_PTY3, PTY3_DATA),
1128 PINMUX_GPIO(GPIO_PTY2, PTY2_DATA),
1129 PINMUX_GPIO(GPIO_PTY1, PTY1_DATA),
1130 PINMUX_GPIO(GPIO_PTY0, PTY0_DATA),
1131
1132 /* PTZ */
1133 PINMUX_GPIO(GPIO_PTZ7, PTZ7_DATA),
1134 PINMUX_GPIO(GPIO_PTZ6, PTZ6_DATA),
1135 PINMUX_GPIO(GPIO_PTZ5, PTZ5_DATA),
1136 PINMUX_GPIO(GPIO_PTZ4, PTZ4_DATA),
1137 PINMUX_GPIO(GPIO_PTZ3, PTZ3_DATA),
1138 PINMUX_GPIO(GPIO_PTZ2, PTZ2_DATA),
1139 PINMUX_GPIO(GPIO_PTZ1, PTZ1_DATA),
1140 PINMUX_GPIO(GPIO_PTZ0, PTZ0_DATA),
1141
1142 /* SCIF0 */
1143 PINMUX_GPIO(GPIO_FN_SCIF0_PTT_TXD, SCIF0_PTT_TXD_MARK),
1144 PINMUX_GPIO(GPIO_FN_SCIF0_PTT_RXD, SCIF0_PTT_RXD_MARK),
1145 PINMUX_GPIO(GPIO_FN_SCIF0_PTT_SCK, SCIF0_PTT_SCK_MARK),
1146 PINMUX_GPIO(GPIO_FN_SCIF0_PTU_TXD, SCIF0_PTU_TXD_MARK),
1147 PINMUX_GPIO(GPIO_FN_SCIF0_PTU_RXD, SCIF0_PTU_RXD_MARK),
1148 PINMUX_GPIO(GPIO_FN_SCIF0_PTU_SCK, SCIF0_PTU_SCK_MARK),
1149
1150 /* SCIF1 */
1151 PINMUX_GPIO(GPIO_FN_SCIF1_PTS_TXD, SCIF1_PTS_TXD_MARK),
1152 PINMUX_GPIO(GPIO_FN_SCIF1_PTS_RXD, SCIF1_PTS_RXD_MARK),
1153 PINMUX_GPIO(GPIO_FN_SCIF1_PTS_SCK, SCIF1_PTS_SCK_MARK),
1154 PINMUX_GPIO(GPIO_FN_SCIF1_PTV_TXD, SCIF1_PTV_TXD_MARK),
1155 PINMUX_GPIO(GPIO_FN_SCIF1_PTV_RXD, SCIF1_PTV_RXD_MARK),
1156 PINMUX_GPIO(GPIO_FN_SCIF1_PTV_SCK, SCIF1_PTV_SCK_MARK),
1157
1158 /* SCIF2 */
1159 PINMUX_GPIO(GPIO_FN_SCIF2_PTT_TXD, SCIF2_PTT_TXD_MARK),
1160 PINMUX_GPIO(GPIO_FN_SCIF2_PTT_RXD, SCIF2_PTT_RXD_MARK),
1161 PINMUX_GPIO(GPIO_FN_SCIF2_PTT_SCK, SCIF2_PTT_SCK_MARK),
1162 PINMUX_GPIO(GPIO_FN_SCIF2_PTU_TXD, SCIF2_PTU_TXD_MARK),
1163 PINMUX_GPIO(GPIO_FN_SCIF2_PTU_RXD, SCIF2_PTU_RXD_MARK),
1164 PINMUX_GPIO(GPIO_FN_SCIF2_PTU_SCK, SCIF2_PTU_SCK_MARK),
1165
1166 /* SCIF3 */
1167 PINMUX_GPIO(GPIO_FN_SCIF3_PTS_TXD, SCIF3_PTS_TXD_MARK),
1168 PINMUX_GPIO(GPIO_FN_SCIF3_PTS_RXD, SCIF3_PTS_RXD_MARK),
1169 PINMUX_GPIO(GPIO_FN_SCIF3_PTS_SCK, SCIF3_PTS_SCK_MARK),
1170 PINMUX_GPIO(GPIO_FN_SCIF3_PTS_RTS, SCIF3_PTS_RTS_MARK),
1171 PINMUX_GPIO(GPIO_FN_SCIF3_PTS_CTS, SCIF3_PTS_CTS_MARK),
1172 PINMUX_GPIO(GPIO_FN_SCIF3_PTV_TXD, SCIF3_PTV_TXD_MARK),
1173 PINMUX_GPIO(GPIO_FN_SCIF3_PTV_RXD, SCIF3_PTV_RXD_MARK),
1174 PINMUX_GPIO(GPIO_FN_SCIF3_PTV_SCK, SCIF3_PTV_SCK_MARK),
1175 PINMUX_GPIO(GPIO_FN_SCIF3_PTV_RTS, SCIF3_PTV_RTS_MARK),
1176 PINMUX_GPIO(GPIO_FN_SCIF3_PTV_CTS, SCIF3_PTV_CTS_MARK),
1177
1178 /* SCIF4 */
1179 PINMUX_GPIO(GPIO_FN_SCIF4_PTE_TXD, SCIF4_PTE_TXD_MARK),
1180 PINMUX_GPIO(GPIO_FN_SCIF4_PTE_RXD, SCIF4_PTE_RXD_MARK),
1181 PINMUX_GPIO(GPIO_FN_SCIF4_PTE_SCK, SCIF4_PTE_SCK_MARK),
1182 PINMUX_GPIO(GPIO_FN_SCIF4_PTN_TXD, SCIF4_PTN_TXD_MARK),
1183 PINMUX_GPIO(GPIO_FN_SCIF4_PTN_RXD, SCIF4_PTN_RXD_MARK),
1184 PINMUX_GPIO(GPIO_FN_SCIF4_PTN_SCK, SCIF4_PTN_SCK_MARK),
1185
1186 /* SCIF5 */
1187 PINMUX_GPIO(GPIO_FN_SCIF5_PTE_TXD, SCIF5_PTE_TXD_MARK),
1188 PINMUX_GPIO(GPIO_FN_SCIF5_PTE_RXD, SCIF5_PTE_RXD_MARK),
1189 PINMUX_GPIO(GPIO_FN_SCIF5_PTE_SCK, SCIF5_PTE_SCK_MARK),
1190 PINMUX_GPIO(GPIO_FN_SCIF5_PTN_TXD, SCIF5_PTN_TXD_MARK),
1191 PINMUX_GPIO(GPIO_FN_SCIF5_PTN_RXD, SCIF5_PTN_RXD_MARK),
1192 PINMUX_GPIO(GPIO_FN_SCIF5_PTN_SCK, SCIF5_PTN_SCK_MARK),
1193
1194 /* CEU */
1195 PINMUX_GPIO(GPIO_FN_VIO_D15, VIO_D15_MARK),
1196 PINMUX_GPIO(GPIO_FN_VIO_D14, VIO_D14_MARK),
1197 PINMUX_GPIO(GPIO_FN_VIO_D13, VIO_D13_MARK),
1198 PINMUX_GPIO(GPIO_FN_VIO_D12, VIO_D12_MARK),
1199 PINMUX_GPIO(GPIO_FN_VIO_D11, VIO_D11_MARK),
1200 PINMUX_GPIO(GPIO_FN_VIO_D10, VIO_D10_MARK),
1201 PINMUX_GPIO(GPIO_FN_VIO_D9, VIO_D9_MARK),
1202 PINMUX_GPIO(GPIO_FN_VIO_D8, VIO_D8_MARK),
1203 PINMUX_GPIO(GPIO_FN_VIO_D7, VIO_D7_MARK),
1204 PINMUX_GPIO(GPIO_FN_VIO_D6, VIO_D6_MARK),
1205 PINMUX_GPIO(GPIO_FN_VIO_D5, VIO_D5_MARK),
1206 PINMUX_GPIO(GPIO_FN_VIO_D4, VIO_D4_MARK),
1207 PINMUX_GPIO(GPIO_FN_VIO_D3, VIO_D3_MARK),
1208 PINMUX_GPIO(GPIO_FN_VIO_D2, VIO_D2_MARK),
1209 PINMUX_GPIO(GPIO_FN_VIO_D1, VIO_D1_MARK),
1210 PINMUX_GPIO(GPIO_FN_VIO_D0, VIO_D0_MARK),
1211 PINMUX_GPIO(GPIO_FN_VIO_CLK1, VIO_CLK1_MARK),
1212 PINMUX_GPIO(GPIO_FN_VIO_VD1, VIO_VD1_MARK),
1213 PINMUX_GPIO(GPIO_FN_VIO_HD1, VIO_HD1_MARK),
1214 PINMUX_GPIO(GPIO_FN_VIO_FLD, VIO_FLD_MARK),
1215 PINMUX_GPIO(GPIO_FN_VIO_CKO, VIO_CKO_MARK),
1216 PINMUX_GPIO(GPIO_FN_VIO_VD2, VIO_VD2_MARK),
1217 PINMUX_GPIO(GPIO_FN_VIO_HD2, VIO_HD2_MARK),
1218 PINMUX_GPIO(GPIO_FN_VIO_CLK2, VIO_CLK2_MARK),
1219
1220 /* LCDC */
1221 PINMUX_GPIO(GPIO_FN_LCDD23, LCDD23_MARK),
1222 PINMUX_GPIO(GPIO_FN_LCDD22, LCDD22_MARK),
1223 PINMUX_GPIO(GPIO_FN_LCDD21, LCDD21_MARK),
1224 PINMUX_GPIO(GPIO_FN_LCDD20, LCDD20_MARK),
1225 PINMUX_GPIO(GPIO_FN_LCDD19, LCDD19_MARK),
1226 PINMUX_GPIO(GPIO_FN_LCDD18, LCDD18_MARK),
1227 PINMUX_GPIO(GPIO_FN_LCDD17, LCDD17_MARK),
1228 PINMUX_GPIO(GPIO_FN_LCDD16, LCDD16_MARK),
1229 PINMUX_GPIO(GPIO_FN_LCDD15, LCDD15_MARK),
1230 PINMUX_GPIO(GPIO_FN_LCDD14, LCDD14_MARK),
1231 PINMUX_GPIO(GPIO_FN_LCDD13, LCDD13_MARK),
1232 PINMUX_GPIO(GPIO_FN_LCDD12, LCDD12_MARK),
1233 PINMUX_GPIO(GPIO_FN_LCDD11, LCDD11_MARK),
1234 PINMUX_GPIO(GPIO_FN_LCDD10, LCDD10_MARK),
1235 PINMUX_GPIO(GPIO_FN_LCDD9, LCDD9_MARK),
1236 PINMUX_GPIO(GPIO_FN_LCDD8, LCDD8_MARK),
1237 PINMUX_GPIO(GPIO_FN_LCDD7, LCDD7_MARK),
1238 PINMUX_GPIO(GPIO_FN_LCDD6, LCDD6_MARK),
1239 PINMUX_GPIO(GPIO_FN_LCDD5, LCDD5_MARK),
1240 PINMUX_GPIO(GPIO_FN_LCDD4, LCDD4_MARK),
1241 PINMUX_GPIO(GPIO_FN_LCDD3, LCDD3_MARK),
1242 PINMUX_GPIO(GPIO_FN_LCDD2, LCDD2_MARK),
1243 PINMUX_GPIO(GPIO_FN_LCDD1, LCDD1_MARK),
1244 PINMUX_GPIO(GPIO_FN_LCDD0, LCDD0_MARK),
1245 PINMUX_GPIO(GPIO_FN_LCDLCLK_PTR, LCDLCLK_PTR_MARK),
1246 PINMUX_GPIO(GPIO_FN_LCDLCLK_PTW, LCDLCLK_PTW_MARK),
1247 /* Main LCD */
1248 PINMUX_GPIO(GPIO_FN_LCDDON, LCDDON_MARK),
1249 PINMUX_GPIO(GPIO_FN_LCDVCPWC, LCDVCPWC_MARK),
1250 PINMUX_GPIO(GPIO_FN_LCDVEPWC, LCDVEPWC_MARK),
1251 PINMUX_GPIO(GPIO_FN_LCDVSYN, LCDVSYN_MARK),
1252 /* Main LCD - RGB Mode */
1253 PINMUX_GPIO(GPIO_FN_LCDDCK, LCDDCK_MARK),
1254 PINMUX_GPIO(GPIO_FN_LCDHSYN, LCDHSYN_MARK),
1255 PINMUX_GPIO(GPIO_FN_LCDDISP, LCDDISP_MARK),
1256 /* Main LCD - SYS Mode */
1257 PINMUX_GPIO(GPIO_FN_LCDRS, LCDRS_MARK),
1258 PINMUX_GPIO(GPIO_FN_LCDCS, LCDCS_MARK),
1259 PINMUX_GPIO(GPIO_FN_LCDWR, LCDWR_MARK),
1260 PINMUX_GPIO(GPIO_FN_LCDRD, LCDRD_MARK),
1261
1262 /* IRQ */
1263 PINMUX_GPIO(GPIO_FN_IRQ0, IRQ0_MARK),
1264 PINMUX_GPIO(GPIO_FN_IRQ1, IRQ1_MARK),
1265 PINMUX_GPIO(GPIO_FN_IRQ2, IRQ2_MARK),
1266 PINMUX_GPIO(GPIO_FN_IRQ3, IRQ3_MARK),
1267 PINMUX_GPIO(GPIO_FN_IRQ4, IRQ4_MARK),
1268 PINMUX_GPIO(GPIO_FN_IRQ5, IRQ5_MARK),
1269 PINMUX_GPIO(GPIO_FN_IRQ6, IRQ6_MARK),
1270 PINMUX_GPIO(GPIO_FN_IRQ7, IRQ7_MARK),
1271
1272 /* AUD */
1273 PINMUX_GPIO(GPIO_FN_AUDCK, AUDCK_MARK),
1274 PINMUX_GPIO(GPIO_FN_AUDSYNC, AUDSYNC_MARK),
1275 PINMUX_GPIO(GPIO_FN_AUDATA3, AUDATA3_MARK),
1276 PINMUX_GPIO(GPIO_FN_AUDATA2, AUDATA2_MARK),
1277 PINMUX_GPIO(GPIO_FN_AUDATA1, AUDATA1_MARK),
1278 PINMUX_GPIO(GPIO_FN_AUDATA0, AUDATA0_MARK),
1279
1280 /* SDHI0 (PTD) */
1281 PINMUX_GPIO(GPIO_FN_SDHI0CD_PTD, SDHI0CD_PTD_MARK),
1282 PINMUX_GPIO(GPIO_FN_SDHI0WP_PTD, SDHI0WP_PTD_MARK),
1283 PINMUX_GPIO(GPIO_FN_SDHI0D3_PTD, SDHI0D3_PTD_MARK),
1284 PINMUX_GPIO(GPIO_FN_SDHI0D2_PTD, SDHI0D2_PTD_MARK),
1285 PINMUX_GPIO(GPIO_FN_SDHI0D1_PTD, SDHI0D1_PTD_MARK),
1286 PINMUX_GPIO(GPIO_FN_SDHI0D0_PTD, SDHI0D0_PTD_MARK),
1287 PINMUX_GPIO(GPIO_FN_SDHI0CMD_PTD, SDHI0CMD_PTD_MARK),
1288 PINMUX_GPIO(GPIO_FN_SDHI0CLK_PTD, SDHI0CLK_PTD_MARK),
1289
1290 /* SDHI0 (PTS) */
1291 PINMUX_GPIO(GPIO_FN_SDHI0CD_PTS, SDHI0CD_PTS_MARK),
1292 PINMUX_GPIO(GPIO_FN_SDHI0WP_PTS, SDHI0WP_PTS_MARK),
1293 PINMUX_GPIO(GPIO_FN_SDHI0D3_PTS, SDHI0D3_PTS_MARK),
1294 PINMUX_GPIO(GPIO_FN_SDHI0D2_PTS, SDHI0D2_PTS_MARK),
1295 PINMUX_GPIO(GPIO_FN_SDHI0D1_PTS, SDHI0D1_PTS_MARK),
1296 PINMUX_GPIO(GPIO_FN_SDHI0D0_PTS, SDHI0D0_PTS_MARK),
1297 PINMUX_GPIO(GPIO_FN_SDHI0CMD_PTS, SDHI0CMD_PTS_MARK),
1298 PINMUX_GPIO(GPIO_FN_SDHI0CLK_PTS, SDHI0CLK_PTS_MARK),
1299
1300 /* SDHI1 */
1301 PINMUX_GPIO(GPIO_FN_SDHI1CD, SDHI1CD_MARK),
1302 PINMUX_GPIO(GPIO_FN_SDHI1WP, SDHI1WP_MARK),
1303 PINMUX_GPIO(GPIO_FN_SDHI1D3, SDHI1D3_MARK),
1304 PINMUX_GPIO(GPIO_FN_SDHI1D2, SDHI1D2_MARK),
1305 PINMUX_GPIO(GPIO_FN_SDHI1D1, SDHI1D1_MARK),
1306 PINMUX_GPIO(GPIO_FN_SDHI1D0, SDHI1D0_MARK),
1307 PINMUX_GPIO(GPIO_FN_SDHI1CMD, SDHI1CMD_MARK),
1308 PINMUX_GPIO(GPIO_FN_SDHI1CLK, SDHI1CLK_MARK),
1309
1310 /* SIUA */
1311 PINMUX_GPIO(GPIO_FN_SIUAFCK, SIUAFCK_MARK),
1312 PINMUX_GPIO(GPIO_FN_SIUAILR, SIUAILR_MARK),
1313 PINMUX_GPIO(GPIO_FN_SIUAIBT, SIUAIBT_MARK),
1314 PINMUX_GPIO(GPIO_FN_SIUAISLD, SIUAISLD_MARK),
1315 PINMUX_GPIO(GPIO_FN_SIUAOLR, SIUAOLR_MARK),
1316 PINMUX_GPIO(GPIO_FN_SIUAOBT, SIUAOBT_MARK),
1317 PINMUX_GPIO(GPIO_FN_SIUAOSLD, SIUAOSLD_MARK),
1318 PINMUX_GPIO(GPIO_FN_SIUAMCK, SIUAMCK_MARK),
1319 PINMUX_GPIO(GPIO_FN_SIUAISPD, SIUAISPD_MARK),
1320 PINMUX_GPIO(GPIO_FN_SIUOSPD, SIUAOSPD_MARK),
1321
1322 /* SIUB */
1323 PINMUX_GPIO(GPIO_FN_SIUBFCK, SIUBFCK_MARK),
1324 PINMUX_GPIO(GPIO_FN_SIUBILR, SIUBILR_MARK),
1325 PINMUX_GPIO(GPIO_FN_SIUBIBT, SIUBIBT_MARK),
1326 PINMUX_GPIO(GPIO_FN_SIUBISLD, SIUBISLD_MARK),
1327 PINMUX_GPIO(GPIO_FN_SIUBOLR, SIUBOLR_MARK),
1328 PINMUX_GPIO(GPIO_FN_SIUBOBT, SIUBOBT_MARK),
1329 PINMUX_GPIO(GPIO_FN_SIUBOSLD, SIUBOSLD_MARK),
1330 PINMUX_GPIO(GPIO_FN_SIUBMCK, SIUBMCK_MARK),
1331
1332 /* IRDA */
1333 PINMUX_GPIO(GPIO_FN_IRDA_IN, IRDA_IN_MARK),
1334 PINMUX_GPIO(GPIO_FN_IRDA_OUT, IRDA_OUT_MARK),
1335
1336 /* VOU */
1337 PINMUX_GPIO(GPIO_FN_DV_CLKI, DV_CLKI_MARK),
1338 PINMUX_GPIO(GPIO_FN_DV_CLK, DV_CLK_MARK),
1339 PINMUX_GPIO(GPIO_FN_DV_HSYNC, DV_HSYNC_MARK),
1340 PINMUX_GPIO(GPIO_FN_DV_VSYNC, DV_VSYNC_MARK),
1341 PINMUX_GPIO(GPIO_FN_DV_D15, DV_D15_MARK),
1342 PINMUX_GPIO(GPIO_FN_DV_D14, DV_D14_MARK),
1343 PINMUX_GPIO(GPIO_FN_DV_D13, DV_D13_MARK),
1344 PINMUX_GPIO(GPIO_FN_DV_D12, DV_D12_MARK),
1345 PINMUX_GPIO(GPIO_FN_DV_D11, DV_D11_MARK),
1346 PINMUX_GPIO(GPIO_FN_DV_D10, DV_D10_MARK),
1347 PINMUX_GPIO(GPIO_FN_DV_D9, DV_D9_MARK),
1348 PINMUX_GPIO(GPIO_FN_DV_D8, DV_D8_MARK),
1349 PINMUX_GPIO(GPIO_FN_DV_D7, DV_D7_MARK),
1350 PINMUX_GPIO(GPIO_FN_DV_D6, DV_D6_MARK),
1351 PINMUX_GPIO(GPIO_FN_DV_D5, DV_D5_MARK),
1352 PINMUX_GPIO(GPIO_FN_DV_D4, DV_D4_MARK),
1353 PINMUX_GPIO(GPIO_FN_DV_D3, DV_D3_MARK),
1354 PINMUX_GPIO(GPIO_FN_DV_D2, DV_D2_MARK),
1355 PINMUX_GPIO(GPIO_FN_DV_D1, DV_D1_MARK),
1356 PINMUX_GPIO(GPIO_FN_DV_D0, DV_D0_MARK),
1357
1358 /* KEYSC */
1359 PINMUX_GPIO(GPIO_FN_KEYIN0, KEYIN0_MARK),
1360 PINMUX_GPIO(GPIO_FN_KEYIN1, KEYIN1_MARK),
1361 PINMUX_GPIO(GPIO_FN_KEYIN2, KEYIN2_MARK),
1362 PINMUX_GPIO(GPIO_FN_KEYIN3, KEYIN3_MARK),
1363 PINMUX_GPIO(GPIO_FN_KEYIN4, KEYIN4_MARK),
1364 PINMUX_GPIO(GPIO_FN_KEYOUT0, KEYOUT0_MARK),
1365 PINMUX_GPIO(GPIO_FN_KEYOUT1, KEYOUT1_MARK),
1366 PINMUX_GPIO(GPIO_FN_KEYOUT2, KEYOUT2_MARK),
1367 PINMUX_GPIO(GPIO_FN_KEYOUT3, KEYOUT3_MARK),
1368 PINMUX_GPIO(GPIO_FN_KEYOUT4_IN6, KEYOUT4_IN6_MARK),
1369 PINMUX_GPIO(GPIO_FN_KEYOUT5_IN5, KEYOUT5_IN5_MARK),
1370
1371 /* MSIOF0 (PTF) */
1372 PINMUX_GPIO(GPIO_FN_MSIOF0_PTF_TXD, MSIOF0_PTF_TXD_MARK),
1373 PINMUX_GPIO(GPIO_FN_MSIOF0_PTF_RXD, MSIOF0_PTF_RXD_MARK),
1374 PINMUX_GPIO(GPIO_FN_MSIOF0_PTF_MCK, MSIOF0_PTF_MCK_MARK),
1375 PINMUX_GPIO(GPIO_FN_MSIOF0_PTF_TSYNC, MSIOF0_PTF_TSYNC_MARK),
1376 PINMUX_GPIO(GPIO_FN_MSIOF0_PTF_TSCK, MSIOF0_PTF_TSCK_MARK),
1377 PINMUX_GPIO(GPIO_FN_MSIOF0_PTF_RSYNC, MSIOF0_PTF_RSYNC_MARK),
1378 PINMUX_GPIO(GPIO_FN_MSIOF0_PTF_RSCK, MSIOF0_PTF_RSCK_MARK),
1379 PINMUX_GPIO(GPIO_FN_MSIOF0_PTF_SS1, MSIOF0_PTF_SS1_MARK),
1380 PINMUX_GPIO(GPIO_FN_MSIOF0_PTF_SS2, MSIOF0_PTF_SS2_MARK),
1381
1382 /* MSIOF0 (PTT+PTX) */
1383 PINMUX_GPIO(GPIO_FN_MSIOF0_PTT_TXD, MSIOF0_PTT_TXD_MARK),
1384 PINMUX_GPIO(GPIO_FN_MSIOF0_PTT_RXD, MSIOF0_PTT_RXD_MARK),
1385 PINMUX_GPIO(GPIO_FN_MSIOF0_PTX_MCK, MSIOF0_PTX_MCK_MARK),
1386 PINMUX_GPIO(GPIO_FN_MSIOF0_PTT_TSYNC, MSIOF0_PTT_TSYNC_MARK),
1387 PINMUX_GPIO(GPIO_FN_MSIOF0_PTT_TSCK, MSIOF0_PTT_TSCK_MARK),
1388 PINMUX_GPIO(GPIO_FN_MSIOF0_PTT_RSYNC, MSIOF0_PTT_RSYNC_MARK),
1389 PINMUX_GPIO(GPIO_FN_MSIOF0_PTT_RSCK, MSIOF0_PTT_RSCK_MARK),
1390 PINMUX_GPIO(GPIO_FN_MSIOF0_PTT_SS1, MSIOF0_PTT_SS1_MARK),
1391 PINMUX_GPIO(GPIO_FN_MSIOF0_PTT_SS2, MSIOF0_PTT_SS2_MARK),
1392
1393 /* MSIOF1 */
1394 PINMUX_GPIO(GPIO_FN_MSIOF1_TXD, MSIOF1_TXD_MARK),
1395 PINMUX_GPIO(GPIO_FN_MSIOF1_RXD, MSIOF1_RXD_MARK),
1396 PINMUX_GPIO(GPIO_FN_MSIOF1_MCK, MSIOF1_MCK_MARK),
1397 PINMUX_GPIO(GPIO_FN_MSIOF1_TSYNC, MSIOF1_TSYNC_MARK),
1398 PINMUX_GPIO(GPIO_FN_MSIOF1_TSCK, MSIOF1_TSCK_MARK),
1399 PINMUX_GPIO(GPIO_FN_MSIOF1_RSYNC, MSIOF1_RSYNC_MARK),
1400 PINMUX_GPIO(GPIO_FN_MSIOF1_RSCK, MSIOF1_RSCK_MARK),
1401 PINMUX_GPIO(GPIO_FN_MSIOF1_SS1, MSIOF1_SS1_MARK),
1402 PINMUX_GPIO(GPIO_FN_MSIOF1_SS2, MSIOF1_SS2_MARK),
1403
1404 /* TSIF */
1405 PINMUX_GPIO(GPIO_FN_TS0_SDAT, TS0_SDAT_MARK),
1406 PINMUX_GPIO(GPIO_FN_TS0_SCK, TS0_SCK_MARK),
1407 PINMUX_GPIO(GPIO_FN_TS0_SDEN, TS0_SDEN_MARK),
1408 PINMUX_GPIO(GPIO_FN_TS0_SPSYNC, TS0_SPSYNC_MARK),
1409
1410 /* FLCTL */
1411 PINMUX_GPIO(GPIO_FN_FCE, FCE_MARK),
1412 PINMUX_GPIO(GPIO_FN_NAF7, NAF7_MARK),
1413 PINMUX_GPIO(GPIO_FN_NAF6, NAF6_MARK),
1414 PINMUX_GPIO(GPIO_FN_NAF5, NAF5_MARK),
1415 PINMUX_GPIO(GPIO_FN_NAF4, NAF4_MARK),
1416 PINMUX_GPIO(GPIO_FN_NAF3, NAF3_MARK),
1417 PINMUX_GPIO(GPIO_FN_NAF2, NAF2_MARK),
1418 PINMUX_GPIO(GPIO_FN_NAF1, NAF1_MARK),
1419 PINMUX_GPIO(GPIO_FN_NAF0, NAF0_MARK),
1420 PINMUX_GPIO(GPIO_FN_FCDE, FCDE_MARK),
1421 PINMUX_GPIO(GPIO_FN_FOE, FOE_MARK),
1422 PINMUX_GPIO(GPIO_FN_FSC, FSC_MARK),
1423 PINMUX_GPIO(GPIO_FN_FWE, FWE_MARK),
1424 PINMUX_GPIO(GPIO_FN_FRB, FRB_MARK),
1425
1426 /* DMAC */
1427 PINMUX_GPIO(GPIO_FN_DACK1, DACK1_MARK),
1428 PINMUX_GPIO(GPIO_FN_DREQ1, DREQ1_MARK),
1429 PINMUX_GPIO(GPIO_FN_DACK0, DACK0_MARK),
1430 PINMUX_GPIO(GPIO_FN_DREQ0, DREQ0_MARK),
1431
1432 /* ADC */
1433 PINMUX_GPIO(GPIO_FN_AN3, AN3_MARK),
1434 PINMUX_GPIO(GPIO_FN_AN2, AN2_MARK),
1435 PINMUX_GPIO(GPIO_FN_AN1, AN1_MARK),
1436 PINMUX_GPIO(GPIO_FN_AN0, AN0_MARK),
1437 PINMUX_GPIO(GPIO_FN_ADTRG, ADTRG_MARK),
1438
1439 /* CPG */
1440 PINMUX_GPIO(GPIO_FN_STATUS0, STATUS0_MARK),
1441 PINMUX_GPIO(GPIO_FN_PDSTATUS, PDSTATUS_MARK),
1442
1443 /* TPU */
1444 PINMUX_GPIO(GPIO_FN_TPUTO0, TPUTO0_MARK),
1445 PINMUX_GPIO(GPIO_FN_TPUTO1, TPUTO1_MARK),
1446 PINMUX_GPIO(GPIO_FN_TPUTO2, TPUTO2_MARK),
1447 PINMUX_GPIO(GPIO_FN_TPUTO3, TPUTO3_MARK),
1448
1449 /* BSC */
1450 PINMUX_GPIO(GPIO_FN_D31, D31_MARK),
1451 PINMUX_GPIO(GPIO_FN_D30, D30_MARK),
1452 PINMUX_GPIO(GPIO_FN_D29, D29_MARK),
1453 PINMUX_GPIO(GPIO_FN_D28, D28_MARK),
1454 PINMUX_GPIO(GPIO_FN_D27, D27_MARK),
1455 PINMUX_GPIO(GPIO_FN_D26, D26_MARK),
1456 PINMUX_GPIO(GPIO_FN_D25, D25_MARK),
1457 PINMUX_GPIO(GPIO_FN_D24, D24_MARK),
1458 PINMUX_GPIO(GPIO_FN_D23, D23_MARK),
1459 PINMUX_GPIO(GPIO_FN_D22, D22_MARK),
1460 PINMUX_GPIO(GPIO_FN_D21, D21_MARK),
1461 PINMUX_GPIO(GPIO_FN_D20, D20_MARK),
1462 PINMUX_GPIO(GPIO_FN_D19, D19_MARK),
1463 PINMUX_GPIO(GPIO_FN_D18, D18_MARK),
1464 PINMUX_GPIO(GPIO_FN_D17, D17_MARK),
1465 PINMUX_GPIO(GPIO_FN_D16, D16_MARK),
1466 PINMUX_GPIO(GPIO_FN_IOIS16, IOIS16_MARK),
1467 PINMUX_GPIO(GPIO_FN_WAIT, WAIT_MARK),
1468 PINMUX_GPIO(GPIO_FN_BS, BS_MARK),
1469 PINMUX_GPIO(GPIO_FN_A25, A25_MARK),
1470 PINMUX_GPIO(GPIO_FN_A24, A24_MARK),
1471 PINMUX_GPIO(GPIO_FN_A23, A23_MARK),
1472 PINMUX_GPIO(GPIO_FN_A22, A22_MARK),
1473 PINMUX_GPIO(GPIO_FN_CS6B_CE1B, CS6B_CE1B_MARK),
1474 PINMUX_GPIO(GPIO_FN_CS6A_CE2B, CS6A_CE2B_MARK),
1475 PINMUX_GPIO(GPIO_FN_CS5B_CE1A, CS5B_CE1A_MARK),
1476 PINMUX_GPIO(GPIO_FN_CS5A_CE2A, CS5A_CE2A_MARK),
1477 PINMUX_GPIO(GPIO_FN_WE3_ICIOWR, WE3_ICIOWR_MARK),
1478 PINMUX_GPIO(GPIO_FN_WE2_ICIORD, WE2_ICIORD_MARK),
1479
1480 /* ATAPI */
1481 PINMUX_GPIO(GPIO_FN_IDED15, IDED15_MARK),
1482 PINMUX_GPIO(GPIO_FN_IDED14, IDED14_MARK),
1483 PINMUX_GPIO(GPIO_FN_IDED13, IDED13_MARK),
1484 PINMUX_GPIO(GPIO_FN_IDED12, IDED12_MARK),
1485 PINMUX_GPIO(GPIO_FN_IDED11, IDED11_MARK),
1486 PINMUX_GPIO(GPIO_FN_IDED10, IDED10_MARK),
1487 PINMUX_GPIO(GPIO_FN_IDED9, IDED9_MARK),
1488 PINMUX_GPIO(GPIO_FN_IDED8, IDED8_MARK),
1489 PINMUX_GPIO(GPIO_FN_IDED7, IDED7_MARK),
1490 PINMUX_GPIO(GPIO_FN_IDED6, IDED6_MARK),
1491 PINMUX_GPIO(GPIO_FN_IDED5, IDED5_MARK),
1492 PINMUX_GPIO(GPIO_FN_IDED4, IDED4_MARK),
1493 PINMUX_GPIO(GPIO_FN_IDED3, IDED3_MARK),
1494 PINMUX_GPIO(GPIO_FN_IDED2, IDED2_MARK),
1495 PINMUX_GPIO(GPIO_FN_IDED1, IDED1_MARK),
1496 PINMUX_GPIO(GPIO_FN_IDED0, IDED0_MARK),
1497 PINMUX_GPIO(GPIO_FN_DIRECTION, DIRECTION_MARK),
1498 PINMUX_GPIO(GPIO_FN_EXBUF_ENB, EXBUF_ENB_MARK),
1499 PINMUX_GPIO(GPIO_FN_IDERST, IDERST_MARK),
1500 PINMUX_GPIO(GPIO_FN_IODACK, IODACK_MARK),
1501 PINMUX_GPIO(GPIO_FN_IODREQ, IODREQ_MARK),
1502 PINMUX_GPIO(GPIO_FN_IDEIORDY, IDEIORDY_MARK),
1503 PINMUX_GPIO(GPIO_FN_IDEINT, IDEINT_MARK),
1504 PINMUX_GPIO(GPIO_FN_IDEIOWR, IDEIOWR_MARK),
1505 PINMUX_GPIO(GPIO_FN_IDEIORD, IDEIORD_MARK),
1506 PINMUX_GPIO(GPIO_FN_IDECS1, IDECS1_MARK),
1507 PINMUX_GPIO(GPIO_FN_IDECS0, IDECS0_MARK),
1508 PINMUX_GPIO(GPIO_FN_IDEA2, IDEA2_MARK),
1509 PINMUX_GPIO(GPIO_FN_IDEA1, IDEA1_MARK),
1510 PINMUX_GPIO(GPIO_FN_IDEA0, IDEA0_MARK),
1511 };
1512
1513static struct pinmux_cfg_reg pinmux_config_regs[] = {
1514 { PINMUX_CFG_REG("PACR", 0xa4050100, 16, 2) {
1515 PTA7_FN, PTA7_OUT, 0, PTA7_IN,
1516 PTA6_FN, PTA6_OUT, 0, PTA6_IN,
1517 PTA5_FN, PTA5_OUT, 0, PTA5_IN,
1518 PTA4_FN, PTA4_OUT, PTA4_IN_PU, PTA4_IN,
1519 PTA3_FN, PTA3_OUT, PTA3_IN_PU, PTA3_IN,
1520 PTA2_FN, PTA2_OUT, PTA2_IN_PU, PTA2_IN,
1521 PTA1_FN, PTA1_OUT, PTA1_IN_PU, PTA1_IN,
1522 PTA0_FN, PTA0_OUT, PTA0_IN_PU, PTA0_IN }
1523 },
1524 { PINMUX_CFG_REG("PBCR", 0xa4050102, 16, 2) {
1525 PTB7_FN, PTB7_OUT, 0, PTB7_IN,
1526 PTB6_FN, PTB6_OUT, 0, PTB6_IN,
1527 PTB5_FN, PTB5_OUT, 0, PTB5_IN,
1528 PTB4_FN, PTB4_OUT, 0, PTB4_IN,
1529 PTB3_FN, PTB3_OUT, 0, PTB3_IN,
1530 PTB2_FN, PTB2_OUT, PTB2_IN_PU, PTB2_IN,
1531 PTB1_FN, PTB1_OUT, PTB1_IN_PU, PTB1_IN,
1532 PTB0_FN, PTB0_OUT, 0, PTB0_IN }
1533 },
1534 { PINMUX_CFG_REG("PCCR", 0xa4050104, 16, 2) {
1535 PTC7_FN, PTC7_OUT, 0, PTC7_IN,
1536 PTC6_FN, PTC6_OUT, 0, PTC6_IN,
1537 PTC5_FN, PTC5_OUT, 0, PTC5_IN,
1538 PTC4_FN, PTC4_OUT, 0, PTC4_IN,
1539 PTC3_FN, PTC3_OUT, 0, PTC3_IN,
1540 PTC2_FN, PTC2_OUT, 0, PTC2_IN,
1541 PTC1_FN, PTC1_OUT, 0, PTC1_IN,
1542 PTC0_FN, PTC0_OUT, 0, PTC0_IN }
1543 },
1544 { PINMUX_CFG_REG("PDCR", 0xa4050106, 16, 2) {
1545 PTD7_FN, PTD7_OUT, 0, PTD7_IN,
1546 PTD6_FN, PTD6_OUT, 0, PTD6_IN,
1547 PTD5_FN, PTD5_OUT, 0, PTD5_IN,
1548 PTD4_FN, PTD4_OUT, 0, PTD4_IN,
1549 PTD3_FN, PTD3_OUT, 0, PTD3_IN,
1550 PTD2_FN, PTD2_OUT, 0, PTD2_IN,
1551 PTD1_FN, PTD1_OUT, 0, PTD1_IN,
1552 PTD0_FN, PTD0_OUT, 0, PTD0_IN }
1553 },
1554 { PINMUX_CFG_REG("PECR", 0xa4050108, 16, 2) {
1555 0, 0, 0, 0,
1556 0, 0, 0, 0,
1557 PTE5_FN, PTE5_OUT, 0, PTE5_IN,
1558 PTE4_FN, PTE4_OUT, 0, PTE4_IN,
1559 PTE3_FN, PTE3_OUT, 0, PTE3_IN,
1560 PTE2_FN, PTE2_OUT, 0, PTE2_IN,
1561 PTE1_FN, PTE1_OUT, 0, PTE1_IN,
1562 PTE0_FN, PTE0_OUT, 0, PTE0_IN }
1563 },
1564 { PINMUX_CFG_REG("PFCR", 0xa405010a, 16, 2) {
1565 PTF7_FN, PTF7_OUT, 0, PTF7_IN,
1566 PTF6_FN, PTF6_OUT, 0, PTF6_IN,
1567 PTF5_FN, PTF5_OUT, 0, PTF5_IN,
1568 PTF4_FN, PTF4_OUT, 0, PTF4_IN,
1569 PTF3_FN, PTF3_OUT, 0, PTF3_IN,
1570 PTF2_FN, PTF2_OUT, 0, PTF2_IN,
1571 PTF1_FN, PTF1_OUT, 0, PTF1_IN,
1572 PTF0_FN, PTF0_OUT, 0, PTF0_IN }
1573 },
1574 { PINMUX_CFG_REG("PGCR", 0xa405010c, 16, 2) {
1575 0, 0, 0, 0,
1576 0, 0, 0, 0,
1577 PTG5_FN, PTG5_OUT, 0, 0,
1578 PTG4_FN, PTG4_OUT, 0, 0,
1579 PTG3_FN, PTG3_OUT, 0, 0,
1580 PTG2_FN, PTG2_OUT, 0, 0,
1581 PTG1_FN, PTG1_OUT, 0, 0,
1582 PTG0_FN, PTG0_OUT, 0, 0 }
1583 },
1584 { PINMUX_CFG_REG("PHCR", 0xa405010e, 16, 2) {
1585 PTH7_FN, PTH7_OUT, 0, PTH7_IN,
1586 PTH6_FN, PTH6_OUT, 0, PTH6_IN,
1587 PTH5_FN, PTH5_OUT, 0, PTH5_IN,
1588 PTH4_FN, PTH4_OUT, 0, PTH4_IN,
1589 PTH3_FN, PTH3_OUT, 0, PTH3_IN,
1590 PTH2_FN, PTH2_OUT, 0, PTH2_IN,
1591 PTH1_FN, PTH1_OUT, 0, PTH1_IN,
1592 PTH0_FN, PTH0_OUT, 0, PTH0_IN }
1593 },
1594 { PINMUX_CFG_REG("PJCR", 0xa4050110, 16, 2) {
1595 PTJ7_FN, PTJ7_OUT, 0, 0,
1596 0, 0, 0, 0,
1597 PTJ5_FN, PTJ5_OUT, 0, 0,
1598 0, 0, 0, 0,
1599 PTJ3_FN, PTJ3_OUT, 0, PTJ3_IN,
1600 PTJ2_FN, PTJ2_OUT, 0, PTJ2_IN,
1601 PTJ1_FN, PTJ1_OUT, 0, PTJ1_IN,
1602 PTJ0_FN, PTJ0_OUT, 0, PTJ0_IN }
1603 },
1604 { PINMUX_CFG_REG("PKCR", 0xa4050112, 16, 2) {
1605 PTK7_FN, PTK7_OUT, 0, PTK7_IN,
1606 PTK6_FN, PTK6_OUT, 0, PTK6_IN,
1607 PTK5_FN, PTK5_OUT, 0, PTK5_IN,
1608 PTK4_FN, PTK4_OUT, 0, PTK4_IN,
1609 PTK3_FN, PTK3_OUT, 0, PTK3_IN,
1610 PTK2_FN, PTK2_OUT, 0, PTK2_IN,
1611 PTK1_FN, PTK1_OUT, 0, PTK1_IN,
1612 PTK0_FN, PTK0_OUT, 0, PTK0_IN }
1613 },
1614 { PINMUX_CFG_REG("PLCR", 0xa4050114, 16, 2) {
1615 PTL7_FN, PTL7_OUT, 0, PTL7_IN,
1616 PTL6_FN, PTL6_OUT, 0, PTL6_IN,
1617 PTL5_FN, PTL5_OUT, 0, PTL5_IN,
1618 PTL4_FN, PTL4_OUT, 0, PTL4_IN,
1619 PTL3_FN, PTL3_OUT, 0, PTL3_IN,
1620 PTL2_FN, PTL2_OUT, 0, PTL2_IN,
1621 PTL1_FN, PTL1_OUT, 0, PTL1_IN,
1622 PTL0_FN, PTL0_OUT, 0, PTL0_IN }
1623 },
1624 { PINMUX_CFG_REG("PMCR", 0xa4050116, 16, 2) {
1625 PTM7_FN, PTM7_OUT, 0, PTM7_IN,
1626 PTM6_FN, PTM6_OUT, 0, PTM6_IN,
1627 PTM5_FN, PTM5_OUT, 0, PTM5_IN,
1628 PTM4_FN, PTM4_OUT, 0, PTM4_IN,
1629 PTM3_FN, PTM3_OUT, 0, PTM3_IN,
1630 PTM2_FN, PTM2_OUT, 0, PTM2_IN,
1631 PTM1_FN, PTM1_OUT, 0, PTM1_IN,
1632 PTM0_FN, PTM0_OUT, 0, PTM0_IN }
1633 },
1634 { PINMUX_CFG_REG("PNCR", 0xa4050118, 16, 2) {
1635 PTN7_FN, PTN7_OUT, 0, PTN7_IN,
1636 PTN6_FN, PTN6_OUT, 0, PTN6_IN,
1637 PTN5_FN, PTN5_OUT, 0, PTN5_IN,
1638 PTN4_FN, PTN4_OUT, 0, PTN4_IN,
1639 PTN3_FN, PTN3_OUT, 0, PTN3_IN,
1640 PTN2_FN, PTN2_OUT, 0, PTN2_IN,
1641 PTN1_FN, PTN1_OUT, 0, PTN1_IN,
1642 PTN0_FN, PTN0_OUT, 0, PTN0_IN }
1643 },
1644 { PINMUX_CFG_REG("PQCR", 0xa405011a, 16, 2) {
1645 0, 0, 0, 0,
1646 0, 0, 0, 0,
1647 0, 0, 0, 0,
1648 0, 0, 0, 0,
1649 PTQ3_FN, 0, 0, PTQ3_IN,
1650 PTQ2_FN, 0, 0, PTQ2_IN,
1651 PTQ1_FN, 0, 0, PTQ1_IN,
1652 PTQ0_FN, 0, 0, PTQ0_IN }
1653 },
1654 { PINMUX_CFG_REG("PRCR", 0xa405011c, 16, 2) {
1655 PTR7_FN, PTR7_OUT, 0, PTR7_IN,
1656 PTR6_FN, PTR6_OUT, 0, PTR6_IN,
1657 PTR5_FN, PTR5_OUT, 0, PTR5_IN,
1658 PTR4_FN, PTR4_OUT, 0, PTR4_IN,
1659 PTR3_FN, 0, 0, PTR3_IN,
1660 PTR2_FN, 0, PTR2_IN_PU, PTR2_IN,
1661 PTR1_FN, PTR1_OUT, 0, PTR1_IN,
1662 PTR0_FN, PTR0_OUT, 0, PTR0_IN }
1663 },
1664 { PINMUX_CFG_REG("PSCR", 0xa405011e, 16, 2) {
1665 PTS7_FN, PTS7_OUT, 0, PTS7_IN,
1666 PTS6_FN, PTS6_OUT, 0, PTS6_IN,
1667 PTS5_FN, PTS5_OUT, 0, PTS5_IN,
1668 PTS4_FN, PTS4_OUT, 0, PTS4_IN,
1669 PTS3_FN, PTS3_OUT, 0, PTS3_IN,
1670 PTS2_FN, PTS2_OUT, 0, PTS2_IN,
1671 PTS1_FN, PTS1_OUT, 0, PTS1_IN,
1672 PTS0_FN, PTS0_OUT, 0, PTS0_IN }
1673 },
1674 { PINMUX_CFG_REG("PTCR", 0xa4050140, 16, 2) {
1675 0, 0, 0, 0,
1676 0, 0, 0, 0,
1677 PTT5_FN, PTT5_OUT, 0, PTT5_IN,
1678 PTT4_FN, PTT4_OUT, 0, PTT4_IN,
1679 PTT3_FN, PTT3_OUT, 0, PTT3_IN,
1680 PTT2_FN, PTT2_OUT, 0, PTT2_IN,
1681 PTT1_FN, PTT1_OUT, 0, PTT1_IN,
1682 PTT0_FN, PTT0_OUT, 0, PTT0_IN }
1683 },
1684 { PINMUX_CFG_REG("PUCR", 0xa4050142, 16, 2) {
1685 0, 0, 0, 0,
1686 0, 0, 0, 0,
1687 PTU5_FN, PTU5_OUT, 0, PTU5_IN,
1688 PTU4_FN, PTU4_OUT, 0, PTU4_IN,
1689 PTU3_FN, PTU3_OUT, 0, PTU3_IN,
1690 PTU2_FN, PTU2_OUT, 0, PTU2_IN,
1691 PTU1_FN, PTU1_OUT, 0, PTU1_IN,
1692 PTU0_FN, PTU0_OUT, 0, PTU0_IN }
1693 },
1694 { PINMUX_CFG_REG("PVCR", 0xa4050144, 16, 2) {
1695 PTV7_FN, PTV7_OUT, 0, PTV7_IN,
1696 PTV6_FN, PTV6_OUT, 0, PTV6_IN,
1697 PTV5_FN, PTV5_OUT, 0, PTV5_IN,
1698 PTV4_FN, PTV4_OUT, 0, PTV4_IN,
1699 PTV3_FN, PTV3_OUT, 0, PTV3_IN,
1700 PTV2_FN, PTV2_OUT, 0, PTV2_IN,
1701 PTV1_FN, PTV1_OUT, 0, PTV1_IN,
1702 PTV0_FN, PTV0_OUT, 0, PTV0_IN }
1703 },
1704 { PINMUX_CFG_REG("PWCR", 0xa4050146, 16, 2) {
1705 PTW7_FN, PTW7_OUT, 0, PTW7_IN,
1706 PTW6_FN, PTW6_OUT, 0, PTW6_IN,
1707 PTW5_FN, PTW5_OUT, 0, PTW5_IN,
1708 PTW4_FN, PTW4_OUT, 0, PTW4_IN,
1709 PTW3_FN, PTW3_OUT, 0, PTW3_IN,
1710 PTW2_FN, PTW2_OUT, 0, PTW2_IN,
1711 PTW1_FN, PTW1_OUT, 0, PTW1_IN,
1712 PTW0_FN, PTW0_OUT, 0, PTW0_IN }
1713 },
1714 { PINMUX_CFG_REG("PXCR", 0xa4050148, 16, 2) {
1715 PTX7_FN, PTX7_OUT, 0, PTX7_IN,
1716 PTX6_FN, PTX6_OUT, 0, PTX6_IN,
1717 PTX5_FN, PTX5_OUT, 0, PTX5_IN,
1718 PTX4_FN, PTX4_OUT, 0, PTX4_IN,
1719 PTX3_FN, PTX3_OUT, 0, PTX3_IN,
1720 PTX2_FN, PTX2_OUT, 0, PTX2_IN,
1721 PTX1_FN, PTX1_OUT, 0, PTX1_IN,
1722 PTX0_FN, PTX0_OUT, 0, PTX0_IN }
1723 },
1724 { PINMUX_CFG_REG("PYCR", 0xa405014a, 16, 2) {
1725 PTY7_FN, PTY7_OUT, 0, PTY7_IN,
1726 PTY6_FN, PTY6_OUT, 0, PTY6_IN,
1727 PTY5_FN, PTY5_OUT, 0, PTY5_IN,
1728 PTY4_FN, PTY4_OUT, 0, PTY4_IN,
1729 PTY3_FN, PTY3_OUT, 0, PTY3_IN,
1730 PTY2_FN, PTY2_OUT, 0, PTY2_IN,
1731 PTY1_FN, PTY1_OUT, 0, PTY1_IN,
1732 PTY0_FN, PTY0_OUT, 0, PTY0_IN }
1733 },
1734 { PINMUX_CFG_REG("PZCR", 0xa405014c, 16, 2) {
1735 PTZ7_FN, PTZ7_OUT, 0, PTZ7_IN,
1736 PTZ6_FN, PTZ6_OUT, 0, PTZ6_IN,
1737 PTZ5_FN, PTZ5_OUT, 0, PTZ5_IN,
1738 PTZ4_FN, PTZ4_OUT, 0, PTZ4_IN,
1739 PTZ3_FN, PTZ3_OUT, 0, PTZ3_IN,
1740 PTZ2_FN, PTZ2_OUT, 0, PTZ2_IN,
1741 PTZ1_FN, PTZ1_OUT, 0, PTZ1_IN,
1742 PTZ0_FN, PTZ0_OUT, 0, PTZ0_IN }
1743 },
1744 { PINMUX_CFG_REG("PSELA", 0xa405014e, 16, 2) {
1745 PSA15_PSA14_FN1, PSA15_PSA14_FN2, 0, 0,
1746 PSA13_PSA12_FN1, PSA13_PSA12_FN2, 0, 0,
1747 PSA11_PSA10_FN1, PSA11_PSA10_FN2, 0, 0,
1748 0, 0, 0, 0,
1749 0, 0, 0, 0,
1750 PSA5_PSA4_FN1, PSA5_PSA4_FN2, PSA5_PSA4_FN3, 0,
1751 PSA3_PSA2_FN1, PSA3_PSA2_FN2, 0, 0,
1752 0, 0, 0, 0 }
1753 },
1754 { PINMUX_CFG_REG("PSELB", 0xa4050150, 16, 2) {
1755 PSB15_PSB14_FN1, PSB15_PSB14_FN2, 0, 0,
1756 PSB13_PSB12_LCDC_RGB, PSB13_PSB12_LCDC_SYS, 0, 0,
1757 0, 0, 0, 0,
1758 PSB9_PSB8_FN1, PSB9_PSB8_FN2, PSB9_PSB8_FN3, 0,
1759 PSB7_PSB6_FN1, PSB7_PSB6_FN2, 0, 0,
1760 PSB5_PSB4_FN1, PSB5_PSB4_FN2, 0, 0,
1761 PSB3_PSB2_FN1, PSB3_PSB2_FN2, 0, 0,
1762 0, 0, 0, 0 }
1763 },
1764 { PINMUX_CFG_REG("PSELC", 0xa4050152, 16, 2) {
1765 PSC15_PSC14_FN1, PSC15_PSC14_FN2, 0, 0,
1766 PSC13_PSC12_FN1, PSC13_PSC12_FN2, 0, 0,
1767 PSC11_PSC10_FN1, PSC11_PSC10_FN2, PSC11_PSC10_FN3, 0,
1768 PSC9_PSC8_FN1, PSC9_PSC8_FN2, 0, 0,
1769 PSC7_PSC6_FN1, PSC7_PSC6_FN2, PSC7_PSC6_FN3, 0,
1770 0, 0, 0, 0,
1771 0, 0, 0, 0,
1772 0, 0, 0, 0 }
1773 },
1774 { PINMUX_CFG_REG("PSELD", 0xa4050154, 16, 2) {
1775 PSD15_PSD14_FN1, PSD15_PSD14_FN2, 0, 0,
1776 PSD13_PSD12_FN1, PSD13_PSD12_FN2, 0, 0,
1777 PSD11_PSD10_FN1, PSD11_PSD10_FN2, PSD11_PSD10_FN3, 0,
1778 PSD9_PSD8_FN1, PSD9_PSD8_FN2, 0, 0,
1779 PSD7_PSD6_FN1, PSD7_PSD6_FN2, 0, 0,
1780 PSD5_PSD4_FN1, PSD5_PSD4_FN2, 0, 0,
1781 PSD3_PSD2_FN1, PSD3_PSD2_FN2, 0, 0,
1782 PSD1_PSD0_FN1, PSD1_PSD0_FN2, 0, 0 }
1783 },
1784 {}
1785};
1786
1787static struct pinmux_data_reg pinmux_data_regs[] = {
1788 { PINMUX_DATA_REG("PADR", 0xa4050120, 8) {
1789 PTA7_DATA, PTA6_DATA, PTA5_DATA, PTA4_DATA,
1790 PTA3_DATA, PTA2_DATA, PTA1_DATA, PTA0_DATA }
1791 },
1792 { PINMUX_DATA_REG("PBDR", 0xa4050122, 8) {
1793 PTB7_DATA, PTB6_DATA, PTB5_DATA, PTB4_DATA,
1794 PTB3_DATA, PTB2_DATA, PTB1_DATA, PTB0_DATA }
1795 },
1796 { PINMUX_DATA_REG("PCDR", 0xa4050124, 8) {
1797 PTC7_DATA, PTC6_DATA, PTC5_DATA, PTC4_DATA,
1798 PTC3_DATA, PTC2_DATA, PTC1_DATA, PTC0_DATA }
1799 },
1800 { PINMUX_DATA_REG("PDDR", 0xa4050126, 8) {
1801 PTD7_DATA, PTD6_DATA, PTD5_DATA, PTD4_DATA,
1802 PTD3_DATA, PTD2_DATA, PTD1_DATA, PTD0_DATA }
1803 },
1804 { PINMUX_DATA_REG("PEDR", 0xa4050128, 8) {
1805 0, 0, PTE5_DATA, PTE4_DATA,
1806 PTE3_DATA, PTE2_DATA, PTE1_DATA, PTE0_DATA }
1807 },
1808 { PINMUX_DATA_REG("PFDR", 0xa405012a, 8) {
1809 PTF7_DATA, PTF6_DATA, PTF5_DATA, PTF4_DATA,
1810 PTF3_DATA, PTF2_DATA, PTF1_DATA, PTF0_DATA }
1811 },
1812 { PINMUX_DATA_REG("PGDR", 0xa405012c, 8) {
1813 0, 0, PTG5_DATA, PTG4_DATA,
1814 PTG3_DATA, PTG2_DATA, PTG1_DATA, PTG0_DATA }
1815 },
1816 { PINMUX_DATA_REG("PHDR", 0xa405012e, 8) {
1817 PTH7_DATA, PTH6_DATA, PTH5_DATA, PTH4_DATA,
1818 PTH3_DATA, PTH2_DATA, PTH1_DATA, PTH0_DATA }
1819 },
1820 { PINMUX_DATA_REG("PJDR", 0xa4050130, 8) {
1821 PTJ7_DATA, 0, PTJ5_DATA, 0,
1822 PTJ3_DATA, PTJ2_DATA, PTJ1_DATA, PTJ0_DATA }
1823 },
1824 { PINMUX_DATA_REG("PKDR", 0xa4050132, 8) {
1825 PTK7_DATA, PTK6_DATA, PTK5_DATA, PTK4_DATA,
1826 PTK3_DATA, PTK2_DATA, PTK1_DATA, PTK0_DATA }
1827 },
1828 { PINMUX_DATA_REG("PLDR", 0xa4050134, 8) {
1829 PTL7_DATA, PTL6_DATA, PTL5_DATA, PTL4_DATA,
1830 PTL3_DATA, PTL2_DATA, PTL1_DATA, PTL0_DATA }
1831 },
1832 { PINMUX_DATA_REG("PMDR", 0xa4050136, 8) {
1833 PTM7_DATA, PTM6_DATA, PTM5_DATA, PTM4_DATA,
1834 PTM3_DATA, PTM2_DATA, PTM1_DATA, PTM0_DATA }
1835 },
1836 { PINMUX_DATA_REG("PNDR", 0xa4050138, 8) {
1837 PTN7_DATA, PTN6_DATA, PTN5_DATA, PTN4_DATA,
1838 PTN3_DATA, PTN2_DATA, PTN1_DATA, PTN0_DATA }
1839 },
1840 { PINMUX_DATA_REG("PQDR", 0xa405013a, 8) {
1841 0, 0, 0, 0,
1842 PTQ3_DATA, PTQ2_DATA, PTQ1_DATA, PTQ0_DATA }
1843 },
1844 { PINMUX_DATA_REG("PRDR", 0xa405013c, 8) {
1845 PTR7_DATA, PTR6_DATA, PTR5_DATA, PTR4_DATA,
1846 PTR3_DATA, PTR2_DATA, PTR1_DATA, PTR0_DATA }
1847 },
1848 { PINMUX_DATA_REG("PSDR", 0xa405013e, 8) {
1849 PTS7_DATA, PTS6_DATA, PTS5_DATA, PTS4_DATA,
1850 PTS3_DATA, PTS2_DATA, PTS1_DATA, PTS0_DATA }
1851 },
1852 { PINMUX_DATA_REG("PTDR", 0xa4050160, 8) {
1853 0, 0, PTT5_DATA, PTT4_DATA,
1854 PTT3_DATA, PTT2_DATA, PTT1_DATA, PTT0_DATA }
1855 },
1856 { PINMUX_DATA_REG("PUDR", 0xa4050162, 8) {
1857 0, 0, PTU5_DATA, PTU4_DATA,
1858 PTU3_DATA, PTU2_DATA, PTU1_DATA, PTU0_DATA }
1859 },
1860 { PINMUX_DATA_REG("PVDR", 0xa4050164, 8) {
1861 PTV7_DATA, PTV6_DATA, PTV5_DATA, PTV4_DATA,
1862 PTV3_DATA, PTV2_DATA, PTV1_DATA, PTV0_DATA }
1863 },
1864 { PINMUX_DATA_REG("PWDR", 0xa4050166, 8) {
1865 PTW7_DATA, PTW6_DATA, PTW5_DATA, PTW4_DATA,
1866 PTW3_DATA, PTW2_DATA, PTW1_DATA, PTW0_DATA }
1867 },
1868 { PINMUX_DATA_REG("PXDR", 0xa4050168, 8) {
1869 PTX7_DATA, PTX6_DATA, PTX5_DATA, PTX4_DATA,
1870 PTX3_DATA, PTX2_DATA, PTX1_DATA, PTX0_DATA }
1871 },
1872 { PINMUX_DATA_REG("PYDR", 0xa405016a, 8) {
1873 PTY7_DATA, PTY6_DATA, PTY5_DATA, PTY4_DATA,
1874 PTY3_DATA, PTY2_DATA, PTY1_DATA, PTY0_DATA }
1875 },
1876 { PINMUX_DATA_REG("PZDR", 0xa405016c, 8) {
1877 PTZ7_DATA, PTZ6_DATA, PTZ5_DATA, PTZ4_DATA,
1878 PTZ3_DATA, PTZ2_DATA, PTZ1_DATA, PTZ0_DATA }
1879 },
1880 { },
1881};
1882
1883static struct pinmux_info sh7723_pinmux_info = {
1884 .name = "sh7723_pfc",
1885 .reserved_id = PINMUX_RESERVED,
1886 .data = { PINMUX_DATA_BEGIN, PINMUX_DATA_END },
1887 .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END },
1888 .input_pu = { PINMUX_INPUT_PULLUP_BEGIN, PINMUX_INPUT_PULLUP_END },
1889 .output = { PINMUX_OUTPUT_BEGIN, PINMUX_OUTPUT_END },
1890 .mark = { PINMUX_MARK_BEGIN, PINMUX_MARK_END },
1891 .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
1892
1893 .first_gpio = GPIO_PTA7,
1894 .last_gpio = GPIO_FN_IDEA0,
1895
1896 .gpios = pinmux_gpios,
1897 .cfg_regs = pinmux_config_regs,
1898 .data_regs = pinmux_data_regs,
1899
1900 .gpio_data = pinmux_data,
1901 .gpio_data_size = ARRAY_SIZE(pinmux_data),
1902};
1903
1904static int __init plat_pinmux_setup(void)
1905{
1906 return register_pinmux(&sh7723_pinmux_info);
1907}
1908
1909arch_initcall(plat_pinmux_setup);
diff --git a/arch/sh/kernel/cpu/sh4a/smp-shx3.c b/arch/sh/kernel/cpu/sh4a/smp-shx3.c
index e5e06845fa4..b8869aa20de 100644
--- a/arch/sh/kernel/cpu/sh4a/smp-shx3.c
+++ b/arch/sh/kernel/cpu/sh4a/smp-shx3.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * SH-X3 SMP 2 * SH-X3 SMP
3 * 3 *
4 * Copyright (C) 2007 Paul Mundt 4 * Copyright (C) 2007 - 2008 Paul Mundt
5 * Copyright (C) 2007 Magnus Damm 5 * Copyright (C) 2007 Magnus Damm
6 * 6 *
7 * This file is subject to the terms and conditions of the GNU General Public 7 * This file is subject to the terms and conditions of the GNU General Public
@@ -14,6 +14,22 @@
14#include <linux/interrupt.h> 14#include <linux/interrupt.h>
15#include <linux/io.h> 15#include <linux/io.h>
16 16
17static irqreturn_t ipi_interrupt_handler(int irq, void *arg)
18{
19 unsigned int message = (unsigned int)(long)arg;
20 unsigned int cpu = hard_smp_processor_id();
21 unsigned int offs = 4 * cpu;
22 unsigned int x;
23
24 x = ctrl_inl(0xfe410070 + offs); /* C0INITICI..CnINTICI */
25 x &= (1 << (message << 2));
26 ctrl_outl(x, 0xfe410080 + offs); /* C0INTICICLR..CnINTICICLR */
27
28 smp_message_recv(message);
29
30 return IRQ_HANDLED;
31}
32
17void __init plat_smp_setup(void) 33void __init plat_smp_setup(void)
18{ 34{
19 unsigned int cpu = 0; 35 unsigned int cpu = 0;
@@ -40,6 +56,13 @@ void __init plat_smp_setup(void)
40 56
41void __init plat_prepare_cpus(unsigned int max_cpus) 57void __init plat_prepare_cpus(unsigned int max_cpus)
42{ 58{
59 int i;
60
61 BUILD_BUG_ON(SMP_MSG_NR >= 8);
62
63 for (i = 0; i < SMP_MSG_NR; i++)
64 request_irq(104 + i, ipi_interrupt_handler, IRQF_DISABLED,
65 "IPI", (void *)(long)i);
43} 66}
44 67
45#define STBCR_REG(phys_id) (0xfe400004 | (phys_id << 12)) 68#define STBCR_REG(phys_id) (0xfe400004 | (phys_id << 12))
@@ -59,7 +82,7 @@ void plat_start_cpu(unsigned int cpu, unsigned long entry_point)
59 ctrl_outl(STBCR_MSTP, STBCR_REG(cpu)); 82 ctrl_outl(STBCR_MSTP, STBCR_REG(cpu));
60 83
61 while (!(ctrl_inl(STBCR_REG(cpu)) & STBCR_MSTP)) 84 while (!(ctrl_inl(STBCR_REG(cpu)) & STBCR_MSTP))
62 ; 85 cpu_relax();
63 86
64 /* Start up secondary processor by sending a reset */ 87 /* Start up secondary processor by sending a reset */
65 ctrl_outl(STBCR_AP_VAL, STBCR_REG(cpu)); 88 ctrl_outl(STBCR_AP_VAL, STBCR_REG(cpu));
@@ -75,46 +98,6 @@ void plat_send_ipi(unsigned int cpu, unsigned int message)
75 unsigned long addr = 0xfe410070 + (cpu * 4); 98 unsigned long addr = 0xfe410070 + (cpu * 4);
76 99
77 BUG_ON(cpu >= 4); 100 BUG_ON(cpu >= 4);
78 BUG_ON(message >= SMP_MSG_NR);
79 101
80 ctrl_outl(1 << (message << 2), addr); /* C0INTICI..CnINTICI */ 102 ctrl_outl(1 << (message << 2), addr); /* C0INTICI..CnINTICI */
81} 103}
82
83struct ipi_data {
84 void (*handler)(void *);
85 void *arg;
86 unsigned int message;
87};
88
89static irqreturn_t ipi_interrupt_handler(int irq, void *arg)
90{
91 struct ipi_data *id = arg;
92 unsigned int cpu = hard_smp_processor_id();
93 unsigned int offs = 4 * cpu;
94 unsigned int x;
95
96 x = ctrl_inl(0xfe410070 + offs); /* C0INITICI..CnINTICI */
97 x &= (1 << (id->message << 2));
98 ctrl_outl(x, 0xfe410080 + offs); /* C0INTICICLR..CnINTICICLR */
99
100 id->handler(id->arg);
101
102 return IRQ_HANDLED;
103}
104
105static struct ipi_data ipi_handlers[SMP_MSG_NR];
106
107int plat_register_ipi_handler(unsigned int message,
108 void (*handler)(void *), void *arg)
109{
110 struct ipi_data *id = &ipi_handlers[message];
111
112 BUG_ON(SMP_MSG_NR >= 8);
113 BUG_ON(message >= SMP_MSG_NR);
114
115 id->handler = handler;
116 id->arg = arg;
117 id->message = message;
118
119 return request_irq(104 + message, ipi_interrupt_handler, 0, "IPI", id);
120}
diff --git a/arch/sh/kernel/cpu/sh5/Makefile b/arch/sh/kernel/cpu/sh5/Makefile
index 8646363e9de..ce4602ea23a 100644
--- a/arch/sh/kernel/cpu/sh5/Makefile
+++ b/arch/sh/kernel/cpu/sh5/Makefile
@@ -5,3 +5,8 @@ obj-y := entry.o probe.o switchto.o
5 5
6obj-$(CONFIG_SH_FPU) += fpu.o 6obj-$(CONFIG_SH_FPU) += fpu.o
7obj-$(CONFIG_KALLSYMS) += unwind.o 7obj-$(CONFIG_KALLSYMS) += unwind.o
8
9# Primary on-chip clocks (common)
10clock-$(CONFIG_CPU_SH5) := clock-sh5.o
11
12obj-y += $(clock-y)
diff --git a/arch/sh/kernel/cpu/sh5/clock-sh5.c b/arch/sh/kernel/cpu/sh5/clock-sh5.c
new file mode 100644
index 00000000000..52c49248833
--- /dev/null
+++ b/arch/sh/kernel/cpu/sh5/clock-sh5.c
@@ -0,0 +1,79 @@
1/*
2 * arch/sh/kernel/cpu/sh5/clock-sh5.c
3 *
4 * SH-5 support for the clock framework
5 *
6 * Copyright (C) 2008 Paul Mundt
7 *
8 * This file is subject to the terms and conditions of the GNU General Public
9 * License. See the file "COPYING" in the main directory of this archive
10 * for more details.
11 */
12#include <linux/init.h>
13#include <linux/kernel.h>
14#include <asm/clock.h>
15#include <asm/io.h>
16
17static int ifc_table[] = { 2, 4, 6, 8, 10, 12, 16, 24 };
18
19/* Clock, Power and Reset Controller */
20#define CPRC_BLOCK_OFF 0x01010000
21#define CPRC_BASE (PHYS_PERIPHERAL_BLOCK + CPRC_BLOCK_OFF)
22
23static unsigned long cprc_base;
24
25static void master_clk_init(struct clk *clk)
26{
27 int idx = (ctrl_inl(cprc_base + 0x00) >> 6) & 0x0007;
28 clk->rate *= ifc_table[idx];
29}
30
31static struct clk_ops sh5_master_clk_ops = {
32 .init = master_clk_init,
33};
34
35static void module_clk_recalc(struct clk *clk)
36{
37 int idx = (ctrl_inw(cprc_base) >> 12) & 0x0007;
38 clk->rate = clk->parent->rate / ifc_table[idx];
39}
40
41static struct clk_ops sh5_module_clk_ops = {
42 .recalc = module_clk_recalc,
43};
44
45static void bus_clk_recalc(struct clk *clk)
46{
47 int idx = (ctrl_inw(cprc_base) >> 3) & 0x0007;
48 clk->rate = clk->parent->rate / ifc_table[idx];
49}
50
51static struct clk_ops sh5_bus_clk_ops = {
52 .recalc = bus_clk_recalc,
53};
54
55static void cpu_clk_recalc(struct clk *clk)
56{
57 int idx = (ctrl_inw(cprc_base) & 0x0007);
58 clk->rate = clk->parent->rate / ifc_table[idx];
59}
60
61static struct clk_ops sh5_cpu_clk_ops = {
62 .recalc = cpu_clk_recalc,
63};
64
65static struct clk_ops *sh5_clk_ops[] = {
66 &sh5_master_clk_ops,
67 &sh5_module_clk_ops,
68 &sh5_bus_clk_ops,
69 &sh5_cpu_clk_ops,
70};
71
72void __init arch_init_clk_ops(struct clk_ops **ops, int idx)
73{
74 cprc_base = onchip_remap(CPRC_BASE, 1024, "CPRC");
75 BUG_ON(!cprc_base);
76
77 if (idx < ARRAY_SIZE(sh5_clk_ops))
78 *ops = sh5_clk_ops[idx];
79}
diff --git a/arch/sh/kernel/dump_task.c b/arch/sh/kernel/dump_task.c
deleted file mode 100644
index 1db7ce0f25d..00000000000
--- a/arch/sh/kernel/dump_task.c
+++ /dev/null
@@ -1,32 +0,0 @@
1#include <linux/elfcore.h>
2#include <linux/sched.h>
3#include <asm/fpu.h>
4
5/*
6 * Capture the user space registers if the task is not running (in user space)
7 */
8int dump_task_regs(struct task_struct *tsk, elf_gregset_t *regs)
9{
10 struct pt_regs ptregs;
11
12 ptregs = *task_pt_regs(tsk);
13 elf_core_copy_regs(regs, &ptregs);
14
15 return 1;
16}
17
18int dump_task_fpu(struct task_struct *tsk, elf_fpregset_t *fpu)
19{
20 int fpvalid = 0;
21
22#if defined(CONFIG_SH_FPU)
23 fpvalid = !!tsk_used_math(tsk);
24 if (fpvalid) {
25 unlazy_fpu(tsk, task_pt_regs(tsk));
26 memcpy(fpu, &tsk->thread.fpu.hard, sizeof(*fpu));
27 }
28#endif
29
30 return fpvalid;
31}
32
diff --git a/arch/sh/kernel/entry-common.S b/arch/sh/kernel/entry-common.S
index efbb4268875..1a5cf9dd82d 100644
--- a/arch/sh/kernel/entry-common.S
+++ b/arch/sh/kernel/entry-common.S
@@ -371,3 +371,47 @@ syscall_exit:
371#endif 371#endif
3727: .long do_syscall_trace_enter 3727: .long do_syscall_trace_enter
3738: .long do_syscall_trace_leave 3738: .long do_syscall_trace_leave
374
375#ifdef CONFIG_FTRACE
376 .align 2
377 .globl _mcount
378 .type _mcount,@function
379 .globl mcount
380 .type mcount,@function
381_mcount:
382mcount:
383 mov.l r4, @-r15
384 mov.l r5, @-r15
385 mov.l r6, @-r15
386 mov.l r7, @-r15
387 sts.l pr, @-r15
388
389 mov.l @(20,r15),r4
390 sts pr, r5
391
392 mov.l 1f, r6
393 mov.l ftrace_stub, r7
394 cmp/eq r6, r7
395 bt skip_trace
396
397 mov.l @r6, r6
398 jsr @r6
399 nop
400
401skip_trace:
402
403 lds.l @r15+, pr
404 mov.l @r15+, r7
405 mov.l @r15+, r6
406 mov.l @r15+, r5
407 rts
408 mov.l @r15+, r4
409
410 .align 2
4111: .long ftrace_trace_function
412
413 .globl ftrace_stub
414ftrace_stub:
415 rts
416 nop
417#endif /* CONFIG_FTRACE */
diff --git a/arch/sh/kernel/gpio.c b/arch/sh/kernel/gpio.c
new file mode 100644
index 00000000000..bb8b812c689
--- /dev/null
+++ b/arch/sh/kernel/gpio.c
@@ -0,0 +1,498 @@
1/*
2 * Pinmuxed GPIO support for SuperH.
3 *
4 * Copyright (C) 2008 Magnus Damm
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 */
10
11#include <linux/errno.h>
12#include <linux/kernel.h>
13#include <linux/list.h>
14#include <linux/module.h>
15#include <linux/clk.h>
16#include <linux/err.h>
17#include <linux/io.h>
18#include <linux/irq.h>
19#include <linux/bitops.h>
20#include <linux/gpio.h>
21
22static struct pinmux_info *registered_gpio;
23
24static struct pinmux_info *gpio_controller(unsigned gpio)
25{
26 if (!registered_gpio)
27 return NULL;
28
29 if (gpio < registered_gpio->first_gpio)
30 return NULL;
31
32 if (gpio > registered_gpio->last_gpio)
33 return NULL;
34
35 return registered_gpio;
36}
37
38static int enum_in_range(pinmux_enum_t enum_id, struct pinmux_range *r)
39{
40 if (enum_id < r->begin)
41 return 0;
42
43 if (enum_id > r->end)
44 return 0;
45
46 return 1;
47}
48
49static int read_write_reg(unsigned long reg, unsigned long reg_width,
50 unsigned long field_width, unsigned long in_pos,
51 unsigned long value, int do_write)
52{
53 unsigned long data, mask, pos;
54
55 data = 0;
56 mask = (1 << field_width) - 1;
57 pos = reg_width - ((in_pos + 1) * field_width);
58
59#ifdef DEBUG
60 pr_info("%s, addr = %lx, value = %ld, pos = %ld, "
61 "r_width = %ld, f_width = %ld\n",
62 do_write ? "write" : "read", reg, value, pos,
63 reg_width, field_width);
64#endif
65
66 switch (reg_width) {
67 case 8:
68 data = ctrl_inb(reg);
69 break;
70 case 16:
71 data = ctrl_inw(reg);
72 break;
73 case 32:
74 data = ctrl_inl(reg);
75 break;
76 }
77
78 if (!do_write)
79 return (data >> pos) & mask;
80
81 data &= ~(mask << pos);
82 data |= value << pos;
83
84 switch (reg_width) {
85 case 8:
86 ctrl_outb(data, reg);
87 break;
88 case 16:
89 ctrl_outw(data, reg);
90 break;
91 case 32:
92 ctrl_outl(data, reg);
93 break;
94 }
95 return 0;
96}
97
98static int get_data_reg(struct pinmux_info *gpioc, unsigned gpio,
99 struct pinmux_data_reg **drp, int *bitp)
100{
101 pinmux_enum_t enum_id = gpioc->gpios[gpio].enum_id;
102 struct pinmux_data_reg *data_reg;
103 int k, n;
104
105 if (!enum_in_range(enum_id, &gpioc->data))
106 return -1;
107
108 k = 0;
109 while (1) {
110 data_reg = gpioc->data_regs + k;
111
112 if (!data_reg->reg_width)
113 break;
114
115 for (n = 0; n < data_reg->reg_width; n++) {
116 if (data_reg->enum_ids[n] == enum_id) {
117 *drp = data_reg;
118 *bitp = n;
119 return 0;
120
121 }
122 }
123 k++;
124 }
125
126 return -1;
127}
128
129static int get_config_reg(struct pinmux_info *gpioc, pinmux_enum_t enum_id,
130 struct pinmux_cfg_reg **crp, int *indexp,
131 unsigned long **cntp)
132{
133 struct pinmux_cfg_reg *config_reg;
134 unsigned long r_width, f_width;
135 int k, n;
136
137 k = 0;
138 while (1) {
139 config_reg = gpioc->cfg_regs + k;
140
141 r_width = config_reg->reg_width;
142 f_width = config_reg->field_width;
143
144 if (!r_width)
145 break;
146 for (n = 0; n < (r_width / f_width) * 1 << f_width; n++) {
147 if (config_reg->enum_ids[n] == enum_id) {
148 *crp = config_reg;
149 *indexp = n;
150 *cntp = &config_reg->cnt[n / (1 << f_width)];
151 return 0;
152 }
153 }
154 k++;
155 }
156
157 return -1;
158}
159
160static int get_gpio_enum_id(struct pinmux_info *gpioc, unsigned gpio,
161 int pos, pinmux_enum_t *enum_idp)
162{
163 pinmux_enum_t enum_id = gpioc->gpios[gpio].enum_id;
164 pinmux_enum_t *data = gpioc->gpio_data;
165 int k;
166
167 if (!enum_in_range(enum_id, &gpioc->data)) {
168 if (!enum_in_range(enum_id, &gpioc->mark)) {
169 pr_err("non data/mark enum_id for gpio %d\n", gpio);
170 return -1;
171 }
172 }
173
174 if (pos) {
175 *enum_idp = data[pos + 1];
176 return pos + 1;
177 }
178
179 for (k = 0; k < gpioc->gpio_data_size; k++) {
180 if (data[k] == enum_id) {
181 *enum_idp = data[k + 1];
182 return k + 1;
183 }
184 }
185
186 pr_err("cannot locate data/mark enum_id for gpio %d\n", gpio);
187 return -1;
188}
189
190static int write_config_reg(struct pinmux_info *gpioc,
191 struct pinmux_cfg_reg *crp,
192 int index)
193{
194 unsigned long ncomb, pos, value;
195
196 ncomb = 1 << crp->field_width;
197 pos = index / ncomb;
198 value = index % ncomb;
199
200 return read_write_reg(crp->reg, crp->reg_width,
201 crp->field_width, pos, value, 1);
202}
203
204static int check_config_reg(struct pinmux_info *gpioc,
205 struct pinmux_cfg_reg *crp,
206 int index)
207{
208 unsigned long ncomb, pos, value;
209
210 ncomb = 1 << crp->field_width;
211 pos = index / ncomb;
212 value = index % ncomb;
213
214 if (read_write_reg(crp->reg, crp->reg_width,
215 crp->field_width, pos, 0, 0) == value)
216 return 0;
217
218 return -1;
219}
220
221enum { GPIO_CFG_DRYRUN, GPIO_CFG_REQ, GPIO_CFG_FREE };
222
223int pinmux_config_gpio(struct pinmux_info *gpioc, unsigned gpio,
224 int pinmux_type, int cfg_mode)
225{
226 struct pinmux_cfg_reg *cr = NULL;
227 pinmux_enum_t enum_id;
228 struct pinmux_range *range;
229 int in_range, pos, index;
230 unsigned long *cntp;
231
232 switch (pinmux_type) {
233
234 case PINMUX_TYPE_FUNCTION:
235 range = NULL;
236 break;
237
238 case PINMUX_TYPE_OUTPUT:
239 range = &gpioc->output;
240 break;
241
242 case PINMUX_TYPE_INPUT:
243 range = &gpioc->input;
244 break;
245
246 case PINMUX_TYPE_INPUT_PULLUP:
247 range = &gpioc->input_pu;
248 break;
249
250 case PINMUX_TYPE_INPUT_PULLDOWN:
251 range = &gpioc->input_pd;
252 break;
253
254 default:
255 goto out_err;
256 }
257
258 pos = 0;
259 enum_id = 0;
260 index = 0;
261 while (1) {
262 pos = get_gpio_enum_id(gpioc, gpio, pos, &enum_id);
263 if (pos <= 0)
264 goto out_err;
265
266 if (!enum_id)
267 break;
268
269 in_range = enum_in_range(enum_id, &gpioc->function);
270 if (!in_range && range)
271 in_range = enum_in_range(enum_id, range);
272
273 if (!in_range)
274 continue;
275
276 if (get_config_reg(gpioc, enum_id, &cr, &index, &cntp) != 0)
277 goto out_err;
278
279 switch (cfg_mode) {
280 case GPIO_CFG_DRYRUN:
281 if (!*cntp || !check_config_reg(gpioc, cr, index))
282 continue;
283 break;
284
285 case GPIO_CFG_REQ:
286 if (write_config_reg(gpioc, cr, index) != 0)
287 goto out_err;
288 *cntp = *cntp + 1;
289 break;
290
291 case GPIO_CFG_FREE:
292 *cntp = *cntp - 1;
293 break;
294 }
295 }
296
297 return 0;
298 out_err:
299 return -1;
300}
301
302static DEFINE_SPINLOCK(gpio_lock);
303
304int __gpio_request(unsigned gpio)
305{
306 struct pinmux_info *gpioc = gpio_controller(gpio);
307 struct pinmux_data_reg *dummy;
308 unsigned long flags;
309 int i, ret, pinmux_type;
310
311 ret = -EINVAL;
312
313 if (!gpioc)
314 goto err_out;
315
316 spin_lock_irqsave(&gpio_lock, flags);
317
318 if ((gpioc->gpios[gpio].flags & PINMUX_FLAG_TYPE) != PINMUX_TYPE_NONE)
319 goto err_unlock;
320
321 /* setup pin function here if no data is associated with pin */
322
323 if (get_data_reg(gpioc, gpio, &dummy, &i) != 0)
324 pinmux_type = PINMUX_TYPE_FUNCTION;
325 else
326 pinmux_type = PINMUX_TYPE_GPIO;
327
328 if (pinmux_type == PINMUX_TYPE_FUNCTION) {
329 if (pinmux_config_gpio(gpioc, gpio,
330 pinmux_type,
331 GPIO_CFG_DRYRUN) != 0)
332 goto err_unlock;
333
334 if (pinmux_config_gpio(gpioc, gpio,
335 pinmux_type,
336 GPIO_CFG_REQ) != 0)
337 BUG();
338 }
339
340 gpioc->gpios[gpio].flags = pinmux_type;
341
342 ret = 0;
343 err_unlock:
344 spin_unlock_irqrestore(&gpio_lock, flags);
345 err_out:
346 return ret;
347}
348EXPORT_SYMBOL(__gpio_request);
349
350void gpio_free(unsigned gpio)
351{
352 struct pinmux_info *gpioc = gpio_controller(gpio);
353 unsigned long flags;
354 int pinmux_type;
355
356 if (!gpioc)
357 return;
358
359 spin_lock_irqsave(&gpio_lock, flags);
360
361 pinmux_type = gpioc->gpios[gpio].flags & PINMUX_FLAG_TYPE;
362 pinmux_config_gpio(gpioc, gpio, pinmux_type, GPIO_CFG_FREE);
363 gpioc->gpios[gpio].flags = PINMUX_TYPE_NONE;
364
365 spin_unlock_irqrestore(&gpio_lock, flags);
366}
367EXPORT_SYMBOL(gpio_free);
368
369static int pinmux_direction(struct pinmux_info *gpioc,
370 unsigned gpio, int new_pinmux_type)
371{
372 int ret, pinmux_type;
373
374 ret = -EINVAL;
375 pinmux_type = gpioc->gpios[gpio].flags & PINMUX_FLAG_TYPE;
376
377 switch (pinmux_type) {
378 case PINMUX_TYPE_GPIO:
379 break;
380 case PINMUX_TYPE_OUTPUT:
381 case PINMUX_TYPE_INPUT:
382 case PINMUX_TYPE_INPUT_PULLUP:
383 case PINMUX_TYPE_INPUT_PULLDOWN:
384 pinmux_config_gpio(gpioc, gpio, pinmux_type, GPIO_CFG_FREE);
385 break;
386 default:
387 goto err_out;
388 }
389
390 if (pinmux_config_gpio(gpioc, gpio,
391 new_pinmux_type,
392 GPIO_CFG_DRYRUN) != 0)
393 goto err_out;
394
395 if (pinmux_config_gpio(gpioc, gpio,
396 new_pinmux_type,
397 GPIO_CFG_REQ) != 0)
398 BUG();
399
400 gpioc->gpios[gpio].flags = new_pinmux_type;
401
402 ret = 0;
403 err_out:
404 return ret;
405}
406
407int gpio_direction_input(unsigned gpio)
408{
409 struct pinmux_info *gpioc = gpio_controller(gpio);
410 unsigned long flags;
411 int ret = -EINVAL;
412
413 if (!gpioc)
414 goto err_out;
415
416 spin_lock_irqsave(&gpio_lock, flags);
417 ret = pinmux_direction(gpioc, gpio, PINMUX_TYPE_INPUT);
418 spin_unlock_irqrestore(&gpio_lock, flags);
419 err_out:
420 return ret;
421}
422EXPORT_SYMBOL(gpio_direction_input);
423
424static int __gpio_get_set_value(struct pinmux_info *gpioc,
425 unsigned gpio, int value,
426 int do_write)
427{
428 struct pinmux_data_reg *dr = NULL;
429 int bit = 0;
430
431 if (get_data_reg(gpioc, gpio, &dr, &bit) != 0)
432 BUG();
433 else
434 value = read_write_reg(dr->reg, dr->reg_width,
435 1, bit, value, do_write);
436
437 return value;
438}
439
440int gpio_direction_output(unsigned gpio, int value)
441{
442 struct pinmux_info *gpioc = gpio_controller(gpio);
443 unsigned long flags;
444 int ret = -EINVAL;
445
446 if (!gpioc)
447 goto err_out;
448
449 spin_lock_irqsave(&gpio_lock, flags);
450 __gpio_get_set_value(gpioc, gpio, value, 1);
451 ret = pinmux_direction(gpioc, gpio, PINMUX_TYPE_OUTPUT);
452 spin_unlock_irqrestore(&gpio_lock, flags);
453 err_out:
454 return ret;
455}
456EXPORT_SYMBOL(gpio_direction_output);
457
458int gpio_get_value(unsigned gpio)
459{
460 struct pinmux_info *gpioc = gpio_controller(gpio);
461 unsigned long flags;
462 int value = 0;
463
464 if (!gpioc)
465 BUG();
466 else {
467 spin_lock_irqsave(&gpio_lock, flags);
468 value = __gpio_get_set_value(gpioc, gpio, 0, 0);
469 spin_unlock_irqrestore(&gpio_lock, flags);
470 }
471
472 return value;
473}
474EXPORT_SYMBOL(gpio_get_value);
475
476void gpio_set_value(unsigned gpio, int value)
477{
478 struct pinmux_info *gpioc = gpio_controller(gpio);
479 unsigned long flags;
480
481 if (!gpioc)
482 BUG();
483 else {
484 spin_lock_irqsave(&gpio_lock, flags);
485 __gpio_get_set_value(gpioc, gpio, value, 1);
486 spin_unlock_irqrestore(&gpio_lock, flags);
487 }
488}
489EXPORT_SYMBOL(gpio_set_value);
490
491int register_pinmux(struct pinmux_info *pip)
492{
493 registered_gpio = pip;
494 pr_info("pinmux: %s handling gpio %d -> %d\n",
495 pip->name, pip->first_gpio, pip->last_gpio);
496
497 return 0;
498}
diff --git a/arch/sh/kernel/io.c b/arch/sh/kernel/io.c
index 2b899122990..29cf4588fc0 100644
--- a/arch/sh/kernel/io.c
+++ b/arch/sh/kernel/io.c
@@ -19,12 +19,12 @@
19 * Copy data from IO memory space to "real" memory space. 19 * Copy data from IO memory space to "real" memory space.
20 * This needs to be optimized. 20 * This needs to be optimized.
21 */ 21 */
22void memcpy_fromio(void *to, volatile void __iomem *from, unsigned long count) 22void memcpy_fromio(void *to, const volatile void __iomem *from, unsigned long count)
23{ 23{
24 char *p = to; 24 unsigned char *p = to;
25 while (count) { 25 while (count) {
26 count--; 26 count--;
27 *p = readb((void __iomem *)from); 27 *p = readb(from);
28 p++; 28 p++;
29 from++; 29 from++;
30 } 30 }
@@ -37,10 +37,10 @@ EXPORT_SYMBOL(memcpy_fromio);
37 */ 37 */
38void memcpy_toio(volatile void __iomem *to, const void *from, unsigned long count) 38void memcpy_toio(volatile void __iomem *to, const void *from, unsigned long count)
39{ 39{
40 const char *p = from; 40 const unsigned char *p = from;
41 while (count) { 41 while (count) {
42 count--; 42 count--;
43 writeb(*p, (void __iomem *)to); 43 writeb(*p, to);
44 p++; 44 p++;
45 to++; 45 to++;
46 } 46 }
@@ -55,7 +55,7 @@ void memset_io(volatile void __iomem *dst, int c, unsigned long count)
55{ 55{
56 while (count) { 56 while (count) {
57 count--; 57 count--;
58 writeb(c, (void __iomem *)dst); 58 writeb(c, dst);
59 dst++; 59 dst++;
60 } 60 }
61} 61}
diff --git a/arch/sh/kernel/io_generic.c b/arch/sh/kernel/io_generic.c
index db769449f5a..5a7f554d9ca 100644
--- a/arch/sh/kernel/io_generic.c
+++ b/arch/sh/kernel/io_generic.c
@@ -19,38 +19,33 @@
19/* SH3 has a PCMCIA bug that needs a dummy read from area 6 for a 19/* SH3 has a PCMCIA bug that needs a dummy read from area 6 for a
20 * workaround. */ 20 * workaround. */
21/* I'm not sure SH7709 has this kind of bug */ 21/* I'm not sure SH7709 has this kind of bug */
22#define dummy_read() ctrl_inb(0xba000000) 22#define dummy_read() __raw_readb(0xba000000)
23#else 23#else
24#define dummy_read() 24#define dummy_read()
25#endif 25#endif
26 26
27unsigned long generic_io_base; 27unsigned long generic_io_base;
28 28
29static inline void delay(void)
30{
31 ctrl_inw(0xa0000000);
32}
33
34u8 generic_inb(unsigned long port) 29u8 generic_inb(unsigned long port)
35{ 30{
36 return ctrl_inb((unsigned long __force)__ioport_map(port, 1)); 31 return __raw_readb(__ioport_map(port, 1));
37} 32}
38 33
39u16 generic_inw(unsigned long port) 34u16 generic_inw(unsigned long port)
40{ 35{
41 return ctrl_inw((unsigned long __force)__ioport_map(port, 2)); 36 return __raw_readw(__ioport_map(port, 2));
42} 37}
43 38
44u32 generic_inl(unsigned long port) 39u32 generic_inl(unsigned long port)
45{ 40{
46 return ctrl_inl((unsigned long __force)__ioport_map(port, 4)); 41 return __raw_readl(__ioport_map(port, 4));
47} 42}
48 43
49u8 generic_inb_p(unsigned long port) 44u8 generic_inb_p(unsigned long port)
50{ 45{
51 unsigned long v = generic_inb(port); 46 unsigned long v = generic_inb(port);
52 47
53 delay(); 48 ctrl_delay();
54 return v; 49 return v;
55} 50}
56 51
@@ -58,7 +53,7 @@ u16 generic_inw_p(unsigned long port)
58{ 53{
59 unsigned long v = generic_inw(port); 54 unsigned long v = generic_inw(port);
60 55
61 delay(); 56 ctrl_delay();
62 return v; 57 return v;
63} 58}
64 59
@@ -66,7 +61,7 @@ u32 generic_inl_p(unsigned long port)
66{ 61{
67 unsigned long v = generic_inl(port); 62 unsigned long v = generic_inl(port);
68 63
69 delay(); 64 ctrl_delay();
70 return v; 65 return v;
71} 66}
72 67
@@ -81,7 +76,7 @@ void generic_insb(unsigned long port, void *dst, unsigned long count)
81 volatile u8 *port_addr; 76 volatile u8 *port_addr;
82 u8 *buf = dst; 77 u8 *buf = dst;
83 78
84 port_addr = (volatile u8 *)__ioport_map(port, 1); 79 port_addr = (volatile u8 __force *)__ioport_map(port, 1);
85 while (count--) 80 while (count--)
86 *buf++ = *port_addr; 81 *buf++ = *port_addr;
87} 82}
@@ -91,7 +86,7 @@ void generic_insw(unsigned long port, void *dst, unsigned long count)
91 volatile u16 *port_addr; 86 volatile u16 *port_addr;
92 u16 *buf = dst; 87 u16 *buf = dst;
93 88
94 port_addr = (volatile u16 *)__ioport_map(port, 2); 89 port_addr = (volatile u16 __force *)__ioport_map(port, 2);
95 while (count--) 90 while (count--)
96 *buf++ = *port_addr; 91 *buf++ = *port_addr;
97 92
@@ -103,7 +98,7 @@ void generic_insl(unsigned long port, void *dst, unsigned long count)
103 volatile u32 *port_addr; 98 volatile u32 *port_addr;
104 u32 *buf = dst; 99 u32 *buf = dst;
105 100
106 port_addr = (volatile u32 *)__ioport_map(port, 4); 101 port_addr = (volatile u32 __force *)__ioport_map(port, 4);
107 while (count--) 102 while (count--)
108 *buf++ = *port_addr; 103 *buf++ = *port_addr;
109 104
@@ -112,35 +107,35 @@ void generic_insl(unsigned long port, void *dst, unsigned long count)
112 107
113void generic_outb(u8 b, unsigned long port) 108void generic_outb(u8 b, unsigned long port)
114{ 109{
115 ctrl_outb(b, (unsigned long __force)__ioport_map(port, 1)); 110 __raw_writeb(b, __ioport_map(port, 1));
116} 111}
117 112
118void generic_outw(u16 b, unsigned long port) 113void generic_outw(u16 b, unsigned long port)
119{ 114{
120 ctrl_outw(b, (unsigned long __force)__ioport_map(port, 2)); 115 __raw_writew(b, __ioport_map(port, 2));
121} 116}
122 117
123void generic_outl(u32 b, unsigned long port) 118void generic_outl(u32 b, unsigned long port)
124{ 119{
125 ctrl_outl(b, (unsigned long __force)__ioport_map(port, 4)); 120 __raw_writel(b, __ioport_map(port, 4));
126} 121}
127 122
128void generic_outb_p(u8 b, unsigned long port) 123void generic_outb_p(u8 b, unsigned long port)
129{ 124{
130 generic_outb(b, port); 125 generic_outb(b, port);
131 delay(); 126 ctrl_delay();
132} 127}
133 128
134void generic_outw_p(u16 b, unsigned long port) 129void generic_outw_p(u16 b, unsigned long port)
135{ 130{
136 generic_outw(b, port); 131 generic_outw(b, port);
137 delay(); 132 ctrl_delay();
138} 133}
139 134
140void generic_outl_p(u32 b, unsigned long port) 135void generic_outl_p(u32 b, unsigned long port)
141{ 136{
142 generic_outl(b, port); 137 generic_outl(b, port);
143 delay(); 138 ctrl_delay();
144} 139}
145 140
146/* 141/*
@@ -184,36 +179,6 @@ void generic_outsl(unsigned long port, const void *src, unsigned long count)
184 dummy_read(); 179 dummy_read();
185} 180}
186 181
187u8 generic_readb(void __iomem *addr)
188{
189 return ctrl_inb((unsigned long __force)addr);
190}
191
192u16 generic_readw(void __iomem *addr)
193{
194 return ctrl_inw((unsigned long __force)addr);
195}
196
197u32 generic_readl(void __iomem *addr)
198{
199 return ctrl_inl((unsigned long __force)addr);
200}
201
202void generic_writeb(u8 b, void __iomem *addr)
203{
204 ctrl_outb(b, (unsigned long __force)addr);
205}
206
207void generic_writew(u16 b, void __iomem *addr)
208{
209 ctrl_outw(b, (unsigned long __force)addr);
210}
211
212void generic_writel(u32 b, void __iomem *addr)
213{
214 ctrl_outl(b, (unsigned long __force)addr);
215}
216
217void __iomem *generic_ioport_map(unsigned long addr, unsigned int size) 182void __iomem *generic_ioport_map(unsigned long addr, unsigned int size)
218{ 183{
219 return (void __iomem *)(addr + generic_io_base); 184 return (void __iomem *)(addr + generic_io_base);
diff --git a/arch/sh/kernel/kprobes.c b/arch/sh/kernel/kprobes.c
new file mode 100644
index 00000000000..c96850b061f
--- /dev/null
+++ b/arch/sh/kernel/kprobes.c
@@ -0,0 +1,584 @@
1/*
2 * Kernel probes (kprobes) for SuperH
3 *
4 * Copyright (C) 2007 Chris Smith <chris.smith@st.com>
5 * Copyright (C) 2006 Lineo Solutions, Inc.
6 *
7 * This file is subject to the terms and conditions of the GNU General Public
8 * License. See the file "COPYING" in the main directory of this archive
9 * for more details.
10 */
11#include <linux/kprobes.h>
12#include <linux/module.h>
13#include <linux/ptrace.h>
14#include <linux/preempt.h>
15#include <linux/kdebug.h>
16#include <asm/cacheflush.h>
17#include <asm/uaccess.h>
18
19DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL;
20DEFINE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk);
21
22static struct kprobe saved_current_opcode;
23static struct kprobe saved_next_opcode;
24static struct kprobe saved_next_opcode2;
25
26#define OPCODE_JMP(x) (((x) & 0xF0FF) == 0x402b)
27#define OPCODE_JSR(x) (((x) & 0xF0FF) == 0x400b)
28#define OPCODE_BRA(x) (((x) & 0xF000) == 0xa000)
29#define OPCODE_BRAF(x) (((x) & 0xF0FF) == 0x0023)
30#define OPCODE_BSR(x) (((x) & 0xF000) == 0xb000)
31#define OPCODE_BSRF(x) (((x) & 0xF0FF) == 0x0003)
32
33#define OPCODE_BF_S(x) (((x) & 0xFF00) == 0x8f00)
34#define OPCODE_BT_S(x) (((x) & 0xFF00) == 0x8d00)
35
36#define OPCODE_BF(x) (((x) & 0xFF00) == 0x8b00)
37#define OPCODE_BT(x) (((x) & 0xFF00) == 0x8900)
38
39#define OPCODE_RTS(x) (((x) & 0x000F) == 0x000b)
40#define OPCODE_RTE(x) (((x) & 0xFFFF) == 0x002b)
41
42int __kprobes arch_prepare_kprobe(struct kprobe *p)
43{
44 kprobe_opcode_t opcode = *(kprobe_opcode_t *) (p->addr);
45
46 if (OPCODE_RTE(opcode))
47 return -EFAULT; /* Bad breakpoint */
48
49 p->opcode = opcode;
50
51 return 0;
52}
53
54void __kprobes arch_copy_kprobe(struct kprobe *p)
55{
56 memcpy(p->ainsn.insn, p->addr, MAX_INSN_SIZE * sizeof(kprobe_opcode_t));
57 p->opcode = *p->addr;
58}
59
60void __kprobes arch_arm_kprobe(struct kprobe *p)
61{
62 *p->addr = BREAKPOINT_INSTRUCTION;
63 flush_icache_range((unsigned long)p->addr,
64 (unsigned long)p->addr + sizeof(kprobe_opcode_t));
65}
66
67void __kprobes arch_disarm_kprobe(struct kprobe *p)
68{
69 *p->addr = p->opcode;
70 flush_icache_range((unsigned long)p->addr,
71 (unsigned long)p->addr + sizeof(kprobe_opcode_t));
72}
73
74int __kprobes arch_trampoline_kprobe(struct kprobe *p)
75{
76 if (*p->addr == BREAKPOINT_INSTRUCTION)
77 return 1;
78
79 return 0;
80}
81
82/**
83 * If an illegal slot instruction exception occurs for an address
84 * containing a kprobe, remove the probe.
85 *
86 * Returns 0 if the exception was handled successfully, 1 otherwise.
87 */
88int __kprobes kprobe_handle_illslot(unsigned long pc)
89{
90 struct kprobe *p = get_kprobe((kprobe_opcode_t *) pc + 1);
91
92 if (p != NULL) {
93 printk("Warning: removing kprobe from delay slot: 0x%.8x\n",
94 (unsigned int)pc + 2);
95 unregister_kprobe(p);
96 return 0;
97 }
98
99 return 1;
100}
101
102void __kprobes arch_remove_kprobe(struct kprobe *p)
103{
104 if (saved_next_opcode.addr != 0x0) {
105 arch_disarm_kprobe(p);
106 arch_disarm_kprobe(&saved_next_opcode);
107 saved_next_opcode.addr = 0x0;
108 saved_next_opcode.opcode = 0x0;
109
110 if (saved_next_opcode2.addr != 0x0) {
111 arch_disarm_kprobe(&saved_next_opcode2);
112 saved_next_opcode2.addr = 0x0;
113 saved_next_opcode2.opcode = 0x0;
114 }
115 }
116}
117
118static void __kprobes save_previous_kprobe(struct kprobe_ctlblk *kcb)
119{
120 kcb->prev_kprobe.kp = kprobe_running();
121 kcb->prev_kprobe.status = kcb->kprobe_status;
122}
123
124static void __kprobes restore_previous_kprobe(struct kprobe_ctlblk *kcb)
125{
126 __get_cpu_var(current_kprobe) = kcb->prev_kprobe.kp;
127 kcb->kprobe_status = kcb->prev_kprobe.status;
128}
129
130static void __kprobes set_current_kprobe(struct kprobe *p, struct pt_regs *regs,
131 struct kprobe_ctlblk *kcb)
132{
133 __get_cpu_var(current_kprobe) = p;
134}
135
136/*
137 * Singlestep is implemented by disabling the current kprobe and setting one
138 * on the next instruction, following branches. Two probes are set if the
139 * branch is conditional.
140 */
141static void __kprobes prepare_singlestep(struct kprobe *p, struct pt_regs *regs)
142{
143 kprobe_opcode_t *addr = NULL;
144 saved_current_opcode.addr = (kprobe_opcode_t *) (regs->pc);
145 addr = saved_current_opcode.addr;
146
147 if (p != NULL) {
148 arch_disarm_kprobe(p);
149
150 if (OPCODE_JSR(p->opcode) || OPCODE_JMP(p->opcode)) {
151 unsigned int reg_nr = ((p->opcode >> 8) & 0x000F);
152 saved_next_opcode.addr =
153 (kprobe_opcode_t *) regs->regs[reg_nr];
154 } else if (OPCODE_BRA(p->opcode) || OPCODE_BSR(p->opcode)) {
155 unsigned long disp = (p->opcode & 0x0FFF);
156 saved_next_opcode.addr =
157 (kprobe_opcode_t *) (regs->pc + 4 + disp * 2);
158
159 } else if (OPCODE_BRAF(p->opcode) || OPCODE_BSRF(p->opcode)) {
160 unsigned int reg_nr = ((p->opcode >> 8) & 0x000F);
161 saved_next_opcode.addr =
162 (kprobe_opcode_t *) (regs->pc + 4 +
163 regs->regs[reg_nr]);
164
165 } else if (OPCODE_RTS(p->opcode)) {
166 saved_next_opcode.addr = (kprobe_opcode_t *) regs->pr;
167
168 } else if (OPCODE_BF(p->opcode) || OPCODE_BT(p->opcode)) {
169 unsigned long disp = (p->opcode & 0x00FF);
170 /* case 1 */
171 saved_next_opcode.addr = p->addr + 1;
172 /* case 2 */
173 saved_next_opcode2.addr =
174 (kprobe_opcode_t *) (regs->pc + 4 + disp * 2);
175 saved_next_opcode2.opcode = *(saved_next_opcode2.addr);
176 arch_arm_kprobe(&saved_next_opcode2);
177
178 } else if (OPCODE_BF_S(p->opcode) || OPCODE_BT_S(p->opcode)) {
179 unsigned long disp = (p->opcode & 0x00FF);
180 /* case 1 */
181 saved_next_opcode.addr = p->addr + 2;
182 /* case 2 */
183 saved_next_opcode2.addr =
184 (kprobe_opcode_t *) (regs->pc + 4 + disp * 2);
185 saved_next_opcode2.opcode = *(saved_next_opcode2.addr);
186 arch_arm_kprobe(&saved_next_opcode2);
187
188 } else {
189 saved_next_opcode.addr = p->addr + 1;
190 }
191
192 saved_next_opcode.opcode = *(saved_next_opcode.addr);
193 arch_arm_kprobe(&saved_next_opcode);
194 }
195}
196
197/* Called with kretprobe_lock held */
198void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri,
199 struct pt_regs *regs)
200{
201 ri->ret_addr = (kprobe_opcode_t *) regs->pr;
202
203 /* Replace the return addr with trampoline addr */
204 regs->pr = (unsigned long)kretprobe_trampoline;
205}
206
207static int __kprobes kprobe_handler(struct pt_regs *regs)
208{
209 struct kprobe *p;
210 int ret = 0;
211 kprobe_opcode_t *addr = NULL;
212 struct kprobe_ctlblk *kcb;
213
214 /*
215 * We don't want to be preempted for the entire
216 * duration of kprobe processing
217 */
218 preempt_disable();
219 kcb = get_kprobe_ctlblk();
220
221 addr = (kprobe_opcode_t *) (regs->pc);
222
223 /* Check we're not actually recursing */
224 if (kprobe_running()) {
225 p = get_kprobe(addr);
226 if (p) {
227 if (kcb->kprobe_status == KPROBE_HIT_SS &&
228 *p->ainsn.insn == BREAKPOINT_INSTRUCTION) {
229 goto no_kprobe;
230 }
231 /* We have reentered the kprobe_handler(), since
232 * another probe was hit while within the handler.
233 * We here save the original kprobes variables and
234 * just single step on the instruction of the new probe
235 * without calling any user handlers.
236 */
237 save_previous_kprobe(kcb);
238 set_current_kprobe(p, regs, kcb);
239 kprobes_inc_nmissed_count(p);
240 prepare_singlestep(p, regs);
241 kcb->kprobe_status = KPROBE_REENTER;
242 return 1;
243 } else {
244 p = __get_cpu_var(current_kprobe);
245 if (p->break_handler && p->break_handler(p, regs)) {
246 goto ss_probe;
247 }
248 }
249 goto no_kprobe;
250 }
251
252 p = get_kprobe(addr);
253 if (!p) {
254 /* Not one of ours: let kernel handle it */
255 if (*(kprobe_opcode_t *)addr != BREAKPOINT_INSTRUCTION) {
256 /*
257 * The breakpoint instruction was removed right
258 * after we hit it. Another cpu has removed
259 * either a probepoint or a debugger breakpoint
260 * at this address. In either case, no further
261 * handling of this interrupt is appropriate.
262 */
263 ret = 1;
264 }
265
266 goto no_kprobe;
267 }
268
269 set_current_kprobe(p, regs, kcb);
270 kcb->kprobe_status = KPROBE_HIT_ACTIVE;
271
272 if (p->pre_handler && p->pre_handler(p, regs))
273 /* handler has already set things up, so skip ss setup */
274 return 1;
275
276ss_probe:
277 prepare_singlestep(p, regs);
278 kcb->kprobe_status = KPROBE_HIT_SS;
279 return 1;
280
281no_kprobe:
282 preempt_enable_no_resched();
283 return ret;
284}
285
286/*
287 * For function-return probes, init_kprobes() establishes a probepoint
288 * here. When a retprobed function returns, this probe is hit and
289 * trampoline_probe_handler() runs, calling the kretprobe's handler.
290 */
291static void __used kretprobe_trampoline_holder(void)
292{
293 asm volatile (".globl kretprobe_trampoline\n"
294 "kretprobe_trampoline:\n\t"
295 "nop\n");
296}
297
298/*
299 * Called when we hit the probe point at kretprobe_trampoline
300 */
301int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs)
302{
303 struct kretprobe_instance *ri = NULL;
304 struct hlist_head *head, empty_rp;
305 struct hlist_node *node, *tmp;
306 unsigned long flags, orig_ret_address = 0;
307 unsigned long trampoline_address = (unsigned long)&kretprobe_trampoline;
308
309 INIT_HLIST_HEAD(&empty_rp);
310 kretprobe_hash_lock(current, &head, &flags);
311
312 /*
313 * It is possible to have multiple instances associated with a given
314 * task either because an multiple functions in the call path
315 * have a return probe installed on them, and/or more then one return
316 * return probe was registered for a target function.
317 *
318 * We can handle this because:
319 * - instances are always inserted at the head of the list
320 * - when multiple return probes are registered for the same
321 * function, the first instance's ret_addr will point to the
322 * real return address, and all the rest will point to
323 * kretprobe_trampoline
324 */
325 hlist_for_each_entry_safe(ri, node, tmp, head, hlist) {
326 if (ri->task != current)
327 /* another task is sharing our hash bucket */
328 continue;
329
330 if (ri->rp && ri->rp->handler) {
331 __get_cpu_var(current_kprobe) = &ri->rp->kp;
332 ri->rp->handler(ri, regs);
333 __get_cpu_var(current_kprobe) = NULL;
334 }
335
336 orig_ret_address = (unsigned long)ri->ret_addr;
337 recycle_rp_inst(ri, &empty_rp);
338
339 if (orig_ret_address != trampoline_address)
340 /*
341 * This is the real return address. Any other
342 * instances associated with this task are for
343 * other calls deeper on the call stack
344 */
345 break;
346 }
347
348 kretprobe_assert(ri, orig_ret_address, trampoline_address);
349
350 regs->pc = orig_ret_address;
351 kretprobe_hash_unlock(current, &flags);
352
353 preempt_enable_no_resched();
354
355 hlist_for_each_entry_safe(ri, node, tmp, &empty_rp, hlist) {
356 hlist_del(&ri->hlist);
357 kfree(ri);
358 }
359
360 return orig_ret_address;
361}
362
363static int __kprobes post_kprobe_handler(struct pt_regs *regs)
364{
365 struct kprobe *cur = kprobe_running();
366 struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
367 kprobe_opcode_t *addr = NULL;
368 struct kprobe *p = NULL;
369
370 if (!cur)
371 return 0;
372
373 if ((kcb->kprobe_status != KPROBE_REENTER) && cur->post_handler) {
374 kcb->kprobe_status = KPROBE_HIT_SSDONE;
375 cur->post_handler(cur, regs, 0);
376 }
377
378 if (saved_next_opcode.addr != 0x0) {
379 arch_disarm_kprobe(&saved_next_opcode);
380 saved_next_opcode.addr = 0x0;
381 saved_next_opcode.opcode = 0x0;
382
383 addr = saved_current_opcode.addr;
384 saved_current_opcode.addr = 0x0;
385
386 p = get_kprobe(addr);
387 arch_arm_kprobe(p);
388
389 if (saved_next_opcode2.addr != 0x0) {
390 arch_disarm_kprobe(&saved_next_opcode2);
391 saved_next_opcode2.addr = 0x0;
392 saved_next_opcode2.opcode = 0x0;
393 }
394 }
395
396 /* Restore back the original saved kprobes variables and continue. */
397 if (kcb->kprobe_status == KPROBE_REENTER) {
398 restore_previous_kprobe(kcb);
399 goto out;
400 }
401
402 reset_current_kprobe();
403
404out:
405 preempt_enable_no_resched();
406
407 return 1;
408}
409
410int __kprobes kprobe_fault_handler(struct pt_regs *regs, int trapnr)
411{
412 struct kprobe *cur = kprobe_running();
413 struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
414 const struct exception_table_entry *entry;
415
416 switch (kcb->kprobe_status) {
417 case KPROBE_HIT_SS:
418 case KPROBE_REENTER:
419 /*
420 * We are here because the instruction being single
421 * stepped caused a page fault. We reset the current
422 * kprobe, point the pc back to the probe address
423 * and allow the page fault handler to continue as a
424 * normal page fault.
425 */
426 regs->pc = (unsigned long)cur->addr;
427 if (kcb->kprobe_status == KPROBE_REENTER)
428 restore_previous_kprobe(kcb);
429 else
430 reset_current_kprobe();
431 preempt_enable_no_resched();
432 break;
433 case KPROBE_HIT_ACTIVE:
434 case KPROBE_HIT_SSDONE:
435 /*
436 * We increment the nmissed count for accounting,
437 * we can also use npre/npostfault count for accounting
438 * these specific fault cases.
439 */
440 kprobes_inc_nmissed_count(cur);
441
442 /*
443 * We come here because instructions in the pre/post
444 * handler caused the page_fault, this could happen
445 * if handler tries to access user space by
446 * copy_from_user(), get_user() etc. Let the
447 * user-specified handler try to fix it first.
448 */
449 if (cur->fault_handler && cur->fault_handler(cur, regs, trapnr))
450 return 1;
451
452 /*
453 * In case the user-specified fault handler returned
454 * zero, try to fix up.
455 */
456 if ((entry = search_exception_tables(regs->pc)) != NULL) {
457 regs->pc = entry->fixup;
458 return 1;
459 }
460
461 /*
462 * fixup_exception() could not handle it,
463 * Let do_page_fault() fix it.
464 */
465 break;
466 default:
467 break;
468 }
469
470 return 0;
471}
472
473/*
474 * Wrapper routine to for handling exceptions.
475 */
476int __kprobes kprobe_exceptions_notify(struct notifier_block *self,
477 unsigned long val, void *data)
478{
479 struct kprobe *p = NULL;
480 struct die_args *args = (struct die_args *)data;
481 int ret = NOTIFY_DONE;
482 kprobe_opcode_t *addr = NULL;
483 struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
484
485 addr = (kprobe_opcode_t *) (args->regs->pc);
486 if (val == DIE_TRAP) {
487 if (!kprobe_running()) {
488 if (kprobe_handler(args->regs)) {
489 ret = NOTIFY_STOP;
490 } else {
491 /* Not a kprobe trap */
492 ret = NOTIFY_DONE;
493 }
494 } else {
495 p = get_kprobe(addr);
496 if ((kcb->kprobe_status == KPROBE_HIT_SS) ||
497 (kcb->kprobe_status == KPROBE_REENTER)) {
498 if (post_kprobe_handler(args->regs))
499 ret = NOTIFY_STOP;
500 } else {
501 if (kprobe_handler(args->regs)) {
502 ret = NOTIFY_STOP;
503 } else {
504 p = __get_cpu_var(current_kprobe);
505 if (p->break_handler &&
506 p->break_handler(p, args->regs))
507 ret = NOTIFY_STOP;
508 }
509 }
510 }
511 }
512
513 return ret;
514}
515
516int __kprobes setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs)
517{
518 struct jprobe *jp = container_of(p, struct jprobe, kp);
519 unsigned long addr;
520 struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
521
522 kcb->jprobe_saved_regs = *regs;
523 kcb->jprobe_saved_r15 = regs->regs[15];
524 addr = kcb->jprobe_saved_r15;
525
526 /*
527 * TBD: As Linus pointed out, gcc assumes that the callee
528 * owns the argument space and could overwrite it, e.g.
529 * tailcall optimization. So, to be absolutely safe
530 * we also save and restore enough stack bytes to cover
531 * the argument area.
532 */
533 memcpy(kcb->jprobes_stack, (kprobe_opcode_t *) addr,
534 MIN_STACK_SIZE(addr));
535
536 regs->pc = (unsigned long)(jp->entry);
537
538 return 1;
539}
540
541void __kprobes jprobe_return(void)
542{
543 asm volatile ("trapa #0x3a\n\t" "jprobe_return_end:\n\t" "nop\n\t");
544}
545
546int __kprobes longjmp_break_handler(struct kprobe *p, struct pt_regs *regs)
547{
548 struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
549 unsigned long stack_addr = kcb->jprobe_saved_r15;
550 u8 *addr = (u8 *)regs->pc;
551
552 if ((addr >= (u8 *)jprobe_return) &&
553 (addr <= (u8 *)jprobe_return_end)) {
554 *regs = kcb->jprobe_saved_regs;
555
556 memcpy((kprobe_opcode_t *)stack_addr, kcb->jprobes_stack,
557 MIN_STACK_SIZE(stack_addr));
558
559 kcb->kprobe_status = KPROBE_HIT_SS;
560 preempt_enable_no_resched();
561 return 1;
562 }
563
564 return 0;
565}
566
567static struct kprobe trampoline_p = {
568 .addr = (kprobe_opcode_t *)&kretprobe_trampoline,
569 .pre_handler = trampoline_probe_handler
570};
571
572int __init arch_init_kprobes(void)
573{
574 saved_next_opcode.addr = 0x0;
575 saved_next_opcode.opcode = 0x0;
576
577 saved_current_opcode.addr = 0x0;
578 saved_current_opcode.opcode = 0x0;
579
580 saved_next_opcode2.addr = 0x0;
581 saved_next_opcode2.opcode = 0x0;
582
583 return register_kprobe(&trampoline_p);
584}
diff --git a/arch/sh/kernel/machvec.c b/arch/sh/kernel/machvec.c
index 129b2cfd18a..c1ea41e5812 100644
--- a/arch/sh/kernel/machvec.c
+++ b/arch/sh/kernel/machvec.c
@@ -14,6 +14,7 @@
14#include <linux/string.h> 14#include <linux/string.h>
15#include <asm/machvec.h> 15#include <asm/machvec.h>
16#include <asm/sections.h> 16#include <asm/sections.h>
17#include <asm/setup.h>
17#include <asm/io.h> 18#include <asm/io.h>
18#include <asm/irq.h> 19#include <asm/irq.h>
19 20
@@ -125,9 +126,6 @@ void __init sh_mv_setup(void)
125 mv_set(insb); mv_set(insw); mv_set(insl); 126 mv_set(insb); mv_set(insw); mv_set(insl);
126 mv_set(outsb); mv_set(outsw); mv_set(outsl); 127 mv_set(outsb); mv_set(outsw); mv_set(outsl);
127 128
128 mv_set(readb); mv_set(readw); mv_set(readl);
129 mv_set(writeb); mv_set(writew); mv_set(writel);
130
131 mv_set(ioport_map); 129 mv_set(ioport_map);
132 mv_set(ioport_unmap); 130 mv_set(ioport_unmap);
133 mv_set(irq_demux); 131 mv_set(irq_demux);
diff --git a/arch/sh/kernel/process_32.c b/arch/sh/kernel/process_32.c
index 3326a45749d..b965f0282c7 100644
--- a/arch/sh/kernel/process_32.c
+++ b/arch/sh/kernel/process_32.c
@@ -7,7 +7,11 @@
7 * 7 *
8 * SuperH version: Copyright (C) 1999, 2000 Niibe Yutaka & Kaz Kojima 8 * SuperH version: Copyright (C) 1999, 2000 Niibe Yutaka & Kaz Kojima
9 * Copyright (C) 2006 Lineo Solutions Inc. support SH4A UBC 9 * Copyright (C) 2006 Lineo Solutions Inc. support SH4A UBC
10 * Copyright (C) 2002 - 2007 Paul Mundt 10 * Copyright (C) 2002 - 2008 Paul Mundt
11 *
12 * This file is subject to the terms and conditions of the GNU General Public
13 * License. See the file "COPYING" in the main directory of this archive
14 * for more details.
11 */ 15 */
12#include <linux/module.h> 16#include <linux/module.h>
13#include <linux/mm.h> 17#include <linux/mm.h>
@@ -26,6 +30,7 @@
26#include <asm/system.h> 30#include <asm/system.h>
27#include <asm/ubc.h> 31#include <asm/ubc.h>
28#include <asm/fpu.h> 32#include <asm/fpu.h>
33#include <asm/syscalls.h>
29 34
30static int hlt_counter; 35static int hlt_counter;
31int ubc_usercnt = 0; 36int ubc_usercnt = 0;
@@ -111,15 +116,21 @@ void show_regs(struct pt_regs * regs)
111{ 116{
112 printk("\n"); 117 printk("\n");
113 printk("Pid : %d, Comm: %20s\n", task_pid_nr(current), current->comm); 118 printk("Pid : %d, Comm: %20s\n", task_pid_nr(current), current->comm);
119 printk("CPU : %d %s (%s %.*s)\n",
120 smp_processor_id(), print_tainted(), init_utsname()->release,
121 (int)strcspn(init_utsname()->version, " "),
122 init_utsname()->version);
123
114 print_symbol("PC is at %s\n", instruction_pointer(regs)); 124 print_symbol("PC is at %s\n", instruction_pointer(regs));
125 print_symbol("PR is at %s\n", regs->pr);
126
115 printk("PC : %08lx SP : %08lx SR : %08lx ", 127 printk("PC : %08lx SP : %08lx SR : %08lx ",
116 regs->pc, regs->regs[15], regs->sr); 128 regs->pc, regs->regs[15], regs->sr);
117#ifdef CONFIG_MMU 129#ifdef CONFIG_MMU
118 printk("TEA : %08x ", ctrl_inl(MMU_TEA)); 130 printk("TEA : %08x\n", ctrl_inl(MMU_TEA));
119#else 131#else
120 printk(" "); 132 printk("\n");
121#endif 133#endif
122 printk("%s\n", print_tainted());
123 134
124 printk("R0 : %08lx R1 : %08lx R2 : %08lx R3 : %08lx\n", 135 printk("R0 : %08lx R1 : %08lx R2 : %08lx R3 : %08lx\n",
125 regs->regs[0],regs->regs[1], 136 regs->regs[0],regs->regs[1],
@@ -162,6 +173,7 @@ __asm__(".align 5\n"
162int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) 173int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
163{ 174{
164 struct pt_regs regs; 175 struct pt_regs regs;
176 int pid;
165 177
166 memset(&regs, 0, sizeof(regs)); 178 memset(&regs, 0, sizeof(regs));
167 regs.regs[4] = (unsigned long)arg; 179 regs.regs[4] = (unsigned long)arg;
@@ -171,8 +183,12 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
171 regs.sr = (1 << 30); 183 regs.sr = (1 << 30);
172 184
173 /* Ok, create the new process.. */ 185 /* Ok, create the new process.. */
174 return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, 186 pid = do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0,
175 &regs, 0, NULL, NULL); 187 &regs, 0, NULL, NULL);
188
189 trace_mark(kernel_arch_kthread_create, "pid %d fn %p", pid, fn);
190
191 return pid;
176} 192}
177 193
178/* 194/*
@@ -210,10 +226,10 @@ int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu)
210 struct task_struct *tsk = current; 226 struct task_struct *tsk = current;
211 227
212 fpvalid = !!tsk_used_math(tsk); 228 fpvalid = !!tsk_used_math(tsk);
213 if (fpvalid) { 229 if (fpvalid)
214 unlazy_fpu(tsk, regs); 230 fpvalid = !fpregs_get(tsk, NULL, 0,
215 memcpy(fpu, &tsk->thread.fpu.hard, sizeof(*fpu)); 231 sizeof(struct user_fpu_struct),
216 } 232 fpu, NULL);
217#endif 233#endif
218 234
219 return fpvalid; 235 return fpvalid;
diff --git a/arch/sh/kernel/process_64.c b/arch/sh/kernel/process_64.c
index b9dbd2d3b4a..b7aa09235b5 100644
--- a/arch/sh/kernel/process_64.c
+++ b/arch/sh/kernel/process_64.c
@@ -25,6 +25,7 @@
25#include <linux/module.h> 25#include <linux/module.h>
26#include <linux/proc_fs.h> 26#include <linux/proc_fs.h>
27#include <linux/io.h> 27#include <linux/io.h>
28#include <asm/syscalls.h>
28#include <asm/uaccess.h> 29#include <asm/uaccess.h>
29#include <asm/pgtable.h> 30#include <asm/pgtable.h>
30#include <asm/mmu_context.h> 31#include <asm/mmu_context.h>
@@ -395,6 +396,7 @@ ATTRIB_NORET void kernel_thread_helper(void *arg, int (*fn)(void *))
395int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) 396int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
396{ 397{
397 struct pt_regs regs; 398 struct pt_regs regs;
399 int pid;
398 400
399 memset(&regs, 0, sizeof(regs)); 401 memset(&regs, 0, sizeof(regs));
400 regs.regs[2] = (unsigned long)arg; 402 regs.regs[2] = (unsigned long)arg;
@@ -403,8 +405,13 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
403 regs.pc = (unsigned long)kernel_thread_helper; 405 regs.pc = (unsigned long)kernel_thread_helper;
404 regs.sr = (1 << 30); 406 regs.sr = (1 << 30);
405 407
406 return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, 408 /* Ok, create the new process.. */
407 &regs, 0, NULL, NULL); 409 pid = do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0,
410 &regs, 0, NULL, NULL);
411
412 trace_mark(kernel_arch_kthread_create, "pid %d fn %p", pid, fn);
413
414 return pid;
408} 415}
409 416
410/* 417/*
diff --git a/arch/sh/kernel/ptrace_32.c b/arch/sh/kernel/ptrace_32.c
index 035cb300d3d..29ca09d24ef 100644
--- a/arch/sh/kernel/ptrace_32.c
+++ b/arch/sh/kernel/ptrace_32.c
@@ -1,12 +1,14 @@
1/* 1/*
2 * linux/arch/sh/kernel/ptrace.c 2 * SuperH process tracing
3 * 3 *
4 * Original x86 implementation: 4 * Copyright (C) 1999, 2000 Kaz Kojima & Niibe Yutaka
5 * By Ross Biro 1/23/92 5 * Copyright (C) 2002 - 2008 Paul Mundt
6 * edited by Linus Torvalds
7 * 6 *
8 * SuperH version: Copyright (C) 1999, 2000 Kaz Kojima & Niibe Yutaka 7 * Audit support by Yuichi Nakamura <ynakam@hitachisoft.jp>
9 * Audit support: Yuichi Nakamura <ynakam@hitachisoft.jp> 8 *
9 * This file is subject to the terms and conditions of the GNU General Public
10 * License. See the file "COPYING" in the main directory of this archive
11 * for more details.
10 */ 12 */
11#include <linux/kernel.h> 13#include <linux/kernel.h>
12#include <linux/sched.h> 14#include <linux/sched.h>
@@ -22,16 +24,15 @@
22#include <linux/audit.h> 24#include <linux/audit.h>
23#include <linux/seccomp.h> 25#include <linux/seccomp.h>
24#include <linux/tracehook.h> 26#include <linux/tracehook.h>
27#include <linux/elf.h>
28#include <linux/regset.h>
25#include <asm/uaccess.h> 29#include <asm/uaccess.h>
26#include <asm/pgtable.h> 30#include <asm/pgtable.h>
27#include <asm/system.h> 31#include <asm/system.h>
28#include <asm/processor.h> 32#include <asm/processor.h>
29#include <asm/mmu_context.h> 33#include <asm/mmu_context.h>
30 34#include <asm/syscalls.h>
31/* 35#include <asm/fpu.h>
32 * does not yet catch signals sent when the child dies.
33 * in exit.c or in signal.c.
34 */
35 36
36/* 37/*
37 * This routine will get a word off of the process kernel stack. 38 * This routine will get a word off of the process kernel stack.
@@ -61,16 +62,12 @@ static inline int put_stack_long(struct task_struct *task, int offset,
61 62
62void user_enable_single_step(struct task_struct *child) 63void user_enable_single_step(struct task_struct *child)
63{ 64{
64 struct pt_regs *regs = task_pt_regs(child);
65 long pc;
66
67 pc = get_stack_long(child, (long)&regs->pc);
68
69 /* Next scheduling will set up UBC */ 65 /* Next scheduling will set up UBC */
70 if (child->thread.ubc_pc == 0) 66 if (child->thread.ubc_pc == 0)
71 ubc_usercnt += 1; 67 ubc_usercnt += 1;
72 68
73 child->thread.ubc_pc = pc; 69 child->thread.ubc_pc = get_stack_long(child,
70 offsetof(struct pt_regs, pc));
74 71
75 set_tsk_thread_flag(child, TIF_SINGLESTEP); 72 set_tsk_thread_flag(child, TIF_SINGLESTEP);
76} 73}
@@ -102,9 +99,213 @@ void ptrace_disable(struct task_struct *child)
102 user_disable_single_step(child); 99 user_disable_single_step(child);
103} 100}
104 101
102static int genregs_get(struct task_struct *target,
103 const struct user_regset *regset,
104 unsigned int pos, unsigned int count,
105 void *kbuf, void __user *ubuf)
106{
107 const struct pt_regs *regs = task_pt_regs(target);
108 int ret;
109
110 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf,
111 regs->regs,
112 0, 16 * sizeof(unsigned long));
113 if (!ret)
114 /* PC, PR, SR, GBR, MACH, MACL, TRA */
115 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf,
116 &regs->pc,
117 offsetof(struct pt_regs, pc),
118 sizeof(struct pt_regs));
119 if (!ret)
120 ret = user_regset_copyout_zero(&pos, &count, &kbuf, &ubuf,
121 sizeof(struct pt_regs), -1);
122
123 return ret;
124}
125
126static int genregs_set(struct task_struct *target,
127 const struct user_regset *regset,
128 unsigned int pos, unsigned int count,
129 const void *kbuf, const void __user *ubuf)
130{
131 struct pt_regs *regs = task_pt_regs(target);
132 int ret;
133
134 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
135 regs->regs,
136 0, 16 * sizeof(unsigned long));
137 if (!ret && count > 0)
138 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
139 &regs->pc,
140 offsetof(struct pt_regs, pc),
141 sizeof(struct pt_regs));
142 if (!ret)
143 ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf,
144 sizeof(struct pt_regs), -1);
145
146 return ret;
147}
148
149#ifdef CONFIG_SH_FPU
150int fpregs_get(struct task_struct *target,
151 const struct user_regset *regset,
152 unsigned int pos, unsigned int count,
153 void *kbuf, void __user *ubuf)
154{
155 int ret;
156
157 ret = init_fpu(target);
158 if (ret)
159 return ret;
160
161 if ((boot_cpu_data.flags & CPU_HAS_FPU))
162 return user_regset_copyout(&pos, &count, &kbuf, &ubuf,
163 &target->thread.fpu.hard, 0, -1);
164
165 return user_regset_copyout(&pos, &count, &kbuf, &ubuf,
166 &target->thread.fpu.soft, 0, -1);
167}
168
169static int fpregs_set(struct task_struct *target,
170 const struct user_regset *regset,
171 unsigned int pos, unsigned int count,
172 const void *kbuf, const void __user *ubuf)
173{
174 int ret;
175
176 ret = init_fpu(target);
177 if (ret)
178 return ret;
179
180 set_stopped_child_used_math(target);
181
182 if ((boot_cpu_data.flags & CPU_HAS_FPU))
183 return user_regset_copyin(&pos, &count, &kbuf, &ubuf,
184 &target->thread.fpu.hard, 0, -1);
185
186 return user_regset_copyin(&pos, &count, &kbuf, &ubuf,
187 &target->thread.fpu.soft, 0, -1);
188}
189
190static int fpregs_active(struct task_struct *target,
191 const struct user_regset *regset)
192{
193 return tsk_used_math(target) ? regset->n : 0;
194}
195#endif
196
197#ifdef CONFIG_SH_DSP
198static int dspregs_get(struct task_struct *target,
199 const struct user_regset *regset,
200 unsigned int pos, unsigned int count,
201 void *kbuf, void __user *ubuf)
202{
203 const struct pt_dspregs *regs = task_pt_dspregs(target);
204 int ret;
205
206 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, regs,
207 0, sizeof(struct pt_dspregs));
208 if (!ret)
209 ret = user_regset_copyout_zero(&pos, &count, &kbuf, &ubuf,
210 sizeof(struct pt_dspregs), -1);
211
212 return ret;
213}
214
215static int dspregs_set(struct task_struct *target,
216 const struct user_regset *regset,
217 unsigned int pos, unsigned int count,
218 const void *kbuf, const void __user *ubuf)
219{
220 struct pt_dspregs *regs = task_pt_dspregs(target);
221 int ret;
222
223 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, regs,
224 0, sizeof(struct pt_dspregs));
225 if (!ret)
226 ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf,
227 sizeof(struct pt_dspregs), -1);
228
229 return ret;
230}
231
232static int dspregs_active(struct task_struct *target,
233 const struct user_regset *regset)
234{
235 struct pt_regs *regs = task_pt_regs(target);
236
237 return regs->sr & SR_DSP ? regset->n : 0;
238}
239#endif
240
241/*
242 * These are our native regset flavours.
243 */
244enum sh_regset {
245 REGSET_GENERAL,
246#ifdef CONFIG_SH_FPU
247 REGSET_FPU,
248#endif
249#ifdef CONFIG_SH_DSP
250 REGSET_DSP,
251#endif
252};
253
254static const struct user_regset sh_regsets[] = {
255 /*
256 * Format is:
257 * R0 --> R15
258 * PC, PR, SR, GBR, MACH, MACL, TRA
259 */
260 [REGSET_GENERAL] = {
261 .core_note_type = NT_PRSTATUS,
262 .n = ELF_NGREG,
263 .size = sizeof(long),
264 .align = sizeof(long),
265 .get = genregs_get,
266 .set = genregs_set,
267 },
268
269#ifdef CONFIG_SH_FPU
270 [REGSET_FPU] = {
271 .core_note_type = NT_PRFPREG,
272 .n = sizeof(struct user_fpu_struct) / sizeof(long),
273 .size = sizeof(long),
274 .align = sizeof(long),
275 .get = fpregs_get,
276 .set = fpregs_set,
277 .active = fpregs_active,
278 },
279#endif
280
281#ifdef CONFIG_SH_DSP
282 [REGSET_DSP] = {
283 .n = sizeof(struct pt_dspregs) / sizeof(long),
284 .size = sizeof(long),
285 .align = sizeof(long),
286 .get = dspregs_get,
287 .set = dspregs_set,
288 .active = dspregs_active,
289 },
290#endif
291};
292
293static const struct user_regset_view user_sh_native_view = {
294 .name = "sh",
295 .e_machine = EM_SH,
296 .regsets = sh_regsets,
297 .n = ARRAY_SIZE(sh_regsets),
298};
299
300const struct user_regset_view *task_user_regset_view(struct task_struct *task)
301{
302 return &user_sh_native_view;
303}
304
105long arch_ptrace(struct task_struct *child, long request, long addr, long data) 305long arch_ptrace(struct task_struct *child, long request, long addr, long data)
106{ 306{
107 struct user * dummy = NULL; 307 struct user * dummy = NULL;
308 unsigned long __user *datap = (unsigned long __user *)data;
108 int ret; 309 int ret;
109 310
110 switch (request) { 311 switch (request) {
@@ -133,7 +334,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
133 tmp = !!tsk_used_math(child); 334 tmp = !!tsk_used_math(child);
134 else 335 else
135 tmp = 0; 336 tmp = 0;
136 ret = put_user(tmp, (unsigned long __user *)data); 337 ret = put_user(tmp, datap);
137 break; 338 break;
138 } 339 }
139 340
@@ -157,34 +358,39 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
157 } 358 }
158 break; 359 break;
159 360
361 case PTRACE_GETREGS:
362 return copy_regset_to_user(child, &user_sh_native_view,
363 REGSET_GENERAL,
364 0, sizeof(struct pt_regs),
365 (void __user *)data);
366 case PTRACE_SETREGS:
367 return copy_regset_from_user(child, &user_sh_native_view,
368 REGSET_GENERAL,
369 0, sizeof(struct pt_regs),
370 (const void __user *)data);
371#ifdef CONFIG_SH_FPU
372 case PTRACE_GETFPREGS:
373 return copy_regset_to_user(child, &user_sh_native_view,
374 REGSET_FPU,
375 0, sizeof(struct user_fpu_struct),
376 (void __user *)data);
377 case PTRACE_SETFPREGS:
378 return copy_regset_from_user(child, &user_sh_native_view,
379 REGSET_FPU,
380 0, sizeof(struct user_fpu_struct),
381 (const void __user *)data);
382#endif
160#ifdef CONFIG_SH_DSP 383#ifdef CONFIG_SH_DSP
161 case PTRACE_GETDSPREGS: { 384 case PTRACE_GETDSPREGS:
162 unsigned long dp; 385 return copy_regset_to_user(child, &user_sh_native_view,
163 386 REGSET_DSP,
164 ret = -EIO; 387 0, sizeof(struct pt_dspregs),
165 dp = ((unsigned long) child) + THREAD_SIZE - 388 (void __user *)data);
166 sizeof(struct pt_dspregs); 389 case PTRACE_SETDSPREGS:
167 if (*((int *) (dp - 4)) == SR_FD) { 390 return copy_regset_from_user(child, &user_sh_native_view,
168 copy_to_user((void *)addr, (void *) dp, 391 REGSET_DSP,
169 sizeof(struct pt_dspregs)); 392 0, sizeof(struct pt_dspregs),
170 ret = 0; 393 (const void __user *)data);
171 }
172 break;
173 }
174
175 case PTRACE_SETDSPREGS: {
176 unsigned long dp;
177
178 ret = -EIO;
179 dp = ((unsigned long) child) + THREAD_SIZE -
180 sizeof(struct pt_dspregs);
181 if (*((int *) (dp - 4)) == SR_FD) {
182 copy_from_user((void *) dp, (void *)addr,
183 sizeof(struct pt_dspregs));
184 ret = 0;
185 }
186 break;
187 }
188#endif 394#endif
189#ifdef CONFIG_BINFMT_ELF_FDPIC 395#ifdef CONFIG_BINFMT_ELF_FDPIC
190 case PTRACE_GETFDPIC: { 396 case PTRACE_GETFDPIC: {
@@ -202,7 +408,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
202 } 408 }
203 409
204 ret = 0; 410 ret = 0;
205 if (put_user(tmp, (unsigned long *) data)) { 411 if (put_user(tmp, datap)) {
206 ret = -EFAULT; 412 ret = -EFAULT;
207 break; 413 break;
208 } 414 }
diff --git a/arch/sh/kernel/ptrace_64.c b/arch/sh/kernel/ptrace_64.c
index 9c6424892bd..e15b099c1f0 100644
--- a/arch/sh/kernel/ptrace_64.c
+++ b/arch/sh/kernel/ptrace_64.c
@@ -35,6 +35,7 @@
35#include <asm/system.h> 35#include <asm/system.h>
36#include <asm/processor.h> 36#include <asm/processor.h>
37#include <asm/mmu_context.h> 37#include <asm/mmu_context.h>
38#include <asm/syscalls.h>
38#include <asm/fpu.h> 39#include <asm/fpu.h>
39 40
40/* This mask defines the bits of the SR which the user is not allowed to 41/* This mask defines the bits of the SR which the user is not allowed to
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
index de832056bf1..e7152cc6930 100644
--- a/arch/sh/kernel/setup.c
+++ b/arch/sh/kernel/setup.c
@@ -26,6 +26,9 @@
26#include <linux/err.h> 26#include <linux/err.h>
27#include <linux/debugfs.h> 27#include <linux/debugfs.h>
28#include <linux/crash_dump.h> 28#include <linux/crash_dump.h>
29#include <linux/mmzone.h>
30#include <linux/clk.h>
31#include <linux/delay.h>
29#include <asm/uaccess.h> 32#include <asm/uaccess.h>
30#include <asm/io.h> 33#include <asm/io.h>
31#include <asm/page.h> 34#include <asm/page.h>
@@ -144,6 +147,7 @@ static void __init reserve_crashkernel(void)
144{ 147{
145 unsigned long long free_mem; 148 unsigned long long free_mem;
146 unsigned long long crash_size, crash_base; 149 unsigned long long crash_size, crash_base;
150 void *vp;
147 int ret; 151 int ret;
148 152
149 free_mem = ((unsigned long long)max_low_pfn - min_low_pfn) << PAGE_SHIFT; 153 free_mem = ((unsigned long long)max_low_pfn - min_low_pfn) << PAGE_SHIFT;
@@ -152,12 +156,14 @@ static void __init reserve_crashkernel(void)
152 &crash_size, &crash_base); 156 &crash_size, &crash_base);
153 if (ret == 0 && crash_size) { 157 if (ret == 0 && crash_size) {
154 if (crash_base <= 0) { 158 if (crash_base <= 0) {
155 printk(KERN_INFO "crashkernel reservation failed - " 159 vp = alloc_bootmem_nopanic(crash_size);
156 "you have to specify a base address\n"); 160 if (!vp) {
157 return; 161 printk(KERN_INFO "crashkernel allocation "
158 } 162 "failed\n");
159 163 return;
160 if (reserve_bootmem(crash_base, crash_size, 164 }
165 crash_base = __pa(vp);
166 } else if (reserve_bootmem(crash_base, crash_size,
161 BOOTMEM_EXCLUSIVE) < 0) { 167 BOOTMEM_EXCLUSIVE) < 0) {
162 printk(KERN_INFO "crashkernel reservation failed - " 168 printk(KERN_INFO "crashkernel reservation failed - "
163 "memory is in use\n"); 169 "memory is in use\n");
@@ -179,6 +185,24 @@ static inline void __init reserve_crashkernel(void)
179{} 185{}
180#endif 186#endif
181 187
188#ifndef CONFIG_GENERIC_CALIBRATE_DELAY
189void __cpuinit calibrate_delay(void)
190{
191 struct clk *clk = clk_get(NULL, "cpu_clk");
192
193 if (IS_ERR(clk))
194 panic("Need a sane CPU clock definition!");
195
196 loops_per_jiffy = (clk_get_rate(clk) >> 1) / HZ;
197
198 printk(KERN_INFO "Calibrating delay loop (skipped)... "
199 "%lu.%02lu BogoMIPS PRESET (lpj=%lu)\n",
200 loops_per_jiffy/(500000/HZ),
201 (loops_per_jiffy/(5000/HZ)) % 100,
202 loops_per_jiffy);
203}
204#endif
205
182void __init __add_active_range(unsigned int nid, unsigned long start_pfn, 206void __init __add_active_range(unsigned int nid, unsigned long start_pfn,
183 unsigned long end_pfn) 207 unsigned long end_pfn)
184{ 208{
@@ -232,15 +256,17 @@ void __init setup_bootmem_allocator(unsigned long free_pfn)
232 * case of us accidentally initializing the bootmem allocator with 256 * case of us accidentally initializing the bootmem allocator with
233 * an invalid RAM area. 257 * an invalid RAM area.
234 */ 258 */
235 reserve_bootmem(__MEMORY_START+PAGE_SIZE, 259 reserve_bootmem(__MEMORY_START + CONFIG_ZERO_PAGE_OFFSET,
236 (PFN_PHYS(free_pfn)+bootmap_size+PAGE_SIZE-1)-__MEMORY_START, 260 (PFN_PHYS(free_pfn) + bootmap_size + PAGE_SIZE - 1) -
237 BOOTMEM_DEFAULT); 261 (__MEMORY_START + CONFIG_ZERO_PAGE_OFFSET),
262 BOOTMEM_DEFAULT);
238 263
239 /* 264 /*
240 * reserve physical page 0 - it's a special BIOS page on many boxes, 265 * reserve physical page 0 - it's a special BIOS page on many boxes,
241 * enabling clean reboots, SMP operation, laptop functions. 266 * enabling clean reboots, SMP operation, laptop functions.
242 */ 267 */
243 reserve_bootmem(__MEMORY_START, PAGE_SIZE, BOOTMEM_DEFAULT); 268 reserve_bootmem(__MEMORY_START, CONFIG_ZERO_PAGE_OFFSET,
269 BOOTMEM_DEFAULT);
244 270
245 sparse_memory_present_with_active_regions(0); 271 sparse_memory_present_with_active_regions(0);
246 272
@@ -248,17 +274,18 @@ void __init setup_bootmem_allocator(unsigned long free_pfn)
248 ROOT_DEV = Root_RAM0; 274 ROOT_DEV = Root_RAM0;
249 275
250 if (LOADER_TYPE && INITRD_START) { 276 if (LOADER_TYPE && INITRD_START) {
251 if (INITRD_START + INITRD_SIZE <= (max_low_pfn << PAGE_SHIFT)) { 277 unsigned long initrd_start_phys = INITRD_START + __MEMORY_START;
252 reserve_bootmem(INITRD_START + __MEMORY_START, 278
253 INITRD_SIZE, BOOTMEM_DEFAULT); 279 if (initrd_start_phys + INITRD_SIZE <= PFN_PHYS(max_low_pfn)) {
254 initrd_start = INITRD_START + PAGE_OFFSET + 280 reserve_bootmem(initrd_start_phys, INITRD_SIZE,
255 __MEMORY_START; 281 BOOTMEM_DEFAULT);
282 initrd_start = (unsigned long)__va(initrd_start_phys);
256 initrd_end = initrd_start + INITRD_SIZE; 283 initrd_end = initrd_start + INITRD_SIZE;
257 } else { 284 } else {
258 printk("initrd extends beyond end of memory " 285 printk("initrd extends beyond end of memory "
259 "(0x%08lx > 0x%08lx)\ndisabling initrd\n", 286 "(0x%08lx > 0x%08lx)\ndisabling initrd\n",
260 INITRD_START + INITRD_SIZE, 287 initrd_start_phys + INITRD_SIZE,
261 max_low_pfn << PAGE_SHIFT); 288 (unsigned long)PFN_PHYS(max_low_pfn));
262 initrd_start = 0; 289 initrd_start = 0;
263 } 290 }
264 } 291 }
@@ -530,6 +557,8 @@ struct dentry *sh_debugfs_root;
530static int __init sh_debugfs_init(void) 557static int __init sh_debugfs_init(void)
531{ 558{
532 sh_debugfs_root = debugfs_create_dir("sh", NULL); 559 sh_debugfs_root = debugfs_create_dir("sh", NULL);
560 if (!sh_debugfs_root)
561 return -ENOMEM;
533 if (IS_ERR(sh_debugfs_root)) 562 if (IS_ERR(sh_debugfs_root))
534 return PTR_ERR(sh_debugfs_root); 563 return PTR_ERR(sh_debugfs_root);
535 564
diff --git a/arch/sh/kernel/sh_ksyms_32.c b/arch/sh/kernel/sh_ksyms_32.c
index 6e1b1c27165..d917b7b4042 100644
--- a/arch/sh/kernel/sh_ksyms_32.c
+++ b/arch/sh/kernel/sh_ksyms_32.c
@@ -16,6 +16,7 @@
16#include <asm/delay.h> 16#include <asm/delay.h>
17#include <asm/tlbflush.h> 17#include <asm/tlbflush.h>
18#include <asm/cacheflush.h> 18#include <asm/cacheflush.h>
19#include <asm/ftrace.h>
19 20
20extern int dump_fpu(struct pt_regs *, elf_fpregset_t *); 21extern int dump_fpu(struct pt_regs *, elf_fpregset_t *);
21extern struct hw_interrupt_type no_irq_type; 22extern struct hw_interrupt_type no_irq_type;
@@ -133,6 +134,9 @@ EXPORT_SYMBOL(__flush_purge_region);
133EXPORT_SYMBOL(clear_user_page); 134EXPORT_SYMBOL(clear_user_page);
134#endif 135#endif
135 136
137#ifdef CONFIG_FTRACE
138EXPORT_SYMBOL(mcount);
139#endif
136EXPORT_SYMBOL(csum_partial); 140EXPORT_SYMBOL(csum_partial);
137EXPORT_SYMBOL(csum_partial_copy_generic); 141EXPORT_SYMBOL(csum_partial_copy_generic);
138#ifdef CONFIG_IPV6 142#ifdef CONFIG_IPV6
diff --git a/arch/sh/kernel/signal_32.c b/arch/sh/kernel/signal_32.c
index 51689d29ad4..69d09c0b349 100644
--- a/arch/sh/kernel/signal_32.c
+++ b/arch/sh/kernel/signal_32.c
@@ -30,6 +30,7 @@
30#include <asm/uaccess.h> 30#include <asm/uaccess.h>
31#include <asm/pgtable.h> 31#include <asm/pgtable.h>
32#include <asm/cacheflush.h> 32#include <asm/cacheflush.h>
33#include <asm/syscalls.h>
33#include <asm/fpu.h> 34#include <asm/fpu.h>
34 35
35#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) 36#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
@@ -215,6 +216,9 @@ asmlinkage int sys_sigreturn(unsigned long r4, unsigned long r5,
215 sigset_t set; 216 sigset_t set;
216 int r0; 217 int r0;
217 218
219 /* Always make any pending restarted system calls return -EINTR */
220 current_thread_info()->restart_block.fn = do_no_restart_syscall;
221
218 if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) 222 if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
219 goto badframe; 223 goto badframe;
220 224
@@ -247,9 +251,11 @@ asmlinkage int sys_rt_sigreturn(unsigned long r4, unsigned long r5,
247 struct pt_regs *regs = RELOC_HIDE(&__regs, 0); 251 struct pt_regs *regs = RELOC_HIDE(&__regs, 0);
248 struct rt_sigframe __user *frame = (struct rt_sigframe __user *)regs->regs[15]; 252 struct rt_sigframe __user *frame = (struct rt_sigframe __user *)regs->regs[15];
249 sigset_t set; 253 sigset_t set;
250 stack_t st;
251 int r0; 254 int r0;
252 255
256 /* Always make any pending restarted system calls return -EINTR */
257 current_thread_info()->restart_block.fn = do_no_restart_syscall;
258
253 if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) 259 if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
254 goto badframe; 260 goto badframe;
255 261
@@ -265,11 +271,9 @@ asmlinkage int sys_rt_sigreturn(unsigned long r4, unsigned long r5,
265 if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &r0)) 271 if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &r0))
266 goto badframe; 272 goto badframe;
267 273
268 if (__copy_from_user(&st, &frame->uc.uc_stack, sizeof(st))) 274 if (do_sigaltstack(&frame->uc.uc_stack, NULL,
275 regs->regs[15]) == -EFAULT)
269 goto badframe; 276 goto badframe;
270 /* It is more difficult to avoid calling this function than to
271 call it and ignore errors. */
272 do_sigaltstack((const stack_t __user *)&st, NULL, (unsigned long)frame);
273 277
274 return r0; 278 return r0;
275 279
@@ -429,7 +433,7 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
429 433
430 /* Create the ucontext. */ 434 /* Create the ucontext. */
431 err |= __put_user(0, &frame->uc.uc_flags); 435 err |= __put_user(0, &frame->uc.uc_flags);
432 err |= __put_user(0, &frame->uc.uc_link); 436 err |= __put_user(NULL, &frame->uc.uc_link);
433 err |= __put_user((void *)current->sas_ss_sp, 437 err |= __put_user((void *)current->sas_ss_sp,
434 &frame->uc.uc_stack.ss_sp); 438 &frame->uc.uc_stack.ss_sp);
435 err |= __put_user(sas_ss_flags(regs->regs[15]), 439 err |= __put_user(sas_ss_flags(regs->regs[15]),
@@ -492,37 +496,43 @@ give_sigsegv:
492 return -EFAULT; 496 return -EFAULT;
493} 497}
494 498
499static inline void
500handle_syscall_restart(unsigned long save_r0, struct pt_regs *regs,
501 struct sigaction *sa)
502{
503 /* If we're not from a syscall, bail out */
504 if (regs->tra < 0)
505 return;
506
507 /* check for system call restart.. */
508 switch (regs->regs[0]) {
509 case -ERESTART_RESTARTBLOCK:
510 case -ERESTARTNOHAND:
511 no_system_call_restart:
512 regs->regs[0] = -EINTR;
513 regs->sr |= 1;
514 break;
515
516 case -ERESTARTSYS:
517 if (!(sa->sa_flags & SA_RESTART))
518 goto no_system_call_restart;
519 /* fallthrough */
520 case -ERESTARTNOINTR:
521 regs->regs[0] = save_r0;
522 regs->pc -= instruction_size(ctrl_inw(regs->pc - 4));
523 break;
524 }
525}
526
495/* 527/*
496 * OK, we're invoking a handler 528 * OK, we're invoking a handler
497 */ 529 */
498
499static int 530static int
500handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info, 531handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
501 sigset_t *oldset, struct pt_regs *regs, unsigned int save_r0) 532 sigset_t *oldset, struct pt_regs *regs, unsigned int save_r0)
502{ 533{
503 int ret; 534 int ret;
504 535
505 /* Are we from a system call? */
506 if (regs->tra >= 0) {
507 /* If so, check system call restarting.. */
508 switch (regs->regs[0]) {
509 case -ERESTART_RESTARTBLOCK:
510 case -ERESTARTNOHAND:
511 no_system_call_restart:
512 regs->regs[0] = -EINTR;
513 break;
514
515 case -ERESTARTSYS:
516 if (!(ka->sa.sa_flags & SA_RESTART))
517 goto no_system_call_restart;
518 /* fallthrough */
519 case -ERESTARTNOINTR:
520 regs->regs[0] = save_r0;
521 regs->pc -= instruction_size(
522 ctrl_inw(regs->pc - 4));
523 break;
524 }
525 }
526 536
527 /* Set up the stack frame */ 537 /* Set up the stack frame */
528 if (ka->sa.sa_flags & SA_SIGINFO) 538 if (ka->sa.sa_flags & SA_SIGINFO)
@@ -580,6 +590,9 @@ static void do_signal(struct pt_regs *regs, unsigned int save_r0)
580 590
581 signr = get_signal_to_deliver(&info, &ka, regs, NULL); 591 signr = get_signal_to_deliver(&info, &ka, regs, NULL);
582 if (signr > 0) { 592 if (signr > 0) {
593 if (regs->sr & 1)
594 handle_syscall_restart(save_r0, regs, &ka.sa);
595
583 /* Whee! Actually deliver the signal. */ 596 /* Whee! Actually deliver the signal. */
584 if (handle_signal(signr, &ka, &info, oldset, 597 if (handle_signal(signr, &ka, &info, oldset,
585 regs, save_r0) == 0) { 598 regs, save_r0) == 0) {
diff --git a/arch/sh/kernel/signal_64.c b/arch/sh/kernel/signal_64.c
index 1d62dfef77f..ce3e851dffc 100644
--- a/arch/sh/kernel/signal_64.c
+++ b/arch/sh/kernel/signal_64.c
@@ -43,6 +43,10 @@
43 43
44#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) 44#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
45 45
46static void
47handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,
48 sigset_t *oldset, struct pt_regs * regs);
49
46/* 50/*
47 * Note that 'init' is a special process: it doesn't get signals it doesn't 51 * Note that 'init' is a special process: it doesn't get signals it doesn't
48 * want to handle. Thus you cannot kill init even with a SIGKILL even by 52 * want to handle. Thus you cannot kill init even with a SIGKILL even by
@@ -371,6 +375,9 @@ asmlinkage int sys_sigreturn(unsigned long r2, unsigned long r3,
371 sigset_t set; 375 sigset_t set;
372 long long ret; 376 long long ret;
373 377
378 /* Always make any pending restarted system calls return -EINTR */
379 current_thread_info()->restart_block.fn = do_no_restart_syscall;
380
374 if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) 381 if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
375 goto badframe; 382 goto badframe;
376 383
@@ -408,6 +415,9 @@ asmlinkage int sys_rt_sigreturn(unsigned long r2, unsigned long r3,
408 stack_t __user st; 415 stack_t __user st;
409 long long ret; 416 long long ret;
410 417
418 /* Always make any pending restarted system calls return -EINTR */
419 current_thread_info()->restart_block.fn = do_no_restart_syscall;
420
411 if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) 421 if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
412 goto badframe; 422 goto badframe;
413 423
@@ -535,7 +545,7 @@ static void setup_frame(int sig, struct k_sigaction *ka,
535 * On SH5 all edited pointers are subject to NEFF 545 * On SH5 all edited pointers are subject to NEFF
536 */ 546 */
537 DEREF_REG_PR = (DEREF_REG_PR & NEFF_SIGN) ? 547 DEREF_REG_PR = (DEREF_REG_PR & NEFF_SIGN) ?
538 (DEREF_REG_PR | NEFF_MASK) : DEREF_REG_PR; 548 (DEREF_REG_PR | NEFF_MASK) : DEREF_REG_PR;
539 } else { 549 } else {
540 /* 550 /*
541 * Different approach on SH5. 551 * Different approach on SH5.
@@ -550,10 +560,10 @@ static void setup_frame(int sig, struct k_sigaction *ka,
550 */ 560 */
551 DEREF_REG_PR = (unsigned long) frame->retcode | 0x01; 561 DEREF_REG_PR = (unsigned long) frame->retcode | 0x01;
552 DEREF_REG_PR = (DEREF_REG_PR & NEFF_SIGN) ? 562 DEREF_REG_PR = (DEREF_REG_PR & NEFF_SIGN) ?
553 (DEREF_REG_PR | NEFF_MASK) : DEREF_REG_PR; 563 (DEREF_REG_PR | NEFF_MASK) : DEREF_REG_PR;
554 564
555 if (__copy_to_user(frame->retcode, 565 if (__copy_to_user(frame->retcode,
556 (unsigned long long)sa_default_restorer & (~1), 16) != 0) 566 (void *)((unsigned long)sa_default_restorer & (~1)), 16) != 0)
557 goto give_sigsegv; 567 goto give_sigsegv;
558 568
559 /* Cohere the trampoline with the I-cache. */ 569 /* Cohere the trampoline with the I-cache. */
@@ -566,7 +576,7 @@ static void setup_frame(int sig, struct k_sigaction *ka,
566 */ 576 */
567 regs->regs[REG_SP] = (unsigned long) frame; 577 regs->regs[REG_SP] = (unsigned long) frame;
568 regs->regs[REG_SP] = (regs->regs[REG_SP] & NEFF_SIGN) ? 578 regs->regs[REG_SP] = (regs->regs[REG_SP] & NEFF_SIGN) ?
569 (regs->regs[REG_SP] | NEFF_MASK) : regs->regs[REG_SP]; 579 (regs->regs[REG_SP] | NEFF_MASK) : regs->regs[REG_SP];
570 regs->regs[REG_ARG1] = signal; /* Arg for signal handler */ 580 regs->regs[REG_ARG1] = signal; /* Arg for signal handler */
571 581
572 /* FIXME: 582 /* FIXME:
@@ -652,7 +662,7 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
652 * On SH5 all edited pointers are subject to NEFF 662 * On SH5 all edited pointers are subject to NEFF
653 */ 663 */
654 DEREF_REG_PR = (DEREF_REG_PR & NEFF_SIGN) ? 664 DEREF_REG_PR = (DEREF_REG_PR & NEFF_SIGN) ?
655 (DEREF_REG_PR | NEFF_MASK) : DEREF_REG_PR; 665 (DEREF_REG_PR | NEFF_MASK) : DEREF_REG_PR;
656 } else { 666 } else {
657 /* 667 /*
658 * Different approach on SH5. 668 * Different approach on SH5.
@@ -668,10 +678,10 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
668 678
669 DEREF_REG_PR = (unsigned long) frame->retcode | 0x01; 679 DEREF_REG_PR = (unsigned long) frame->retcode | 0x01;
670 DEREF_REG_PR = (DEREF_REG_PR & NEFF_SIGN) ? 680 DEREF_REG_PR = (DEREF_REG_PR & NEFF_SIGN) ?
671 (DEREF_REG_PR | NEFF_MASK) : DEREF_REG_PR; 681 (DEREF_REG_PR | NEFF_MASK) : DEREF_REG_PR;
672 682
673 if (__copy_to_user(frame->retcode, 683 if (__copy_to_user(frame->retcode,
674 (unsigned long long)sa_default_rt_restorer & (~1), 16) != 0) 684 (void *)((unsigned long)sa_default_rt_restorer & (~1)), 16) != 0)
675 goto give_sigsegv; 685 goto give_sigsegv;
676 686
677 flush_icache_range(DEREF_REG_PR-1, DEREF_REG_PR-1+15); 687 flush_icache_range(DEREF_REG_PR-1, DEREF_REG_PR-1+15);
@@ -683,7 +693,7 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
683 */ 693 */
684 regs->regs[REG_SP] = (unsigned long) frame; 694 regs->regs[REG_SP] = (unsigned long) frame;
685 regs->regs[REG_SP] = (regs->regs[REG_SP] & NEFF_SIGN) ? 695 regs->regs[REG_SP] = (regs->regs[REG_SP] & NEFF_SIGN) ?
686 (regs->regs[REG_SP] | NEFF_MASK) : regs->regs[REG_SP]; 696 (regs->regs[REG_SP] | NEFF_MASK) : regs->regs[REG_SP];
687 regs->regs[REG_ARG1] = signal; /* Arg for signal handler */ 697 regs->regs[REG_ARG1] = signal; /* Arg for signal handler */
688 regs->regs[REG_ARG2] = (unsigned long long)(unsigned long)(signed long)&frame->info; 698 regs->regs[REG_ARG2] = (unsigned long long)(unsigned long)(signed long)&frame->info;
689 regs->regs[REG_ARG3] = (unsigned long long)(unsigned long)(signed long)&frame->uc.uc_mcontext; 699 regs->regs[REG_ARG3] = (unsigned long long)(unsigned long)(signed long)&frame->uc.uc_mcontext;
diff --git a/arch/sh/kernel/smp.c b/arch/sh/kernel/smp.c
index 001778f9ada..508dfb02362 100644
--- a/arch/sh/kernel/smp.c
+++ b/arch/sh/kernel/smp.c
@@ -3,7 +3,7 @@
3 * 3 *
4 * SMP support for the SuperH processors. 4 * SMP support for the SuperH processors.
5 * 5 *
6 * Copyright (C) 2002 - 2007 Paul Mundt 6 * Copyright (C) 2002 - 2008 Paul Mundt
7 * Copyright (C) 2006 - 2007 Akio Idehara 7 * Copyright (C) 2006 - 2007 Akio Idehara
8 * 8 *
9 * This file is subject to the terms and conditions of the GNU General Public 9 * This file is subject to the terms and conditions of the GNU General Public
@@ -86,9 +86,12 @@ asmlinkage void __cpuinit start_secondary(void)
86 86
87 local_irq_enable(); 87 local_irq_enable();
88 88
89 cpu = smp_processor_id();
90
91 /* Enable local timers */
92 local_timer_setup(cpu);
89 calibrate_delay(); 93 calibrate_delay();
90 94
91 cpu = smp_processor_id();
92 smp_store_cpu_info(cpu); 95 smp_store_cpu_info(cpu);
93 96
94 cpu_set(cpu, cpu_online_map); 97 cpu_set(cpu, cpu_online_map);
@@ -186,6 +189,42 @@ void arch_send_call_function_single_ipi(int cpu)
186 plat_send_ipi(cpu, SMP_MSG_FUNCTION_SINGLE); 189 plat_send_ipi(cpu, SMP_MSG_FUNCTION_SINGLE);
187} 190}
188 191
192void smp_timer_broadcast(cpumask_t mask)
193{
194 int cpu;
195
196 for_each_cpu_mask(cpu, mask)
197 plat_send_ipi(cpu, SMP_MSG_TIMER);
198}
199
200static void ipi_timer(void)
201{
202 irq_enter();
203 local_timer_interrupt();
204 irq_exit();
205}
206
207void smp_message_recv(unsigned int msg)
208{
209 switch (msg) {
210 case SMP_MSG_FUNCTION:
211 generic_smp_call_function_interrupt();
212 break;
213 case SMP_MSG_RESCHEDULE:
214 break;
215 case SMP_MSG_FUNCTION_SINGLE:
216 generic_smp_call_function_single_interrupt();
217 break;
218 case SMP_MSG_TIMER:
219 ipi_timer();
220 break;
221 default:
222 printk(KERN_WARNING "SMP %d: %s(): unknown IPI %d\n",
223 smp_processor_id(), __func__, msg);
224 break;
225 }
226}
227
189/* Not really SMP stuff ... */ 228/* Not really SMP stuff ... */
190int setup_profiling_timer(unsigned int multiplier) 229int setup_profiling_timer(unsigned int multiplier)
191{ 230{
diff --git a/arch/sh/kernel/stacktrace.c b/arch/sh/kernel/stacktrace.c
index 54d1f61aa00..1a2a5eb76e4 100644
--- a/arch/sh/kernel/stacktrace.c
+++ b/arch/sh/kernel/stacktrace.c
@@ -3,7 +3,7 @@
3 * 3 *
4 * Stack trace management functions 4 * Stack trace management functions
5 * 5 *
6 * Copyright (C) 2006 Paul Mundt 6 * Copyright (C) 2006 - 2008 Paul Mundt
7 * 7 *
8 * This file is subject to the terms and conditions of the GNU General Public 8 * This file is subject to the terms and conditions of the GNU General Public
9 * License. See the file "COPYING" in the main directory of this archive 9 * License. See the file "COPYING" in the main directory of this archive
@@ -36,3 +36,24 @@ void save_stack_trace(struct stack_trace *trace)
36 } 36 }
37} 37}
38EXPORT_SYMBOL_GPL(save_stack_trace); 38EXPORT_SYMBOL_GPL(save_stack_trace);
39
40void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
41{
42 unsigned long *sp = (unsigned long *)tsk->thread.sp;
43
44 while (!kstack_end(sp)) {
45 unsigned long addr = *sp++;
46
47 if (__kernel_text_address(addr)) {
48 if (in_sched_functions(addr))
49 break;
50 if (trace->skip > 0)
51 trace->skip--;
52 else
53 trace->entries[trace->nr_entries++] = addr;
54 if (trace->nr_entries >= trace->max_entries)
55 break;
56 }
57 }
58}
59EXPORT_SYMBOL_GPL(save_stack_trace_tsk);
diff --git a/arch/sh/kernel/sys_sh.c b/arch/sh/kernel/sys_sh.c
index 9061b86d73f..38f098c9c72 100644
--- a/arch/sh/kernel/sys_sh.c
+++ b/arch/sh/kernel/sys_sh.c
@@ -23,6 +23,7 @@
23#include <linux/fs.h> 23#include <linux/fs.h>
24#include <linux/ipc.h> 24#include <linux/ipc.h>
25#include <asm/cacheflush.h> 25#include <asm/cacheflush.h>
26#include <asm/syscalls.h>
26#include <asm/uaccess.h> 27#include <asm/uaccess.h>
27#include <asm/unistd.h> 28#include <asm/unistd.h>
28 29
@@ -170,6 +171,8 @@ asmlinkage int sys_ipc(uint call, int first, int second,
170 version = call >> 16; /* hack for backward compatibility */ 171 version = call >> 16; /* hack for backward compatibility */
171 call &= 0xffff; 172 call &= 0xffff;
172 173
174 trace_mark(kernel_arch_ipc_call, "call %u first %d", call, first);
175
173 if (call <= SEMTIMEDOP) 176 if (call <= SEMTIMEDOP)
174 switch (call) { 177 switch (call) {
175 case SEMOP: 178 case SEMOP:
@@ -186,7 +189,7 @@ asmlinkage int sys_ipc(uint call, int first, int second,
186 union semun fourth; 189 union semun fourth;
187 if (!ptr) 190 if (!ptr)
188 return -EINVAL; 191 return -EINVAL;
189 if (get_user(fourth.__pad, (void * __user *) ptr)) 192 if (get_user(fourth.__pad, (void __user * __user *) ptr))
190 return -EFAULT; 193 return -EFAULT;
191 return sys_semctl (first, second, third, fourth); 194 return sys_semctl (first, second, third, fourth);
192 } 195 }
@@ -261,13 +264,13 @@ asmlinkage int sys_ipc(uint call, int first, int second,
261 return -EINVAL; 264 return -EINVAL;
262} 265}
263 266
264asmlinkage int sys_uname(struct old_utsname * name) 267asmlinkage int sys_uname(struct old_utsname __user *name)
265{ 268{
266 int err; 269 int err;
267 if (!name) 270 if (!name)
268 return -EFAULT; 271 return -EFAULT;
269 down_read(&uts_sem); 272 down_read(&uts_sem);
270 err = copy_to_user(name, utsname(), sizeof (*name)); 273 err = copy_to_user(name, utsname(), sizeof(*name));
271 up_read(&uts_sem); 274 up_read(&uts_sem);
272 return err?-EFAULT:0; 275 return err?-EFAULT:0;
273} 276}
diff --git a/arch/sh/kernel/sys_sh32.c b/arch/sh/kernel/sys_sh32.c
index f0aa5c39865..dbba1e1833d 100644
--- a/arch/sh/kernel/sys_sh32.c
+++ b/arch/sh/kernel/sys_sh32.c
@@ -16,6 +16,7 @@
16#include <asm/cacheflush.h> 16#include <asm/cacheflush.h>
17#include <asm/uaccess.h> 17#include <asm/uaccess.h>
18#include <asm/unistd.h> 18#include <asm/unistd.h>
19#include <asm/syscalls.h>
19 20
20/* 21/*
21 * sys_pipe() is the normal C calling standard for creating 22 * sys_pipe() is the normal C calling standard for creating
@@ -37,13 +38,13 @@ asmlinkage int sys_pipe(unsigned long r4, unsigned long r5,
37 return error; 38 return error;
38} 39}
39 40
40asmlinkage ssize_t sys_pread_wrapper(unsigned int fd, char * buf, 41asmlinkage ssize_t sys_pread_wrapper(unsigned int fd, char __user *buf,
41 size_t count, long dummy, loff_t pos) 42 size_t count, long dummy, loff_t pos)
42{ 43{
43 return sys_pread64(fd, buf, count, pos); 44 return sys_pread64(fd, buf, count, pos);
44} 45}
45 46
46asmlinkage ssize_t sys_pwrite_wrapper(unsigned int fd, const char * buf, 47asmlinkage ssize_t sys_pwrite_wrapper(unsigned int fd, const char __user *buf,
47 size_t count, long dummy, loff_t pos) 48 size_t count, long dummy, loff_t pos)
48{ 49{
49 return sys_pwrite64(fd, buf, count, pos); 50 return sys_pwrite64(fd, buf, count, pos);
diff --git a/arch/sh/kernel/time_32.c b/arch/sh/kernel/time_32.c
index 0758b5ee818..23ca711c27d 100644
--- a/arch/sh/kernel/time_32.c
+++ b/arch/sh/kernel/time_32.c
@@ -1,9 +1,9 @@
1/* 1/*
2 * arch/sh/kernel/time.c 2 * arch/sh/kernel/time_32.c
3 * 3 *
4 * Copyright (C) 1999 Tetsuya Okada & Niibe Yutaka 4 * Copyright (C) 1999 Tetsuya Okada & Niibe Yutaka
5 * Copyright (C) 2000 Philipp Rumpf <prumpf@tux.org> 5 * Copyright (C) 2000 Philipp Rumpf <prumpf@tux.org>
6 * Copyright (C) 2002 - 2007 Paul Mundt 6 * Copyright (C) 2002 - 2008 Paul Mundt
7 * Copyright (C) 2002 M. R. Brown <mrbrown@linux-sh.org> 7 * Copyright (C) 2002 M. R. Brown <mrbrown@linux-sh.org>
8 * 8 *
9 * Some code taken from i386 version. 9 * Some code taken from i386 version.
@@ -16,6 +16,8 @@
16#include <linux/timex.h> 16#include <linux/timex.h>
17#include <linux/sched.h> 17#include <linux/sched.h>
18#include <linux/clockchips.h> 18#include <linux/clockchips.h>
19#include <linux/mc146818rtc.h> /* for rtc_lock */
20#include <linux/smp.h>
19#include <asm/clock.h> 21#include <asm/clock.h>
20#include <asm/rtc.h> 22#include <asm/rtc.h>
21#include <asm/timer.h> 23#include <asm/timer.h>
@@ -253,6 +255,10 @@ void __init time_init(void)
253 set_normalized_timespec(&wall_to_monotonic, 255 set_normalized_timespec(&wall_to_monotonic,
254 -xtime.tv_sec, -xtime.tv_nsec); 256 -xtime.tv_sec, -xtime.tv_nsec);
255 257
258#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
259 local_timer_setup(smp_processor_id());
260#endif
261
256 /* 262 /*
257 * Find the timer to use as the system timer, it will be 263 * Find the timer to use as the system timer, it will be
258 * initialized for us. 264 * initialized for us.
@@ -260,6 +266,7 @@ void __init time_init(void)
260 sys_timer = get_sys_timer(); 266 sys_timer = get_sys_timer();
261 printk(KERN_INFO "Using %s for system timer\n", sys_timer->name); 267 printk(KERN_INFO "Using %s for system timer\n", sys_timer->name);
262 268
269
263 if (sys_timer->ops->read) 270 if (sys_timer->ops->read)
264 clocksource_sh.read = sys_timer->ops->read; 271 clocksource_sh.read = sys_timer->ops->read;
265 272
diff --git a/arch/sh/kernel/time_64.c b/arch/sh/kernel/time_64.c
index 791edabf7d8..bbb2af1004d 100644
--- a/arch/sh/kernel/time_64.c
+++ b/arch/sh/kernel/time_64.c
@@ -39,6 +39,7 @@
39#include <asm/processor.h> 39#include <asm/processor.h>
40#include <asm/uaccess.h> 40#include <asm/uaccess.h>
41#include <asm/delay.h> 41#include <asm/delay.h>
42#include <asm/clock.h>
42 43
43#define TMU_TOCR_INIT 0x00 44#define TMU_TOCR_INIT 0x00
44#define TMU0_TCR_INIT 0x0020 45#define TMU0_TCR_INIT 0x0020
@@ -51,14 +52,6 @@
51#define RTC_RCR1_CIE 0x10 /* Carry Interrupt Enable */ 52#define RTC_RCR1_CIE 0x10 /* Carry Interrupt Enable */
52#define RTC_RCR1 (rtc_base + 0x38) 53#define RTC_RCR1 (rtc_base + 0x38)
53 54
54/* Clock, Power and Reset Controller */
55#define CPRC_BLOCK_OFF 0x01010000
56#define CPRC_BASE PHYS_PERIPHERAL_BLOCK + CPRC_BLOCK_OFF
57
58#define FRQCR (cprc_base+0x0)
59#define WTCSR (cprc_base+0x0018)
60#define STBCR (cprc_base+0x0030)
61
62/* Time Management Unit */ 55/* Time Management Unit */
63#define TMU_BLOCK_OFF 0x01020000 56#define TMU_BLOCK_OFF 0x01020000
64#define TMU_BASE PHYS_PERIPHERAL_BLOCK + TMU_BLOCK_OFF 57#define TMU_BASE PHYS_PERIPHERAL_BLOCK + TMU_BLOCK_OFF
@@ -293,103 +286,17 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id)
293 return IRQ_HANDLED; 286 return IRQ_HANDLED;
294} 287}
295 288
296
297static __init unsigned int get_cpu_hz(void)
298{
299 unsigned int count;
300 unsigned long __dummy;
301 unsigned long ctc_val_init, ctc_val;
302
303 /*
304 ** Regardless the toolchain, force the compiler to use the
305 ** arbitrary register r3 as a clock tick counter.
306 ** NOTE: r3 must be in accordance with sh64_rtc_interrupt()
307 */
308 register unsigned long long __rtc_irq_flag __asm__ ("r3");
309
310 local_irq_enable();
311 do {} while (ctrl_inb(rtc_base) != 0);
312 ctrl_outb(RTC_RCR1_CIE, RTC_RCR1); /* Enable carry interrupt */
313
314 /*
315 * r3 is arbitrary. CDC does not support "=z".
316 */
317 ctc_val_init = 0xffffffff;
318 ctc_val = ctc_val_init;
319
320 asm volatile("gettr tr0, %1\n\t"
321 "putcon %0, " __CTC "\n\t"
322 "and %2, r63, %2\n\t"
323 "pta $+4, tr0\n\t"
324 "beq/l %2, r63, tr0\n\t"
325 "ptabs %1, tr0\n\t"
326 "getcon " __CTC ", %0\n\t"
327 : "=r"(ctc_val), "=r" (__dummy), "=r" (__rtc_irq_flag)
328 : "0" (0));
329 local_irq_disable();
330 /*
331 * SH-3:
332 * CPU clock = 4 stages * loop
333 * tst rm,rm if id ex
334 * bt/s 1b if id ex
335 * add #1,rd if id ex
336 * (if) pipe line stole
337 * tst rm,rm if id ex
338 * ....
339 *
340 *
341 * SH-4:
342 * CPU clock = 6 stages * loop
343 * I don't know why.
344 * ....
345 *
346 * SH-5:
347 * Use CTC register to count. This approach returns the right value
348 * even if the I-cache is disabled (e.g. whilst debugging.)
349 *
350 */
351
352 count = ctc_val_init - ctc_val; /* CTC counts down */
353
354 /*
355 * This really is count by the number of clock cycles
356 * by the ratio between a complete R64CNT
357 * wrap-around (128) and CUI interrupt being raised (64).
358 */
359 return count*2;
360}
361
362static irqreturn_t sh64_rtc_interrupt(int irq, void *dev_id)
363{
364 struct pt_regs *regs = get_irq_regs();
365
366 ctrl_outb(0, RTC_RCR1); /* Disable Carry Interrupts */
367 regs->regs[3] = 1; /* Using r3 */
368
369 return IRQ_HANDLED;
370}
371
372static struct irqaction irq0 = { 289static struct irqaction irq0 = {
373 .handler = timer_interrupt, 290 .handler = timer_interrupt,
374 .flags = IRQF_DISABLED, 291 .flags = IRQF_DISABLED,
375 .mask = CPU_MASK_NONE, 292 .mask = CPU_MASK_NONE,
376 .name = "timer", 293 .name = "timer",
377}; 294};
378static struct irqaction irq1 = {
379 .handler = sh64_rtc_interrupt,
380 .flags = IRQF_DISABLED,
381 .mask = CPU_MASK_NONE,
382 .name = "rtc",
383};
384 295
385void __init time_init(void) 296void __init time_init(void)
386{ 297{
387 unsigned int cpu_clock, master_clock, bus_clock, module_clock;
388 unsigned long interval; 298 unsigned long interval;
389 unsigned long frqcr, ifc, pfc; 299 struct clk *clk;
390 static int ifc_table[] = { 2, 4, 6, 8, 10, 12, 16, 24 };
391#define bfc_table ifc_table /* Same */
392#define pfc_table ifc_table /* Same */
393 300
394 tmu_base = onchip_remap(TMU_BASE, 1024, "TMU"); 301 tmu_base = onchip_remap(TMU_BASE, 1024, "TMU");
395 if (!tmu_base) { 302 if (!tmu_base) {
@@ -401,50 +308,19 @@ void __init time_init(void)
401 panic("Unable to remap RTC\n"); 308 panic("Unable to remap RTC\n");
402 } 309 }
403 310
404 cprc_base = onchip_remap(CPRC_BASE, 1024, "CPRC"); 311 clk = clk_get(NULL, "cpu_clk");
405 if (!cprc_base) { 312 scaled_recip_ctc_ticks_per_jiffy = ((1ULL << CTC_JIFFY_SCALE_SHIFT) /
406 panic("Unable to remap CPRC\n"); 313 (unsigned long long)(clk_get_rate(clk) / HZ));
407 }
408 314
409 rtc_sh_get_time(&xtime); 315 rtc_sh_get_time(&xtime);
410 316
411 setup_irq(TIMER_IRQ, &irq0); 317 setup_irq(TIMER_IRQ, &irq0);
412 setup_irq(RTC_IRQ, &irq1);
413
414 /* Check how fast it is.. */
415 cpu_clock = get_cpu_hz();
416
417 /* Note careful order of operations to maintain reasonable precision and avoid overflow. */
418 scaled_recip_ctc_ticks_per_jiffy = ((1ULL << CTC_JIFFY_SCALE_SHIFT) / (unsigned long long)(cpu_clock / HZ));
419
420 free_irq(RTC_IRQ, NULL);
421
422 printk("CPU clock: %d.%02dMHz\n",
423 (cpu_clock / 1000000), (cpu_clock % 1000000)/10000);
424 {
425 unsigned short bfc;
426 frqcr = ctrl_inl(FRQCR);
427 ifc = ifc_table[(frqcr>> 6) & 0x0007];
428 bfc = bfc_table[(frqcr>> 3) & 0x0007];
429 pfc = pfc_table[(frqcr>> 12) & 0x0007];
430 master_clock = cpu_clock * ifc;
431 bus_clock = master_clock/bfc;
432 }
433 318
434 printk("Bus clock: %d.%02dMHz\n", 319 clk = clk_get(NULL, "module_clk");
435 (bus_clock/1000000), (bus_clock % 1000000)/10000); 320 interval = (clk_get_rate(clk)/(HZ*4));
436 module_clock = master_clock/pfc;
437 printk("Module clock: %d.%02dMHz\n",
438 (module_clock/1000000), (module_clock % 1000000)/10000);
439 interval = (module_clock/(HZ*4));
440 321
441 printk("Interval = %ld\n", interval); 322 printk("Interval = %ld\n", interval);
442 323
443 current_cpu_data.cpu_clock = cpu_clock;
444 current_cpu_data.master_clock = master_clock;
445 current_cpu_data.bus_clock = bus_clock;
446 current_cpu_data.module_clock = module_clock;
447
448 /* Start TMU0 */ 324 /* Start TMU0 */
449 ctrl_outb(TMU_TSTR_OFF, TMU_TSTR); 325 ctrl_outb(TMU_TSTR_OFF, TMU_TSTR);
450 ctrl_outb(TMU_TOCR_INIT, TMU_TOCR); 326 ctrl_outb(TMU_TOCR_INIT, TMU_TOCR);
@@ -454,36 +330,6 @@ void __init time_init(void)
454 ctrl_outb(TMU_TSTR_INIT, TMU_TSTR); 330 ctrl_outb(TMU_TSTR_INIT, TMU_TSTR);
455} 331}
456 332
457void enter_deep_standby(void)
458{
459 /* Disable watchdog timer */
460 ctrl_outl(0xa5000000, WTCSR);
461 /* Configure deep standby on sleep */
462 ctrl_outl(0x03, STBCR);
463
464#ifdef CONFIG_SH_ALPHANUMERIC
465 {
466 extern void mach_alphanum(int position, unsigned char value);
467 extern void mach_alphanum_brightness(int setting);
468 char halted[] = "Halted. ";
469 int i;
470 mach_alphanum_brightness(6); /* dimmest setting above off */
471 for (i=0; i<8; i++) {
472 mach_alphanum(i, halted[i]);
473 }
474 asm __volatile__ ("synco");
475 }
476#endif
477
478 asm __volatile__ ("sleep");
479 asm __volatile__ ("synci");
480 asm __volatile__ ("nop");
481 asm __volatile__ ("nop");
482 asm __volatile__ ("nop");
483 asm __volatile__ ("nop");
484 panic("Unexpected wakeup!\n");
485}
486
487static struct resource rtc_resources[] = { 333static struct resource rtc_resources[] = {
488 [0] = { 334 [0] = {
489 /* RTC base, filled in by rtc_init */ 335 /* RTC base, filled in by rtc_init */
diff --git a/arch/sh/kernel/timers/Makefile b/arch/sh/kernel/timers/Makefile
index bcf244ff6a1..0b7f8577193 100644
--- a/arch/sh/kernel/timers/Makefile
+++ b/arch/sh/kernel/timers/Makefile
@@ -8,3 +8,4 @@ obj-$(CONFIG_SH_TMU) += timer-tmu.o
8obj-$(CONFIG_SH_MTU2) += timer-mtu2.o 8obj-$(CONFIG_SH_MTU2) += timer-mtu2.o
9obj-$(CONFIG_SH_CMT) += timer-cmt.o 9obj-$(CONFIG_SH_CMT) += timer-cmt.o
10 10
11obj-$(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST) += timer-broadcast.o
diff --git a/arch/sh/kernel/timers/timer-broadcast.c b/arch/sh/kernel/timers/timer-broadcast.c
new file mode 100644
index 00000000000..c2317635230
--- /dev/null
+++ b/arch/sh/kernel/timers/timer-broadcast.c
@@ -0,0 +1,57 @@
1/*
2 * Dummy local timer
3 *
4 * Copyright (C) 2008 Paul Mundt
5 *
6 * cloned from:
7 *
8 * linux/arch/arm/mach-realview/localtimer.c
9 *
10 * Copyright (C) 2002 ARM Ltd.
11 * All Rights Reserved
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License version 2 as
15 * published by the Free Software Foundation.
16 */
17#include <linux/init.h>
18#include <linux/kernel.h>
19#include <linux/delay.h>
20#include <linux/device.h>
21#include <linux/smp.h>
22#include <linux/jiffies.h>
23#include <linux/percpu.h>
24#include <linux/clockchips.h>
25#include <linux/irq.h>
26
27static DEFINE_PER_CPU(struct clock_event_device, local_clockevent);
28
29/*
30 * Used on SMP for either the local timer or SMP_MSG_TIMER
31 */
32void local_timer_interrupt(void)
33{
34 struct clock_event_device *clk = &__get_cpu_var(local_clockevent);
35
36 clk->event_handler(clk);
37}
38
39static void dummy_timer_set_mode(enum clock_event_mode mode,
40 struct clock_event_device *clk)
41{
42}
43
44void __cpuinit local_timer_setup(unsigned int cpu)
45{
46 struct clock_event_device *clk = &per_cpu(local_clockevent, cpu);
47
48 clk->name = "dummy_timer";
49 clk->features = CLOCK_EVT_FEAT_DUMMY;
50 clk->rating = 200;
51 clk->mult = 1;
52 clk->set_mode = dummy_timer_set_mode;
53 clk->broadcast = smp_timer_broadcast;
54 clk->cpumask = cpumask_of_cpu(cpu);
55
56 clockevents_register_device(clk);
57}
diff --git a/arch/sh/kernel/timers/timer-cmt.c b/arch/sh/kernel/timers/timer-cmt.c
index d20c8c37588..c127293271e 100644
--- a/arch/sh/kernel/timers/timer-cmt.c
+++ b/arch/sh/kernel/timers/timer-cmt.c
@@ -174,7 +174,7 @@ static int cmt_timer_init(void)
174 return 0; 174 return 0;
175} 175}
176 176
177struct sys_timer_ops cmt_timer_ops = { 177static struct sys_timer_ops cmt_timer_ops = {
178 .init = cmt_timer_init, 178 .init = cmt_timer_init,
179 .start = cmt_timer_start, 179 .start = cmt_timer_start,
180 .stop = cmt_timer_stop, 180 .stop = cmt_timer_stop,
diff --git a/arch/sh/kernel/timers/timer-tmu.c b/arch/sh/kernel/timers/timer-tmu.c
index 1ca9ad49b54..aaaf90d06b8 100644
--- a/arch/sh/kernel/timers/timer-tmu.c
+++ b/arch/sh/kernel/timers/timer-tmu.c
@@ -28,43 +28,90 @@
28#define TMU_TOCR_INIT 0x00 28#define TMU_TOCR_INIT 0x00
29#define TMU_TCR_INIT 0x0020 29#define TMU_TCR_INIT 0x0020
30 30
31static int tmu_timer_start(void) 31#define TMU0 (0)
32#define TMU1 (1)
33
34static inline void _tmu_start(int tmu_num)
32{ 35{
33 ctrl_outb(ctrl_inb(TMU_012_TSTR) | 0x3, TMU_012_TSTR); 36 ctrl_outb(ctrl_inb(TMU_012_TSTR) | (0x1<<tmu_num), TMU_012_TSTR);
34 return 0;
35} 37}
36 38
37static void tmu0_timer_set_interval(unsigned long interval, unsigned int reload) 39static inline void _tmu_set_irq(int tmu_num, int enabled)
38{ 40{
39 ctrl_outl(interval, TMU0_TCNT); 41 register unsigned long tmu_tcr = TMU0_TCR + (0xc*tmu_num);
42 ctrl_outw( (enabled ? ctrl_inw(tmu_tcr) | (1<<5) : ctrl_inw(tmu_tcr) & ~(1<<5)), tmu_tcr);
43}
40 44
41 /* 45static inline void _tmu_stop(int tmu_num)
42 * TCNT reloads from TCOR on underflow, clear it if we don't 46{
43 * intend to auto-reload 47 ctrl_outb(ctrl_inb(TMU_012_TSTR) & ~(0x1<<tmu_num), TMU_012_TSTR);
44 */ 48}
45 if (reload) 49
46 ctrl_outl(interval, TMU0_TCOR); 50static inline void _tmu_clear_status(int tmu_num)
47 else 51{
48 ctrl_outl(0, TMU0_TCOR); 52 register unsigned long tmu_tcr = TMU0_TCR + (0xc*tmu_num);
53 /* Clear UNF bit */
54 ctrl_outw(ctrl_inw(tmu_tcr) & ~0x100, tmu_tcr);
55}
49 56
50 tmu_timer_start(); 57static inline unsigned long _tmu_read(int tmu_num)
58{
59 return ctrl_inl(TMU0_TCNT+0xC*tmu_num);
60}
61
62static int tmu_timer_start(void)
63{
64 _tmu_start(TMU0);
65 _tmu_start(TMU1);
66 _tmu_set_irq(TMU0,1);
67 return 0;
51} 68}
52 69
53static int tmu_timer_stop(void) 70static int tmu_timer_stop(void)
54{ 71{
55 ctrl_outb(ctrl_inb(TMU_012_TSTR) & ~0x3, TMU_012_TSTR); 72 _tmu_stop(TMU0);
73 _tmu_stop(TMU1);
74 _tmu_clear_status(TMU0);
56 return 0; 75 return 0;
57} 76}
58 77
78/*
79 * also when the module_clk is scaled the TMU1
80 * will show the same frequency
81 */
82static int tmus_are_scaled;
83
59static cycle_t tmu_timer_read(void) 84static cycle_t tmu_timer_read(void)
60{ 85{
61 return ~ctrl_inl(TMU1_TCNT); 86 return ((cycle_t)(~_tmu_read(TMU1)))<<tmus_are_scaled;
87}
88
89
90static unsigned long tmu_latest_interval[3];
91static void tmu_timer_set_interval(int tmu_num, unsigned long interval, unsigned int reload)
92{
93 unsigned long tmu_tcnt = TMU0_TCNT + tmu_num*0xC;
94 unsigned long tmu_tcor = TMU0_TCOR + tmu_num*0xC;
95
96 _tmu_stop(tmu_num);
97
98 ctrl_outl(interval, tmu_tcnt);
99 tmu_latest_interval[tmu_num] = interval;
100
101 /*
102 * TCNT reloads from TCOR on underflow, clear it if we don't
103 * intend to auto-reload
104 */
105 ctrl_outl( reload ? interval : 0 , tmu_tcor);
106
107 _tmu_start(tmu_num);
62} 108}
63 109
64static int tmu_set_next_event(unsigned long cycles, 110static int tmu_set_next_event(unsigned long cycles,
65 struct clock_event_device *evt) 111 struct clock_event_device *evt)
66{ 112{
67 tmu0_timer_set_interval(cycles, 1); 113 tmu_timer_set_interval(TMU0,cycles, evt->mode == CLOCK_EVT_MODE_PERIODIC);
114 _tmu_set_irq(TMU0,1);
68 return 0; 115 return 0;
69} 116}
70 117
@@ -96,12 +143,8 @@ static struct clock_event_device tmu0_clockevent = {
96static irqreturn_t tmu_timer_interrupt(int irq, void *dummy) 143static irqreturn_t tmu_timer_interrupt(int irq, void *dummy)
97{ 144{
98 struct clock_event_device *evt = &tmu0_clockevent; 145 struct clock_event_device *evt = &tmu0_clockevent;
99 unsigned long timer_status; 146 _tmu_clear_status(TMU0);
100 147 _tmu_set_irq(TMU0,tmu0_clockevent.mode != CLOCK_EVT_MODE_ONESHOT);
101 /* Clear UNF bit */
102 timer_status = ctrl_inw(TMU0_TCR);
103 timer_status &= ~0x100;
104 ctrl_outw(timer_status, TMU0_TCR);
105 148
106 evt->event_handler(evt); 149 evt->event_handler(evt);
107 150
@@ -109,56 +152,73 @@ static irqreturn_t tmu_timer_interrupt(int irq, void *dummy)
109} 152}
110 153
111static struct irqaction tmu0_irq = { 154static struct irqaction tmu0_irq = {
112 .name = "periodic timer", 155 .name = "periodic/oneshot timer",
113 .handler = tmu_timer_interrupt, 156 .handler = tmu_timer_interrupt,
114 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, 157 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
115 .mask = CPU_MASK_NONE, 158 .mask = CPU_MASK_NONE,
116}; 159};
117 160
118static void tmu0_clk_init(struct clk *clk) 161static void __init tmu_clk_init(struct clk *clk)
119{ 162{
120 u8 divisor = TMU_TCR_INIT & 0x7; 163 u8 divisor = TMU_TCR_INIT & 0x7;
121 ctrl_outw(TMU_TCR_INIT, TMU0_TCR); 164 int tmu_num = clk->name[3]-'0';
122 clk->rate = clk->parent->rate / (4 << (divisor << 1)); 165 ctrl_outw(TMU_TCR_INIT, TMU0_TCR+(tmu_num*0xC));
166 clk->rate = clk_get_rate(clk->parent) / (4 << (divisor << 1));
123} 167}
124 168
125static void tmu0_clk_recalc(struct clk *clk) 169static void tmu_clk_recalc(struct clk *clk)
126{ 170{
127 u8 divisor = ctrl_inw(TMU0_TCR) & 0x7; 171 int tmu_num = clk->name[3]-'0';
128 clk->rate = clk->parent->rate / (4 << (divisor << 1)); 172 unsigned long prev_rate = clk_get_rate(clk);
129} 173 unsigned long flags;
174 u8 divisor = ctrl_inw(TMU0_TCR+tmu_num*0xC) & 0x7;
175 clk->rate = clk_get_rate(clk->parent) / (4 << (divisor << 1));
130 176
131static struct clk_ops tmu0_clk_ops = { 177 if(prev_rate==clk_get_rate(clk))
132 .init = tmu0_clk_init, 178 return;
133 .recalc = tmu0_clk_recalc,
134};
135 179
136static struct clk tmu0_clk = { 180 if(tmu_num)
137 .name = "tmu0_clk", 181 return; /* No more work on TMU1 */
138 .ops = &tmu0_clk_ops,
139};
140 182
141static void tmu1_clk_init(struct clk *clk) 183 local_irq_save(flags);
142{ 184 tmus_are_scaled = (prev_rate > clk->rate);
143 u8 divisor = TMU_TCR_INIT & 0x7;
144 ctrl_outw(divisor, TMU1_TCR);
145 clk->rate = clk->parent->rate / (4 << (divisor << 1));
146}
147 185
148static void tmu1_clk_recalc(struct clk *clk) 186 _tmu_stop(TMU0);
149{ 187
150 u8 divisor = ctrl_inw(TMU1_TCR) & 0x7; 188 tmu0_clockevent.mult = div_sc(clk->rate, NSEC_PER_SEC,
151 clk->rate = clk->parent->rate / (4 << (divisor << 1)); 189 tmu0_clockevent.shift);
190 tmu0_clockevent.max_delta_ns =
191 clockevent_delta2ns(-1, &tmu0_clockevent);
192 tmu0_clockevent.min_delta_ns =
193 clockevent_delta2ns(1, &tmu0_clockevent);
194
195 if (tmus_are_scaled)
196 tmu_latest_interval[TMU0] >>= 1;
197 else
198 tmu_latest_interval[TMU0] <<= 1;
199
200 tmu_timer_set_interval(TMU0,
201 tmu_latest_interval[TMU0],
202 tmu0_clockevent.mode == CLOCK_EVT_MODE_PERIODIC);
203
204 _tmu_start(TMU0);
205
206 local_irq_restore(flags);
152} 207}
153 208
154static struct clk_ops tmu1_clk_ops = { 209static struct clk_ops tmu_clk_ops = {
155 .init = tmu1_clk_init, 210 .init = tmu_clk_init,
156 .recalc = tmu1_clk_recalc, 211 .recalc = tmu_clk_recalc,
212};
213
214static struct clk tmu0_clk = {
215 .name = "tmu0_clk",
216 .ops = &tmu_clk_ops,
157}; 217};
158 218
159static struct clk tmu1_clk = { 219static struct clk tmu1_clk = {
160 .name = "tmu1_clk", 220 .name = "tmu1_clk",
161 .ops = &tmu1_clk_ops, 221 .ops = &tmu_clk_ops,
162}; 222};
163 223
164static int tmu_timer_init(void) 224static int tmu_timer_init(void)
@@ -189,11 +249,12 @@ static int tmu_timer_init(void)
189 frequency = clk_get_rate(&tmu0_clk); 249 frequency = clk_get_rate(&tmu0_clk);
190 interval = (frequency + HZ / 2) / HZ; 250 interval = (frequency + HZ / 2) / HZ;
191 251
192 sh_hpt_frequency = clk_get_rate(&tmu1_clk); 252 tmu_timer_set_interval(TMU0,interval, 1);
193 ctrl_outl(~0, TMU1_TCNT); 253 tmu_timer_set_interval(TMU1,~0,1);
194 ctrl_outl(~0, TMU1_TCOR);
195 254
196 tmu0_timer_set_interval(interval, 1); 255 _tmu_start(TMU1);
256
257 sh_hpt_frequency = clk_get_rate(&tmu1_clk);
197 258
198 tmu0_clockevent.mult = div_sc(frequency, NSEC_PER_SEC, 259 tmu0_clockevent.mult = div_sc(frequency, NSEC_PER_SEC,
199 tmu0_clockevent.shift); 260 tmu0_clockevent.shift);
diff --git a/arch/sh/kernel/traps_32.c b/arch/sh/kernel/traps_32.c
index 511a9426cec..b359b08a8e3 100644
--- a/arch/sh/kernel/traps_32.c
+++ b/arch/sh/kernel/traps_32.c
@@ -26,6 +26,7 @@
26#include <asm/system.h> 26#include <asm/system.h>
27#include <asm/uaccess.h> 27#include <asm/uaccess.h>
28#include <asm/fpu.h> 28#include <asm/fpu.h>
29#include <asm/kprobes.h>
29 30
30#ifdef CONFIG_SH_KGDB 31#ifdef CONFIG_SH_KGDB
31#include <asm/kgdb.h> 32#include <asm/kgdb.h>
@@ -192,6 +193,7 @@ static int handle_unaligned_ins(opcode_t instruction, struct pt_regs *regs,
192 int ret, index, count; 193 int ret, index, count;
193 unsigned long *rm, *rn; 194 unsigned long *rm, *rn;
194 unsigned char *src, *dst; 195 unsigned char *src, *dst;
196 unsigned char __user *srcu, *dstu;
195 197
196 index = (instruction>>8)&15; /* 0x0F00 */ 198 index = (instruction>>8)&15; /* 0x0F00 */
197 rn = &regs->regs[index]; 199 rn = &regs->regs[index];
@@ -206,28 +208,28 @@ static int handle_unaligned_ins(opcode_t instruction, struct pt_regs *regs,
206 case 0: /* mov.[bwl] to/from memory via r0+rn */ 208 case 0: /* mov.[bwl] to/from memory via r0+rn */
207 if (instruction & 8) { 209 if (instruction & 8) {
208 /* from memory */ 210 /* from memory */
209 src = (unsigned char*) *rm; 211 srcu = (unsigned char __user *)*rm;
210 src += regs->regs[0]; 212 srcu += regs->regs[0];
211 dst = (unsigned char*) rn; 213 dst = (unsigned char *)rn;
212 *(unsigned long*)dst = 0; 214 *(unsigned long *)dst = 0;
213 215
214#if !defined(__LITTLE_ENDIAN__) 216#if !defined(__LITTLE_ENDIAN__)
215 dst += 4-count; 217 dst += 4-count;
216#endif 218#endif
217 if (ma->from(dst, src, count)) 219 if (ma->from(dst, srcu, count))
218 goto fetch_fault; 220 goto fetch_fault;
219 221
220 sign_extend(count, dst); 222 sign_extend(count, dst);
221 } else { 223 } else {
222 /* to memory */ 224 /* to memory */
223 src = (unsigned char*) rm; 225 src = (unsigned char *)rm;
224#if !defined(__LITTLE_ENDIAN__) 226#if !defined(__LITTLE_ENDIAN__)
225 src += 4-count; 227 src += 4-count;
226#endif 228#endif
227 dst = (unsigned char*) *rn; 229 dstu = (unsigned char __user *)*rn;
228 dst += regs->regs[0]; 230 dstu += regs->regs[0];
229 231
230 if (ma->to(dst, src, count)) 232 if (ma->to(dstu, src, count))
231 goto fetch_fault; 233 goto fetch_fault;
232 } 234 }
233 ret = 0; 235 ret = 0;
@@ -235,10 +237,10 @@ static int handle_unaligned_ins(opcode_t instruction, struct pt_regs *regs,
235 237
236 case 1: /* mov.l Rm,@(disp,Rn) */ 238 case 1: /* mov.l Rm,@(disp,Rn) */
237 src = (unsigned char*) rm; 239 src = (unsigned char*) rm;
238 dst = (unsigned char*) *rn; 240 dstu = (unsigned char __user *)*rn;
239 dst += (instruction&0x000F)<<2; 241 dstu += (instruction&0x000F)<<2;
240 242
241 if (ma->to(dst, src, 4)) 243 if (ma->to(dstu, src, 4))
242 goto fetch_fault; 244 goto fetch_fault;
243 ret = 0; 245 ret = 0;
244 break; 246 break;
@@ -247,28 +249,28 @@ static int handle_unaligned_ins(opcode_t instruction, struct pt_regs *regs,
247 if (instruction & 4) 249 if (instruction & 4)
248 *rn -= count; 250 *rn -= count;
249 src = (unsigned char*) rm; 251 src = (unsigned char*) rm;
250 dst = (unsigned char*) *rn; 252 dstu = (unsigned char __user *)*rn;
251#if !defined(__LITTLE_ENDIAN__) 253#if !defined(__LITTLE_ENDIAN__)
252 src += 4-count; 254 src += 4-count;
253#endif 255#endif
254 if (ma->to(dst, src, count)) 256 if (ma->to(dstu, src, count))
255 goto fetch_fault; 257 goto fetch_fault;
256 ret = 0; 258 ret = 0;
257 break; 259 break;
258 260
259 case 5: /* mov.l @(disp,Rm),Rn */ 261 case 5: /* mov.l @(disp,Rm),Rn */
260 src = (unsigned char*) *rm; 262 srcu = (unsigned char __user *)*rm;
261 src += (instruction&0x000F)<<2; 263 srcu += (instruction & 0x000F) << 2;
262 dst = (unsigned char*) rn; 264 dst = (unsigned char *)rn;
263 *(unsigned long*)dst = 0; 265 *(unsigned long *)dst = 0;
264 266
265 if (ma->from(dst, src, 4)) 267 if (ma->from(dst, srcu, 4))
266 goto fetch_fault; 268 goto fetch_fault;
267 ret = 0; 269 ret = 0;
268 break; 270 break;
269 271
270 case 6: /* mov.[bwl] from memory, possibly with post-increment */ 272 case 6: /* mov.[bwl] from memory, possibly with post-increment */
271 src = (unsigned char*) *rm; 273 srcu = (unsigned char __user *)*rm;
272 if (instruction & 4) 274 if (instruction & 4)
273 *rm += count; 275 *rm += count;
274 dst = (unsigned char*) rn; 276 dst = (unsigned char*) rn;
@@ -277,7 +279,7 @@ static int handle_unaligned_ins(opcode_t instruction, struct pt_regs *regs,
277#if !defined(__LITTLE_ENDIAN__) 279#if !defined(__LITTLE_ENDIAN__)
278 dst += 4-count; 280 dst += 4-count;
279#endif 281#endif
280 if (ma->from(dst, src, count)) 282 if (ma->from(dst, srcu, count))
281 goto fetch_fault; 283 goto fetch_fault;
282 sign_extend(count, dst); 284 sign_extend(count, dst);
283 ret = 0; 285 ret = 0;
@@ -286,28 +288,28 @@ static int handle_unaligned_ins(opcode_t instruction, struct pt_regs *regs,
286 case 8: 288 case 8:
287 switch ((instruction&0xFF00)>>8) { 289 switch ((instruction&0xFF00)>>8) {
288 case 0x81: /* mov.w R0,@(disp,Rn) */ 290 case 0x81: /* mov.w R0,@(disp,Rn) */
289 src = (unsigned char*) &regs->regs[0]; 291 src = (unsigned char *) &regs->regs[0];
290#if !defined(__LITTLE_ENDIAN__) 292#if !defined(__LITTLE_ENDIAN__)
291 src += 2; 293 src += 2;
292#endif 294#endif
293 dst = (unsigned char*) *rm; /* called Rn in the spec */ 295 dstu = (unsigned char __user *)*rm; /* called Rn in the spec */
294 dst += (instruction&0x000F)<<1; 296 dstu += (instruction & 0x000F) << 1;
295 297
296 if (ma->to(dst, src, 2)) 298 if (ma->to(dstu, src, 2))
297 goto fetch_fault; 299 goto fetch_fault;
298 ret = 0; 300 ret = 0;
299 break; 301 break;
300 302
301 case 0x85: /* mov.w @(disp,Rm),R0 */ 303 case 0x85: /* mov.w @(disp,Rm),R0 */
302 src = (unsigned char*) *rm; 304 srcu = (unsigned char __user *)*rm;
303 src += (instruction&0x000F)<<1; 305 srcu += (instruction & 0x000F) << 1;
304 dst = (unsigned char*) &regs->regs[0]; 306 dst = (unsigned char *) &regs->regs[0];
305 *(unsigned long*)dst = 0; 307 *(unsigned long *)dst = 0;
306 308
307#if !defined(__LITTLE_ENDIAN__) 309#if !defined(__LITTLE_ENDIAN__)
308 dst += 2; 310 dst += 2;
309#endif 311#endif
310 if (ma->from(dst, src, 2)) 312 if (ma->from(dst, srcu, 2))
311 goto fetch_fault; 313 goto fetch_fault;
312 sign_extend(2, dst); 314 sign_extend(2, dst);
313 ret = 0; 315 ret = 0;
@@ -333,7 +335,8 @@ static inline int handle_delayslot(struct pt_regs *regs,
333 struct mem_access *ma) 335 struct mem_access *ma)
334{ 336{
335 opcode_t instruction; 337 opcode_t instruction;
336 void *addr = (void *)(regs->pc + instruction_size(old_instruction)); 338 void __user *addr = (void __user *)(regs->pc +
339 instruction_size(old_instruction));
337 340
338 if (copy_from_user(&instruction, addr, sizeof(instruction))) { 341 if (copy_from_user(&instruction, addr, sizeof(instruction))) {
339 /* the instruction-fetch faulted */ 342 /* the instruction-fetch faulted */
@@ -511,14 +514,6 @@ int handle_unaligned_access(opcode_t instruction, struct pt_regs *regs,
511 return ret; 514 return ret;
512} 515}
513 516
514#ifdef CONFIG_CPU_HAS_SR_RB
515#define lookup_exception_vector(x) \
516 __asm__ __volatile__ ("stc r2_bank, %0\n\t" : "=r" ((x)))
517#else
518#define lookup_exception_vector(x) \
519 __asm__ __volatile__ ("mov r4, %0\n\t" : "=r" ((x)))
520#endif
521
522/* 517/*
523 * Handle various address error exceptions: 518 * Handle various address error exceptions:
524 * - instruction address error: 519 * - instruction address error:
@@ -542,7 +537,7 @@ asmlinkage void do_address_error(struct pt_regs *regs,
542 537
543 /* Intentional ifdef */ 538 /* Intentional ifdef */
544#ifdef CONFIG_CPU_HAS_SR_RB 539#ifdef CONFIG_CPU_HAS_SR_RB
545 lookup_exception_vector(error_code); 540 error_code = lookup_exception_vector();
546#endif 541#endif
547 542
548 oldfs = get_fs(); 543 oldfs = get_fs();
@@ -559,7 +554,7 @@ asmlinkage void do_address_error(struct pt_regs *regs,
559 } 554 }
560 555
561 set_fs(USER_DS); 556 set_fs(USER_DS);
562 if (copy_from_user(&instruction, (void *)(regs->pc), 557 if (copy_from_user(&instruction, (void __user *)(regs->pc),
563 sizeof(instruction))) { 558 sizeof(instruction))) {
564 /* Argh. Fault on the instruction itself. 559 /* Argh. Fault on the instruction itself.
565 This should never happen non-SMP 560 This should never happen non-SMP
@@ -589,7 +584,7 @@ uspace_segv:
589 die("unaligned program counter", regs, error_code); 584 die("unaligned program counter", regs, error_code);
590 585
591 set_fs(KERNEL_DS); 586 set_fs(KERNEL_DS);
592 if (copy_from_user(&instruction, (void *)(regs->pc), 587 if (copy_from_user(&instruction, (void __user *)(regs->pc),
593 sizeof(instruction))) { 588 sizeof(instruction))) {
594 /* Argh. Fault on the instruction itself. 589 /* Argh. Fault on the instruction itself.
595 This should never happen non-SMP 590 This should never happen non-SMP
@@ -683,7 +678,7 @@ asmlinkage void do_reserved_inst(unsigned long r4, unsigned long r5,
683 } 678 }
684#endif 679#endif
685 680
686 lookup_exception_vector(error_code); 681 error_code = lookup_exception_vector();
687 682
688 local_irq_enable(); 683 local_irq_enable();
689 CHK_REMOTE_DEBUG(regs); 684 CHK_REMOTE_DEBUG(regs);
@@ -739,11 +734,13 @@ asmlinkage void do_illegal_slot_inst(unsigned long r4, unsigned long r5,
739 struct pt_regs __regs) 734 struct pt_regs __regs)
740{ 735{
741 struct pt_regs *regs = RELOC_HIDE(&__regs, 0); 736 struct pt_regs *regs = RELOC_HIDE(&__regs, 0);
742 unsigned long error_code; 737 unsigned long inst;
743 struct task_struct *tsk = current; 738 struct task_struct *tsk = current;
744#ifdef CONFIG_SH_FPU_EMU
745 unsigned short inst = 0;
746 739
740 if (kprobe_handle_illslot(regs->pc) == 0)
741 return;
742
743#ifdef CONFIG_SH_FPU_EMU
747 get_user(inst, (unsigned short *)regs->pc + 1); 744 get_user(inst, (unsigned short *)regs->pc + 1);
748 if (!do_fpu_inst(inst, regs)) { 745 if (!do_fpu_inst(inst, regs)) {
749 get_user(inst, (unsigned short *)regs->pc); 746 get_user(inst, (unsigned short *)regs->pc);
@@ -754,12 +751,12 @@ asmlinkage void do_illegal_slot_inst(unsigned long r4, unsigned long r5,
754 /* not a FPU inst. */ 751 /* not a FPU inst. */
755#endif 752#endif
756 753
757 lookup_exception_vector(error_code); 754 inst = lookup_exception_vector();
758 755
759 local_irq_enable(); 756 local_irq_enable();
760 CHK_REMOTE_DEBUG(regs); 757 CHK_REMOTE_DEBUG(regs);
761 force_sig(SIGILL, tsk); 758 force_sig(SIGILL, tsk);
762 die_if_no_fixup("illegal slot instruction", regs, error_code); 759 die_if_no_fixup("illegal slot instruction", regs, inst);
763} 760}
764 761
765asmlinkage void do_exception_error(unsigned long r4, unsigned long r5, 762asmlinkage void do_exception_error(unsigned long r4, unsigned long r5,
@@ -769,7 +766,7 @@ asmlinkage void do_exception_error(unsigned long r4, unsigned long r5,
769 struct pt_regs *regs = RELOC_HIDE(&__regs, 0); 766 struct pt_regs *regs = RELOC_HIDE(&__regs, 0);
770 long ex; 767 long ex;
771 768
772 lookup_exception_vector(ex); 769 ex = lookup_exception_vector();
773 die_if_kernel("exception", regs, ex); 770 die_if_kernel("exception", regs, ex);
774} 771}
775 772
diff --git a/arch/sh/lib/div64-generic.c b/arch/sh/lib/div64-generic.c
index 4bef3b5d964..60e76aa8b53 100644
--- a/arch/sh/lib/div64-generic.c
+++ b/arch/sh/lib/div64-generic.c
@@ -3,6 +3,7 @@
3 */ 3 */
4 4
5#include <linux/types.h> 5#include <linux/types.h>
6#include <asm/div64.h>
6 7
7extern uint64_t __xdiv64_32(u64 n, u32 d); 8extern uint64_t __xdiv64_32(u64 n, u32 d);
8 9
diff --git a/arch/sh/lib/io.c b/arch/sh/lib/io.c
index 4f54ec43516..88dfe6e396b 100644
--- a/arch/sh/lib/io.c
+++ b/arch/sh/lib/io.c
@@ -14,12 +14,12 @@
14#include <linux/module.h> 14#include <linux/module.h>
15#include <linux/io.h> 15#include <linux/io.h>
16 16
17void __raw_readsl(unsigned long addr, void *datap, int len) 17void __raw_readsl(const void __iomem *addr, void *datap, int len)
18{ 18{
19 u32 *data; 19 u32 *data;
20 20
21 for (data = datap; (len != 0) && (((u32)data & 0x1f) != 0); len--) 21 for (data = datap; (len != 0) && (((u32)data & 0x1f) != 0); len--)
22 *data++ = ctrl_inl(addr); 22 *data++ = __raw_readl(addr);
23 23
24 if (likely(len >= (0x20 >> 2))) { 24 if (likely(len >= (0x20 >> 2))) {
25 int tmp2, tmp3, tmp4, tmp5, tmp6; 25 int tmp2, tmp3, tmp4, tmp5, tmp6;
@@ -59,11 +59,11 @@ void __raw_readsl(unsigned long addr, void *datap, int len)
59 } 59 }
60 60
61 for (; len != 0; len--) 61 for (; len != 0; len--)
62 *data++ = ctrl_inl(addr); 62 *data++ = __raw_readl(addr);
63} 63}
64EXPORT_SYMBOL(__raw_readsl); 64EXPORT_SYMBOL(__raw_readsl);
65 65
66void __raw_writesl(unsigned long addr, const void *data, int len) 66void __raw_writesl(void __iomem *addr, const void *data, int len)
67{ 67{
68 if (likely(len != 0)) { 68 if (likely(len != 0)) {
69 int tmp1; 69 int tmp1;
diff --git a/arch/sh/mm/Kconfig b/arch/sh/mm/Kconfig
index 8a03926ea84..555ec9714b9 100644
--- a/arch/sh/mm/Kconfig
+++ b/arch/sh/mm/Kconfig
@@ -132,7 +132,11 @@ config ARCH_SELECT_MEMORY_MODEL
132 132
133config ARCH_ENABLE_MEMORY_HOTPLUG 133config ARCH_ENABLE_MEMORY_HOTPLUG
134 def_bool y 134 def_bool y
135 depends on SPARSEMEM 135 depends on SPARSEMEM && MMU
136
137config ARCH_ENABLE_MEMORY_HOTREMOVE
138 def_bool y
139 depends on SPARSEMEM && MMU
136 140
137config ARCH_MEMORY_PROBE 141config ARCH_MEMORY_PROBE
138 def_bool y 142 def_bool y
diff --git a/arch/sh/mm/cache-debugfs.c b/arch/sh/mm/cache-debugfs.c
index 0e189ccd4a7..5ba067b2659 100644
--- a/arch/sh/mm/cache-debugfs.c
+++ b/arch/sh/mm/cache-debugfs.c
@@ -130,12 +130,18 @@ static int __init cache_debugfs_init(void)
130 dcache_dentry = debugfs_create_file("dcache", S_IRUSR, sh_debugfs_root, 130 dcache_dentry = debugfs_create_file("dcache", S_IRUSR, sh_debugfs_root,
131 (unsigned int *)CACHE_TYPE_DCACHE, 131 (unsigned int *)CACHE_TYPE_DCACHE,
132 &cache_debugfs_fops); 132 &cache_debugfs_fops);
133 if (!dcache_dentry)
134 return -ENOMEM;
133 if (IS_ERR(dcache_dentry)) 135 if (IS_ERR(dcache_dentry))
134 return PTR_ERR(dcache_dentry); 136 return PTR_ERR(dcache_dentry);
135 137
136 icache_dentry = debugfs_create_file("icache", S_IRUSR, sh_debugfs_root, 138 icache_dentry = debugfs_create_file("icache", S_IRUSR, sh_debugfs_root,
137 (unsigned int *)CACHE_TYPE_ICACHE, 139 (unsigned int *)CACHE_TYPE_ICACHE,
138 &cache_debugfs_fops); 140 &cache_debugfs_fops);
141 if (!icache_dentry) {
142 debugfs_remove(dcache_dentry);
143 return -ENOMEM;
144 }
139 if (IS_ERR(icache_dentry)) { 145 if (IS_ERR(icache_dentry)) {
140 debugfs_remove(dcache_dentry); 146 debugfs_remove(dcache_dentry);
141 return PTR_ERR(icache_dentry); 147 return PTR_ERR(icache_dentry);
diff --git a/arch/sh/mm/cache-sh4.c b/arch/sh/mm/cache-sh4.c
index 1fdc8d90254..5cfe08dbb59 100644
--- a/arch/sh/mm/cache-sh4.c
+++ b/arch/sh/mm/cache-sh4.c
@@ -261,7 +261,7 @@ void flush_dcache_page(struct page *page)
261} 261}
262 262
263/* TODO: Selective icache invalidation through IC address array.. */ 263/* TODO: Selective icache invalidation through IC address array.. */
264static inline void __uses_jump_to_uncached flush_icache_all(void) 264static void __uses_jump_to_uncached flush_icache_all(void)
265{ 265{
266 unsigned long flags, ccr; 266 unsigned long flags, ccr;
267 267
diff --git a/arch/sh/mm/consistent.c b/arch/sh/mm/consistent.c
index 64b8f7f96f9..9f8ea3ada4d 100644
--- a/arch/sh/mm/consistent.c
+++ b/arch/sh/mm/consistent.c
@@ -16,14 +16,6 @@
16#include <asm/addrspace.h> 16#include <asm/addrspace.h>
17#include <asm/io.h> 17#include <asm/io.h>
18 18
19struct dma_coherent_mem {
20 void *virt_base;
21 u32 device_base;
22 int size;
23 int flags;
24 unsigned long *bitmap;
25};
26
27void *dma_alloc_coherent(struct device *dev, size_t size, 19void *dma_alloc_coherent(struct device *dev, size_t size,
28 dma_addr_t *dma_handle, gfp_t gfp) 20 dma_addr_t *dma_handle, gfp_t gfp)
29{ 21{
@@ -44,7 +36,7 @@ void *dma_alloc_coherent(struct device *dev, size_t size,
44 */ 36 */
45 dma_cache_sync(dev, ret, size, DMA_BIDIRECTIONAL); 37 dma_cache_sync(dev, ret, size, DMA_BIDIRECTIONAL);
46 38
47 ret_nocache = ioremap_nocache(virt_to_phys(ret), size); 39 ret_nocache = (void __force *)ioremap_nocache(virt_to_phys(ret), size);
48 if (!ret_nocache) { 40 if (!ret_nocache) {
49 free_pages((unsigned long)ret, order); 41 free_pages((unsigned long)ret, order);
50 return NULL; 42 return NULL;
@@ -58,12 +50,10 @@ EXPORT_SYMBOL(dma_alloc_coherent);
58void dma_free_coherent(struct device *dev, size_t size, 50void dma_free_coherent(struct device *dev, size_t size,
59 void *vaddr, dma_addr_t dma_handle) 51 void *vaddr, dma_addr_t dma_handle)
60{ 52{
61 struct dma_coherent_mem *mem = dev ? dev->dma_mem : NULL;
62 int order = get_order(size); 53 int order = get_order(size);
63 54
64 if (!dma_release_from_coherent(dev, order, vaddr)) { 55 if (!dma_release_from_coherent(dev, order, vaddr)) {
65 WARN_ON(irqs_disabled()); /* for portability */ 56 WARN_ON(irqs_disabled()); /* for portability */
66 BUG_ON(mem && mem->flags & DMA_MEMORY_EXCLUSIVE);
67 free_pages((unsigned long)phys_to_virt(dma_handle), order); 57 free_pages((unsigned long)phys_to_virt(dma_handle), order);
68 iounmap(vaddr); 58 iounmap(vaddr);
69 } 59 }
diff --git a/arch/sh/mm/fault_32.c b/arch/sh/mm/fault_32.c
index 0c776fdfbdd..898d477e47c 100644
--- a/arch/sh/mm/fault_32.c
+++ b/arch/sh/mm/fault_32.c
@@ -2,7 +2,7 @@
2 * Page fault handler for SH with an MMU. 2 * Page fault handler for SH with an MMU.
3 * 3 *
4 * Copyright (C) 1999 Niibe Yutaka 4 * Copyright (C) 1999 Niibe Yutaka
5 * Copyright (C) 2003 - 2007 Paul Mundt 5 * Copyright (C) 2003 - 2008 Paul Mundt
6 * 6 *
7 * Based on linux/arch/i386/mm/fault.c: 7 * Based on linux/arch/i386/mm/fault.c:
8 * Copyright (C) 1995 Linus Torvalds 8 * Copyright (C) 1995 Linus Torvalds
@@ -15,6 +15,7 @@
15#include <linux/mm.h> 15#include <linux/mm.h>
16#include <linux/hardirq.h> 16#include <linux/hardirq.h>
17#include <linux/kprobes.h> 17#include <linux/kprobes.h>
18#include <linux/marker.h>
18#include <asm/io_trapped.h> 19#include <asm/io_trapped.h>
19#include <asm/system.h> 20#include <asm/system.h>
20#include <asm/mmu_context.h> 21#include <asm/mmu_context.h>
@@ -37,10 +38,10 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
37 int fault; 38 int fault;
38 siginfo_t info; 39 siginfo_t info;
39 40
40#ifdef CONFIG_SH_KGDB 41 /*
41 if (kgdb_nofault && kgdb_bus_err_hook) 42 * We don't bother with any notifier callbacks here, as they are
42 kgdb_bus_err_hook(); 43 * all handled through the __do_page_fault() fast-path.
43#endif 44 */
44 45
45 tsk = current; 46 tsk = current;
46 si_code = SEGV_MAPERR; 47 si_code = SEGV_MAPERR;
@@ -61,7 +62,6 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
61 pgd = get_TTB() + offset; 62 pgd = get_TTB() + offset;
62 pgd_k = swapper_pg_dir + offset; 63 pgd_k = swapper_pg_dir + offset;
63 64
64 /* This will never happen with the folded page table. */
65 if (!pgd_present(*pgd)) { 65 if (!pgd_present(*pgd)) {
66 if (!pgd_present(*pgd_k)) 66 if (!pgd_present(*pgd_k))
67 goto bad_area_nosemaphore; 67 goto bad_area_nosemaphore;
@@ -71,9 +71,13 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
71 71
72 pud = pud_offset(pgd, address); 72 pud = pud_offset(pgd, address);
73 pud_k = pud_offset(pgd_k, address); 73 pud_k = pud_offset(pgd_k, address);
74 if (pud_present(*pud) || !pud_present(*pud_k)) 74
75 goto bad_area_nosemaphore; 75 if (!pud_present(*pud)) {
76 set_pud(pud, *pud_k); 76 if (!pud_present(*pud_k))
77 goto bad_area_nosemaphore;
78 set_pud(pud, *pud_k);
79 return;
80 }
77 81
78 pmd = pmd_offset(pud, address); 82 pmd = pmd_offset(pud, address);
79 pmd_k = pmd_offset(pud_k, address); 83 pmd_k = pmd_offset(pud_k, address);
@@ -242,6 +246,25 @@ do_sigbus:
242 goto no_context; 246 goto no_context;
243} 247}
244 248
249static inline int notify_page_fault(struct pt_regs *regs, int trap)
250{
251 int ret = 0;
252
253 trace_mark(kernel_arch_trap_entry, "trap_id %d ip #p%ld",
254 trap >> 5, instruction_pointer(regs));
255
256#ifdef CONFIG_KPROBES
257 if (!user_mode(regs)) {
258 preempt_disable();
259 if (kprobe_running() && kprobe_fault_handler(regs, trap))
260 ret = 1;
261 preempt_enable();
262 }
263#endif
264
265 return ret;
266}
267
245#ifdef CONFIG_SH_STORE_QUEUES 268#ifdef CONFIG_SH_STORE_QUEUES
246/* 269/*
247 * This is a special case for the SH-4 store queues, as pages for this 270 * This is a special case for the SH-4 store queues, as pages for this
@@ -265,12 +288,18 @@ asmlinkage int __kprobes __do_page_fault(struct pt_regs *regs,
265 pmd_t *pmd; 288 pmd_t *pmd;
266 pte_t *pte; 289 pte_t *pte;
267 pte_t entry; 290 pte_t entry;
291 int ret = 0;
292
293 if (notify_page_fault(regs, lookup_exception_vector()))
294 goto out;
268 295
269#ifdef CONFIG_SH_KGDB 296#ifdef CONFIG_SH_KGDB
270 if (kgdb_nofault && kgdb_bus_err_hook) 297 if (kgdb_nofault && kgdb_bus_err_hook)
271 kgdb_bus_err_hook(); 298 kgdb_bus_err_hook();
272#endif 299#endif
273 300
301 ret = 1;
302
274 /* 303 /*
275 * We don't take page faults for P1, P2, and parts of P4, these 304 * We don't take page faults for P1, P2, and parts of P4, these
276 * are always mapped, whether it be due to legacy behaviour in 305 * are always mapped, whether it be due to legacy behaviour in
@@ -280,24 +309,23 @@ asmlinkage int __kprobes __do_page_fault(struct pt_regs *regs,
280 pgd = pgd_offset_k(address); 309 pgd = pgd_offset_k(address);
281 } else { 310 } else {
282 if (unlikely(address >= TASK_SIZE || !current->mm)) 311 if (unlikely(address >= TASK_SIZE || !current->mm))
283 return 1; 312 goto out;
284 313
285 pgd = pgd_offset(current->mm, address); 314 pgd = pgd_offset(current->mm, address);
286 } 315 }
287 316
288 pud = pud_offset(pgd, address); 317 pud = pud_offset(pgd, address);
289 if (pud_none_or_clear_bad(pud)) 318 if (pud_none_or_clear_bad(pud))
290 return 1; 319 goto out;
291 pmd = pmd_offset(pud, address); 320 pmd = pmd_offset(pud, address);
292 if (pmd_none_or_clear_bad(pmd)) 321 if (pmd_none_or_clear_bad(pmd))
293 return 1; 322 goto out;
294
295 pte = pte_offset_kernel(pmd, address); 323 pte = pte_offset_kernel(pmd, address);
296 entry = *pte; 324 entry = *pte;
297 if (unlikely(pte_none(entry) || pte_not_present(entry))) 325 if (unlikely(pte_none(entry) || pte_not_present(entry)))
298 return 1; 326 goto out;
299 if (unlikely(writeaccess && !pte_write(entry))) 327 if (unlikely(writeaccess && !pte_write(entry)))
300 return 1; 328 goto out;
301 329
302 if (writeaccess) 330 if (writeaccess)
303 entry = pte_mkdirty(entry); 331 entry = pte_mkdirty(entry);
@@ -314,5 +342,8 @@ asmlinkage int __kprobes __do_page_fault(struct pt_regs *regs,
314 set_pte(pte, entry); 342 set_pte(pte, entry);
315 update_mmu_cache(NULL, address, entry); 343 update_mmu_cache(NULL, address, entry);
316 344
317 return 0; 345 ret = 0;
346out:
347 trace_mark(kernel_arch_trap_exit, MARK_NOARGS);
348 return ret;
318} 349}
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c
index b75a7acd62f..2a53943924b 100644
--- a/arch/sh/mm/init.c
+++ b/arch/sh/mm/init.c
@@ -23,7 +23,19 @@
23 23
24DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); 24DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
25pgd_t swapper_pg_dir[PTRS_PER_PGD]; 25pgd_t swapper_pg_dir[PTRS_PER_PGD];
26unsigned long cached_to_uncached = 0; 26
27#ifdef CONFIG_SUPERH32
28/*
29 * Handle trivial transitions between cached and uncached
30 * segments, making use of the 1:1 mapping relationship in
31 * 512MB lowmem.
32 *
33 * This is the offset of the uncached section from its cached alias.
34 * Default value only valid in 29 bit mode, in 32bit mode will be
35 * overridden in pmb_init.
36 */
37unsigned long cached_to_uncached = P2SEG - P1SEG;
38#endif
27 39
28#ifdef CONFIG_MMU 40#ifdef CONFIG_MMU
29static void set_pte_phys(unsigned long addr, unsigned long phys, pgprot_t prot) 41static void set_pte_phys(unsigned long addr, unsigned long phys, pgprot_t prot)
@@ -58,9 +70,7 @@ static void set_pte_phys(unsigned long addr, unsigned long phys, pgprot_t prot)
58 } 70 }
59 71
60 set_pte(pte, pfn_pte(phys >> PAGE_SHIFT, prot)); 72 set_pte(pte, pfn_pte(phys >> PAGE_SHIFT, prot));
61 73 flush_tlb_one(get_asid(), addr);
62 if (cached_to_uncached)
63 flush_tlb_one(get_asid(), addr);
64} 74}
65 75
66/* 76/*
@@ -113,7 +123,6 @@ void __init page_table_range_init(unsigned long start, unsigned long end,
113 if (!pmd_present(*pmd)) { 123 if (!pmd_present(*pmd)) {
114 pte_t *pte_table; 124 pte_t *pte_table;
115 pte_table = (pte_t *)alloc_bootmem_low_pages(PAGE_SIZE); 125 pte_table = (pte_t *)alloc_bootmem_low_pages(PAGE_SIZE);
116 memset(pte_table, 0, PAGE_SIZE);
117 pmd_populate_kernel(&init_mm, pmd, pte_table); 126 pmd_populate_kernel(&init_mm, pmd, pte_table);
118 } 127 }
119 128
@@ -165,15 +174,6 @@ void __init paging_init(void)
165#ifdef CONFIG_SUPERH32 174#ifdef CONFIG_SUPERH32
166 /* Set up the uncached fixmap */ 175 /* Set up the uncached fixmap */
167 set_fixmap_nocache(FIX_UNCACHED, __pa(&__uncached_start)); 176 set_fixmap_nocache(FIX_UNCACHED, __pa(&__uncached_start));
168
169#ifdef CONFIG_29BIT
170 /*
171 * Handle trivial transitions between cached and uncached
172 * segments, making use of the 1:1 mapping relationship in
173 * 512MB lowmem.
174 */
175 cached_to_uncached = P2SEG - P1SEG;
176#endif
177#endif 177#endif
178} 178}
179 179
@@ -265,6 +265,35 @@ void free_initrd_mem(unsigned long start, unsigned long end)
265} 265}
266#endif 266#endif
267 267
268#if THREAD_SHIFT < PAGE_SHIFT
269static struct kmem_cache *thread_info_cache;
270
271struct thread_info *alloc_thread_info(struct task_struct *tsk)
272{
273 struct thread_info *ti;
274
275 ti = kmem_cache_alloc(thread_info_cache, GFP_KERNEL);
276 if (unlikely(ti == NULL))
277 return NULL;
278#ifdef CONFIG_DEBUG_STACK_USAGE
279 memset(ti, 0, THREAD_SIZE);
280#endif
281 return ti;
282}
283
284void free_thread_info(struct thread_info *ti)
285{
286 kmem_cache_free(thread_info_cache, ti);
287}
288
289void thread_info_cache_init(void)
290{
291 thread_info_cache = kmem_cache_create("thread_info", THREAD_SIZE,
292 THREAD_SIZE, 0, NULL);
293 BUG_ON(thread_info_cache == NULL);
294}
295#endif /* THREAD_SHIFT < PAGE_SHIFT */
296
268#ifdef CONFIG_MEMORY_HOTPLUG 297#ifdef CONFIG_MEMORY_HOTPLUG
269int arch_add_memory(int nid, u64 start, u64 size) 298int arch_add_memory(int nid, u64 start, u64 size)
270{ 299{
@@ -292,4 +321,21 @@ int memory_add_physaddr_to_nid(u64 addr)
292} 321}
293EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid); 322EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid);
294#endif 323#endif
324
325#ifdef CONFIG_MEMORY_HOTREMOVE
326int remove_memory(u64 start, u64 size)
327{
328 unsigned long start_pfn = start >> PAGE_SHIFT;
329 unsigned long end_pfn = start_pfn + (size >> PAGE_SHIFT);
330 int ret;
331
332 ret = offline_pages(start_pfn, end_pfn, 120 * HZ);
333 if (unlikely(ret))
334 printk("%s: Failed, offline_pages() == %d\n", __func__, ret);
335
336 return ret;
337}
338EXPORT_SYMBOL_GPL(remove_memory);
295#endif 339#endif
340
341#endif /* CONFIG_MEMORY_HOTPLUG */
diff --git a/arch/sh/mm/pg-nommu.c b/arch/sh/mm/pg-nommu.c
index 677dd57f087..91ed4e695ff 100644
--- a/arch/sh/mm/pg-nommu.c
+++ b/arch/sh/mm/pg-nommu.c
@@ -13,6 +13,7 @@
13#include <linux/kernel.h> 13#include <linux/kernel.h>
14#include <linux/string.h> 14#include <linux/string.h>
15#include <asm/page.h> 15#include <asm/page.h>
16#include <asm/uaccess.h>
16 17
17void copy_page(void *to, void *from) 18void copy_page(void *to, void *from)
18{ 19{
diff --git a/arch/sh/mm/pmb.c b/arch/sh/mm/pmb.c
index cef727669c8..84241676265 100644
--- a/arch/sh/mm/pmb.c
+++ b/arch/sh/mm/pmb.c
@@ -394,6 +394,8 @@ static int __init pmb_debugfs_init(void)
394 394
395 dentry = debugfs_create_file("pmb", S_IFREG | S_IRUGO, 395 dentry = debugfs_create_file("pmb", S_IFREG | S_IRUGO,
396 sh_debugfs_root, NULL, &pmb_debugfs_fops); 396 sh_debugfs_root, NULL, &pmb_debugfs_fops);
397 if (!dentry)
398 return -ENOMEM;
397 if (IS_ERR(dentry)) 399 if (IS_ERR(dentry))
398 return PTR_ERR(dentry); 400 return PTR_ERR(dentry);
399 401
diff --git a/arch/sh/mm/tlb-nommu.c b/arch/sh/mm/tlb-nommu.c
index 15111bc7ddd..71c742b5aee 100644
--- a/arch/sh/mm/tlb-nommu.c
+++ b/arch/sh/mm/tlb-nommu.c
@@ -10,6 +10,7 @@
10#include <linux/kernel.h> 10#include <linux/kernel.h>
11#include <linux/mm.h> 11#include <linux/mm.h>
12#include <asm/pgtable.h> 12#include <asm/pgtable.h>
13#include <asm/tlbflush.h>
13 14
14/* 15/*
15 * Nothing too terribly exciting here .. 16 * Nothing too terribly exciting here ..
diff --git a/arch/sh/tools/mach-types b/arch/sh/tools/mach-types
index 0a11cc08f0a..d4fb11f7e2e 100644
--- a/arch/sh/tools/mach-types
+++ b/arch/sh/tools/mach-types
@@ -30,6 +30,7 @@ HP6XX SH_HP6XX
30DREAMCAST SH_DREAMCAST 30DREAMCAST SH_DREAMCAST
31SNAPGEAR SH_SECUREEDGE5410 31SNAPGEAR SH_SECUREEDGE5410
32EDOSK7705 SH_EDOSK7705 32EDOSK7705 SH_EDOSK7705
33EDOSK7760 SH_EDOSK7760
33SH4202_MICRODEV SH_SH4202_MICRODEV 34SH4202_MICRODEV SH_SH4202_MICRODEV
34SH03 SH_SH03 35SH03 SH_SH03
35LANDISK SH_LANDISK 36LANDISK SH_LANDISK
diff --git a/drivers/input/touchscreen/hp680_ts_input.c b/drivers/input/touchscreen/hp680_ts_input.c
index c38d4e0f95c..a89700e7ace 100644
--- a/drivers/input/touchscreen/hp680_ts_input.c
+++ b/drivers/input/touchscreen/hp680_ts_input.c
@@ -5,7 +5,7 @@
5#include <asm/io.h> 5#include <asm/io.h>
6#include <asm/delay.h> 6#include <asm/delay.h>
7#include <asm/adc.h> 7#include <asm/adc.h>
8#include <asm/hp6xx.h> 8#include <mach/hp6xx.h>
9 9
10#define MODNAME "hp680_ts_input" 10#define MODNAME "hp680_ts_input"
11 11
diff --git a/drivers/leds/leds-hp6xx.c b/drivers/leds/leds-hp6xx.c
index 844d5979c90..e8fb1baf8a5 100644
--- a/drivers/leds/leds-hp6xx.c
+++ b/drivers/leds/leds-hp6xx.c
@@ -15,7 +15,7 @@
15#include <linux/platform_device.h> 15#include <linux/platform_device.h>
16#include <linux/leds.h> 16#include <linux/leds.h>
17#include <asm/hd64461.h> 17#include <asm/hd64461.h>
18#include <asm/hp6xx.h> 18#include <mach/hp6xx.h>
19 19
20static void hp6xxled_green_set(struct led_classdev *led_cdev, 20static void hp6xxled_green_set(struct led_classdev *led_cdev,
21 enum led_brightness value) 21 enum led_brightness value)
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c
index b39d1cc1ef0..a24bb68887a 100644
--- a/drivers/net/sh_eth.c
+++ b/drivers/net/sh_eth.c
@@ -1205,11 +1205,12 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
1205 devno = 0; 1205 devno = 0;
1206 1206
1207 ndev->dma = -1; 1207 ndev->dma = -1;
1208 ndev->irq = platform_get_irq(pdev, 0); 1208 ret = platform_get_irq(pdev, 0);
1209 if (ndev->irq < 0) { 1209 if (ret < 0) {
1210 ret = -ENODEV; 1210 ret = -ENODEV;
1211 goto out_release; 1211 goto out_release;
1212 } 1212 }
1213 ndev->irq = ret;
1213 1214
1214 SET_NETDEV_DEV(ndev, &pdev->dev); 1215 SET_NETDEV_DEV(ndev, &pdev->dev);
1215 1216
diff --git a/drivers/rtc/rtc-ds1302.c b/drivers/rtc/rtc-ds1302.c
index 16bdba6a6b0..18455662077 100644
--- a/drivers/rtc/rtc-ds1302.c
+++ b/drivers/rtc/rtc-ds1302.c
@@ -40,7 +40,7 @@
40#define RTC_SCLK 0x0400 40#define RTC_SCLK 0x0400
41 41
42#ifdef CONFIG_SH_SECUREEDGE5410 42#ifdef CONFIG_SH_SECUREEDGE5410
43#include <asm/snapgear.h> 43#include <mach/snapgear.h>
44#define set_dp(x) SECUREEDGE_WRITE_IOPORT(x, 0x1c00) 44#define set_dp(x) SECUREEDGE_WRITE_IOPORT(x, 0x1c00)
45#define get_dp() SECUREEDGE_READ_IOPORT() 45#define get_dp() SECUREEDGE_READ_IOPORT()
46#else 46#else
diff --git a/drivers/rtc/rtc-sh.c b/drivers/rtc/rtc-sh.c
index 1ec297128ea..aaf9d6a337c 100644
--- a/drivers/rtc/rtc-sh.c
+++ b/drivers/rtc/rtc-sh.c
@@ -568,7 +568,7 @@ static int __devinit sh_rtc_probe(struct platform_device *pdev)
568 struct sh_rtc *rtc; 568 struct sh_rtc *rtc;
569 struct resource *res; 569 struct resource *res;
570 unsigned int tmp; 570 unsigned int tmp;
571 int ret = -ENOENT; 571 int ret;
572 572
573 rtc = kzalloc(sizeof(struct sh_rtc), GFP_KERNEL); 573 rtc = kzalloc(sizeof(struct sh_rtc), GFP_KERNEL);
574 if (unlikely(!rtc)) 574 if (unlikely(!rtc))
@@ -577,26 +577,33 @@ static int __devinit sh_rtc_probe(struct platform_device *pdev)
577 spin_lock_init(&rtc->lock); 577 spin_lock_init(&rtc->lock);
578 578
579 /* get periodic/carry/alarm irqs */ 579 /* get periodic/carry/alarm irqs */
580 rtc->periodic_irq = platform_get_irq(pdev, 0); 580 ret = platform_get_irq(pdev, 0);
581 if (unlikely(rtc->periodic_irq < 0)) { 581 if (unlikely(ret < 0)) {
582 ret = -ENOENT;
582 dev_err(&pdev->dev, "No IRQ for period\n"); 583 dev_err(&pdev->dev, "No IRQ for period\n");
583 goto err_badres; 584 goto err_badres;
584 } 585 }
586 rtc->periodic_irq = ret;
585 587
586 rtc->carry_irq = platform_get_irq(pdev, 1); 588 ret = platform_get_irq(pdev, 1);
587 if (unlikely(rtc->carry_irq < 0)) { 589 if (unlikely(ret < 0)) {
590 ret = -ENOENT;
588 dev_err(&pdev->dev, "No IRQ for carry\n"); 591 dev_err(&pdev->dev, "No IRQ for carry\n");
589 goto err_badres; 592 goto err_badres;
590 } 593 }
594 rtc->carry_irq = ret;
591 595
592 rtc->alarm_irq = platform_get_irq(pdev, 2); 596 ret = platform_get_irq(pdev, 2);
593 if (unlikely(rtc->alarm_irq < 0)) { 597 if (unlikely(ret < 0)) {
598 ret = -ENOENT;
594 dev_err(&pdev->dev, "No IRQ for alarm\n"); 599 dev_err(&pdev->dev, "No IRQ for alarm\n");
595 goto err_badres; 600 goto err_badres;
596 } 601 }
602 rtc->alarm_irq = ret;
597 603
598 res = platform_get_resource(pdev, IORESOURCE_IO, 0); 604 res = platform_get_resource(pdev, IORESOURCE_IO, 0);
599 if (unlikely(res == NULL)) { 605 if (unlikely(res == NULL)) {
606 ret = -ENOENT;
600 dev_err(&pdev->dev, "No IO resource\n"); 607 dev_err(&pdev->dev, "No IO resource\n");
601 goto err_badres; 608 goto err_badres;
602 } 609 }
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c
index 3df2aaec829..3b9d2d83b59 100644
--- a/drivers/serial/sh-sci.c
+++ b/drivers/serial/sh-sci.c
@@ -3,7 +3,7 @@
3 * 3 *
4 * SuperH on-chip serial module support. (SCI with no FIFO / with FIFO) 4 * SuperH on-chip serial module support. (SCI with no FIFO / with FIFO)
5 * 5 *
6 * Copyright (C) 2002 - 2006 Paul Mundt 6 * Copyright (C) 2002 - 2008 Paul Mundt
7 * Modified to support SH7720 SCIF. Markus Brunner, Mark Jonas (Jul 2007). 7 * Modified to support SH7720 SCIF. Markus Brunner, Mark Jonas (Jul 2007).
8 * 8 *
9 * based off of the old drivers/char/sh-sci.c by: 9 * based off of the old drivers/char/sh-sci.c by:
@@ -46,6 +46,7 @@
46#include <linux/cpufreq.h> 46#include <linux/cpufreq.h>
47#include <linux/clk.h> 47#include <linux/clk.h>
48#include <linux/ctype.h> 48#include <linux/ctype.h>
49#include <linux/err.h>
49 50
50#ifdef CONFIG_SUPERH 51#ifdef CONFIG_SUPERH
51#include <asm/clock.h> 52#include <asm/clock.h>
@@ -78,7 +79,7 @@ struct sci_port {
78 struct timer_list break_timer; 79 struct timer_list break_timer;
79 int break_flag; 80 int break_flag;
80 81
81#ifdef CONFIG_SUPERH 82#ifdef CONFIG_HAVE_CLK
82 /* Port clock */ 83 /* Port clock */
83 struct clk *clk; 84 struct clk *clk;
84#endif 85#endif
@@ -831,7 +832,7 @@ static irqreturn_t sci_mpxed_interrupt(int irq, void *ptr)
831 return IRQ_HANDLED; 832 return IRQ_HANDLED;
832} 833}
833 834
834#ifdef CONFIG_CPU_FREQ 835#if defined(CONFIG_CPU_FREQ) && defined(CONFIG_HAVE_CLK)
835/* 836/*
836 * Here we define a transistion notifier so that we can update all of our 837 * Here we define a transistion notifier so that we can update all of our
837 * ports' baud rate when the peripheral clock changes. 838 * ports' baud rate when the peripheral clock changes.
@@ -860,7 +861,7 @@ static int sci_notifier(struct notifier_block *self,
860 * Clean this up later.. 861 * Clean this up later..
861 */ 862 */
862 clk = clk_get(NULL, "module_clk"); 863 clk = clk_get(NULL, "module_clk");
863 port->uartclk = clk_get_rate(clk) * 16; 864 port->uartclk = clk_get_rate(clk);
864 clk_put(clk); 865 clk_put(clk);
865 } 866 }
866 867
@@ -873,7 +874,7 @@ static int sci_notifier(struct notifier_block *self,
873} 874}
874 875
875static struct notifier_block sci_nb = { &sci_notifier, NULL, 0 }; 876static struct notifier_block sci_nb = { &sci_notifier, NULL, 0 };
876#endif /* CONFIG_CPU_FREQ */ 877#endif /* CONFIG_CPU_FREQ && CONFIG_HAVE_CLK */
877 878
878static int sci_request_irq(struct sci_port *port) 879static int sci_request_irq(struct sci_port *port)
879{ 880{
@@ -1008,7 +1009,7 @@ static int sci_startup(struct uart_port *port)
1008 if (s->enable) 1009 if (s->enable)
1009 s->enable(port); 1010 s->enable(port);
1010 1011
1011#if defined(CONFIG_SUPERH) && !defined(CONFIG_SUPERH64) 1012#ifdef CONFIG_HAVE_CLK
1012 s->clk = clk_get(NULL, "module_clk"); 1013 s->clk = clk_get(NULL, "module_clk");
1013#endif 1014#endif
1014 1015
@@ -1030,7 +1031,7 @@ static void sci_shutdown(struct uart_port *port)
1030 if (s->disable) 1031 if (s->disable)
1031 s->disable(port); 1032 s->disable(port);
1032 1033
1033#if defined(CONFIG_SUPERH) && !defined(CONFIG_SUPERH64) 1034#ifdef CONFIG_HAVE_CLK
1034 clk_put(s->clk); 1035 clk_put(s->clk);
1035 s->clk = NULL; 1036 s->clk = NULL;
1036#endif 1037#endif
@@ -1041,24 +1042,11 @@ static void sci_set_termios(struct uart_port *port, struct ktermios *termios,
1041{ 1042{
1042 struct sci_port *s = &sci_ports[port->line]; 1043 struct sci_port *s = &sci_ports[port->line];
1043 unsigned int status, baud, smr_val; 1044 unsigned int status, baud, smr_val;
1044 int t; 1045 int t = -1;
1045 1046
1046 baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); 1047 baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16);
1047 1048 if (likely(baud))
1048 switch (baud) { 1049 t = SCBRR_VALUE(baud, port->uartclk);
1049 case 0:
1050 t = -1;
1051 break;
1052 default:
1053 {
1054#if defined(CONFIG_SUPERH) && !defined(CONFIG_SUPERH64)
1055 t = SCBRR_VALUE(baud, clk_get_rate(s->clk));
1056#else
1057 t = SCBRR_VALUE(baud);
1058#endif
1059 break;
1060 }
1061 }
1062 1050
1063 do { 1051 do {
1064 status = sci_in(port, SCxSR); 1052 status = sci_in(port, SCxSR);
@@ -1113,7 +1101,7 @@ static const char *sci_type(struct uart_port *port)
1113 case PORT_IRDA: return "irda"; 1101 case PORT_IRDA: return "irda";
1114 } 1102 }
1115 1103
1116 return 0; 1104 return NULL;
1117} 1105}
1118 1106
1119static void sci_release_port(struct uart_port *port) 1107static void sci_release_port(struct uart_port *port)
@@ -1145,12 +1133,16 @@ static void sci_config_port(struct uart_port *port, int flags)
1145 break; 1133 break;
1146 } 1134 }
1147 1135
1148#if defined(CONFIG_CPU_SUBTYPE_SH5_101) || defined(CONFIG_CPU_SUBTYPE_SH5_103) 1136 if (port->flags & UPF_IOREMAP && !port->membase) {
1149 if (port->mapbase == 0) 1137#if defined(CONFIG_SUPERH64)
1150 port->mapbase = onchip_remap(SCIF_ADDR_SH5, 1024, "SCIF"); 1138 port->mapbase = onchip_remap(SCIF_ADDR_SH5, 1024, "SCIF");
1151 1139 port->membase = (void __iomem *)port->mapbase;
1152 port->membase = (void __iomem *)port->mapbase; 1140#else
1141 port->membase = ioremap_nocache(port->mapbase, 0x40);
1153#endif 1142#endif
1143
1144 printk(KERN_ERR "sci: can't remap port#%d\n", port->line);
1145 }
1154} 1146}
1155 1147
1156static int sci_verify_port(struct uart_port *port, struct serial_struct *ser) 1148static int sci_verify_port(struct uart_port *port, struct serial_struct *ser)
@@ -1207,17 +1199,17 @@ static void __init sci_init_ports(void)
1207 sci_ports[i].disable = h8300_sci_disable; 1199 sci_ports[i].disable = h8300_sci_disable;
1208#endif 1200#endif
1209 sci_ports[i].port.uartclk = CONFIG_CPU_CLOCK; 1201 sci_ports[i].port.uartclk = CONFIG_CPU_CLOCK;
1210#elif defined(CONFIG_SUPERH64) 1202#elif defined(CONFIG_HAVE_CLK)
1211 sci_ports[i].port.uartclk = current_cpu_data.module_clock * 16;
1212#else
1213 /* 1203 /*
1214 * XXX: We should use a proper SCI/SCIF clock 1204 * XXX: We should use a proper SCI/SCIF clock
1215 */ 1205 */
1216 { 1206 {
1217 struct clk *clk = clk_get(NULL, "module_clk"); 1207 struct clk *clk = clk_get(NULL, "module_clk");
1218 sci_ports[i].port.uartclk = clk_get_rate(clk) * 16; 1208 sci_ports[i].port.uartclk = clk_get_rate(clk);
1219 clk_put(clk); 1209 clk_put(clk);
1220 } 1210 }
1211#else
1212#error "Need a valid uartclk"
1221#endif 1213#endif
1222 1214
1223 sci_ports[i].break_timer.data = (unsigned long)&sci_ports[i]; 1215 sci_ports[i].break_timer.data = (unsigned long)&sci_ports[i];
@@ -1285,7 +1277,7 @@ static int __init serial_console_setup(struct console *co, char *options)
1285 1277
1286 port->type = serial_console_port->type; 1278 port->type = serial_console_port->type;
1287 1279
1288#if defined(CONFIG_SUPERH) && !defined(CONFIG_SUPERH64) 1280#ifdef CONFIG_HAVE_CLK
1289 if (!serial_console_port->clk) 1281 if (!serial_console_port->clk)
1290 serial_console_port->clk = clk_get(NULL, "module_clk"); 1282 serial_console_port->clk = clk_get(NULL, "module_clk");
1291#endif 1283#endif
@@ -1436,7 +1428,7 @@ static struct uart_driver sci_uart_driver = {
1436static int __devinit sci_probe(struct platform_device *dev) 1428static int __devinit sci_probe(struct platform_device *dev)
1437{ 1429{
1438 struct plat_sci_port *p = dev->dev.platform_data; 1430 struct plat_sci_port *p = dev->dev.platform_data;
1439 int i; 1431 int i, ret = -EINVAL;
1440 1432
1441 for (i = 0; p && p->flags != 0; p++, i++) { 1433 for (i = 0; p && p->flags != 0; p++, i++) {
1442 struct sci_port *sciport = &sci_ports[i]; 1434 struct sci_port *sciport = &sci_ports[i];
@@ -1453,12 +1445,22 @@ static int __devinit sci_probe(struct platform_device *dev)
1453 1445
1454 sciport->port.mapbase = p->mapbase; 1446 sciport->port.mapbase = p->mapbase;
1455 1447
1456 /* 1448 if (p->mapbase && !p->membase) {
1457 * For the simple (and majority of) cases where we don't need 1449 if (p->flags & UPF_IOREMAP) {
1458 * to do any remapping, just cast the cookie directly. 1450 p->membase = ioremap_nocache(p->mapbase, 0x40);
1459 */ 1451 if (IS_ERR(p->membase)) {
1460 if (p->mapbase && !p->membase && !(p->flags & UPF_IOREMAP)) 1452 ret = PTR_ERR(p->membase);
1461 p->membase = (void __iomem *)p->mapbase; 1453 goto err_unreg;
1454 }
1455 } else {
1456 /*
1457 * For the simple (and majority of) cases
1458 * where we don't need to do any remapping,
1459 * just cast the cookie directly.
1460 */
1461 p->membase = (void __iomem *)p->mapbase;
1462 }
1463 }
1462 1464
1463 sciport->port.membase = p->membase; 1465 sciport->port.membase = p->membase;
1464 1466
@@ -1479,7 +1481,7 @@ static int __devinit sci_probe(struct platform_device *dev)
1479 kgdb_putchar = kgdb_sci_putchar; 1481 kgdb_putchar = kgdb_sci_putchar;
1480#endif 1482#endif
1481 1483
1482#ifdef CONFIG_CPU_FREQ 1484#if defined(CONFIG_CPU_FREQ) && defined(CONFIG_HAVE_CLK)
1483 cpufreq_register_notifier(&sci_nb, CPUFREQ_TRANSITION_NOTIFIER); 1485 cpufreq_register_notifier(&sci_nb, CPUFREQ_TRANSITION_NOTIFIER);
1484 dev_info(&dev->dev, "CPU frequency notifier registered\n"); 1486 dev_info(&dev->dev, "CPU frequency notifier registered\n");
1485#endif 1487#endif
@@ -1489,6 +1491,12 @@ static int __devinit sci_probe(struct platform_device *dev)
1489#endif 1491#endif
1490 1492
1491 return 0; 1493 return 0;
1494
1495err_unreg:
1496 for (i = i - 1; i >= 0; i--)
1497 uart_remove_one_port(&sci_uart_driver, &sci_ports[i].port);
1498
1499 return ret;
1492} 1500}
1493 1501
1494static int __devexit sci_remove(struct platform_device *dev) 1502static int __devexit sci_remove(struct platform_device *dev)
diff --git a/drivers/serial/sh-sci.h b/drivers/serial/sh-sci.h
index 8a0749e34ca..7cd28b22680 100644
--- a/drivers/serial/sh-sci.h
+++ b/drivers/serial/sh-sci.h
@@ -320,18 +320,16 @@
320#define SCI_EVENT_WRITE_WAKEUP 0 320#define SCI_EVENT_WRITE_WAKEUP 0
321 321
322#define SCI_IN(size, offset) \ 322#define SCI_IN(size, offset) \
323 unsigned int addr = port->mapbase + (offset); \
324 if ((size) == 8) { \ 323 if ((size) == 8) { \
325 return ctrl_inb(addr); \ 324 return ioread8(port->membase + (offset)); \
326 } else { \ 325 } else { \
327 return ctrl_inw(addr); \ 326 return ioread16(port->membase + (offset)); \
328 } 327 }
329#define SCI_OUT(size, offset, value) \ 328#define SCI_OUT(size, offset, value) \
330 unsigned int addr = port->mapbase + (offset); \
331 if ((size) == 8) { \ 329 if ((size) == 8) { \
332 ctrl_outb(value, addr); \ 330 iowrite8(value, port->membase + (offset)); \
333 } else if ((size) == 16) { \ 331 } else if ((size) == 16) { \
334 ctrl_outw(value, addr); \ 332 iowrite16(value, port->membase + (offset)); \
335 } 333 }
336 334
337#define CPU_SCIx_FNS(name, sci_offset, sci_size, scif_offset, scif_size)\ 335#define CPU_SCIx_FNS(name, sci_offset, sci_size, scif_offset, scif_size)\
@@ -791,11 +789,16 @@ static inline int sci_rxd_in(struct uart_port *port)
791 defined(CONFIG_CPU_SUBTYPE_SH7721) 789 defined(CONFIG_CPU_SUBTYPE_SH7721)
792#define SCBRR_VALUE(bps, clk) (((clk*2)+16*bps)/(32*bps)-1) 790#define SCBRR_VALUE(bps, clk) (((clk*2)+16*bps)/(32*bps)-1)
793#elif defined(CONFIG_CPU_SUBTYPE_SH7723) 791#elif defined(CONFIG_CPU_SUBTYPE_SH7723)
794#define SCBRR_VALUE(bps, clk) (((clk*2)+16*bps)/(16*bps)-1) 792static inline int scbrr_calc(struct uart_port *port, int bps, int clk)
793{
794 if (port->type == PORT_SCIF)
795 return (clk+16*bps)/(32*bps)-1;
796 else
797 return ((clk*2)+16*bps)/(16*bps)-1;
798}
799#define SCBRR_VALUE(bps, clk) scbrr_calc(port, bps, clk)
795#elif defined(__H8300H__) || defined(__H8300S__) 800#elif defined(__H8300H__) || defined(__H8300S__)
796#define SCBRR_VALUE(bps) (((CONFIG_CPU_CLOCK*1000/32)/bps)-1) 801#define SCBRR_VALUE(bps, clk) (((clk*1000/32)/bps)-1)
797#elif defined(CONFIG_SUPERH64)
798#define SCBRR_VALUE(bps) ((current_cpu_data.module_clock+16*bps)/(32*bps)-1)
799#else /* Generic SH */ 802#else /* Generic SH */
800#define SCBRR_VALUE(bps, clk) ((clk+16*bps)/(32*bps)-1) 803#define SCBRR_VALUE(bps, clk) ((clk+16*bps)/(32*bps)-1)
801#endif 804#endif
diff --git a/drivers/sh/Makefile b/drivers/sh/Makefile
index a96f4a8cfeb..6a025cefe6d 100644
--- a/drivers/sh/Makefile
+++ b/drivers/sh/Makefile
@@ -1,6 +1,6 @@
1# 1#
2# Makefile for the SuperH specific drivers. 2# Makefile for the SuperH specific drivers.
3# 3#
4
5obj-$(CONFIG_SUPERHYWAY) += superhyway/ 4obj-$(CONFIG_SUPERHYWAY) += superhyway/
6obj-$(CONFIG_MAPLE) += maple/ 5obj-$(CONFIG_MAPLE) += maple/
6obj-y += intc.o
diff --git a/arch/sh/kernel/cpu/irq/intc.c b/drivers/sh/intc.c
index 8c70e201bde..58d24c5a76c 100644
--- a/arch/sh/kernel/cpu/irq/intc.c
+++ b/drivers/sh/intc.c
@@ -21,6 +21,7 @@
21#include <linux/io.h> 21#include <linux/io.h>
22#include <linux/interrupt.h> 22#include <linux/interrupt.h>
23#include <linux/bootmem.h> 23#include <linux/bootmem.h>
24#include <linux/sh_intc.h>
24 25
25#define _INTC_MK(fn, mode, addr_e, addr_d, width, shift) \ 26#define _INTC_MK(fn, mode, addr_e, addr_d, width, shift) \
26 ((shift) | ((width) << 5) | ((fn) << 9) | ((mode) << 13) | \ 27 ((shift) | ((width) << 5) | ((fn) << 9) | ((mode) << 13) | \
@@ -86,24 +87,24 @@ static inline unsigned int set_field(unsigned int value,
86 87
87static void write_8(unsigned long addr, unsigned long h, unsigned long data) 88static void write_8(unsigned long addr, unsigned long h, unsigned long data)
88{ 89{
89 ctrl_outb(set_field(0, data, h), addr); 90 __raw_writeb(set_field(0, data, h), addr);
90} 91}
91 92
92static void write_16(unsigned long addr, unsigned long h, unsigned long data) 93static void write_16(unsigned long addr, unsigned long h, unsigned long data)
93{ 94{
94 ctrl_outw(set_field(0, data, h), addr); 95 __raw_writew(set_field(0, data, h), addr);
95} 96}
96 97
97static void write_32(unsigned long addr, unsigned long h, unsigned long data) 98static void write_32(unsigned long addr, unsigned long h, unsigned long data)
98{ 99{
99 ctrl_outl(set_field(0, data, h), addr); 100 __raw_writel(set_field(0, data, h), addr);
100} 101}
101 102
102static void modify_8(unsigned long addr, unsigned long h, unsigned long data) 103static void modify_8(unsigned long addr, unsigned long h, unsigned long data)
103{ 104{
104 unsigned long flags; 105 unsigned long flags;
105 local_irq_save(flags); 106 local_irq_save(flags);
106 ctrl_outb(set_field(ctrl_inb(addr), data, h), addr); 107 __raw_writeb(set_field(__raw_readb(addr), data, h), addr);
107 local_irq_restore(flags); 108 local_irq_restore(flags);
108} 109}
109 110
@@ -111,7 +112,7 @@ static void modify_16(unsigned long addr, unsigned long h, unsigned long data)
111{ 112{
112 unsigned long flags; 113 unsigned long flags;
113 local_irq_save(flags); 114 local_irq_save(flags);
114 ctrl_outw(set_field(ctrl_inw(addr), data, h), addr); 115 __raw_writew(set_field(__raw_readw(addr), data, h), addr);
115 local_irq_restore(flags); 116 local_irq_restore(flags);
116} 117}
117 118
@@ -119,7 +120,7 @@ static void modify_32(unsigned long addr, unsigned long h, unsigned long data)
119{ 120{
120 unsigned long flags; 121 unsigned long flags;
121 local_irq_save(flags); 122 local_irq_save(flags);
122 ctrl_outl(set_field(ctrl_inl(addr), data, h), addr); 123 __raw_writel(set_field(__raw_readl(addr), data, h), addr);
123 local_irq_restore(flags); 124 local_irq_restore(flags);
124} 125}
125 126
@@ -246,16 +247,16 @@ static void intc_mask_ack(unsigned int irq)
246 addr = INTC_REG(d, _INTC_ADDR_D(handle), 0); 247 addr = INTC_REG(d, _INTC_ADDR_D(handle), 0);
247 switch (_INTC_FN(handle)) { 248 switch (_INTC_FN(handle)) {
248 case REG_FN_MODIFY_BASE + 0: /* 8bit */ 249 case REG_FN_MODIFY_BASE + 0: /* 8bit */
249 ctrl_inb(addr); 250 __raw_readb(addr);
250 ctrl_outb(0xff ^ set_field(0, 1, handle), addr); 251 __raw_writeb(0xff ^ set_field(0, 1, handle), addr);
251 break; 252 break;
252 case REG_FN_MODIFY_BASE + 1: /* 16bit */ 253 case REG_FN_MODIFY_BASE + 1: /* 16bit */
253 ctrl_inw(addr); 254 __raw_readw(addr);
254 ctrl_outw(0xffff ^ set_field(0, 1, handle), addr); 255 __raw_writew(0xffff ^ set_field(0, 1, handle), addr);
255 break; 256 break;
256 case REG_FN_MODIFY_BASE + 3: /* 32bit */ 257 case REG_FN_MODIFY_BASE + 3: /* 32bit */
257 ctrl_inl(addr); 258 __raw_readl(addr);
258 ctrl_outl(0xffffffff ^ set_field(0, 1, handle), addr); 259 __raw_writel(0xffffffff ^ set_field(0, 1, handle), addr);
259 break; 260 break;
260 default: 261 default:
261 BUG(); 262 BUG();
@@ -464,9 +465,10 @@ static unsigned int __init intc_prio_data(struct intc_desc *desc,
464 } 465 }
465 466
466 fn += (pr->reg_width >> 3) - 1; 467 fn += (pr->reg_width >> 3) - 1;
467 bit = pr->reg_width - ((j + 1) * pr->field_width);
468 468
469 BUG_ON(bit < 0); 469 BUG_ON((j + 1) * pr->field_width > pr->reg_width);
470
471 bit = pr->reg_width - ((j + 1) * pr->field_width);
470 472
471 return _INTC_MK(fn, mode, 473 return _INTC_MK(fn, mode,
472 intc_get_reg(d, reg_e), 474 intc_get_reg(d, reg_e),
@@ -531,9 +533,10 @@ static unsigned int __init intc_sense_data(struct intc_desc *desc,
531 533
532 fn = REG_FN_MODIFY_BASE; 534 fn = REG_FN_MODIFY_BASE;
533 fn += (sr->reg_width >> 3) - 1; 535 fn += (sr->reg_width >> 3) - 1;
534 bit = sr->reg_width - ((j + 1) * sr->field_width);
535 536
536 BUG_ON(bit < 0); 537 BUG_ON((j + 1) * sr->field_width > sr->reg_width);
538
539 bit = sr->reg_width - ((j + 1) * sr->field_width);
537 540
538 return _INTC_MK(fn, 0, intc_get_reg(d, sr->reg), 541 return _INTC_MK(fn, 0, intc_get_reg(d, sr->reg),
539 0, sr->field_width, bit); 542 0, sr->field_width, bit);
diff --git a/drivers/video/backlight/hp680_bl.c b/drivers/video/backlight/hp680_bl.c
index 6fa0b9d5559..d4cfed0b26d 100644
--- a/drivers/video/backlight/hp680_bl.c
+++ b/drivers/video/backlight/hp680_bl.c
@@ -19,7 +19,7 @@
19#include <linux/backlight.h> 19#include <linux/backlight.h>
20 20
21#include <cpu/dac.h> 21#include <cpu/dac.h>
22#include <asm/hp6xx.h> 22#include <mach/hp6xx.h>
23#include <asm/hd64461.h> 23#include <asm/hd64461.h>
24 24
25#define HP680_MAX_INTENSITY 255 25#define HP680_MAX_INTENSITY 255
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c
index 4c32c06579a..efff672fd7b 100644
--- a/drivers/video/sh_mobile_lcdcfb.c
+++ b/drivers/video/sh_mobile_lcdcfb.c
@@ -16,7 +16,7 @@
16#include <linux/clk.h> 16#include <linux/clk.h>
17#include <linux/platform_device.h> 17#include <linux/platform_device.h>
18#include <linux/dma-mapping.h> 18#include <linux/dma-mapping.h>
19#include <asm/sh_mobile_lcdc.h> 19#include <video/sh_mobile_lcdc.h>
20 20
21#define PALETTE_NR 16 21#define PALETTE_NR 16
22 22
@@ -34,7 +34,9 @@ struct sh_mobile_lcdc_chan {
34 34
35struct sh_mobile_lcdc_priv { 35struct sh_mobile_lcdc_priv {
36 void __iomem *base; 36 void __iomem *base;
37#ifdef CONFIG_HAVE_CLK
37 struct clk *clk; 38 struct clk *clk;
39#endif
38 unsigned long lddckr; 40 unsigned long lddckr;
39 struct sh_mobile_lcdc_chan ch[2]; 41 struct sh_mobile_lcdc_chan ch[2];
40}; 42};
@@ -260,6 +262,11 @@ static int sh_mobile_lcdc_start(struct sh_mobile_lcdc_priv *priv)
260 tmp = ch->ldmt1r_value; 262 tmp = ch->ldmt1r_value;
261 tmp |= (lcd_cfg->sync & FB_SYNC_VERT_HIGH_ACT) ? 0 : 1 << 28; 263 tmp |= (lcd_cfg->sync & FB_SYNC_VERT_HIGH_ACT) ? 0 : 1 << 28;
262 tmp |= (lcd_cfg->sync & FB_SYNC_HOR_HIGH_ACT) ? 0 : 1 << 27; 264 tmp |= (lcd_cfg->sync & FB_SYNC_HOR_HIGH_ACT) ? 0 : 1 << 27;
265 tmp |= (ch->cfg.flags & LCDC_FLAGS_DWPOL) ? 1 << 26 : 0;
266 tmp |= (ch->cfg.flags & LCDC_FLAGS_DIPOL) ? 1 << 25 : 0;
267 tmp |= (ch->cfg.flags & LCDC_FLAGS_DAPOL) ? 1 << 24 : 0;
268 tmp |= (ch->cfg.flags & LCDC_FLAGS_HSCNT) ? 1 << 17 : 0;
269 tmp |= (ch->cfg.flags & LCDC_FLAGS_DWCNT) ? 1 << 16 : 0;
263 lcdc_write_chan(ch, LDMT1R, tmp); 270 lcdc_write_chan(ch, LDMT1R, tmp);
264 271
265 /* setup SYS bus */ 272 /* setup SYS bus */
@@ -422,6 +429,7 @@ static int sh_mobile_lcdc_setup_clocks(struct device *dev, int clock_source,
422 429
423 priv->lddckr = icksel << 16; 430 priv->lddckr = icksel << 16;
424 431
432#ifdef CONFIG_HAVE_CLK
425 if (str) { 433 if (str) {
426 priv->clk = clk_get(dev, str); 434 priv->clk = clk_get(dev, str);
427 if (IS_ERR(priv->clk)) { 435 if (IS_ERR(priv->clk)) {
@@ -431,6 +439,7 @@ static int sh_mobile_lcdc_setup_clocks(struct device *dev, int clock_source,
431 439
432 clk_enable(priv->clk); 440 clk_enable(priv->clk);
433 } 441 }
442#endif
434 443
435 return 0; 444 return 0;
436} 445}
@@ -585,7 +594,6 @@ static int __init sh_mobile_lcdc_probe(struct platform_device *pdev)
585 goto err1; 594 goto err1;
586 } 595 }
587 596
588 priv->lddckr = pdata->lddckr;
589 priv->base = ioremap_nocache(res->start, (res->end - res->start) + 1); 597 priv->base = ioremap_nocache(res->start, (res->end - res->start) + 1);
590 598
591 for (i = 0; i < j; i++) { 599 for (i = 0; i < j; i++) {
@@ -688,10 +696,12 @@ static int sh_mobile_lcdc_remove(struct platform_device *pdev)
688 fb_dealloc_cmap(&info->cmap); 696 fb_dealloc_cmap(&info->cmap);
689 } 697 }
690 698
699#ifdef CONFIG_HAVE_CLK
691 if (priv->clk) { 700 if (priv->clk) {
692 clk_disable(priv->clk); 701 clk_disable(priv->clk);
693 clk_put(priv->clk); 702 clk_put(priv->clk);
694 } 703 }
704#endif
695 705
696 if (priv->base) 706 if (priv->base)
697 iounmap(priv->base); 707 iounmap(priv->base);
diff --git a/include/linux/sh_intc.h b/include/linux/sh_intc.h
new file mode 100644
index 00000000000..68e212ff9dd
--- /dev/null
+++ b/include/linux/sh_intc.h
@@ -0,0 +1,91 @@
1#ifndef __SH_INTC_H
2#define __SH_INTC_H
3
4typedef unsigned char intc_enum;
5
6struct intc_vect {
7 intc_enum enum_id;
8 unsigned short vect;
9};
10
11#define INTC_VECT(enum_id, vect) { enum_id, vect }
12#define INTC_IRQ(enum_id, irq) INTC_VECT(enum_id, irq2evt(irq))
13
14struct intc_group {
15 intc_enum enum_id;
16 intc_enum enum_ids[32];
17};
18
19#define INTC_GROUP(enum_id, ids...) { enum_id, { ids } }
20
21struct intc_mask_reg {
22 unsigned long set_reg, clr_reg, reg_width;
23 intc_enum enum_ids[32];
24#ifdef CONFIG_SMP
25 unsigned long smp;
26#endif
27};
28
29struct intc_prio_reg {
30 unsigned long set_reg, clr_reg, reg_width, field_width;
31 intc_enum enum_ids[16];
32#ifdef CONFIG_SMP
33 unsigned long smp;
34#endif
35};
36
37struct intc_sense_reg {
38 unsigned long reg, reg_width, field_width;
39 intc_enum enum_ids[16];
40};
41
42#ifdef CONFIG_SMP
43#define INTC_SMP(stride, nr) .smp = (stride) | ((nr) << 8)
44#else
45#define INTC_SMP(stride, nr)
46#endif
47
48struct intc_desc {
49 struct intc_vect *vectors;
50 unsigned int nr_vectors;
51 struct intc_group *groups;
52 unsigned int nr_groups;
53 struct intc_mask_reg *mask_regs;
54 unsigned int nr_mask_regs;
55 struct intc_prio_reg *prio_regs;
56 unsigned int nr_prio_regs;
57 struct intc_sense_reg *sense_regs;
58 unsigned int nr_sense_regs;
59 char *name;
60#if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4A)
61 struct intc_mask_reg *ack_regs;
62 unsigned int nr_ack_regs;
63#endif
64};
65
66#define _INTC_ARRAY(a) a, sizeof(a)/sizeof(*a)
67#define DECLARE_INTC_DESC(symbol, chipname, vectors, groups, \
68 mask_regs, prio_regs, sense_regs) \
69struct intc_desc symbol __initdata = { \
70 _INTC_ARRAY(vectors), _INTC_ARRAY(groups), \
71 _INTC_ARRAY(mask_regs), _INTC_ARRAY(prio_regs), \
72 _INTC_ARRAY(sense_regs), \
73 chipname, \
74}
75
76#if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4A)
77#define DECLARE_INTC_DESC_ACK(symbol, chipname, vectors, groups, \
78 mask_regs, prio_regs, sense_regs, ack_regs) \
79struct intc_desc symbol __initdata = { \
80 _INTC_ARRAY(vectors), _INTC_ARRAY(groups), \
81 _INTC_ARRAY(mask_regs), _INTC_ARRAY(prio_regs), \
82 _INTC_ARRAY(sense_regs), \
83 chipname, \
84 _INTC_ARRAY(ack_regs), \
85}
86#endif
87
88void __init register_intc_controller(struct intc_desc *desc);
89int intc_set_priority(unsigned int irq, unsigned int prio);
90
91#endif /* __SH_INTC_H */
diff --git a/arch/sh/include/asm/sh_mobile_lcdc.h b/include/video/sh_mobile_lcdc.h
index 130102f663f..1a4bc6ada60 100644
--- a/arch/sh/include/asm/sh_mobile_lcdc.h
+++ b/include/video/sh_mobile_lcdc.h
@@ -28,6 +28,12 @@ enum { LCDC_CHAN_DISABLED = 0,
28 28
29enum { LCDC_CLK_BUS, LCDC_CLK_PERIPHERAL, LCDC_CLK_EXTERNAL }; 29enum { LCDC_CLK_BUS, LCDC_CLK_PERIPHERAL, LCDC_CLK_EXTERNAL };
30 30
31#define LCDC_FLAGS_DWPOL (1 << 0) /* Rising edge dot clock data latch */
32#define LCDC_FLAGS_DIPOL (1 << 1) /* Active low display enable polarity */
33#define LCDC_FLAGS_DAPOL (1 << 2) /* Active low display data polarity */
34#define LCDC_FLAGS_HSCNT (1 << 3) /* Disable HSYNC during VBLANK */
35#define LCDC_FLAGS_DWCNT (1 << 4) /* Disable dotclock during blanking */
36
31struct sh_mobile_lcdc_sys_bus_cfg { 37struct sh_mobile_lcdc_sys_bus_cfg {
32 unsigned long ldmt2r; 38 unsigned long ldmt2r;
33 unsigned long ldmt3r; 39 unsigned long ldmt3r;
@@ -57,6 +63,7 @@ struct sh_mobile_lcdc_chan_cfg {
57 int bpp; 63 int bpp;
58 int interface_type; /* selects RGBn or SYSn I/F, see above */ 64 int interface_type; /* selects RGBn or SYSn I/F, see above */
59 int clock_divider; 65 int clock_divider;
66 unsigned long flags; /* LCDC_FLAGS_... */
60 struct fb_videomode lcd_cfg; 67 struct fb_videomode lcd_cfg;
61 struct sh_mobile_lcdc_lcd_size_cfg lcd_size_cfg; 68 struct sh_mobile_lcdc_lcd_size_cfg lcd_size_cfg;
62 struct sh_mobile_lcdc_board_cfg board_cfg; 69 struct sh_mobile_lcdc_board_cfg board_cfg;
@@ -64,7 +71,6 @@ struct sh_mobile_lcdc_chan_cfg {
64}; 71};
65 72
66struct sh_mobile_lcdc_info { 73struct sh_mobile_lcdc_info {
67 unsigned long lddckr;
68 int clock_source; 74 int clock_source;
69 struct sh_mobile_lcdc_chan_cfg ch[2]; 75 struct sh_mobile_lcdc_chan_cfg ch[2];
70}; 76};
diff --git a/sound/oss/sh_dac_audio.c b/sound/oss/sh_dac_audio.c
index b493660deb3..e5d42399491 100644
--- a/sound/oss/sh_dac_audio.c
+++ b/sound/oss/sh_dac_audio.c
@@ -26,7 +26,7 @@
26#include <asm/cpu/dac.h> 26#include <asm/cpu/dac.h>
27#include <asm/cpu/timer.h> 27#include <asm/cpu/timer.h>
28#include <asm/machvec.h> 28#include <asm/machvec.h>
29#include <asm/hp6xx.h> 29#include <mach/hp6xx.h>
30#include <asm/hd64461.h> 30#include <asm/hd64461.h>
31 31
32#define MODNAME "sh_dac_audio" 32#define MODNAME "sh_dac_audio"