diff options
author | Adrian Bunk <bunk@kernel.org> | 2008-07-17 15:16:25 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-20 20:24:39 -0400 |
commit | 8dfbdf4abad6e5a7bbd097bf7e2c0ec41e0c54b4 (patch) | |
tree | 37e8208051453eb1bb85d0602161e827d95cf38e /arch/m68k/mac/debug.c | |
parent | 5575d0a3c9676b2886adad67dd4b2ac126a49f1f (diff) |
m68k/mac/: possible cleanups
This patch contains the following possible cleanups:
- make the following needlessly global code (always) static:
- baboon.c: struct baboon
- baboon.c: baboon_irq()
- config.c: mac_orig_videoaddr
- config.c: mac_identify()
- config.c: mac_report_hardware()
- config.c: mac_debug_console_write()
- config.c: mac_sccb_console_write()
- config.c: mac_scca_console_write()
- config.c: mac_init_scc_port()
- oss.c: oss_irq()
- oss.c: oss_nubus_irq()
- psc.c: psc_debug_dump()
- psc.c: psc_dma_die_die_die()
- via.c: rbv_clear
- remove the unused bootparse.c
- #if 0 the following unused functions:
- config.c: mac_debugging_short()
- config.c: mac_debugging_long()
- remove the following unused code:
- config.c: mac_bisize
- config.c: mac_env
- config.c: mac_SCC_init_done
- config.c: mac_SCC_reset_done
- config.c: mac_init_scca_port()
- config.c: mac_init_sccb_port()
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/m68k/mac/debug.c')
-rw-r--r-- | arch/m68k/mac/debug.c | 41 |
1 files changed, 10 insertions, 31 deletions
diff --git a/arch/m68k/mac/debug.c b/arch/m68k/mac/debug.c index e8a57138b4a6..2165740786a5 100644 --- a/arch/m68k/mac/debug.c +++ b/arch/m68k/mac/debug.c | |||
@@ -51,6 +51,8 @@ extern void mac_serial_print(const char *); | |||
51 | static int peng, line; | 51 | static int peng, line; |
52 | #endif | 52 | #endif |
53 | 53 | ||
54 | #if 0 | ||
55 | |||
54 | void mac_debugging_short(int pos, short num) | 56 | void mac_debugging_short(int pos, short num) |
55 | { | 57 | { |
56 | #ifdef DEBUG_SCREEN | 58 | #ifdef DEBUG_SCREEN |
@@ -125,6 +127,8 @@ void mac_debugging_long(int pos, long addr) | |||
125 | #endif | 127 | #endif |
126 | } | 128 | } |
127 | 129 | ||
130 | #endif /* 0 */ | ||
131 | |||
128 | #ifdef DEBUG_SERIAL | 132 | #ifdef DEBUG_SERIAL |
129 | /* | 133 | /* |
130 | * TODO: serial debug code | 134 | * TODO: serial debug code |
@@ -142,12 +146,6 @@ struct mac_SCC { | |||
142 | 146 | ||
143 | # define scc (*((volatile struct mac_SCC*)mac_bi_data.sccbase)) | 147 | # define scc (*((volatile struct mac_SCC*)mac_bi_data.sccbase)) |
144 | 148 | ||
145 | /* Flag that serial port is already initialized and used */ | ||
146 | int mac_SCC_init_done; | ||
147 | /* Can be set somewhere, if a SCC master reset has already be done and should | ||
148 | * not be repeated; used by kgdb */ | ||
149 | int mac_SCC_reset_done; | ||
150 | |||
151 | static int scc_port = -1; | 149 | static int scc_port = -1; |
152 | 150 | ||
153 | static struct console mac_console_driver = { | 151 | static struct console mac_console_driver = { |
@@ -171,8 +169,8 @@ static struct console mac_console_driver = { | |||
171 | * this driver if Mac. | 169 | * this driver if Mac. |
172 | */ | 170 | */ |
173 | 171 | ||
174 | void mac_debug_console_write(struct console *co, const char *str, | 172 | static void mac_debug_console_write(struct console *co, const char *str, |
175 | unsigned int count) | 173 | unsigned int count) |
176 | { | 174 | { |
177 | mac_serial_print(str); | 175 | mac_serial_print(str); |
178 | } | 176 | } |
@@ -209,8 +207,8 @@ static inline void mac_scca_out(char c) | |||
209 | scc.cha_a_data = c; | 207 | scc.cha_a_data = c; |
210 | } | 208 | } |
211 | 209 | ||
212 | void mac_sccb_console_write(struct console *co, const char *str, | 210 | static void mac_sccb_console_write(struct console *co, const char *str, |
213 | unsigned int count) | 211 | unsigned int count) |
214 | { | 212 | { |
215 | while (count--) { | 213 | while (count--) { |
216 | if (*str == '\n') | 214 | if (*str == '\n') |
@@ -219,8 +217,8 @@ void mac_sccb_console_write(struct console *co, const char *str, | |||
219 | } | 217 | } |
220 | } | 218 | } |
221 | 219 | ||
222 | void mac_scca_console_write(struct console *co, const char *str, | 220 | static void mac_scca_console_write(struct console *co, const char *str, |
223 | unsigned int count) | 221 | unsigned int count) |
224 | { | 222 | { |
225 | while (count--) { | 223 | while (count--) { |
226 | if (*str == '\n') | 224 | if (*str == '\n') |
@@ -265,14 +263,8 @@ void mac_scca_console_write(struct console *co, const char *str, | |||
265 | barrier(); \ | 263 | barrier(); \ |
266 | } while(0) | 264 | } while(0) |
267 | 265 | ||
268 | #ifndef CONFIG_SERIAL_CONSOLE | ||
269 | static void __init mac_init_scc_port(int cflag, int port) | 266 | static void __init mac_init_scc_port(int cflag, int port) |
270 | #else | ||
271 | void mac_init_scc_port(int cflag, int port) | ||
272 | #endif | ||
273 | { | 267 | { |
274 | extern int mac_SCC_reset_done; | ||
275 | |||
276 | /* | 268 | /* |
277 | * baud rates: 1200, 1800, 2400, 4800, 9600, 19.2k, 38.4k, 57.6k, 115.2k | 269 | * baud rates: 1200, 1800, 2400, 4800, 9600, 19.2k, 38.4k, 57.6k, 115.2k |
278 | */ | 270 | */ |
@@ -340,22 +332,9 @@ void mac_init_scc_port(int cflag, int port) | |||
340 | SCCA_WRITE(3, reg3 | 1); | 332 | SCCA_WRITE(3, reg3 | 1); |
341 | SCCA_WRITE(5, reg5 | 8); | 333 | SCCA_WRITE(5, reg5 | 8); |
342 | } | 334 | } |
343 | |||
344 | mac_SCC_reset_done = 1; | ||
345 | mac_SCC_init_done = 1; | ||
346 | } | 335 | } |
347 | #endif /* DEBUG_SERIAL */ | 336 | #endif /* DEBUG_SERIAL */ |
348 | 337 | ||
349 | void mac_init_scca_port(int cflag) | ||
350 | { | ||
351 | mac_init_scc_port(cflag, 0); | ||
352 | } | ||
353 | |||
354 | void mac_init_sccb_port(int cflag) | ||
355 | { | ||
356 | mac_init_scc_port(cflag, 1); | ||
357 | } | ||
358 | |||
359 | static int __init mac_debug_setup(char *arg) | 338 | static int __init mac_debug_setup(char *arg) |
360 | { | 339 | { |
361 | if (!MACH_IS_MAC) | 340 | if (!MACH_IS_MAC) |