ARM: OMAP2+: PRM: create PRM reset source API for the watchdog timer driver
The OMAP watchdog timer driver needs to determine what caused the SoC to reset for its GETBOOTSTATUS ioctl. So, define a set of standard reset sources across OMAP SoCs. For OMAP2xxx, 3xxx, and 4xxx SoCs, define mappings from the SoC-specific reset source register bits to the standardized reset source IDs. Create SoC-specific PRM functions that read the appropriate per-SoC register and use the mapping to return the standardized reset bits. Register the SoC-specific PRM functions with the common PRM code via prm_register(). Create a function in the common PRM code, prm_read_reset_sources(), that calls the SoC-specific function, registered during boot. This patch does not yet handle some SoCs, such as AM33xx. Those SoCs were not handled by the code this will replace. Signed-off-by: Paul Walmsley <paul@pwsan.com>
This commit is contained in:
@@ -509,15 +509,25 @@
|
||||
#define OMAP3430_RSTTIME1_MASK (0xff << 0)
|
||||
|
||||
/* PRM_RSTST */
|
||||
#define OMAP3430_ICECRUSHER_RST_SHIFT 10
|
||||
#define OMAP3430_ICECRUSHER_RST_MASK (1 << 10)
|
||||
#define OMAP3430_ICEPICK_RST_SHIFT 9
|
||||
#define OMAP3430_ICEPICK_RST_MASK (1 << 9)
|
||||
#define OMAP3430_VDD2_VOLTAGE_MANAGER_RST_SHIFT 8
|
||||
#define OMAP3430_VDD2_VOLTAGE_MANAGER_RST_MASK (1 << 8)
|
||||
#define OMAP3430_VDD1_VOLTAGE_MANAGER_RST_SHIFT 7
|
||||
#define OMAP3430_VDD1_VOLTAGE_MANAGER_RST_MASK (1 << 7)
|
||||
#define OMAP3430_EXTERNAL_WARM_RST_SHIFT 6
|
||||
#define OMAP3430_EXTERNAL_WARM_RST_MASK (1 << 6)
|
||||
#define OMAP3430_SECURE_WD_RST_SHIFT 5
|
||||
#define OMAP3430_SECURE_WD_RST_MASK (1 << 5)
|
||||
#define OMAP3430_MPU_WD_RST_SHIFT 4
|
||||
#define OMAP3430_MPU_WD_RST_MASK (1 << 4)
|
||||
#define OMAP3430_SECURITY_VIOL_RST_SHIFT 3
|
||||
#define OMAP3430_SECURITY_VIOL_RST_MASK (1 << 3)
|
||||
#define OMAP3430_GLOBAL_SW_RST_SHIFT 1
|
||||
#define OMAP3430_GLOBAL_SW_RST_MASK (1 << 1)
|
||||
#define OMAP3430_GLOBAL_COLD_RST_SHIFT 0
|
||||
#define OMAP3430_GLOBAL_COLD_RST_MASK (1 << 0)
|
||||
|
||||
/* PRM_VOLTCTRL */
|
||||
|
Reference in New Issue
Block a user