aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@kernel.org>2008-07-17 15:16:24 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-20 20:24:39 -0400
commit5575d0a3c9676b2886adad67dd4b2ac126a49f1f (patch)
treee8b14fcf6d79bbaf174974b28b50c2a5e347bbdd /arch
parent0795dbcc4c4c93a929463957993c04cf5fec346c (diff)
m68k/atari/debug.c: possible cleanups
This patch contains the following possible cleanups: - make the following needlessly global functions (always) static: - atari_mfp_console_write() - atari_scc_console_write() - atari_midi_console_write() - atari_init_mfp_port() - atari_init_scc_port() - atari_init_midi_port() - #if 0 the following unused functions: - atari_mfp_console_wait_key() - atari_scc_console_wait_key() - atari_midi_console_wait_key() - remove the following unused variables: - atari_MFP_init_done - atari_SCC_init_done 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')
-rw-r--r--arch/m68k/atari/debug.c37
1 files changed, 7 insertions, 30 deletions
diff --git a/arch/m68k/atari/debug.c b/arch/m68k/atari/debug.c
index 043ddbc61c7..702b15ccfab 100644
--- a/arch/m68k/atari/debug.c
+++ b/arch/m68k/atari/debug.c
@@ -20,14 +20,6 @@
20#include <asm/atarihw.h> 20#include <asm/atarihw.h>
21#include <asm/atariints.h> 21#include <asm/atariints.h>
22 22
23/* Flag that Modem1 port is already initialized and used */
24int atari_MFP_init_done;
25EXPORT_SYMBOL(atari_MFP_init_done);
26
27/* Flag that Modem1 port is already initialized and used */
28int atari_SCC_init_done;
29EXPORT_SYMBOL(atari_SCC_init_done);
30
31/* Can be set somewhere, if a SCC master reset has already be done and should 23/* Can be set somewhere, if a SCC master reset has already be done and should
32 * not be repeated; used by kgdb */ 24 * not be repeated; used by kgdb */
33int atari_SCC_reset_done; 25int atari_SCC_reset_done;
@@ -47,8 +39,8 @@ static inline void ata_mfp_out(char c)
47 mfp.usart_dta = c; 39 mfp.usart_dta = c;
48} 40}
49 41
50void atari_mfp_console_write(struct console *co, const char *str, 42static void atari_mfp_console_write(struct console *co, const char *str,
51 unsigned int count) 43 unsigned int count)
52{ 44{
53 while (count--) { 45 while (count--) {
54 if (*str == '\n') 46 if (*str == '\n')
@@ -66,8 +58,8 @@ static inline void ata_scc_out(char c)
66 scc.cha_b_data = c; 58 scc.cha_b_data = c;
67} 59}
68 60
69void atari_scc_console_write(struct console *co, const char *str, 61static void atari_scc_console_write(struct console *co, const char *str,
70 unsigned int count) 62 unsigned int count)
71{ 63{
72 while (count--) { 64 while (count--) {
73 if (*str == '\n') 65 if (*str == '\n')
@@ -83,8 +75,8 @@ static inline void ata_midi_out(char c)
83 acia.mid_data = c; 75 acia.mid_data = c;
84} 76}
85 77
86void atari_midi_console_write(struct console *co, const char *str, 78static void atari_midi_console_write(struct console *co, const char *str,
87 unsigned int count) 79 unsigned int count)
88{ 80{
89 while (count--) { 81 while (count--) {
90 if (*str == '\n') 82 if (*str == '\n')
@@ -136,7 +128,7 @@ static void atari_par_console_write(struct console *co, const char *str,
136 } 128 }
137} 129}
138 130
139#ifdef CONFIG_SERIAL_CONSOLE 131#if 0
140int atari_mfp_console_wait_key(struct console *co) 132int atari_mfp_console_wait_key(struct console *co)
141{ 133{
142 while (!(mfp.rcv_stat & 0x80)) /* wait for rx buf filled */ 134 while (!(mfp.rcv_stat & 0x80)) /* wait for rx buf filled */
@@ -166,11 +158,7 @@ int atari_midi_console_wait_key(struct console *co)
166 * SCC serial ports. They're used by the debugging interface, kgdb, and the 158 * SCC serial ports. They're used by the debugging interface, kgdb, and the
167 * serial console code. 159 * serial console code.
168 */ 160 */
169#ifndef CONFIG_SERIAL_CONSOLE
170static void __init atari_init_mfp_port(int cflag) 161static void __init atari_init_mfp_port(int cflag)
171#else
172void atari_init_mfp_port(int cflag)
173#endif
174{ 162{
175 /* 163 /*
176 * timer values for 1200...115200 bps; > 38400 select 110, 134, or 150 164 * timer values for 1200...115200 bps; > 38400 select 110, 134, or 150
@@ -193,8 +181,6 @@ void atari_init_mfp_port(int cflag)
193 mfp.tim_dt_d = baud_table[baud]; 181 mfp.tim_dt_d = baud_table[baud];
194 mfp.tim_ct_cd |= 0x01; /* start timer D, 1:4 */ 182 mfp.tim_ct_cd |= 0x01; /* start timer D, 1:4 */
195 mfp.trn_stat |= 0x01; /* enable TX */ 183 mfp.trn_stat |= 0x01; /* enable TX */
196
197 atari_MFP_init_done = 1;
198} 184}
199 185
200#define SCC_WRITE(reg, val) \ 186#define SCC_WRITE(reg, val) \
@@ -214,11 +200,7 @@ void atari_init_mfp_port(int cflag)
214 MFPDELAY(); \ 200 MFPDELAY(); \
215 } while (0) 201 } while (0)
216 202
217#ifndef CONFIG_SERIAL_CONSOLE
218static void __init atari_init_scc_port(int cflag) 203static void __init atari_init_scc_port(int cflag)
219#else
220void atari_init_scc_port(int cflag)
221#endif
222{ 204{
223 extern int atari_SCC_reset_done; 205 extern int atari_SCC_reset_done;
224 static int clksrc_table[9] = 206 static int clksrc_table[9] =
@@ -277,14 +259,9 @@ void atari_init_scc_port(int cflag)
277 SCC_WRITE(5, reg5 | 8); 259 SCC_WRITE(5, reg5 | 8);
278 260
279 atari_SCC_reset_done = 1; 261 atari_SCC_reset_done = 1;
280 atari_SCC_init_done = 1;
281} 262}
282 263
283#ifndef CONFIG_SERIAL_CONSOLE
284static void __init atari_init_midi_port(int cflag) 264static void __init atari_init_midi_port(int cflag)
285#else
286void atari_init_midi_port(int cflag)
287#endif
288{ 265{
289 int baud = cflag & CBAUD; 266 int baud = cflag & CBAUD;
290 int csize = ((cflag & CSIZE) == CS8) ? 0x10 : 0x00; 267 int csize = ((cflag & CSIZE) == CS8) ? 0x10 : 0x00;