mbox series

[v4,0/5] Add imem clock for Exynos 5433

Message ID 20190118131639.17578-1-k.konieczny@partner.samsung.com
Headers show
Series Add imem clock for Exynos 5433 | expand

Message

Kamil Konieczny Jan. 18, 2019, 1:16 p.m. UTC
Add imem clock for Exynos 5433. This will allow to use SlimSSS (Slim
Security SubSystem) with crypto functions.

Changes since v3:
- added Acked-by and Reviewed-by to patches 2 and 3
- dropped "[PATCH v3 4/5] arm64: dts: exynos: add imem clock" because it
  was already applied
- split "[PATCH v3 5/5] clk: samsung: exynos5433: add imem clocks"
  into two parts, first for DT bindings and second for clock driver. In
  clock driver I dropped all SSS clocks and left only two slimSSS, as I
  was unable to test SSS with crypto driver s5p-sss.

Changes since v2:
- added Reviewed-by to two first patches
- fixed subject for 3rd patch and commit message
- in patch 3 moved documentation of imem to end of clocks after CMU_CAM1
- in patch 4 moved cmu_imem declarations after cmu_cam1
- in patch 5 added newlines after clock registers, moved code after cmu_cam1,
  removed CLK_OF_DECLARE and exynos5433_cmu_imem_init, moved cmu_imem
  compatible to the end of exynos5433_cmu_of_match

Changes since v1:
- splitted typo patch into two, one of them for stable, suggested by Krzysztof
  Kozlowski
- added more registers as suggested by Chanwoo Choi

Kamil Konieczny (5):
  clk: samsung: exynos5433: fix typo in imem divider
  clk: samsung: exynos5433: fix name typo in sssx
  dt-bindings: clk: exynos5433: document imem clock
  dt-bindings: clk: exynos5433: add imem clock
  clk: samsung: exynos5433: add imem clocks

 .../bindings/clock/exynos5433-clock.txt       | 23 ++++++++
 drivers/clk/samsung/clk-exynos5433.c          | 38 ++++++++++++-
 include/dt-bindings/clock/exynos5433.h        | 57 ++++++++++++++++++-
 3 files changed, 114 insertions(+), 4 deletions(-)

Comments

Chanwoo Choi Jan. 19, 2019, 12:41 p.m. UTC | #1
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>