Re: [U-Boot] [PATCH u-boot sunxi 3/4] sunxi: Implement reset_cpu

2014-05-10 Thread Hans de Goede
Hi, On 03/24/2014 12:53 AM, Henrik Nordström wrote: > sön 2014-03-16 klockan 14:53 +0100 skrev Hans de Goede: >> void reset_cpu(ulong addr) >> { >> +static const struct sunxi_wdog *wdog = >> + &((struct sunxi_timer_reg *)SUNXI_TIMER_BASE)->wdog; >> + >> +/* Set the watchdog f

Re: [U-Boot] [PATCH u-boot sunxi 3/4] sunxi: Implement reset_cpu

2014-03-23 Thread Henrik Nordström
sön 2014-03-16 klockan 18:38 + skrev Ian Campbell: > Not sure why cmd_watchdog.c is sunxi, seems like in principal it could > be generic. In principal it could, but there is no common API for setting the watchdog timer, and no common API for disabling the watchdog once armed. Regards Henrik

Re: [U-Boot] [PATCH u-boot sunxi 3/4] sunxi: Implement reset_cpu

2014-03-23 Thread Henrik Nordström
sön 2014-03-16 klockan 14:53 +0100 skrev Hans de Goede: > void reset_cpu(ulong addr) > { > + static const struct sunxi_wdog *wdog = > + &((struct sunxi_timer_reg *)SUNXI_TIMER_BASE)->wdog; > + > + /* Set the watchdog for its shortest interval (.5s) and wait */ > + writel(

Re: [U-Boot] [PATCH u-boot sunxi 3/4] sunxi: Implement reset_cpu

2014-03-16 Thread Ian Campbell
On Sun, 2014-03-16 at 14:53 +0100, Hans de Goede wrote: > There is no way to reset the cpu, so use the watchdog for this. The sunxi.git tree does this by calling watchdog_set(0). I think it would be better to introduce the generic watchdog support and the add this a patch to use it for reset. Unle