Skip to content

clk: samsung: Add PM support for ARM64 Exynos chips

Sam Protsenko linux-arm-kernel linux-clk linux-samsung-soc lkml 4 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest3 patches 1 replyApplied
  2. v36 patches 7 repliesApplied
  3. v26 patches 3 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v16 patches6 repliesSuperseded

Changes in v4 from the cover letter

- Rebased on top of krzk/linux.git/for-next tree
- Reworked exynos_arm64_enable_bus_clk() users to only print an error message if that function fails
- Removed already applied patches from this series

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/3clk: samsung: Extract clocks registration to common functiondrivers/clk/samsung/clk.c drivers/clk/samsung/clk.h+30 -180 replies
2/3clk: samsung: Extract parent clock enabling to common functiondrivers/clk/samsung/clk-exynos-arm64.c+41 -160 replies
3/3clk: samsung: exynos5433: Extract PM support to common ARM64 layerdrivers/clk/samsung/clk-exynos-arm64.c drivers/clk/samsung/clk-exynos-arm64.h drivers/clk/samsung/clk-exynos5433.c+180 -1560 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by.

PatchMarek Szyprowski
1/3T-b
2/3T-b
3/3T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/3] clk: samsung: Add PM support for ARM64 Exynos chips

In order to prepare for PM enablement in clk-exynos850, common PM code was extracted from clk-exynos5433 to clk-exynos-arm64. Also some related cleanups were done prior to that. More specifically:

- patches #1..2: cleanups
- patch #3: PM code extraction

During the extraction of the exynos5433_cmu_probe() content to exynos_arm64_register_cmu_pm() some code was reworked a bit, and also split into smaller functions. In particular:

- cmu_data structure now contains a pointer to ctx, which is now allocated in samsung_clk_init()
- cmu_data structure initialization was moved into separate function
- code for configuring gate clocks was added (optional)

Which in turn resulted in somehow modified code of probe function:

Original
--------

    ...
    devm_platform_ioremap_resource(...);
    samsung_clk_init(...);
    exynos_arm64_cmu_prepare_pm(...);
    exynos_arm64_enable_bus_clk(...);
    platform_set_drvdata(...);
    ...

Modified
--------

    ...
    platform_set_drvdata(...);
    exynos_arm64_cmu_prepare_pm(...);
    exynos_arm64_enable_bus_clk(...);
    exynos_arm64_init_clocks(...);
    devm_platform_ioremap_resource(...);
    samsung_clk_init(...);
    ...

That shouldn't really change the logic or mode of operation. It was preliminary tested on Exynos850 based board, with some extra patches on top of this series (will be submitted later).

Changes in v4:
- Rebased on top of krzk/linux.git/for-next tree
- Reworked exynos_arm64_enable_bus_clk() users to only print an error message if that function fails
- Removed already applied patches from this series

Changes in v3:
- Rebased on the most recent soc/for-next tree
- Added A-b tags from Marek
- Added Marek's authorship to clk-exynos-arm64.c

Changes in v2:
- Rebased all patches on top of the latest soc/for-next tree
- Added Tested-by tag from Marek
- Addressed comments from the review

Sam Protsenko (3):
clk: samsung: Extract clocks registration to common function
clk: samsung: Extract parent clock enabling to common function
clk: samsung: exynos5433: Extract PM support to common ARM64 layer

 drivers/clk/samsung/clk-exynos-arm64.c | 229 +++++++++++++++++++++++--
 drivers/clk/samsung/clk-exynos-arm64.h |   3 +
 drivers/clk/samsung/clk-exynos5433.c   | 157 +----------------
 drivers/clk/samsung/clk.c              |  46 +++--
 drivers/clk/samsung/clk.h              |   2 +
 5 files changed, 249 insertions(+), 188 deletions(-)
Signature · 1 line
2.39.2