clk: add support for Sigma Designs SMP86xx/87xx clocks
PATCH 1/1 clk: add support for Sigma Designs SMP86xx/87xx clocks
This adds support for most of the clocks in the Sigma Designs SMP86xx (tango3) and SMP87xx (tango4) chips.
---
I'm sending this now to avoid the maintainers wasting more time reviewing the woefully incomplete patch that was posted earlier this week. Unlike that patch, this driver accurately represents the various PLLs, muxes, and dividers, allowing it to work correctly across all the chip variants. That said, this patch still needs some work, which is why I have not posted it sooner. Obvious shortcomings off the top of my head:
- DT binding documentation is missing
- Most clocks are mostly read-only
- Some control register fields are ignored (lack of documentation)
--- drivers/clk/Kconfig | 7 + drivers/clk/Makefile | 1 + drivers/clk/clk-tangox.c | 656 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 664 insertions(+) create mode 100644 drivers/clk/clk-tangox.c
drivers/clk/Kconfig +7 -0
@@ -167,6 +167,13 @@ config COMMON_CLK_CDCE706 ---help--- This driver supports TI CDCE706 programmable 3-PLL clock synthesizer. +config COMMON_CLK_TANGOX + bool "Clock driver for Sigma Designs SMP86xx/SMP87xx SOCs" + depends on OF + ---help--- + This driver supports the Sigma Designs SMP86xx and SMP87xx clock + tree. + source "drivers/clk/bcm/Kconfig" source "drivers/clk/hisilicon/Kconfig" source "drivers/clk/qcom/Kconfig"
drivers/clk/Makefile +1 -0
@@ -40,6 +40,7 @@ obj-$(CONFIG_COMMON_CLK_SI5351) += clk-si5351.o obj-$(CONFIG_COMMON_CLK_SI570) += clk-si570.o obj-$(CONFIG_COMMON_CLK_CDCE925) += clk-cdce925.o obj-$(CONFIG_ARCH_STM32) += clk-stm32f4.o +obj-$(CONFIG_COMMON_CLK_TANGOX) += clk-tangox.o obj-$(CONFIG_CLK_TWL6040) += clk-twl6040.o obj-$(CONFIG_ARCH_U300) += clk-u300.o obj-$(CONFIG_ARCH_VT8500) += clk-vt8500.o
drivers/clk/clk-tangox.c new file +656 -0
656 lines not on this page · raw message
Signature · 1 line
2.5.3
Quoted 4 lines · Mans Rullgard
This adds support for most of the clocks in the Sigma Designs SMP86xx (tango3) and SMP87xx (tango4) chips.
Signed-off-by Mans Rullgard <[email protected]>
Quoted 10 lines
---
I'm sending this now to avoid the maintainers wasting more time reviewing the woefully incomplete patch that was posted earlier this week. Unlike that patch, this driver accurately represents the various PLLs, muxes, and dividers, allowing it to work correctly across all the chip variants. That said, this patch still needs some work, which is why I have not posted it sooner. Obvious shortcomings off the top of my head:
- DT binding documentation is missing
- Most clocks are mostly read-only
- Some control register fields are ignored (lack of documentation)
As the author of the supposedly "woefully incomplete patch that was posted earlier this week", thanks for having CCed me in the discussion...
Your driver comes in at 656 lines. Mine is 60 lines (give or take).
Having access to the (incomplete) documentation, the Verilog code, and the HW engineer who wrote the clock generator, I have told you that your driver was unnecessarily complex because it made use of features that were either not used (such as the post-dividers) or disabled because of a HW bug (like the sysclk_mux divider).
But somehow, you know better, and your driver handles everything that my driver cannot...
Could you perhaps be more specific (this is a technical mailing list after all) so that I may address your concerns one by one?
Regards.