Allow the system to reset the CPU without calling the reset
controller. This patch also removed the default SYSRESET controller
for MT7628, as it is now optional.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
select PINCTRL_MT7628
select PINCONF
select MTK_SERIAL
- select SYSRESET
- select SYSRESET_RESETCTL
select SPL_SEPARATE_BSS if SPL
select SPL_INIT_STACK_WITHOUT_MALLOC_F if SPL
select SPL_LOADER_SUPPORT if SPL
select SPL_SIMPLE_BUS if SPL_DM
select SPL_DM_SERIAL if SPL_DM
select SPL_CLK if SPL_DM && SPL_SERIAL
- select SPL_SYSRESET if SPL_DM
select SPL_OF_LIBFDT if SPL_OF_CONTROL
help
This supports MediaTek MT7628/MT7688.
{
return gd->arch.timer_freq;
}
+
+void _machine_restart(void)
+{
+ void __iomem *sysc = ioremap_nocache(SYSCTL_BASE, SYSCTL_SIZE);
+
+ while (1)
+ writel(SYS_RST, sysc + SYSCTL_RSTCTL_REG);
+}
#define SYSCTL_RSTCTL_REG 0x34
#define MC_RST 0x400
+#define SYS_RST 0x01
#define SYSCTL_AGPIO_CFG_REG 0x3c
#define EPHY_GPIO_AIO_EN_S 17