diff mbox

[1/2] clocksource: sunxi: Add new compatibles

Message ID 1391348280-9484-1-git-send-email-maxime.ripard@free-electrons.com (mailing list archive)
State New, archived
Headers show

Commit Message

Maxime Ripard Feb. 2, 2014, 1:37 p.m. UTC
The Allwinner A10 compatibles were following a slightly different compatible
patterns than the rest of the SoCs for historical reasons. Add compatibles
matching the other pattern to the timer driver for consistency, and keep the
older one for backward compatibility.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt | 5 +++--
 drivers/clocksource/sun4i_timer.c                                 | 4 ++++
 2 files changed, 7 insertions(+), 2 deletions(-)

Comments

Daniel Lezcano Feb. 3, 2014, 4:36 p.m. UTC | #1
On 02/02/2014 02:37 PM, Maxime Ripard wrote:
> The Allwinner A10 compatibles were following a slightly different compatible
> patterns than the rest of the SoCs for historical reasons. Add compatibles
> matching the other pattern to the timer driver for consistency, and keep the
> older one for backward compatibility.

Hi Maxime,

is it really needed to keep the old pattern ?



> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> ---
>   Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt | 5 +++--
>   drivers/clocksource/sun4i_timer.c                                 | 4 ++++
>   2 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt b/Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt
> index 48aeb78..d9e35ae 100644
> --- a/Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt
> +++ b/Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt
> @@ -2,7 +2,8 @@ Allwinner A1X SoCs Timer Controller
>
>   Required properties:
>
> -- compatible : should be "allwinner,sun4i-timer"
> +- compatible : should be "allwinner,sun4i-a10-timer"
> +               (Deprecated "allwinner,sun4i-timer")
>   - reg : Specifies base physical address and size of the registers.
>   - interrupts : The interrupt of the first timer
>   - clocks: phandle to the source clock (usually a 24 MHz fixed clock)
> @@ -10,7 +11,7 @@ Required properties:
>   Example:
>
>   timer {
> -	compatible = "allwinner,sun4i-timer";
> +	compatible = "allwinner,sun4i-a10-timer";
>   	reg = <0x01c20c00 0x400>;
>   	interrupts = <22>;
>   	clocks = <&osc>;
> diff --git a/drivers/clocksource/sun4i_timer.c b/drivers/clocksource/sun4i_timer.c
> index bf497af..de03895 100644
> --- a/drivers/clocksource/sun4i_timer.c
> +++ b/drivers/clocksource/sun4i_timer.c
> @@ -196,5 +196,9 @@ static void __init sun4i_timer_init(struct device_node *node)
>   	clockevents_config_and_register(&sun4i_clockevent, rate,
>   					TIMER_SYNC_TICKS, 0xffffffff);
>   }
> +CLOCKSOURCE_OF_DECLARE(sun4i, "allwinner,sun4i-a10-timer",
> +		       sun4i_timer_init);
> +
> +/* Deprecated */
>   CLOCKSOURCE_OF_DECLARE(sun4i, "allwinner,sun4i-timer",
>   		       sun4i_timer_init);
>
Maxime Ripard Feb. 3, 2014, 7:45 p.m. UTC | #2
Hi Daniel,

(Adding DT mailing-list in CC)

On Mon, Feb 03, 2014 at 05:36:03PM +0100, Daniel Lezcano wrote:
> On 02/02/2014 02:37 PM, Maxime Ripard wrote:
> >The Allwinner A10 compatibles were following a slightly different compatible
> >patterns than the rest of the SoCs for historical reasons. Add compatibles
> >matching the other pattern to the timer driver for consistency, and keep the
> >older one for backward compatibility.
> 
> Hi Maxime,
> 
> is it really needed to keep the old pattern ?

We agreed during the ARM Kernel Summit to consider the DT as a stable
ABI.

While I'd be ok with removing the older ones, that also means that we
would break the boot of newer kernels with older DT, so yes, we
actually need to keep the old compatibles.

> >Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> >---
> >  Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt | 5 +++--
> >  drivers/clocksource/sun4i_timer.c                                 | 4 ++++
> >  2 files changed, 7 insertions(+), 2 deletions(-)
> >
> >diff --git a/Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt b/Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt
> >index 48aeb78..d9e35ae 100644
> >--- a/Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt
> >+++ b/Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt
> >@@ -2,7 +2,8 @@ Allwinner A1X SoCs Timer Controller
> >
> >  Required properties:
> >
> >-- compatible : should be "allwinner,sun4i-timer"
> >+- compatible : should be "allwinner,sun4i-a10-timer"
> >+               (Deprecated "allwinner,sun4i-timer")
> >  - reg : Specifies base physical address and size of the registers.
> >  - interrupts : The interrupt of the first timer
> >  - clocks: phandle to the source clock (usually a 24 MHz fixed clock)
> >@@ -10,7 +11,7 @@ Required properties:
> >  Example:
> >
> >  timer {
> >-	compatible = "allwinner,sun4i-timer";
> >+	compatible = "allwinner,sun4i-a10-timer";
> >  	reg = <0x01c20c00 0x400>;
> >  	interrupts = <22>;
> >  	clocks = <&osc>;
> >diff --git a/drivers/clocksource/sun4i_timer.c b/drivers/clocksource/sun4i_timer.c
> >index bf497af..de03895 100644
> >--- a/drivers/clocksource/sun4i_timer.c
> >+++ b/drivers/clocksource/sun4i_timer.c
> >@@ -196,5 +196,9 @@ static void __init sun4i_timer_init(struct device_node *node)
> >  	clockevents_config_and_register(&sun4i_clockevent, rate,
> >  					TIMER_SYNC_TICKS, 0xffffffff);
> >  }
> >+CLOCKSOURCE_OF_DECLARE(sun4i, "allwinner,sun4i-a10-timer",
> >+		       sun4i_timer_init);
> >+
> >+/* Deprecated */
> >  CLOCKSOURCE_OF_DECLARE(sun4i, "allwinner,sun4i-timer",
> >  		       sun4i_timer_init);
> >
> 
> 
> -- 
>  <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs
> 
> Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
> <http://twitter.com/#!/linaroorg> Twitter |
> <http://www.linaro.org/linaro-blog/> Blog
>
Rob Herring Feb. 3, 2014, 8:11 p.m. UTC | #3
On Mon, Feb 3, 2014 at 1:45 PM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> Hi Daniel,
>
> (Adding DT mailing-list in CC)
>
> On Mon, Feb 03, 2014 at 05:36:03PM +0100, Daniel Lezcano wrote:
>> On 02/02/2014 02:37 PM, Maxime Ripard wrote:
>> >The Allwinner A10 compatibles were following a slightly different compatible
>> >patterns than the rest of the SoCs for historical reasons. Add compatibles
>> >matching the other pattern to the timer driver for consistency, and keep the
>> >older one for backward compatibility.
>>
>> Hi Maxime,
>>
>> is it really needed to keep the old pattern ?
>
> We agreed during the ARM Kernel Summit to consider the DT as a stable
> ABI.
>
> While I'd be ok with removing the older ones, that also means that we
> would break the boot of newer kernels with older DT, so yes, we
> actually need to keep the old compatibles.

It all depends if that would really cause problems for a given
platform. So if Allwinner DT support is a moving target, then changing
is probably okay. For example, if anyone using the platform is going
to need to update their DTB to add more nodes to get various features
anyway, then breaking it is not all that important.

Rob
Daniel Lezcano Feb. 3, 2014, 8:17 p.m. UTC | #4
On 02/03/2014 08:45 PM, Maxime Ripard wrote:
> Hi Daniel,
>
> (Adding DT mailing-list in CC)
>
> On Mon, Feb 03, 2014 at 05:36:03PM +0100, Daniel Lezcano wrote:
>> On 02/02/2014 02:37 PM, Maxime Ripard wrote:
>>> The Allwinner A10 compatibles were following a slightly different compatible
>>> patterns than the rest of the SoCs for historical reasons. Add compatibles
>>> matching the other pattern to the timer driver for consistency, and keep the
>>> older one for backward compatibility.
>>
>> Hi Maxime,
>>
>> is it really needed to keep the old pattern ?
>
> We agreed during the ARM Kernel Summit to consider the DT as a stable
> ABI.
>
> While I'd be ok with removing the older ones, that also means that we
> would break the boot of newer kernels with older DT, so yes, we
> actually need to keep the old compatibles.

Thanks for the clarification.

So these old compatibles will stay there 'ad vitam aeternam', right ?


>>> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
>>> ---
>>>   Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt | 5 +++--
>>>   drivers/clocksource/sun4i_timer.c                                 | 4 ++++
>>>   2 files changed, 7 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt b/Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt
>>> index 48aeb78..d9e35ae 100644
>>> --- a/Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt
>>> +++ b/Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt
>>> @@ -2,7 +2,8 @@ Allwinner A1X SoCs Timer Controller
>>>
>>>   Required properties:
>>>
>>> -- compatible : should be "allwinner,sun4i-timer"
>>> +- compatible : should be "allwinner,sun4i-a10-timer"
>>> +               (Deprecated "allwinner,sun4i-timer")
>>>   - reg : Specifies base physical address and size of the registers.
>>>   - interrupts : The interrupt of the first timer
>>>   - clocks: phandle to the source clock (usually a 24 MHz fixed clock)
>>> @@ -10,7 +11,7 @@ Required properties:
>>>   Example:
>>>
>>>   timer {
>>> -	compatible = "allwinner,sun4i-timer";
>>> +	compatible = "allwinner,sun4i-a10-timer";
>>>   	reg = <0x01c20c00 0x400>;
>>>   	interrupts = <22>;
>>>   	clocks = <&osc>;
>>> diff --git a/drivers/clocksource/sun4i_timer.c b/drivers/clocksource/sun4i_timer.c
>>> index bf497af..de03895 100644
>>> --- a/drivers/clocksource/sun4i_timer.c
>>> +++ b/drivers/clocksource/sun4i_timer.c
>>> @@ -196,5 +196,9 @@ static void __init sun4i_timer_init(struct device_node *node)
>>>   	clockevents_config_and_register(&sun4i_clockevent, rate,
>>>   					TIMER_SYNC_TICKS, 0xffffffff);
>>>   }
>>> +CLOCKSOURCE_OF_DECLARE(sun4i, "allwinner,sun4i-a10-timer",
>>> +		       sun4i_timer_init);
>>> +
>>> +/* Deprecated */
>>>   CLOCKSOURCE_OF_DECLARE(sun4i, "allwinner,sun4i-timer",
>>>   		       sun4i_timer_init);
>>>
>>
>>
>> --
>>   <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs
>>
>> Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
>> <http://twitter.com/#!/linaroorg> Twitter |
>> <http://www.linaro.org/linaro-blog/> Blog
>>
>
Gregory CLEMENT Feb. 4, 2014, 8:13 a.m. UTC | #5
Hi Daniel,
On 03/02/2014 21:17, Daniel Lezcano wrote:
> On 02/03/2014 08:45 PM, Maxime Ripard wrote:
>> Hi Daniel,
>>
>> (Adding DT mailing-list in CC)
>>
>> On Mon, Feb 03, 2014 at 05:36:03PM +0100, Daniel Lezcano wrote:
>>> On 02/02/2014 02:37 PM, Maxime Ripard wrote:
>>>> The Allwinner A10 compatibles were following a slightly different compatible
>>>> patterns than the rest of the SoCs for historical reasons. Add compatibles
>>>> matching the other pattern to the timer driver for consistency, and keep the
>>>> older one for backward compatibility.
>>>
>>> Hi Maxime,
>>>
>>> is it really needed to keep the old pattern ?
>>
>> We agreed during the ARM Kernel Summit to consider the DT as a stable
>> ABI.
>>
>> While I'd be ok with removing the older ones, that also means that we
>> would break the boot of newer kernels with older DT, so yes, we
>> actually need to keep the old compatibles.
> 
> Thanks for the clarification.
> 
> So these old compatibles will stay there 'ad vitam aeternam', right ?

From what I have understood during the ARM Kernel Summit, it was
acceptable to remove them after a few release.

Gregory

> 
> 
>>>> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
>>>> ---
>>>>   Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt | 5 +++--
>>>>   drivers/clocksource/sun4i_timer.c                                 | 4 ++++
>>>>   2 files changed, 7 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt b/Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt
>>>> index 48aeb78..d9e35ae 100644
>>>> --- a/Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt
>>>> +++ b/Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt
>>>> @@ -2,7 +2,8 @@ Allwinner A1X SoCs Timer Controller
>>>>
>>>>   Required properties:
>>>>
>>>> -- compatible : should be "allwinner,sun4i-timer"
>>>> +- compatible : should be "allwinner,sun4i-a10-timer"
>>>> +               (Deprecated "allwinner,sun4i-timer")
>>>>   - reg : Specifies base physical address and size of the registers.
>>>>   - interrupts : The interrupt of the first timer
>>>>   - clocks: phandle to the source clock (usually a 24 MHz fixed clock)
>>>> @@ -10,7 +11,7 @@ Required properties:
>>>>   Example:
>>>>
>>>>   timer {
>>>> -	compatible = "allwinner,sun4i-timer";
>>>> +	compatible = "allwinner,sun4i-a10-timer";
>>>>   	reg = <0x01c20c00 0x400>;
>>>>   	interrupts = <22>;
>>>>   	clocks = <&osc>;
>>>> diff --git a/drivers/clocksource/sun4i_timer.c b/drivers/clocksource/sun4i_timer.c
>>>> index bf497af..de03895 100644
>>>> --- a/drivers/clocksource/sun4i_timer.c
>>>> +++ b/drivers/clocksource/sun4i_timer.c
>>>> @@ -196,5 +196,9 @@ static void __init sun4i_timer_init(struct device_node *node)
>>>>   	clockevents_config_and_register(&sun4i_clockevent, rate,
>>>>   					TIMER_SYNC_TICKS, 0xffffffff);
>>>>   }
>>>> +CLOCKSOURCE_OF_DECLARE(sun4i, "allwinner,sun4i-a10-timer",
>>>> +		       sun4i_timer_init);
>>>> +
>>>> +/* Deprecated */
>>>>   CLOCKSOURCE_OF_DECLARE(sun4i, "allwinner,sun4i-timer",
>>>>   		       sun4i_timer_init);
>>>>
>>>
>>>
>>> --
>>>   <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs
>>>
>>> Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
>>> <http://twitter.com/#!/linaroorg> Twitter |
>>> <http://www.linaro.org/linaro-blog/> Blog
>>>
>>
> 
>
Maxime Ripard Feb. 4, 2014, 8:41 a.m. UTC | #6
Hi Rob,

On Mon, Feb 03, 2014 at 02:11:28PM -0600, Rob Herring wrote:
> On Mon, Feb 3, 2014 at 1:45 PM, Maxime Ripard
> <maxime.ripard@free-electrons.com> wrote:
> > Hi Daniel,
> >
> > (Adding DT mailing-list in CC)
> >
> > On Mon, Feb 03, 2014 at 05:36:03PM +0100, Daniel Lezcano wrote:
> >> On 02/02/2014 02:37 PM, Maxime Ripard wrote:
> >> >The Allwinner A10 compatibles were following a slightly different compatible
> >> >patterns than the rest of the SoCs for historical reasons. Add compatibles
> >> >matching the other pattern to the timer driver for consistency, and keep the
> >> >older one for backward compatibility.
> >>
> >> Hi Maxime,
> >>
> >> is it really needed to keep the old pattern ?
> >
> > We agreed during the ARM Kernel Summit to consider the DT as a stable
> > ABI.
> >
> > While I'd be ok with removing the older ones, that also means that we
> > would break the boot of newer kernels with older DT, so yes, we
> > actually need to keep the old compatibles.
> 
> It all depends if that would really cause problems for a given
> platform. So if Allwinner DT support is a moving target, then changing
> is probably okay. For example, if anyone using the platform is going
> to need to update their DTB to add more nodes to get various features
> anyway, then breaking it is not all that important.

We keep adding new stuff to the DT, yes, so I guess we can be
considered a moving target. Thanks for your input!

Maxime
Maxime Ripard Feb. 4, 2014, 8:45 a.m. UTC | #7
Hi,

On Mon, Feb 03, 2014 at 09:17:46PM +0100, Daniel Lezcano wrote:
> On 02/03/2014 08:45 PM, Maxime Ripard wrote:
> >Hi Daniel,
> >
> >(Adding DT mailing-list in CC)
> >
> >On Mon, Feb 03, 2014 at 05:36:03PM +0100, Daniel Lezcano wrote:
> >>On 02/02/2014 02:37 PM, Maxime Ripard wrote:
> >>>The Allwinner A10 compatibles were following a slightly different compatible
> >>>patterns than the rest of the SoCs for historical reasons. Add compatibles
> >>>matching the other pattern to the timer driver for consistency, and keep the
> >>>older one for backward compatibility.
> >>
> >>Hi Maxime,
> >>
> >>is it really needed to keep the old pattern ?
> >
> >We agreed during the ARM Kernel Summit to consider the DT as a stable
> >ABI.
> >
> >While I'd be ok with removing the older ones, that also means that we
> >would break the boot of newer kernels with older DT, so yes, we
> >actually need to keep the old compatibles.
> 
> Thanks for the clarification.
> 
> So these old compatibles will stay there 'ad vitam aeternam', right ?

Except for what Rob told, yep, that was my feeling, but Gregory and I
seem to have a different interpretation of this rule :)

Maxime
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt b/Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt
index 48aeb78..d9e35ae 100644
--- a/Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt
+++ b/Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt
@@ -2,7 +2,8 @@  Allwinner A1X SoCs Timer Controller
 
 Required properties:
 
-- compatible : should be "allwinner,sun4i-timer"
+- compatible : should be "allwinner,sun4i-a10-timer"
+               (Deprecated "allwinner,sun4i-timer")
 - reg : Specifies base physical address and size of the registers.
 - interrupts : The interrupt of the first timer
 - clocks: phandle to the source clock (usually a 24 MHz fixed clock)
@@ -10,7 +11,7 @@  Required properties:
 Example:
 
 timer {
-	compatible = "allwinner,sun4i-timer";
+	compatible = "allwinner,sun4i-a10-timer";
 	reg = <0x01c20c00 0x400>;
 	interrupts = <22>;
 	clocks = <&osc>;
diff --git a/drivers/clocksource/sun4i_timer.c b/drivers/clocksource/sun4i_timer.c
index bf497af..de03895 100644
--- a/drivers/clocksource/sun4i_timer.c
+++ b/drivers/clocksource/sun4i_timer.c
@@ -196,5 +196,9 @@  static void __init sun4i_timer_init(struct device_node *node)
 	clockevents_config_and_register(&sun4i_clockevent, rate,
 					TIMER_SYNC_TICKS, 0xffffffff);
 }
+CLOCKSOURCE_OF_DECLARE(sun4i, "allwinner,sun4i-a10-timer",
+		       sun4i_timer_init);
+
+/* Deprecated */
 CLOCKSOURCE_OF_DECLARE(sun4i, "allwinner,sun4i-timer",
 		       sun4i_timer_init);