HiKey: make RTC out of reset mode

Make RTC out of reset mode since it may be used in UEFI.

Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
This commit is contained in:
Haojian Zhuang 2017-10-18 19:56:02 +08:00
parent f715bfdd6c
commit 454748fc86
1 changed files with 11 additions and 0 deletions

View File

@ -489,6 +489,15 @@ static void hikey_mmc_pll_init(void)
reset_mmc1_clk();
}
static void hikey_rtc_init(void)
{
uint32_t data;
data = mmio_read_32(AO_SC_PERIPH_CLKEN4);
data |= AO_SC_PERIPH_RSTDIS4_RESET_RTC0_N;
mmio_write_32(AO_SC_PERIPH_CLKEN4, data);
}
/*
* Function which will perform any remaining platform-specific setup that can
* occur after the MMU and data cache have been enabled.
@ -505,6 +514,8 @@ void bl1_platform_setup(void)
hikey_pmussi_init();
hikey_hi6553_init();
hikey_rtc_init();
hikey_mmc_pll_init();
memset(&params, 0, sizeof(dw_mmc_params_t));