arm: socfpga: spl: allow bootrom to enable IOs after warm reset
authorDinh Nguyen <dinguyen@opensource.altera.com>
Mon, 30 Mar 2015 22:01:07 +0000 (17:01 -0500)
committerMarek Vasut <marex@denx.de>
Tue, 21 Apr 2015 10:23:16 +0000 (12:23 +0200)
Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Acked-by: Marek Vasut <marex@denx.de>
arch/arm/cpu/armv7/socfpga/spl.c
arch/arm/cpu/armv7/socfpga/system_manager.c
arch/arm/include/asm/arch-socfpga/system_manager.h

index 95992f0d795b010580d529cdb32eaf70ed3362fb..787ad7fb0d964eb886ea5d42cd03dd1ccc31096c 100644 (file)
@@ -154,6 +154,9 @@ void spl_board_init(void)
        /* reconfigure the PLLs */
        cm_basic_init(&cm_default_cfg);
 
+       /* Enable bootrom to configure IOs. */
+       sysmgr_enable_warmrstcfgio();
+
        /* configure the IOCSR / IO buffer settings */
        if (scan_mgr_configure_iocsr())
                hang();
index 11f7badbf212168e9d76aa3c6b01af55ab619379..8126e0d43cf12929152119fdaa3c792deba7621c 100644 (file)
@@ -66,3 +66,12 @@ void sysmgr_pinmux_init(void)
 
        populate_sysmgr_fpgaintf_module();
 }
+
+/*
+ * This bit allows the bootrom to configure the IOs after a warm reset.
+ */
+void sysmgr_enable_warmrstcfgio(void)
+{
+       setbits_le32(&sysmgr_regs->romcodegrp_ctrl,
+                    SYSMGR_ROMCODEGRP_CTRL_WARMRSTCFGIO);
+}
index 071ec4f26600c68497e44305509097276d5250fd..51d98157783538a2a06ad3505a4f749c71112039 100644 (file)
@@ -10,6 +10,7 @@
 #ifndef __ASSEMBLY__
 
 void sysmgr_pinmux_init(void);
+void sysmgr_enable_warmrstcfgio(void);
 
 /* declaration for handoff table type */
 extern unsigned long sys_mgr_init_table[CONFIG_HPS_PINMUX_NUM];