diff --git a/src/soc/nvidia/tegra124/lp0/tegra_lp0_resume.c b/src/soc/nvidia/tegra124/lp0/tegra_lp0_resume.c index 72506c81f5..e3d4ca075b 100644 --- a/src/soc/nvidia/tegra124/lp0/tegra_lp0_resume.c +++ b/src/soc/nvidia/tegra124/lp0/tegra_lp0_resume.c @@ -24,6 +24,7 @@ enum { CLK_RST_BASE = 0X60006000, FLOW_CTLR_BASE = 0X60007000, TEGRA_EVP_BASE = 0x6000f000, + APB_MISC_BASE = 0x70000000, PMC_CTLR_BASE = 0X7000e400, MC_CTLR_BASE = 0X70019000, SYSCTR_CTLR_BASE = 0X700f0000 @@ -38,6 +39,12 @@ enum { }; +/* APB Misc JTAG Configuration Register */ +static uint32_t *misc_pp_config_ctl_ptr = (void *)(APB_MISC_BASE + 0x24); +enum { + PP_CONFIG_CTL_JTAG = 0x1 << 6 +}; + /* Timer registers. */ static uint32_t *timer_us_ptr = (void *)(TIMER_BASE + 0x10); @@ -315,6 +322,12 @@ static unsigned get_osc_freq(void) } +/* Jtag configuration. */ + +static void enable_jtag(void) +{ + write32(PP_CONFIG_CTL_JTAG, misc_pp_config_ctl_ptr); +} /* Clock configuration. */ @@ -543,6 +556,9 @@ void lp0_resume(void) if (read32(up_tag_ptr) != UP_TAG_AVP) reset(); + // Enable JTAG + enable_jtag(); + config_oscillator(); // Tell the flow controller which cluster to wake up. The default is