]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/arm/cpu/armv7/socfpga/spl.c
socfpga: Adding Freeze Controller driver
[karo-tx-uboot.git] / arch / arm / cpu / armv7 / socfpga / spl.c
index 74bceab183aac5702e747d5cd163e1fe6d63bb6b..36a00c39b7f9883bc3483224c320ab0bec662abc 100644 (file)
@@ -13,6 +13,7 @@
 #include <asm/arch/reset_manager.h>
 #include <spl.h>
 #include <asm/arch/system_manager.h>
+#include <asm/arch/freeze_controller.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -27,6 +28,10 @@ u32 spl_boot_device(void)
 void spl_board_init(void)
 {
 #ifndef CONFIG_SOCFPGA_VIRTUAL_TARGET
+       debug("Freezing all I/O banks\n");
+       /* freeze all IO banks */
+       sys_mgr_frzctrl_freeze_req();
+
        /* configure the pin muxing through system manager */
        sysmgr_pinmux_init();
 #endif /* CONFIG_SOCFPGA_VIRTUAL_TARGET */
@@ -34,6 +39,10 @@ void spl_board_init(void)
        /* de-assert reset for peripherals and bridges based on handoff */
        reset_deassert_peripherals_handoff();
 
+       debug("Unfreezing/Thaw all I/O banks\n");
+       /* unfreeze / thaw all IO banks */
+       sys_mgr_frzctrl_thaw_req();
+
        /* enable console uart printing */
        preloader_console_init();
 }