]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: socfpga: soc64: Add SDM triggered warm reset bit mask
authorChee Hong Ang <chee.hong.ang@intel.com>
Wed, 5 Aug 2020 13:15:56 +0000 (21:15 +0800)
committerLey Foon Tan <ley.foon.tan@intel.com>
Fri, 9 Oct 2020 09:53:11 +0000 (17:53 +0800)
Include SDM triggered warm reset bit (BIT1) in Reset Manager's stat
register when checking for HPS warm reset status.
Refactor the warm reset mask macro for clarity purpose.

Signed-off-by: Chee Hong Ang <chee.hong.ang@intel.com>
Reviewed-by: Ley Foon Tan <ley.foon.tan@intel.com>
arch/arm/mach-socfpga/include/mach/reset_manager_soc64.h

index 3f952bcc6e87f128434781c331fbca3382dfa8c7..fc60f6a105b83a8304692dfcfd67beaaab53ec83 100644 (file)
@@ -21,8 +21,15 @@ void socfpga_bridges_reset(int enable);
 #define RSTMGR_BRGMODRST_DDRSCH_MASK   0X00000040
 #define RSTMGR_BRGMODRST_FPGA2SOC_MASK 0x00000004
 
-/* Watchdogs and MPU warm reset mask */
-#define RSTMGR_L4WD_MPU_WARMRESET_MASK 0x000F0F00
+/* SDM, Watchdogs and MPU warm reset mask */
+#define RSTMGR_STAT_SDMWARMRST         BIT(1)
+#define RSTMGR_STAT_MPU0RST_BITPOS     8
+#define RSTMGR_STAT_L4WD0RST_BITPOS    16
+#define RSTMGR_L4WD_MPU_WARMRESET_MASK (RSTMGR_STAT_SDMWARMRST | \
+               GENMASK(RSTMGR_STAT_MPU0RST_BITPOS + 3, \
+                       RSTMGR_STAT_MPU0RST_BITPOS) | \
+               GENMASK(RSTMGR_STAT_L4WD0RST_BITPOS + 3, \
+                       RSTMGR_STAT_L4WD0RST_BITPOS))
 
 /*
  * SocFPGA Stratix10 reset IDs, bank mapping is as follows: