Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0+ */
0002 /*
0003  *  linux/drivers/char/watchdog/omap_wdt.h
0004  *
0005  *  BRIEF MODULE DESCRIPTION
0006  *      OMAP Watchdog timer register definitions
0007  *
0008  *  Copyright (C) 2004 Texas Instruments.
0009  */
0010 
0011 #ifndef _OMAP_WATCHDOG_H
0012 #define _OMAP_WATCHDOG_H
0013 
0014 #define OMAP_WATCHDOG_REV       (0x00)
0015 #define OMAP_WATCHDOG_SYS_CONFIG    (0x10)
0016 #define OMAP_WATCHDOG_STATUS        (0x14)
0017 #define OMAP_WATCHDOG_CNTRL     (0x24)
0018 #define OMAP_WATCHDOG_CRR       (0x28)
0019 #define OMAP_WATCHDOG_LDR       (0x2c)
0020 #define OMAP_WATCHDOG_TGR       (0x30)
0021 #define OMAP_WATCHDOG_WPS       (0x34)
0022 #define OMAP_WATCHDOG_SPR       (0x48)
0023 
0024 /* Using the prescaler, the OMAP watchdog could go for many
0025  * months before firing.  These limits work without scaling,
0026  * with the 60 second default assumed by most tools and docs.
0027  */
0028 #define TIMER_MARGIN_MAX    (24 * 60 * 60)  /* 1 day */
0029 #define TIMER_MARGIN_DEFAULT    60  /* 60 secs */
0030 #define TIMER_MARGIN_MIN    1
0031 
0032 #define PTV         0   /* prescale */
0033 #define GET_WLDR_VAL(secs)  (0xffffffff - ((secs) * (32768/(1<<PTV))) + 1)
0034 #define GET_WCCR_SECS(val)  ((0xffffffff - (val) + 1) / (32768/(1<<PTV)))
0035 
0036 #endif              /* _OMAP_WATCHDOG_H */