Hi
we add an external watchdog on our board. so we need to feed this on our uboot stage.
i had enabled CONFIG_HW_WATCHDOG and CONFIG_IMX_WATCHDOG and also rewrite the function of hw_watchdog_reset. but it still doesn't work.
We use the GPIO1_IO03 to feed the external wd.
code like this:
struct gpio_regs *regs =(struct gpio_regs *)GPIO1_BASE_ADDR;
u32 l;
l = readl(®s->gpio_dir);
l |= 1 << 3;
writel(l, ®s->gpio_dir);//set dir.
l = readl(®s->gpio_dr);
l &= ~(1 << 3);
writel(l, ®s->gpio_dr);
for(i=0;i<1000;i++);
l |= 1 << 3;
writel(l, ®s->gpio_dr);
Once, in uboot, it run to this code, our board will reset auto.
does anyone have any ideas ? or who know how to feed external watchdog correctly on uboot ?
thanks.