enable_cpc();
 
-#ifdef CONFIG_QE
-       uint qe_base = CONFIG_SYS_IMMR + 0x00080000; /* QE immr base */
-       qe_init(qe_base);
-       qe_reset();
-#endif
-
        /* needs to be in ram since code uses global static vars */
        fsl_serdes_init();
 
        return 1;
 }
 #endif
+
+void cpu_secondary_init_r(void)
+{
+#ifdef CONFIG_QE
+       uint qe_base = CONFIG_SYS_IMMR + 0x00080000; /* QE immr base */
+       qe_init(qe_base);
+       qe_reset();
+#endif
+}
 
 }
 int board_flash_wp_on(void) __attribute__((weak, alias("__board_flash_wp_on")));
 
+void __cpu_secondary_init_r(void)
+{
+}
+void cpu_secondary_init_r(void)
+__attribute__((weak, alias("__cpu_secondary_init_r")));
+
 static int init_func_ram (void)
 {
 #ifdef CONFIG_BOARD_TYPES
        /* relocate environment function pointers etc. */
        env_relocate ();
 
+       /*
+        * after non-volatile devices & environment is setup and cpu code have
+        * another round to deal with any initialization that might require
+        * full access to the environment or loading of some image (firmware)
+        * from a non-volatile device
+        */
+       cpu_secondary_init_r();
+
        /*
         * Fill in missing fields of bd_info.
         * We do this here, where we have "normal" access to the