@@ -119,8 +119,6 @@ int davinci_clk_init(struct clk_lookup *clocks);
int davinci_set_pllrate(struct pll_data *pll, unsigned int prediv,
unsigned int mult, unsigned int postdiv);
-extern struct platform_device davinci_wdt_device;
-
#endif
#endif
@@ -326,7 +326,7 @@ static struct resource da8xx_watchdog_resources[] = {
},
};
-struct platform_device davinci_wdt_device = {
+struct platform_device da8xx_wdt_device = {
.name = "watchdog",
.id = -1,
.num_resources = ARRAY_SIZE(da8xx_watchdog_resources),
@@ -335,7 +335,7 @@ struct platform_device davinci_wdt_device = {
int __init da8xx_register_watchdog(void)
{
- return platform_device_register(&davinci_wdt_device);
+ return platform_device_register(&da8xx_wdt_device);
}
static struct resource da8xx_emac_resources[] = {
@@ -11,7 +11,13 @@
#ifndef __ASM_ARCH_SYSTEM_H
#define __ASM_ARCH_SYSTEM_H
-extern void davinci_watchdog_reset(void);
+#include <linux/platform_device.h>
+#include <mach/cputype.h>
+
+extern struct platform_device davinci_wdt_device;
+extern struct platform_device da8xx_wdt_device;
+
+extern void davinci_watchdog_reset(struct platform_device *);
static inline void arch_idle(void)
{
@@ -20,7 +26,11 @@ static inline void arch_idle(void)
static inline void arch_reset(char mode, const char *cmd)
{
- davinci_watchdog_reset();
+ if (cpu_class_is_dmx())
+ davinci_watchdog_reset(&davinci_wdt_device);
+
+ if (cpu_class_is_da8xx())
+ davinci_watchdog_reset(&da8xx_wdt_device);
}
#endif /* __ASM_ARCH_SYSTEM_H */
@@ -399,10 +399,9 @@ struct sys_timer davinci_timer = {
/* reset board using watchdog timer */
-void davinci_watchdog_reset(void)
+void davinci_watchdog_reset(struct platform_device *pdev)
{
u32 tgcr, wdtcr;
- struct platform_device *pdev = &davinci_wdt_device;
void __iomem *base = IO_ADDRESS(pdev->resource[0].start);
struct clk *wd_clk;