#include <linux/interrupt.h>
#include <linux/mm.h>
#include <linux/fs.h>
-#include <linux/fb.h>
#include <linux/console.h>
-#include <linux/genhd.h>
#include <linux/errno.h>
#include <linux/string.h>
-#include <linux/major.h>
#include <linux/bootmem.h>
#include <linux/seq_file.h>
#include <linux/init.h>
+#include <linux/platform_device.h>
#include <asm/setup.h>
#include <asm/irq.h>
#if defined(CONFIG_CPU_H8300H)
#define CPU "H8/300H"
-#include <asm/regs306x.h>
-#endif
-
-#if defined(CONFIG_CPU_H8S)
+#elif defined(CONFIG_CPU_H8S)
#define CPU "H8S"
-#include <asm/regs267x.h>
+#else
+#define CPU "Unknown"
#endif
struct bootparams bootparams;
char __initdata command_line[COMMAND_LINE_SIZE];
extern unsigned long _ramend;
+void sim_console_register(void);
+
+void __init __attribute__((weak)) early_device_init(void)
+{
+}
void __init setup_arch(char **cmdline_p)
{
pr_notice("Flat model support (C) 1998,1999 Kenneth Albanowski, D. Jeff Dionne\n");
strcpy(boot_command_line, command_line);
+ *cmdline_p = command_line;
+
+ parse_early_param();
+
/*
* give all the memory to the bootmap allocator, tell it to put the
* boot mem_map at the start of memory
*/
free_bootmem(memory_start, memory_end - memory_start);
reserve_bootmem(memory_start, bootmap_size, BOOTMEM_DEFAULT);
+
+ early_device_init();
+#if defined(CONFIG_H8300H_SIM) || defined(CONFIG_H8S_SIM)
+ sim_console_register();
+#endif
+ early_platform_driver_probe("earlyprintk", 1, 0);
/*
* get kmalloc into gear
*/
static int show_cpuinfo(struct seq_file *m, void *v)
{
char *cpu;
- int mode;
u_long clockfreq;
cpu = CPU;
- mode = *(volatile unsigned char *)MDCR & 0x07;
-
clockfreq = bootparams.clock_freq;
- seq_printf(m, "CPU:\t\t%s (mode:%d)\n"
+ seq_printf(m, "CPU:\t\t%s\n"
"Clock:\t\t%lu.%1luMHz\n"
"BogoMips:\t%lu.%02lu\n"
"Calibration:\t%lu loops\n",
- cpu,mode,
- clockfreq/1000,clockfreq%1000,
- (loops_per_jiffy*HZ)/500000,((loops_per_jiffy*HZ)/5000)%100,
- (loops_per_jiffy*HZ));
+ cpu,
+ clockfreq/1000,clockfreq%1000,
+ (loops_per_jiffy*HZ)/500000,((loops_per_jiffy*HZ)/5000)%100,
+ (loops_per_jiffy*HZ));
return 0;
}