Skip to content

Modify MxL's CGU clk driver to make it secure boot compatible

Rahul Tanwar linux-clk lkml 5 versions – Applied

Status from this message: Applied to clk-next

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest4 patches 4 repliesApplied
  2. v34 patches 1 replySuperseded
  3. v2 posting 2/25 patches 17 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v2 posting 1/25 patches0 repliesSuperseded
v13 patches0 repliesSuperseded

Changes in v4 from the cover letter

- Address review concern (Stephen Boyd)
- Change the design of how GATE_CLKs are overridden. Make the clk provider return NULL when that clk needs to be overridden.

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/4clk: mxl: Switch from direct readl/writel based IO to regmap based IOdrivers/clk/x86/Kconfig drivers/clk/x86/clk-cgu-pll.c drivers/clk/x86/clk-cgu.c +2 more+42 -291 reply
2/4clk: mxl: Remove redundant spinlocksdrivers/clk/x86/clk-cgu-pll.c drivers/clk/x86/clk-cgu.c drivers/clk/x86/clk-cgu.h +1 more+9 -911 reply
3/4clk: mxl: Add option to override gate clksdrivers/clk/x86/clk-cgu.c drivers/clk/x86/clk-cgu.h+15 -11 reply
4/4clk: mxl: Fix a clk entry by adding relevant flagsdrivers/clk/x86/clk-cgu.c drivers/clk/x86/clk-cgu.h drivers/clk/x86/clk-lgm.c+6 -41 reply

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchYi xin Zhu
1/4R-b
2/4R-b
3/4R-b
4/4R-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/4] Modify MxL's CGU clk driver to make it secure boot compatible

MxL's CGU driver was found to be lacking below required features. Add these required lacking features:

1. Since it is a core driver, it has to conform to secure boot & secure access architecture. In order for the register accesses to be secure access compliant, it needs regmap support as per our security architecture. Hence, replace direct read/writel with regmap based IO. Also remove redundant spinlocks from the driver as they are no longer necessary because regmap uses its own lock.

2. In MxL's LGM SoC, gate clocks can be controlled either from CGU clk driver i.e. this driver or directly from power management driver/daemon. It is dependent on the power policy/profile requirements of the end product.

To support such use cases, provide option to override gate clks enable/disable by adding a flag GATE_CLK_HW which controls if these gate clks are controlled by HW i.e. this driver or overridden in order to allow it to be controlled by power profiles instead.

3. Fix a bug related to missing flags in one 'dcl' clk entry.

This patch series is based on below git tree (linux-v6.0-rc1):
git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git

v4:
- Address review concern (Stephen Boyd)
- Change the design of how GATE_CLKs are overridden. Make the clk provider return NULL when that clk needs to be overridden.

v3:
- Address review concern (Stephen Boyd)
- Change the method of fixing invalid width for reg read/write.

v2:
- Add option to override gate clks
- Fix a clk entry by adding relevant flags

v1:
- Initial version

Rahul Tanwar (4):
clk: mxl: Switch from direct readl/writel based IO to regmap based IO
clk: mxl: Remove redundant spinlocks
clk: mxl: Add option to override gate clks
clk: mxl: Fix a clk entry by adding relevant flags

 drivers/clk/x86/Kconfig       |   5 +-
 drivers/clk/x86/clk-cgu-pll.c |  23 ++------
 drivers/clk/x86/clk-cgu.c     | 105 ++++++++++------------------------
 drivers/clk/x86/clk-cgu.h     |  46 +++++++--------
 drivers/clk/x86/clk-lgm.c     |  18 +++---
 5 files changed, 72 insertions(+), 125 deletions(-)
Signature · 1 line
2.17.1