Merge nxp-tree imx_5.4.47_2.2.0 into 5.4-2.2.x-imx
Following commits are introduced from the branch tip:5.4-rM2-2.2.x-imx-squashed5ec03d06f5
MLK-24836 ARM: imx: Refresh wdog should consider the CMD mode on i.MX7ULPbba6ff64f0
MLK-24824-3 ARM: imx: Refresh wdog1 to make sure it is NOT timeout before disabledbad81140da
MLK-24828 ARM: imx: Add revision support for i.MX7ULP rev 2.299fb4d4619
MLK-24824-2 watchdog: imx7ulp: Move suspend/resume to noirq phase8c8859e1c5
MLK-24824-1 watchdog: imx7ulp: Strictly follow the sequence for wdog operations Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
commit
04bbcf47af
|
@ -117,6 +117,13 @@
|
|||
|
||||
#define ADDR_1M_MASK 0xFFF00000
|
||||
|
||||
#define WDOG_CS 0x0
|
||||
#define WDOG_CS_CMD32EN BIT(13)
|
||||
#define WDOG_CNT 0x4
|
||||
#define REFRESH_SEQ0 0xA602
|
||||
#define REFRESH_SEQ1 0xB480
|
||||
#define REFRESH ((REFRESH_SEQ1 << 16) | REFRESH_SEQ0)
|
||||
|
||||
static void __iomem *smc1_base;
|
||||
static void __iomem *pmc0_base;
|
||||
static void __iomem *pmc1_base;
|
||||
|
@ -469,8 +476,12 @@ static void imx7ulp_wdog_refresh(void)
|
|||
* On revision 2.2, wdog2 is by default disabled when out of
|
||||
* reset, so here, we ONLY refresh wdog1.
|
||||
*/
|
||||
writel_relaxed(0xA602, wdog1_base + 0x4);
|
||||
writel_relaxed(0xB480, wdog1_base + 0x4);
|
||||
if (readl_relaxed(wdog1_base + WDOG_CS) & WDOG_CS_CMD32EN) {
|
||||
writel(REFRESH, wdog1_base + WDOG_CNT);
|
||||
} else {
|
||||
writel_relaxed(REFRESH_SEQ0, wdog1_base + WDOG_CNT);
|
||||
writel_relaxed(REFRESH_SEQ1, wdog1_base + WDOG_CNT);
|
||||
}
|
||||
}
|
||||
|
||||
static int imx7ulp_pm_enter(suspend_state_t state)
|
||||
|
|
Loading…
Reference in New Issue