#include <scu.h>
#include <mt_gic_v3.h>
#include <mtk_plat_common.h>
+#include <mtgpio.h>
#include <mtspmc.h>
-#include <power_tracer.h>
#include <plat_dcm.h>
#include <plat_debug.h>
+#include <plat_params.h>
#include <plat_private.h>
+#include <power_tracer.h>
#include <pmic.h>
#include <rtc.h>
panic();
}
+static void __dead2 plat_mtk_system_reset(void)
+{
+ struct bl_aux_gpio_info *gpio_reset = plat_get_mtk_gpio_reset();
+
+ INFO("MTK System Reset\n");
+
+ mt_set_gpio_out(gpio_reset->index, gpio_reset->polarity);
+
+ wfi();
+ ERROR("MTK System Reset: operation not handled.\n");
+ panic();
+}
+
/*******************************************************************************
* MTK_platform handler called when an affinity instance is about to be turned
* on. The level and mpidr determine the affinity instance.
.pwr_domain_suspend = NULL,
.pwr_domain_suspend_finish = NULL,
.system_off = plat_mtk_system_off,
- .system_reset = NULL,
+ .system_reset = plat_mtk_system_reset,
.validate_power_state = NULL,
.get_sys_suspend_power_state = NULL,
};