diff options
Diffstat (limited to 'arch/arm/mach-omap1/devices.c')
-rw-r--r-- | arch/arm/mach-omap1/devices.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c index 7155ed8b97f8..0af635205e8a 100644 --- a/arch/arm/mach-omap1/devices.c +++ b/arch/arm/mach-omap1/devices.c | |||
@@ -17,6 +17,8 @@ | |||
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/spi/spi.h> | 18 | #include <linux/spi/spi.h> |
19 | 19 | ||
20 | #include <linux/platform_data/omap-wd-timer.h> | ||
21 | |||
20 | #include <asm/mach/map.h> | 22 | #include <asm/mach/map.h> |
21 | 23 | ||
22 | #include <mach/tc.h> | 24 | #include <mach/tc.h> |
@@ -447,18 +449,31 @@ static struct resource wdt_resources[] = { | |||
447 | }; | 449 | }; |
448 | 450 | ||
449 | static struct platform_device omap_wdt_device = { | 451 | static struct platform_device omap_wdt_device = { |
450 | .name = "omap_wdt", | 452 | .name = "omap_wdt", |
451 | .id = -1, | 453 | .id = -1, |
452 | .num_resources = ARRAY_SIZE(wdt_resources), | 454 | .num_resources = ARRAY_SIZE(wdt_resources), |
453 | .resource = wdt_resources, | 455 | .resource = wdt_resources, |
454 | }; | 456 | }; |
455 | 457 | ||
456 | static int __init omap_init_wdt(void) | 458 | static int __init omap_init_wdt(void) |
457 | { | 459 | { |
460 | struct omap_wd_timer_platform_data pdata; | ||
461 | int ret; | ||
462 | |||
458 | if (!cpu_is_omap16xx()) | 463 | if (!cpu_is_omap16xx()) |
459 | return -ENODEV; | 464 | return -ENODEV; |
460 | 465 | ||
461 | return platform_device_register(&omap_wdt_device); | 466 | pdata.read_reset_sources = omap1_get_reset_sources; |
467 | |||
468 | ret = platform_device_register(&omap_wdt_device); | ||
469 | if (!ret) { | ||
470 | ret = platform_device_add_data(&omap_wdt_device, &pdata, | ||
471 | sizeof(pdata)); | ||
472 | if (ret) | ||
473 | platform_device_del(&omap_wdt_device); | ||
474 | } | ||
475 | |||
476 | return ret; | ||
462 | } | 477 | } |
463 | subsys_initcall(omap_init_wdt); | 478 | subsys_initcall(omap_init_wdt); |
464 | #endif | 479 | #endif |