gemini: add Linux 4.4 support
[openwrt/staging/yousong.git] / target / linux / gemini / patches-4.4 / 111-arm-gemini-add-watchdog-device.patch
1 --- a/arch/arm/mach-gemini/devices.c
2 +++ b/arch/arm/mach-gemini/devices.c
3 @@ -116,3 +116,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 @@ -27,6 +27,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(enum reboot_mode mode, const char *cmd);
33