Commit e5546e91 authored by Stephen Boyd's avatar Stephen Boyd
Browse files

Merge tag 'samsung-clk-6.6' of...

Merge tag 'samsung-clk-6.6' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into clk-samsung

Pull Samsung SoC clock drivers changes from Krzysztof Kozlowski:

Remove from the bindings the #defines with number of clocks supported by
each clock controller driver.  This number can vary, e.g. when we
implement more clocks in the driver.  Having the number in the bindings
prevents changing it.  Instead, this should be just a #define inside the
driver.

* tag 'samsung-clk-6.6' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  dt-bindings: clock: samsung: remove define with number of clocks
  clk: samsung: exynoautov9: do not define number of clocks in bindings
  clk: samsung: exynos850: do not define number of clocks in bindings
  clk: samsung: exynos7885: do not define number of clocks in bindings
  clk: samsung: exynos5433: do not define number of clocks in bindings
  clk: samsung: exynos5420: do not define number of clocks in bindings
  clk: samsung: exynos5410: do not define number of clocks in bindings
  clk: samsung: exynos5260: do not define number of clocks in bindings
  clk: samsung: exynos5250: do not define number of clocks in bindings
  clk: samsung: exynos4: do not define number of clocks in bindings
  clk: samsung: exynos3250: do not define number of clocks in bindings
parents 06c2afb8 b3f9581a
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -100,6 +100,11 @@
#define PWR_CTRL1_USE_CORE1_WFI			(1 << 1)
#define PWR_CTRL1_USE_CORE0_WFI			(1 << 0)

/* NOTE: Must be equal to the last clock ID increased by one */
#define CLKS_NR_MAIN				(CLK_SCLK_MMC2 + 1)
#define CLKS_NR_DMC				(CLK_DIV_DMCD + 1)
#define CLKS_NR_ISP				(CLK_SCLK_MPWM_ISP + 1)

static const unsigned long exynos3250_cmu_clk_regs[] __initconst = {
	SRC_LEFTBUS,
	DIV_LEFTBUS,
@@ -807,7 +812,7 @@ static const struct samsung_cmu_info cmu_info __initconst = {
	.nr_fixed_factor_clks	= ARRAY_SIZE(fixed_factor_clks),
	.cpu_clks		= exynos3250_cpu_clks,
	.nr_cpu_clks		= ARRAY_SIZE(exynos3250_cpu_clks),
	.nr_clk_ids		= CLK_NR_CLKS,
	.nr_clk_ids		= CLKS_NR_MAIN,
	.clk_regs		= exynos3250_cmu_clk_regs,
	.nr_clk_regs		= ARRAY_SIZE(exynos3250_cmu_clk_regs),
};
@@ -923,7 +928,7 @@ static const struct samsung_cmu_info dmc_cmu_info __initconst = {
	.nr_mux_clks		= ARRAY_SIZE(dmc_mux_clks),
	.div_clks		= dmc_div_clks,
	.nr_div_clks		= ARRAY_SIZE(dmc_div_clks),
	.nr_clk_ids		= NR_CLKS_DMC,
	.nr_clk_ids		= CLKS_NR_DMC,
	.clk_regs		= exynos3250_cmu_dmc_clk_regs,
	.nr_clk_regs		= ARRAY_SIZE(exynos3250_cmu_dmc_clk_regs),
};
@@ -1067,7 +1072,7 @@ static const struct samsung_cmu_info isp_cmu_info __initconst = {
	.nr_div_clks	= ARRAY_SIZE(isp_div_clks),
	.gate_clks	= isp_gate_clks,
	.nr_gate_clks	= ARRAY_SIZE(isp_gate_clks),
	.nr_clk_ids	= NR_CLKS_ISP,
	.nr_clk_ids	= CLKS_NR_ISP,
};

static int __init exynos3250_cmu_isp_probe(struct platform_device *pdev)
+4 −1
Original line number Diff line number Diff line
@@ -135,6 +135,9 @@
#define PWR_CTRL1_USE_CORE1_WFI			(1 << 1)
#define PWR_CTRL1_USE_CORE0_WFI			(1 << 0)

/* NOTE: Must be equal to the last clock ID increased by one */
#define CLKS_NR					(CLK_DIV_CORE2 + 1)

/* the exynos4 soc type */
enum exynos4_soc {
	EXYNOS4210,
@@ -1275,7 +1278,7 @@ static void __init exynos4_clk_init(struct device_node *np,
	if (!reg_base)
		panic("%s: failed to map registers\n", __func__);

	ctx = samsung_clk_init(NULL, reg_base, CLK_NR_CLKS);
	ctx = samsung_clk_init(NULL, reg_base, CLKS_NR);
	hws = ctx->clk_data.hws;

	samsung_clk_of_register_fixed_ext(ctx, exynos4_fixed_rate_ext_clks,
+4 −1
Original line number Diff line number Diff line
@@ -22,6 +22,9 @@
#define E4X12_GATE_ISP0		0x0800
#define E4X12_GATE_ISP1		0x0804

/* NOTE: Must be equal to the last clock ID increased by one */
#define CLKS_NR_ISP		(CLK_ISP_DIV_MCUISP1 + 1)

/*
 * Support for CMU save/restore across system suspends
 */
@@ -121,7 +124,7 @@ static int __init exynos4x12_isp_clk_probe(struct platform_device *pdev)
	if (!exynos4x12_save_isp)
		return -ENOMEM;

	ctx = samsung_clk_init(dev, reg_base, CLK_NR_ISP_CLKS);
	ctx = samsung_clk_init(dev, reg_base, CLKS_NR_ISP);

	platform_set_drvdata(pdev, ctx);

+4 −1
Original line number Diff line number Diff line
@@ -100,6 +100,9 @@
#define PWR_CTRL2_CORE2_UP_RATIO		(1 << 4)
#define PWR_CTRL2_CORE1_UP_RATIO		(1 << 0)

/* NOTE: Must be equal to the last clock ID increased by one */
#define CLKS_NR					(CLK_MOUT_VPLLSRC + 1)

/* list of PLLs to be registered */
enum exynos5250_plls {
	apll, mpll, cpll, epll, vpll, gpll, bpll,
@@ -797,7 +800,7 @@ static void __init exynos5250_clk_init(struct device_node *np)
		panic("%s: unable to determine soc\n", __func__);
	}

	ctx = samsung_clk_init(NULL, reg_base, CLK_NR_CLKS);
	ctx = samsung_clk_init(NULL, reg_base, CLKS_NR);
	hws = ctx->clk_data.hws;

	samsung_clk_of_register_fixed_ext(ctx, exynos5250_fixed_rate_ext_clks,
+28 −13
Original line number Diff line number Diff line
@@ -15,6 +15,21 @@

#include <dt-bindings/clock/exynos5260-clk.h>

/* NOTE: Must be equal to the last clock ID increased by one */
#define CLKS_NR_TOP			(PHYCLK_USBDRD30_UDRD30_PHYCLOCK + 1)
#define CLKS_NR_EGL			(EGL_DOUT_EGL1 + 1)
#define CLKS_NR_KFC			(KFC_DOUT_KFC1 + 1)
#define CLKS_NR_MIF			(MIF_SCLK_LPDDR3PHY_WRAP_U0 + 1)
#define CLKS_NR_G3D			(G3D_CLK_G3D + 1)
#define CLKS_NR_AUD			(AUD_SCLK_I2S + 1)
#define CLKS_NR_MFC			(MFC_CLK_SMMU2_MFCM0 + 1)
#define CLKS_NR_GSCL			(GSCL_SCLK_CSIS0_WRAP + 1)
#define CLKS_NR_FSYS			(FSYS_PHYCLK_USBHOST20 + 1)
#define CLKS_NR_PERI			(PERI_SCLK_PCM1 + 1)
#define CLKS_NR_DISP			(DISP_MOUT_HDMI_PHY_PIXEL_USER + 1)
#define CLKS_NR_G2D			(G2D_CLK_SMMU3_G2D + 1)
#define CLKS_NR_ISP			(ISP_SCLK_UART_EXT + 1)

/*
 * Applicable for all 2550 Type PLLS for Exynos5260, listed below
 * DISP_PLL, EGL_PLL, KFC_PLL, MEM_PLL, BUS_PLL, MEDIA_PLL, G3D_PLL.
@@ -135,7 +150,7 @@ static const struct samsung_cmu_info aud_cmu __initconst = {
	.nr_div_clks	= ARRAY_SIZE(aud_div_clks),
	.gate_clks	= aud_gate_clks,
	.nr_gate_clks	= ARRAY_SIZE(aud_gate_clks),
	.nr_clk_ids	= AUD_NR_CLK,
	.nr_clk_ids	= CLKS_NR_AUD,
	.clk_regs	= aud_clk_regs,
	.nr_clk_regs	= ARRAY_SIZE(aud_clk_regs),
};
@@ -325,7 +340,7 @@ static const struct samsung_cmu_info disp_cmu __initconst = {
	.nr_div_clks	= ARRAY_SIZE(disp_div_clks),
	.gate_clks	= disp_gate_clks,
	.nr_gate_clks	= ARRAY_SIZE(disp_gate_clks),
	.nr_clk_ids	= DISP_NR_CLK,
	.nr_clk_ids	= CLKS_NR_DISP,
	.clk_regs	= disp_clk_regs,
	.nr_clk_regs	= ARRAY_SIZE(disp_clk_regs),
};
@@ -389,7 +404,7 @@ static const struct samsung_cmu_info egl_cmu __initconst = {
	.nr_mux_clks	= ARRAY_SIZE(egl_mux_clks),
	.div_clks	= egl_div_clks,
	.nr_div_clks	= ARRAY_SIZE(egl_div_clks),
	.nr_clk_ids	= EGL_NR_CLK,
	.nr_clk_ids	= CLKS_NR_EGL,
	.clk_regs	= egl_clk_regs,
	.nr_clk_regs	= ARRAY_SIZE(egl_clk_regs),
};
@@ -489,7 +504,7 @@ static const struct samsung_cmu_info fsys_cmu __initconst = {
	.nr_mux_clks	= ARRAY_SIZE(fsys_mux_clks),
	.gate_clks	= fsys_gate_clks,
	.nr_gate_clks	= ARRAY_SIZE(fsys_gate_clks),
	.nr_clk_ids	= FSYS_NR_CLK,
	.nr_clk_ids	= CLKS_NR_FSYS,
	.clk_regs	= fsys_clk_regs,
	.nr_clk_regs	= ARRAY_SIZE(fsys_clk_regs),
};
@@ -580,7 +595,7 @@ static const struct samsung_cmu_info g2d_cmu __initconst = {
	.nr_div_clks	= ARRAY_SIZE(g2d_div_clks),
	.gate_clks	= g2d_gate_clks,
	.nr_gate_clks	= ARRAY_SIZE(g2d_gate_clks),
	.nr_clk_ids	= G2D_NR_CLK,
	.nr_clk_ids	= CLKS_NR_G2D,
	.clk_regs	= g2d_clk_regs,
	.nr_clk_regs	= ARRAY_SIZE(g2d_clk_regs),
};
@@ -643,7 +658,7 @@ static const struct samsung_cmu_info g3d_cmu __initconst = {
	.nr_div_clks	= ARRAY_SIZE(g3d_div_clks),
	.gate_clks	= g3d_gate_clks,
	.nr_gate_clks	= ARRAY_SIZE(g3d_gate_clks),
	.nr_clk_ids	= G3D_NR_CLK,
	.nr_clk_ids	= CLKS_NR_G3D,
	.clk_regs	= g3d_clk_regs,
	.nr_clk_regs	= ARRAY_SIZE(g3d_clk_regs),
};
@@ -776,7 +791,7 @@ static const struct samsung_cmu_info gscl_cmu __initconst = {
	.nr_div_clks	= ARRAY_SIZE(gscl_div_clks),
	.gate_clks	= gscl_gate_clks,
	.nr_gate_clks	= ARRAY_SIZE(gscl_gate_clks),
	.nr_clk_ids	= GSCL_NR_CLK,
	.nr_clk_ids	= CLKS_NR_GSCL,
	.clk_regs	= gscl_clk_regs,
	.nr_clk_regs	= ARRAY_SIZE(gscl_clk_regs),
};
@@ -895,7 +910,7 @@ static const struct samsung_cmu_info isp_cmu __initconst = {
	.nr_div_clks	= ARRAY_SIZE(isp_div_clks),
	.gate_clks	= isp_gate_clks,
	.nr_gate_clks	= ARRAY_SIZE(isp_gate_clks),
	.nr_clk_ids	= ISP_NR_CLK,
	.nr_clk_ids	= CLKS_NR_ISP,
	.clk_regs	= isp_clk_regs,
	.nr_clk_regs	= ARRAY_SIZE(isp_clk_regs),
};
@@ -959,7 +974,7 @@ static const struct samsung_cmu_info kfc_cmu __initconst = {
	.nr_mux_clks	= ARRAY_SIZE(kfc_mux_clks),
	.div_clks	= kfc_div_clks,
	.nr_div_clks	= ARRAY_SIZE(kfc_div_clks),
	.nr_clk_ids	= KFC_NR_CLK,
	.nr_clk_ids	= CLKS_NR_KFC,
	.clk_regs	= kfc_clk_regs,
	.nr_clk_regs	= ARRAY_SIZE(kfc_clk_regs),
};
@@ -1015,7 +1030,7 @@ static const struct samsung_cmu_info mfc_cmu __initconst = {
	.nr_div_clks	= ARRAY_SIZE(mfc_div_clks),
	.gate_clks	= mfc_gate_clks,
	.nr_gate_clks	= ARRAY_SIZE(mfc_gate_clks),
	.nr_clk_ids	= MFC_NR_CLK,
	.nr_clk_ids	= CLKS_NR_MFC,
	.clk_regs	= mfc_clk_regs,
	.nr_clk_regs	= ARRAY_SIZE(mfc_clk_regs),
};
@@ -1164,7 +1179,7 @@ static const struct samsung_cmu_info mif_cmu __initconst = {
	.nr_div_clks	= ARRAY_SIZE(mif_div_clks),
	.gate_clks	= mif_gate_clks,
	.nr_gate_clks	= ARRAY_SIZE(mif_gate_clks),
	.nr_clk_ids	= MIF_NR_CLK,
	.nr_clk_ids	= CLKS_NR_MIF,
	.clk_regs	= mif_clk_regs,
	.nr_clk_regs	= ARRAY_SIZE(mif_clk_regs),
};
@@ -1370,7 +1385,7 @@ static const struct samsung_cmu_info peri_cmu __initconst = {
	.nr_div_clks	= ARRAY_SIZE(peri_div_clks),
	.gate_clks	= peri_gate_clks,
	.nr_gate_clks	= ARRAY_SIZE(peri_gate_clks),
	.nr_clk_ids	= PERI_NR_CLK,
	.nr_clk_ids	= CLKS_NR_PERI,
	.clk_regs	= peri_clk_regs,
	.nr_clk_regs	= ARRAY_SIZE(peri_clk_regs),
};
@@ -1826,7 +1841,7 @@ static const struct samsung_cmu_info top_cmu __initconst = {
	.nr_gate_clks	= ARRAY_SIZE(top_gate_clks),
	.fixed_clks	= fixed_rate_clks,
	.nr_fixed_clks	= ARRAY_SIZE(fixed_rate_clks),
	.nr_clk_ids	= TOP_NR_CLK,
	.nr_clk_ids	= CLKS_NR_TOP,
	.clk_regs	= top_clk_regs,
	.nr_clk_regs	= ARRAY_SIZE(top_clk_regs),
};
Loading