Skip to content

Commit

Permalink
Merge tag 'clk-imx-5.17' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/abelvesa/linux into clk-imx

Pull i.MX clk driver updates from Abel Vesa:

 - Set suppress_bind_attrs to true for i.MX8ULP driver
 - Switch from do_div to div64_ul for throughout all drivers
 - Fix imx8mn_clko1_sels for i.MX8MN
 - Remove unused IPG_AUDIO_ROOT from i.MX8MP
 - Switch parent for audio_root_clk to audio ahb in i.MX8MP driver

* tag 'clk-imx-5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/abelvesa/linux:
  clk: imx8mp: Fix the parent clk of the audio_root_clk
  clk: imx8mp: Remove IPG_AUDIO_ROOT from imx8mp-clock.h
  clk: imx8mn: Fix imx8mn_clko1_sels
  clk: imx: Use div64_ul instead of do_div
  clk: imx: imx8ulp: set suppress_bind_attrs to true
  • Loading branch information
Stephen Boyd committed Dec 29, 2021
2 parents fa55b7d + 9dd8102 commit 176a320
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions drivers/clk/imx/clk-imx8mn.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,9 @@ static const char * const imx8mn_pdm_sels[] = {"osc_24m", "sys_pll2_100m", "audi

static const char * const imx8mn_dram_core_sels[] = {"dram_pll_out", "dram_alt_root", };

static const char * const imx8mn_clko1_sels[] = {"osc_24m", "sys_pll1_800m", "osc_27m",
"sys_pll1_200m", "audio_pll2_out", "vpu_pll",
"sys_pll1_80m", };
static const char * const imx8mn_clko1_sels[] = {"osc_24m", "sys_pll1_800m", "dummy",
"sys_pll1_200m", "audio_pll2_out", "sys_pll2_500m",
"dummy", "sys_pll1_80m", };
static const char * const imx8mn_clko2_sels[] = {"osc_24m", "sys_pll2_200m", "sys_pll1_400m",
"sys_pll2_166m", "sys_pll3_out", "audio_pll1_out",
"video_pll1_out", "osc_32k", };
Expand Down
2 changes: 1 addition & 1 deletion drivers/clk/imx/clk-imx8mp.c
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ static int imx8mp_clocks_probe(struct platform_device *pdev)
hws[IMX8MP_CLK_HDMI_ROOT] = imx_clk_hw_gate4("hdmi_root_clk", "hdmi_axi", ccm_base + 0x45f0, 0);
hws[IMX8MP_CLK_TSENSOR_ROOT] = imx_clk_hw_gate4("tsensor_root_clk", "ipg_root", ccm_base + 0x4620, 0);
hws[IMX8MP_CLK_VPU_ROOT] = imx_clk_hw_gate4("vpu_root_clk", "vpu_bus", ccm_base + 0x4630, 0);
hws[IMX8MP_CLK_AUDIO_ROOT] = imx_clk_hw_gate4("audio_root_clk", "ipg_root", ccm_base + 0x4650, 0);
hws[IMX8MP_CLK_AUDIO_ROOT] = imx_clk_hw_gate4("audio_root_clk", "audio_ahb", ccm_base + 0x4650, 0);

hws[IMX8MP_CLK_ARM] = imx_clk_hw_cpu("arm", "arm_a53_core",
hws[IMX8MP_CLK_A53_CORE]->clk,
Expand Down
1 change: 1 addition & 0 deletions drivers/clk/imx/clk-imx8ulp.c
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,7 @@ static struct platform_driver imx8ulp_clk_driver = {
.probe = imx8ulp_clk_probe,
.driver = {
.name = KBUILD_MODNAME,
.suppress_bind_attrs = true,
.of_match_table = imx8ulp_clk_dt_ids,
},
};
Expand Down
6 changes: 3 additions & 3 deletions drivers/clk/imx/clk-pllv3.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ static long clk_pllv3_av_round_rate(struct clk_hw *hw, unsigned long rate,
div = rate / parent_rate;
temp64 = (u64) (rate - div * parent_rate);
temp64 *= mfd;
do_div(temp64, parent_rate);
temp64 = div64_ul(temp64, parent_rate);
mfn = temp64;

temp64 = (u64)parent_rate;
Expand Down Expand Up @@ -277,7 +277,7 @@ static int clk_pllv3_av_set_rate(struct clk_hw *hw, unsigned long rate,
div = rate / parent_rate;
temp64 = (u64) (rate - div * parent_rate);
temp64 *= mfd;
do_div(temp64, parent_rate);
temp64 = div64_ul(temp64, parent_rate);
mfn = temp64;

val = readl_relaxed(pll->base);
Expand Down Expand Up @@ -334,7 +334,7 @@ static struct clk_pllv3_vf610_mf clk_pllv3_vf610_rate_to_mf(
/* rate = parent_rate * (mfi + mfn/mfd) */
temp64 = rate - parent_rate * mf.mfi;
temp64 *= mf.mfd;
do_div(temp64, parent_rate);
temp64 = div64_ul(temp64, parent_rate);
mf.mfn = temp64;
}

Expand Down
1 change: 0 additions & 1 deletion include/dt-bindings/clock/imx8mp-clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@
#define IMX8MP_CLK_AUDIO_AHB 108
#define IMX8MP_CLK_MIPI_DSI_ESC_RX 109
#define IMX8MP_CLK_IPG_ROOT 110
#define IMX8MP_CLK_IPG_AUDIO_ROOT 111
#define IMX8MP_CLK_DRAM_ALT 112
#define IMX8MP_CLK_DRAM_APB 113
#define IMX8MP_CLK_VPU_G1 114
Expand Down

0 comments on commit 176a320

Please sign in to comment.