linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 5/5] clk: samsung: exynos5433: add imem clocks
       [not found] ` <CGME20190118131713eucas1p11f52d9e6a11dbd2b66f289ca3c56d92c@eucas1p1.samsung.com>
@ 2019-01-18 13:16   ` Kamil Konieczny
  2019-01-19 12:41     ` Chanwoo Choi
  0 siblings, 1 reply; 2+ messages in thread
From: Kamil Konieczny @ 2019-01-18 13:16 UTC (permalink / raw)
  To: k.konieczny, linux-samsung-soc
  Cc: Mark Rutland, devicetree, Bartlomiej Zolnierkiewicz,
	linux-kernel, Krzysztof Kozlowski, Chanwoo Choi, Rob Herring,
	Kukjin Kim, Sylwester Nawrocki, linux-arm-kernel,
	Marek Szyprowski

Add imem clocks for exynos5433. This will enable to use crypto Slim
Security SubSystem (in short SlimSSS) IP block.

Signed-off-by: Kamil Konieczny <k.konieczny@partner.samsung.com>
---
 drivers/clk/samsung/clk-exynos5433.c | 32 ++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/drivers/clk/samsung/clk-exynos5433.c b/drivers/clk/samsung/clk-exynos5433.c
index 24c3360db65b..dae1c96de933 100644
--- a/drivers/clk/samsung/clk-exynos5433.c
+++ b/drivers/clk/samsung/clk-exynos5433.c
@@ -5467,6 +5467,35 @@ static const struct samsung_cmu_info cam1_cmu_info __initconst = {
 	.clk_name		= "aclk_cam1_400",
 };
 
+/*
+ * Register offset definitions for CMU_IMEM
+ */
+#define ENABLE_ACLK_IMEM_SLIMSSS		0x080c
+#define ENABLE_PCLK_IMEM_SLIMSSS		0x0908
+
+static const unsigned long imem_clk_regs[] __initconst = {
+	ENABLE_ACLK_IMEM_SLIMSSS,
+	ENABLE_PCLK_IMEM_SLIMSSS,
+};
+
+static const struct samsung_gate_clock imem_gate_clks[] __initconst = {
+	/* ENABLE_ACLK_IMEM_SLIMSSS */
+	GATE(CLK_ACLK_SLIMSSS, "aclk_slimsss", "aclk_imem_sssx_266",
+			ENABLE_ACLK_IMEM_SLIMSSS, 0, CLK_IGNORE_UNUSED, 0),
+
+	/* ENABLE_PCLK_IMEM_SLIMSSS */
+	GATE(CLK_PCLK_SLIMSSS, "pclk_slimsss", "aclk_imem_200",
+			ENABLE_PCLK_IMEM_SLIMSSS, 0, CLK_IGNORE_UNUSED, 0),
+};
+
+static const struct samsung_cmu_info imem_cmu_info __initconst = {
+	.gate_clks		= imem_gate_clks,
+	.nr_gate_clks		= ARRAY_SIZE(imem_gate_clks),
+	.nr_clk_ids		= IMEM_NR_CLK,
+	.clk_regs		= imem_clk_regs,
+	.nr_clk_regs		= ARRAY_SIZE(imem_clk_regs),
+	.clk_name		= "aclk_imem_200",
+};
 
 struct exynos5433_cmu_data {
 	struct samsung_clk_reg_dump *clk_save;
@@ -5654,6 +5683,9 @@ static const struct of_device_id exynos5433_cmu_of_match[] = {
 	}, {
 		.compatible = "samsung,exynos5433-cmu-mscl",
 		.data = &mscl_cmu_info,
+	}, {
+		.compatible = "samsung,exynos5433-cmu-imem",
+		.data = &imem_cmu_info,
 	}, {
 	},
 };
-- 
2.20.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v4 5/5] clk: samsung: exynos5433: add imem clocks
  2019-01-18 13:16   ` [PATCH v4 5/5] clk: samsung: exynos5433: add imem clocks Kamil Konieczny
@ 2019-01-19 12:41     ` Chanwoo Choi
  0 siblings, 0 replies; 2+ messages in thread
From: Chanwoo Choi @ 2019-01-19 12:41 UTC (permalink / raw)
  To: Kamil Konieczny
  Cc: Mark Rutland, devicetree, linux-samsung-soc, Rob Herring,
	Bartlomiej Zolnierkiewicz, linux-kernel, Krzysztof Kozlowski,
	Chanwoo Choi, Kukjin Kim, Sylwester Nawrocki, linux-arm-kernel,
	Marek Szyprowski

Hi Kamil,

2019년 1월 18일 (금) 오후 10:18, Kamil Konieczny
<k.konieczny@partner.samsung.com>님이 작성:
>
> Add imem clocks for exynos5433. This will enable to use crypto Slim
> Security SubSystem (in short SlimSSS) IP block.
>
> Signed-off-by: Kamil Konieczny <k.konieczny@partner.samsung.com>
> ---
>  drivers/clk/samsung/clk-exynos5433.c | 32 ++++++++++++++++++++++++++++
>  1 file changed, 32 insertions(+)
>
> diff --git a/drivers/clk/samsung/clk-exynos5433.c b/drivers/clk/samsung/clk-exynos5433.c
> index 24c3360db65b..dae1c96de933 100644
> --- a/drivers/clk/samsung/clk-exynos5433.c
> +++ b/drivers/clk/samsung/clk-exynos5433.c
> @@ -5467,6 +5467,35 @@ static const struct samsung_cmu_info cam1_cmu_info __initconst = {
>         .clk_name               = "aclk_cam1_400",
>  };
>
> +/*
> + * Register offset definitions for CMU_IMEM
> + */
> +#define ENABLE_ACLK_IMEM_SLIMSSS               0x080c
> +#define ENABLE_PCLK_IMEM_SLIMSSS               0x0908
> +
> +static const unsigned long imem_clk_regs[] __initconst = {
> +       ENABLE_ACLK_IMEM_SLIMSSS,
> +       ENABLE_PCLK_IMEM_SLIMSSS,
> +};
> +
> +static const struct samsung_gate_clock imem_gate_clks[] __initconst = {
> +       /* ENABLE_ACLK_IMEM_SLIMSSS */
> +       GATE(CLK_ACLK_SLIMSSS, "aclk_slimsss", "aclk_imem_sssx_266",
> +                       ENABLE_ACLK_IMEM_SLIMSSS, 0, CLK_IGNORE_UNUSED, 0),
> +
> +       /* ENABLE_PCLK_IMEM_SLIMSSS */
> +       GATE(CLK_PCLK_SLIMSSS, "pclk_slimsss", "aclk_imem_200",
> +                       ENABLE_PCLK_IMEM_SLIMSSS, 0, CLK_IGNORE_UNUSED, 0),
> +};
> +
> +static const struct samsung_cmu_info imem_cmu_info __initconst = {
> +       .gate_clks              = imem_gate_clks,
> +       .nr_gate_clks           = ARRAY_SIZE(imem_gate_clks),
> +       .nr_clk_ids             = IMEM_NR_CLK,
> +       .clk_regs               = imem_clk_regs,
> +       .nr_clk_regs            = ARRAY_SIZE(imem_clk_regs),
> +       .clk_name               = "aclk_imem_200",
> +};
>
>  struct exynos5433_cmu_data {
>         struct samsung_clk_reg_dump *clk_save;
> @@ -5654,6 +5683,9 @@ static const struct of_device_id exynos5433_cmu_of_match[] = {
>         }, {
>                 .compatible = "samsung,exynos5433-cmu-mscl",
>                 .data = &mscl_cmu_info,
> +       }, {
> +               .compatible = "samsung,exynos5433-cmu-imem",
> +               .data = &imem_cmu_info,
>         }, {
>         },
>  };
> --
> 2.20.0
>

Looks good to me.
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>

-- 
Best Regards,
Chanwoo Choi
Samsung Electronics

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-01-19 12:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20190118131639.17578-1-k.konieczny@partner.samsung.com>
     [not found] ` <CGME20190118131713eucas1p11f52d9e6a11dbd2b66f289ca3c56d92c@eucas1p1.samsung.com>
2019-01-18 13:16   ` [PATCH v4 5/5] clk: samsung: exynos5433: add imem clocks Kamil Konieczny
2019-01-19 12:41     ` Chanwoo Choi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).