public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* How to implement common clk in multi function controller?
@ 2015-11-11  3:16 Masahiro Yamada
  2015-11-11  9:30 ` Vladimir Zapolskiy
  2015-11-11  9:47 ` Chen-Yu Tsai
  0 siblings, 2 replies; 3+ messages in thread
From: Masahiro Yamada @ 2015-11-11  3:16 UTC (permalink / raw)
  To: linux-clk; +Cc: linux-arm-kernel, Linux Kernel Mailing List

Hi.

I am implementing clk and reset drivers for my SoCs.
(drivers/clk/uniphier/* and drivers/reset/uniphier/*)


In my SoCs, one hardware block contains various
registers for both clock and reset controlling.
(so, it is like a MFD system controller device).
I think it is a common case.


I am guessing my device tree would be like follows:
(one syscon device contains clk and rst devices under it)

syscon {
     compatible = "socionext,uniphier-syscon",
                 "syscon", "simple-mfd";
     reg = <...   ...>;

     clk_ctrl {
            .compatible = "socionext,uniphier-clkctrl";
            #clock-cells = <1>;
     };

     rst_ctrl {
             .compatible = "socionext,uniphier-rstctrl";
             #reset-cells = <1>;
     };
};



One problem I noticed was,
we are supposed to use regmap for register access
if we use syscon.

OTOH, common clk APIs such as clk-gate, clk-divider
expect simple register access via writel()/readl().

Is it a good idea to expand such APIs to regmap?


Of course, I could my own uniphier/clk-gate.c
to use regmap as other SoCs do.

But, I think regmap is general demand, so
I am wondering if it could be supported in common parts.

Or, any other good solution exists?



-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-11-11  9:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-11  3:16 How to implement common clk in multi function controller? Masahiro Yamada
2015-11-11  9:30 ` Vladimir Zapolskiy
2015-11-11  9:47 ` Chen-Yu Tsai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox