Commit 176a3200 authored by Stephen Boyd's avatar Stephen Boyd
Browse files

Merge tag 'clk-imx-5.17' of...

Merge tag 'clk-imx-5.17' of git://git.kernel.org/pub/scm/linux/kernel/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
parents fa55b7dc 9dd81021
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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", };
+1 −1
Original line number Diff line number Diff line
@@ -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,
+1 −0
Original line number Diff line number Diff line
@@ -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,
	},
};
+3 −3
Original line number Diff line number Diff line
@@ -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;
@@ -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);
@@ -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;
	}

+0 −1
Original line number Diff line number Diff line
@@ -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