diff options
author | Roman Zippel <zippel@linux-m68k.org> | 2007-05-01 16:32:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-04 20:59:06 -0400 |
commit | d6713b4091a99fa2af2fabdcd2f3fb97f32ecf2e (patch) | |
tree | 7cabd0ff35f9ec4413ba936ddb203d13dffb1550 /arch/m68k/atari/config.c | |
parent | f8744bc95dac461cef40df7143756d1bfa393991 (diff) |
m68k: early parameter support
Add early parameter support and convert current users to it.
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/m68k/atari/config.c')
-rw-r--r-- | arch/m68k/atari/config.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/arch/m68k/atari/config.c b/arch/m68k/atari/config.c index b10e7addae5c..e40e5dcaa347 100644 --- a/arch/m68k/atari/config.c +++ b/arch/m68k/atari/config.c | |||
@@ -69,9 +69,6 @@ extern int atari_tt_hwclk (int, struct rtc_time *); | |||
69 | extern int atari_mste_set_clock_mmss (unsigned long); | 69 | extern int atari_mste_set_clock_mmss (unsigned long); |
70 | extern int atari_tt_set_clock_mmss (unsigned long); | 70 | extern int atari_tt_set_clock_mmss (unsigned long); |
71 | 71 | ||
72 | /* atari specific debug functions (in debug.c) */ | ||
73 | extern void atari_debug_init(void); | ||
74 | |||
75 | 72 | ||
76 | /* ++roman: This is a more elaborate test for an SCC chip, since the plain | 73 | /* ++roman: This is a more elaborate test for an SCC chip, since the plain |
77 | * Medusa board generates DTACK at the SCC's standard addresses, but a SCC | 74 | * Medusa board generates DTACK at the SCC's standard addresses, but a SCC |
@@ -137,15 +134,18 @@ int __init atari_parse_bootinfo(const struct bi_record *record) | |||
137 | 134 | ||
138 | 135 | ||
139 | /* Parse the Atari-specific switches= option. */ | 136 | /* Parse the Atari-specific switches= option. */ |
140 | void __init atari_switches_setup(const char *str, unsigned len) | 137 | static int __init atari_switches_setup(char *str) |
141 | { | 138 | { |
142 | char switches[len+1]; | 139 | char switches[strlen(str) + 1]; |
143 | char *p; | 140 | char *p; |
144 | int ovsc_shift; | 141 | int ovsc_shift; |
145 | char *args = switches; | 142 | char *args = switches; |
146 | 143 | ||
144 | if (!MACH_IS_ATARI) | ||
145 | return 0; | ||
146 | |||
147 | /* copy string to local array, strsep works destructively... */ | 147 | /* copy string to local array, strsep works destructively... */ |
148 | strlcpy(switches, str, sizeof(switches)); | 148 | strcpy(switches, str); |
149 | atari_switches = 0; | 149 | atari_switches = 0; |
150 | 150 | ||
151 | /* parse the options */ | 151 | /* parse the options */ |
@@ -170,8 +170,11 @@ void __init atari_switches_setup(const char *str, unsigned len) | |||
170 | atari_switches |= ATARI_SWITCH_SND7 << ovsc_shift; | 170 | atari_switches |= ATARI_SWITCH_SND7 << ovsc_shift; |
171 | } | 171 | } |
172 | } | 172 | } |
173 | return 0; | ||
173 | } | 174 | } |
174 | 175 | ||
176 | early_param("switches", atari_switches_setup); | ||
177 | |||
175 | 178 | ||
176 | /* | 179 | /* |
177 | * Setup the Atari configuration info | 180 | * Setup the Atari configuration info |
@@ -183,8 +186,6 @@ void __init config_atari(void) | |||
183 | 186 | ||
184 | memset(&atari_hw_present, 0, sizeof(atari_hw_present)); | 187 | memset(&atari_hw_present, 0, sizeof(atari_hw_present)); |
185 | 188 | ||
186 | atari_debug_init(); | ||
187 | |||
188 | /* Change size of I/O space from 64KB to 4GB. */ | 189 | /* Change size of I/O space from 64KB to 4GB. */ |
189 | ioport_resource.end = 0xFFFFFFFF; | 190 | ioport_resource.end = 0xFFFFFFFF; |
190 | 191 | ||