aboutsummaryrefslogtreecommitdiffstats
path: root/arch/h8300
diff options
context:
space:
mode:
Diffstat (limited to 'arch/h8300')
-rw-r--r--arch/h8300/defconfig263
-rw-r--r--arch/h8300/kernel/irq.c4
-rw-r--r--arch/h8300/kernel/signal.c4
-rw-r--r--arch/h8300/platform/h8300h/Makefile2
-rw-r--r--arch/h8300/platform/h8300h/irq.c82
-rw-r--r--arch/h8300/platform/h8s/ints.c304
-rw-r--r--arch/h8300/platform/h8s/irq.c (renamed from arch/h8300/platform/h8s/ints_h8s.c)8
7 files changed, 231 insertions, 436 deletions
diff --git a/arch/h8300/defconfig b/arch/h8300/defconfig
index 8f1ec3297150..8901cdb5e75b 100644
--- a/arch/h8300/defconfig
+++ b/arch/h8300/defconfig
@@ -1,51 +1,98 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.11-rc1 3# Linux kernel version: 2.6.25-rc1
4# Sun Jan 16 17:24:38 2005 4# Fri Feb 15 17:13:14 2008
5# 5#
6CONFIG_H8300=y 6CONFIG_H8300=y
7# CONFIG_MMU is not set 7# CONFIG_MMU is not set
8# CONFIG_SWAP is not set 8# CONFIG_SWAP is not set
9CONFIG_ZONE_DMA=y
9# CONFIG_FPU is not set 10# CONFIG_FPU is not set
10CONFIG_UID16=y
11CONFIG_RWSEM_GENERIC_SPINLOCK=y 11CONFIG_RWSEM_GENERIC_SPINLOCK=y
12# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 12# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
13# CONFIG_ARCH_HAS_ILOG2_U32 is not set
14# CONFIG_ARCH_HAS_ILOG2_U64 is not set
15CONFIG_GENERIC_FIND_NEXT_BIT=y
16CONFIG_GENERIC_HWEIGHT=y
17CONFIG_GENERIC_HARDIRQS=y
13CONFIG_GENERIC_CALIBRATE_DELAY=y 18CONFIG_GENERIC_CALIBRATE_DELAY=y
19CONFIG_GENERIC_TIME=y
20CONFIG_TIME_LOW_RES=y
21CONFIG_ARCH_SUPPORTS_AOUT=y
22CONFIG_NO_IOPORT=y
23CONFIG_NO_DMA=y
14CONFIG_ISA=y 24CONFIG_ISA=y
15# CONFIG_PCI is not set 25# CONFIG_PCI is not set
26CONFIG_HZ=100
27CONFIG_C_SYMBOL_PREFIX=y
28CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
16 29
17# 30#
18# Code maturity level options 31# General setup
19# 32#
20CONFIG_EXPERIMENTAL=y 33CONFIG_EXPERIMENTAL=y
21CONFIG_CLEAN_COMPILE=y
22CONFIG_BROKEN_ON_SMP=y 34CONFIG_BROKEN_ON_SMP=y
23 35CONFIG_INIT_ENV_ARG_LIMIT=32
24#
25# General setup
26#
27CONFIG_LOCALVERSION="" 36CONFIG_LOCALVERSION=""
37# CONFIG_LOCALVERSION_AUTO is not set
38# CONFIG_SYSVIPC is not set
28# CONFIG_BSD_PROCESS_ACCT is not set 39# CONFIG_BSD_PROCESS_ACCT is not set
29# CONFIG_SYSCTL is not set
30# CONFIG_AUDIT is not set
31CONFIG_LOG_BUF_SHIFT=14
32# CONFIG_HOTPLUG is not set
33# CONFIG_IKCONFIG is not set 40# CONFIG_IKCONFIG is not set
41CONFIG_LOG_BUF_SHIFT=14
42# CONFIG_CGROUPS is not set
43# CONFIG_FAIR_GROUP_SCHED is not set
44# CONFIG_SYSFS_DEPRECATED is not set
45# CONFIG_RELAY is not set
46# CONFIG_NAMESPACES is not set
47# CONFIG_BLK_DEV_INITRD is not set
48CONFIG_CC_OPTIMIZE_FOR_SIZE=y
49CONFIG_SYSCTL=y
34CONFIG_EMBEDDED=y 50CONFIG_EMBEDDED=y
51# CONFIG_UID16 is not set
52# CONFIG_SYSCTL_SYSCALL is not set
35# CONFIG_KALLSYMS is not set 53# CONFIG_KALLSYMS is not set
54# CONFIG_HOTPLUG is not set
55CONFIG_PRINTK=y
56CONFIG_BUG=y
57CONFIG_ELF_CORE=y
58# CONFIG_COMPAT_BRK is not set
59# CONFIG_BASE_FULL is not set
36# CONFIG_FUTEX is not set 60# CONFIG_FUTEX is not set
37# CONFIG_EPOLL is not set 61# CONFIG_EPOLL is not set
38CONFIG_CC_OPTIMIZE_FOR_SIZE=y 62# CONFIG_SIGNALFD is not set
39CONFIG_CC_ALIGN_FUNCTIONS=0 63# CONFIG_TIMERFD is not set
40CONFIG_CC_ALIGN_LABELS=0 64# CONFIG_EVENTFD is not set
41CONFIG_CC_ALIGN_LOOPS=0 65# CONFIG_VM_EVENT_COUNTERS is not set
42CONFIG_CC_ALIGN_JUMPS=0 66# CONFIG_SLAB is not set
67# CONFIG_SLUB is not set
68CONFIG_SLOB=y
69# CONFIG_PROFILING is not set
70# CONFIG_MARKERS is not set
71# CONFIG_HAVE_OPROFILE is not set
72# CONFIG_HAVE_KPROBES is not set
43CONFIG_TINY_SHMEM=y 73CONFIG_TINY_SHMEM=y
74CONFIG_BASE_SMALL=1
75# CONFIG_MODULES is not set
76CONFIG_BLOCK=y
77# CONFIG_LBD is not set
78# CONFIG_BLK_DEV_IO_TRACE is not set
79# CONFIG_LSF is not set
80# CONFIG_BLK_DEV_BSG is not set
44 81
45# 82#
46# Loadable module support 83# IO Schedulers
47# 84#
48# CONFIG_MODULES is not set 85CONFIG_IOSCHED_NOOP=y
86# CONFIG_IOSCHED_AS is not set
87# CONFIG_IOSCHED_DEADLINE is not set
88# CONFIG_IOSCHED_CFQ is not set
89# CONFIG_DEFAULT_AS is not set
90# CONFIG_DEFAULT_DEADLINE is not set
91# CONFIG_DEFAULT_CFQ is not set
92CONFIG_DEFAULT_NOOP=y
93CONFIG_DEFAULT_IOSCHED="noop"
94CONFIG_CLASSIC_RCU=y
95# CONFIG_PREEMPT_RCU is not set
49 96
50# 97#
51# Processor type and features 98# Processor type and features
@@ -62,14 +109,26 @@ CONFIG_H8300H_GENERIC=y
62# Detail Selection 109# Detail Selection
63# 110#
64# CONFIG_H83002 is not set 111# CONFIG_H83002 is not set
65# CONFIG_H83007 is not set 112CONFIG_H83007=y
66# CONFIG_H83048 is not set 113# CONFIG_H83048 is not set
67CONFIG_H83068=y 114# CONFIG_H83068 is not set
68CONFIG_CPU_CLOCK=20000 115CONFIG_CPU_CLOCK=20000
69# CONFIG_RAMKERNEL is not set 116CONFIG_RAMKERNEL=y
70CONFIG_ROMKERNEL=y 117# CONFIG_ROMKERNEL is not set
71CONFIG_CPU_H8300H=y 118CONFIG_CPU_H8300H=y
72# CONFIG_PREEMPT is not set 119# CONFIG_PREEMPT is not set
120CONFIG_SELECT_MEMORY_MODEL=y
121CONFIG_FLATMEM_MANUAL=y
122# CONFIG_DISCONTIGMEM_MANUAL is not set
123# CONFIG_SPARSEMEM_MANUAL is not set
124CONFIG_FLATMEM=y
125CONFIG_FLAT_NODE_MEM_MAP=y
126# CONFIG_SPARSEMEM_STATIC is not set
127# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
128CONFIG_SPLIT_PTLOCK_CPUS=4
129# CONFIG_RESOURCES_64BIT is not set
130CONFIG_ZONE_DMA_FLAG=1
131CONFIG_VIRT_TO_BUS=y
73 132
74# 133#
75# Executable file formats 134# Executable file formats
@@ -77,34 +136,42 @@ CONFIG_CPU_H8300H=y
77CONFIG_BINFMT_FLAT=y 136CONFIG_BINFMT_FLAT=y
78CONFIG_BINFMT_ZFLAT=y 137CONFIG_BINFMT_ZFLAT=y
79# CONFIG_BINFMT_SHARED_FLAT is not set 138# CONFIG_BINFMT_SHARED_FLAT is not set
80# CONFIG_BINFMT_MISC is not set 139CONFIG_BINFMT_MISC=y
81 140
82# 141#
83# Generic Driver Options 142# Networking
84# 143#
85# CONFIG_STANDALONE is not set 144# CONFIG_NET is not set
86# CONFIG_PREVENT_FIRMWARE_BUILD is not set
87# CONFIG_FW_LOADER is not set
88# CONFIG_DEBUG_DRIVER is not set
89 145
90# 146#
91# Memory Technology Devices (MTD) 147# Generic Driver Options
92# 148#
149CONFIG_STANDALONE=y
150# CONFIG_PREVENT_FIRMWARE_BUILD is not set
151# CONFIG_SYS_HYPERVISOR is not set
93CONFIG_MTD=y 152CONFIG_MTD=y
94# CONFIG_MTD_DEBUG is not set 153# CONFIG_MTD_DEBUG is not set
154# CONFIG_MTD_CONCAT is not set
95CONFIG_MTD_PARTITIONS=y 155CONFIG_MTD_PARTITIONS=y
96CONFIG_MTD_CONCAT=y 156CONFIG_MTD_REDBOOT_PARTS=y
97# CONFIG_MTD_REDBOOT_PARTS is not set 157CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
158# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
159# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
98# CONFIG_MTD_CMDLINE_PARTS is not set 160# CONFIG_MTD_CMDLINE_PARTS is not set
99 161
100# 162#
101# User Modules And Translation Layers 163# User Modules And Translation Layers
102# 164#
103CONFIG_MTD_CHAR=y 165CONFIG_MTD_CHAR=y
104CONFIG_MTD_BLOCK=y 166# CONFIG_MTD_BLKDEVS is not set
167# CONFIG_MTD_BLOCK is not set
168# CONFIG_MTD_BLOCK_RO is not set
105# CONFIG_FTL is not set 169# CONFIG_FTL is not set
106# CONFIG_NFTL is not set 170# CONFIG_NFTL is not set
107# CONFIG_INFTL is not set 171# CONFIG_INFTL is not set
172# CONFIG_RFD_FTL is not set
173# CONFIG_SSFDC is not set
174# CONFIG_MTD_OOPS is not set
108 175
109# 176#
110# RAM/ROM/Flash chip drivers 177# RAM/ROM/Flash chip drivers
@@ -129,7 +196,9 @@ CONFIG_MTD_ROM=y
129# Mapping drivers for chip access 196# Mapping drivers for chip access
130# 197#
131# CONFIG_MTD_COMPLEX_MAPPINGS is not set 198# CONFIG_MTD_COMPLEX_MAPPINGS is not set
199# CONFIG_MTD_PHYSMAP is not set
132CONFIG_MTD_UCLINUX=y 200CONFIG_MTD_UCLINUX=y
201# CONFIG_MTD_PLATRAM is not set
133 202
134# 203#
135# Self-contained MTD device drivers 204# Self-contained MTD device drivers
@@ -137,7 +206,6 @@ CONFIG_MTD_UCLINUX=y
137# CONFIG_MTD_SLRAM is not set 206# CONFIG_MTD_SLRAM is not set
138# CONFIG_MTD_PHRAM is not set 207# CONFIG_MTD_PHRAM is not set
139# CONFIG_MTD_MTDRAM is not set 208# CONFIG_MTD_MTDRAM is not set
140# CONFIG_MTD_BLKMTD is not set
141# CONFIG_MTD_BLOCK2MTD is not set 209# CONFIG_MTD_BLOCK2MTD is not set
142 210
143# 211#
@@ -146,63 +214,27 @@ CONFIG_MTD_UCLINUX=y
146# CONFIG_MTD_DOC2000 is not set 214# CONFIG_MTD_DOC2000 is not set
147# CONFIG_MTD_DOC2001 is not set 215# CONFIG_MTD_DOC2001 is not set
148# CONFIG_MTD_DOC2001PLUS is not set 216# CONFIG_MTD_DOC2001PLUS is not set
149
150#
151# NAND Flash Device Drivers
152#
153# CONFIG_MTD_NAND is not set 217# CONFIG_MTD_NAND is not set
218# CONFIG_MTD_ONENAND is not set
154 219
155# 220#
156# Block devices 221# UBI - Unsorted block images
157#
158# CONFIG_BLK_DEV_FD is not set
159# CONFIG_BLK_DEV_XD is not set
160# CONFIG_BLK_DEV_LOOP is not set
161# CONFIG_BLK_DEV_RAM is not set
162CONFIG_BLK_DEV_RAM_COUNT=16
163CONFIG_INITRAMFS_SOURCE=""
164# CONFIG_CDROM_PKTCDVD is not set
165
166#
167# IO Schedulers
168#
169CONFIG_IOSCHED_NOOP=y
170# CONFIG_IOSCHED_AS is not set
171# CONFIG_IOSCHED_DEADLINE is not set
172# CONFIG_IOSCHED_CFQ is not set
173
174#
175# ATA/ATAPI/MFM/RLL support
176# 222#
223# CONFIG_MTD_UBI is not set
224# CONFIG_BLK_DEV is not set
225CONFIG_HAVE_IDE=y
177# CONFIG_IDE is not set 226# CONFIG_IDE is not set
178 227
179# 228#
180# Networking support
181#
182# CONFIG_NET is not set
183# CONFIG_NETPOLL is not set
184# CONFIG_NET_POLL_CONTROLLER is not set
185
186#
187# Input device support 229# Input device support
188# 230#
189# CONFIG_INPUT is not set 231# CONFIG_INPUT is not set
190 232
191# 233#
192# Userland interfaces 234# Hardware I/O ports
193#
194
195#
196# Input I/O drivers
197# 235#
198# CONFIG_GAMEPORT is not set
199CONFIG_SOUND_GAMEPORT=y
200# CONFIG_SERIO is not set 236# CONFIG_SERIO is not set
201# CONFIG_SERIO_I8042 is not set 237# CONFIG_GAMEPORT is not set
202
203#
204# Input Device Drivers
205#
206 238
207# 239#
208# Character devices 240# Character devices
@@ -223,45 +255,31 @@ CONFIG_SOUND_GAMEPORT=y
223# Non-8250 serial port support 255# Non-8250 serial port support
224# 256#
225CONFIG_SERIAL_SH_SCI=y 257CONFIG_SERIAL_SH_SCI=y
258CONFIG_SERIAL_SH_SCI_NR_UARTS=2
226CONFIG_SERIAL_SH_SCI_CONSOLE=y 259CONFIG_SERIAL_SH_SCI_CONSOLE=y
227CONFIG_SERIAL_CORE=y 260CONFIG_SERIAL_CORE=y
228CONFIG_SERIAL_CORE_CONSOLE=y 261CONFIG_SERIAL_CORE_CONSOLE=y
229
230#
231# I2C support
232#
233# CONFIG_I2C is not set 262# CONFIG_I2C is not set
234 263# CONFIG_HWMON is not set
235# 264# CONFIG_USB_SUPPORT is not set
236# USB support
237#
238# CONFIG_USB_ARCH_HAS_HCD is not set
239# CONFIG_USB_ARCH_HAS_OHCI is not set
240
241#
242# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information
243#
244
245#
246# USB Gadget Support
247#
248# CONFIG_USB_GADGET is not set
249 265
250# 266#
251# File systems 267# File systems
252# 268#
253# CONFIG_EXT2_FS is not set 269# CONFIG_EXT2_FS is not set
254# CONFIG_EXT3_FS is not set 270# CONFIG_EXT3_FS is not set
255# CONFIG_JBD is not set 271# CONFIG_EXT4DEV_FS is not set
256# CONFIG_REISERFS_FS is not set 272# CONFIG_REISERFS_FS is not set
257# CONFIG_JFS_FS is not set 273# CONFIG_JFS_FS is not set
274# CONFIG_FS_POSIX_ACL is not set
258# CONFIG_XFS_FS is not set 275# CONFIG_XFS_FS is not set
259# CONFIG_MINIX_FS is not set 276# CONFIG_GFS2_FS is not set
260CONFIG_ROMFS_FS=y
261# CONFIG_QUOTA is not set
262# CONFIG_DNOTIFY is not set 277# CONFIG_DNOTIFY is not set
278# CONFIG_INOTIFY is not set
279# CONFIG_QUOTA is not set
263# CONFIG_AUTOFS_FS is not set 280# CONFIG_AUTOFS_FS is not set
264# CONFIG_AUTOFS4_FS is not set 281# CONFIG_AUTOFS4_FS is not set
282# CONFIG_FUSE_FS is not set
265 283
266# 284#
267# CD-ROM/DVD Filesystems 285# CD-ROM/DVD Filesystems
@@ -280,11 +298,11 @@ CONFIG_ROMFS_FS=y
280# Pseudo filesystems 298# Pseudo filesystems
281# 299#
282CONFIG_PROC_FS=y 300CONFIG_PROC_FS=y
283# CONFIG_SYSFS is not set 301CONFIG_PROC_SYSCTL=y
284# CONFIG_DEVFS_FS is not set 302CONFIG_SYSFS=y
285# CONFIG_TMPFS is not set 303# CONFIG_TMPFS is not set
286# CONFIG_HUGETLB_PAGE is not set 304# CONFIG_HUGETLB_PAGE is not set
287CONFIG_RAMFS=y 305# CONFIG_CONFIGFS_FS is not set
288 306
289# 307#
290# Miscellaneous filesystems 308# Miscellaneous filesystems
@@ -296,12 +314,13 @@ CONFIG_RAMFS=y
296# CONFIG_BEFS_FS is not set 314# CONFIG_BEFS_FS is not set
297# CONFIG_BFS_FS is not set 315# CONFIG_BFS_FS is not set
298# CONFIG_EFS_FS is not set 316# CONFIG_EFS_FS is not set
299# CONFIG_JFFS_FS is not set
300# CONFIG_JFFS2_FS is not set 317# CONFIG_JFFS2_FS is not set
301# CONFIG_CRAMFS is not set 318# CONFIG_CRAMFS is not set
302# CONFIG_VXFS_FS is not set 319# CONFIG_VXFS_FS is not set
320# CONFIG_MINIX_FS is not set
303# CONFIG_HPFS_FS is not set 321# CONFIG_HPFS_FS is not set
304# CONFIG_QNX4FS_FS is not set 322# CONFIG_QNX4FS_FS is not set
323CONFIG_ROMFS_FS=y
305# CONFIG_SYSV_FS is not set 324# CONFIG_SYSV_FS is not set
306# CONFIG_UFS_FS is not set 325# CONFIG_UFS_FS is not set
307 326
@@ -310,22 +329,23 @@ CONFIG_RAMFS=y
310# 329#
311# CONFIG_PARTITION_ADVANCED is not set 330# CONFIG_PARTITION_ADVANCED is not set
312CONFIG_MSDOS_PARTITION=y 331CONFIG_MSDOS_PARTITION=y
313
314#
315# Native Language Support
316#
317# CONFIG_NLS is not set 332# CONFIG_NLS is not set
318 333
319# 334#
320# Kernel hacking 335# Kernel hacking
321# 336#
322CONFIG_DEBUG_KERNEL=y 337# CONFIG_PRINTK_TIME is not set
323# CONFIG_SCHEDSTATS is not set 338# CONFIG_ENABLE_WARN_DEPRECATED is not set
324# CONFIG_DEBUG_KOBJECT is not set 339# CONFIG_ENABLE_MUST_CHECK is not set
340# CONFIG_MAGIC_SYSRQ is not set
341# CONFIG_UNUSED_SYMBOLS is not set
325# CONFIG_DEBUG_FS is not set 342# CONFIG_DEBUG_FS is not set
326CONFIG_FULLDEBUG=y 343# CONFIG_HEADERS_CHECK is not set
344# CONFIG_DEBUG_KERNEL is not set
345# CONFIG_SAMPLES is not set
346# CONFIG_FULLDEBUG is not set
327# CONFIG_HIGHPROFILE is not set 347# CONFIG_HIGHPROFILE is not set
328CONFIG_NO_KERNEL_MSG=y 348# CONFIG_NO_KERNEL_MSG is not set
329# CONFIG_SYSCALL_PRINT is not set 349# CONFIG_SYSCALL_PRINT is not set
330# CONFIG_GDB_DEBUG is not set 350# CONFIG_GDB_DEBUG is not set
331# CONFIG_SH_STANDARD_BIOS is not set 351# CONFIG_SH_STANDARD_BIOS is not set
@@ -337,20 +357,17 @@ CONFIG_NO_KERNEL_MSG=y
337# 357#
338# CONFIG_KEYS is not set 358# CONFIG_KEYS is not set
339# CONFIG_SECURITY is not set 359# CONFIG_SECURITY is not set
340 360# CONFIG_SECURITY_FILE_CAPABILITIES is not set
341#
342# Cryptographic options
343#
344# CONFIG_CRYPTO is not set 361# CONFIG_CRYPTO is not set
345 362
346# 363#
347# Hardware crypto devices
348#
349
350#
351# Library routines 364# Library routines
352# 365#
353# CONFIG_CRC_CCITT is not set 366# CONFIG_CRC_CCITT is not set
354CONFIG_CRC32=y 367# CONFIG_CRC16 is not set
368# CONFIG_CRC_ITU_T is not set
369# CONFIG_CRC32 is not set
370# CONFIG_CRC7 is not set
355# CONFIG_LIBCRC32C is not set 371# CONFIG_LIBCRC32C is not set
356CONFIG_ZLIB_INFLATE=y 372CONFIG_ZLIB_INFLATE=y
373CONFIG_HAS_IOMEM=y
diff --git a/arch/h8300/kernel/irq.c b/arch/h8300/kernel/irq.c
index 5a1b4cfea05b..ef4f0047067d 100644
--- a/arch/h8300/kernel/irq.c
+++ b/arch/h8300/kernel/irq.c
@@ -26,7 +26,7 @@
26 26
27extern unsigned long *interrupt_redirect_table; 27extern unsigned long *interrupt_redirect_table;
28extern const int h8300_saved_vectors[]; 28extern const int h8300_saved_vectors[];
29extern const unsigned long h8300_trap_table[]; 29extern const h8300_vector h8300_trap_table[];
30int h8300_enable_irq_pin(unsigned int irq); 30int h8300_enable_irq_pin(unsigned int irq);
31void h8300_disable_irq_pin(unsigned int irq); 31void h8300_disable_irq_pin(unsigned int irq);
32 32
@@ -116,7 +116,7 @@ static void __init setup_vector(void)
116{ 116{
117 int i; 117 int i;
118 unsigned long *ramvec,*ramvec_p; 118 unsigned long *ramvec,*ramvec_p;
119 const unsigned long *trap_entry; 119 const h8300_vector *trap_entry;
120 const int *saved_vector; 120 const int *saved_vector;
121 121
122 ramvec = get_vector_address(); 122 ramvec = get_vector_address();
diff --git a/arch/h8300/kernel/signal.c b/arch/h8300/kernel/signal.c
index 62ea12d339b9..cf3472f7389b 100644
--- a/arch/h8300/kernel/signal.c
+++ b/arch/h8300/kernel/signal.c
@@ -352,7 +352,7 @@ static void setup_frame (int sig, struct k_sigaction *ka,
352 ret = (unsigned char *)(ka->sa.sa_restorer); 352 ret = (unsigned char *)(ka->sa.sa_restorer);
353 else { 353 else {
354 /* sub.l er0,er0; mov.b #__NR_sigreturn,r0l; trapa #0 */ 354 /* sub.l er0,er0; mov.b #__NR_sigreturn,r0l; trapa #0 */
355 err != __put_user(0x1a80f800 + (__NR_sigreturn & 0xff), 355 err |= __put_user(0x1a80f800 + (__NR_sigreturn & 0xff),
356 (unsigned long *)(frame->retcode + 0)); 356 (unsigned long *)(frame->retcode + 0));
357 err |= __put_user(0x5700, (unsigned short *)(frame->retcode + 4)); 357 err |= __put_user(0x5700, (unsigned short *)(frame->retcode + 4));
358 } 358 }
@@ -428,7 +428,7 @@ static void setup_rt_frame (int sig, struct k_sigaction *ka, siginfo_t *info,
428 ret = (unsigned char *)(ka->sa.sa_restorer); 428 ret = (unsigned char *)(ka->sa.sa_restorer);
429 else { 429 else {
430 /* sub.l er0,er0; mov.b #__NR_sigreturn,r0l; trapa #0 */ 430 /* sub.l er0,er0; mov.b #__NR_sigreturn,r0l; trapa #0 */
431 err != __put_user(0x1a80f800 + (__NR_sigreturn & 0xff), 431 err |= __put_user(0x1a80f800 + (__NR_sigreturn & 0xff),
432 (unsigned long *)(frame->retcode + 0)); 432 (unsigned long *)(frame->retcode + 0));
433 err |= __put_user(0x5700, (unsigned short *)(frame->retcode + 4)); 433 err |= __put_user(0x5700, (unsigned short *)(frame->retcode + 4));
434 } 434 }
diff --git a/arch/h8300/platform/h8300h/Makefile b/arch/h8300/platform/h8300h/Makefile
index c5096369ea50..420f73b0d962 100644
--- a/arch/h8300/platform/h8300h/Makefile
+++ b/arch/h8300/platform/h8300h/Makefile
@@ -4,4 +4,4 @@
4# Reuse any files we can from the H8/300H 4# Reuse any files we can from the H8/300H
5# 5#
6 6
7obj-y := irq_pin.o ptrace_h8300h.o 7obj-y := irq.o ptrace_h8300h.o
diff --git a/arch/h8300/platform/h8300h/irq.c b/arch/h8300/platform/h8300h/irq.c
new file mode 100644
index 000000000000..e977345105d7
--- /dev/null
+++ b/arch/h8300/platform/h8300h/irq.c
@@ -0,0 +1,82 @@
1/*
2 * Interrupt handling H8/300H depend.
3 * Yoshinori Sato <ysato@users.sourceforge.jp>
4 *
5 */
6
7#include <linux/init.h>
8#include <linux/errno.h>
9
10#include <asm/ptrace.h>
11#include <asm/traps.h>
12#include <asm/irq.h>
13#include <asm/io.h>
14#include <asm/gpio.h>
15#include <asm/regs306x.h>
16
17const int __initdata h8300_saved_vectors[] = {
18#if defined(CONFIG_GDB_DEBUG)
19 TRAP3_VEC, /* TRAPA #3 is GDB breakpoint */
20#endif
21 -1,
22};
23
24const h8300_vector __initdata h8300_trap_table[] = {
25 0, 0, 0, 0, 0, 0, 0, 0,
26 system_call,
27 0,
28 0,
29 trace_break,
30};
31
32int h8300_enable_irq_pin(unsigned int irq)
33{
34 int bitmask;
35 if (irq < EXT_IRQ0 || irq > EXT_IRQ5)
36 return 0;
37
38 /* initialize IRQ pin */
39 bitmask = 1 << (irq - EXT_IRQ0);
40 switch(irq) {
41 case EXT_IRQ0:
42 case EXT_IRQ1:
43 case EXT_IRQ2:
44 case EXT_IRQ3:
45 if (H8300_GPIO_RESERVE(H8300_GPIO_P8, bitmask) == 0)
46 return -EBUSY;
47 H8300_GPIO_DDR(H8300_GPIO_P8, bitmask, H8300_GPIO_INPUT);
48 break;
49 case EXT_IRQ4:
50 case EXT_IRQ5:
51 if (H8300_GPIO_RESERVE(H8300_GPIO_P9, bitmask) == 0)
52 return -EBUSY;
53 H8300_GPIO_DDR(H8300_GPIO_P9, bitmask, H8300_GPIO_INPUT);
54 break;
55 }
56
57 return 0;
58}
59
60void h8300_disable_irq_pin(unsigned int irq)
61{
62 int bitmask;
63 if (irq < EXT_IRQ0 || irq > EXT_IRQ5)
64 return;
65
66 /* disable interrupt & release IRQ pin */
67 bitmask = 1 << (irq - EXT_IRQ0);
68 switch(irq) {
69 case EXT_IRQ0:
70 case EXT_IRQ1:
71 case EXT_IRQ2:
72 case EXT_IRQ3:
73 *(volatile unsigned char *)IER &= ~bitmask;
74 H8300_GPIO_FREE(H8300_GPIO_P8, bitmask);
75 break ;
76 case EXT_IRQ4:
77 case EXT_IRQ5:
78 *(volatile unsigned char *)IER &= ~bitmask;
79 H8300_GPIO_FREE(H8300_GPIO_P9, bitmask);
80 break;
81 }
82}
diff --git a/arch/h8300/platform/h8s/ints.c b/arch/h8300/platform/h8s/ints.c
deleted file mode 100644
index ac10b9783850..000000000000
--- a/arch/h8300/platform/h8s/ints.c
+++ /dev/null
@@ -1,304 +0,0 @@
1/*
2 * linux/arch/h8300/platform/h8s/ints.c
3 *
4 * Yoshinori Sato <ysato@users.sourceforge.jp>
5 *
6 * Based on linux/arch/$(ARCH)/platform/$(PLATFORM)/ints.c
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 * Copyright 1996 Roman Zippel
13 * Copyright 1999 D. Jeff Dionne <jeff@rt-control.com>
14 */
15
16#include <linux/module.h>
17#include <linux/types.h>
18#include <linux/kernel.h>
19#include <linux/sched.h>
20#include <linux/kernel_stat.h>
21#include <linux/seq_file.h>
22#include <linux/init.h>
23#include <linux/interrupt.h>
24#include <linux/bootmem.h>
25#include <linux/random.h>
26#include <linux/hardirq.h>
27
28#include <asm/system.h>
29#include <asm/irq.h>
30#include <asm/traps.h>
31#include <asm/io.h>
32#include <asm/setup.h>
33#include <asm/gpio.h>
34#include <asm/regs267x.h>
35#include <asm/errno.h>
36
37/*
38 * This structure has only 4 elements for speed reasons
39 */
40typedef struct irq_handler {
41 irqreturn_t (*handler)(int, void *, struct pt_regs *);
42 int flags;
43 int count;
44 void *dev_id;
45 const char *devname;
46} irq_handler_t;
47
48static irq_handler_t *irq_list[NR_IRQS];
49
50/* IRQ pin assignment */
51struct irq_pins {
52 unsigned char port_no;
53 unsigned char bit_no;
54};
55/* ISTR = 0 */
56static const struct irq_pins irq_assign_table0[16]={
57 {H8300_GPIO_P5,H8300_GPIO_B0},{H8300_GPIO_P5,H8300_GPIO_B1},
58 {H8300_GPIO_P5,H8300_GPIO_B2},{H8300_GPIO_P5,H8300_GPIO_B3},
59 {H8300_GPIO_P5,H8300_GPIO_B4},{H8300_GPIO_P5,H8300_GPIO_B5},
60 {H8300_GPIO_P5,H8300_GPIO_B6},{H8300_GPIO_P5,H8300_GPIO_B7},
61 {H8300_GPIO_P6,H8300_GPIO_B0},{H8300_GPIO_P6,H8300_GPIO_B1},
62 {H8300_GPIO_P6,H8300_GPIO_B2},{H8300_GPIO_P6,H8300_GPIO_B3},
63 {H8300_GPIO_P6,H8300_GPIO_B4},{H8300_GPIO_P6,H8300_GPIO_B5},
64 {H8300_GPIO_PF,H8300_GPIO_B1},{H8300_GPIO_PF,H8300_GPIO_B2},
65};
66/* ISTR = 1 */
67static const struct irq_pins irq_assign_table1[16]={
68 {H8300_GPIO_P8,H8300_GPIO_B0},{H8300_GPIO_P8,H8300_GPIO_B1},
69 {H8300_GPIO_P8,H8300_GPIO_B2},{H8300_GPIO_P8,H8300_GPIO_B3},
70 {H8300_GPIO_P8,H8300_GPIO_B4},{H8300_GPIO_P8,H8300_GPIO_B5},
71 {H8300_GPIO_PH,H8300_GPIO_B2},{H8300_GPIO_PH,H8300_GPIO_B3},
72 {H8300_GPIO_P2,H8300_GPIO_B0},{H8300_GPIO_P2,H8300_GPIO_B1},
73 {H8300_GPIO_P2,H8300_GPIO_B2},{H8300_GPIO_P2,H8300_GPIO_B3},
74 {H8300_GPIO_P2,H8300_GPIO_B4},{H8300_GPIO_P2,H8300_GPIO_B5},
75 {H8300_GPIO_P2,H8300_GPIO_B6},{H8300_GPIO_P2,H8300_GPIO_B7},
76};
77
78static short use_kmalloc = 0;
79
80extern unsigned long *interrupt_redirect_table;
81
82#define CPU_VECTOR ((unsigned long *)0x000000)
83#define ADDR_MASK (0xffffff)
84
85static inline unsigned long *get_vector_address(void)
86{
87 volatile unsigned long *rom_vector = CPU_VECTOR;
88 unsigned long base,tmp;
89 int vec_no;
90
91 base = rom_vector[EXT_IRQ0] & ADDR_MASK;
92
93 /* check romvector format */
94 for (vec_no = EXT_IRQ1; vec_no <= EXT_IRQ15; vec_no++) {
95 if ((base+(vec_no - EXT_IRQ0)*4) != (rom_vector[vec_no] & ADDR_MASK))
96 return NULL;
97 }
98
99 /* ramvector base address */
100 base -= EXT_IRQ0*4;
101
102 /* writerble check */
103 tmp = ~(*(unsigned long *)base);
104 (*(unsigned long *)base) = tmp;
105 if ((*(unsigned long *)base) != tmp)
106 return NULL;
107 return (unsigned long *)base;
108}
109
110void __init init_IRQ(void)
111{
112#if defined(CONFIG_RAMKERNEL)
113 int i;
114 unsigned long *ramvec,*ramvec_p;
115 unsigned long break_vec;
116
117 ramvec = get_vector_address();
118 if (ramvec == NULL)
119 panic("interrupt vector serup failed.");
120 else
121 printk("virtual vector at 0x%08lx\n",(unsigned long)ramvec);
122
123#if defined(CONFIG_GDB_DEBUG)
124 /* save original break vector */
125 break_vec = ramvec[TRAP3_VEC];
126#else
127 break_vec = VECTOR(trace_break);
128#endif
129
130 /* create redirect table */
131 for (ramvec_p = ramvec, i = 0; i < NR_IRQS; i++)
132 *ramvec_p++ = REDIRECT(interrupt_entry);
133
134 /* set special vector */
135 ramvec[TRAP0_VEC] = VECTOR(system_call);
136 ramvec[TRAP3_VEC] = break_vec;
137 interrupt_redirect_table = ramvec;
138#ifdef DUMP_VECTOR
139 ramvec_p = ramvec;
140 for (i = 0; i < NR_IRQS; i++) {
141 if ((i % 8) == 0)
142 printk("\n%p: ",ramvec_p);
143 printk("%p ",*ramvec_p);
144 ramvec_p++;
145 }
146 printk("\n");
147#endif
148#endif
149}
150
151int request_irq(unsigned int irq,
152 irqreturn_t (*handler)(int, void *, struct pt_regs *),
153 unsigned long flags, const char *devname, void *dev_id)
154{
155 unsigned short ptn = 1 << (irq - EXT_IRQ0);
156 irq_handler_t *irq_handle;
157 if (irq < 0 || irq >= NR_IRQS) {
158 printk("Incorrect IRQ %d from %s\n", irq, devname);
159 return -EINVAL;
160 }
161 if (irq_list[irq])
162 return -EBUSY; /* already used */
163 if (irq >= EXT_IRQ0 && irq <= EXT_IRQ15) {
164 /* initialize IRQ pin */
165 unsigned int port_no,bit_no;
166 if (*(volatile unsigned short *)ITSR & ptn) {
167 port_no = irq_assign_table1[irq - EXT_IRQ0].port_no;
168 bit_no = irq_assign_table1[irq - EXT_IRQ0].bit_no;
169 } else {
170 port_no = irq_assign_table0[irq - EXT_IRQ0].port_no;
171 bit_no = irq_assign_table0[irq - EXT_IRQ0].bit_no;
172 }
173 if (H8300_GPIO_RESERVE(port_no, bit_no) == 0)
174 return -EBUSY; /* pin already use */
175 H8300_GPIO_DDR(port_no, bit_no, H8300_GPIO_INPUT);
176 *(volatile unsigned short *)ISR &= ~ptn; /* ISR clear */
177 }
178
179 if (use_kmalloc)
180 irq_handle = kmalloc(sizeof(irq_handler_t), GFP_ATOMIC);
181 else {
182 /* use bootmem allocator */
183 irq_handle = (irq_handler_t *)alloc_bootmem(sizeof(irq_handler_t));
184 irq_handle = (irq_handler_t *)((unsigned long)irq_handle | 0x80000000);
185 }
186
187 if (irq_handle == NULL)
188 return -ENOMEM;
189
190 irq_handle->handler = handler;
191 irq_handle->flags = flags;
192 irq_handle->count = 0;
193 irq_handle->dev_id = dev_id;
194 irq_handle->devname = devname;
195 irq_list[irq] = irq_handle;
196 if (irq_handle->flags & IRQF_SAMPLE_RANDOM)
197 rand_initialize_irq(irq);
198
199 /* enable interrupt */
200 /* compatible i386 */
201 if (irq >= EXT_IRQ0 && irq <= EXT_IRQ15)
202 *(volatile unsigned short *)IER |= ptn;
203 return 0;
204}
205
206EXPORT_SYMBOL(request_irq);
207
208void free_irq(unsigned int irq, void *dev_id)
209{
210 if (irq >= NR_IRQS)
211 return;
212 if (irq_list[irq]->dev_id != dev_id)
213 printk("%s: Removing probably wrong IRQ %d from %s\n",
214 __FUNCTION__, irq, irq_list[irq]->devname);
215 if (irq >= EXT_IRQ0 && irq <= EXT_IRQ15) {
216 /* disable interrupt & release IRQ pin */
217 unsigned short port_no,bit_no;
218 *(volatile unsigned short *)ISR &= ~(1 << (irq - EXT_IRQ0));
219 *(volatile unsigned short *)IER |= 1 << (irq - EXT_IRQ0);
220 if (*(volatile unsigned short *)ITSR & (1 << (irq - EXT_IRQ0))) {
221 port_no = irq_assign_table1[irq - EXT_IRQ0].port_no;
222 bit_no = irq_assign_table1[irq - EXT_IRQ0].bit_no;
223 } else {
224 port_no = irq_assign_table0[irq - EXT_IRQ0].port_no;
225 bit_no = irq_assign_table0[irq - EXT_IRQ0].bit_no;
226 }
227 H8300_GPIO_FREE(port_no, bit_no);
228 }
229 if (((unsigned long)irq_list[irq] & 0x80000000) == 0) {
230 kfree(irq_list[irq]);
231 irq_list[irq] = NULL;
232 }
233}
234
235EXPORT_SYMBOL(free_irq);
236
237unsigned long probe_irq_on (void)
238{
239 return 0;
240}
241
242EXPORT_SYMBOL(probe_irq_on);
243
244int probe_irq_off (unsigned long irqs)
245{
246 return 0;
247}
248
249EXPORT_SYMBOL(probe_irq_off);
250
251void enable_irq(unsigned int irq)
252{
253 if (irq >= EXT_IRQ0 && irq <= EXT_IRQ15)
254 *(volatile unsigned short *)IER |= 1 << (irq - EXT_IRQ0);
255}
256
257void disable_irq(unsigned int irq)
258{
259 if (irq >= EXT_IRQ0 && irq <= EXT_IRQ15)
260 *(volatile unsigned short *)IER &= ~(1 << (irq - EXT_IRQ0));
261}
262
263asmlinkage void process_int(unsigned long vec, struct pt_regs *fp)
264{
265 irq_enter();
266 /* ISR clear */
267 /* compatible i386 */
268 if (vec >= EXT_IRQ0 && vec <= EXT_IRQ15)
269 *(volatile unsigned short *)ISR &= ~(1 << (vec - EXT_IRQ0));
270 if (vec < NR_IRQS) {
271 if (irq_list[vec]) {
272 irq_list[vec]->handler(vec, irq_list[vec]->dev_id, fp);
273 irq_list[vec]->count++;
274 if (irq_list[vec]->flags & IRQF_SAMPLE_RANDOM)
275 add_interrupt_randomness(vec);
276 }
277 } else {
278 BUG();
279 }
280 irq_exit();
281}
282
283int show_interrupts(struct seq_file *p, void *v)
284{
285 int i = *(loff_t *) v;
286
287 if ((i < NR_IRQS) && (irq_list[i] !=NULL)) {
288 seq_printf(p, "%3d: %10u ",i,irq_list[i]->count);
289 seq_printf(p, "%s\n", irq_list[i]->devname);
290 }
291
292 return 0;
293}
294
295void init_irq_proc(void)
296{
297}
298
299static int __init enable_kmalloc(void)
300{
301 use_kmalloc = 1;
302 return 0;
303}
304core_initcall(enable_kmalloc);
diff --git a/arch/h8300/platform/h8s/ints_h8s.c b/arch/h8300/platform/h8s/irq.c
index faa8a459d952..8182f041f829 100644
--- a/arch/h8300/platform/h8s/ints_h8s.c
+++ b/arch/h8300/platform/h8s/irq.c
@@ -27,11 +27,11 @@ const int __initdata h8300_saved_vectors[]={
27}; 27};
28 28
29/* trap entry table */ 29/* trap entry table */
30const unsigned long __initdata h8300_trap_table[NR_TRAPS]={ 30const H8300_VECTOR __initdata h8300_trap_table[] = {
31 0,0,0,0,0, 31 0,0,0,0,0,
32 (unsigned long)trace_break, /* TRACE */ 32 trace_break, /* TRACE */
33 0,0, 33 0,0,
34 (unsigned long)system_call, /* TRAPA #0 */ 34 system_call, /* TRAPA #0 */
35 0,0,0,0,0,0,0 35 0,0,0,0,0,0,0
36}; 36};
37 37
@@ -50,7 +50,7 @@ static const struct irq_pins irq_assign_table0[16]={
50 {H8300_GPIO_P6,H8300_GPIO_B2},{H8300_GPIO_P6,H8300_GPIO_B3}, 50 {H8300_GPIO_P6,H8300_GPIO_B2},{H8300_GPIO_P6,H8300_GPIO_B3},
51 {H8300_GPIO_P6,H8300_GPIO_B4},{H8300_GPIO_P6,H8300_GPIO_B5}, 51 {H8300_GPIO_P6,H8300_GPIO_B4},{H8300_GPIO_P6,H8300_GPIO_B5},
52 {H8300_GPIO_PF,H8300_GPIO_B1},{H8300_GPIO_PF,H8300_GPIO_B2}, 52 {H8300_GPIO_PF,H8300_GPIO_B1},{H8300_GPIO_PF,H8300_GPIO_B2},
53}; 53};
54/* ISTR = 1 */ 54/* ISTR = 1 */
55static const struct irq_pins irq_assign_table1[16]={ 55static const struct irq_pins irq_assign_table1[16]={
56 {H8300_GPIO_P8,H8300_GPIO_B0},{H8300_GPIO_P8,H8300_GPIO_B1}, 56 {H8300_GPIO_P8,H8300_GPIO_B0},{H8300_GPIO_P8,H8300_GPIO_B1},