aboutsummaryrefslogtreecommitdiff
path: root/arch/sh/boards/renesas/r7780rp
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2006-09-27 18:17:31 +0900
committerPaul Mundt <lethal@linux-sh.org>2006-09-27 18:17:31 +0900
commit2c7834a6f15fe6c50ed4766f1bb6f9183b9e2740 (patch)
tree2dee1fc4b2cd69d8e7f07e0462c57c98261a9fcf /arch/sh/boards/renesas/r7780rp
parentbc8fb5d0471473f775378d09db712dcb8eeece75 (diff)
sh: machvec rework.
Some more machvec overhauling and setup code cleanup. Kill off get_system_type() and platform_setup(), we can do these both through the machvec. While we're add it, kill off more useless mach.c's and drop some legacy cruft from setup.c. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boards/renesas/r7780rp')
-rw-r--r--arch/sh/boards/renesas/r7780rp/setup.c83
1 files changed, 41 insertions, 42 deletions
diff --git a/arch/sh/boards/renesas/r7780rp/setup.c b/arch/sh/boards/renesas/r7780rp/setup.c
index 0e4d5e1b541..b941aa0aa34 100644
--- a/arch/sh/boards/renesas/r7780rp/setup.c
+++ b/arch/sh/boards/renesas/r7780rp/setup.c
@@ -20,41 +20,6 @@
extern void heartbeat_r7780rp(void);
extern void init_r7780rp_IRQ(void);
-/*
- * The Machine Vector
- */
-struct sh_machine_vector mv_r7780rp __initmv = {
- .mv_nr_irqs = 109,
-
- .mv_inb = r7780rp_inb,
- .mv_inw = r7780rp_inw,
- .mv_inl = r7780rp_inl,
- .mv_outb = r7780rp_outb,
- .mv_outw = r7780rp_outw,
- .mv_outl = r7780rp_outl,
-
- .mv_inb_p = r7780rp_inb_p,
- .mv_inw_p = r7780rp_inw,
- .mv_inl_p = r7780rp_inl,
- .mv_outb_p = r7780rp_outb_p,
- .mv_outw_p = r7780rp_outw,
- .mv_outl_p = r7780rp_outl,
-
- .mv_insb = r7780rp_insb,
- .mv_insw = r7780rp_insw,
- .mv_insl = r7780rp_insl,
- .mv_outsb = r7780rp_outsb,
- .mv_outsw = r7780rp_outsw,
- .mv_outsl = r7780rp_outsl,
-
- .mv_ioport_map = r7780rp_ioport_map,
- .mv_init_irq = init_r7780rp_IRQ,
-#ifdef CONFIG_HEARTBEAT
- .mv_heartbeat = heartbeat_r7780rp,
-#endif
-};
-ALIAS_MV(r7780rp)
-
static struct resource m66596_usb_host_resources[] = {
[0] = {
.start = 0xa4800000,
@@ -88,7 +53,6 @@ static int __init r7780rp_devices_setup(void)
return platform_add_devices(r7780rp_devices,
ARRAY_SIZE(r7780rp_devices));
}
-__initcall(r7780rp_devices_setup);
/*
* Platform specific clocks
@@ -117,11 +81,6 @@ static struct clk *r7780rp_clocks[] = {
&ivdr_clk,
};
-const char *get_system_type(void)
-{
- return "Highlander R7780RP-1";
-}
-
static void r7780rp_power_off(void)
{
#ifdef CONFIG_SH_R7780MP
@@ -132,11 +91,13 @@ static void r7780rp_power_off(void)
/*
* Initialize the board
*/
-void __init platform_setup(void)
+static void __init r7780rp_setup(char **cmdline_p)
{
u16 ver = ctrl_inw(PA_VERREG);
int i;
+ device_initcall(r7780rp_devices_setup);
+
printk(KERN_INFO "Renesas Solutions Highlander R7780RP-1 support.\n");
printk(KERN_INFO "Board version: %d (revision %d), "
@@ -162,3 +123,41 @@ void __init platform_setup(void)
pm_power_off = r7780rp_power_off;
}
+
+/*
+ * The Machine Vector
+ */
+struct sh_machine_vector mv_r7780rp __initmv = {
+ .mv_name = "Highlander R7780RP-1",
+ .mv_setup = r7780rp_setup,
+
+ .mv_nr_irqs = 109,
+
+ .mv_inb = r7780rp_inb,
+ .mv_inw = r7780rp_inw,
+ .mv_inl = r7780rp_inl,
+ .mv_outb = r7780rp_outb,
+ .mv_outw = r7780rp_outw,
+ .mv_outl = r7780rp_outl,
+
+ .mv_inb_p = r7780rp_inb_p,
+ .mv_inw_p = r7780rp_inw,
+ .mv_inl_p = r7780rp_inl,
+ .mv_outb_p = r7780rp_outb_p,
+ .mv_outw_p = r7780rp_outw,
+ .mv_outl_p = r7780rp_outl,
+
+ .mv_insb = r7780rp_insb,
+ .mv_insw = r7780rp_insw,
+ .mv_insl = r7780rp_insl,
+ .mv_outsb = r7780rp_outsb,
+ .mv_outsw = r7780rp_outsw,
+ .mv_outsl = r7780rp_outsl,
+
+ .mv_ioport_map = r7780rp_ioport_map,
+ .mv_init_irq = init_r7780rp_IRQ,
+#ifdef CONFIG_HEARTBEAT
+ .mv_heartbeat = heartbeat_r7780rp,
+#endif
+};
+ALIAS_MV(r7780rp)