diff mbox

[v3,12/19] clk: at91: add peripheral clk macros for peripheral clk dt bindings

Message ID 1375945839-9573-1-git-send-email-b.brezillon@overkiz.com (mailing list archive)
State New, archived
Headers show

Commit Message

Boris BREZILLON Aug. 8, 2013, 7:10 a.m. UTC
This patch adds the peripheral divisors macros (for sam9x5 compatible IPs)
which will be used by peripheral clk dt definitions.

Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
---
 .../clk/at91/at91sam9x5/clk-peripheral.h           |   15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 include/dt-bindings/clk/at91/at91sam9x5/clk-peripheral.h

Comments

Nicolas Ferre Oct. 8, 2013, 3:44 p.m. UTC | #1
On 08/08/2013 09:10, Boris BREZILLON :
> This patch adds the peripheral divisors macros (for sam9x5 compatible IPs)
> which will be used by peripheral clk dt definitions.

I am in favor for these definitions. So let's keep them (with raw 
numbers toguether with these macros in documentation).

>
> Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
> ---
>   .../clk/at91/at91sam9x5/clk-peripheral.h           |   15 +++++++++++++++
>   1 file changed, 15 insertions(+)
>   create mode 100644 include/dt-bindings/clk/at91/at91sam9x5/clk-peripheral.h
>
> diff --git a/include/dt-bindings/clk/at91/at91sam9x5/clk-peripheral.h b/include/dt-bindings/clk/at91/at91sam9x5/clk-peripheral.h
> new file mode 100644
> index 0000000..a6dd506
> --- /dev/null
> +++ b/include/dt-bindings/clk/at91/at91sam9x5/clk-peripheral.h
> @@ -0,0 +1,15 @@
> +/*
> + * This header provides constants for AT91 peripheral clks.
> + *
> + * The constants defined in this header are being used in dts.
> + */
> +
> +#ifndef _DT_BINDINGS_CLK_AT91SAM9X5_PERIPH_H
> +#define _DT_BINDINGS_CLK_AT91SAM9X5_PERIPH_H
> +
> +#define AT91SAM9X5_PERIPH_CLK_DIV1	0
> +#define AT91SAM9X5_PERIPH_CLK_DIV2	1
> +#define AT91SAM9X5_PERIPH_CLK_DIV4	2
> +#define AT91SAM9X5_PERIPH_CLK_DIV8	3
> +
> +#endif
>
Boris BREZILLON Oct. 8, 2013, 4:01 p.m. UTC | #2
On 08/10/2013 17:44, Nicolas Ferre wrote:
> On 08/08/2013 09:10, Boris BREZILLON :
>> This patch adds the peripheral divisors macros (for sam9x5 compatible 
>> IPs)
>> which will be used by peripheral clk dt definitions.
>
> I am in favor for these definitions. So let's keep them (with raw 
> numbers toguether with these macros in documentation).

I guess we should move them elsewhere if these are the only macros we keep.

What about "include/dt-bindings/clk/at91sam9x5-periph.h" ?
>
>>
>> Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
>> ---
>>   .../clk/at91/at91sam9x5/clk-peripheral.h           |   15 
>> +++++++++++++++
>>   1 file changed, 15 insertions(+)
>>   create mode 100644 
>> include/dt-bindings/clk/at91/at91sam9x5/clk-peripheral.h
>>
>> diff --git a/include/dt-bindings/clk/at91/at91sam9x5/clk-peripheral.h 
>> b/include/dt-bindings/clk/at91/at91sam9x5/clk-peripheral.h
>> new file mode 100644
>> index 0000000..a6dd506
>> --- /dev/null
>> +++ b/include/dt-bindings/clk/at91/at91sam9x5/clk-peripheral.h
>> @@ -0,0 +1,15 @@
>> +/*
>> + * This header provides constants for AT91 peripheral clks.
>> + *
>> + * The constants defined in this header are being used in dts.
>> + */
>> +
>> +#ifndef _DT_BINDINGS_CLK_AT91SAM9X5_PERIPH_H
>> +#define _DT_BINDINGS_CLK_AT91SAM9X5_PERIPH_H
>> +
>> +#define AT91SAM9X5_PERIPH_CLK_DIV1    0
>> +#define AT91SAM9X5_PERIPH_CLK_DIV2    1
>> +#define AT91SAM9X5_PERIPH_CLK_DIV4    2
>> +#define AT91SAM9X5_PERIPH_CLK_DIV8    3
>> +
>> +#endif
>>
>
>
Nicolas Ferre Oct. 8, 2013, 4:15 p.m. UTC | #3
On 08/10/2013 18:01, boris brezillon :
> On 08/10/2013 17:44, Nicolas Ferre wrote:
>> On 08/08/2013 09:10, Boris BREZILLON :
>>> This patch adds the peripheral divisors macros (for sam9x5 compatible
>>> IPs)
>>> which will be used by peripheral clk dt definitions.
>>
>> I am in favor for these definitions. So let's keep them (with raw
>> numbers toguether with these macros in documentation).
>
> I guess we should move them elsewhere if these are the only macros we keep.
>
> What about "include/dt-bindings/clk/at91sam9x5-periph.h" ?

Well, what about a more generic clk binding file for all at91-related 
definitions (if more come). We can still differentiate among devices 
into the file itself...

What do you think about:
include/dt-bindings/clk/at91.h
is it too generic?

BTW, I see the clk and clock directories. What is the difference?


>>> Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
>>> ---
>>>    .../clk/at91/at91sam9x5/clk-peripheral.h           |   15
>>> +++++++++++++++
>>>    1 file changed, 15 insertions(+)
>>>    create mode 100644
>>> include/dt-bindings/clk/at91/at91sam9x5/clk-peripheral.h
>>>
>>> diff --git a/include/dt-bindings/clk/at91/at91sam9x5/clk-peripheral.h
>>> b/include/dt-bindings/clk/at91/at91sam9x5/clk-peripheral.h
>>> new file mode 100644
>>> index 0000000..a6dd506
>>> --- /dev/null
>>> +++ b/include/dt-bindings/clk/at91/at91sam9x5/clk-peripheral.h
>>> @@ -0,0 +1,15 @@
>>> +/*
>>> + * This header provides constants for AT91 peripheral clks.
>>> + *
>>> + * The constants defined in this header are being used in dts.
>>> + */
>>> +
>>> +#ifndef _DT_BINDINGS_CLK_AT91SAM9X5_PERIPH_H
>>> +#define _DT_BINDINGS_CLK_AT91SAM9X5_PERIPH_H
>>> +
>>> +#define AT91SAM9X5_PERIPH_CLK_DIV1    0
>>> +#define AT91SAM9X5_PERIPH_CLK_DIV2    1
>>> +#define AT91SAM9X5_PERIPH_CLK_DIV4    2
>>> +#define AT91SAM9X5_PERIPH_CLK_DIV8    3
>>> +
>>> +#endif
>>>
>>
>>
>
>
>
Boris BREZILLON Oct. 8, 2013, 4:19 p.m. UTC | #4
On 08/10/2013 18:15, Nicolas Ferre wrote:
> On 08/10/2013 18:01, boris brezillon :
>> On 08/10/2013 17:44, Nicolas Ferre wrote:
>>> On 08/08/2013 09:10, Boris BREZILLON :
>>>> This patch adds the peripheral divisors macros (for sam9x5 compatible
>>>> IPs)
>>>> which will be used by peripheral clk dt definitions.
>>>
>>> I am in favor for these definitions. So let's keep them (with raw
>>> numbers toguether with these macros in documentation).
>>
>> I guess we should move them elsewhere if these are the only macros we 
>> keep.
>>
>> What about "include/dt-bindings/clk/at91sam9x5-periph.h" ?
>
> Well, what about a more generic clk binding file for all at91-related 
> definitions (if more come). We can still differentiate among devices 
> into the file itself...
>
> What do you think about:
> include/dt-bindings/clk/at91.h
> is it too generic?

No, this is fine.

>
> BTW, I see the clk and clock directories. What is the difference?
>

I don't know, but they both store clk (signals) specific bindings, and 
as the framework is called "clk", I choose this directory.

Could a dt maintainer (or Mike) help us choosing the appropriate directory ?

>
>>>> Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
>>>> ---
>>>>    .../clk/at91/at91sam9x5/clk-peripheral.h           |   15
>>>> +++++++++++++++
>>>>    1 file changed, 15 insertions(+)
>>>>    create mode 100644
>>>> include/dt-bindings/clk/at91/at91sam9x5/clk-peripheral.h
>>>>
>>>> diff --git a/include/dt-bindings/clk/at91/at91sam9x5/clk-peripheral.h
>>>> b/include/dt-bindings/clk/at91/at91sam9x5/clk-peripheral.h
>>>> new file mode 100644
>>>> index 0000000..a6dd506
>>>> --- /dev/null
>>>> +++ b/include/dt-bindings/clk/at91/at91sam9x5/clk-peripheral.h
>>>> @@ -0,0 +1,15 @@
>>>> +/*
>>>> + * This header provides constants for AT91 peripheral clks.
>>>> + *
>>>> + * The constants defined in this header are being used in dts.
>>>> + */
>>>> +
>>>> +#ifndef _DT_BINDINGS_CLK_AT91SAM9X5_PERIPH_H
>>>> +#define _DT_BINDINGS_CLK_AT91SAM9X5_PERIPH_H
>>>> +
>>>> +#define AT91SAM9X5_PERIPH_CLK_DIV1    0
>>>> +#define AT91SAM9X5_PERIPH_CLK_DIV2    1
>>>> +#define AT91SAM9X5_PERIPH_CLK_DIV4    2
>>>> +#define AT91SAM9X5_PERIPH_CLK_DIV8    3
>>>> +
>>>> +#endif
>>>>
>>>
>>>
>>
>>
>>
>
>
diff mbox

Patch

diff --git a/include/dt-bindings/clk/at91/at91sam9x5/clk-peripheral.h b/include/dt-bindings/clk/at91/at91sam9x5/clk-peripheral.h
new file mode 100644
index 0000000..a6dd506
--- /dev/null
+++ b/include/dt-bindings/clk/at91/at91sam9x5/clk-peripheral.h
@@ -0,0 +1,15 @@ 
+/*
+ * This header provides constants for AT91 peripheral clks.
+ *
+ * The constants defined in this header are being used in dts.
+ */
+
+#ifndef _DT_BINDINGS_CLK_AT91SAM9X5_PERIPH_H
+#define _DT_BINDINGS_CLK_AT91SAM9X5_PERIPH_H
+
+#define AT91SAM9X5_PERIPH_CLK_DIV1	0
+#define AT91SAM9X5_PERIPH_CLK_DIV2	1
+#define AT91SAM9X5_PERIPH_CLK_DIV4	2
+#define AT91SAM9X5_PERIPH_CLK_DIV8	3
+
+#endif