diff options
Diffstat (limited to 'arch/sh/kernel/setup.c')
| -rw-r--r-- | arch/sh/kernel/setup.c | 54 |
1 files changed, 11 insertions, 43 deletions
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index 86ef17fe48b5..de8df969d6af 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c | |||
| @@ -43,27 +43,14 @@ extern void * __rd_start, * __rd_end; | |||
| 43 | * The bigger value means no problem. | 43 | * The bigger value means no problem. |
| 44 | */ | 44 | */ |
| 45 | struct sh_cpuinfo boot_cpu_data = { CPU_SH_NONE, 10000000, }; | 45 | struct sh_cpuinfo boot_cpu_data = { CPU_SH_NONE, 10000000, }; |
| 46 | #ifdef CONFIG_VT | ||
| 46 | struct screen_info screen_info; | 47 | struct screen_info screen_info; |
| 48 | #endif | ||
| 47 | 49 | ||
| 48 | #if defined(CONFIG_SH_UNKNOWN) | 50 | #if defined(CONFIG_SH_UNKNOWN) |
| 49 | struct sh_machine_vector sh_mv; | 51 | struct sh_machine_vector sh_mv; |
| 50 | #endif | 52 | #endif |
| 51 | 53 | ||
| 52 | /* We need this to satisfy some external references. */ | ||
| 53 | struct screen_info screen_info = { | ||
| 54 | 0, 25, /* orig-x, orig-y */ | ||
| 55 | 0, /* unused */ | ||
| 56 | 0, /* orig-video-page */ | ||
| 57 | 0, /* orig-video-mode */ | ||
| 58 | 80, /* orig-video-cols */ | ||
| 59 | 0,0,0, /* ega_ax, ega_bx, ega_cx */ | ||
| 60 | 25, /* orig-video-lines */ | ||
| 61 | 0, /* orig-video-isVGA */ | ||
| 62 | 16 /* orig-video-points */ | ||
| 63 | }; | ||
| 64 | |||
| 65 | extern void platform_setup(void); | ||
| 66 | extern char *get_system_type(void); | ||
| 67 | extern int root_mountflags; | 54 | extern int root_mountflags; |
| 68 | 55 | ||
| 69 | #define MV_NAME_SIZE 32 | 56 | #define MV_NAME_SIZE 32 |
| @@ -90,29 +77,8 @@ static struct sh_machine_vector* __init get_mv_byname(const char* name); | |||
| 90 | 77 | ||
| 91 | static char command_line[COMMAND_LINE_SIZE] = { 0, }; | 78 | static char command_line[COMMAND_LINE_SIZE] = { 0, }; |
| 92 | 79 | ||
| 93 | struct resource standard_io_resources[] = { | 80 | static struct resource code_resource = { .name = "Kernel code", }; |
| 94 | { "dma1", 0x00, 0x1f }, | 81 | static struct resource data_resource = { .name = "Kernel data", }; |
| 95 | { "pic1", 0x20, 0x3f }, | ||
| 96 | { "timer", 0x40, 0x5f }, | ||
| 97 | { "keyboard", 0x60, 0x6f }, | ||
| 98 | { "dma page reg", 0x80, 0x8f }, | ||
| 99 | { "pic2", 0xa0, 0xbf }, | ||
| 100 | { "dma2", 0xc0, 0xdf }, | ||
| 101 | { "fpu", 0xf0, 0xff } | ||
| 102 | }; | ||
| 103 | |||
| 104 | #define STANDARD_IO_RESOURCES (sizeof(standard_io_resources)/sizeof(struct resource)) | ||
| 105 | |||
| 106 | /* System RAM - interrupted by the 640kB-1M hole */ | ||
| 107 | #define code_resource (ram_resources[3]) | ||
| 108 | #define data_resource (ram_resources[4]) | ||
| 109 | static struct resource ram_resources[] = { | ||
| 110 | { "System RAM", 0x000000, 0x09ffff, IORESOURCE_BUSY }, | ||
| 111 | { "System RAM", 0x100000, 0x100000, IORESOURCE_BUSY }, | ||
| 112 | { "Video RAM area", 0x0a0000, 0x0bffff }, | ||
| 113 | { "Kernel code", 0x100000, 0 }, | ||
| 114 | { "Kernel data", 0, 0 } | ||
| 115 | }; | ||
| 116 | 82 | ||
| 117 | unsigned long memory_start, memory_end; | 83 | unsigned long memory_start, memory_end; |
| 118 | 84 | ||
| @@ -255,6 +221,9 @@ static int __init sh_mv_setup(char **cmdline_p) | |||
| 255 | __set_io_port_base(mv_io_base); | 221 | __set_io_port_base(mv_io_base); |
| 256 | #endif | 222 | #endif |
| 257 | 223 | ||
| 224 | if (!sh_mv.mv_nr_irqs) | ||
| 225 | sh_mv.mv_nr_irqs = NR_IRQS; | ||
| 226 | |||
| 258 | return 0; | 227 | return 0; |
| 259 | } | 228 | } |
| 260 | 229 | ||
| @@ -263,7 +232,6 @@ void __init setup_arch(char **cmdline_p) | |||
| 263 | unsigned long bootmap_size; | 232 | unsigned long bootmap_size; |
| 264 | unsigned long start_pfn, max_pfn, max_low_pfn; | 233 | unsigned long start_pfn, max_pfn, max_low_pfn; |
| 265 | 234 | ||
| 266 | |||
| 267 | #ifdef CONFIG_CMDLINE_BOOL | 235 | #ifdef CONFIG_CMDLINE_BOOL |
| 268 | strcpy(COMMAND_LINE, CONFIG_CMDLINE); | 236 | strcpy(COMMAND_LINE, CONFIG_CMDLINE); |
| 269 | #endif | 237 | #endif |
| @@ -382,14 +350,14 @@ void __init setup_arch(char **cmdline_p) | |||
| 382 | #endif | 350 | #endif |
| 383 | 351 | ||
| 384 | /* Perform the machine specific initialisation */ | 352 | /* Perform the machine specific initialisation */ |
| 385 | platform_setup(); | 353 | if (likely(sh_mv.mv_setup)) |
| 354 | sh_mv.mv_setup(cmdline_p); | ||
| 386 | 355 | ||
| 387 | paging_init(); | 356 | paging_init(); |
| 388 | } | 357 | } |
| 389 | 358 | ||
| 390 | struct sh_machine_vector* __init get_mv_byname(const char* name) | 359 | struct sh_machine_vector* __init get_mv_byname(const char* name) |
| 391 | { | 360 | { |
| 392 | extern int strcasecmp(const char *, const char *); | ||
| 393 | extern long __machvec_start, __machvec_end; | 361 | extern long __machvec_start, __machvec_end; |
| 394 | struct sh_machine_vector *all_vecs = | 362 | struct sh_machine_vector *all_vecs = |
| 395 | (struct sh_machine_vector *)&__machvec_start; | 363 | (struct sh_machine_vector *)&__machvec_start; |
| @@ -467,7 +435,8 @@ static void show_cpuflags(struct seq_file *m) | |||
| 467 | seq_printf(m, "\n"); | 435 | seq_printf(m, "\n"); |
| 468 | } | 436 | } |
| 469 | 437 | ||
| 470 | static void show_cacheinfo(struct seq_file *m, const char *type, struct cache_info info) | 438 | static void show_cacheinfo(struct seq_file *m, const char *type, |
| 439 | struct cache_info info) | ||
| 471 | { | 440 | { |
| 472 | unsigned int cache_size; | 441 | unsigned int cache_size; |
| 473 | 442 | ||
| @@ -624,4 +593,3 @@ static int __init kgdb_parse_options(char *options) | |||
| 624 | } | 593 | } |
| 625 | __setup("kgdb=", kgdb_parse_options); | 594 | __setup("kgdb=", kgdb_parse_options); |
| 626 | #endif /* CONFIG_SH_KGDB */ | 595 | #endif /* CONFIG_SH_KGDB */ |
| 627 | |||
