watch dog timer: add wdt platform to rk30 device.c
authorhhb <hhb@rock-chips.com>
Mon, 27 Aug 2012 09:54:52 +0000 (17:54 +0800)
committerhhb <hhb@rock-chips.com>
Mon, 27 Aug 2012 09:54:52 +0000 (17:54 +0800)
arch/arm/mach-rk30/devices.c
drivers/watchdog/Kconfig

index 8d0315a7051041152d0aa35b3c7e7da21f139ce6..fddd9a09ea4f354bc2e6a866f45d6c46a504765e 100755 (executable)
@@ -1304,6 +1304,34 @@ static struct platform_device device_vmac = {
 };
 #endif
 
+/*
+ * rk29 wdt device  ADDED BY HHB@ROCK-CHIPS.COM
+ */
+
+#ifdef CONFIG_RK29_WATCHDOG
+
+static struct resource resources_wdt[] = {
+       {
+               .start  = IRQ_WDT,
+               .end    = IRQ_WDT,
+               .flags  = IORESOURCE_IRQ,
+       },
+       {
+               .start  = RK30_WDT_PHYS,
+               .end    = RK30_WDT_PHYS + RK30_WDT_SIZE - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+};
+
+struct platform_device rk29_device_wdt = {
+       .name   = "rk29-wdt",
+       .id     = 0,
+       .num_resources  = ARRAY_SIZE(resources_wdt),
+       .resource       = resources_wdt,
+};
+
+#endif
+
 static int __init rk30_init_devices(void)
 {
        rk30_init_dma();
@@ -1349,7 +1377,9 @@ static int __init rk30_init_devices(void)
 #ifdef CONFIG_RK29_VMAC
        platform_device_register(&device_vmac);
 #endif
-
+#ifdef CONFIG_RK29_WATCHDOG
+       platform_device_register(&rk29_device_wdt);
+#endif
        return 0;
 }
 arch_initcall(rk30_init_devices);
index 2b3e49609d7018f99dc02443b8e600fe119dde58..8e1f9f8fbbaeeb1d2cf2edee191c76fb0ec146db 100644 (file)
@@ -75,7 +75,6 @@ config WM8350_WATCHDOG
 
 config RK29_WATCHDOG
        tristate "RK29 watchdog"
-       depends on ARCH_RK29
        help
          Watchdog timer embedded into RK29xx chips. This will reboot your
          system when the timeout is reached.