diff options
author | Marek Vasut <marex@denx.de> | 2015-07-09 04:40:11 +0200 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2015-08-08 14:14:07 +0200 |
commit | 40687b4f468c357d3821454099020949a10d759e (patch) | |
tree | 5a2c00d16908bc07f4c6b61277ca804cda87f19f /arch/arm/mach-socfpga/system_manager.c | |
parent | 575d74151651a3299a2f3ed1980bb24765bbfec9 (diff) |
arm: socfpga: system: Rework sysmgr_enable_warmrstcfgio()
Rework sysmgr_enable_warmrstcfgio() into sysmgr_config_warmrstcfgio(),
which allows both enabling and disabling the warm reset config I/O
functionality.
Signed-off-by: Marek Vasut <marex@denx.de>
Diffstat (limited to 'arch/arm/mach-socfpga/system_manager.c')
-rw-r--r-- | arch/arm/mach-socfpga/system_manager.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/arm/mach-socfpga/system_manager.c b/arch/arm/mach-socfpga/system_manager.c index 8126e0d43c..5ed47c3cff 100644 --- a/arch/arm/mach-socfpga/system_manager.c +++ b/arch/arm/mach-socfpga/system_manager.c @@ -70,8 +70,12 @@ void sysmgr_pinmux_init(void) /* * This bit allows the bootrom to configure the IOs after a warm reset. */ -void sysmgr_enable_warmrstcfgio(void) +void sysmgr_config_warmrstcfgio(int enable) { - setbits_le32(&sysmgr_regs->romcodegrp_ctrl, - SYSMGR_ROMCODEGRP_CTRL_WARMRSTCFGIO); + if (enable) + setbits_le32(&sysmgr_regs->romcodegrp_ctrl, + SYSMGR_ROMCODEGRP_CTRL_WARMRSTCFGIO); + else + clrbits_le32(&sysmgr_regs->romcodegrp_ctrl, + SYSMGR_ROMCODEGRP_CTRL_WARMRSTCFGIO); } |