diff options
Diffstat (limited to 'arch/sh/boards/renesas/rts7751r2d/setup.c')
-rw-r--r-- | arch/sh/boards/renesas/rts7751r2d/setup.c | 62 |
1 files changed, 54 insertions, 8 deletions
diff --git a/arch/sh/boards/renesas/rts7751r2d/setup.c b/arch/sh/boards/renesas/rts7751r2d/setup.c index bb56c018f2ee..20597a6e6702 100644 --- a/arch/sh/boards/renesas/rts7751r2d/setup.c +++ b/arch/sh/boards/renesas/rts7751r2d/setup.c | |||
@@ -13,9 +13,17 @@ | |||
13 | #include <linux/serial_8250.h> | 13 | #include <linux/serial_8250.h> |
14 | #include <linux/pm.h> | 14 | #include <linux/pm.h> |
15 | #include <asm/io.h> | 15 | #include <asm/io.h> |
16 | #include <asm/machvec.h> | ||
16 | #include <asm/mach/rts7751r2d.h> | 17 | #include <asm/mach/rts7751r2d.h> |
17 | #include <asm/voyagergx.h> | 18 | #include <asm/voyagergx.h> |
18 | 19 | ||
20 | extern void heartbeat_rts7751r2d(void); | ||
21 | extern void init_rts7751r2d_IRQ(void); | ||
22 | extern int rts7751r2d_irq_demux(int irq); | ||
23 | |||
24 | extern void *voyagergx_consistent_alloc(struct device *, size_t, dma_addr_t *, gfp_t); | ||
25 | extern int voyagergx_consistent_free(struct device *, size_t, void *, dma_addr_t); | ||
26 | |||
19 | static struct plat_serial8250_port uart_platform_data[] = { | 27 | static struct plat_serial8250_port uart_platform_data[] = { |
20 | { | 28 | { |
21 | .membase = (void *)VOYAGER_UART_BASE, | 29 | .membase = (void *)VOYAGER_UART_BASE, |
@@ -70,12 +78,6 @@ static int __init rts7751r2d_devices_setup(void) | |||
70 | return platform_add_devices(rts7751r2d_devices, | 78 | return platform_add_devices(rts7751r2d_devices, |
71 | ARRAY_SIZE(rts7751r2d_devices)); | 79 | ARRAY_SIZE(rts7751r2d_devices)); |
72 | } | 80 | } |
73 | __initcall(rts7751r2d_devices_setup); | ||
74 | |||
75 | const char *get_system_type(void) | ||
76 | { | ||
77 | return "RTS7751R2D"; | ||
78 | } | ||
79 | 81 | ||
80 | static void rts7751r2d_power_off(void) | 82 | static void rts7751r2d_power_off(void) |
81 | { | 83 | { |
@@ -85,12 +87,56 @@ static void rts7751r2d_power_off(void) | |||
85 | /* | 87 | /* |
86 | * Initialize the board | 88 | * Initialize the board |
87 | */ | 89 | */ |
88 | void __init platform_setup(void) | 90 | static void __init rts7751r2d_setup(char **cmdline_p) |
89 | { | 91 | { |
90 | printk(KERN_INFO "Renesas Technology Sales RTS7751R2D support.\n"); | 92 | device_initcall(rts7751r2d_devices_setup); |
93 | |||
91 | ctrl_outw(0x0000, PA_OUTPORT); | 94 | ctrl_outw(0x0000, PA_OUTPORT); |
92 | pm_power_off = rts7751r2d_power_off; | 95 | pm_power_off = rts7751r2d_power_off; |
93 | 96 | ||
94 | voyagergx_serial_init(); | 97 | voyagergx_serial_init(); |
95 | 98 | ||
99 | printk(KERN_INFO "Renesas Technology Sales RTS7751R2D support.\n"); | ||
96 | } | 100 | } |
101 | |||
102 | /* | ||
103 | * The Machine Vector | ||
104 | */ | ||
105 | struct sh_machine_vector mv_rts7751r2d __initmv = { | ||
106 | .mv_name = "RTS7751R2D", | ||
107 | .mv_setup = rts7751r2d_setup, | ||
108 | .mv_nr_irqs = 72, | ||
109 | |||
110 | .mv_inb = rts7751r2d_inb, | ||
111 | .mv_inw = rts7751r2d_inw, | ||
112 | .mv_inl = rts7751r2d_inl, | ||
113 | .mv_outb = rts7751r2d_outb, | ||
114 | .mv_outw = rts7751r2d_outw, | ||
115 | .mv_outl = rts7751r2d_outl, | ||
116 | |||
117 | .mv_inb_p = rts7751r2d_inb_p, | ||
118 | .mv_inw_p = rts7751r2d_inw, | ||
119 | .mv_inl_p = rts7751r2d_inl, | ||
120 | .mv_outb_p = rts7751r2d_outb_p, | ||
121 | .mv_outw_p = rts7751r2d_outw, | ||
122 | .mv_outl_p = rts7751r2d_outl, | ||
123 | |||
124 | .mv_insb = rts7751r2d_insb, | ||
125 | .mv_insw = rts7751r2d_insw, | ||
126 | .mv_insl = rts7751r2d_insl, | ||
127 | .mv_outsb = rts7751r2d_outsb, | ||
128 | .mv_outsw = rts7751r2d_outsw, | ||
129 | .mv_outsl = rts7751r2d_outsl, | ||
130 | |||
131 | .mv_init_irq = init_rts7751r2d_IRQ, | ||
132 | #ifdef CONFIG_HEARTBEAT | ||
133 | .mv_heartbeat = heartbeat_rts7751r2d, | ||
134 | #endif | ||
135 | .mv_irq_demux = rts7751r2d_irq_demux, | ||
136 | |||
137 | #ifdef CONFIG_USB_SM501 | ||
138 | .mv_consistent_alloc = voyagergx_consistent_alloc, | ||
139 | .mv_consistent_free = voyagergx_consistent_free, | ||
140 | #endif | ||
141 | }; | ||
142 | ALIAS_MV(rts7751r2d) | ||