|
@@ -43,27 +43,14 @@ extern void * __rd_start, * __rd_end;
|
|
* The bigger value means no problem.
|
|
* The bigger value means no problem.
|
|
*/
|
|
*/
|
|
struct sh_cpuinfo boot_cpu_data = { CPU_SH_NONE, 10000000, };
|
|
struct sh_cpuinfo boot_cpu_data = { CPU_SH_NONE, 10000000, };
|
|
|
|
+#ifdef CONFIG_VT
|
|
struct screen_info screen_info;
|
|
struct screen_info screen_info;
|
|
|
|
+#endif
|
|
|
|
|
|
#if defined(CONFIG_SH_UNKNOWN)
|
|
#if defined(CONFIG_SH_UNKNOWN)
|
|
struct sh_machine_vector sh_mv;
|
|
struct sh_machine_vector sh_mv;
|
|
#endif
|
|
#endif
|
|
|
|
|
|
-/* We need this to satisfy some external references. */
|
|
|
|
-struct screen_info screen_info = {
|
|
|
|
- 0, 25, /* orig-x, orig-y */
|
|
|
|
- 0, /* unused */
|
|
|
|
- 0, /* orig-video-page */
|
|
|
|
- 0, /* orig-video-mode */
|
|
|
|
- 80, /* orig-video-cols */
|
|
|
|
- 0,0,0, /* ega_ax, ega_bx, ega_cx */
|
|
|
|
- 25, /* orig-video-lines */
|
|
|
|
- 0, /* orig-video-isVGA */
|
|
|
|
- 16 /* orig-video-points */
|
|
|
|
-};
|
|
|
|
-
|
|
|
|
-extern void platform_setup(void);
|
|
|
|
-extern char *get_system_type(void);
|
|
|
|
extern int root_mountflags;
|
|
extern int root_mountflags;
|
|
|
|
|
|
#define MV_NAME_SIZE 32
|
|
#define MV_NAME_SIZE 32
|
|
@@ -90,29 +77,8 @@ static struct sh_machine_vector* __init get_mv_byname(const char* name);
|
|
|
|
|
|
static char command_line[COMMAND_LINE_SIZE] = { 0, };
|
|
static char command_line[COMMAND_LINE_SIZE] = { 0, };
|
|
|
|
|
|
-struct resource standard_io_resources[] = {
|
|
|
|
- { "dma1", 0x00, 0x1f },
|
|
|
|
- { "pic1", 0x20, 0x3f },
|
|
|
|
- { "timer", 0x40, 0x5f },
|
|
|
|
- { "keyboard", 0x60, 0x6f },
|
|
|
|
- { "dma page reg", 0x80, 0x8f },
|
|
|
|
- { "pic2", 0xa0, 0xbf },
|
|
|
|
- { "dma2", 0xc0, 0xdf },
|
|
|
|
- { "fpu", 0xf0, 0xff }
|
|
|
|
-};
|
|
|
|
-
|
|
|
|
-#define STANDARD_IO_RESOURCES (sizeof(standard_io_resources)/sizeof(struct resource))
|
|
|
|
-
|
|
|
|
-/* System RAM - interrupted by the 640kB-1M hole */
|
|
|
|
-#define code_resource (ram_resources[3])
|
|
|
|
-#define data_resource (ram_resources[4])
|
|
|
|
-static struct resource ram_resources[] = {
|
|
|
|
- { "System RAM", 0x000000, 0x09ffff, IORESOURCE_BUSY },
|
|
|
|
- { "System RAM", 0x100000, 0x100000, IORESOURCE_BUSY },
|
|
|
|
- { "Video RAM area", 0x0a0000, 0x0bffff },
|
|
|
|
- { "Kernel code", 0x100000, 0 },
|
|
|
|
- { "Kernel data", 0, 0 }
|
|
|
|
-};
|
|
|
|
|
|
+static struct resource code_resource = { .name = "Kernel code", };
|
|
|
|
+static struct resource data_resource = { .name = "Kernel data", };
|
|
|
|
|
|
unsigned long memory_start, memory_end;
|
|
unsigned long memory_start, memory_end;
|
|
|
|
|
|
@@ -255,6 +221,9 @@ static int __init sh_mv_setup(char **cmdline_p)
|
|
__set_io_port_base(mv_io_base);
|
|
__set_io_port_base(mv_io_base);
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
+ if (!sh_mv.mv_nr_irqs)
|
|
|
|
+ sh_mv.mv_nr_irqs = NR_IRQS;
|
|
|
|
+
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -263,7 +232,6 @@ void __init setup_arch(char **cmdline_p)
|
|
unsigned long bootmap_size;
|
|
unsigned long bootmap_size;
|
|
unsigned long start_pfn, max_pfn, max_low_pfn;
|
|
unsigned long start_pfn, max_pfn, max_low_pfn;
|
|
|
|
|
|
-
|
|
|
|
#ifdef CONFIG_CMDLINE_BOOL
|
|
#ifdef CONFIG_CMDLINE_BOOL
|
|
strcpy(COMMAND_LINE, CONFIG_CMDLINE);
|
|
strcpy(COMMAND_LINE, CONFIG_CMDLINE);
|
|
#endif
|
|
#endif
|
|
@@ -382,14 +350,14 @@ void __init setup_arch(char **cmdline_p)
|
|
#endif
|
|
#endif
|
|
|
|
|
|
/* Perform the machine specific initialisation */
|
|
/* Perform the machine specific initialisation */
|
|
- platform_setup();
|
|
|
|
|
|
+ if (likely(sh_mv.mv_setup))
|
|
|
|
+ sh_mv.mv_setup(cmdline_p);
|
|
|
|
|
|
paging_init();
|
|
paging_init();
|
|
}
|
|
}
|
|
|
|
|
|
struct sh_machine_vector* __init get_mv_byname(const char* name)
|
|
struct sh_machine_vector* __init get_mv_byname(const char* name)
|
|
{
|
|
{
|
|
- extern int strcasecmp(const char *, const char *);
|
|
|
|
extern long __machvec_start, __machvec_end;
|
|
extern long __machvec_start, __machvec_end;
|
|
struct sh_machine_vector *all_vecs =
|
|
struct sh_machine_vector *all_vecs =
|
|
(struct sh_machine_vector *)&__machvec_start;
|
|
(struct sh_machine_vector *)&__machvec_start;
|
|
@@ -467,7 +435,8 @@ static void show_cpuflags(struct seq_file *m)
|
|
seq_printf(m, "\n");
|
|
seq_printf(m, "\n");
|
|
}
|
|
}
|
|
|
|
|
|
-static void show_cacheinfo(struct seq_file *m, const char *type, struct cache_info info)
|
|
|
|
|
|
+static void show_cacheinfo(struct seq_file *m, const char *type,
|
|
|
|
+ struct cache_info info)
|
|
{
|
|
{
|
|
unsigned int cache_size;
|
|
unsigned int cache_size;
|
|
|
|
|
|
@@ -624,4 +593,3 @@ static int __init kgdb_parse_options(char *options)
|
|
}
|
|
}
|
|
__setup("kgdb=", kgdb_parse_options);
|
|
__setup("kgdb=", kgdb_parse_options);
|
|
#endif /* CONFIG_SH_KGDB */
|
|
#endif /* CONFIG_SH_KGDB */
|
|
-
|
|
|