[PATCH v1 03/14] clk: Add of_clk_match() for device drivers
From: Kumar Gala <hidden>
Date: 2013-08-16 17:16:44
Also in:
linux-arm-msm, lkml
On Aug 16, 2013, at 11:43 AM, Kumar Gala wrote:
On Aug 15, 2013, at 12:02 AM, Mike Turquette wrote:quoted
quoted
Right now we have pll8: pll8 { #clock-cells = <0>; compatible = "qcom,pll"; clocks = <&pxo>; }; in DT and static struct pll_desc pll8_desc = { .l_reg = 0x3144, .m_reg = 0x3148, .n_reg = 0x314c, .config_reg = 0x3154, .mode_reg = 0x3140, .status_reg = 0x3158, .status_bit = 16, }; in C. Do you want everything to be in DT? Something like: pll8: pll8 at 3140 { #clock-cells = <0>; compatible = "qcom,pll"; clocks = <&pxo>; reg = <0x3140 0x20>; }; and then assume that all those registers are offset from the base register and that the status bit is 16 (it usually is but not always)?I think its reasonable to put the various regs associated with a clock in the .dts like the example you show, but we should be going down to bit level details. If we think of each clock as its own device its reasonable that the clock would have some set of registers associated with it.
oops, we should NOT be going down to bit level. - k -- Employee of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation