diff options
author | Olof Johansson <olof@lixom.net> | 2013-02-09 17:27:13 -0800 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2013-02-09 17:27:13 -0800 |
commit | 93ce285503e375a4a751b632dd7b93291629c5cd (patch) | |
tree | 83ddfe4de81a87f9fecae220782a28ae340864c1 /arch/arm/mach-davinci/devices-da8xx.c | |
parent | 13c5d51953441bd03cfd057e8f340100516ef24c (diff) | |
parent | 19c7c0d81a9b1fe7342d0208b629b5e085e4f3ae (diff) |
Merge tag 'davinci-for-v3.9/dt-2' of git://gitorious.org/linux-davinci/linux-davinci into next/dt
From Sekhar Nori:
Second round of DT updates for DaVinci.
This pull request adds support for I2C0 and watchdog timer
for DA850 EVM booting using device tree. It also enables
machine reboot when using device tree.
* tag 'davinci-for-v3.9/dt-2' of git://gitorious.org/linux-davinci/linux-davinci:
ARM: davinci: da850 DT: add support for machine reboot
ARM: davinci: da850: add wdt DT node
ARM: davinci: da850: add DT node for I2C0
Diffstat (limited to 'arch/arm/mach-davinci/devices-da8xx.c')
-rw-r--r-- | arch/arm/mach-davinci/devices-da8xx.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c index aa402bc160c8..fc50243b1481 100644 --- a/arch/arm/mach-davinci/devices-da8xx.c +++ b/arch/arm/mach-davinci/devices-da8xx.c @@ -359,7 +359,7 @@ static struct resource da8xx_watchdog_resources[] = { }, }; -struct platform_device da8xx_wdt_device = { +static struct platform_device da8xx_wdt_device = { .name = "watchdog", .id = -1, .num_resources = ARRAY_SIZE(da8xx_watchdog_resources), @@ -368,7 +368,15 @@ struct platform_device da8xx_wdt_device = { void da8xx_restart(char mode, const char *cmd) { - davinci_watchdog_reset(&da8xx_wdt_device); + struct device *dev; + + dev = bus_find_device_by_name(&platform_bus_type, NULL, "watchdog"); + if (!dev) { + pr_err("%s: failed to find watchdog device\n", __func__); + return; + } + + davinci_watchdog_reset(to_platform_device(dev)); } int __init da8xx_register_watchdog(void) |