1 --- a/arch/arm/mach-cns21xx/common.h
2 +++ b/arch/arm/mach-cns21xx/common.h
3 @@ -19,5 +19,6 @@ extern struct sys_timer cns21xx_timer;
4 int __init cns21xx_register_uart0(void);
5 int __init cns21xx_register_uart1(void);
6 int __init cns21xx_register_usb(void);
7 +int __init cns21xx_register_wdt(void);
9 #endif /* _MACH_CNS21XX_COMMON_H */
10 --- a/arch/arm/mach-cns21xx/devices.c
11 +++ b/arch/arm/mach-cns21xx/devices.c
13 #include <linux/init.h>
14 #include <linux/platform_device.h>
15 #include <linux/serial_8250.h>
16 +#include <linux/fa_wdt.h>
18 #include <mach/irqs.h>
19 #include <mach/hardware.h>
20 @@ -77,3 +78,32 @@ int __init cns21xx_register_uart1(void)
21 HAL_MISC_ENABLE_UART1_PINS();
22 return platform_device_register(&cns21xx_uart1_device);
25 +static struct resource cns21xx_wdt_resources[] = {
27 + .start = CNS21XX_WDT_BASE,
28 + .end = CNS21XX_WDT_BASE + SZ_4K - 1,
29 + .flags = IORESOURCE_MEM,
33 +#define CNS21XX_WDT_CLOCK 10 /* 10 Hz */
35 +static struct fa_wdt_platform_data cns21xx_wdt_data = {
36 + .clock = CNS21XX_WDT_CLOCK,
39 +static struct platform_device cns21xx_wdt_device = {
42 + .resource = cns21xx_wdt_resources,
43 + .num_resources = ARRAY_SIZE(cns21xx_wdt_resources),
45 + .platform_data = &cns21xx_wdt_data,
49 +int __init cns21xx_register_wdt(void)
51 + return platform_device_register(&cns21xx_wdt_device);
53 --- a/drivers/watchdog/Kconfig
54 +++ b/drivers/watchdog/Kconfig
55 @@ -333,7 +333,7 @@ config IMX2_WDT
58 tristate "Faraday watchdog"
59 - depends on ARCH_GEMINI
60 + depends on ARCH_GEMINI || ARCH_CNS21XX
62 Say Y here if you want support for the built-in watchdog timer
63 found in some Faraday FA526 based SoCs.