sh: Rip out special unknown machvec.
authorPaul Mundt <lethal@linux-sh.org>
Tue, 15 May 2007 06:38:30 +0000 (15:38 +0900)
committerPaul Mundt <lethal@hera.kernel.org>
Fri, 8 Jun 2007 02:43:40 +0000 (02:43 +0000)
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>
arch/sh/Kconfig
arch/sh/Makefile
arch/sh/boards/unknown/Makefile [deleted file]
arch/sh/boards/unknown/setup.c [deleted file]
arch/sh/kernel/cf-enabler.c
arch/sh/kernel/machvec.c
arch/sh/kernel/setup.c

index 4c9d8fc59fe29eaacaf89093b7a39ed62fb55acb..6c42c8ed9781236ee927812e28ad2e74ef5ac532 100644 (file)
@@ -381,18 +381,6 @@ config SH_LBOX_RE2
        help
          Select L-BOX RE2 if configuring for the NTT COMWARE L-BOX RE2.
 
-config SH_UNKNOWN
-       bool "BareCPU"
-       help
-         "Bare CPU" aka "unknown" means an SH-based system which is not one
-         of the specific ones mentioned above, which means you need to enter
-         all sorts of stuff like CONFIG_MEMORY_START because the config
-         system doesn't already know what it is.  You get a machine vector
-         without any platform-specific code in it, so things like the RTC may
-         not work.
-
-         This option is for the early stages of porting to a new machine.
-
 endmenu
 
 source "arch/sh/boards/renesas/hs7751rvoip/Kconfig"
@@ -401,7 +389,7 @@ source "arch/sh/boards/renesas/r7780rp/Kconfig"
 
 config CF_ENABLER
        bool "Compact Flash Enabler support"
-       depends on SH_SOLUTION_ENGINE || SH_UNKNOWN || SH_SH03
+       depends on SH_SOLUTION_ENGINE || SH_SH03
        ---help---
          Compact Flash is a small, removable mass storage device introduced
          in 1994 originally as a PCMCIA device.  If you say `Y' here, you
index c7323e7dce67bd2253b2797b25d69f7a852052b4..ec2d82eda90d0ee11edb6af11d83ffcebfb3a964 100644 (file)
@@ -113,7 +113,6 @@ machdir-$(CONFIG_SH_SHMIN)                  += shmin
 machdir-$(CONFIG_SH_7206_SOLUTION_ENGINE)      += se/7206
 machdir-$(CONFIG_SH_7619_SOLUTION_ENGINE)      += se/7619
 machdir-$(CONFIG_SH_LBOX_RE2)                  += lboxre2
-machdir-$(CONFIG_SH_UNKNOWN)                   += unknown
 
 incdir-y       := $(notdir $(machdir-y))
 
diff --git a/arch/sh/boards/unknown/Makefile b/arch/sh/boards/unknown/Makefile
deleted file mode 100644 (file)
index 7d18f40..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#
-# Makefile for unknown SH boards 
-#
-
-obj-y   := setup.o
-
diff --git a/arch/sh/boards/unknown/setup.c b/arch/sh/boards/unknown/setup.c
deleted file mode 100644 (file)
index f975a1f..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * linux/arch/sh/boards/unknown/setup.c
- *
- * Copyright (C) 2002 Paul Mundt
- *
- * May be copied or modified under the terms of the GNU General Public
- * License.  See linux/COPYING for more information.
- *
- * Setup code for an unknown machine (internal peripherals only)
- *
- * This is the simplest of all boards, and serves only as a quick and dirty
- * method to start debugging a new board during bring-up until proper board
- * setup code is written.
- */
-#include <linux/init.h>
-#include <asm/machvec.h>
-
-static struct sh_machine_vector mv_unknown __initmv = {
-       .mv_name                = "Unknown",
-};
index ebc73b85094a9b9b63a3667556c077c432e0e624..1c3b99642e1c3df4d2d90b37f26a1482655c27d4 100644 (file)
@@ -75,11 +75,7 @@ static int __init cf_init_default(void)
 #if defined(CONFIG_CPU_SH4)
        allocate_cf_area();
 #endif
-#if defined(CONFIG_SH_UNKNOWN)
-       /* This should be done in each board's init_xxx_irq. */
-       make_imask_irq(14);
-       disable_irq(14);
-#endif
+
        return 0;
 }
 
index e8121de5faa4f9108dd20f086e46d610e6561d29..23c5948f0124675862511d4e7fcb995399ce2a86 100644 (file)
@@ -35,6 +35,8 @@ static struct sh_machine_vector * __init get_mv_byname(const char *name)
        return NULL;
 }
 
+static unsigned int __initdata machvec_selected;
+
 static int __init early_parse_mv(char *from)
 {
        char mv_name[MV_NAME_SIZE] = "";
@@ -55,9 +57,15 @@ static int __init early_parse_mv(char *from)
        mv_name[mv_len] = '\0';
        from = mv_end;
 
+       machvec_selected = 1;
+
+       /* Boot with the generic vector */
+       if (strcmp(mv_name, "generic") == 0)
+               return 0;
+
        mvp = get_mv_byname(mv_name);
        if (unlikely(!mvp)) {
-               printk("Available vectors:\n\n\t");
+               printk("Available vectors:\n\n\t'%s', ", sh_mv.mv_name);
                for_each_mv(mvp)
                        printk("'%s', ", mvp->mv_name);
                printk("\n\n");
@@ -76,7 +84,7 @@ void __init sh_mv_setup(void)
         * Only overload the machvec if one hasn't been selected on
         * the command line with sh_mv=
         */
-       if (strcmp(sh_mv.mv_name, "Unknown") != 0) {
+       if (!machvec_selected) {
                unsigned long machvec_size;
 
                machvec_size = ((unsigned long)&__machvec_end -
index 55ed653c7a677a7b303a9644d38e73dd4ae9dfe1..6f1ea9b3337424d2700c19320f9c588ce0855e11 100644 (file)
@@ -47,7 +47,7 @@ struct sh_cpuinfo boot_cpu_data = { CPU_SH_NONE, 10000000, };
  * The machine vector. First entry in .machvec.init, or clobbered by
  * sh_mv= on the command line, prior to .machvec.init teardown.
  */
-struct sh_machine_vector sh_mv = { .mv_name = "Unknown", };
+struct sh_machine_vector sh_mv = { .mv_name = "generic", };
 
 #ifdef CONFIG_VT
 struct screen_info screen_info;