[PATCH v6 4/7] clk: Add clock driver for mb86s7x

Jassi Brar jaswinder.singh at linaro.org
Mon Mar 2 22:40:36 PST 2015


On 27 February 2015 at 06:58, Mike Turquette <mturquette at linaro.org> wrote:
> Quoting Vincent Yang (2015-02-05 18:10:49)
>> From: Jassi Brar <jaswinder.singh at linaro.org>
>>
>>  The CRG11 clock controller is managed by remote f/w.
>> This driver simply maps Linux CLK ops onto mailbox api.
>>
>> Signed-off-by: Jassi Brar <jaswinder.singh at linaro.org>
>> Signed-off-by: Andy Green <andy.green at linaro.org>
>> Signed-off-by: Vincent Yang <Vincent.Yang at tw.fujitsu.com>
>> Signed-off-by: Tetsuya Nuriya <nuriya.tetsuya at jp.fujitsu.com>
>> ---
>>  .../bindings/clock/fujitsu,mb86s70-crg11.txt       |  26 ++
>>  drivers/clk/Makefile                               |   1 +
>>  drivers/clk/clk-mb86s7x.c                          | 386 +++++++++++++++++++++
>>  3 files changed, 413 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/clock/fujitsu,mb86s70-crg11.txt
>>  create mode 100644 drivers/clk/clk-mb86s7x.c
>>
>> diff --git a/Documentation/devicetree/bindings/clock/fujitsu,mb86s70-crg11.txt b/Documentation/devicetree/bindings/clock/fujitsu,mb86s70-crg11.txt
>> new file mode 100644
>> index 0000000..3323962
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/clock/fujitsu,mb86s70-crg11.txt
>> @@ -0,0 +1,26 @@
>> +Fujitsu CRG11 clock driver bindings
>> +-----------------------------------
>> +
>> +Required properties :
>> +- compatible : Shall contain "fujitsu,mb86s70-crg11"
>> +- #clock-cells : Shall be 3 {cntrlr domain port}
>> +
>> +The consumer specifies the desired clock pointing to its phandle.
>> +
>> +Example:
>> +
>> +       clock: crg11 {
>> +               compatible = "fujitsu,mb86s70-crg11";
>> +               #clock-cells = <3>;
>> +       };
>> +
>> +       mhu: mhu0 at 2b1f0000 {
>> +               #mbox-cells = <1>;
>> +               compatible = "arm,mhu";
>> +               reg = <0 0x2B1F0000 0x1000>;
>> +               interrupts = <0 36 4>, /* LP Non-Sec */
>> +                            <0 35 4>, /* HP Non-Sec */
>> +                            <0 37 4>; /* Secure */
>> +               clocks = <&clock 0 2 1>; /* Cntrlr:0 Domain:2 Port:1 */
>
> Some preprocessor definitions would be better than hardcoding the values
> for Cntrlr, Domain and Port. The DT include chroot should help you
> here. Doing so will help you maintain this stuff into the future :-)
>
What macros do you have in mind? I was actually made to get rid of
macros in earlier version, but the implementation was different then.
I hope
     #clock-cells : Shall be 3 {cntrlr domain port}
in the binding should be telling enough.

Thanks
jassi



More information about the linux-arm-kernel mailing list