aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards/hp6xx/setup.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2006-09-27 05:17:31 -0400
committerPaul Mundt <lethal@linux-sh.org>2006-09-27 05:17:31 -0400
commit2c7834a6f15fe6c50ed4766f1bb6f9183b9e2740 (patch)
tree2dee1fc4b2cd69d8e7f07e0462c57c98261a9fcf /arch/sh/boards/hp6xx/setup.c
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/hp6xx/setup.c')
-rw-r--r--arch/sh/boards/hp6xx/setup.c47
1 files changed, 39 insertions, 8 deletions
diff --git a/arch/sh/boards/hp6xx/setup.c b/arch/sh/boards/hp6xx/setup.c
index 629016bec809..60ab17ad6054 100644
--- a/arch/sh/boards/hp6xx/setup.c
+++ b/arch/sh/boards/hp6xx/setup.c
@@ -19,12 +19,7 @@
19#define SCPCR 0xa4000116 19#define SCPCR 0xa4000116
20#define SCPDR 0xa4000136 20#define SCPDR 0xa4000136
21 21
22const char *get_system_type(void) 22static void __init hp6xx_setup(char **cmdline_p)
23{
24 return "HP6xx";
25}
26
27int __init platform_setup(void)
28{ 23{
29 u8 v8; 24 u8 v8;
30 u16 v; 25 u16 v;
@@ -64,6 +59,42 @@ int __init platform_setup(void)
64 v &= ~SCPCR_TS_MASK; 59 v &= ~SCPCR_TS_MASK;
65 v |= SCPCR_TS_ENABLE; 60 v |= SCPCR_TS_ENABLE;
66 ctrl_outw(v, SCPCR); 61 ctrl_outw(v, SCPCR);
67
68 return 0;
69} 62}
63
64/*
65 * XXX: This is stupid, we should have a generic machine vector for the cchips
66 * and just wrap the platform setup code in to this, as it's the only thing
67 * that ends up being different.
68 */
69struct sh_machine_vector mv_hp6xx __initmv = {
70 .mv_name = "hp6xx",
71 .mv_setup = hp6xx_setup,
72 .mv_nr_irqs = HD64461_IRQBASE + HD64461_IRQ_NUM,
73
74 .mv_inb = hd64461_inb,
75 .mv_inw = hd64461_inw,
76 .mv_inl = hd64461_inl,
77 .mv_outb = hd64461_outb,
78 .mv_outw = hd64461_outw,
79 .mv_outl = hd64461_outl,
80
81 .mv_inb_p = hd64461_inb_p,
82 .mv_inw_p = hd64461_inw,
83 .mv_inl_p = hd64461_inl,
84 .mv_outb_p = hd64461_outb_p,
85 .mv_outw_p = hd64461_outw,
86 .mv_outl_p = hd64461_outl,
87
88 .mv_insb = hd64461_insb,
89 .mv_insw = hd64461_insw,
90 .mv_insl = hd64461_insl,
91 .mv_outsb = hd64461_outsb,
92 .mv_outsw = hd64461_outsw,
93 .mv_outsl = hd64461_outsl,
94
95 .mv_readw = hd64461_readw,
96 .mv_writew = hd64461_writew,
97
98 .mv_irq_demux = hd64461_irq_demux,
99};
100ALIAS_MV(hp6xx)