@@ -79,9 +79,25 @@ int dram_init_banksize(void)
return 0;
}
-void reset_cpu(ulong addr)
+void reset_cpu(ulong level)
{
- psci_system_reset();
+#define L3_RESET 30
+ u32 reset_level, strap_val;
+
+ /* Default reset type is L3 reset */
+ if (!level) {
+ /*
+ * Encoding: u-boot reset command expects decimal argument
+ * strap val = 1st decimal digit;reset level = 2nd decimal digit
+ */
+ strap_val = L3_RESET % 10;
+ level = L3_RESET / 10;
+ reset_level = level % 10;
+ psci_system_reset2(reset_level, strap_val);
+ } else {
+ /* U-boot cmd "reset" with any arg will trigger L1 reset */
+ psci_system_reset();
+ }
}
#ifdef CONFIG_OF_BOARD_SETUP