diff options
Diffstat (limited to 'arch/sh/boards/mpc1211/setup.c')
-rw-r--r-- | arch/sh/boards/mpc1211/setup.c | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/arch/sh/boards/mpc1211/setup.c b/arch/sh/boards/mpc1211/setup.c index 7c3d1d304157..1a0604b23ce0 100644 --- a/arch/sh/boards/mpc1211/setup.c +++ b/arch/sh/boards/mpc1211/setup.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/hdreg.h> | 10 | #include <linux/hdreg.h> |
11 | #include <linux/ide.h> | 11 | #include <linux/ide.h> |
12 | #include <linux/interrupt.h> | 12 | #include <linux/interrupt.h> |
13 | #include <linux/platform_device.h> | ||
13 | #include <asm/io.h> | 14 | #include <asm/io.h> |
14 | #include <asm/machvec.h> | 15 | #include <asm/machvec.h> |
15 | #include <asm/mpc1211/mpc1211.h> | 16 | #include <asm/mpc1211/mpc1211.h> |
@@ -281,6 +282,32 @@ static int put_smb_blk(unsigned char *p, int address, int command, int no) | |||
281 | return 0; | 282 | return 0; |
282 | } | 283 | } |
283 | 284 | ||
285 | static struct resource heartbeat_resources[] = { | ||
286 | [0] = { | ||
287 | .start = 0xa2000000, | ||
288 | .end = 0xa2000000 + 8 - 1, | ||
289 | .flags = IORESOURCE_MEM, | ||
290 | }, | ||
291 | }; | ||
292 | |||
293 | static struct platform_device heartbeat_device = { | ||
294 | .name = "heartbeat", | ||
295 | .id = -1, | ||
296 | .num_resources = ARRAY_SIZE(heartbeat_resources), | ||
297 | .resource = heartbeat_resources, | ||
298 | }; | ||
299 | |||
300 | static struct platform_device *mpc1211_devices[] __initdata = { | ||
301 | &heartbeat_device, | ||
302 | }; | ||
303 | |||
304 | static int __init mpc1211_devices_setup(void) | ||
305 | { | ||
306 | return platform_add_devices(mpc1211_devices, | ||
307 | ARRAY_SIZE(mpc1211_devices)); | ||
308 | } | ||
309 | __initcall(mpc1211_devices_setup); | ||
310 | |||
284 | /* arch/sh/boards/mpc1211/rtc.c */ | 311 | /* arch/sh/boards/mpc1211/rtc.c */ |
285 | void mpc1211_time_init(void); | 312 | void mpc1211_time_init(void); |
286 | 313 | ||
@@ -317,9 +344,5 @@ struct sh_machine_vector mv_mpc1211 __initmv = { | |||
317 | .mv_nr_irqs = 48, | 344 | .mv_nr_irqs = 48, |
318 | .mv_irq_demux = mpc1211_irq_demux, | 345 | .mv_irq_demux = mpc1211_irq_demux, |
319 | .mv_init_irq = init_mpc1211_IRQ, | 346 | .mv_init_irq = init_mpc1211_IRQ, |
320 | |||
321 | #ifdef CONFIG_HEARTBEAT | ||
322 | .mv_heartbeat = heartbeat_mpc1211, | ||
323 | #endif | ||
324 | }; | 347 | }; |
325 | ALIAS_MV(mpc1211) | 348 | ALIAS_MV(mpc1211) |