diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-12 00:13:14 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-12 00:13:14 -0500 |
commit | 4b4d2b463461f1b86fd89353184e6f2938e7566b (patch) | |
tree | c134da666c752e4e181b5d6fb27375c0c763bae0 | |
parent | 9b66bfb28049594fe2bb2b91607ba302f511ce8b (diff) | |
parent | b400126add8fccf47ff663e5f20604e121f55f84 (diff) |
Merge tag 'h8300-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
Pull h8300 platform removal from Guenter Roeck:
"The patch series has been in -next for more than one relase cycle. I
did get a number of Acks, and no objections.
H8/300 has been dead for several years, the kernel for it has not
compiled for ages, and recent versions of gcc for it are broken.
Remove support for it"
* tag 'h8300-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
CREDITS: Add Yoshinori Sato for h8300
fs/minix: Drop dependency on H8300
Drop remaining references to H8/300 architecture
Drop MAINTAINERS entry for H8/300
watchdog: Drop references to H8300 architecture
net/ethernet: Drop H8/300 Ethernet driver
net/ethernet: smsc9194: Drop conditional code for H8/300
ide: Drop H8/300 driver
Drop support for Renesas H8/300 (h8300) architecture
195 files changed, 9 insertions, 11743 deletions
@@ -3152,6 +3152,11 @@ N: Dipankar Sarma | |||
3152 | E: dipankar@in.ibm.com | 3152 | E: dipankar@in.ibm.com |
3153 | D: RCU | 3153 | D: RCU |
3154 | 3154 | ||
3155 | N: Yoshinori Sato | ||
3156 | E: ysato@users.sourceforge.jp | ||
3157 | D: uClinux for Renesas H8/300 (H8300) | ||
3158 | D: http://uclinux-h8.sourceforge.jp/ | ||
3159 | |||
3155 | N: Hannu Savolainen | 3160 | N: Hannu Savolainen |
3156 | E: hannu@opensound.com | 3161 | E: hannu@opensound.com |
3157 | D: Maintainer of the sound drivers until 2.1.x days. | 3162 | D: Maintainer of the sound drivers until 2.1.x days. |
diff --git a/Documentation/scheduler/sched-arch.txt b/Documentation/scheduler/sched-arch.txt index b1b8587b86f0..9290de703450 100644 --- a/Documentation/scheduler/sched-arch.txt +++ b/Documentation/scheduler/sched-arch.txt | |||
@@ -65,11 +65,6 @@ Possible arch/ problems | |||
65 | 65 | ||
66 | Possible arch problems I found (and either tried to fix or didn't): | 66 | Possible arch problems I found (and either tried to fix or didn't): |
67 | 67 | ||
68 | h8300 - Is such sleeping racy vs interrupts? (See #4a). | ||
69 | The H8/300 manual I found indicates yes, however disabling IRQs | ||
70 | over the sleep mean only NMIs can wake it up, so can't fix easily | ||
71 | without doing spin waiting. | ||
72 | |||
73 | ia64 - is safe_halt call racy vs interrupts? (does it sleep?) (See #4a) | 68 | ia64 - is safe_halt call racy vs interrupts? (does it sleep?) (See #4a) |
74 | 69 | ||
75 | sh64 - Is sleeping racy vs interrupts? (See #4a) | 70 | sh64 - Is sleeping racy vs interrupts? (See #4a) |
diff --git a/MAINTAINERS b/MAINTAINERS index 5c746dd83f3a..197e2b61fcfe 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -8707,14 +8707,6 @@ S: Maintained | |||
8707 | F: arch/m68k/*/*_no.* | 8707 | F: arch/m68k/*/*_no.* |
8708 | F: arch/m68k/include/asm/*_no.* | 8708 | F: arch/m68k/include/asm/*_no.* |
8709 | 8709 | ||
8710 | UCLINUX FOR RENESAS H8/300 (H8300) | ||
8711 | M: Yoshinori Sato <ysato@users.sourceforge.jp> | ||
8712 | W: http://uclinux-h8.sourceforge.jp/ | ||
8713 | S: Supported | ||
8714 | F: arch/h8300/ | ||
8715 | F: drivers/ide/ide-h8300.c | ||
8716 | F: drivers/net/ethernet/8390/ne-h8300.c | ||
8717 | |||
8718 | UDF FILESYSTEM | 8710 | UDF FILESYSTEM |
8719 | M: Jan Kara <jack@suse.cz> | 8711 | M: Jan Kara <jack@suse.cz> |
8720 | S: Maintained | 8712 | S: Maintained |
diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig deleted file mode 100644 index 24b1dc2564f1..000000000000 --- a/arch/h8300/Kconfig +++ /dev/null | |||
@@ -1,108 +0,0 @@ | |||
1 | config H8300 | ||
2 | bool | ||
3 | default y | ||
4 | select HAVE_IDE | ||
5 | select GENERIC_ATOMIC64 | ||
6 | select HAVE_UID16 | ||
7 | select VIRT_TO_BUS | ||
8 | select ARCH_WANT_IPC_PARSE_VERSION | ||
9 | select GENERIC_IRQ_SHOW | ||
10 | select GENERIC_CPU_DEVICES | ||
11 | select MODULES_USE_ELF_RELA | ||
12 | select OLD_SIGSUSPEND3 | ||
13 | select OLD_SIGACTION | ||
14 | select HAVE_UNDERSCORE_SYMBOL_PREFIX | ||
15 | |||
16 | config MMU | ||
17 | bool | ||
18 | default n | ||
19 | |||
20 | config SWAP | ||
21 | bool | ||
22 | default n | ||
23 | |||
24 | config ZONE_DMA | ||
25 | bool | ||
26 | default y | ||
27 | |||
28 | config FPU | ||
29 | bool | ||
30 | default n | ||
31 | |||
32 | config RWSEM_GENERIC_SPINLOCK | ||
33 | bool | ||
34 | default y | ||
35 | |||
36 | config RWSEM_XCHGADD_ALGORITHM | ||
37 | bool | ||
38 | default n | ||
39 | |||
40 | config ARCH_HAS_ILOG2_U32 | ||
41 | bool | ||
42 | default n | ||
43 | |||
44 | config ARCH_HAS_ILOG2_U64 | ||
45 | bool | ||
46 | default n | ||
47 | |||
48 | config GENERIC_HWEIGHT | ||
49 | bool | ||
50 | default y | ||
51 | |||
52 | config GENERIC_CALIBRATE_DELAY | ||
53 | bool | ||
54 | default y | ||
55 | |||
56 | config GENERIC_BUG | ||
57 | bool | ||
58 | depends on BUG | ||
59 | |||
60 | config TIME_LOW_RES | ||
61 | bool | ||
62 | default y | ||
63 | |||
64 | config NO_IOPORT | ||
65 | def_bool y | ||
66 | |||
67 | config NO_DMA | ||
68 | def_bool y | ||
69 | |||
70 | config ISA | ||
71 | bool | ||
72 | default y | ||
73 | |||
74 | config PCI | ||
75 | bool | ||
76 | default n | ||
77 | |||
78 | config HZ | ||
79 | int | ||
80 | default 100 | ||
81 | |||
82 | source "init/Kconfig" | ||
83 | |||
84 | source "kernel/Kconfig.freezer" | ||
85 | |||
86 | source "arch/h8300/Kconfig.cpu" | ||
87 | |||
88 | menu "Executable file formats" | ||
89 | |||
90 | source "fs/Kconfig.binfmt" | ||
91 | |||
92 | endmenu | ||
93 | |||
94 | source "net/Kconfig" | ||
95 | |||
96 | source "drivers/Kconfig" | ||
97 | |||
98 | source "arch/h8300/Kconfig.ide" | ||
99 | |||
100 | source "fs/Kconfig" | ||
101 | |||
102 | source "arch/h8300/Kconfig.debug" | ||
103 | |||
104 | source "security/Kconfig" | ||
105 | |||
106 | source "crypto/Kconfig" | ||
107 | |||
108 | source "lib/Kconfig" | ||
diff --git a/arch/h8300/Kconfig.cpu b/arch/h8300/Kconfig.cpu deleted file mode 100644 index cdee771460ed..000000000000 --- a/arch/h8300/Kconfig.cpu +++ /dev/null | |||
@@ -1,171 +0,0 @@ | |||
1 | menu "Processor type and features" | ||
2 | |||
3 | choice | ||
4 | prompt "H8/300 platform" | ||
5 | default H8300H_GENERIC | ||
6 | |||
7 | config H8300H_GENERIC | ||
8 | bool "H8/300H Generic" | ||
9 | help | ||
10 | H8/300H CPU Generic Hardware Support | ||
11 | |||
12 | config H8300H_AKI3068NET | ||
13 | bool "AE-3068/69" | ||
14 | select H83068 | ||
15 | help | ||
16 | AKI-H8/3068F / AKI-H8/3069F Flashmicom LAN Board Support | ||
17 | More Information. (Japanese Only) | ||
18 | <http://akizukidenshi.com/catalog/default.aspx> | ||
19 | AE-3068/69 Evaluation Board Support | ||
20 | More Information. | ||
21 | <http://www.microtronique.com/ae3069lan.htm> | ||
22 | |||
23 | config H8300H_H8MAX | ||
24 | bool "H8MAX" | ||
25 | select H83068 | ||
26 | help | ||
27 | H8MAX Evaluation Board Support | ||
28 | More Information. (Japanese Only) | ||
29 | <http://strawberry-linux.com/h8/index.html> | ||
30 | |||
31 | config H8300H_SIM | ||
32 | bool "H8/300H Simulator" | ||
33 | select H83007 | ||
34 | help | ||
35 | GDB Simulator Support | ||
36 | More Information. | ||
37 | <http://sourceware.org/sid/> | ||
38 | |||
39 | config H8S_GENERIC | ||
40 | bool "H8S Generic" | ||
41 | help | ||
42 | H8S CPU Generic Hardware Support | ||
43 | |||
44 | config H8S_EDOSK2674 | ||
45 | bool "EDOSK-2674" | ||
46 | select H8S2678 | ||
47 | help | ||
48 | Renesas EDOSK-2674 Evaluation Board Support | ||
49 | More Information. | ||
50 | <http://www.azpower.com/H8-uClinux/index.html> | ||
51 | <http://www.renesas.eu/products/tools/introductory_evaluation_tools/evaluation_development_os_kits/edosk2674r/edosk2674r_software_tools_root.jsp> | ||
52 | |||
53 | config H8S_SIM | ||
54 | bool "H8S Simulator" | ||
55 | help | ||
56 | GDB Simulator Support | ||
57 | More Information. | ||
58 | <http://sourceware.org/sid/> | ||
59 | |||
60 | endchoice | ||
61 | |||
62 | choice | ||
63 | prompt "CPU Selection" | ||
64 | |||
65 | config H83002 | ||
66 | bool "H8/3001,3002,3003" | ||
67 | depends on BROKEN | ||
68 | select CPU_H8300H | ||
69 | |||
70 | config H83007 | ||
71 | bool "H8/3006,3007" | ||
72 | select CPU_H8300H | ||
73 | |||
74 | config H83048 | ||
75 | bool "H8/3044,3045,3046,3047,3048,3052" | ||
76 | depends on BROKEN | ||
77 | select CPU_H8300H | ||
78 | |||
79 | config H83068 | ||
80 | bool "H8/3065,3066,3067,3068,3069" | ||
81 | select CPU_H8300H | ||
82 | |||
83 | config H8S2678 | ||
84 | bool "H8S/2670,2673,2674R,2675,2676" | ||
85 | select CPU_H8S | ||
86 | |||
87 | endchoice | ||
88 | |||
89 | config CPU_CLOCK | ||
90 | int "CPU Clock Frequency (/1KHz)" | ||
91 | default "20000" | ||
92 | help | ||
93 | CPU Clock Frequency divide to 1000 | ||
94 | |||
95 | choice | ||
96 | prompt "Kernel executes from" | ||
97 | ---help--- | ||
98 | Choose the memory type that the kernel will be running in. | ||
99 | |||
100 | config RAMKERNEL | ||
101 | bool "RAM" | ||
102 | help | ||
103 | The kernel will be resident in RAM when running. | ||
104 | |||
105 | config ROMKERNEL | ||
106 | bool "ROM" | ||
107 | help | ||
108 | The kernel will be resident in FLASH/ROM when running. | ||
109 | endchoice | ||
110 | |||
111 | |||
112 | config CPU_H8300H | ||
113 | bool | ||
114 | depends on (H83002 || H83007 || H83048 || H83068) | ||
115 | default y | ||
116 | |||
117 | config CPU_H8S | ||
118 | bool | ||
119 | depends on H8S2678 | ||
120 | default y | ||
121 | |||
122 | choice | ||
123 | prompt "Timer" | ||
124 | config H8300_TIMER8 | ||
125 | bool "8bit timer (2ch cascade)" | ||
126 | depends on (H83007 || H83068 || H8S2678) | ||
127 | |||
128 | config H8300_TIMER16 | ||
129 | bool "16bit timer" | ||
130 | depends on (H83007 || H83068) | ||
131 | |||
132 | config H8300_ITU | ||
133 | bool "ITU" | ||
134 | depends on (H83002 || H83048) | ||
135 | |||
136 | config H8300_TPU | ||
137 | bool "TPU" | ||
138 | depends on H8S2678 | ||
139 | endchoice | ||
140 | |||
141 | if H8300_TIMER8 | ||
142 | choice | ||
143 | prompt "Timer Channel" | ||
144 | config H8300_TIMER8_CH0 | ||
145 | bool "Channel 0" | ||
146 | config H8300_TIMER8_CH2 | ||
147 | bool "Channel 2" | ||
148 | depends on CPU_H8300H | ||
149 | endchoice | ||
150 | endif | ||
151 | |||
152 | config H8300_TIMER16_CH | ||
153 | int "16bit timer channel (0 - 2)" | ||
154 | depends on H8300_TIMER16 | ||
155 | range 0 2 | ||
156 | |||
157 | config H8300_ITU_CH | ||
158 | int "ITU channel" | ||
159 | depends on H8300_ITU | ||
160 | range 0 4 | ||
161 | |||
162 | config H8300_TPU_CH | ||
163 | int "TPU channel" | ||
164 | depends on H8300_TPU | ||
165 | range 0 4 | ||
166 | |||
167 | source "kernel/Kconfig.preempt" | ||
168 | |||
169 | source "mm/Kconfig" | ||
170 | |||
171 | endmenu | ||
diff --git a/arch/h8300/Kconfig.debug b/arch/h8300/Kconfig.debug deleted file mode 100644 index e8d1b236ad8c..000000000000 --- a/arch/h8300/Kconfig.debug +++ /dev/null | |||
@@ -1,68 +0,0 @@ | |||
1 | menu "Kernel hacking" | ||
2 | |||
3 | source "lib/Kconfig.debug" | ||
4 | |||
5 | config FULLDEBUG | ||
6 | bool "Full Symbolic/Source Debugging support" | ||
7 | help | ||
8 | Enable debugging symbols on kernel build. | ||
9 | |||
10 | config HIGHPROFILE | ||
11 | bool "Use fast second timer for profiling" | ||
12 | help | ||
13 | Use a fast secondary clock to produce profiling information. | ||
14 | |||
15 | config NO_KERNEL_MSG | ||
16 | bool "Suppress Kernel BUG Messages" | ||
17 | help | ||
18 | Do not output any debug BUG messages within the kernel. | ||
19 | |||
20 | config GDB_MAGICPRINT | ||
21 | bool "Message Output for GDB MagicPrint service" | ||
22 | depends on (H8300H_SIM || H8S_SIM) | ||
23 | help | ||
24 | kernel messages output using MagicPrint service from GDB | ||
25 | |||
26 | config SYSCALL_PRINT | ||
27 | bool "SystemCall trace print" | ||
28 | help | ||
29 | output history of systemcall | ||
30 | |||
31 | config GDB_DEBUG | ||
32 | bool "Use gdb stub" | ||
33 | depends on (!H8300H_SIM && !H8S_SIM) | ||
34 | help | ||
35 | gdb stub exception support | ||
36 | |||
37 | config SH_STANDARD_BIOS | ||
38 | bool "Use gdb protocol serial console" | ||
39 | depends on (!H8300H_SIM && !H8S_SIM) | ||
40 | help | ||
41 | serial console output using GDB protocol. | ||
42 | Require eCos/RedBoot | ||
43 | |||
44 | config DEFAULT_CMDLINE | ||
45 | bool "Use builtin commandline" | ||
46 | default n | ||
47 | help | ||
48 | builtin kernel commandline enabled. | ||
49 | |||
50 | config KERNEL_COMMAND | ||
51 | string "Buildin command string" | ||
52 | depends on DEFAULT_CMDLINE | ||
53 | help | ||
54 | builtin kernel commandline strings. | ||
55 | |||
56 | config BLKDEV_RESERVE | ||
57 | bool "BLKDEV Reserved Memory" | ||
58 | default n | ||
59 | help | ||
60 | Reserved BLKDEV area. | ||
61 | |||
62 | config BLKDEV_RESERVE_ADDRESS | ||
63 | hex 'start address' | ||
64 | depends on BLKDEV_RESERVE | ||
65 | help | ||
66 | BLKDEV start address. | ||
67 | |||
68 | endmenu | ||
diff --git a/arch/h8300/Kconfig.ide b/arch/h8300/Kconfig.ide deleted file mode 100644 index a38a63054ac2..000000000000 --- a/arch/h8300/Kconfig.ide +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | # uClinux H8/300 Target Board Selection Menu (IDE) | ||
2 | |||
3 | if (H8300H_AKI3068NET) | ||
4 | menu "IDE Extra configuration" | ||
5 | |||
6 | config H8300_IDE_BASE | ||
7 | hex "IDE register base address" | ||
8 | depends on IDE | ||
9 | default 0 | ||
10 | help | ||
11 | IDE registers base address | ||
12 | |||
13 | config H8300_IDE_ALT | ||
14 | hex "IDE register alternate address" | ||
15 | depends on IDE | ||
16 | default 0 | ||
17 | help | ||
18 | IDE alternate registers address | ||
19 | |||
20 | config H8300_IDE_IRQ | ||
21 | int "IDE IRQ no" | ||
22 | depends on IDE | ||
23 | default 0 | ||
24 | help | ||
25 | IDE use IRQ no | ||
26 | endmenu | ||
27 | endif | ||
28 | |||
29 | if (H8300H_H8MAX) | ||
30 | config H8300_IDE_BASE | ||
31 | hex | ||
32 | depends on IDE | ||
33 | default 0x200000 | ||
34 | |||
35 | config H8300_IDE_ALT | ||
36 | hex | ||
37 | depends on IDE | ||
38 | default 0x60000c | ||
39 | |||
40 | config H8300_IDE_IRQ | ||
41 | int | ||
42 | depends on IDE | ||
43 | default 5 | ||
44 | endif | ||
diff --git a/arch/h8300/Makefile b/arch/h8300/Makefile deleted file mode 100644 index a556447877b4..000000000000 --- a/arch/h8300/Makefile +++ /dev/null | |||
@@ -1,71 +0,0 @@ | |||
1 | # | ||
2 | # arch/h8300/Makefile | ||
3 | # | ||
4 | # This file is subject to the terms and conditions of the GNU General Public | ||
5 | # License. See the file "COPYING" in the main directory of this archive | ||
6 | # for more details. | ||
7 | # | ||
8 | # (C) Copyright 2002,2003 Yoshinori Sato <ysato@users.sourceforge.jp> | ||
9 | # | ||
10 | |||
11 | platform-$(CONFIG_CPU_H8300H) := h8300h | ||
12 | platform-$(CONFIG_CPU_H8S) := h8s | ||
13 | PLATFORM := $(platform-y) | ||
14 | |||
15 | board-$(CONFIG_H8300H_GENERIC) := generic | ||
16 | board-$(CONFIG_H8300H_AKI3068NET) := aki3068net | ||
17 | board-$(CONFIG_H8300H_H8MAX) := h8max | ||
18 | board-$(CONFIG_H8300H_SIM) := generic | ||
19 | board-$(CONFIG_H8S_GENERIC) := generic | ||
20 | board-$(CONFIG_H8S_EDOSK2674) := edosk2674 | ||
21 | board-$(CONFIG_H8S_SIM) := generic | ||
22 | BOARD := $(board-y) | ||
23 | |||
24 | model-$(CONFIG_RAMKERNEL) := ram | ||
25 | model-$(CONFIG_ROMKERNEL) := rom | ||
26 | MODEL := $(model-y) | ||
27 | |||
28 | cflags-$(CONFIG_CPU_H8300H) := -mh | ||
29 | ldflags-$(CONFIG_CPU_H8300H) := -mh8300helf | ||
30 | cflags-$(CONFIG_CPU_H8S) := -ms | ||
31 | ldflags-$(CONFIG_CPU_H8S) := -mh8300self | ||
32 | |||
33 | KBUILD_CFLAGS += $(cflags-y) | ||
34 | KBUILD_CFLAGS += -mint32 -fno-builtin | ||
35 | KBUILD_CFLAGS += -g | ||
36 | KBUILD_CFLAGS += -D__linux__ | ||
37 | KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\" | ||
38 | KBUILD_AFLAGS += -DPLATFORM=$(PLATFORM) -DMODEL=$(MODEL) $(cflags-y) | ||
39 | LDFLAGS += $(ldflags-y) | ||
40 | |||
41 | CROSS_COMPILE = h8300-elf- | ||
42 | LIBGCC := $(shell $(CROSS-COMPILE)$(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) | ||
43 | |||
44 | head-y := arch/$(ARCH)/platform/$(PLATFORM)/$(BOARD)/crt0_$(MODEL).o | ||
45 | |||
46 | core-y += arch/$(ARCH)/kernel/ \ | ||
47 | arch/$(ARCH)/mm/ | ||
48 | ifdef PLATFORM | ||
49 | core-y += arch/$(ARCH)/platform/$(PLATFORM)/ \ | ||
50 | arch/$(ARCH)/platform/$(PLATFORM)/$(BOARD)/ | ||
51 | endif | ||
52 | |||
53 | libs-y += arch/$(ARCH)/lib/ $(LIBGCC) | ||
54 | |||
55 | boot := arch/h8300/boot | ||
56 | |||
57 | export MODEL PLATFORM BOARD | ||
58 | |||
59 | archmrproper: | ||
60 | |||
61 | archclean: | ||
62 | $(Q)$(MAKE) $(clean)=$(boot) | ||
63 | |||
64 | vmlinux.srec vmlinux.bin zImage: vmlinux | ||
65 | $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ | ||
66 | |||
67 | define archhelp | ||
68 | @echo 'vmlinux.bin - Create raw binary' | ||
69 | @echo 'vmlinux.srec - Create srec binary' | ||
70 | @echo 'zImage - Compressed kernel image' | ||
71 | endef | ||
diff --git a/arch/h8300/README b/arch/h8300/README deleted file mode 100644 index efa805fda19b..000000000000 --- a/arch/h8300/README +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | linux-2.6 for H8/300 README | ||
2 | Yoshinori Sato <ysato@users.sourceforge.jp> | ||
3 | |||
4 | * Supported CPU | ||
5 | H8/300H and H8S | ||
6 | |||
7 | * Supported Target | ||
8 | 1.simulator of GDB | ||
9 | require patches. | ||
10 | |||
11 | 2.AE 3068/AE 3069 | ||
12 | more information | ||
13 | MICROTRONIQUE <http://www.microtronique.com/> | ||
14 | Akizuki Denshi Tsusho Ltd. <http://akizukidenshi.com/> (Japanese Only) | ||
15 | |||
16 | 3.H8MAX | ||
17 | see http://ip-sol.jp/h8max/ (Japanese Only) | ||
18 | |||
19 | 4.EDOSK2674 | ||
20 | see http://www.eu.renesas.com/products/mpumcu/tool/edk/support/edosk2674.html | ||
21 | http://www.uclinux.org/pub/uClinux/ports/h8/HITACHI-EDOSK2674-HOWTO | ||
22 | http://www.azpower.com/H8-uClinux/ | ||
23 | |||
24 | * Toolchain Version | ||
25 | gcc-3.1 or higher and patch | ||
26 | see arch/h8300/tools_patch/README | ||
27 | binutils-2.12 or higher | ||
28 | gdb-5.2 or higher | ||
29 | The environment that can compile a h8300-elf binary is necessary. | ||
30 | |||
31 | * Userland Develop environment | ||
32 | used h8300-elf toolchains. | ||
33 | see http://www.uclinux.org/pub/uClinux/ports/h8/ | ||
34 | |||
35 | * A few words of thanks | ||
36 | Porting to H8/300 serieses is support of Information-technology Promotion Agency, Japan. | ||
37 | I thank support. | ||
38 | and All developer/user. | ||
diff --git a/arch/h8300/boot/Makefile b/arch/h8300/boot/Makefile deleted file mode 100644 index 0bb62e064eea..000000000000 --- a/arch/h8300/boot/Makefile +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | # arch/h8300/boot/Makefile | ||
2 | |||
3 | targets := vmlinux.srec vmlinux.bin zImage | ||
4 | subdir- := compressed | ||
5 | |||
6 | OBJCOPYFLAGS_vmlinux.srec := -Osrec | ||
7 | OBJCOPYFLAGS_vmlinux.bin := -Obinary | ||
8 | OBJCOPYFLAGS_zImage := -O binary -R .note -R .comment -R .stab -R .stabstr -S | ||
9 | |||
10 | $(obj)/vmlinux.srec $(obj)/vmlinux.bin: vmlinux FORCE | ||
11 | $(call if_changed,objcopy) | ||
12 | @echo ' Kernel: $@ is ready' | ||
13 | |||
14 | $(obj)/zImage: $(obj)/compressed/vmlinux FORCE | ||
15 | $(call if_changed,objcopy) | ||
16 | @echo 'Kernel: $@ is ready' | ||
17 | |||
18 | $(obj)/compressed/vmlinux: FORCE | ||
19 | $(Q)$(MAKE) $(build)=$(obj)/compressed $@ | ||
20 | |||
21 | CLEAN_FILES += arch/$(ARCH)/vmlinux.bin arch/$(ARCH)/vmlinux.srec | ||
22 | |||
diff --git a/arch/h8300/boot/compressed/Makefile b/arch/h8300/boot/compressed/Makefile deleted file mode 100644 index a6c98fe3bbc3..000000000000 --- a/arch/h8300/boot/compressed/Makefile +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | # | ||
2 | # linux/arch/sh/boot/compressed/Makefile | ||
3 | # | ||
4 | # create a compressed vmlinux image from the original vmlinux | ||
5 | # | ||
6 | |||
7 | targets := vmlinux vmlinux.bin vmlinux.bin.gz head.o misc.o piggy.o | ||
8 | asflags-y := -traditional | ||
9 | |||
10 | OBJECTS = $(obj)/head.o $(obj)/misc.o | ||
11 | |||
12 | # | ||
13 | # IMAGE_OFFSET is the load offset of the compression loader | ||
14 | # Assign dummy values if these 2 variables are not defined, | ||
15 | # in order to suppress error message. | ||
16 | # | ||
17 | CONFIG_MEMORY_START ?= 0x00400000 | ||
18 | CONFIG_BOOT_LINK_OFFSET ?= 0x00140000 | ||
19 | IMAGE_OFFSET := $(shell printf "0x%08x" $$(($(CONFIG_MEMORY_START)+$(CONFIG_BOOT_LINK_OFFSET)))) | ||
20 | |||
21 | LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -estartup $(obj)/vmlinux.lds | ||
22 | |||
23 | $(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o FORCE | ||
24 | $(call if_changed,ld) | ||
25 | @: | ||
26 | |||
27 | $(obj)/vmlinux.bin: vmlinux FORCE | ||
28 | $(call if_changed,objcopy) | ||
29 | |||
30 | $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE | ||
31 | $(call if_changed,gzip) | ||
32 | |||
33 | LDFLAGS_piggy.o := -r --format binary --oformat elf32-h8300 -T | ||
34 | OBJCOPYFLAGS := -O binary | ||
35 | |||
36 | $(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.gz FORCE | ||
37 | $(call if_changed,ld) | ||
diff --git a/arch/h8300/boot/compressed/head.S b/arch/h8300/boot/compressed/head.S deleted file mode 100644 index 10e9a2d1cc6c..000000000000 --- a/arch/h8300/boot/compressed/head.S +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/h8300/boot/compressed/head.S | ||
3 | * | ||
4 | * Copyright (C) 2006 Yoshinori Sato | ||
5 | */ | ||
6 | |||
7 | .h8300h | ||
8 | #include <linux/linkage.h> | ||
9 | |||
10 | #define SRAM_START 0xff4000 | ||
11 | |||
12 | .section .text..startup | ||
13 | .global startup | ||
14 | startup: | ||
15 | mov.l #SRAM_START+0x8000, sp | ||
16 | mov.l #__sbss, er0 | ||
17 | mov.l #__ebss, er1 | ||
18 | sub.l er0, er1 | ||
19 | shlr er1 | ||
20 | shlr er1 | ||
21 | sub.l er2, er2 | ||
22 | 1: | ||
23 | mov.l er2, @er0 | ||
24 | adds #4, er0 | ||
25 | dec.l #1, er1 | ||
26 | bne 1b | ||
27 | jsr @_decompress_kernel | ||
28 | jmp @0x400000 | ||
29 | |||
30 | .align 9 | ||
31 | fake_headers_as_bzImage: | ||
32 | .word 0 | ||
33 | .ascii "HdrS" ; header signature | ||
34 | .word 0x0202 ; header version number (>= 0x0105) | ||
35 | ; or else old loadlin-1.5 will fail) | ||
36 | .word 0 ; default_switch | ||
37 | .word 0 ; SETUPSEG | ||
38 | .word 0x1000 | ||
39 | .word 0 ; pointing to kernel version string | ||
40 | .byte 0 ; = 0, old one (LILO, Loadlin, | ||
41 | ; 0xTV: T=0 for LILO | ||
42 | ; V = version | ||
43 | .byte 1 ; Load flags bzImage=1 | ||
44 | .word 0x8000 ; size to move, when setup is not | ||
45 | .long 0x100000 ; 0x100000 = default for big kernel | ||
46 | .long 0 ; address of loaded ramdisk image | ||
47 | .long 0 ; its size in bytes | ||
diff --git a/arch/h8300/boot/compressed/misc.c b/arch/h8300/boot/compressed/misc.c deleted file mode 100644 index 4a1e3dd43948..000000000000 --- a/arch/h8300/boot/compressed/misc.c +++ /dev/null | |||
@@ -1,180 +0,0 @@ | |||
1 | /* | ||
2 | * arch/h8300/boot/compressed/misc.c | ||
3 | * | ||
4 | * This is a collection of several routines from gzip-1.0.3 | ||
5 | * adapted for Linux. | ||
6 | * | ||
7 | * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994 | ||
8 | * | ||
9 | * Adapted for h8300 by Yoshinori Sato 2006 | ||
10 | */ | ||
11 | |||
12 | #include <asm/uaccess.h> | ||
13 | |||
14 | /* | ||
15 | * gzip declarations | ||
16 | */ | ||
17 | |||
18 | #define OF(args) args | ||
19 | #define STATIC static | ||
20 | |||
21 | #undef memset | ||
22 | #undef memcpy | ||
23 | #define memzero(s, n) memset ((s), 0, (n)) | ||
24 | |||
25 | typedef unsigned char uch; | ||
26 | typedef unsigned short ush; | ||
27 | typedef unsigned long ulg; | ||
28 | |||
29 | #define WSIZE 0x8000 /* Window size must be at least 32k, */ | ||
30 | /* and a power of two */ | ||
31 | |||
32 | static uch *inbuf; /* input buffer */ | ||
33 | static uch window[WSIZE]; /* Sliding window buffer */ | ||
34 | |||
35 | static unsigned insize = 0; /* valid bytes in inbuf */ | ||
36 | static unsigned inptr = 0; /* index of next byte to be processed in inbuf */ | ||
37 | static unsigned outcnt = 0; /* bytes in output buffer */ | ||
38 | |||
39 | /* gzip flag byte */ | ||
40 | #define ASCII_FLAG 0x01 /* bit 0 set: file probably ASCII text */ | ||
41 | #define CONTINUATION 0x02 /* bit 1 set: continuation of multi-part gzip file */ | ||
42 | #define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */ | ||
43 | #define ORIG_NAME 0x08 /* bit 3 set: original file name present */ | ||
44 | #define COMMENT 0x10 /* bit 4 set: file comment present */ | ||
45 | #define ENCRYPTED 0x20 /* bit 5 set: file is encrypted */ | ||
46 | #define RESERVED 0xC0 /* bit 6,7: reserved */ | ||
47 | |||
48 | #define get_byte() (inptr < insize ? inbuf[inptr++] : fill_inbuf()) | ||
49 | |||
50 | /* Diagnostic functions */ | ||
51 | #ifdef DEBUG | ||
52 | # define Assert(cond,msg) {if(!(cond)) error(msg);} | ||
53 | # define Trace(x) fprintf x | ||
54 | # define Tracev(x) {if (verbose) fprintf x ;} | ||
55 | # define Tracevv(x) {if (verbose>1) fprintf x ;} | ||
56 | # define Tracec(c,x) {if (verbose && (c)) fprintf x ;} | ||
57 | # define Tracecv(c,x) {if (verbose>1 && (c)) fprintf x ;} | ||
58 | #else | ||
59 | # define Assert(cond,msg) | ||
60 | # define Trace(x) | ||
61 | # define Tracev(x) | ||
62 | # define Tracevv(x) | ||
63 | # define Tracec(c,x) | ||
64 | # define Tracecv(c,x) | ||
65 | #endif | ||
66 | |||
67 | static int fill_inbuf(void); | ||
68 | static void flush_window(void); | ||
69 | static void error(char *m); | ||
70 | |||
71 | extern char input_data[]; | ||
72 | extern int input_len; | ||
73 | |||
74 | static long bytes_out = 0; | ||
75 | static uch *output_data; | ||
76 | static unsigned long output_ptr = 0; | ||
77 | |||
78 | static void error(char *m); | ||
79 | |||
80 | int puts(const char *); | ||
81 | |||
82 | extern int _end; | ||
83 | static unsigned long free_mem_ptr; | ||
84 | static unsigned long free_mem_end_ptr; | ||
85 | |||
86 | #define HEAP_SIZE 0x10000 | ||
87 | |||
88 | #include "../../../../lib/inflate.c" | ||
89 | |||
90 | #define SCR *((volatile unsigned char *)0xffff8a) | ||
91 | #define TDR *((volatile unsigned char *)0xffff8b) | ||
92 | #define SSR *((volatile unsigned char *)0xffff8c) | ||
93 | |||
94 | int puts(const char *s) | ||
95 | { | ||
96 | return 0; | ||
97 | } | ||
98 | |||
99 | void* memset(void* s, int c, size_t n) | ||
100 | { | ||
101 | int i; | ||
102 | char *ss = (char*)s; | ||
103 | |||
104 | for (i=0;i<n;i++) ss[i] = c; | ||
105 | return s; | ||
106 | } | ||
107 | |||
108 | void* memcpy(void* __dest, __const void* __src, | ||
109 | size_t __n) | ||
110 | { | ||
111 | int i; | ||
112 | char *d = (char *)__dest, *s = (char *)__src; | ||
113 | |||
114 | for (i=0;i<__n;i++) d[i] = s[i]; | ||
115 | return __dest; | ||
116 | } | ||
117 | |||
118 | /* =========================================================================== | ||
119 | * Fill the input buffer. This is called only when the buffer is empty | ||
120 | * and at least one byte is really needed. | ||
121 | */ | ||
122 | static int fill_inbuf(void) | ||
123 | { | ||
124 | if (insize != 0) { | ||
125 | error("ran out of input data"); | ||
126 | } | ||
127 | |||
128 | inbuf = input_data; | ||
129 | insize = input_len; | ||
130 | inptr = 1; | ||
131 | return inbuf[0]; | ||
132 | } | ||
133 | |||
134 | /* =========================================================================== | ||
135 | * Write the output window window[0..outcnt-1] and update crc and bytes_out. | ||
136 | * (Used for the decompressed data only.) | ||
137 | */ | ||
138 | static void flush_window(void) | ||
139 | { | ||
140 | ulg c = crc; /* temporary variable */ | ||
141 | unsigned n; | ||
142 | uch *in, *out, ch; | ||
143 | |||
144 | in = window; | ||
145 | out = &output_data[output_ptr]; | ||
146 | for (n = 0; n < outcnt; n++) { | ||
147 | ch = *out++ = *in++; | ||
148 | c = crc_32_tab[((int)c ^ ch) & 0xff] ^ (c >> 8); | ||
149 | } | ||
150 | crc = c; | ||
151 | bytes_out += (ulg)outcnt; | ||
152 | output_ptr += (ulg)outcnt; | ||
153 | outcnt = 0; | ||
154 | } | ||
155 | |||
156 | static void error(char *x) | ||
157 | { | ||
158 | puts("\n\n"); | ||
159 | puts(x); | ||
160 | puts("\n\n -- System halted"); | ||
161 | |||
162 | while(1); /* Halt */ | ||
163 | } | ||
164 | |||
165 | #define STACK_SIZE (4096) | ||
166 | long user_stack [STACK_SIZE]; | ||
167 | long* stack_start = &user_stack[STACK_SIZE]; | ||
168 | |||
169 | void decompress_kernel(void) | ||
170 | { | ||
171 | output_data = 0; | ||
172 | output_ptr = (unsigned long)0x400000; | ||
173 | free_mem_ptr = (unsigned long)&_end; | ||
174 | free_mem_end_ptr = free_mem_ptr + HEAP_SIZE; | ||
175 | |||
176 | makecrc(); | ||
177 | puts("Uncompressing Linux... "); | ||
178 | gunzip(); | ||
179 | puts("Ok, booting the kernel.\n"); | ||
180 | } | ||
diff --git a/arch/h8300/boot/compressed/vmlinux.lds b/arch/h8300/boot/compressed/vmlinux.lds deleted file mode 100644 index a0a3a0ed54ef..000000000000 --- a/arch/h8300/boot/compressed/vmlinux.lds +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | SECTIONS | ||
2 | { | ||
3 | .text : | ||
4 | { | ||
5 | __stext = . ; | ||
6 | __text = .; | ||
7 | *(.text..startup) | ||
8 | *(.text) | ||
9 | __etext = . ; | ||
10 | } | ||
11 | |||
12 | .rodata : | ||
13 | { | ||
14 | *(.rodata) | ||
15 | } | ||
16 | .data : | ||
17 | |||
18 | { | ||
19 | __sdata = . ; | ||
20 | ___data_start = . ; | ||
21 | *(.data.*) | ||
22 | } | ||
23 | .bss : | ||
24 | { | ||
25 | . = ALIGN(0x4) ; | ||
26 | __sbss = . ; | ||
27 | *(.bss*) | ||
28 | . = ALIGN(0x4) ; | ||
29 | __ebss = . ; | ||
30 | __end = . ; | ||
31 | } | ||
32 | } | ||
diff --git a/arch/h8300/boot/compressed/vmlinux.scr b/arch/h8300/boot/compressed/vmlinux.scr deleted file mode 100644 index a0f6962736e9..000000000000 --- a/arch/h8300/boot/compressed/vmlinux.scr +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | SECTIONS | ||
2 | { | ||
3 | .data : { | ||
4 | _input_len = .; | ||
5 | LONG(_input_data_end - _input_data) _input_data = .; | ||
6 | *(.data) | ||
7 | _input_data_end = .; | ||
8 | } | ||
9 | } | ||
diff --git a/arch/h8300/defconfig b/arch/h8300/defconfig deleted file mode 100644 index 042425a02645..000000000000 --- a/arch/h8300/defconfig +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | # CONFIG_LOCALVERSION_AUTO is not set | ||
3 | CONFIG_LOG_BUF_SHIFT=14 | ||
4 | CONFIG_EXPERT=y | ||
5 | # CONFIG_UID16 is not set | ||
6 | # CONFIG_SYSCTL_SYSCALL is not set | ||
7 | # CONFIG_KALLSYMS is not set | ||
8 | # CONFIG_HOTPLUG is not set | ||
9 | # CONFIG_BASE_FULL is not set | ||
10 | # CONFIG_FUTEX is not set | ||
11 | # CONFIG_EPOLL is not set | ||
12 | # CONFIG_SIGNALFD is not set | ||
13 | # CONFIG_TIMERFD is not set | ||
14 | # CONFIG_EVENTFD is not set | ||
15 | # CONFIG_VM_EVENT_COUNTERS is not set | ||
16 | # CONFIG_COMPAT_BRK is not set | ||
17 | CONFIG_SLOB=y | ||
18 | # CONFIG_BLK_DEV_BSG is not set | ||
19 | # CONFIG_IOSCHED_DEADLINE is not set | ||
20 | # CONFIG_IOSCHED_CFQ is not set | ||
21 | CONFIG_H83007=y | ||
22 | CONFIG_BINFMT_FLAT=y | ||
23 | CONFIG_BINFMT_ZFLAT=y | ||
24 | CONFIG_BINFMT_MISC=y | ||
25 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | ||
26 | CONFIG_MTD=y | ||
27 | CONFIG_MTD_PARTITIONS=y | ||
28 | CONFIG_MTD_REDBOOT_PARTS=y | ||
29 | CONFIG_MTD_CHAR=y | ||
30 | CONFIG_MTD_RAM=y | ||
31 | CONFIG_MTD_ROM=y | ||
32 | CONFIG_MTD_UCLINUX=y | ||
33 | # CONFIG_BLK_DEV is not set | ||
34 | # CONFIG_INPUT is not set | ||
35 | # CONFIG_SERIO is not set | ||
36 | # CONFIG_HWMON is not set | ||
37 | # CONFIG_USB_SUPPORT is not set | ||
38 | # CONFIG_DNOTIFY is not set | ||
39 | CONFIG_ROMFS_FS=y | ||
40 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
41 | # CONFIG_ENABLE_MUST_CHECK is not set | ||
42 | # CONFIG_CRC32 is not set | ||
diff --git a/arch/h8300/include/asm/Kbuild b/arch/h8300/include/asm/Kbuild deleted file mode 100644 index 7e0e7213a481..000000000000 --- a/arch/h8300/include/asm/Kbuild +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | |||
2 | generic-y += clkdev.h | ||
3 | generic-y += exec.h | ||
4 | generic-y += linkage.h | ||
5 | generic-y += mmu.h | ||
6 | generic-y += module.h | ||
7 | generic-y += trace_clock.h | ||
8 | generic-y += xor.h | ||
9 | generic-y += preempt.h | ||
diff --git a/arch/h8300/include/asm/asm-offsets.h b/arch/h8300/include/asm/asm-offsets.h deleted file mode 100644 index d370ee36a182..000000000000 --- a/arch/h8300/include/asm/asm-offsets.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <generated/asm-offsets.h> | ||
diff --git a/arch/h8300/include/asm/atomic.h b/arch/h8300/include/asm/atomic.h deleted file mode 100644 index 40901e353c21..000000000000 --- a/arch/h8300/include/asm/atomic.h +++ /dev/null | |||
@@ -1,146 +0,0 @@ | |||
1 | #ifndef __ARCH_H8300_ATOMIC__ | ||
2 | #define __ARCH_H8300_ATOMIC__ | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | #include <asm/cmpxchg.h> | ||
6 | |||
7 | /* | ||
8 | * Atomic operations that C can't guarantee us. Useful for | ||
9 | * resource counting etc.. | ||
10 | */ | ||
11 | |||
12 | #define ATOMIC_INIT(i) { (i) } | ||
13 | |||
14 | #define atomic_read(v) (*(volatile int *)&(v)->counter) | ||
15 | #define atomic_set(v, i) (((v)->counter) = i) | ||
16 | |||
17 | #include <linux/kernel.h> | ||
18 | |||
19 | static __inline__ int atomic_add_return(int i, atomic_t *v) | ||
20 | { | ||
21 | unsigned long flags; | ||
22 | int ret; | ||
23 | local_irq_save(flags); | ||
24 | ret = v->counter += i; | ||
25 | local_irq_restore(flags); | ||
26 | return ret; | ||
27 | } | ||
28 | |||
29 | #define atomic_add(i, v) atomic_add_return(i, v) | ||
30 | #define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0) | ||
31 | |||
32 | static __inline__ int atomic_sub_return(int i, atomic_t *v) | ||
33 | { | ||
34 | unsigned long flags; | ||
35 | int ret; | ||
36 | local_irq_save(flags); | ||
37 | ret = v->counter -= i; | ||
38 | local_irq_restore(flags); | ||
39 | return ret; | ||
40 | } | ||
41 | |||
42 | #define atomic_sub(i, v) atomic_sub_return(i, v) | ||
43 | #define atomic_sub_and_test(i,v) (atomic_sub_return(i, v) == 0) | ||
44 | |||
45 | static __inline__ int atomic_inc_return(atomic_t *v) | ||
46 | { | ||
47 | unsigned long flags; | ||
48 | int ret; | ||
49 | local_irq_save(flags); | ||
50 | v->counter++; | ||
51 | ret = v->counter; | ||
52 | local_irq_restore(flags); | ||
53 | return ret; | ||
54 | } | ||
55 | |||
56 | #define atomic_inc(v) atomic_inc_return(v) | ||
57 | |||
58 | /* | ||
59 | * atomic_inc_and_test - increment and test | ||
60 | * @v: pointer of type atomic_t | ||
61 | * | ||
62 | * Atomically increments @v by 1 | ||
63 | * and returns true if the result is zero, or false for all | ||
64 | * other cases. | ||
65 | */ | ||
66 | #define atomic_inc_and_test(v) (atomic_inc_return(v) == 0) | ||
67 | |||
68 | static __inline__ int atomic_dec_return(atomic_t *v) | ||
69 | { | ||
70 | unsigned long flags; | ||
71 | int ret; | ||
72 | local_irq_save(flags); | ||
73 | --v->counter; | ||
74 | ret = v->counter; | ||
75 | local_irq_restore(flags); | ||
76 | return ret; | ||
77 | } | ||
78 | |||
79 | #define atomic_dec(v) atomic_dec_return(v) | ||
80 | |||
81 | static __inline__ int atomic_dec_and_test(atomic_t *v) | ||
82 | { | ||
83 | unsigned long flags; | ||
84 | int ret; | ||
85 | local_irq_save(flags); | ||
86 | --v->counter; | ||
87 | ret = v->counter; | ||
88 | local_irq_restore(flags); | ||
89 | return ret == 0; | ||
90 | } | ||
91 | |||
92 | static inline int atomic_cmpxchg(atomic_t *v, int old, int new) | ||
93 | { | ||
94 | int ret; | ||
95 | unsigned long flags; | ||
96 | |||
97 | local_irq_save(flags); | ||
98 | ret = v->counter; | ||
99 | if (likely(ret == old)) | ||
100 | v->counter = new; | ||
101 | local_irq_restore(flags); | ||
102 | return ret; | ||
103 | } | ||
104 | |||
105 | static inline int __atomic_add_unless(atomic_t *v, int a, int u) | ||
106 | { | ||
107 | int ret; | ||
108 | unsigned long flags; | ||
109 | |||
110 | local_irq_save(flags); | ||
111 | ret = v->counter; | ||
112 | if (ret != u) | ||
113 | v->counter += a; | ||
114 | local_irq_restore(flags); | ||
115 | return ret; | ||
116 | } | ||
117 | |||
118 | static __inline__ void atomic_clear_mask(unsigned long mask, unsigned long *v) | ||
119 | { | ||
120 | __asm__ __volatile__("stc ccr,r1l\n\t" | ||
121 | "orc #0x80,ccr\n\t" | ||
122 | "mov.l %0,er0\n\t" | ||
123 | "and.l %1,er0\n\t" | ||
124 | "mov.l er0,%0\n\t" | ||
125 | "ldc r1l,ccr" | ||
126 | : "=m" (*v) : "g" (~(mask)) :"er0","er1"); | ||
127 | } | ||
128 | |||
129 | static __inline__ void atomic_set_mask(unsigned long mask, unsigned long *v) | ||
130 | { | ||
131 | __asm__ __volatile__("stc ccr,r1l\n\t" | ||
132 | "orc #0x80,ccr\n\t" | ||
133 | "mov.l %0,er0\n\t" | ||
134 | "or.l %1,er0\n\t" | ||
135 | "mov.l er0,%0\n\t" | ||
136 | "ldc r1l,ccr" | ||
137 | : "=m" (*v) : "g" (mask) :"er0","er1"); | ||
138 | } | ||
139 | |||
140 | /* Atomic operations are already serializing */ | ||
141 | #define smp_mb__before_atomic_dec() barrier() | ||
142 | #define smp_mb__after_atomic_dec() barrier() | ||
143 | #define smp_mb__before_atomic_inc() barrier() | ||
144 | #define smp_mb__after_atomic_inc() barrier() | ||
145 | |||
146 | #endif /* __ARCH_H8300_ATOMIC __ */ | ||
diff --git a/arch/h8300/include/asm/barrier.h b/arch/h8300/include/asm/barrier.h deleted file mode 100644 index 9e0aa9fc195d..000000000000 --- a/arch/h8300/include/asm/barrier.h +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | #ifndef _H8300_BARRIER_H | ||
2 | #define _H8300_BARRIER_H | ||
3 | |||
4 | #define nop() asm volatile ("nop"::) | ||
5 | |||
6 | /* | ||
7 | * Force strict CPU ordering. | ||
8 | * Not really required on H8... | ||
9 | */ | ||
10 | #define mb() asm volatile ("" : : :"memory") | ||
11 | #define rmb() asm volatile ("" : : :"memory") | ||
12 | #define wmb() asm volatile ("" : : :"memory") | ||
13 | #define set_mb(var, value) do { xchg(&var, value); } while (0) | ||
14 | |||
15 | #define read_barrier_depends() do { } while (0) | ||
16 | |||
17 | #ifdef CONFIG_SMP | ||
18 | #define smp_mb() mb() | ||
19 | #define smp_rmb() rmb() | ||
20 | #define smp_wmb() wmb() | ||
21 | #define smp_read_barrier_depends() read_barrier_depends() | ||
22 | #else | ||
23 | #define smp_mb() barrier() | ||
24 | #define smp_rmb() barrier() | ||
25 | #define smp_wmb() barrier() | ||
26 | #define smp_read_barrier_depends() do { } while(0) | ||
27 | #endif | ||
28 | |||
29 | #endif /* _H8300_BARRIER_H */ | ||
diff --git a/arch/h8300/include/asm/bitops.h b/arch/h8300/include/asm/bitops.h deleted file mode 100644 index eb34e0cd33d5..000000000000 --- a/arch/h8300/include/asm/bitops.h +++ /dev/null | |||
@@ -1,211 +0,0 @@ | |||
1 | #ifndef _H8300_BITOPS_H | ||
2 | #define _H8300_BITOPS_H | ||
3 | |||
4 | /* | ||
5 | * Copyright 1992, Linus Torvalds. | ||
6 | * Copyright 2002, Yoshinori Sato | ||
7 | */ | ||
8 | |||
9 | #include <linux/compiler.h> | ||
10 | |||
11 | #ifdef __KERNEL__ | ||
12 | |||
13 | #ifndef _LINUX_BITOPS_H | ||
14 | #error only <linux/bitops.h> can be included directly | ||
15 | #endif | ||
16 | |||
17 | /* | ||
18 | * Function prototypes to keep gcc -Wall happy | ||
19 | */ | ||
20 | |||
21 | /* | ||
22 | * ffz = Find First Zero in word. Undefined if no zero exists, | ||
23 | * so code should check against ~0UL first.. | ||
24 | */ | ||
25 | static __inline__ unsigned long ffz(unsigned long word) | ||
26 | { | ||
27 | unsigned long result; | ||
28 | |||
29 | result = -1; | ||
30 | __asm__("1:\n\t" | ||
31 | "shlr.l %2\n\t" | ||
32 | "adds #1,%0\n\t" | ||
33 | "bcs 1b" | ||
34 | : "=r" (result) | ||
35 | : "0" (result),"r" (word)); | ||
36 | return result; | ||
37 | } | ||
38 | |||
39 | #define H8300_GEN_BITOP_CONST(OP,BIT) \ | ||
40 | case BIT: \ | ||
41 | __asm__(OP " #" #BIT ",@%0"::"r"(b_addr):"memory"); \ | ||
42 | break; | ||
43 | |||
44 | #define H8300_GEN_BITOP(FNAME,OP) \ | ||
45 | static __inline__ void FNAME(int nr, volatile unsigned long* addr) \ | ||
46 | { \ | ||
47 | volatile unsigned char *b_addr; \ | ||
48 | b_addr = (volatile unsigned char *)addr + ((nr >> 3) ^ 3); \ | ||
49 | if (__builtin_constant_p(nr)) { \ | ||
50 | switch(nr & 7) { \ | ||
51 | H8300_GEN_BITOP_CONST(OP,0) \ | ||
52 | H8300_GEN_BITOP_CONST(OP,1) \ | ||
53 | H8300_GEN_BITOP_CONST(OP,2) \ | ||
54 | H8300_GEN_BITOP_CONST(OP,3) \ | ||
55 | H8300_GEN_BITOP_CONST(OP,4) \ | ||
56 | H8300_GEN_BITOP_CONST(OP,5) \ | ||
57 | H8300_GEN_BITOP_CONST(OP,6) \ | ||
58 | H8300_GEN_BITOP_CONST(OP,7) \ | ||
59 | } \ | ||
60 | } else { \ | ||
61 | __asm__(OP " %w0,@%1"::"r"(nr),"r"(b_addr):"memory"); \ | ||
62 | } \ | ||
63 | } | ||
64 | |||
65 | /* | ||
66 | * clear_bit() doesn't provide any barrier for the compiler. | ||
67 | */ | ||
68 | #define smp_mb__before_clear_bit() barrier() | ||
69 | #define smp_mb__after_clear_bit() barrier() | ||
70 | |||
71 | H8300_GEN_BITOP(set_bit ,"bset") | ||
72 | H8300_GEN_BITOP(clear_bit ,"bclr") | ||
73 | H8300_GEN_BITOP(change_bit,"bnot") | ||
74 | #define __set_bit(nr,addr) set_bit((nr),(addr)) | ||
75 | #define __clear_bit(nr,addr) clear_bit((nr),(addr)) | ||
76 | #define __change_bit(nr,addr) change_bit((nr),(addr)) | ||
77 | |||
78 | #undef H8300_GEN_BITOP | ||
79 | #undef H8300_GEN_BITOP_CONST | ||
80 | |||
81 | static __inline__ int test_bit(int nr, const unsigned long* addr) | ||
82 | { | ||
83 | return (*((volatile unsigned char *)addr + | ||
84 | ((nr >> 3) ^ 3)) & (1UL << (nr & 7))) != 0; | ||
85 | } | ||
86 | |||
87 | #define __test_bit(nr, addr) test_bit(nr, addr) | ||
88 | |||
89 | #define H8300_GEN_TEST_BITOP_CONST_INT(OP,BIT) \ | ||
90 | case BIT: \ | ||
91 | __asm__("stc ccr,%w1\n\t" \ | ||
92 | "orc #0x80,ccr\n\t" \ | ||
93 | "bld #" #BIT ",@%4\n\t" \ | ||
94 | OP " #" #BIT ",@%4\n\t" \ | ||
95 | "rotxl.l %0\n\t" \ | ||
96 | "ldc %w1,ccr" \ | ||
97 | : "=r"(retval),"=&r"(ccrsave),"=m"(*b_addr) \ | ||
98 | : "0" (retval),"r" (b_addr) \ | ||
99 | : "memory"); \ | ||
100 | break; | ||
101 | |||
102 | #define H8300_GEN_TEST_BITOP_CONST(OP,BIT) \ | ||
103 | case BIT: \ | ||
104 | __asm__("bld #" #BIT ",@%3\n\t" \ | ||
105 | OP " #" #BIT ",@%3\n\t" \ | ||
106 | "rotxl.l %0\n\t" \ | ||
107 | : "=r"(retval),"=m"(*b_addr) \ | ||
108 | : "0" (retval),"r" (b_addr) \ | ||
109 | : "memory"); \ | ||
110 | break; | ||
111 | |||
112 | #define H8300_GEN_TEST_BITOP(FNNAME,OP) \ | ||
113 | static __inline__ int FNNAME(int nr, volatile void * addr) \ | ||
114 | { \ | ||
115 | int retval = 0; \ | ||
116 | char ccrsave; \ | ||
117 | volatile unsigned char *b_addr; \ | ||
118 | b_addr = (volatile unsigned char *)addr + ((nr >> 3) ^ 3); \ | ||
119 | if (__builtin_constant_p(nr)) { \ | ||
120 | switch(nr & 7) { \ | ||
121 | H8300_GEN_TEST_BITOP_CONST_INT(OP,0) \ | ||
122 | H8300_GEN_TEST_BITOP_CONST_INT(OP,1) \ | ||
123 | H8300_GEN_TEST_BITOP_CONST_INT(OP,2) \ | ||
124 | H8300_GEN_TEST_BITOP_CONST_INT(OP,3) \ | ||
125 | H8300_GEN_TEST_BITOP_CONST_INT(OP,4) \ | ||
126 | H8300_GEN_TEST_BITOP_CONST_INT(OP,5) \ | ||
127 | H8300_GEN_TEST_BITOP_CONST_INT(OP,6) \ | ||
128 | H8300_GEN_TEST_BITOP_CONST_INT(OP,7) \ | ||
129 | } \ | ||
130 | } else { \ | ||
131 | __asm__("stc ccr,%w1\n\t" \ | ||
132 | "orc #0x80,ccr\n\t" \ | ||
133 | "btst %w5,@%4\n\t" \ | ||
134 | OP " %w5,@%4\n\t" \ | ||
135 | "beq 1f\n\t" \ | ||
136 | "inc.l #1,%0\n" \ | ||
137 | "1:\n\t" \ | ||
138 | "ldc %w1,ccr" \ | ||
139 | : "=r"(retval),"=&r"(ccrsave),"=m"(*b_addr) \ | ||
140 | : "0" (retval),"r" (b_addr),"r"(nr) \ | ||
141 | : "memory"); \ | ||
142 | } \ | ||
143 | return retval; \ | ||
144 | } \ | ||
145 | \ | ||
146 | static __inline__ int __ ## FNNAME(int nr, volatile void * addr) \ | ||
147 | { \ | ||
148 | int retval = 0; \ | ||
149 | volatile unsigned char *b_addr; \ | ||
150 | b_addr = (volatile unsigned char *)addr + ((nr >> 3) ^ 3); \ | ||
151 | if (__builtin_constant_p(nr)) { \ | ||
152 | switch(nr & 7) { \ | ||
153 | H8300_GEN_TEST_BITOP_CONST(OP,0) \ | ||
154 | H8300_GEN_TEST_BITOP_CONST(OP,1) \ | ||
155 | H8300_GEN_TEST_BITOP_CONST(OP,2) \ | ||
156 | H8300_GEN_TEST_BITOP_CONST(OP,3) \ | ||
157 | H8300_GEN_TEST_BITOP_CONST(OP,4) \ | ||
158 | H8300_GEN_TEST_BITOP_CONST(OP,5) \ | ||
159 | H8300_GEN_TEST_BITOP_CONST(OP,6) \ | ||
160 | H8300_GEN_TEST_BITOP_CONST(OP,7) \ | ||
161 | } \ | ||
162 | } else { \ | ||
163 | __asm__("btst %w4,@%3\n\t" \ | ||
164 | OP " %w4,@%3\n\t" \ | ||
165 | "beq 1f\n\t" \ | ||
166 | "inc.l #1,%0\n" \ | ||
167 | "1:" \ | ||
168 | : "=r"(retval),"=m"(*b_addr) \ | ||
169 | : "0" (retval),"r" (b_addr),"r"(nr) \ | ||
170 | : "memory"); \ | ||
171 | } \ | ||
172 | return retval; \ | ||
173 | } | ||
174 | |||
175 | H8300_GEN_TEST_BITOP(test_and_set_bit, "bset") | ||
176 | H8300_GEN_TEST_BITOP(test_and_clear_bit, "bclr") | ||
177 | H8300_GEN_TEST_BITOP(test_and_change_bit,"bnot") | ||
178 | #undef H8300_GEN_TEST_BITOP_CONST | ||
179 | #undef H8300_GEN_TEST_BITOP_CONST_INT | ||
180 | #undef H8300_GEN_TEST_BITOP | ||
181 | |||
182 | #include <asm-generic/bitops/ffs.h> | ||
183 | |||
184 | static __inline__ unsigned long __ffs(unsigned long word) | ||
185 | { | ||
186 | unsigned long result; | ||
187 | |||
188 | result = -1; | ||
189 | __asm__("1:\n\t" | ||
190 | "shlr.l %2\n\t" | ||
191 | "adds #1,%0\n\t" | ||
192 | "bcc 1b" | ||
193 | : "=r" (result) | ||
194 | : "0"(result),"r"(word)); | ||
195 | return result; | ||
196 | } | ||
197 | |||
198 | #include <asm-generic/bitops/find.h> | ||
199 | #include <asm-generic/bitops/sched.h> | ||
200 | #include <asm-generic/bitops/hweight.h> | ||
201 | #include <asm-generic/bitops/lock.h> | ||
202 | #include <asm-generic/bitops/le.h> | ||
203 | #include <asm-generic/bitops/ext2-atomic.h> | ||
204 | |||
205 | #endif /* __KERNEL__ */ | ||
206 | |||
207 | #include <asm-generic/bitops/fls.h> | ||
208 | #include <asm-generic/bitops/__fls.h> | ||
209 | #include <asm-generic/bitops/fls64.h> | ||
210 | |||
211 | #endif /* _H8300_BITOPS_H */ | ||
diff --git a/arch/h8300/include/asm/bootinfo.h b/arch/h8300/include/asm/bootinfo.h deleted file mode 100644 index 5bed7e7aac0a..000000000000 --- a/arch/h8300/include/asm/bootinfo.h +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | |||
2 | /* Nothing for h8300 */ | ||
diff --git a/arch/h8300/include/asm/bug.h b/arch/h8300/include/asm/bug.h deleted file mode 100644 index 1e1be8119935..000000000000 --- a/arch/h8300/include/asm/bug.h +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | #ifndef _H8300_BUG_H | ||
2 | #define _H8300_BUG_H | ||
3 | |||
4 | /* always true */ | ||
5 | #define is_valid_bugaddr(addr) (1) | ||
6 | |||
7 | #include <asm-generic/bug.h> | ||
8 | |||
9 | struct pt_regs; | ||
10 | extern void die(const char *str, struct pt_regs *fp, unsigned long err); | ||
11 | |||
12 | #endif | ||
diff --git a/arch/h8300/include/asm/bugs.h b/arch/h8300/include/asm/bugs.h deleted file mode 100644 index 1cb4afba6eb1..000000000000 --- a/arch/h8300/include/asm/bugs.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-h8300/bugs.h | ||
3 | * | ||
4 | * Copyright (C) 1994 Linus Torvalds | ||
5 | */ | ||
6 | |||
7 | /* | ||
8 | * This is included by init/main.c to check for architecture-dependent bugs. | ||
9 | * | ||
10 | * Needs: | ||
11 | * void check_bugs(void); | ||
12 | */ | ||
13 | |||
14 | static void check_bugs(void) | ||
15 | { | ||
16 | } | ||
diff --git a/arch/h8300/include/asm/cache.h b/arch/h8300/include/asm/cache.h deleted file mode 100644 index 05887a1d80e5..000000000000 --- a/arch/h8300/include/asm/cache.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | #ifndef __ARCH_H8300_CACHE_H | ||
2 | #define __ARCH_H8300_CACHE_H | ||
3 | |||
4 | /* bytes per L1 cache line */ | ||
5 | #define L1_CACHE_SHIFT 2 | ||
6 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) | ||
7 | |||
8 | /* m68k-elf-gcc 2.95.2 doesn't like these */ | ||
9 | |||
10 | #define __cacheline_aligned | ||
11 | #define ____cacheline_aligned | ||
12 | |||
13 | #endif | ||
diff --git a/arch/h8300/include/asm/cachectl.h b/arch/h8300/include/asm/cachectl.h deleted file mode 100644 index c464022d8e26..000000000000 --- a/arch/h8300/include/asm/cachectl.h +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | #ifndef _H8300_CACHECTL_H | ||
2 | #define _H8300_CACHECTL_H | ||
3 | |||
4 | /* Definitions for the cacheflush system call. */ | ||
5 | |||
6 | #define FLUSH_SCOPE_LINE 0 /* Flush a cache line */ | ||
7 | #define FLUSH_SCOPE_PAGE 0 /* Flush a page */ | ||
8 | #define FLUSH_SCOPE_ALL 0 /* Flush the whole cache -- superuser only */ | ||
9 | |||
10 | #define FLUSH_CACHE_DATA 0 /* Writeback and flush data cache */ | ||
11 | #define FLUSH_CACHE_INSN 0 /* Flush instruction cache */ | ||
12 | #define FLUSH_CACHE_BOTH 0 /* Flush both caches */ | ||
13 | |||
14 | #endif /* _H8300_CACHECTL_H */ | ||
diff --git a/arch/h8300/include/asm/cacheflush.h b/arch/h8300/include/asm/cacheflush.h deleted file mode 100644 index 4cf2df20c1ce..000000000000 --- a/arch/h8300/include/asm/cacheflush.h +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | /* | ||
2 | * (C) Copyright 2002, Yoshinori Sato <ysato@users.sourceforge.jp> | ||
3 | */ | ||
4 | |||
5 | #ifndef _ASM_H8300_CACHEFLUSH_H | ||
6 | #define _ASM_H8300_CACHEFLUSH_H | ||
7 | |||
8 | /* | ||
9 | * Cache handling functions | ||
10 | * No Cache memory all dummy functions | ||
11 | */ | ||
12 | |||
13 | #define flush_cache_all() | ||
14 | #define flush_cache_mm(mm) | ||
15 | #define flush_cache_dup_mm(mm) do { } while (0) | ||
16 | #define flush_cache_range(vma,a,b) | ||
17 | #define flush_cache_page(vma,p,pfn) | ||
18 | #define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 0 | ||
19 | #define flush_dcache_page(page) | ||
20 | #define flush_dcache_mmap_lock(mapping) | ||
21 | #define flush_dcache_mmap_unlock(mapping) | ||
22 | #define flush_icache() | ||
23 | #define flush_icache_page(vma,page) | ||
24 | #define flush_icache_range(start,len) | ||
25 | #define flush_cache_vmap(start, end) | ||
26 | #define flush_cache_vunmap(start, end) | ||
27 | #define cache_push_v(vaddr,len) | ||
28 | #define cache_push(paddr,len) | ||
29 | #define cache_clear(paddr,len) | ||
30 | |||
31 | #define flush_dcache_range(a,b) | ||
32 | |||
33 | #define flush_icache_user_range(vma,page,addr,len) | ||
34 | |||
35 | #define copy_to_user_page(vma, page, vaddr, dst, src, len) \ | ||
36 | memcpy(dst, src, len) | ||
37 | #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ | ||
38 | memcpy(dst, src, len) | ||
39 | |||
40 | #endif /* _ASM_H8300_CACHEFLUSH_H */ | ||
diff --git a/arch/h8300/include/asm/checksum.h b/arch/h8300/include/asm/checksum.h deleted file mode 100644 index 98724e12508c..000000000000 --- a/arch/h8300/include/asm/checksum.h +++ /dev/null | |||
@@ -1,102 +0,0 @@ | |||
1 | #ifndef _H8300_CHECKSUM_H | ||
2 | #define _H8300_CHECKSUM_H | ||
3 | |||
4 | /* | ||
5 | * computes the checksum of a memory block at buff, length len, | ||
6 | * and adds in "sum" (32-bit) | ||
7 | * | ||
8 | * returns a 32-bit number suitable for feeding into itself | ||
9 | * or csum_tcpudp_magic | ||
10 | * | ||
11 | * this function must be called with even lengths, except | ||
12 | * for the last fragment, which may be odd | ||
13 | * | ||
14 | * it's best to have buff aligned on a 32-bit boundary | ||
15 | */ | ||
16 | __wsum csum_partial(const void *buff, int len, __wsum sum); | ||
17 | |||
18 | /* | ||
19 | * the same as csum_partial, but copies from src while it | ||
20 | * checksums | ||
21 | * | ||
22 | * here even more important to align src and dst on a 32-bit (or even | ||
23 | * better 64-bit) boundary | ||
24 | */ | ||
25 | |||
26 | __wsum csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum); | ||
27 | |||
28 | |||
29 | /* | ||
30 | * the same as csum_partial_copy, but copies from user space. | ||
31 | * | ||
32 | * here even more important to align src and dst on a 32-bit (or even | ||
33 | * better 64-bit) boundary | ||
34 | */ | ||
35 | |||
36 | extern __wsum csum_partial_copy_from_user(const void __user *src, void *dst, | ||
37 | int len, __wsum sum, int *csum_err); | ||
38 | |||
39 | __sum16 ip_fast_csum(const void *iph, unsigned int ihl); | ||
40 | |||
41 | |||
42 | /* | ||
43 | * Fold a partial checksum | ||
44 | */ | ||
45 | |||
46 | static inline __sum16 csum_fold(__wsum sum) | ||
47 | { | ||
48 | __asm__("mov.l %0,er0\n\t" | ||
49 | "add.w e0,r0\n\t" | ||
50 | "xor.w e0,e0\n\t" | ||
51 | "rotxl.w e0\n\t" | ||
52 | "add.w e0,r0\n\t" | ||
53 | "sub.w e0,e0\n\t" | ||
54 | "mov.l er0,%0" | ||
55 | : "=r"(sum) | ||
56 | : "0"(sum) | ||
57 | : "er0"); | ||
58 | return (__force __sum16)~sum; | ||
59 | } | ||
60 | |||
61 | |||
62 | /* | ||
63 | * computes the checksum of the TCP/UDP pseudo-header | ||
64 | * returns a 16-bit checksum, already complemented | ||
65 | */ | ||
66 | |||
67 | static inline __wsum | ||
68 | csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, | ||
69 | unsigned short proto, __wsum sum) | ||
70 | { | ||
71 | __asm__ ("sub.l er0,er0\n\t" | ||
72 | "add.l %2,%0\n\t" | ||
73 | "addx #0,r0l\n\t" | ||
74 | "add.l %3,%0\n\t" | ||
75 | "addx #0,r0l\n\t" | ||
76 | "add.l %4,%0\n\t" | ||
77 | "addx #0,r0l\n\t" | ||
78 | "add.l er0,%0\n\t" | ||
79 | "bcc 1f\n\t" | ||
80 | "inc.l #1,%0\n" | ||
81 | "1:" | ||
82 | : "=&r" (sum) | ||
83 | : "0" (sum), "r" (daddr), "r" (saddr), "r" (len + proto) | ||
84 | :"er0"); | ||
85 | return sum; | ||
86 | } | ||
87 | |||
88 | static inline __sum16 | ||
89 | csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len, | ||
90 | unsigned short proto, __wsum sum) | ||
91 | { | ||
92 | return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum)); | ||
93 | } | ||
94 | |||
95 | /* | ||
96 | * this routine is used for miscellaneous IP-like checksums, mainly | ||
97 | * in icmp.c | ||
98 | */ | ||
99 | |||
100 | extern __sum16 ip_compute_csum(const void *buff, int len); | ||
101 | |||
102 | #endif /* _H8300_CHECKSUM_H */ | ||
diff --git a/arch/h8300/include/asm/cmpxchg.h b/arch/h8300/include/asm/cmpxchg.h deleted file mode 100644 index cdb203ef681f..000000000000 --- a/arch/h8300/include/asm/cmpxchg.h +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | #ifndef __ARCH_H8300_CMPXCHG__ | ||
2 | #define __ARCH_H8300_CMPXCHG__ | ||
3 | |||
4 | #include <linux/irqflags.h> | ||
5 | |||
6 | #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) | ||
7 | |||
8 | struct __xchg_dummy { unsigned long a[100]; }; | ||
9 | #define __xg(x) ((volatile struct __xchg_dummy *)(x)) | ||
10 | |||
11 | static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int size) | ||
12 | { | ||
13 | unsigned long tmp, flags; | ||
14 | |||
15 | local_irq_save(flags); | ||
16 | |||
17 | switch (size) { | ||
18 | case 1: | ||
19 | __asm__ __volatile__ | ||
20 | ("mov.b %2,%0\n\t" | ||
21 | "mov.b %1,%2" | ||
22 | : "=&r" (tmp) : "r" (x), "m" (*__xg(ptr)) : "memory"); | ||
23 | break; | ||
24 | case 2: | ||
25 | __asm__ __volatile__ | ||
26 | ("mov.w %2,%0\n\t" | ||
27 | "mov.w %1,%2" | ||
28 | : "=&r" (tmp) : "r" (x), "m" (*__xg(ptr)) : "memory"); | ||
29 | break; | ||
30 | case 4: | ||
31 | __asm__ __volatile__ | ||
32 | ("mov.l %2,%0\n\t" | ||
33 | "mov.l %1,%2" | ||
34 | : "=&r" (tmp) : "r" (x), "m" (*__xg(ptr)) : "memory"); | ||
35 | break; | ||
36 | default: | ||
37 | tmp = 0; | ||
38 | } | ||
39 | local_irq_restore(flags); | ||
40 | return tmp; | ||
41 | } | ||
42 | |||
43 | #include <asm-generic/cmpxchg-local.h> | ||
44 | |||
45 | /* | ||
46 | * cmpxchg_local and cmpxchg64_local are atomic wrt current CPU. Always make | ||
47 | * them available. | ||
48 | */ | ||
49 | #define cmpxchg_local(ptr, o, n) \ | ||
50 | ((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\ | ||
51 | (unsigned long)(n), sizeof(*(ptr)))) | ||
52 | #define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n)) | ||
53 | |||
54 | #ifndef CONFIG_SMP | ||
55 | #include <asm-generic/cmpxchg.h> | ||
56 | #endif | ||
57 | |||
58 | #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) | ||
59 | |||
60 | #endif /* __ARCH_H8300_CMPXCHG__ */ | ||
diff --git a/arch/h8300/include/asm/cputime.h b/arch/h8300/include/asm/cputime.h deleted file mode 100644 index 092e187c7b08..000000000000 --- a/arch/h8300/include/asm/cputime.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __H8300_CPUTIME_H | ||
2 | #define __H8300_CPUTIME_H | ||
3 | |||
4 | #include <asm-generic/cputime.h> | ||
5 | |||
6 | #endif /* __H8300_CPUTIME_H */ | ||
diff --git a/arch/h8300/include/asm/current.h b/arch/h8300/include/asm/current.h deleted file mode 100644 index 57d74ee55a14..000000000000 --- a/arch/h8300/include/asm/current.h +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | #ifndef _H8300_CURRENT_H | ||
2 | #define _H8300_CURRENT_H | ||
3 | /* | ||
4 | * current.h | ||
5 | * (C) Copyright 2000, Lineo, David McCullough <davidm@lineo.com> | ||
6 | * (C) Copyright 2002, Greg Ungerer (gerg@snapgear.com) | ||
7 | * | ||
8 | * rather than dedicate a register (as the m68k source does), we | ||
9 | * just keep a global, we should probably just change it all to be | ||
10 | * current and lose _current_task. | ||
11 | */ | ||
12 | |||
13 | #include <linux/thread_info.h> | ||
14 | #include <asm/thread_info.h> | ||
15 | |||
16 | struct task_struct; | ||
17 | |||
18 | static inline struct task_struct *get_current(void) | ||
19 | { | ||
20 | return(current_thread_info()->task); | ||
21 | } | ||
22 | |||
23 | #define current get_current() | ||
24 | |||
25 | #endif /* _H8300_CURRENT_H */ | ||
diff --git a/arch/h8300/include/asm/dbg.h b/arch/h8300/include/asm/dbg.h deleted file mode 100644 index 2c6d1cbcf736..000000000000 --- a/arch/h8300/include/asm/dbg.h +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | #define DEBUG 1 | ||
2 | #define BREAK asm volatile ("trap #3") | ||
diff --git a/arch/h8300/include/asm/delay.h b/arch/h8300/include/asm/delay.h deleted file mode 100644 index 743beba70f82..000000000000 --- a/arch/h8300/include/asm/delay.h +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | #ifndef _H8300_DELAY_H | ||
2 | #define _H8300_DELAY_H | ||
3 | |||
4 | #include <asm/param.h> | ||
5 | |||
6 | /* | ||
7 | * Copyright (C) 2002 Yoshinori Sato <ysato@sourceforge.jp> | ||
8 | * | ||
9 | * Delay routines, using a pre-computed "loops_per_second" value. | ||
10 | */ | ||
11 | |||
12 | static inline void __delay(unsigned long loops) | ||
13 | { | ||
14 | __asm__ __volatile__ ("1:\n\t" | ||
15 | "dec.l #1,%0\n\t" | ||
16 | "bne 1b" | ||
17 | :"=r" (loops):"0"(loops)); | ||
18 | } | ||
19 | |||
20 | /* | ||
21 | * Use only for very small delays ( < 1 msec). Should probably use a | ||
22 | * lookup table, really, as the multiplications take much too long with | ||
23 | * short delays. This is a "reasonable" implementation, though (and the | ||
24 | * first constant multiplications gets optimized away if the delay is | ||
25 | * a constant) | ||
26 | */ | ||
27 | |||
28 | extern unsigned long loops_per_jiffy; | ||
29 | |||
30 | static inline void udelay(unsigned long usecs) | ||
31 | { | ||
32 | usecs *= 4295; /* 2**32 / 1000000 */ | ||
33 | usecs /= (loops_per_jiffy*HZ); | ||
34 | if (usecs) | ||
35 | __delay(usecs); | ||
36 | } | ||
37 | |||
38 | #endif /* _H8300_DELAY_H */ | ||
diff --git a/arch/h8300/include/asm/device.h b/arch/h8300/include/asm/device.h deleted file mode 100644 index d8f9872b0e2d..000000000000 --- a/arch/h8300/include/asm/device.h +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | /* | ||
2 | * Arch specific extensions to struct device | ||
3 | * | ||
4 | * This file is released under the GPLv2 | ||
5 | */ | ||
6 | #include <asm-generic/device.h> | ||
7 | |||
diff --git a/arch/h8300/include/asm/div64.h b/arch/h8300/include/asm/div64.h deleted file mode 100644 index 6cd978cefb28..000000000000 --- a/arch/h8300/include/asm/div64.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/div64.h> | ||
diff --git a/arch/h8300/include/asm/dma.h b/arch/h8300/include/asm/dma.h deleted file mode 100644 index 3edbaaaedf5b..000000000000 --- a/arch/h8300/include/asm/dma.h +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | #ifndef _H8300_DMA_H | ||
2 | #define _H8300_DMA_H | ||
3 | |||
4 | |||
5 | /* | ||
6 | * Set number of channels of DMA on ColdFire for different implementations. | ||
7 | */ | ||
8 | #define MAX_DMA_CHANNELS 0 | ||
9 | #define MAX_DMA_ADDRESS PAGE_OFFSET | ||
10 | |||
11 | /* These are in kernel/dma.c: */ | ||
12 | extern int request_dma(unsigned int dmanr, const char *device_id); /* reserve a DMA channel */ | ||
13 | extern void free_dma(unsigned int dmanr); /* release it again */ | ||
14 | |||
15 | #endif /* _H8300_DMA_H */ | ||
diff --git a/arch/h8300/include/asm/elf.h b/arch/h8300/include/asm/elf.h deleted file mode 100644 index 6db71248a82f..000000000000 --- a/arch/h8300/include/asm/elf.h +++ /dev/null | |||
@@ -1,101 +0,0 @@ | |||
1 | #ifndef __ASMH8300_ELF_H | ||
2 | #define __ASMH8300_ELF_H | ||
3 | |||
4 | /* | ||
5 | * ELF register definitions.. | ||
6 | */ | ||
7 | |||
8 | #include <asm/ptrace.h> | ||
9 | #include <asm/user.h> | ||
10 | |||
11 | typedef unsigned long elf_greg_t; | ||
12 | |||
13 | #define ELF_NGREG (sizeof(struct user_regs_struct) / sizeof(elf_greg_t)) | ||
14 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; | ||
15 | typedef unsigned long elf_fpregset_t; | ||
16 | |||
17 | /* | ||
18 | * This is used to ensure we don't load something for the wrong architecture. | ||
19 | */ | ||
20 | #define elf_check_arch(x) ((x)->e_machine == EM_H8_300) | ||
21 | |||
22 | /* | ||
23 | * These are used to set parameters in the core dumps. | ||
24 | */ | ||
25 | #define ELF_CLASS ELFCLASS32 | ||
26 | #define ELF_DATA ELFDATA2MSB | ||
27 | #define ELF_ARCH EM_H8_300 | ||
28 | #if defined(__H8300H__) | ||
29 | #define ELF_CORE_EFLAGS 0x810000 | ||
30 | #endif | ||
31 | #if defined(__H8300S__) | ||
32 | #define ELF_CORE_EFLAGS 0x820000 | ||
33 | #endif | ||
34 | |||
35 | #define ELF_PLAT_INIT(_r) _r->er1 = 0 | ||
36 | |||
37 | #define ELF_EXEC_PAGESIZE 4096 | ||
38 | |||
39 | /* This is the location that an ET_DYN program is loaded if exec'ed. Typical | ||
40 | use of this is to invoke "./ld.so someprog" to test out a new version of | ||
41 | the loader. We need to make sure that it is out of the way of the program | ||
42 | that it will "exec", and that there is sufficient room for the brk. */ | ||
43 | |||
44 | #define ELF_ET_DYN_BASE 0xD0000000UL | ||
45 | |||
46 | /* This yields a mask that user programs can use to figure out what | ||
47 | instruction set this cpu supports. */ | ||
48 | |||
49 | #define ELF_HWCAP (0) | ||
50 | |||
51 | /* This yields a string that ld.so will use to load implementation | ||
52 | specific libraries for optimization. This is more specific in | ||
53 | intent than poking at uname or /proc/cpuinfo. */ | ||
54 | |||
55 | #define ELF_PLATFORM (NULL) | ||
56 | |||
57 | #define R_H8_NONE 0 | ||
58 | #define R_H8_DIR32 1 | ||
59 | #define R_H8_DIR32_28 2 | ||
60 | #define R_H8_DIR32_24 3 | ||
61 | #define R_H8_DIR32_16 4 | ||
62 | #define R_H8_DIR32U 6 | ||
63 | #define R_H8_DIR32U_28 7 | ||
64 | #define R_H8_DIR32U_24 8 | ||
65 | #define R_H8_DIR32U_20 9 | ||
66 | #define R_H8_DIR32U_16 10 | ||
67 | #define R_H8_DIR24 11 | ||
68 | #define R_H8_DIR24_20 12 | ||
69 | #define R_H8_DIR24_16 13 | ||
70 | #define R_H8_DIR24U 14 | ||
71 | #define R_H8_DIR24U_20 15 | ||
72 | #define R_H8_DIR24U_16 16 | ||
73 | #define R_H8_DIR16 17 | ||
74 | #define R_H8_DIR16U 18 | ||
75 | #define R_H8_DIR16S_32 19 | ||
76 | #define R_H8_DIR16S_28 20 | ||
77 | #define R_H8_DIR16S_24 21 | ||
78 | #define R_H8_DIR16S_20 22 | ||
79 | #define R_H8_DIR16S 23 | ||
80 | #define R_H8_DIR8 24 | ||
81 | #define R_H8_DIR8U 25 | ||
82 | #define R_H8_DIR8Z_32 26 | ||
83 | #define R_H8_DIR8Z_28 27 | ||
84 | #define R_H8_DIR8Z_24 28 | ||
85 | #define R_H8_DIR8Z_20 29 | ||
86 | #define R_H8_DIR8Z_16 30 | ||
87 | #define R_H8_PCREL16 31 | ||
88 | #define R_H8_PCREL8 32 | ||
89 | #define R_H8_BPOS 33 | ||
90 | #define R_H8_PCREL32 34 | ||
91 | #define R_H8_GOT32O 35 | ||
92 | #define R_H8_GOT16O 36 | ||
93 | #define R_H8_DIR16A8 59 | ||
94 | #define R_H8_DIR16R8 60 | ||
95 | #define R_H8_DIR24A8 61 | ||
96 | #define R_H8_DIR24R8 62 | ||
97 | #define R_H8_DIR32A16 63 | ||
98 | #define R_H8_ABS32 65 | ||
99 | #define R_H8_ABS32A16 127 | ||
100 | |||
101 | #endif | ||
diff --git a/arch/h8300/include/asm/emergency-restart.h b/arch/h8300/include/asm/emergency-restart.h deleted file mode 100644 index 108d8c48e42e..000000000000 --- a/arch/h8300/include/asm/emergency-restart.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _ASM_EMERGENCY_RESTART_H | ||
2 | #define _ASM_EMERGENCY_RESTART_H | ||
3 | |||
4 | #include <asm-generic/emergency-restart.h> | ||
5 | |||
6 | #endif /* _ASM_EMERGENCY_RESTART_H */ | ||
diff --git a/arch/h8300/include/asm/fb.h b/arch/h8300/include/asm/fb.h deleted file mode 100644 index c7df38030992..000000000000 --- a/arch/h8300/include/asm/fb.h +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | #ifndef _ASM_FB_H_ | ||
2 | #define _ASM_FB_H_ | ||
3 | #include <linux/fb.h> | ||
4 | |||
5 | #define fb_pgprotect(...) do {} while (0) | ||
6 | |||
7 | static inline int fb_is_primary_device(struct fb_info *info) | ||
8 | { | ||
9 | return 0; | ||
10 | } | ||
11 | |||
12 | #endif /* _ASM_FB_H_ */ | ||
diff --git a/arch/h8300/include/asm/flat.h b/arch/h8300/include/asm/flat.h deleted file mode 100644 index bd12b31b90e6..000000000000 --- a/arch/h8300/include/asm/flat.h +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-h8300/flat.h -- uClinux flat-format executables | ||
3 | */ | ||
4 | |||
5 | #ifndef __H8300_FLAT_H__ | ||
6 | #define __H8300_FLAT_H__ | ||
7 | |||
8 | #define flat_argvp_envp_on_stack() 1 | ||
9 | #define flat_old_ram_flag(flags) 1 | ||
10 | #define flat_reloc_valid(reloc, size) ((reloc) <= (size)) | ||
11 | #define flat_set_persistent(relval, p) 0 | ||
12 | |||
13 | /* | ||
14 | * on the H8 a couple of the relocations have an instruction in the | ||
15 | * top byte. As there can only be 24bits of address space, we just | ||
16 | * always preserve that 8bits at the top, when it isn't an instruction | ||
17 | * is is 0 (davidm@snapgear.com) | ||
18 | */ | ||
19 | |||
20 | #define flat_get_relocate_addr(rel) (rel) | ||
21 | #define flat_get_addr_from_rp(rp, relval, flags, persistent) \ | ||
22 | (get_unaligned(rp) & ((flags & FLAT_FLAG_GOTPIC) ? 0xffffffff: 0x00ffffff)) | ||
23 | #define flat_put_addr_at_rp(rp, addr, rel) \ | ||
24 | put_unaligned (((*(char *)(rp)) << 24) | ((addr) & 0x00ffffff), rp) | ||
25 | |||
26 | #endif /* __H8300_FLAT_H__ */ | ||
diff --git a/arch/h8300/include/asm/fpu.h b/arch/h8300/include/asm/fpu.h deleted file mode 100644 index 4fc416e80bef..000000000000 --- a/arch/h8300/include/asm/fpu.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | /* Nothing do */ | ||
diff --git a/arch/h8300/include/asm/ftrace.h b/arch/h8300/include/asm/ftrace.h deleted file mode 100644 index 40a8c178f10d..000000000000 --- a/arch/h8300/include/asm/ftrace.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | /* empty */ | ||
diff --git a/arch/h8300/include/asm/futex.h b/arch/h8300/include/asm/futex.h deleted file mode 100644 index 6a332a9f099c..000000000000 --- a/arch/h8300/include/asm/futex.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _ASM_FUTEX_H | ||
2 | #define _ASM_FUTEX_H | ||
3 | |||
4 | #include <asm-generic/futex.h> | ||
5 | |||
6 | #endif | ||
diff --git a/arch/h8300/include/asm/gpio-internal.h b/arch/h8300/include/asm/gpio-internal.h deleted file mode 100644 index a714f0c0efbc..000000000000 --- a/arch/h8300/include/asm/gpio-internal.h +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | #ifndef _H8300_GPIO_H | ||
2 | #define _H8300_GPIO_H | ||
3 | |||
4 | #define H8300_GPIO_P1 0 | ||
5 | #define H8300_GPIO_P2 1 | ||
6 | #define H8300_GPIO_P3 2 | ||
7 | #define H8300_GPIO_P4 3 | ||
8 | #define H8300_GPIO_P5 4 | ||
9 | #define H8300_GPIO_P6 5 | ||
10 | #define H8300_GPIO_P7 6 | ||
11 | #define H8300_GPIO_P8 7 | ||
12 | #define H8300_GPIO_P9 8 | ||
13 | #define H8300_GPIO_PA 9 | ||
14 | #define H8300_GPIO_PB 10 | ||
15 | #define H8300_GPIO_PC 11 | ||
16 | #define H8300_GPIO_PD 12 | ||
17 | #define H8300_GPIO_PE 13 | ||
18 | #define H8300_GPIO_PF 14 | ||
19 | #define H8300_GPIO_PG 15 | ||
20 | #define H8300_GPIO_PH 16 | ||
21 | |||
22 | #define H8300_GPIO_B7 0x80 | ||
23 | #define H8300_GPIO_B6 0x40 | ||
24 | #define H8300_GPIO_B5 0x20 | ||
25 | #define H8300_GPIO_B4 0x10 | ||
26 | #define H8300_GPIO_B3 0x08 | ||
27 | #define H8300_GPIO_B2 0x04 | ||
28 | #define H8300_GPIO_B1 0x02 | ||
29 | #define H8300_GPIO_B0 0x01 | ||
30 | |||
31 | #define H8300_GPIO_INPUT 0 | ||
32 | #define H8300_GPIO_OUTPUT 1 | ||
33 | |||
34 | #define H8300_GPIO_RESERVE(port, bits) \ | ||
35 | h8300_reserved_gpio(port, bits) | ||
36 | |||
37 | #define H8300_GPIO_FREE(port, bits) \ | ||
38 | h8300_free_gpio(port, bits) | ||
39 | |||
40 | #define H8300_GPIO_DDR(port, bit, dir) \ | ||
41 | h8300_set_gpio_dir(((port) << 8) | (bit), dir) | ||
42 | |||
43 | #define H8300_GPIO_GETDIR(port, bit) \ | ||
44 | h8300_get_gpio_dir(((port) << 8) | (bit)) | ||
45 | |||
46 | extern int h8300_reserved_gpio(int port, int bits); | ||
47 | extern int h8300_free_gpio(int port, int bits); | ||
48 | extern int h8300_set_gpio_dir(int port_bit, int dir); | ||
49 | extern int h8300_get_gpio_dir(int port_bit); | ||
50 | extern int h8300_init_gpio(void); | ||
51 | |||
52 | #endif | ||
diff --git a/arch/h8300/include/asm/hardirq.h b/arch/h8300/include/asm/hardirq.h deleted file mode 100644 index c2e1aa0f0d14..000000000000 --- a/arch/h8300/include/asm/hardirq.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | #ifndef __H8300_HARDIRQ_H | ||
2 | #define __H8300_HARDIRQ_H | ||
3 | |||
4 | #include <asm/irq.h> | ||
5 | |||
6 | #define HARDIRQ_BITS 8 | ||
7 | |||
8 | /* | ||
9 | * The hardirq mask has to be large enough to have | ||
10 | * space for potentially all IRQ sources in the system | ||
11 | * nesting on a single CPU: | ||
12 | */ | ||
13 | #if (1 << HARDIRQ_BITS) < NR_IRQS | ||
14 | # error HARDIRQ_BITS is too low! | ||
15 | #endif | ||
16 | |||
17 | #include <asm-generic/hardirq.h> | ||
18 | |||
19 | #endif | ||
diff --git a/arch/h8300/include/asm/hw_irq.h b/arch/h8300/include/asm/hw_irq.h deleted file mode 100644 index d75a5a1119e8..000000000000 --- a/arch/h8300/include/asm/hw_irq.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | /* Do Nothing */ | ||
diff --git a/arch/h8300/include/asm/io.h b/arch/h8300/include/asm/io.h deleted file mode 100644 index c1a8df22080f..000000000000 --- a/arch/h8300/include/asm/io.h +++ /dev/null | |||
@@ -1,358 +0,0 @@ | |||
1 | #ifndef _H8300_IO_H | ||
2 | #define _H8300_IO_H | ||
3 | |||
4 | #ifdef __KERNEL__ | ||
5 | |||
6 | #include <asm/virtconvert.h> | ||
7 | |||
8 | #if defined(CONFIG_H83007) || defined(CONFIG_H83068) | ||
9 | #include <asm/regs306x.h> | ||
10 | #elif defined(CONFIG_H8S2678) | ||
11 | #include <asm/regs267x.h> | ||
12 | #else | ||
13 | #error UNKNOWN CPU TYPE | ||
14 | #endif | ||
15 | |||
16 | |||
17 | /* | ||
18 | * These are for ISA/PCI shared memory _only_ and should never be used | ||
19 | * on any other type of memory, including Zorro memory. They are meant to | ||
20 | * access the bus in the bus byte order which is little-endian!. | ||
21 | * | ||
22 | * readX/writeX() are used to access memory mapped devices. On some | ||
23 | * architectures the memory mapped IO stuff needs to be accessed | ||
24 | * differently. On the m68k architecture, we just read/write the | ||
25 | * memory location directly. | ||
26 | */ | ||
27 | /* ++roman: The assignments to temp. vars avoid that gcc sometimes generates | ||
28 | * two accesses to memory, which may be undesirable for some devices. | ||
29 | */ | ||
30 | |||
31 | /* | ||
32 | * swap functions are sometimes needed to interface little-endian hardware | ||
33 | */ | ||
34 | |||
35 | static inline unsigned short _swapw(volatile unsigned short v) | ||
36 | { | ||
37 | #ifndef H8300_IO_NOSWAP | ||
38 | unsigned short r; | ||
39 | __asm__("xor.b %w0,%x0\n\t" | ||
40 | "xor.b %x0,%w0\n\t" | ||
41 | "xor.b %w0,%x0" | ||
42 | :"=r"(r) | ||
43 | :"0"(v)); | ||
44 | return r; | ||
45 | #else | ||
46 | return v; | ||
47 | #endif | ||
48 | } | ||
49 | |||
50 | static inline unsigned long _swapl(volatile unsigned long v) | ||
51 | { | ||
52 | #ifndef H8300_IO_NOSWAP | ||
53 | unsigned long r; | ||
54 | __asm__("xor.b %w0,%x0\n\t" | ||
55 | "xor.b %x0,%w0\n\t" | ||
56 | "xor.b %w0,%x0\n\t" | ||
57 | "xor.w %e0,%f0\n\t" | ||
58 | "xor.w %f0,%e0\n\t" | ||
59 | "xor.w %e0,%f0\n\t" | ||
60 | "xor.b %w0,%x0\n\t" | ||
61 | "xor.b %x0,%w0\n\t" | ||
62 | "xor.b %w0,%x0" | ||
63 | :"=r"(r) | ||
64 | :"0"(v)); | ||
65 | return r; | ||
66 | #else | ||
67 | return v; | ||
68 | #endif | ||
69 | } | ||
70 | |||
71 | #define readb(addr) \ | ||
72 | ({ unsigned char __v = \ | ||
73 | *(volatile unsigned char *)((unsigned long)(addr) & 0x00ffffff); \ | ||
74 | __v; }) | ||
75 | #define readw(addr) \ | ||
76 | ({ unsigned short __v = \ | ||
77 | *(volatile unsigned short *)((unsigned long)(addr) & 0x00ffffff); \ | ||
78 | __v; }) | ||
79 | #define readl(addr) \ | ||
80 | ({ unsigned long __v = \ | ||
81 | *(volatile unsigned long *)((unsigned long)(addr) & 0x00ffffff); \ | ||
82 | __v; }) | ||
83 | |||
84 | #define writeb(b,addr) (void)((*(volatile unsigned char *) \ | ||
85 | ((unsigned long)(addr) & 0x00ffffff)) = (b)) | ||
86 | #define writew(b,addr) (void)((*(volatile unsigned short *) \ | ||
87 | ((unsigned long)(addr) & 0x00ffffff)) = (b)) | ||
88 | #define writel(b,addr) (void)((*(volatile unsigned long *) \ | ||
89 | ((unsigned long)(addr) & 0x00ffffff)) = (b)) | ||
90 | #define readb_relaxed(addr) readb(addr) | ||
91 | #define readw_relaxed(addr) readw(addr) | ||
92 | #define readl_relaxed(addr) readl(addr) | ||
93 | |||
94 | #define __raw_readb readb | ||
95 | #define __raw_readw readw | ||
96 | #define __raw_readl readl | ||
97 | #define __raw_writeb writeb | ||
98 | #define __raw_writew writew | ||
99 | #define __raw_writel writel | ||
100 | |||
101 | static inline int h8300_buswidth(unsigned int addr) | ||
102 | { | ||
103 | return (*(volatile unsigned char *)ABWCR & (1 << ((addr >> 21) & 7))) == 0; | ||
104 | } | ||
105 | |||
106 | static inline void io_outsb(unsigned int addr, const void *buf, int len) | ||
107 | { | ||
108 | volatile unsigned char *ap_b = (volatile unsigned char *) addr; | ||
109 | volatile unsigned short *ap_w = (volatile unsigned short *) addr; | ||
110 | unsigned char *bp = (unsigned char *) buf; | ||
111 | |||
112 | if(h8300_buswidth(addr) && (addr & 1)) { | ||
113 | while (len--) | ||
114 | *ap_w = *bp++; | ||
115 | } else { | ||
116 | while (len--) | ||
117 | *ap_b = *bp++; | ||
118 | } | ||
119 | } | ||
120 | |||
121 | static inline void io_outsw(unsigned int addr, const void *buf, int len) | ||
122 | { | ||
123 | volatile unsigned short *ap = (volatile unsigned short *) addr; | ||
124 | unsigned short *bp = (unsigned short *) buf; | ||
125 | while (len--) | ||
126 | *ap = _swapw(*bp++); | ||
127 | } | ||
128 | |||
129 | static inline void io_outsl(unsigned int addr, const void *buf, int len) | ||
130 | { | ||
131 | volatile unsigned long *ap = (volatile unsigned long *) addr; | ||
132 | unsigned long *bp = (unsigned long *) buf; | ||
133 | while (len--) | ||
134 | *ap = _swapl(*bp++); | ||
135 | } | ||
136 | |||
137 | static inline void io_outsw_noswap(unsigned int addr, const void *buf, int len) | ||
138 | { | ||
139 | volatile unsigned short *ap = (volatile unsigned short *) addr; | ||
140 | unsigned short *bp = (unsigned short *) buf; | ||
141 | while (len--) | ||
142 | *ap = *bp++; | ||
143 | } | ||
144 | |||
145 | static inline void io_outsl_noswap(unsigned int addr, const void *buf, int len) | ||
146 | { | ||
147 | volatile unsigned long *ap = (volatile unsigned long *) addr; | ||
148 | unsigned long *bp = (unsigned long *) buf; | ||
149 | while (len--) | ||
150 | *ap = *bp++; | ||
151 | } | ||
152 | |||
153 | static inline void io_insb(unsigned int addr, void *buf, int len) | ||
154 | { | ||
155 | volatile unsigned char *ap_b; | ||
156 | volatile unsigned short *ap_w; | ||
157 | unsigned char *bp = (unsigned char *) buf; | ||
158 | |||
159 | if(h8300_buswidth(addr)) { | ||
160 | ap_w = (volatile unsigned short *)(addr & ~1); | ||
161 | while (len--) | ||
162 | *bp++ = *ap_w & 0xff; | ||
163 | } else { | ||
164 | ap_b = (volatile unsigned char *)addr; | ||
165 | while (len--) | ||
166 | *bp++ = *ap_b; | ||
167 | } | ||
168 | } | ||
169 | |||
170 | static inline void io_insw(unsigned int addr, void *buf, int len) | ||
171 | { | ||
172 | volatile unsigned short *ap = (volatile unsigned short *) addr; | ||
173 | unsigned short *bp = (unsigned short *) buf; | ||
174 | while (len--) | ||
175 | *bp++ = _swapw(*ap); | ||
176 | } | ||
177 | |||
178 | static inline void io_insl(unsigned int addr, void *buf, int len) | ||
179 | { | ||
180 | volatile unsigned long *ap = (volatile unsigned long *) addr; | ||
181 | unsigned long *bp = (unsigned long *) buf; | ||
182 | while (len--) | ||
183 | *bp++ = _swapl(*ap); | ||
184 | } | ||
185 | |||
186 | static inline void io_insw_noswap(unsigned int addr, void *buf, int len) | ||
187 | { | ||
188 | volatile unsigned short *ap = (volatile unsigned short *) addr; | ||
189 | unsigned short *bp = (unsigned short *) buf; | ||
190 | while (len--) | ||
191 | *bp++ = *ap; | ||
192 | } | ||
193 | |||
194 | static inline void io_insl_noswap(unsigned int addr, void *buf, int len) | ||
195 | { | ||
196 | volatile unsigned long *ap = (volatile unsigned long *) addr; | ||
197 | unsigned long *bp = (unsigned long *) buf; | ||
198 | while (len--) | ||
199 | *bp++ = *ap; | ||
200 | } | ||
201 | |||
202 | /* | ||
203 | * make the short names macros so specific devices | ||
204 | * can override them as required | ||
205 | */ | ||
206 | |||
207 | #define memset_io(a,b,c) memset((void *)(a),(b),(c)) | ||
208 | #define memcpy_fromio(a,b,c) memcpy((a),(void *)(b),(c)) | ||
209 | #define memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c)) | ||
210 | |||
211 | #define mmiowb() | ||
212 | |||
213 | #define inb(addr) ((h8300_buswidth(addr))?readw((addr) & ~1) & 0xff:readb(addr)) | ||
214 | #define inw(addr) _swapw(readw(addr)) | ||
215 | #define inl(addr) _swapl(readl(addr)) | ||
216 | #define outb(x,addr) ((void)((h8300_buswidth(addr) && \ | ||
217 | ((addr) & 1))?writew(x,(addr) & ~1):writeb(x,addr))) | ||
218 | #define outw(x,addr) ((void) writew(_swapw(x),addr)) | ||
219 | #define outl(x,addr) ((void) writel(_swapl(x),addr)) | ||
220 | |||
221 | #define inb_p(addr) inb(addr) | ||
222 | #define inw_p(addr) inw(addr) | ||
223 | #define inl_p(addr) inl(addr) | ||
224 | #define outb_p(x,addr) outb(x,addr) | ||
225 | #define outw_p(x,addr) outw(x,addr) | ||
226 | #define outl_p(x,addr) outl(x,addr) | ||
227 | |||
228 | #define outsb(a,b,l) io_outsb(a,b,l) | ||
229 | #define outsw(a,b,l) io_outsw(a,b,l) | ||
230 | #define outsl(a,b,l) io_outsl(a,b,l) | ||
231 | |||
232 | #define insb(a,b,l) io_insb(a,b,l) | ||
233 | #define insw(a,b,l) io_insw(a,b,l) | ||
234 | #define insl(a,b,l) io_insl(a,b,l) | ||
235 | |||
236 | #define IO_SPACE_LIMIT 0xffffff | ||
237 | |||
238 | |||
239 | /* Values for nocacheflag and cmode */ | ||
240 | #define IOMAP_FULL_CACHING 0 | ||
241 | #define IOMAP_NOCACHE_SER 1 | ||
242 | #define IOMAP_NOCACHE_NONSER 2 | ||
243 | #define IOMAP_WRITETHROUGH 3 | ||
244 | |||
245 | extern void *__ioremap(unsigned long physaddr, unsigned long size, int cacheflag); | ||
246 | extern void __iounmap(void *addr, unsigned long size); | ||
247 | |||
248 | static inline void *ioremap(unsigned long physaddr, unsigned long size) | ||
249 | { | ||
250 | return __ioremap(physaddr, size, IOMAP_NOCACHE_SER); | ||
251 | } | ||
252 | static inline void *ioremap_nocache(unsigned long physaddr, unsigned long size) | ||
253 | { | ||
254 | return __ioremap(physaddr, size, IOMAP_NOCACHE_SER); | ||
255 | } | ||
256 | static inline void *ioremap_writethrough(unsigned long physaddr, unsigned long size) | ||
257 | { | ||
258 | return __ioremap(physaddr, size, IOMAP_WRITETHROUGH); | ||
259 | } | ||
260 | static inline void *ioremap_fullcache(unsigned long physaddr, unsigned long size) | ||
261 | { | ||
262 | return __ioremap(physaddr, size, IOMAP_FULL_CACHING); | ||
263 | } | ||
264 | |||
265 | extern void iounmap(void *addr); | ||
266 | |||
267 | /* H8/300 internal I/O functions */ | ||
268 | static __inline__ unsigned char ctrl_inb(unsigned long addr) | ||
269 | { | ||
270 | return *(volatile unsigned char*)addr; | ||
271 | } | ||
272 | |||
273 | static __inline__ unsigned short ctrl_inw(unsigned long addr) | ||
274 | { | ||
275 | return *(volatile unsigned short*)addr; | ||
276 | } | ||
277 | |||
278 | static __inline__ unsigned long ctrl_inl(unsigned long addr) | ||
279 | { | ||
280 | return *(volatile unsigned long*)addr; | ||
281 | } | ||
282 | |||
283 | static __inline__ void ctrl_outb(unsigned char b, unsigned long addr) | ||
284 | { | ||
285 | *(volatile unsigned char*)addr = b; | ||
286 | } | ||
287 | |||
288 | static __inline__ void ctrl_outw(unsigned short b, unsigned long addr) | ||
289 | { | ||
290 | *(volatile unsigned short*)addr = b; | ||
291 | } | ||
292 | |||
293 | static __inline__ void ctrl_outl(unsigned long b, unsigned long addr) | ||
294 | { | ||
295 | *(volatile unsigned long*)addr = b; | ||
296 | } | ||
297 | |||
298 | static __inline__ void ctrl_bclr(int b, unsigned long addr) | ||
299 | { | ||
300 | if (__builtin_constant_p(b)) | ||
301 | switch (b) { | ||
302 | case 0: __asm__("bclr #0,@%0"::"r"(addr)); break; | ||
303 | case 1: __asm__("bclr #1,@%0"::"r"(addr)); break; | ||
304 | case 2: __asm__("bclr #2,@%0"::"r"(addr)); break; | ||
305 | case 3: __asm__("bclr #3,@%0"::"r"(addr)); break; | ||
306 | case 4: __asm__("bclr #4,@%0"::"r"(addr)); break; | ||
307 | case 5: __asm__("bclr #5,@%0"::"r"(addr)); break; | ||
308 | case 6: __asm__("bclr #6,@%0"::"r"(addr)); break; | ||
309 | case 7: __asm__("bclr #7,@%0"::"r"(addr)); break; | ||
310 | } | ||
311 | else | ||
312 | __asm__("bclr %w0,@%1"::"r"(b), "r"(addr)); | ||
313 | } | ||
314 | |||
315 | static __inline__ void ctrl_bset(int b, unsigned long addr) | ||
316 | { | ||
317 | if (__builtin_constant_p(b)) | ||
318 | switch (b) { | ||
319 | case 0: __asm__("bset #0,@%0"::"r"(addr)); break; | ||
320 | case 1: __asm__("bset #1,@%0"::"r"(addr)); break; | ||
321 | case 2: __asm__("bset #2,@%0"::"r"(addr)); break; | ||
322 | case 3: __asm__("bset #3,@%0"::"r"(addr)); break; | ||
323 | case 4: __asm__("bset #4,@%0"::"r"(addr)); break; | ||
324 | case 5: __asm__("bset #5,@%0"::"r"(addr)); break; | ||
325 | case 6: __asm__("bset #6,@%0"::"r"(addr)); break; | ||
326 | case 7: __asm__("bset #7,@%0"::"r"(addr)); break; | ||
327 | } | ||
328 | else | ||
329 | __asm__("bset %w0,@%1"::"r"(b), "r"(addr)); | ||
330 | } | ||
331 | |||
332 | /* Pages to physical address... */ | ||
333 | #define page_to_phys(page) ((page - mem_map) << PAGE_SHIFT) | ||
334 | #define page_to_bus(page) ((page - mem_map) << PAGE_SHIFT) | ||
335 | |||
336 | /* | ||
337 | * Macros used for converting between virtual and physical mappings. | ||
338 | */ | ||
339 | #define phys_to_virt(vaddr) ((void *) (vaddr)) | ||
340 | #define virt_to_phys(vaddr) ((unsigned long) (vaddr)) | ||
341 | |||
342 | #define virt_to_bus virt_to_phys | ||
343 | #define bus_to_virt phys_to_virt | ||
344 | |||
345 | /* | ||
346 | * Convert a physical pointer to a virtual kernel pointer for /dev/mem | ||
347 | * access | ||
348 | */ | ||
349 | #define xlate_dev_mem_ptr(p) __va(p) | ||
350 | |||
351 | /* | ||
352 | * Convert a virtual cached pointer to an uncached pointer | ||
353 | */ | ||
354 | #define xlate_dev_kmem_ptr(p) p | ||
355 | |||
356 | #endif /* __KERNEL__ */ | ||
357 | |||
358 | #endif /* _H8300_IO_H */ | ||
diff --git a/arch/h8300/include/asm/irq.h b/arch/h8300/include/asm/irq.h deleted file mode 100644 index 13d7c601cd0a..000000000000 --- a/arch/h8300/include/asm/irq.h +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | #ifndef _H8300_IRQ_H_ | ||
2 | #define _H8300_IRQ_H_ | ||
3 | |||
4 | #include <asm/ptrace.h> | ||
5 | |||
6 | #if defined(CONFIG_CPU_H8300H) | ||
7 | #define NR_IRQS 64 | ||
8 | #define EXT_IRQ0 12 | ||
9 | #define EXT_IRQ1 13 | ||
10 | #define EXT_IRQ2 14 | ||
11 | #define EXT_IRQ3 15 | ||
12 | #define EXT_IRQ4 16 | ||
13 | #define EXT_IRQ5 17 | ||
14 | #define EXT_IRQ6 18 | ||
15 | #define EXT_IRQ7 19 | ||
16 | #define EXT_IRQS 5 | ||
17 | #define IER_REGS *(volatile unsigned char *)IER | ||
18 | #endif | ||
19 | #if defined(CONFIG_CPU_H8S) | ||
20 | #define NR_IRQS 128 | ||
21 | #define EXT_IRQ0 16 | ||
22 | #define EXT_IRQ1 17 | ||
23 | #define EXT_IRQ2 18 | ||
24 | #define EXT_IRQ3 19 | ||
25 | #define EXT_IRQ4 20 | ||
26 | #define EXT_IRQ5 21 | ||
27 | #define EXT_IRQ6 22 | ||
28 | #define EXT_IRQ7 23 | ||
29 | #define EXT_IRQ8 24 | ||
30 | #define EXT_IRQ9 25 | ||
31 | #define EXT_IRQ10 26 | ||
32 | #define EXT_IRQ11 27 | ||
33 | #define EXT_IRQ12 28 | ||
34 | #define EXT_IRQ13 29 | ||
35 | #define EXT_IRQ14 30 | ||
36 | #define EXT_IRQ15 31 | ||
37 | #define EXT_IRQS 15 | ||
38 | |||
39 | #define IER_REGS *(volatile unsigned short *)IER | ||
40 | #endif | ||
41 | |||
42 | static __inline__ int irq_canonicalize(int irq) | ||
43 | { | ||
44 | return irq; | ||
45 | } | ||
46 | |||
47 | typedef void (*h8300_vector)(void); | ||
48 | |||
49 | #endif /* _H8300_IRQ_H_ */ | ||
diff --git a/arch/h8300/include/asm/irq_regs.h b/arch/h8300/include/asm/irq_regs.h deleted file mode 100644 index 3dd9c0b70270..000000000000 --- a/arch/h8300/include/asm/irq_regs.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/irq_regs.h> | ||
diff --git a/arch/h8300/include/asm/irqflags.h b/arch/h8300/include/asm/irqflags.h deleted file mode 100644 index 9617cd57aebd..000000000000 --- a/arch/h8300/include/asm/irqflags.h +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | #ifndef _H8300_IRQFLAGS_H | ||
2 | #define _H8300_IRQFLAGS_H | ||
3 | |||
4 | static inline unsigned long arch_local_save_flags(void) | ||
5 | { | ||
6 | unsigned long flags; | ||
7 | asm volatile ("stc ccr,%w0" : "=r" (flags)); | ||
8 | return flags; | ||
9 | } | ||
10 | |||
11 | static inline void arch_local_irq_disable(void) | ||
12 | { | ||
13 | asm volatile ("orc #0x80,ccr" : : : "memory"); | ||
14 | } | ||
15 | |||
16 | static inline void arch_local_irq_enable(void) | ||
17 | { | ||
18 | asm volatile ("andc #0x7f,ccr" : : : "memory"); | ||
19 | } | ||
20 | |||
21 | static inline unsigned long arch_local_irq_save(void) | ||
22 | { | ||
23 | unsigned long flags = arch_local_save_flags(); | ||
24 | arch_local_irq_disable(); | ||
25 | return flags; | ||
26 | } | ||
27 | |||
28 | static inline void arch_local_irq_restore(unsigned long flags) | ||
29 | { | ||
30 | asm volatile ("ldc %w0,ccr" : : "r" (flags) : "memory"); | ||
31 | } | ||
32 | |||
33 | static inline bool arch_irqs_disabled_flags(unsigned long flags) | ||
34 | { | ||
35 | return (flags & 0x80) == 0x80; | ||
36 | } | ||
37 | |||
38 | static inline bool arch_irqs_disabled(void) | ||
39 | { | ||
40 | return arch_irqs_disabled_flags(arch_local_save_flags()); | ||
41 | } | ||
42 | |||
43 | #endif /* _H8300_IRQFLAGS_H */ | ||
diff --git a/arch/h8300/include/asm/kdebug.h b/arch/h8300/include/asm/kdebug.h deleted file mode 100644 index 6ece1b037665..000000000000 --- a/arch/h8300/include/asm/kdebug.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/kdebug.h> | ||
diff --git a/arch/h8300/include/asm/kmap_types.h b/arch/h8300/include/asm/kmap_types.h deleted file mode 100644 index be12a7160116..000000000000 --- a/arch/h8300/include/asm/kmap_types.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _ASM_H8300_KMAP_TYPES_H | ||
2 | #define _ASM_H8300_KMAP_TYPES_H | ||
3 | |||
4 | #include <asm-generic/kmap_types.h> | ||
5 | |||
6 | #endif | ||
diff --git a/arch/h8300/include/asm/local.h b/arch/h8300/include/asm/local.h deleted file mode 100644 index fdd4efe437cd..000000000000 --- a/arch/h8300/include/asm/local.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _H8300_LOCAL_H_ | ||
2 | #define _H8300_LOCAL_H_ | ||
3 | |||
4 | #include <asm-generic/local.h> | ||
5 | |||
6 | #endif | ||
diff --git a/arch/h8300/include/asm/local64.h b/arch/h8300/include/asm/local64.h deleted file mode 100644 index 36c93b5cc239..000000000000 --- a/arch/h8300/include/asm/local64.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/local64.h> | ||
diff --git a/arch/h8300/include/asm/mc146818rtc.h b/arch/h8300/include/asm/mc146818rtc.h deleted file mode 100644 index ab9d9646d241..000000000000 --- a/arch/h8300/include/asm/mc146818rtc.h +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | /* | ||
2 | * Machine dependent access functions for RTC registers. | ||
3 | */ | ||
4 | #ifndef _H8300_MC146818RTC_H | ||
5 | #define _H8300_MC146818RTC_H | ||
6 | |||
7 | /* empty include file to satisfy the include in genrtc.c/ide-geometry.c */ | ||
8 | |||
9 | #endif /* _H8300_MC146818RTC_H */ | ||
diff --git a/arch/h8300/include/asm/mmu_context.h b/arch/h8300/include/asm/mmu_context.h deleted file mode 100644 index f44b730da54d..000000000000 --- a/arch/h8300/include/asm/mmu_context.h +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | #ifndef __H8300_MMU_CONTEXT_H | ||
2 | #define __H8300_MMU_CONTEXT_H | ||
3 | |||
4 | #include <asm/setup.h> | ||
5 | #include <asm/page.h> | ||
6 | #include <asm/pgalloc.h> | ||
7 | #include <asm-generic/mm_hooks.h> | ||
8 | |||
9 | static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) | ||
10 | { | ||
11 | } | ||
12 | |||
13 | static inline int | ||
14 | init_new_context(struct task_struct *tsk, struct mm_struct *mm) | ||
15 | { | ||
16 | // mm->context = virt_to_phys(mm->pgd); | ||
17 | return(0); | ||
18 | } | ||
19 | |||
20 | #define destroy_context(mm) do { } while(0) | ||
21 | #define deactivate_mm(tsk,mm) do { } while(0) | ||
22 | |||
23 | static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk) | ||
24 | { | ||
25 | } | ||
26 | |||
27 | static inline void activate_mm(struct mm_struct *prev_mm, | ||
28 | struct mm_struct *next_mm) | ||
29 | { | ||
30 | } | ||
31 | |||
32 | #endif | ||
diff --git a/arch/h8300/include/asm/mutex.h b/arch/h8300/include/asm/mutex.h deleted file mode 100644 index 458c1f7fbc18..000000000000 --- a/arch/h8300/include/asm/mutex.h +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | /* | ||
2 | * Pull in the generic implementation for the mutex fastpath. | ||
3 | * | ||
4 | * TODO: implement optimized primitives instead, or leave the generic | ||
5 | * implementation in place, or pick the atomic_xchg() based generic | ||
6 | * implementation. (see asm-generic/mutex-xchg.h for details) | ||
7 | */ | ||
8 | |||
9 | #include <asm-generic/mutex-dec.h> | ||
diff --git a/arch/h8300/include/asm/page.h b/arch/h8300/include/asm/page.h deleted file mode 100644 index 837381a2df46..000000000000 --- a/arch/h8300/include/asm/page.h +++ /dev/null | |||
@@ -1,78 +0,0 @@ | |||
1 | #ifndef _H8300_PAGE_H | ||
2 | #define _H8300_PAGE_H | ||
3 | |||
4 | /* PAGE_SHIFT determines the page size */ | ||
5 | |||
6 | #define PAGE_SHIFT (12) | ||
7 | #define PAGE_SIZE (1UL << PAGE_SHIFT) | ||
8 | #define PAGE_MASK (~(PAGE_SIZE-1)) | ||
9 | |||
10 | #include <asm/setup.h> | ||
11 | |||
12 | #ifndef __ASSEMBLY__ | ||
13 | |||
14 | #define get_user_page(vaddr) __get_free_page(GFP_KERNEL) | ||
15 | #define free_user_page(page, addr) free_page(addr) | ||
16 | |||
17 | #define clear_page(page) memset((page), 0, PAGE_SIZE) | ||
18 | #define copy_page(to,from) memcpy((to), (from), PAGE_SIZE) | ||
19 | |||
20 | #define clear_user_page(page, vaddr, pg) clear_page(page) | ||
21 | #define copy_user_page(to, from, vaddr, pg) copy_page(to, from) | ||
22 | |||
23 | #define __alloc_zeroed_user_highpage(movableflags, vma, vaddr) \ | ||
24 | alloc_page_vma(GFP_HIGHUSER | __GFP_ZERO | movableflags, vma, vaddr) | ||
25 | #define __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE | ||
26 | |||
27 | /* | ||
28 | * These are used to make use of C type-checking.. | ||
29 | */ | ||
30 | typedef struct { unsigned long pte; } pte_t; | ||
31 | typedef struct { unsigned long pmd[16]; } pmd_t; | ||
32 | typedef struct { unsigned long pgd; } pgd_t; | ||
33 | typedef struct { unsigned long pgprot; } pgprot_t; | ||
34 | typedef struct page *pgtable_t; | ||
35 | |||
36 | #define pte_val(x) ((x).pte) | ||
37 | #define pmd_val(x) ((&x)->pmd[0]) | ||
38 | #define pgd_val(x) ((x).pgd) | ||
39 | #define pgprot_val(x) ((x).pgprot) | ||
40 | |||
41 | #define __pte(x) ((pte_t) { (x) } ) | ||
42 | #define __pmd(x) ((pmd_t) { (x) } ) | ||
43 | #define __pgd(x) ((pgd_t) { (x) } ) | ||
44 | #define __pgprot(x) ((pgprot_t) { (x) } ) | ||
45 | |||
46 | extern unsigned long memory_start; | ||
47 | extern unsigned long memory_end; | ||
48 | |||
49 | #endif /* !__ASSEMBLY__ */ | ||
50 | |||
51 | #include <asm/page_offset.h> | ||
52 | |||
53 | #define PAGE_OFFSET (PAGE_OFFSET_RAW) | ||
54 | |||
55 | #ifndef __ASSEMBLY__ | ||
56 | |||
57 | #define __pa(vaddr) virt_to_phys(vaddr) | ||
58 | #define __va(paddr) phys_to_virt((unsigned long)paddr) | ||
59 | |||
60 | #define virt_to_pfn(kaddr) (__pa(kaddr) >> PAGE_SHIFT) | ||
61 | #define pfn_to_virt(pfn) __va((pfn) << PAGE_SHIFT) | ||
62 | |||
63 | #define MAP_NR(addr) (((unsigned long)(addr)-PAGE_OFFSET) >> PAGE_SHIFT) | ||
64 | #define virt_to_page(addr) (mem_map + (((unsigned long)(addr)-PAGE_OFFSET) >> PAGE_SHIFT)) | ||
65 | #define page_to_virt(page) ((((page) - mem_map) << PAGE_SHIFT) + PAGE_OFFSET) | ||
66 | #define pfn_valid(page) (page < max_mapnr) | ||
67 | |||
68 | #define ARCH_PFN_OFFSET (PAGE_OFFSET >> PAGE_SHIFT) | ||
69 | |||
70 | #define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \ | ||
71 | ((void *)(kaddr) < (void *)memory_end)) | ||
72 | |||
73 | #endif /* __ASSEMBLY__ */ | ||
74 | |||
75 | #include <asm-generic/memory_model.h> | ||
76 | #include <asm-generic/getorder.h> | ||
77 | |||
78 | #endif /* _H8300_PAGE_H */ | ||
diff --git a/arch/h8300/include/asm/page_offset.h b/arch/h8300/include/asm/page_offset.h deleted file mode 100644 index f8706463008c..000000000000 --- a/arch/h8300/include/asm/page_offset.h +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | |||
2 | #define PAGE_OFFSET_RAW 0x00000000 | ||
3 | |||
diff --git a/arch/h8300/include/asm/param.h b/arch/h8300/include/asm/param.h deleted file mode 100644 index c3909e7ff178..000000000000 --- a/arch/h8300/include/asm/param.h +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | #ifndef _H8300_PARAM_H | ||
2 | #define _H8300_PARAM_H | ||
3 | |||
4 | #include <uapi/asm/param.h> | ||
5 | |||
6 | #define HZ CONFIG_HZ | ||
7 | #define USER_HZ HZ | ||
8 | #define CLOCKS_PER_SEC (USER_HZ) | ||
9 | #endif /* _H8300_PARAM_H */ | ||
diff --git a/arch/h8300/include/asm/pci.h b/arch/h8300/include/asm/pci.h deleted file mode 100644 index 0b2acaa3dd84..000000000000 --- a/arch/h8300/include/asm/pci.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | #ifndef _ASM_H8300_PCI_H | ||
2 | #define _ASM_H8300_PCI_H | ||
3 | |||
4 | /* | ||
5 | * asm-h8300/pci.h - H8/300 specific PCI declarations. | ||
6 | * | ||
7 | * Yoshinori Sato <ysato@users.sourceforge.jp> | ||
8 | */ | ||
9 | |||
10 | #define pcibios_assign_all_busses() 0 | ||
11 | |||
12 | static inline void pcibios_penalize_isa_irq(int irq, int active) | ||
13 | { | ||
14 | /* We don't do dynamic PCI IRQ allocation */ | ||
15 | } | ||
16 | |||
17 | #define PCI_DMA_BUS_IS_PHYS (1) | ||
18 | |||
19 | #endif /* _ASM_H8300_PCI_H */ | ||
diff --git a/arch/h8300/include/asm/percpu.h b/arch/h8300/include/asm/percpu.h deleted file mode 100644 index 72c03e3666d8..000000000000 --- a/arch/h8300/include/asm/percpu.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __ARCH_H8300_PERCPU__ | ||
2 | #define __ARCH_H8300_PERCPU__ | ||
3 | |||
4 | #include <asm-generic/percpu.h> | ||
5 | |||
6 | #endif /* __ARCH_H8300_PERCPU__ */ | ||
diff --git a/arch/h8300/include/asm/pgalloc.h b/arch/h8300/include/asm/pgalloc.h deleted file mode 100644 index c2e89a286d23..000000000000 --- a/arch/h8300/include/asm/pgalloc.h +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | #ifndef _H8300_PGALLOC_H | ||
2 | #define _H8300_PGALLOC_H | ||
3 | |||
4 | #include <asm/setup.h> | ||
5 | |||
6 | #define check_pgt_cache() do { } while (0) | ||
7 | |||
8 | #endif /* _H8300_PGALLOC_H */ | ||
diff --git a/arch/h8300/include/asm/pgtable.h b/arch/h8300/include/asm/pgtable.h deleted file mode 100644 index 7ca20f894dd7..000000000000 --- a/arch/h8300/include/asm/pgtable.h +++ /dev/null | |||
@@ -1,73 +0,0 @@ | |||
1 | #ifndef _H8300_PGTABLE_H | ||
2 | #define _H8300_PGTABLE_H | ||
3 | |||
4 | #include <asm-generic/4level-fixup.h> | ||
5 | |||
6 | #include <linux/slab.h> | ||
7 | #include <asm/processor.h> | ||
8 | #include <asm/page.h> | ||
9 | #include <asm/io.h> | ||
10 | |||
11 | #define pgd_present(pgd) (1) /* pages are always present on NO_MM */ | ||
12 | #define pgd_none(pgd) (0) | ||
13 | #define pgd_bad(pgd) (0) | ||
14 | #define pgd_clear(pgdp) | ||
15 | #define kern_addr_valid(addr) (1) | ||
16 | #define pmd_offset(a, b) ((void *)0) | ||
17 | #define pmd_none(pmd) (1) | ||
18 | #define pgd_offset_k(adrdress) ((pgd_t *)0) | ||
19 | #define pte_offset_kernel(dir, address) ((pte_t *)0) | ||
20 | |||
21 | #define PAGE_NONE __pgprot(0) /* these mean nothing to NO_MM */ | ||
22 | #define PAGE_SHARED __pgprot(0) /* these mean nothing to NO_MM */ | ||
23 | #define PAGE_COPY __pgprot(0) /* these mean nothing to NO_MM */ | ||
24 | #define PAGE_READONLY __pgprot(0) /* these mean nothing to NO_MM */ | ||
25 | #define PAGE_KERNEL __pgprot(0) /* these mean nothing to NO_MM */ | ||
26 | |||
27 | extern void paging_init(void); | ||
28 | #define swapper_pg_dir ((pgd_t *) 0) | ||
29 | |||
30 | #define __swp_type(x) (0) | ||
31 | #define __swp_offset(x) (0) | ||
32 | #define __swp_entry(typ,off) ((swp_entry_t) { ((typ) | ((off) << 7)) }) | ||
33 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) | ||
34 | #define __swp_entry_to_pte(x) ((pte_t) { (x).val }) | ||
35 | |||
36 | static inline int pte_file(pte_t pte) { return 0; } | ||
37 | |||
38 | /* | ||
39 | * ZERO_PAGE is a global shared page that is always zero: used | ||
40 | * for zero-mapped memory areas etc.. | ||
41 | */ | ||
42 | #define ZERO_PAGE(vaddr) (virt_to_page(0)) | ||
43 | |||
44 | /* | ||
45 | * These would be in other places but having them here reduces the diffs. | ||
46 | */ | ||
47 | extern unsigned int kobjsize(const void *objp); | ||
48 | extern int is_in_rom(unsigned long); | ||
49 | |||
50 | /* | ||
51 | * No page table caches to initialise | ||
52 | */ | ||
53 | #define pgtable_cache_init() do { } while (0) | ||
54 | |||
55 | /* | ||
56 | * All 32bit addresses are effectively valid for vmalloc... | ||
57 | * Sort of meaningless for non-VM targets. | ||
58 | */ | ||
59 | #define VMALLOC_START 0 | ||
60 | #define VMALLOC_END 0xffffffff | ||
61 | |||
62 | /* | ||
63 | * All 32bit addresses are effectively valid for vmalloc... | ||
64 | * Sort of meaningless for non-VM targets. | ||
65 | */ | ||
66 | #define VMALLOC_START 0 | ||
67 | #define VMALLOC_END 0xffffffff | ||
68 | |||
69 | #define arch_enter_lazy_cpu_mode() do {} while (0) | ||
70 | |||
71 | #include <asm-generic/pgtable.h> | ||
72 | |||
73 | #endif /* _H8300_PGTABLE_H */ | ||
diff --git a/arch/h8300/include/asm/processor.h b/arch/h8300/include/asm/processor.h deleted file mode 100644 index 4b0ca49bb463..000000000000 --- a/arch/h8300/include/asm/processor.h +++ /dev/null | |||
@@ -1,139 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-h8300/processor.h | ||
3 | * | ||
4 | * Copyright (C) 2002 Yoshinori Sato | ||
5 | * | ||
6 | * Based on: linux/asm-m68nommu/processor.h | ||
7 | * | ||
8 | * Copyright (C) 1995 Hamish Macdonald | ||
9 | */ | ||
10 | |||
11 | #ifndef __ASM_H8300_PROCESSOR_H | ||
12 | #define __ASM_H8300_PROCESSOR_H | ||
13 | |||
14 | /* | ||
15 | * Default implementation of macro that returns current | ||
16 | * instruction pointer ("program counter"). | ||
17 | */ | ||
18 | #define current_text_addr() ({ __label__ _l; _l: &&_l;}) | ||
19 | |||
20 | #include <linux/compiler.h> | ||
21 | #include <asm/segment.h> | ||
22 | #include <asm/fpu.h> | ||
23 | #include <asm/ptrace.h> | ||
24 | #include <asm/current.h> | ||
25 | |||
26 | static inline unsigned long rdusp(void) { | ||
27 | extern unsigned int sw_usp; | ||
28 | return(sw_usp); | ||
29 | } | ||
30 | |||
31 | static inline void wrusp(unsigned long usp) { | ||
32 | extern unsigned int sw_usp; | ||
33 | sw_usp = usp; | ||
34 | } | ||
35 | |||
36 | /* | ||
37 | * User space process size: 3.75GB. This is hardcoded into a few places, | ||
38 | * so don't change it unless you know what you are doing. | ||
39 | */ | ||
40 | #define TASK_SIZE (0xFFFFFFFFUL) | ||
41 | |||
42 | #ifdef __KERNEL__ | ||
43 | #define STACK_TOP TASK_SIZE | ||
44 | #define STACK_TOP_MAX STACK_TOP | ||
45 | #endif | ||
46 | |||
47 | /* | ||
48 | * This decides where the kernel will search for a free chunk of vm | ||
49 | * space during mmap's. We won't be using it | ||
50 | */ | ||
51 | #define TASK_UNMAPPED_BASE 0 | ||
52 | |||
53 | struct thread_struct { | ||
54 | unsigned long ksp; /* kernel stack pointer */ | ||
55 | unsigned long usp; /* user stack pointer */ | ||
56 | unsigned long ccr; /* saved status register */ | ||
57 | unsigned long esp0; /* points to SR of stack frame */ | ||
58 | struct { | ||
59 | unsigned short *addr; | ||
60 | unsigned short inst; | ||
61 | } breakinfo; | ||
62 | }; | ||
63 | |||
64 | #define INIT_THREAD { \ | ||
65 | .ksp = sizeof(init_stack) + (unsigned long)init_stack, \ | ||
66 | .usp = 0, \ | ||
67 | .ccr = PS_S, \ | ||
68 | .esp0 = 0, \ | ||
69 | .breakinfo = { \ | ||
70 | .addr = (unsigned short *)-1, \ | ||
71 | .inst = 0 \ | ||
72 | } \ | ||
73 | } | ||
74 | |||
75 | /* | ||
76 | * Do necessary setup to start up a newly executed thread. | ||
77 | * | ||
78 | * pass the data segment into user programs if it exists, | ||
79 | * it can't hurt anything as far as I can tell | ||
80 | */ | ||
81 | #if defined(__H8300H__) | ||
82 | #define start_thread(_regs, _pc, _usp) \ | ||
83 | do { \ | ||
84 | (_regs)->pc = (_pc); \ | ||
85 | (_regs)->ccr = 0x00; /* clear all flags */ \ | ||
86 | (_regs)->er5 = current->mm->start_data; /* GOT base */ \ | ||
87 | wrusp((unsigned long)(_usp) - sizeof(unsigned long)*3); \ | ||
88 | } while(0) | ||
89 | #endif | ||
90 | #if defined(__H8300S__) | ||
91 | #define start_thread(_regs, _pc, _usp) \ | ||
92 | do { \ | ||
93 | (_regs)->pc = (_pc); \ | ||
94 | (_regs)->ccr = 0x00; /* clear kernel flag */ \ | ||
95 | (_regs)->exr = 0x78; /* enable all interrupts */ \ | ||
96 | (_regs)->er5 = current->mm->start_data; /* GOT base */ \ | ||
97 | /* 14 = space for retaddr(4), vector(4), er0(4) and ext(2) on stack */ \ | ||
98 | wrusp(((unsigned long)(_usp)) - 14); \ | ||
99 | } while(0) | ||
100 | #endif | ||
101 | |||
102 | /* Forward declaration, a strange C thing */ | ||
103 | struct task_struct; | ||
104 | |||
105 | /* Free all resources held by a thread. */ | ||
106 | static inline void release_thread(struct task_struct *dead_task) | ||
107 | { | ||
108 | } | ||
109 | |||
110 | /* | ||
111 | * Free current thread data structures etc.. | ||
112 | */ | ||
113 | static inline void exit_thread(void) | ||
114 | { | ||
115 | } | ||
116 | |||
117 | /* | ||
118 | * Return saved PC of a blocked thread. | ||
119 | */ | ||
120 | unsigned long thread_saved_pc(struct task_struct *tsk); | ||
121 | unsigned long get_wchan(struct task_struct *p); | ||
122 | |||
123 | #define KSTK_EIP(tsk) \ | ||
124 | ({ \ | ||
125 | unsigned long eip = 0; \ | ||
126 | if ((tsk)->thread.esp0 > PAGE_SIZE && \ | ||
127 | MAP_NR((tsk)->thread.esp0) < max_mapnr) \ | ||
128 | eip = ((struct pt_regs *) (tsk)->thread.esp0)->pc; \ | ||
129 | eip; }) | ||
130 | #define KSTK_ESP(tsk) ((tsk) == current ? rdusp() : (tsk)->thread.usp) | ||
131 | |||
132 | #define cpu_relax() barrier() | ||
133 | |||
134 | #define HARD_RESET_NOW() ({ \ | ||
135 | local_irq_disable(); \ | ||
136 | asm("jmp @@0"); \ | ||
137 | }) | ||
138 | |||
139 | #endif | ||
diff --git a/arch/h8300/include/asm/ptrace.h b/arch/h8300/include/asm/ptrace.h deleted file mode 100644 index c1826b95c5ca..000000000000 --- a/arch/h8300/include/asm/ptrace.h +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | #ifndef _H8300_PTRACE_H | ||
2 | #define _H8300_PTRACE_H | ||
3 | |||
4 | #include <uapi/asm/ptrace.h> | ||
5 | |||
6 | #ifndef __ASSEMBLY__ | ||
7 | #if defined(CONFIG_CPU_H8S) | ||
8 | #endif | ||
9 | #ifndef PS_S | ||
10 | #define PS_S (0x10) | ||
11 | #endif | ||
12 | |||
13 | #if defined(__H8300H__) | ||
14 | #define H8300_REGS_NO 11 | ||
15 | #endif | ||
16 | #if defined(__H8300S__) | ||
17 | #define H8300_REGS_NO 12 | ||
18 | #endif | ||
19 | |||
20 | /* Find the stack offset for a register, relative to thread.esp0. */ | ||
21 | #define PT_REG(reg) ((long)&((struct pt_regs *)0)->reg) | ||
22 | |||
23 | #define arch_has_single_step() (1) | ||
24 | |||
25 | #define user_mode(regs) (!((regs)->ccr & PS_S)) | ||
26 | #define instruction_pointer(regs) ((regs)->pc) | ||
27 | #define profile_pc(regs) instruction_pointer(regs) | ||
28 | #define current_pt_regs() ((struct pt_regs *) \ | ||
29 | (THREAD_SIZE + (unsigned long)current_thread_info()) - 1) | ||
30 | #define signal_pt_regs() ((struct pt_regs *)current->thread.esp0) | ||
31 | #define current_user_stack_pointer() rdusp() | ||
32 | #endif /* __ASSEMBLY__ */ | ||
33 | #endif /* _H8300_PTRACE_H */ | ||
diff --git a/arch/h8300/include/asm/regs267x.h b/arch/h8300/include/asm/regs267x.h deleted file mode 100644 index 1bff731a9f77..000000000000 --- a/arch/h8300/include/asm/regs267x.h +++ /dev/null | |||
@@ -1,336 +0,0 @@ | |||
1 | /* internal Peripherals Register address define */ | ||
2 | /* CPU: H8/306x */ | ||
3 | |||
4 | #if !defined(__REGS_H8S267x__) | ||
5 | #define __REGS_H8S267x__ | ||
6 | |||
7 | #if defined(__KERNEL__) | ||
8 | |||
9 | #define DASTCR 0xFEE01A | ||
10 | #define DADR0 0xFFFFA4 | ||
11 | #define DADR1 0xFFFFA5 | ||
12 | #define DACR01 0xFFFFA6 | ||
13 | #define DADR2 0xFFFFA8 | ||
14 | #define DADR3 0xFFFFA9 | ||
15 | #define DACR23 0xFFFFAA | ||
16 | |||
17 | #define ADDRA 0xFFFF90 | ||
18 | #define ADDRAH 0xFFFF90 | ||
19 | #define ADDRAL 0xFFFF91 | ||
20 | #define ADDRB 0xFFFF92 | ||
21 | #define ADDRBH 0xFFFF92 | ||
22 | #define ADDRBL 0xFFFF93 | ||
23 | #define ADDRC 0xFFFF94 | ||
24 | #define ADDRCH 0xFFFF94 | ||
25 | #define ADDRCL 0xFFFF95 | ||
26 | #define ADDRD 0xFFFF96 | ||
27 | #define ADDRDH 0xFFFF96 | ||
28 | #define ADDRDL 0xFFFF97 | ||
29 | #define ADDRE 0xFFFF98 | ||
30 | #define ADDREH 0xFFFF98 | ||
31 | #define ADDREL 0xFFFF99 | ||
32 | #define ADDRF 0xFFFF9A | ||
33 | #define ADDRFH 0xFFFF9A | ||
34 | #define ADDRFL 0xFFFF9B | ||
35 | #define ADDRG 0xFFFF9C | ||
36 | #define ADDRGH 0xFFFF9C | ||
37 | #define ADDRGL 0xFFFF9D | ||
38 | #define ADDRH 0xFFFF9E | ||
39 | #define ADDRHH 0xFFFF9E | ||
40 | #define ADDRHL 0xFFFF9F | ||
41 | |||
42 | #define ADCSR 0xFFFFA0 | ||
43 | #define ADCR 0xFFFFA1 | ||
44 | |||
45 | #define ABWCR 0xFFFEC0 | ||
46 | #define ASTCR 0xFFFEC1 | ||
47 | #define WTCRAH 0xFFFEC2 | ||
48 | #define WTCRAL 0xFFFEC3 | ||
49 | #define WTCRBH 0xFFFEC4 | ||
50 | #define WTCRBL 0xFFFEC5 | ||
51 | #define RDNCR 0xFFFEC6 | ||
52 | #define CSACRH 0xFFFEC8 | ||
53 | #define CSACRL 0xFFFEC9 | ||
54 | #define BROMCRH 0xFFFECA | ||
55 | #define BROMCRL 0xFFFECB | ||
56 | #define BCR 0xFFFECC | ||
57 | #define DRAMCR 0xFFFED0 | ||
58 | #define DRACCR 0xFFFED2 | ||
59 | #define REFCR 0xFFFED4 | ||
60 | #define RTCNT 0xFFFED6 | ||
61 | #define RTCOR 0xFFFED7 | ||
62 | |||
63 | #define MAR0AH 0xFFFEE0 | ||
64 | #define MAR0AL 0xFFFEE2 | ||
65 | #define IOAR0A 0xFFFEE4 | ||
66 | #define ETCR0A 0xFFFEE6 | ||
67 | #define MAR0BH 0xFFFEE8 | ||
68 | #define MAR0BL 0xFFFEEA | ||
69 | #define IOAR0B 0xFFFEEC | ||
70 | #define ETCR0B 0xFFFEEE | ||
71 | #define MAR1AH 0xFFFEF0 | ||
72 | #define MAR1AL 0xFFFEF2 | ||
73 | #define IOAR1A 0xFFFEF4 | ||
74 | #define ETCR1A 0xFFFEF6 | ||
75 | #define MAR1BH 0xFFFEF8 | ||
76 | #define MAR1BL 0xFFFEFA | ||
77 | #define IOAR1B 0xFFFEFC | ||
78 | #define ETCR1B 0xFFFEFE | ||
79 | #define DMAWER 0xFFFF20 | ||
80 | #define DMATCR 0xFFFF21 | ||
81 | #define DMACR0A 0xFFFF22 | ||
82 | #define DMACR0B 0xFFFF23 | ||
83 | #define DMACR1A 0xFFFF24 | ||
84 | #define DMACR1B 0xFFFF25 | ||
85 | #define DMABCRH 0xFFFF26 | ||
86 | #define DMABCRL 0xFFFF27 | ||
87 | |||
88 | #define EDSAR0 0xFFFDC0 | ||
89 | #define EDDAR0 0xFFFDC4 | ||
90 | #define EDTCR0 0xFFFDC8 | ||
91 | #define EDMDR0 0xFFFDCC | ||
92 | #define EDMDR0H 0xFFFDCC | ||
93 | #define EDMDR0L 0xFFFDCD | ||
94 | #define EDACR0 0xFFFDCE | ||
95 | #define EDSAR1 0xFFFDD0 | ||
96 | #define EDDAR1 0xFFFDD4 | ||
97 | #define EDTCR1 0xFFFDD8 | ||
98 | #define EDMDR1 0xFFFDDC | ||
99 | #define EDMDR1H 0xFFFDDC | ||
100 | #define EDMDR1L 0xFFFDDD | ||
101 | #define EDACR1 0xFFFDDE | ||
102 | #define EDSAR2 0xFFFDE0 | ||
103 | #define EDDAR2 0xFFFDE4 | ||
104 | #define EDTCR2 0xFFFDE8 | ||
105 | #define EDMDR2 0xFFFDEC | ||
106 | #define EDMDR2H 0xFFFDEC | ||
107 | #define EDMDR2L 0xFFFDED | ||
108 | #define EDACR2 0xFFFDEE | ||
109 | #define EDSAR3 0xFFFDF0 | ||
110 | #define EDDAR3 0xFFFDF4 | ||
111 | #define EDTCR3 0xFFFDF8 | ||
112 | #define EDMDR3 0xFFFDFC | ||
113 | #define EDMDR3H 0xFFFDFC | ||
114 | #define EDMDR3L 0xFFFDFD | ||
115 | #define EDACR3 0xFFFDFE | ||
116 | |||
117 | #define IPRA 0xFFFE00 | ||
118 | #define IPRB 0xFFFE02 | ||
119 | #define IPRC 0xFFFE04 | ||
120 | #define IPRD 0xFFFE06 | ||
121 | #define IPRE 0xFFFE08 | ||
122 | #define IPRF 0xFFFE0A | ||
123 | #define IPRG 0xFFFE0C | ||
124 | #define IPRH 0xFFFE0E | ||
125 | #define IPRI 0xFFFE10 | ||
126 | #define IPRJ 0xFFFE12 | ||
127 | #define IPRK 0xFFFE14 | ||
128 | #define ITSR 0xFFFE16 | ||
129 | #define SSIER 0xFFFE18 | ||
130 | #define ISCRH 0xFFFE1A | ||
131 | #define ISCRL 0xFFFE1C | ||
132 | |||
133 | #define INTCR 0xFFFF31 | ||
134 | #define IER 0xFFFF32 | ||
135 | #define IERH 0xFFFF32 | ||
136 | #define IERL 0xFFFF33 | ||
137 | #define ISR 0xFFFF34 | ||
138 | #define ISRH 0xFFFF34 | ||
139 | #define ISRL 0xFFFF35 | ||
140 | |||
141 | #define P1DDR 0xFFFE20 | ||
142 | #define P2DDR 0xFFFE21 | ||
143 | #define P3DDR 0xFFFE22 | ||
144 | #define P4DDR 0xFFFE23 | ||
145 | #define P5DDR 0xFFFE24 | ||
146 | #define P6DDR 0xFFFE25 | ||
147 | #define P7DDR 0xFFFE26 | ||
148 | #define P8DDR 0xFFFE27 | ||
149 | #define P9DDR 0xFFFE28 | ||
150 | #define PADDR 0xFFFE29 | ||
151 | #define PBDDR 0xFFFE2A | ||
152 | #define PCDDR 0xFFFE2B | ||
153 | #define PDDDR 0xFFFE2C | ||
154 | #define PEDDR 0xFFFE2D | ||
155 | #define PFDDR 0xFFFE2E | ||
156 | #define PGDDR 0xFFFE2F | ||
157 | #define PHDDR 0xFFFF74 | ||
158 | |||
159 | #define PFCR0 0xFFFE32 | ||
160 | #define PFCR1 0xFFFE33 | ||
161 | #define PFCR2 0xFFFE34 | ||
162 | |||
163 | #define PAPCR 0xFFFE36 | ||
164 | #define PBPCR 0xFFFE37 | ||
165 | #define PCPCR 0xFFFE38 | ||
166 | #define PDPCR 0xFFFE39 | ||
167 | #define PEPCR 0xFFFE3A | ||
168 | |||
169 | #define P3ODR 0xFFFE3C | ||
170 | #define PAODR 0xFFFE3D | ||
171 | |||
172 | #define P1DR 0xFFFF60 | ||
173 | #define P2DR 0xFFFF61 | ||
174 | #define P3DR 0xFFFF62 | ||
175 | #define P4DR 0xFFFF63 | ||
176 | #define P5DR 0xFFFF64 | ||
177 | #define P6DR 0xFFFF65 | ||
178 | #define P7DR 0xFFFF66 | ||
179 | #define P8DR 0xFFFF67 | ||
180 | #define P9DR 0xFFFF68 | ||
181 | #define PADR 0xFFFF69 | ||
182 | #define PBDR 0xFFFF6A | ||
183 | #define PCDR 0xFFFF6B | ||
184 | #define PDDR 0xFFFF6C | ||
185 | #define PEDR 0xFFFF6D | ||
186 | #define PFDR 0xFFFF6E | ||
187 | #define PGDR 0xFFFF6F | ||
188 | #define PHDR 0xFFFF72 | ||
189 | |||
190 | #define PORT1 0xFFFF50 | ||
191 | #define PORT2 0xFFFF51 | ||
192 | #define PORT3 0xFFFF52 | ||
193 | #define PORT4 0xFFFF53 | ||
194 | #define PORT5 0xFFFF54 | ||
195 | #define PORT6 0xFFFF55 | ||
196 | #define PORT7 0xFFFF56 | ||
197 | #define PORT8 0xFFFF57 | ||
198 | #define PORT9 0xFFFF58 | ||
199 | #define PORTA 0xFFFF59 | ||
200 | #define PORTB 0xFFFF5A | ||
201 | #define PORTC 0xFFFF5B | ||
202 | #define PORTD 0xFFFF5C | ||
203 | #define PORTE 0xFFFF5D | ||
204 | #define PORTF 0xFFFF5E | ||
205 | #define PORTG 0xFFFF5F | ||
206 | #define PORTH 0xFFFF70 | ||
207 | |||
208 | #define PCR 0xFFFF46 | ||
209 | #define PMR 0xFFFF47 | ||
210 | #define NDERH 0xFFFF48 | ||
211 | #define NDERL 0xFFFF49 | ||
212 | #define PODRH 0xFFFF4A | ||
213 | #define PODRL 0xFFFF4B | ||
214 | #define NDRH1 0xFFFF4C | ||
215 | #define NDRL1 0xFFFF4D | ||
216 | #define NDRH2 0xFFFF4E | ||
217 | #define NDRL2 0xFFFF4F | ||
218 | |||
219 | #define SMR0 0xFFFF78 | ||
220 | #define BRR0 0xFFFF79 | ||
221 | #define SCR0 0xFFFF7A | ||
222 | #define TDR0 0xFFFF7B | ||
223 | #define SSR0 0xFFFF7C | ||
224 | #define RDR0 0xFFFF7D | ||
225 | #define SCMR0 0xFFFF7E | ||
226 | #define SMR1 0xFFFF80 | ||
227 | #define BRR1 0xFFFF81 | ||
228 | #define SCR1 0xFFFF82 | ||
229 | #define TDR1 0xFFFF83 | ||
230 | #define SSR1 0xFFFF84 | ||
231 | #define RDR1 0xFFFF85 | ||
232 | #define SCMR1 0xFFFF86 | ||
233 | #define SMR2 0xFFFF88 | ||
234 | #define BRR2 0xFFFF89 | ||
235 | #define SCR2 0xFFFF8A | ||
236 | #define TDR2 0xFFFF8B | ||
237 | #define SSR2 0xFFFF8C | ||
238 | #define RDR2 0xFFFF8D | ||
239 | #define SCMR2 0xFFFF8E | ||
240 | |||
241 | #define IRCR0 0xFFFE1E | ||
242 | #define SEMR 0xFFFDA8 | ||
243 | |||
244 | #define MDCR 0xFFFF3E | ||
245 | #define SYSCR 0xFFFF3D | ||
246 | #define MSTPCRH 0xFFFF40 | ||
247 | #define MSTPCRL 0xFFFF41 | ||
248 | #define FLMCR1 0xFFFFC8 | ||
249 | #define FLMCR2 0xFFFFC9 | ||
250 | #define EBR1 0xFFFFCA | ||
251 | #define EBR2 0xFFFFCB | ||
252 | #define CTGARC_RAMCR 0xFFFECE | ||
253 | #define SBYCR 0xFFFF3A | ||
254 | #define SCKCR 0xFFFF3B | ||
255 | #define PLLCR 0xFFFF45 | ||
256 | |||
257 | #define TSTR 0xFFFFC0 | ||
258 | #define TSNC 0XFFFFC1 | ||
259 | |||
260 | #define TCR0 0xFFFFD0 | ||
261 | #define TMDR0 0xFFFFD1 | ||
262 | #define TIORH0 0xFFFFD2 | ||
263 | #define TIORL0 0xFFFFD3 | ||
264 | #define TIER0 0xFFFFD4 | ||
265 | #define TSR0 0xFFFFD5 | ||
266 | #define TCNT0 0xFFFFD6 | ||
267 | #define GRA0 0xFFFFD8 | ||
268 | #define GRB0 0xFFFFDA | ||
269 | #define GRC0 0xFFFFDC | ||
270 | #define GRD0 0xFFFFDE | ||
271 | #define TCR1 0xFFFFE0 | ||
272 | #define TMDR1 0xFFFFE1 | ||
273 | #define TIORH1 0xFFFFE2 | ||
274 | #define TIORL1 0xFFFFE3 | ||
275 | #define TIER1 0xFFFFE4 | ||
276 | #define TSR1 0xFFFFE5 | ||
277 | #define TCNT1 0xFFFFE6 | ||
278 | #define GRA1 0xFFFFE8 | ||
279 | #define GRB1 0xFFFFEA | ||
280 | #define TCR2 0xFFFFF0 | ||
281 | #define TMDR2 0xFFFFF1 | ||
282 | #define TIORH2 0xFFFFF2 | ||
283 | #define TIORL2 0xFFFFF3 | ||
284 | #define TIER2 0xFFFFF4 | ||
285 | #define TSR2 0xFFFFF5 | ||
286 | #define TCNT2 0xFFFFF6 | ||
287 | #define GRA2 0xFFFFF8 | ||
288 | #define GRB2 0xFFFFFA | ||
289 | #define TCR3 0xFFFE80 | ||
290 | #define TMDR3 0xFFFE81 | ||
291 | #define TIORH3 0xFFFE82 | ||
292 | #define TIORL3 0xFFFE83 | ||
293 | #define TIER3 0xFFFE84 | ||
294 | #define TSR3 0xFFFE85 | ||
295 | #define TCNT3 0xFFFE86 | ||
296 | #define GRA3 0xFFFE88 | ||
297 | #define GRB3 0xFFFE8A | ||
298 | #define GRC3 0xFFFE8C | ||
299 | #define GRD3 0xFFFE8E | ||
300 | #define TCR4 0xFFFE90 | ||
301 | #define TMDR4 0xFFFE91 | ||
302 | #define TIORH4 0xFFFE92 | ||
303 | #define TIORL4 0xFFFE93 | ||
304 | #define TIER4 0xFFFE94 | ||
305 | #define TSR4 0xFFFE95 | ||
306 | #define TCNT4 0xFFFE96 | ||
307 | #define GRA4 0xFFFE98 | ||
308 | #define GRB4 0xFFFE9A | ||
309 | #define TCR5 0xFFFEA0 | ||
310 | #define TMDR5 0xFFFEA1 | ||
311 | #define TIORH5 0xFFFEA2 | ||
312 | #define TIORL5 0xFFFEA3 | ||
313 | #define TIER5 0xFFFEA4 | ||
314 | #define TSR5 0xFFFEA5 | ||
315 | #define TCNT5 0xFFFEA6 | ||
316 | #define GRA5 0xFFFEA8 | ||
317 | #define GRB5 0xFFFEAA | ||
318 | |||
319 | #define _8TCR0 0xFFFFB0 | ||
320 | #define _8TCR1 0xFFFFB1 | ||
321 | #define _8TCSR0 0xFFFFB2 | ||
322 | #define _8TCSR1 0xFFFFB3 | ||
323 | #define _8TCORA0 0xFFFFB4 | ||
324 | #define _8TCORA1 0xFFFFB5 | ||
325 | #define _8TCORB0 0xFFFFB6 | ||
326 | #define _8TCORB1 0xFFFFB7 | ||
327 | #define _8TCNT0 0xFFFFB8 | ||
328 | #define _8TCNT1 0xFFFFB9 | ||
329 | |||
330 | #define TCSR 0xFFFFBC | ||
331 | #define TCNT 0xFFFFBD | ||
332 | #define RSTCSRW 0xFFFFBE | ||
333 | #define RSTCSRR 0xFFFFBF | ||
334 | |||
335 | #endif /* __KERNEL__ */ | ||
336 | #endif /* __REGS_H8S267x__ */ | ||
diff --git a/arch/h8300/include/asm/regs306x.h b/arch/h8300/include/asm/regs306x.h deleted file mode 100644 index 027dd633fa25..000000000000 --- a/arch/h8300/include/asm/regs306x.h +++ /dev/null | |||
@@ -1,212 +0,0 @@ | |||
1 | /* internal Peripherals Register address define */ | ||
2 | /* CPU: H8/306x */ | ||
3 | |||
4 | #if !defined(__REGS_H8306x__) | ||
5 | #define __REGS_H8306x__ | ||
6 | |||
7 | #if defined(__KERNEL__) | ||
8 | |||
9 | #define DASTCR 0xFEE01A | ||
10 | #define DADR0 0xFEE09C | ||
11 | #define DADR1 0xFEE09D | ||
12 | #define DACR 0xFEE09E | ||
13 | |||
14 | #define ADDRAH 0xFFFFE0 | ||
15 | #define ADDRAL 0xFFFFE1 | ||
16 | #define ADDRBH 0xFFFFE2 | ||
17 | #define ADDRBL 0xFFFFE3 | ||
18 | #define ADDRCH 0xFFFFE4 | ||
19 | #define ADDRCL 0xFFFFE5 | ||
20 | #define ADDRDH 0xFFFFE6 | ||
21 | #define ADDRDL 0xFFFFE7 | ||
22 | #define ADCSR 0xFFFFE8 | ||
23 | #define ADCR 0xFFFFE9 | ||
24 | |||
25 | #define BRCR 0xFEE013 | ||
26 | #define ADRCR 0xFEE01E | ||
27 | #define CSCR 0xFEE01F | ||
28 | #define ABWCR 0xFEE020 | ||
29 | #define ASTCR 0xFEE021 | ||
30 | #define WCRH 0xFEE022 | ||
31 | #define WCRL 0xFEE023 | ||
32 | #define BCR 0xFEE024 | ||
33 | #define DRCRA 0xFEE026 | ||
34 | #define DRCRB 0xFEE027 | ||
35 | #define RTMCSR 0xFEE028 | ||
36 | #define RTCNT 0xFEE029 | ||
37 | #define RTCOR 0xFEE02A | ||
38 | |||
39 | #define MAR0AR 0xFFFF20 | ||
40 | #define MAR0AE 0xFFFF21 | ||
41 | #define MAR0AH 0xFFFF22 | ||
42 | #define MAR0AL 0xFFFF23 | ||
43 | #define ETCR0AL 0xFFFF24 | ||
44 | #define ETCR0AH 0xFFFF25 | ||
45 | #define IOAR0A 0xFFFF26 | ||
46 | #define DTCR0A 0xFFFF27 | ||
47 | #define MAR0BR 0xFFFF28 | ||
48 | #define MAR0BE 0xFFFF29 | ||
49 | #define MAR0BH 0xFFFF2A | ||
50 | #define MAR0BL 0xFFFF2B | ||
51 | #define ETCR0BL 0xFFFF2C | ||
52 | #define ETCR0BH 0xFFFF2D | ||
53 | #define IOAR0B 0xFFFF2E | ||
54 | #define DTCR0B 0xFFFF2F | ||
55 | #define MAR1AR 0xFFFF30 | ||
56 | #define MAR1AE 0xFFFF31 | ||
57 | #define MAR1AH 0xFFFF32 | ||
58 | #define MAR1AL 0xFFFF33 | ||
59 | #define ETCR1AL 0xFFFF34 | ||
60 | #define ETCR1AH 0xFFFF35 | ||
61 | #define IOAR1A 0xFFFF36 | ||
62 | #define DTCR1A 0xFFFF37 | ||
63 | #define MAR1BR 0xFFFF38 | ||
64 | #define MAR1BE 0xFFFF39 | ||
65 | #define MAR1BH 0xFFFF3A | ||
66 | #define MAR1BL 0xFFFF3B | ||
67 | #define ETCR1BL 0xFFFF3C | ||
68 | #define ETCR1BH 0xFFFF3D | ||
69 | #define IOAR1B 0xFFFF3E | ||
70 | #define DTCR1B 0xFFFF3F | ||
71 | |||
72 | #define ISCR 0xFEE014 | ||
73 | #define IER 0xFEE015 | ||
74 | #define ISR 0xFEE016 | ||
75 | #define IPRA 0xFEE018 | ||
76 | #define IPRB 0xFEE019 | ||
77 | |||
78 | #define P1DDR 0xFEE000 | ||
79 | #define P2DDR 0xFEE001 | ||
80 | #define P3DDR 0xFEE002 | ||
81 | #define P4DDR 0xFEE003 | ||
82 | #define P5DDR 0xFEE004 | ||
83 | #define P6DDR 0xFEE005 | ||
84 | /*#define P7DDR 0xFEE006*/ | ||
85 | #define P8DDR 0xFEE007 | ||
86 | #define P9DDR 0xFEE008 | ||
87 | #define PADDR 0xFEE009 | ||
88 | #define PBDDR 0xFEE00A | ||
89 | |||
90 | #define P1DR 0xFFFFD0 | ||
91 | #define P2DR 0xFFFFD1 | ||
92 | #define P3DR 0xFFFFD2 | ||
93 | #define P4DR 0xFFFFD3 | ||
94 | #define P5DR 0xFFFFD4 | ||
95 | #define P6DR 0xFFFFD5 | ||
96 | /*#define P7DR 0xFFFFD6*/ | ||
97 | #define P8DR 0xFFFFD7 | ||
98 | #define P9DR 0xFFFFD8 | ||
99 | #define PADR 0xFFFFD9 | ||
100 | #define PBDR 0xFFFFDA | ||
101 | |||
102 | #define P2CR 0xFEE03C | ||
103 | #define P4CR 0xFEE03E | ||
104 | #define P5CR 0xFEE03F | ||
105 | |||
106 | #define SMR0 0xFFFFB0 | ||
107 | #define BRR0 0xFFFFB1 | ||
108 | #define SCR0 0xFFFFB2 | ||
109 | #define TDR0 0xFFFFB3 | ||
110 | #define SSR0 0xFFFFB4 | ||
111 | #define RDR0 0xFFFFB5 | ||
112 | #define SCMR0 0xFFFFB6 | ||
113 | #define SMR1 0xFFFFB8 | ||
114 | #define BRR1 0xFFFFB9 | ||
115 | #define SCR1 0xFFFFBA | ||
116 | #define TDR1 0xFFFFBB | ||
117 | #define SSR1 0xFFFFBC | ||
118 | #define RDR1 0xFFFFBD | ||
119 | #define SCMR1 0xFFFFBE | ||
120 | #define SMR2 0xFFFFC0 | ||
121 | #define BRR2 0xFFFFC1 | ||
122 | #define SCR2 0xFFFFC2 | ||
123 | #define TDR2 0xFFFFC3 | ||
124 | #define SSR2 0xFFFFC4 | ||
125 | #define RDR2 0xFFFFC5 | ||
126 | #define SCMR2 0xFFFFC6 | ||
127 | |||
128 | #define MDCR 0xFEE011 | ||
129 | #define SYSCR 0xFEE012 | ||
130 | #define DIVCR 0xFEE01B | ||
131 | #define MSTCRH 0xFEE01C | ||
132 | #define MSTCRL 0xFEE01D | ||
133 | #define FLMCR1 0xFEE030 | ||
134 | #define FLMCR2 0xFEE031 | ||
135 | #define EBR1 0xFEE032 | ||
136 | #define EBR2 0xFEE033 | ||
137 | #define RAMCR 0xFEE077 | ||
138 | |||
139 | #define TSTR 0xFFFF60 | ||
140 | #define TSNC 0XFFFF61 | ||
141 | #define TMDR 0xFFFF62 | ||
142 | #define TOLR 0xFFFF63 | ||
143 | #define TISRA 0xFFFF64 | ||
144 | #define TISRB 0xFFFF65 | ||
145 | #define TISRC 0xFFFF66 | ||
146 | #define TCR0 0xFFFF68 | ||
147 | #define TIOR0 0xFFFF69 | ||
148 | #define TCNT0H 0xFFFF6A | ||
149 | #define TCNT0L 0xFFFF6B | ||
150 | #define GRA0H 0xFFFF6C | ||
151 | #define GRA0L 0xFFFF6D | ||
152 | #define GRB0H 0xFFFF6E | ||
153 | #define GRB0L 0xFFFF6F | ||
154 | #define TCR1 0xFFFF70 | ||
155 | #define TIOR1 0xFFFF71 | ||
156 | #define TCNT1H 0xFFFF72 | ||
157 | #define TCNT1L 0xFFFF73 | ||
158 | #define GRA1H 0xFFFF74 | ||
159 | #define GRA1L 0xFFFF75 | ||
160 | #define GRB1H 0xFFFF76 | ||
161 | #define GRB1L 0xFFFF77 | ||
162 | #define TCR3 0xFFFF78 | ||
163 | #define TIOR3 0xFFFF79 | ||
164 | #define TCNT3H 0xFFFF7A | ||
165 | #define TCNT3L 0xFFFF7B | ||
166 | #define GRA3H 0xFFFF7C | ||
167 | #define GRA3L 0xFFFF7D | ||
168 | #define GRB3H 0xFFFF7E | ||
169 | #define GRB3L 0xFFFF7F | ||
170 | |||
171 | #define _8TCR0 0xFFFF80 | ||
172 | #define _8TCR1 0xFFFF81 | ||
173 | #define _8TCSR0 0xFFFF82 | ||
174 | #define _8TCSR1 0xFFFF83 | ||
175 | #define TCORA0 0xFFFF84 | ||
176 | #define TCORA1 0xFFFF85 | ||
177 | #define TCORB0 0xFFFF86 | ||
178 | #define TCORB1 0xFFFF87 | ||
179 | #define _8TCNT0 0xFFFF88 | ||
180 | #define _8TCNT1 0xFFFF89 | ||
181 | |||
182 | #define _8TCR2 0xFFFF90 | ||
183 | #define _8TCR3 0xFFFF91 | ||
184 | #define _8TCSR2 0xFFFF92 | ||
185 | #define _8TCSR3 0xFFFF93 | ||
186 | #define TCORA2 0xFFFF94 | ||
187 | #define TCORA3 0xFFFF95 | ||
188 | #define TCORB2 0xFFFF96 | ||
189 | #define TCORB3 0xFFFF97 | ||
190 | #define _8TCNT2 0xFFFF98 | ||
191 | #define _8TCNT3 0xFFFF99 | ||
192 | |||
193 | #define TCSR 0xFFFF8C | ||
194 | #define TCNT 0xFFFF8D | ||
195 | #define RSTCSR 0xFFFF8F | ||
196 | |||
197 | #define TPMR 0xFFFFA0 | ||
198 | #define TPCR 0xFFFFA1 | ||
199 | #define NDERB 0xFFFFA2 | ||
200 | #define NDERA 0xFFFFA3 | ||
201 | #define NDRB1 0xFFFFA4 | ||
202 | #define NDRA1 0xFFFFA5 | ||
203 | #define NDRB2 0xFFFFA6 | ||
204 | #define NDRA2 0xFFFFA7 | ||
205 | |||
206 | #define TCSR 0xFFFF8C | ||
207 | #define TCNT 0xFFFF8D | ||
208 | #define RSTCSRW 0xFFFF8E | ||
209 | #define RSTCSRR 0xFFFF8F | ||
210 | |||
211 | #endif /* __KERNEL__ */ | ||
212 | #endif /* __REGS_H8306x__ */ | ||
diff --git a/arch/h8300/include/asm/scatterlist.h b/arch/h8300/include/asm/scatterlist.h deleted file mode 100644 index 82130eda0e5f..000000000000 --- a/arch/h8300/include/asm/scatterlist.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _H8300_SCATTERLIST_H | ||
2 | #define _H8300_SCATTERLIST_H | ||
3 | |||
4 | #include <asm-generic/scatterlist.h> | ||
5 | |||
6 | #endif /* !(_H8300_SCATTERLIST_H) */ | ||
diff --git a/arch/h8300/include/asm/sections.h b/arch/h8300/include/asm/sections.h deleted file mode 100644 index a81743e8b743..000000000000 --- a/arch/h8300/include/asm/sections.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _H8300_SECTIONS_H_ | ||
2 | #define _H8300_SECTIONS_H_ | ||
3 | |||
4 | #include <asm-generic/sections.h> | ||
5 | |||
6 | #endif | ||
diff --git a/arch/h8300/include/asm/segment.h b/arch/h8300/include/asm/segment.h deleted file mode 100644 index b79a82d0f99d..000000000000 --- a/arch/h8300/include/asm/segment.h +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | #ifndef _H8300_SEGMENT_H | ||
2 | #define _H8300_SEGMENT_H | ||
3 | |||
4 | /* define constants */ | ||
5 | #define USER_DATA (1) | ||
6 | #ifndef __USER_DS | ||
7 | #define __USER_DS (USER_DATA) | ||
8 | #endif | ||
9 | #define USER_PROGRAM (2) | ||
10 | #define SUPER_DATA (3) | ||
11 | #ifndef __KERNEL_DS | ||
12 | #define __KERNEL_DS (SUPER_DATA) | ||
13 | #endif | ||
14 | #define SUPER_PROGRAM (4) | ||
15 | |||
16 | #ifndef __ASSEMBLY__ | ||
17 | |||
18 | typedef struct { | ||
19 | unsigned long seg; | ||
20 | } mm_segment_t; | ||
21 | |||
22 | #define MAKE_MM_SEG(s) ((mm_segment_t) { (s) }) | ||
23 | #define USER_DS MAKE_MM_SEG(__USER_DS) | ||
24 | #define KERNEL_DS MAKE_MM_SEG(__KERNEL_DS) | ||
25 | |||
26 | /* | ||
27 | * Get/set the SFC/DFC registers for MOVES instructions | ||
28 | */ | ||
29 | |||
30 | static inline mm_segment_t get_fs(void) | ||
31 | { | ||
32 | return USER_DS; | ||
33 | } | ||
34 | |||
35 | static inline mm_segment_t get_ds(void) | ||
36 | { | ||
37 | /* return the supervisor data space code */ | ||
38 | return KERNEL_DS; | ||
39 | } | ||
40 | |||
41 | static inline void set_fs(mm_segment_t val) | ||
42 | { | ||
43 | } | ||
44 | |||
45 | #define segment_eq(a,b) ((a).seg == (b).seg) | ||
46 | |||
47 | #endif /* __ASSEMBLY__ */ | ||
48 | |||
49 | #endif /* _H8300_SEGMENT_H */ | ||
diff --git a/arch/h8300/include/asm/sh_bios.h b/arch/h8300/include/asm/sh_bios.h deleted file mode 100644 index b6bb6e58295c..000000000000 --- a/arch/h8300/include/asm/sh_bios.h +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | /* eCos HAL interface header */ | ||
2 | |||
3 | #ifndef SH_BIOS_H | ||
4 | #define SH_BIOS_H | ||
5 | |||
6 | #define HAL_IF_VECTOR_TABLE 0xfffe20 | ||
7 | #define CALL_IF_SET_CONSOLE_COMM 13 | ||
8 | #define QUERY_CURRENT -1 | ||
9 | #define MANGLER -3 | ||
10 | |||
11 | /* Checking for GDB stub active */ | ||
12 | /* suggestion Jonathan Larmour */ | ||
13 | static int sh_bios_in_gdb_mode(void) | ||
14 | { | ||
15 | static int gdb_active = -1; | ||
16 | if (gdb_active == -1) { | ||
17 | int (*set_console_comm)(int); | ||
18 | set_console_comm = ((void **)HAL_IF_VECTOR_TABLE)[CALL_IF_SET_CONSOLE_COMM]; | ||
19 | gdb_active = (set_console_comm(QUERY_CURRENT) == MANGLER); | ||
20 | } | ||
21 | return gdb_active; | ||
22 | } | ||
23 | |||
24 | static void sh_bios_gdb_detach(void) | ||
25 | { | ||
26 | |||
27 | } | ||
28 | |||
29 | #endif | ||
diff --git a/arch/h8300/include/asm/shm.h b/arch/h8300/include/asm/shm.h deleted file mode 100644 index ed6623c0545d..000000000000 --- a/arch/h8300/include/asm/shm.h +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | #ifndef _H8300_SHM_H | ||
2 | #define _H8300_SHM_H | ||
3 | |||
4 | |||
5 | /* format of page table entries that correspond to shared memory pages | ||
6 | currently out in swap space (see also mm/swap.c): | ||
7 | bits 0-1 (PAGE_PRESENT) is = 0 | ||
8 | bits 8..2 (SWP_TYPE) are = SHM_SWP_TYPE | ||
9 | bits 31..9 are used like this: | ||
10 | bits 15..9 (SHM_ID) the id of the shared memory segment | ||
11 | bits 30..16 (SHM_IDX) the index of the page within the shared memory segment | ||
12 | (actually only bits 25..16 get used since SHMMAX is so low) | ||
13 | bit 31 (SHM_READ_ONLY) flag whether the page belongs to a read-only attach | ||
14 | */ | ||
15 | /* on the m68k both bits 0 and 1 must be zero */ | ||
16 | /* format on the sun3 is similar, but bits 30, 31 are set to zero and all | ||
17 | others are reduced by 2. --m */ | ||
18 | |||
19 | #ifndef CONFIG_SUN3 | ||
20 | #define SHM_ID_SHIFT 9 | ||
21 | #else | ||
22 | #define SHM_ID_SHIFT 7 | ||
23 | #endif | ||
24 | #define _SHM_ID_BITS 7 | ||
25 | #define SHM_ID_MASK ((1<<_SHM_ID_BITS)-1) | ||
26 | |||
27 | #define SHM_IDX_SHIFT (SHM_ID_SHIFT+_SHM_ID_BITS) | ||
28 | #define _SHM_IDX_BITS 15 | ||
29 | #define SHM_IDX_MASK ((1<<_SHM_IDX_BITS)-1) | ||
30 | |||
31 | #endif /* _H8300_SHM_H */ | ||
diff --git a/arch/h8300/include/asm/shmparam.h b/arch/h8300/include/asm/shmparam.h deleted file mode 100644 index d1863953ec64..000000000000 --- a/arch/h8300/include/asm/shmparam.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _H8300_SHMPARAM_H | ||
2 | #define _H8300_SHMPARAM_H | ||
3 | |||
4 | #define SHMLBA PAGE_SIZE /* attach addr a multiple of this */ | ||
5 | |||
6 | #endif /* _H8300_SHMPARAM_H */ | ||
diff --git a/arch/h8300/include/asm/signal.h b/arch/h8300/include/asm/signal.h deleted file mode 100644 index 6341e36386f8..000000000000 --- a/arch/h8300/include/asm/signal.h +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | #ifndef _H8300_SIGNAL_H | ||
2 | #define _H8300_SIGNAL_H | ||
3 | |||
4 | #include <uapi/asm/signal.h> | ||
5 | |||
6 | /* Most things should be clean enough to redefine this at will, if care | ||
7 | is taken to make libc match. */ | ||
8 | |||
9 | #define _NSIG 64 | ||
10 | #define _NSIG_BPW 32 | ||
11 | #define _NSIG_WORDS (_NSIG / _NSIG_BPW) | ||
12 | |||
13 | typedef unsigned long old_sigset_t; /* at least 32 bits */ | ||
14 | |||
15 | typedef struct { | ||
16 | unsigned long sig[_NSIG_WORDS]; | ||
17 | } sigset_t; | ||
18 | |||
19 | #define __ARCH_HAS_SA_RESTORER | ||
20 | |||
21 | #include <asm/sigcontext.h> | ||
22 | #undef __HAVE_ARCH_SIG_BITOPS | ||
23 | |||
24 | #endif /* _H8300_SIGNAL_H */ | ||
diff --git a/arch/h8300/include/asm/smp.h b/arch/h8300/include/asm/smp.h deleted file mode 100644 index 9e9bd7e58922..000000000000 --- a/arch/h8300/include/asm/smp.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | /* nothing required here yet */ | ||
diff --git a/arch/h8300/include/asm/spinlock.h b/arch/h8300/include/asm/spinlock.h deleted file mode 100644 index d5407fa173e4..000000000000 --- a/arch/h8300/include/asm/spinlock.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __H8300_SPINLOCK_H | ||
2 | #define __H8300_SPINLOCK_H | ||
3 | |||
4 | #error "H8/300 doesn't do SMP yet" | ||
5 | |||
6 | #endif | ||
diff --git a/arch/h8300/include/asm/string.h b/arch/h8300/include/asm/string.h deleted file mode 100644 index ca5034897d87..000000000000 --- a/arch/h8300/include/asm/string.h +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | #ifndef _H8300_STRING_H_ | ||
2 | #define _H8300_STRING_H_ | ||
3 | |||
4 | #ifdef __KERNEL__ /* only set these up for kernel code */ | ||
5 | |||
6 | #include <asm/setup.h> | ||
7 | #include <asm/page.h> | ||
8 | |||
9 | #define __HAVE_ARCH_MEMSET | ||
10 | extern void * memset(void * s, int c, size_t count); | ||
11 | |||
12 | #define __HAVE_ARCH_MEMCPY | ||
13 | extern void * memcpy(void *d, const void *s, size_t count); | ||
14 | |||
15 | #else /* KERNEL */ | ||
16 | |||
17 | /* | ||
18 | * let user libraries deal with these, | ||
19 | * IMHO the kernel has no place defining these functions for user apps | ||
20 | */ | ||
21 | |||
22 | #define __HAVE_ARCH_STRCPY 1 | ||
23 | #define __HAVE_ARCH_STRNCPY 1 | ||
24 | #define __HAVE_ARCH_STRCAT 1 | ||
25 | #define __HAVE_ARCH_STRNCAT 1 | ||
26 | #define __HAVE_ARCH_STRCMP 1 | ||
27 | #define __HAVE_ARCH_STRNCMP 1 | ||
28 | #define __HAVE_ARCH_STRNICMP 1 | ||
29 | #define __HAVE_ARCH_STRCHR 1 | ||
30 | #define __HAVE_ARCH_STRRCHR 1 | ||
31 | #define __HAVE_ARCH_STRSTR 1 | ||
32 | #define __HAVE_ARCH_STRLEN 1 | ||
33 | #define __HAVE_ARCH_STRNLEN 1 | ||
34 | #define __HAVE_ARCH_MEMSET 1 | ||
35 | #define __HAVE_ARCH_MEMCPY 1 | ||
36 | #define __HAVE_ARCH_MEMMOVE 1 | ||
37 | #define __HAVE_ARCH_MEMSCAN 1 | ||
38 | #define __HAVE_ARCH_MEMCMP 1 | ||
39 | #define __HAVE_ARCH_MEMCHR 1 | ||
40 | #define __HAVE_ARCH_STRTOK 1 | ||
41 | |||
42 | #endif /* KERNEL */ | ||
43 | |||
44 | #endif /* _M68K_STRING_H_ */ | ||
diff --git a/arch/h8300/include/asm/switch_to.h b/arch/h8300/include/asm/switch_to.h deleted file mode 100644 index cdd8731ce487..000000000000 --- a/arch/h8300/include/asm/switch_to.h +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | #ifndef _H8300_SWITCH_TO_H | ||
2 | #define _H8300_SWITCH_TO_H | ||
3 | |||
4 | /* | ||
5 | * switch_to(n) should switch tasks to task ptr, first checking that | ||
6 | * ptr isn't the current task, in which case it does nothing. This | ||
7 | * also clears the TS-flag if the task we switched to has used the | ||
8 | * math co-processor latest. | ||
9 | */ | ||
10 | /* | ||
11 | * switch_to() saves the extra registers, that are not saved | ||
12 | * automatically by SAVE_SWITCH_STACK in resume(), ie. d0-d5 and | ||
13 | * a0-a1. Some of these are used by schedule() and its predecessors | ||
14 | * and so we might get see unexpected behaviors when a task returns | ||
15 | * with unexpected register values. | ||
16 | * | ||
17 | * syscall stores these registers itself and none of them are used | ||
18 | * by syscall after the function in the syscall has been called. | ||
19 | * | ||
20 | * Beware that resume now expects *next to be in d1 and the offset of | ||
21 | * tss to be in a1. This saves a few instructions as we no longer have | ||
22 | * to push them onto the stack and read them back right after. | ||
23 | * | ||
24 | * 02/17/96 - Jes Sorensen (jds@kom.auc.dk) | ||
25 | * | ||
26 | * Changed 96/09/19 by Andreas Schwab | ||
27 | * pass prev in a0, next in a1, offset of tss in d1, and whether | ||
28 | * the mm structures are shared in d2 (to avoid atc flushing). | ||
29 | * | ||
30 | * H8/300 Porting 2002/09/04 Yoshinori Sato | ||
31 | */ | ||
32 | |||
33 | asmlinkage void resume(void); | ||
34 | #define switch_to(prev,next,last) { \ | ||
35 | void *_last; \ | ||
36 | __asm__ __volatile__( \ | ||
37 | "mov.l %1, er0\n\t" \ | ||
38 | "mov.l %2, er1\n\t" \ | ||
39 | "mov.l %3, er2\n\t" \ | ||
40 | "jsr @_resume\n\t" \ | ||
41 | "mov.l er2,%0\n\t" \ | ||
42 | : "=r" (_last) \ | ||
43 | : "r" (&(prev->thread)), \ | ||
44 | "r" (&(next->thread)), \ | ||
45 | "g" (prev) \ | ||
46 | : "cc", "er0", "er1", "er2", "er3"); \ | ||
47 | (last) = _last; \ | ||
48 | } | ||
49 | |||
50 | #endif /* _H8300_SWITCH_TO_H */ | ||
diff --git a/arch/h8300/include/asm/target_time.h b/arch/h8300/include/asm/target_time.h deleted file mode 100644 index 9f2a9aa1fe6f..000000000000 --- a/arch/h8300/include/asm/target_time.h +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | extern int platform_timer_setup(void (*timer_int)(int, void *, struct pt_regs *)); | ||
2 | extern void platform_timer_eoi(void); | ||
3 | extern void platform_gettod(unsigned int *year, unsigned int *mon, unsigned int *day, | ||
4 | unsigned int *hour, unsigned int *min, unsigned int *sec); | ||
diff --git a/arch/h8300/include/asm/termios.h b/arch/h8300/include/asm/termios.h deleted file mode 100644 index 93a63df56247..000000000000 --- a/arch/h8300/include/asm/termios.h +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | #ifndef _H8300_TERMIOS_H | ||
2 | #define _H8300_TERMIOS_H | ||
3 | |||
4 | #include <uapi/asm/termios.h> | ||
5 | |||
6 | /* intr=^C quit=^| erase=del kill=^U | ||
7 | eof=^D vtime=\0 vmin=\1 sxtc=\0 | ||
8 | start=^Q stop=^S susp=^Z eol=\0 | ||
9 | reprint=^R discard=^U werase=^W lnext=^V | ||
10 | eol2=\0 | ||
11 | */ | ||
12 | #define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0" | ||
13 | |||
14 | /* | ||
15 | * Translate a "termio" structure into a "termios". Ugh. | ||
16 | */ | ||
17 | #define user_termio_to_kernel_termios(termios, termio) \ | ||
18 | ({ \ | ||
19 | unsigned short tmp; \ | ||
20 | get_user(tmp, &(termio)->c_iflag); \ | ||
21 | (termios)->c_iflag = (0xffff0000 & ((termios)->c_iflag)) | tmp; \ | ||
22 | get_user(tmp, &(termio)->c_oflag); \ | ||
23 | (termios)->c_oflag = (0xffff0000 & ((termios)->c_oflag)) | tmp; \ | ||
24 | get_user(tmp, &(termio)->c_cflag); \ | ||
25 | (termios)->c_cflag = (0xffff0000 & ((termios)->c_cflag)) | tmp; \ | ||
26 | get_user(tmp, &(termio)->c_lflag); \ | ||
27 | (termios)->c_lflag = (0xffff0000 & ((termios)->c_lflag)) | tmp; \ | ||
28 | get_user((termios)->c_line, &(termio)->c_line); \ | ||
29 | copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \ | ||
30 | }) | ||
31 | |||
32 | /* | ||
33 | * Translate a "termios" structure into a "termio". Ugh. | ||
34 | */ | ||
35 | #define kernel_termios_to_user_termio(termio, termios) \ | ||
36 | ({ \ | ||
37 | put_user((termios)->c_iflag, &(termio)->c_iflag); \ | ||
38 | put_user((termios)->c_oflag, &(termio)->c_oflag); \ | ||
39 | put_user((termios)->c_cflag, &(termio)->c_cflag); \ | ||
40 | put_user((termios)->c_lflag, &(termio)->c_lflag); \ | ||
41 | put_user((termios)->c_line, &(termio)->c_line); \ | ||
42 | copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ | ||
43 | }) | ||
44 | |||
45 | #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2)) | ||
46 | #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2)) | ||
47 | #define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios)) | ||
48 | #define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios)) | ||
49 | |||
50 | #endif /* _H8300_TERMIOS_H */ | ||
diff --git a/arch/h8300/include/asm/thread_info.h b/arch/h8300/include/asm/thread_info.h deleted file mode 100644 index ec2f7777c65a..000000000000 --- a/arch/h8300/include/asm/thread_info.h +++ /dev/null | |||
@@ -1,103 +0,0 @@ | |||
1 | /* thread_info.h: h8300 low-level thread information | ||
2 | * adapted from the i386 and PPC versions by Yoshinori Sato <ysato@users.sourceforge.jp> | ||
3 | * | ||
4 | * Copyright (C) 2002 David Howells (dhowells@redhat.com) | ||
5 | * - Incorporating suggestions made by Linus Torvalds and Dave Miller | ||
6 | */ | ||
7 | |||
8 | #ifndef _ASM_THREAD_INFO_H | ||
9 | #define _ASM_THREAD_INFO_H | ||
10 | |||
11 | #include <asm/page.h> | ||
12 | |||
13 | #ifdef __KERNEL__ | ||
14 | |||
15 | #ifndef __ASSEMBLY__ | ||
16 | |||
17 | /* | ||
18 | * low level task data. | ||
19 | * If you change this, change the TI_* offsets below to match. | ||
20 | */ | ||
21 | struct thread_info { | ||
22 | struct task_struct *task; /* main task structure */ | ||
23 | struct exec_domain *exec_domain; /* execution domain */ | ||
24 | unsigned long flags; /* low level flags */ | ||
25 | int cpu; /* cpu we're on */ | ||
26 | int preempt_count; /* 0 => preemptable, <0 => BUG */ | ||
27 | struct restart_block restart_block; | ||
28 | }; | ||
29 | |||
30 | /* | ||
31 | * macros/functions for gaining access to the thread information structure | ||
32 | */ | ||
33 | #define INIT_THREAD_INFO(tsk) \ | ||
34 | { \ | ||
35 | .task = &tsk, \ | ||
36 | .exec_domain = &default_exec_domain, \ | ||
37 | .flags = 0, \ | ||
38 | .cpu = 0, \ | ||
39 | .preempt_count = INIT_PREEMPT_COUNT, \ | ||
40 | .restart_block = { \ | ||
41 | .fn = do_no_restart_syscall, \ | ||
42 | }, \ | ||
43 | } | ||
44 | |||
45 | #define init_thread_info (init_thread_union.thread_info) | ||
46 | #define init_stack (init_thread_union.stack) | ||
47 | |||
48 | |||
49 | /* | ||
50 | * Size of kernel stack for each process. This must be a power of 2... | ||
51 | */ | ||
52 | #define THREAD_SIZE_ORDER 1 | ||
53 | #define THREAD_SIZE 8192 /* 2 pages */ | ||
54 | |||
55 | |||
56 | /* how to get the thread information struct from C */ | ||
57 | static inline struct thread_info *current_thread_info(void) | ||
58 | { | ||
59 | struct thread_info *ti; | ||
60 | __asm__( | ||
61 | "mov.l sp, %0 \n\t" | ||
62 | "and.l %1, %0" | ||
63 | : "=&r"(ti) | ||
64 | : "i" (~(THREAD_SIZE-1)) | ||
65 | ); | ||
66 | return ti; | ||
67 | } | ||
68 | |||
69 | #endif /* __ASSEMBLY__ */ | ||
70 | |||
71 | /* | ||
72 | * Offsets in thread_info structure, used in assembly code | ||
73 | */ | ||
74 | #define TI_TASK 0 | ||
75 | #define TI_EXECDOMAIN 4 | ||
76 | #define TI_FLAGS 8 | ||
77 | #define TI_CPU 12 | ||
78 | #define TI_PRE_COUNT 16 | ||
79 | |||
80 | #define PREEMPT_ACTIVE 0x4000000 | ||
81 | |||
82 | /* | ||
83 | * thread information flag bit numbers | ||
84 | */ | ||
85 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ | ||
86 | #define TIF_SIGPENDING 1 /* signal pending */ | ||
87 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ | ||
88 | #define TIF_MEMDIE 4 /* is terminating due to OOM killer */ | ||
89 | #define TIF_RESTORE_SIGMASK 5 /* restore signal mask in do_signal() */ | ||
90 | #define TIF_NOTIFY_RESUME 6 /* callback before returning to user */ | ||
91 | |||
92 | /* as above, but as bit values */ | ||
93 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | ||
94 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) | ||
95 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | ||
96 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) | ||
97 | |||
98 | #define _TIF_WORK_MASK (_TIF_SIGPENDING | _TIF_NEED_RESCHED | \ | ||
99 | _TIF_NOTIFY_RESUME) | ||
100 | |||
101 | #endif /* __KERNEL__ */ | ||
102 | |||
103 | #endif /* _ASM_THREAD_INFO_H */ | ||
diff --git a/arch/h8300/include/asm/timer.h b/arch/h8300/include/asm/timer.h deleted file mode 100644 index def80464d38f..000000000000 --- a/arch/h8300/include/asm/timer.h +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | #ifndef __H8300_TIMER_H | ||
2 | #define __H8300_TIMER_H | ||
3 | |||
4 | void h8300_timer_tick(void); | ||
5 | void h8300_timer_setup(void); | ||
6 | void h8300_gettod(unsigned int *year, unsigned int *mon, unsigned int *day, | ||
7 | unsigned int *hour, unsigned int *min, unsigned int *sec); | ||
8 | |||
9 | #define TIMER_FREQ (CONFIG_CPU_CLOCK*10000) /* Timer input freq. */ | ||
10 | |||
11 | #define calc_param(cnt, div, rate, limit) \ | ||
12 | do { \ | ||
13 | cnt = TIMER_FREQ / HZ; \ | ||
14 | for (div = 0; div < ARRAY_SIZE(divide_rate); div++) { \ | ||
15 | if (rate[div] == 0) \ | ||
16 | continue; \ | ||
17 | if ((cnt / rate[div]) > limit) \ | ||
18 | break; \ | ||
19 | } \ | ||
20 | if (div == ARRAY_SIZE(divide_rate)) \ | ||
21 | panic("Timer counter overflow"); \ | ||
22 | cnt /= divide_rate[div]; \ | ||
23 | } while(0) | ||
24 | |||
25 | #endif | ||
diff --git a/arch/h8300/include/asm/timex.h b/arch/h8300/include/asm/timex.h deleted file mode 100644 index 23e67013439f..000000000000 --- a/arch/h8300/include/asm/timex.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-h8300/timex.h | ||
3 | * | ||
4 | * H8/300 architecture timex specifications | ||
5 | */ | ||
6 | #ifndef _ASM_H8300_TIMEX_H | ||
7 | #define _ASM_H8300_TIMEX_H | ||
8 | |||
9 | #define CLOCK_TICK_RATE (CONFIG_CPU_CLOCK*1000/8192) /* Timer input freq. */ | ||
10 | |||
11 | typedef unsigned long cycles_t; | ||
12 | extern short h8300_timer_count; | ||
13 | |||
14 | static inline cycles_t get_cycles(void) | ||
15 | { | ||
16 | return 0; | ||
17 | } | ||
18 | |||
19 | #endif | ||
diff --git a/arch/h8300/include/asm/tlb.h b/arch/h8300/include/asm/tlb.h deleted file mode 100644 index 7f0743051ad5..000000000000 --- a/arch/h8300/include/asm/tlb.h +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | #ifndef __H8300_TLB_H__ | ||
2 | #define __H8300_TLB_H__ | ||
3 | |||
4 | #define tlb_flush(tlb) do { } while(0) | ||
5 | |||
6 | #include <asm-generic/tlb.h> | ||
7 | |||
8 | #endif | ||
diff --git a/arch/h8300/include/asm/tlbflush.h b/arch/h8300/include/asm/tlbflush.h deleted file mode 100644 index 41c148a9208e..000000000000 --- a/arch/h8300/include/asm/tlbflush.h +++ /dev/null | |||
@@ -1,55 +0,0 @@ | |||
1 | #ifndef _H8300_TLBFLUSH_H | ||
2 | #define _H8300_TLBFLUSH_H | ||
3 | |||
4 | /* | ||
5 | * Copyright (C) 2000 Lineo, David McCullough <davidm@uclinux.org> | ||
6 | * Copyright (C) 2000-2002, Greg Ungerer <gerg@snapgear.com> | ||
7 | */ | ||
8 | |||
9 | #include <asm/setup.h> | ||
10 | |||
11 | /* | ||
12 | * flush all user-space atc entries. | ||
13 | */ | ||
14 | static inline void __flush_tlb(void) | ||
15 | { | ||
16 | BUG(); | ||
17 | } | ||
18 | |||
19 | static inline void __flush_tlb_one(unsigned long addr) | ||
20 | { | ||
21 | BUG(); | ||
22 | } | ||
23 | |||
24 | #define flush_tlb() __flush_tlb() | ||
25 | |||
26 | /* | ||
27 | * flush all atc entries (both kernel and user-space entries). | ||
28 | */ | ||
29 | static inline void flush_tlb_all(void) | ||
30 | { | ||
31 | BUG(); | ||
32 | } | ||
33 | |||
34 | static inline void flush_tlb_mm(struct mm_struct *mm) | ||
35 | { | ||
36 | BUG(); | ||
37 | } | ||
38 | |||
39 | static inline void flush_tlb_page(struct vm_area_struct *vma, unsigned long addr) | ||
40 | { | ||
41 | BUG(); | ||
42 | } | ||
43 | |||
44 | static inline void flush_tlb_range(struct mm_struct *mm, | ||
45 | unsigned long start, unsigned long end) | ||
46 | { | ||
47 | BUG(); | ||
48 | } | ||
49 | |||
50 | static inline void flush_tlb_kernel_page(unsigned long addr) | ||
51 | { | ||
52 | BUG(); | ||
53 | } | ||
54 | |||
55 | #endif /* _H8300_TLBFLUSH_H */ | ||
diff --git a/arch/h8300/include/asm/topology.h b/arch/h8300/include/asm/topology.h deleted file mode 100644 index fdc121924d4c..000000000000 --- a/arch/h8300/include/asm/topology.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _ASM_H8300_TOPOLOGY_H | ||
2 | #define _ASM_H8300_TOPOLOGY_H | ||
3 | |||
4 | #include <asm-generic/topology.h> | ||
5 | |||
6 | #endif /* _ASM_H8300_TOPOLOGY_H */ | ||
diff --git a/arch/h8300/include/asm/traps.h b/arch/h8300/include/asm/traps.h deleted file mode 100644 index 41cf6be02f68..000000000000 --- a/arch/h8300/include/asm/traps.h +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-h8300/traps.h | ||
3 | * | ||
4 | * Copyright (C) 2003 Yoshinori Sato <ysato@users.sourceforge.jp> | ||
5 | * | ||
6 | * This file is subject to the terms and conditions of the GNU General Public | ||
7 | * License. See the file COPYING in the main directory of this archive | ||
8 | * for more details. | ||
9 | */ | ||
10 | |||
11 | #ifndef _H8300_TRAPS_H | ||
12 | #define _H8300_TRAPS_H | ||
13 | |||
14 | extern void system_call(void); | ||
15 | extern void interrupt_entry(void); | ||
16 | extern void trace_break(void); | ||
17 | |||
18 | #define JMP_OP 0x5a000000 | ||
19 | #define JSR_OP 0x5e000000 | ||
20 | #define VECTOR(address) ((JMP_OP)|((unsigned long)address)) | ||
21 | #define REDIRECT(address) ((JSR_OP)|((unsigned long)address)) | ||
22 | |||
23 | #define TRACE_VEC 5 | ||
24 | |||
25 | #define TRAP0_VEC 8 | ||
26 | #define TRAP1_VEC 9 | ||
27 | #define TRAP2_VEC 10 | ||
28 | #define TRAP3_VEC 11 | ||
29 | |||
30 | #if defined(__H8300H__) | ||
31 | #define NR_TRAPS 12 | ||
32 | #endif | ||
33 | #if defined(__H8300S__) | ||
34 | #define NR_TRAPS 16 | ||
35 | #endif | ||
36 | |||
37 | #endif /* _H8300_TRAPS_H */ | ||
diff --git a/arch/h8300/include/asm/types.h b/arch/h8300/include/asm/types.h deleted file mode 100644 index c012707f6037..000000000000 --- a/arch/h8300/include/asm/types.h +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | #ifndef _H8300_TYPES_H | ||
2 | #define _H8300_TYPES_H | ||
3 | |||
4 | #include <uapi/asm/types.h> | ||
5 | |||
6 | |||
7 | #define BITS_PER_LONG 32 | ||
8 | |||
9 | #endif /* _H8300_TYPES_H */ | ||
diff --git a/arch/h8300/include/asm/uaccess.h b/arch/h8300/include/asm/uaccess.h deleted file mode 100644 index 8725d1ad4272..000000000000 --- a/arch/h8300/include/asm/uaccess.h +++ /dev/null | |||
@@ -1,163 +0,0 @@ | |||
1 | #ifndef __H8300_UACCESS_H | ||
2 | #define __H8300_UACCESS_H | ||
3 | |||
4 | /* | ||
5 | * User space memory access functions | ||
6 | */ | ||
7 | #include <linux/sched.h> | ||
8 | #include <linux/mm.h> | ||
9 | #include <linux/string.h> | ||
10 | |||
11 | #include <asm/segment.h> | ||
12 | |||
13 | #define VERIFY_READ 0 | ||
14 | #define VERIFY_WRITE 1 | ||
15 | |||
16 | /* We let the MMU do all checking */ | ||
17 | #define access_ok(type, addr, size) __access_ok((unsigned long)addr,size) | ||
18 | static inline int __access_ok(unsigned long addr, unsigned long size) | ||
19 | { | ||
20 | #define RANGE_CHECK_OK(addr, size, lower, upper) \ | ||
21 | (((addr) >= (lower)) && (((addr) + (size)) < (upper))) | ||
22 | |||
23 | extern unsigned long _ramend; | ||
24 | return(RANGE_CHECK_OK(addr, size, 0L, (unsigned long)&_ramend)); | ||
25 | } | ||
26 | |||
27 | /* | ||
28 | * The exception table consists of pairs of addresses: the first is the | ||
29 | * address of an instruction that is allowed to fault, and the second is | ||
30 | * the address at which the program should continue. No registers are | ||
31 | * modified, so it is entirely up to the continuation code to figure out | ||
32 | * what to do. | ||
33 | * | ||
34 | * All the routines below use bits of fixup code that are out of line | ||
35 | * with the main instruction path. This means when everything is well, | ||
36 | * we don't even have to jump over them. Further, they do not intrude | ||
37 | * on our cache or tlb entries. | ||
38 | */ | ||
39 | |||
40 | struct exception_table_entry | ||
41 | { | ||
42 | unsigned long insn, fixup; | ||
43 | }; | ||
44 | |||
45 | /* Returns 0 if exception not found and fixup otherwise. */ | ||
46 | extern unsigned long search_exception_table(unsigned long); | ||
47 | |||
48 | |||
49 | /* | ||
50 | * These are the main single-value transfer routines. They automatically | ||
51 | * use the right size if we just have the right pointer type. | ||
52 | */ | ||
53 | |||
54 | #define put_user(x, ptr) \ | ||
55 | ({ \ | ||
56 | int __pu_err = 0; \ | ||
57 | typeof(*(ptr)) __pu_val = (x); \ | ||
58 | switch (sizeof (*(ptr))) { \ | ||
59 | case 1: \ | ||
60 | case 2: \ | ||
61 | case 4: \ | ||
62 | *(ptr) = (__pu_val); \ | ||
63 | break; \ | ||
64 | case 8: \ | ||
65 | memcpy(ptr, &__pu_val, sizeof (*(ptr))); \ | ||
66 | break; \ | ||
67 | default: \ | ||
68 | __pu_err = __put_user_bad(); \ | ||
69 | break; \ | ||
70 | } \ | ||
71 | __pu_err; \ | ||
72 | }) | ||
73 | #define __put_user(x, ptr) put_user(x, ptr) | ||
74 | |||
75 | extern int __put_user_bad(void); | ||
76 | |||
77 | /* | ||
78 | * Tell gcc we read from memory instead of writing: this is because | ||
79 | * we do not write to any memory gcc knows about, so there are no | ||
80 | * aliasing issues. | ||
81 | */ | ||
82 | |||
83 | #define __ptr(x) ((unsigned long *)(x)) | ||
84 | |||
85 | /* | ||
86 | * Tell gcc we read from memory instead of writing: this is because | ||
87 | * we do not write to any memory gcc knows about, so there are no | ||
88 | * aliasing issues. | ||
89 | */ | ||
90 | |||
91 | #define get_user(x, ptr) \ | ||
92 | ({ \ | ||
93 | int __gu_err = 0; \ | ||
94 | typeof(*(ptr)) __gu_val = *ptr; \ | ||
95 | switch (sizeof(*(ptr))) { \ | ||
96 | case 1: \ | ||
97 | case 2: \ | ||
98 | case 4: \ | ||
99 | case 8: \ | ||
100 | break; \ | ||
101 | default: \ | ||
102 | __gu_err = __get_user_bad(); \ | ||
103 | break; \ | ||
104 | } \ | ||
105 | (x) = __gu_val; \ | ||
106 | __gu_err; \ | ||
107 | }) | ||
108 | #define __get_user(x, ptr) get_user(x, ptr) | ||
109 | |||
110 | extern int __get_user_bad(void); | ||
111 | |||
112 | #define copy_from_user(to, from, n) (memcpy(to, from, n), 0) | ||
113 | #define copy_to_user(to, from, n) (memcpy(to, from, n), 0) | ||
114 | |||
115 | #define __copy_from_user(to, from, n) copy_from_user(to, from, n) | ||
116 | #define __copy_to_user(to, from, n) copy_to_user(to, from, n) | ||
117 | #define __copy_to_user_inatomic __copy_to_user | ||
118 | #define __copy_from_user_inatomic __copy_from_user | ||
119 | |||
120 | #define copy_to_user_ret(to,from,n,retval) ({ if (copy_to_user(to,from,n)) return retval; }) | ||
121 | |||
122 | #define copy_from_user_ret(to,from,n,retval) ({ if (copy_from_user(to,from,n)) return retval; }) | ||
123 | |||
124 | /* | ||
125 | * Copy a null terminated string from userspace. | ||
126 | */ | ||
127 | |||
128 | static inline long | ||
129 | strncpy_from_user(char *dst, const char *src, long count) | ||
130 | { | ||
131 | char *tmp; | ||
132 | strncpy(dst, src, count); | ||
133 | for (tmp = dst; *tmp && count > 0; tmp++, count--) | ||
134 | ; | ||
135 | return(tmp - dst); /* DAVIDM should we count a NUL ? check getname */ | ||
136 | } | ||
137 | |||
138 | /* | ||
139 | * Return the size of a string (including the ending 0) | ||
140 | * | ||
141 | * Return 0 on exception, a value greater than N if too long | ||
142 | */ | ||
143 | static inline long strnlen_user(const char *src, long n) | ||
144 | { | ||
145 | return(strlen(src) + 1); /* DAVIDM make safer */ | ||
146 | } | ||
147 | |||
148 | #define strlen_user(str) strnlen_user(str, 32767) | ||
149 | |||
150 | /* | ||
151 | * Zero Userspace | ||
152 | */ | ||
153 | |||
154 | static inline unsigned long | ||
155 | clear_user(void *to, unsigned long n) | ||
156 | { | ||
157 | memset(to, 0, n); | ||
158 | return 0; | ||
159 | } | ||
160 | |||
161 | #define __clear_user clear_user | ||
162 | |||
163 | #endif /* _H8300_UACCESS_H */ | ||
diff --git a/arch/h8300/include/asm/ucontext.h b/arch/h8300/include/asm/ucontext.h deleted file mode 100644 index 0bcf8f85fab9..000000000000 --- a/arch/h8300/include/asm/ucontext.h +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | #ifndef _H8300_UCONTEXT_H | ||
2 | #define _H8300_UCONTEXT_H | ||
3 | |||
4 | struct ucontext { | ||
5 | unsigned long uc_flags; | ||
6 | struct ucontext *uc_link; | ||
7 | stack_t uc_stack; | ||
8 | struct sigcontext uc_mcontext; | ||
9 | sigset_t uc_sigmask; /* mask last for extensibility */ | ||
10 | }; | ||
11 | |||
12 | #endif | ||
diff --git a/arch/h8300/include/asm/unaligned.h b/arch/h8300/include/asm/unaligned.h deleted file mode 100644 index b8d06c70c2da..000000000000 --- a/arch/h8300/include/asm/unaligned.h +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | #ifndef _ASM_H8300_UNALIGNED_H | ||
2 | #define _ASM_H8300_UNALIGNED_H | ||
3 | |||
4 | #include <linux/unaligned/be_memmove.h> | ||
5 | #include <linux/unaligned/le_byteshift.h> | ||
6 | #include <linux/unaligned/generic.h> | ||
7 | |||
8 | #define get_unaligned __get_unaligned_be | ||
9 | #define put_unaligned __put_unaligned_be | ||
10 | |||
11 | #endif /* _ASM_H8300_UNALIGNED_H */ | ||
diff --git a/arch/h8300/include/asm/unistd.h b/arch/h8300/include/asm/unistd.h deleted file mode 100644 index ab671ecf5196..000000000000 --- a/arch/h8300/include/asm/unistd.h +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | #ifndef _ASM_H8300_UNISTD_H_ | ||
2 | #define _ASM_H8300_UNISTD_H_ | ||
3 | |||
4 | #include <uapi/asm/unistd.h> | ||
5 | |||
6 | |||
7 | #define NR_syscalls 321 | ||
8 | |||
9 | #define __ARCH_WANT_OLD_READDIR | ||
10 | #define __ARCH_WANT_OLD_STAT | ||
11 | #define __ARCH_WANT_STAT64 | ||
12 | #define __ARCH_WANT_SYS_ALARM | ||
13 | #define __ARCH_WANT_SYS_GETHOSTNAME | ||
14 | #define __ARCH_WANT_SYS_IPC | ||
15 | #define __ARCH_WANT_SYS_PAUSE | ||
16 | #define __ARCH_WANT_SYS_SGETMASK | ||
17 | #define __ARCH_WANT_SYS_SIGNAL | ||
18 | #define __ARCH_WANT_SYS_TIME | ||
19 | #define __ARCH_WANT_SYS_UTIME | ||
20 | #define __ARCH_WANT_SYS_WAITPID | ||
21 | #define __ARCH_WANT_SYS_SOCKETCALL | ||
22 | #define __ARCH_WANT_SYS_FADVISE64 | ||
23 | #define __ARCH_WANT_SYS_GETPGRP | ||
24 | #define __ARCH_WANT_SYS_LLSEEK | ||
25 | #define __ARCH_WANT_SYS_NICE | ||
26 | #define __ARCH_WANT_SYS_OLD_GETRLIMIT | ||
27 | #define __ARCH_WANT_SYS_OLD_MMAP | ||
28 | #define __ARCH_WANT_SYS_OLD_SELECT | ||
29 | #define __ARCH_WANT_SYS_OLDUMOUNT | ||
30 | #define __ARCH_WANT_SYS_SIGPENDING | ||
31 | #define __ARCH_WANT_SYS_SIGPROCMASK | ||
32 | #define __ARCH_WANT_SYS_FORK | ||
33 | #define __ARCH_WANT_SYS_VFORK | ||
34 | #define __ARCH_WANT_SYS_CLONE | ||
35 | |||
36 | #endif /* _ASM_H8300_UNISTD_H_ */ | ||
diff --git a/arch/h8300/include/asm/user.h b/arch/h8300/include/asm/user.h deleted file mode 100644 index 14a9e18950f1..000000000000 --- a/arch/h8300/include/asm/user.h +++ /dev/null | |||
@@ -1,75 +0,0 @@ | |||
1 | #ifndef _H8300_USER_H | ||
2 | #define _H8300_USER_H | ||
3 | |||
4 | #include <asm/page.h> | ||
5 | |||
6 | /* Core file format: The core file is written in such a way that gdb | ||
7 | can understand it and provide useful information to the user (under | ||
8 | linux we use the 'trad-core' bfd). There are quite a number of | ||
9 | obstacles to being able to view the contents of the floating point | ||
10 | registers, and until these are solved you will not be able to view the | ||
11 | contents of them. Actually, you can read in the core file and look at | ||
12 | the contents of the user struct to find out what the floating point | ||
13 | registers contain. | ||
14 | The actual file contents are as follows: | ||
15 | UPAGE: 1 page consisting of a user struct that tells gdb what is present | ||
16 | in the file. Directly after this is a copy of the task_struct, which | ||
17 | is currently not used by gdb, but it may come in useful at some point. | ||
18 | All of the registers are stored as part of the upage. The upage should | ||
19 | always be only one page. | ||
20 | DATA: The data area is stored. We use current->end_text to | ||
21 | current->brk to pick up all of the user variables, plus any memory | ||
22 | that may have been malloced. No attempt is made to determine if a page | ||
23 | is demand-zero or if a page is totally unused, we just cover the entire | ||
24 | range. All of the addresses are rounded in such a way that an integral | ||
25 | number of pages is written. | ||
26 | STACK: We need the stack information in order to get a meaningful | ||
27 | backtrace. We need to write the data from (esp) to | ||
28 | current->start_stack, so we round each of these off in order to be able | ||
29 | to write an integer number of pages. | ||
30 | The minimum core file size is 3 pages, or 12288 bytes. | ||
31 | */ | ||
32 | |||
33 | /* This is the old layout of "struct pt_regs" as of Linux 1.x, and | ||
34 | is still the layout used by user (the new pt_regs doesn't have | ||
35 | all registers). */ | ||
36 | struct user_regs_struct { | ||
37 | long er1,er2,er3,er4,er5,er6; | ||
38 | long er0; | ||
39 | long usp; | ||
40 | long orig_er0; | ||
41 | short ccr; | ||
42 | long pc; | ||
43 | }; | ||
44 | |||
45 | |||
46 | /* When the kernel dumps core, it starts by dumping the user struct - | ||
47 | this will be used by gdb to figure out where the data and stack segments | ||
48 | are within the file, and what virtual addresses to use. */ | ||
49 | struct user{ | ||
50 | /* We start with the registers, to mimic the way that "memory" is returned | ||
51 | from the ptrace(3,...) function. */ | ||
52 | struct user_regs_struct regs; /* Where the registers are actually stored */ | ||
53 | /* ptrace does not yet supply these. Someday.... */ | ||
54 | /* The rest of this junk is to help gdb figure out what goes where */ | ||
55 | unsigned long int u_tsize; /* Text segment size (pages). */ | ||
56 | unsigned long int u_dsize; /* Data segment size (pages). */ | ||
57 | unsigned long int u_ssize; /* Stack segment size (pages). */ | ||
58 | unsigned long start_code; /* Starting virtual address of text. */ | ||
59 | unsigned long start_stack; /* Starting virtual address of stack area. | ||
60 | This is actually the bottom of the stack, | ||
61 | the top of the stack is always found in the | ||
62 | esp register. */ | ||
63 | long int signal; /* Signal that caused the core dump. */ | ||
64 | int reserved; /* No longer used */ | ||
65 | unsigned long u_ar0; /* Used by gdb to help find the values for */ | ||
66 | /* the registers. */ | ||
67 | unsigned long magic; /* To uniquely identify a core file */ | ||
68 | char u_comm[32]; /* User command that was responsible */ | ||
69 | }; | ||
70 | #define NBPG PAGE_SIZE | ||
71 | #define UPAGES 1 | ||
72 | #define HOST_TEXT_START_ADDR (u.start_code) | ||
73 | #define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) | ||
74 | |||
75 | #endif | ||
diff --git a/arch/h8300/include/asm/virtconvert.h b/arch/h8300/include/asm/virtconvert.h deleted file mode 100644 index 19cfd62b11c3..000000000000 --- a/arch/h8300/include/asm/virtconvert.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | #ifndef __H8300_VIRT_CONVERT__ | ||
2 | #define __H8300_VIRT_CONVERT__ | ||
3 | |||
4 | /* | ||
5 | * Macros used for converting between virtual and physical mappings. | ||
6 | */ | ||
7 | |||
8 | #ifdef __KERNEL__ | ||
9 | |||
10 | #include <asm/setup.h> | ||
11 | #include <asm/page.h> | ||
12 | |||
13 | #define phys_to_virt(vaddr) ((void *) (vaddr)) | ||
14 | #define virt_to_phys(vaddr) ((unsigned long) (vaddr)) | ||
15 | |||
16 | #define virt_to_bus virt_to_phys | ||
17 | #define bus_to_virt phys_to_virt | ||
18 | |||
19 | #endif | ||
20 | #endif | ||
diff --git a/arch/h8300/include/uapi/asm/Kbuild b/arch/h8300/include/uapi/asm/Kbuild deleted file mode 100644 index 040178cdb3eb..000000000000 --- a/arch/h8300/include/uapi/asm/Kbuild +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | # UAPI Header export list | ||
2 | include include/uapi/asm-generic/Kbuild.asm | ||
3 | |||
4 | header-y += auxvec.h | ||
5 | header-y += bitsperlong.h | ||
6 | header-y += byteorder.h | ||
7 | header-y += errno.h | ||
8 | header-y += fcntl.h | ||
9 | header-y += ioctl.h | ||
10 | header-y += ioctls.h | ||
11 | header-y += ipcbuf.h | ||
12 | header-y += kvm_para.h | ||
13 | header-y += mman.h | ||
14 | header-y += msgbuf.h | ||
15 | header-y += param.h | ||
16 | header-y += poll.h | ||
17 | header-y += posix_types.h | ||
18 | header-y += ptrace.h | ||
19 | header-y += resource.h | ||
20 | header-y += sembuf.h | ||
21 | header-y += setup.h | ||
22 | header-y += shmbuf.h | ||
23 | header-y += sigcontext.h | ||
24 | header-y += siginfo.h | ||
25 | header-y += signal.h | ||
26 | header-y += socket.h | ||
27 | header-y += sockios.h | ||
28 | header-y += stat.h | ||
29 | header-y += statfs.h | ||
30 | header-y += swab.h | ||
31 | header-y += termbits.h | ||
32 | header-y += termios.h | ||
33 | header-y += types.h | ||
34 | header-y += unistd.h | ||
diff --git a/arch/h8300/include/uapi/asm/auxvec.h b/arch/h8300/include/uapi/asm/auxvec.h deleted file mode 100644 index 1d36fe38b088..000000000000 --- a/arch/h8300/include/uapi/asm/auxvec.h +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | #ifndef __ASMH8300_AUXVEC_H | ||
2 | #define __ASMH8300_AUXVEC_H | ||
3 | |||
4 | #endif | ||
diff --git a/arch/h8300/include/uapi/asm/bitsperlong.h b/arch/h8300/include/uapi/asm/bitsperlong.h deleted file mode 100644 index 6dc0bb0c13b2..000000000000 --- a/arch/h8300/include/uapi/asm/bitsperlong.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/bitsperlong.h> | ||
diff --git a/arch/h8300/include/uapi/asm/byteorder.h b/arch/h8300/include/uapi/asm/byteorder.h deleted file mode 100644 index 13539da99efd..000000000000 --- a/arch/h8300/include/uapi/asm/byteorder.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _H8300_BYTEORDER_H | ||
2 | #define _H8300_BYTEORDER_H | ||
3 | |||
4 | #include <linux/byteorder/big_endian.h> | ||
5 | |||
6 | #endif /* _H8300_BYTEORDER_H */ | ||
diff --git a/arch/h8300/include/uapi/asm/errno.h b/arch/h8300/include/uapi/asm/errno.h deleted file mode 100644 index 0c2f5641fdcc..000000000000 --- a/arch/h8300/include/uapi/asm/errno.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _H8300_ERRNO_H | ||
2 | #define _H8300_ERRNO_H | ||
3 | |||
4 | #include <asm-generic/errno.h> | ||
5 | |||
6 | #endif /* _H8300_ERRNO_H */ | ||
diff --git a/arch/h8300/include/uapi/asm/fcntl.h b/arch/h8300/include/uapi/asm/fcntl.h deleted file mode 100644 index 1952cb2e3b06..000000000000 --- a/arch/h8300/include/uapi/asm/fcntl.h +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | #ifndef _H8300_FCNTL_H | ||
2 | #define _H8300_FCNTL_H | ||
3 | |||
4 | #define O_DIRECTORY 040000 /* must be a directory */ | ||
5 | #define O_NOFOLLOW 0100000 /* don't follow links */ | ||
6 | #define O_DIRECT 0200000 /* direct disk access hint - currently ignored */ | ||
7 | #define O_LARGEFILE 0400000 | ||
8 | |||
9 | #include <asm-generic/fcntl.h> | ||
10 | |||
11 | #endif /* _H8300_FCNTL_H */ | ||
diff --git a/arch/h8300/include/uapi/asm/ioctl.h b/arch/h8300/include/uapi/asm/ioctl.h deleted file mode 100644 index b279fe06dfe5..000000000000 --- a/arch/h8300/include/uapi/asm/ioctl.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/ioctl.h> | ||
diff --git a/arch/h8300/include/uapi/asm/ioctls.h b/arch/h8300/include/uapi/asm/ioctls.h deleted file mode 100644 index 30eaed2facdb..000000000000 --- a/arch/h8300/include/uapi/asm/ioctls.h +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | #ifndef __ARCH_H8300_IOCTLS_H__ | ||
2 | #define __ARCH_H8300_IOCTLS_H__ | ||
3 | |||
4 | #define FIOQSIZE 0x545E | ||
5 | |||
6 | #include <asm-generic/ioctls.h> | ||
7 | |||
8 | #endif /* __ARCH_H8300_IOCTLS_H__ */ | ||
diff --git a/arch/h8300/include/uapi/asm/ipcbuf.h b/arch/h8300/include/uapi/asm/ipcbuf.h deleted file mode 100644 index 84c7e51cb6d0..000000000000 --- a/arch/h8300/include/uapi/asm/ipcbuf.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/ipcbuf.h> | ||
diff --git a/arch/h8300/include/uapi/asm/kvm_para.h b/arch/h8300/include/uapi/asm/kvm_para.h deleted file mode 100644 index 14fab8f0b957..000000000000 --- a/arch/h8300/include/uapi/asm/kvm_para.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/kvm_para.h> | ||
diff --git a/arch/h8300/include/uapi/asm/mman.h b/arch/h8300/include/uapi/asm/mman.h deleted file mode 100644 index 8eebf89f5ab1..000000000000 --- a/arch/h8300/include/uapi/asm/mman.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/mman.h> | ||
diff --git a/arch/h8300/include/uapi/asm/msgbuf.h b/arch/h8300/include/uapi/asm/msgbuf.h deleted file mode 100644 index 6b148cd09aa5..000000000000 --- a/arch/h8300/include/uapi/asm/msgbuf.h +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | #ifndef _H8300_MSGBUF_H | ||
2 | #define _H8300_MSGBUF_H | ||
3 | |||
4 | /* | ||
5 | * The msqid64_ds structure for H8/300 architecture. | ||
6 | * Note extra padding because this structure is passed back and forth | ||
7 | * between kernel and user space. | ||
8 | * | ||
9 | * Pad space is left for: | ||
10 | * - 64-bit time_t to solve y2038 problem | ||
11 | * - 2 miscellaneous 32-bit values | ||
12 | */ | ||
13 | |||
14 | struct msqid64_ds { | ||
15 | struct ipc64_perm msg_perm; | ||
16 | __kernel_time_t msg_stime; /* last msgsnd time */ | ||
17 | unsigned long __unused1; | ||
18 | __kernel_time_t msg_rtime; /* last msgrcv time */ | ||
19 | unsigned long __unused2; | ||
20 | __kernel_time_t msg_ctime; /* last change time */ | ||
21 | unsigned long __unused3; | ||
22 | unsigned long msg_cbytes; /* current number of bytes on queue */ | ||
23 | unsigned long msg_qnum; /* number of messages in queue */ | ||
24 | unsigned long msg_qbytes; /* max number of bytes on queue */ | ||
25 | __kernel_pid_t msg_lspid; /* pid of last msgsnd */ | ||
26 | __kernel_pid_t msg_lrpid; /* last receive pid */ | ||
27 | unsigned long __unused4; | ||
28 | unsigned long __unused5; | ||
29 | }; | ||
30 | |||
31 | #endif /* _H8300_MSGBUF_H */ | ||
diff --git a/arch/h8300/include/uapi/asm/param.h b/arch/h8300/include/uapi/asm/param.h deleted file mode 100644 index 3dd18ae15f03..000000000000 --- a/arch/h8300/include/uapi/asm/param.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | #ifndef _UAPI_H8300_PARAM_H | ||
2 | #define _UAPI_H8300_PARAM_H | ||
3 | |||
4 | #ifndef __KERNEL__ | ||
5 | #define HZ 100 | ||
6 | #endif | ||
7 | |||
8 | #define EXEC_PAGESIZE 4096 | ||
9 | |||
10 | #ifndef NOGROUP | ||
11 | #define NOGROUP (-1) | ||
12 | #endif | ||
13 | |||
14 | #define MAXHOSTNAMELEN 64 /* max length of hostname */ | ||
15 | |||
16 | #endif /* _UAPI_H8300_PARAM_H */ | ||
diff --git a/arch/h8300/include/uapi/asm/poll.h b/arch/h8300/include/uapi/asm/poll.h deleted file mode 100644 index f61540c22d94..000000000000 --- a/arch/h8300/include/uapi/asm/poll.h +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | #ifndef __H8300_POLL_H | ||
2 | #define __H8300_POLL_H | ||
3 | |||
4 | #define POLLWRNORM POLLOUT | ||
5 | #define POLLWRBAND 256 | ||
6 | |||
7 | #include <asm-generic/poll.h> | ||
8 | |||
9 | #undef POLLREMOVE | ||
10 | |||
11 | #endif | ||
diff --git a/arch/h8300/include/uapi/asm/posix_types.h b/arch/h8300/include/uapi/asm/posix_types.h deleted file mode 100644 index 91e62ba4c7b0..000000000000 --- a/arch/h8300/include/uapi/asm/posix_types.h +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | #ifndef __ARCH_H8300_POSIX_TYPES_H | ||
2 | #define __ARCH_H8300_POSIX_TYPES_H | ||
3 | |||
4 | /* | ||
5 | * This file is generally used by user-level software, so you need to | ||
6 | * be a little careful about namespace pollution etc. Also, we cannot | ||
7 | * assume GCC is being used. | ||
8 | */ | ||
9 | |||
10 | typedef unsigned short __kernel_mode_t; | ||
11 | #define __kernel_mode_t __kernel_mode_t | ||
12 | |||
13 | typedef unsigned short __kernel_ipc_pid_t; | ||
14 | #define __kernel_ipc_pid_t __kernel_ipc_pid_t | ||
15 | |||
16 | typedef unsigned short __kernel_uid_t; | ||
17 | typedef unsigned short __kernel_gid_t; | ||
18 | #define __kernel_uid_t __kernel_uid_t | ||
19 | |||
20 | typedef unsigned short __kernel_old_uid_t; | ||
21 | typedef unsigned short __kernel_old_gid_t; | ||
22 | #define __kernel_old_uid_t __kernel_old_uid_t | ||
23 | |||
24 | #include <asm-generic/posix_types.h> | ||
25 | |||
26 | #endif | ||
diff --git a/arch/h8300/include/uapi/asm/ptrace.h b/arch/h8300/include/uapi/asm/ptrace.h deleted file mode 100644 index ef39ec5977b6..000000000000 --- a/arch/h8300/include/uapi/asm/ptrace.h +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | #ifndef _UAPI_H8300_PTRACE_H | ||
2 | #define _UAPI_H8300_PTRACE_H | ||
3 | |||
4 | #ifndef __ASSEMBLY__ | ||
5 | |||
6 | #define PT_ER1 0 | ||
7 | #define PT_ER2 1 | ||
8 | #define PT_ER3 2 | ||
9 | #define PT_ER4 3 | ||
10 | #define PT_ER5 4 | ||
11 | #define PT_ER6 5 | ||
12 | #define PT_ER0 6 | ||
13 | #define PT_ORIG_ER0 7 | ||
14 | #define PT_CCR 8 | ||
15 | #define PT_PC 9 | ||
16 | #define PT_USP 10 | ||
17 | #define PT_EXR 12 | ||
18 | |||
19 | /* this struct defines the way the registers are stored on the | ||
20 | stack during a system call. */ | ||
21 | |||
22 | struct pt_regs { | ||
23 | long retpc; | ||
24 | long er4; | ||
25 | long er5; | ||
26 | long er6; | ||
27 | long er3; | ||
28 | long er2; | ||
29 | long er1; | ||
30 | long orig_er0; | ||
31 | unsigned short ccr; | ||
32 | long er0; | ||
33 | long vector; | ||
34 | #if defined(CONFIG_CPU_H8S) | ||
35 | unsigned short exr; | ||
36 | #endif | ||
37 | unsigned long pc; | ||
38 | } __attribute__((aligned(2),packed)); | ||
39 | |||
40 | #define PTRACE_GETREGS 12 | ||
41 | #define PTRACE_SETREGS 13 | ||
42 | |||
43 | #endif /* __ASSEMBLY__ */ | ||
44 | #endif /* _UAPI_H8300_PTRACE_H */ | ||
diff --git a/arch/h8300/include/uapi/asm/resource.h b/arch/h8300/include/uapi/asm/resource.h deleted file mode 100644 index 46c5f4391607..000000000000 --- a/arch/h8300/include/uapi/asm/resource.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _H8300_RESOURCE_H | ||
2 | #define _H8300_RESOURCE_H | ||
3 | |||
4 | #include <asm-generic/resource.h> | ||
5 | |||
6 | #endif /* _H8300_RESOURCE_H */ | ||
diff --git a/arch/h8300/include/uapi/asm/sembuf.h b/arch/h8300/include/uapi/asm/sembuf.h deleted file mode 100644 index e04a3ec0cb92..000000000000 --- a/arch/h8300/include/uapi/asm/sembuf.h +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | #ifndef _H8300_SEMBUF_H | ||
2 | #define _H8300_SEMBUF_H | ||
3 | |||
4 | /* | ||
5 | * The semid64_ds structure for m68k architecture. | ||
6 | * Note extra padding because this structure is passed back and forth | ||
7 | * between kernel and user space. | ||
8 | * | ||
9 | * Pad space is left for: | ||
10 | * - 64-bit time_t to solve y2038 problem | ||
11 | * - 2 miscellaneous 32-bit values | ||
12 | */ | ||
13 | |||
14 | struct semid64_ds { | ||
15 | struct ipc64_perm sem_perm; /* permissions .. see ipc.h */ | ||
16 | __kernel_time_t sem_otime; /* last semop time */ | ||
17 | unsigned long __unused1; | ||
18 | __kernel_time_t sem_ctime; /* last change time */ | ||
19 | unsigned long __unused2; | ||
20 | unsigned long sem_nsems; /* no. of semaphores in array */ | ||
21 | unsigned long __unused3; | ||
22 | unsigned long __unused4; | ||
23 | }; | ||
24 | |||
25 | #endif /* _H8300_SEMBUF_H */ | ||
diff --git a/arch/h8300/include/uapi/asm/setup.h b/arch/h8300/include/uapi/asm/setup.h deleted file mode 100644 index e2c600e96733..000000000000 --- a/arch/h8300/include/uapi/asm/setup.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __H8300_SETUP_H | ||
2 | #define __H8300_SETUP_H | ||
3 | |||
4 | #define COMMAND_LINE_SIZE 512 | ||
5 | |||
6 | #endif | ||
diff --git a/arch/h8300/include/uapi/asm/shmbuf.h b/arch/h8300/include/uapi/asm/shmbuf.h deleted file mode 100644 index 64e77993a7a9..000000000000 --- a/arch/h8300/include/uapi/asm/shmbuf.h +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | #ifndef _H8300_SHMBUF_H | ||
2 | #define _H8300_SHMBUF_H | ||
3 | |||
4 | /* | ||
5 | * The shmid64_ds structure for m68k architecture. | ||
6 | * Note extra padding because this structure is passed back and forth | ||
7 | * between kernel and user space. | ||
8 | * | ||
9 | * Pad space is left for: | ||
10 | * - 64-bit time_t to solve y2038 problem | ||
11 | * - 2 miscellaneous 32-bit values | ||
12 | */ | ||
13 | |||
14 | struct shmid64_ds { | ||
15 | struct ipc64_perm shm_perm; /* operation perms */ | ||
16 | size_t shm_segsz; /* size of segment (bytes) */ | ||
17 | __kernel_time_t shm_atime; /* last attach time */ | ||
18 | unsigned long __unused1; | ||
19 | __kernel_time_t shm_dtime; /* last detach time */ | ||
20 | unsigned long __unused2; | ||
21 | __kernel_time_t shm_ctime; /* last change time */ | ||
22 | unsigned long __unused3; | ||
23 | __kernel_pid_t shm_cpid; /* pid of creator */ | ||
24 | __kernel_pid_t shm_lpid; /* pid of last operator */ | ||
25 | unsigned long shm_nattch; /* no. of current attaches */ | ||
26 | unsigned long __unused4; | ||
27 | unsigned long __unused5; | ||
28 | }; | ||
29 | |||
30 | struct shminfo64 { | ||
31 | unsigned long shmmax; | ||
32 | unsigned long shmmin; | ||
33 | unsigned long shmmni; | ||
34 | unsigned long shmseg; | ||
35 | unsigned long shmall; | ||
36 | unsigned long __unused1; | ||
37 | unsigned long __unused2; | ||
38 | unsigned long __unused3; | ||
39 | unsigned long __unused4; | ||
40 | }; | ||
41 | |||
42 | #endif /* _H8300_SHMBUF_H */ | ||
diff --git a/arch/h8300/include/uapi/asm/sigcontext.h b/arch/h8300/include/uapi/asm/sigcontext.h deleted file mode 100644 index e4b81505f8f8..000000000000 --- a/arch/h8300/include/uapi/asm/sigcontext.h +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | #ifndef _ASM_H8300_SIGCONTEXT_H | ||
2 | #define _ASM_H8300_SIGCONTEXT_H | ||
3 | |||
4 | struct sigcontext { | ||
5 | unsigned long sc_mask; /* old sigmask */ | ||
6 | unsigned long sc_usp; /* old user stack pointer */ | ||
7 | unsigned long sc_er0; | ||
8 | unsigned long sc_er1; | ||
9 | unsigned long sc_er2; | ||
10 | unsigned long sc_er3; | ||
11 | unsigned long sc_er4; | ||
12 | unsigned long sc_er5; | ||
13 | unsigned long sc_er6; | ||
14 | unsigned short sc_ccr; | ||
15 | unsigned long sc_pc; | ||
16 | }; | ||
17 | |||
18 | #endif | ||
diff --git a/arch/h8300/include/uapi/asm/siginfo.h b/arch/h8300/include/uapi/asm/siginfo.h deleted file mode 100644 index bc8fbea931a5..000000000000 --- a/arch/h8300/include/uapi/asm/siginfo.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _H8300_SIGINFO_H | ||
2 | #define _H8300_SIGINFO_H | ||
3 | |||
4 | #include <asm-generic/siginfo.h> | ||
5 | |||
6 | #endif | ||
diff --git a/arch/h8300/include/uapi/asm/signal.h b/arch/h8300/include/uapi/asm/signal.h deleted file mode 100644 index af3a6c37fee6..000000000000 --- a/arch/h8300/include/uapi/asm/signal.h +++ /dev/null | |||
@@ -1,115 +0,0 @@ | |||
1 | #ifndef _UAPI_H8300_SIGNAL_H | ||
2 | #define _UAPI_H8300_SIGNAL_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | /* Avoid too many header ordering problems. */ | ||
7 | struct siginfo; | ||
8 | |||
9 | #ifndef __KERNEL__ | ||
10 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
11 | |||
12 | #define NSIG 32 | ||
13 | typedef unsigned long sigset_t; | ||
14 | |||
15 | #endif /* __KERNEL__ */ | ||
16 | |||
17 | #define SIGHUP 1 | ||
18 | #define SIGINT 2 | ||
19 | #define SIGQUIT 3 | ||
20 | #define SIGILL 4 | ||
21 | #define SIGTRAP 5 | ||
22 | #define SIGABRT 6 | ||
23 | #define SIGIOT 6 | ||
24 | #define SIGBUS 7 | ||
25 | #define SIGFPE 8 | ||
26 | #define SIGKILL 9 | ||
27 | #define SIGUSR1 10 | ||
28 | #define SIGSEGV 11 | ||
29 | #define SIGUSR2 12 | ||
30 | #define SIGPIPE 13 | ||
31 | #define SIGALRM 14 | ||
32 | #define SIGTERM 15 | ||
33 | #define SIGSTKFLT 16 | ||
34 | #define SIGCHLD 17 | ||
35 | #define SIGCONT 18 | ||
36 | #define SIGSTOP 19 | ||
37 | #define SIGTSTP 20 | ||
38 | #define SIGTTIN 21 | ||
39 | #define SIGTTOU 22 | ||
40 | #define SIGURG 23 | ||
41 | #define SIGXCPU 24 | ||
42 | #define SIGXFSZ 25 | ||
43 | #define SIGVTALRM 26 | ||
44 | #define SIGPROF 27 | ||
45 | #define SIGWINCH 28 | ||
46 | #define SIGIO 29 | ||
47 | #define SIGPOLL SIGIO | ||
48 | /* | ||
49 | #define SIGLOST 29 | ||
50 | */ | ||
51 | #define SIGPWR 30 | ||
52 | #define SIGSYS 31 | ||
53 | #define SIGUNUSED 31 | ||
54 | |||
55 | /* These should not be considered constants from userland. */ | ||
56 | #define SIGRTMIN 32 | ||
57 | #define SIGRTMAX _NSIG | ||
58 | |||
59 | /* | ||
60 | * SA_FLAGS values: | ||
61 | * | ||
62 | * SA_ONSTACK indicates that a registered stack_t will be used. | ||
63 | * SA_RESTART flag to get restarting signals (which were the default long ago) | ||
64 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | ||
65 | * SA_RESETHAND clears the handler when the signal is delivered. | ||
66 | * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. | ||
67 | * SA_NODEFER prevents the current signal from being masked in the handler. | ||
68 | * | ||
69 | * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single | ||
70 | * Unix names RESETHAND and NODEFER respectively. | ||
71 | */ | ||
72 | #define SA_NOCLDSTOP 0x00000001 | ||
73 | #define SA_NOCLDWAIT 0x00000002 /* not supported yet */ | ||
74 | #define SA_SIGINFO 0x00000004 | ||
75 | #define SA_ONSTACK 0x08000000 | ||
76 | #define SA_RESTART 0x10000000 | ||
77 | #define SA_NODEFER 0x40000000 | ||
78 | #define SA_RESETHAND 0x80000000 | ||
79 | |||
80 | #define SA_NOMASK SA_NODEFER | ||
81 | #define SA_ONESHOT SA_RESETHAND | ||
82 | |||
83 | #define SA_RESTORER 0x04000000 | ||
84 | |||
85 | #define MINSIGSTKSZ 2048 | ||
86 | #define SIGSTKSZ 8192 | ||
87 | |||
88 | #include <asm-generic/signal-defs.h> | ||
89 | |||
90 | #ifndef __KERNEL__ | ||
91 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
92 | |||
93 | struct sigaction { | ||
94 | union { | ||
95 | __sighandler_t _sa_handler; | ||
96 | void (*_sa_sigaction)(int, struct siginfo *, void *); | ||
97 | } _u; | ||
98 | sigset_t sa_mask; | ||
99 | unsigned long sa_flags; | ||
100 | void (*sa_restorer)(void); | ||
101 | }; | ||
102 | |||
103 | #define sa_handler _u._sa_handler | ||
104 | #define sa_sigaction _u._sa_sigaction | ||
105 | |||
106 | #endif /* __KERNEL__ */ | ||
107 | |||
108 | typedef struct sigaltstack { | ||
109 | void *ss_sp; | ||
110 | int ss_flags; | ||
111 | size_t ss_size; | ||
112 | } stack_t; | ||
113 | |||
114 | |||
115 | #endif /* _UAPI_H8300_SIGNAL_H */ | ||
diff --git a/arch/h8300/include/uapi/asm/socket.h b/arch/h8300/include/uapi/asm/socket.h deleted file mode 100644 index 9490758c5e2b..000000000000 --- a/arch/h8300/include/uapi/asm/socket.h +++ /dev/null | |||
@@ -1,79 +0,0 @@ | |||
1 | #ifndef _ASM_SOCKET_H | ||
2 | #define _ASM_SOCKET_H | ||
3 | |||
4 | #include <asm/sockios.h> | ||
5 | |||
6 | /* For setsockoptions(2) */ | ||
7 | #define SOL_SOCKET 1 | ||
8 | |||
9 | #define SO_DEBUG 1 | ||
10 | #define SO_REUSEADDR 2 | ||
11 | #define SO_TYPE 3 | ||
12 | #define SO_ERROR 4 | ||
13 | #define SO_DONTROUTE 5 | ||
14 | #define SO_BROADCAST 6 | ||
15 | #define SO_SNDBUF 7 | ||
16 | #define SO_RCVBUF 8 | ||
17 | #define SO_SNDBUFFORCE 32 | ||
18 | #define SO_RCVBUFFORCE 33 | ||
19 | #define SO_KEEPALIVE 9 | ||
20 | #define SO_OOBINLINE 10 | ||
21 | #define SO_NO_CHECK 11 | ||
22 | #define SO_PRIORITY 12 | ||
23 | #define SO_LINGER 13 | ||
24 | #define SO_BSDCOMPAT 14 | ||
25 | #define SO_REUSEPORT 15 | ||
26 | #define SO_PASSCRED 16 | ||
27 | #define SO_PEERCRED 17 | ||
28 | #define SO_RCVLOWAT 18 | ||
29 | #define SO_SNDLOWAT 19 | ||
30 | #define SO_RCVTIMEO 20 | ||
31 | #define SO_SNDTIMEO 21 | ||
32 | |||
33 | /* Security levels - as per NRL IPv6 - don't actually do anything */ | ||
34 | #define SO_SECURITY_AUTHENTICATION 22 | ||
35 | #define SO_SECURITY_ENCRYPTION_TRANSPORT 23 | ||
36 | #define SO_SECURITY_ENCRYPTION_NETWORK 24 | ||
37 | |||
38 | #define SO_BINDTODEVICE 25 | ||
39 | |||
40 | /* Socket filtering */ | ||
41 | #define SO_ATTACH_FILTER 26 | ||
42 | #define SO_DETACH_FILTER 27 | ||
43 | #define SO_GET_FILTER SO_ATTACH_FILTER | ||
44 | |||
45 | #define SO_PEERNAME 28 | ||
46 | #define SO_TIMESTAMP 29 | ||
47 | #define SCM_TIMESTAMP SO_TIMESTAMP | ||
48 | |||
49 | #define SO_ACCEPTCONN 30 | ||
50 | |||
51 | #define SO_PEERSEC 31 | ||
52 | #define SO_PASSSEC 34 | ||
53 | #define SO_TIMESTAMPNS 35 | ||
54 | #define SCM_TIMESTAMPNS SO_TIMESTAMPNS | ||
55 | |||
56 | #define SO_MARK 36 | ||
57 | |||
58 | #define SO_TIMESTAMPING 37 | ||
59 | #define SCM_TIMESTAMPING SO_TIMESTAMPING | ||
60 | |||
61 | #define SO_PROTOCOL 38 | ||
62 | #define SO_DOMAIN 39 | ||
63 | |||
64 | #define SO_RXQ_OVFL 40 | ||
65 | |||
66 | #define SO_WIFI_STATUS 41 | ||
67 | #define SCM_WIFI_STATUS SO_WIFI_STATUS | ||
68 | #define SO_PEEK_OFF 42 | ||
69 | |||
70 | /* Instruct lower device to use last 4-bytes of skb data as FCS */ | ||
71 | #define SO_NOFCS 43 | ||
72 | |||
73 | #define SO_LOCK_FILTER 44 | ||
74 | |||
75 | #define SO_SELECT_ERR_QUEUE 45 | ||
76 | |||
77 | #define SO_BUSY_POLL 46 | ||
78 | |||
79 | #endif /* _ASM_SOCKET_H */ | ||
diff --git a/arch/h8300/include/uapi/asm/sockios.h b/arch/h8300/include/uapi/asm/sockios.h deleted file mode 100644 index e9c7ec810c23..000000000000 --- a/arch/h8300/include/uapi/asm/sockios.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | #ifndef __ARCH_H8300_SOCKIOS__ | ||
2 | #define __ARCH_H8300_SOCKIOS__ | ||
3 | |||
4 | /* Socket-level I/O control calls. */ | ||
5 | #define FIOSETOWN 0x8901 | ||
6 | #define SIOCSPGRP 0x8902 | ||
7 | #define FIOGETOWN 0x8903 | ||
8 | #define SIOCGPGRP 0x8904 | ||
9 | #define SIOCATMARK 0x8905 | ||
10 | #define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */ | ||
11 | #define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */ | ||
12 | |||
13 | #endif /* __ARCH_H8300_SOCKIOS__ */ | ||
diff --git a/arch/h8300/include/uapi/asm/stat.h b/arch/h8300/include/uapi/asm/stat.h deleted file mode 100644 index 62c3cc24dfe6..000000000000 --- a/arch/h8300/include/uapi/asm/stat.h +++ /dev/null | |||
@@ -1,78 +0,0 @@ | |||
1 | #ifndef _H8300_STAT_H | ||
2 | #define _H8300_STAT_H | ||
3 | |||
4 | struct __old_kernel_stat { | ||
5 | unsigned short st_dev; | ||
6 | unsigned short st_ino; | ||
7 | unsigned short st_mode; | ||
8 | unsigned short st_nlink; | ||
9 | unsigned short st_uid; | ||
10 | unsigned short st_gid; | ||
11 | unsigned short st_rdev; | ||
12 | unsigned long st_size; | ||
13 | unsigned long st_atime; | ||
14 | unsigned long st_mtime; | ||
15 | unsigned long st_ctime; | ||
16 | }; | ||
17 | |||
18 | struct stat { | ||
19 | unsigned short st_dev; | ||
20 | unsigned short __pad1; | ||
21 | unsigned long st_ino; | ||
22 | unsigned short st_mode; | ||
23 | unsigned short st_nlink; | ||
24 | unsigned short st_uid; | ||
25 | unsigned short st_gid; | ||
26 | unsigned short st_rdev; | ||
27 | unsigned short __pad2; | ||
28 | unsigned long st_size; | ||
29 | unsigned long st_blksize; | ||
30 | unsigned long st_blocks; | ||
31 | unsigned long st_atime; | ||
32 | unsigned long __unused1; | ||
33 | unsigned long st_mtime; | ||
34 | unsigned long __unused2; | ||
35 | unsigned long st_ctime; | ||
36 | unsigned long __unused3; | ||
37 | unsigned long __unused4; | ||
38 | unsigned long __unused5; | ||
39 | }; | ||
40 | |||
41 | /* This matches struct stat64 in glibc2.1, hence the absolutely | ||
42 | * insane amounts of padding around dev_t's. | ||
43 | */ | ||
44 | struct stat64 { | ||
45 | unsigned long long st_dev; | ||
46 | unsigned char __pad1[2]; | ||
47 | |||
48 | #define STAT64_HAS_BROKEN_ST_INO 1 | ||
49 | unsigned long __st_ino; | ||
50 | |||
51 | unsigned int st_mode; | ||
52 | unsigned int st_nlink; | ||
53 | |||
54 | unsigned long st_uid; | ||
55 | unsigned long st_gid; | ||
56 | |||
57 | unsigned long long st_rdev; | ||
58 | unsigned char __pad3[2]; | ||
59 | |||
60 | long long st_size; | ||
61 | unsigned long st_blksize; | ||
62 | |||
63 | unsigned long __pad4; /* future possible st_blocks high bits */ | ||
64 | unsigned long st_blocks; /* Number 512-byte blocks allocated. */ | ||
65 | |||
66 | unsigned long st_atime; | ||
67 | unsigned long st_atime_nsec; | ||
68 | |||
69 | unsigned long st_mtime; | ||
70 | unsigned long st_mtime_nsec; | ||
71 | |||
72 | unsigned long st_ctime; | ||
73 | unsigned long st_ctime_nsec; | ||
74 | |||
75 | unsigned long long st_ino; | ||
76 | }; | ||
77 | |||
78 | #endif /* _H8300_STAT_H */ | ||
diff --git a/arch/h8300/include/uapi/asm/statfs.h b/arch/h8300/include/uapi/asm/statfs.h deleted file mode 100644 index b96efa712aac..000000000000 --- a/arch/h8300/include/uapi/asm/statfs.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _H8300_STATFS_H | ||
2 | #define _H8300_STATFS_H | ||
3 | |||
4 | #include <asm-generic/statfs.h> | ||
5 | |||
6 | #endif /* _H8300_STATFS_H */ | ||
diff --git a/arch/h8300/include/uapi/asm/swab.h b/arch/h8300/include/uapi/asm/swab.h deleted file mode 100644 index 39abbf52807d..000000000000 --- a/arch/h8300/include/uapi/asm/swab.h +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | #ifndef _H8300_SWAB_H | ||
2 | #define _H8300_SWAB_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | #if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__) | ||
7 | # define __SWAB_64_THRU_32__ | ||
8 | #endif | ||
9 | |||
10 | #endif /* _H8300_SWAB_H */ | ||
diff --git a/arch/h8300/include/uapi/asm/termbits.h b/arch/h8300/include/uapi/asm/termbits.h deleted file mode 100644 index 3287a6244d74..000000000000 --- a/arch/h8300/include/uapi/asm/termbits.h +++ /dev/null | |||
@@ -1,201 +0,0 @@ | |||
1 | #ifndef __ARCH_H8300_TERMBITS_H__ | ||
2 | #define __ARCH_H8300_TERMBITS_H__ | ||
3 | |||
4 | #include <linux/posix_types.h> | ||
5 | |||
6 | typedef unsigned char cc_t; | ||
7 | typedef unsigned int speed_t; | ||
8 | typedef unsigned int tcflag_t; | ||
9 | |||
10 | #define NCCS 19 | ||
11 | struct termios { | ||
12 | tcflag_t c_iflag; /* input mode flags */ | ||
13 | tcflag_t c_oflag; /* output mode flags */ | ||
14 | tcflag_t c_cflag; /* control mode flags */ | ||
15 | tcflag_t c_lflag; /* local mode flags */ | ||
16 | cc_t c_line; /* line discipline */ | ||
17 | cc_t c_cc[NCCS]; /* control characters */ | ||
18 | }; | ||
19 | |||
20 | struct termios2 { | ||
21 | tcflag_t c_iflag; /* input mode flags */ | ||
22 | tcflag_t c_oflag; /* output mode flags */ | ||
23 | tcflag_t c_cflag; /* control mode flags */ | ||
24 | tcflag_t c_lflag; /* local mode flags */ | ||
25 | cc_t c_line; /* line discipline */ | ||
26 | cc_t c_cc[NCCS]; /* control characters */ | ||
27 | speed_t c_ispeed; /* input speed */ | ||
28 | speed_t c_ospeed; /* output speed */ | ||
29 | }; | ||
30 | |||
31 | struct ktermios { | ||
32 | tcflag_t c_iflag; /* input mode flags */ | ||
33 | tcflag_t c_oflag; /* output mode flags */ | ||
34 | tcflag_t c_cflag; /* control mode flags */ | ||
35 | tcflag_t c_lflag; /* local mode flags */ | ||
36 | cc_t c_line; /* line discipline */ | ||
37 | cc_t c_cc[NCCS]; /* control characters */ | ||
38 | speed_t c_ispeed; /* input speed */ | ||
39 | speed_t c_ospeed; /* output speed */ | ||
40 | }; | ||
41 | |||
42 | /* c_cc characters */ | ||
43 | #define VINTR 0 | ||
44 | #define VQUIT 1 | ||
45 | #define VERASE 2 | ||
46 | #define VKILL 3 | ||
47 | #define VEOF 4 | ||
48 | #define VTIME 5 | ||
49 | #define VMIN 6 | ||
50 | #define VSWTC 7 | ||
51 | #define VSTART 8 | ||
52 | #define VSTOP 9 | ||
53 | #define VSUSP 10 | ||
54 | #define VEOL 11 | ||
55 | #define VREPRINT 12 | ||
56 | #define VDISCARD 13 | ||
57 | #define VWERASE 14 | ||
58 | #define VLNEXT 15 | ||
59 | #define VEOL2 16 | ||
60 | |||
61 | |||
62 | /* c_iflag bits */ | ||
63 | #define IGNBRK 0000001 | ||
64 | #define BRKINT 0000002 | ||
65 | #define IGNPAR 0000004 | ||
66 | #define PARMRK 0000010 | ||
67 | #define INPCK 0000020 | ||
68 | #define ISTRIP 0000040 | ||
69 | #define INLCR 0000100 | ||
70 | #define IGNCR 0000200 | ||
71 | #define ICRNL 0000400 | ||
72 | #define IUCLC 0001000 | ||
73 | #define IXON 0002000 | ||
74 | #define IXANY 0004000 | ||
75 | #define IXOFF 0010000 | ||
76 | #define IMAXBEL 0020000 | ||
77 | #define IUTF8 0040000 | ||
78 | |||
79 | /* c_oflag bits */ | ||
80 | #define OPOST 0000001 | ||
81 | #define OLCUC 0000002 | ||
82 | #define ONLCR 0000004 | ||
83 | #define OCRNL 0000010 | ||
84 | #define ONOCR 0000020 | ||
85 | #define ONLRET 0000040 | ||
86 | #define OFILL 0000100 | ||
87 | #define OFDEL 0000200 | ||
88 | #define NLDLY 0000400 | ||
89 | #define NL0 0000000 | ||
90 | #define NL1 0000400 | ||
91 | #define CRDLY 0003000 | ||
92 | #define CR0 0000000 | ||
93 | #define CR1 0001000 | ||
94 | #define CR2 0002000 | ||
95 | #define CR3 0003000 | ||
96 | #define TABDLY 0014000 | ||
97 | #define TAB0 0000000 | ||
98 | #define TAB1 0004000 | ||
99 | #define TAB2 0010000 | ||
100 | #define TAB3 0014000 | ||
101 | #define XTABS 0014000 | ||
102 | #define BSDLY 0020000 | ||
103 | #define BS0 0000000 | ||
104 | #define BS1 0020000 | ||
105 | #define VTDLY 0040000 | ||
106 | #define VT0 0000000 | ||
107 | #define VT1 0040000 | ||
108 | #define FFDLY 0100000 | ||
109 | #define FF0 0000000 | ||
110 | #define FF1 0100000 | ||
111 | |||
112 | /* c_cflag bit meaning */ | ||
113 | #define CBAUD 0010017 | ||
114 | #define B0 0000000 /* hang up */ | ||
115 | #define B50 0000001 | ||
116 | #define B75 0000002 | ||
117 | #define B110 0000003 | ||
118 | #define B134 0000004 | ||
119 | #define B150 0000005 | ||
120 | #define B200 0000006 | ||
121 | #define B300 0000007 | ||
122 | #define B600 0000010 | ||
123 | #define B1200 0000011 | ||
124 | #define B1800 0000012 | ||
125 | #define B2400 0000013 | ||
126 | #define B4800 0000014 | ||
127 | #define B9600 0000015 | ||
128 | #define B19200 0000016 | ||
129 | #define B38400 0000017 | ||
130 | #define EXTA B19200 | ||
131 | #define EXTB B38400 | ||
132 | #define CSIZE 0000060 | ||
133 | #define CS5 0000000 | ||
134 | #define CS6 0000020 | ||
135 | #define CS7 0000040 | ||
136 | #define CS8 0000060 | ||
137 | #define CSTOPB 0000100 | ||
138 | #define CREAD 0000200 | ||
139 | #define PARENB 0000400 | ||
140 | #define PARODD 0001000 | ||
141 | #define HUPCL 0002000 | ||
142 | #define CLOCAL 0004000 | ||
143 | #define CBAUDEX 0010000 | ||
144 | #define BOTHER 0010000 | ||
145 | #define B57600 0010001 | ||
146 | #define B115200 0010002 | ||
147 | #define B230400 0010003 | ||
148 | #define B460800 0010004 | ||
149 | #define B500000 0010005 | ||
150 | #define B576000 0010006 | ||
151 | #define B921600 0010007 | ||
152 | #define B1000000 0010010 | ||
153 | #define B1152000 0010011 | ||
154 | #define B1500000 0010012 | ||
155 | #define B2000000 0010013 | ||
156 | #define B2500000 0010014 | ||
157 | #define B3000000 0010015 | ||
158 | #define B3500000 0010016 | ||
159 | #define B4000000 0010017 | ||
160 | #define CIBAUD 002003600000 /* input baud rate */ | ||
161 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ | ||
162 | #define CRTSCTS 020000000000 /* flow control */ | ||
163 | |||
164 | #define IBSHIFT 16 /* shift from CBAUD to CIBAUD */ | ||
165 | |||
166 | /* c_lflag bits */ | ||
167 | #define ISIG 0000001 | ||
168 | #define ICANON 0000002 | ||
169 | #define XCASE 0000004 | ||
170 | #define ECHO 0000010 | ||
171 | #define ECHOE 0000020 | ||
172 | #define ECHOK 0000040 | ||
173 | #define ECHONL 0000100 | ||
174 | #define NOFLSH 0000200 | ||
175 | #define TOSTOP 0000400 | ||
176 | #define ECHOCTL 0001000 | ||
177 | #define ECHOPRT 0002000 | ||
178 | #define ECHOKE 0004000 | ||
179 | #define FLUSHO 0010000 | ||
180 | #define PENDIN 0040000 | ||
181 | #define IEXTEN 0100000 | ||
182 | #define EXTPROC 0200000 | ||
183 | |||
184 | |||
185 | /* tcflow() and TCXONC use these */ | ||
186 | #define TCOOFF 0 | ||
187 | #define TCOON 1 | ||
188 | #define TCIOFF 2 | ||
189 | #define TCION 3 | ||
190 | |||
191 | /* tcflush() and TCFLSH use these */ | ||
192 | #define TCIFLUSH 0 | ||
193 | #define TCOFLUSH 1 | ||
194 | #define TCIOFLUSH 2 | ||
195 | |||
196 | /* tcsetattr uses these */ | ||
197 | #define TCSANOW 0 | ||
198 | #define TCSADRAIN 1 | ||
199 | #define TCSAFLUSH 2 | ||
200 | |||
201 | #endif /* __ARCH_H8300_TERMBITS_H__ */ | ||
diff --git a/arch/h8300/include/uapi/asm/termios.h b/arch/h8300/include/uapi/asm/termios.h deleted file mode 100644 index 5a67d7e38843..000000000000 --- a/arch/h8300/include/uapi/asm/termios.h +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | #ifndef _UAPI_H8300_TERMIOS_H | ||
2 | #define _UAPI_H8300_TERMIOS_H | ||
3 | |||
4 | #include <asm/termbits.h> | ||
5 | #include <asm/ioctls.h> | ||
6 | |||
7 | struct winsize { | ||
8 | unsigned short ws_row; | ||
9 | unsigned short ws_col; | ||
10 | unsigned short ws_xpixel; | ||
11 | unsigned short ws_ypixel; | ||
12 | }; | ||
13 | |||
14 | #define NCC 8 | ||
15 | struct termio { | ||
16 | unsigned short c_iflag; /* input mode flags */ | ||
17 | unsigned short c_oflag; /* output mode flags */ | ||
18 | unsigned short c_cflag; /* control mode flags */ | ||
19 | unsigned short c_lflag; /* local mode flags */ | ||
20 | unsigned char c_line; /* line discipline */ | ||
21 | unsigned char c_cc[NCC]; /* control characters */ | ||
22 | }; | ||
23 | |||
24 | |||
25 | /* modem lines */ | ||
26 | #define TIOCM_LE 0x001 | ||
27 | #define TIOCM_DTR 0x002 | ||
28 | #define TIOCM_RTS 0x004 | ||
29 | #define TIOCM_ST 0x008 | ||
30 | #define TIOCM_SR 0x010 | ||
31 | #define TIOCM_CTS 0x020 | ||
32 | #define TIOCM_CAR 0x040 | ||
33 | #define TIOCM_RNG 0x080 | ||
34 | #define TIOCM_DSR 0x100 | ||
35 | #define TIOCM_CD TIOCM_CAR | ||
36 | #define TIOCM_RI TIOCM_RNG | ||
37 | #define TIOCM_OUT1 0x2000 | ||
38 | #define TIOCM_OUT2 0x4000 | ||
39 | #define TIOCM_LOOP 0x8000 | ||
40 | |||
41 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | ||
42 | |||
43 | |||
44 | #endif /* _UAPI_H8300_TERMIOS_H */ | ||
diff --git a/arch/h8300/include/uapi/asm/types.h b/arch/h8300/include/uapi/asm/types.h deleted file mode 100644 index 9ec9d4c5ac4d..000000000000 --- a/arch/h8300/include/uapi/asm/types.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/int-ll64.h> | ||
diff --git a/arch/h8300/include/uapi/asm/unistd.h b/arch/h8300/include/uapi/asm/unistd.h deleted file mode 100644 index 8cb5d429f840..000000000000 --- a/arch/h8300/include/uapi/asm/unistd.h +++ /dev/null | |||
@@ -1,330 +0,0 @@ | |||
1 | #ifndef _UAPI_ASM_H8300_UNISTD_H_ | ||
2 | #define _UAPI_ASM_H8300_UNISTD_H_ | ||
3 | |||
4 | /* | ||
5 | * This file contains the system call numbers. | ||
6 | */ | ||
7 | |||
8 | #define __NR_restart_syscall 0 | ||
9 | #define __NR_exit 1 | ||
10 | #define __NR_fork 2 | ||
11 | #define __NR_read 3 | ||
12 | #define __NR_write 4 | ||
13 | #define __NR_open 5 | ||
14 | #define __NR_close 6 | ||
15 | #define __NR_waitpid 7 | ||
16 | #define __NR_creat 8 | ||
17 | #define __NR_link 9 | ||
18 | #define __NR_unlink 10 | ||
19 | #define __NR_execve 11 | ||
20 | #define __NR_chdir 12 | ||
21 | #define __NR_time 13 | ||
22 | #define __NR_mknod 14 | ||
23 | #define __NR_chmod 15 | ||
24 | #define __NR_lchown 16 | ||
25 | #define __NR_break 17 | ||
26 | #define __NR_oldstat 18 | ||
27 | #define __NR_lseek 19 | ||
28 | #define __NR_getpid 20 | ||
29 | #define __NR_mount 21 | ||
30 | #define __NR_umount 22 | ||
31 | #define __NR_setuid 23 | ||
32 | #define __NR_getuid 24 | ||
33 | #define __NR_stime 25 | ||
34 | #define __NR_ptrace 26 | ||
35 | #define __NR_alarm 27 | ||
36 | #define __NR_oldfstat 28 | ||
37 | #define __NR_pause 29 | ||
38 | #define __NR_utime 30 | ||
39 | #define __NR_stty 31 | ||
40 | #define __NR_gtty 32 | ||
41 | #define __NR_access 33 | ||
42 | #define __NR_nice 34 | ||
43 | #define __NR_ftime 35 | ||
44 | #define __NR_sync 36 | ||
45 | #define __NR_kill 37 | ||
46 | #define __NR_rename 38 | ||
47 | #define __NR_mkdir 39 | ||
48 | #define __NR_rmdir 40 | ||
49 | #define __NR_dup 41 | ||
50 | #define __NR_pipe 42 | ||
51 | #define __NR_times 43 | ||
52 | #define __NR_prof 44 | ||
53 | #define __NR_brk 45 | ||
54 | #define __NR_setgid 46 | ||
55 | #define __NR_getgid 47 | ||
56 | #define __NR_signal 48 | ||
57 | #define __NR_geteuid 49 | ||
58 | #define __NR_getegid 50 | ||
59 | #define __NR_acct 51 | ||
60 | #define __NR_umount2 52 | ||
61 | #define __NR_lock 53 | ||
62 | #define __NR_ioctl 54 | ||
63 | #define __NR_fcntl 55 | ||
64 | #define __NR_mpx 56 | ||
65 | #define __NR_setpgid 57 | ||
66 | #define __NR_ulimit 58 | ||
67 | #define __NR_oldolduname 59 | ||
68 | #define __NR_umask 60 | ||
69 | #define __NR_chroot 61 | ||
70 | #define __NR_ustat 62 | ||
71 | #define __NR_dup2 63 | ||
72 | #define __NR_getppid 64 | ||
73 | #define __NR_getpgrp 65 | ||
74 | #define __NR_setsid 66 | ||
75 | #define __NR_sigaction 67 | ||
76 | #define __NR_sgetmask 68 | ||
77 | #define __NR_ssetmask 69 | ||
78 | #define __NR_setreuid 70 | ||
79 | #define __NR_setregid 71 | ||
80 | #define __NR_sigsuspend 72 | ||
81 | #define __NR_sigpending 73 | ||
82 | #define __NR_sethostname 74 | ||
83 | #define __NR_setrlimit 75 | ||
84 | #define __NR_getrlimit 76 | ||
85 | #define __NR_getrusage 77 | ||
86 | #define __NR_gettimeofday 78 | ||
87 | #define __NR_settimeofday 79 | ||
88 | #define __NR_getgroups 80 | ||
89 | #define __NR_setgroups 81 | ||
90 | #define __NR_select 82 | ||
91 | #define __NR_symlink 83 | ||
92 | #define __NR_oldlstat 84 | ||
93 | #define __NR_readlink 85 | ||
94 | #define __NR_uselib 86 | ||
95 | #define __NR_swapon 87 | ||
96 | #define __NR_reboot 88 | ||
97 | #define __NR_readdir 89 | ||
98 | #define __NR_mmap 90 | ||
99 | #define __NR_munmap 91 | ||
100 | #define __NR_truncate 92 | ||
101 | #define __NR_ftruncate 93 | ||
102 | #define __NR_fchmod 94 | ||
103 | #define __NR_fchown 95 | ||
104 | #define __NR_getpriority 96 | ||
105 | #define __NR_setpriority 97 | ||
106 | #define __NR_profil 98 | ||
107 | #define __NR_statfs 99 | ||
108 | #define __NR_fstatfs 100 | ||
109 | #define __NR_ioperm 101 | ||
110 | #define __NR_socketcall 102 | ||
111 | #define __NR_syslog 103 | ||
112 | #define __NR_setitimer 104 | ||
113 | #define __NR_getitimer 105 | ||
114 | #define __NR_stat 106 | ||
115 | #define __NR_lstat 107 | ||
116 | #define __NR_fstat 108 | ||
117 | #define __NR_olduname 109 | ||
118 | #define __NR_iopl 110 | ||
119 | #define __NR_vhangup 111 | ||
120 | #define __NR_idle 112 | ||
121 | #define __NR_vm86old 113 | ||
122 | #define __NR_wait4 114 | ||
123 | #define __NR_swapoff 115 | ||
124 | #define __NR_sysinfo 116 | ||
125 | #define __NR_ipc 117 | ||
126 | #define __NR_fsync 118 | ||
127 | #define __NR_sigreturn 119 | ||
128 | #define __NR_clone 120 | ||
129 | #define __NR_setdomainname 121 | ||
130 | #define __NR_uname 122 | ||
131 | #define __NR_modify_ldt 123 | ||
132 | #define __NR_adjtimex 124 | ||
133 | #define __NR_mprotect 125 | ||
134 | #define __NR_sigprocmask 126 | ||
135 | #define __NR_create_module 127 | ||
136 | #define __NR_init_module 128 | ||
137 | #define __NR_delete_module 129 | ||
138 | #define __NR_get_kernel_syms 130 | ||
139 | #define __NR_quotactl 131 | ||
140 | #define __NR_getpgid 132 | ||
141 | #define __NR_fchdir 133 | ||
142 | #define __NR_bdflush 134 | ||
143 | #define __NR_sysfs 135 | ||
144 | #define __NR_personality 136 | ||
145 | #define __NR_afs_syscall 137 /* Syscall for Andrew File System */ | ||
146 | #define __NR_setfsuid 138 | ||
147 | #define __NR_setfsgid 139 | ||
148 | #define __NR__llseek 140 | ||
149 | #define __NR_getdents 141 | ||
150 | #define __NR__newselect 142 | ||
151 | #define __NR_flock 143 | ||
152 | #define __NR_msync 144 | ||
153 | #define __NR_readv 145 | ||
154 | #define __NR_writev 146 | ||
155 | #define __NR_getsid 147 | ||
156 | #define __NR_fdatasync 148 | ||
157 | #define __NR__sysctl 149 | ||
158 | #define __NR_mlock 150 | ||
159 | #define __NR_munlock 151 | ||
160 | #define __NR_mlockall 152 | ||
161 | #define __NR_munlockall 153 | ||
162 | #define __NR_sched_setparam 154 | ||
163 | #define __NR_sched_getparam 155 | ||
164 | #define __NR_sched_setscheduler 156 | ||
165 | #define __NR_sched_getscheduler 157 | ||
166 | #define __NR_sched_yield 158 | ||
167 | #define __NR_sched_get_priority_max 159 | ||
168 | #define __NR_sched_get_priority_min 160 | ||
169 | #define __NR_sched_rr_get_interval 161 | ||
170 | #define __NR_nanosleep 162 | ||
171 | #define __NR_mremap 163 | ||
172 | #define __NR_setresuid 164 | ||
173 | #define __NR_getresuid 165 | ||
174 | #define __NR_vm86 166 | ||
175 | #define __NR_query_module 167 | ||
176 | #define __NR_poll 168 | ||
177 | #define __NR_nfsservctl 169 | ||
178 | #define __NR_setresgid 170 | ||
179 | #define __NR_getresgid 171 | ||
180 | #define __NR_prctl 172 | ||
181 | #define __NR_rt_sigreturn 173 | ||
182 | #define __NR_rt_sigaction 174 | ||
183 | #define __NR_rt_sigprocmask 175 | ||
184 | #define __NR_rt_sigpending 176 | ||
185 | #define __NR_rt_sigtimedwait 177 | ||
186 | #define __NR_rt_sigqueueinfo 178 | ||
187 | #define __NR_rt_sigsuspend 179 | ||
188 | #define __NR_pread64 180 | ||
189 | #define __NR_pwrite64 181 | ||
190 | #define __NR_chown 182 | ||
191 | #define __NR_getcwd 183 | ||
192 | #define __NR_capget 184 | ||
193 | #define __NR_capset 185 | ||
194 | #define __NR_sigaltstack 186 | ||
195 | #define __NR_sendfile 187 | ||
196 | #define __NR_getpmsg 188 /* some people actually want streams */ | ||
197 | #define __NR_putpmsg 189 /* some people actually want streams */ | ||
198 | #define __NR_vfork 190 | ||
199 | #define __NR_ugetrlimit 191 | ||
200 | #define __NR_mmap2 192 | ||
201 | #define __NR_truncate64 193 | ||
202 | #define __NR_ftruncate64 194 | ||
203 | #define __NR_stat64 195 | ||
204 | #define __NR_lstat64 196 | ||
205 | #define __NR_fstat64 197 | ||
206 | #define __NR_lchown32 198 | ||
207 | #define __NR_getuid32 199 | ||
208 | #define __NR_getgid32 200 | ||
209 | #define __NR_geteuid32 201 | ||
210 | #define __NR_getegid32 202 | ||
211 | #define __NR_setreuid32 203 | ||
212 | #define __NR_setregid32 204 | ||
213 | #define __NR_getgroups32 205 | ||
214 | #define __NR_setgroups32 206 | ||
215 | #define __NR_fchown32 207 | ||
216 | #define __NR_setresuid32 208 | ||
217 | #define __NR_getresuid32 209 | ||
218 | #define __NR_setresgid32 210 | ||
219 | #define __NR_getresgid32 211 | ||
220 | #define __NR_chown32 212 | ||
221 | #define __NR_setuid32 213 | ||
222 | #define __NR_setgid32 214 | ||
223 | #define __NR_setfsuid32 215 | ||
224 | #define __NR_setfsgid32 216 | ||
225 | #define __NR_pivot_root 217 | ||
226 | #define __NR_mincore 218 | ||
227 | #define __NR_madvise 219 | ||
228 | #define __NR_madvise1 219 | ||
229 | #define __NR_getdents64 220 | ||
230 | #define __NR_fcntl64 221 | ||
231 | /* 223 is unused */ | ||
232 | #define __NR_gettid 224 | ||
233 | #define __NR_readahead 225 | ||
234 | #define __NR_setxattr 226 | ||
235 | #define __NR_lsetxattr 227 | ||
236 | #define __NR_fsetxattr 228 | ||
237 | #define __NR_getxattr 229 | ||
238 | #define __NR_lgetxattr 230 | ||
239 | #define __NR_fgetxattr 231 | ||
240 | #define __NR_listxattr 232 | ||
241 | #define __NR_llistxattr 233 | ||
242 | #define __NR_flistxattr 234 | ||
243 | #define __NR_removexattr 235 | ||
244 | #define __NR_lremovexattr 236 | ||
245 | #define __NR_fremovexattr 237 | ||
246 | #define __NR_tkill 238 | ||
247 | #define __NR_sendfile64 239 | ||
248 | #define __NR_futex 240 | ||
249 | #define __NR_sched_setaffinity 241 | ||
250 | #define __NR_sched_getaffinity 242 | ||
251 | #define __NR_set_thread_area 243 | ||
252 | #define __NR_get_thread_area 244 | ||
253 | #define __NR_io_setup 245 | ||
254 | #define __NR_io_destroy 246 | ||
255 | #define __NR_io_getevents 247 | ||
256 | #define __NR_io_submit 248 | ||
257 | #define __NR_io_cancel 249 | ||
258 | #define __NR_fadvise64 250 | ||
259 | /* 251 is available for reuse (was briefly sys_set_zone_reclaim) */ | ||
260 | #define __NR_exit_group 252 | ||
261 | #define __NR_lookup_dcookie 253 | ||
262 | #define __NR_epoll_create 254 | ||
263 | #define __NR_epoll_ctl 255 | ||
264 | #define __NR_epoll_wait 256 | ||
265 | #define __NR_remap_file_pages 257 | ||
266 | #define __NR_set_tid_address 258 | ||
267 | #define __NR_timer_create 259 | ||
268 | #define __NR_timer_settime (__NR_timer_create+1) | ||
269 | #define __NR_timer_gettime (__NR_timer_create+2) | ||
270 | #define __NR_timer_getoverrun (__NR_timer_create+3) | ||
271 | #define __NR_timer_delete (__NR_timer_create+4) | ||
272 | #define __NR_clock_settime (__NR_timer_create+5) | ||
273 | #define __NR_clock_gettime (__NR_timer_create+6) | ||
274 | #define __NR_clock_getres (__NR_timer_create+7) | ||
275 | #define __NR_clock_nanosleep (__NR_timer_create+8) | ||
276 | #define __NR_statfs64 268 | ||
277 | #define __NR_fstatfs64 269 | ||
278 | #define __NR_tgkill 270 | ||
279 | #define __NR_utimes 271 | ||
280 | #define __NR_fadvise64_64 272 | ||
281 | #define __NR_vserver 273 | ||
282 | #define __NR_mbind 274 | ||
283 | #define __NR_get_mempolicy 275 | ||
284 | #define __NR_set_mempolicy 276 | ||
285 | #define __NR_mq_open 277 | ||
286 | #define __NR_mq_unlink (__NR_mq_open+1) | ||
287 | #define __NR_mq_timedsend (__NR_mq_open+2) | ||
288 | #define __NR_mq_timedreceive (__NR_mq_open+3) | ||
289 | #define __NR_mq_notify (__NR_mq_open+4) | ||
290 | #define __NR_mq_getsetattr (__NR_mq_open+5) | ||
291 | #define __NR_kexec_load 283 | ||
292 | #define __NR_waitid 284 | ||
293 | /* #define __NR_sys_setaltroot 285 */ | ||
294 | #define __NR_add_key 286 | ||
295 | #define __NR_request_key 287 | ||
296 | #define __NR_keyctl 288 | ||
297 | #define __NR_ioprio_set 289 | ||
298 | #define __NR_ioprio_get 290 | ||
299 | #define __NR_inotify_init 291 | ||
300 | #define __NR_inotify_add_watch 292 | ||
301 | #define __NR_inotify_rm_watch 293 | ||
302 | #define __NR_migrate_pages 294 | ||
303 | #define __NR_openat 295 | ||
304 | #define __NR_mkdirat 296 | ||
305 | #define __NR_mknodat 297 | ||
306 | #define __NR_fchownat 298 | ||
307 | #define __NR_futimesat 299 | ||
308 | #define __NR_fstatat64 300 | ||
309 | #define __NR_unlinkat 301 | ||
310 | #define __NR_renameat 302 | ||
311 | #define __NR_linkat 303 | ||
312 | #define __NR_symlinkat 304 | ||
313 | #define __NR_readlinkat 305 | ||
314 | #define __NR_fchmodat 306 | ||
315 | #define __NR_faccessat 307 | ||
316 | #define __NR_pselect6 308 | ||
317 | #define __NR_ppoll 309 | ||
318 | #define __NR_unshare 310 | ||
319 | #define __NR_set_robust_list 311 | ||
320 | #define __NR_get_robust_list 312 | ||
321 | #define __NR_splice 313 | ||
322 | #define __NR_sync_file_range 314 | ||
323 | #define __NR_tee 315 | ||
324 | #define __NR_vmsplice 316 | ||
325 | #define __NR_move_pages 317 | ||
326 | #define __NR_getcpu 318 | ||
327 | #define __NR_epoll_pwait 319 | ||
328 | #define __NR_setns 320 | ||
329 | |||
330 | #endif /* _UAPI_ASM_H8300_UNISTD_H_ */ | ||
diff --git a/arch/h8300/kernel/Makefile b/arch/h8300/kernel/Makefile deleted file mode 100644 index 1cc57f872d34..000000000000 --- a/arch/h8300/kernel/Makefile +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | # | ||
2 | # Makefile for the linux kernel. | ||
3 | # | ||
4 | |||
5 | extra-y := vmlinux.lds | ||
6 | |||
7 | obj-y := process.o traps.o ptrace.o irq.o \ | ||
8 | sys_h8300.o time.o signal.o \ | ||
9 | setup.o gpio.o syscalls.o \ | ||
10 | entry.o timer/ | ||
11 | |||
12 | obj-$(CONFIG_MODULES) += module.o h8300_ksyms.o | ||
diff --git a/arch/h8300/kernel/asm-offsets.c b/arch/h8300/kernel/asm-offsets.c deleted file mode 100644 index fd961e0bd741..000000000000 --- a/arch/h8300/kernel/asm-offsets.c +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | /* | ||
2 | * This program is used to generate definitions needed by | ||
3 | * assembly language modules. | ||
4 | * | ||
5 | * We use the technique used in the OSF Mach kernel code: | ||
6 | * generate asm statements containing #defines, | ||
7 | * compile this file to assembler, and then extract the | ||
8 | * #defines from the assembly-language output. | ||
9 | */ | ||
10 | |||
11 | #include <linux/stddef.h> | ||
12 | #include <linux/sched.h> | ||
13 | #include <linux/kernel_stat.h> | ||
14 | #include <linux/ptrace.h> | ||
15 | #include <linux/hardirq.h> | ||
16 | #include <linux/kbuild.h> | ||
17 | #include <asm/bootinfo.h> | ||
18 | #include <asm/irq.h> | ||
19 | #include <asm/ptrace.h> | ||
20 | |||
21 | int main(void) | ||
22 | { | ||
23 | /* offsets into the task struct */ | ||
24 | DEFINE(TASK_STATE, offsetof(struct task_struct, state)); | ||
25 | DEFINE(TASK_FLAGS, offsetof(struct task_struct, flags)); | ||
26 | DEFINE(TASK_PTRACE, offsetof(struct task_struct, ptrace)); | ||
27 | DEFINE(TASK_BLOCKED, offsetof(struct task_struct, blocked)); | ||
28 | DEFINE(TASK_THREAD, offsetof(struct task_struct, thread)); | ||
29 | DEFINE(TASK_THREAD_INFO, offsetof(struct task_struct, stack)); | ||
30 | DEFINE(TASK_MM, offsetof(struct task_struct, mm)); | ||
31 | DEFINE(TASK_ACTIVE_MM, offsetof(struct task_struct, active_mm)); | ||
32 | |||
33 | /* offsets into the irq_cpustat_t struct */ | ||
34 | DEFINE(CPUSTAT_SOFTIRQ_PENDING, offsetof(irq_cpustat_t, __softirq_pending)); | ||
35 | |||
36 | /* offsets into the thread struct */ | ||
37 | DEFINE(THREAD_KSP, offsetof(struct thread_struct, ksp)); | ||
38 | DEFINE(THREAD_USP, offsetof(struct thread_struct, usp)); | ||
39 | DEFINE(THREAD_CCR, offsetof(struct thread_struct, ccr)); | ||
40 | |||
41 | /* offsets into the pt_regs struct */ | ||
42 | DEFINE(LER0, offsetof(struct pt_regs, er0) - sizeof(long)); | ||
43 | DEFINE(LER1, offsetof(struct pt_regs, er1) - sizeof(long)); | ||
44 | DEFINE(LER2, offsetof(struct pt_regs, er2) - sizeof(long)); | ||
45 | DEFINE(LER3, offsetof(struct pt_regs, er3) - sizeof(long)); | ||
46 | DEFINE(LER4, offsetof(struct pt_regs, er4) - sizeof(long)); | ||
47 | DEFINE(LER5, offsetof(struct pt_regs, er5) - sizeof(long)); | ||
48 | DEFINE(LER6, offsetof(struct pt_regs, er6) - sizeof(long)); | ||
49 | DEFINE(LORIG, offsetof(struct pt_regs, orig_er0) - sizeof(long)); | ||
50 | DEFINE(LCCR, offsetof(struct pt_regs, ccr) - sizeof(long)); | ||
51 | DEFINE(LVEC, offsetof(struct pt_regs, vector) - sizeof(long)); | ||
52 | #if defined(__H8300S__) | ||
53 | DEFINE(LEXR, offsetof(struct pt_regs, exr) - sizeof(long)); | ||
54 | #endif | ||
55 | DEFINE(LRET, offsetof(struct pt_regs, pc) - sizeof(long)); | ||
56 | |||
57 | DEFINE(PT_PTRACED, PT_PTRACED); | ||
58 | |||
59 | return 0; | ||
60 | } | ||
diff --git a/arch/h8300/kernel/entry.S b/arch/h8300/kernel/entry.S deleted file mode 100644 index 94bd30f11df6..000000000000 --- a/arch/h8300/kernel/entry.S +++ /dev/null | |||
@@ -1,402 +0,0 @@ | |||
1 | /* -*- mode: asm -*- | ||
2 | * | ||
3 | * linux/arch/h8300/platform/h8300h/entry.S | ||
4 | * | ||
5 | * Yoshinori Sato <ysato@users.sourceforge.jp> | ||
6 | * David McCullough <davidm@snapgear.com> | ||
7 | * | ||
8 | */ | ||
9 | |||
10 | /* | ||
11 | * entry.S | ||
12 | * include exception/interrupt gateway | ||
13 | * system call entry | ||
14 | */ | ||
15 | |||
16 | #include <linux/sys.h> | ||
17 | #include <asm/unistd.h> | ||
18 | #include <asm/setup.h> | ||
19 | #include <asm/segment.h> | ||
20 | #include <asm/linkage.h> | ||
21 | #include <asm/asm-offsets.h> | ||
22 | #include <asm/thread_info.h> | ||
23 | #include <asm/errno.h> | ||
24 | |||
25 | #if defined(CONFIG_CPU_H8300H) | ||
26 | #define USERRET 8 | ||
27 | INTERRUPTS = 64 | ||
28 | .h8300h | ||
29 | .macro SHLL2 reg | ||
30 | shll.l \reg | ||
31 | shll.l \reg | ||
32 | .endm | ||
33 | .macro SHLR2 reg | ||
34 | shlr.l \reg | ||
35 | shlr.l \reg | ||
36 | .endm | ||
37 | .macro SAVEREGS | ||
38 | mov.l er0,@-sp | ||
39 | mov.l er1,@-sp | ||
40 | mov.l er2,@-sp | ||
41 | mov.l er3,@-sp | ||
42 | .endm | ||
43 | .macro RESTOREREGS | ||
44 | mov.l @sp+,er3 | ||
45 | mov.l @sp+,er2 | ||
46 | .endm | ||
47 | .macro SAVEEXR | ||
48 | .endm | ||
49 | .macro RESTOREEXR | ||
50 | .endm | ||
51 | #endif | ||
52 | #if defined(CONFIG_CPU_H8S) | ||
53 | #define USERRET 10 | ||
54 | #define USEREXR 8 | ||
55 | INTERRUPTS = 128 | ||
56 | .h8300s | ||
57 | .macro SHLL2 reg | ||
58 | shll.l #2,\reg | ||
59 | .endm | ||
60 | .macro SHLR2 reg | ||
61 | shlr.l #2,\reg | ||
62 | .endm | ||
63 | .macro SAVEREGS | ||
64 | stm.l er0-er3,@-sp | ||
65 | .endm | ||
66 | .macro RESTOREREGS | ||
67 | ldm.l @sp+,er2-er3 | ||
68 | .endm | ||
69 | .macro SAVEEXR | ||
70 | mov.w @(USEREXR:16,er0),r1 | ||
71 | mov.w r1,@(LEXR-LER3:16,sp) /* copy EXR */ | ||
72 | .endm | ||
73 | .macro RESTOREEXR | ||
74 | mov.w @(LEXR-LER1:16,sp),r1 /* restore EXR */ | ||
75 | mov.b r1l,r1h | ||
76 | mov.w r1,@(USEREXR:16,er0) | ||
77 | .endm | ||
78 | #endif | ||
79 | |||
80 | |||
81 | /* CPU context save/restore macros. */ | ||
82 | |||
83 | .macro SAVE_ALL | ||
84 | mov.l er0,@-sp | ||
85 | stc ccr,r0l /* check kernel mode */ | ||
86 | btst #4,r0l | ||
87 | bne 5f | ||
88 | |||
89 | /* user mode */ | ||
90 | mov.l sp,@_sw_usp | ||
91 | mov.l @sp,er0 /* restore saved er0 */ | ||
92 | orc #0x10,ccr /* switch kernel stack */ | ||
93 | mov.l @_sw_ksp,sp | ||
94 | sub.l #(LRET-LORIG),sp /* allocate LORIG - LRET */ | ||
95 | SAVEREGS | ||
96 | mov.l @_sw_usp,er0 | ||
97 | mov.l @(USERRET:16,er0),er1 /* copy the RET addr */ | ||
98 | mov.l er1,@(LRET-LER3:16,sp) | ||
99 | SAVEEXR | ||
100 | |||
101 | mov.l @(LORIG-LER3:16,sp),er0 | ||
102 | mov.l er0,@(LER0-LER3:16,sp) /* copy ER0 */ | ||
103 | mov.w e1,r1 /* e1 highbyte = ccr */ | ||
104 | and #0xef,r1h /* mask mode? flag */ | ||
105 | bra 6f | ||
106 | 5: | ||
107 | /* kernel mode */ | ||
108 | mov.l @sp,er0 /* restore saved er0 */ | ||
109 | subs #2,sp /* set dummy ccr */ | ||
110 | SAVEREGS | ||
111 | mov.w @(LRET-LER3:16,sp),r1 /* copy old ccr */ | ||
112 | 6: | ||
113 | mov.b r1h,r1l | ||
114 | mov.b #0,r1h | ||
115 | mov.w r1,@(LCCR-LER3:16,sp) /* set ccr */ | ||
116 | mov.l er6,@-sp /* syscall arg #6 */ | ||
117 | mov.l er5,@-sp /* syscall arg #5 */ | ||
118 | mov.l er4,@-sp /* syscall arg #4 */ | ||
119 | .endm /* r1 = ccr */ | ||
120 | |||
121 | .macro RESTORE_ALL | ||
122 | mov.l @sp+,er4 | ||
123 | mov.l @sp+,er5 | ||
124 | mov.l @sp+,er6 | ||
125 | RESTOREREGS | ||
126 | mov.w @(LCCR-LER1:16,sp),r0 /* check kernel mode */ | ||
127 | btst #4,r0l | ||
128 | bne 7f | ||
129 | |||
130 | orc #0x80,ccr | ||
131 | mov.l @_sw_usp,er0 | ||
132 | mov.l @(LER0-LER1:16,sp),er1 /* restore ER0 */ | ||
133 | mov.l er1,@er0 | ||
134 | RESTOREEXR | ||
135 | mov.w @(LCCR-LER1:16,sp),r1 /* restore the RET addr */ | ||
136 | mov.b r1l,r1h | ||
137 | mov.b @(LRET+1-LER1:16,sp),r1l | ||
138 | mov.w r1,e1 | ||
139 | mov.w @(LRET+2-LER1:16,sp),r1 | ||
140 | mov.l er1,@(USERRET:16,er0) | ||
141 | |||
142 | mov.l @sp+,er1 | ||
143 | add.l #(LRET-LER1),sp /* remove LORIG - LRET */ | ||
144 | mov.l sp,@_sw_ksp | ||
145 | andc #0xef,ccr /* switch to user mode */ | ||
146 | mov.l er0,sp | ||
147 | bra 8f | ||
148 | 7: | ||
149 | mov.l @sp+,er1 | ||
150 | adds #4,sp | ||
151 | adds #2,sp | ||
152 | 8: | ||
153 | mov.l @sp+,er0 | ||
154 | adds #4,sp /* remove the sw created LVEC */ | ||
155 | rte | ||
156 | .endm | ||
157 | |||
158 | .globl _system_call | ||
159 | .globl _ret_from_exception | ||
160 | .globl _ret_from_fork | ||
161 | .globl _ret_from_kernel_thread | ||
162 | .globl _ret_from_interrupt | ||
163 | .globl _interrupt_redirect_table | ||
164 | .globl _sw_ksp,_sw_usp | ||
165 | .globl _resume | ||
166 | .globl _interrupt_entry | ||
167 | .globl _trace_break | ||
168 | |||
169 | #if defined(CONFIG_ROMKERNEL) | ||
170 | .section .int_redirect,"ax" | ||
171 | _interrupt_redirect_table: | ||
172 | #if defined(CONFIG_CPU_H8300H) | ||
173 | .rept 7 | ||
174 | .long 0 | ||
175 | .endr | ||
176 | #endif | ||
177 | #if defined(CONFIG_CPU_H8S) | ||
178 | .rept 5 | ||
179 | .long 0 | ||
180 | .endr | ||
181 | jmp @_trace_break | ||
182 | .long 0 | ||
183 | #endif | ||
184 | |||
185 | jsr @_interrupt_entry /* NMI */ | ||
186 | jmp @_system_call /* TRAPA #0 (System call) */ | ||
187 | .long 0 | ||
188 | .long 0 | ||
189 | jmp @_trace_break /* TRAPA #3 (breakpoint) */ | ||
190 | .rept INTERRUPTS-12 | ||
191 | jsr @_interrupt_entry | ||
192 | .endr | ||
193 | #endif | ||
194 | #if defined(CONFIG_RAMKERNEL) | ||
195 | .globl _interrupt_redirect_table | ||
196 | .section .bss | ||
197 | _interrupt_redirect_table: | ||
198 | .space 4 | ||
199 | #endif | ||
200 | |||
201 | .section .text | ||
202 | .align 2 | ||
203 | _interrupt_entry: | ||
204 | SAVE_ALL | ||
205 | mov.l sp,er0 | ||
206 | add.l #LVEC,er0 | ||
207 | btst #4,r1l | ||
208 | bne 1f | ||
209 | /* user LVEC */ | ||
210 | mov.l @_sw_usp,er0 | ||
211 | adds #4,er0 | ||
212 | 1: | ||
213 | mov.l @er0,er0 /* LVEC address */ | ||
214 | #if defined(CONFIG_ROMKERNEL) | ||
215 | sub.l #_interrupt_redirect_table,er0 | ||
216 | #endif | ||
217 | #if defined(CONFIG_RAMKERNEL) | ||
218 | mov.l @_interrupt_redirect_table,er1 | ||
219 | sub.l er1,er0 | ||
220 | #endif | ||
221 | SHLR2 er0 | ||
222 | dec.l #1,er0 | ||
223 | mov.l sp,er1 | ||
224 | subs #4,er1 /* adjust ret_pc */ | ||
225 | jsr @_do_IRQ | ||
226 | jmp @_ret_from_interrupt | ||
227 | |||
228 | _system_call: | ||
229 | subs #4,sp /* dummy LVEC */ | ||
230 | SAVE_ALL | ||
231 | andc #0x7f,ccr | ||
232 | mov.l er0,er4 | ||
233 | |||
234 | /* save top of frame */ | ||
235 | mov.l sp,er0 | ||
236 | jsr @_set_esp0 | ||
237 | mov.l sp,er2 | ||
238 | and.w #0xe000,r2 | ||
239 | mov.b @((TI_FLAGS+3-(TIF_SYSCALL_TRACE >> 3)):16,er2),r2l | ||
240 | btst #(TIF_SYSCALL_TRACE & 7),r2l | ||
241 | beq 1f | ||
242 | jsr @_do_syscall_trace | ||
243 | 1: | ||
244 | cmp.l #NR_syscalls,er4 | ||
245 | bcc badsys | ||
246 | SHLL2 er4 | ||
247 | mov.l #_sys_call_table,er0 | ||
248 | add.l er4,er0 | ||
249 | mov.l @er0,er4 | ||
250 | beq _ret_from_exception:16 | ||
251 | mov.l @(LER1:16,sp),er0 | ||
252 | mov.l @(LER2:16,sp),er1 | ||
253 | mov.l @(LER3:16,sp),er2 | ||
254 | jsr @er4 | ||
255 | mov.l er0,@(LER0:16,sp) /* save the return value */ | ||
256 | mov.l sp,er2 | ||
257 | and.w #0xe000,r2 | ||
258 | mov.b @((TI_FLAGS+3-(TIF_SYSCALL_TRACE >> 3)):16,er2),r2l | ||
259 | btst #(TIF_SYSCALL_TRACE & 7),r2l | ||
260 | beq 2f | ||
261 | jsr @_do_syscall_trace | ||
262 | 2: | ||
263 | #if defined(CONFIG_SYSCALL_PRINT) | ||
264 | jsr @_syscall_print | ||
265 | #endif | ||
266 | orc #0x80,ccr | ||
267 | bra resume_userspace | ||
268 | |||
269 | badsys: | ||
270 | mov.l #-ENOSYS,er0 | ||
271 | mov.l er0,@(LER0:16,sp) | ||
272 | bra resume_userspace | ||
273 | |||
274 | #if !defined(CONFIG_PREEMPT) | ||
275 | #define resume_kernel restore_all | ||
276 | #endif | ||
277 | |||
278 | _ret_from_exception: | ||
279 | #if defined(CONFIG_PREEMPT) | ||
280 | orc #0x80,ccr | ||
281 | #endif | ||
282 | _ret_from_interrupt: | ||
283 | mov.b @(LCCR+1:16,sp),r0l | ||
284 | btst #4,r0l | ||
285 | bne resume_kernel:8 /* return from kernel */ | ||
286 | resume_userspace: | ||
287 | andc #0x7f,ccr | ||
288 | mov.l sp,er4 | ||
289 | and.w #0xe000,r4 /* er4 <- current thread info */ | ||
290 | mov.l @(TI_FLAGS:16,er4),er1 | ||
291 | and.l #_TIF_WORK_MASK,er1 | ||
292 | beq restore_all:8 | ||
293 | work_pending: | ||
294 | btst #TIF_NEED_RESCHED,r1l | ||
295 | bne work_resched:8 | ||
296 | /* work notifysig */ | ||
297 | mov.l sp,er0 | ||
298 | subs #4,er0 /* er0: pt_regs */ | ||
299 | jsr @_do_notify_resume | ||
300 | bra restore_all:8 | ||
301 | work_resched: | ||
302 | mov.l sp,er0 | ||
303 | jsr @_set_esp0 | ||
304 | jsr @_schedule | ||
305 | bra resume_userspace:8 | ||
306 | restore_all: | ||
307 | RESTORE_ALL /* Does RTE */ | ||
308 | |||
309 | #if defined(CONFIG_PREEMPT) | ||
310 | resume_kernel: | ||
311 | mov.l @(TI_PRE_COUNT:16,er4),er0 | ||
312 | bne restore_all:8 | ||
313 | need_resched: | ||
314 | mov.l @(TI_FLAGS:16,er4),er0 | ||
315 | btst #TIF_NEED_RESCHED,r0l | ||
316 | beq restore_all:8 | ||
317 | mov.b @(LCCR+1:16,sp),r0l /* Interrupt Enabled? */ | ||
318 | bmi restore_all:8 | ||
319 | mov.l #PREEMPT_ACTIVE,er0 | ||
320 | mov.l er0,@(TI_PRE_COUNT:16,er4) | ||
321 | andc #0x7f,ccr | ||
322 | mov.l sp,er0 | ||
323 | jsr @_set_esp0 | ||
324 | jsr @_schedule | ||
325 | orc #0x80,ccr | ||
326 | bra need_resched:8 | ||
327 | #endif | ||
328 | |||
329 | _ret_from_fork: | ||
330 | mov.l er2,er0 | ||
331 | jsr @_schedule_tail | ||
332 | jmp @_ret_from_exception | ||
333 | |||
334 | _ret_from_kernel_thread: | ||
335 | mov.l er2,er0 | ||
336 | jsr @_schedule_tail | ||
337 | mov.l @(LER4:16,sp),er0 | ||
338 | mov.l @(LER5:16,sp),er1 | ||
339 | jsr @er1 | ||
340 | jmp @_ret_from_exception | ||
341 | |||
342 | _resume: | ||
343 | /* | ||
344 | * Beware - when entering resume, offset of tss is in d1, | ||
345 | * prev (the current task) is in a0, next (the new task) | ||
346 | * is in a1 and d2.b is non-zero if the mm structure is | ||
347 | * shared between the tasks, so don't change these | ||
348 | * registers until their contents are no longer needed. | ||
349 | */ | ||
350 | |||
351 | /* save sr */ | ||
352 | sub.w r3,r3 | ||
353 | stc ccr,r3l | ||
354 | mov.w r3,@(THREAD_CCR+2:16,er0) | ||
355 | |||
356 | /* disable interrupts */ | ||
357 | orc #0x80,ccr | ||
358 | mov.l @_sw_usp,er3 | ||
359 | mov.l er3,@(THREAD_USP:16,er0) | ||
360 | mov.l sp,@(THREAD_KSP:16,er0) | ||
361 | |||
362 | /* Skip address space switching if they are the same. */ | ||
363 | /* FIXME: what did we hack out of here, this does nothing! */ | ||
364 | |||
365 | mov.l @(THREAD_USP:16,er1),er0 | ||
366 | mov.l er0,@_sw_usp | ||
367 | mov.l @(THREAD_KSP:16,er1),sp | ||
368 | |||
369 | /* restore status register */ | ||
370 | mov.w @(THREAD_CCR+2:16,er1),r3 | ||
371 | |||
372 | ldc r3l,ccr | ||
373 | rts | ||
374 | |||
375 | _trace_break: | ||
376 | subs #4,sp | ||
377 | SAVE_ALL | ||
378 | sub.l er1,er1 | ||
379 | dec.l #1,er1 | ||
380 | mov.l er1,@(LORIG,sp) | ||
381 | mov.l sp,er0 | ||
382 | jsr @_set_esp0 | ||
383 | mov.l @_sw_usp,er0 | ||
384 | mov.l @er0,er1 | ||
385 | mov.w @(-2:16,er1),r2 | ||
386 | cmp.w #0x5730,r2 | ||
387 | beq 1f | ||
388 | subs #2,er1 | ||
389 | mov.l er1,@er0 | ||
390 | 1: | ||
391 | and.w #0xff,e1 | ||
392 | mov.l er1,er0 | ||
393 | jsr @_trace_trap | ||
394 | jmp @_ret_from_exception | ||
395 | |||
396 | .section .bss | ||
397 | _sw_ksp: | ||
398 | .space 4 | ||
399 | _sw_usp: | ||
400 | .space 4 | ||
401 | |||
402 | .end | ||
diff --git a/arch/h8300/kernel/gpio.c b/arch/h8300/kernel/gpio.c deleted file mode 100644 index 084bfd0c107e..000000000000 --- a/arch/h8300/kernel/gpio.c +++ /dev/null | |||
@@ -1,178 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/h8300/kernel/gpio.c | ||
3 | * | ||
4 | * Yoshinori Sato <ysato@users.sourceforge.jp> | ||
5 | * | ||
6 | */ | ||
7 | |||
8 | /* | ||
9 | * Internal I/O Port Management | ||
10 | */ | ||
11 | |||
12 | #include <linux/stddef.h> | ||
13 | #include <linux/proc_fs.h> | ||
14 | #include <linux/seq_file.h> | ||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/string.h> | ||
17 | #include <linux/fs.h> | ||
18 | #include <linux/init.h> | ||
19 | |||
20 | #define _(addr) (volatile unsigned char *)(addr) | ||
21 | #if defined(CONFIG_H83007) || defined(CONFIG_H83068) | ||
22 | #include <asm/regs306x.h> | ||
23 | static volatile unsigned char *ddrs[] = { | ||
24 | _(P1DDR),_(P2DDR),_(P3DDR),_(P4DDR),_(P5DDR),_(P6DDR), | ||
25 | NULL, _(P8DDR),_(P9DDR),_(PADDR),_(PBDDR), | ||
26 | }; | ||
27 | #define MAX_PORT 11 | ||
28 | #endif | ||
29 | |||
30 | #if defined(CONFIG_H83002) || defined(CONFIG_H8048) | ||
31 | /* Fix me!! */ | ||
32 | #include <asm/regs306x.h> | ||
33 | static volatile unsigned char *ddrs[] = { | ||
34 | _(P1DDR),_(P2DDR),_(P3DDR),_(P4DDR),_(P5DDR),_(P6DDR), | ||
35 | NULL, _(P8DDR),_(P9DDR),_(PADDR),_(PBDDR), | ||
36 | }; | ||
37 | #define MAX_PORT 11 | ||
38 | #endif | ||
39 | |||
40 | #if defined(CONFIG_H8S2678) | ||
41 | #include <asm/regs267x.h> | ||
42 | static volatile unsigned char *ddrs[] = { | ||
43 | _(P1DDR),_(P2DDR),_(P3DDR),NULL ,_(P5DDR),_(P6DDR), | ||
44 | _(P7DDR),_(P8DDR),NULL, _(PADDR),_(PBDDR),_(PCDDR), | ||
45 | _(PDDDR),_(PEDDR),_(PFDDR),_(PGDDR),_(PHDDR), | ||
46 | _(PADDR),_(PBDDR),_(PCDDR),_(PDDDR),_(PEDDR),_(PFDDR), | ||
47 | _(PGDDR),_(PHDDR) | ||
48 | }; | ||
49 | #define MAX_PORT 17 | ||
50 | #endif | ||
51 | #undef _ | ||
52 | |||
53 | #if !defined(P1DDR) | ||
54 | #error Unsuppoted CPU Selection | ||
55 | #endif | ||
56 | |||
57 | static struct { | ||
58 | unsigned char used; | ||
59 | unsigned char ddr; | ||
60 | } gpio_regs[MAX_PORT]; | ||
61 | |||
62 | extern char *_platform_gpio_table(int length); | ||
63 | |||
64 | int h8300_reserved_gpio(int port, unsigned int bits) | ||
65 | { | ||
66 | unsigned char *used; | ||
67 | |||
68 | if (port < 0 || port >= MAX_PORT) | ||
69 | return -1; | ||
70 | used = &(gpio_regs[port].used); | ||
71 | if ((*used & bits) != 0) | ||
72 | return 0; | ||
73 | *used |= bits; | ||
74 | return 1; | ||
75 | } | ||
76 | |||
77 | int h8300_free_gpio(int port, unsigned int bits) | ||
78 | { | ||
79 | unsigned char *used; | ||
80 | |||
81 | if (port < 0 || port >= MAX_PORT) | ||
82 | return -1; | ||
83 | used = &(gpio_regs[port].used); | ||
84 | if ((*used & bits) != bits) | ||
85 | return 0; | ||
86 | *used &= (~bits); | ||
87 | return 1; | ||
88 | } | ||
89 | |||
90 | int h8300_set_gpio_dir(int port_bit,int dir) | ||
91 | { | ||
92 | int port = (port_bit >> 8) & 0xff; | ||
93 | int bit = port_bit & 0xff; | ||
94 | |||
95 | if (ddrs[port] == NULL) | ||
96 | return 0; | ||
97 | if (gpio_regs[port].used & bit) { | ||
98 | if (dir) | ||
99 | gpio_regs[port].ddr |= bit; | ||
100 | else | ||
101 | gpio_regs[port].ddr &= ~bit; | ||
102 | *ddrs[port] = gpio_regs[port].ddr; | ||
103 | return 1; | ||
104 | } else | ||
105 | return 0; | ||
106 | } | ||
107 | |||
108 | int h8300_get_gpio_dir(int port_bit) | ||
109 | { | ||
110 | int port = (port_bit >> 8) & 0xff; | ||
111 | int bit = port_bit & 0xff; | ||
112 | |||
113 | if (ddrs[port] == NULL) | ||
114 | return 0; | ||
115 | if (gpio_regs[port].used & bit) { | ||
116 | return (gpio_regs[port].ddr & bit) != 0; | ||
117 | } else | ||
118 | return -1; | ||
119 | } | ||
120 | |||
121 | #if defined(CONFIG_PROC_FS) | ||
122 | static char *port_status(int portno) | ||
123 | { | ||
124 | static char result[10]; | ||
125 | static const char io[2]={'I','O'}; | ||
126 | char *rp; | ||
127 | int c; | ||
128 | unsigned char used,ddr; | ||
129 | |||
130 | used = gpio_regs[portno].used; | ||
131 | ddr = gpio_regs[portno].ddr; | ||
132 | result[8]='\0'; | ||
133 | rp = result + 7; | ||
134 | for (c = 8; c > 0; c--,rp--,used >>= 1, ddr >>= 1) | ||
135 | if (used & 0x01) | ||
136 | *rp = io[ ddr & 0x01]; | ||
137 | else | ||
138 | *rp = '-'; | ||
139 | return result; | ||
140 | } | ||
141 | |||
142 | static int gpio_proc_show(struct seq_file *m, void *v) | ||
143 | { | ||
144 | static const char port_name[]="123456789ABCDEFGH"; | ||
145 | int c; | ||
146 | |||
147 | for (c = 0; c < MAX_PORT; c++) { | ||
148 | if (ddrs[c] == NULL) | ||
149 | continue; | ||
150 | seq_printf(m, "P%c: %s\n", port_name[c], port_status(c)); | ||
151 | } | ||
152 | return 0; | ||
153 | } | ||
154 | |||
155 | static int gpio_proc_open(struct inode *inode, struct file *file) | ||
156 | { | ||
157 | return single_open(file, gpio_proc_show, PDE_DATA(inode)); | ||
158 | } | ||
159 | |||
160 | static const struct file_operations gpio_proc_fops = { | ||
161 | .open = gpio_proc_open, | ||
162 | .read = seq_read, | ||
163 | .llseek = seq_lseek, | ||
164 | .release = single_release, | ||
165 | }; | ||
166 | |||
167 | static __init int register_proc(void) | ||
168 | { | ||
169 | return proc_create("gpio", S_IRUGO, NULL, &gpio_proc_fops) != NULL; | ||
170 | } | ||
171 | |||
172 | __initcall(register_proc); | ||
173 | #endif | ||
174 | |||
175 | void __init h8300_gpio_init(void) | ||
176 | { | ||
177 | memcpy(gpio_regs,_platform_gpio_table(sizeof(gpio_regs)),sizeof(gpio_regs)); | ||
178 | } | ||
diff --git a/arch/h8300/kernel/h8300_ksyms.c b/arch/h8300/kernel/h8300_ksyms.c deleted file mode 100644 index 53d7c0e4bd83..000000000000 --- a/arch/h8300/kernel/h8300_ksyms.c +++ /dev/null | |||
@@ -1,100 +0,0 @@ | |||
1 | #include <linux/module.h> | ||
2 | #include <linux/linkage.h> | ||
3 | #include <linux/sched.h> | ||
4 | #include <linux/string.h> | ||
5 | #include <linux/mm.h> | ||
6 | #include <linux/user.h> | ||
7 | #include <linux/elfcore.h> | ||
8 | #include <linux/in6.h> | ||
9 | #include <linux/interrupt.h> | ||
10 | |||
11 | #include <asm/setup.h> | ||
12 | #include <asm/pgalloc.h> | ||
13 | #include <asm/irq.h> | ||
14 | #include <asm/io.h> | ||
15 | #include <asm/checksum.h> | ||
16 | #include <asm/current.h> | ||
17 | #include <asm/gpio.h> | ||
18 | |||
19 | //asmlinkage long long __ashrdi3 (long long, int); | ||
20 | //asmlinkage long long __lshrdi3 (long long, int); | ||
21 | extern char h8300_debug_device[]; | ||
22 | |||
23 | /* platform dependent support */ | ||
24 | |||
25 | EXPORT_SYMBOL(strnlen); | ||
26 | EXPORT_SYMBOL(strrchr); | ||
27 | EXPORT_SYMBOL(strstr); | ||
28 | EXPORT_SYMBOL(strchr); | ||
29 | EXPORT_SYMBOL(strcat); | ||
30 | EXPORT_SYMBOL(strlen); | ||
31 | EXPORT_SYMBOL(strcmp); | ||
32 | EXPORT_SYMBOL(strncmp); | ||
33 | |||
34 | EXPORT_SYMBOL(ip_fast_csum); | ||
35 | |||
36 | EXPORT_SYMBOL(enable_irq); | ||
37 | EXPORT_SYMBOL(disable_irq); | ||
38 | |||
39 | /* Networking helper routines. */ | ||
40 | EXPORT_SYMBOL(csum_partial_copy_nocheck); | ||
41 | |||
42 | /* The following are special because they're not called | ||
43 | explicitly (the C compiler generates them). Fortunately, | ||
44 | their interface isn't gonna change any time soon now, so | ||
45 | it's OK to leave it out of version control. */ | ||
46 | //EXPORT_SYMBOL(__ashrdi3); | ||
47 | //EXPORT_SYMBOL(__lshrdi3); | ||
48 | EXPORT_SYMBOL(memcpy); | ||
49 | EXPORT_SYMBOL(memset); | ||
50 | EXPORT_SYMBOL(memcmp); | ||
51 | EXPORT_SYMBOL(memscan); | ||
52 | EXPORT_SYMBOL(memmove); | ||
53 | |||
54 | /* | ||
55 | * libgcc functions - functions that are used internally by the | ||
56 | * compiler... (prototypes are not correct though, but that | ||
57 | * doesn't really matter since they're not versioned). | ||
58 | */ | ||
59 | extern void __gcc_bcmp(void); | ||
60 | extern void __ashldi3(void); | ||
61 | extern void __ashrdi3(void); | ||
62 | extern void __cmpdi2(void); | ||
63 | extern void __divdi3(void); | ||
64 | extern void __divsi3(void); | ||
65 | extern void __lshrdi3(void); | ||
66 | extern void __moddi3(void); | ||
67 | extern void __modsi3(void); | ||
68 | extern void __muldi3(void); | ||
69 | extern void __mulsi3(void); | ||
70 | extern void __negdi2(void); | ||
71 | extern void __ucmpdi2(void); | ||
72 | extern void __udivdi3(void); | ||
73 | extern void __udivmoddi4(void); | ||
74 | extern void __udivsi3(void); | ||
75 | extern void __umoddi3(void); | ||
76 | extern void __umodsi3(void); | ||
77 | |||
78 | /* gcc lib functions */ | ||
79 | EXPORT_SYMBOL(__gcc_bcmp); | ||
80 | EXPORT_SYMBOL(__ashldi3); | ||
81 | EXPORT_SYMBOL(__ashrdi3); | ||
82 | EXPORT_SYMBOL(__cmpdi2); | ||
83 | EXPORT_SYMBOL(__divdi3); | ||
84 | EXPORT_SYMBOL(__divsi3); | ||
85 | EXPORT_SYMBOL(__lshrdi3); | ||
86 | EXPORT_SYMBOL(__moddi3); | ||
87 | EXPORT_SYMBOL(__modsi3); | ||
88 | EXPORT_SYMBOL(__muldi3); | ||
89 | EXPORT_SYMBOL(__mulsi3); | ||
90 | EXPORT_SYMBOL(__negdi2); | ||
91 | EXPORT_SYMBOL(__ucmpdi2); | ||
92 | EXPORT_SYMBOL(__udivdi3); | ||
93 | EXPORT_SYMBOL(__udivmoddi4); | ||
94 | EXPORT_SYMBOL(__udivsi3); | ||
95 | EXPORT_SYMBOL(__umoddi3); | ||
96 | EXPORT_SYMBOL(__umodsi3); | ||
97 | |||
98 | EXPORT_SYMBOL(h8300_reserved_gpio); | ||
99 | EXPORT_SYMBOL(h8300_free_gpio); | ||
100 | EXPORT_SYMBOL(h8300_set_gpio_dir); | ||
diff --git a/arch/h8300/kernel/irq.c b/arch/h8300/kernel/irq.c deleted file mode 100644 index 2fa8ac7b79b5..000000000000 --- a/arch/h8300/kernel/irq.c +++ /dev/null | |||
@@ -1,165 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/h8300/kernel/irq.c | ||
3 | * | ||
4 | * Copyright 2007 Yoshinori Sato <ysato@users.sourceforge.jp> | ||
5 | */ | ||
6 | |||
7 | #include <linux/module.h> | ||
8 | #include <linux/types.h> | ||
9 | #include <linux/kernel.h> | ||
10 | #include <linux/sched.h> | ||
11 | #include <linux/kernel_stat.h> | ||
12 | #include <linux/seq_file.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <linux/random.h> | ||
15 | #include <linux/bootmem.h> | ||
16 | #include <linux/irq.h> | ||
17 | #include <linux/interrupt.h> | ||
18 | |||
19 | #include <asm/traps.h> | ||
20 | #include <asm/io.h> | ||
21 | #include <asm/setup.h> | ||
22 | #include <asm/errno.h> | ||
23 | |||
24 | /*#define DEBUG*/ | ||
25 | |||
26 | extern unsigned long *interrupt_redirect_table; | ||
27 | extern const int h8300_saved_vectors[]; | ||
28 | extern const h8300_vector h8300_trap_table[]; | ||
29 | int h8300_enable_irq_pin(unsigned int irq); | ||
30 | void h8300_disable_irq_pin(unsigned int irq); | ||
31 | |||
32 | #define CPU_VECTOR ((unsigned long *)0x000000) | ||
33 | #define ADDR_MASK (0xffffff) | ||
34 | |||
35 | static inline int is_ext_irq(unsigned int irq) | ||
36 | { | ||
37 | return (irq >= EXT_IRQ0 && irq <= (EXT_IRQ0 + EXT_IRQS)); | ||
38 | } | ||
39 | |||
40 | static void h8300_enable_irq(struct irq_data *data) | ||
41 | { | ||
42 | if (is_ext_irq(data->irq)) | ||
43 | IER_REGS |= 1 << (data->irq - EXT_IRQ0); | ||
44 | } | ||
45 | |||
46 | static void h8300_disable_irq(struct irq_data *data) | ||
47 | { | ||
48 | if (is_ext_irq(data->irq)) | ||
49 | IER_REGS &= ~(1 << (data->irq - EXT_IRQ0)); | ||
50 | } | ||
51 | |||
52 | static unsigned int h8300_startup_irq(struct irq_data *data) | ||
53 | { | ||
54 | if (is_ext_irq(data->irq)) | ||
55 | return h8300_enable_irq_pin(data->irq); | ||
56 | else | ||
57 | return 0; | ||
58 | } | ||
59 | |||
60 | static void h8300_shutdown_irq(struct irq_data *data) | ||
61 | { | ||
62 | if (is_ext_irq(data->irq)) | ||
63 | h8300_disable_irq_pin(data->irq); | ||
64 | } | ||
65 | |||
66 | /* | ||
67 | * h8300 interrupt controller implementation | ||
68 | */ | ||
69 | struct irq_chip h8300irq_chip = { | ||
70 | .name = "H8300-INTC", | ||
71 | .irq_startup = h8300_startup_irq, | ||
72 | .irq_shutdown = h8300_shutdown_irq, | ||
73 | .irq_enable = h8300_enable_irq, | ||
74 | .irq_disable = h8300_disable_irq, | ||
75 | }; | ||
76 | |||
77 | #if defined(CONFIG_RAMKERNEL) | ||
78 | static unsigned long __init *get_vector_address(void) | ||
79 | { | ||
80 | unsigned long *rom_vector = CPU_VECTOR; | ||
81 | unsigned long base,tmp; | ||
82 | int vec_no; | ||
83 | |||
84 | base = rom_vector[EXT_IRQ0] & ADDR_MASK; | ||
85 | |||
86 | /* check romvector format */ | ||
87 | for (vec_no = EXT_IRQ1; vec_no <= EXT_IRQ0+EXT_IRQS; vec_no++) { | ||
88 | if ((base+(vec_no - EXT_IRQ0)*4) != (rom_vector[vec_no] & ADDR_MASK)) | ||
89 | return NULL; | ||
90 | } | ||
91 | |||
92 | /* ramvector base address */ | ||
93 | base -= EXT_IRQ0*4; | ||
94 | |||
95 | /* writerble check */ | ||
96 | tmp = ~(*(volatile unsigned long *)base); | ||
97 | (*(volatile unsigned long *)base) = tmp; | ||
98 | if ((*(volatile unsigned long *)base) != tmp) | ||
99 | return NULL; | ||
100 | return (unsigned long *)base; | ||
101 | } | ||
102 | |||
103 | static void __init setup_vector(void) | ||
104 | { | ||
105 | int i; | ||
106 | unsigned long *ramvec,*ramvec_p; | ||
107 | const h8300_vector *trap_entry; | ||
108 | const int *saved_vector; | ||
109 | |||
110 | ramvec = get_vector_address(); | ||
111 | if (ramvec == NULL) | ||
112 | panic("interrupt vector serup failed."); | ||
113 | else | ||
114 | printk(KERN_INFO "virtual vector at 0x%08lx\n",(unsigned long)ramvec); | ||
115 | |||
116 | /* create redirect table */ | ||
117 | ramvec_p = ramvec; | ||
118 | trap_entry = h8300_trap_table; | ||
119 | saved_vector = h8300_saved_vectors; | ||
120 | for ( i = 0; i < NR_IRQS; i++) { | ||
121 | if (i == *saved_vector) { | ||
122 | ramvec_p++; | ||
123 | saved_vector++; | ||
124 | } else { | ||
125 | if ( i < NR_TRAPS ) { | ||
126 | if (*trap_entry) | ||
127 | *ramvec_p = VECTOR(*trap_entry); | ||
128 | ramvec_p++; | ||
129 | trap_entry++; | ||
130 | } else | ||
131 | *ramvec_p++ = REDIRECT(interrupt_entry); | ||
132 | } | ||
133 | } | ||
134 | interrupt_redirect_table = ramvec; | ||
135 | #ifdef DEBUG | ||
136 | ramvec_p = ramvec; | ||
137 | for (i = 0; i < NR_IRQS; i++) { | ||
138 | if ((i % 8) == 0) | ||
139 | printk(KERN_DEBUG "\n%p: ",ramvec_p); | ||
140 | printk(KERN_DEBUG "%p ",*ramvec_p); | ||
141 | ramvec_p++; | ||
142 | } | ||
143 | printk(KERN_DEBUG "\n"); | ||
144 | #endif | ||
145 | } | ||
146 | #else | ||
147 | #define setup_vector() do { } while(0) | ||
148 | #endif | ||
149 | |||
150 | void __init init_IRQ(void) | ||
151 | { | ||
152 | int c; | ||
153 | |||
154 | setup_vector(); | ||
155 | |||
156 | for (c = 0; c < NR_IRQS; c++) | ||
157 | irq_set_chip_and_handler(c, &h8300irq_chip, handle_simple_irq); | ||
158 | } | ||
159 | |||
160 | asmlinkage void do_IRQ(int irq) | ||
161 | { | ||
162 | irq_enter(); | ||
163 | generic_handle_irq(irq); | ||
164 | irq_exit(); | ||
165 | } | ||
diff --git a/arch/h8300/kernel/module.c b/arch/h8300/kernel/module.c deleted file mode 100644 index 1d526e05db19..000000000000 --- a/arch/h8300/kernel/module.c +++ /dev/null | |||
@@ -1,75 +0,0 @@ | |||
1 | #include <linux/moduleloader.h> | ||
2 | #include <linux/elf.h> | ||
3 | #include <linux/vmalloc.h> | ||
4 | #include <linux/fs.h> | ||
5 | #include <linux/string.h> | ||
6 | #include <linux/kernel.h> | ||
7 | |||
8 | #if 0 | ||
9 | #define DEBUGP printk | ||
10 | #else | ||
11 | #define DEBUGP(fmt...) | ||
12 | #endif | ||
13 | |||
14 | int apply_relocate_add(Elf32_Shdr *sechdrs, | ||
15 | const char *strtab, | ||
16 | unsigned int symindex, | ||
17 | unsigned int relsec, | ||
18 | struct module *me) | ||
19 | { | ||
20 | unsigned int i; | ||
21 | Elf32_Rela *rela = (void *)sechdrs[relsec].sh_addr; | ||
22 | |||
23 | DEBUGP("Applying relocate section %u to %u\n", relsec, | ||
24 | sechdrs[relsec].sh_info); | ||
25 | for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rela); i++) { | ||
26 | /* This is where to make the change */ | ||
27 | uint32_t *loc = (uint32_t *)(sechdrs[sechdrs[relsec].sh_info].sh_addr | ||
28 | + rela[i].r_offset); | ||
29 | /* This is the symbol it is referring to. Note that all | ||
30 | undefined symbols have been resolved. */ | ||
31 | Elf32_Sym *sym = (Elf32_Sym *)sechdrs[symindex].sh_addr | ||
32 | + ELF32_R_SYM(rela[i].r_info); | ||
33 | uint32_t v = sym->st_value + rela[i].r_addend; | ||
34 | |||
35 | switch (ELF32_R_TYPE(rela[i].r_info)) { | ||
36 | case R_H8_DIR24R8: | ||
37 | loc = (uint32_t *)((uint32_t)loc - 1); | ||
38 | *loc = (*loc & 0xff000000) | ((*loc & 0xffffff) + v); | ||
39 | break; | ||
40 | case R_H8_DIR24A8: | ||
41 | if (ELF32_R_SYM(rela[i].r_info)) | ||
42 | *loc += v; | ||
43 | break; | ||
44 | case R_H8_DIR32: | ||
45 | case R_H8_DIR32A16: | ||
46 | *loc += v; | ||
47 | break; | ||
48 | case R_H8_PCREL16: | ||
49 | v -= (unsigned long)loc + 2; | ||
50 | if ((Elf32_Sword)v > 0x7fff || | ||
51 | (Elf32_Sword)v < -(Elf32_Sword)0x8000) | ||
52 | goto overflow; | ||
53 | else | ||
54 | *(unsigned short *)loc = v; | ||
55 | break; | ||
56 | case R_H8_PCREL8: | ||
57 | v -= (unsigned long)loc + 1; | ||
58 | if ((Elf32_Sword)v > 0x7f || | ||
59 | (Elf32_Sword)v < -(Elf32_Sword)0x80) | ||
60 | goto overflow; | ||
61 | else | ||
62 | *(unsigned char *)loc = v; | ||
63 | break; | ||
64 | default: | ||
65 | printk(KERN_ERR "module %s: Unknown relocation: %u\n", | ||
66 | me->name, ELF32_R_TYPE(rela[i].r_info)); | ||
67 | return -ENOEXEC; | ||
68 | } | ||
69 | } | ||
70 | return 0; | ||
71 | overflow: | ||
72 | printk(KERN_ERR "module %s: relocation offset overflow: %08x\n", | ||
73 | me->name, rela[i].r_offset); | ||
74 | return -ENOEXEC; | ||
75 | } | ||
diff --git a/arch/h8300/kernel/process.c b/arch/h8300/kernel/process.c deleted file mode 100644 index 1a744ab7e7e5..000000000000 --- a/arch/h8300/kernel/process.c +++ /dev/null | |||
@@ -1,154 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/h8300/kernel/process.c | ||
3 | * | ||
4 | * Yoshinori Sato <ysato@users.sourceforge.jp> | ||
5 | * | ||
6 | * Based on: | ||
7 | * | ||
8 | * linux/arch/m68knommu/kernel/process.c | ||
9 | * | ||
10 | * Copyright (C) 1998 D. Jeff Dionne <jeff@ryeham.ee.ryerson.ca>, | ||
11 | * Kenneth Albanowski <kjahds@kjahds.com>, | ||
12 | * The Silver Hammer Group, Ltd. | ||
13 | * | ||
14 | * linux/arch/m68k/kernel/process.c | ||
15 | * | ||
16 | * Copyright (C) 1995 Hamish Macdonald | ||
17 | * | ||
18 | * 68060 fixes by Jesper Skov | ||
19 | */ | ||
20 | |||
21 | /* | ||
22 | * This file handles the architecture-dependent parts of process handling.. | ||
23 | */ | ||
24 | |||
25 | #include <linux/errno.h> | ||
26 | #include <linux/module.h> | ||
27 | #include <linux/sched.h> | ||
28 | #include <linux/kernel.h> | ||
29 | #include <linux/mm.h> | ||
30 | #include <linux/smp.h> | ||
31 | #include <linux/stddef.h> | ||
32 | #include <linux/unistd.h> | ||
33 | #include <linux/ptrace.h> | ||
34 | #include <linux/user.h> | ||
35 | #include <linux/interrupt.h> | ||
36 | #include <linux/reboot.h> | ||
37 | #include <linux/fs.h> | ||
38 | #include <linux/slab.h> | ||
39 | #include <linux/rcupdate.h> | ||
40 | |||
41 | #include <asm/uaccess.h> | ||
42 | #include <asm/traps.h> | ||
43 | #include <asm/setup.h> | ||
44 | #include <asm/pgtable.h> | ||
45 | |||
46 | void (*pm_power_off)(void) = NULL; | ||
47 | EXPORT_SYMBOL(pm_power_off); | ||
48 | |||
49 | asmlinkage void ret_from_fork(void); | ||
50 | asmlinkage void ret_from_kernel_thread(void); | ||
51 | |||
52 | /* | ||
53 | * The idle loop on an H8/300.. | ||
54 | */ | ||
55 | #if !defined(CONFIG_H8300H_SIM) && !defined(CONFIG_H8S_SIM) | ||
56 | void arch_cpu_idle(void) | ||
57 | { | ||
58 | local_irq_enable(); | ||
59 | /* XXX: race here! What if need_resched() gets set now? */ | ||
60 | __asm__("sleep"); | ||
61 | } | ||
62 | #endif | ||
63 | |||
64 | void machine_restart(char * __unused) | ||
65 | { | ||
66 | local_irq_disable(); | ||
67 | __asm__("jmp @@0"); | ||
68 | } | ||
69 | |||
70 | void machine_halt(void) | ||
71 | { | ||
72 | local_irq_disable(); | ||
73 | __asm__("sleep"); | ||
74 | for (;;); | ||
75 | } | ||
76 | |||
77 | void machine_power_off(void) | ||
78 | { | ||
79 | local_irq_disable(); | ||
80 | __asm__("sleep"); | ||
81 | for (;;); | ||
82 | } | ||
83 | |||
84 | void show_regs(struct pt_regs * regs) | ||
85 | { | ||
86 | show_regs_print_info(KERN_DEFAULT); | ||
87 | |||
88 | printk("\nPC: %08lx Status: %02x", | ||
89 | regs->pc, regs->ccr); | ||
90 | printk("\nORIG_ER0: %08lx ER0: %08lx ER1: %08lx", | ||
91 | regs->orig_er0, regs->er0, regs->er1); | ||
92 | printk("\nER2: %08lx ER3: %08lx ER4: %08lx ER5: %08lx", | ||
93 | regs->er2, regs->er3, regs->er4, regs->er5); | ||
94 | printk("\nER6' %08lx ",regs->er6); | ||
95 | if (user_mode(regs)) | ||
96 | printk("USP: %08lx\n", rdusp()); | ||
97 | else | ||
98 | printk("\n"); | ||
99 | } | ||
100 | |||
101 | void flush_thread(void) | ||
102 | { | ||
103 | } | ||
104 | |||
105 | int copy_thread(unsigned long clone_flags, | ||
106 | unsigned long usp, unsigned long topstk, | ||
107 | struct task_struct * p) | ||
108 | { | ||
109 | struct pt_regs * childregs; | ||
110 | |||
111 | childregs = (struct pt_regs *) (THREAD_SIZE + task_stack_page(p)) - 1; | ||
112 | |||
113 | if (unlikely(p->flags & PF_KTHREAD)) { | ||
114 | memset(childregs, 0, sizeof(struct pt_regs)); | ||
115 | childregs->retpc = (unsigned long) ret_from_kernel_thread; | ||
116 | childregs->er4 = topstk; /* arg */ | ||
117 | childregs->er5 = usp; /* fn */ | ||
118 | p->thread.ksp = (unsigned long)childregs; | ||
119 | } | ||
120 | *childregs = *current_pt_regs(); | ||
121 | childregs->retpc = (unsigned long) ret_from_fork; | ||
122 | childregs->er0 = 0; | ||
123 | p->thread.usp = usp ?: rdusp(); | ||
124 | p->thread.ksp = (unsigned long)childregs; | ||
125 | |||
126 | return 0; | ||
127 | } | ||
128 | |||
129 | unsigned long thread_saved_pc(struct task_struct *tsk) | ||
130 | { | ||
131 | return ((struct pt_regs *)tsk->thread.esp0)->pc; | ||
132 | } | ||
133 | |||
134 | unsigned long get_wchan(struct task_struct *p) | ||
135 | { | ||
136 | unsigned long fp, pc; | ||
137 | unsigned long stack_page; | ||
138 | int count = 0; | ||
139 | if (!p || p == current || p->state == TASK_RUNNING) | ||
140 | return 0; | ||
141 | |||
142 | stack_page = (unsigned long)p; | ||
143 | fp = ((struct pt_regs *)p->thread.ksp)->er6; | ||
144 | do { | ||
145 | if (fp < stack_page+sizeof(struct thread_info) || | ||
146 | fp >= 8184+stack_page) | ||
147 | return 0; | ||
148 | pc = ((unsigned long *)fp)[1]; | ||
149 | if (!in_sched_functions(pc)) | ||
150 | return pc; | ||
151 | fp = *(unsigned long *) fp; | ||
152 | } while (count++ < 16); | ||
153 | return 0; | ||
154 | } | ||
diff --git a/arch/h8300/kernel/ptrace.c b/arch/h8300/kernel/ptrace.c deleted file mode 100644 index 748cf6585aa4..000000000000 --- a/arch/h8300/kernel/ptrace.c +++ /dev/null | |||
@@ -1,168 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/h8300/kernel/ptrace.c | ||
3 | * | ||
4 | * Yoshinori Sato <ysato@users.sourceforge.jp> | ||
5 | * | ||
6 | * Based on: | ||
7 | * linux/arch/m68k/kernel/ptrace.c | ||
8 | * | ||
9 | * Copyright (C) 1994 by Hamish Macdonald | ||
10 | * Taken from linux/kernel/ptrace.c and modified for M680x0. | ||
11 | * linux/kernel/ptrace.c is by Ross Biro 1/23/92, edited by Linus Torvalds | ||
12 | * | ||
13 | * This file is subject to the terms and conditions of the GNU General | ||
14 | * Public License. See the file COPYING in the main directory of | ||
15 | * this archive for more details. | ||
16 | */ | ||
17 | |||
18 | #include <linux/kernel.h> | ||
19 | #include <linux/sched.h> | ||
20 | #include <linux/mm.h> | ||
21 | #include <linux/smp.h> | ||
22 | #include <linux/errno.h> | ||
23 | #include <linux/ptrace.h> | ||
24 | #include <linux/user.h> | ||
25 | #include <linux/signal.h> | ||
26 | |||
27 | #include <asm/uaccess.h> | ||
28 | #include <asm/page.h> | ||
29 | #include <asm/pgtable.h> | ||
30 | #include <asm/processor.h> | ||
31 | #include <asm/signal.h> | ||
32 | |||
33 | /* cpu depend functions */ | ||
34 | extern long h8300_get_reg(struct task_struct *task, int regno); | ||
35 | extern int h8300_put_reg(struct task_struct *task, int regno, unsigned long data); | ||
36 | |||
37 | |||
38 | void user_disable_single_step(struct task_struct *child) | ||
39 | { | ||
40 | } | ||
41 | |||
42 | /* | ||
43 | * does not yet catch signals sent when the child dies. | ||
44 | * in exit.c or in signal.c. | ||
45 | */ | ||
46 | |||
47 | void ptrace_disable(struct task_struct *child) | ||
48 | { | ||
49 | user_disable_single_step(child); | ||
50 | } | ||
51 | |||
52 | long arch_ptrace(struct task_struct *child, long request, | ||
53 | unsigned long addr, unsigned long data) | ||
54 | { | ||
55 | int ret; | ||
56 | int regno = addr >> 2; | ||
57 | unsigned long __user *datap = (unsigned long __user *) data; | ||
58 | |||
59 | switch (request) { | ||
60 | /* read the word at location addr in the USER area. */ | ||
61 | case PTRACE_PEEKUSR: { | ||
62 | unsigned long tmp = 0; | ||
63 | |||
64 | if ((addr & 3) || addr >= sizeof(struct user)) { | ||
65 | ret = -EIO; | ||
66 | break ; | ||
67 | } | ||
68 | |||
69 | ret = 0; /* Default return condition */ | ||
70 | |||
71 | if (regno < H8300_REGS_NO) | ||
72 | tmp = h8300_get_reg(child, regno); | ||
73 | else { | ||
74 | switch (regno) { | ||
75 | case 49: | ||
76 | tmp = child->mm->start_code; | ||
77 | break ; | ||
78 | case 50: | ||
79 | tmp = child->mm->start_data; | ||
80 | break ; | ||
81 | case 51: | ||
82 | tmp = child->mm->end_code; | ||
83 | break ; | ||
84 | case 52: | ||
85 | tmp = child->mm->end_data; | ||
86 | break ; | ||
87 | default: | ||
88 | ret = -EIO; | ||
89 | } | ||
90 | } | ||
91 | if (!ret) | ||
92 | ret = put_user(tmp, datap); | ||
93 | break ; | ||
94 | } | ||
95 | |||
96 | /* when I and D space are separate, this will have to be fixed. */ | ||
97 | case PTRACE_POKEUSR: /* write the word at location addr in the USER area */ | ||
98 | if ((addr & 3) || addr >= sizeof(struct user)) { | ||
99 | ret = -EIO; | ||
100 | break ; | ||
101 | } | ||
102 | |||
103 | if (regno == PT_ORIG_ER0) { | ||
104 | ret = -EIO; | ||
105 | break ; | ||
106 | } | ||
107 | if (regno < H8300_REGS_NO) { | ||
108 | ret = h8300_put_reg(child, regno, data); | ||
109 | break ; | ||
110 | } | ||
111 | ret = -EIO; | ||
112 | break ; | ||
113 | |||
114 | case PTRACE_GETREGS: { /* Get all gp regs from the child. */ | ||
115 | int i; | ||
116 | unsigned long tmp; | ||
117 | for (i = 0; i < H8300_REGS_NO; i++) { | ||
118 | tmp = h8300_get_reg(child, i); | ||
119 | if (put_user(tmp, datap)) { | ||
120 | ret = -EFAULT; | ||
121 | break; | ||
122 | } | ||
123 | datap++; | ||
124 | } | ||
125 | ret = 0; | ||
126 | break; | ||
127 | } | ||
128 | |||
129 | case PTRACE_SETREGS: { /* Set all gp regs in the child. */ | ||
130 | int i; | ||
131 | unsigned long tmp; | ||
132 | for (i = 0; i < H8300_REGS_NO; i++) { | ||
133 | if (get_user(tmp, datap)) { | ||
134 | ret = -EFAULT; | ||
135 | break; | ||
136 | } | ||
137 | h8300_put_reg(child, i, tmp); | ||
138 | datap++; | ||
139 | } | ||
140 | ret = 0; | ||
141 | break; | ||
142 | } | ||
143 | |||
144 | default: | ||
145 | ret = ptrace_request(child, request, addr, data); | ||
146 | break; | ||
147 | } | ||
148 | return ret; | ||
149 | } | ||
150 | |||
151 | asmlinkage void do_syscall_trace(void) | ||
152 | { | ||
153 | if (!test_thread_flag(TIF_SYSCALL_TRACE)) | ||
154 | return; | ||
155 | if (!(current->ptrace & PT_PTRACED)) | ||
156 | return; | ||
157 | ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) | ||
158 | ? 0x80 : 0)); | ||
159 | /* | ||
160 | * this isn't the same as continuing with a signal, but it will do | ||
161 | * for normal use. strace only continues with a signal if the | ||
162 | * stopping signal is not SIGTRAP. -brl | ||
163 | */ | ||
164 | if (current->exit_code) { | ||
165 | send_sig(current->exit_code, current, 1); | ||
166 | current->exit_code = 0; | ||
167 | } | ||
168 | } | ||
diff --git a/arch/h8300/kernel/setup.c b/arch/h8300/kernel/setup.c deleted file mode 100644 index d0b1607f2711..000000000000 --- a/arch/h8300/kernel/setup.c +++ /dev/null | |||
@@ -1,242 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/h8300/kernel/setup.c | ||
3 | * | ||
4 | * Copyleft ()) 2000 James D. Schettine {james@telos-systems.com} | ||
5 | * Copyright (C) 1999,2000 Greg Ungerer (gerg@snapgear.com) | ||
6 | * Copyright (C) 1998,1999 D. Jeff Dionne <jeff@lineo.ca> | ||
7 | * Copyright (C) 1998 Kenneth Albanowski <kjahds@kjahds.com> | ||
8 | * Copyright (C) 1995 Hamish Macdonald | ||
9 | * Copyright (C) 2000 Lineo Inc. (www.lineo.com) | ||
10 | * Copyright (C) 2001 Lineo, Inc. <www.lineo.com> | ||
11 | * | ||
12 | * H8/300 porting Yoshinori Sato <ysato@users.sourceforge.jp> | ||
13 | */ | ||
14 | |||
15 | /* | ||
16 | * This file handles the architecture-dependent parts of system setup | ||
17 | */ | ||
18 | |||
19 | #include <linux/kernel.h> | ||
20 | #include <linux/sched.h> | ||
21 | #include <linux/delay.h> | ||
22 | #include <linux/interrupt.h> | ||
23 | #include <linux/mm.h> | ||
24 | #include <linux/fs.h> | ||
25 | #include <linux/fb.h> | ||
26 | #include <linux/console.h> | ||
27 | #include <linux/genhd.h> | ||
28 | #include <linux/errno.h> | ||
29 | #include <linux/string.h> | ||
30 | #include <linux/major.h> | ||
31 | #include <linux/bootmem.h> | ||
32 | #include <linux/seq_file.h> | ||
33 | #include <linux/init.h> | ||
34 | |||
35 | #include <asm/setup.h> | ||
36 | #include <asm/irq.h> | ||
37 | #include <asm/pgtable.h> | ||
38 | #include <asm/sections.h> | ||
39 | |||
40 | #if defined(__H8300H__) | ||
41 | #define CPU "H8/300H" | ||
42 | #include <asm/regs306x.h> | ||
43 | #endif | ||
44 | |||
45 | #if defined(__H8300S__) | ||
46 | #define CPU "H8S" | ||
47 | #include <asm/regs267x.h> | ||
48 | #endif | ||
49 | |||
50 | #define STUBSIZE 0xc000 | ||
51 | |||
52 | unsigned long rom_length; | ||
53 | unsigned long memory_start; | ||
54 | unsigned long memory_end; | ||
55 | |||
56 | char __initdata command_line[COMMAND_LINE_SIZE]; | ||
57 | |||
58 | extern int _ramstart, _ramend; | ||
59 | extern char _target_name[]; | ||
60 | extern void h8300_gpio_init(void); | ||
61 | |||
62 | #if (defined(CONFIG_H8300H_SIM) || defined(CONFIG_H8S_SIM)) \ | ||
63 | && defined(CONFIG_GDB_MAGICPRINT) | ||
64 | /* printk with gdb service */ | ||
65 | static void gdb_console_output(struct console *c, const char *msg, unsigned len) | ||
66 | { | ||
67 | for (; len > 0; len--) { | ||
68 | asm("mov.w %0,r2\n\t" | ||
69 | "jsr @0xc4"::"r"(*msg++):"er2"); | ||
70 | } | ||
71 | } | ||
72 | |||
73 | /* | ||
74 | * Setup initial baud/bits/parity. We do two things here: | ||
75 | * - construct a cflag setting for the first rs_open() | ||
76 | * - initialize the serial port | ||
77 | * Return non-zero if we didn't find a serial port. | ||
78 | */ | ||
79 | static int __init gdb_console_setup(struct console *co, char *options) | ||
80 | { | ||
81 | return 0; | ||
82 | } | ||
83 | |||
84 | static const struct console gdb_console = { | ||
85 | .name = "gdb_con", | ||
86 | .write = gdb_console_output, | ||
87 | .device = NULL, | ||
88 | .setup = gdb_console_setup, | ||
89 | .flags = CON_PRINTBUFFER, | ||
90 | .index = -1, | ||
91 | }; | ||
92 | #endif | ||
93 | |||
94 | void __init setup_arch(char **cmdline_p) | ||
95 | { | ||
96 | int bootmap_size; | ||
97 | |||
98 | memory_start = (unsigned long) &_ramstart; | ||
99 | |||
100 | /* allow for ROMFS on the end of the kernel */ | ||
101 | if (memcmp((void *)memory_start, "-rom1fs-", 8) == 0) { | ||
102 | #if defined(CONFIG_BLK_DEV_INITRD) | ||
103 | initrd_start = memory_start; | ||
104 | initrd_end = memory_start += be32_to_cpu(((unsigned long *) (memory_start))[2]); | ||
105 | #else | ||
106 | memory_start += be32_to_cpu(((unsigned long *) memory_start)[2]); | ||
107 | #endif | ||
108 | } | ||
109 | memory_start = PAGE_ALIGN(memory_start); | ||
110 | #if !defined(CONFIG_BLKDEV_RESERVE) | ||
111 | memory_end = (unsigned long) &_ramend; /* by now the stack is part of the init task */ | ||
112 | #if defined(CONFIG_GDB_DEBUG) | ||
113 | memory_end -= STUBSIZE; | ||
114 | #endif | ||
115 | #else | ||
116 | if ((memory_end < CONFIG_BLKDEV_RESERVE_ADDRESS) && | ||
117 | (memory_end > CONFIG_BLKDEV_RESERVE_ADDRESS)) | ||
118 | /* overlap userarea */ | ||
119 | memory_end = CONFIG_BLKDEV_RESERVE_ADDRESS; | ||
120 | #endif | ||
121 | |||
122 | init_mm.start_code = (unsigned long) _stext; | ||
123 | init_mm.end_code = (unsigned long) _etext; | ||
124 | init_mm.end_data = (unsigned long) _edata; | ||
125 | init_mm.brk = (unsigned long) 0; | ||
126 | |||
127 | #if (defined(CONFIG_H8300H_SIM) || defined(CONFIG_H8S_SIM)) && defined(CONFIG_GDB_MAGICPRINT) | ||
128 | register_console((struct console *)&gdb_console); | ||
129 | #endif | ||
130 | |||
131 | printk(KERN_INFO "\r\n\nuClinux " CPU "\n"); | ||
132 | printk(KERN_INFO "Target Hardware: %s\n",_target_name); | ||
133 | printk(KERN_INFO "Flat model support (C) 1998,1999 Kenneth Albanowski, D. Jeff Dionne\n"); | ||
134 | printk(KERN_INFO "H8/300 series support by Yoshinori Sato <ysato@users.sourceforge.jp>\n"); | ||
135 | |||
136 | #ifdef DEBUG | ||
137 | printk(KERN_DEBUG "KERNEL -> TEXT=0x%p-0x%p DATA=0x%p-0x%p " | ||
138 | "BSS=0x%p-0x%p\n", _stext, _etext, _sdata, _edata, __bss_start, | ||
139 | __bss_stop); | ||
140 | printk(KERN_DEBUG "KERNEL -> ROMFS=0x%p-0x%06lx MEM=0x%06lx-0x%06lx " | ||
141 | "STACK=0x%06lx-0x%p\n", __bss_stop, memory_start, memory_start, | ||
142 | memory_end, memory_end, &_ramend); | ||
143 | #endif | ||
144 | |||
145 | #ifdef CONFIG_DEFAULT_CMDLINE | ||
146 | /* set from default command line */ | ||
147 | if (*command_line == '\0') | ||
148 | strcpy(command_line,CONFIG_KERNEL_COMMAND); | ||
149 | #endif | ||
150 | /* Keep a copy of command line */ | ||
151 | *cmdline_p = &command_line[0]; | ||
152 | memcpy(boot_command_line, command_line, COMMAND_LINE_SIZE); | ||
153 | boot_command_line[COMMAND_LINE_SIZE-1] = 0; | ||
154 | |||
155 | #ifdef DEBUG | ||
156 | if (strlen(*cmdline_p)) | ||
157 | printk(KERN_DEBUG "Command line: '%s'\n", *cmdline_p); | ||
158 | #endif | ||
159 | |||
160 | /* | ||
161 | * give all the memory to the bootmap allocator, tell it to put the | ||
162 | * boot mem_map at the start of memory | ||
163 | */ | ||
164 | bootmap_size = init_bootmem_node( | ||
165 | NODE_DATA(0), | ||
166 | memory_start >> PAGE_SHIFT, /* map goes here */ | ||
167 | PAGE_OFFSET >> PAGE_SHIFT, /* 0 on coldfire */ | ||
168 | memory_end >> PAGE_SHIFT); | ||
169 | /* | ||
170 | * free the usable memory, we have to make sure we do not free | ||
171 | * the bootmem bitmap so we then reserve it after freeing it :-) | ||
172 | */ | ||
173 | free_bootmem(memory_start, memory_end - memory_start); | ||
174 | reserve_bootmem(memory_start, bootmap_size, BOOTMEM_DEFAULT); | ||
175 | /* | ||
176 | * get kmalloc into gear | ||
177 | */ | ||
178 | paging_init(); | ||
179 | h8300_gpio_init(); | ||
180 | #if defined(CONFIG_H8300_AKI3068NET) && defined(CONFIG_IDE) | ||
181 | { | ||
182 | #define AREABIT(addr) (1 << (((addr) >> 21) & 7)) | ||
183 | /* setup BSC */ | ||
184 | volatile unsigned char *abwcr = (volatile unsigned char *)ABWCR; | ||
185 | volatile unsigned char *cscr = (volatile unsigned char *)CSCR; | ||
186 | *abwcr &= ~(AREABIT(CONFIG_H8300_IDE_BASE) | AREABIT(CONFIG_H8300_IDE_ALT)); | ||
187 | *cscr |= (AREABIT(CONFIG_H8300_IDE_BASE) | AREABIT(CONFIG_H8300_IDE_ALT)) | 0x0f; | ||
188 | } | ||
189 | #endif | ||
190 | #ifdef DEBUG | ||
191 | printk(KERN_DEBUG "Done setup_arch\n"); | ||
192 | #endif | ||
193 | } | ||
194 | |||
195 | /* | ||
196 | * Get CPU information for use by the procfs. | ||
197 | */ | ||
198 | |||
199 | static int show_cpuinfo(struct seq_file *m, void *v) | ||
200 | { | ||
201 | char *cpu; | ||
202 | int mode; | ||
203 | u_long clockfreq; | ||
204 | |||
205 | cpu = CPU; | ||
206 | mode = *(volatile unsigned char *)MDCR & 0x07; | ||
207 | |||
208 | clockfreq = CONFIG_CPU_CLOCK; | ||
209 | |||
210 | seq_printf(m, "CPU:\t\t%s (mode:%d)\n" | ||
211 | "Clock:\t\t%lu.%1luMHz\n" | ||
212 | "BogoMips:\t%lu.%02lu\n" | ||
213 | "Calibration:\t%lu loops\n", | ||
214 | cpu,mode, | ||
215 | clockfreq/1000,clockfreq%1000, | ||
216 | (loops_per_jiffy*HZ)/500000,((loops_per_jiffy*HZ)/5000)%100, | ||
217 | (loops_per_jiffy*HZ)); | ||
218 | |||
219 | return 0; | ||
220 | } | ||
221 | |||
222 | static void *c_start(struct seq_file *m, loff_t *pos) | ||
223 | { | ||
224 | return *pos < NR_CPUS ? ((void *) 0x12345678) : NULL; | ||
225 | } | ||
226 | |||
227 | static void *c_next(struct seq_file *m, void *v, loff_t *pos) | ||
228 | { | ||
229 | ++*pos; | ||
230 | return c_start(m, pos); | ||
231 | } | ||
232 | |||
233 | static void c_stop(struct seq_file *m, void *v) | ||
234 | { | ||
235 | } | ||
236 | |||
237 | const struct seq_operations cpuinfo_op = { | ||
238 | .start = c_start, | ||
239 | .next = c_next, | ||
240 | .stop = c_stop, | ||
241 | .show = show_cpuinfo, | ||
242 | }; | ||
diff --git a/arch/h8300/kernel/signal.c b/arch/h8300/kernel/signal.c deleted file mode 100644 index a65ff3b76326..000000000000 --- a/arch/h8300/kernel/signal.c +++ /dev/null | |||
@@ -1,444 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/h8300/kernel/signal.c | ||
3 | * | ||
4 | * Copyright (C) 1991, 1992 Linus Torvalds | ||
5 | * | ||
6 | * This file is subject to the terms and conditions of the GNU General Public | ||
7 | * License. See the file COPYING in the main directory of this archive | ||
8 | * for more details. | ||
9 | */ | ||
10 | |||
11 | /* | ||
12 | * uClinux H8/300 support by Yoshinori Sato <ysato@users.sourceforge.jp> | ||
13 | * and David McCullough <davidm@snapgear.com> | ||
14 | * | ||
15 | * Based on | ||
16 | * Linux/m68k by Hamish Macdonald | ||
17 | */ | ||
18 | |||
19 | /* | ||
20 | * ++roman (07/09/96): implemented signal stacks (specially for tosemu on | ||
21 | * Atari :-) Current limitation: Only one sigstack can be active at one time. | ||
22 | * If a second signal with SA_ONSTACK set arrives while working on a sigstack, | ||
23 | * SA_ONSTACK is ignored. This behaviour avoids lots of trouble with nested | ||
24 | * signal handlers! | ||
25 | */ | ||
26 | |||
27 | #include <linux/sched.h> | ||
28 | #include <linux/mm.h> | ||
29 | #include <linux/kernel.h> | ||
30 | #include <linux/signal.h> | ||
31 | #include <linux/syscalls.h> | ||
32 | #include <linux/errno.h> | ||
33 | #include <linux/wait.h> | ||
34 | #include <linux/ptrace.h> | ||
35 | #include <linux/unistd.h> | ||
36 | #include <linux/stddef.h> | ||
37 | #include <linux/highuid.h> | ||
38 | #include <linux/personality.h> | ||
39 | #include <linux/tty.h> | ||
40 | #include <linux/binfmts.h> | ||
41 | #include <linux/tracehook.h> | ||
42 | |||
43 | #include <asm/setup.h> | ||
44 | #include <asm/uaccess.h> | ||
45 | #include <asm/pgtable.h> | ||
46 | #include <asm/traps.h> | ||
47 | #include <asm/ucontext.h> | ||
48 | |||
49 | /* | ||
50 | * Do a signal return; undo the signal stack. | ||
51 | * | ||
52 | * Keep the return code on the stack quadword aligned! | ||
53 | * That makes the cache flush below easier. | ||
54 | */ | ||
55 | |||
56 | struct sigframe | ||
57 | { | ||
58 | long dummy_er0; | ||
59 | long dummy_vector; | ||
60 | #if defined(CONFIG_CPU_H8S) | ||
61 | short dummy_exr; | ||
62 | #endif | ||
63 | long dummy_pc; | ||
64 | char *pretcode; | ||
65 | unsigned char retcode[8]; | ||
66 | unsigned long extramask[_NSIG_WORDS-1]; | ||
67 | struct sigcontext sc; | ||
68 | int sig; | ||
69 | } __attribute__((aligned(2),packed)); | ||
70 | |||
71 | struct rt_sigframe | ||
72 | { | ||
73 | long dummy_er0; | ||
74 | long dummy_vector; | ||
75 | #if defined(CONFIG_CPU_H8S) | ||
76 | short dummy_exr; | ||
77 | #endif | ||
78 | long dummy_pc; | ||
79 | char *pretcode; | ||
80 | struct siginfo *pinfo; | ||
81 | void *puc; | ||
82 | unsigned char retcode[8]; | ||
83 | struct siginfo info; | ||
84 | struct ucontext uc; | ||
85 | int sig; | ||
86 | } __attribute__((aligned(2),packed)); | ||
87 | |||
88 | static inline int | ||
89 | restore_sigcontext(struct sigcontext *usc, int *pd0) | ||
90 | { | ||
91 | struct pt_regs *regs = current_pt_regs(); | ||
92 | int err = 0; | ||
93 | unsigned int ccr; | ||
94 | unsigned int usp; | ||
95 | unsigned int er0; | ||
96 | |||
97 | /* Always make any pending restarted system calls return -EINTR */ | ||
98 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | ||
99 | |||
100 | #define COPY(r) err |= __get_user(regs->r, &usc->sc_##r) /* restore passed registers */ | ||
101 | COPY(er1); | ||
102 | COPY(er2); | ||
103 | COPY(er3); | ||
104 | COPY(er5); | ||
105 | COPY(pc); | ||
106 | ccr = regs->ccr & 0x10; | ||
107 | COPY(ccr); | ||
108 | #undef COPY | ||
109 | regs->ccr &= 0xef; | ||
110 | regs->ccr |= ccr; | ||
111 | regs->orig_er0 = -1; /* disable syscall checks */ | ||
112 | err |= __get_user(usp, &usc->sc_usp); | ||
113 | wrusp(usp); | ||
114 | |||
115 | err |= __get_user(er0, &usc->sc_er0); | ||
116 | *pd0 = er0; | ||
117 | return err; | ||
118 | } | ||
119 | |||
120 | asmlinkage int sys_sigreturn(void) | ||
121 | { | ||
122 | unsigned long usp = rdusp(); | ||
123 | struct sigframe *frame = (struct sigframe *)(usp - 4); | ||
124 | sigset_t set; | ||
125 | int er0; | ||
126 | |||
127 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) | ||
128 | goto badframe; | ||
129 | if (__get_user(set.sig[0], &frame->sc.sc_mask) || | ||
130 | (_NSIG_WORDS > 1 && | ||
131 | __copy_from_user(&set.sig[1], &frame->extramask, | ||
132 | sizeof(frame->extramask)))) | ||
133 | goto badframe; | ||
134 | |||
135 | set_current_blocked(&set); | ||
136 | |||
137 | if (restore_sigcontext(&frame->sc, &er0)) | ||
138 | goto badframe; | ||
139 | return er0; | ||
140 | |||
141 | badframe: | ||
142 | force_sig(SIGSEGV, current); | ||
143 | return 0; | ||
144 | } | ||
145 | |||
146 | asmlinkage int sys_rt_sigreturn(void) | ||
147 | { | ||
148 | unsigned long usp = rdusp(); | ||
149 | struct rt_sigframe *frame = (struct rt_sigframe *)(usp - 4); | ||
150 | sigset_t set; | ||
151 | int er0; | ||
152 | |||
153 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) | ||
154 | goto badframe; | ||
155 | if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set))) | ||
156 | goto badframe; | ||
157 | |||
158 | set_current_blocked(&set); | ||
159 | |||
160 | if (restore_sigcontext(&frame->uc.uc_mcontext, &er0)) | ||
161 | goto badframe; | ||
162 | |||
163 | if (restore_altstack(&frame->uc.uc_stack)) | ||
164 | goto badframe; | ||
165 | |||
166 | return er0; | ||
167 | |||
168 | badframe: | ||
169 | force_sig(SIGSEGV, current); | ||
170 | return 0; | ||
171 | } | ||
172 | |||
173 | static int setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, | ||
174 | unsigned long mask) | ||
175 | { | ||
176 | int err = 0; | ||
177 | |||
178 | err |= __put_user(regs->er0, &sc->sc_er0); | ||
179 | err |= __put_user(regs->er1, &sc->sc_er1); | ||
180 | err |= __put_user(regs->er2, &sc->sc_er2); | ||
181 | err |= __put_user(regs->er3, &sc->sc_er3); | ||
182 | err |= __put_user(regs->er4, &sc->sc_er4); | ||
183 | err |= __put_user(regs->er5, &sc->sc_er5); | ||
184 | err |= __put_user(regs->er6, &sc->sc_er6); | ||
185 | err |= __put_user(rdusp(), &sc->sc_usp); | ||
186 | err |= __put_user(regs->pc, &sc->sc_pc); | ||
187 | err |= __put_user(regs->ccr, &sc->sc_ccr); | ||
188 | err |= __put_user(mask, &sc->sc_mask); | ||
189 | |||
190 | return err; | ||
191 | } | ||
192 | |||
193 | static inline void * | ||
194 | get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size) | ||
195 | { | ||
196 | unsigned long usp; | ||
197 | |||
198 | /* Default to using normal stack. */ | ||
199 | usp = rdusp(); | ||
200 | |||
201 | /* This is the X/Open sanctioned signal stack switching. */ | ||
202 | if (ka->sa.sa_flags & SA_ONSTACK) { | ||
203 | if (!sas_ss_flags(usp)) | ||
204 | usp = current->sas_ss_sp + current->sas_ss_size; | ||
205 | } | ||
206 | return (void *)((usp - frame_size) & -8UL); | ||
207 | } | ||
208 | |||
209 | static int setup_frame (int sig, struct k_sigaction *ka, | ||
210 | sigset_t *set, struct pt_regs *regs) | ||
211 | { | ||
212 | struct sigframe *frame; | ||
213 | int err = 0; | ||
214 | int usig; | ||
215 | unsigned char *ret; | ||
216 | |||
217 | frame = get_sigframe(ka, regs, sizeof(*frame)); | ||
218 | |||
219 | if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) | ||
220 | goto give_sigsegv; | ||
221 | |||
222 | usig = current_thread_info()->exec_domain | ||
223 | && current_thread_info()->exec_domain->signal_invmap | ||
224 | && sig < 32 | ||
225 | ? current_thread_info()->exec_domain->signal_invmap[sig] | ||
226 | : sig; | ||
227 | |||
228 | err |= __put_user(usig, &frame->sig); | ||
229 | if (err) | ||
230 | goto give_sigsegv; | ||
231 | |||
232 | err |= setup_sigcontext(&frame->sc, regs, set->sig[0]); | ||
233 | if (err) | ||
234 | goto give_sigsegv; | ||
235 | |||
236 | if (_NSIG_WORDS > 1) { | ||
237 | err |= copy_to_user(frame->extramask, &set->sig[1], | ||
238 | sizeof(frame->extramask)); | ||
239 | if (err) | ||
240 | goto give_sigsegv; | ||
241 | } | ||
242 | |||
243 | ret = frame->retcode; | ||
244 | if (ka->sa.sa_flags & SA_RESTORER) | ||
245 | ret = (unsigned char *)(ka->sa.sa_restorer); | ||
246 | else { | ||
247 | /* sub.l er0,er0; mov.b #__NR_sigreturn,r0l; trapa #0 */ | ||
248 | err |= __put_user(0x1a80f800 + (__NR_sigreturn & 0xff), | ||
249 | (unsigned long *)(frame->retcode + 0)); | ||
250 | err |= __put_user(0x5700, (unsigned short *)(frame->retcode + 4)); | ||
251 | } | ||
252 | |||
253 | /* Set up to return from userspace. */ | ||
254 | err |= __put_user(ret, &frame->pretcode); | ||
255 | |||
256 | if (err) | ||
257 | goto give_sigsegv; | ||
258 | |||
259 | /* Set up registers for signal handler */ | ||
260 | wrusp ((unsigned long) frame); | ||
261 | regs->pc = (unsigned long) ka->sa.sa_handler; | ||
262 | regs->er0 = (current_thread_info()->exec_domain | ||
263 | && current_thread_info()->exec_domain->signal_invmap | ||
264 | && sig < 32 | ||
265 | ? current_thread_info()->exec_domain->signal_invmap[sig] | ||
266 | : sig); | ||
267 | regs->er1 = (unsigned long)&(frame->sc); | ||
268 | regs->er5 = current->mm->start_data; /* GOT base */ | ||
269 | |||
270 | return 0; | ||
271 | |||
272 | give_sigsegv: | ||
273 | force_sigsegv(sig, current); | ||
274 | return -EFAULT; | ||
275 | } | ||
276 | |||
277 | static int setup_rt_frame (int sig, struct k_sigaction *ka, siginfo_t *info, | ||
278 | sigset_t *set, struct pt_regs *regs) | ||
279 | { | ||
280 | struct rt_sigframe *frame; | ||
281 | int err = 0; | ||
282 | int usig; | ||
283 | unsigned char *ret; | ||
284 | |||
285 | frame = get_sigframe(ka, regs, sizeof(*frame)); | ||
286 | |||
287 | if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) | ||
288 | goto give_sigsegv; | ||
289 | |||
290 | usig = current_thread_info()->exec_domain | ||
291 | && current_thread_info()->exec_domain->signal_invmap | ||
292 | && sig < 32 | ||
293 | ? current_thread_info()->exec_domain->signal_invmap[sig] | ||
294 | : sig; | ||
295 | |||
296 | err |= __put_user(usig, &frame->sig); | ||
297 | if (err) | ||
298 | goto give_sigsegv; | ||
299 | |||
300 | err |= __put_user(&frame->info, &frame->pinfo); | ||
301 | err |= __put_user(&frame->uc, &frame->puc); | ||
302 | err |= copy_siginfo_to_user(&frame->info, info); | ||
303 | if (err) | ||
304 | goto give_sigsegv; | ||
305 | |||
306 | /* Create the ucontext. */ | ||
307 | err |= __put_user(0, &frame->uc.uc_flags); | ||
308 | err |= __put_user(0, &frame->uc.uc_link); | ||
309 | err |= __save_altstack(&frame->uc.uc_stack, rdusp()); | ||
310 | err |= setup_sigcontext(&frame->uc.uc_mcontext, regs, set->sig[0]); | ||
311 | err |= copy_to_user (&frame->uc.uc_sigmask, set, sizeof(*set)); | ||
312 | if (err) | ||
313 | goto give_sigsegv; | ||
314 | |||
315 | /* Set up to return from userspace. */ | ||
316 | ret = frame->retcode; | ||
317 | if (ka->sa.sa_flags & SA_RESTORER) | ||
318 | ret = (unsigned char *)(ka->sa.sa_restorer); | ||
319 | else { | ||
320 | /* sub.l er0,er0; mov.b #__NR_sigreturn,r0l; trapa #0 */ | ||
321 | err |= __put_user(0x1a80f800 + (__NR_sigreturn & 0xff), | ||
322 | (unsigned long *)(frame->retcode + 0)); | ||
323 | err |= __put_user(0x5700, (unsigned short *)(frame->retcode + 4)); | ||
324 | } | ||
325 | err |= __put_user(ret, &frame->pretcode); | ||
326 | |||
327 | if (err) | ||
328 | goto give_sigsegv; | ||
329 | |||
330 | /* Set up registers for signal handler */ | ||
331 | wrusp ((unsigned long) frame); | ||
332 | regs->pc = (unsigned long) ka->sa.sa_handler; | ||
333 | regs->er0 = (current_thread_info()->exec_domain | ||
334 | && current_thread_info()->exec_domain->signal_invmap | ||
335 | && sig < 32 | ||
336 | ? current_thread_info()->exec_domain->signal_invmap[sig] | ||
337 | : sig); | ||
338 | regs->er1 = (unsigned long)&(frame->info); | ||
339 | regs->er2 = (unsigned long)&frame->uc; | ||
340 | regs->er5 = current->mm->start_data; /* GOT base */ | ||
341 | |||
342 | return 0; | ||
343 | |||
344 | give_sigsegv: | ||
345 | force_sigsegv(sig, current); | ||
346 | return -EFAULT; | ||
347 | } | ||
348 | |||
349 | /* | ||
350 | * OK, we're invoking a handler | ||
351 | */ | ||
352 | static void | ||
353 | handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka, | ||
354 | struct pt_regs * regs) | ||
355 | { | ||
356 | sigset_t *oldset = sigmask_to_save(); | ||
357 | int ret; | ||
358 | /* are we from a system call? */ | ||
359 | if (regs->orig_er0 >= 0) { | ||
360 | switch (regs->er0) { | ||
361 | case -ERESTART_RESTARTBLOCK: | ||
362 | case -ERESTARTNOHAND: | ||
363 | regs->er0 = -EINTR; | ||
364 | break; | ||
365 | |||
366 | case -ERESTARTSYS: | ||
367 | if (!(ka->sa.sa_flags & SA_RESTART)) { | ||
368 | regs->er0 = -EINTR; | ||
369 | break; | ||
370 | } | ||
371 | /* fallthrough */ | ||
372 | case -ERESTARTNOINTR: | ||
373 | regs->er0 = regs->orig_er0; | ||
374 | regs->pc -= 2; | ||
375 | } | ||
376 | } | ||
377 | |||
378 | /* set up the stack frame */ | ||
379 | if (ka->sa.sa_flags & SA_SIGINFO) | ||
380 | ret = setup_rt_frame(sig, ka, info, oldset, regs); | ||
381 | else | ||
382 | ret = setup_frame(sig, ka, oldset, regs); | ||
383 | |||
384 | if (!ret) | ||
385 | signal_delivered(sig, info, ka, regs, 0); | ||
386 | } | ||
387 | |||
388 | /* | ||
389 | * Note that 'init' is a special process: it doesn't get signals it doesn't | ||
390 | * want to handle. Thus you cannot kill init even with a SIGKILL even by | ||
391 | * mistake. | ||
392 | */ | ||
393 | static void do_signal(struct pt_regs *regs) | ||
394 | { | ||
395 | siginfo_t info; | ||
396 | int signr; | ||
397 | struct k_sigaction ka; | ||
398 | |||
399 | /* | ||
400 | * We want the common case to go fast, which | ||
401 | * is why we may in certain cases get here from | ||
402 | * kernel mode. Just return without doing anything | ||
403 | * if so. | ||
404 | */ | ||
405 | if ((regs->ccr & 0x10)) | ||
406 | return; | ||
407 | |||
408 | current->thread.esp0 = (unsigned long) regs; | ||
409 | |||
410 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); | ||
411 | if (signr > 0) { | ||
412 | /* Whee! Actually deliver the signal. */ | ||
413 | handle_signal(signr, &info, &ka, regs); | ||
414 | return; | ||
415 | } | ||
416 | /* Did we come from a system call? */ | ||
417 | if (regs->orig_er0 >= 0) { | ||
418 | /* Restart the system call - no handlers present */ | ||
419 | if (regs->er0 == -ERESTARTNOHAND || | ||
420 | regs->er0 == -ERESTARTSYS || | ||
421 | regs->er0 == -ERESTARTNOINTR) { | ||
422 | regs->er0 = regs->orig_er0; | ||
423 | regs->pc -= 2; | ||
424 | } | ||
425 | if (regs->er0 == -ERESTART_RESTARTBLOCK){ | ||
426 | regs->er0 = __NR_restart_syscall; | ||
427 | regs->pc -= 2; | ||
428 | } | ||
429 | } | ||
430 | |||
431 | /* If there's no signal to deliver, we just restore the saved mask. */ | ||
432 | restore_saved_sigmask(); | ||
433 | } | ||
434 | |||
435 | asmlinkage void do_notify_resume(struct pt_regs *regs, u32 thread_info_flags) | ||
436 | { | ||
437 | if (thread_info_flags & _TIF_SIGPENDING) | ||
438 | do_signal(regs); | ||
439 | |||
440 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { | ||
441 | clear_thread_flag(TIF_NOTIFY_RESUME); | ||
442 | tracehook_notify_resume(regs); | ||
443 | } | ||
444 | } | ||
diff --git a/arch/h8300/kernel/sys_h8300.c b/arch/h8300/kernel/sys_h8300.c deleted file mode 100644 index bf350cb7f597..000000000000 --- a/arch/h8300/kernel/sys_h8300.c +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/h8300/kernel/sys_h8300.c | ||
3 | * | ||
4 | * This file contains various random system calls that | ||
5 | * have a non-standard calling sequence on the H8/300 | ||
6 | * platform. | ||
7 | */ | ||
8 | |||
9 | #include <linux/errno.h> | ||
10 | #include <linux/sched.h> | ||
11 | #include <linux/mm.h> | ||
12 | #include <linux/smp.h> | ||
13 | #include <linux/sem.h> | ||
14 | #include <linux/msg.h> | ||
15 | #include <linux/shm.h> | ||
16 | #include <linux/stat.h> | ||
17 | #include <linux/syscalls.h> | ||
18 | #include <linux/mman.h> | ||
19 | #include <linux/file.h> | ||
20 | #include <linux/fs.h> | ||
21 | #include <linux/ipc.h> | ||
22 | |||
23 | #include <asm/setup.h> | ||
24 | #include <asm/uaccess.h> | ||
25 | #include <asm/cachectl.h> | ||
26 | #include <asm/traps.h> | ||
27 | #include <asm/unistd.h> | ||
28 | |||
29 | /* sys_cacheflush -- no support. */ | ||
30 | asmlinkage int | ||
31 | sys_cacheflush (unsigned long addr, int scope, int cache, unsigned long len) | ||
32 | { | ||
33 | return -EINVAL; | ||
34 | } | ||
35 | |||
36 | asmlinkage int sys_getpagesize(void) | ||
37 | { | ||
38 | return PAGE_SIZE; | ||
39 | } | ||
40 | |||
41 | #if defined(CONFIG_SYSCALL_PRINT) | ||
42 | asmlinkage void syscall_print(void *dummy,...) | ||
43 | { | ||
44 | struct pt_regs *regs = (struct pt_regs *) ((unsigned char *)&dummy-4); | ||
45 | printk("call %06lx:%ld 1:%08lx,2:%08lx,3:%08lx,ret:%08lx\n", | ||
46 | ((regs->pc)&0xffffff)-2,regs->orig_er0,regs->er1,regs->er2,regs->er3,regs->er0); | ||
47 | } | ||
48 | #endif | ||
diff --git a/arch/h8300/kernel/syscalls.S b/arch/h8300/kernel/syscalls.S deleted file mode 100644 index c55e0ed270d5..000000000000 --- a/arch/h8300/kernel/syscalls.S +++ /dev/null | |||
@@ -1,338 +0,0 @@ | |||
1 | /* Systemcall Entry Table */ | ||
2 | #include <linux/sys.h> | ||
3 | #include <asm/linkage.h> | ||
4 | #include <asm/unistd.h> | ||
5 | |||
6 | #define CALL(x) .long _ ## x | ||
7 | |||
8 | .globl _sys_call_table | ||
9 | |||
10 | #if defined(CONFIG_CPU_H8300H) | ||
11 | .h8300h | ||
12 | #endif | ||
13 | #if defined(CONFIG_CPU_H8S) | ||
14 | .h8300s | ||
15 | #endif | ||
16 | .section .text | ||
17 | .align 2 | ||
18 | _sys_call_table: | ||
19 | CALL(sys_ni_syscall) /* 0 - old "setup()" system call*/ | ||
20 | CALL(sys_exit) | ||
21 | CALL(sys_fork) | ||
22 | CALL(sys_read) | ||
23 | CALL(sys_write) | ||
24 | CALL(sys_open) /* 5 */ | ||
25 | CALL(sys_close) | ||
26 | CALL(sys_waitpid) | ||
27 | CALL(sys_creat) | ||
28 | CALL(sys_link) | ||
29 | CALL(sys_unlink) /* 10 */ | ||
30 | CALL(sys_execve) | ||
31 | CALL(sys_chdir) | ||
32 | CALL(sys_time) | ||
33 | CALL(sys_mknod) | ||
34 | CALL(sys_chmod) /* 15 */ | ||
35 | CALL(sys_chown16) | ||
36 | CALL(sys_ni_syscall) /* old break syscall holder */ | ||
37 | CALL(sys_stat) | ||
38 | CALL(sys_lseek) | ||
39 | CALL(sys_getpid) /* 20 */ | ||
40 | CALL(sys_mount) | ||
41 | CALL(sys_oldumount) | ||
42 | CALL(sys_setuid16) | ||
43 | CALL(sys_getuid16) | ||
44 | CALL(sys_stime) /* 25 */ | ||
45 | CALL(sys_ptrace) | ||
46 | CALL(sys_alarm) | ||
47 | CALL(sys_fstat) | ||
48 | CALL(sys_pause) | ||
49 | CALL(sys_utime) /* 30 */ | ||
50 | CALL(sys_ni_syscall) /* old stty syscall holder */ | ||
51 | CALL(sys_ni_syscall) /* old gtty syscall holder */ | ||
52 | CALL(sys_access) | ||
53 | CALL(sys_nice) | ||
54 | CALL(sys_ni_syscall) /* 35 old ftime syscall holder */ | ||
55 | CALL(sys_sync) | ||
56 | CALL(sys_kill) | ||
57 | CALL(sys_rename) | ||
58 | CALL(sys_mkdir) | ||
59 | CALL(sys_rmdir) /* 40 */ | ||
60 | CALL(sys_dup) | ||
61 | CALL(sys_pipe) | ||
62 | CALL(sys_times) | ||
63 | CALL(sys_ni_syscall) /* old prof syscall holder */ | ||
64 | CALL(sys_brk) /* 45 */ | ||
65 | CALL(sys_setgid16) | ||
66 | CALL(sys_getgid16) | ||
67 | CALL(sys_signal) | ||
68 | CALL(sys_geteuid16) | ||
69 | CALL(sys_getegid16) /* 50 */ | ||
70 | CALL(sys_acct) | ||
71 | CALL(sys_umount) /* recycled never used phys() */ | ||
72 | CALL(sys_ni_syscall) /* old lock syscall holder */ | ||
73 | CALL(sys_ioctl) | ||
74 | CALL(sys_fcntl) /* 55 */ | ||
75 | CALL(sys_ni_syscall) /* old mpx syscall holder */ | ||
76 | CALL(sys_setpgid) | ||
77 | CALL(sys_ni_syscall) /* old ulimit syscall holder */ | ||
78 | CALL(sys_ni_syscall) | ||
79 | CALL(sys_umask) /* 60 */ | ||
80 | CALL(sys_chroot) | ||
81 | CALL(sys_ustat) | ||
82 | CALL(sys_dup2) | ||
83 | CALL(sys_getppid) | ||
84 | CALL(sys_getpgrp) /* 65 */ | ||
85 | CALL(sys_setsid) | ||
86 | CALL(sys_sigaction) | ||
87 | CALL(sys_sgetmask) | ||
88 | CALL(sys_ssetmask) | ||
89 | CALL(sys_setreuid16) /* 70 */ | ||
90 | CALL(sys_setregid16) | ||
91 | CALL(sys_sigsuspend) | ||
92 | CALL(sys_sigpending) | ||
93 | CALL(sys_sethostname) | ||
94 | CALL(sys_setrlimit) /* 75 */ | ||
95 | CALL(sys_old_getrlimit) | ||
96 | CALL(sys_getrusage) | ||
97 | CALL(sys_gettimeofday) | ||
98 | CALL(sys_settimeofday) | ||
99 | CALL(sys_getgroups16) /* 80 */ | ||
100 | CALL(sys_setgroups16) | ||
101 | CALL(sys_old_select) | ||
102 | CALL(sys_symlink) | ||
103 | CALL(sys_lstat) | ||
104 | CALL(sys_readlink) /* 85 */ | ||
105 | CALL(sys_uselib) | ||
106 | CALL(sys_swapon) | ||
107 | CALL(sys_reboot) | ||
108 | CALL(sys_old_readdir) | ||
109 | CALL(sys_old_mmap) /* 90 */ | ||
110 | CALL(sys_munmap) | ||
111 | CALL(sys_truncate) | ||
112 | CALL(sys_ftruncate) | ||
113 | CALL(sys_fchmod) | ||
114 | CALL(sys_fchown16) /* 95 */ | ||
115 | CALL(sys_getpriority) | ||
116 | CALL(sys_setpriority) | ||
117 | CALL(sys_ni_syscall) /* old profil syscall holder */ | ||
118 | CALL(sys_statfs) | ||
119 | CALL(sys_fstatfs) /* 100 */ | ||
120 | CALL(sys_ni_syscall) /* ioperm for i386 */ | ||
121 | CALL(sys_socketcall) | ||
122 | CALL(sys_syslog) | ||
123 | CALL(sys_setitimer) | ||
124 | CALL(sys_getitimer) /* 105 */ | ||
125 | CALL(sys_newstat) | ||
126 | CALL(sys_newlstat) | ||
127 | CALL(sys_newfstat) | ||
128 | CALL(sys_ni_syscall) | ||
129 | CALL(sys_ni_syscall) /* iopl for i386 */ /* 110 */ | ||
130 | CALL(sys_vhangup) | ||
131 | CALL(sys_ni_syscall) /* obsolete idle() syscall */ | ||
132 | CALL(sys_ni_syscall) /* vm86old for i386 */ | ||
133 | CALL(sys_wait4) | ||
134 | CALL(sys_swapoff) /* 115 */ | ||
135 | CALL(sys_sysinfo) | ||
136 | CALL(sys_ipc) | ||
137 | CALL(sys_fsync) | ||
138 | CALL(sys_sigreturn) | ||
139 | CALL(sys_clone) /* 120 */ | ||
140 | CALL(sys_setdomainname) | ||
141 | CALL(sys_newuname) | ||
142 | CALL(sys_cacheflush) /* modify_ldt for i386 */ | ||
143 | CALL(sys_adjtimex) | ||
144 | CALL(sys_ni_syscall) /* 125 sys_mprotect */ | ||
145 | CALL(sys_sigprocmask) | ||
146 | CALL(sys_ni_syscall) /* sys_create_module */ | ||
147 | CALL(sys_init_module) | ||
148 | CALL(sys_delete_module) | ||
149 | CALL(sys_ni_syscall) /* 130 sys_get_kernel_syms */ | ||
150 | CALL(sys_quotactl) | ||
151 | CALL(sys_getpgid) | ||
152 | CALL(sys_fchdir) | ||
153 | CALL(sys_bdflush) | ||
154 | CALL(sys_sysfs) /* 135 */ | ||
155 | CALL(sys_personality) | ||
156 | CALL(sys_ni_syscall) /* for afs_syscall */ | ||
157 | CALL(sys_setfsuid16) | ||
158 | CALL(sys_setfsgid16) | ||
159 | CALL(sys_llseek) /* 140 */ | ||
160 | CALL(sys_getdents) | ||
161 | CALL(sys_select) | ||
162 | CALL(sys_flock) | ||
163 | CALL(sys_ni_syscall) /* sys_msync */ | ||
164 | CALL(sys_readv) /* 145 */ | ||
165 | CALL(sys_writev) | ||
166 | CALL(sys_getsid) | ||
167 | CALL(sys_fdatasync) | ||
168 | CALL(sys_sysctl) | ||
169 | CALL(sys_ni_syscall) /* 150 sys_mlock */ | ||
170 | CALL(sys_ni_syscall) /* sys_munlock */ | ||
171 | CALL(sys_ni_syscall) /* sys_mlockall */ | ||
172 | CALL(sys_ni_syscall) /* sys_munlockall */ | ||
173 | CALL(sys_sched_setparam) | ||
174 | CALL(sys_sched_getparam) /* 155 */ | ||
175 | CALL(sys_sched_setscheduler) | ||
176 | CALL(sys_sched_getscheduler) | ||
177 | CALL(sys_sched_yield) | ||
178 | CALL(sys_sched_get_priority_max) | ||
179 | CALL(sys_sched_get_priority_min) /* 160 */ | ||
180 | CALL(sys_sched_rr_get_interval) | ||
181 | CALL(sys_nanosleep) | ||
182 | CALL(sys_ni_syscall) /* sys_mremap */ | ||
183 | CALL(sys_setresuid16) | ||
184 | CALL(sys_getresuid16) /* 165 */ | ||
185 | CALL(sys_ni_syscall) /* for vm86 */ | ||
186 | CALL(sys_ni_syscall) /* sys_query_module */ | ||
187 | CALL(sys_poll) | ||
188 | CALL(sys_ni_syscall) /* old nfsservctl */ | ||
189 | CALL(sys_setresgid16) /* 170 */ | ||
190 | CALL(sys_getresgid16) | ||
191 | CALL(sys_prctl) | ||
192 | CALL(sys_rt_sigreturn) | ||
193 | CALL(sys_rt_sigaction) | ||
194 | CALL(sys_rt_sigprocmask) /* 175 */ | ||
195 | CALL(sys_rt_sigpending) | ||
196 | CALL(sys_rt_sigtimedwait) | ||
197 | CALL(sys_rt_sigqueueinfo) | ||
198 | CALL(sys_rt_sigsuspend) | ||
199 | CALL(sys_pread64) /* 180 */ | ||
200 | CALL(sys_pwrite64) | ||
201 | CALL(sys_lchown16); | ||
202 | CALL(sys_getcwd) | ||
203 | CALL(sys_capget) | ||
204 | CALL(sys_capset) /* 185 */ | ||
205 | CALL(sys_sigaltstack) | ||
206 | CALL(sys_sendfile) | ||
207 | CALL(sys_ni_syscall) /* streams1 */ | ||
208 | CALL(sys_ni_syscall) /* streams2 */ | ||
209 | CALL(sys_vfork) /* 190 */ | ||
210 | CALL(sys_getrlimit) | ||
211 | CALL(sys_mmap_pgoff) | ||
212 | CALL(sys_truncate64) | ||
213 | CALL(sys_ftruncate64) | ||
214 | CALL(sys_stat64) /* 195 */ | ||
215 | CALL(sys_lstat64) | ||
216 | CALL(sys_fstat64) | ||
217 | CALL(sys_chown) | ||
218 | CALL(sys_getuid) | ||
219 | CALL(sys_getgid) /* 200 */ | ||
220 | CALL(sys_geteuid) | ||
221 | CALL(sys_getegid) | ||
222 | CALL(sys_setreuid) | ||
223 | CALL(sys_setregid) | ||
224 | CALL(sys_getgroups) /* 205 */ | ||
225 | CALL(sys_setgroups) | ||
226 | CALL(sys_fchown) | ||
227 | CALL(sys_setresuid) | ||
228 | CALL(sys_getresuid) | ||
229 | CALL(sys_setresgid) /* 210 */ | ||
230 | CALL(sys_getresgid) | ||
231 | CALL(sys_lchown) | ||
232 | CALL(sys_setuid) | ||
233 | CALL(sys_setgid) | ||
234 | CALL(sys_setfsuid) /* 215 */ | ||
235 | CALL(sys_setfsgid) | ||
236 | CALL(sys_pivot_root) | ||
237 | CALL(sys_ni_syscall) | ||
238 | CALL(sys_ni_syscall) | ||
239 | CALL(sys_getdents64) /* 220 */ | ||
240 | CALL(sys_fcntl64) | ||
241 | CALL(sys_ni_syscall) /* reserved TUX */ | ||
242 | CALL(sys_ni_syscall) /* reserved Security */ | ||
243 | CALL(sys_gettid) | ||
244 | CALL(sys_readahead) /* 225 */ | ||
245 | CALL(sys_setxattr) | ||
246 | CALL(sys_lsetxattr) | ||
247 | CALL(sys_fsetxattr) | ||
248 | CALL(sys_getxattr) | ||
249 | CALL(sys_lgetxattr) /* 230 */ | ||
250 | CALL(sys_fgetxattr) | ||
251 | CALL(sys_listxattr) | ||
252 | CALL(sys_llistxattr) | ||
253 | CALL(sys_flistxattr) | ||
254 | CALL(sys_removexattr) /* 235 */ | ||
255 | CALL(sys_lremovexattr) | ||
256 | CALL(sys_fremovexattr) | ||
257 | CALL(sys_tkill) | ||
258 | CALL(sys_sendfile64) | ||
259 | CALL(sys_futex) /* 240 */ | ||
260 | CALL(sys_sched_setaffinity) | ||
261 | CALL(sys_sched_getaffinity) | ||
262 | CALL(sys_ni_syscall) | ||
263 | CALL(sys_ni_syscall) | ||
264 | CALL(sys_io_setup) /* 245 */ | ||
265 | CALL(sys_io_destroy) | ||
266 | CALL(sys_io_getevents) | ||
267 | CALL(sys_io_submit) | ||
268 | CALL(sys_io_cancel) | ||
269 | CALL(sys_fadvise64) /* 250 */ | ||
270 | CALL(sys_ni_syscall) | ||
271 | CALL(sys_exit_group) | ||
272 | CALL(sys_lookup_dcookie) | ||
273 | CALL(sys_epoll_create) | ||
274 | CALL(sys_epoll_ctl) /* 255 */ | ||
275 | CALL(sys_epoll_wait) | ||
276 | CALL(sys_ni_syscall) /* sys_remap_file_pages */ | ||
277 | CALL(sys_set_tid_address) | ||
278 | CALL(sys_timer_create) | ||
279 | CALL(sys_timer_settime) /* 260 */ | ||
280 | CALL(sys_timer_gettime) | ||
281 | CALL(sys_timer_getoverrun) | ||
282 | CALL(sys_timer_delete) | ||
283 | CALL(sys_clock_settime) | ||
284 | CALL(sys_clock_gettime) /* 265 */ | ||
285 | CALL(sys_clock_getres) | ||
286 | CALL(sys_clock_nanosleep) | ||
287 | CALL(sys_statfs64) | ||
288 | CALL(sys_fstatfs64) | ||
289 | CALL(sys_tgkill) /* 270 */ | ||
290 | CALL(sys_utimes) | ||
291 | CALL(sys_fadvise64_64) | ||
292 | CALL(sys_ni_syscall) /* sys_vserver */ | ||
293 | CALL(sys_ni_syscall) | ||
294 | CALL(sys_get_mempolicy) /* 275 */ | ||
295 | CALL(sys_set_mempolicy) | ||
296 | CALL(sys_mq_open) | ||
297 | CALL(sys_mq_unlink) | ||
298 | CALL(sys_mq_timedsend) | ||
299 | CALL(sys_mq_timedreceive) /* 280 */ | ||
300 | CALL(sys_mq_notify) | ||
301 | CALL(sys_mq_getsetattr) | ||
302 | CALL(sys_waitid) | ||
303 | CALL(sys_ni_syscall) /* sys_kexec_load */ | ||
304 | CALL(sys_add_key) /* 285 */ | ||
305 | CALL(sys_request_key) | ||
306 | CALL(sys_keyctl) | ||
307 | CALL(sys_ioprio_set) | ||
308 | CALL(sys_ioprio_get) /* 290 */ | ||
309 | CALL(sys_inotify_init) | ||
310 | CALL(sys_inotify_add_watch) | ||
311 | CALL(sys_inotify_rm_watch) | ||
312 | CALL(sys_migrate_pages) | ||
313 | CALL(sys_openat) /* 295 */ | ||
314 | CALL(sys_mkdirat) | ||
315 | CALL(sys_mknodat) | ||
316 | CALL(sys_fchownat) | ||
317 | CALL(sys_futimesat) | ||
318 | CALL(sys_fstatat64) /* 300 */ | ||
319 | CALL(sys_unlinkat) | ||
320 | CALL(sys_renameat) | ||
321 | CALL(sys_linkat) | ||
322 | CALL(sys_symlinkat) | ||
323 | CALL(sys_readlinkat) /* 305 */ | ||
324 | CALL(sys_fchmodat) | ||
325 | CALL(sys_faccessat) | ||
326 | CALL(sys_ni_syscall) /* sys_pselect6 */ | ||
327 | CALL(sys_ni_syscall) /* sys_ppoll */ | ||
328 | CALL(sys_unshare) /* 310 */ | ||
329 | CALL(sys_set_robust_list) | ||
330 | CALL(sys_get_robust_list) | ||
331 | CALL(sys_splice) | ||
332 | CALL(sys_sync_file_range) | ||
333 | CALL(sys_tee) /* 315 */ | ||
334 | CALL(sys_vmsplice) | ||
335 | CALL(sys_ni_syscall) /* sys_move_pages */ | ||
336 | CALL(sys_getcpu) | ||
337 | CALL(sys_ni_syscall) /* sys_epoll_pwait */ | ||
338 | CALL(sys_setns) /* 320 */ | ||
diff --git a/arch/h8300/kernel/time.c b/arch/h8300/kernel/time.c deleted file mode 100644 index e0f74191d553..000000000000 --- a/arch/h8300/kernel/time.c +++ /dev/null | |||
@@ -1,66 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/h8300/kernel/time.c | ||
3 | * | ||
4 | * Yoshinori Sato <ysato@users.sourceforge.jp> | ||
5 | * | ||
6 | * Copied/hacked from: | ||
7 | * | ||
8 | * linux/arch/m68k/kernel/time.c | ||
9 | * | ||
10 | * Copyright (C) 1991, 1992, 1995 Linus Torvalds | ||
11 | * | ||
12 | * This file contains the m68k-specific time handling details. | ||
13 | * Most of the stuff is located in the machine specific files. | ||
14 | * | ||
15 | * 1997-09-10 Updated NTP code according to technical memorandum Jan '96 | ||
16 | * "A Kernel Model for Precision Timekeeping" by Dave Mills | ||
17 | */ | ||
18 | |||
19 | #include <linux/errno.h> | ||
20 | #include <linux/module.h> | ||
21 | #include <linux/sched.h> | ||
22 | #include <linux/kernel.h> | ||
23 | #include <linux/param.h> | ||
24 | #include <linux/string.h> | ||
25 | #include <linux/mm.h> | ||
26 | #include <linux/timex.h> | ||
27 | #include <linux/profile.h> | ||
28 | |||
29 | #include <asm/io.h> | ||
30 | #include <asm/irq_regs.h> | ||
31 | #include <asm/timer.h> | ||
32 | |||
33 | #define TICK_SIZE (tick_nsec / 1000) | ||
34 | |||
35 | void h8300_timer_tick(void) | ||
36 | { | ||
37 | if (current->pid) | ||
38 | profile_tick(CPU_PROFILING); | ||
39 | xtime_update(1); | ||
40 | update_process_times(user_mode(get_irq_regs())); | ||
41 | } | ||
42 | |||
43 | void read_persistent_clock(struct timespec *ts) | ||
44 | { | ||
45 | unsigned int year, mon, day, hour, min, sec; | ||
46 | |||
47 | /* FIX by dqg : Set to zero for platforms that don't have tod */ | ||
48 | /* without this time is undefined and can overflow time_t, causing */ | ||
49 | /* very strange errors */ | ||
50 | year = 1980; | ||
51 | mon = day = 1; | ||
52 | hour = min = sec = 0; | ||
53 | #ifdef CONFIG_H8300_GETTOD | ||
54 | h8300_gettod (&year, &mon, &day, &hour, &min, &sec); | ||
55 | #endif | ||
56 | if ((year += 1900) < 1970) | ||
57 | year += 100; | ||
58 | ts->tv_sec = mktime(year, mon, day, hour, min, sec); | ||
59 | ts->tv_nsec = 0; | ||
60 | } | ||
61 | |||
62 | void __init time_init(void) | ||
63 | { | ||
64 | |||
65 | h8300_timer_setup(); | ||
66 | } | ||
diff --git a/arch/h8300/kernel/timer/Makefile b/arch/h8300/kernel/timer/Makefile deleted file mode 100644 index bef0510ea6ad..000000000000 --- a/arch/h8300/kernel/timer/Makefile +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | # h8300 internal timer handler | ||
2 | |||
3 | obj-$(CONFIG_H8300_TIMER8) := timer8.o | ||
4 | obj-$(CONFIG_H8300_TIMER16) := timer16.o | ||
5 | obj-$(CONFIG_H8300_ITU) := itu.o | ||
6 | obj-$(CONFIG_H8300_TPU) := tpu.o | ||
diff --git a/arch/h8300/kernel/timer/itu.c b/arch/h8300/kernel/timer/itu.c deleted file mode 100644 index 0a8b5cd5bf38..000000000000 --- a/arch/h8300/kernel/timer/itu.c +++ /dev/null | |||
@@ -1,82 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/h8300/kernel/timer/itu.c | ||
3 | * | ||
4 | * Yoshinori Sato <ysato@users.sourcefoge.jp> | ||
5 | * | ||
6 | * ITU Timer Handler | ||
7 | * | ||
8 | */ | ||
9 | |||
10 | #include <linux/errno.h> | ||
11 | #include <linux/sched.h> | ||
12 | #include <linux/kernel.h> | ||
13 | #include <linux/param.h> | ||
14 | #include <linux/string.h> | ||
15 | #include <linux/mm.h> | ||
16 | #include <linux/interrupt.h> | ||
17 | #include <linux/init.h> | ||
18 | #include <linux/timex.h> | ||
19 | |||
20 | #include <asm/segment.h> | ||
21 | #include <asm/io.h> | ||
22 | #include <asm/irq.h> | ||
23 | #include <asm/regs306x.h> | ||
24 | |||
25 | #if CONFIG_H8300_ITU_CH == 0 | ||
26 | #define ITUBASE 0xffff64 | ||
27 | #define ITUIRQ 24 | ||
28 | #elif CONFIG_H8300_ITU_CH == 1 | ||
29 | #define ITUBASE 0xffff6e | ||
30 | #define ITUIRQ 28 | ||
31 | #elif CONFIG_H8300_ITU_CH == 2 | ||
32 | #define ITUBASE 0xffff78 | ||
33 | #define ITUIRQ 32 | ||
34 | #elif CONFIG_H8300_ITU_CH == 3 | ||
35 | #define ITUBASE 0xffff82 | ||
36 | #define ITUIRQ 36 | ||
37 | #elif CONFIG_H8300_ITU_CH == 4 | ||
38 | #define ITUBASE 0xffff92 | ||
39 | #define ITUIRQ 40 | ||
40 | #else | ||
41 | #error Unknown timer channel. | ||
42 | #endif | ||
43 | |||
44 | #define TCR 0 | ||
45 | #define TIOR 1 | ||
46 | #define TIER 2 | ||
47 | #define TSR 3 | ||
48 | #define TCNT 4 | ||
49 | #define GRA 6 | ||
50 | #define GRB 8 | ||
51 | |||
52 | static irqreturn_t timer_interrupt(int irq, void *dev_id) | ||
53 | { | ||
54 | h8300_timer_tick(); | ||
55 | ctrl_bclr(IMFA, ITUBASE + TSR); | ||
56 | return IRQ_HANDLED; | ||
57 | } | ||
58 | |||
59 | static struct irqaction itu_irq = { | ||
60 | .name = "itu", | ||
61 | .handler = timer_interrupt, | ||
62 | .flags = IRQF_DISABLED | IRQF_TIMER, | ||
63 | }; | ||
64 | |||
65 | static const int __initconst divide_rate[] = {1, 2, 4, 8}; | ||
66 | |||
67 | void __init h8300_timer_setup(void) | ||
68 | { | ||
69 | unsigned int div; | ||
70 | unsigned int cnt; | ||
71 | |||
72 | calc_param(cnt, div, divide_rate, 0x10000); | ||
73 | |||
74 | setup_irq(ITUIRQ, &itu_irq); | ||
75 | |||
76 | /* initialize timer */ | ||
77 | ctrl_outb(0, TSTR); | ||
78 | ctrl_outb(CCLR0 | div, ITUBASE + TCR); | ||
79 | ctrl_outb(0x01, ITUBASE + TIER); | ||
80 | ctrl_outw(cnt, ITUBASE + GRA); | ||
81 | ctrl_bset(CONFIG_H8300_ITU_CH, TSTR); | ||
82 | } | ||
diff --git a/arch/h8300/kernel/timer/timer16.c b/arch/h8300/kernel/timer/timer16.c deleted file mode 100644 index 462d9f581719..000000000000 --- a/arch/h8300/kernel/timer/timer16.c +++ /dev/null | |||
@@ -1,77 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/h8300/kernel/timer/timer16.c | ||
3 | * | ||
4 | * Yoshinori Sato <ysato@users.sourcefoge.jp> | ||
5 | * | ||
6 | * 16bit Timer Handler | ||
7 | * | ||
8 | */ | ||
9 | |||
10 | #include <linux/errno.h> | ||
11 | #include <linux/sched.h> | ||
12 | #include <linux/kernel.h> | ||
13 | #include <linux/param.h> | ||
14 | #include <linux/string.h> | ||
15 | #include <linux/mm.h> | ||
16 | #include <linux/interrupt.h> | ||
17 | #include <linux/init.h> | ||
18 | #include <linux/timex.h> | ||
19 | |||
20 | #include <asm/segment.h> | ||
21 | #include <asm/io.h> | ||
22 | #include <asm/irq.h> | ||
23 | #include <asm/regs306x.h> | ||
24 | |||
25 | /* 16bit timer */ | ||
26 | #if CONFIG_H8300_TIMER16_CH == 0 | ||
27 | #define _16BASE 0xffff78 | ||
28 | #define _16IRQ 24 | ||
29 | #elif CONFIG_H8300_TIMER16_CH == 1 | ||
30 | #define _16BASE 0xffff80 | ||
31 | #define _16IRQ 28 | ||
32 | #elif CONFIG_H8300_TIMER16_CH == 2 | ||
33 | #define _16BASE 0xffff88 | ||
34 | #define _16IRQ 32 | ||
35 | #else | ||
36 | #error Unknown timer channel. | ||
37 | #endif | ||
38 | |||
39 | #define TCR 0 | ||
40 | #define TIOR 1 | ||
41 | #define TCNT 2 | ||
42 | #define GRA 4 | ||
43 | #define GRB 6 | ||
44 | |||
45 | #define H8300_TIMER_FREQ CONFIG_CPU_CLOCK*10000 /* Timer input freq. */ | ||
46 | |||
47 | static irqreturn_t timer_interrupt(int irq, void *dev_id) | ||
48 | { | ||
49 | h8300_timer_tick(); | ||
50 | ctrl_bclr(CONFIG_H8300_TIMER16_CH, TISRA); | ||
51 | return IRQ_HANDLED; | ||
52 | } | ||
53 | |||
54 | static struct irqaction timer16_irq = { | ||
55 | .name = "timer-16", | ||
56 | .handler = timer_interrupt, | ||
57 | .flags = IRQF_DISABLED | IRQF_TIMER, | ||
58 | }; | ||
59 | |||
60 | static const int __initconst divide_rate[] = {1, 2, 4, 8}; | ||
61 | |||
62 | void __init h8300_timer_setup(void) | ||
63 | { | ||
64 | unsigned int div; | ||
65 | unsigned int cnt; | ||
66 | |||
67 | calc_param(cnt, div, divide_rate, 0x10000); | ||
68 | |||
69 | setup_irq(_16IRQ, &timer16_irq); | ||
70 | |||
71 | /* initialize timer */ | ||
72 | ctrl_outb(0, TSTR); | ||
73 | ctrl_outb(CCLR0 | div, _16BASE + TCR); | ||
74 | ctrl_outw(cnt, _16BASE + GRA); | ||
75 | ctrl_bset(4 + CONFIG_H8300_TIMER16_CH, TISRA); | ||
76 | ctrl_bset(CONFIG_H8300_TIMER16_CH, TSTR); | ||
77 | } | ||
diff --git a/arch/h8300/kernel/timer/timer8.c b/arch/h8300/kernel/timer/timer8.c deleted file mode 100644 index 505f3415b40f..000000000000 --- a/arch/h8300/kernel/timer/timer8.c +++ /dev/null | |||
@@ -1,102 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/h8300/kernel/cpu/timer/timer8.c | ||
3 | * | ||
4 | * Yoshinori Sato <ysato@users.sourcefoge.jp> | ||
5 | * | ||
6 | * 8bit Timer Handler | ||
7 | * | ||
8 | */ | ||
9 | |||
10 | #include <linux/errno.h> | ||
11 | #include <linux/sched.h> | ||
12 | #include <linux/kernel.h> | ||
13 | #include <linux/param.h> | ||
14 | #include <linux/string.h> | ||
15 | #include <linux/mm.h> | ||
16 | #include <linux/interrupt.h> | ||
17 | #include <linux/init.h> | ||
18 | #include <linux/profile.h> | ||
19 | |||
20 | #include <asm/io.h> | ||
21 | #include <asm/irq.h> | ||
22 | #include <asm/timer.h> | ||
23 | #if defined(CONFIG_CPU_H8300H) | ||
24 | #include <asm/regs306x.h> | ||
25 | #endif | ||
26 | #if defined(CONFIG_CPU_H8S) | ||
27 | #include <asm/regs267x.h> | ||
28 | #endif | ||
29 | |||
30 | /* 8bit timer x2 */ | ||
31 | #define CMFA 6 | ||
32 | |||
33 | #if defined(CONFIG_H8300_TIMER8_CH0) | ||
34 | #define _8BASE _8TCR0 | ||
35 | #ifdef CONFIG_CPU_H8300H | ||
36 | #define _8IRQ 36 | ||
37 | #endif | ||
38 | #ifdef CONFIG_CPU_H8S | ||
39 | #define _8IRQ 72 | ||
40 | #endif | ||
41 | #elif defined(CONFIG_H8300_TIMER8_CH2) | ||
42 | #ifdef CONFIG_CPU_H8300H | ||
43 | #define _8BASE _8TCR2 | ||
44 | #define _8IRQ 40 | ||
45 | #endif | ||
46 | #endif | ||
47 | |||
48 | #ifndef _8BASE | ||
49 | #error Unknown timer channel. | ||
50 | #endif | ||
51 | |||
52 | #define _8TCR 0 | ||
53 | #define _8TCSR 2 | ||
54 | #define TCORA 4 | ||
55 | #define TCORB 6 | ||
56 | #define _8TCNT 8 | ||
57 | |||
58 | #define CMIEA 0x40 | ||
59 | #define CCLR_CMA 0x08 | ||
60 | #define CKS2 0x04 | ||
61 | |||
62 | /* | ||
63 | * timer_interrupt() needs to keep up the real-time clock, | ||
64 | * as well as call the "xtime_update()" routine every clocktick | ||
65 | */ | ||
66 | |||
67 | static irqreturn_t timer_interrupt(int irq, void *dev_id) | ||
68 | { | ||
69 | h8300_timer_tick(); | ||
70 | ctrl_bclr(CMFA, _8BASE + _8TCSR); | ||
71 | return IRQ_HANDLED; | ||
72 | } | ||
73 | |||
74 | static struct irqaction timer8_irq = { | ||
75 | .name = "timer-8", | ||
76 | .handler = timer_interrupt, | ||
77 | .flags = IRQF_DISABLED | IRQF_TIMER, | ||
78 | }; | ||
79 | |||
80 | static const int __initconst divide_rate[] = {8, 64, 8192}; | ||
81 | |||
82 | void __init h8300_timer_setup(void) | ||
83 | { | ||
84 | unsigned int div; | ||
85 | unsigned int cnt; | ||
86 | |||
87 | calc_param(cnt, div, divide_rate, 0x10000); | ||
88 | div++; | ||
89 | |||
90 | setup_irq(_8IRQ, &timer8_irq); | ||
91 | |||
92 | #if defined(CONFIG_CPU_H8S) | ||
93 | /* Timer module enable */ | ||
94 | ctrl_bclr(0, MSTPCRL) | ||
95 | #endif | ||
96 | |||
97 | /* initialize timer */ | ||
98 | ctrl_outw(cnt, _8BASE + TCORA); | ||
99 | ctrl_outw(0x0000, _8BASE + _8TCSR); | ||
100 | ctrl_outw((CMIEA|CCLR_CMA|CKS2) << 8 | div, | ||
101 | _8BASE + _8TCR); | ||
102 | } | ||
diff --git a/arch/h8300/kernel/timer/tpu.c b/arch/h8300/kernel/timer/tpu.c deleted file mode 100644 index 0350f6204ecf..000000000000 --- a/arch/h8300/kernel/timer/tpu.c +++ /dev/null | |||
@@ -1,100 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/h8300/kernel/timer/tpu.c | ||
3 | * | ||
4 | * Yoshinori Sato <ysato@users.sourceforge.jp> | ||
5 | * | ||
6 | * TPU Timer Handler | ||
7 | * | ||
8 | */ | ||
9 | |||
10 | #include <linux/errno.h> | ||
11 | #include <linux/sched.h> | ||
12 | #include <linux/kernel.h> | ||
13 | #include <linux/param.h> | ||
14 | #include <linux/string.h> | ||
15 | #include <linux/mm.h> | ||
16 | #include <linux/interrupt.h> | ||
17 | #include <linux/init.h> | ||
18 | #include <linux/timex.h> | ||
19 | |||
20 | #include <asm/segment.h> | ||
21 | #include <asm/io.h> | ||
22 | #include <asm/irq.h> | ||
23 | #include <asm/regs267x.h> | ||
24 | |||
25 | /* TPU */ | ||
26 | #if CONFIG_H8300_TPU_CH == 0 | ||
27 | #define TPUBASE 0xffffd0 | ||
28 | #define TPUIRQ 40 | ||
29 | #elif CONFIG_H8300_TPU_CH == 1 | ||
30 | #define TPUBASE 0xffffe0 | ||
31 | #define TPUIRQ 48 | ||
32 | #elif CONFIG_H8300_TPU_CH == 2 | ||
33 | #define TPUBASE 0xfffff0 | ||
34 | #define TPUIRQ 52 | ||
35 | #elif CONFIG_H8300_TPU_CH == 3 | ||
36 | #define TPUBASE 0xfffe80 | ||
37 | #define TPUIRQ 56 | ||
38 | #elif CONFIG_H8300_TPU_CH == 4 | ||
39 | #define TPUBASE 0xfffe90 | ||
40 | #define TPUIRQ 64 | ||
41 | #else | ||
42 | #error Unknown timer channel. | ||
43 | #endif | ||
44 | |||
45 | #define _TCR 0 | ||
46 | #define _TMDR 1 | ||
47 | #define _TIOR 2 | ||
48 | #define _TIER 4 | ||
49 | #define _TSR 5 | ||
50 | #define _TCNT 6 | ||
51 | #define _GRA 8 | ||
52 | #define _GRB 10 | ||
53 | |||
54 | #define CCLR0 0x20 | ||
55 | |||
56 | static irqreturn_t timer_interrupt(int irq, void *dev_id) | ||
57 | { | ||
58 | h8300_timer_tick(); | ||
59 | ctrl_bclr(0, TPUBASE + _TSR); | ||
60 | return IRQ_HANDLED; | ||
61 | } | ||
62 | |||
63 | static struct irqaction tpu_irq = { | ||
64 | .name = "tpu", | ||
65 | .handler = timer_interrupt, | ||
66 | .flags = IRQF_DISABLED | IRQF_TIMER, | ||
67 | }; | ||
68 | |||
69 | static const int __initconst divide_rate[] = { | ||
70 | #if CONFIG_H8300_TPU_CH == 0 | ||
71 | 1,4,16,64,0,0,0,0, | ||
72 | #elif (CONFIG_H8300_TPU_CH == 1) || (CONFIG_H8300_TPU_CH == 5) | ||
73 | 1,4,16,64,0,0,256,0, | ||
74 | #elif (CONFIG_H8300_TPU_CH == 2) || (CONFIG_H8300_TPU_CH == 4) | ||
75 | 1,4,16,64,0,0,0,1024, | ||
76 | #elif CONFIG_H8300_TPU_CH == 3 | ||
77 | 1,4,16,64,0,1024,256,4096, | ||
78 | #endif | ||
79 | }; | ||
80 | |||
81 | void __init h8300_timer_setup(void) | ||
82 | { | ||
83 | unsigned int cnt; | ||
84 | unsigned int div; | ||
85 | |||
86 | calc_param(cnt, div, divide_rate, 0x10000); | ||
87 | |||
88 | setup_irq(TPUIRQ, &tpu_irq); | ||
89 | |||
90 | /* TPU module enabled */ | ||
91 | ctrl_bclr(3, MSTPCRH); | ||
92 | |||
93 | ctrl_outb(0, TSTR); | ||
94 | ctrl_outb(CCLR0 | div, TPUBASE + _TCR); | ||
95 | ctrl_outb(0, TPUBASE + _TMDR); | ||
96 | ctrl_outw(0, TPUBASE + _TIOR); | ||
97 | ctrl_outb(0x01, TPUBASE + _TIER); | ||
98 | ctrl_outw(cnt, TPUBASE + _GRA); | ||
99 | ctrl_bset(CONFIG_H8300_TPU_CH, TSTR); | ||
100 | } | ||
diff --git a/arch/h8300/kernel/traps.c b/arch/h8300/kernel/traps.c deleted file mode 100644 index cfe494dbe3da..000000000000 --- a/arch/h8300/kernel/traps.c +++ /dev/null | |||
@@ -1,166 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/h8300/boot/traps.c -- general exception handling code | ||
3 | * H8/300 support Yoshinori Sato <ysato@users.sourceforge.jp> | ||
4 | * | ||
5 | * Cloned from Linux/m68k. | ||
6 | * | ||
7 | * No original Copyright holder listed, | ||
8 | * Probable original (C) Roman Zippel (assigned DJD, 1999) | ||
9 | * | ||
10 | * Copyright 1999-2000 D. Jeff Dionne, <jeff@rt-control.com> | ||
11 | * | ||
12 | * This file is subject to the terms and conditions of the GNU General Public | ||
13 | * License. See the file COPYING in the main directory of this archive | ||
14 | * for more details. | ||
15 | */ | ||
16 | |||
17 | #include <linux/types.h> | ||
18 | #include <linux/sched.h> | ||
19 | #include <linux/kernel.h> | ||
20 | #include <linux/errno.h> | ||
21 | #include <linux/init.h> | ||
22 | #include <linux/module.h> | ||
23 | #include <linux/bug.h> | ||
24 | |||
25 | #include <asm/irq.h> | ||
26 | #include <asm/traps.h> | ||
27 | #include <asm/page.h> | ||
28 | |||
29 | static DEFINE_SPINLOCK(die_lock); | ||
30 | |||
31 | /* | ||
32 | * this must be called very early as the kernel might | ||
33 | * use some instruction that are emulated on the 060 | ||
34 | */ | ||
35 | |||
36 | void __init base_trap_init(void) | ||
37 | { | ||
38 | } | ||
39 | |||
40 | void __init trap_init (void) | ||
41 | { | ||
42 | } | ||
43 | |||
44 | asmlinkage void set_esp0 (unsigned long ssp) | ||
45 | { | ||
46 | current->thread.esp0 = ssp; | ||
47 | } | ||
48 | |||
49 | /* | ||
50 | * Generic dumping code. Used for panic and debug. | ||
51 | */ | ||
52 | |||
53 | static void dump(struct pt_regs *fp) | ||
54 | { | ||
55 | unsigned long *sp; | ||
56 | unsigned char *tp; | ||
57 | int i; | ||
58 | |||
59 | printk("\nCURRENT PROCESS:\n\n"); | ||
60 | printk("COMM=%s PID=%d\n", current->comm, current->pid); | ||
61 | if (current->mm) { | ||
62 | printk("TEXT=%08x-%08x DATA=%08x-%08x BSS=%08x-%08x\n", | ||
63 | (int) current->mm->start_code, | ||
64 | (int) current->mm->end_code, | ||
65 | (int) current->mm->start_data, | ||
66 | (int) current->mm->end_data, | ||
67 | (int) current->mm->end_data, | ||
68 | (int) current->mm->brk); | ||
69 | printk("USER-STACK=%08x KERNEL-STACK=%08lx\n\n", | ||
70 | (int) current->mm->start_stack, | ||
71 | (int) PAGE_SIZE+(unsigned long)current); | ||
72 | } | ||
73 | |||
74 | show_regs(fp); | ||
75 | printk("\nCODE:"); | ||
76 | tp = ((unsigned char *) fp->pc) - 0x20; | ||
77 | for (sp = (unsigned long *) tp, i = 0; (i < 0x40); i += 4) { | ||
78 | if ((i % 0x10) == 0) | ||
79 | printk("\n%08x: ", (int) (tp + i)); | ||
80 | printk("%08x ", (int) *sp++); | ||
81 | } | ||
82 | printk("\n"); | ||
83 | |||
84 | printk("\nKERNEL STACK:"); | ||
85 | tp = ((unsigned char *) fp) - 0x40; | ||
86 | for (sp = (unsigned long *) tp, i = 0; (i < 0xc0); i += 4) { | ||
87 | if ((i % 0x10) == 0) | ||
88 | printk("\n%08x: ", (int) (tp + i)); | ||
89 | printk("%08x ", (int) *sp++); | ||
90 | } | ||
91 | printk("\n"); | ||
92 | if (STACK_MAGIC != *(unsigned long *)((unsigned long)current+PAGE_SIZE)) | ||
93 | printk("(Possibly corrupted stack page??)\n"); | ||
94 | |||
95 | printk("\n\n"); | ||
96 | } | ||
97 | |||
98 | void die(const char *str, struct pt_regs *fp, unsigned long err) | ||
99 | { | ||
100 | static int diecount; | ||
101 | |||
102 | oops_enter(); | ||
103 | |||
104 | console_verbose(); | ||
105 | spin_lock_irq(&die_lock); | ||
106 | report_bug(fp->pc, fp); | ||
107 | printk(KERN_EMERG "%s: %04lx [#%d] ", str, err & 0xffff, ++diecount); | ||
108 | dump(fp); | ||
109 | |||
110 | spin_unlock_irq(&die_lock); | ||
111 | do_exit(SIGSEGV); | ||
112 | } | ||
113 | |||
114 | extern char _start, _etext; | ||
115 | #define check_kernel_text(addr) \ | ||
116 | ((addr >= (unsigned long)(&_start)) && \ | ||
117 | (addr < (unsigned long)(&_etext))) | ||
118 | |||
119 | static int kstack_depth_to_print = 24; | ||
120 | |||
121 | void show_stack(struct task_struct *task, unsigned long *esp) | ||
122 | { | ||
123 | unsigned long *stack, addr; | ||
124 | int i; | ||
125 | |||
126 | if (esp == NULL) | ||
127 | esp = (unsigned long *) &esp; | ||
128 | |||
129 | stack = esp; | ||
130 | |||
131 | printk("Stack from %08lx:", (unsigned long)stack); | ||
132 | for (i = 0; i < kstack_depth_to_print; i++) { | ||
133 | if (((unsigned long)stack & (THREAD_SIZE - 1)) == 0) | ||
134 | break; | ||
135 | if (i % 8 == 0) | ||
136 | printk("\n "); | ||
137 | printk(" %08lx", *stack++); | ||
138 | } | ||
139 | |||
140 | printk("\nCall Trace:"); | ||
141 | i = 0; | ||
142 | stack = esp; | ||
143 | while (((unsigned long)stack & (THREAD_SIZE - 1)) != 0) { | ||
144 | addr = *stack++; | ||
145 | /* | ||
146 | * If the address is either in the text segment of the | ||
147 | * kernel, or in the region which contains vmalloc'ed | ||
148 | * memory, it *may* be the address of a calling | ||
149 | * routine; if so, print it so that someone tracing | ||
150 | * down the cause of the crash will be able to figure | ||
151 | * out the call path that was taken. | ||
152 | */ | ||
153 | if (check_kernel_text(addr)) { | ||
154 | if (i % 4 == 0) | ||
155 | printk("\n "); | ||
156 | printk(" [<%08lx>]", addr); | ||
157 | i++; | ||
158 | } | ||
159 | } | ||
160 | printk("\n"); | ||
161 | } | ||
162 | |||
163 | void show_trace_task(struct task_struct *tsk) | ||
164 | { | ||
165 | show_stack(tsk,(unsigned long *)tsk->thread.esp0); | ||
166 | } | ||
diff --git a/arch/h8300/kernel/vmlinux.lds.S b/arch/h8300/kernel/vmlinux.lds.S deleted file mode 100644 index 3253fed42ac1..000000000000 --- a/arch/h8300/kernel/vmlinux.lds.S +++ /dev/null | |||
@@ -1,157 +0,0 @@ | |||
1 | #include <asm-generic/vmlinux.lds.h> | ||
2 | #include <asm/page.h> | ||
3 | |||
4 | /* target memory map */ | ||
5 | #ifdef CONFIG_H8300H_GENERIC | ||
6 | #define ROMTOP 0x000000 | ||
7 | #define ROMSIZE 0x400000 | ||
8 | #define RAMTOP 0x400000 | ||
9 | #define RAMSIZE 0x400000 | ||
10 | #endif | ||
11 | |||
12 | #ifdef CONFIG_H8300H_AKI3068NET | ||
13 | #define ROMTOP 0x000000 | ||
14 | #define ROMSIZE 0x080000 | ||
15 | #define RAMTOP 0x400000 | ||
16 | #define RAMSIZE 0x200000 | ||
17 | #endif | ||
18 | |||
19 | #ifdef CONFIG_H8300H_H8MAX | ||
20 | #define ROMTOP 0x000000 | ||
21 | #define ROMSIZE 0x080000 | ||
22 | #define RAMTOP 0x400000 | ||
23 | #define RAMSIZE 0x200000 | ||
24 | #endif | ||
25 | |||
26 | #ifdef CONFIG_H8300H_SIM | ||
27 | #define ROMTOP 0x000000 | ||
28 | #define ROMSIZE 0x400000 | ||
29 | #define RAMTOP 0x400000 | ||
30 | #define RAMSIZE 0x400000 | ||
31 | #endif | ||
32 | |||
33 | #ifdef CONFIG_H8S_SIM | ||
34 | #define ROMTOP 0x000000 | ||
35 | #define ROMSIZE 0x400000 | ||
36 | #define RAMTOP 0x400000 | ||
37 | #define RAMSIZE 0x800000 | ||
38 | #endif | ||
39 | |||
40 | #ifdef CONFIG_H8S_EDOSK2674 | ||
41 | #define ROMTOP 0x000000 | ||
42 | #define ROMSIZE 0x400000 | ||
43 | #define RAMTOP 0x400000 | ||
44 | #define RAMSIZE 0x800000 | ||
45 | #endif | ||
46 | |||
47 | #if defined(CONFIG_H8300H_SIM) || defined(CONFIG_H8S_SIM) | ||
48 | INPUT(romfs.o) | ||
49 | #endif | ||
50 | |||
51 | _jiffies = _jiffies_64 + 4; | ||
52 | |||
53 | ENTRY(__start) | ||
54 | |||
55 | SECTIONS | ||
56 | { | ||
57 | #if defined(CONFIG_ROMKERNEL) | ||
58 | . = ROMTOP; | ||
59 | .vectors : | ||
60 | { | ||
61 | __vector = . ; | ||
62 | *(.vectors*) | ||
63 | } | ||
64 | #else | ||
65 | . = RAMTOP; | ||
66 | .bootvec : | ||
67 | { | ||
68 | *(.bootvec) | ||
69 | } | ||
70 | #endif | ||
71 | .text : | ||
72 | { | ||
73 | _text = .; | ||
74 | #if defined(CONFIG_ROMKERNEL) | ||
75 | *(.int_redirect) | ||
76 | #endif | ||
77 | __stext = . ; | ||
78 | TEXT_TEXT | ||
79 | SCHED_TEXT | ||
80 | LOCK_TEXT | ||
81 | __etext = . ; | ||
82 | } | ||
83 | EXCEPTION_TABLE(16) | ||
84 | |||
85 | RODATA | ||
86 | #if defined(CONFIG_ROMKERNEL) | ||
87 | SECURITY_INIT | ||
88 | #endif | ||
89 | ROEND = .; | ||
90 | #if defined(CONFIG_ROMKERNEL) | ||
91 | . = RAMTOP; | ||
92 | .data : AT(ROEND) | ||
93 | #else | ||
94 | .data : | ||
95 | #endif | ||
96 | { | ||
97 | __sdata = . ; | ||
98 | ___data_start = . ; | ||
99 | |||
100 | INIT_TASK_DATA(0x2000) | ||
101 | . = ALIGN(0x4) ; | ||
102 | DATA_DATA | ||
103 | . = ALIGN(0x4) ; | ||
104 | *(.data.*) | ||
105 | |||
106 | . = ALIGN(0x4) ; | ||
107 | ___init_begin = .; | ||
108 | __sinittext = .; | ||
109 | INIT_TEXT | ||
110 | __einittext = .; | ||
111 | INIT_DATA | ||
112 | . = ALIGN(0x4) ; | ||
113 | INIT_SETUP(0x4) | ||
114 | ___setup_start = .; | ||
115 | *(.init.setup) | ||
116 | . = ALIGN(0x4) ; | ||
117 | ___setup_end = .; | ||
118 | INIT_CALLS | ||
119 | CON_INITCALL | ||
120 | EXIT_TEXT | ||
121 | EXIT_DATA | ||
122 | INIT_RAM_FS | ||
123 | . = ALIGN(0x4) ; | ||
124 | ___init_end = .; | ||
125 | __edata = . ; | ||
126 | } | ||
127 | #if defined(CONFIG_RAMKERNEL) | ||
128 | SECURITY_INIT | ||
129 | #endif | ||
130 | __begin_data = LOADADDR(.data); | ||
131 | .bss : | ||
132 | { | ||
133 | . = ALIGN(0x4) ; | ||
134 | __sbss = . ; | ||
135 | ___bss_start = . ; | ||
136 | *(.bss*) | ||
137 | . = ALIGN(0x4) ; | ||
138 | *(COMMON) | ||
139 | . = ALIGN(0x4) ; | ||
140 | ___bss_stop = . ; | ||
141 | __ebss = . ; | ||
142 | __end = . ; | ||
143 | __ramstart = .; | ||
144 | } | ||
145 | .romfs : | ||
146 | { | ||
147 | *(.romfs*) | ||
148 | } | ||
149 | . = RAMTOP+RAMSIZE; | ||
150 | .dummy : | ||
151 | { | ||
152 | COMMAND_START = . - 0x200 ; | ||
153 | __ramend = . ; | ||
154 | } | ||
155 | |||
156 | DISCARDS | ||
157 | } | ||
diff --git a/arch/h8300/lib/Makefile b/arch/h8300/lib/Makefile deleted file mode 100644 index 1577f5075b10..000000000000 --- a/arch/h8300/lib/Makefile +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | # | ||
2 | # Makefile for H8/300-specific library files.. | ||
3 | # | ||
4 | |||
5 | lib-y = ashrdi3.o checksum.o memcpy.o memset.o abs.o romfs.o | ||
diff --git a/arch/h8300/lib/abs.S b/arch/h8300/lib/abs.S deleted file mode 100644 index ddd1fb3d01ad..000000000000 --- a/arch/h8300/lib/abs.S +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | ;;; abs.S | ||
2 | |||
3 | #include <asm/linkage.h> | ||
4 | |||
5 | #if defined(__H8300H__) | ||
6 | .h8300h | ||
7 | #endif | ||
8 | #if defined(__H8300S__) | ||
9 | .h8300s | ||
10 | #endif | ||
11 | .text | ||
12 | .global _abs | ||
13 | |||
14 | ;;; int abs(int n) | ||
15 | _abs: | ||
16 | mov.l er0,er0 | ||
17 | bpl 1f | ||
18 | neg.l er0 | ||
19 | 1: | ||
20 | rts | ||
21 | |||
diff --git a/arch/h8300/lib/ashrdi3.c b/arch/h8300/lib/ashrdi3.c deleted file mode 100644 index 78efb65e315a..000000000000 --- a/arch/h8300/lib/ashrdi3.c +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | /* ashrdi3.c extracted from gcc-2.7.2/libgcc2.c which is: */ | ||
2 | /* Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. | ||
3 | |||
4 | This file is part of GNU CC. | ||
5 | |||
6 | GNU CC is free software; you can redistribute it and/or modify | ||
7 | it under the terms of the GNU General Public License as published by | ||
8 | the Free Software Foundation; either version 2, or (at your option) | ||
9 | any later version. | ||
10 | |||
11 | GNU CC is distributed in the hope that it will be useful, | ||
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | GNU General Public License for more details. | ||
15 | |||
16 | You should have received a copy of the GNU General Public License | ||
17 | along with GNU CC; see the file COPYING. If not, write to | ||
18 | the Free Software Foundation, 59 Temple Place - Suite 330, | ||
19 | Boston, MA 02111-1307, USA. */ | ||
20 | |||
21 | #define BITS_PER_UNIT 8 | ||
22 | |||
23 | typedef int SItype __attribute__ ((mode (SI))); | ||
24 | typedef unsigned int USItype __attribute__ ((mode (SI))); | ||
25 | typedef int DItype __attribute__ ((mode (DI))); | ||
26 | typedef int word_type __attribute__ ((mode (__word__))); | ||
27 | |||
28 | struct DIstruct {SItype high, low;}; | ||
29 | |||
30 | typedef union | ||
31 | { | ||
32 | struct DIstruct s; | ||
33 | DItype ll; | ||
34 | } DIunion; | ||
35 | |||
36 | DItype | ||
37 | __ashrdi3 (DItype u, word_type b) | ||
38 | { | ||
39 | DIunion w; | ||
40 | word_type bm; | ||
41 | DIunion uu; | ||
42 | |||
43 | if (b == 0) | ||
44 | return u; | ||
45 | |||
46 | uu.ll = u; | ||
47 | |||
48 | bm = (sizeof (SItype) * BITS_PER_UNIT) - b; | ||
49 | if (bm <= 0) | ||
50 | { | ||
51 | /* w.s.high = 1..1 or 0..0 */ | ||
52 | w.s.high = uu.s.high >> (sizeof (SItype) * BITS_PER_UNIT - 1); | ||
53 | w.s.low = uu.s.high >> -bm; | ||
54 | } | ||
55 | else | ||
56 | { | ||
57 | USItype carries = (USItype)uu.s.high << bm; | ||
58 | w.s.high = uu.s.high >> b; | ||
59 | w.s.low = ((USItype)uu.s.low >> b) | carries; | ||
60 | } | ||
61 | |||
62 | return w.ll; | ||
63 | } | ||
diff --git a/arch/h8300/lib/checksum.c b/arch/h8300/lib/checksum.c deleted file mode 100644 index bdc5b032acd6..000000000000 --- a/arch/h8300/lib/checksum.c +++ /dev/null | |||
@@ -1,164 +0,0 @@ | |||
1 | /* | ||
2 | * INET An implementation of the TCP/IP protocol suite for the LINUX | ||
3 | * operating system. INET is implemented using the BSD Socket | ||
4 | * interface as the means of communication with the user level. | ||
5 | * | ||
6 | * IP/TCP/UDP checksumming routines | ||
7 | * | ||
8 | * Authors: Jorge Cwik, <jorge@laser.satlink.net> | ||
9 | * Arnt Gulbrandsen, <agulbra@nvg.unit.no> | ||
10 | * Tom May, <ftom@netcom.com> | ||
11 | * Andreas Schwab, <schwab@issan.informatik.uni-dortmund.de> | ||
12 | * Lots of code moved from tcp.c and ip.c; see those files | ||
13 | * for more names. | ||
14 | * | ||
15 | * 03/02/96 Jes Sorensen, Andreas Schwab, Roman Hodek: | ||
16 | * Fixed some nasty bugs, causing some horrible crashes. | ||
17 | * A: At some points, the sum (%0) was used as | ||
18 | * length-counter instead of the length counter | ||
19 | * (%1). Thanks to Roman Hodek for pointing this out. | ||
20 | * B: GCC seems to mess up if one uses too many | ||
21 | * data-registers to hold input values and one tries to | ||
22 | * specify d0 and d1 as scratch registers. Letting gcc choose these | ||
23 | * registers itself solves the problem. | ||
24 | * | ||
25 | * This program is free software; you can redistribute it and/or | ||
26 | * modify it under the terms of the GNU General Public License | ||
27 | * as published by the Free Software Foundation; either version | ||
28 | * 2 of the License, or (at your option) any later version. | ||
29 | */ | ||
30 | |||
31 | /* Revised by Kenneth Albanowski for m68knommu. Basic problem: unaligned access kills, so most | ||
32 | of the assembly has to go. */ | ||
33 | |||
34 | #include <net/checksum.h> | ||
35 | #include <linux/module.h> | ||
36 | |||
37 | static inline unsigned short from32to16(unsigned long x) | ||
38 | { | ||
39 | /* add up 16-bit and 16-bit for 16+c bit */ | ||
40 | x = (x & 0xffff) + (x >> 16); | ||
41 | /* add up carry.. */ | ||
42 | x = (x & 0xffff) + (x >> 16); | ||
43 | return x; | ||
44 | } | ||
45 | |||
46 | static unsigned long do_csum(const unsigned char * buff, int len) | ||
47 | { | ||
48 | int odd, count; | ||
49 | unsigned long result = 0; | ||
50 | |||
51 | if (len <= 0) | ||
52 | goto out; | ||
53 | odd = 1 & (unsigned long) buff; | ||
54 | if (odd) { | ||
55 | result = *buff; | ||
56 | len--; | ||
57 | buff++; | ||
58 | } | ||
59 | count = len >> 1; /* nr of 16-bit words.. */ | ||
60 | if (count) { | ||
61 | if (2 & (unsigned long) buff) { | ||
62 | result += *(unsigned short *) buff; | ||
63 | count--; | ||
64 | len -= 2; | ||
65 | buff += 2; | ||
66 | } | ||
67 | count >>= 1; /* nr of 32-bit words.. */ | ||
68 | if (count) { | ||
69 | unsigned long carry = 0; | ||
70 | do { | ||
71 | unsigned long w = *(unsigned long *) buff; | ||
72 | count--; | ||
73 | buff += 4; | ||
74 | result += carry; | ||
75 | result += w; | ||
76 | carry = (w > result); | ||
77 | } while (count); | ||
78 | result += carry; | ||
79 | result = (result & 0xffff) + (result >> 16); | ||
80 | } | ||
81 | if (len & 2) { | ||
82 | result += *(unsigned short *) buff; | ||
83 | buff += 2; | ||
84 | } | ||
85 | } | ||
86 | if (len & 1) | ||
87 | result += (*buff << 8); | ||
88 | result = from32to16(result); | ||
89 | if (odd) | ||
90 | result = ((result >> 8) & 0xff) | ((result & 0xff) << 8); | ||
91 | out: | ||
92 | return result; | ||
93 | } | ||
94 | |||
95 | /* | ||
96 | * This is a version of ip_compute_csum() optimized for IP headers, | ||
97 | * which always checksum on 4 octet boundaries. | ||
98 | */ | ||
99 | __sum16 ip_fast_csum(const void *iph, unsigned int ihl) | ||
100 | { | ||
101 | return (__force __sum16)~do_csum(iph,ihl*4); | ||
102 | } | ||
103 | |||
104 | /* | ||
105 | * computes the checksum of a memory block at buff, length len, | ||
106 | * and adds in "sum" (32-bit) | ||
107 | * | ||
108 | * returns a 32-bit number suitable for feeding into itself | ||
109 | * or csum_tcpudp_magic | ||
110 | * | ||
111 | * this function must be called with even lengths, except | ||
112 | * for the last fragment, which may be odd | ||
113 | * | ||
114 | * it's best to have buff aligned on a 32-bit boundary | ||
115 | */ | ||
116 | /* | ||
117 | * Egads... That thing apparently assumes that *all* checksums it ever sees will | ||
118 | * be folded. Very likely a bug. | ||
119 | */ | ||
120 | __wsum csum_partial(const void *buff, int len, __wsum sum) | ||
121 | { | ||
122 | unsigned int result = do_csum(buff, len); | ||
123 | |||
124 | /* add in old sum, and carry.. */ | ||
125 | result += (__force u32)sum; | ||
126 | /* 16+c bits -> 16 bits */ | ||
127 | result = (result & 0xffff) + (result >> 16); | ||
128 | return (__force __wsum)result; | ||
129 | } | ||
130 | |||
131 | EXPORT_SYMBOL(csum_partial); | ||
132 | |||
133 | /* | ||
134 | * this routine is used for miscellaneous IP-like checksums, mainly | ||
135 | * in icmp.c | ||
136 | */ | ||
137 | __sum16 ip_compute_csum(const void *buff, int len) | ||
138 | { | ||
139 | return (__force __sum16)~do_csum(buff,len); | ||
140 | } | ||
141 | |||
142 | /* | ||
143 | * copy from fs while checksumming, otherwise like csum_partial | ||
144 | */ | ||
145 | |||
146 | __wsum | ||
147 | csum_partial_copy_from_user(const void __user *src, void *dst, int len, | ||
148 | __wsum sum, int *csum_err) | ||
149 | { | ||
150 | if (csum_err) *csum_err = 0; | ||
151 | memcpy(dst, (__force const void *)src, len); | ||
152 | return csum_partial(dst, len, sum); | ||
153 | } | ||
154 | |||
155 | /* | ||
156 | * copy from ds while checksumming, otherwise like csum_partial | ||
157 | */ | ||
158 | |||
159 | __wsum | ||
160 | csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum) | ||
161 | { | ||
162 | memcpy(dst, src, len); | ||
163 | return csum_partial(dst, len, sum); | ||
164 | } | ||
diff --git a/arch/h8300/lib/memcpy.S b/arch/h8300/lib/memcpy.S deleted file mode 100644 index cad325e2c0e8..000000000000 --- a/arch/h8300/lib/memcpy.S +++ /dev/null | |||
@@ -1,84 +0,0 @@ | |||
1 | ;;; memcpy.S | ||
2 | |||
3 | #include <asm/linkage.h> | ||
4 | |||
5 | #if defined(__H8300H__) | ||
6 | .h8300h | ||
7 | #endif | ||
8 | #if defined(__H8300S__) | ||
9 | .h8300s | ||
10 | #endif | ||
11 | |||
12 | .text | ||
13 | .global _memcpy | ||
14 | |||
15 | ;;; void *memcpy(void *to, void *from, size_t n) | ||
16 | _memcpy: | ||
17 | mov.l er2,er2 | ||
18 | bne 1f | ||
19 | rts | ||
20 | 1: | ||
21 | ;; address check | ||
22 | bld #0,r0l | ||
23 | bxor #0,r1l | ||
24 | bcs 4f | ||
25 | mov.l er4,@-sp | ||
26 | mov.l er0,@-sp | ||
27 | btst #0,r0l | ||
28 | beq 1f | ||
29 | ;; (aligned even) odd address | ||
30 | mov.b @er1,r3l | ||
31 | mov.b r3l,@er0 | ||
32 | adds #1,er1 | ||
33 | adds #1,er0 | ||
34 | dec.l #1,er2 | ||
35 | beq 3f | ||
36 | 1: | ||
37 | ;; n < sizeof(unsigned long) check | ||
38 | sub.l er4,er4 | ||
39 | adds #4,er4 ; loop count check value | ||
40 | cmp.l er4,er2 | ||
41 | blo 2f | ||
42 | ;; unsigned long copy | ||
43 | 1: | ||
44 | mov.l @er1,er3 | ||
45 | mov.l er3,@er0 | ||
46 | adds #4,er0 | ||
47 | adds #4,er1 | ||
48 | subs #4,er2 | ||
49 | cmp.l er4,er2 | ||
50 | bcc 1b | ||
51 | ;; rest | ||
52 | 2: | ||
53 | mov.l er2,er2 | ||
54 | beq 3f | ||
55 | 1: | ||
56 | mov.b @er1,r3l | ||
57 | mov.b r3l,@er0 | ||
58 | adds #1,er1 | ||
59 | adds #1,er0 | ||
60 | dec.l #1,er2 | ||
61 | bne 1b | ||
62 | 3: | ||
63 | mov.l @sp+,er0 | ||
64 | mov.l @sp+,er4 | ||
65 | rts | ||
66 | |||
67 | ;; odd <- even / even <- odd | ||
68 | 4: | ||
69 | mov.l er4,er3 | ||
70 | mov.l er2,er4 | ||
71 | mov.l er5,er2 | ||
72 | mov.l er1,er5 | ||
73 | mov.l er6,er1 | ||
74 | mov.l er0,er6 | ||
75 | 1: | ||
76 | eepmov.w | ||
77 | mov.w r4,r4 | ||
78 | bne 1b | ||
79 | dec.w #1,e4 | ||
80 | bpl 1b | ||
81 | mov.l er1,er6 | ||
82 | mov.l er2,er5 | ||
83 | mov.l er3,er4 | ||
84 | rts | ||
diff --git a/arch/h8300/lib/memset.S b/arch/h8300/lib/memset.S deleted file mode 100644 index 4549a64c5b79..000000000000 --- a/arch/h8300/lib/memset.S +++ /dev/null | |||
@@ -1,61 +0,0 @@ | |||
1 | /* memset.S */ | ||
2 | |||
3 | #include <asm/linkage.h> | ||
4 | |||
5 | #if defined(__H8300H__) | ||
6 | .h8300h | ||
7 | #endif | ||
8 | #if defined(__H8300S__) | ||
9 | .h8300s | ||
10 | #endif | ||
11 | .text | ||
12 | |||
13 | .global _memset | ||
14 | |||
15 | ;;void *memset(*ptr, int c, size_t count) | ||
16 | ;; ptr = er0 | ||
17 | ;; c = er1(r1l) | ||
18 | ;; count = er2 | ||
19 | _memset: | ||
20 | btst #0,r0l | ||
21 | beq 2f | ||
22 | |||
23 | ;; odd address | ||
24 | 1: | ||
25 | mov.b r1l,@er0 | ||
26 | adds #1,er0 | ||
27 | dec.l #1,er2 | ||
28 | beq 6f | ||
29 | |||
30 | ;; even address | ||
31 | 2: | ||
32 | mov.l er2,er3 | ||
33 | cmp.l #4,er2 | ||
34 | blo 4f | ||
35 | ;; count>=4 -> count/4 | ||
36 | #if defined(__H8300H__) | ||
37 | shlr.l er2 | ||
38 | shlr.l er2 | ||
39 | #endif | ||
40 | #if defined(__H8300S__) | ||
41 | shlr.l #2,er2 | ||
42 | #endif | ||
43 | ;; byte -> long | ||
44 | mov.b r1l,r1h | ||
45 | mov.w r1,e1 | ||
46 | 3: | ||
47 | mov.l er1,@er0 | ||
48 | adds #4,er0 | ||
49 | dec.l #1,er2 | ||
50 | bne 3b | ||
51 | 4: | ||
52 | ;; count % 4 | ||
53 | and.b #3,r3l | ||
54 | beq 6f | ||
55 | 5: | ||
56 | mov.b r1l,@er0 | ||
57 | adds #1,er0 | ||
58 | dec.b r3l | ||
59 | bne 5b | ||
60 | 6: | ||
61 | rts | ||
diff --git a/arch/h8300/lib/romfs.S b/arch/h8300/lib/romfs.S deleted file mode 100644 index 68910d8e1ff4..000000000000 --- a/arch/h8300/lib/romfs.S +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | /* romfs move to __ebss */ | ||
2 | |||
3 | #include <asm/linkage.h> | ||
4 | |||
5 | #if defined(__H8300H__) | ||
6 | .h8300h | ||
7 | #endif | ||
8 | #if defined(__H8300S__) | ||
9 | .h8300s | ||
10 | #endif | ||
11 | |||
12 | #define BLKOFFSET 512 | ||
13 | |||
14 | .text | ||
15 | .globl __move_romfs | ||
16 | _romfs_sig_len = 8 | ||
17 | |||
18 | __move_romfs: | ||
19 | mov.l #__sbss,er0 | ||
20 | mov.l #_romfs_sig,er1 | ||
21 | mov.b #_romfs_sig_len,r3l | ||
22 | 1: /* check romfs image */ | ||
23 | mov.b @er0+,r2l | ||
24 | mov.b @er1+,r2h | ||
25 | cmp.b r2l,r2h | ||
26 | bne 2f | ||
27 | dec.b r3l | ||
28 | bne 1b | ||
29 | |||
30 | /* find romfs image */ | ||
31 | mov.l @__sbss+8,er0 /* romfs length(be) */ | ||
32 | mov.l #__sbss,er1 | ||
33 | add.l er0,er1 /* romfs image end */ | ||
34 | mov.l #__ebss,er2 | ||
35 | add.l er0,er2 /* distination address */ | ||
36 | #if defined(CONFIG_INTELFLASH) | ||
37 | add.l #BLKOFFSET,er2 | ||
38 | #endif | ||
39 | adds #2,er0 | ||
40 | adds #1,er0 | ||
41 | shlr er0 | ||
42 | shlr er0 /* transfer length */ | ||
43 | 1: | ||
44 | mov.l @er1,er3 /* copy image */ | ||
45 | mov.l er3,@er2 | ||
46 | subs #4,er1 | ||
47 | subs #4,er2 | ||
48 | dec.l #1,er0 | ||
49 | bpl 1b | ||
50 | 2: | ||
51 | rts | ||
52 | |||
53 | .section .rodata | ||
54 | _romfs_sig: | ||
55 | .ascii "-rom1fs-" | ||
56 | |||
57 | .end | ||
diff --git a/arch/h8300/mm/Makefile b/arch/h8300/mm/Makefile deleted file mode 100644 index 5f4bc42b6453..000000000000 --- a/arch/h8300/mm/Makefile +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | # | ||
2 | # Makefile for the linux m68k-specific parts of the memory manager. | ||
3 | # | ||
4 | |||
5 | obj-y := init.o fault.o memory.o kmap.o | ||
diff --git a/arch/h8300/mm/fault.c b/arch/h8300/mm/fault.c deleted file mode 100644 index 472535977006..000000000000 --- a/arch/h8300/mm/fault.c +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/h8300/mm/fault.c | ||
3 | * | ||
4 | * Copyright (C) 1998 D. Jeff Dionne <jeff@lineo.ca>, | ||
5 | * Copyright (C) 2000 Lineo, Inc. (www.lineo.com) | ||
6 | * | ||
7 | * Based on: | ||
8 | * | ||
9 | * linux/arch/m68knommu/mm/fault.c | ||
10 | * linux/arch/m68k/mm/fault.c | ||
11 | * | ||
12 | * Copyright (C) 1995 Hamish Macdonald | ||
13 | */ | ||
14 | |||
15 | #include <linux/mman.h> | ||
16 | #include <linux/mm.h> | ||
17 | #include <linux/kernel.h> | ||
18 | #include <linux/ptrace.h> | ||
19 | |||
20 | #include <asm/pgtable.h> | ||
21 | |||
22 | /* | ||
23 | * This routine handles page faults. It determines the problem, and | ||
24 | * then passes it off to one of the appropriate routines. | ||
25 | * | ||
26 | * error_code: | ||
27 | * bit 0 == 0 means no page found, 1 means protection fault | ||
28 | * bit 1 == 0 means read, 1 means write | ||
29 | * | ||
30 | * If this routine detects a bad access, it returns 1, otherwise it | ||
31 | * returns 0. | ||
32 | */ | ||
33 | asmlinkage int do_page_fault(struct pt_regs *regs, unsigned long address, | ||
34 | unsigned long error_code) | ||
35 | { | ||
36 | #ifdef DEBUG | ||
37 | printk ("regs->sr=%#x, regs->pc=%#lx, address=%#lx, %ld\n", | ||
38 | regs->sr, regs->pc, address, error_code); | ||
39 | #endif | ||
40 | |||
41 | /* | ||
42 | * Oops. The kernel tried to access some bad page. We'll have to | ||
43 | * terminate things with extreme prejudice. | ||
44 | */ | ||
45 | if ((unsigned long) address < PAGE_SIZE) { | ||
46 | printk(KERN_ALERT "Unable to handle kernel NULL pointer dereference"); | ||
47 | } else | ||
48 | printk(KERN_ALERT "Unable to handle kernel access"); | ||
49 | printk(" at virtual address %08lx\n",address); | ||
50 | if (!user_mode(regs)) | ||
51 | die("Oops", regs, error_code); | ||
52 | do_exit(SIGKILL); | ||
53 | |||
54 | return 1; | ||
55 | } | ||
56 | |||
diff --git a/arch/h8300/mm/init.c b/arch/h8300/mm/init.c deleted file mode 100644 index 6c1251e491af..000000000000 --- a/arch/h8300/mm/init.c +++ /dev/null | |||
@@ -1,155 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/h8300/mm/init.c | ||
3 | * | ||
4 | * Copyright (C) 1998 D. Jeff Dionne <jeff@lineo.ca>, | ||
5 | * Kenneth Albanowski <kjahds@kjahds.com>, | ||
6 | * Copyright (C) 2000 Lineo, Inc. (www.lineo.com) | ||
7 | * | ||
8 | * Based on: | ||
9 | * | ||
10 | * linux/arch/m68knommu/mm/init.c | ||
11 | * linux/arch/m68k/mm/init.c | ||
12 | * | ||
13 | * Copyright (C) 1995 Hamish Macdonald | ||
14 | * | ||
15 | * JAN/1999 -- hacked to support ColdFire (gerg@snapgear.com) | ||
16 | * DEC/2000 -- linux 2.4 support <davidm@snapgear.com> | ||
17 | */ | ||
18 | |||
19 | #include <linux/signal.h> | ||
20 | #include <linux/sched.h> | ||
21 | #include <linux/kernel.h> | ||
22 | #include <linux/errno.h> | ||
23 | #include <linux/string.h> | ||
24 | #include <linux/types.h> | ||
25 | #include <linux/ptrace.h> | ||
26 | #include <linux/mman.h> | ||
27 | #include <linux/mm.h> | ||
28 | #include <linux/swap.h> | ||
29 | #include <linux/init.h> | ||
30 | #include <linux/highmem.h> | ||
31 | #include <linux/pagemap.h> | ||
32 | #include <linux/bootmem.h> | ||
33 | #include <linux/gfp.h> | ||
34 | |||
35 | #include <asm/setup.h> | ||
36 | #include <asm/segment.h> | ||
37 | #include <asm/page.h> | ||
38 | #include <asm/pgtable.h> | ||
39 | #include <asm/sections.h> | ||
40 | |||
41 | #undef DEBUG | ||
42 | |||
43 | /* | ||
44 | * BAD_PAGE is the page that is used for page faults when linux | ||
45 | * is out-of-memory. Older versions of linux just did a | ||
46 | * do_exit(), but using this instead means there is less risk | ||
47 | * for a process dying in kernel mode, possibly leaving a inode | ||
48 | * unused etc.. | ||
49 | * | ||
50 | * BAD_PAGETABLE is the accompanying page-table: it is initialized | ||
51 | * to point to BAD_PAGE entries. | ||
52 | * | ||
53 | * ZERO_PAGE is a special page that is used for zero-initialized | ||
54 | * data and COW. | ||
55 | */ | ||
56 | static unsigned long empty_bad_page_table; | ||
57 | |||
58 | static unsigned long empty_bad_page; | ||
59 | |||
60 | unsigned long empty_zero_page; | ||
61 | |||
62 | extern unsigned long rom_length; | ||
63 | |||
64 | extern unsigned long memory_start; | ||
65 | extern unsigned long memory_end; | ||
66 | |||
67 | /* | ||
68 | * paging_init() continues the virtual memory environment setup which | ||
69 | * was begun by the code in arch/head.S. | ||
70 | * The parameters are pointers to where to stick the starting and ending | ||
71 | * addresses of available kernel virtual memory. | ||
72 | */ | ||
73 | void __init paging_init(void) | ||
74 | { | ||
75 | /* | ||
76 | * Make sure start_mem is page aligned, otherwise bootmem and | ||
77 | * page_alloc get different views og the world. | ||
78 | */ | ||
79 | #ifdef DEBUG | ||
80 | unsigned long start_mem = PAGE_ALIGN(memory_start); | ||
81 | #endif | ||
82 | unsigned long end_mem = memory_end & PAGE_MASK; | ||
83 | |||
84 | #ifdef DEBUG | ||
85 | printk ("start_mem is %#lx\nvirtual_end is %#lx\n", | ||
86 | start_mem, end_mem); | ||
87 | #endif | ||
88 | |||
89 | /* | ||
90 | * Initialize the bad page table and bad page to point | ||
91 | * to a couple of allocated pages. | ||
92 | */ | ||
93 | empty_bad_page_table = (unsigned long)alloc_bootmem_pages(PAGE_SIZE); | ||
94 | empty_bad_page = (unsigned long)alloc_bootmem_pages(PAGE_SIZE); | ||
95 | empty_zero_page = (unsigned long)alloc_bootmem_pages(PAGE_SIZE); | ||
96 | memset((void *)empty_zero_page, 0, PAGE_SIZE); | ||
97 | |||
98 | /* | ||
99 | * Set up SFC/DFC registers (user data space). | ||
100 | */ | ||
101 | set_fs (USER_DS); | ||
102 | |||
103 | #ifdef DEBUG | ||
104 | printk ("before free_area_init\n"); | ||
105 | |||
106 | printk ("free_area_init -> start_mem is %#lx\nvirtual_end is %#lx\n", | ||
107 | start_mem, end_mem); | ||
108 | #endif | ||
109 | |||
110 | { | ||
111 | unsigned long zones_size[MAX_NR_ZONES] = {0, }; | ||
112 | |||
113 | zones_size[ZONE_DMA] = 0 >> PAGE_SHIFT; | ||
114 | zones_size[ZONE_NORMAL] = (end_mem - PAGE_OFFSET) >> PAGE_SHIFT; | ||
115 | #ifdef CONFIG_HIGHMEM | ||
116 | zones_size[ZONE_HIGHMEM] = 0; | ||
117 | #endif | ||
118 | free_area_init(zones_size); | ||
119 | } | ||
120 | } | ||
121 | |||
122 | void __init mem_init(void) | ||
123 | { | ||
124 | unsigned long codesize = _etext - _stext; | ||
125 | |||
126 | pr_devel("Mem_init: start=%lx, end=%lx\n", memory_start, memory_end); | ||
127 | |||
128 | high_memory = (void *) (memory_end & PAGE_MASK); | ||
129 | max_mapnr = MAP_NR(high_memory); | ||
130 | |||
131 | /* this will put all low memory onto the freelists */ | ||
132 | free_all_bootmem(); | ||
133 | |||
134 | mem_init_print_info(NULL); | ||
135 | if (rom_length > 0 && rom_length > codesize) | ||
136 | pr_info("Memory available: %luK/%luK ROM\n", | ||
137 | (rom_length - codesize) >> 10, rom_length >> 10); | ||
138 | } | ||
139 | |||
140 | |||
141 | #ifdef CONFIG_BLK_DEV_INITRD | ||
142 | void free_initrd_mem(unsigned long start, unsigned long end) | ||
143 | { | ||
144 | free_reserved_area((void *)start, (void *)end, -1, "initrd"); | ||
145 | } | ||
146 | #endif | ||
147 | |||
148 | void | ||
149 | free_initmem(void) | ||
150 | { | ||
151 | #ifdef CONFIG_RAMKERNEL | ||
152 | free_initmem_default(-1); | ||
153 | #endif | ||
154 | } | ||
155 | |||
diff --git a/arch/h8300/mm/kmap.c b/arch/h8300/mm/kmap.c deleted file mode 100644 index f79edcdadf39..000000000000 --- a/arch/h8300/mm/kmap.c +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/h8300/mm/kmap.c | ||
3 | * | ||
4 | * Based on | ||
5 | * linux/arch/m68knommu/mm/kmap.c | ||
6 | * | ||
7 | * Copyright (C) 2000 Lineo, <davidm@snapgear.com> | ||
8 | * Copyright (C) 2000-2002 David McCullough <davidm@snapgear.com> | ||
9 | */ | ||
10 | |||
11 | #include <linux/mm.h> | ||
12 | #include <linux/kernel.h> | ||
13 | #include <linux/string.h> | ||
14 | #include <linux/types.h> | ||
15 | #include <linux/vmalloc.h> | ||
16 | |||
17 | #include <asm/setup.h> | ||
18 | #include <asm/segment.h> | ||
19 | #include <asm/page.h> | ||
20 | #include <asm/pgalloc.h> | ||
21 | #include <asm/io.h> | ||
22 | |||
23 | #undef DEBUG | ||
24 | |||
25 | #define VIRT_OFFSET (0x01000000) | ||
26 | |||
27 | /* | ||
28 | * Map some physical address range into the kernel address space. | ||
29 | */ | ||
30 | void *__ioremap(unsigned long physaddr, unsigned long size, int cacheflag) | ||
31 | { | ||
32 | return (void *)(physaddr + VIRT_OFFSET); | ||
33 | } | ||
34 | |||
35 | /* | ||
36 | * Unmap a ioremap()ed region again. | ||
37 | */ | ||
38 | void iounmap(void *addr) | ||
39 | { | ||
40 | } | ||
41 | |||
42 | /* | ||
43 | * __iounmap unmaps nearly everything, so be careful | ||
44 | * it doesn't free currently pointer/page tables anymore but it | ||
45 | * wans't used anyway and might be added later. | ||
46 | */ | ||
47 | void __iounmap(void *addr, unsigned long size) | ||
48 | { | ||
49 | } | ||
50 | |||
51 | /* | ||
52 | * Set new cache mode for some kernel address space. | ||
53 | * The caller must push data for that range itself, if such data may already | ||
54 | * be in the cache. | ||
55 | */ | ||
56 | void kernel_set_cachemode(void *addr, unsigned long size, int cmode) | ||
57 | { | ||
58 | } | ||
diff --git a/arch/h8300/mm/memory.c b/arch/h8300/mm/memory.c deleted file mode 100644 index 06e364641392..000000000000 --- a/arch/h8300/mm/memory.c +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/h8300/mm/memory.c | ||
3 | * | ||
4 | * Copyright (C) 2002 Yoshinori Sato <ysato@users.sourceforge.jp>, | ||
5 | * | ||
6 | * Based on: | ||
7 | * | ||
8 | * linux/arch/m68knommu/mm/memory.c | ||
9 | * | ||
10 | * Copyright (C) 1998 Kenneth Albanowski <kjahds@kjahds.com>, | ||
11 | * Copyright (C) 1999-2002, Greg Ungerer (gerg@snapgear.com) | ||
12 | * | ||
13 | * Based on: | ||
14 | * | ||
15 | * linux/arch/m68k/mm/memory.c | ||
16 | * | ||
17 | * Copyright (C) 1995 Hamish Macdonald | ||
18 | */ | ||
19 | |||
20 | #include <linux/mm.h> | ||
21 | #include <linux/kernel.h> | ||
22 | #include <linux/string.h> | ||
23 | #include <linux/types.h> | ||
24 | |||
25 | #include <asm/setup.h> | ||
26 | #include <asm/segment.h> | ||
27 | #include <asm/page.h> | ||
28 | #include <asm/pgtable.h> | ||
29 | #include <asm/traps.h> | ||
30 | #include <asm/io.h> | ||
31 | |||
32 | void cache_clear (unsigned long paddr, int len) | ||
33 | { | ||
34 | } | ||
35 | |||
36 | |||
37 | void cache_push (unsigned long paddr, int len) | ||
38 | { | ||
39 | } | ||
40 | |||
41 | void cache_push_v (unsigned long vaddr, int len) | ||
42 | { | ||
43 | } | ||
44 | |||
45 | /* | ||
46 | * Map some physical address range into the kernel address space. | ||
47 | */ | ||
48 | |||
49 | unsigned long kernel_map(unsigned long paddr, unsigned long size, | ||
50 | int nocacheflag, unsigned long *memavailp ) | ||
51 | { | ||
52 | return paddr; | ||
53 | } | ||
54 | |||
diff --git a/arch/h8300/platform/h8300h/Makefile b/arch/h8300/platform/h8300h/Makefile deleted file mode 100644 index 420f73b0d962..000000000000 --- a/arch/h8300/platform/h8300h/Makefile +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | # | ||
2 | # Makefile for the linux kernel. | ||
3 | # | ||
4 | # Reuse any files we can from the H8/300H | ||
5 | # | ||
6 | |||
7 | obj-y := irq.o ptrace_h8300h.o | ||
diff --git a/arch/h8300/platform/h8300h/aki3068net/Makefile b/arch/h8300/platform/h8300h/aki3068net/Makefile deleted file mode 100644 index b7ff78050b7f..000000000000 --- a/arch/h8300/platform/h8300h/aki3068net/Makefile +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | # | ||
2 | # Makefile for the linux kernel. | ||
3 | # | ||
4 | |||
5 | extra-y := crt0_ram.o | ||
diff --git a/arch/h8300/platform/h8300h/aki3068net/crt0_ram.S b/arch/h8300/platform/h8300h/aki3068net/crt0_ram.S deleted file mode 100644 index b2ad0f2d0417..000000000000 --- a/arch/h8300/platform/h8300h/aki3068net/crt0_ram.S +++ /dev/null | |||
@@ -1,110 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/h8300/platform/h8300h/aki3068net/crt0_ram.S | ||
3 | * | ||
4 | * Yoshinori Sato <ysato@users.sourceforge.jp> | ||
5 | * | ||
6 | * Platform depend startup | ||
7 | * Target Archtecture: AE-3068 (aka. aki3068net) | ||
8 | * Memory Layout : RAM | ||
9 | */ | ||
10 | |||
11 | #define ASSEMBLY | ||
12 | |||
13 | #include <asm/linkage.h> | ||
14 | |||
15 | #if !defined(CONFIG_BLKDEV_RESERVE) | ||
16 | #if defined(CONFIG_GDB_DEBUG) | ||
17 | #define RAMEND (__ramend - 0xc000) | ||
18 | #else | ||
19 | #define RAMEND __ramend | ||
20 | #endif | ||
21 | #else | ||
22 | #define RAMEND CONFIG_BLKDEV_RESERVE_ADDRESS | ||
23 | #endif | ||
24 | |||
25 | .global __start | ||
26 | .global _command_line | ||
27 | .global __platform_gpio_table | ||
28 | .global __target_name | ||
29 | |||
30 | .h8300h | ||
31 | |||
32 | .section .text | ||
33 | .file "crt0_ram.S" | ||
34 | |||
35 | /* CPU Reset entry */ | ||
36 | __start: | ||
37 | mov.l #RAMEND,sp | ||
38 | ldc #0x80,ccr | ||
39 | |||
40 | /* Peripheral Setup */ | ||
41 | |||
42 | #if defined(CONFIG_MTD_UCLINUX) | ||
43 | /* move romfs image */ | ||
44 | jsr @__move_romfs | ||
45 | #endif | ||
46 | |||
47 | /* .bss clear */ | ||
48 | mov.l #__sbss,er5 | ||
49 | mov.l #__ebss,er4 | ||
50 | sub.l er5,er4 | ||
51 | shlr er4 | ||
52 | shlr er4 | ||
53 | sub.l er0,er0 | ||
54 | 1: | ||
55 | mov.l er0,@er5 | ||
56 | adds #4,er5 | ||
57 | dec.l #1,er4 | ||
58 | bne 1b | ||
59 | |||
60 | /* copy kernel commandline */ | ||
61 | mov.l #COMMAND_START,er5 | ||
62 | mov.l #_command_line,er6 | ||
63 | mov.w #512,r4 | ||
64 | eepmov.w | ||
65 | |||
66 | /* uClinux kernel start */ | ||
67 | ldc #0x90,ccr /* running kernel */ | ||
68 | mov.l #_init_thread_union,sp | ||
69 | add.l #0x2000,sp | ||
70 | jsr @_start_kernel | ||
71 | _exit: | ||
72 | |||
73 | jmp _exit | ||
74 | |||
75 | rts | ||
76 | |||
77 | /* I/O port assign information */ | ||
78 | __platform_gpio_table: | ||
79 | mov.l #gpio_table,er0 | ||
80 | rts | ||
81 | |||
82 | gpio_table: | ||
83 | ;; P1DDR | ||
84 | .byte 0xff,0xff | ||
85 | ;; P2DDR | ||
86 | .byte 0xff,0xff | ||
87 | ;; P3DDR | ||
88 | .byte 0xff,0x00 | ||
89 | ;; P4DDR | ||
90 | .byte 0x00,0x00 | ||
91 | ;; P5DDR | ||
92 | .byte 0x01,0x01 | ||
93 | ;; P6DDR | ||
94 | .byte 0x00,0x00 | ||
95 | ;; dummy | ||
96 | .byte 0x00,0x00 | ||
97 | ;; P8DDR | ||
98 | .byte 0x0c,0x0c | ||
99 | ;; P9DDR | ||
100 | .byte 0x00,0x00 | ||
101 | ;; PADDR | ||
102 | .byte 0x00,0x00 | ||
103 | ;; PBDDR | ||
104 | .byte 0x30,0x30 | ||
105 | |||
106 | __target_name: | ||
107 | .asciz "AE-3068" | ||
108 | |||
109 | .section .bootvec,"ax" | ||
110 | jmp @__start | ||
diff --git a/arch/h8300/platform/h8300h/generic/Makefile b/arch/h8300/platform/h8300h/generic/Makefile deleted file mode 100644 index 2b12a170209e..000000000000 --- a/arch/h8300/platform/h8300h/generic/Makefile +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | # | ||
2 | # Makefile for the linux kernel. | ||
3 | # | ||
4 | |||
5 | extra-y := crt0_$(MODEL).o | ||
diff --git a/arch/h8300/platform/h8300h/generic/crt0_ram.S b/arch/h8300/platform/h8300h/generic/crt0_ram.S deleted file mode 100644 index 5ab7d9c12910..000000000000 --- a/arch/h8300/platform/h8300h/generic/crt0_ram.S +++ /dev/null | |||
@@ -1,107 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/h8300/platform/h8300h/generic/crt0_ram.S | ||
3 | * | ||
4 | * Yoshinori Sato <ysato@users.sourceforge.jp> | ||
5 | * | ||
6 | * Platform depend startup | ||
7 | * Target Archtecture: AE-3068 (aka. aki3068net) | ||
8 | * Memory Layout : RAM | ||
9 | */ | ||
10 | |||
11 | #define ASSEMBLY | ||
12 | |||
13 | #include <asm/linkage.h> | ||
14 | |||
15 | #if !defined(CONFIG_BLKDEV_RESERVE) | ||
16 | #if defined(CONFIG_GDB_DEBUG) | ||
17 | #define RAMEND (__ramend - 0xc000) | ||
18 | #else | ||
19 | #define RAMEND __ramend | ||
20 | #endif | ||
21 | #else | ||
22 | #define RAMEND CONFIG_BLKDEV_RESERVE_ADDRESS | ||
23 | #endif | ||
24 | |||
25 | .global __start | ||
26 | .global _command_line | ||
27 | .global __platform_gpio_table | ||
28 | .global __target_name | ||
29 | |||
30 | .h8300h | ||
31 | |||
32 | .section .text | ||
33 | .file "crt0_ram.S" | ||
34 | |||
35 | /* CPU Reset entry */ | ||
36 | __start: | ||
37 | mov.l #RAMEND,sp | ||
38 | ldc #0x80,ccr | ||
39 | |||
40 | /* Peripheral Setup */ | ||
41 | |||
42 | #if defined(CONFIG_BLK_DEV_BLKMEM) | ||
43 | /* move romfs image */ | ||
44 | jsr @__move_romfs | ||
45 | #endif | ||
46 | |||
47 | /* .bss clear */ | ||
48 | mov.l #__sbss,er5 | ||
49 | mov.l #__ebss,er4 | ||
50 | sub.l er5,er4 | ||
51 | shlr er4 | ||
52 | shlr er4 | ||
53 | sub.l er0,er0 | ||
54 | 1: | ||
55 | mov.l er0,@er5 | ||
56 | adds #4,er5 | ||
57 | dec.l #1,er4 | ||
58 | bne 1b | ||
59 | |||
60 | /* copy kernel commandline */ | ||
61 | mov.l #COMMAND_START,er5 | ||
62 | mov.l #_command_line,er6 | ||
63 | mov.w #512,r4 | ||
64 | eepmov.w | ||
65 | |||
66 | /* uClinux kernel start */ | ||
67 | ldc #0x90,ccr /* running kernel */ | ||
68 | mov.l #_init_thread_union,sp | ||
69 | add.l #0x2000,sp | ||
70 | jsr @_start_kernel | ||
71 | _exit: | ||
72 | |||
73 | jmp _exit | ||
74 | |||
75 | rts | ||
76 | |||
77 | /* I/O port assign information */ | ||
78 | __platform_gpio_table: | ||
79 | mov.l #gpio_table,er0 | ||
80 | rts | ||
81 | |||
82 | gpio_table: | ||
83 | ;; P1DDR | ||
84 | .byte 0x00,0x00 | ||
85 | ;; P2DDR | ||
86 | .byte 0x00,0x00 | ||
87 | ;; P3DDR | ||
88 | .byte 0x00,0x00 | ||
89 | ;; P4DDR | ||
90 | .byte 0x00,0x00 | ||
91 | ;; P5DDR | ||
92 | .byte 0x00,0x00 | ||
93 | ;; P6DDR | ||
94 | .byte 0x00,0x00 | ||
95 | ;; dummy | ||
96 | .byte 0x00,0x00 | ||
97 | ;; P8DDR | ||
98 | .byte 0x00,0x00 | ||
99 | ;; P9DDR | ||
100 | .byte 0x00,0x00 | ||
101 | ;; PADDR | ||
102 | .byte 0x00,0x00 | ||
103 | ;; PBDDR | ||
104 | .byte 0x00,0x00 | ||
105 | |||
106 | __target_name: | ||
107 | .asciz "generic" | ||
diff --git a/arch/h8300/platform/h8300h/generic/crt0_rom.S b/arch/h8300/platform/h8300h/generic/crt0_rom.S deleted file mode 100644 index dda1dfa15a5e..000000000000 --- a/arch/h8300/platform/h8300h/generic/crt0_rom.S +++ /dev/null | |||
@@ -1,122 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/h8300/platform/h8300h/generic/crt0_rom.S | ||
3 | * | ||
4 | * Yoshinori Sato <ysato@users.sourceforge.jp> | ||
5 | * | ||
6 | * Platform depend startup | ||
7 | * Target Archtecture: generic | ||
8 | * Memory Layout : ROM | ||
9 | */ | ||
10 | |||
11 | #define ASSEMBLY | ||
12 | |||
13 | #include <asm/linkage.h> | ||
14 | |||
15 | .global __start | ||
16 | .global __command_line | ||
17 | .global __platform_gpio_table | ||
18 | .global __target_name | ||
19 | |||
20 | .h8300h | ||
21 | .section .text | ||
22 | .file "crt0_rom.S" | ||
23 | |||
24 | /* CPU Reset entry */ | ||
25 | __start: | ||
26 | mov.l #__ramend,sp | ||
27 | ldc #0x80,ccr | ||
28 | |||
29 | /* Peripheral Setup */ | ||
30 | |||
31 | /* .bss clear */ | ||
32 | mov.l #__sbss,er5 | ||
33 | mov.l #__ebss,er4 | ||
34 | sub.l er5,er4 | ||
35 | shlr er4 | ||
36 | shlr er4 | ||
37 | sub.l er0,er0 | ||
38 | 1: | ||
39 | mov.l er0,@er5 | ||
40 | adds #4,er5 | ||
41 | dec.l #1,er4 | ||
42 | bne 1b | ||
43 | |||
44 | /* copy .data */ | ||
45 | #if !defined(CONFIG_H8300H_SIM) | ||
46 | /* copy .data */ | ||
47 | mov.l #__begin_data,er5 | ||
48 | mov.l #__sdata,er6 | ||
49 | mov.l #__edata,er4 | ||
50 | sub.l er6,er4 | ||
51 | shlr.l er4 | ||
52 | shlr.l er4 | ||
53 | 1: | ||
54 | mov.l @er5+,er0 | ||
55 | mov.l er0,@er6 | ||
56 | adds #4,er6 | ||
57 | dec.l #1,er4 | ||
58 | bne 1b | ||
59 | #endif | ||
60 | |||
61 | /* copy kernel commandline */ | ||
62 | mov.l #COMMAND_START,er5 | ||
63 | mov.l #__command_line,er6 | ||
64 | mov.w #512,r4 | ||
65 | eepmov.w | ||
66 | |||
67 | /* linux kernel start */ | ||
68 | ldc #0x90,ccr /* running kernel */ | ||
69 | mov.l #_init_thread_union,sp | ||
70 | add.l #0x2000,sp | ||
71 | jsr @_start_kernel | ||
72 | _exit: | ||
73 | |||
74 | jmp _exit | ||
75 | |||
76 | rts | ||
77 | |||
78 | /* I/O port assign information */ | ||
79 | __platform_gpio_table: | ||
80 | mov.l #gpio_table,er0 | ||
81 | rts | ||
82 | |||
83 | gpio_table: | ||
84 | ;; P1DDR | ||
85 | .byte 0x00,0x00 | ||
86 | ;; P2DDR | ||
87 | .byte 0x00,0x00 | ||
88 | ;; P3DDR | ||
89 | .byte 0x00,0x00 | ||
90 | ;; P4DDR | ||
91 | .byte 0x00,0x00 | ||
92 | ;; P5DDR | ||
93 | .byte 0x00,0x00 | ||
94 | ;; P6DDR | ||
95 | .byte 0x00,0x00 | ||
96 | ;; dummy | ||
97 | .byte 0x00,0x00 | ||
98 | ;; P8DDR | ||
99 | .byte 0x00,0x00 | ||
100 | ;; P9DDR | ||
101 | .byte 0x00,0x00 | ||
102 | ;; PADDR | ||
103 | .byte 0x00,0x00 | ||
104 | ;; PBDDR | ||
105 | .byte 0x00,0x00 | ||
106 | |||
107 | .section .rodata | ||
108 | __target_name: | ||
109 | .asciz "generic" | ||
110 | |||
111 | .section .bss | ||
112 | __command_line: | ||
113 | .space 512 | ||
114 | |||
115 | /* interrupt vector */ | ||
116 | .section .vectors,"ax" | ||
117 | .long __start | ||
118 | vector = 1 | ||
119 | .rept 64-1 | ||
120 | .long _interrupt_redirect_table+vector*4 | ||
121 | vector = vector + 1 | ||
122 | .endr | ||
diff --git a/arch/h8300/platform/h8300h/h8max/Makefile b/arch/h8300/platform/h8300h/h8max/Makefile deleted file mode 100644 index b7ff78050b7f..000000000000 --- a/arch/h8300/platform/h8300h/h8max/Makefile +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | # | ||
2 | # Makefile for the linux kernel. | ||
3 | # | ||
4 | |||
5 | extra-y := crt0_ram.o | ||
diff --git a/arch/h8300/platform/h8300h/h8max/crt0_ram.S b/arch/h8300/platform/h8300h/h8max/crt0_ram.S deleted file mode 100644 index 6a0d4e2d9ec6..000000000000 --- a/arch/h8300/platform/h8300h/h8max/crt0_ram.S +++ /dev/null | |||
@@ -1,110 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/h8300/platform/h8300h/h8max/crt0_ram.S | ||
3 | * | ||
4 | * Yoshinori Sato <ysato@users.sourceforge.jp> | ||
5 | * | ||
6 | * Platform depend startup | ||
7 | * Target Archtecture: H8MAX | ||
8 | * Memory Layout : RAM | ||
9 | */ | ||
10 | |||
11 | #define ASSEMBLY | ||
12 | |||
13 | #include <asm/linkage.h> | ||
14 | |||
15 | #if !defined(CONFIG_BLKDEV_RESERVE) | ||
16 | #if defined(CONFIG_GDB_DEBUG) | ||
17 | #define RAMEND (__ramend - 0xc000) | ||
18 | #else | ||
19 | #define RAMEND __ramend | ||
20 | #endif | ||
21 | #else | ||
22 | #define RAMEND CONFIG_BLKDEV_RESERVE_ADDRESS | ||
23 | #endif | ||
24 | |||
25 | .global __start | ||
26 | .global _command_line | ||
27 | .global __platform_gpio_table | ||
28 | .global __target_name | ||
29 | |||
30 | .h8300h | ||
31 | |||
32 | .section .text | ||
33 | .file "crt0_ram.S" | ||
34 | |||
35 | /* CPU Reset entry */ | ||
36 | __start: | ||
37 | mov.l #RAMEND,sp | ||
38 | ldc #0x80,ccr | ||
39 | |||
40 | /* Peripheral Setup */ | ||
41 | |||
42 | #if defined(CONFIG_MTD_UCLINUX) | ||
43 | /* move romfs image */ | ||
44 | jsr @__move_romfs | ||
45 | #endif | ||
46 | |||
47 | /* .bss clear */ | ||
48 | mov.l #__sbss,er5 | ||
49 | mov.l #__ebss,er4 | ||
50 | sub.l er5,er4 | ||
51 | shlr er4 | ||
52 | shlr er4 | ||
53 | sub.l er0,er0 | ||
54 | 1: | ||
55 | mov.l er0,@er5 | ||
56 | adds #4,er5 | ||
57 | dec.l #1,er4 | ||
58 | bne 1b | ||
59 | |||
60 | /* copy kernel commandline */ | ||
61 | mov.l #COMMAND_START,er5 | ||
62 | mov.l #_command_line,er6 | ||
63 | mov.w #512,r4 | ||
64 | eepmov.w | ||
65 | |||
66 | /* uClinux kernel start */ | ||
67 | ldc #0x90,ccr /* running kernel */ | ||
68 | mov.l #_init_thread_union,sp | ||
69 | add.l #0x2000,sp | ||
70 | jsr @_start_kernel | ||
71 | _exit: | ||
72 | |||
73 | jmp _exit | ||
74 | |||
75 | rts | ||
76 | |||
77 | /* I/O port assign information */ | ||
78 | __platform_gpio_table: | ||
79 | mov.l #gpio_table,er0 | ||
80 | rts | ||
81 | |||
82 | gpio_table: | ||
83 | ;; P1DDR | ||
84 | .byte 0xff,0xff | ||
85 | ;; P2DDR | ||
86 | .byte 0xff,0xff | ||
87 | ;; P3DDR | ||
88 | .byte 0x00,0x00 | ||
89 | ;; P4DDR | ||
90 | .byte 0x00,0x00 | ||
91 | ;; P5DDR | ||
92 | .byte 0x01,0x01 | ||
93 | ;; P6DDR | ||
94 | .byte 0xf6,0xf6 | ||
95 | ;; dummy | ||
96 | .byte 0x00,0x00 | ||
97 | ;; P8DDR | ||
98 | .byte 0xee,0xee | ||
99 | ;; P9DDR | ||
100 | .byte 0x00,0x00 | ||
101 | ;; PADDR | ||
102 | .byte 0x00,0x00 | ||
103 | ;; PBDDR | ||
104 | .byte 0x30,0x30 | ||
105 | |||
106 | __target_name: | ||
107 | .asciz "H8MAX" | ||
108 | |||
109 | .section .bootvec,"ax" | ||
110 | jmp @__start | ||
diff --git a/arch/h8300/platform/h8300h/irq.c b/arch/h8300/platform/h8300h/irq.c deleted file mode 100644 index 0a50353e09d5..000000000000 --- a/arch/h8300/platform/h8300h/irq.c +++ /dev/null | |||
@@ -1,82 +0,0 @@ | |||
1 | /* | ||
2 | * Interrupt handling H8/300H depend. | ||
3 | * Yoshinori Sato <ysato@users.sourceforge.jp> | ||
4 | * | ||
5 | */ | ||
6 | |||
7 | #include <linux/init.h> | ||
8 | #include <linux/errno.h> | ||
9 | |||
10 | #include <asm/ptrace.h> | ||
11 | #include <asm/traps.h> | ||
12 | #include <asm/irq.h> | ||
13 | #include <asm/io.h> | ||
14 | #include <asm/gpio-internal.h> | ||
15 | #include <asm/regs306x.h> | ||
16 | |||
17 | const int __initconst h8300_saved_vectors[] = { | ||
18 | #if defined(CONFIG_GDB_DEBUG) | ||
19 | TRAP3_VEC, /* TRAPA #3 is GDB breakpoint */ | ||
20 | #endif | ||
21 | -1, | ||
22 | }; | ||
23 | |||
24 | const h8300_vector __initconst h8300_trap_table[] = { | ||
25 | 0, 0, 0, 0, 0, 0, 0, 0, | ||
26 | system_call, | ||
27 | 0, | ||
28 | 0, | ||
29 | trace_break, | ||
30 | }; | ||
31 | |||
32 | int h8300_enable_irq_pin(unsigned int irq) | ||
33 | { | ||
34 | int bitmask; | ||
35 | if (irq < EXT_IRQ0 || irq > EXT_IRQ5) | ||
36 | return 0; | ||
37 | |||
38 | /* initialize IRQ pin */ | ||
39 | bitmask = 1 << (irq - EXT_IRQ0); | ||
40 | switch(irq) { | ||
41 | case EXT_IRQ0: | ||
42 | case EXT_IRQ1: | ||
43 | case EXT_IRQ2: | ||
44 | case EXT_IRQ3: | ||
45 | if (H8300_GPIO_RESERVE(H8300_GPIO_P8, bitmask) == 0) | ||
46 | return -EBUSY; | ||
47 | H8300_GPIO_DDR(H8300_GPIO_P8, bitmask, H8300_GPIO_INPUT); | ||
48 | break; | ||
49 | case EXT_IRQ4: | ||
50 | case EXT_IRQ5: | ||
51 | if (H8300_GPIO_RESERVE(H8300_GPIO_P9, bitmask) == 0) | ||
52 | return -EBUSY; | ||
53 | H8300_GPIO_DDR(H8300_GPIO_P9, bitmask, H8300_GPIO_INPUT); | ||
54 | break; | ||
55 | } | ||
56 | |||
57 | return 0; | ||
58 | } | ||
59 | |||
60 | void h8300_disable_irq_pin(unsigned int irq) | ||
61 | { | ||
62 | int bitmask; | ||
63 | if (irq < EXT_IRQ0 || irq > EXT_IRQ5) | ||
64 | return; | ||
65 | |||
66 | /* disable interrupt & release IRQ pin */ | ||
67 | bitmask = 1 << (irq - EXT_IRQ0); | ||
68 | switch(irq) { | ||
69 | case EXT_IRQ0: | ||
70 | case EXT_IRQ1: | ||
71 | case EXT_IRQ2: | ||
72 | case EXT_IRQ3: | ||
73 | *(volatile unsigned char *)IER &= ~bitmask; | ||
74 | H8300_GPIO_FREE(H8300_GPIO_P8, bitmask); | ||
75 | break ; | ||
76 | case EXT_IRQ4: | ||
77 | case EXT_IRQ5: | ||
78 | *(volatile unsigned char *)IER &= ~bitmask; | ||
79 | H8300_GPIO_FREE(H8300_GPIO_P9, bitmask); | ||
80 | break; | ||
81 | } | ||
82 | } | ||
diff --git a/arch/h8300/platform/h8300h/ptrace_h8300h.c b/arch/h8300/platform/h8300h/ptrace_h8300h.c deleted file mode 100644 index 4f1ed0279633..000000000000 --- a/arch/h8300/platform/h8300h/ptrace_h8300h.c +++ /dev/null | |||
@@ -1,284 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/h8300/platform/h8300h/ptrace_h8300h.c | ||
3 | * ptrace cpu depend helper functions | ||
4 | * | ||
5 | * Yoshinori Sato <ysato@users.sourceforge.jp> | ||
6 | * | ||
7 | * This file is subject to the terms and conditions of the GNU General | ||
8 | * Public License. See the file COPYING in the main directory of | ||
9 | * this archive for more details. | ||
10 | */ | ||
11 | |||
12 | #include <linux/linkage.h> | ||
13 | #include <linux/sched.h> | ||
14 | #include <asm/ptrace.h> | ||
15 | |||
16 | #define CCR_MASK 0x6f /* mode/imask not set */ | ||
17 | #define BREAKINST 0x5730 /* trapa #3 */ | ||
18 | |||
19 | /* Mapping from PT_xxx to the stack offset at which the register is | ||
20 | saved. Notice that usp has no stack-slot and needs to be treated | ||
21 | specially (see get_reg/put_reg below). */ | ||
22 | static const int h8300_register_offset[] = { | ||
23 | PT_REG(er1), PT_REG(er2), PT_REG(er3), PT_REG(er4), | ||
24 | PT_REG(er5), PT_REG(er6), PT_REG(er0), PT_REG(orig_er0), | ||
25 | PT_REG(ccr), PT_REG(pc) | ||
26 | }; | ||
27 | |||
28 | /* read register */ | ||
29 | long h8300_get_reg(struct task_struct *task, int regno) | ||
30 | { | ||
31 | switch (regno) { | ||
32 | case PT_USP: | ||
33 | return task->thread.usp + sizeof(long)*2; | ||
34 | case PT_CCR: | ||
35 | return *(unsigned short *)(task->thread.esp0 + h8300_register_offset[regno]); | ||
36 | default: | ||
37 | return *(unsigned long *)(task->thread.esp0 + h8300_register_offset[regno]); | ||
38 | } | ||
39 | } | ||
40 | |||
41 | /* write register */ | ||
42 | int h8300_put_reg(struct task_struct *task, int regno, unsigned long data) | ||
43 | { | ||
44 | unsigned short oldccr; | ||
45 | switch (regno) { | ||
46 | case PT_USP: | ||
47 | task->thread.usp = data - sizeof(long)*2; | ||
48 | case PT_CCR: | ||
49 | oldccr = *(unsigned short *)(task->thread.esp0 + h8300_register_offset[regno]); | ||
50 | oldccr &= ~CCR_MASK; | ||
51 | data &= CCR_MASK; | ||
52 | data |= oldccr; | ||
53 | *(unsigned short *)(task->thread.esp0 + h8300_register_offset[regno]) = data; | ||
54 | break; | ||
55 | default: | ||
56 | *(unsigned long *)(task->thread.esp0 + h8300_register_offset[regno]) = data; | ||
57 | break; | ||
58 | } | ||
59 | return 0; | ||
60 | } | ||
61 | |||
62 | /* disable singlestep */ | ||
63 | void user_disable_single_step(struct task_struct *child) | ||
64 | { | ||
65 | if((long)child->thread.breakinfo.addr != -1L) { | ||
66 | *child->thread.breakinfo.addr = child->thread.breakinfo.inst; | ||
67 | child->thread.breakinfo.addr = (unsigned short *)-1L; | ||
68 | } | ||
69 | } | ||
70 | |||
71 | /* calculate next pc */ | ||
72 | enum jump_type {none, /* normal instruction */ | ||
73 | jabs, /* absolute address jump */ | ||
74 | ind, /* indirect address jump */ | ||
75 | ret, /* return to subrutine */ | ||
76 | reg, /* register indexed jump */ | ||
77 | relb, /* pc relative jump (byte offset) */ | ||
78 | relw, /* pc relative jump (word offset) */ | ||
79 | }; | ||
80 | |||
81 | /* opcode decode table define | ||
82 | ptn: opcode pattern | ||
83 | msk: opcode bitmask | ||
84 | len: instruction length (<0 next table index) | ||
85 | jmp: jump operation mode */ | ||
86 | struct optable { | ||
87 | unsigned char bitpattern; | ||
88 | unsigned char bitmask; | ||
89 | signed char length; | ||
90 | signed char type; | ||
91 | } __attribute__((aligned(1),packed)); | ||
92 | |||
93 | #define OPTABLE(ptn,msk,len,jmp) \ | ||
94 | { \ | ||
95 | .bitpattern = ptn, \ | ||
96 | .bitmask = msk, \ | ||
97 | .length = len, \ | ||
98 | .type = jmp, \ | ||
99 | } | ||
100 | |||
101 | static const struct optable optable_0[] = { | ||
102 | OPTABLE(0x00,0xff, 1,none), /* 0x00 */ | ||
103 | OPTABLE(0x01,0xff,-1,none), /* 0x01 */ | ||
104 | OPTABLE(0x02,0xfe, 1,none), /* 0x02-0x03 */ | ||
105 | OPTABLE(0x04,0xee, 1,none), /* 0x04-0x05/0x14-0x15 */ | ||
106 | OPTABLE(0x06,0xfe, 1,none), /* 0x06-0x07 */ | ||
107 | OPTABLE(0x08,0xea, 1,none), /* 0x08-0x09/0x0c-0x0d/0x18-0x19/0x1c-0x1d */ | ||
108 | OPTABLE(0x0a,0xee, 1,none), /* 0x0a-0x0b/0x1a-0x1b */ | ||
109 | OPTABLE(0x0e,0xee, 1,none), /* 0x0e-0x0f/0x1e-0x1f */ | ||
110 | OPTABLE(0x10,0xfc, 1,none), /* 0x10-0x13 */ | ||
111 | OPTABLE(0x16,0xfe, 1,none), /* 0x16-0x17 */ | ||
112 | OPTABLE(0x20,0xe0, 1,none), /* 0x20-0x3f */ | ||
113 | OPTABLE(0x40,0xf0, 1,relb), /* 0x40-0x4f */ | ||
114 | OPTABLE(0x50,0xfc, 1,none), /* 0x50-0x53 */ | ||
115 | OPTABLE(0x54,0xfd, 1,ret ), /* 0x54/0x56 */ | ||
116 | OPTABLE(0x55,0xff, 1,relb), /* 0x55 */ | ||
117 | OPTABLE(0x57,0xff, 1,none), /* 0x57 */ | ||
118 | OPTABLE(0x58,0xfb, 2,relw), /* 0x58/0x5c */ | ||
119 | OPTABLE(0x59,0xfb, 1,reg ), /* 0x59/0x5b */ | ||
120 | OPTABLE(0x5a,0xfb, 2,jabs), /* 0x5a/0x5e */ | ||
121 | OPTABLE(0x5b,0xfb, 2,ind ), /* 0x5b/0x5f */ | ||
122 | OPTABLE(0x60,0xe8, 1,none), /* 0x60-0x67/0x70-0x77 */ | ||
123 | OPTABLE(0x68,0xfa, 1,none), /* 0x68-0x69/0x6c-0x6d */ | ||
124 | OPTABLE(0x6a,0xfe,-2,none), /* 0x6a-0x6b */ | ||
125 | OPTABLE(0x6e,0xfe, 2,none), /* 0x6e-0x6f */ | ||
126 | OPTABLE(0x78,0xff, 4,none), /* 0x78 */ | ||
127 | OPTABLE(0x79,0xff, 2,none), /* 0x79 */ | ||
128 | OPTABLE(0x7a,0xff, 3,none), /* 0x7a */ | ||
129 | OPTABLE(0x7b,0xff, 2,none), /* 0x7b */ | ||
130 | OPTABLE(0x7c,0xfc, 2,none), /* 0x7c-0x7f */ | ||
131 | OPTABLE(0x80,0x80, 1,none), /* 0x80-0xff */ | ||
132 | }; | ||
133 | |||
134 | static const struct optable optable_1[] = { | ||
135 | OPTABLE(0x00,0xff,-3,none), /* 0x0100 */ | ||
136 | OPTABLE(0x40,0xf0,-3,none), /* 0x0140-0x14f */ | ||
137 | OPTABLE(0x80,0xf0, 1,none), /* 0x0180-0x018f */ | ||
138 | OPTABLE(0xc0,0xc0, 2,none), /* 0x01c0-0x01ff */ | ||
139 | }; | ||
140 | |||
141 | static const struct optable optable_2[] = { | ||
142 | OPTABLE(0x00,0x20, 2,none), /* 0x6a0?/0x6a8?/0x6b0?/0x6b8? */ | ||
143 | OPTABLE(0x20,0x20, 3,none), /* 0x6a2?/0x6aa?/0x6b2?/0x6ba? */ | ||
144 | }; | ||
145 | |||
146 | static const struct optable optable_3[] = { | ||
147 | OPTABLE(0x69,0xfb, 2,none), /* 0x010069/0x01006d/014069/0x01406d */ | ||
148 | OPTABLE(0x6b,0xff,-4,none), /* 0x01006b/0x01406b */ | ||
149 | OPTABLE(0x6f,0xff, 3,none), /* 0x01006f/0x01406f */ | ||
150 | OPTABLE(0x78,0xff, 5,none), /* 0x010078/0x014078 */ | ||
151 | }; | ||
152 | |||
153 | static const struct optable optable_4[] = { | ||
154 | OPTABLE(0x00,0x78, 3,none), /* 0x0100690?/0x01006d0?/0140690/0x01406d0?/0x0100698?/0x01006d8?/0140698?/0x01406d8? */ | ||
155 | OPTABLE(0x20,0x78, 4,none), /* 0x0100692?/0x01006d2?/0140692/0x01406d2?/0x010069a?/0x01006da?/014069a?/0x01406da? */ | ||
156 | }; | ||
157 | |||
158 | static const struct optables_list { | ||
159 | const struct optable *ptr; | ||
160 | int size; | ||
161 | } optables[] = { | ||
162 | #define OPTABLES(no) \ | ||
163 | { \ | ||
164 | .ptr = optable_##no, \ | ||
165 | .size = sizeof(optable_##no) / sizeof(struct optable), \ | ||
166 | } | ||
167 | OPTABLES(0), | ||
168 | OPTABLES(1), | ||
169 | OPTABLES(2), | ||
170 | OPTABLES(3), | ||
171 | OPTABLES(4), | ||
172 | |||
173 | }; | ||
174 | |||
175 | const unsigned char condmask[] = { | ||
176 | 0x00,0x40,0x01,0x04,0x02,0x08,0x10,0x20 | ||
177 | }; | ||
178 | |||
179 | static int isbranch(struct task_struct *task,int reson) | ||
180 | { | ||
181 | unsigned char cond = h8300_get_reg(task, PT_CCR); | ||
182 | /* encode complex conditions */ | ||
183 | /* B4: N^V | ||
184 | B5: Z|(N^V) | ||
185 | B6: C|Z */ | ||
186 | __asm__("bld #3,%w0\n\t" | ||
187 | "bxor #1,%w0\n\t" | ||
188 | "bst #4,%w0\n\t" | ||
189 | "bor #2,%w0\n\t" | ||
190 | "bst #5,%w0\n\t" | ||
191 | "bld #2,%w0\n\t" | ||
192 | "bor #0,%w0\n\t" | ||
193 | "bst #6,%w0\n\t" | ||
194 | :"=&r"(cond)::"cc"); | ||
195 | cond &= condmask[reson >> 1]; | ||
196 | if (!(reson & 1)) | ||
197 | return cond == 0; | ||
198 | else | ||
199 | return cond != 0; | ||
200 | } | ||
201 | |||
202 | static unsigned short *getnextpc(struct task_struct *child, unsigned short *pc) | ||
203 | { | ||
204 | const struct optable *op; | ||
205 | unsigned char *fetch_p; | ||
206 | unsigned char inst; | ||
207 | unsigned long addr; | ||
208 | unsigned long *sp; | ||
209 | int op_len,regno; | ||
210 | op = optables[0].ptr; | ||
211 | op_len = optables[0].size; | ||
212 | fetch_p = (unsigned char *)pc; | ||
213 | inst = *fetch_p++; | ||
214 | do { | ||
215 | if ((inst & op->bitmask) == op->bitpattern) { | ||
216 | if (op->length < 0) { | ||
217 | op = optables[-op->length].ptr; | ||
218 | op_len = optables[-op->length].size + 1; | ||
219 | inst = *fetch_p++; | ||
220 | } else { | ||
221 | switch (op->type) { | ||
222 | case none: | ||
223 | return pc + op->length; | ||
224 | case jabs: | ||
225 | addr = *(unsigned long *)pc; | ||
226 | return (unsigned short *)(addr & 0x00ffffff); | ||
227 | case ind: | ||
228 | addr = *pc & 0xff; | ||
229 | return (unsigned short *)(*(unsigned long *)addr); | ||
230 | case ret: | ||
231 | sp = (unsigned long *)h8300_get_reg(child, PT_USP); | ||
232 | /* user stack frames | ||
233 | | er0 | temporary saved | ||
234 | +--------+ | ||
235 | | exp | exception stack frames | ||
236 | +--------+ | ||
237 | | ret pc | userspace return address | ||
238 | */ | ||
239 | return (unsigned short *)(*(sp+2) & 0x00ffffff); | ||
240 | case reg: | ||
241 | regno = (*pc >> 4) & 0x07; | ||
242 | if (regno == 0) | ||
243 | addr = h8300_get_reg(child, PT_ER0); | ||
244 | else | ||
245 | addr = h8300_get_reg(child, regno-1+PT_ER1); | ||
246 | return (unsigned short *)addr; | ||
247 | case relb: | ||
248 | if (inst == 0x55 || isbranch(child,inst & 0x0f)) | ||
249 | pc = (unsigned short *)((unsigned long)pc + | ||
250 | ((signed char)(*fetch_p))); | ||
251 | return pc+1; /* skip myself */ | ||
252 | case relw: | ||
253 | if (inst == 0x5c || isbranch(child,(*fetch_p & 0xf0) >> 4)) | ||
254 | pc = (unsigned short *)((unsigned long)pc + | ||
255 | ((signed short)(*(pc+1)))); | ||
256 | return pc+2; /* skip myself */ | ||
257 | } | ||
258 | } | ||
259 | } else | ||
260 | op++; | ||
261 | } while(--op_len > 0); | ||
262 | return NULL; | ||
263 | } | ||
264 | |||
265 | /* Set breakpoint(s) to simulate a single step from the current PC. */ | ||
266 | |||
267 | void user_enable_single_step(struct task_struct *child) | ||
268 | { | ||
269 | unsigned short *nextpc; | ||
270 | nextpc = getnextpc(child,(unsigned short *)h8300_get_reg(child, PT_PC)); | ||
271 | child->thread.breakinfo.addr = nextpc; | ||
272 | child->thread.breakinfo.inst = *nextpc; | ||
273 | *nextpc = BREAKINST; | ||
274 | } | ||
275 | |||
276 | asmlinkage void trace_trap(unsigned long bp) | ||
277 | { | ||
278 | if ((unsigned long)current->thread.breakinfo.addr == bp) { | ||
279 | user_disable_single_step(current); | ||
280 | force_sig(SIGTRAP,current); | ||
281 | } else | ||
282 | force_sig(SIGILL,current); | ||
283 | } | ||
284 | |||
diff --git a/arch/h8300/platform/h8s/Makefile b/arch/h8300/platform/h8s/Makefile deleted file mode 100644 index bf1241883766..000000000000 --- a/arch/h8300/platform/h8s/Makefile +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | # | ||
2 | # Makefile for the linux kernel. | ||
3 | # | ||
4 | # Reuse any files we can from the H8S | ||
5 | # | ||
6 | |||
7 | obj-y := ints_h8s.o ptrace_h8s.o | ||
diff --git a/arch/h8300/platform/h8s/edosk2674/Makefile b/arch/h8300/platform/h8s/edosk2674/Makefile deleted file mode 100644 index 8e349723bb4f..000000000000 --- a/arch/h8300/platform/h8s/edosk2674/Makefile +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | # | ||
2 | # Makefile for the linux kernel. | ||
3 | # | ||
4 | |||
5 | extra-y := crt0_$(MODEL).o | ||
diff --git a/arch/h8300/platform/h8s/edosk2674/crt0_ram.S b/arch/h8300/platform/h8s/edosk2674/crt0_ram.S deleted file mode 100644 index 5ed191b37cde..000000000000 --- a/arch/h8300/platform/h8s/edosk2674/crt0_ram.S +++ /dev/null | |||
@@ -1,130 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/h8300/platform/h8s/edosk2674/crt0_ram.S | ||
3 | * | ||
4 | * Yoshinori Sato <ysato@users.sourceforge.jp> | ||
5 | * | ||
6 | * Platform depend startup | ||
7 | * Target Archtecture: EDOSK-2674 | ||
8 | * Memory Layout : RAM | ||
9 | */ | ||
10 | |||
11 | #define ASSEMBLY | ||
12 | |||
13 | #include <asm/linkage.h> | ||
14 | #include <asm/regs267x.h> | ||
15 | |||
16 | #if !defined(CONFIG_BLKDEV_RESERVE) | ||
17 | #if defined(CONFIG_GDB_DEBUG) | ||
18 | #define RAMEND (__ramend - 0xc000) | ||
19 | #else | ||
20 | #define RAMEND __ramend | ||
21 | #endif | ||
22 | #else | ||
23 | #define RAMEND CONFIG_BLKDEV_RESERVE_ADDRESS | ||
24 | #endif | ||
25 | |||
26 | .global __start | ||
27 | .global __command_line | ||
28 | .global __platform_gpio_table | ||
29 | .global __target_name | ||
30 | |||
31 | .h8300s | ||
32 | |||
33 | .section .text | ||
34 | .file "crt0_ram.S" | ||
35 | |||
36 | /* CPU Reset entry */ | ||
37 | __start: | ||
38 | mov.l #RAMEND,sp | ||
39 | ldc #0x80,ccr | ||
40 | ldc #0x00,exr | ||
41 | |||
42 | /* Peripheral Setup */ | ||
43 | bclr #4,@INTCR:8 /* interrupt mode 2 */ | ||
44 | bset #5,@INTCR:8 | ||
45 | bclr #0,@IER+1:16 | ||
46 | bset #1,@ISCRL+1:16 /* IRQ0 Positive Edge */ | ||
47 | bclr #0,@ISCRL+1:16 | ||
48 | |||
49 | #if defined(CONFIG_MTD_UCLINUX) | ||
50 | /* move romfs image */ | ||
51 | jsr @__move_romfs | ||
52 | #endif | ||
53 | |||
54 | /* .bss clear */ | ||
55 | mov.l #__sbss,er5 | ||
56 | mov.l er5,er6 | ||
57 | mov.l #__ebss,er4 | ||
58 | sub.l er5,er4 | ||
59 | shlr #2,er4 | ||
60 | sub.l er0,er0 | ||
61 | 1: | ||
62 | mov.l er0,@er5 | ||
63 | adds #4,er5 | ||
64 | dec.l #1,er4 | ||
65 | bne 1b | ||
66 | |||
67 | /* copy kernel commandline */ | ||
68 | mov.l #COMMAND_START,er5 | ||
69 | mov.l #_command_line,er6 | ||
70 | mov.w #512,r4 | ||
71 | eepmov.w | ||
72 | |||
73 | /* uClinux kernel start */ | ||
74 | ldc #0x90,ccr /* running kernel */ | ||
75 | mov.l #_init_thread_union,sp | ||
76 | add.l #0x2000,sp | ||
77 | jsr @_start_kernel | ||
78 | _exit: | ||
79 | |||
80 | jmp _exit | ||
81 | |||
82 | rts | ||
83 | |||
84 | /* I/O port assign information */ | ||
85 | __platform_gpio_table: | ||
86 | mov.l #gpio_table,er0 | ||
87 | rts | ||
88 | |||
89 | gpio_table: | ||
90 | ;; P1DDR | ||
91 | ;; used,ddr | ||
92 | .byte 0x00,0x00 | ||
93 | ;; P2DDR | ||
94 | .byte 0x00,0x00 | ||
95 | ;; P3DDR | ||
96 | .byte 0x3f,0x3a | ||
97 | ;; dummy | ||
98 | .byte 0x00,0x00 | ||
99 | ;; P5DDR | ||
100 | .byte 0x00,0x00 | ||
101 | ;; P6DDR | ||
102 | .byte 0x00,0x00 | ||
103 | ;; P7DDR | ||
104 | .byte 0x00,0x00 | ||
105 | ;; P8DDR | ||
106 | .byte 0x00,0x00 | ||
107 | ;; dummy | ||
108 | .byte 0x00,0x00 | ||
109 | ;; PADDR | ||
110 | .byte 0xff,0xff | ||
111 | ;; PBDDR | ||
112 | .byte 0xff,0x00 | ||
113 | ;; PCDDR | ||
114 | .byte 0xff,0x00 | ||
115 | ;; PDDDR | ||
116 | .byte 0xff,0x00 | ||
117 | ;; PEDDR | ||
118 | .byte 0xff,0x00 | ||
119 | ;; PFDDR | ||
120 | .byte 0xff,0xff | ||
121 | ;; PGDDR | ||
122 | .byte 0x0f,0x0f | ||
123 | ;; PHDDR | ||
124 | .byte 0x0f,0x0f | ||
125 | |||
126 | __target_name: | ||
127 | .asciz "EDOSK-2674" | ||
128 | |||
129 | .section .bootvec,"ax" | ||
130 | jmp @__start | ||
diff --git a/arch/h8300/platform/h8s/edosk2674/crt0_rom.S b/arch/h8300/platform/h8s/edosk2674/crt0_rom.S deleted file mode 100644 index 06d1d7f324ca..000000000000 --- a/arch/h8300/platform/h8s/edosk2674/crt0_rom.S +++ /dev/null | |||
@@ -1,186 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/h8300/platform/h8s/edosk2674/crt0_rom.S | ||
3 | * | ||
4 | * Yoshinori Sato <ysato@users.sourceforge.jp> | ||
5 | * | ||
6 | * Platform depend startup | ||
7 | * Target Archtecture: EDOSK-2674 | ||
8 | * Memory Layout : ROM | ||
9 | */ | ||
10 | |||
11 | #define ASSEMBLY | ||
12 | |||
13 | #include <asm/linkage.h> | ||
14 | #include <asm/regs267x.h> | ||
15 | |||
16 | .global __start | ||
17 | .global __command_line | ||
18 | .global __platform_gpio_table | ||
19 | .global __target_name | ||
20 | |||
21 | .h8300s | ||
22 | .section .text | ||
23 | .file "crt0_rom.S" | ||
24 | |||
25 | /* CPU Reset entry */ | ||
26 | __start: | ||
27 | mov.l #__ramend,sp | ||
28 | ldc #0x80,ccr | ||
29 | ldc #0,exr | ||
30 | |||
31 | /* Peripheral Setup */ | ||
32 | ;BSC/GPIO setup | ||
33 | mov.l #init_regs,er0 | ||
34 | mov.w #0xffff,e2 | ||
35 | 1: | ||
36 | mov.w @er0+,r2 | ||
37 | beq 2f | ||
38 | mov.w @er0+,r1 | ||
39 | mov.b r1l,@er2 | ||
40 | bra 1b | ||
41 | |||
42 | 2: | ||
43 | ;SDRAM setup | ||
44 | #define SDRAM_SMR 0x400040 | ||
45 | |||
46 | mov.b #0,r0l | ||
47 | mov.b r0l,@DRACCR:16 | ||
48 | mov.w #0x188,r0 | ||
49 | mov.w r0,@REFCR:16 | ||
50 | mov.w #0x85b4,r0 | ||
51 | mov.w r0,@DRAMCR:16 | ||
52 | mov.b #0,r1l | ||
53 | mov.b r1l,@SDRAM_SMR | ||
54 | mov.w #0x84b4,r0 | ||
55 | mov.w r0,@DRAMCR:16 | ||
56 | ;special thanks to Arizona Cooperative Power | ||
57 | |||
58 | /* copy .data */ | ||
59 | mov.l #__begin_data,er5 | ||
60 | mov.l #__sdata,er6 | ||
61 | mov.l #__edata,er4 | ||
62 | sub.l er6,er4 | ||
63 | shlr.l #2,er4 | ||
64 | 1: | ||
65 | mov.l @er5+,er0 | ||
66 | mov.l er0,@er6 | ||
67 | adds #4,er6 | ||
68 | dec.l #1,er4 | ||
69 | bne 1b | ||
70 | |||
71 | /* .bss clear */ | ||
72 | mov.l #__sbss,er5 | ||
73 | mov.l #__ebss,er4 | ||
74 | sub.l er5,er4 | ||
75 | shlr.l #2,er4 | ||
76 | sub.l er0,er0 | ||
77 | 1: | ||
78 | mov.l er0,@er5 | ||
79 | adds #4,er5 | ||
80 | dec.l #1,er4 | ||
81 | bne 1b | ||
82 | |||
83 | /* copy kernel commandline */ | ||
84 | mov.l #COMMAND_START,er5 | ||
85 | mov.l #__command_line,er6 | ||
86 | mov.w #512,r4 | ||
87 | eepmov.w | ||
88 | |||
89 | /* linux kernel start */ | ||
90 | ldc #0x90,ccr /* running kernel */ | ||
91 | mov.l #_init_thread_union,sp | ||
92 | add.l #0x2000,sp | ||
93 | jsr @_start_kernel | ||
94 | _exit: | ||
95 | |||
96 | jmp _exit | ||
97 | |||
98 | rts | ||
99 | |||
100 | /* I/O port assign information */ | ||
101 | __platform_gpio_table: | ||
102 | mov.l #gpio_table,er0 | ||
103 | rts | ||
104 | |||
105 | #define INIT_REGS_DATA(REGS,DATA) \ | ||
106 | .word ((REGS) & 0xffff),DATA | ||
107 | |||
108 | init_regs: | ||
109 | INIT_REGS_DATA(ASTCR,0xff) | ||
110 | INIT_REGS_DATA(RDNCR,0x00) | ||
111 | INIT_REGS_DATA(ABWCR,0x80) | ||
112 | INIT_REGS_DATA(WTCRAH,0x27) | ||
113 | INIT_REGS_DATA(WTCRAL,0x77) | ||
114 | INIT_REGS_DATA(WTCRBH,0x71) | ||
115 | INIT_REGS_DATA(WTCRBL,0x22) | ||
116 | INIT_REGS_DATA(CSACRH,0x80) | ||
117 | INIT_REGS_DATA(CSACRL,0x80) | ||
118 | INIT_REGS_DATA(BROMCRH,0xa0) | ||
119 | INIT_REGS_DATA(BROMCRL,0xa0) | ||
120 | INIT_REGS_DATA(P3DDR,0x3a) | ||
121 | INIT_REGS_DATA(P3ODR,0x06) | ||
122 | INIT_REGS_DATA(PADDR,0xff) | ||
123 | INIT_REGS_DATA(PFDDR,0xfe) | ||
124 | INIT_REGS_DATA(PGDDR,0x0f) | ||
125 | INIT_REGS_DATA(PHDDR,0x0f) | ||
126 | INIT_REGS_DATA(PFCR0,0xff) | ||
127 | INIT_REGS_DATA(PFCR2,0x0d) | ||
128 | INIT_REGS_DATA(ITSR, 0x00) | ||
129 | INIT_REGS_DATA(ITSR+1,0x3f) | ||
130 | INIT_REGS_DATA(INTCR,0x20) | ||
131 | |||
132 | .word 0 | ||
133 | |||
134 | gpio_table: | ||
135 | ;; P1DDR | ||
136 | .byte 0x00,0x00 | ||
137 | ;; P2DDR | ||
138 | .byte 0x00,0x00 | ||
139 | ;; P3DDR | ||
140 | .byte 0x00,0x00 | ||
141 | ;; dummy | ||
142 | .byte 0x00,0x00 | ||
143 | ;; P5DDR | ||
144 | .byte 0x00,0x00 | ||
145 | ;; P6DDR | ||
146 | .byte 0x00,0x00 | ||
147 | ;; P7DDR | ||
148 | .byte 0x00,0x00 | ||
149 | ;; P8DDR | ||
150 | .byte 0x00,0x00 | ||
151 | ;; dummy | ||
152 | .byte 0x00,0x00 | ||
153 | ;; PADDR | ||
154 | .byte 0x00,0x00 | ||
155 | ;; PBDDR | ||
156 | .byte 0x00,0x00 | ||
157 | ;; PCDDR | ||
158 | .byte 0x00,0x00 | ||
159 | ;; PDDDR | ||
160 | .byte 0x00,0x00 | ||
161 | ;; PEDDR | ||
162 | .byte 0x00,0x00 | ||
163 | ;; PFDDR | ||
164 | .byte 0x00,0x00 | ||
165 | ;; PGDDR | ||
166 | .byte 0x00,0x00 | ||
167 | ;; PHDDR | ||
168 | .byte 0x00,0x00 | ||
169 | |||
170 | .section .rodata | ||
171 | __target_name: | ||
172 | .asciz "EDOSK-2674" | ||
173 | |||
174 | .section .bss | ||
175 | __command_line: | ||
176 | .space 512 | ||
177 | |||
178 | /* interrupt vector */ | ||
179 | .section .vectors,"ax" | ||
180 | .long __start | ||
181 | .long __start | ||
182 | vector = 2 | ||
183 | .rept 126 | ||
184 | .long _interrupt_redirect_table+vector*4 | ||
185 | vector = vector + 1 | ||
186 | .endr | ||
diff --git a/arch/h8300/platform/h8s/generic/Makefile b/arch/h8300/platform/h8s/generic/Makefile deleted file mode 100644 index 44b4685c664c..000000000000 --- a/arch/h8300/platform/h8s/generic/Makefile +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | # | ||
2 | # Makefile for the linux kernel. | ||
3 | # | ||
4 | |||
5 | extra-y = crt0_$(MODEL).o | ||
diff --git a/arch/h8300/platform/h8s/generic/crt0_ram.S b/arch/h8300/platform/h8s/generic/crt0_ram.S deleted file mode 100644 index 7018915de74f..000000000000 --- a/arch/h8300/platform/h8s/generic/crt0_ram.S +++ /dev/null | |||
@@ -1,127 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/h8300/platform/h8s/edosk2674/crt0_ram.S | ||
3 | * | ||
4 | * Yoshinori Sato <ysato@users.sourceforge.jp> | ||
5 | * | ||
6 | * Platform depend startup | ||
7 | * Target Archtecture: generic | ||
8 | * Memory Layout : RAM | ||
9 | */ | ||
10 | |||
11 | #define ASSEMBLY | ||
12 | |||
13 | #include <asm/linkage.h> | ||
14 | #include <asm/regs267x.h> | ||
15 | |||
16 | #if !defined(CONFIG_BLKDEV_RESERVE) | ||
17 | #if defined(CONFIG_GDB_DEBUG) | ||
18 | #define RAMEND (__ramend - 0xc000) | ||
19 | #else | ||
20 | #define RAMEND __ramend | ||
21 | #endif | ||
22 | #else | ||
23 | #define RAMEND CONFIG_BLKDEV_RESERVE_ADDRESS | ||
24 | #endif | ||
25 | |||
26 | .global __start | ||
27 | .global __command_line | ||
28 | .global __platform_gpio_table | ||
29 | .global __target_name | ||
30 | |||
31 | .h8300s | ||
32 | |||
33 | .section .text | ||
34 | .file "crt0_ram.S" | ||
35 | |||
36 | /* CPU Reset entry */ | ||
37 | __start: | ||
38 | mov.l #RAMEND,sp | ||
39 | ldc #0x80,ccr | ||
40 | ldc #0x00,exr | ||
41 | |||
42 | /* Peripheral Setup */ | ||
43 | bclr #4,@INTCR:8 /* interrupt mode 2 */ | ||
44 | bset #5,@INTCR:8 | ||
45 | |||
46 | #if defined(CONFIG_MTD_UCLINUX) | ||
47 | /* move romfs image */ | ||
48 | jsr @__move_romfs | ||
49 | #endif | ||
50 | |||
51 | /* .bss clear */ | ||
52 | mov.l #__sbss,er5 | ||
53 | mov.l er5,er6 | ||
54 | mov.l #__ebss,er4 | ||
55 | sub.l er5,er4 | ||
56 | shlr #2,er4 | ||
57 | sub.l er0,er0 | ||
58 | 1: | ||
59 | mov.l er0,@er5 | ||
60 | adds #4,er5 | ||
61 | dec.l #1,er4 | ||
62 | bne 1b | ||
63 | |||
64 | /* copy kernel commandline */ | ||
65 | mov.l #COMMAND_START,er5 | ||
66 | mov.l #_command_line,er6 | ||
67 | mov.w #512,r4 | ||
68 | eepmov.w | ||
69 | |||
70 | /* uClinux kernel start */ | ||
71 | ldc #0x90,ccr /* running kernel */ | ||
72 | mov.l #_init_thread_union,sp | ||
73 | add.l #0x2000,sp | ||
74 | jsr @_start_kernel | ||
75 | _exit: | ||
76 | |||
77 | jmp _exit | ||
78 | |||
79 | rts | ||
80 | |||
81 | /* I/O port assign information */ | ||
82 | __platform_gpio_table: | ||
83 | mov.l #gpio_table,er0 | ||
84 | rts | ||
85 | |||
86 | gpio_table: | ||
87 | ;; P1DDR | ||
88 | ;; used,ddr | ||
89 | .byte 0x00,0x00 | ||
90 | ;; P2DDR | ||
91 | .byte 0x00,0x00 | ||
92 | ;; P3DDR | ||
93 | .byte 0x00,0x00 | ||
94 | ;; dummy | ||
95 | .byte 0x00,0x00 | ||
96 | ;; P5DDR | ||
97 | .byte 0x00,0x00 | ||
98 | ;; P6DDR | ||
99 | .byte 0x00,0x00 | ||
100 | ;; P7DDR | ||
101 | .byte 0x00,0x00 | ||
102 | ;; P8DDR | ||
103 | .byte 0x00,0x00 | ||
104 | ;; dummy | ||
105 | .byte 0x00,0x00 | ||
106 | ;; PADDR | ||
107 | .byte 0x00,0x00 | ||
108 | ;; PBDDR | ||
109 | .byte 0x00,0x00 | ||
110 | ;; PCDDR | ||
111 | .byte 0x00,0x00 | ||
112 | ;; PDDDR | ||
113 | .byte 0x00,0x00 | ||
114 | ;; PEDDR | ||
115 | .byte 0x00,0x00 | ||
116 | ;; PFDDR | ||
117 | .byte 0x00,0x00 | ||
118 | ;; PGDDR | ||
119 | .byte 0x00,0x00 | ||
120 | ;; PHDDR | ||
121 | .byte 0x00,0x00 | ||
122 | |||
123 | __target_name: | ||
124 | .asciz "generic" | ||
125 | |||
126 | .section .bootvec,"ax" | ||
127 | jmp @__start | ||
diff --git a/arch/h8300/platform/h8s/generic/crt0_rom.S b/arch/h8300/platform/h8s/generic/crt0_rom.S deleted file mode 100644 index 623ba7828193..000000000000 --- a/arch/h8300/platform/h8s/generic/crt0_rom.S +++ /dev/null | |||
@@ -1,128 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/h8300/platform/h8s/generic/crt0_rom.S | ||
3 | * | ||
4 | * Yoshinori Sato <ysato@users.sourceforge.jp> | ||
5 | * | ||
6 | * Platform depend startup | ||
7 | * Target Archtecture: generic | ||
8 | * Memory Layout : ROM | ||
9 | */ | ||
10 | |||
11 | #define ASSEMBLY | ||
12 | |||
13 | #include <asm/linkage.h> | ||
14 | #include <asm/regs267x.h> | ||
15 | |||
16 | .global __start | ||
17 | .global __command_line | ||
18 | .global __platform_gpio_table | ||
19 | .global __target_name | ||
20 | |||
21 | .h8300s | ||
22 | .section .text | ||
23 | .file "crt0_rom.S" | ||
24 | |||
25 | /* CPU Reset entry */ | ||
26 | __start: | ||
27 | mov.l #__ramend,sp | ||
28 | ldc #0x80,ccr | ||
29 | ldc #0,exr | ||
30 | bclr #4,@INTCR:8 | ||
31 | bset #5,@INTCR:8 /* Interrupt mode 2 */ | ||
32 | |||
33 | /* Peripheral Setup */ | ||
34 | |||
35 | /* copy .data */ | ||
36 | #if !defined(CONFIG_H8S_SIM) | ||
37 | mov.l #__begin_data,er5 | ||
38 | mov.l #__sdata,er6 | ||
39 | mov.l #__edata,er4 | ||
40 | sub.l er6,er4 | ||
41 | shlr.l #2,er4 | ||
42 | 1: | ||
43 | mov.l @er5+,er0 | ||
44 | mov.l er0,@er6 | ||
45 | adds #4,er6 | ||
46 | dec.l #1,er4 | ||
47 | bne 1b | ||
48 | #endif | ||
49 | |||
50 | /* .bss clear */ | ||
51 | mov.l #__sbss,er5 | ||
52 | mov.l #__ebss,er4 | ||
53 | sub.l er5,er4 | ||
54 | shlr.l #2,er4 | ||
55 | sub.l er0,er0 | ||
56 | 1: | ||
57 | mov.l er0,@er5 | ||
58 | adds #4,er5 | ||
59 | dec.l #1,er4 | ||
60 | bne 1b | ||
61 | |||
62 | /* linux kernel start */ | ||
63 | ldc #0x90,ccr /* running kernel */ | ||
64 | mov.l #_init_thread_union,sp | ||
65 | add.l #0x2000,sp | ||
66 | jsr @_start_kernel | ||
67 | _exit: | ||
68 | |||
69 | jmp _exit | ||
70 | |||
71 | rts | ||
72 | |||
73 | /* I/O port assign information */ | ||
74 | __platform_gpio_table: | ||
75 | mov.l #gpio_table,er0 | ||
76 | rts | ||
77 | |||
78 | gpio_table: | ||
79 | ;; P1DDR | ||
80 | .byte 0x00,0x00 | ||
81 | ;; P2DDR | ||
82 | .byte 0x00,0x00 | ||
83 | ;; P3DDR | ||
84 | .byte 0x00,0x00 | ||
85 | ;; P4DDR | ||
86 | .byte 0x00,0x00 | ||
87 | ;; P5DDR | ||
88 | .byte 0x00,0x00 | ||
89 | ;; P6DDR | ||
90 | .byte 0x00,0x00 | ||
91 | ;; dummy | ||
92 | .byte 0x00,0x00 | ||
93 | ;; P8DDR | ||
94 | .byte 0x00,0x00 | ||
95 | ;; PADDR | ||
96 | .byte 0x00,0x00 | ||
97 | ;; PBDDR | ||
98 | .byte 0x00,0x00 | ||
99 | ;; PCDDR | ||
100 | .byte 0x00,0x00 | ||
101 | ;; PDDDR | ||
102 | .byte 0x00,0x00 | ||
103 | ;; PEDDR | ||
104 | .byte 0x00,0x00 | ||
105 | ;; PFDDR | ||
106 | .byte 0x00,0x00 | ||
107 | ;; PGDDR | ||
108 | .byte 0x00,0x00 | ||
109 | ;; PHDDR | ||
110 | .byte 0x00,0x00 | ||
111 | |||
112 | .section .rodata | ||
113 | __target_name: | ||
114 | .asciz "generic" | ||
115 | |||
116 | .section .bss | ||
117 | __command_line: | ||
118 | .space 512 | ||
119 | |||
120 | /* interrupt vector */ | ||
121 | .section .vectors,"ax" | ||
122 | .long __start | ||
123 | .long __start | ||
124 | vector = 2 | ||
125 | .rept 126-1 | ||
126 | .long _interrupt_redirect_table+vector*4 | ||
127 | vector = vector + 1 | ||
128 | .endr | ||
diff --git a/arch/h8300/platform/h8s/irq.c b/arch/h8300/platform/h8s/irq.c deleted file mode 100644 index f3a5511c16b1..000000000000 --- a/arch/h8300/platform/h8s/irq.c +++ /dev/null | |||
@@ -1,104 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/h8300/platform/h8s/ints_h8s.c | ||
3 | * Interrupt handling CPU variants | ||
4 | * | ||
5 | * Yoshinori Sato <ysato@users.sourceforge.jp> | ||
6 | * | ||
7 | */ | ||
8 | |||
9 | #include <linux/init.h> | ||
10 | #include <linux/errno.h> | ||
11 | #include <linux/kernel.h> | ||
12 | |||
13 | #include <asm/ptrace.h> | ||
14 | #include <asm/traps.h> | ||
15 | #include <asm/irq.h> | ||
16 | #include <asm/io.h> | ||
17 | #include <asm/gpio-internal.h> | ||
18 | #include <asm/regs267x.h> | ||
19 | |||
20 | /* saved vector list */ | ||
21 | const int __initconst h8300_saved_vectors[] = { | ||
22 | #if defined(CONFIG_GDB_DEBUG) | ||
23 | TRACE_VEC, | ||
24 | TRAP3_VEC, | ||
25 | #endif | ||
26 | -1 | ||
27 | }; | ||
28 | |||
29 | /* trap entry table */ | ||
30 | const H8300_VECTOR __initconst h8300_trap_table[] = { | ||
31 | 0,0,0,0,0, | ||
32 | trace_break, /* TRACE */ | ||
33 | 0,0, | ||
34 | system_call, /* TRAPA #0 */ | ||
35 | 0,0,0,0,0,0,0 | ||
36 | }; | ||
37 | |||
38 | /* IRQ pin assignment */ | ||
39 | struct irq_pins { | ||
40 | unsigned char port_no; | ||
41 | unsigned char bit_no; | ||
42 | } __attribute__((aligned(1),packed)); | ||
43 | /* ISTR = 0 */ | ||
44 | static const struct irq_pins irq_assign_table0[16]={ | ||
45 | {H8300_GPIO_P5,H8300_GPIO_B0},{H8300_GPIO_P5,H8300_GPIO_B1}, | ||
46 | {H8300_GPIO_P5,H8300_GPIO_B2},{H8300_GPIO_P5,H8300_GPIO_B3}, | ||
47 | {H8300_GPIO_P5,H8300_GPIO_B4},{H8300_GPIO_P5,H8300_GPIO_B5}, | ||
48 | {H8300_GPIO_P5,H8300_GPIO_B6},{H8300_GPIO_P5,H8300_GPIO_B7}, | ||
49 | {H8300_GPIO_P6,H8300_GPIO_B0},{H8300_GPIO_P6,H8300_GPIO_B1}, | ||
50 | {H8300_GPIO_P6,H8300_GPIO_B2},{H8300_GPIO_P6,H8300_GPIO_B3}, | ||
51 | {H8300_GPIO_P6,H8300_GPIO_B4},{H8300_GPIO_P6,H8300_GPIO_B5}, | ||
52 | {H8300_GPIO_PF,H8300_GPIO_B1},{H8300_GPIO_PF,H8300_GPIO_B2}, | ||
53 | }; | ||
54 | /* ISTR = 1 */ | ||
55 | static const struct irq_pins irq_assign_table1[16]={ | ||
56 | {H8300_GPIO_P8,H8300_GPIO_B0},{H8300_GPIO_P8,H8300_GPIO_B1}, | ||
57 | {H8300_GPIO_P8,H8300_GPIO_B2},{H8300_GPIO_P8,H8300_GPIO_B3}, | ||
58 | {H8300_GPIO_P8,H8300_GPIO_B4},{H8300_GPIO_P8,H8300_GPIO_B5}, | ||
59 | {H8300_GPIO_PH,H8300_GPIO_B2},{H8300_GPIO_PH,H8300_GPIO_B3}, | ||
60 | {H8300_GPIO_P2,H8300_GPIO_B0},{H8300_GPIO_P2,H8300_GPIO_B1}, | ||
61 | {H8300_GPIO_P2,H8300_GPIO_B2},{H8300_GPIO_P2,H8300_GPIO_B3}, | ||
62 | {H8300_GPIO_P2,H8300_GPIO_B4},{H8300_GPIO_P2,H8300_GPIO_B5}, | ||
63 | {H8300_GPIO_P2,H8300_GPIO_B6},{H8300_GPIO_P2,H8300_GPIO_B7}, | ||
64 | }; | ||
65 | |||
66 | /* IRQ to GPIO pin translation */ | ||
67 | #define IRQ_GPIO_MAP(irqbit,irq,port,bit) \ | ||
68 | do { \ | ||
69 | if (*(volatile unsigned short *)ITSR & irqbit) { \ | ||
70 | port = irq_assign_table1[irq - EXT_IRQ0].port_no; \ | ||
71 | bit = irq_assign_table1[irq - EXT_IRQ0].bit_no; \ | ||
72 | } else { \ | ||
73 | port = irq_assign_table0[irq - EXT_IRQ0].port_no; \ | ||
74 | bit = irq_assign_table0[irq - EXT_IRQ0].bit_no; \ | ||
75 | } \ | ||
76 | } while(0) | ||
77 | |||
78 | int h8300_enable_irq_pin(unsigned int irq) | ||
79 | { | ||
80 | if (irq >= EXT_IRQ0 && irq <= EXT_IRQ15) { | ||
81 | unsigned short ptn = 1 << (irq - EXT_IRQ0); | ||
82 | unsigned int port_no,bit_no; | ||
83 | IRQ_GPIO_MAP(ptn, irq, port_no, bit_no); | ||
84 | if (H8300_GPIO_RESERVE(port_no, bit_no) == 0) | ||
85 | return -EBUSY; /* pin already use */ | ||
86 | H8300_GPIO_DDR(port_no, bit_no, H8300_GPIO_INPUT); | ||
87 | *(volatile unsigned short *)ISR &= ~ptn; /* ISR clear */ | ||
88 | } | ||
89 | |||
90 | return 0; | ||
91 | } | ||
92 | |||
93 | void h8300_disable_irq_pin(unsigned int irq) | ||
94 | { | ||
95 | if (irq >= EXT_IRQ0 && irq <= EXT_IRQ15) { | ||
96 | /* disable interrupt & release IRQ pin */ | ||
97 | unsigned short ptn = 1 << (irq - EXT_IRQ0); | ||
98 | unsigned short port_no,bit_no; | ||
99 | *(volatile unsigned short *)ISR &= ~ptn; | ||
100 | *(volatile unsigned short *)IER &= ~ptn; | ||
101 | IRQ_GPIO_MAP(ptn, irq, port_no, bit_no); | ||
102 | H8300_GPIO_FREE(port_no, bit_no); | ||
103 | } | ||
104 | } | ||
diff --git a/arch/h8300/platform/h8s/ptrace_h8s.c b/arch/h8300/platform/h8s/ptrace_h8s.c deleted file mode 100644 index c058ab1a8495..000000000000 --- a/arch/h8300/platform/h8s/ptrace_h8s.c +++ /dev/null | |||
@@ -1,84 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/h8300/platform/h8s/ptrace_h8s.c | ||
3 | * ptrace cpu depend helper functions | ||
4 | * | ||
5 | * Yoshinori Sato <ysato@users.sourceforge.jp> | ||
6 | * | ||
7 | * This file is subject to the terms and conditions of the GNU General | ||
8 | * Public License. See the file COPYING in the main directory of | ||
9 | * this archive for more details. | ||
10 | */ | ||
11 | |||
12 | #include <linux/linkage.h> | ||
13 | #include <linux/sched.h> | ||
14 | #include <linux/errno.h> | ||
15 | #include <asm/ptrace.h> | ||
16 | |||
17 | #define CCR_MASK 0x6f | ||
18 | #define EXR_TRACE 0x80 | ||
19 | |||
20 | /* Mapping from PT_xxx to the stack offset at which the register is | ||
21 | saved. Notice that usp has no stack-slot and needs to be treated | ||
22 | specially (see get_reg/put_reg below). */ | ||
23 | static const int h8300_register_offset[] = { | ||
24 | PT_REG(er1), PT_REG(er2), PT_REG(er3), PT_REG(er4), | ||
25 | PT_REG(er5), PT_REG(er6), PT_REG(er0), PT_REG(orig_er0), | ||
26 | PT_REG(ccr), PT_REG(pc), 0, PT_REG(exr) | ||
27 | }; | ||
28 | |||
29 | /* read register */ | ||
30 | long h8300_get_reg(struct task_struct *task, int regno) | ||
31 | { | ||
32 | switch (regno) { | ||
33 | case PT_USP: | ||
34 | return task->thread.usp + sizeof(long)*2 + 2; | ||
35 | case PT_CCR: | ||
36 | case PT_EXR: | ||
37 | return *(unsigned short *)(task->thread.esp0 + h8300_register_offset[regno]); | ||
38 | default: | ||
39 | return *(unsigned long *)(task->thread.esp0 + h8300_register_offset[regno]); | ||
40 | } | ||
41 | } | ||
42 | |||
43 | /* write register */ | ||
44 | int h8300_put_reg(struct task_struct *task, int regno, unsigned long data) | ||
45 | { | ||
46 | unsigned short oldccr; | ||
47 | switch (regno) { | ||
48 | case PT_USP: | ||
49 | task->thread.usp = data - sizeof(long)*2 - 2; | ||
50 | case PT_CCR: | ||
51 | oldccr = *(unsigned short *)(task->thread.esp0 + h8300_register_offset[regno]); | ||
52 | oldccr &= ~CCR_MASK; | ||
53 | data &= CCR_MASK; | ||
54 | data |= oldccr; | ||
55 | *(unsigned short *)(task->thread.esp0 + h8300_register_offset[regno]) = data; | ||
56 | break; | ||
57 | case PT_EXR: | ||
58 | /* exr modify not support */ | ||
59 | return -EIO; | ||
60 | default: | ||
61 | *(unsigned long *)(task->thread.esp0 + h8300_register_offset[regno]) = data; | ||
62 | break; | ||
63 | } | ||
64 | return 0; | ||
65 | } | ||
66 | |||
67 | /* disable singlestep */ | ||
68 | void user_disable_single_step(struct task_struct *child) | ||
69 | { | ||
70 | *(unsigned short *)(child->thread.esp0 + h8300_register_offset[PT_EXR]) &= ~EXR_TRACE; | ||
71 | } | ||
72 | |||
73 | /* enable singlestep */ | ||
74 | void user_enable_single_step(struct task_struct *child) | ||
75 | { | ||
76 | *(unsigned short *)(child->thread.esp0 + h8300_register_offset[PT_EXR]) |= EXR_TRACE; | ||
77 | } | ||
78 | |||
79 | asmlinkage void trace_trap(unsigned long bp) | ||
80 | { | ||
81 | (void)bp; | ||
82 | force_sig(SIGTRAP,current); | ||
83 | } | ||
84 | |||
diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig index 3f7f59cc8b5f..8fb46aab2d87 100644 --- a/drivers/ide/Kconfig +++ b/drivers/ide/Kconfig | |||
@@ -722,13 +722,6 @@ config BLK_DEV_IDE_RAPIDE | |||
722 | Say Y here if you want to support the Yellowstone RapIDE controller | 722 | Say Y here if you want to support the Yellowstone RapIDE controller |
723 | manufactured for use with Acorn computers. | 723 | manufactured for use with Acorn computers. |
724 | 724 | ||
725 | config IDE_H8300 | ||
726 | tristate "H8300 IDE support" | ||
727 | depends on H8300 | ||
728 | default y | ||
729 | help | ||
730 | Enables the H8300 IDE driver. | ||
731 | |||
732 | config BLK_DEV_GAYLE | 725 | config BLK_DEV_GAYLE |
733 | tristate "Amiga Gayle IDE interface support" | 726 | tristate "Amiga Gayle IDE interface support" |
734 | depends on AMIGA | 727 | depends on AMIGA |
diff --git a/drivers/ide/Makefile b/drivers/ide/Makefile index af8d016c37ea..a04ee82f1c8f 100644 --- a/drivers/ide/Makefile +++ b/drivers/ide/Makefile | |||
@@ -78,8 +78,6 @@ obj-$(CONFIG_BLK_DEV_CMD640) += cmd640.o | |||
78 | 78 | ||
79 | obj-$(CONFIG_BLK_DEV_IDE_PMAC) += pmac.o | 79 | obj-$(CONFIG_BLK_DEV_IDE_PMAC) += pmac.o |
80 | 80 | ||
81 | obj-$(CONFIG_IDE_H8300) += ide-h8300.o | ||
82 | |||
83 | obj-$(CONFIG_IDE_GENERIC) += ide-generic.o | 81 | obj-$(CONFIG_IDE_GENERIC) += ide-generic.o |
84 | obj-$(CONFIG_BLK_DEV_IDEPNP) += ide-pnp.o | 82 | obj-$(CONFIG_BLK_DEV_IDEPNP) += ide-pnp.o |
85 | 83 | ||
diff --git a/drivers/ide/ide-h8300.c b/drivers/ide/ide-h8300.c deleted file mode 100644 index 520f42c5445a..000000000000 --- a/drivers/ide/ide-h8300.c +++ /dev/null | |||
@@ -1,109 +0,0 @@ | |||
1 | /* | ||
2 | * H8/300 generic IDE interface | ||
3 | */ | ||
4 | |||
5 | #include <linux/init.h> | ||
6 | #include <linux/ide.h> | ||
7 | |||
8 | #include <asm/io.h> | ||
9 | #include <asm/irq.h> | ||
10 | |||
11 | #define DRV_NAME "ide-h8300" | ||
12 | |||
13 | #define bswap(d) \ | ||
14 | ({ \ | ||
15 | u16 r; \ | ||
16 | __asm__("mov.b %w1,r1h\n\t" \ | ||
17 | "mov.b %x1,r1l\n\t" \ | ||
18 | "mov.w r1,%0" \ | ||
19 | :"=r"(r) \ | ||
20 | :"r"(d) \ | ||
21 | :"er1"); \ | ||
22 | (r); \ | ||
23 | }) | ||
24 | |||
25 | static void mm_outsw(unsigned long addr, void *buf, u32 len) | ||
26 | { | ||
27 | unsigned short *bp = (unsigned short *)buf; | ||
28 | for (; len > 0; len--, bp++) | ||
29 | *(volatile u16 *)addr = bswap(*bp); | ||
30 | } | ||
31 | |||
32 | static void mm_insw(unsigned long addr, void *buf, u32 len) | ||
33 | { | ||
34 | unsigned short *bp = (unsigned short *)buf; | ||
35 | for (; len > 0; len--, bp++) | ||
36 | *bp = bswap(*(volatile u16 *)addr); | ||
37 | } | ||
38 | |||
39 | static void h8300_input_data(ide_drive_t *drive, struct ide_cmd *cmd, | ||
40 | void *buf, unsigned int len) | ||
41 | { | ||
42 | mm_insw(drive->hwif->io_ports.data_addr, buf, (len + 1) / 2); | ||
43 | } | ||
44 | |||
45 | static void h8300_output_data(ide_drive_t *drive, struct ide_cmd *cmd, | ||
46 | void *buf, unsigned int len) | ||
47 | { | ||
48 | mm_outsw(drive->hwif->io_ports.data_addr, buf, (len + 1) / 2); | ||
49 | } | ||
50 | |||
51 | static const struct ide_tp_ops h8300_tp_ops = { | ||
52 | .exec_command = ide_exec_command, | ||
53 | .read_status = ide_read_status, | ||
54 | .read_altstatus = ide_read_altstatus, | ||
55 | .write_devctl = ide_write_devctl, | ||
56 | |||
57 | .dev_select = ide_dev_select, | ||
58 | .tf_load = ide_tf_load, | ||
59 | .tf_read = ide_tf_read, | ||
60 | |||
61 | .input_data = h8300_input_data, | ||
62 | .output_data = h8300_output_data, | ||
63 | }; | ||
64 | |||
65 | #define H8300_IDE_GAP (2) | ||
66 | |||
67 | static inline void hw_setup(struct ide_hw *hw) | ||
68 | { | ||
69 | int i; | ||
70 | |||
71 | memset(hw, 0, sizeof(*hw)); | ||
72 | for (i = 0; i <= 7; i++) | ||
73 | hw->io_ports_array[i] = CONFIG_H8300_IDE_BASE + H8300_IDE_GAP*i; | ||
74 | hw->io_ports.ctl_addr = CONFIG_H8300_IDE_ALT; | ||
75 | hw->irq = EXT_IRQ0 + CONFIG_H8300_IDE_IRQ; | ||
76 | } | ||
77 | |||
78 | static const struct ide_port_info h8300_port_info = { | ||
79 | .tp_ops = &h8300_tp_ops, | ||
80 | .host_flags = IDE_HFLAG_NO_IO_32BIT | IDE_HFLAG_NO_DMA, | ||
81 | .chipset = ide_generic, | ||
82 | }; | ||
83 | |||
84 | static int __init h8300_ide_init(void) | ||
85 | { | ||
86 | struct ide_hw hw, *hws[] = { &hw }; | ||
87 | |||
88 | printk(KERN_INFO DRV_NAME ": H8/300 generic IDE interface\n"); | ||
89 | |||
90 | if (!request_region(CONFIG_H8300_IDE_BASE, H8300_IDE_GAP*8, "ide-h8300")) | ||
91 | goto out_busy; | ||
92 | if (!request_region(CONFIG_H8300_IDE_ALT, H8300_IDE_GAP, "ide-h8300")) { | ||
93 | release_region(CONFIG_H8300_IDE_BASE, H8300_IDE_GAP*8); | ||
94 | goto out_busy; | ||
95 | } | ||
96 | |||
97 | hw_setup(&hw); | ||
98 | |||
99 | return ide_host_add(&h8300_port_info, hws, 1, NULL); | ||
100 | |||
101 | out_busy: | ||
102 | printk(KERN_ERR "ide-h8300: IDE I/F resource already used.\n"); | ||
103 | |||
104 | return -EBUSY; | ||
105 | } | ||
106 | |||
107 | module_init(h8300_ide_init); | ||
108 | |||
109 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/net/Space.c b/drivers/net/Space.c index 3a8c7532ee0d..a7271e093845 100644 --- a/drivers/net/Space.c +++ b/drivers/net/Space.c | |||
@@ -102,8 +102,7 @@ static struct devprobe2 isa_probes[] __initdata = { | |||
102 | #ifdef CONFIG_WD80x3 | 102 | #ifdef CONFIG_WD80x3 |
103 | {wd_probe, 0}, | 103 | {wd_probe, 0}, |
104 | #endif | 104 | #endif |
105 | #if defined(CONFIG_NE2000) || \ | 105 | #if defined(CONFIG_NE2000) /* ISA (use ne2k-pci for PCI cards) */ |
106 | defined(CONFIG_NE_H8300) /* ISA (use ne2k-pci for PCI cards) */ | ||
107 | {ne_probe, 0}, | 106 | {ne_probe, 0}, |
108 | #endif | 107 | #endif |
109 | #ifdef CONFIG_LANCE /* ISA/VLB (use pcnet32 for PCI cards) */ | 108 | #ifdef CONFIG_LANCE /* ISA/VLB (use pcnet32 for PCI cards) */ |
diff --git a/drivers/net/ethernet/8390/Kconfig b/drivers/net/ethernet/8390/Kconfig index becef25fa194..0988811f4e40 100644 --- a/drivers/net/ethernet/8390/Kconfig +++ b/drivers/net/ethernet/8390/Kconfig | |||
@@ -146,13 +146,6 @@ config PCMCIA_PCNET | |||
146 | To compile this driver as a module, choose M here: the module will be | 146 | To compile this driver as a module, choose M here: the module will be |
147 | called pcnet_cs. If unsure, say N. | 147 | called pcnet_cs. If unsure, say N. |
148 | 148 | ||
149 | config NE_H8300 | ||
150 | tristate "NE2000 compatible support for H8/300" | ||
151 | depends on H8300H_AKI3068NET || H8300H_H8MAX | ||
152 | ---help--- | ||
153 | Say Y here if you want to use the NE2000 compatible | ||
154 | controller on the Renesas H8/300 processor. | ||
155 | |||
156 | config STNIC | 149 | config STNIC |
157 | tristate "National DP83902AV support" | 150 | tristate "National DP83902AV support" |
158 | depends on SUPERH | 151 | depends on SUPERH |
diff --git a/drivers/net/ethernet/8390/Makefile b/drivers/net/ethernet/8390/Makefile index 588954a79b2a..ff3b31894188 100644 --- a/drivers/net/ethernet/8390/Makefile +++ b/drivers/net/ethernet/8390/Makefile | |||
@@ -10,7 +10,6 @@ obj-$(CONFIG_HYDRA) += hydra.o 8390.o | |||
10 | obj-$(CONFIG_MCF8390) += mcf8390.o 8390.o | 10 | obj-$(CONFIG_MCF8390) += mcf8390.o 8390.o |
11 | obj-$(CONFIG_NE2000) += ne.o 8390p.o | 11 | obj-$(CONFIG_NE2000) += ne.o 8390p.o |
12 | obj-$(CONFIG_NE2K_PCI) += ne2k-pci.o 8390.o | 12 | obj-$(CONFIG_NE2K_PCI) += ne2k-pci.o 8390.o |
13 | obj-$(CONFIG_NE_H8300) += ne-h8300.o 8390.o | ||
14 | obj-$(CONFIG_PCMCIA_AXNET) += axnet_cs.o 8390.o | 13 | obj-$(CONFIG_PCMCIA_AXNET) += axnet_cs.o 8390.o |
15 | obj-$(CONFIG_PCMCIA_PCNET) += pcnet_cs.o 8390.o | 14 | obj-$(CONFIG_PCMCIA_PCNET) += pcnet_cs.o 8390.o |
16 | obj-$(CONFIG_STNIC) += stnic.o 8390.o | 15 | obj-$(CONFIG_STNIC) += stnic.o 8390.o |
diff --git a/drivers/net/ethernet/8390/ne-h8300.c b/drivers/net/ethernet/8390/ne-h8300.c deleted file mode 100644 index 7fc28f2d28a6..000000000000 --- a/drivers/net/ethernet/8390/ne-h8300.c +++ /dev/null | |||
@@ -1,684 +0,0 @@ | |||
1 | /* ne-h8300.c: A NE2000 clone on H8/300 driver for linux. */ | ||
2 | /* | ||
3 | original ne.c | ||
4 | Written 1992-94 by Donald Becker. | ||
5 | |||
6 | Copyright 1993 United States Government as represented by the | ||
7 | Director, National Security Agency. | ||
8 | |||
9 | This software may be used and distributed according to the terms | ||
10 | of the GNU General Public License, incorporated herein by reference. | ||
11 | |||
12 | The author may be reached as becker@scyld.com, or C/O | ||
13 | Scyld Computing Corporation, 410 Severn Ave., Suite 210, Annapolis MD 21403 | ||
14 | |||
15 | H8/300 modified | ||
16 | Yoshinori Sato <ysato@users.sourceforge.jp> | ||
17 | */ | ||
18 | |||
19 | static const char version1[] = | ||
20 | "ne-h8300.c:v1.00 2004/04/11 ysato\n"; | ||
21 | |||
22 | #include <linux/module.h> | ||
23 | #include <linux/kernel.h> | ||
24 | #include <linux/errno.h> | ||
25 | #include <linux/init.h> | ||
26 | #include <linux/interrupt.h> | ||
27 | #include <linux/delay.h> | ||
28 | #include <linux/netdevice.h> | ||
29 | #include <linux/etherdevice.h> | ||
30 | #include <linux/jiffies.h> | ||
31 | |||
32 | #include <asm/io.h> | ||
33 | #include <asm/irq.h> | ||
34 | |||
35 | #define EI_SHIFT(x) (ei_local->reg_offset[x]) | ||
36 | |||
37 | #include "8390.h" | ||
38 | |||
39 | #define DRV_NAME "ne-h8300" | ||
40 | |||
41 | /* Some defines that people can play with if so inclined. */ | ||
42 | |||
43 | /* Do we perform extra sanity checks on stuff ? */ | ||
44 | /* #define NE_SANITY_CHECK */ | ||
45 | |||
46 | /* Do we implement the read before write bugfix ? */ | ||
47 | /* #define NE_RW_BUGFIX */ | ||
48 | |||
49 | /* Do we have a non std. amount of memory? (in units of 256 byte pages) */ | ||
50 | /* #define PACKETBUF_MEMSIZE 0x40 */ | ||
51 | |||
52 | /* A zero-terminated list of I/O addresses to be probed at boot. */ | ||
53 | |||
54 | /* ---- No user-serviceable parts below ---- */ | ||
55 | |||
56 | static const char version[] = | ||
57 | "8390.c:v1.10cvs 9/23/94 Donald Becker (becker@cesdis.gsfc.nasa.gov)\n"; | ||
58 | |||
59 | #include "lib8390.c" | ||
60 | |||
61 | #define NE_BASE (dev->base_addr) | ||
62 | #define NE_CMD 0x00 | ||
63 | #define NE_DATAPORT (ei_status.word16?0x20:0x10) /* NatSemi-defined port window offset. */ | ||
64 | #define NE_RESET (ei_status.word16?0x3f:0x1f) /* Issue a read to reset, a write to clear. */ | ||
65 | #define NE_IO_EXTENT (ei_status.word16?0x40:0x20) | ||
66 | |||
67 | #define NESM_START_PG 0x40 /* First page of TX buffer */ | ||
68 | #define NESM_STOP_PG 0x80 /* Last page +1 of RX ring */ | ||
69 | |||
70 | static int ne_probe1(struct net_device *dev, int ioaddr); | ||
71 | |||
72 | static int ne_open(struct net_device *dev); | ||
73 | static int ne_close(struct net_device *dev); | ||
74 | |||
75 | static void ne_reset_8390(struct net_device *dev); | ||
76 | static void ne_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr, | ||
77 | int ring_page); | ||
78 | static void ne_block_input(struct net_device *dev, int count, | ||
79 | struct sk_buff *skb, int ring_offset); | ||
80 | static void ne_block_output(struct net_device *dev, const int count, | ||
81 | const unsigned char *buf, const int start_page); | ||
82 | |||
83 | |||
84 | static u32 reg_offset[16]; | ||
85 | |||
86 | static int __init init_reg_offset(struct net_device *dev,unsigned long base_addr) | ||
87 | { | ||
88 | struct ei_device *ei_local = netdev_priv(dev); | ||
89 | int i; | ||
90 | unsigned char bus_width; | ||
91 | |||
92 | bus_width = *(volatile unsigned char *)ABWCR; | ||
93 | bus_width &= 1 << ((base_addr >> 21) & 7); | ||
94 | |||
95 | for (i = 0; i < ARRAY_SIZE(reg_offset); i++) | ||
96 | if (bus_width == 0) | ||
97 | reg_offset[i] = i * 2 + 1; | ||
98 | else | ||
99 | reg_offset[i] = i; | ||
100 | |||
101 | ei_local->reg_offset = reg_offset; | ||
102 | return 0; | ||
103 | } | ||
104 | |||
105 | static int __initdata h8300_ne_count = 0; | ||
106 | #ifdef CONFIG_H8300H_H8MAX | ||
107 | static unsigned long __initdata h8300_ne_base[] = { 0x800600 }; | ||
108 | static int h8300_ne_irq[] = {EXT_IRQ4}; | ||
109 | #endif | ||
110 | #ifdef CONFIG_H8300H_AKI3068NET | ||
111 | static unsigned long __initdata h8300_ne_base[] = { 0x200000 }; | ||
112 | static int h8300_ne_irq[] = {EXT_IRQ5}; | ||
113 | #endif | ||
114 | |||
115 | static inline int init_dev(struct net_device *dev) | ||
116 | { | ||
117 | if (h8300_ne_count < ARRAY_SIZE(h8300_ne_base)) { | ||
118 | dev->base_addr = h8300_ne_base[h8300_ne_count]; | ||
119 | dev->irq = h8300_ne_irq[h8300_ne_count]; | ||
120 | h8300_ne_count++; | ||
121 | return 0; | ||
122 | } else | ||
123 | return -ENODEV; | ||
124 | } | ||
125 | |||
126 | /* Probe for various non-shared-memory ethercards. | ||
127 | |||
128 | NEx000-clone boards have a Station Address PROM (SAPROM) in the packet | ||
129 | buffer memory space. NE2000 clones have 0x57,0x57 in bytes 0x0e,0x0f of | ||
130 | the SAPROM, while other supposed NE2000 clones must be detected by their | ||
131 | SA prefix. | ||
132 | |||
133 | Reading the SAPROM from a word-wide card with the 8390 set in byte-wide | ||
134 | mode results in doubled values, which can be detected and compensated for. | ||
135 | |||
136 | The probe is also responsible for initializing the card and filling | ||
137 | in the 'dev' and 'ei_status' structures. | ||
138 | |||
139 | We use the minimum memory size for some ethercard product lines, iff we can't | ||
140 | distinguish models. You can increase the packet buffer size by setting | ||
141 | PACKETBUF_MEMSIZE. Reported Cabletron packet buffer locations are: | ||
142 | E1010 starts at 0x100 and ends at 0x2000. | ||
143 | E1010-x starts at 0x100 and ends at 0x8000. ("-x" means "more memory") | ||
144 | E2010 starts at 0x100 and ends at 0x4000. | ||
145 | E2010-x starts at 0x100 and ends at 0xffff. */ | ||
146 | |||
147 | static int __init do_ne_probe(struct net_device *dev) | ||
148 | { | ||
149 | unsigned int base_addr = dev->base_addr; | ||
150 | |||
151 | /* First check any supplied i/o locations. User knows best. <cough> */ | ||
152 | if (base_addr > 0x1ff) /* Check a single specified location. */ | ||
153 | return ne_probe1(dev, base_addr); | ||
154 | else if (base_addr != 0) /* Don't probe at all. */ | ||
155 | return -ENXIO; | ||
156 | |||
157 | return -ENODEV; | ||
158 | } | ||
159 | |||
160 | static void cleanup_card(struct net_device *dev) | ||
161 | { | ||
162 | free_irq(dev->irq, dev); | ||
163 | release_region(dev->base_addr, NE_IO_EXTENT); | ||
164 | } | ||
165 | |||
166 | #ifndef MODULE | ||
167 | struct net_device * __init ne_probe(int unit) | ||
168 | { | ||
169 | struct net_device *dev = ____alloc_ei_netdev(0); | ||
170 | int err; | ||
171 | |||
172 | if (!dev) | ||
173 | return ERR_PTR(-ENOMEM); | ||
174 | |||
175 | if (init_dev(dev)) | ||
176 | return ERR_PTR(-ENODEV); | ||
177 | |||
178 | sprintf(dev->name, "eth%d", unit); | ||
179 | netdev_boot_setup_check(dev); | ||
180 | |||
181 | err = init_reg_offset(dev, dev->base_addr); | ||
182 | if (err) | ||
183 | goto out; | ||
184 | |||
185 | err = do_ne_probe(dev); | ||
186 | if (err) | ||
187 | goto out; | ||
188 | return dev; | ||
189 | out: | ||
190 | free_netdev(dev); | ||
191 | return ERR_PTR(err); | ||
192 | } | ||
193 | #endif | ||
194 | |||
195 | static const struct net_device_ops ne_netdev_ops = { | ||
196 | .ndo_open = ne_open, | ||
197 | .ndo_stop = ne_close, | ||
198 | |||
199 | .ndo_start_xmit = __ei_start_xmit, | ||
200 | .ndo_tx_timeout = __ei_tx_timeout, | ||
201 | .ndo_get_stats = __ei_get_stats, | ||
202 | .ndo_set_rx_mode = __ei_set_multicast_list, | ||
203 | .ndo_validate_addr = eth_validate_addr, | ||
204 | .ndo_set_mac_address = eth_mac_addr, | ||
205 | .ndo_change_mtu = eth_change_mtu, | ||
206 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
207 | .ndo_poll_controller = __ei_poll, | ||
208 | #endif | ||
209 | }; | ||
210 | |||
211 | static int __init ne_probe1(struct net_device *dev, int ioaddr) | ||
212 | { | ||
213 | int i; | ||
214 | unsigned char SA_prom[16]; | ||
215 | int wordlength = 2; | ||
216 | const char *name = NULL; | ||
217 | int start_page, stop_page; | ||
218 | int reg0, ret; | ||
219 | static unsigned version_printed; | ||
220 | struct ei_device *ei_local = netdev_priv(dev); | ||
221 | unsigned char bus_width; | ||
222 | |||
223 | if (!request_region(ioaddr, NE_IO_EXTENT, DRV_NAME)) | ||
224 | return -EBUSY; | ||
225 | |||
226 | reg0 = inb_p(ioaddr); | ||
227 | if (reg0 == 0xFF) { | ||
228 | ret = -ENODEV; | ||
229 | goto err_out; | ||
230 | } | ||
231 | |||
232 | /* Do a preliminary verification that we have a 8390. */ | ||
233 | { | ||
234 | int regd; | ||
235 | outb_p(E8390_NODMA+E8390_PAGE1+E8390_STOP, ioaddr + E8390_CMD); | ||
236 | regd = inb_p(ioaddr + EI_SHIFT(0x0d)); | ||
237 | outb_p(0xff, ioaddr + EI_SHIFT(0x0d)); | ||
238 | outb_p(E8390_NODMA+E8390_PAGE0, ioaddr + E8390_CMD); | ||
239 | inb_p(ioaddr + EN0_COUNTER0); /* Clear the counter by reading. */ | ||
240 | if (inb_p(ioaddr + EN0_COUNTER0) != 0) { | ||
241 | outb_p(reg0, ioaddr + EI_SHIFT(0)); | ||
242 | outb_p(regd, ioaddr + EI_SHIFT(0x0d)); /* Restore the old values. */ | ||
243 | ret = -ENODEV; | ||
244 | goto err_out; | ||
245 | } | ||
246 | } | ||
247 | |||
248 | if (ei_debug && version_printed++ == 0) | ||
249 | printk(KERN_INFO "%s", version1); | ||
250 | |||
251 | printk(KERN_INFO "NE*000 ethercard probe at %08x:", ioaddr); | ||
252 | |||
253 | /* Read the 16 bytes of station address PROM. | ||
254 | We must first initialize registers, similar to NS8390_init(eifdev, 0). | ||
255 | We can't reliably read the SAPROM address without this. | ||
256 | (I learned the hard way!). */ | ||
257 | { | ||
258 | struct {unsigned char value, offset; } program_seq[] = | ||
259 | { | ||
260 | {E8390_NODMA+E8390_PAGE0+E8390_STOP, E8390_CMD}, /* Select page 0*/ | ||
261 | {0x48, EN0_DCFG}, /* Set byte-wide (0x48) access. */ | ||
262 | {0x00, EN0_RCNTLO}, /* Clear the count regs. */ | ||
263 | {0x00, EN0_RCNTHI}, | ||
264 | {0x00, EN0_IMR}, /* Mask completion irq. */ | ||
265 | {0xFF, EN0_ISR}, | ||
266 | {E8390_RXOFF, EN0_RXCR}, /* 0x20 Set to monitor */ | ||
267 | {E8390_TXOFF, EN0_TXCR}, /* 0x02 and loopback mode. */ | ||
268 | {32, EN0_RCNTLO}, | ||
269 | {0x00, EN0_RCNTHI}, | ||
270 | {0x00, EN0_RSARLO}, /* DMA starting at 0x0000. */ | ||
271 | {0x00, EN0_RSARHI}, | ||
272 | {E8390_RREAD+E8390_START, E8390_CMD}, | ||
273 | }; | ||
274 | |||
275 | for (i = 0; i < ARRAY_SIZE(program_seq); i++) | ||
276 | outb_p(program_seq[i].value, ioaddr + program_seq[i].offset); | ||
277 | |||
278 | } | ||
279 | bus_width = *(volatile unsigned char *)ABWCR; | ||
280 | bus_width &= 1 << ((ioaddr >> 21) & 7); | ||
281 | ei_status.word16 = (bus_width == 0); /* temporary setting */ | ||
282 | for(i = 0; i < 16 /*sizeof(SA_prom)*/; i++) { | ||
283 | SA_prom[i] = inb_p(ioaddr + NE_DATAPORT); | ||
284 | inb_p(ioaddr + NE_DATAPORT); /* dummy read */ | ||
285 | } | ||
286 | |||
287 | start_page = NESM_START_PG; | ||
288 | stop_page = NESM_STOP_PG; | ||
289 | |||
290 | if (bus_width) | ||
291 | wordlength = 1; | ||
292 | else | ||
293 | outb_p(0x49, ioaddr + EN0_DCFG); | ||
294 | |||
295 | /* Set up the rest of the parameters. */ | ||
296 | name = (wordlength == 2) ? "NE2000" : "NE1000"; | ||
297 | |||
298 | if (! dev->irq) { | ||
299 | printk(" failed to detect IRQ line.\n"); | ||
300 | ret = -EAGAIN; | ||
301 | goto err_out; | ||
302 | } | ||
303 | |||
304 | /* Snarf the interrupt now. There's no point in waiting since we cannot | ||
305 | share and the board will usually be enabled. */ | ||
306 | ret = request_irq(dev->irq, __ei_interrupt, 0, name, dev); | ||
307 | if (ret) { | ||
308 | printk (" unable to get IRQ %d (errno=%d).\n", dev->irq, ret); | ||
309 | goto err_out; | ||
310 | } | ||
311 | |||
312 | dev->base_addr = ioaddr; | ||
313 | |||
314 | for (i = 0; i < ETH_ALEN; i++) | ||
315 | dev->dev_addr[i] = SA_prom[i]; | ||
316 | printk(" %pM\n", dev->dev_addr); | ||
317 | |||
318 | printk("%s: %s found at %#x, using IRQ %d.\n", | ||
319 | dev->name, name, ioaddr, dev->irq); | ||
320 | |||
321 | ei_status.name = name; | ||
322 | ei_status.tx_start_page = start_page; | ||
323 | ei_status.stop_page = stop_page; | ||
324 | ei_status.word16 = (wordlength == 2); | ||
325 | |||
326 | ei_status.rx_start_page = start_page + TX_PAGES; | ||
327 | #ifdef PACKETBUF_MEMSIZE | ||
328 | /* Allow the packet buffer size to be overridden by know-it-alls. */ | ||
329 | ei_status.stop_page = ei_status.tx_start_page + PACKETBUF_MEMSIZE; | ||
330 | #endif | ||
331 | |||
332 | ei_status.reset_8390 = &ne_reset_8390; | ||
333 | ei_status.block_input = &ne_block_input; | ||
334 | ei_status.block_output = &ne_block_output; | ||
335 | ei_status.get_8390_hdr = &ne_get_8390_hdr; | ||
336 | ei_status.priv = 0; | ||
337 | |||
338 | dev->netdev_ops = &ne_netdev_ops; | ||
339 | |||
340 | __NS8390_init(dev, 0); | ||
341 | |||
342 | ret = register_netdev(dev); | ||
343 | if (ret) | ||
344 | goto out_irq; | ||
345 | return 0; | ||
346 | out_irq: | ||
347 | free_irq(dev->irq, dev); | ||
348 | err_out: | ||
349 | release_region(ioaddr, NE_IO_EXTENT); | ||
350 | return ret; | ||
351 | } | ||
352 | |||
353 | static int ne_open(struct net_device *dev) | ||
354 | { | ||
355 | __ei_open(dev); | ||
356 | return 0; | ||
357 | } | ||
358 | |||
359 | static int ne_close(struct net_device *dev) | ||
360 | { | ||
361 | if (ei_debug > 1) | ||
362 | printk(KERN_DEBUG "%s: Shutting down ethercard.\n", dev->name); | ||
363 | __ei_close(dev); | ||
364 | return 0; | ||
365 | } | ||
366 | |||
367 | /* Hard reset the card. This used to pause for the same period that a | ||
368 | 8390 reset command required, but that shouldn't be necessary. */ | ||
369 | |||
370 | static void ne_reset_8390(struct net_device *dev) | ||
371 | { | ||
372 | unsigned long reset_start_time = jiffies; | ||
373 | struct ei_device *ei_local = netdev_priv(dev); | ||
374 | |||
375 | if (ei_debug > 1) | ||
376 | printk(KERN_DEBUG "resetting the 8390 t=%ld...", jiffies); | ||
377 | |||
378 | /* DON'T change these to inb_p/outb_p or reset will fail on clones. */ | ||
379 | outb(inb(NE_BASE + NE_RESET), NE_BASE + NE_RESET); | ||
380 | |||
381 | ei_status.txing = 0; | ||
382 | ei_status.dmaing = 0; | ||
383 | |||
384 | /* This check _should_not_ be necessary, omit eventually. */ | ||
385 | while ((inb_p(NE_BASE+EN0_ISR) & ENISR_RESET) == 0) | ||
386 | if (time_after(jiffies, reset_start_time + 2*HZ/100)) { | ||
387 | printk(KERN_WARNING "%s: ne_reset_8390() did not complete.\n", dev->name); | ||
388 | break; | ||
389 | } | ||
390 | outb_p(ENISR_RESET, NE_BASE + EN0_ISR); /* Ack intr. */ | ||
391 | } | ||
392 | |||
393 | /* Grab the 8390 specific header. Similar to the block_input routine, but | ||
394 | we don't need to be concerned with ring wrap as the header will be at | ||
395 | the start of a page, so we optimize accordingly. */ | ||
396 | |||
397 | static void ne_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr, int ring_page) | ||
398 | { | ||
399 | struct ei_device *ei_local = netdev_priv(dev); | ||
400 | /* This *shouldn't* happen. If it does, it's the last thing you'll see */ | ||
401 | |||
402 | if (ei_status.dmaing) | ||
403 | { | ||
404 | printk(KERN_EMERG "%s: DMAing conflict in ne_get_8390_hdr " | ||
405 | "[DMAstat:%d][irqlock:%d].\n", | ||
406 | dev->name, ei_status.dmaing, ei_status.irqlock); | ||
407 | return; | ||
408 | } | ||
409 | |||
410 | ei_status.dmaing |= 0x01; | ||
411 | outb_p(E8390_NODMA+E8390_PAGE0+E8390_START, NE_BASE + NE_CMD); | ||
412 | outb_p(sizeof(struct e8390_pkt_hdr), NE_BASE + EN0_RCNTLO); | ||
413 | outb_p(0, NE_BASE + EN0_RCNTHI); | ||
414 | outb_p(0, NE_BASE + EN0_RSARLO); /* On page boundary */ | ||
415 | outb_p(ring_page, NE_BASE + EN0_RSARHI); | ||
416 | outb_p(E8390_RREAD+E8390_START, NE_BASE + NE_CMD); | ||
417 | |||
418 | if (ei_status.word16) { | ||
419 | int len; | ||
420 | unsigned short *p = (unsigned short *)hdr; | ||
421 | for (len = sizeof(struct e8390_pkt_hdr)>>1; len > 0; len--) | ||
422 | *p++ = inw(NE_BASE + NE_DATAPORT); | ||
423 | } else | ||
424 | insb(NE_BASE + NE_DATAPORT, hdr, sizeof(struct e8390_pkt_hdr)); | ||
425 | |||
426 | outb_p(ENISR_RDC, NE_BASE + EN0_ISR); /* Ack intr. */ | ||
427 | ei_status.dmaing &= ~0x01; | ||
428 | |||
429 | le16_to_cpus(&hdr->count); | ||
430 | } | ||
431 | |||
432 | /* Block input and output, similar to the Crynwr packet driver. If you | ||
433 | are porting to a new ethercard, look at the packet driver source for hints. | ||
434 | The NEx000 doesn't share the on-board packet memory -- you have to put | ||
435 | the packet out through the "remote DMA" dataport using outb. */ | ||
436 | |||
437 | static void ne_block_input(struct net_device *dev, int count, struct sk_buff *skb, int ring_offset) | ||
438 | { | ||
439 | struct ei_device *ei_local = netdev_priv(dev); | ||
440 | #ifdef NE_SANITY_CHECK | ||
441 | int xfer_count = count; | ||
442 | #endif | ||
443 | char *buf = skb->data; | ||
444 | |||
445 | /* This *shouldn't* happen. If it does, it's the last thing you'll see */ | ||
446 | if (ei_status.dmaing) | ||
447 | { | ||
448 | printk(KERN_EMERG "%s: DMAing conflict in ne_block_input " | ||
449 | "[DMAstat:%d][irqlock:%d].\n", | ||
450 | dev->name, ei_status.dmaing, ei_status.irqlock); | ||
451 | return; | ||
452 | } | ||
453 | ei_status.dmaing |= 0x01; | ||
454 | outb_p(E8390_NODMA+E8390_PAGE0+E8390_START, NE_BASE + NE_CMD); | ||
455 | outb_p(count & 0xff, NE_BASE + EN0_RCNTLO); | ||
456 | outb_p(count >> 8, NE_BASE + EN0_RCNTHI); | ||
457 | outb_p(ring_offset & 0xff, NE_BASE + EN0_RSARLO); | ||
458 | outb_p(ring_offset >> 8, NE_BASE + EN0_RSARHI); | ||
459 | outb_p(E8390_RREAD+E8390_START, NE_BASE + NE_CMD); | ||
460 | if (ei_status.word16) | ||
461 | { | ||
462 | int len; | ||
463 | unsigned short *p = (unsigned short *)buf; | ||
464 | for (len = count>>1; len > 0; len--) | ||
465 | *p++ = inw(NE_BASE + NE_DATAPORT); | ||
466 | if (count & 0x01) | ||
467 | { | ||
468 | buf[count-1] = inb(NE_BASE + NE_DATAPORT); | ||
469 | #ifdef NE_SANITY_CHECK | ||
470 | xfer_count++; | ||
471 | #endif | ||
472 | } | ||
473 | } else { | ||
474 | insb(NE_BASE + NE_DATAPORT, buf, count); | ||
475 | } | ||
476 | |||
477 | #ifdef NE_SANITY_CHECK | ||
478 | /* This was for the ALPHA version only, but enough people have | ||
479 | been encountering problems so it is still here. If you see | ||
480 | this message you either 1) have a slightly incompatible clone | ||
481 | or 2) have noise/speed problems with your bus. */ | ||
482 | |||
483 | if (ei_debug > 1) | ||
484 | { | ||
485 | /* DMA termination address check... */ | ||
486 | int addr, tries = 20; | ||
487 | do { | ||
488 | /* DON'T check for 'inb_p(EN0_ISR) & ENISR_RDC' here | ||
489 | -- it's broken for Rx on some cards! */ | ||
490 | int high = inb_p(NE_BASE + EN0_RSARHI); | ||
491 | int low = inb_p(NE_BASE + EN0_RSARLO); | ||
492 | addr = (high << 8) + low; | ||
493 | if (((ring_offset + xfer_count) & 0xff) == low) | ||
494 | break; | ||
495 | } while (--tries > 0); | ||
496 | if (tries <= 0) | ||
497 | printk(KERN_WARNING "%s: RX transfer address mismatch," | ||
498 | "%#4.4x (expected) vs. %#4.4x (actual).\n", | ||
499 | dev->name, ring_offset + xfer_count, addr); | ||
500 | } | ||
501 | #endif | ||
502 | outb_p(ENISR_RDC, NE_BASE + EN0_ISR); /* Ack intr. */ | ||
503 | ei_status.dmaing &= ~0x01; | ||
504 | } | ||
505 | |||
506 | static void ne_block_output(struct net_device *dev, int count, | ||
507 | const unsigned char *buf, const int start_page) | ||
508 | { | ||
509 | struct ei_device *ei_local = netdev_priv(dev); | ||
510 | unsigned long dma_start; | ||
511 | #ifdef NE_SANITY_CHECK | ||
512 | int retries = 0; | ||
513 | #endif | ||
514 | |||
515 | /* Round the count up for word writes. Do we need to do this? | ||
516 | What effect will an odd byte count have on the 8390? | ||
517 | I should check someday. */ | ||
518 | |||
519 | if (ei_status.word16 && (count & 0x01)) | ||
520 | count++; | ||
521 | |||
522 | /* This *shouldn't* happen. If it does, it's the last thing you'll see */ | ||
523 | if (ei_status.dmaing) | ||
524 | { | ||
525 | printk(KERN_EMERG "%s: DMAing conflict in ne_block_output." | ||
526 | "[DMAstat:%d][irqlock:%d]\n", | ||
527 | dev->name, ei_status.dmaing, ei_status.irqlock); | ||
528 | return; | ||
529 | } | ||
530 | ei_status.dmaing |= 0x01; | ||
531 | /* We should already be in page 0, but to be safe... */ | ||
532 | outb_p(E8390_PAGE0+E8390_START+E8390_NODMA, NE_BASE + NE_CMD); | ||
533 | |||
534 | #ifdef NE_SANITY_CHECK | ||
535 | retry: | ||
536 | #endif | ||
537 | |||
538 | #ifdef NE8390_RW_BUGFIX | ||
539 | /* Handle the read-before-write bug the same way as the | ||
540 | Crynwr packet driver -- the NatSemi method doesn't work. | ||
541 | Actually this doesn't always work either, but if you have | ||
542 | problems with your NEx000 this is better than nothing! */ | ||
543 | |||
544 | outb_p(0x42, NE_BASE + EN0_RCNTLO); | ||
545 | outb_p(0x00, NE_BASE + EN0_RCNTHI); | ||
546 | outb_p(0x42, NE_BASE + EN0_RSARLO); | ||
547 | outb_p(0x00, NE_BASE + EN0_RSARHI); | ||
548 | outb_p(E8390_RREAD+E8390_START, NE_BASE + NE_CMD); | ||
549 | /* Make certain that the dummy read has occurred. */ | ||
550 | udelay(6); | ||
551 | #endif | ||
552 | |||
553 | outb_p(ENISR_RDC, NE_BASE + EN0_ISR); | ||
554 | |||
555 | /* Now the normal output. */ | ||
556 | outb_p(count & 0xff, NE_BASE + EN0_RCNTLO); | ||
557 | outb_p(count >> 8, NE_BASE + EN0_RCNTHI); | ||
558 | outb_p(0x00, NE_BASE + EN0_RSARLO); | ||
559 | outb_p(start_page, NE_BASE + EN0_RSARHI); | ||
560 | |||
561 | outb_p(E8390_RWRITE+E8390_START, NE_BASE + NE_CMD); | ||
562 | if (ei_status.word16) { | ||
563 | int len; | ||
564 | unsigned short *p = (unsigned short *)buf; | ||
565 | for (len = count>>1; len > 0; len--) | ||
566 | outw(*p++, NE_BASE + NE_DATAPORT); | ||
567 | } else { | ||
568 | outsb(NE_BASE + NE_DATAPORT, buf, count); | ||
569 | } | ||
570 | |||
571 | dma_start = jiffies; | ||
572 | |||
573 | #ifdef NE_SANITY_CHECK | ||
574 | /* This was for the ALPHA version only, but enough people have | ||
575 | been encountering problems so it is still here. */ | ||
576 | |||
577 | if (ei_debug > 1) | ||
578 | { | ||
579 | /* DMA termination address check... */ | ||
580 | int addr, tries = 20; | ||
581 | do { | ||
582 | int high = inb_p(NE_BASE + EN0_RSARHI); | ||
583 | int low = inb_p(NE_BASE + EN0_RSARLO); | ||
584 | addr = (high << 8) + low; | ||
585 | if ((start_page << 8) + count == addr) | ||
586 | break; | ||
587 | } while (--tries > 0); | ||
588 | |||
589 | if (tries <= 0) | ||
590 | { | ||
591 | printk(KERN_WARNING "%s: Tx packet transfer address mismatch," | ||
592 | "%#4.4x (expected) vs. %#4.4x (actual).\n", | ||
593 | dev->name, (start_page << 8) + count, addr); | ||
594 | if (retries++ == 0) | ||
595 | goto retry; | ||
596 | } | ||
597 | } | ||
598 | #endif | ||
599 | |||
600 | while ((inb_p(NE_BASE + EN0_ISR) & ENISR_RDC) == 0) | ||
601 | if (time_after(jiffies, dma_start + 2*HZ/100)) { /* 20ms */ | ||
602 | printk(KERN_WARNING "%s: timeout waiting for Tx RDC.\n", dev->name); | ||
603 | ne_reset_8390(dev); | ||
604 | __NS8390_init(dev,1); | ||
605 | break; | ||
606 | } | ||
607 | |||
608 | outb_p(ENISR_RDC, NE_BASE + EN0_ISR); /* Ack intr. */ | ||
609 | ei_status.dmaing &= ~0x01; | ||
610 | } | ||
611 | |||
612 | |||
613 | #ifdef MODULE | ||
614 | #define MAX_NE_CARDS 1 /* Max number of NE cards per module */ | ||
615 | static struct net_device *dev_ne[MAX_NE_CARDS]; | ||
616 | static int io[MAX_NE_CARDS]; | ||
617 | static int irq[MAX_NE_CARDS]; | ||
618 | static int bad[MAX_NE_CARDS]; /* 0xbad = bad sig or no reset ack */ | ||
619 | |||
620 | module_param_array(io, int, NULL, 0); | ||
621 | module_param_array(irq, int, NULL, 0); | ||
622 | module_param_array(bad, int, NULL, 0); | ||
623 | MODULE_PARM_DESC(io, "I/O base address(es)"); | ||
624 | MODULE_PARM_DESC(irq, "IRQ number(s)"); | ||
625 | MODULE_DESCRIPTION("H8/300 NE2000 Ethernet driver"); | ||
626 | MODULE_LICENSE("GPL"); | ||
627 | |||
628 | /* This is set up so that no ISA autoprobe takes place. We can't guarantee | ||
629 | that the ne2k probe is the last 8390 based probe to take place (as it | ||
630 | is at boot) and so the probe will get confused by any other 8390 cards. | ||
631 | ISA device autoprobes on a running machine are not recommended anyway. */ | ||
632 | |||
633 | int init_module(void) | ||
634 | { | ||
635 | int this_dev, found = 0; | ||
636 | int err; | ||
637 | |||
638 | for (this_dev = 0; this_dev < MAX_NE_CARDS; this_dev++) { | ||
639 | struct net_device *dev = ____alloc_ei_netdev(0); | ||
640 | if (!dev) | ||
641 | break; | ||
642 | if (io[this_dev]) { | ||
643 | dev->irq = irq[this_dev]; | ||
644 | dev->mem_end = bad[this_dev]; | ||
645 | dev->base_addr = io[this_dev]; | ||
646 | } else { | ||
647 | dev->base_addr = h8300_ne_base[this_dev]; | ||
648 | dev->irq = h8300_ne_irq[this_dev]; | ||
649 | } | ||
650 | err = init_reg_offset(dev, dev->base_addr); | ||
651 | if (!err) { | ||
652 | if (do_ne_probe(dev) == 0) { | ||
653 | dev_ne[found++] = dev; | ||
654 | continue; | ||
655 | } | ||
656 | } | ||
657 | free_netdev(dev); | ||
658 | if (found) | ||
659 | break; | ||
660 | if (io[this_dev] != 0) | ||
661 | printk(KERN_WARNING "ne.c: No NE*000 card found at i/o = %#x\n", dev->base_addr); | ||
662 | else | ||
663 | printk(KERN_NOTICE "ne.c: You must supply \"io=0xNNN\" value(s) for ISA cards.\n"); | ||
664 | return -ENXIO; | ||
665 | } | ||
666 | if (found) | ||
667 | return 0; | ||
668 | return -ENODEV; | ||
669 | } | ||
670 | |||
671 | void cleanup_module(void) | ||
672 | { | ||
673 | int this_dev; | ||
674 | |||
675 | for (this_dev = 0; this_dev < MAX_NE_CARDS; this_dev++) { | ||
676 | struct net_device *dev = dev_ne[this_dev]; | ||
677 | if (dev) { | ||
678 | unregister_netdev(dev); | ||
679 | cleanup_card(dev); | ||
680 | free_netdev(dev); | ||
681 | } | ||
682 | } | ||
683 | } | ||
684 | #endif /* MODULE */ | ||
diff --git a/drivers/net/ethernet/smsc/smc9194.c b/drivers/net/ethernet/smsc/smc9194.c index e85c2e7e8246..afd9873e9bdb 100644 --- a/drivers/net/ethernet/smsc/smc9194.c +++ b/drivers/net/ethernet/smsc/smc9194.c | |||
@@ -95,14 +95,6 @@ static const char version[] = | |||
95 | #define USE_32_BIT 1 | 95 | #define USE_32_BIT 1 |
96 | #endif | 96 | #endif |
97 | 97 | ||
98 | #if defined(__H8300H__) || defined(__H8300S__) | ||
99 | #define NO_AUTOPROBE | ||
100 | #undef insl | ||
101 | #undef outsl | ||
102 | #define insl(a,b,l) io_insl_noswap(a,b,l) | ||
103 | #define outsl(a,b,l) io_outsl_noswap(a,b,l) | ||
104 | #endif | ||
105 | |||
106 | /* | 98 | /* |
107 | .the SMC9194 can be at any of the following port addresses. To change, | 99 | .the SMC9194 can be at any of the following port addresses. To change, |
108 | .for a slightly different card, you can add it to the array. Keep in | 100 | .for a slightly different card, you can add it to the array. Keep in |
@@ -114,12 +106,6 @@ struct devlist { | |||
114 | unsigned int irq; | 106 | unsigned int irq; |
115 | }; | 107 | }; |
116 | 108 | ||
117 | #if defined(CONFIG_H8S_EDOSK2674) | ||
118 | static struct devlist smc_devlist[] __initdata = { | ||
119 | {.port = 0xf80000, .irq = 16}, | ||
120 | {.port = 0, .irq = 0 }, | ||
121 | }; | ||
122 | #else | ||
123 | static struct devlist smc_devlist[] __initdata = { | 109 | static struct devlist smc_devlist[] __initdata = { |
124 | {.port = 0x200, .irq = 0}, | 110 | {.port = 0x200, .irq = 0}, |
125 | {.port = 0x220, .irq = 0}, | 111 | {.port = 0x220, .irq = 0}, |
@@ -139,7 +125,6 @@ static struct devlist smc_devlist[] __initdata = { | |||
139 | {.port = 0x3E0, .irq = 0}, | 125 | {.port = 0x3E0, .irq = 0}, |
140 | {.port = 0, .irq = 0}, | 126 | {.port = 0, .irq = 0}, |
141 | }; | 127 | }; |
142 | #endif | ||
143 | /* | 128 | /* |
144 | . Wait time for memory to be free. This probably shouldn't be | 129 | . Wait time for memory to be free. This probably shouldn't be |
145 | . tuned that much, as waiting for this means nothing else happens | 130 | . tuned that much, as waiting for this means nothing else happens |
@@ -651,11 +636,7 @@ static void smc_hardware_send_packet( struct net_device * dev ) | |||
651 | #ifdef USE_32_BIT | 636 | #ifdef USE_32_BIT |
652 | if ( length & 0x2 ) { | 637 | if ( length & 0x2 ) { |
653 | outsl(ioaddr + DATA_1, buf, length >> 2 ); | 638 | outsl(ioaddr + DATA_1, buf, length >> 2 ); |
654 | #if !defined(__H8300H__) && !defined(__H8300S__) | ||
655 | outw( *((word *)(buf + (length & 0xFFFFFFFC))),ioaddr +DATA_1); | 639 | outw( *((word *)(buf + (length & 0xFFFFFFFC))),ioaddr +DATA_1); |
656 | #else | ||
657 | ctrl_outw( *((word *)(buf + (length & 0xFFFFFFFC))),ioaddr +DATA_1); | ||
658 | #endif | ||
659 | } | 640 | } |
660 | else | 641 | else |
661 | outsl(ioaddr + DATA_1, buf, length >> 2 ); | 642 | outsl(ioaddr + DATA_1, buf, length >> 2 ); |
@@ -899,7 +880,6 @@ static int __init smc_probe(struct net_device *dev, int ioaddr) | |||
899 | retval = -ENODEV; | 880 | retval = -ENODEV; |
900 | goto err_out; | 881 | goto err_out; |
901 | } | 882 | } |
902 | #if !defined(CONFIG_H8S_EDOSK2674) | ||
903 | /* well, we've already written once, so hopefully another time won't | 883 | /* well, we've already written once, so hopefully another time won't |
904 | hurt. This time, I need to switch the bank register to bank 1, | 884 | hurt. This time, I need to switch the bank register to bank 1, |
905 | so I can access the base address register */ | 885 | so I can access the base address register */ |
@@ -914,10 +894,6 @@ static int __init smc_probe(struct net_device *dev, int ioaddr) | |||
914 | retval = -ENODEV; | 894 | retval = -ENODEV; |
915 | goto err_out; | 895 | goto err_out; |
916 | } | 896 | } |
917 | #else | ||
918 | (void)base_address_register; /* Warning suppression */ | ||
919 | #endif | ||
920 | |||
921 | 897 | ||
922 | /* check if the revision register is something that I recognize. | 898 | /* check if the revision register is something that I recognize. |
923 | These might need to be added to later, as future revisions | 899 | These might need to be added to later, as future revisions |
diff --git a/drivers/parport/Kconfig b/drivers/parport/Kconfig index 70694ce38be2..dc82ef096f3b 100644 --- a/drivers/parport/Kconfig +++ b/drivers/parport/Kconfig | |||
@@ -37,7 +37,7 @@ config PARPORT_PC | |||
37 | tristate "PC-style hardware" | 37 | tristate "PC-style hardware" |
38 | depends on (!SPARC64 || PCI) && !SPARC32 && !M32R && !FRV && !S390 && \ | 38 | depends on (!SPARC64 || PCI) && !SPARC32 && !M32R && !FRV && !S390 && \ |
39 | (!M68K || ISA) && !MN10300 && !AVR32 && !BLACKFIN && \ | 39 | (!M68K || ISA) && !MN10300 && !AVR32 && !BLACKFIN && \ |
40 | !XTENSA && !CRIS && !H8300 | 40 | !XTENSA && !CRIS |
41 | 41 | ||
42 | ---help--- | 42 | ---help--- |
43 | You should say Y here if you have a PC-style parallel port. All | 43 | You should say Y here if you have a PC-style parallel port. All |
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index d1d53f301de7..6df632e0bb55 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig | |||
@@ -418,8 +418,6 @@ config BFIN_WDT | |||
418 | 418 | ||
419 | # FRV Architecture | 419 | # FRV Architecture |
420 | 420 | ||
421 | # H8300 Architecture | ||
422 | |||
423 | # X86 (i386 + ia64 + x86_64) Architecture | 421 | # X86 (i386 + ia64 + x86_64) Architecture |
424 | 422 | ||
425 | config ACQUIRE_WDT | 423 | config ACQUIRE_WDT |
diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile index 6c5bb274d3cd..8c7b8bcbbdc5 100644 --- a/drivers/watchdog/Makefile +++ b/drivers/watchdog/Makefile | |||
@@ -66,8 +66,6 @@ obj-$(CONFIG_BFIN_WDT) += bfin_wdt.o | |||
66 | 66 | ||
67 | # FRV Architecture | 67 | # FRV Architecture |
68 | 68 | ||
69 | # H8300 Architecture | ||
70 | |||
71 | # X86 (i386 + ia64 + x86_64) Architecture | 69 | # X86 (i386 + ia64 + x86_64) Architecture |
72 | obj-$(CONFIG_ACQUIRE_WDT) += acquirewdt.o | 70 | obj-$(CONFIG_ACQUIRE_WDT) += acquirewdt.o |
73 | obj-$(CONFIG_ADVANTECH_WDT) += advantechwdt.o | 71 | obj-$(CONFIG_ADVANTECH_WDT) += advantechwdt.o |
diff --git a/fs/minix/Kconfig b/fs/minix/Kconfig index 6624684dd5de..f2a0cfcef11d 100644 --- a/fs/minix/Kconfig +++ b/fs/minix/Kconfig | |||
@@ -18,7 +18,7 @@ config MINIX_FS | |||
18 | 18 | ||
19 | config MINIX_FS_NATIVE_ENDIAN | 19 | config MINIX_FS_NATIVE_ENDIAN |
20 | def_bool MINIX_FS | 20 | def_bool MINIX_FS |
21 | depends on H8300 || M32R || MICROBLAZE || MIPS || S390 || SUPERH || SPARC || XTENSA || (M68K && !MMU) | 21 | depends on M32R || MICROBLAZE || MIPS || S390 || SUPERH || SPARC || XTENSA || (M68K && !MMU) |
22 | 22 | ||
23 | config MINIX_FS_BIG_ENDIAN_16BIT_INDEXED | 23 | config MINIX_FS_BIG_ENDIAN_16BIT_INDEXED |
24 | def_bool MINIX_FS | 24 | def_bool MINIX_FS |
diff --git a/include/linux/serial_sci.h b/include/linux/serial_sci.h index d34049712a4d..50fe651da965 100644 --- a/include/linux/serial_sci.h +++ b/include/linux/serial_sci.h | |||
@@ -5,7 +5,7 @@ | |||
5 | #include <linux/sh_dma.h> | 5 | #include <linux/sh_dma.h> |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Generic header for SuperH (H)SCI(F) (used by sh/sh64/h8300 and related parts) | 8 | * Generic header for SuperH (H)SCI(F) (used by sh/sh64 and related parts) |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #define SCIx_NOT_SUPPORTED (-1) | 11 | #define SCIx_NOT_SUPPORTED (-1) |
diff --git a/include/uapi/linux/audit.h b/include/uapi/linux/audit.h index 75cef3fd97ad..db0b825b4810 100644 --- a/include/uapi/linux/audit.h +++ b/include/uapi/linux/audit.h | |||
@@ -329,7 +329,6 @@ enum { | |||
329 | #define AUDIT_ARCH_ARMEB (EM_ARM) | 329 | #define AUDIT_ARCH_ARMEB (EM_ARM) |
330 | #define AUDIT_ARCH_CRIS (EM_CRIS|__AUDIT_ARCH_LE) | 330 | #define AUDIT_ARCH_CRIS (EM_CRIS|__AUDIT_ARCH_LE) |
331 | #define AUDIT_ARCH_FRV (EM_FRV) | 331 | #define AUDIT_ARCH_FRV (EM_FRV) |
332 | #define AUDIT_ARCH_H8300 (EM_H8_300) | ||
333 | #define AUDIT_ARCH_I386 (EM_386|__AUDIT_ARCH_LE) | 332 | #define AUDIT_ARCH_I386 (EM_386|__AUDIT_ARCH_LE) |
334 | #define AUDIT_ARCH_IA64 (EM_IA_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) | 333 | #define AUDIT_ARCH_IA64 (EM_IA_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) |
335 | #define AUDIT_ARCH_M32R (EM_M32R) | 334 | #define AUDIT_ARCH_M32R (EM_M32R) |
diff --git a/include/uapi/linux/elf-em.h b/include/uapi/linux/elf-em.h index 59c17a2d38ad..01529bd96438 100644 --- a/include/uapi/linux/elf-em.h +++ b/include/uapi/linux/elf-em.h | |||
@@ -31,7 +31,6 @@ | |||
31 | #define EM_CRIS 76 /* Axis Communications 32-bit embedded processor */ | 31 | #define EM_CRIS 76 /* Axis Communications 32-bit embedded processor */ |
32 | #define EM_V850 87 /* NEC v850 */ | 32 | #define EM_V850 87 /* NEC v850 */ |
33 | #define EM_M32R 88 /* Renesas M32R */ | 33 | #define EM_M32R 88 /* Renesas M32R */ |
34 | #define EM_H8_300 46 /* Renesas H8/300,300H,H8S */ | ||
35 | #define EM_MN10300 89 /* Panasonic/MEI MN10300, AM33 */ | 34 | #define EM_MN10300 89 /* Panasonic/MEI MN10300, AM33 */ |
36 | #define EM_BLACKFIN 106 /* ADI Blackfin Processor */ | 35 | #define EM_BLACKFIN 106 /* ADI Blackfin Processor */ |
37 | #define EM_TI_C6000 140 /* TI C6X DSPs */ | 36 | #define EM_TI_C6000 140 /* TI C6X DSPs */ |
diff --git a/tools/testing/ktest/examples/crosstests.conf b/tools/testing/ktest/examples/crosstests.conf index 46736604c26c..a1203148dfa1 100644 --- a/tools/testing/ktest/examples/crosstests.conf +++ b/tools/testing/ktest/examples/crosstests.conf | |||
@@ -133,12 +133,6 @@ CROSS = frv-linux | |||
133 | ARCH = frv | 133 | ARCH = frv |
134 | GCC_VER = 4.5.1 | 134 | GCC_VER = 4.5.1 |
135 | 135 | ||
136 | # h8300 - failed make defconfig?? | ||
137 | TEST_START IF ${RUN} == h8300 || ${DO_FAILED} | ||
138 | CROSS = h8300-elf | ||
139 | ARCH = h8300 | ||
140 | GCC_VER = 4.5.1 | ||
141 | |||
142 | # m68k fails with error? | 136 | # m68k fails with error? |
143 | TEST_START IF ${RUN} == m68k || ${DO_DEFAULT} | 137 | TEST_START IF ${RUN} == m68k || ${DO_DEFAULT} |
144 | CROSS = m68k-linux | 138 | CROSS = m68k-linux |