diff options
author | Paul Mundt <lethal@linux-sh.org> | 2007-05-15 02:38:30 -0400 |
---|---|---|
committer | Paul Mundt <lethal@hera.kernel.org> | 2007-06-07 22:43:40 -0400 |
commit | fd8f20e8e2f8f1d9201086bff444c8d35f0a6a45 (patch) | |
tree | 0823660fdd2ec53c6dede452d0802f54119bbde6 /arch/sh/kernel | |
parent | 82f81f4784479df17a80caff4a7156da0a2f7dea (diff) |
sh: Rip out special unknown machvec.
This kills off the BareCPU board as a "special" machvec, rather,
we leave this as a default for when no other vector is available,
or when we want to use it in combination with other vectors for
testing with generic ops. As sh_mv is copied out anyways (or
overloaded when an alternate vector is explicitly selected), this
doesn't consume any additional memory.
The generic machvec can be forcibly selected with sh_mv=generic,
or by not having any other boards enabled.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel')
-rw-r--r-- | arch/sh/kernel/cf-enabler.c | 6 | ||||
-rw-r--r-- | arch/sh/kernel/machvec.c | 12 | ||||
-rw-r--r-- | arch/sh/kernel/setup.c | 2 |
3 files changed, 12 insertions, 8 deletions
diff --git a/arch/sh/kernel/cf-enabler.c b/arch/sh/kernel/cf-enabler.c index ebc73b85094a..1c3b99642e1c 100644 --- a/arch/sh/kernel/cf-enabler.c +++ b/arch/sh/kernel/cf-enabler.c | |||
@@ -75,11 +75,7 @@ static int __init cf_init_default(void) | |||
75 | #if defined(CONFIG_CPU_SH4) | 75 | #if defined(CONFIG_CPU_SH4) |
76 | allocate_cf_area(); | 76 | allocate_cf_area(); |
77 | #endif | 77 | #endif |
78 | #if defined(CONFIG_SH_UNKNOWN) | 78 | |
79 | /* This should be done in each board's init_xxx_irq. */ | ||
80 | make_imask_irq(14); | ||
81 | disable_irq(14); | ||
82 | #endif | ||
83 | return 0; | 79 | return 0; |
84 | } | 80 | } |
85 | 81 | ||
diff --git a/arch/sh/kernel/machvec.c b/arch/sh/kernel/machvec.c index e8121de5faa4..23c5948f0124 100644 --- a/arch/sh/kernel/machvec.c +++ b/arch/sh/kernel/machvec.c | |||
@@ -35,6 +35,8 @@ static struct sh_machine_vector * __init get_mv_byname(const char *name) | |||
35 | return NULL; | 35 | return NULL; |
36 | } | 36 | } |
37 | 37 | ||
38 | static unsigned int __initdata machvec_selected; | ||
39 | |||
38 | static int __init early_parse_mv(char *from) | 40 | static int __init early_parse_mv(char *from) |
39 | { | 41 | { |
40 | char mv_name[MV_NAME_SIZE] = ""; | 42 | char mv_name[MV_NAME_SIZE] = ""; |
@@ -55,9 +57,15 @@ static int __init early_parse_mv(char *from) | |||
55 | mv_name[mv_len] = '\0'; | 57 | mv_name[mv_len] = '\0'; |
56 | from = mv_end; | 58 | from = mv_end; |
57 | 59 | ||
60 | machvec_selected = 1; | ||
61 | |||
62 | /* Boot with the generic vector */ | ||
63 | if (strcmp(mv_name, "generic") == 0) | ||
64 | return 0; | ||
65 | |||
58 | mvp = get_mv_byname(mv_name); | 66 | mvp = get_mv_byname(mv_name); |
59 | if (unlikely(!mvp)) { | 67 | if (unlikely(!mvp)) { |
60 | printk("Available vectors:\n\n\t"); | 68 | printk("Available vectors:\n\n\t'%s', ", sh_mv.mv_name); |
61 | for_each_mv(mvp) | 69 | for_each_mv(mvp) |
62 | printk("'%s', ", mvp->mv_name); | 70 | printk("'%s', ", mvp->mv_name); |
63 | printk("\n\n"); | 71 | printk("\n\n"); |
@@ -76,7 +84,7 @@ void __init sh_mv_setup(void) | |||
76 | * Only overload the machvec if one hasn't been selected on | 84 | * Only overload the machvec if one hasn't been selected on |
77 | * the command line with sh_mv= | 85 | * the command line with sh_mv= |
78 | */ | 86 | */ |
79 | if (strcmp(sh_mv.mv_name, "Unknown") != 0) { | 87 | if (!machvec_selected) { |
80 | unsigned long machvec_size; | 88 | unsigned long machvec_size; |
81 | 89 | ||
82 | machvec_size = ((unsigned long)&__machvec_end - | 90 | machvec_size = ((unsigned long)&__machvec_end - |
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index 55ed653c7a67..6f1ea9b33374 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c | |||
@@ -47,7 +47,7 @@ struct sh_cpuinfo boot_cpu_data = { CPU_SH_NONE, 10000000, }; | |||
47 | * The machine vector. First entry in .machvec.init, or clobbered by | 47 | * The machine vector. First entry in .machvec.init, or clobbered by |
48 | * sh_mv= on the command line, prior to .machvec.init teardown. | 48 | * sh_mv= on the command line, prior to .machvec.init teardown. |
49 | */ | 49 | */ |
50 | struct sh_machine_vector sh_mv = { .mv_name = "Unknown", }; | 50 | struct sh_machine_vector sh_mv = { .mv_name = "generic", }; |
51 | 51 | ||
52 | #ifdef CONFIG_VT | 52 | #ifdef CONFIG_VT |
53 | struct screen_info screen_info; | 53 | struct screen_info screen_info; |