Commit 5cab1a4a authored by davidcunado-arm's avatar davidcunado-arm Committed by GitHub
Browse files

Merge pull request #721 from rockchip-linux/fixes-the-clock-select-and-divide-register

rockchip: fixes the clock select and divide register for rk3399
parents 6bb37adc 4d5d98c7
......@@ -325,9 +325,16 @@ void plls_resume_finish(void)
{
int i;
for (i = 0; i < CRU_CLKSEL_COUNT; i++)
for (i = 0; i < CRU_CLKSEL_COUNT; i++) {
/* CRU_CLKSEL_CON96~107 the high 16-bit isb't write_mask */
if (i > 95)
mmio_write_32((CRU_BASE + CRU_CLKSEL_CON(i)),
slp_data.cru_clksel_con[i]);
else
mmio_write_32((CRU_BASE + CRU_CLKSEL_CON(i)),
REG_SOC_WMSK | slp_data.cru_clksel_con[i]);
REG_SOC_WMSK |
slp_data.cru_clksel_con[i]);
}
for (i = 0; i < PMUCRU_CLKSEL_CONUT; i++)
mmio_write_32((PMUCRU_BASE +
PMUCRU_CLKSEL_OFFSET + i * REG_SIZE),
......
......@@ -65,7 +65,7 @@
#define PLL_CON_COUNT 0x06
#define CRU_CLKSEL_COUNT 0x108
#define CRU_CLKSEL_CON(n) (0x80 + (n) * 4)
#define CRU_CLKSEL_CON(n) (0x100 + (n) * 4)
#define PMUCRU_CLKSEL_CONUT 0x06
#define PMUCRU_CLKSEL_OFFSET 0x080
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment