[PATCH RFC 1/2] watchdog : omap_wdt : Implement WDIOC_GETBOOTSTATUS for omap3+

Bedia, Vaibhav vaibhav.bedia at ti.com
Tue Jan 24 00:02:08 EST 2012


On Mon, Jan 23, 2012 at 16:43:07, Datta, Shubhrajyoti wrote:
> This patch intends to implement the WDIOC_GETBOOTSTATUS ioctl
> for the omap3 and omap4.
> 

Instead of just returning the register content why not parse 
the RSTST register value and check if it's really a watchdog
reset or not?

> Signed-off-by: Shubhrajyoti D <shubhrajyoti at ti.com>
> ---
>  drivers/watchdog/omap_wdt.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
> index 4b33e3f..5395a4c 100644
> --- a/drivers/watchdog/omap_wdt.c
> +++ b/drivers/watchdog/omap_wdt.c
> @@ -229,7 +229,7 @@ static long omap_wdt_ioctl(struct file *file, unsigned int cmd,
>  		if (cpu_is_omap16xx())
>  			return put_user(__raw_readw(ARM_SYSST),
>  					(int __user *)arg);
> -		if (cpu_is_omap24xx())
> +		if (cpu_is_omap24xx() || cpu_is_omap34xx() || cpu_is_omap44xx())
>  			return put_user(omap_prcm_get_reset_sources(),
>  					(int __user *)arg);
>  		return put_user(0, (int __user *)arg);
> -- 
> 1.7.1
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 




More information about the linux-arm-kernel mailing list