diff options
author | Paul Mundt <lethal@linux-sh.org> | 2006-09-27 05:17:31 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2006-09-27 05:17:31 -0400 |
commit | 2c7834a6f15fe6c50ed4766f1bb6f9183b9e2740 (patch) | |
tree | 2dee1fc4b2cd69d8e7f07e0462c57c98261a9fcf /arch/sh/boards/ec3104/setup.c | |
parent | bc8fb5d0471473f775378d09db712dcb8eeece75 (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/ec3104/setup.c')
-rw-r--r-- | arch/sh/boards/ec3104/setup.c | 49 |
1 files changed, 18 insertions, 31 deletions
diff --git a/arch/sh/boards/ec3104/setup.c b/arch/sh/boards/ec3104/setup.c index 4b3ef16a0e96..902bc975a13e 100644 --- a/arch/sh/boards/ec3104/setup.c +++ b/arch/sh/boards/ec3104/setup.c | |||
@@ -21,22 +21,36 @@ | |||
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/irq.h> | 22 | #include <linux/irq.h> |
23 | #include <linux/types.h> | 23 | #include <linux/types.h> |
24 | |||
25 | #include <asm/io.h> | 24 | #include <asm/io.h> |
26 | #include <asm/irq.h> | 25 | #include <asm/irq.h> |
27 | #include <asm/machvec.h> | 26 | #include <asm/machvec.h> |
28 | #include <asm/mach/ec3104.h> | 27 | #include <asm/mach/ec3104.h> |
29 | 28 | ||
30 | const char *get_system_type(void) | 29 | static void __init ec3104_setup(char **cmdline_p) |
31 | { | 30 | { |
32 | return "EC3104"; | 31 | char str[8]; |
32 | int i; | ||
33 | |||
34 | for (i=0; i<8; i++) | ||
35 | str[i] = ctrl_readb(EC3104_BASE + i); | ||
36 | |||
37 | for (i = EC3104_IRQBASE; i < EC3104_IRQBASE + 32; i++) | ||
38 | irq_desc[i].handler = &ec3104_int; | ||
39 | |||
40 | printk("initializing EC3104 \"%.8s\" at %08x, IRQ %d, IRQ base %d\n", | ||
41 | str, EC3104_BASE, EC3104_IRQ, EC3104_IRQBASE); | ||
42 | |||
43 | /* mask all interrupts. this should have been done by the boot | ||
44 | * loader for us but we want to be sure ... */ | ||
45 | ctrl_writel(0xffffffff, EC3104_IMR); | ||
33 | } | 46 | } |
34 | 47 | ||
35 | /* | 48 | /* |
36 | * The Machine Vector | 49 | * The Machine Vector |
37 | */ | 50 | */ |
38 | |||
39 | struct sh_machine_vector mv_ec3104 __initmv = { | 51 | struct sh_machine_vector mv_ec3104 __initmv = { |
52 | .mv_name = "EC3104", | ||
53 | .mv_setup = ec3104_setup, | ||
40 | .mv_nr_irqs = 96, | 54 | .mv_nr_irqs = 96, |
41 | 55 | ||
42 | .mv_inb = ec3104_inb, | 56 | .mv_inb = ec3104_inb, |
@@ -48,31 +62,4 @@ struct sh_machine_vector mv_ec3104 __initmv = { | |||
48 | 62 | ||
49 | .mv_irq_demux = ec3104_irq_demux, | 63 | .mv_irq_demux = ec3104_irq_demux, |
50 | }; | 64 | }; |
51 | |||
52 | ALIAS_MV(ec3104) | 65 | ALIAS_MV(ec3104) |
53 | |||
54 | int __init platform_setup(void) | ||
55 | { | ||
56 | char str[8]; | ||
57 | int i; | ||
58 | |||
59 | if (0) | ||
60 | return 0; | ||
61 | |||
62 | for (i=0; i<8; i++) | ||
63 | str[i] = ctrl_readb(EC3104_BASE + i); | ||
64 | |||
65 | for (i = EC3104_IRQBASE; i < EC3104_IRQBASE + 32; i++) | ||
66 | irq_desc[i].chip = &ec3104_int; | ||
67 | |||
68 | printk("initializing EC3104 \"%.8s\" at %08x, IRQ %d, IRQ base %d\n", | ||
69 | str, EC3104_BASE, EC3104_IRQ, EC3104_IRQBASE); | ||
70 | |||
71 | |||
72 | /* mask all interrupts. this should have been done by the boot | ||
73 | * loader for us but we want to be sure ... */ | ||
74 | ctrl_writel(0xffffffff, EC3104_IMR); | ||
75 | |||
76 | return 0; | ||
77 | } | ||
78 | |||