warmboot: add through dpd disable

This commit is contained in:
Michael Scire 2018-12-17 16:18:27 -08:00
parent 802830d8d4
commit a4ce50ffd5
4 changed files with 21 additions and 1 deletions

View file

@ -25,7 +25,7 @@
#define CLK_RST_CONTROLLER_MISC_CLK_ENB_0 MAKE_CAR_REG(0x048)
#define CLK_RST_CONTROLLER_OSC_CTRL_0 MAKE_CAR_REG(0x050)
#define CLK_RST_CONTROLLER_RST_DEVICES_H_0 MAKE_CAR_REG(0x008)
#define CLK_RST_CONTROLLER_PLLX_BASE_0 MAKE_CAR_REG(0x0E0)
#define CLK_RST_CONTROLLER_LVL2_CLK_GATE_OVRD_0 MAKE_CAR_REG(0x3A4)
#define CLK_RST_CONTROLLER_RST_CPUG_CMPLX_SET_0 MAKE_CAR_REG(0x450)
#define CLK_RST_CONTROLLER_RST_CPUG_CMPLX_CLR_0 MAKE_CAR_REG(0x454)
@ -42,6 +42,8 @@
#define CLK_RST_CONTROLLER_LVL2_CLK_GATE_OVRD_0 MAKE_CAR_REG(0x3A4)
#define CLK_RST_CONTROLLER_LVL2_CLK_GATE_OVRE_0 MAKE_CAR_REG(0x554)
#define CLK_RST_CONTROLLER_RST_DEVICES_H_0 MAKE_CAR_REG(0x008)
#define CLK_RST_CONTROLLER_SPARE_REG0_0 MAKE_CAR_REG(0x55C)
#define CLK_RST_CONTROLLER_RST_DEV_U_SET_0 MAKE_CAR_REG(0x310)

View file

@ -50,6 +50,17 @@ void cluster_initialize_cpu(void) {
timer_wait(2);
CLK_RST_CONTROLLER_RST_DEV_V_CLR_0 = 0x8;
/* Set MSELECT WRAP_TO_SLAVE_INCR[0-2], clear ERR_RESP_EN_SLAVE[1-2]. */
MSELECT_CONFIG_0 = (MSELECT_CONFIG_0 & 0xFCFFFFFF) | 0x38000000;
/* Clear PLLX_ENABLE. */
CLK_RST_CONTROLLER_PLLX_BASE_0 &= 0xBFFFFFFF;
/* Clear PMC scratch 190, disable PMC DPD then wait 10 us. */
APBDEV_PMC_SCRATCH190_0 &= 0xFFFFFFFE;
APBDEV_PMC_DPD_SAMPLE_0 = 0;
timer_wait(10);
/* TODO: This function is enormous */
}

View file

@ -18,6 +18,12 @@
#ifndef EXOSPHERE_WARMBOOT_BIN_CLUSTER_H
#define EXOSPHERE_WARMBOOT_BIN_CLUSTER_H
#include <stdint.h>
#include "utils.h"
#define MSELECT_CONFIG_0 MAKE_REG32(0x50060000)
void cluster_initialize_cpu(void);
void cluster_power_on_cpu(void);

View file

@ -36,6 +36,7 @@
#define APBDEV_PMC_SCRATCH12_0 MAKE_PMC_REG(0x080)
#define APBDEV_PMC_SCRATCH13_0 MAKE_PMC_REG(0x084)
#define APBDEV_PMC_SCRATCH18_0 MAKE_PMC_REG(0x098)
#define APBDEV_PMC_SCRATCH190_0 MAKE_PMC_REG(0x818)
#define APBDEV_PMC_OSC_EDPD_OVER_0 MAKE_PMC_REG(0x1A4)