blob: 610319356691d2fda4d8796cbcdffa3b9e18b3e7 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * linux/arch/m68k/kernel/setup.c
3 *
4 * Copyright (C) 1995 Hamish Macdonald
5 */
6
7/*
8 * This file handles the architecture-dependent parts of system setup
9 */
10
Linus Torvalds1da177e2005-04-16 15:20:36 -070011#include <linux/kernel.h>
12#include <linux/mm.h>
13#include <linux/sched.h>
14#include <linux/delay.h>
15#include <linux/interrupt.h>
16#include <linux/fs.h>
17#include <linux/console.h>
18#include <linux/genhd.h>
19#include <linux/errno.h>
20#include <linux/string.h>
21#include <linux/init.h>
22#include <linux/bootmem.h>
23#include <linux/seq_file.h>
24#include <linux/module.h>
25#include <linux/initrd.h>
26
27#include <asm/bootinfo.h>
28#include <asm/setup.h>
29#include <asm/irq.h>
30#include <asm/io.h>
31#include <asm/machdep.h>
32#ifdef CONFIG_AMIGA
33#include <asm/amigahw.h>
34#endif
35#ifdef CONFIG_ATARI
36#include <asm/atarihw.h>
37#include <asm/atari_stram.h>
38#endif
39#ifdef CONFIG_SUN3X
40#include <asm/dvma.h>
41#endif
42
43unsigned long m68k_machtype;
44unsigned long m68k_cputype;
Al Viro2e811482006-10-11 17:28:27 +010045EXPORT_SYMBOL(m68k_machtype);
46EXPORT_SYMBOL(m68k_cputype);
Linus Torvalds1da177e2005-04-16 15:20:36 -070047unsigned long m68k_fputype;
48unsigned long m68k_mmutype;
49#ifdef CONFIG_VME
50unsigned long vme_brdtype;
Al Viro2e811482006-10-11 17:28:27 +010051EXPORT_SYMBOL(vme_brdtype);
Linus Torvalds1da177e2005-04-16 15:20:36 -070052#endif
53
54int m68k_is040or060;
Al Viro2e811482006-10-11 17:28:27 +010055EXPORT_SYMBOL(m68k_is040or060);
Linus Torvalds1da177e2005-04-16 15:20:36 -070056
57extern int end;
58extern unsigned long availmem;
59
60int m68k_num_memory;
61int m68k_realnum_memory;
Al Viro2e811482006-10-11 17:28:27 +010062EXPORT_SYMBOL(m68k_realnum_memory);
63#ifdef CONFIG_SINGLE_MEMORY_CHUNK
Linus Torvalds1da177e2005-04-16 15:20:36 -070064unsigned long m68k_memoffset;
Al Viro2e811482006-10-11 17:28:27 +010065EXPORT_SYMBOL(m68k_memoffset);
66#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -070067struct mem_info m68k_memory[NUM_MEMINFO];
Al Viro2e811482006-10-11 17:28:27 +010068EXPORT_SYMBOL(m68k_memory);
Linus Torvalds1da177e2005-04-16 15:20:36 -070069
70static struct mem_info m68k_ramdisk;
71
72static char m68k_command_line[CL_SIZE];
73
David Howells40220c12006-10-09 12:19:47 +010074void (*mach_sched_init) (irq_handler_t handler) __initdata = NULL;
Linus Torvalds1da177e2005-04-16 15:20:36 -070075/* machine dependent irq functions */
76void (*mach_init_IRQ) (void) __initdata = NULL;
Linus Torvalds1da177e2005-04-16 15:20:36 -070077void (*mach_get_model) (char *model);
78int (*mach_get_hardware_list) (char *buffer);
Linus Torvalds1da177e2005-04-16 15:20:36 -070079/* machine dependent timer functions */
80unsigned long (*mach_gettimeoffset) (void);
81int (*mach_hwclk) (int, struct rtc_time*);
Al Viro2e811482006-10-11 17:28:27 +010082EXPORT_SYMBOL(mach_hwclk);
Linus Torvalds1da177e2005-04-16 15:20:36 -070083int (*mach_set_clock_mmss) (unsigned long);
84unsigned int (*mach_get_ss)(void);
85int (*mach_get_rtc_pll)(struct rtc_pll_info *);
86int (*mach_set_rtc_pll)(struct rtc_pll_info *);
Al Viro2e811482006-10-11 17:28:27 +010087EXPORT_SYMBOL(mach_get_ss);
88EXPORT_SYMBOL(mach_get_rtc_pll);
89EXPORT_SYMBOL(mach_set_rtc_pll);
Linus Torvalds1da177e2005-04-16 15:20:36 -070090void (*mach_reset)( void );
91void (*mach_halt)( void );
92void (*mach_power_off)( void );
93long mach_max_dma_address = 0x00ffffff; /* default set to the lower 16MB */
Linus Torvalds1da177e2005-04-16 15:20:36 -070094#ifdef CONFIG_HEARTBEAT
95void (*mach_heartbeat) (int);
96EXPORT_SYMBOL(mach_heartbeat);
97#endif
98#ifdef CONFIG_M68K_L2_CACHE
99void (*mach_l2_flush) (int);
100#endif
101#if defined(CONFIG_INPUT_M68K_BEEP) || defined(CONFIG_INPUT_M68K_BEEP_MODULE)
102void (*mach_beep)(unsigned int, unsigned int);
Al Viro2e811482006-10-11 17:28:27 +0100103EXPORT_SYMBOL(mach_beep);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700104#endif
105#if defined(CONFIG_ISA) && defined(MULTI_ISA)
106int isa_type;
107int isa_sex;
Al Viroaa7e02f2006-01-12 01:06:15 -0800108EXPORT_SYMBOL(isa_type);
109EXPORT_SYMBOL(isa_sex);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700110#endif
111
112extern int amiga_parse_bootinfo(const struct bi_record *);
113extern int atari_parse_bootinfo(const struct bi_record *);
114extern int mac_parse_bootinfo(const struct bi_record *);
115extern int q40_parse_bootinfo(const struct bi_record *);
116extern int bvme6000_parse_bootinfo(const struct bi_record *);
117extern int mvme16x_parse_bootinfo(const struct bi_record *);
118extern int mvme147_parse_bootinfo(const struct bi_record *);
119extern int hp300_parse_bootinfo(const struct bi_record *);
120
121extern void config_amiga(void);
122extern void config_atari(void);
123extern void config_mac(void);
124extern void config_sun3(void);
125extern void config_apollo(void);
126extern void config_mvme147(void);
127extern void config_mvme16x(void);
128extern void config_bvme6000(void);
129extern void config_hp300(void);
130extern void config_q40(void);
131extern void config_sun3x(void);
132
Linus Torvalds1da177e2005-04-16 15:20:36 -0700133#define MASK_256K 0xfffc0000
134
135extern void paging_init(void);
136
137static void __init m68k_parse_bootinfo(const struct bi_record *record)
138{
Roman Zippel6ff58012007-05-01 22:32:43 +0200139 while (record->tag != BI_LAST) {
140 int unknown = 0;
141 const unsigned long *data = record->data;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700142
Roman Zippel6ff58012007-05-01 22:32:43 +0200143 switch (record->tag) {
144 case BI_MACHTYPE:
145 case BI_CPUTYPE:
146 case BI_FPUTYPE:
147 case BI_MMUTYPE:
148 /* Already set up by head.S */
149 break;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700150
Roman Zippel6ff58012007-05-01 22:32:43 +0200151 case BI_MEMCHUNK:
152 if (m68k_num_memory < NUM_MEMINFO) {
153 m68k_memory[m68k_num_memory].addr = data[0];
154 m68k_memory[m68k_num_memory].size = data[1];
155 m68k_num_memory++;
156 } else
157 printk("m68k_parse_bootinfo: too many memory chunks\n");
158 break;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700159
Roman Zippel6ff58012007-05-01 22:32:43 +0200160 case BI_RAMDISK:
161 m68k_ramdisk.addr = data[0];
162 m68k_ramdisk.size = data[1];
163 break;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700164
Roman Zippel6ff58012007-05-01 22:32:43 +0200165 case BI_COMMAND_LINE:
166 strlcpy(m68k_command_line, (const char *)data,
167 sizeof(m68k_command_line));
168 break;
169
170 default:
171 if (MACH_IS_AMIGA)
172 unknown = amiga_parse_bootinfo(record);
173 else if (MACH_IS_ATARI)
174 unknown = atari_parse_bootinfo(record);
175 else if (MACH_IS_MAC)
176 unknown = mac_parse_bootinfo(record);
177 else if (MACH_IS_Q40)
178 unknown = q40_parse_bootinfo(record);
179 else if (MACH_IS_BVME6000)
180 unknown = bvme6000_parse_bootinfo(record);
181 else if (MACH_IS_MVME16x)
182 unknown = mvme16x_parse_bootinfo(record);
183 else if (MACH_IS_MVME147)
184 unknown = mvme147_parse_bootinfo(record);
185 else if (MACH_IS_HP300)
186 unknown = hp300_parse_bootinfo(record);
187 else
188 unknown = 1;
189 }
190 if (unknown)
191 printk("m68k_parse_bootinfo: unknown tag 0x%04x ignored\n",
192 record->tag);
193 record = (struct bi_record *)((unsigned long)record +
194 record->size);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700195 }
Linus Torvalds1da177e2005-04-16 15:20:36 -0700196
Roman Zippel6ff58012007-05-01 22:32:43 +0200197 m68k_realnum_memory = m68k_num_memory;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700198#ifdef CONFIG_SINGLE_MEMORY_CHUNK
Roman Zippel6ff58012007-05-01 22:32:43 +0200199 if (m68k_num_memory > 1) {
200 printk("Ignoring last %i chunks of physical memory\n",
201 (m68k_num_memory - 1));
202 m68k_num_memory = 1;
203 }
204 m68k_memoffset = m68k_memory[0].addr-PAGE_OFFSET;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700205#endif
206}
207
208void __init setup_arch(char **cmdline_p)
209{
210 extern int _etext, _edata, _end;
211#ifndef CONFIG_SUN3
212 unsigned long endmem, startmem;
213#endif
214 int i;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700215
216 /* The bootinfo is located right after the kernel bss */
217 m68k_parse_bootinfo((const struct bi_record *)&_end);
218
219 if (CPU_IS_040)
220 m68k_is040or060 = 4;
221 else if (CPU_IS_060)
222 m68k_is040or060 = 6;
223
224 /* FIXME: m68k_fputype is passed in by Penguin booter, which can
225 * be confused by software FPU emulation. BEWARE.
226 * We should really do our own FPU check at startup.
227 * [what do we do with buggy 68LC040s? if we have problems
228 * with them, we should add a test to check_bugs() below] */
229#ifndef CONFIG_M68KFPU_EMU_ONLY
230 /* clear the fpu if we have one */
231 if (m68k_fputype & (FPU_68881|FPU_68882|FPU_68040|FPU_68060)) {
232 volatile int zero = 0;
Roman Zippel6ff58012007-05-01 22:32:43 +0200233 asm volatile ("frestore %0" : : "m" (zero));
Linus Torvalds1da177e2005-04-16 15:20:36 -0700234 }
235#endif
236
237 if (CPU_IS_060) {
238 u32 pcr;
239
240 asm (".chip 68060; movec %%pcr,%0; .chip 68k"
241 : "=d" (pcr));
242 if (((pcr >> 8) & 0xff) <= 5) {
243 printk("Enabling workaround for errata I14\n");
244 asm (".chip 68060; movec %0,%%pcr; .chip 68k"
245 : : "d" (pcr | 0x20));
246 }
247 }
248
249 init_mm.start_code = PAGE_OFFSET;
250 init_mm.end_code = (unsigned long) &_etext;
251 init_mm.end_data = (unsigned long) &_edata;
252 init_mm.brk = (unsigned long) &_end;
253
254 *cmdline_p = m68k_command_line;
Alon Bar-Lev187959f2007-02-12 00:54:14 -0800255 memcpy(boot_command_line, *cmdline_p, CL_SIZE);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700256
Roman Zippeld6713b42007-05-01 22:32:45 +0200257 parse_early_param();
Linus Torvalds1da177e2005-04-16 15:20:36 -0700258
Al Viro0c793582006-01-12 01:06:35 -0800259#ifdef CONFIG_DUMMY_CONSOLE
260 conswitchp = &dummy_con;
261#endif
262
Linus Torvalds1da177e2005-04-16 15:20:36 -0700263 switch (m68k_machtype) {
264#ifdef CONFIG_AMIGA
Roman Zippel6ff58012007-05-01 22:32:43 +0200265 case MACH_AMIGA:
Linus Torvalds1da177e2005-04-16 15:20:36 -0700266 config_amiga();
267 break;
268#endif
269#ifdef CONFIG_ATARI
Roman Zippel6ff58012007-05-01 22:32:43 +0200270 case MACH_ATARI:
Linus Torvalds1da177e2005-04-16 15:20:36 -0700271 config_atari();
272 break;
273#endif
274#ifdef CONFIG_MAC
Roman Zippel6ff58012007-05-01 22:32:43 +0200275 case MACH_MAC:
Linus Torvalds1da177e2005-04-16 15:20:36 -0700276 config_mac();
277 break;
278#endif
279#ifdef CONFIG_SUN3
Roman Zippel6ff58012007-05-01 22:32:43 +0200280 case MACH_SUN3:
Linus Torvalds1da177e2005-04-16 15:20:36 -0700281 config_sun3();
282 break;
283#endif
284#ifdef CONFIG_APOLLO
Roman Zippel6ff58012007-05-01 22:32:43 +0200285 case MACH_APOLLO:
Linus Torvalds1da177e2005-04-16 15:20:36 -0700286 config_apollo();
287 break;
288#endif
289#ifdef CONFIG_MVME147
Roman Zippel6ff58012007-05-01 22:32:43 +0200290 case MACH_MVME147:
Linus Torvalds1da177e2005-04-16 15:20:36 -0700291 config_mvme147();
292 break;
293#endif
294#ifdef CONFIG_MVME16x
Roman Zippel6ff58012007-05-01 22:32:43 +0200295 case MACH_MVME16x:
Linus Torvalds1da177e2005-04-16 15:20:36 -0700296 config_mvme16x();
297 break;
298#endif
299#ifdef CONFIG_BVME6000
Roman Zippel6ff58012007-05-01 22:32:43 +0200300 case MACH_BVME6000:
Linus Torvalds1da177e2005-04-16 15:20:36 -0700301 config_bvme6000();
302 break;
303#endif
304#ifdef CONFIG_HP300
Roman Zippel6ff58012007-05-01 22:32:43 +0200305 case MACH_HP300:
Linus Torvalds1da177e2005-04-16 15:20:36 -0700306 config_hp300();
307 break;
308#endif
309#ifdef CONFIG_Q40
Roman Zippel6ff58012007-05-01 22:32:43 +0200310 case MACH_Q40:
311 config_q40();
Linus Torvalds1da177e2005-04-16 15:20:36 -0700312 break;
313#endif
314#ifdef CONFIG_SUN3X
Roman Zippel6ff58012007-05-01 22:32:43 +0200315 case MACH_SUN3X:
Linus Torvalds1da177e2005-04-16 15:20:36 -0700316 config_sun3x();
317 break;
318#endif
Roman Zippel6ff58012007-05-01 22:32:43 +0200319 default:
320 panic("No configuration setup");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700321 }
322
323#ifndef CONFIG_SUN3
324 startmem= m68k_memory[0].addr;
325 endmem = startmem + m68k_memory[0].size;
326 high_memory = (void *)PAGE_OFFSET;
327 for (i = 0; i < m68k_num_memory; i++) {
328 m68k_memory[i].size &= MASK_256K;
329 if (m68k_memory[i].addr < startmem)
330 startmem = m68k_memory[i].addr;
331 if (m68k_memory[i].addr+m68k_memory[i].size > endmem)
332 endmem = m68k_memory[i].addr+m68k_memory[i].size;
333 high_memory += m68k_memory[i].size;
334 }
335
336 availmem += init_bootmem_node(NODE_DATA(0), availmem >> PAGE_SHIFT,
337 startmem >> PAGE_SHIFT, endmem >> PAGE_SHIFT);
338
339 for (i = 0; i < m68k_num_memory; i++)
340 free_bootmem(m68k_memory[i].addr, m68k_memory[i].size);
341
342 reserve_bootmem(m68k_memory[0].addr, availmem - m68k_memory[0].addr);
343
344#ifdef CONFIG_BLK_DEV_INITRD
345 if (m68k_ramdisk.size) {
346 reserve_bootmem(m68k_ramdisk.addr, m68k_ramdisk.size);
347 initrd_start = (unsigned long)phys_to_virt(m68k_ramdisk.addr);
348 initrd_end = initrd_start + m68k_ramdisk.size;
Roman Zippel6ff58012007-05-01 22:32:43 +0200349 printk("initrd: %08lx - %08lx\n", initrd_start, initrd_end);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700350 }
351#endif
352
353#ifdef CONFIG_ATARI
354 if (MACH_IS_ATARI)
355 atari_stram_reserve_pages((void *)availmem);
356#endif
357#ifdef CONFIG_SUN3X
358 if (MACH_IS_SUN3X) {
359 dvma_init();
360 }
361#endif
362
363#endif /* !CONFIG_SUN3 */
364
365 paging_init();
366
367/* set ISA defs early as possible */
368#if defined(CONFIG_ISA) && defined(MULTI_ISA)
369#if defined(CONFIG_Q40)
370 if (MACH_IS_Q40) {
Roman Zippel6ff58012007-05-01 22:32:43 +0200371 isa_type = Q40_ISA;
372 isa_sex = 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700373 }
374#elif defined(CONFIG_GG2)
Roman Zippel6ff58012007-05-01 22:32:43 +0200375 if (MACH_IS_AMIGA && AMIGAHW_PRESENT(GG2_ISA)) {
376 isa_type = GG2_ISA;
377 isa_sex = 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700378 }
379#elif defined(CONFIG_AMIGA_PCMCIA)
Roman Zippel6ff58012007-05-01 22:32:43 +0200380 if (MACH_IS_AMIGA && AMIGAHW_PRESENT(PCMCIA)) {
381 isa_type = AG_ISA;
382 isa_sex = 1;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700383 }
384#endif
385#endif
386}
387
388static int show_cpuinfo(struct seq_file *m, void *v)
389{
Roman Zippel6ff58012007-05-01 22:32:43 +0200390 const char *cpu, *mmu, *fpu;
391 unsigned long clockfreq, clockfactor;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700392
393#define LOOP_CYCLES_68020 (8)
394#define LOOP_CYCLES_68030 (8)
395#define LOOP_CYCLES_68040 (3)
396#define LOOP_CYCLES_68060 (1)
397
Roman Zippel6ff58012007-05-01 22:32:43 +0200398 if (CPU_IS_020) {
399 cpu = "68020";
400 clockfactor = LOOP_CYCLES_68020;
401 } else if (CPU_IS_030) {
402 cpu = "68030";
403 clockfactor = LOOP_CYCLES_68030;
404 } else if (CPU_IS_040) {
405 cpu = "68040";
406 clockfactor = LOOP_CYCLES_68040;
407 } else if (CPU_IS_060) {
408 cpu = "68060";
409 clockfactor = LOOP_CYCLES_68060;
410 } else {
411 cpu = "680x0";
412 clockfactor = 0;
413 }
Linus Torvalds1da177e2005-04-16 15:20:36 -0700414
415#ifdef CONFIG_M68KFPU_EMU_ONLY
Roman Zippel6ff58012007-05-01 22:32:43 +0200416 fpu = "none(soft float)";
Linus Torvalds1da177e2005-04-16 15:20:36 -0700417#else
Roman Zippel6ff58012007-05-01 22:32:43 +0200418 if (m68k_fputype & FPU_68881)
419 fpu = "68881";
420 else if (m68k_fputype & FPU_68882)
421 fpu = "68882";
422 else if (m68k_fputype & FPU_68040)
423 fpu = "68040";
424 else if (m68k_fputype & FPU_68060)
425 fpu = "68060";
426 else if (m68k_fputype & FPU_SUNFPA)
427 fpu = "Sun FPA";
428 else
429 fpu = "none";
Linus Torvalds1da177e2005-04-16 15:20:36 -0700430#endif
431
Roman Zippel6ff58012007-05-01 22:32:43 +0200432 if (m68k_mmutype & MMU_68851)
433 mmu = "68851";
434 else if (m68k_mmutype & MMU_68030)
435 mmu = "68030";
436 else if (m68k_mmutype & MMU_68040)
437 mmu = "68040";
438 else if (m68k_mmutype & MMU_68060)
439 mmu = "68060";
440 else if (m68k_mmutype & MMU_SUN3)
441 mmu = "Sun-3";
442 else if (m68k_mmutype & MMU_APOLLO)
443 mmu = "Apollo";
444 else
445 mmu = "unknown";
Linus Torvalds1da177e2005-04-16 15:20:36 -0700446
Roman Zippel6ff58012007-05-01 22:32:43 +0200447 clockfreq = loops_per_jiffy * HZ * clockfactor;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700448
Roman Zippel6ff58012007-05-01 22:32:43 +0200449 seq_printf(m, "CPU:\t\t%s\n"
Linus Torvalds1da177e2005-04-16 15:20:36 -0700450 "MMU:\t\t%s\n"
451 "FPU:\t\t%s\n"
452 "Clocking:\t%lu.%1luMHz\n"
453 "BogoMips:\t%lu.%02lu\n"
454 "Calibration:\t%lu loops\n",
455 cpu, mmu, fpu,
456 clockfreq/1000000,(clockfreq/100000)%10,
457 loops_per_jiffy/(500000/HZ),(loops_per_jiffy/(5000/HZ))%100,
458 loops_per_jiffy);
Roman Zippel6ff58012007-05-01 22:32:43 +0200459 return 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700460}
461
462static void *c_start(struct seq_file *m, loff_t *pos)
463{
464 return *pos < 1 ? (void *)1 : NULL;
465}
466static void *c_next(struct seq_file *m, void *v, loff_t *pos)
467{
468 ++*pos;
469 return NULL;
470}
471static void c_stop(struct seq_file *m, void *v)
472{
473}
474struct seq_operations cpuinfo_op = {
Roman Zippel6ff58012007-05-01 22:32:43 +0200475 .start = c_start,
476 .next = c_next,
477 .stop = c_stop,
478 .show = show_cpuinfo,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700479};
480
481int get_hardware_list(char *buffer)
482{
Roman Zippel6ff58012007-05-01 22:32:43 +0200483 int len = 0;
484 char model[80];
485 unsigned long mem;
486 int i;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700487
Roman Zippel6ff58012007-05-01 22:32:43 +0200488 if (mach_get_model)
489 mach_get_model(model);
490 else
491 strcpy(model, "Unknown m68k");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700492
Roman Zippel6ff58012007-05-01 22:32:43 +0200493 len += sprintf(buffer + len, "Model:\t\t%s\n", model);
494 for (mem = 0, i = 0; i < m68k_num_memory; i++)
495 mem += m68k_memory[i].size;
496 len += sprintf(buffer + len, "System Memory:\t%ldK\n", mem >> 10);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700497
Roman Zippel6ff58012007-05-01 22:32:43 +0200498 if (mach_get_hardware_list)
499 len += mach_get_hardware_list(buffer + len);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700500
Roman Zippel6ff58012007-05-01 22:32:43 +0200501 return len;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700502}
503
Linus Torvalds1da177e2005-04-16 15:20:36 -0700504void check_bugs(void)
505{
506#ifndef CONFIG_M68KFPU_EMU
507 if (m68k_fputype == 0) {
Roman Zippel6ff58012007-05-01 22:32:43 +0200508 printk(KERN_EMERG "*** YOU DO NOT HAVE A FLOATING POINT UNIT, "
509 "WHICH IS REQUIRED BY LINUX/M68K ***\n");
510 printk(KERN_EMERG "Upgrade your hardware or join the FPU "
511 "emulation project\n");
512 panic("no FPU");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700513 }
514#endif /* !CONFIG_M68KFPU_EMU */
515}
Finn Thaind95fd5f2007-05-01 22:32:59 +0200516
517#ifdef CONFIG_ADB
518static int __init adb_probe_sync_enable (char *str) {
519 extern int __adb_probe_sync;
520 __adb_probe_sync = 1;
521 return 1;
522}
523
524__setup("adb_sync", adb_probe_sync_enable);
525#endif /* CONFIG_ADB */