diff options
author | Tom Rini <trini@konsulko.com> | 2021-09-27 16:45:36 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-09-27 16:45:36 +0300 |
commit | e908d20fcbd847e17345591fc171b59d9a156516 (patch) | |
tree | def104237fd9b8888a37a5c3378b4ef7e26b6d43 /drivers/clk | |
parent | bb38d77ca779cc8bdad3d4ceb6cecc687f4987c2 (diff) | |
parent | 0b9bcf665cd98fe9db0956c894006b250a7d465f (diff) | |
download | u-boot-e908d20fcbd847e17345591fc171b59d9a156516.tar.xz |
Merge tag 'v2021.10-rc5' into next
Prepare v2021.10-rc5
Diffstat (limited to 'drivers/clk')
-rw-r--r-- | drivers/clk/ti/clk-k3-pll.c | 13 | ||||
-rw-r--r-- | drivers/clk/ti/clk-k3.c | 4 |
2 files changed, 13 insertions, 4 deletions
diff --git a/drivers/clk/ti/clk-k3-pll.c b/drivers/clk/ti/clk-k3-pll.c index bf2407a020..bf762c558e 100644 --- a/drivers/clk/ti/clk-k3-pll.c +++ b/drivers/clk/ti/clk-k3-pll.c @@ -2,7 +2,7 @@ /* * Texas Instruments K3 SoC PLL clock driver * - * Copyright (C) 2020 Texas Instruments Incorporated - http://www.ti.com/ + * Copyright (C) 2020-2021 Texas Instruments Incorporated - http://www.ti.com/ * Tero Kristo <t-kristo@ti.com> */ @@ -122,6 +122,7 @@ static ulong ti_pll_clk_set_rate(struct clk *clk, ulong rate) unsigned long pllm; u32 pllfm = 0; unsigned long plld; + u32 div_ctrl; u32 rem; int shift; @@ -175,7 +176,15 @@ static ulong ti_pll_clk_set_rate(struct clk *clk, ulong rate) writel(pllm, pll->reg + PLL_16FFT_FREQ_CTRL0); writel(pllfm, pll->reg + PLL_16FFT_FREQ_CTRL1); - writel(plld, pll->reg + PLL_16FFT_DIV_CTRL); + + /* + * div_ctrl register contains other divider values, so rmw + * only plld and leave existing values alone + */ + div_ctrl = readl(pll->reg + PLL_16FFT_DIV_CTRL); + div_ctrl &= ~PLL_16FFT_DIV_CTRL_REF_DIV_MASK; + div_ctrl |= plld; + writel(div_ctrl, pll->reg + PLL_16FFT_DIV_CTRL); ctrl &= ~PLL_16FFT_CTRL_BYPASS_EN; ctrl |= PLL_16FFT_CTRL_PLL_EN; diff --git a/drivers/clk/ti/clk-k3.c b/drivers/clk/ti/clk-k3.c index e921894e7a..e04c57eff2 100644 --- a/drivers/clk/ti/clk-k3.c +++ b/drivers/clk/ti/clk-k3.c @@ -2,7 +2,7 @@ /* * Texas Instruments K3 clock driver * - * Copyright (C) 2020 Texas Instruments Incorporated - http://www.ti.com/ + * Copyright (C) 2020-2021 Texas Instruments Incorporated - http://www.ti.com/ * Tero Kristo <t-kristo@ti.com> */ @@ -112,7 +112,7 @@ static int ti_clk_probe(struct udevice *dev) map_physmem(ti_clk_data->clk.div.reg, 0, MAP_NOCACHE), ti_clk_data->clk.div.shift, ti_clk_data->clk.div.width, - 0); + ti_clk_data->clk.div.div_flags); break; case CLK_TYPE_MUX: name = ti_clk_data->clk.mux.name; |