summaryrefslogtreecommitdiffstats
path: root/arch/m32r/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/m32r/kernel')
-rw-r--r--arch/m32r/kernel/Makefile8
-rw-r--r--arch/m32r/kernel/entry.S569
-rw-r--r--arch/m32r/kernel/io_m32104ut.c297
-rw-r--r--arch/m32r/kernel/io_m32700ut.c395
-rw-r--r--arch/m32r/kernel/io_mappi.c325
-rw-r--r--arch/m32r/kernel/io_mappi2.c383
-rw-r--r--arch/m32r/kernel/io_mappi3.c405
-rw-r--r--arch/m32r/kernel/io_oaks32r.c228
-rw-r--r--arch/m32r/kernel/io_opsput.c395
-rw-r--r--arch/m32r/kernel/io_usrv.c225
-rw-r--r--arch/m32r/kernel/setup_m32104ut.c155
-rw-r--r--arch/m32r/kernel/setup_m32700ut.c518
-rw-r--r--arch/m32r/kernel/setup_mappi.c201
-rw-r--r--arch/m32r/kernel/setup_mappi2.c201
-rw-r--r--arch/m32r/kernel/setup_mappi3.c251
-rw-r--r--arch/m32r/kernel/setup_oaks32r.c135
-rw-r--r--arch/m32r/kernel/setup_opsput.c519
-rw-r--r--arch/m32r/kernel/setup_usrv.c249
-rw-r--r--arch/m32r/kernel/syscall_table.S286
19 files changed, 343 insertions, 5402 deletions
diff --git a/arch/m32r/kernel/Makefile b/arch/m32r/kernel/Makefile
index 5a2fa886906f..e97e26e87c9e 100644
--- a/arch/m32r/kernel/Makefile
+++ b/arch/m32r/kernel/Makefile
@@ -8,14 +8,6 @@ obj-y := process.o entry.o traps.o align.o irq.o setup.o time.o \
m32r_ksyms.o sys_m32r.o semaphore.o signal.o ptrace.o
obj-$(CONFIG_SMP) += smp.o smpboot.o
-obj-$(CONFIG_PLAT_MAPPI) += setup_mappi.o io_mappi.o
-obj-$(CONFIG_PLAT_MAPPI2) += setup_mappi2.o io_mappi2.o
-obj-$(CONFIG_PLAT_MAPPI3) += setup_mappi3.o io_mappi3.o
-obj-$(CONFIG_PLAT_USRV) += setup_usrv.o io_usrv.o
-obj-$(CONFIG_PLAT_M32700UT) += setup_m32700ut.o io_m32700ut.o
-obj-$(CONFIG_PLAT_OPSPUT) += setup_opsput.o io_opsput.o
obj-$(CONFIG_MODULES) += module.o
-obj-$(CONFIG_PLAT_OAKS32R) += setup_oaks32r.o io_oaks32r.o
-obj-$(CONFIG_PLAT_M32104UT) += setup_m32104ut.o io_m32104ut.o
EXTRA_AFLAGS := -traditional
diff --git a/arch/m32r/kernel/entry.S b/arch/m32r/kernel/entry.S
index a2c472c0549f..d4eaa2fd1818 100644
--- a/arch/m32r/kernel/entry.S
+++ b/arch/m32r/kernel/entry.S
@@ -109,15 +109,10 @@
#define SP(reg) @(0x68,reg)
#define ORIG_R0(reg) @(0x6C,reg)
-CF_MASK = 0x00000001
-TF_MASK = 0x00000100
-IF_MASK = 0x00000200
-DF_MASK = 0x00000400
-NT_MASK = 0x00004000
-VM_MASK = 0x00020000
+#define nr_syscalls ((syscall_table_size)/4)
#ifdef CONFIG_PREEMPT
-#define preempt_stop(x) CLI(x)
+#define preempt_stop(x) DISABLE_INTERRUPTS(x)
#else
#define preempt_stop(x)
#define resume_kernel restore_all
@@ -149,7 +144,7 @@ ret_from_intr:
#endif
beqz r4, resume_kernel
ENTRY(resume_userspace)
- CLI(r4) ; make sure we don't miss an interrupt
+ DISABLE_INTERRUPTS(r4) ; make sure we don't miss an interrupt
; setting need_resched or sigpending
; between sampling and the iret
GET_THREAD_INFO(r8)
@@ -173,11 +168,11 @@ need_resched:
beqz r4, restore_all
LDIMM (r4, PREEMPT_ACTIVE)
st r4, @(TI_PRE_COUNT, r8)
- STI(r4)
+ ENABLE_INTERRUPTS(r4)
bl schedule
ldi r4, #0
st r4, @(TI_PRE_COUNT, r8)
- CLI(r4)
+ DISABLE_INTERRUPTS(r4)
bra need_resched
#endif
@@ -185,7 +180,7 @@ need_resched:
ENTRY(system_call)
SWITCH_TO_KERNEL_STACK
SAVE_ALL
- STI(r4) ; Enable interrupt
+ ENABLE_INTERRUPTS(r4) ; Enable interrupt
st sp, PTREGS(sp) ; implicit pt_regs parameter
cmpui r7, #NR_syscalls
bnc syscall_badsys
@@ -203,7 +198,7 @@ syscall_call:
jl r7 ; execute system call
st r0, R0(sp) ; save the return value
syscall_exit:
- CLI(r4) ; make sure we don't miss an interrupt
+ DISABLE_INTERRUPTS(r4) ; make sure we don't miss an interrupt
; setting need_resched or sigpending
; between sampling and the iret
ld r9, @(TI_FLAGS, r8)
@@ -220,7 +215,7 @@ work_pending:
beqz r4, work_notifysig
work_resched:
bl schedule
- CLI(r4) ; make sure we don't miss an interrupt
+ DISABLE_INTERRUPTS(r4) ; make sure we don't miss an interrupt
; setting need_resched or sigpending
; between sampling and the iret
ld r9, @(TI_FLAGS, r8)
@@ -262,7 +257,7 @@ syscall_exit_work:
ld r9, @(TI_FLAGS, r8)
and3 r4, r9, #_TIF_SYSCALL_TRACE
beqz r4, work_pending
- STI(r4) ; could let do_syscall_trace() call
+ ENABLE_INTERRUPTS(r4) ; could let do_syscall_trace() call
; schedule() instead
bl do_syscall_trace
bra resume_userspace
@@ -290,16 +285,12 @@ syscall_badsys:
*/
ENTRY(ei_handler)
#if defined(CONFIG_CHIP_M32700)
- SWITCH_TO_KERNEL_STACK
; WORKAROUND: force to clear SM bit and use the kernel stack (SPI).
+ SWITCH_TO_KERNEL_STACK
#endif
SAVE_ALL
mv r1, sp ; arg1(regs)
-#if defined(CONFIG_CHIP_VDEC2) || defined(CONFIG_CHIP_XNUX2) \
- || defined(CONFIG_CHIP_M32700) || defined(CONFIG_CHIP_M32102) \
- || defined(CONFIG_CHIP_OPSP) || defined(CONFIG_CHIP_M32104)
-
-; GET_ICU_STATUS;
+ ; get ICU status
seth r0, #shigh(M32R_ICU_ISTS_ADDR)
ld r0, @(low(M32R_ICU_ISTS_ADDR),r0)
push r0
@@ -314,10 +305,15 @@ ENTRY(ei_handler)
;; IRQ exist check
#if defined(CONFIG_CHIP_M32700)
/* WORKAROUND: IMASK bug M32700-TS1, TS2 chip. */
- beqz r0, 3f ; if (!irq_num) goto exit
-#else
+ bnez r0, 0f
+ ld24 r14, #0x00070000
+ seth r0, #shigh(M32R_ICU_IMASK_ADDR)
+ st r14, @(low(M32R_ICU_IMASK_ADDR),r0)
+ bra 1f
+ .fillinsn
+0:
+#endif /* CONFIG_CHIP_M32700 */
beqz r0, 1f ; if (!irq_num) goto exit
-#endif /* WORKAROUND */
;; IPI check
cmpi r0, #(M32R_IRQ_IPI0<<2) ; ISN < IPI0 check
bc 2f
@@ -332,220 +328,56 @@ ENTRY(ei_handler)
.fillinsn
1:
addi sp, #4
- bra ret_to_intr
-#if defined(CONFIG_CHIP_M32700)
- /* WORKAROUND: IMASK bug M32700-TS1, TS2 chip. */
- .fillinsn
-3:
- ld24 r14, #0x00070000
- seth r0, #shigh(M32R_ICU_IMASK_ADDR)
- st r14, @(low(M32R_ICU_IMASK_ADDR), r0)
- addi sp, #4
- bra ret_to_intr
-#endif /* WORKAROUND */
- ;; do_IRQ
+ bra restore_all
.fillinsn
2:
srli r0, #2
-#if defined(CONFIG_PLAT_USRV)
- add3 r2, r0, #-(M32R_IRQ_INT1) ; INT1# interrupt
- bnez r2, 9f
- ; read ICU status register of PLD
- seth r0, #high(PLD_ICUISTS)
- or3 r0, r0, #low(PLD_ICUISTS)
- lduh r0, @r0
- slli r0, #21
- srli r0, #27 ; ISN
- addi r0, #(M32700UT_PLD_IRQ_BASE)
- .fillinsn
-9:
-#elif defined(CONFIG_PLAT_M32700UT)
- add3 r2, r0, #-(M32R_IRQ_INT1) ; INT1# interrupt
- bnez r2, check_int0
- ; read ICU status register of PLD
- seth r0, #high(PLD_ICUISTS)
- or3 r0, r0, #low(PLD_ICUISTS)
- lduh r0, @r0
- slli r0, #21
- srli r0, #27 ; ISN
- addi r0, #(M32700UT_PLD_IRQ_BASE)
- bra check_end
- .fillinsn
-check_int0:
- add3 r2, r0, #-(M32R_IRQ_INT0) ; INT0# interrupt
- bnez r2, check_int2
- ; read ICU status of LAN-board
- seth r0, #high(M32700UT_LAN_ICUISTS)
- or3 r0, r0, #low(M32700UT_LAN_ICUISTS)
- lduh r0, @r0
- slli r0, #21
- srli r0, #27 ; ISN
- add3 r0, r0, #(M32700UT_LAN_PLD_IRQ_BASE)
- bra check_end
- .fillinsn
-check_int2:
- add3 r2, r0, #-(M32R_IRQ_INT2) ; INT2# interrupt
- bnez r2, check_end
- ; read ICU status of LCD-board
- seth r0, #high(M32700UT_LCD_ICUISTS)
- or3 r0, r0, #low(M32700UT_LCD_ICUISTS)
- lduh r0, @r0
- slli r0, #21
- srli r0, #27 ; ISN
- add3 r0, r0, #(M32700UT_LCD_PLD_IRQ_BASE)
- bra check_end
- .fillinsn
-check_end:
-#elif defined(CONFIG_PLAT_OPSPUT)
- add3 r2, r0, #-(M32R_IRQ_INT1) ; INT1# interrupt
- bnez r2, check_int0
- ; read ICU status register of PLD
- seth r0, #high(PLD_ICUISTS)
- or3 r0, r0, #low(PLD_ICUISTS)
- lduh r0, @r0
- slli r0, #21
- srli r0, #27 ; ISN
- addi r0, #(OPSPUT_PLD_IRQ_BASE)
- bra check_end
- .fillinsn
-check_int0:
- add3 r2, r0, #-(M32R_IRQ_INT0) ; INT0# interrupt
- bnez r2, check_int2
- ; read ICU status of LAN-board
- seth r0, #high(OPSPUT_LAN_ICUISTS)
- or3 r0, r0, #low(OPSPUT_LAN_ICUISTS)
- lduh r0, @r0
- slli r0, #21
- srli r0, #27 ; ISN
- add3 r0, r0, #(OPSPUT_LAN_PLD_IRQ_BASE)
- bra check_end
- .fillinsn
-check_int2:
- add3 r2, r0, #-(M32R_IRQ_INT2) ; INT2# interrupt
- bnez r2, check_end
- ; read ICU status of LCD-board
- seth r0, #high(OPSPUT_LCD_ICUISTS)
- or3 r0, r0, #low(OPSPUT_LCD_ICUISTS)
- lduh r0, @r0
- slli r0, #21
- srli r0, #27 ; ISN
- add3 r0, r0, #(OPSPUT_LCD_PLD_IRQ_BASE)
- bra check_end
- .fillinsn
-check_end:
-#endif /* CONFIG_PLAT_OPSPUT */
- bl do_IRQ ; r0(irq), r1(regs)
-#else /* not CONFIG_SMP */
+#else /* not CONFIG_SMP */
srli r0, #22 ; r0(irq)
-#if defined(CONFIG_PLAT_USRV)
+#endif /* not CONFIG_SMP */
+
+#if defined(CONFIG_PLAT_HAS_INT1ICU)
add3 r2, r0, #-(M32R_IRQ_INT1) ; INT1# interrupt
- bnez r2, 1f
- ; read ICU status register of PLD
- seth r0, #high(PLD_ICUISTS)
- or3 r0, r0, #low(PLD_ICUISTS)
- lduh r0, @r0
+ bnez r2, 3f
+ seth r0, #shigh(M32R_INT1ICU_ISTS)
+ lduh r0, @(low(M32R_INT1ICU_ISTS),r0) ; bit10-6 : ISN
slli r0, #21
srli r0, #27 ; ISN
- addi r0, #(M32700UT_PLD_IRQ_BASE)
- .fillinsn
-1:
-#elif defined(CONFIG_PLAT_M32700UT)
- add3 r2, r0, #-(M32R_IRQ_INT1) ; INT1# interrupt
- bnez r2, check_int0
- ; read ICU status register of PLD
- seth r0, #high(PLD_ICUISTS)
- or3 r0, r0, #low(PLD_ICUISTS)
- lduh r0, @r0
- slli r0, #21
- srli r0, #27 ; ISN
- addi r0, #(M32700UT_PLD_IRQ_BASE)
- bra check_end
- .fillinsn
-check_int0:
- add3 r2, r0, #-(M32R_IRQ_INT0) ; INT0# interrupt
- bnez r2, check_int2
- ; read ICU status of LAN-board
- seth r0, #high(M32700UT_LAN_ICUISTS)
- or3 r0, r0, #low(M32700UT_LAN_ICUISTS)
- lduh r0, @r0
- slli r0, #21
- srli r0, #27 ; ISN
- add3 r0, r0, #(M32700UT_LAN_PLD_IRQ_BASE)
- bra check_end
- .fillinsn
-check_int2:
- add3 r2, r0, #-(M32R_IRQ_INT2) ; INT2# interrupt
- bnez r2, check_end
- ; read ICU status of LCD-board
- seth r0, #high(M32700UT_LCD_ICUISTS)
- or3 r0, r0, #low(M32700UT_LCD_ICUISTS)
- lduh r0, @r0
- slli r0, #21
- srli r0, #27 ; ISN
- add3 r0, r0, #(M32700UT_LCD_PLD_IRQ_BASE)
- bra check_end
- .fillinsn
-check_end:
-#elif defined(CONFIG_PLAT_OPSPUT)
- add3 r2, r0, #-(M32R_IRQ_INT1) ; INT1# interrupt
- bnez r2, check_int0
- ; read ICU status register of PLD
- seth r0, #high(PLD_ICUISTS)
- or3 r0, r0, #low(PLD_ICUISTS)
- lduh r0, @r0
- slli r0, #21
- srli r0, #27 ; ISN
- addi r0, #(OPSPUT_PLD_IRQ_BASE)
- bra check_end
- .fillinsn
-check_int0:
- add3 r2, r0, #-(M32R_IRQ_INT0) ; INT0# interrupt
- bnez r2, check_int2
- ; read ICU status of LAN-board
- seth r0, #high(OPSPUT_LAN_ICUISTS)
- or3 r0, r0, #low(OPSPUT_LAN_ICUISTS)
- lduh r0, @r0
- slli r0, #21
- srli r0, #27 ; ISN
- add3 r0, r0, #(OPSPUT_LAN_PLD_IRQ_BASE)
+ addi r0, #(M32R_INT1ICU_IRQ_BASE)
bra check_end
.fillinsn
-check_int2:
- add3 r2, r0, #-(M32R_IRQ_INT2) ; INT2# interrupt
- bnez r2, check_end
- ; read ICU status of LCD-board
- seth r0, #high(OPSPUT_LCD_ICUISTS)
- or3 r0, r0, #low(OPSPUT_LCD_ICUISTS)
- lduh r0, @r0
+3:
+#endif /* CONFIG_PLAT_HAS_INT1ICU */
+#if defined(CONFIG_PLAT_HAS_INT0ICU)
+ add3 r2, r0, #-(M32R_IRQ_INT0) ; INT0# interrupt
+ bnez r2, 4f
+ seth r0, #shigh(M32R_INT0ICU_ISTS)
+ lduh r0, @(low(M32R_INT0ICU_ISTS),r0) ; bit10-6 : ISN
slli r0, #21
- srli r0, #27 ; ISN
- add3 r0, r0, #(OPSPUT_LCD_PLD_IRQ_BASE)
+ srli r0, #27 ; ISN
+ add3 r0, r0, #(M32R_INT0ICU_IRQ_BASE)
bra check_end
.fillinsn
-check_end:
-#elif defined(CONFIG_PLAT_M32104UT)
- add3 r2, r0, #-(M32R_IRQ_INT1) ; INT1# interrupt
- bnez r2, check_end
- ; read ICU status register of PLD
- seth r0, #high(PLD_ICUISTS)
- or3 r0, r0, #low(PLD_ICUISTS)
- lduh r0, @r0
+4:
+#endif /* CONFIG_PLAT_HAS_INT0ICU */
+#if defined(CONFIG_PLAT_HAS_INT2ICU)
+ add3 r2, r0, #-(M32R_IRQ_INT2) ; INT2# interrupt
+ bnez r2, 5f
+ seth r0, #shigh(M32R_INT2ICU_ISTS)
+ lduh r0, @(low(M32R_INT2ICU_ISTS),r0) ; bit10-6 : ISN
slli r0, #21
- srli r0, #27 ; ISN
- addi r0, #(M32104UT_PLD_IRQ_BASE)
- bra check_end
+ srli r0, #27 ; ISN
+ add3 r0, r0, #(M32R_INT2ICU_IRQ_BASE)
+ ; bra check_end
.fillinsn
+5:
+#endif /* CONFIG_PLAT_HAS_INT2ICU */
+
check_end:
-#endif /* CONFIG_PLAT_M32104UT */
bl do_IRQ
-#endif /* CONFIG_SMP */
pop r14
seth r0, #shigh(M32R_ICU_IMASK_ADDR)
st r14, @(low(M32R_ICU_IMASK_ADDR),r0)
-#else
-#error no chip configuration
-#endif
-ret_to_intr:
bra ret_from_intr
/*
@@ -631,7 +463,7 @@ inst:
ENTRY(alignment_check)
-/* void alignment_check(int error_code) */
+ /* void alignment_check(int error_code) */
SWITCH_TO_KERNEL_STACK
SAVE_ALL
ldi r1, #0x30 ; error_code
@@ -641,7 +473,7 @@ error_code:
bra ret_from_exception
ENTRY(rie_handler)
-/* void rie_handler(int error_code) */
+ /* void rie_handler(int error_code) */
SWITCH_TO_KERNEL_STACK
SAVE_ALL
ldi r1, #0x20 ; error_code
@@ -650,7 +482,7 @@ ENTRY(rie_handler)
bra error_code
ENTRY(pie_handler)
-/* void pie_handler(int error_code) */
+ /* void pie_handler(int error_code) */
SWITCH_TO_KERNEL_STACK
SAVE_ALL
ldi r1, #0 ; error_code ; FIXME
@@ -659,8 +491,8 @@ ENTRY(pie_handler)
bra error_code
ENTRY(debug_trap)
- .global withdraw_debug_trap
/* void debug_trap(void) */
+ .global withdraw_debug_trap
SWITCH_TO_KERNEL_STACK
SAVE_ALL
mv r0, sp ; pt_regs
@@ -679,11 +511,9 @@ ENTRY(ill_trap)
bl do_ill_trap
bra error_code
-
-/* Cache flushing handler */
ENTRY(cache_flushing_handler)
- .global _flush_cache_all
/* void _flush_cache_all(void); */
+ .global _flush_cache_all
SWITCH_TO_KERNEL_STACK
push r0
push r1
@@ -706,292 +536,7 @@ ENTRY(cache_flushing_handler)
pop r0
rte
-.data
-ENTRY(sys_call_table)
- .long sys_restart_syscall /* 0 - old "setup()" system call*/
- .long sys_exit
- .long sys_fork
- .long sys_read
- .long sys_write
- .long sys_open /* 5 */
- .long sys_close
- .long sys_waitpid
- .long sys_creat
- .long sys_link
- .long sys_unlink /* 10 */
- .long sys_execve
- .long sys_chdir
- .long sys_time
- .long sys_mknod
- .long sys_chmod /* 15 */
- .long sys_ni_syscall /* lchown16 syscall holder */
- .long sys_ni_syscall /* old break syscall holder */
- .long sys_ni_syscall /* old stat syscall holder */
- .long sys_lseek
- .long sys_getpid /* 20 */
- .long sys_mount
- .long sys_oldumount
- .long sys_ni_syscall /* setuid16 syscall holder */
- .long sys_ni_syscall /* getuid16 syscall holder */
- .long sys_stime /* 25 */
- .long sys_ptrace
- .long sys_alarm
- .long sys_ni_syscall /* old fstat syscall holder */
- .long sys_pause
- .long sys_utime /* 30 */
- .long sys_ni_syscall /* old stty syscall holder */
- .long sys_cachectl /* for M32R */ /* old gtty syscall holder */
- .long sys_access
- .long sys_ni_syscall /* nice syscall holder */
- .long sys_ni_syscall /* 35 - old ftime syscall holder */
- .long sys_sync
- .long sys_kill
- .long sys_rename
- .long sys_mkdir
- .long sys_rmdir /* 40 */
- .long sys_dup
- .long sys_pipe
- .long sys_times
- .long sys_ni_syscall /* old prof syscall holder */
- .long sys_brk /* 45 */
- .long sys_ni_syscall /* setgid16 syscall holder */
- .long sys_getgid /* will be unused */
- .long sys_ni_syscall /* signal syscall holder */
- .long sys_ni_syscall /* geteuid16 syscall holder */
- .long sys_ni_syscall /* 50 - getegid16 syscall holder */
- .long sys_acct
- .long sys_umount /* recycled never used phys() */
- .long sys_ni_syscall /* old lock syscall holder */
- .long sys_ioctl
- .long sys_fcntl /* 55 - will be unused */
- .long sys_ni_syscall /* mpx syscall holder */
- .long sys_setpgid
- .long sys_ni_syscall /* old ulimit syscall holder */
- .long sys_ni_syscall /* sys_olduname */
- .long sys_umask /* 60 */
- .long sys_chroot
- .long sys_ustat
- .long sys_dup2
- .long sys_getppid
- .long sys_getpgrp /* 65 */
- .long sys_setsid
- .long sys_ni_syscall /* sigaction syscall holder */
- .long sys_ni_syscall /* sgetmask syscall holder */
- .long sys_ni_syscall /* ssetmask syscall holder */
- .long sys_ni_syscall /* 70 - setreuid16 syscall holder */
- .long sys_ni_syscall /* setregid16 syscall holder */
- .long sys_ni_syscall /* sigsuspend syscall holder */
- .long sys_ni_syscall /* sigpending syscall holder */
- .long sys_sethostname
- .long sys_setrlimit /* 75 */
- .long sys_getrlimit/*will be unused*/
- .long sys_getrusage
- .long sys_gettimeofday
- .long sys_settimeofday
- .long sys_ni_syscall /* 80 - getgroups16 syscall holder */
- .long sys_ni_syscall /* setgroups16 syscall holder */
- .long sys_ni_syscall /* sys_oldselect */
- .long sys_symlink
- .long sys_ni_syscall /* old lstat syscall holder */
- .long sys_readlink /* 85 */
- .long sys_uselib
- .long sys_swapon
- .long sys_reboot
- .long sys_ni_syscall /* readdir syscall holder */
- .long sys_ni_syscall /* 90 - old_mmap syscall holder */
- .long sys_munmap
- .long sys_truncate
- .long sys_ftruncate
- .long sys_fchmod
- .long sys_ni_syscall /* 95 - fchwon16 syscall holder */
- .long sys_getpriority
- .long sys_setpriority
- .long sys_ni_syscall /* old profil syscall holder */
- .long sys_statfs
- .long sys_fstatfs /* 100 */
- .long sys_ni_syscall /* ioperm syscall holder */
- .long sys_socketcall
- .long sys_syslog
- .long sys_setitimer
- .long sys_getitimer /* 105 */
- .long sys_newstat
- .long sys_newlstat
- .long sys_newfstat
- .long sys_ni_syscall /* old uname syscall holder */
- .long sys_ni_syscall /* 110 - iopl syscall holder */
- .long sys_vhangup
- .long sys_ni_syscall /* idle syscall holder */
- .long sys_ni_syscall /* vm86old syscall holder */
- .long sys_wait4
- .long sys_swapoff /* 115 */
- .long sys_sysinfo
- .long sys_ipc
- .long sys_fsync
- .long sys_ni_syscall /* sigreturn syscall holder */
- .long sys_clone /* 120 */
- .long sys_setdomainname
- .long sys_newuname
- .long sys_ni_syscall /* modify_ldt syscall holder */
- .long sys_adjtimex
- .long sys_mprotect /* 125 */
- .long sys_ni_syscall /* sigprocmask syscall holder */
- .long sys_ni_syscall /* create_module syscall holder */
- .long sys_init_module
- .long sys_delete_module
- .long sys_ni_syscall /* 130 - get_kernel_syms */
- .long sys_quotactl
- .long sys_getpgid
- .long sys_fchdir
- .long sys_bdflush
- .long sys_sysfs /* 135 */
- .long sys_personality
- .long sys_ni_syscall /* afs_syscall syscall holder */
- .long sys_ni_syscall /* setfsuid16 syscall holder */
- .long sys_ni_syscall /* setfsgid16 syscall holder */
- .long sys_llseek /* 140 */
- .long sys_getdents
- .long sys_select
- .long sys_flock
- .long sys_msync
- .long sys_readv /* 145 */
- .long sys_writev
- .long sys_getsid
- .long sys_fdatasync
- .long sys_sysctl
- .long sys_mlock /* 150 */
- .long sys_munlock
- .long sys_mlockall
- .long sys_munlockall
- .long sys_sched_setparam
- .long sys_sched_getparam /* 155 */
- .long sys_sched_setscheduler
- .long sys_sched_getscheduler
- .long sys_sched_yield
- .long sys_sched_get_priority_max
- .long sys_sched_get_priority_min /* 160 */
- .long sys_sched_rr_get_interval
- .long sys_nanosleep
- .long sys_mremap
- .long sys_ni_syscall /* setresuid16 syscall holder */
- .long sys_ni_syscall /* 165 - getresuid16 syscall holder */
- .long sys_tas /* vm86 syscall holder */
- .long sys_ni_syscall /* query_module syscall holder */
- .long sys_poll
- .long sys_nfsservctl
- .long sys_setresgid /* 170 */
- .long sys_getresgid
- .long sys_prctl
- .long sys_rt_sigreturn
- .long sys_rt_sigaction
- .long sys_rt_sigprocmask /* 175 */
- .long sys_rt_sigpending
- .long sys_rt_sigtimedwait
- .long sys_rt_sigqueueinfo
- .long sys_rt_sigsuspend
- .long sys_pread64 /* 180 */
- .long sys_pwrite64
- .long sys_ni_syscall /* chown16 syscall holder */
- .long sys_getcwd
- .long sys_capget
- .long sys_capset /* 185 */
- .long sys_sigaltstack
- .long sys_sendfile
- .long sys_ni_syscall /* streams1 */
- .long sys_ni_syscall /* streams2 */
- .long sys_vfork /* 190 */
- .long sys_getrlimit
- .long sys_mmap2
- .long sys_truncate64
- .long sys_ftruncate64
- .long sys_stat64 /* 195 */
- .long sys_lstat64
- .long sys_fstat64
- .long sys_lchown
- .long sys_getuid
- .long sys_getgid /* 200 */
- .long sys_geteuid
- .long sys_getegid
- .long sys_setreuid
- .long sys_setregid
- .long sys_getgroups /* 205 */
- .long sys_setgroups
- .long sys_fchown
- .long sys_setresuid
- .long sys_getresuid
- .long sys_setresgid /* 210 */
- .long sys_getresgid
- .long sys_chown
- .long sys_setuid
- .long sys_setgid
- .long sys_setfsuid /* 215 */
- .long sys_setfsgid
- .long sys_pivot_root
- .long sys_mincore
- .long sys_madvise
- .long sys_getdents64 /* 220 */
- .long sys_fcntl64
- .long sys_ni_syscall /* reserved for TUX */
- .long sys_ni_syscall /* Reserved for Security */
- .long sys_gettid
- .long sys_readahead /* 225 */
- .long sys_setxattr
- .long sys_lsetxattr
- .long sys_fsetxattr
- .long sys_getxattr
- .long sys_lgetxattr /* 230 */
- .long sys_fgetxattr
- .long sys_listxattr
- .long sys_llistxattr
- .long sys_flistxattr
- .long sys_removexattr /* 235 */
- .long sys_lremovexattr
- .long sys_fremovexattr
- .long sys_tkill
- .long sys_sendfile64
- .long sys_futex /* 240 */
- .long sys_sched_setaffinity
- .long sys_sched_getaffinity
- .long sys_ni_syscall /* reserved for "set_thread_area" system call */
- .long sys_ni_syscall /* reserved for "get_thread_area" system call */
- .long sys_io_setup /* 245 */
- .long sys_io_destroy
- .long sys_io_getevents
- .long sys_io_submit
- .long sys_io_cancel
- .long sys_fadvise64 /* 250 */
- .long sys_ni_syscall
- .long sys_exit_group
- .long sys_lookup_dcookie
- .long sys_epoll_create
- .long sys_epoll_ctl /* 255 */
- .long sys_epoll_wait
- .long sys_remap_file_pages
- .long sys_set_tid_address
- .long sys_timer_create
- .long sys_timer_settime /* 260 */
- .long sys_timer_gettime
- .long sys_timer_getoverrun
- .long sys_timer_delete
- .long sys_clock_settime
- .long sys_clock_gettime /* 265 */
- .long sys_clock_getres
- .long sys_clock_nanosleep
- .long sys_statfs64
- .long sys_fstatfs64
- .long sys_tgkill /* 270 */
- .long sys_utimes
- .long sys_fadvise64_64
- .long sys_ni_syscall /* Reserved for sys_vserver */
- .long sys_ni_syscall /* Reserved for sys_mbind */
- .long sys_ni_syscall /* Reserved for sys_get_mempolicy */
- .long sys_ni_syscall /* Reserved for sys_set_mempolicy */
- .long sys_mq_open
- .long sys_mq_unlink
- .long sys_mq_timedsend
- .long sys_mq_timedreceive /* 280 */
- .long sys_mq_notify
- .long sys_mq_getsetattr
- .long sys_ni_syscall /* reserved for kexec */
- .long sys_waitid
+ .section .rodata,"a"
+#include "syscall_table.S"
syscall_table_size=(.-sys_call_table)
diff --git a/arch/m32r/kernel/io_m32104ut.c b/arch/m32r/kernel/io_m32104ut.c
deleted file mode 100644
index 2189eca30b56..000000000000
--- a/arch/m32r/kernel/io_m32104ut.c
+++ /dev/null
@@ -1,297 +0,0 @@
-/*
- * linux/arch/m32r/kernel/io_m32104ut.c
- *
- * Typical I/O routines for M32104UT board.
- *
- * Copyright (c) 2001-2005 Hiroyuki Kondo, Hirokazu Takata,
- * Hitoshi Yamamoto, Mamoru Sakugawa,
- * Naoto Sugai, Hayato Fujiwara
- */
-
-#include <asm/m32r.h>
-#include <asm/page.h>
-#include <asm/io.h>
-#include <asm/byteorder.h>
-
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
-#include <linux/types.h>
-
-#define M32R_PCC_IOMAP_SIZE 0x1000
-
-#define M32R_PCC_IOSTART0 0x1000
-#define M32R_PCC_IOEND0 (M32R_PCC_IOSTART0 + M32R_PCC_IOMAP_SIZE - 1)
-
-extern void pcc_ioread_byte(int, unsigned long, void *, size_t, size_t, int);
-extern void pcc_ioread_word(int, unsigned long, void *, size_t, size_t, int);
-extern void pcc_iowrite_byte(int, unsigned long, void *, size_t, size_t, int);
-extern void pcc_iowrite_word(int, unsigned long, void *, size_t, size_t, int);
-#endif /* CONFIG_PCMCIA && CONFIG_M32R_CFC */
-
-#define PORT2ADDR(port) _port2addr(port)
-
-static inline void *_port2addr(unsigned long port)
-{
- return (void *)(port | NONCACHE_OFFSET);
-}
-
-#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
-static inline void *__port2addr_ata(unsigned long port)
-{
- static int dummy_reg;
-
- switch (port) {
- case 0x1f0: return (void *)(0x0c002000 | NONCACHE_OFFSET);
- case 0x1f1: return (void *)(0x0c012800 | NONCACHE_OFFSET);
- case 0x1f2: return (void *)(0x0c012002 | NONCACHE_OFFSET);
- case 0x1f3: return (void *)(0x0c012802 | NONCACHE_OFFSET);
- case 0x1f4: return (void *)(0x0c012004 | NONCACHE_OFFSET);
- case 0x1f5: return (void *)(0x0c012804 | NONCACHE_OFFSET);
- case 0x1f6: return (void *)(0x0c012006 | NONCACHE_OFFSET);
- case 0x1f7: return (void *)(0x0c012806 | NONCACHE_OFFSET);
- case 0x3f6: return (void *)(0x0c01200e | NONCACHE_OFFSET);
- default: return (void *)&dummy_reg;
- }
-}
-#endif
-
-/*
- * M32104T-LAN is located in the extended bus space
- * from 0x01000000 to 0x01ffffff on physical address.
- * The base address of LAN controller(LAN91C111) is 0x300.
- */
-#define LAN_IOSTART (0x300 | NONCACHE_OFFSET)
-#define LAN_IOEND (0x320 | NONCACHE_OFFSET)
-static inline void *_port2addr_ne(unsigned long port)
-{
- return (void *)(port + NONCACHE_OFFSET + 0x01000000);
-}
-
-static inline void delay(void)
-{
- __asm__ __volatile__ ("push r0; \n\t pop r0;" : : :"memory");
-}
-
-/*
- * NIC I/O function
- */
-
-#define PORT2ADDR_NE(port) _port2addr_ne(port)
-
-static inline unsigned char _ne_inb(void *portp)
-{
- return *(volatile unsigned char *)portp;
-}
-
-static inline unsigned short _ne_inw(void *portp)
-{
- return (unsigned short)le16_to_cpu(*(volatile unsigned short *)portp);
-}
-
-static inline void _ne_insb(void *portp, void *addr, unsigned long count)
-{
- unsigned char *buf = (unsigned char *)addr;
-
- while (count--)
- *buf++ = _ne_inb(portp);
-}
-
-static inline void _ne_outb(unsigned char b, void *portp)
-{
- *(volatile unsigned char *)portp = b;
-}
-
-static inline void _ne_outw(unsigned short w, void *portp)
-{
- *(volatile unsigned short *)portp = cpu_to_le16(w);
-}
-
-unsigned char _inb(unsigned long port)
-{
- if (port >= LAN_IOSTART && port < LAN_IOEND)
- return _ne_inb(PORT2ADDR_NE(port));
-
- return *(volatile unsigned char *)PORT2ADDR(port);
-}
-
-unsigned short _inw(unsigned long port)
-{
- if (port >= LAN_IOSTART && port < LAN_IOEND)
- return _ne_inw(PORT2ADDR_NE(port));
-
- return *(volatile unsigned short *)PORT2ADDR(port);
-}
-
-unsigned long _inl(unsigned long port)
-{
- return *(volatile unsigned long *)PORT2ADDR(port);
-}
-
-unsigned char _inb_p(unsigned long port)
-{
- unsigned char v = _inb(port);
- delay();
- return (v);
-}
-
-unsigned short _inw_p(unsigned long port)
-{
- unsigned short v = _inw(port);
- delay();
- return (v);
-}
-
-unsigned long _inl_p(unsigned long port)
-{
- unsigned long v = _inl(port);
- delay();
- return (v);
-}
-
-void _outb(unsigned char b, unsigned long port)
-{
- if (port >= LAN_IOSTART && port < LAN_IOEND)
- _ne_outb(b, PORT2ADDR_NE(port));
- else
- *(volatile unsigned char *)PORT2ADDR(port) = b;
-}
-
-void _outw(unsigned short w, unsigned long port)
-{
- if (port >= LAN_IOSTART && port < LAN_IOEND)
- _ne_outw(w, PORT2ADDR_NE(port));
- else
- *(volatile unsigned short *)PORT2ADDR(port) = w;
-}
-
-void _outl(unsigned long l, unsigned long port)
-{
- *(volatile unsigned long *)PORT2ADDR(port) = l;
-}
-
-void _outb_p(unsigned char b, unsigned long port)
-{
- _outb(b, port);
- delay();
-}
-
-void _outw_p(unsigned short w, unsigned long port)
-{
- _outw(w, port);
- delay();
-}
-
-void _outl_p(unsigned long l, unsigned long port)
-{
- _outl(l, port);
- delay();
-}
-
-void _insb(unsigned int port, void *addr, unsigned long count)
-{
- if (port >= LAN_IOSTART && port < LAN_IOEND)
- _ne_insb(PORT2ADDR_NE(port), addr, count);
- else {
- unsigned char *buf = addr;
- unsigned char *portp = PORT2ADDR(port);
- while (count--)
- *buf++ = *(volatile unsigned char *)portp;
- }
-}
-
-void _insw(unsigned int port, void *addr, unsigned long count)
-{
- unsigned short *buf = addr;
- unsigned short *portp;
-
- if (port >= LAN_IOSTART && port < LAN_IOEND) {
- /*
- * This portion is only used by smc91111.c to read data
- * from the DATA_REG. Do not swap the data.
- */
- portp = PORT2ADDR_NE(port);
- while (count--)
- *buf++ = *(volatile unsigned short *)portp;
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
- } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- pcc_ioread_word(9, port, (void *)addr, sizeof(unsigned short),
- count, 1);
-#endif
-#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
- } else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
- portp = __port2addr_ata(port);
- while (count--)
- *buf++ = *(volatile unsigned short *)portp;
-#endif
- } else {
- portp = PORT2ADDR(port);
- while (count--)
- *buf++ = *(volatile unsigned short *)portp;
- }
-}
-
-void _insl(unsigned int port, void *addr, unsigned long count)
-{
- unsigned long *buf = addr;
- unsigned long *portp;
-
- portp = PORT2ADDR(port);
- while (count--)
- *buf++ = *(volatile unsigned long *)portp;
-}
-
-void _outsb(unsigned int port, const void *addr, unsigned long count)
-{
- const unsigned char *buf = addr;
- unsigned char *portp;
-
- if (port >= LAN_IOSTART && port < LAN_IOEND) {
- portp = PORT2ADDR_NE(port);
- while (count--)
- _ne_outb(*buf++, portp);
- } else {
- portp = PORT2ADDR(port);
- while (count--)
- *(volatile unsigned char *)portp = *buf++;
- }
-}
-
-void _outsw(unsigned int port, const void *addr, unsigned long count)
-{
- const unsigned short *buf = addr;
- unsigned short *portp;
-
- if (port >= LAN_IOSTART && port < LAN_IOEND) {
- /*
- * This portion is only used by smc91111.c to write data
- * into the DATA_REG. Do not swap the data.
- */
- portp = PORT2ADDR_NE(port);
- while (count--)
- *(volatile unsigned short *)portp = *buf++;
-#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
- } else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
- portp = __port2addr_ata(port);
- while (count--)
- *(volatile unsigned short *)portp = *buf++;
-#endif
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
- } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- pcc_iowrite_word(9, port, (void *)addr, sizeof(unsigned short),
- count, 1);
-#endif
- } else {
- portp = PORT2ADDR(port);
- while (count--)
- *(volatile unsigned short *)portp = *buf++;
- }
-}
-
-void _outsl(unsigned int port, const void *addr, unsigned long count)
-{
- const unsigned long *buf = addr;
- unsigned char *portp;
-
- portp = PORT2ADDR(port);
- while (count--)
- *(volatile unsigned long *)portp = *buf++;
-}
diff --git a/arch/m32r/kernel/io_m32700ut.c b/arch/m32r/kernel/io_m32700ut.c
deleted file mode 100644
index 5898f4031a0c..000000000000
--- a/arch/m32r/kernel/io_m32700ut.c
+++ /dev/null
@@ -1,395 +0,0 @@
-/*
- * linux/arch/m32r/kernel/io_m32700ut.c
- *
- * Typical I/O routines for M32700UT board.
- *
- * Copyright (c) 2001-2005 Hiroyuki Kondo, Hirokazu Takata,
- * Hitoshi Yamamoto, Takeo Takahashi
- *
- * This file is subject to the terms and conditions of the GNU General
- * Public License. See the file "COPYING" in the main directory of this
- * archive for more details.
- */
-
-#include <asm/m32r.h>
-#include <asm/page.h>
-#include <asm/io.h>
-#include <asm/byteorder.h>
-
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
-#include <linux/types.h>
-
-#define M32R_PCC_IOMAP_SIZE 0x1000
-
-#define M32R_PCC_IOSTART0 0x1000
-#define M32R_PCC_IOEND0 (M32R_PCC_IOSTART0 + M32R_PCC_IOMAP_SIZE - 1)
-
-extern void pcc_ioread_byte(int, unsigned long, void *, size_t, size_t, int);
-extern void pcc_ioread_word(int, unsigned long, void *, size_t, size_t, int);
-extern void pcc_iowrite_byte(int, unsigned long, void *, size_t, size_t, int);
-extern void pcc_iowrite_word(int, unsigned long, void *, size_t, size_t, int);
-#endif /* CONFIG_PCMCIA && CONFIG_M32R_CFC */
-
-#define PORT2ADDR(port) _port2addr(port)
-#define PORT2ADDR_USB(port) _port2addr_usb(port)
-
-static inline void *_port2addr(unsigned long port)
-{
- return (void *)(port | NONCACHE_OFFSET);
-}
-
-#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
-static inline void *__port2addr_ata(unsigned long port)
-{
- static int dummy_reg;
-
- switch (port) {
- case 0x1f0: return (void *)(0x0c002000 | NONCACHE_OFFSET);
- case 0x1f1: return (void *)(0x0c012800 | NONCACHE_OFFSET);
- case 0x1f2: return (void *)(0x0c012002 | NONCACHE_OFFSET);
- case 0x1f3: return (void *)(0x0c012802 | NONCACHE_OFFSET);
- case 0x1f4: return (void *)(0x0c012004 | NONCACHE_OFFSET);
- case 0x1f5: return (void *)(0x0c012804 | NONCACHE_OFFSET);
- case 0x1f6: return (void *)(0x0c012006 | NONCACHE_OFFSET);
- case 0x1f7: return (void *)(0x0c012806 | NONCACHE_OFFSET);
- case 0x3f6: return (void *)(0x0c01200e | NONCACHE_OFFSET);
- default: return (void *)&dummy_reg;
- }
-}
-#endif
-
-/*
- * M32700UT-LAN is located in the extended bus space
- * from 0x10000000 to 0x13ffffff on physical address.
- * The base address of LAN controller(LAN91C111) is 0x300.
- */
-#define LAN_IOSTART (0x300 | NONCACHE_OFFSET)
-#define LAN_IOEND (0x320 | NONCACHE_OFFSET)
-static inline void *_port2addr_ne(unsigned long port)
-{
- return (void *)(port + 0x10000000);
-}
-static inline void *_port2addr_usb(unsigned long port)
-{
- return (void *)((port & 0x0f) + NONCACHE_OFFSET + 0x10303000);
-}
-
-static inline void delay(void)
-{
- __asm__ __volatile__ ("push r0; \n\t pop r0;" : : :"memory");
-}
-
-/*
- * NIC I/O function
- */
-
-#define PORT2ADDR_NE(port) _port2addr_ne(port)
-
-static inline unsigned char _ne_inb(void *portp)
-{
- return *(volatile unsigned char *)portp;
-}
-
-static inline unsigned short _ne_inw(void *portp)
-{
- return (unsigned short)le16_to_cpu(*(volatile unsigned short *)portp);
-}
-
-static inline void _ne_insb(void *portp, void *addr, unsigned long count)
-{
- unsigned char *buf = (unsigned char *)addr;
-
- while (count--)
- *buf++ = _ne_inb(portp);
-}
-
-static inline void _ne_outb(unsigned char b, void *portp)
-{
- *(volatile unsigned char *)portp = b;
-}
-
-static inline void _ne_outw(unsigned short w, void *portp)
-{
- *(volatile unsigned short *)portp = cpu_to_le16(w);
-}
-
-unsigned char _inb(unsigned long port)
-{
- if (port >= LAN_IOSTART && port < LAN_IOEND)
- return _ne_inb(PORT2ADDR_NE(port));
-
-#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
- else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
- return *(volatile unsigned char *)__port2addr_ata(port);
- }
-#endif
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
- else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- unsigned char b;
- pcc_ioread_byte(0, port, &b, sizeof(b), 1, 0);
- return b;
- } else
-#endif
-
- return *(volatile unsigned char *)PORT2ADDR(port);
-}
-
-unsigned short _inw(unsigned long port)
-{
- if (port >= LAN_IOSTART && port < LAN_IOEND)
- return _ne_inw(PORT2ADDR_NE(port));
-#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
- else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
- return *(volatile unsigned short *)__port2addr_ata(port);
- }
-#endif
-#if defined(CONFIG_USB)
- else if(port >= 0x340 && port < 0x3a0)
- return *(volatile unsigned short *)PORT2ADDR_USB(port);
-#endif
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
- else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- unsigned short w;
- pcc_ioread_word(0, port, &w, sizeof(w), 1, 0);
- return w;
- } else
-#endif
- return *(volatile unsigned short *)PORT2ADDR(port);
-}
-
-unsigned long _inl(unsigned long port)
-{
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
- if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- unsigned long l;
- pcc_ioread_word(0, port, &l, sizeof(l), 1, 0);
- return l;
- } else
-#endif
- return *(volatile unsigned long *)PORT2ADDR(port);
-}
-
-unsigned char _inb_p(unsigned long port)
-{
- unsigned char v = _inb(port);
- delay();
- return (v);
-}
-
-unsigned short _inw_p(unsigned long port)
-{
- unsigned short v = _inw(port);
- delay();
- return (v);
-}
-
-unsigned long _inl_p(unsigned long port)
-{
- unsigned long v = _inl(port);
- delay();
- return (v);
-}
-
-void _outb(unsigned char b, unsigned long port)
-{
- if (port >= LAN_IOSTART && port < LAN_IOEND)
- _ne_outb(b, PORT2ADDR_NE(port));
- else
-#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
- if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
- *(volatile unsigned char *)__port2addr_ata(port) = b;
- } else
-#endif
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
- if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- pcc_iowrite_byte(0, port, &b, sizeof(b), 1, 0);
- } else
-#endif
- *(volatile unsigned char *)PORT2ADDR(port) = b;
-}
-
-void _outw(unsigned short w, unsigned long port)
-{
- if (port >= LAN_IOSTART && port < LAN_IOEND)
- _ne_outw(w, PORT2ADDR_NE(port));
- else
-#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
- if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
- *(volatile unsigned short *)__port2addr_ata(port) = w;
- } else
-#endif
-#if defined(CONFIG_USB)
- if(port >= 0x340 && port < 0x3a0)
- *(volatile unsigned short *)PORT2ADDR_USB(port) = w;
- else
-#endif
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
- if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- pcc_iowrite_word(0, port, &w, sizeof(w), 1, 0);
- } else
-#endif
- *(volatile unsigned short *)PORT2ADDR(port) = w;
-}
-
-void _outl(unsigned long l, unsigned long port)
-{
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
- if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- pcc_iowrite_word(0, port, &l, sizeof(l), 1, 0);
- } else
-#endif
- *(volatile unsigned long *)PORT2ADDR(port) = l;
-}
-
-void _outb_p(unsigned char b, unsigned long port)
-{
- _outb(b, port);
- delay();
-}
-
-void _outw_p(unsigned short w, unsigned long port)
-{
- _outw(w, port);
- delay();
-}
-
-void _outl_p(unsigned long l, unsigned long port)
-{
- _outl(l, port);
- delay();
-}
-
-void _insb(unsigned int port, void *addr, unsigned long count)
-{
- if (port >= LAN_IOSTART && port < LAN_IOEND)
- _ne_insb(PORT2ADDR_NE(port), addr, count);
-#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
- else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
- unsigned char *buf = addr;
- unsigned char *portp = __port2addr_ata(port);
- while (count--)
- *buf++ = *(volatile unsigned char *)portp;
- }
-#endif
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
- else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- pcc_ioread_byte(0, port, (void *)addr, sizeof(unsigned char),
- count, 1);
- }
-#endif
- else {
- unsigned char *buf = addr;
- unsigned char *portp = PORT2ADDR(port);
- while (count--)
- *buf++ = *(volatile unsigned char *)portp;
- }
-}
-
-void _insw(unsigned int port, void *addr, unsigned long count)
-{
- unsigned short *buf = addr;
- unsigned short *portp;
-
- if (port >= LAN_IOSTART && port < LAN_IOEND) {
- /*
- * This portion is only used by smc91111.c to read data
- * from the DATA_REG. Do not swap the data.
- */
- portp = PORT2ADDR_NE(port);
- while (count--)
- *buf++ = *(volatile unsigned short *)portp;
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
- } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- pcc_ioread_word(9, port, (void *)addr, sizeof(unsigned short),
- count, 1);
-#endif
-#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
- } else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
- portp = __port2addr_ata(port);
- while (count--)
- *buf++ = *(volatile unsigned short *)portp;
-#endif
- } else {
- portp = PORT2ADDR(port);
- while (count--)
- *buf++ = *(volatile unsigned short *)portp;
- }
-}
-
-void _insl(unsigned int port, void *addr, unsigned long count)
-{
- unsigned long *buf = addr;
- unsigned long *portp;
-
- portp = PORT2ADDR(port);
- while (count--)
- *buf++ = *(volatile unsigned long *)portp;
-}
-
-void _outsb(unsigned int port, const void *addr, unsigned long count)
-{
- const unsigned char *buf = addr;
- unsigned char *portp;
-
- if (port >= LAN_IOSTART && port < LAN_IOEND) {
- portp = PORT2ADDR_NE(port);
- while (count--)
- _ne_outb(*buf++, portp);
-#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
- } else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
- portp = __port2addr_ata(port);
- while (count--)
- *(volatile unsigned char *)portp = *buf++;
-#endif
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
- } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- pcc_iowrite_byte(0, port, (void *)addr, sizeof(unsigned char),
- count, 1);
-#endif
- } else {
- portp = PORT2ADDR(port);
- while (count--)
- *(volatile unsigned char *)portp = *buf++;
- }
-}
-
-void _outsw(unsigned int port, const void *addr, unsigned long count)
-{
- const unsigned short *buf = addr;
- unsigned short *portp;
-
- if (port >= LAN_IOSTART && port < LAN_IOEND) {
- /*
- * This portion is only used by smc91111.c to write data
- * into the DATA_REG. Do not swap the data.
- */
- portp = PORT2ADDR_NE(port);
- while (count--)
- *(volatile unsigned short *)portp = *buf++;
-#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
- } else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
- portp = __port2addr_ata(port);
- while (count--)
- *(volatile unsigned short *)portp = *buf++;
-#endif
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
- } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- pcc_iowrite_word(9, port, (void *)addr, sizeof(unsigned short),
- count, 1);
-#endif
- } else {
- portp = PORT2ADDR(port);
- while (count--)
- *(volatile unsigned short *)portp = *buf++;
- }
-}
-
-void _outsl(unsigned int port, const void *addr, unsigned long count)
-{
- const unsigned long *buf = addr;
- unsigned char *portp;
-
- portp = PORT2ADDR(port);
- while (count--)
- *(volatile unsigned long *)portp = *buf++;
-}
diff --git a/arch/m32r/kernel/io_mappi.c b/arch/m32r/kernel/io_mappi.c
deleted file mode 100644
index 31396789ab1b..000000000000
--- a/arch/m32r/kernel/io_mappi.c
+++ /dev/null
@@ -1,325 +0,0 @@
-/*
- * linux/arch/m32r/kernel/io_mappi.c
- *
- * Typical I/O routines for Mappi board.
- *
- * Copyright (c) 2001-2005 Hiroyuki Kondo, Hirokazu Takata,
- * Hitoshi Yamamoto
- */
-
-#include <asm/m32r.h>
-#include <asm/page.h>
-#include <asm/io.h>
-#include <asm/byteorder.h>
-
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC)
-#include <linux/types.h>
-
-#define M32R_PCC_IOMAP_SIZE 0x1000
-
-#define M32R_PCC_IOSTART0 0x1000
-#define M32R_PCC_IOEND0 (M32R_PCC_IOSTART0 + M32R_PCC_IOMAP_SIZE - 1)
-#define M32R_PCC_IOSTART1 0x2000
-#define M32R_PCC_IOEND1 (M32R_PCC_IOSTART1 + M32R_PCC_IOMAP_SIZE - 1)
-
-extern void pcc_ioread(int, unsigned long, void *, size_t, size_t, int);
-extern void pcc_iowrite(int, unsigned long, void *, size_t, size_t, int);
-#endif /* CONFIG_PCMCIA && CONFIG_M32R_PCC */
-
-#define PORT2ADDR(port) _port2addr(port)
-
-static inline void *_port2addr(unsigned long port)
-{
- return (void *)(port | NONCACHE_OFFSET);
-}
-
-static inline void *_port2addr_ne(unsigned long port)
-{
- return (void *)((port<<1) + NONCACHE_OFFSET + 0x0C000000);
-}
-
-static inline void delay(void)
-{
- __asm__ __volatile__ ("push r0; \n\t pop r0;" : : :"memory");
-}
-
-/*
- * NIC I/O function
- */
-
-#define PORT2ADDR_NE(port) _port2addr_ne(port)
-
-static inline unsigned char _ne_inb(void *portp)
-{
- return (unsigned char) *(volatile unsigned short *)portp;
-}
-
-static inline unsigned short _ne_inw(void *portp)
-{
- unsigned short tmp;
-
- tmp = *(volatile unsigned short *)portp;
- return le16_to_cpu(tmp);
-}
-
-static inline void _ne_outb(unsigned char b, void *portp)
-{
- *(volatile unsigned short *)portp = (unsigned short)b;
-}
-
-static inline void _ne_outw(unsigned short w, void *portp)
-{
- *(volatile unsigned short *)portp = cpu_to_le16(w);
-}
-
-unsigned char _inb(unsigned long port)
-{
- if (port >= 0x300 && port < 0x320)
- return _ne_inb(PORT2ADDR_NE(port));
- else
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC)
- if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- unsigned char b;
- pcc_ioread(0, port, &b, sizeof(b), 1, 0);
- return b;
- } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) {
- unsigned char b;
- pcc_ioread(1, port, &b, sizeof(b), 1, 0);
- return b;
- } else
-#endif
-
- return *(volatile unsigned char *)PORT2ADDR(port);
-}
-
-unsigned short _inw(unsigned long port)
-{
- if (port >= 0x300 && port < 0x320)
- return _ne_inw(PORT2ADDR_NE(port));
- else
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC)
- if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- unsigned short w;
- pcc_ioread(0, port, &w, sizeof(w), 1, 0);
- return w;
- } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) {
- unsigned short w;
- pcc_ioread(1, port, &w, sizeof(w), 1, 0);
- return w;
- } else
-#endif
- return *(volatile unsigned short *)PORT2ADDR(port);
-}
-
-unsigned long _inl(unsigned long port)
-{
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC)
- if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- unsigned long l;
- pcc_ioread(0, port, &l, sizeof(l), 1, 0);
- return l;
- } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) {
- unsigned short l;
- pcc_ioread(1, port, &l, sizeof(l), 1, 0);
- return l;
- } else
-#endif
- return *(volatile unsigned long *)PORT2ADDR(port);
-}
-
-unsigned char _inb_p(unsigned long port)
-{
- unsigned char v = _inb(port);
- delay();
- return (v);
-}
-
-unsigned short _inw_p(unsigned long port)
-{
- unsigned short v = _inw(port);
- delay();
- return (v);
-}
-
-unsigned long _inl_p(unsigned long port)
-{
- unsigned long v = _inl(port);
- delay();
- return (v);
-}
-
-void _outb(unsigned char b, unsigned long port)
-{
- if (port >= 0x300 && port < 0x320)
- _ne_outb(b, PORT2ADDR_NE(port));
- else
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC)
- if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- pcc_iowrite(0, port, &b, sizeof(b), 1, 0);
- } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) {
- pcc_iowrite(1, port, &b, sizeof(b), 1, 0);
- } else
-#endif
- *(volatile unsigned char *)PORT2ADDR(port) = b;
-}
-
-void _outw(unsigned short w, unsigned long port)
-{
- if (port >= 0x300 && port < 0x320)
- _ne_outw(w, PORT2ADDR_NE(port));
- else
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC)
- if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- pcc_iowrite(0, port, &w, sizeof(w), 1, 0);
- } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) {
- pcc_iowrite(1, port, &w, sizeof(w), 1, 0);
- } else
-#endif
- *(volatile unsigned short *)PORT2ADDR(port) = w;
-}
-
-void _outl(unsigned long l, unsigned long port)
-{
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC)
- if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- pcc_iowrite(0, port, &l, sizeof(l), 1, 0);
- } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) {
- pcc_iowrite(1, port, &l, sizeof(l), 1, 0);
- } else
-#endif
- *(volatile unsigned long *)PORT2ADDR(port) = l;
-}
-
-void _outb_p(unsigned char b, unsigned long port)
-{
- _outb(b, port);
- delay();
-}
-
-void _outw_p(unsigned short w, unsigned long port)
-{
- _outw(w, port);
- delay();
-}
-
-void _outl_p(unsigned long l, unsigned long port)
-{
- _outl(l, port);
- delay();
-}
-
-void _insb(unsigned int port, void *addr, unsigned long count)
-{
- unsigned short *buf = addr;
- unsigned short *portp;
-
- if (port >= 0x300 && port < 0x320){
- portp = PORT2ADDR_NE(port);
- while (count--)
- *buf++ = *(volatile unsigned char *)portp;
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC)
- } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- pcc_ioread(0, port, (void *)addr, sizeof(unsigned char),
- count, 1);
- } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) {
- pcc_ioread(1, port, (void *)addr, sizeof(unsigned char),
- count, 1);
-#endif
- } else {
- portp = PORT2ADDR(port);
- while (count--)
- *buf++ = *(volatile unsigned char *)portp;
- }
-}
-
-void _insw(unsigned int port, void *addr, unsigned long count)
-{
- unsigned short *buf = addr;
- unsigned short *portp;
-
- if (port >= 0x300 && port < 0x320) {
- portp = PORT2ADDR_NE(port);
- while (count--)
- *buf++ = _ne_inw(portp);
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC)
- } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- pcc_ioread(0, port, (void *)addr, sizeof(unsigned short),
- count, 1);
- } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) {
- pcc_ioread(1, port, (void *)addr, sizeof(unsigned short),
- count, 1);
-#endif
- } else {
- portp = PORT2ADDR(port);
- while (count--)
- *buf++ = *(volatile unsigned short *)portp;
- }
-}
-
-void _insl(unsigned int port, void *addr, unsigned long count)
-{
- unsigned long *buf = addr;
- unsigned long *portp;
-
- portp = PORT2ADDR(port);
- while (count--)
- *buf++ = *(volatile unsigned long *)portp;
-}
-
-void _outsb(unsigned int port, const void *addr, unsigned long count)
-{
- const unsigned char *buf = addr;
- unsigned char *portp;
-
- if (port >= 0x300 && port < 0x320) {
- portp = PORT2ADDR_NE(port);
- while (count--)
- _ne_outb(*buf++, portp);
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC)
- } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- pcc_iowrite(0, port, (void *)addr, sizeof(unsigned char),
- count, 1);
- } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) {
- pcc_iowrite(1, port, (void *)addr, sizeof(unsigned char),
- count, 1);
-#endif
- } else {
- portp = PORT2ADDR(port);
- while (count--)
- *(volatile unsigned char *)portp = *buf++;
- }
-}
-
-void _outsw(unsigned int port, const void *addr, unsigned long count)
-{
- const unsigned short *buf = addr;
- unsigned short *portp;
-
- if (port >= 0x300 && port < 0x320) {
- portp = PORT2ADDR_NE(port);
- while (count--)
- _ne_outw(*buf++, portp);
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC)
- } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- pcc_iowrite(0, port, (void *)addr, sizeof(unsigned short),
- count, 1);
- } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) {
- pcc_iowrite(1, port, (void *)addr, sizeof(unsigned short),
- count, 1);
-#endif
- } else {
- portp = PORT2ADDR(port);
- while (count--)
- *(volatile unsigned short *)portp = *buf++;
- }
-}
-
-void _outsl(unsigned int port, const void *addr, unsigned long count)
-{
- const unsigned long *buf = addr;
- unsigned char *portp;
-
- portp = PORT2ADDR(port);
- while (count--)
- *(volatile unsigned long *)portp = *buf++;
-}
diff --git a/arch/m32r/kernel/io_mappi2.c b/arch/m32r/kernel/io_mappi2.c
deleted file mode 100644
index ecc6aa88f9ac..000000000000
--- a/arch/m32r/kernel/io_mappi2.c
+++ /dev/null
@@ -1,383 +0,0 @@
-/*
- * linux/arch/m32r/kernel/io_mappi2.c
- *
- * Typical I/O routines for Mappi2 board.
- *
- * Copyright (c) 2001-2005 Hiroyuki Kondo, Hirokazu Takata,
- * Hitoshi Yamamoto, Mamoru Sakugawa
- */
-
-#include <asm/m32r.h>
-#include <asm/page.h>
-#include <asm/io.h>
-#include <asm/byteorder.h>
-
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
-#include <linux/types.h>
-
-#define M32R_PCC_IOMAP_SIZE 0x1000
-
-#define M32R_PCC_IOSTART0 0x1000
-#define M32R_PCC_IOEND0 (M32R_PCC_IOSTART0 + M32R_PCC_IOMAP_SIZE - 1)
-
-extern void pcc_ioread_byte(int, unsigned long, void *, size_t, size_t, int);
-extern void pcc_ioread_word(int, unsigned long, void *, size_t, size_t, int);
-extern void pcc_iowrite_byte(int, unsigned long, void *, size_t, size_t, int);
-extern void pcc_iowrite_word(int, unsigned long, void *, size_t, size_t, int);
-#endif /* CONFIG_PCMCIA && CONFIG_M32R_CFC */
-
-#define PORT2ADDR(port) _port2addr(port)
-#define PORT2ADDR_NE(port) _port2addr_ne(port)
-#define PORT2ADDR_USB(port) _port2addr_usb(port)
-
-static inline void *_port2addr(unsigned long port)
-{
- return (void *)(port | NONCACHE_OFFSET);
-}
-
-#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
-static inline void *__port2addr_ata(unsigned long port)
-{
- static int dummy_reg;
-
- switch (port) {
- case 0x1f0: return (void *)(0x0c002000 | NONCACHE_OFFSET);
- case 0x1f1: return (void *)(0x0c012800 | NONCACHE_OFFSET);
- case 0x1f2: return (void *)(0x0c012002 | NONCACHE_OFFSET);
- case 0x1f3: return (void *)(0x0c012802 | NONCACHE_OFFSET);
- case 0x1f4: return (void *)(0x0c012004 | NONCACHE_OFFSET);
- case 0x1f5: return (void *)(0x0c012804 | NONCACHE_OFFSET);
- case 0x1f6: return (void *)(0x0c012006 | NONCACHE_OFFSET);
- case 0x1f7: return (void *)(0x0c012806 | NONCACHE_OFFSET);
- case 0x3f6: return (void *)(0x0c01200e | NONCACHE_OFFSET);
- default: return (void *)&dummy_reg;
- }
-}
-#endif
-
-#define LAN_IOSTART (0x300 | NONCACHE_OFFSET)
-#define LAN_IOEND (0x320 | NONCACHE_OFFSET)
-#ifdef CONFIG_CHIP_OPSP
-static inline void *_port2addr_ne(unsigned long port)
-{
- return (void *)(port + 0x10000000);
-}
-#else
-static inline void *_port2addr_ne(unsigned long port)
-{
- return (void *)(port + 0x04000000);
-}
-#endif
-static inline void *_port2addr_usb(unsigned long port)
-{
- return (void *)(port + NONCACHE_OFFSET + 0x14000000);
-}
-static inline void delay(void)
-{
- __asm__ __volatile__ ("push r0; \n\t pop r0;" : : :"memory");
-}
-
-/*
- * NIC I/O function
- */
-
-static inline unsigned char _ne_inb(void *portp)
-{
- return (unsigned char) *(volatile unsigned char *)portp;
-}
-
-static inline unsigned short _ne_inw(void *portp)
-{
- return (unsigned short)le16_to_cpu(*(volatile unsigned short *)portp);
-}
-
-static inline void _ne_insb(void *portp, void * addr, unsigned long count)
-{
- unsigned char *buf = addr;
-
- while (count--)
- *buf++ = *(volatile unsigned char *)portp;
-}
-
-static inline void _ne_outb(unsigned char b, void *portp)
-{
- *(volatile unsigned char *)portp = (unsigned char)b;
-}
-
-static inline void _ne_outw(unsigned short w, void *portp)
-{
- *(volatile unsigned short *)portp = cpu_to_le16(w);
-}
-
-unsigned char _inb(unsigned long port)
-{
- if (port >= LAN_IOSTART && port < LAN_IOEND)
- return _ne_inb(PORT2ADDR_NE(port));
-#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
- else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
- return *(volatile unsigned char *)__port2addr_ata(port);
- }
-#endif
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
- else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- unsigned char b;
- pcc_ioread_byte(0, port, &b, sizeof(b), 1, 0);
- return b;
- } else
-#endif
-
- return *(volatile unsigned char *)PORT2ADDR(port);
-}
-
-unsigned short _inw(unsigned long port)
-{
- if (port >= LAN_IOSTART && port < LAN_IOEND)
- return _ne_inw(PORT2ADDR_NE(port));
-#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
- else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
- return *(volatile unsigned short *)__port2addr_ata(port);
- }
-#endif
-#if defined(CONFIG_USB)
- else if (port >= 0x340 && port < 0x3a0)
- return *(volatile unsigned short *)PORT2ADDR_USB(port);
-#endif
-
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
- else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- unsigned short w;
- pcc_ioread_word(0, port, &w, sizeof(w), 1, 0);
- return w;
- } else
-#endif
- return *(volatile unsigned short *)PORT2ADDR(port);
-}
-
-unsigned long _inl(unsigned long port)
-{
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
- if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- unsigned long l;
- pcc_ioread_word(0, port, &l, sizeof(l), 1, 0);
- return l;
- } else
-#endif
- return *(volatile unsigned long *)PORT2ADDR(port);
-}
-
-unsigned char _inb_p(unsigned long port)
-{
- unsigned char v = _inb(port);
- delay();
- return (v);
-}
-
-unsigned short _inw_p(unsigned long port)
-{
- unsigned short v = _inw(port);
- delay();
- return (v);
-}
-
-unsigned long _inl_p(unsigned long port)
-{
- unsigned long v = _inl(port);
- delay();
- return (v);
-}
-
-void _outb(unsigned char b, unsigned long port)
-{
- if (port >= LAN_IOSTART && port < LAN_IOEND)
- _ne_outb(b, PORT2ADDR_NE(port));
- else
-#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
- if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
- *(volatile unsigned char *)__port2addr_ata(port) = b;
- } else
-#endif
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
- if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- pcc_iowrite_byte(0, port, &b, sizeof(b), 1, 0);
- } else
-#endif
- *(volatile unsigned char *)PORT2ADDR(port) = b;
-}
-
-void _outw(unsigned short w, unsigned long port)
-{
- if (port >= LAN_IOSTART && port < LAN_IOEND)
- _ne_outw(w, PORT2ADDR_NE(port));
- else
-#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
- if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
- *(volatile unsigned short *)__port2addr_ata(port) = w;
- } else
-#endif
-#if defined(CONFIG_USB)
- if (port >= 0x340 && port < 0x3a0)
- *(volatile unsigned short *)PORT2ADDR_USB(port) = w;
- else
-#endif
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
- if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- pcc_iowrite_word(0, port, &w, sizeof(w), 1, 0);
- } else
-#endif
- *(volatile unsigned short *)PORT2ADDR(port) = w;
-}
-
-void _outl(unsigned long l, unsigned long port)
-{
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
- if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- pcc_iowrite_word(0, port, &l, sizeof(l), 1, 0);
- } else
-#endif
- *(volatile unsigned long *)PORT2ADDR(port) = l;
-}
-
-void _outb_p(unsigned char b, unsigned long port)
-{
- _outb(b, port);
- delay();
-}
-
-void _outw_p(unsigned short w, unsigned long port)
-{
- _outw(w, port);
- delay();
-}
-
-void _outl_p(unsigned long l, unsigned long port)
-{
- _outl(l, port);
- delay();
-}
-
-void _insb(unsigned int port, void * addr, unsigned long count)
-{
- if (port >= LAN_IOSTART && port < LAN_IOEND)
- _ne_insb(PORT2ADDR_NE(port), addr, count);
-#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
- else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
- unsigned char *buf = addr;
- unsigned char *portp = __port2addr_ata(port);
- while (count--)
- *buf++ = *(volatile unsigned char *)portp;
- }
-#endif
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
- else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- pcc_ioread_byte(0, port, (void *)addr, sizeof(unsigned char),
- count, 1);
- }
-#endif
- else {
- unsigned char *buf = addr;
- unsigned char *portp = PORT2ADDR(port);
- while (count--)
- *buf++ = *(volatile unsigned char *)portp;
- }
-}
-
-void _insw(unsigned int port, void * addr, unsigned long count)
-{
- unsigned short *buf = addr;
- unsigned short *portp;
-
- if (port >= LAN_IOSTART && port < LAN_IOEND) {
- portp = PORT2ADDR_NE(port);
- while (count--)
- *buf++ = *(volatile unsigned short *)portp;
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
- } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- pcc_ioread_word(9, port, (void *)addr, sizeof(unsigned short),
- count, 1);
-#endif
-#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
- } else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
- portp = __port2addr_ata(port);
- while (count--)
- *buf++ = *(volatile unsigned short *)portp;
-#endif
- } else {
- portp = PORT2ADDR(port);
- while (count--)
- *buf++ = *(volatile unsigned short *)portp;
- }
-}
-
-void _insl(unsigned int port, void * addr, unsigned long count)
-{
- unsigned long *buf = addr;
- unsigned long *portp;
-
- portp = PORT2ADDR(port);
- while (count--)
- *buf++ = *(volatile unsigned long *)portp;
-}
-
-void _outsb(unsigned int port, const void * addr, unsigned long count)
-{
- const unsigned char *buf = addr;
- unsigned char *portp;
-
- if (port >= LAN_IOSTART && port < LAN_IOEND) {
- portp = PORT2ADDR_NE(port);
- while (count--)
- _ne_outb(*buf++, portp);
-#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
- } else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
- portp = __port2addr_ata(port);
- while (count--)
- *(volatile unsigned char *)portp = *buf++;
-#endif
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
- } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- pcc_iowrite_byte(0, port, (void *)addr, sizeof(unsigned char),
- count, 1);
-#endif
- } else {
- portp = PORT2ADDR(port);
- while (count--)
- *(volatile unsigned char *)portp = *buf++;
- }
-}
-
-void _outsw(unsigned int port, const void * addr, unsigned long count)
-{
- const unsigned short *buf = addr;
- unsigned short *portp;
-
- if (port >= LAN_IOSTART && port < LAN_IOEND) {
- portp = PORT2ADDR_NE(port);
- while (count--)
- *(volatile unsigned short *)portp = *buf++;
-#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
- } else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
- portp = __port2addr_ata(port);
- while (count--)
- *(volatile unsigned short *)portp = *buf++;
-#endif
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
- } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- pcc_iowrite_word(9, port, (void *)addr, sizeof(unsigned short),
- count, 1);
-#endif
- } else {
- portp = PORT2ADDR(port);
- while (count--)
- *(volatile unsigned short *)portp = *buf++;
- }
-}
-
-void _outsl(unsigned int port, const void * addr, unsigned long count)
-{
- const unsigned long *buf = addr;
- unsigned char *portp;
-
- portp = PORT2ADDR(port);
- while (count--)
- *(volatile unsigned long *)portp = *buf++;
-}
diff --git a/arch/m32r/kernel/io_mappi3.c b/arch/m32r/kernel/io_mappi3.c
deleted file mode 100644
index a13b5f6b07e9..000000000000
--- a/arch/m32r/kernel/io_mappi3.c
+++ /dev/null
@@ -1,405 +0,0 @@
-/*
- * linux/arch/m32r/kernel/io_mappi3.c
- *
- * Typical I/O routines for Mappi3 board.
- *
- * Copyright (c) 2001-2005 Hiroyuki Kondo, Hirokazu Takata,
- * Hitoshi Yamamoto, Mamoru Sakugawa
- */
-
-#include <asm/m32r.h>
-#include <asm/page.h>
-#include <asm/io.h>
-#include <asm/byteorder.h>
-
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
-#include <linux/types.h>
-
-#define M32R_PCC_IOMAP_SIZE 0x1000
-
-#define M32R_PCC_IOSTART0 0x1000
-#define M32R_PCC_IOEND0 (M32R_PCC_IOSTART0 + M32R_PCC_IOMAP_SIZE - 1)
-
-extern void pcc_ioread_byte(int, unsigned long, void *, size_t, size_t, int);
-extern void pcc_ioread_word(int, unsigned long, void *, size_t, size_t, int);
-extern void pcc_iowrite_byte(int, unsigned long, void *, size_t, size_t, int);
-extern void pcc_iowrite_word(int, unsigned long, void *, size_t, size_t, int);
-#endif /* CONFIG_PCMCIA && CONFIG_M32R_CFC */
-
-#define PORT2ADDR(port) _port2addr(port)
-#define PORT2ADDR_NE(port) _port2addr_ne(port)
-#define PORT2ADDR_USB(port) _port2addr_usb(port)
-
-static inline void *_port2addr(unsigned long port)
-{
- return (void *)(port | NONCACHE_OFFSET);
-}
-
-#if defined(CONFIG_IDE)
-static inline void *__port2addr_ata(unsigned long port)
-{
- static int dummy_reg;
-
- switch (port) {
- /* IDE0 CF */
- case 0x1f0: return (void *)(0x14002000 | NONCACHE_OFFSET);
- case 0x1f1: return (void *)(0x14012800 | NONCACHE_OFFSET);
- case 0x1f2: return (void *)(0x14012002 | NONCACHE_OFFSET);
- case 0x1f3: return (void *)(0x14012802 | NONCACHE_OFFSET);
- case 0x1f4: return (void *)(0x14012004 | NONCACHE_OFFSET);
- case 0x1f5: return (void *)(0x14012804 | NONCACHE_OFFSET);
- case 0x1f6: return (void *)(0x14012006 | NONCACHE_OFFSET);
- case 0x1f7: return (void *)(0x14012806 | NONCACHE_OFFSET);
- case 0x3f6: return (void *)(0x1401200e | NONCACHE_OFFSET);
- /* IDE1 IDE */
- case 0x170: /* Data 16bit */
- return (void *)(0x14810000 | NONCACHE_OFFSET);
- case 0x171: /* Features / Error */
- return (void *)(0x14810002 | NONCACHE_OFFSET);
- case 0x172: /* Sector count */
- return (void *)(0x14810004 | NONCACHE_OFFSET);
- case 0x173: /* Sector number */
- return (void *)(0x14810006 | NONCACHE_OFFSET);
- case 0x174: /* Cylinder low */
- return (void *)(0x14810008 | NONCACHE_OFFSET);
- case 0x175: /* Cylinder high */
- return (void *)(0x1481000a | NONCACHE_OFFSET);
- case 0x176: /* Device head */
- return (void *)(0x1481000c | NONCACHE_OFFSET);
- case 0x177: /* Command */
- return (void *)(0x1481000e | NONCACHE_OFFSET);
- case 0x376: /* Device control / Alt status */
- return (void *)(0x1480800c | NONCACHE_OFFSET);
-
- default: return (void *)&dummy_reg;
- }
-}
-#endif
-
-#define LAN_IOSTART (0x300 | NONCACHE_OFFSET)
-#define LAN_IOEND (0x320 | NONCACHE_OFFSET)
-static inline void *_port2addr_ne(unsigned long port)
-{
- return (void *)(port + 0x10000000);
-}
-
-static inline void *_port2addr_usb(unsigned long port)
-{
- return (void *)(port + NONCACHE_OFFSET + 0x12000000);
-}
-static inline void delay(void)
-{
- __asm__ __volatile__ ("push r0; \n\t pop r0;" : : :"memory");
-}
-
-/*
- * NIC I/O function
- */
-
-static inline unsigned char _ne_inb(void *portp)
-{
- return (unsigned char) *(volatile unsigned char *)portp;
-}
-
-static inline unsigned short _ne_inw(void *portp)
-{
- return (unsigned short)le16_to_cpu(*(volatile unsigned short *)portp);
-}
-
-static inline void _ne_insb(void *portp, void * addr, unsigned long count)
-{
- unsigned char *buf = addr;
-
- while (count--)
- *buf++ = *(volatile unsigned char *)portp;
-}
-
-static inline void _ne_outb(unsigned char b, void *portp)
-{
- *(volatile unsigned char *)portp = (unsigned char)b;
-}
-
-static inline void _ne_outw(unsigned short w, void *portp)
-{
- *(volatile unsigned short *)portp = cpu_to_le16(w);
-}
-
-unsigned char _inb(unsigned long port)
-{
- if (port >= LAN_IOSTART && port < LAN_IOEND)
- return _ne_inb(PORT2ADDR_NE(port));
-#if defined(CONFIG_IDE)
- else if ( ((port >= 0x170 && port <=0x177) || port == 0x376) ||
- ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) ){
- return *(volatile unsigned char *)__port2addr_ata(port);
- }
-#endif
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
- else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- unsigned char b;
- pcc_ioread_byte(0, port, &b, sizeof(b), 1, 0);
- return b;
- } else
-#endif
- return *(volatile unsigned char *)PORT2ADDR(port);
-}
-
-unsigned short _inw(unsigned long port)
-{
- if (port >= LAN_IOSTART && port < LAN_IOEND)
- return _ne_inw(PORT2ADDR_NE(port));
-#if defined(CONFIG_IDE)
- else if ( ((port >= 0x170 && port <=0x177) || port == 0x376) ||
- ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) ){
- return *(volatile unsigned short *)__port2addr_ata(port);
- }
-#endif
-#if defined(CONFIG_USB)
- else if (port >= 0x340 && port < 0x3a0)
- return *(volatile unsigned short *)PORT2ADDR_USB(port);
-#endif
-
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
- else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- unsigned short w;
- pcc_ioread_word(0, port, &w, sizeof(w), 1, 0);
- return w;
- } else
-#endif
- return *(volatile unsigned short *)PORT2ADDR(port);
-}
-
-unsigned long _inl(unsigned long port)
-{
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
- if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- unsigned long l;
- pcc_ioread_word(0, port, &l, sizeof(l), 1, 0);
- return l;
- } else
-#endif
- return *(volatile unsigned long *)PORT2ADDR(port);
-}
-
-unsigned char _inb_p(unsigned long port)
-{
- unsigned char v = _inb(port);
- delay();
- return (v);
-}
-
-unsigned short _inw_p(unsigned long port)
-{
- unsigned short v = _inw(port);
- delay();
- return (v);
-}
-
-unsigned long _inl_p(unsigned long port)
-{
- unsigned long v = _inl(port);
- delay();
- return (v);
-}
-
-void _outb(unsigned char b, unsigned long port)
-{
- if (port >= LAN_IOSTART && port < LAN_IOEND)
- _ne_outb(b, PORT2ADDR_NE(port));
- else
-#if defined(CONFIG_IDE)
- if ( ((port >= 0x170 && port <=0x177) || port == 0x376) ||
- ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) ){
- *(volatile unsigned char *)__port2addr_ata(port) = b;
- } else
-#endif
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
- if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- pcc_iowrite_byte(0, port, &b, sizeof(b), 1, 0);
- } else
-#endif
- *(volatile unsigned char *)PORT2ADDR(port) = b;
-}
-
-void _outw(unsigned short w, unsigned long port)
-{
- if (port >= LAN_IOSTART && port < LAN_IOEND)
- _ne_outw(w, PORT2ADDR_NE(port));
- else
-#if defined(CONFIG_IDE)
- if ( ((port >= 0x170 && port <=0x177) || port == 0x376) ||
- ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) ){
- *(volatile unsigned short *)__port2addr_ata(port) = w;
- } else
-#endif
-#if defined(CONFIG_USB)
- if (port >= 0x340 && port < 0x3a0)
- *(volatile unsigned short *)PORT2ADDR_USB(port) = w;
- else
-#endif
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
- if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- pcc_iowrite_word(0, port, &w, sizeof(w), 1, 0);
- } else
-#endif
- *(volatile unsigned short *)PORT2ADDR(port) = w;
-}
-
-void _outl(unsigned long l, unsigned long port)
-{
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
- if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- pcc_iowrite_word(0, port, &l, sizeof(l), 1, 0);
- } else
-#endif
- *(volatile unsigned long *)PORT2ADDR(port) = l;
-}
-
-void _outb_p(unsigned char b, unsigned long port)
-{
- _outb(b, port);
- delay();
-}
-
-void _outw_p(unsigned short w, unsigned long port)
-{
- _outw(w, port);
- delay();
-}
-
-void _outl_p(unsigned long l, unsigned long port)
-{
- _outl(l, port);
- delay();
-}
-
-void _insb(unsigned int port, void * addr, unsigned long count)
-{
- if (port >= LAN_IOSTART && port < LAN_IOEND)
- _ne_insb(PORT2ADDR_NE(port), addr, count);
-#if defined(CONFIG_IDE)
- else if ( ((port >= 0x170 && port <=0x177) || port == 0x376) ||
- ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) ){
- unsigned char *buf = addr;
- unsigned char *portp = __port2addr_ata(port);
- while (count--)
- *buf++ = *(volatile unsigned char *)portp;
- }
-#endif
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
- else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- pcc_ioread_byte(0, port, (void *)addr, sizeof(unsigned char),
- count, 1);
- }
-#endif
- else {
- unsigned char *buf = addr;
- unsigned char *portp = PORT2ADDR(port);
- while (count--)
- *buf++ = *(volatile unsigned char *)portp;
- }
-}
-
-void _insw(unsigned int port, void * addr, unsigned long count)
-{
- unsigned short *buf = addr;
- unsigned short *portp;
-
- if (port >= LAN_IOSTART && port < LAN_IOEND) {
- portp = PORT2ADDR_NE(port);
- while (count--)
- *buf++ = *(volatile unsigned short *)portp;
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
- } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- pcc_ioread_word(9, port, (void *)addr, sizeof(unsigned short),
- count, 1);
-#endif
-#if defined(CONFIG_IDE)
- } else if ( ((port >= 0x170 && port <=0x177) || port == 0x376) ||
- ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) ){
- portp = __port2addr_ata(port);
- while (count--)
- *buf++ = *(volatile unsigned short *)portp;
-#endif
- } else {
- portp = PORT2ADDR(port);
- while (count--)
- *buf++ = *(volatile unsigned short *)portp;
- }
-}
-
-void _insl(unsigned int port, void * addr, unsigned long count)
-{
- unsigned long *buf = addr;
- unsigned long *portp;
-
- portp = PORT2ADDR(port);
- while (count--)
- *buf++ = *(volatile unsigned long *)portp;
-}
-
-void _outsb(unsigned int port, const void * addr, unsigned long count)
-{
- const unsigned char *buf = addr;
- unsigned char *portp;
-
- if (port >= LAN_IOSTART && port < LAN_IOEND) {
- portp = PORT2ADDR_NE(port);
- while (count--)
- _ne_outb(*buf++, portp);
-#if defined(CONFIG_IDE)
- } else if ( ((port >= 0x170 && port <=0x177) || port == 0x376) ||
- ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) ){
- portp = __port2addr_ata(port);
- while (count--)
- *(volatile unsigned char *)portp = *buf++;
-#endif
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
- } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- pcc_iowrite_byte(0, port, (void *)addr, sizeof(unsigned char),
- count, 1);
-#endif
- } else {
- portp = PORT2ADDR(port);
- while (count--)
- *(volatile unsigned char *)portp = *buf++;
- }
-}
-
-void _outsw(unsigned int port, const void * addr, unsigned long count)
-{
- const unsigned short *buf = addr;
- unsigned short *portp;
-
- if (port >= LAN_IOSTART && port < LAN_IOEND) {
- portp = PORT2ADDR_NE(port);
- while (count--)
- *(volatile unsigned short *)portp = *buf++;
-#if defined(CONFIG_IDE)
- } else if ( ((port >= 0x170 && port <=0x177) || port == 0x376) ||
- ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) ){
- portp = __port2addr_ata(port);
- while (count--)
- *(volatile unsigned short *)portp = *buf++;
-#endif
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
- } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- pcc_iowrite_word(9, port, (void *)addr, sizeof(unsigned short),
- count, 1);
-#endif
- } else {
- portp = PORT2ADDR(port);
- while (count--)
- *(volatile unsigned short *)portp = *buf++;
- }
-}
-
-void _outsl(unsigned int port, const void * addr, unsigned long count)
-{
- const unsigned long *buf = addr;
- unsigned char *portp;
-
- portp = PORT2ADDR(port);
- while (count--)
- *(volatile unsigned long *)portp = *buf++;
-}
diff --git a/arch/m32r/kernel/io_oaks32r.c b/arch/m32r/kernel/io_oaks32r.c
deleted file mode 100644
index 068bf47060f8..000000000000
--- a/arch/m32r/kernel/io_oaks32r.c
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- * linux/arch/m32r/kernel/io_oaks32r.c
- *
- * Typical I/O routines for OAKS32R board.
- *
- * Copyright (c) 2001-2005 Hiroyuki Kondo, Hirokazu Takata,
- * Hitoshi Yamamoto, Mamoru Sakugawa
- */
-
-#include <asm/m32r.h>
-#include <asm/page.h>
-#include <asm/io.h>
-
-#define PORT2ADDR(port) _port2addr(port)
-
-static inline void *_port2addr(unsigned long port)
-{
- return (void *)(port | NONCACHE_OFFSET);
-}
-
-static inline void *_port2addr_ne(unsigned long port)
-{
- return (void *)((port<<1) + NONCACHE_OFFSET + 0x02000000);
-}
-
-static inline void delay(void)
-{
- __asm__ __volatile__ ("push r0; \n\t pop r0;" : : :"memory");
-}
-
-/*
- * NIC I/O function
- */
-
-#define PORT2ADDR_NE(port) _port2addr_ne(port)
-
-static inline unsigned char _ne_inb(void *portp)
-{
- return *(volatile unsigned char *)(portp+1);
-}
-
-static inline unsigned short _ne_inw(void *portp)
-{
- unsigned short tmp;
-
- tmp = *(unsigned short *)(portp) & 0xff;
- tmp |= *(unsigned short *)(portp+2) << 8;
- return tmp;
-}
-
-static inline void _ne_insb(void *portp, void *addr, unsigned long count)
-{
- unsigned char *buf = addr;
- while (count--)
- *buf++ = *(volatile unsigned char *)(portp+1);
-}
-
-static inline void _ne_outb(unsigned char b, void *portp)
-{
- *(volatile unsigned char *)(portp+1) = b;
-}
-
-static inline void _ne_outw(unsigned short w, void *portp)
-{
- *(volatile unsigned short *)portp = (w >> 8);
- *(volatile unsigned short *)(portp+2) = (w & 0xff);
-}
-
-unsigned char _inb(unsigned long port)
-{
- if (port >= 0x300 && port < 0x320)
- return _ne_inb(PORT2ADDR_NE(port));
-
- return *(volatile unsigned char *)PORT2ADDR(port);
-}
-
-unsigned short _inw(unsigned long port)
-{
- if (port >= 0x300 && port < 0x320)
- return _ne_inw(PORT2ADDR_NE(port));
-
- return *(volatile unsigned short *)PORT2ADDR(port);
-}
-
-unsigned long _inl(unsigned long port)
-{
- return *(volatile unsigned long *)PORT2ADDR(port);
-}
-
-unsigned char _inb_p(unsigned long port)
-{
- unsigned char v = _inb(port);
- delay();
- return (v);
-}
-
-unsigned short _inw_p(unsigned long port)
-{
- unsigned short v = _inw(port);
- delay();
- return (v);
-}
-
-unsigned long _inl_p(unsigned long port)
-{
- unsigned long v = _inl(port);
- delay();
- return (v);
-}
-
-void _outb(unsigned char b, unsigned long port)
-{
- if (port >= 0x300 && port < 0x320)
- _ne_outb(b, PORT2ADDR_NE(port));
- else
- *(volatile unsigned char *)PORT2ADDR(port) = b;
-}
-
-void _outw(unsigned short w, unsigned long port)
-{
- if (port >= 0x300 && port < 0x320)
- _ne_outw(w, PORT2ADDR_NE(port));
- else
- *(volatile unsigned short *)PORT2ADDR(port) = w;
-}
-
-void _outl(unsigned long l, unsigned long port)
-{
- *(volatile unsigned long *)PORT2ADDR(port) = l;
-}
-
-void _outb_p(unsigned char b, unsigned long port)
-{
- _outb(b, port);
- delay();
-}
-
-void _outw_p(unsigned short w, unsigned long port)
-{
- _outw(w, port);
- delay();
-}
-
-void _outl_p(unsigned long l, unsigned long port)
-{
- _outl(l, port);
- delay();
-}
-
-void _insb(unsigned int port, void *addr, unsigned long count)
-{
- if (port >= 0x300 && port < 0x320)
- _ne_insb(PORT2ADDR_NE(port), addr, count);
- else {
- unsigned char *buf = addr;
- unsigned char *portp = PORT2ADDR(port);
- while (count--)
- *buf++ = *(volatile unsigned char *)portp;
- }
-}
-
-void _insw(unsigned int port, void *addr, unsigned long count)
-{
- unsigned short *buf = addr;
- unsigned short *portp;
-
- if (port >= 0x300 && port < 0x320) {
- portp = PORT2ADDR_NE(port);
- while (count--)
- *buf++ = _ne_inw(portp);
- } else {
- portp = PORT2ADDR(port);
- while (count--)
- *buf++ = *(volatile unsigned short *)portp;
- }
-}
-
-void _insl(unsigned int port, void *addr, unsigned long count)
-{
- unsigned long *buf = addr;
- unsigned long *portp;
-
- portp = PORT2ADDR(port);
- while (count--)
- *buf++ = *(volatile unsigned long *)portp;
-}
-
-void _outsb(unsigned int port, const void *addr, unsigned long count)
-{
- const unsigned char *buf = addr;
- unsigned char *portp;
-
- if (port >= 0x300 && port < 0x320) {
- portp = PORT2ADDR_NE(port);
- while (count--)
- _ne_outb(*buf++, portp);
- } else {
- portp = PORT2ADDR(port);
- while (count--)
- *(volatile unsigned char *)portp = *buf++;
- }
-}
-
-void _outsw(unsigned int port, const void *addr, unsigned long count)
-{
- const unsigned short *buf = addr;
- unsigned short *portp;
-
- if (port >= 0x300 && port < 0x320) {
- portp = PORT2ADDR_NE(port);
- while (count--)
- _ne_outw(*buf++, portp);
- } else {
- portp = PORT2ADDR(port);
- while (count--)
- *(volatile unsigned short *)portp = *buf++;
- }
-}
-
-void _outsl(unsigned int port, const void *addr, unsigned long count)
-{
- const unsigned long *buf = addr;
- unsigned char *portp;
-
- portp = PORT2ADDR(port);
- while (count--)
- *(volatile unsigned long *)portp = *buf++;
-}
diff --git a/arch/m32r/kernel/io_opsput.c b/arch/m32r/kernel/io_opsput.c
deleted file mode 100644
index 3cbb1f717e50..000000000000
--- a/arch/m32r/kernel/io_opsput.c
+++ /dev/null
@@ -1,395 +0,0 @@
-/*
- * linux/arch/m32r/kernel/io_opsput.c
- *
- * Typical I/O routines for OPSPUT board.
- *
- * Copyright (c) 2001-2005 Hiroyuki Kondo, Hirokazu Takata,
- * Hitoshi Yamamoto, Takeo Takahashi
- *
- * This file is subject to the terms and conditions of the GNU General
- * Public License. See the file "COPYING" in the main directory of this
- * archive for more details.
- */
-
-#include <asm/m32r.h>
-#include <asm/page.h>
-#include <asm/io.h>
-#include <asm/byteorder.h>
-
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
-#include <linux/types.h>
-
-#define M32R_PCC_IOMAP_SIZE 0x1000
-
-#define M32R_PCC_IOSTART0 0x1000
-#define M32R_PCC_IOEND0 (M32R_PCC_IOSTART0 + M32R_PCC_IOMAP_SIZE - 1)
-
-extern void pcc_ioread_byte(int, unsigned long, void *, size_t, size_t, int);
-extern void pcc_ioread_word(int, unsigned long, void *, size_t, size_t, int);
-extern void pcc_iowrite_byte(int, unsigned long, void *, size_t, size_t, int);
-extern void pcc_iowrite_word(int, unsigned long, void *, size_t, size_t, int);
-#endif /* CONFIG_PCMCIA && CONFIG_M32R_CFC */
-
-#define PORT2ADDR(port) _port2addr(port)
-#define PORT2ADDR_USB(port) _port2addr_usb(port)
-
-static inline void *_port2addr(unsigned long port)
-{
- return (void *)(port | NONCACHE_OFFSET);
-}
-
-#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
-static inline void *__port2addr_ata(unsigned long port)
-{
- static int dummy_reg;
-
- switch (port) {
- case 0x1f0: return (void *)(0x0c002000 | NONCACHE_OFFSET);
- case 0x1f1: return (void *)(0x0c012800 | NONCACHE_OFFSET);
- case 0x1f2: return (void *)(0x0c012002 | NONCACHE_OFFSET);
- case 0x1f3: return (void *)(0x0c012802 | NONCACHE_OFFSET);
- case 0x1f4: return (void *)(0x0c012004 | NONCACHE_OFFSET);
- case 0x1f5: return (void *)(0x0c012804 | NONCACHE_OFFSET);
- case 0x1f6: return (void *)(0x0c012006 | NONCACHE_OFFSET);
- case 0x1f7: return (void *)(0x0c012806 | NONCACHE_OFFSET);
- case 0x3f6: return (void *)(0x0c01200e | NONCACHE_OFFSET);
- default: return (void *)&dummy_reg;
- }
-}
-#endif
-
-/*
- * OPSPUT-LAN is located in the extended bus space
- * from 0x10000000 to 0x13ffffff on physical address.
- * The base address of LAN controller(LAN91C111) is 0x300.
- */
-#define LAN_IOSTART (0x300 | NONCACHE_OFFSET)
-#define LAN_IOEND (0x320 | NONCACHE_OFFSET)
-static inline void *_port2addr_ne(unsigned long port)
-{
- return (void *)(port + 0x10000000);
-}
-static inline void *_port2addr_usb(unsigned long port)
-{
- return (void *)((port & 0x0f) + NONCACHE_OFFSET + 0x10303000);
-}
-
-static inline void delay(void)
-{
- __asm__ __volatile__ ("push r0; \n\t pop r0;" : : :"memory");
-}
-
-/*
- * NIC I/O function
- */
-
-#define PORT2ADDR_NE(port) _port2addr_ne(port)
-
-static inline unsigned char _ne_inb(void *portp)
-{
- return *(volatile unsigned char *)portp;
-}
-
-static inline unsigned short _ne_inw(void *portp)
-{
- return (unsigned short)le16_to_cpu(*(volatile unsigned short *)portp);
-}
-
-static inline void _ne_insb(void *portp, void *addr, unsigned long count)
-{
- unsigned char *buf = (unsigned char *)addr;
-
- while (count--)
- *buf++ = _ne_inb(portp);
-}
-
-static inline void _ne_outb(unsigned char b, void *portp)
-{
- *(volatile unsigned char *)portp = b;
-}
-
-static inline void _ne_outw(unsigned short w, void *portp)
-{
- *(volatile unsigned short *)portp = cpu_to_le16(w);
-}
-
-unsigned char _inb(unsigned long port)
-{
- if (port >= LAN_IOSTART && port < LAN_IOEND)
- return _ne_inb(PORT2ADDR_NE(port));
-
-#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
- else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
- return *(volatile unsigned char *)__port2addr_ata(port);
- }
-#endif
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
- else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- unsigned char b;
- pcc_ioread_byte(0, port, &b, sizeof(b), 1, 0);
- return b;
- } else
-#endif
-
- return *(volatile unsigned char *)PORT2ADDR(port);
-}
-
-unsigned short _inw(unsigned long port)
-{
- if (port >= LAN_IOSTART && port < LAN_IOEND)
- return _ne_inw(PORT2ADDR_NE(port));
-#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
- else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
- return *(volatile unsigned short *)__port2addr_ata(port);
- }
-#endif
-#if defined(CONFIG_USB)
- else if(port >= 0x340 && port < 0x3a0)
- return *(volatile unsigned short *)PORT2ADDR_USB(port);
-#endif
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
- else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- unsigned short w;
- pcc_ioread_word(0, port, &w, sizeof(w), 1, 0);
- return w;
- } else
-#endif
- return *(volatile unsigned short *)PORT2ADDR(port);
-}
-
-unsigned long _inl(unsigned long port)
-{
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
- if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- unsigned long l;
- pcc_ioread_word(0, port, &l, sizeof(l), 1, 0);
- return l;
- } else
-#endif
- return *(volatile unsigned long *)PORT2ADDR(port);
-}
-
-unsigned char _inb_p(unsigned long port)
-{
- unsigned char v = _inb(port);
- delay();
- return (v);
-}
-
-unsigned short _inw_p(unsigned long port)
-{
- unsigned short v = _inw(port);
- delay();
- return (v);
-}
-
-unsigned long _inl_p(unsigned long port)
-{
- unsigned long v = _inl(port);
- delay();
- return (v);
-}
-
-void _outb(unsigned char b, unsigned long port)
-{
- if (port >= LAN_IOSTART && port < LAN_IOEND)
- _ne_outb(b, PORT2ADDR_NE(port));
- else
-#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
- if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
- *(volatile unsigned char *)__port2addr_ata(port) = b;
- } else
-#endif
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
- if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- pcc_iowrite_byte(0, port, &b, sizeof(b), 1, 0);
- } else
-#endif
- *(volatile unsigned char *)PORT2ADDR(port) = b;
-}
-
-void _outw(unsigned short w, unsigned long port)
-{
- if (port >= LAN_IOSTART && port < LAN_IOEND)
- _ne_outw(w, PORT2ADDR_NE(port));
- else
-#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
- if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
- *(volatile unsigned short *)__port2addr_ata(port) = w;
- } else
-#endif
-#if defined(CONFIG_USB)
- if(port >= 0x340 && port < 0x3a0)
- *(volatile unsigned short *)PORT2ADDR_USB(port) = w;
- else
-#endif
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
- if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- pcc_iowrite_word(0, port, &w, sizeof(w), 1, 0);
- } else
-#endif
- *(volatile unsigned short *)PORT2ADDR(port) = w;
-}
-
-void _outl(unsigned long l, unsigned long port)
-{
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
- if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- pcc_iowrite_word(0, port, &l, sizeof(l), 1, 0);
- } else
-#endif
- *(volatile unsigned long *)PORT2ADDR(port) = l;
-}
-
-void _outb_p(unsigned char b, unsigned long port)
-{
- _outb(b, port);
- delay();
-}
-
-void _outw_p(unsigned short w, unsigned long port)
-{
- _outw(w, port);
- delay();
-}
-
-void _outl_p(unsigned long l, unsigned long port)
-{
- _outl(l, port);
- delay();
-}
-
-void _insb(unsigned int port, void *addr, unsigned long count)
-{
- if (port >= LAN_IOSTART && port < LAN_IOEND)
- _ne_insb(PORT2ADDR_NE(port), addr, count);
-#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
- else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
- unsigned char *buf = addr;
- unsigned char *portp = __port2addr_ata(port);
- while (count--)
- *buf++ = *(volatile unsigned char *)portp;
- }
-#endif
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
- else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- pcc_ioread_byte(0, port, (void *)addr, sizeof(unsigned char),
- count, 1);
- }
-#endif
- else {
- unsigned char *buf = addr;
- unsigned char *portp = PORT2ADDR(port);
- while (count--)
- *buf++ = *(volatile unsigned char *)portp;
- }
-}
-
-void _insw(unsigned int port, void *addr, unsigned long count)
-{
- unsigned short *buf = addr;
- unsigned short *portp;
-
- if (port >= LAN_IOSTART && port < LAN_IOEND) {
- /*
- * This portion is only used by smc91111.c to read data
- * from the DATA_REG. Do not swap the data.
- */
- portp = PORT2ADDR_NE(port);
- while (count--)
- *buf++ = *(volatile unsigned short *)portp;
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
- } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- pcc_ioread_word(9, port, (void *)addr, sizeof(unsigned short),
- count, 1);
-#endif
-#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
- } else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
- portp = __port2addr_ata(port);
- while (count--)
- *buf++ = *(volatile unsigned short *)portp;
-#endif
- } else {
- portp = PORT2ADDR(port);
- while (count--)
- *buf++ = *(volatile unsigned short *)portp;
- }
-}
-
-void _insl(unsigned int port, void *addr, unsigned long count)
-{
- unsigned long *buf = addr;
- unsigned long *portp;
-
- portp = PORT2ADDR(port);
- while (count--)
- *buf++ = *(volatile unsigned long *)portp;
-}
-
-void _outsb(unsigned int port, const void *addr, unsigned long count)
-{
- const unsigned char *buf = addr;
- unsigned char *portp;
-
- if (port >= LAN_IOSTART && port < LAN_IOEND) {
- portp = PORT2ADDR_NE(port);
- while (count--)
- _ne_outb(*buf++, portp);
-#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
- } else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
- portp = __port2addr_ata(port);
- while (count--)
- *(volatile unsigned char *)portp = *buf++;
-#endif
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
- } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- pcc_iowrite_byte(0, port, (void *)addr, sizeof(unsigned char),
- count, 1);
-#endif
- } else {
- portp = PORT2ADDR(port);
- while (count--)
- *(volatile unsigned char *)portp = *buf++;
- }
-}
-
-void _outsw(unsigned int port, const void *addr, unsigned long count)
-{
- const unsigned short *buf = addr;
- unsigned short *portp;
-
- if (port >= LAN_IOSTART && port < LAN_IOEND) {
- /*
- * This portion is only used by smc91111.c to write data
- * into the DATA_REG. Do not swap the data.
- */
- portp = PORT2ADDR_NE(port);
- while (count--)
- *(volatile unsigned short *)portp = *buf++;
-#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
- } else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
- portp = __port2addr_ata(port);
- while (count--)
- *(volatile unsigned short *)portp = *buf++;
-#endif
-#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC)
- } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) {
- pcc_iowrite_word(9, port, (void *)addr, sizeof(unsigned short),
- count, 1);
-#endif
- } else {
- portp = PORT2ADDR(port);
- while (count--)
- *(volatile unsigned short *)portp = *buf++;
- }
-}
-
-void _outsl(unsigned int port, const void *addr, unsigned long count)
-{
- const unsigned long *buf = addr;
- unsigned char *portp;
-
- portp = PORT2ADDR(port);
- while (count--)
- *(volatile unsigned long *)portp = *buf++;
-}
diff --git a/arch/m32r/kernel/io_usrv.c b/arch/m32r/kernel/io_usrv.c
deleted file mode 100644
index a8c0e2eceb4d..000000000000
--- a/arch/m32r/kernel/io_usrv.c
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- * linux/arch/m32r/kernel/io_usrv.c
- *
- * Typical I/O routines for uServer board.
- *
- * Copyright (c) 2001-2005 Hiroyuki Kondo, Hirokazu Takata,
- * Hitoshi Yamamoto, Takeo Takahashi
- *
- * This file is subject to the terms and conditions of the GNU General
- * Public License. See the file "COPYING" in the main directory of this
- * archive for more details.
- *
- */
-
-#include <asm/m32r.h>
-#include <asm/page.h>
-#include <asm/io.h>
-
-#include <linux/types.h>
-#include "../drivers/m32r_cfc.h"
-
-extern void pcc_ioread_byte(int, unsigned long, void *, size_t, size_t, int);
-extern void pcc_ioread_word(int, unsigned long, void *, size_t, size_t, int);
-extern void pcc_iowrite_byte(int, unsigned long, void *, size_t, size_t, int);
-extern void pcc_iowrite_word(int, unsigned long, void *, size_t, size_t, int);
-#define CFC_IOSTART CFC_IOPORT_BASE
-#define CFC_IOEND (CFC_IOSTART + (M32R_PCC_MAPSIZE * M32R_MAX_PCC) - 1)
-
-#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE)
-#define UART0_REGSTART 0x04c20000
-#define UART1_REGSTART 0x04c20100
-#define UART_IOMAP_SIZE 8
-#define UART0_IOSTART 0x3f8
-#define UART0_IOEND (UART0_IOSTART + UART_IOMAP_SIZE - 1)
-#define UART1_IOSTART 0x2f8
-#define UART1_IOEND (UART1_IOSTART + UART_IOMAP_SIZE - 1)
-#endif /* CONFIG_SERIAL_8250 || CONFIG_SERIAL_8250_MODULE */
-
-#define PORT2ADDR(port) _port2addr(port)
-
-static inline void *_port2addr(unsigned long port)
-{
-#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE)
- if (port >= UART0_IOSTART && port <= UART0_IOEND)
- port = ((port - UART0_IOSTART) << 1) + UART0_REGSTART;
- else if (port >= UART1_IOSTART && port <= UART1_IOEND)
- port = ((port - UART1_IOSTART) << 1) + UART1_REGSTART;
-#endif /* CONFIG_SERIAL_8250 || CONFIG_SERIAL_8250_MODULE */
- return (void *)(port | (NONCACHE_OFFSET));
-}
-
-static inline void delay(void)
-{
- __asm__ __volatile__ ("push r0; \n\t pop r0;" : : :"memory");
-}
-
-unsigned char _inb(unsigned long port)
-{
- if (port >= CFC_IOSTART && port <= CFC_IOEND) {
- unsigned char b;
- pcc_ioread_byte(0, port, &b, sizeof(b), 1, 0);
- return b;
- } else
- return *(volatile unsigned char *)PORT2ADDR(port);
-}
-
-unsigned short _inw(unsigned long port)
-{
- if (port >= CFC_IOSTART && port <= CFC_IOEND) {
- unsigned short w;
- pcc_ioread_word(0, port, &w, sizeof(w), 1, 0);
- return w;
- } else
- return *(volatile unsigned short *)PORT2ADDR(port);
-}
-
-unsigned long _inl(unsigned long port)
-{
- if (port >= CFC_IOSTART && port <= CFC_IOEND) {
- unsigned long l;
- pcc_ioread_word(0, port, &l, sizeof(l), 1, 0);
- return l;
- } else
- return *(volatile unsigned long *)PORT2ADDR(port);
-}
-
-unsigned char _inb_p(unsigned long port)
-{
- unsigned char v = _inb(port);
- delay();
- return v;
-}
-
-unsigned short _inw_p(unsigned long port)
-{
- unsigned short v = _inw(port);
- delay();
- return v;
-}
-
-unsigned long _inl_p(unsigned long port)
-{
- unsigned long v = _inl(port);
- delay();
- return v;
-}
-
-void _outb(unsigned char b, unsigned long port)
-{
- if (port >= CFC_IOSTART && port <= CFC_IOEND)
- pcc_iowrite_byte(0, port, &b, sizeof(b), 1, 0);
- else
- *(volatile unsigned char *)PORT2ADDR(port) = b;
-}
-
-void _outw(unsigned short w, unsigned long port)
-{
- if (port >= CFC_IOSTART && port <= CFC_IOEND)
- pcc_iowrite_word(0, port, &w, sizeof(w), 1, 0);
- else
- *(volatile unsigned short *)PORT2ADDR(port) = w;
-}
-
-void _outl(unsigned long l, unsigned long port)
-{
- if (port >= CFC_IOSTART && port <= CFC_IOEND)
- pcc_iowrite_word(0, port, &l, sizeof(l), 1, 0);
- else
- *(volatile unsigned long *)PORT2ADDR(port) = l;
-}
-
-void _outb_p(unsigned char b, unsigned long port)
-{
- _outb(b, port);
- delay();
-}
-
-void _outw_p(unsigned short w, unsigned long port)
-{
- _outw(w, port);
- delay();
-}
-
-void _outl_p(unsigned long l, unsigned long port)
-{
- _outl(l, port);
- delay();
-}
-
-void _insb(unsigned int port, void * addr, unsigned long count)
-{
- if (port >= CFC_IOSTART && port <= CFC_IOEND)
- pcc_ioread_byte(0, port, addr, sizeof(unsigned char), count, 1);
- else {
- unsigned char *buf = addr;
- unsigned char *portp = PORT2ADDR(port);
- while (count--)
- *buf++ = *(volatile unsigned char *)portp;
- }
-}
-
-void _insw(unsigned int port, void * addr, unsigned long count)
-{
- unsigned short *buf = addr;
- unsigned short *portp;
-
- if (port >= CFC_IOSTART && port <= CFC_IOEND)
- pcc_ioread_word(0, port, addr, sizeof(unsigned short), count,
- 1);
- else {
- portp = PORT2ADDR(port);
- while (count--)
- *buf++ = *(volatile unsigned short *)portp;
- }
-}
-
-void _insl(unsigned int port, void * addr, unsigned long count)
-{
- unsigned long *buf = addr;
- unsigned long *portp;
-
- portp = PORT2ADDR(port);
- while (count--)
- *buf++ = *(volatile unsigned long *)portp;
-}
-
-void _outsb(unsigned int port, const void * addr, unsigned long count)
-{
- const unsigned char *buf = addr;
- unsigned char *portp;
-
- if (port >= CFC_IOSTART && port <= CFC_IOEND)
- pcc_iowrite_byte(0, port, (void *)addr, sizeof(unsigned char),
- count, 1);
- else {
- portp = PORT2ADDR(port);
- while (count--)
- *(volatile unsigned char *)portp = *buf++;
- }
-}
-
-void _outsw(unsigned int port, const void * addr, unsigned long count)
-{
- const unsigned short *buf = addr;
- unsigned short *portp;
-
- if (port >= CFC_IOSTART && port <= CFC_IOEND)
- pcc_iowrite_word(0, port, (void *)addr, sizeof(unsigned short),
- count, 1);
- else {
- portp = PORT2ADDR(port);
- while (count--)
- *(volatile unsigned short *)portp = *buf++;
- }
-}
-
-void _outsl(unsigned int port, const void * addr, unsigned long count)
-{
- const unsigned long *buf = addr;
- unsigned char *portp;
-
- portp = PORT2ADDR(port);
- while (count--)
- *(volatile unsigned long *)portp = *buf++;
-}
diff --git a/arch/m32r/kernel/setup_m32104ut.c b/arch/m32r/kernel/setup_m32104ut.c
deleted file mode 100644
index 1692b321f476..000000000000
--- a/arch/m32r/kernel/setup_m32104ut.c
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * linux/arch/m32r/kernel/setup_m32104ut.c
- *
- * Setup routines for M32104UT Board
- *
- * Copyright (c) 2002-2005 Hiroyuki Kondo, Hirokazu Takata,
- * Hitoshi Yamamoto, Mamoru Sakugawa,
- * Naoto Sugai, Hayato Fujiwara
- */
-
-#include <linux/irq.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/device.h>
-
-#include <asm/system.h>
-#include <asm/m32r.h>
-#include <asm/io.h>
-
-#define irq2port(x) (M32R_ICU_CR1_PORTL + ((x - 1) * sizeof(unsigned long)))
-
-icu_data_t icu_data[NR_IRQS];
-
-static void disable_m32104ut_irq(unsigned int irq)
-{
- unsigned long port, data;
-
- port = irq2port(irq);
- data = icu_data[irq].icucr|M32R_ICUCR_ILEVEL7;
- outl(data, port);
-}
-
-static void enable_m32104ut_irq(unsigned int irq)
-{
- unsigned long port, data;
-
- port = irq2port(irq);
- data = icu_data[irq].icucr|M32R_ICUCR_IEN|M32R_ICUCR_ILEVEL6;
- outl(data, port);
-}
-
-static void mask_and_ack_m32104ut(unsigned int irq)
-{
- disable_m32104ut_irq(irq);
-}
-
-static void end_m32104ut_irq(unsigned int irq)
-{
- enable_m32104ut_irq(irq);
-}
-
-static unsigned int startup_m32104ut_irq(unsigned int irq)
-{
- enable_m32104ut_irq(irq);
- return (0);
-}
-
-static void shutdown_m32104ut_irq(unsigned int irq)
-{
- unsigned long port;
-
- port = irq2port(irq);
- outl(M32R_ICUCR_ILEVEL7, port);
-}
-
-static struct hw_interrupt_type m32104ut_irq_type =
-{
- .typename = "M32104UT-IRQ",
- .startup = startup_m32104ut_irq,
- .shutdown = shutdown_m32104ut_irq,
- .enable = enable_m32104ut_irq,
- .disable = disable_m32104ut_irq,
- .ack = mask_and_ack_m32104ut,
- .end = end_m32104ut_irq
-};
-
-void __init init_IRQ(void)
-{
- static int once = 0;
-
- if (once)
- return;
- else
- once++;
-
-#if defined(CONFIG_SMC91X)
- /* INT#0: LAN controller on M32104UT-LAN (SMC91C111)*/
- irq_desc[M32R_IRQ_INT0].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_INT0].chip = &m32104ut_irq_type;
- irq_desc[M32R_IRQ_INT0].action = 0;
- irq_desc[M32R_IRQ_INT0].depth = 1;
- icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD11; /* "H" level sense */
- disable_m32104ut_irq(M32R_IRQ_INT0);
-#endif /* CONFIG_SMC91X */
-
- /* MFT2 : system timer */
- irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_MFT2].chip = &m32104ut_irq_type;
- irq_desc[M32R_IRQ_MFT2].action = 0;
- irq_desc[M32R_IRQ_MFT2].depth = 1;
- icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN;
- disable_m32104ut_irq(M32R_IRQ_MFT2);
-
-#ifdef CONFIG_SERIAL_M32R_SIO
- /* SIO0_R : uart receive data */
- irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_SIO0_R].chip = &m32104ut_irq_type;
- irq_desc[M32R_IRQ_SIO0_R].action = 0;
- irq_desc[M32R_IRQ_SIO0_R].depth = 1;
- icu_data[M32R_IRQ_SIO0_R].icucr = M32R_ICUCR_IEN;
- disable_m32104ut_irq(M32R_IRQ_SIO0_R);
-
- /* SIO0_S : uart send data */
- irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_SIO0_S].chip = &m32104ut_irq_type;
- irq_desc[M32R_IRQ_SIO0_S].action = 0;
- irq_desc[M32R_IRQ_SIO0_S].depth = 1;
- icu_data[M32R_IRQ_SIO0_S].icucr = M32R_ICUCR_IEN;
- disable_m32104ut_irq(M32R_IRQ_SIO0_S);
-#endif /* CONFIG_SERIAL_M32R_SIO */
-}
-
-#if defined(CONFIG_SMC91X)
-
-#define LAN_IOSTART 0x300
-#define LAN_IOEND 0x320
-static struct resource smc91x_resources[] = {
- [0] = {
- .start = (LAN_IOSTART),
- .end = (LAN_IOEND),
- .flags = IORESOURCE_MEM,
- },
- [1] = {
- .start = M32R_IRQ_INT0,
- .end = M32R_IRQ_INT0,
- .flags = IORESOURCE_IRQ,
- }
-};
-
-static struct platform_device smc91x_device = {
- .name = "smc91x",
- .id = 0,
- .num_resources = ARRAY_SIZE(smc91x_resources),
- .resource = smc91x_resources,
-};
-#endif
-
-static int __init platform_init(void)
-{
-#if defined(CONFIG_SMC91X)
- platform_device_register(&smc91x_device);
-#endif
- return 0;
-}
-arch_initcall(platform_init);
diff --git a/arch/m32r/kernel/setup_m32700ut.c b/arch/m32r/kernel/setup_m32700ut.c
deleted file mode 100644
index 7efc145c74c2..000000000000
--- a/arch/m32r/kernel/setup_m32700ut.c
+++ /dev/null
@@ -1,518 +0,0 @@
-/*
- * linux/arch/m32r/kernel/setup_m32700ut.c
- *
- * Setup routines for Renesas M32700UT Board
- *
- * Copyright (c) 2002-2005 Hiroyuki Kondo, Hirokazu Takata,
- * Hitoshi Yamamoto, Takeo Takahashi
- *
- * This file is subject to the terms and conditions of the GNU General
- * Public License. See the file "COPYING" in the main directory of this
- * archive for more details.
- */
-
-#include <linux/irq.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/platform_device.h>
-
-#include <asm/system.h>
-#include <asm/m32r.h>
-#include <asm/io.h>
-
-/*
- * M32700 Interrupt Control Unit (Level 1)
- */
-#define irq2port(x) (M32R_ICU_CR1_PORTL + ((x - 1) * sizeof(unsigned long)))
-
-icu_data_t icu_data[M32700UT_NUM_CPU_IRQ];
-
-static void disable_m32700ut_irq(unsigned int irq)
-{
- unsigned long port, data;
-
- port = irq2port(irq);
- data = icu_data[irq].icucr|M32R_ICUCR_ILEVEL7;
- outl(data, port);
-}
-
-static void enable_m32700ut_irq(unsigned int irq)
-{
- unsigned long port, data;
-
- port = irq2port(irq);
- data = icu_data[irq].icucr|M32R_ICUCR_IEN|M32R_ICUCR_ILEVEL6;
- outl(data, port);
-}
-
-static void mask_and_ack_m32700ut(unsigned int irq)
-{
- disable_m32700ut_irq(irq);
-}
-
-static void end_m32700ut_irq(unsigned int irq)
-{
- enable_m32700ut_irq(irq);
-}
-
-static unsigned int startup_m32700ut_irq(unsigned int irq)
-{
- enable_m32700ut_irq(irq);
- return (0);
-}
-
-static void shutdown_m32700ut_irq(unsigned int irq)
-{
- unsigned long port;
-
- port = irq2port(irq);
- outl(M32R_ICUCR_ILEVEL7, port);
-}
-
-static struct hw_interrupt_type m32700ut_irq_type =
-{
- .typename = "M32700UT-IRQ",
- .startup = startup_m32700ut_irq,
- .shutdown = shutdown_m32700ut_irq,
- .enable = enable_m32700ut_irq,
- .disable = disable_m32700ut_irq,
- .ack = mask_and_ack_m32700ut,
- .end = end_m32700ut_irq
-};
-
-/*
- * Interrupt Control Unit of PLD on M32700UT (Level 2)
- */
-#define irq2pldirq(x) ((x) - M32700UT_PLD_IRQ_BASE)
-#define pldirq2port(x) (unsigned long)((int)PLD_ICUCR1 + \
- (((x) - 1) * sizeof(unsigned short)))
-
-typedef struct {
- unsigned short icucr; /* ICU Control Register */
-} pld_icu_data_t;
-
-static pld_icu_data_t pld_icu_data[M32700UT_NUM_PLD_IRQ];
-
-static void disable_m32700ut_pld_irq(unsigned int irq)
-{
- unsigned long port, data;
- unsigned int pldirq;
-
- pldirq = irq2pldirq(irq);
-// disable_m32700ut_irq(M32R_IRQ_INT1);
- port = pldirq2port(pldirq);
- data = pld_icu_data[pldirq].icucr|PLD_ICUCR_ILEVEL7;
- outw(data, port);
-}
-
-static void enable_m32700ut_pld_irq(unsigned int irq)
-{
- unsigned long port, data;
- unsigned int pldirq;
-
- pldirq = irq2pldirq(irq);
-// enable_m32700ut_irq(M32R_IRQ_INT1);
- port = pldirq2port(pldirq);
- data = pld_icu_data[pldirq].icucr|PLD_ICUCR_IEN|PLD_ICUCR_ILEVEL6;
- outw(data, port);
-}
-
-static void mask_and_ack_m32700ut_pld(unsigned int irq)
-{
- disable_m32700ut_pld_irq(irq);
-// mask_and_ack_m32700ut(M32R_IRQ_INT1);
-}
-
-static void end_m32700ut_pld_irq(unsigned int irq)
-{
- enable_m32700ut_pld_irq(irq);
- end_m32700ut_irq(M32R_IRQ_INT1);
-}
-
-static unsigned int startup_m32700ut_pld_irq(unsigned int irq)
-{
- enable_m32700ut_pld_irq(irq);
- return (0);
-}
-
-static void shutdown_m32700ut_pld_irq(unsigned int irq)
-{
- unsigned long port;
- unsigned int pldirq;
-
- pldirq = irq2pldirq(irq);
-// shutdown_m32700ut_irq(M32R_IRQ_INT1);
- port = pldirq2port(pldirq);
- outw(PLD_ICUCR_ILEVEL7, port);
-}
-
-static struct hw_interrupt_type m32700ut_pld_irq_type =
-{
- .typename = "M32700UT-PLD-IRQ",
- .startup = startup_m32700ut_pld_irq,
- .shutdown = shutdown_m32700ut_pld_irq,
- .enable = enable_m32700ut_pld_irq,
- .disable = disable_m32700ut_pld_irq,
- .ack = mask_and_ack_m32700ut_pld,
- .end = end_m32700ut_pld_irq
-};
-
-/*
- * Interrupt Control Unit of PLD on M32700UT-LAN (Level 2)
- */
-#define irq2lanpldirq(x) ((x) - M32700UT_LAN_PLD_IRQ_BASE)
-#define lanpldirq2port(x) (unsigned long)((int)M32700UT_LAN_ICUCR1 + \
- (((x) - 1) * sizeof(unsigned short)))
-
-static pld_icu_data_t lanpld_icu_data[M32700UT_NUM_LAN_PLD_IRQ];
-
-static void disable_m32700ut_lanpld_irq(unsigned int irq)
-{
- unsigned long port, data;
- unsigned int pldirq;
-
- pldirq = irq2lanpldirq(irq);
- port = lanpldirq2port(pldirq);
- data = lanpld_icu_data[pldirq].icucr|PLD_ICUCR_ILEVEL7;
- outw(data, port);
-}
-
-static void enable_m32700ut_lanpld_irq(unsigned int irq)
-{
- unsigned long port, data;
- unsigned int pldirq;
-
- pldirq = irq2lanpldirq(irq);
- port = lanpldirq2port(pldirq);
- data = lanpld_icu_data[pldirq].icucr|PLD_ICUCR_IEN|PLD_ICUCR_ILEVEL6;
- outw(data, port);
-}
-
-static void mask_and_ack_m32700ut_lanpld(unsigned int irq)
-{
- disable_m32700ut_lanpld_irq(irq);
-}
-
-static void end_m32700ut_lanpld_irq(unsigned int irq)
-{
- enable_m32700ut_lanpld_irq(irq);
- end_m32700ut_irq(M32R_IRQ_INT0);
-}
-
-static unsigned int startup_m32700ut_lanpld_irq(unsigned int irq)
-{
- enable_m32700ut_lanpld_irq(irq);
- return (0);
-}
-
-static void shutdown_m32700ut_lanpld_irq(unsigned int irq)
-{
- unsigned long port;
- unsigned int pldirq;
-
- pldirq = irq2lanpldirq(irq);
- port = lanpldirq2port(pldirq);
- outw(PLD_ICUCR_ILEVEL7, port);
-}
-
-static struct hw_interrupt_type m32700ut_lanpld_irq_type =
-{
- .typename = "M32700UT-PLD-LAN-IRQ",
- .startup = startup_m32700ut_lanpld_irq,
- .shutdown = shutdown_m32700ut_lanpld_irq,
- .enable = enable_m32700ut_lanpld_irq,
- .disable = disable_m32700ut_lanpld_irq,
- .ack = mask_and_ack_m32700ut_lanpld,
- .end = end_m32700ut_lanpld_irq
-};
-
-/*
- * Interrupt Control Unit of PLD on M32700UT-LCD (Level 2)
- */
-#define irq2lcdpldirq(x) ((x) - M32700UT_LCD_PLD_IRQ_BASE)
-#define lcdpldirq2port(x) (unsigned long)((int)M32700UT_LCD_ICUCR1 + \
- (((x) - 1) * sizeof(unsigned short)))
-
-static pld_icu_data_t lcdpld_icu_data[M32700UT_NUM_LCD_PLD_IRQ];
-
-static void disable_m32700ut_lcdpld_irq(unsigned int irq)
-{
- unsigned long port, data;
- unsigned int pldirq;
-
- pldirq = irq2lcdpldirq(irq);
- port = lcdpldirq2port(pldirq);
- data = lcdpld_icu_data[pldirq].icucr|PLD_ICUCR_ILEVEL7;
- outw(data, port);
-}
-
-static void enable_m32700ut_lcdpld_irq(unsigned int irq)
-{
- unsigned long port, data;
- unsigned int pldirq;
-
- pldirq = irq2lcdpldirq(irq);
- port = lcdpldirq2port(pldirq);
- data = lcdpld_icu_data[pldirq].icucr|PLD_ICUCR_IEN|PLD_ICUCR_ILEVEL6;
- outw(data, port);
-}
-
-static void mask_and_ack_m32700ut_lcdpld(unsigned int irq)
-{
- disable_m32700ut_lcdpld_irq(irq);
-}
-
-static void end_m32700ut_lcdpld_irq(unsigned int irq)
-{
- enable_m32700ut_lcdpld_irq(irq);
- end_m32700ut_irq(M32R_IRQ_INT2);
-}
-
-static unsigned int startup_m32700ut_lcdpld_irq(unsigned int irq)
-{
- enable_m32700ut_lcdpld_irq(irq);
- return (0);
-}
-
-static void shutdown_m32700ut_lcdpld_irq(unsigned int irq)
-{
- unsigned long port;
- unsigned int pldirq;
-
- pldirq = irq2lcdpldirq(irq);
- port = lcdpldirq2port(pldirq);
- outw(PLD_ICUCR_ILEVEL7, port);
-}
-
-static struct hw_interrupt_type m32700ut_lcdpld_irq_type =
-{
- .typename = "M32700UT-PLD-LCD-IRQ",
- .startup = startup_m32700ut_lcdpld_irq,
- .shutdown = shutdown_m32700ut_lcdpld_irq,
- .enable = enable_m32700ut_lcdpld_irq,
- .disable = disable_m32700ut_lcdpld_irq,
- .ack = mask_and_ack_m32700ut_lcdpld,
- .end = end_m32700ut_lcdpld_irq
-};
-
-void __init init_IRQ(void)
-{
-#if defined(CONFIG_SMC91X)
- /* INT#0: LAN controller on M32700UT-LAN (SMC91C111)*/
- irq_desc[M32700UT_LAN_IRQ_LAN].status = IRQ_DISABLED;
- irq_desc[M32700UT_LAN_IRQ_LAN].chip = &m32700ut_lanpld_irq_type;
- irq_desc[M32700UT_LAN_IRQ_LAN].action = 0;
- irq_desc[M32700UT_LAN_IRQ_LAN].depth = 1; /* disable nested irq */
- lanpld_icu_data[irq2lanpldirq(M32700UT_LAN_IRQ_LAN)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* "H" edge sense */
- disable_m32700ut_lanpld_irq(M32700UT_LAN_IRQ_LAN);
-#endif /* CONFIG_SMC91X */
-
- /* MFT2 : system timer */
- irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_MFT2].chip = &m32700ut_irq_type;
- irq_desc[M32R_IRQ_MFT2].action = 0;
- irq_desc[M32R_IRQ_MFT2].depth = 1;
- icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN;
- disable_m32700ut_irq(M32R_IRQ_MFT2);
-
- /* SIO0 : receive */
- irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_SIO0_R].chip = &m32700ut_irq_type;
- irq_desc[M32R_IRQ_SIO0_R].action = 0;
- irq_desc[M32R_IRQ_SIO0_R].depth = 1;
- icu_data[M32R_IRQ_SIO0_R].icucr = 0;
- disable_m32700ut_irq(M32R_IRQ_SIO0_R);
-
- /* SIO0 : send */
- irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_SIO0_S].chip = &m32700ut_irq_type;
- irq_desc[M32R_IRQ_SIO0_S].action = 0;
- irq_desc[M32R_IRQ_SIO0_S].depth = 1;
- icu_data[M32R_IRQ_SIO0_S].icucr = 0;
- disable_m32700ut_irq(M32R_IRQ_SIO0_S);
-
- /* SIO1 : receive */
- irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_SIO1_R].chip = &m32700ut_irq_type;
- irq_desc[M32R_IRQ_SIO1_R].action = 0;
- irq_desc[M32R_IRQ_SIO1_R].depth = 1;
- icu_data[M32R_IRQ_SIO1_R].icucr = 0;
- disable_m32700ut_irq(M32R_IRQ_SIO1_R);
-
- /* SIO1 : send */
- irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_SIO1_S].chip = &m32700ut_irq_type;
- irq_desc[M32R_IRQ_SIO1_S].action = 0;
- irq_desc[M32R_IRQ_SIO1_S].depth = 1;
- icu_data[M32R_IRQ_SIO1_S].icucr = 0;
- disable_m32700ut_irq(M32R_IRQ_SIO1_S);
-
- /* DMA1 : */
- irq_desc[M32R_IRQ_DMA1].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_DMA1].chip = &m32700ut_irq_type;
- irq_desc[M32R_IRQ_DMA1].action = 0;
- irq_desc[M32R_IRQ_DMA1].depth = 1;
- icu_data[M32R_IRQ_DMA1].icucr = 0;
- disable_m32700ut_irq(M32R_IRQ_DMA1);
-
-#ifdef CONFIG_SERIAL_M32R_PLDSIO
- /* INT#1: SIO0 Receive on PLD */
- irq_desc[PLD_IRQ_SIO0_RCV].status = IRQ_DISABLED;
- irq_desc[PLD_IRQ_SIO0_RCV].chip = &m32700ut_pld_irq_type;
- irq_desc[PLD_IRQ_SIO0_RCV].action = 0;
- irq_desc[PLD_IRQ_SIO0_RCV].depth = 1; /* disable nested irq */
- pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_RCV)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03;
- disable_m32700ut_pld_irq(PLD_IRQ_SIO0_RCV);
-
- /* INT#1: SIO0 Send on PLD */
- irq_desc[PLD_IRQ_SIO0_SND].status = IRQ_DISABLED;
- irq_desc[PLD_IRQ_SIO0_SND].chip = &m32700ut_pld_irq_type;
- irq_desc[PLD_IRQ_SIO0_SND].action = 0;
- irq_desc[PLD_IRQ_SIO0_SND].depth = 1; /* disable nested irq */
- pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_SND)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03;
- disable_m32700ut_pld_irq(PLD_IRQ_SIO0_SND);
-#endif /* CONFIG_SERIAL_M32R_PLDSIO */
-
- /* INT#1: CFC IREQ on PLD */
- irq_desc[PLD_IRQ_CFIREQ].status = IRQ_DISABLED;
- irq_desc[PLD_IRQ_CFIREQ].chip = &m32700ut_pld_irq_type;
- irq_desc[PLD_IRQ_CFIREQ].action = 0;
- irq_desc[PLD_IRQ_CFIREQ].depth = 1; /* disable nested irq */
- pld_icu_data[irq2pldirq(PLD_IRQ_CFIREQ)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* 'L' level sense */
- disable_m32700ut_pld_irq(PLD_IRQ_CFIREQ);
-
- /* INT#1: CFC Insert on PLD */
- irq_desc[PLD_IRQ_CFC_INSERT].status = IRQ_DISABLED;
- irq_desc[PLD_IRQ_CFC_INSERT].chip = &m32700ut_pld_irq_type;
- irq_desc[PLD_IRQ_CFC_INSERT].action = 0;
- irq_desc[PLD_IRQ_CFC_INSERT].depth = 1; /* disable nested irq */
- pld_icu_data[irq2pldirq(PLD_IRQ_CFC_INSERT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD00; /* 'L' edge sense */
- disable_m32700ut_pld_irq(PLD_IRQ_CFC_INSERT);
-
- /* INT#1: CFC Eject on PLD */
- irq_desc[PLD_IRQ_CFC_EJECT].status = IRQ_DISABLED;
- irq_desc[PLD_IRQ_CFC_EJECT].chip = &m32700ut_pld_irq_type;
- irq_desc[PLD_IRQ_CFC_EJECT].action = 0;
- irq_desc[PLD_IRQ_CFC_EJECT].depth = 1; /* disable nested irq */
- pld_icu_data[irq2pldirq(PLD_IRQ_CFC_EJECT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* 'H' edge sense */
- disable_m32700ut_pld_irq(PLD_IRQ_CFC_EJECT);
-
- /*
- * INT0# is used for LAN, DIO
- * We enable it here.
- */
- icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD11;
- enable_m32700ut_irq(M32R_IRQ_INT0);
-
- /*
- * INT1# is used for UART, MMC, CF Controller in FPGA.
- * We enable it here.
- */
- icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD11;
- enable_m32700ut_irq(M32R_IRQ_INT1);
-
-#if defined(CONFIG_USB)
- outw(USBCR_OTGS, USBCR); /* USBCR: non-OTG */
-
- irq_desc[M32700UT_LCD_IRQ_USB_INT1].status = IRQ_DISABLED;
- irq_desc[M32700UT_LCD_IRQ_USB_INT1].chip = &m32700ut_lcdpld_irq_type;
- irq_desc[M32700UT_LCD_IRQ_USB_INT1].action = 0;
- irq_desc[M32700UT_LCD_IRQ_USB_INT1].depth = 1;
- lcdpld_icu_data[irq2lcdpldirq(M32700UT_LCD_IRQ_USB_INT1)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* "L" level sense */
- disable_m32700ut_lcdpld_irq(M32700UT_LCD_IRQ_USB_INT1);
-#endif
- /*
- * INT2# is used for BAT, USB, AUDIO
- * We enable it here.
- */
- icu_data[M32R_IRQ_INT2].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD01;
- enable_m32700ut_irq(M32R_IRQ_INT2);
-
-#if defined(CONFIG_VIDEO_M32R_AR)
- /*
- * INT3# is used for AR
- */
- irq_desc[M32R_IRQ_INT3].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_INT3].chip = &m32700ut_irq_type;
- irq_desc[M32R_IRQ_INT3].action = 0;
- irq_desc[M32R_IRQ_INT3].depth = 1;
- icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10;
- disable_m32700ut_irq(M32R_IRQ_INT3);
-#endif /* CONFIG_VIDEO_M32R_AR */
-}
-
-#if defined(CONFIG_SMC91X)
-
-#define LAN_IOSTART 0x300
-#define LAN_IOEND 0x320
-static struct resource smc91x_resources[] = {
- [0] = {
- .start = (LAN_IOSTART),
- .end = (LAN_IOEND),
- .flags = IORESOURCE_MEM,
- },
- [1] = {
- .start = M32700UT_LAN_IRQ_LAN,
- .end = M32700UT_LAN_IRQ_LAN,
- .flags = IORESOURCE_IRQ,
- }
-};
-
-static struct platform_device smc91x_device = {
- .name = "smc91x",
- .id = 0,
- .num_resources = ARRAY_SIZE(smc91x_resources),
- .resource = smc91x_resources,
-};
-#endif
-
-#if defined(CONFIG_FB_S1D13XXX)
-
-#include <video/s1d13xxxfb.h>
-#include <asm/s1d13806.h>
-
-static struct s1d13xxxfb_pdata s1d13xxxfb_data = {
- .initregs = s1d13xxxfb_initregs,
- .initregssize = ARRAY_SIZE(s1d13xxxfb_initregs),
- .platform_init_video = NULL,
-#ifdef CONFIG_PM
- .platform_suspend_video = NULL,
- .platform_resume_video = NULL,
-#endif
-};
-
-static struct resource s1d13xxxfb_resources[] = {
- [0] = {
- .start = 0x10600000UL,
- .end = 0x1073FFFFUL,
- .flags = IORESOURCE_MEM,
- },
- [1] = {
- .start = 0x10400000UL,
- .end = 0x104001FFUL,
- .flags = IORESOURCE_MEM,
- }
-};
-
-static struct platform_device s1d13xxxfb_device = {
- .name = S1D_DEVICENAME,
- .id = 0,
- .dev = {
- .platform_data = &s1d13xxxfb_data,
- },
- .num_resources = ARRAY_SIZE(s1d13xxxfb_resources),
- .resource = s1d13xxxfb_resources,
-};
-#endif
-
-static int __init platform_init(void)
-{
-#if defined(CONFIG_SMC91X)
- platform_device_register(&smc91x_device);
-#endif
-#if defined(CONFIG_FB_S1D13XXX)
- platform_device_register(&s1d13xxxfb_device);
-#endif
- return 0;
-}
-arch_initcall(platform_init);
diff --git a/arch/m32r/kernel/setup_mappi.c b/arch/m32r/kernel/setup_mappi.c
deleted file mode 100644
index fe73c9ec611f..000000000000
--- a/arch/m32r/kernel/setup_mappi.c
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * linux/arch/m32r/kernel/setup_mappi.c
- *
- * Setup routines for Renesas MAPPI Board
- *
- * Copyright (c) 2001-2005 Hiroyuki Kondo, Hirokazu Takata,
- * Hitoshi Yamamoto
- */
-
-#include <linux/irq.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/platform_device.h>
-
-#include <asm/system.h>
-#include <asm/m32r.h>
-#include <asm/io.h>
-
-#define irq2port(x) (M32R_ICU_CR1_PORTL + ((x - 1) * sizeof(unsigned long)))
-
-icu_data_t icu_data[NR_IRQS];
-
-static void disable_mappi_irq(unsigned int irq)
-{
- unsigned long port, data;
-
- port = irq2port(irq);
- data = icu_data[irq].icucr|M32R_ICUCR_ILEVEL7;
- outl(data, port);
-}
-
-static void enable_mappi_irq(unsigned int irq)
-{
- unsigned long port, data;
-
- port = irq2port(irq);
- data = icu_data[irq].icucr|M32R_ICUCR_IEN|M32R_ICUCR_ILEVEL6;
- outl(data, port);
-}
-
-static void mask_and_ack_mappi(unsigned int irq)
-{
- disable_mappi_irq(irq);
-}
-
-static void end_mappi_irq(unsigned int irq)
-{
- if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS)))
- enable_mappi_irq(irq);
-}
-
-static unsigned int startup_mappi_irq(unsigned int irq)
-{
- enable_mappi_irq(irq);
- return (0);
-}
-
-static void shutdown_mappi_irq(unsigned int irq)
-{
- unsigned long port;
-
- port = irq2port(irq);
- outl(M32R_ICUCR_ILEVEL7, port);
-}
-
-static struct hw_interrupt_type mappi_irq_type =
-{
- .typename = "MAPPI-IRQ",
- .startup = startup_mappi_irq,
- .shutdown = shutdown_mappi_irq,
- .enable = enable_mappi_irq,
- .disable = disable_mappi_irq,
- .ack = mask_and_ack_mappi,
- .end = end_mappi_irq
-};
-
-void __init init_IRQ(void)
-{
- static int once = 0;
-
- if (once)
- return;
- else
- once++;
-
-#ifdef CONFIG_NE2000
- /* INT0 : LAN controller (RTL8019AS) */
- irq_desc[M32R_IRQ_INT0].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_INT0].chip = &mappi_irq_type;
- irq_desc[M32R_IRQ_INT0].action = NULL;
- irq_desc[M32R_IRQ_INT0].depth = 1;
- icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD11;
- disable_mappi_irq(M32R_IRQ_INT0);
-#endif /* CONFIG_M32R_NE2000 */
-
- /* MFT2 : system timer */
- irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_MFT2].chip = &mappi_irq_type;
- irq_desc[M32R_IRQ_MFT2].action = NULL;
- irq_desc[M32R_IRQ_MFT2].depth = 1;
- icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN;
- disable_mappi_irq(M32R_IRQ_MFT2);
-
-#ifdef CONFIG_SERIAL_M32R_SIO
- /* SIO0_R : uart receive data */
- irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_SIO0_R].chip = &mappi_irq_type;
- irq_desc[M32R_IRQ_SIO0_R].action = NULL;
- irq_desc[M32R_IRQ_SIO0_R].depth = 1;
- icu_data[M32R_IRQ_SIO0_R].icucr = 0;
- disable_mappi_irq(M32R_IRQ_SIO0_R);
-
- /* SIO0_S : uart send data */
- irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_SIO0_S].chip = &mappi_irq_type;
- irq_desc[M32R_IRQ_SIO0_S].action = NULL;
- irq_desc[M32R_IRQ_SIO0_S].depth = 1;
- icu_data[M32R_IRQ_SIO0_S].icucr = 0;
- disable_mappi_irq(M32R_IRQ_SIO0_S);
-
- /* SIO1_R : uart receive data */
- irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_SIO1_R].chip = &mappi_irq_type;
- irq_desc[M32R_IRQ_SIO1_R].action = NULL;
- irq_desc[M32R_IRQ_SIO1_R].depth = 1;
- icu_data[M32R_IRQ_SIO1_R].icucr = 0;
- disable_mappi_irq(M32R_IRQ_SIO1_R);
-
- /* SIO1_S : uart send data */
- irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_SIO1_S].chip = &mappi_irq_type;
- irq_desc[M32R_IRQ_SIO1_S].action = NULL;
- irq_desc[M32R_IRQ_SIO1_S].depth = 1;
- icu_data[M32R_IRQ_SIO1_S].icucr = 0;
- disable_mappi_irq(M32R_IRQ_SIO1_S);
-#endif /* CONFIG_SERIAL_M32R_SIO */
-
-#if defined(CONFIG_M32R_PCC)
- /* INT1 : pccard0 interrupt */
- irq_desc[M32R_IRQ_INT1].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_INT1].chip = &mappi_irq_type;
- irq_desc[M32R_IRQ_INT1].action = NULL;
- irq_desc[M32R_IRQ_INT1].depth = 1;
- icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD00;
- disable_mappi_irq(M32R_IRQ_INT1);
-
- /* INT2 : pccard1 interrupt */
- irq_desc[M32R_IRQ_INT2].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_INT2].chip = &mappi_irq_type;
- irq_desc[M32R_IRQ_INT2].action = NULL;
- irq_desc[M32R_IRQ_INT2].depth = 1;
- icu_data[M32R_IRQ_INT2].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD00;
- disable_mappi_irq(M32R_IRQ_INT2);
-#endif /* CONFIG_M32RPCC */
-}
-
-#if defined(CONFIG_FB_S1D13XXX)
-
-#include <video/s1d13xxxfb.h>
-#include <asm/s1d13806.h>
-
-static struct s1d13xxxfb_pdata s1d13xxxfb_data = {
- .initregs = s1d13xxxfb_initregs,
- .initregssize = ARRAY_SIZE(s1d13xxxfb_initregs),
- .platform_init_video = NULL,
-#ifdef CONFIG_PM
- .platform_suspend_video = NULL,
- .platform_resume_video = NULL,
-#endif
-};
-
-static struct resource s1d13xxxfb_resources[] = {
- [0] = {
- .start = 0x10200000UL,
- .end = 0x1033FFFFUL,
- .flags = IORESOURCE_MEM,
- },
- [1] = {
- .start = 0x10000000UL,
- .end = 0x100001FFUL,
- .flags = IORESOURCE_MEM,
- }
-};
-
-static struct platform_device s1d13xxxfb_device = {
- .name = S1D_DEVICENAME,
- .id = 0,
- .dev = {
- .platform_data = &s1d13xxxfb_data,
- },
- .num_resources = ARRAY_SIZE(s1d13xxxfb_resources),
- .resource = s1d13xxxfb_resources,
-};
-
-static int __init platform_init(void)
-{
- platform_device_register(&s1d13xxxfb_device);
- return 0;
-}
-arch_initcall(platform_init);
-#endif
diff --git a/arch/m32r/kernel/setup_mappi2.c b/arch/m32r/kernel/setup_mappi2.c
deleted file mode 100644
index 55abb2102750..000000000000
--- a/arch/m32r/kernel/setup_mappi2.c
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * linux/arch/m32r/kernel/setup_mappi2.c
- *
- * Setup routines for Renesas MAPPI-II(M3A-ZA36) Board
- *
- * Copyright (c) 2001-2005 Hiroyuki Kondo, Hirokazu Takata,
- * Hitoshi Yamamoto, Mamoru Sakugawa
- */
-
-#include <linux/irq.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/platform_device.h>
-
-#include <asm/system.h>
-#include <asm/m32r.h>
-#include <asm/io.h>
-
-#define irq2port(x) (M32R_ICU_CR1_PORTL + ((x - 1) * sizeof(unsigned long)))
-
-icu_data_t icu_data[NR_IRQS];
-
-static void disable_mappi2_irq(unsigned int irq)
-{
- unsigned long port, data;
-
- if ((irq == 0) ||(irq >= NR_IRQS)) {
- printk("bad irq 0x%08x\n", irq);
- return;
- }
- port = irq2port(irq);
- data = icu_data[irq].icucr|M32R_ICUCR_ILEVEL7;
- outl(data, port);
-}
-
-static void enable_mappi2_irq(unsigned int irq)
-{
- unsigned long port, data;
-
- if ((irq == 0) ||(irq >= NR_IRQS)) {
- printk("bad irq 0x%08x\n", irq);
- return;
- }
- port = irq2port(irq);
- data = icu_data[irq].icucr|M32R_ICUCR_IEN|M32R_ICUCR_ILEVEL6;
- outl(data, port);
-}
-
-static void mask_and_ack_mappi2(unsigned int irq)
-{
- disable_mappi2_irq(irq);
-}
-
-static void end_mappi2_irq(unsigned int irq)
-{
- enable_mappi2_irq(irq);
-}
-
-static unsigned int startup_mappi2_irq(unsigned int irq)
-{
- enable_mappi2_irq(irq);
- return (0);
-}
-
-static void shutdown_mappi2_irq(unsigned int irq)
-{
- unsigned long port;
-
- port = irq2port(irq);
- outl(M32R_ICUCR_ILEVEL7, port);
-}
-
-static struct hw_interrupt_type mappi2_irq_type =
-{
- .typename = "MAPPI2-IRQ",
- .startup = startup_mappi2_irq,
- .shutdown = shutdown_mappi2_irq,
- .enable = enable_mappi2_irq,
- .disable = disable_mappi2_irq,
- .ack = mask_and_ack_mappi2,
- .end = end_mappi2_irq
-};
-
-void __init init_IRQ(void)
-{
-#if defined(CONFIG_SMC91X)
- /* INT0 : LAN controller (SMC91111) */
- irq_desc[M32R_IRQ_INT0].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_INT0].chip = &mappi2_irq_type;
- irq_desc[M32R_IRQ_INT0].action = 0;
- irq_desc[M32R_IRQ_INT0].depth = 1;
- icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10;
- disable_mappi2_irq(M32R_IRQ_INT0);
-#endif /* CONFIG_SMC91X */
-
- /* MFT2 : system timer */
- irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_MFT2].chip = &mappi2_irq_type;
- irq_desc[M32R_IRQ_MFT2].action = 0;
- irq_desc[M32R_IRQ_MFT2].depth = 1;
- icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN;
- disable_mappi2_irq(M32R_IRQ_MFT2);
-
-#ifdef CONFIG_SERIAL_M32R_SIO
- /* SIO0_R : uart receive data */
- irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_SIO0_R].chip = &mappi2_irq_type;
- irq_desc[M32R_IRQ_SIO0_R].action = 0;
- irq_desc[M32R_IRQ_SIO0_R].depth = 1;
- icu_data[M32R_IRQ_SIO0_R].icucr = 0;
- disable_mappi2_irq(M32R_IRQ_SIO0_R);
-
- /* SIO0_S : uart send data */
- irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_SIO0_S].chip = &mappi2_irq_type;
- irq_desc[M32R_IRQ_SIO0_S].action = 0;
- irq_desc[M32R_IRQ_SIO0_S].depth = 1;
- icu_data[M32R_IRQ_SIO0_S].icucr = 0;
- disable_mappi2_irq(M32R_IRQ_SIO0_S);
- /* SIO1_R : uart receive data */
- irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_SIO1_R].chip = &mappi2_irq_type;
- irq_desc[M32R_IRQ_SIO1_R].action = 0;
- irq_desc[M32R_IRQ_SIO1_R].depth = 1;
- icu_data[M32R_IRQ_SIO1_R].icucr = 0;
- disable_mappi2_irq(M32R_IRQ_SIO1_R);
-
- /* SIO1_S : uart send data */
- irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_SIO1_S].chip = &mappi2_irq_type;
- irq_desc[M32R_IRQ_SIO1_S].action = 0;
- irq_desc[M32R_IRQ_SIO1_S].depth = 1;
- icu_data[M32R_IRQ_SIO1_S].icucr = 0;
- disable_mappi2_irq(M32R_IRQ_SIO1_S);
-#endif /* CONFIG_M32R_USE_DBG_CONSOLE */
-
-#if defined(CONFIG_USB)
- /* INT1 : USB Host controller interrupt */
- irq_desc[M32R_IRQ_INT1].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_INT1].chip = &mappi2_irq_type;
- irq_desc[M32R_IRQ_INT1].action = 0;
- irq_desc[M32R_IRQ_INT1].depth = 1;
- icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_ISMOD01;
- disable_mappi2_irq(M32R_IRQ_INT1);
-#endif /* CONFIG_USB */
-
- /* ICUCR40: CFC IREQ */
- irq_desc[PLD_IRQ_CFIREQ].status = IRQ_DISABLED;
- irq_desc[PLD_IRQ_CFIREQ].chip = &mappi2_irq_type;
- irq_desc[PLD_IRQ_CFIREQ].action = 0;
- irq_desc[PLD_IRQ_CFIREQ].depth = 1; /* disable nested irq */
- icu_data[PLD_IRQ_CFIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD01;
- disable_mappi2_irq(PLD_IRQ_CFIREQ);
-
-#if defined(CONFIG_M32R_CFC)
- /* ICUCR41: CFC Insert */
- irq_desc[PLD_IRQ_CFC_INSERT].status = IRQ_DISABLED;
- irq_desc[PLD_IRQ_CFC_INSERT].chip = &mappi2_irq_type;
- irq_desc[PLD_IRQ_CFC_INSERT].action = 0;
- irq_desc[PLD_IRQ_CFC_INSERT].depth = 1; /* disable nested irq */
- icu_data[PLD_IRQ_CFC_INSERT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD00;
- disable_mappi2_irq(PLD_IRQ_CFC_INSERT);
-
- /* ICUCR42: CFC Eject */
- irq_desc[PLD_IRQ_CFC_EJECT].status = IRQ_DISABLED;
- irq_desc[PLD_IRQ_CFC_EJECT].chip = &mappi2_irq_type;
- irq_desc[PLD_IRQ_CFC_EJECT].action = 0;
- irq_desc[PLD_IRQ_CFC_EJECT].depth = 1; /* disable nested irq */
- icu_data[PLD_IRQ_CFC_EJECT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10;
- disable_mappi2_irq(PLD_IRQ_CFC_EJECT);
-#endif /* CONFIG_MAPPI2_CFC */
-}
-
-#define LAN_IOSTART 0x300
-#define LAN_IOEND 0x320
-static struct resource smc91x_resources[] = {
- [0] = {
- .start = (LAN_IOSTART),
- .end = (LAN_IOEND),
- .flags = IORESOURCE_MEM,
- },
- [1] = {
- .start = M32R_IRQ_INT0,
- .end = M32R_IRQ_INT0,
- .flags = IORESOURCE_IRQ,
- }
-};
-
-static struct platform_device smc91x_device = {
- .name = "smc91x",
- .id = 0,
- .num_resources = ARRAY_SIZE(smc91x_resources),
- .resource = smc91x_resources,
-};
-
-static int __init platform_init(void)
-{
- platform_device_register(&smc91x_device);
- return 0;
-}
-arch_initcall(platform_init);
diff --git a/arch/m32r/kernel/setup_mappi3.c b/arch/m32r/kernel/setup_mappi3.c
deleted file mode 100644
index 93dc010c7fc3..000000000000
--- a/arch/m32r/kernel/setup_mappi3.c
+++ /dev/null
@@ -1,251 +0,0 @@
-/*
- * linux/arch/m32r/kernel/setup_mappi3.c
- *
- * Setup routines for Renesas MAPPI-III(M3A-2170) Board
- *
- * Copyright (c) 2001-2005 Hiroyuki Kondo, Hirokazu Takata,
- * Hitoshi Yamamoto, Mamoru Sakugawa
- */
-
-#include <linux/irq.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/platform_device.h>
-
-#include <asm/system.h>
-#include <asm/m32r.h>
-#include <asm/io.h>
-
-#define irq2port(x) (M32R_ICU_CR1_PORTL + ((x - 1) * sizeof(unsigned long)))
-
-icu_data_t icu_data[NR_IRQS];
-
-static void disable_mappi3_irq(unsigned int irq)
-{
- unsigned long port, data;
-
- if ((irq == 0) ||(irq >= NR_IRQS)) {
- printk("bad irq 0x%08x\n", irq);
- return;
- }
- port = irq2port(irq);
- data = icu_data[irq].icucr|M32R_ICUCR_ILEVEL7;
- outl(data, port);
-}
-
-static void enable_mappi3_irq(unsigned int irq)
-{
- unsigned long port, data;
-
- if ((irq == 0) ||(irq >= NR_IRQS)) {
- printk("bad irq 0x%08x\n", irq);
- return;
- }
- port = irq2port(irq);
- data = icu_data[irq].icucr|M32R_ICUCR_IEN|M32R_ICUCR_ILEVEL6;
- outl(data, port);
-}
-
-static void mask_and_ack_mappi3(unsigned int irq)
-{
- disable_mappi3_irq(irq);
-}
-
-static void end_mappi3_irq(unsigned int irq)
-{
- enable_mappi3_irq(irq);
-}
-
-static unsigned int startup_mappi3_irq(unsigned int irq)
-{
- enable_mappi3_irq(irq);
- return (0);
-}
-
-static void shutdown_mappi3_irq(unsigned int irq)
-{
- unsigned long port;
-
- port = irq2port(irq);
- outl(M32R_ICUCR_ILEVEL7, port);
-}
-
-static struct hw_interrupt_type mappi3_irq_type =
-{
- .typename = "MAPPI3-IRQ",
- .startup = startup_mappi3_irq,
- .shutdown = shutdown_mappi3_irq,
- .enable = enable_mappi3_irq,
- .disable = disable_mappi3_irq,
- .ack = mask_and_ack_mappi3,
- .end = end_mappi3_irq
-};
-
-void __init init_IRQ(void)
-{
-#if defined(CONFIG_SMC91X)
- /* INT0 : LAN controller (SMC91111) */
- irq_desc[M32R_IRQ_INT0].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_INT0].chip = &mappi3_irq_type;
- irq_desc[M32R_IRQ_INT0].action = 0;
- irq_desc[M32R_IRQ_INT0].depth = 1;
- icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10;
- disable_mappi3_irq(M32R_IRQ_INT0);
-#endif /* CONFIG_SMC91X */
-
- /* MFT2 : system timer */
- irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_MFT2].chip = &mappi3_irq_type;
- irq_desc[M32R_IRQ_MFT2].action = 0;
- irq_desc[M32R_IRQ_MFT2].depth = 1;
- icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN;
- disable_mappi3_irq(M32R_IRQ_MFT2);
-
-#ifdef CONFIG_SERIAL_M32R_SIO
- /* SIO0_R : uart receive data */
- irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_SIO0_R].chip = &mappi3_irq_type;
- irq_desc[M32R_IRQ_SIO0_R].action = 0;
- irq_desc[M32R_IRQ_SIO0_R].depth = 1;
- icu_data[M32R_IRQ_SIO0_R].icucr = 0;
- disable_mappi3_irq(M32R_IRQ_SIO0_R);
-
- /* SIO0_S : uart send data */
- irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_SIO0_S].chip = &mappi3_irq_type;
- irq_desc[M32R_IRQ_SIO0_S].action = 0;
- irq_desc[M32R_IRQ_SIO0_S].depth = 1;
- icu_data[M32R_IRQ_SIO0_S].icucr = 0;
- disable_mappi3_irq(M32R_IRQ_SIO0_S);
- /* SIO1_R : uart receive data */
- irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_SIO1_R].chip = &mappi3_irq_type;
- irq_desc[M32R_IRQ_SIO1_R].action = 0;
- irq_desc[M32R_IRQ_SIO1_R].depth = 1;
- icu_data[M32R_IRQ_SIO1_R].icucr = 0;
- disable_mappi3_irq(M32R_IRQ_SIO1_R);
-
- /* SIO1_S : uart send data */
- irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_SIO1_S].chip = &mappi3_irq_type;
- irq_desc[M32R_IRQ_SIO1_S].action = 0;
- irq_desc[M32R_IRQ_SIO1_S].depth = 1;
- icu_data[M32R_IRQ_SIO1_S].icucr = 0;
- disable_mappi3_irq(M32R_IRQ_SIO1_S);
-#endif /* CONFIG_M32R_USE_DBG_CONSOLE */
-
-#if defined(CONFIG_USB)
- /* INT1 : USB Host controller interrupt */
- irq_desc[M32R_IRQ_INT1].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_INT1].chip = &mappi3_irq_type;
- irq_desc[M32R_IRQ_INT1].action = 0;
- irq_desc[M32R_IRQ_INT1].depth = 1;
- icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_ISMOD01;
- disable_mappi3_irq(M32R_IRQ_INT1);
-#endif /* CONFIG_USB */
-
- /* CFC IREQ */
- irq_desc[PLD_IRQ_CFIREQ].status = IRQ_DISABLED;
- irq_desc[PLD_IRQ_CFIREQ].chip = &mappi3_irq_type;
- irq_desc[PLD_IRQ_CFIREQ].action = 0;
- irq_desc[PLD_IRQ_CFIREQ].depth = 1; /* disable nested irq */
- icu_data[PLD_IRQ_CFIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD01;
- disable_mappi3_irq(PLD_IRQ_CFIREQ);
-
-#if defined(CONFIG_M32R_CFC)
- /* ICUCR41: CFC Insert & eject */
- irq_desc[PLD_IRQ_CFC_INSERT].status = IRQ_DISABLED;
- irq_desc[PLD_IRQ_CFC_INSERT].chip = &mappi3_irq_type;
- irq_desc[PLD_IRQ_CFC_INSERT].action = 0;
- irq_desc[PLD_IRQ_CFC_INSERT].depth = 1; /* disable nested irq */
- icu_data[PLD_IRQ_CFC_INSERT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD00;
- disable_mappi3_irq(PLD_IRQ_CFC_INSERT);
-
-#endif /* CONFIG_M32R_CFC */
-
- /* IDE IREQ */
- irq_desc[PLD_IRQ_IDEIREQ].status = IRQ_DISABLED;
- irq_desc[PLD_IRQ_IDEIREQ].chip = &mappi3_irq_type;
- irq_desc[PLD_IRQ_IDEIREQ].action = 0;
- irq_desc[PLD_IRQ_IDEIREQ].depth = 1; /* disable nested irq */
- icu_data[PLD_IRQ_IDEIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10;
- disable_mappi3_irq(PLD_IRQ_IDEIREQ);
-
-}
-
-#if defined(CONFIG_SMC91X)
-
-#define LAN_IOSTART 0x300
-#define LAN_IOEND 0x320
-static struct resource smc91x_resources[] = {
- [0] = {
- .start = (LAN_IOSTART),
- .end = (LAN_IOEND),
- .flags = IORESOURCE_MEM,
- },
- [1] = {
- .start = M32R_IRQ_INT0,
- .end = M32R_IRQ_INT0,
- .flags = IORESOURCE_IRQ,
- }
-};
-
-static struct platform_device smc91x_device = {
- .name = "smc91x",
- .id = 0,
- .num_resources = ARRAY_SIZE(smc91x_resources),
- .resource = smc91x_resources,
-};
-
-#endif
-
-#if defined(CONFIG_FB_S1D13XXX)
-
-#include <video/s1d13xxxfb.h>
-#include <asm/s1d13806.h>
-
-static struct s1d13xxxfb_pdata s1d13xxxfb_data = {
- .initregs = s1d13xxxfb_initregs,
- .initregssize = ARRAY_SIZE(s1d13xxxfb_initregs),
- .platform_init_video = NULL,
-#ifdef CONFIG_PM
- .platform_suspend_video = NULL,
- .platform_resume_video = NULL,
-#endif
-};
-
-static struct resource s1d13xxxfb_resources[] = {
- [0] = {
- .start = 0x1d600000UL,
- .end = 0x1d73FFFFUL,
- .flags = IORESOURCE_MEM,
- },
- [1] = {
- .start = 0x1d400000UL,
- .end = 0x1d4001FFUL,
- .flags = IORESOURCE_MEM,
- }
-};
-
-static struct platform_device s1d13xxxfb_device = {
- .name = S1D_DEVICENAME,
- .id = 0,
- .dev = {
- .platform_data = &s1d13xxxfb_data,
- },
- .num_resources = ARRAY_SIZE(s1d13xxxfb_resources),
- .resource = s1d13xxxfb_resources,
-};
-#endif
-
-static int __init platform_init(void)
-{
-#if defined(CONFIG_SMC91X)
- platform_device_register(&smc91x_device);
-#endif
-#if defined(CONFIG_FB_S1D13XXX)
- platform_device_register(&s1d13xxxfb_device);
-#endif
- return 0;
-}
-arch_initcall(platform_init);
diff --git a/arch/m32r/kernel/setup_oaks32r.c b/arch/m32r/kernel/setup_oaks32r.c
deleted file mode 100644
index cd62598e3cea..000000000000
--- a/arch/m32r/kernel/setup_oaks32r.c
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * linux/arch/m32r/kernel/setup_oaks32r.c
- *
- * Setup routines for OAKS32R Board
- *
- * Copyright (c) 2002-2005 Hiroyuki Kondo, Hirokazu Takata,
- * Hitoshi Yamamoto, Mamoru Sakugawa
- */
-
-#include <linux/irq.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-
-#include <asm/system.h>
-#include <asm/m32r.h>
-#include <asm/io.h>
-
-#define irq2port(x) (M32R_ICU_CR1_PORTL + ((x - 1) * sizeof(unsigned long)))
-
-icu_data_t icu_data[NR_IRQS];
-
-static void disable_oaks32r_irq(unsigned int irq)
-{
- unsigned long port, data;
-
- port = irq2port(irq);
- data = icu_data[irq].icucr|M32R_ICUCR_ILEVEL7;
- outl(data, port);
-}
-
-static void enable_oaks32r_irq(unsigned int irq)
-{
- unsigned long port, data;
-
- port = irq2port(irq);
- data = icu_data[irq].icucr|M32R_ICUCR_IEN|M32R_ICUCR_ILEVEL6;
- outl(data, port);
-}
-
-static void mask_and_ack_mappi(unsigned int irq)
-{
- disable_oaks32r_irq(irq);
-}
-
-static void end_oaks32r_irq(unsigned int irq)
-{
- enable_oaks32r_irq(irq);
-}
-
-static unsigned int startup_oaks32r_irq(unsigned int irq)
-{
- enable_oaks32r_irq(irq);
- return (0);
-}
-
-static void shutdown_oaks32r_irq(unsigned int irq)
-{
- unsigned long port;
-
- port = irq2port(irq);
- outl(M32R_ICUCR_ILEVEL7, port);
-}
-
-static struct hw_interrupt_type oaks32r_irq_type =
-{
- .typename = "OAKS32R-IRQ",
- .startup = startup_oaks32r_irq,
- .shutdown = shutdown_oaks32r_irq,
- .enable = enable_oaks32r_irq,
- .disable = disable_oaks32r_irq,
- .ack = mask_and_ack_mappi,
- .end = end_oaks32r_irq
-};
-
-void __init init_IRQ(void)
-{
- static int once = 0;
-
- if (once)
- return;
- else
- once++;
-
-#ifdef CONFIG_NE2000
- /* INT3 : LAN controller (RTL8019AS) */
- irq_desc[M32R_IRQ_INT3].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_INT3].chip = &oaks32r_irq_type;
- irq_desc[M32R_IRQ_INT3].action = 0;
- irq_desc[M32R_IRQ_INT3].depth = 1;
- icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10;
- disable_oaks32r_irq(M32R_IRQ_INT3);
-#endif /* CONFIG_M32R_NE2000 */
-
- /* MFT2 : system timer */
- irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_MFT2].chip = &oaks32r_irq_type;
- irq_desc[M32R_IRQ_MFT2].action = 0;
- irq_desc[M32R_IRQ_MFT2].depth = 1;
- icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN;
- disable_oaks32r_irq(M32R_IRQ_MFT2);
-
-#ifdef CONFIG_SERIAL_M32R_SIO
- /* SIO0_R : uart receive data */
- irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_SIO0_R].chip = &oaks32r_irq_type;
- irq_desc[M32R_IRQ_SIO0_R].action = 0;
- irq_desc[M32R_IRQ_SIO0_R].depth = 1;
- icu_data[M32R_IRQ_SIO0_R].icucr = 0;
- disable_oaks32r_irq(M32R_IRQ_SIO0_R);
-
- /* SIO0_S : uart send data */
- irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_SIO0_S].chip = &oaks32r_irq_type;
- irq_desc[M32R_IRQ_SIO0_S].action = 0;
- irq_desc[M32R_IRQ_SIO0_S].depth = 1;
- icu_data[M32R_IRQ_SIO0_S].icucr = 0;
- disable_oaks32r_irq(M32R_IRQ_SIO0_S);
-
- /* SIO1_R : uart receive data */
- irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_SIO1_R].chip = &oaks32r_irq_type;
- irq_desc[M32R_IRQ_SIO1_R].action = 0;
- irq_desc[M32R_IRQ_SIO1_R].depth = 1;
- icu_data[M32R_IRQ_SIO1_R].icucr = 0;
- disable_oaks32r_irq(M32R_IRQ_SIO1_R);
-
- /* SIO1_S : uart send data */
- irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_SIO1_S].chip = &oaks32r_irq_type;
- irq_desc[M32R_IRQ_SIO1_S].action = 0;
- irq_desc[M32R_IRQ_SIO1_S].depth = 1;
- icu_data[M32R_IRQ_SIO1_S].icucr = 0;
- disable_oaks32r_irq(M32R_IRQ_SIO1_S);
-#endif /* CONFIG_SERIAL_M32R_SIO */
-}
diff --git a/arch/m32r/kernel/setup_opsput.c b/arch/m32r/kernel/setup_opsput.c
deleted file mode 100644
index 62d6b71de45f..000000000000
--- a/arch/m32r/kernel/setup_opsput.c
+++ /dev/null
@@ -1,519 +0,0 @@
-/*
- * linux/arch/m32r/kernel/setup_opsput.c
- *
- * Setup routines for Renesas OPSPUT Board
- *
- * Copyright (c) 2002-2005
- * Hiroyuki Kondo, Hirokazu Takata,
- * Hitoshi Yamamoto, Takeo Takahashi, Mamoru Sakugawa
- *
- * This file is subject to the terms and conditions of the GNU General
- * Public License. See the file "COPYING" in the main directory of this
- * archive for more details.
- */
-
-#include <linux/irq.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/platform_device.h>
-
-#include <asm/system.h>
-#include <asm/m32r.h>
-#include <asm/io.h>
-
-/*
- * OPSP Interrupt Control Unit (Level 1)
- */
-#define irq2port(x) (M32R_ICU_CR1_PORTL + ((x - 1) * sizeof(unsigned long)))
-
-icu_data_t icu_data[OPSPUT_NUM_CPU_IRQ];
-
-static void disable_opsput_irq(unsigned int irq)
-{
- unsigned long port, data;
-
- port = irq2port(irq);
- data = icu_data[irq].icucr|M32R_ICUCR_ILEVEL7;
- outl(data, port);
-}
-
-static void enable_opsput_irq(unsigned int irq)
-{
- unsigned long port, data;
-
- port = irq2port(irq);
- data = icu_data[irq].icucr|M32R_ICUCR_IEN|M32R_ICUCR_ILEVEL6;
- outl(data, port);
-}
-
-static void mask_and_ack_opsput(unsigned int irq)
-{
- disable_opsput_irq(irq);
-}
-
-static void end_opsput_irq(unsigned int irq)
-{
- enable_opsput_irq(irq);
-}
-
-static unsigned int startup_opsput_irq(unsigned int irq)
-{
- enable_opsput_irq(irq);
- return (0);
-}
-
-static void shutdown_opsput_irq(unsigned int irq)
-{
- unsigned long port;
-
- port = irq2port(irq);
- outl(M32R_ICUCR_ILEVEL7, port);
-}
-
-static struct hw_interrupt_type opsput_irq_type =
-{
- .typename = "OPSPUT-IRQ",
- .startup = startup_opsput_irq,
- .shutdown = shutdown_opsput_irq,
- .enable = enable_opsput_irq,
- .disable = disable_opsput_irq,
- .ack = mask_and_ack_opsput,
- .end = end_opsput_irq
-};
-
-/*
- * Interrupt Control Unit of PLD on OPSPUT (Level 2)
- */
-#define irq2pldirq(x) ((x) - OPSPUT_PLD_IRQ_BASE)
-#define pldirq2port(x) (unsigned long)((int)PLD_ICUCR1 + \
- (((x) - 1) * sizeof(unsigned short)))
-
-typedef struct {
- unsigned short icucr; /* ICU Control Register */
-} pld_icu_data_t;
-
-static pld_icu_data_t pld_icu_data[OPSPUT_NUM_PLD_IRQ];
-
-static void disable_opsput_pld_irq(unsigned int irq)
-{
- unsigned long port, data;
- unsigned int pldirq;
-
- pldirq = irq2pldirq(irq);
-// disable_opsput_irq(M32R_IRQ_INT1);
- port = pldirq2port(pldirq);
- data = pld_icu_data[pldirq].icucr|PLD_ICUCR_ILEVEL7;
- outw(data, port);
-}
-
-static void enable_opsput_pld_irq(unsigned int irq)
-{
- unsigned long port, data;
- unsigned int pldirq;
-
- pldirq = irq2pldirq(irq);
-// enable_opsput_irq(M32R_IRQ_INT1);
- port = pldirq2port(pldirq);
- data = pld_icu_data[pldirq].icucr|PLD_ICUCR_IEN|PLD_ICUCR_ILEVEL6;
- outw(data, port);
-}
-
-static void mask_and_ack_opsput_pld(unsigned int irq)
-{
- disable_opsput_pld_irq(irq);
-// mask_and_ack_opsput(M32R_IRQ_INT1);
-}
-
-static void end_opsput_pld_irq(unsigned int irq)
-{
- enable_opsput_pld_irq(irq);
- end_opsput_irq(M32R_IRQ_INT1);
-}
-
-static unsigned int startup_opsput_pld_irq(unsigned int irq)
-{
- enable_opsput_pld_irq(irq);
- return (0);
-}
-
-static void shutdown_opsput_pld_irq(unsigned int irq)
-{
- unsigned long port;
- unsigned int pldirq;
-
- pldirq = irq2pldirq(irq);
-// shutdown_opsput_irq(M32R_IRQ_INT1);
- port = pldirq2port(pldirq);
- outw(PLD_ICUCR_ILEVEL7, port);
-}
-
-static struct hw_interrupt_type opsput_pld_irq_type =
-{
- .typename = "OPSPUT-PLD-IRQ",
- .startup = startup_opsput_pld_irq,
- .shutdown = shutdown_opsput_pld_irq,
- .enable = enable_opsput_pld_irq,
- .disable = disable_opsput_pld_irq,
- .ack = mask_and_ack_opsput_pld,
- .end = end_opsput_pld_irq
-};
-
-/*
- * Interrupt Control Unit of PLD on OPSPUT-LAN (Level 2)
- */
-#define irq2lanpldirq(x) ((x) - OPSPUT_LAN_PLD_IRQ_BASE)
-#define lanpldirq2port(x) (unsigned long)((int)OPSPUT_LAN_ICUCR1 + \
- (((x) - 1) * sizeof(unsigned short)))
-
-static pld_icu_data_t lanpld_icu_data[OPSPUT_NUM_LAN_PLD_IRQ];
-
-static void disable_opsput_lanpld_irq(unsigned int irq)
-{
- unsigned long port, data;
- unsigned int pldirq;
-
- pldirq = irq2lanpldirq(irq);
- port = lanpldirq2port(pldirq);
- data = lanpld_icu_data[pldirq].icucr|PLD_ICUCR_ILEVEL7;
- outw(data, port);
-}
-
-static void enable_opsput_lanpld_irq(unsigned int irq)
-{
- unsigned long port, data;
- unsigned int pldirq;
-
- pldirq = irq2lanpldirq(irq);
- port = lanpldirq2port(pldirq);
- data = lanpld_icu_data[pldirq].icucr|PLD_ICUCR_IEN|PLD_ICUCR_ILEVEL6;
- outw(data, port);
-}
-
-static void mask_and_ack_opsput_lanpld(unsigned int irq)
-{
- disable_opsput_lanpld_irq(irq);
-}
-
-static void end_opsput_lanpld_irq(unsigned int irq)
-{
- enable_opsput_lanpld_irq(irq);
- end_opsput_irq(M32R_IRQ_INT0);
-}
-
-static unsigned int startup_opsput_lanpld_irq(unsigned int irq)
-{
- enable_opsput_lanpld_irq(irq);
- return (0);
-}
-
-static void shutdown_opsput_lanpld_irq(unsigned int irq)
-{
- unsigned long port;
- unsigned int pldirq;
-
- pldirq = irq2lanpldirq(irq);
- port = lanpldirq2port(pldirq);
- outw(PLD_ICUCR_ILEVEL7, port);
-}
-
-static struct hw_interrupt_type opsput_lanpld_irq_type =
-{
- .typename = "OPSPUT-PLD-LAN-IRQ",
- .startup = startup_opsput_lanpld_irq,
- .shutdown = shutdown_opsput_lanpld_irq,
- .enable = enable_opsput_lanpld_irq,
- .disable = disable_opsput_lanpld_irq,
- .ack = mask_and_ack_opsput_lanpld,
- .end = end_opsput_lanpld_irq
-};
-
-/*
- * Interrupt Control Unit of PLD on OPSPUT-LCD (Level 2)
- */
-#define irq2lcdpldirq(x) ((x) - OPSPUT_LCD_PLD_IRQ_BASE)
-#define lcdpldirq2port(x) (unsigned long)((int)OPSPUT_LCD_ICUCR1 + \
- (((x) - 1) * sizeof(unsigned short)))
-
-static pld_icu_data_t lcdpld_icu_data[OPSPUT_NUM_LCD_PLD_IRQ];
-
-static void disable_opsput_lcdpld_irq(unsigned int irq)
-{
- unsigned long port, data;
- unsigned int pldirq;
-
- pldirq = irq2lcdpldirq(irq);
- port = lcdpldirq2port(pldirq);
- data = lcdpld_icu_data[pldirq].icucr|PLD_ICUCR_ILEVEL7;
- outw(data, port);
-}
-
-static void enable_opsput_lcdpld_irq(unsigned int irq)
-{
- unsigned long port, data;
- unsigned int pldirq;
-
- pldirq = irq2lcdpldirq(irq);
- port = lcdpldirq2port(pldirq);
- data = lcdpld_icu_data[pldirq].icucr|PLD_ICUCR_IEN|PLD_ICUCR_ILEVEL6;
- outw(data, port);
-}
-
-static void mask_and_ack_opsput_lcdpld(unsigned int irq)
-{
- disable_opsput_lcdpld_irq(irq);
-}
-
-static void end_opsput_lcdpld_irq(unsigned int irq)
-{
- enable_opsput_lcdpld_irq(irq);
- end_opsput_irq(M32R_IRQ_INT2);
-}
-
-static unsigned int startup_opsput_lcdpld_irq(unsigned int irq)
-{
- enable_opsput_lcdpld_irq(irq);
- return (0);
-}
-
-static void shutdown_opsput_lcdpld_irq(unsigned int irq)
-{
- unsigned long port;
- unsigned int pldirq;
-
- pldirq = irq2lcdpldirq(irq);
- port = lcdpldirq2port(pldirq);
- outw(PLD_ICUCR_ILEVEL7, port);
-}
-
-static struct hw_interrupt_type opsput_lcdpld_irq_type =
-{
- "OPSPUT-PLD-LCD-IRQ",
- startup_opsput_lcdpld_irq,
- shutdown_opsput_lcdpld_irq,
- enable_opsput_lcdpld_irq,
- disable_opsput_lcdpld_irq,
- mask_and_ack_opsput_lcdpld,
- end_opsput_lcdpld_irq
-};
-
-void __init init_IRQ(void)
-{
-#if defined(CONFIG_SMC91X)
- /* INT#0: LAN controller on OPSPUT-LAN (SMC91C111)*/
- irq_desc[OPSPUT_LAN_IRQ_LAN].status = IRQ_DISABLED;
- irq_desc[OPSPUT_LAN_IRQ_LAN].chip = &opsput_lanpld_irq_type;
- irq_desc[OPSPUT_LAN_IRQ_LAN].action = 0;
- irq_desc[OPSPUT_LAN_IRQ_LAN].depth = 1; /* disable nested irq */
- lanpld_icu_data[irq2lanpldirq(OPSPUT_LAN_IRQ_LAN)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* "H" edge sense */
- disable_opsput_lanpld_irq(OPSPUT_LAN_IRQ_LAN);
-#endif /* CONFIG_SMC91X */
-
- /* MFT2 : system timer */
- irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_MFT2].chip = &opsput_irq_type;
- irq_desc[M32R_IRQ_MFT2].action = 0;
- irq_desc[M32R_IRQ_MFT2].depth = 1;
- icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN;
- disable_opsput_irq(M32R_IRQ_MFT2);
-
- /* SIO0 : receive */
- irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_SIO0_R].chip = &opsput_irq_type;
- irq_desc[M32R_IRQ_SIO0_R].action = 0;
- irq_desc[M32R_IRQ_SIO0_R].depth = 1;
- icu_data[M32R_IRQ_SIO0_R].icucr = 0;
- disable_opsput_irq(M32R_IRQ_SIO0_R);
-
- /* SIO0 : send */
- irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_SIO0_S].chip = &opsput_irq_type;
- irq_desc[M32R_IRQ_SIO0_S].action = 0;
- irq_desc[M32R_IRQ_SIO0_S].depth = 1;
- icu_data[M32R_IRQ_SIO0_S].icucr = 0;
- disable_opsput_irq(M32R_IRQ_SIO0_S);
-
- /* SIO1 : receive */
- irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_SIO1_R].chip = &opsput_irq_type;
- irq_desc[M32R_IRQ_SIO1_R].action = 0;
- irq_desc[M32R_IRQ_SIO1_R].depth = 1;
- icu_data[M32R_IRQ_SIO1_R].icucr = 0;
- disable_opsput_irq(M32R_IRQ_SIO1_R);
-
- /* SIO1 : send */
- irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_SIO1_S].chip = &opsput_irq_type;
- irq_desc[M32R_IRQ_SIO1_S].action = 0;
- irq_desc[M32R_IRQ_SIO1_S].depth = 1;
- icu_data[M32R_IRQ_SIO1_S].icucr = 0;
- disable_opsput_irq(M32R_IRQ_SIO1_S);
-
- /* DMA1 : */
- irq_desc[M32R_IRQ_DMA1].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_DMA1].chip = &opsput_irq_type;
- irq_desc[M32R_IRQ_DMA1].action = 0;
- irq_desc[M32R_IRQ_DMA1].depth = 1;
- icu_data[M32R_IRQ_DMA1].icucr = 0;
- disable_opsput_irq(M32R_IRQ_DMA1);
-
-#ifdef CONFIG_SERIAL_M32R_PLDSIO
- /* INT#1: SIO0 Receive on PLD */
- irq_desc[PLD_IRQ_SIO0_RCV].status = IRQ_DISABLED;
- irq_desc[PLD_IRQ_SIO0_RCV].chip = &opsput_pld_irq_type;
- irq_desc[PLD_IRQ_SIO0_RCV].action = 0;
- irq_desc[PLD_IRQ_SIO0_RCV].depth = 1; /* disable nested irq */
- pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_RCV)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03;
- disable_opsput_pld_irq(PLD_IRQ_SIO0_RCV);
-
- /* INT#1: SIO0 Send on PLD */
- irq_desc[PLD_IRQ_SIO0_SND].status = IRQ_DISABLED;
- irq_desc[PLD_IRQ_SIO0_SND].chip = &opsput_pld_irq_type;
- irq_desc[PLD_IRQ_SIO0_SND].action = 0;
- irq_desc[PLD_IRQ_SIO0_SND].depth = 1; /* disable nested irq */
- pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_SND)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03;
- disable_opsput_pld_irq(PLD_IRQ_SIO0_SND);
-#endif /* CONFIG_SERIAL_M32R_PLDSIO */
-
- /* INT#1: CFC IREQ on PLD */
- irq_desc[PLD_IRQ_CFIREQ].status = IRQ_DISABLED;
- irq_desc[PLD_IRQ_CFIREQ].chip = &opsput_pld_irq_type;
- irq_desc[PLD_IRQ_CFIREQ].action = 0;
- irq_desc[PLD_IRQ_CFIREQ].depth = 1; /* disable nested irq */
- pld_icu_data[irq2pldirq(PLD_IRQ_CFIREQ)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* 'L' level sense */
- disable_opsput_pld_irq(PLD_IRQ_CFIREQ);
-
- /* INT#1: CFC Insert on PLD */
- irq_desc[PLD_IRQ_CFC_INSERT].status = IRQ_DISABLED;
- irq_desc[PLD_IRQ_CFC_INSERT].chip = &opsput_pld_irq_type;
- irq_desc[PLD_IRQ_CFC_INSERT].action = 0;
- irq_desc[PLD_IRQ_CFC_INSERT].depth = 1; /* disable nested irq */
- pld_icu_data[irq2pldirq(PLD_IRQ_CFC_INSERT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD00; /* 'L' edge sense */
- disable_opsput_pld_irq(PLD_IRQ_CFC_INSERT);
-
- /* INT#1: CFC Eject on PLD */
- irq_desc[PLD_IRQ_CFC_EJECT].status = IRQ_DISABLED;
- irq_desc[PLD_IRQ_CFC_EJECT].chip = &opsput_pld_irq_type;
- irq_desc[PLD_IRQ_CFC_EJECT].action = 0;
- irq_desc[PLD_IRQ_CFC_EJECT].depth = 1; /* disable nested irq */
- pld_icu_data[irq2pldirq(PLD_IRQ_CFC_EJECT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* 'H' edge sense */
- disable_opsput_pld_irq(PLD_IRQ_CFC_EJECT);
-
- /*
- * INT0# is used for LAN, DIO
- * We enable it here.
- */
- icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD11;
- enable_opsput_irq(M32R_IRQ_INT0);
-
- /*
- * INT1# is used for UART, MMC, CF Controller in FPGA.
- * We enable it here.
- */
- icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD11;
- enable_opsput_irq(M32R_IRQ_INT1);
-
-#if defined(CONFIG_USB)
- outw(USBCR_OTGS, USBCR); /* USBCR: non-OTG */
-
- irq_desc[OPSPUT_LCD_IRQ_USB_INT1].status = IRQ_DISABLED;
- irq_desc[OPSPUT_LCD_IRQ_USB_INT1].chip = &opsput_lcdpld_irq_type;
- irq_desc[OPSPUT_LCD_IRQ_USB_INT1].action = 0;
- irq_desc[OPSPUT_LCD_IRQ_USB_INT1].depth = 1;
- lcdpld_icu_data[irq2lcdpldirq(OPSPUT_LCD_IRQ_USB_INT1)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* "L" level sense */
- disable_opsput_lcdpld_irq(OPSPUT_LCD_IRQ_USB_INT1);
-#endif
- /*
- * INT2# is used for BAT, USB, AUDIO
- * We enable it here.
- */
- icu_data[M32R_IRQ_INT2].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD01;
- enable_opsput_irq(M32R_IRQ_INT2);
-
-#if defined(CONFIG_VIDEO_M32R_AR)
- /*
- * INT3# is used for AR
- */
- irq_desc[M32R_IRQ_INT3].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_INT3].chip = &opsput_irq_type;
- irq_desc[M32R_IRQ_INT3].action = 0;
- irq_desc[M32R_IRQ_INT3].depth = 1;
- icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10;
- disable_opsput_irq(M32R_IRQ_INT3);
-#endif /* CONFIG_VIDEO_M32R_AR */
-}
-
-#if defined(CONFIG_SMC91X)
-
-#define LAN_IOSTART 0x300
-#define LAN_IOEND 0x320
-static struct resource smc91x_resources[] = {
- [0] = {
- .start = (LAN_IOSTART),
- .end = (LAN_IOEND),
- .flags = IORESOURCE_MEM,
- },
- [1] = {
- .start = OPSPUT_LAN_IRQ_LAN,
- .end = OPSPUT_LAN_IRQ_LAN,
- .flags = IORESOURCE_IRQ,
- }
-};
-
-static struct platform_device smc91x_device = {
- .name = "smc91x",
- .id = 0,
- .num_resources = ARRAY_SIZE(smc91x_resources),
- .resource = smc91x_resources,
-};
-#endif
-
-#if defined(CONFIG_FB_S1D13XXX)
-
-#include <video/s1d13xxxfb.h>
-#include <asm/s1d13806.h>
-
-static struct s1d13xxxfb_pdata s1d13xxxfb_data = {
- .initregs = s1d13xxxfb_initregs,
- .initregssize = ARRAY_SIZE(s1d13xxxfb_initregs),
- .platform_init_video = NULL,
-#ifdef CONFIG_PM
- .platform_suspend_video = NULL,
- .platform_resume_video = NULL,
-#endif
-};
-
-static struct resource s1d13xxxfb_resources[] = {
- [0] = {
- .start = 0x10600000UL,
- .end = 0x1073FFFFUL,
- .flags = IORESOURCE_MEM,
- },
- [1] = {
- .start = 0x10400000UL,
- .end = 0x104001FFUL,
- .flags = IORESOURCE_MEM,
- }
-};
-
-static struct platform_device s1d13xxxfb_device = {
- .name = S1D_DEVICENAME,
- .id = 0,
- .dev = {
- .platform_data = &s1d13xxxfb_data,
- },
- .num_resources = ARRAY_SIZE(s1d13xxxfb_resources),
- .resource = s1d13xxxfb_resources,
-};
-#endif
-
-static int __init platform_init(void)
-{
-#if defined(CONFIG_SMC91X)
- platform_device_register(&smc91x_device);
-#endif
-#if defined(CONFIG_FB_S1D13XXX)
- platform_device_register(&s1d13xxxfb_device);
-#endif
- return 0;
-}
-arch_initcall(platform_init);
diff --git a/arch/m32r/kernel/setup_usrv.c b/arch/m32r/kernel/setup_usrv.c
deleted file mode 100644
index f5b4b5ac31e7..000000000000
--- a/arch/m32r/kernel/setup_usrv.c
+++ /dev/null
@@ -1,249 +0,0 @@
-/*
- * linux/arch/m32r/kernel/setup_usrv.c
- *
- * Setup routines for MITSUBISHI uServer
- *
- * Copyright (c) 2001, 2002, 2003 Hiroyuki Kondo, Hirokazu Takata,
- * Hitoshi Yamamoto
- */
-
-#include <linux/irq.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-
-#include <asm/system.h>
-#include <asm/m32r.h>
-#include <asm/io.h>
-
-#define irq2port(x) (M32R_ICU_CR1_PORTL + ((x - 1) * sizeof(unsigned long)))
-
-icu_data_t icu_data[M32700UT_NUM_CPU_IRQ];
-
-static void disable_mappi_irq(unsigned int irq)
-{
- unsigned long port, data;
-
- port = irq2port(irq);
- data = icu_data[irq].icucr|M32R_ICUCR_ILEVEL7;
- outl(data, port);
-}
-
-static void enable_mappi_irq(unsigned int irq)
-{
- unsigned long port, data;
-
- port = irq2port(irq);
- data = icu_data[irq].icucr|M32R_ICUCR_IEN|M32R_ICUCR_ILEVEL6;
- outl(data, port);
-}
-
-static void mask_and_ack_mappi(unsigned int irq)
-{
- disable_mappi_irq(irq);
-}
-
-static void end_mappi_irq(unsigned int irq)
-{
- enable_mappi_irq(irq);
-}
-
-static unsigned int startup_mappi_irq(unsigned int irq)
-{
- enable_mappi_irq(irq);
- return 0;
-}
-
-static void shutdown_mappi_irq(unsigned int irq)
-{
- unsigned long port;
-
- port = irq2port(irq);
- outl(M32R_ICUCR_ILEVEL7, port);
-}
-
-static struct hw_interrupt_type mappi_irq_type =
-{
- .typename = "M32700-IRQ",
- .startup = startup_mappi_irq,
- .shutdown = shutdown_mappi_irq,
- .enable = enable_mappi_irq,
- .disable = disable_mappi_irq,
- .ack = mask_and_ack_mappi,
- .end = end_mappi_irq
-};
-
-/*
- * Interrupt Control Unit of PLD on M32700UT (Level 2)
- */
-#define irq2pldirq(x) ((x) - M32700UT_PLD_IRQ_BASE)
-#define pldirq2port(x) (unsigned long)((int)PLD_ICUCR1 + \
- (((x) - 1) * sizeof(unsigned short)))
-
-typedef struct {
- unsigned short icucr; /* ICU Control Register */
-} pld_icu_data_t;
-
-static pld_icu_data_t pld_icu_data[M32700UT_NUM_PLD_IRQ];
-
-static void disable_m32700ut_pld_irq(unsigned int irq)
-{
- unsigned long port, data;
- unsigned int pldirq;
-
- pldirq = irq2pldirq(irq);
- port = pldirq2port(pldirq);
- data = pld_icu_data[pldirq].icucr|PLD_ICUCR_ILEVEL7;
- outw(data, port);
-}
-
-static void enable_m32700ut_pld_irq(unsigned int irq)
-{
- unsigned long port, data;
- unsigned int pldirq;
-
- pldirq = irq2pldirq(irq);
- port = pldirq2port(pldirq);
- data = pld_icu_data[pldirq].icucr|PLD_ICUCR_IEN|PLD_ICUCR_ILEVEL6;
- outw(data, port);
-}
-
-static void mask_and_ack_m32700ut_pld(unsigned int irq)
-{
- disable_m32700ut_pld_irq(irq);
-}
-
-static void end_m32700ut_pld_irq(unsigned int irq)
-{
- enable_m32700ut_pld_irq(irq);
- end_mappi_irq(M32R_IRQ_INT1);
-}
-
-static unsigned int startup_m32700ut_pld_irq(unsigned int irq)
-{
- enable_m32700ut_pld_irq(irq);
- return 0;
-}
-
-static void shutdown_m32700ut_pld_irq(unsigned int irq)
-{
- unsigned long port;
- unsigned int pldirq;
-
- pldirq = irq2pldirq(irq);
- port = pldirq2port(pldirq);
- outw(PLD_ICUCR_ILEVEL7, port);
-}
-
-static struct hw_interrupt_type m32700ut_pld_irq_type =
-{
- .typename = "USRV-PLD-IRQ",
- .startup = startup_m32700ut_pld_irq,
- .shutdown = shutdown_m32700ut_pld_irq,
- .enable = enable_m32700ut_pld_irq,
- .disable = disable_m32700ut_pld_irq,
- .ack = mask_and_ack_m32700ut_pld,
- .end = end_m32700ut_pld_irq
-};
-
-void __init init_IRQ(void)
-{
- static int once = 0;
- int i;
-
- if (once)
- return;
- else
- once++;
-
- /* MFT2 : system timer */
- irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_MFT2].chip = &mappi_irq_type;
- irq_desc[M32R_IRQ_MFT2].action = 0;
- irq_desc[M32R_IRQ_MFT2].depth = 1;
- icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN;
- disable_mappi_irq(M32R_IRQ_MFT2);
-
-#if defined(CONFIG_SERIAL_M32R_SIO)
- /* SIO0_R : uart receive data */
- irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_SIO0_R].chip = &mappi_irq_type;
- irq_desc[M32R_IRQ_SIO0_R].action = 0;
- irq_desc[M32R_IRQ_SIO0_R].depth = 1;
- icu_data[M32R_IRQ_SIO0_R].icucr = 0;
- disable_mappi_irq(M32R_IRQ_SIO0_R);
-
- /* SIO0_S : uart send data */
- irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_SIO0_S].chip = &mappi_irq_type;
- irq_desc[M32R_IRQ_SIO0_S].action = 0;
- irq_desc[M32R_IRQ_SIO0_S].depth = 1;
- icu_data[M32R_IRQ_SIO0_S].icucr = 0;
- disable_mappi_irq(M32R_IRQ_SIO0_S);
-
- /* SIO1_R : uart receive data */
- irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_SIO1_R].chip = &mappi_irq_type;
- irq_desc[M32R_IRQ_SIO1_R].action = 0;
- irq_desc[M32R_IRQ_SIO1_R].depth = 1;
- icu_data[M32R_IRQ_SIO1_R].icucr = 0;
- disable_mappi_irq(M32R_IRQ_SIO1_R);
-
- /* SIO1_S : uart send data */
- irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED;
- irq_desc[M32R_IRQ_SIO1_S].chip = &mappi_irq_type;
- irq_desc[M32R_IRQ_SIO1_S].action = 0;
- irq_desc[M32R_IRQ_SIO1_S].depth = 1;
- icu_data[M32R_IRQ_SIO1_S].icucr = 0;
- disable_mappi_irq(M32R_IRQ_SIO1_S);
-#endif /* CONFIG_SERIAL_M32R_SIO */
-
- /* INT#67-#71: CFC#0 IREQ on PLD */
- for (i = 0 ; i < CONFIG_CFC_NUM ; i++ ) {
- irq_desc[PLD_IRQ_CF0 + i].status = IRQ_DISABLED;
- irq_desc[PLD_IRQ_CF0 + i].chip = &m32700ut_pld_irq_type;
- irq_desc[PLD_IRQ_CF0 + i].action = 0;
- irq_desc[PLD_IRQ_CF0 + i].depth = 1; /* disable nested irq */
- pld_icu_data[irq2pldirq(PLD_IRQ_CF0 + i)].icucr
- = PLD_ICUCR_ISMOD01; /* 'L' level sense */
- disable_m32700ut_pld_irq(PLD_IRQ_CF0 + i);
- }
-
-#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE)
- /* INT#76: 16552D#0 IREQ on PLD */
- irq_desc[PLD_IRQ_UART0].status = IRQ_DISABLED;
- irq_desc[PLD_IRQ_UART0].chip = &m32700ut_pld_irq_type;
- irq_desc[PLD_IRQ_UART0].action = 0;
- irq_desc[PLD_IRQ_UART0].depth = 1; /* disable nested irq */
- pld_icu_data[irq2pldirq(PLD_IRQ_UART0)].icucr
- = PLD_ICUCR_ISMOD03; /* 'H' level sense */
- disable_m32700ut_pld_irq(PLD_IRQ_UART0);
-
- /* INT#77: 16552D#1 IREQ on PLD */
- irq_desc[PLD_IRQ_UART1].status = IRQ_DISABLED;
- irq_desc[PLD_IRQ_UART1].chip = &m32700ut_pld_irq_type;
- irq_desc[PLD_IRQ_UART1].action = 0;
- irq_desc[PLD_IRQ_UART1].depth = 1; /* disable nested irq */
- pld_icu_data[irq2pldirq(PLD_IRQ_UART1)].icucr
- = PLD_ICUCR_ISMOD03; /* 'H' level sense */
- disable_m32700ut_pld_irq(PLD_IRQ_UART1);
-#endif /* CONFIG_SERIAL_8250 || CONFIG_SERIAL_8250_MODULE */
-
-#if defined(CONFIG_IDC_AK4524) || defined(CONFIG_IDC_AK4524_MODULE)
- /* INT#80: AK4524 IREQ on PLD */
- irq_desc[PLD_IRQ_SNDINT].status = IRQ_DISABLED;
- irq_desc[PLD_IRQ_SNDINT].chip = &m32700ut_pld_irq_type;
- irq_desc[PLD_IRQ_SNDINT].action = 0;
- irq_desc[PLD_IRQ_SNDINT].depth = 1; /* disable nested irq */
- pld_icu_data[irq2pldirq(PLD_IRQ_SNDINT)].icucr
- = PLD_ICUCR_ISMOD01; /* 'L' level sense */
- disable_m32700ut_pld_irq(PLD_IRQ_SNDINT);
-#endif /* CONFIG_IDC_AK4524 || CONFIG_IDC_AK4524_MODULE */
-
- /*
- * INT1# is used for UART, MMC, CF Controller in FPGA.
- * We enable it here.
- */
- icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_ISMOD11;
- enable_mappi_irq(M32R_IRQ_INT1);
-}
-
diff --git a/arch/m32r/kernel/syscall_table.S b/arch/m32r/kernel/syscall_table.S
new file mode 100644
index 000000000000..751ac2a3d120
--- /dev/null
+++ b/arch/m32r/kernel/syscall_table.S
@@ -0,0 +1,286 @@
+ENTRY(sys_call_table)
+ .long sys_restart_syscall /* 0 - old "setup()" system call*/
+ .long sys_exit
+ .long sys_fork
+ .long sys_read
+ .long sys_write
+ .long sys_open /* 5 */
+ .long sys_close
+ .long sys_waitpid
+ .long sys_creat
+ .long sys_link
+ .long sys_unlink /* 10 */
+ .long sys_execve
+ .long sys_chdir
+ .long sys_time
+ .long sys_mknod
+ .long sys_chmod /* 15 */
+ .long sys_ni_syscall /* lchown16 syscall holder */
+ .long sys_ni_syscall /* old break syscall holder */
+ .long sys_ni_syscall /* old stat syscall holder */
+ .long sys_lseek
+ .long sys_getpid /* 20 */
+ .long sys_mount
+ .long sys_oldumount
+ .long sys_ni_syscall /* setuid16 syscall holder */
+ .long sys_ni_syscall /* getuid16 syscall holder */
+ .long sys_stime /* 25 */
+ .long sys_ptrace
+ .long sys_alarm
+ .long sys_ni_syscall /* old fstat syscall holder */
+ .long sys_pause
+ .long sys_utime /* 30 */
+ .long sys_ni_syscall /* old stty syscall holder */
+ .long sys_cachectl /* for M32R */ /* old gtty syscall holder */
+ .long sys_access
+ .long sys_ni_syscall /* nice syscall holder */
+ .long sys_ni_syscall /* 35 - old ftime syscall holder */
+ .long sys_sync
+ .long sys_kill
+ .long sys_rename
+ .long sys_mkdir
+ .long sys_rmdir /* 40 */
+ .long sys_dup
+ .long sys_pipe
+ .long sys_times
+ .long sys_ni_syscall /* old prof syscall holder */
+ .long sys_brk /* 45 */
+ .long sys_ni_syscall /* setgid16 syscall holder */
+ .long sys_getgid /* will be unused */
+ .long sys_ni_syscall /* signal syscall holder */
+ .long sys_ni_syscall /* geteuid16 syscall holder */
+ .long sys_ni_syscall /* 50 - getegid16 syscall holder */
+ .long sys_acct
+ .long sys_umount /* recycled never used phys() */
+ .long sys_ni_syscall /* old lock syscall holder */
+ .long sys_ioctl
+ .long sys_fcntl /* 55 - will be unused */
+ .long sys_ni_syscall /* mpx syscall holder */
+ .long sys_setpgid
+ .long sys_ni_syscall /* old ulimit syscall holder */
+ .long sys_ni_syscall /* sys_olduname */
+ .long sys_umask /* 60 */
+ .long sys_chroot
+ .long sys_ustat
+ .long sys_dup2
+ .long sys_getppid
+ .long sys_getpgrp /* 65 */
+ .long sys_setsid
+ .long sys_ni_syscall /* sigaction syscall holder */
+ .long sys_ni_syscall /* sgetmask syscall holder */
+ .long sys_ni_syscall /* ssetmask syscall holder */
+ .long sys_ni_syscall /* 70 - setreuid16 syscall holder */
+ .long sys_ni_syscall /* setregid16 syscall holder */
+ .long sys_ni_syscall /* sigsuspend syscall holder */
+ .long sys_ni_syscall /* sigpending syscall holder */
+ .long sys_sethostname
+ .long sys_setrlimit /* 75 */
+ .long sys_getrlimit/*will be unused*/
+ .long sys_getrusage
+ .long sys_gettimeofday
+ .long sys_settimeofday
+ .long sys_ni_syscall /* 80 - getgroups16 syscall holder */
+ .long sys_ni_syscall /* setgroups16 syscall holder */
+ .long sys_ni_syscall /* sys_oldselect */
+ .long sys_symlink
+ .long sys_ni_syscall /* old lstat syscall holder */
+ .long sys_readlink /* 85 */
+ .long sys_uselib
+ .long sys_swapon
+ .long sys_reboot
+ .long sys_ni_syscall /* readdir syscall holder */
+ .long sys_ni_syscall /* 90 - old_mmap syscall holder */
+ .long sys_munmap
+ .long sys_truncate
+ .long sys_ftruncate
+ .long sys_fchmod
+ .long sys_ni_syscall /* 95 - fchwon16 syscall holder */
+ .long sys_getpriority
+ .long sys_setpriority
+ .long sys_ni_syscall /* old profil syscall holder */
+ .long sys_statfs
+ .long sys_fstatfs /* 100 */
+ .long sys_ni_syscall /* ioperm syscall holder */
+ .long sys_socketcall
+ .long sys_syslog
+ .long sys_setitimer
+ .long sys_getitimer /* 105 */
+ .long sys_newstat
+ .long sys_newlstat
+ .long sys_newfstat
+ .long sys_ni_syscall /* old uname syscall holder */
+ .long sys_ni_syscall /* 110 - iopl syscall holder */
+ .long sys_vhangup
+ .long sys_ni_syscall /* idle syscall holder */
+ .long sys_ni_syscall /* vm86old syscall holder */
+ .long sys_wait4
+ .long sys_swapoff /* 115 */
+ .long sys_sysinfo
+ .long sys_ipc
+ .long sys_fsync
+ .long sys_ni_syscall /* sigreturn syscall holder */
+ .long sys_clone /* 120 */
+ .long sys_setdomainname
+ .long sys_newuname
+ .long sys_ni_syscall /* modify_ldt syscall holder */
+ .long sys_adjtimex
+ .long sys_mprotect /* 125 */
+ .long sys_ni_syscall /* sigprocmask syscall holder */
+ .long sys_ni_syscall /* create_module syscall holder */
+ .long sys_init_module
+ .long sys_delete_module
+ .long sys_ni_syscall /* 130 - get_kernel_syms */
+ .long sys_quotactl
+ .long sys_getpgid
+ .long sys_fchdir
+ .long sys_bdflush
+ .long sys_sysfs /* 135 */
+ .long sys_personality
+ .long sys_ni_syscall /* afs_syscall syscall holder */
+ .long sys_ni_syscall /* setfsuid16 syscall holder */
+ .long sys_ni_syscall /* setfsgid16 syscall holder */
+ .long sys_llseek /* 140 */
+ .long sys_getdents
+ .long sys_select
+ .long sys_flock
+ .long sys_msync
+ .long sys_readv /* 145 */
+ .long sys_writev
+ .long sys_getsid
+ .long sys_fdatasync
+ .long sys_sysctl
+ .long sys_mlock /* 150 */
+ .long sys_munlock
+ .long sys_mlockall
+ .long sys_munlockall
+ .long sys_sched_setparam
+ .long sys_sched_getparam /* 155 */
+ .long sys_sched_setscheduler
+ .long sys_sched_getscheduler
+ .long sys_sched_yield
+ .long sys_sched_get_priority_max
+ .long sys_sched_get_priority_min /* 160 */
+ .long sys_sched_rr_get_interval
+ .long sys_nanosleep
+ .long sys_mremap
+ .long sys_ni_syscall /* setresuid16 syscall holder */
+ .long sys_ni_syscall /* 165 - getresuid16 syscall holder */
+ .long sys_tas /* vm86 syscall holder */
+ .long sys_ni_syscall /* query_module syscall holder */
+ .long sys_poll
+ .long sys_nfsservctl
+ .long sys_setresgid /* 170 */
+ .long sys_getresgid
+ .long sys_prctl
+ .long sys_rt_sigreturn
+ .long sys_rt_sigaction
+ .long sys_rt_sigprocmask /* 175 */
+ .long sys_rt_sigpending
+ .long sys_rt_sigtimedwait
+ .long sys_rt_sigqueueinfo
+ .long sys_rt_sigsuspend
+ .long sys_pread64 /* 180 */
+ .long sys_pwrite64
+ .long sys_ni_syscall /* chown16 syscall holder */
+ .long sys_getcwd
+ .long sys_capget
+ .long sys_capset /* 185 */
+ .long sys_sigaltstack
+ .long sys_sendfile
+ .long sys_ni_syscall /* streams1 */
+ .long sys_ni_syscall /* streams2 */
+ .long sys_vfork /* 190 */
+ .long sys_getrlimit
+ .long sys_mmap2
+ .long sys_truncate64
+ .long sys_ftruncate64
+ .long sys_stat64 /* 195 */
+ .long sys_lstat64
+ .long sys_fstat64
+ .long sys_lchown
+ .long sys_getuid
+ .long sys_getgid /* 200 */
+ .long sys_geteuid
+ .long sys_getegid
+ .long sys_setreuid
+ .long sys_setregid
+ .long sys_getgroups /* 205 */
+ .long sys_setgroups
+ .long sys_fchown
+ .long sys_setresuid
+ .long sys_getresuid
+ .long sys_setresgid /* 210 */
+ .long sys_getresgid
+ .long sys_chown
+ .long sys_setuid
+ .long sys_setgid
+ .long sys_setfsuid /* 215 */
+ .long sys_setfsgid
+ .long sys_pivot_root
+ .long sys_mincore
+ .long sys_madvise
+ .long sys_getdents64 /* 220 */
+ .long sys_fcntl64
+ .long sys_ni_syscall /* reserved for TUX */
+ .long sys_ni_syscall /* Reserved for Security */
+ .long sys_gettid
+ .long sys_readahead /* 225 */
+ .long sys_setxattr
+ .long sys_lsetxattr
+ .long sys_fsetxattr
+ .long sys_getxattr
+ .long sys_lgetxattr /* 230 */
+ .long sys_fgetxattr
+ .long sys_listxattr
+ .long sys_llistxattr
+ .long sys_flistxattr
+ .long sys_removexattr /* 235 */
+ .long sys_lremovexattr
+ .long sys_fremovexattr
+ .long sys_tkill
+ .long sys_sendfile64
+ .long sys_futex /* 240 */
+ .long sys_sched_setaffinity
+ .long sys_sched_getaffinity
+ .long sys_ni_syscall /* reserved for "set_thread_area" system call */
+ .long sys_ni_syscall /* reserved for "get_thread_area" system call */
+ .long sys_io_setup /* 245 */
+ .long sys_io_destroy
+ .long sys_io_getevents
+ .long sys_io_submit
+ .long sys_io_cancel
+ .long sys_fadvise64 /* 250 */
+ .long sys_ni_syscall
+ .long sys_exit_group
+ .long sys_lookup_dcookie
+ .long sys_epoll_create
+ .long sys_epoll_ctl /* 255 */
+ .long sys_epoll_wait
+ .long sys_remap_file_pages
+ .long sys_set_tid_address
+ .long sys_timer_create
+ .long sys_timer_settime /* 260 */
+ .long sys_timer_gettime
+ .long sys_timer_getoverrun
+ .long sys_timer_delete
+ .long sys_clock_settime
+ .long sys_clock_gettime /* 265 */
+ .long sys_clock_getres
+ .long sys_clock_nanosleep
+ .long sys_statfs64
+ .long sys_fstatfs64
+ .long sys_tgkill /* 270 */
+ .long sys_utimes
+ .long sys_fadvise64_64
+ .long sys_ni_syscall /* Reserved for sys_vserver */
+ .long sys_ni_syscall /* Reserved for sys_mbind */
+ .long sys_ni_syscall /* Reserved for sys_get_mempolicy */
+ .long sys_ni_syscall /* Reserved for sys_set_mempolicy */
+ .long sys_mq_open
+ .long sys_mq_unlink
+ .long sys_mq_timedsend
+ .long sys_mq_timedreceive /* 280 */
+ .long sys_mq_notify
+ .long sys_mq_getsetattr
+ .long sys_ni_syscall /* reserved for kexec */
+ .long sys_waitid