summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2015-07-09 02:40:11 (GMT)
committerMarek Vasut <marex@denx.de>2015-08-08 12:14:07 (GMT)
commit40687b4f468c357d3821454099020949a10d759e (patch)
tree5a2c00d16908bc07f4c6b61277ca804cda87f19f
parent575d74151651a3299a2f3ed1980bb24765bbfec9 (diff)
downloadu-boot-fsl-qoriq-40687b4f468c357d3821454099020949a10d759e.tar.xz
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>
-rw-r--r--arch/arm/mach-socfpga/include/mach/system_manager.h2
-rw-r--r--arch/arm/mach-socfpga/spl.c2
-rw-r--r--arch/arm/mach-socfpga/system_manager.c10
3 files changed, 9 insertions, 5 deletions
diff --git a/arch/arm/mach-socfpga/include/mach/system_manager.h b/arch/arm/mach-socfpga/include/mach/system_manager.h
index 51d9815..de05aaf 100644
--- a/arch/arm/mach-socfpga/include/mach/system_manager.h
+++ b/arch/arm/mach-socfpga/include/mach/system_manager.h
@@ -10,7 +10,7 @@
#ifndef __ASSEMBLY__
void sysmgr_pinmux_init(void);
-void sysmgr_enable_warmrstcfgio(void);
+void sysmgr_config_warmrstcfgio(int enable);
/* declaration for handoff table type */
extern unsigned long sys_mgr_init_table[CONFIG_HPS_PINMUX_NUM];
diff --git a/arch/arm/mach-socfpga/spl.c b/arch/arm/mach-socfpga/spl.c
index 1fecfdc..fd54ea9 100644
--- a/arch/arm/mach-socfpga/spl.c
+++ b/arch/arm/mach-socfpga/spl.c
@@ -78,7 +78,7 @@ void spl_board_init(void)
cm_basic_init(cm_default_cfg);
/* Enable bootrom to configure IOs. */
- sysmgr_enable_warmrstcfgio();
+ sysmgr_config_warmrstcfgio(1);
/* configure the IOCSR / IO buffer settings */
if (scan_mgr_configure_iocsr())
diff --git a/arch/arm/mach-socfpga/system_manager.c b/arch/arm/mach-socfpga/system_manager.c
index 8126e0d..5ed47c3 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);
}