mbox series

[v1,0/6] clk: sunxi-ng: Allwinner D1 clock support

Message ID 20211119043545.4010-1-samuel@sholland.org (mailing list archive)
Headers show
Series clk: sunxi-ng: Allwinner D1 clock support | expand

Message

Samuel Holland Nov. 19, 2021, 4:35 a.m. UTC
This series adds support for the D1's CCU and R_CCU.

I attempted to hook up clock parents the "right" way, not using global
names. To accomplish that, I added several new macros. I am open to
comments on this approach. It looks a bit messier, but seems like it
could be less prone to errors.


Samuel Holland (6):
  dt-bindings: clk: Add compatibles for D1 CCUs
  clk: sunxi-ng: div: Add macros using clk_parent_data and clk_hw
  clk: sunxi-ng: mp: Add macros using clk_parent_data and clk_hw
  clk: sunxi-ng: mux: Add macros using clk_parent_data and clk_hw
  clk: sunxi-ng: gate: Add macros for gates with fixed dividers
  clk: sunxi-ng: Add support for the D1 SoC clocks

 .../clock/allwinner,sun4i-a10-ccu.yaml        |    4 +
 drivers/clk/sunxi-ng/Kconfig                  |   10 +
 drivers/clk/sunxi-ng/Makefile                 |    4 +
 drivers/clk/sunxi-ng/ccu-sun20i-d1-r.c        |  140 ++
 drivers/clk/sunxi-ng/ccu-sun20i-d1-r.h        |   17 +
 drivers/clk/sunxi-ng/ccu-sun20i-d1.c          | 1390 +++++++++++++++++
 drivers/clk/sunxi-ng/ccu-sun20i-d1.h          |   15 +
 drivers/clk/sunxi-ng/ccu_div.h                |   78 +
 drivers/clk/sunxi-ng/ccu_gate.h               |   32 +-
 drivers/clk/sunxi-ng/ccu_mp.h                 |   49 +
 drivers/clk/sunxi-ng/ccu_mux.h                |   33 +
 include/dt-bindings/clock/sun20i-d1-ccu.h     |  156 ++
 include/dt-bindings/clock/sun20i-d1-r-ccu.h   |   19 +
 include/dt-bindings/reset/sun20i-d1-ccu.h     |   77 +
 include/dt-bindings/reset/sun20i-d1-r-ccu.h   |   16 +
 15 files changed, 2039 insertions(+), 1 deletion(-)
 create mode 100644 drivers/clk/sunxi-ng/ccu-sun20i-d1-r.c
 create mode 100644 drivers/clk/sunxi-ng/ccu-sun20i-d1-r.h
 create mode 100644 drivers/clk/sunxi-ng/ccu-sun20i-d1.c
 create mode 100644 drivers/clk/sunxi-ng/ccu-sun20i-d1.h
 create mode 100644 include/dt-bindings/clock/sun20i-d1-ccu.h
 create mode 100644 include/dt-bindings/clock/sun20i-d1-r-ccu.h
 create mode 100644 include/dt-bindings/reset/sun20i-d1-ccu.h
 create mode 100644 include/dt-bindings/reset/sun20i-d1-r-ccu.h

Comments

Maxime Ripard Nov. 22, 2021, 9:06 a.m. UTC | #1
On Thu, 18 Nov 2021 22:35:38 -0600, Samuel Holland wrote:
> This series adds support for the D1's CCU and R_CCU.
> 
> I attempted to hook up clock parents the "right" way, not using global
> names. To accomplish that, I added several new macros. I am open to
> comments on this approach. It looks a bit messier, but seems like it
> could be less prone to errors.
> 
> [...]

Applied to sunxi/linux.git (sunxi/clk-for-5.17).

Thanks!
Maxime