[generic/3.9]: refresh patches against -rc4
[openwrt/svn-archive/archive.git] / target / linux / gemini / patches-3.8 / 111-arm-gemini-add-watchdog-device.patch
1 --- a/arch/arm/mach-gemini/devices.c
2 +++ b/arch/arm/mach-gemini/devices.c
3 @@ -117,3 +117,20 @@ int __init platform_register_rtc(void)
4 return platform_device_register(&gemini_rtc_device);
5 }
6
7 +static struct resource wdt_resource = {
8 + .start = GEMINI_WAQTCHDOG_BASE,
9 + .end = GEMINI_WAQTCHDOG_BASE + 0x18,
10 + .flags = IORESOURCE_MEM,
11 +};
12 +
13 +static struct platform_device wdt_device = {
14 + .name = "gemini-wdt",
15 + .id = 0,
16 + .resource = &wdt_resource,
17 + .num_resources = 1,
18 +};
19 +
20 +int __init platform_register_watchdog(void)
21 +{
22 + return platform_device_register(&wdt_device);
23 +}
24 --- a/arch/arm/mach-gemini/common.h
25 +++ b/arch/arm/mach-gemini/common.h
26 @@ -25,6 +25,7 @@ extern int platform_register_uart(void);
27 extern int platform_register_pflash(unsigned int size,
28 struct mtd_partition *parts,
29 unsigned int nr_parts);
30 +extern int platform_register_watchdog(void);
31
32 extern void gemini_restart(char mode, const char *cmd);
33