diff mbox series

clk: at91: Fix the declaration of the clocks

Message ID 20210203154332.470587-1-tudor.ambarus@microchip.com (mailing list archive)
State New, archived
Headers show
Series clk: at91: Fix the declaration of the clocks | expand

Commit Message

Tudor Ambarus Feb. 3, 2021, 3:43 p.m. UTC
These are all "early clocks" that require initialization just at
of_clk_init() time. Use CLK_OF_DECLARE() to declare them.

This also fixes a problem that was spotted when fw_devlink was
set to 'on' by default: the boards failed to boot. The reason is
that CLK_OF_DECLARE_DRIVER() clears the OF_POPULATED and causes
the consumers of the clock to be postponed by fw_devlink until
the second initialization routine of the clock has been completed.
One of the consumers of the clock is the timer, which is used as a
clocksource, and needs the clock initialized early. Postponing the
timers caused the fail at boot.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
---
Tested on sama5d2_xplained.

 drivers/clk/at91/at91rm9200.c  |  3 +--
 drivers/clk/at91/at91sam9260.c | 16 ++++++++--------
 drivers/clk/at91/at91sam9g45.c |  3 +--
 drivers/clk/at91/at91sam9n12.c |  3 +--
 drivers/clk/at91/at91sam9rl.c  |  3 ++-
 drivers/clk/at91/at91sam9x5.c  | 20 ++++++++++----------
 drivers/clk/at91/sama5d2.c     |  3 ++-
 drivers/clk/at91/sama5d3.c     |  2 +-
 drivers/clk/at91/sama5d4.c     |  3 ++-
 9 files changed, 28 insertions(+), 28 deletions(-)

Comments

Saravana Kannan Feb. 3, 2021, 6:15 p.m. UTC | #1
On Wed, Feb 3, 2021 at 7:43 AM Tudor Ambarus
<tudor.ambarus@microchip.com> wrote:
>
> These are all "early clocks" that require initialization just at
> of_clk_init() time. Use CLK_OF_DECLARE() to declare them.
>
> This also fixes a problem that was spotted when fw_devlink was
> set to 'on' by default: the boards failed to boot. The reason is
> that CLK_OF_DECLARE_DRIVER() clears the OF_POPULATED and causes
> the consumers of the clock to be postponed by fw_devlink until
> the second initialization routine of the clock has been completed.
> One of the consumers of the clock is the timer, which is used as a
> clocksource, and needs the clock initialized early. Postponing the
> timers caused the fail at boot.
>
> Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>

Thanks Tudor!
Acked-by: Saravana Kannan <saravanak@google.com>

-Saravana

> ---
> Tested on sama5d2_xplained.
>
>  drivers/clk/at91/at91rm9200.c  |  3 +--
>  drivers/clk/at91/at91sam9260.c | 16 ++++++++--------
>  drivers/clk/at91/at91sam9g45.c |  3 +--
>  drivers/clk/at91/at91sam9n12.c |  3 +--
>  drivers/clk/at91/at91sam9rl.c  |  3 ++-
>  drivers/clk/at91/at91sam9x5.c  | 20 ++++++++++----------
>  drivers/clk/at91/sama5d2.c     |  3 ++-
>  drivers/clk/at91/sama5d3.c     |  2 +-
>  drivers/clk/at91/sama5d4.c     |  3 ++-
>  9 files changed, 28 insertions(+), 28 deletions(-)
>
> diff --git a/drivers/clk/at91/at91rm9200.c b/drivers/clk/at91/at91rm9200.c
> index 0fad1009f315..428a6f4b9ebc 100644
> --- a/drivers/clk/at91/at91rm9200.c
> +++ b/drivers/clk/at91/at91rm9200.c
> @@ -215,5 +215,4 @@ static void __init at91rm9200_pmc_setup(struct device_node *np)
>   * deferring properly. Once this is fixed, this can be switched to a platform
>   * driver.
>   */
> -CLK_OF_DECLARE_DRIVER(at91rm9200_pmc, "atmel,at91rm9200-pmc",
> -                     at91rm9200_pmc_setup);
> +CLK_OF_DECLARE(at91rm9200_pmc, "atmel,at91rm9200-pmc", at91rm9200_pmc_setup);
> diff --git a/drivers/clk/at91/at91sam9260.c b/drivers/clk/at91/at91sam9260.c
> index ceb5495f723a..b29843bea278 100644
> --- a/drivers/clk/at91/at91sam9260.c
> +++ b/drivers/clk/at91/at91sam9260.c
> @@ -491,26 +491,26 @@ static void __init at91sam9260_pmc_setup(struct device_node *np)
>  {
>         at91sam926x_pmc_setup(np, &at91sam9260_data);
>  }
> -CLK_OF_DECLARE_DRIVER(at91sam9260_pmc, "atmel,at91sam9260-pmc",
> -                     at91sam9260_pmc_setup);
> +
> +CLK_OF_DECLARE(at91sam9260_pmc, "atmel,at91sam9260-pmc", at91sam9260_pmc_setup);
>
>  static void __init at91sam9261_pmc_setup(struct device_node *np)
>  {
>         at91sam926x_pmc_setup(np, &at91sam9261_data);
>  }
> -CLK_OF_DECLARE_DRIVER(at91sam9261_pmc, "atmel,at91sam9261-pmc",
> -                     at91sam9261_pmc_setup);
> +
> +CLK_OF_DECLARE(at91sam9261_pmc, "atmel,at91sam9261-pmc", at91sam9261_pmc_setup);
>
>  static void __init at91sam9263_pmc_setup(struct device_node *np)
>  {
>         at91sam926x_pmc_setup(np, &at91sam9263_data);
>  }
> -CLK_OF_DECLARE_DRIVER(at91sam9263_pmc, "atmel,at91sam9263-pmc",
> -                     at91sam9263_pmc_setup);
> +
> +CLK_OF_DECLARE(at91sam9263_pmc, "atmel,at91sam9263-pmc", at91sam9263_pmc_setup);
>
>  static void __init at91sam9g20_pmc_setup(struct device_node *np)
>  {
>         at91sam926x_pmc_setup(np, &at91sam9g20_data);
>  }
> -CLK_OF_DECLARE_DRIVER(at91sam9g20_pmc, "atmel,at91sam9g20-pmc",
> -                     at91sam9g20_pmc_setup);
> +
> +CLK_OF_DECLARE(at91sam9g20_pmc, "atmel,at91sam9g20-pmc", at91sam9g20_pmc_setup);
> diff --git a/drivers/clk/at91/at91sam9g45.c b/drivers/clk/at91/at91sam9g45.c
> index 0214333dedd3..15da0dfe3ef2 100644
> --- a/drivers/clk/at91/at91sam9g45.c
> +++ b/drivers/clk/at91/at91sam9g45.c
> @@ -228,5 +228,4 @@ static void __init at91sam9g45_pmc_setup(struct device_node *np)
>   * The TCB is used as the clocksource so its clock is needed early. This means
>   * this can't be a platform driver.
>   */
> -CLK_OF_DECLARE_DRIVER(at91sam9g45_pmc, "atmel,at91sam9g45-pmc",
> -                     at91sam9g45_pmc_setup);
> +CLK_OF_DECLARE(at91sam9g45_pmc, "atmel,at91sam9g45-pmc", at91sam9g45_pmc_setup);
> diff --git a/drivers/clk/at91/at91sam9n12.c b/drivers/clk/at91/at91sam9n12.c
> index f9db5316a7f1..7fe435f4b46b 100644
> --- a/drivers/clk/at91/at91sam9n12.c
> +++ b/drivers/clk/at91/at91sam9n12.c
> @@ -255,5 +255,4 @@ static void __init at91sam9n12_pmc_setup(struct device_node *np)
>   * The TCB is used as the clocksource so its clock is needed early. This means
>   * this can't be a platform driver.
>   */
> -CLK_OF_DECLARE_DRIVER(at91sam9n12_pmc, "atmel,at91sam9n12-pmc",
> -                     at91sam9n12_pmc_setup);
> +CLK_OF_DECLARE(at91sam9n12_pmc, "atmel,at91sam9n12-pmc", at91sam9n12_pmc_setup);
> diff --git a/drivers/clk/at91/at91sam9rl.c b/drivers/clk/at91/at91sam9rl.c
> index 66736e03cfef..ecbabf5162bd 100644
> --- a/drivers/clk/at91/at91sam9rl.c
> +++ b/drivers/clk/at91/at91sam9rl.c
> @@ -186,4 +186,5 @@ static void __init at91sam9rl_pmc_setup(struct device_node *np)
>  err_free:
>         kfree(at91sam9rl_pmc);
>  }
> -CLK_OF_DECLARE_DRIVER(at91sam9rl_pmc, "atmel,at91sam9rl-pmc", at91sam9rl_pmc_setup);
> +
> +CLK_OF_DECLARE(at91sam9rl_pmc, "atmel,at91sam9rl-pmc", at91sam9rl_pmc_setup);
> diff --git a/drivers/clk/at91/at91sam9x5.c b/drivers/clk/at91/at91sam9x5.c
> index 79b9d3667228..5cce48c64ea2 100644
> --- a/drivers/clk/at91/at91sam9x5.c
> +++ b/drivers/clk/at91/at91sam9x5.c
> @@ -302,33 +302,33 @@ static void __init at91sam9g15_pmc_setup(struct device_node *np)
>  {
>         at91sam9x5_pmc_setup(np, at91sam9g15_periphck, true);
>  }
> -CLK_OF_DECLARE_DRIVER(at91sam9g15_pmc, "atmel,at91sam9g15-pmc",
> -                     at91sam9g15_pmc_setup);
> +
> +CLK_OF_DECLARE(at91sam9g15_pmc, "atmel,at91sam9g15-pmc", at91sam9g15_pmc_setup);
>
>  static void __init at91sam9g25_pmc_setup(struct device_node *np)
>  {
>         at91sam9x5_pmc_setup(np, at91sam9g25_periphck, false);
>  }
> -CLK_OF_DECLARE_DRIVER(at91sam9g25_pmc, "atmel,at91sam9g25-pmc",
> -                     at91sam9g25_pmc_setup);
> +
> +CLK_OF_DECLARE(at91sam9g25_pmc, "atmel,at91sam9g25-pmc", at91sam9g25_pmc_setup);
>
>  static void __init at91sam9g35_pmc_setup(struct device_node *np)
>  {
>         at91sam9x5_pmc_setup(np, at91sam9g35_periphck, true);
>  }
> -CLK_OF_DECLARE_DRIVER(at91sam9g35_pmc, "atmel,at91sam9g35-pmc",
> -                     at91sam9g35_pmc_setup);
> +
> +CLK_OF_DECLARE(at91sam9g35_pmc, "atmel,at91sam9g35-pmc", at91sam9g35_pmc_setup);
>
>  static void __init at91sam9x25_pmc_setup(struct device_node *np)
>  {
>         at91sam9x5_pmc_setup(np, at91sam9x25_periphck, false);
>  }
> -CLK_OF_DECLARE_DRIVER(at91sam9x25_pmc, "atmel,at91sam9x25-pmc",
> -                     at91sam9x25_pmc_setup);
> +
> +CLK_OF_DECLARE(at91sam9x25_pmc, "atmel,at91sam9x25-pmc", at91sam9x25_pmc_setup);
>
>  static void __init at91sam9x35_pmc_setup(struct device_node *np)
>  {
>         at91sam9x5_pmc_setup(np, at91sam9x35_periphck, true);
>  }
> -CLK_OF_DECLARE_DRIVER(at91sam9x35_pmc, "atmel,at91sam9x35-pmc",
> -                     at91sam9x35_pmc_setup);
> +
> +CLK_OF_DECLARE(at91sam9x35_pmc, "atmel,at91sam9x35-pmc", at91sam9x35_pmc_setup);
> diff --git a/drivers/clk/at91/sama5d2.c b/drivers/clk/at91/sama5d2.c
> index 9a5cbc7cd55a..3d1f78176c3e 100644
> --- a/drivers/clk/at91/sama5d2.c
> +++ b/drivers/clk/at91/sama5d2.c
> @@ -372,4 +372,5 @@ static void __init sama5d2_pmc_setup(struct device_node *np)
>  err_free:
>         kfree(sama5d2_pmc);
>  }
> -CLK_OF_DECLARE_DRIVER(sama5d2_pmc, "atmel,sama5d2-pmc", sama5d2_pmc_setup);
> +
> +CLK_OF_DECLARE(sama5d2_pmc, "atmel,sama5d2-pmc", sama5d2_pmc_setup);
> diff --git a/drivers/clk/at91/sama5d3.c b/drivers/clk/at91/sama5d3.c
> index 87009ee8effc..d376257807d2 100644
> --- a/drivers/clk/at91/sama5d3.c
> +++ b/drivers/clk/at91/sama5d3.c
> @@ -255,4 +255,4 @@ static void __init sama5d3_pmc_setup(struct device_node *np)
>   * The TCB is used as the clocksource so its clock is needed early. This means
>   * this can't be a platform driver.
>   */
> -CLK_OF_DECLARE_DRIVER(sama5d3_pmc, "atmel,sama5d3-pmc", sama5d3_pmc_setup);
> +CLK_OF_DECLARE(sama5d3_pmc, "atmel,sama5d3-pmc", sama5d3_pmc_setup);
> diff --git a/drivers/clk/at91/sama5d4.c b/drivers/clk/at91/sama5d4.c
> index 57fff790188b..5cbaac68da44 100644
> --- a/drivers/clk/at91/sama5d4.c
> +++ b/drivers/clk/at91/sama5d4.c
> @@ -286,4 +286,5 @@ static void __init sama5d4_pmc_setup(struct device_node *np)
>  err_free:
>         kfree(sama5d4_pmc);
>  }
> -CLK_OF_DECLARE_DRIVER(sama5d4_pmc, "atmel,sama5d4-pmc", sama5d4_pmc_setup);
> +
> +CLK_OF_DECLARE(sama5d4_pmc, "atmel,sama5d4-pmc", sama5d4_pmc_setup);
> --
Eugen Hristev Feb. 4, 2021, 12:46 p.m. UTC | #2
On 03.02.2021 20:15, Saravana Kannan wrote:
> On Wed, Feb 3, 2021 at 7:43 AM Tudor Ambarus
> <tudor.ambarus@microchip.com> wrote:
>>
>> These are all "early clocks" that require initialization just at
>> of_clk_init() time. Use CLK_OF_DECLARE() to declare them.
>>
>> This also fixes a problem that was spotted when fw_devlink was
>> set to 'on' by default: the boards failed to boot. The reason is
>> that CLK_OF_DECLARE_DRIVER() clears the OF_POPULATED and causes
>> the consumers of the clock to be postponed by fw_devlink until
>> the second initialization routine of the clock has been completed.
>> One of the consumers of the clock is the timer, which is used as a
>> clocksource, and needs the clock initialized early. Postponing the
>> timers caused the fail at boot.
>>
>> Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
> 
> Thanks Tudor!
> Acked-by: Saravana Kannan <saravanak@google.com>
> 
> -Saravana
> 
>> ---
>> Tested on sama5d2_xplained.
>>

For sama5d3_xplained, sama5d4_xplained,
Tested-by: Eugen Hristev <eugen.hristev@microchip.com>
Nicolas Ferre Feb. 4, 2021, 1:54 p.m. UTC | #3
On 03/02/2021 at 16:43, Tudor Ambarus wrote:
> These are all "early clocks" that require initialization just at
> of_clk_init() time. Use CLK_OF_DECLARE() to declare them.
> 
> This also fixes a problem that was spotted when fw_devlink was
> set to 'on' by default: the boards failed to boot. The reason is
> that CLK_OF_DECLARE_DRIVER() clears the OF_POPULATED and causes
> the consumers of the clock to be postponed by fw_devlink until
> the second initialization routine of the clock has been completed.
> One of the consumers of the clock is the timer, which is used as a
> clocksource, and needs the clock initialized early. Postponing the
> timers caused the fail at boot.
> 
> Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>

Looks good to me:
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>

Thanks for the fix Tudor! Best regards,
   Nicolas

> ---
> Tested on sama5d2_xplained.
> 
>   drivers/clk/at91/at91rm9200.c  |  3 +--
>   drivers/clk/at91/at91sam9260.c | 16 ++++++++--------
>   drivers/clk/at91/at91sam9g45.c |  3 +--
>   drivers/clk/at91/at91sam9n12.c |  3 +--
>   drivers/clk/at91/at91sam9rl.c  |  3 ++-
>   drivers/clk/at91/at91sam9x5.c  | 20 ++++++++++----------
>   drivers/clk/at91/sama5d2.c     |  3 ++-
>   drivers/clk/at91/sama5d3.c     |  2 +-
>   drivers/clk/at91/sama5d4.c     |  3 ++-
>   9 files changed, 28 insertions(+), 28 deletions(-)
> 
> diff --git a/drivers/clk/at91/at91rm9200.c b/drivers/clk/at91/at91rm9200.c
> index 0fad1009f315..428a6f4b9ebc 100644
> --- a/drivers/clk/at91/at91rm9200.c
> +++ b/drivers/clk/at91/at91rm9200.c
> @@ -215,5 +215,4 @@ static void __init at91rm9200_pmc_setup(struct device_node *np)
>    * deferring properly. Once this is fixed, this can be switched to a platform
>    * driver.
>    */
> -CLK_OF_DECLARE_DRIVER(at91rm9200_pmc, "atmel,at91rm9200-pmc",
> -		      at91rm9200_pmc_setup);
> +CLK_OF_DECLARE(at91rm9200_pmc, "atmel,at91rm9200-pmc", at91rm9200_pmc_setup);
> diff --git a/drivers/clk/at91/at91sam9260.c b/drivers/clk/at91/at91sam9260.c
> index ceb5495f723a..b29843bea278 100644
> --- a/drivers/clk/at91/at91sam9260.c
> +++ b/drivers/clk/at91/at91sam9260.c
> @@ -491,26 +491,26 @@ static void __init at91sam9260_pmc_setup(struct device_node *np)
>   {
>   	at91sam926x_pmc_setup(np, &at91sam9260_data);
>   }
> -CLK_OF_DECLARE_DRIVER(at91sam9260_pmc, "atmel,at91sam9260-pmc",
> -		      at91sam9260_pmc_setup);
> +
> +CLK_OF_DECLARE(at91sam9260_pmc, "atmel,at91sam9260-pmc", at91sam9260_pmc_setup);
>   
>   static void __init at91sam9261_pmc_setup(struct device_node *np)
>   {
>   	at91sam926x_pmc_setup(np, &at91sam9261_data);
>   }
> -CLK_OF_DECLARE_DRIVER(at91sam9261_pmc, "atmel,at91sam9261-pmc",
> -		      at91sam9261_pmc_setup);
> +
> +CLK_OF_DECLARE(at91sam9261_pmc, "atmel,at91sam9261-pmc", at91sam9261_pmc_setup);
>   
>   static void __init at91sam9263_pmc_setup(struct device_node *np)
>   {
>   	at91sam926x_pmc_setup(np, &at91sam9263_data);
>   }
> -CLK_OF_DECLARE_DRIVER(at91sam9263_pmc, "atmel,at91sam9263-pmc",
> -		      at91sam9263_pmc_setup);
> +
> +CLK_OF_DECLARE(at91sam9263_pmc, "atmel,at91sam9263-pmc", at91sam9263_pmc_setup);
>   
>   static void __init at91sam9g20_pmc_setup(struct device_node *np)
>   {
>   	at91sam926x_pmc_setup(np, &at91sam9g20_data);
>   }
> -CLK_OF_DECLARE_DRIVER(at91sam9g20_pmc, "atmel,at91sam9g20-pmc",
> -		      at91sam9g20_pmc_setup);
> +
> +CLK_OF_DECLARE(at91sam9g20_pmc, "atmel,at91sam9g20-pmc", at91sam9g20_pmc_setup);
> diff --git a/drivers/clk/at91/at91sam9g45.c b/drivers/clk/at91/at91sam9g45.c
> index 0214333dedd3..15da0dfe3ef2 100644
> --- a/drivers/clk/at91/at91sam9g45.c
> +++ b/drivers/clk/at91/at91sam9g45.c
> @@ -228,5 +228,4 @@ static void __init at91sam9g45_pmc_setup(struct device_node *np)
>    * The TCB is used as the clocksource so its clock is needed early. This means
>    * this can't be a platform driver.
>    */
> -CLK_OF_DECLARE_DRIVER(at91sam9g45_pmc, "atmel,at91sam9g45-pmc",
> -		      at91sam9g45_pmc_setup);
> +CLK_OF_DECLARE(at91sam9g45_pmc, "atmel,at91sam9g45-pmc", at91sam9g45_pmc_setup);
> diff --git a/drivers/clk/at91/at91sam9n12.c b/drivers/clk/at91/at91sam9n12.c
> index f9db5316a7f1..7fe435f4b46b 100644
> --- a/drivers/clk/at91/at91sam9n12.c
> +++ b/drivers/clk/at91/at91sam9n12.c
> @@ -255,5 +255,4 @@ static void __init at91sam9n12_pmc_setup(struct device_node *np)
>    * The TCB is used as the clocksource so its clock is needed early. This means
>    * this can't be a platform driver.
>    */
> -CLK_OF_DECLARE_DRIVER(at91sam9n12_pmc, "atmel,at91sam9n12-pmc",
> -		      at91sam9n12_pmc_setup);
> +CLK_OF_DECLARE(at91sam9n12_pmc, "atmel,at91sam9n12-pmc", at91sam9n12_pmc_setup);
> diff --git a/drivers/clk/at91/at91sam9rl.c b/drivers/clk/at91/at91sam9rl.c
> index 66736e03cfef..ecbabf5162bd 100644
> --- a/drivers/clk/at91/at91sam9rl.c
> +++ b/drivers/clk/at91/at91sam9rl.c
> @@ -186,4 +186,5 @@ static void __init at91sam9rl_pmc_setup(struct device_node *np)
>   err_free:
>   	kfree(at91sam9rl_pmc);
>   }
> -CLK_OF_DECLARE_DRIVER(at91sam9rl_pmc, "atmel,at91sam9rl-pmc", at91sam9rl_pmc_setup);
> +
> +CLK_OF_DECLARE(at91sam9rl_pmc, "atmel,at91sam9rl-pmc", at91sam9rl_pmc_setup);
> diff --git a/drivers/clk/at91/at91sam9x5.c b/drivers/clk/at91/at91sam9x5.c
> index 79b9d3667228..5cce48c64ea2 100644
> --- a/drivers/clk/at91/at91sam9x5.c
> +++ b/drivers/clk/at91/at91sam9x5.c
> @@ -302,33 +302,33 @@ static void __init at91sam9g15_pmc_setup(struct device_node *np)
>   {
>   	at91sam9x5_pmc_setup(np, at91sam9g15_periphck, true);
>   }
> -CLK_OF_DECLARE_DRIVER(at91sam9g15_pmc, "atmel,at91sam9g15-pmc",
> -		      at91sam9g15_pmc_setup);
> +
> +CLK_OF_DECLARE(at91sam9g15_pmc, "atmel,at91sam9g15-pmc", at91sam9g15_pmc_setup);
>   
>   static void __init at91sam9g25_pmc_setup(struct device_node *np)
>   {
>   	at91sam9x5_pmc_setup(np, at91sam9g25_periphck, false);
>   }
> -CLK_OF_DECLARE_DRIVER(at91sam9g25_pmc, "atmel,at91sam9g25-pmc",
> -		      at91sam9g25_pmc_setup);
> +
> +CLK_OF_DECLARE(at91sam9g25_pmc, "atmel,at91sam9g25-pmc", at91sam9g25_pmc_setup);
>   
>   static void __init at91sam9g35_pmc_setup(struct device_node *np)
>   {
>   	at91sam9x5_pmc_setup(np, at91sam9g35_periphck, true);
>   }
> -CLK_OF_DECLARE_DRIVER(at91sam9g35_pmc, "atmel,at91sam9g35-pmc",
> -		      at91sam9g35_pmc_setup);
> +
> +CLK_OF_DECLARE(at91sam9g35_pmc, "atmel,at91sam9g35-pmc", at91sam9g35_pmc_setup);
>   
>   static void __init at91sam9x25_pmc_setup(struct device_node *np)
>   {
>   	at91sam9x5_pmc_setup(np, at91sam9x25_periphck, false);
>   }
> -CLK_OF_DECLARE_DRIVER(at91sam9x25_pmc, "atmel,at91sam9x25-pmc",
> -		      at91sam9x25_pmc_setup);
> +
> +CLK_OF_DECLARE(at91sam9x25_pmc, "atmel,at91sam9x25-pmc", at91sam9x25_pmc_setup);
>   
>   static void __init at91sam9x35_pmc_setup(struct device_node *np)
>   {
>   	at91sam9x5_pmc_setup(np, at91sam9x35_periphck, true);
>   }
> -CLK_OF_DECLARE_DRIVER(at91sam9x35_pmc, "atmel,at91sam9x35-pmc",
> -		      at91sam9x35_pmc_setup);
> +
> +CLK_OF_DECLARE(at91sam9x35_pmc, "atmel,at91sam9x35-pmc", at91sam9x35_pmc_setup);
> diff --git a/drivers/clk/at91/sama5d2.c b/drivers/clk/at91/sama5d2.c
> index 9a5cbc7cd55a..3d1f78176c3e 100644
> --- a/drivers/clk/at91/sama5d2.c
> +++ b/drivers/clk/at91/sama5d2.c
> @@ -372,4 +372,5 @@ static void __init sama5d2_pmc_setup(struct device_node *np)
>   err_free:
>   	kfree(sama5d2_pmc);
>   }
> -CLK_OF_DECLARE_DRIVER(sama5d2_pmc, "atmel,sama5d2-pmc", sama5d2_pmc_setup);
> +
> +CLK_OF_DECLARE(sama5d2_pmc, "atmel,sama5d2-pmc", sama5d2_pmc_setup);
> diff --git a/drivers/clk/at91/sama5d3.c b/drivers/clk/at91/sama5d3.c
> index 87009ee8effc..d376257807d2 100644
> --- a/drivers/clk/at91/sama5d3.c
> +++ b/drivers/clk/at91/sama5d3.c
> @@ -255,4 +255,4 @@ static void __init sama5d3_pmc_setup(struct device_node *np)
>    * The TCB is used as the clocksource so its clock is needed early. This means
>    * this can't be a platform driver.
>    */
> -CLK_OF_DECLARE_DRIVER(sama5d3_pmc, "atmel,sama5d3-pmc", sama5d3_pmc_setup);
> +CLK_OF_DECLARE(sama5d3_pmc, "atmel,sama5d3-pmc", sama5d3_pmc_setup);
> diff --git a/drivers/clk/at91/sama5d4.c b/drivers/clk/at91/sama5d4.c
> index 57fff790188b..5cbaac68da44 100644
> --- a/drivers/clk/at91/sama5d4.c
> +++ b/drivers/clk/at91/sama5d4.c
> @@ -286,4 +286,5 @@ static void __init sama5d4_pmc_setup(struct device_node *np)
>   err_free:
>   	kfree(sama5d4_pmc);
>   }
> -CLK_OF_DECLARE_DRIVER(sama5d4_pmc, "atmel,sama5d4-pmc", sama5d4_pmc_setup);
> +
> +CLK_OF_DECLARE(sama5d4_pmc, "atmel,sama5d4-pmc", sama5d4_pmc_setup);
>
Tudor Ambarus Feb. 8, 2021, 9:49 a.m. UTC | #4
Hi, Michael, Stephen,

Do you plan to take this patch for v5.12?
If fw_devlink will remain set to ON for v5.12, some of our boards will
no longer boot without this patch.

Cheers,
ta

On 2/3/21 5:43 PM, Tudor Ambarus wrote:
> These are all "early clocks" that require initialization just at
> of_clk_init() time. Use CLK_OF_DECLARE() to declare them.
> 
> This also fixes a problem that was spotted when fw_devlink was
> set to 'on' by default: the boards failed to boot. The reason is
> that CLK_OF_DECLARE_DRIVER() clears the OF_POPULATED and causes
> the consumers of the clock to be postponed by fw_devlink until
> the second initialization routine of the clock has been completed.
> One of the consumers of the clock is the timer, which is used as a
> clocksource, and needs the clock initialized early. Postponing the
> timers caused the fail at boot.
> 
> Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
> ---
> Tested on sama5d2_xplained.
> 
>  drivers/clk/at91/at91rm9200.c  |  3 +--
>  drivers/clk/at91/at91sam9260.c | 16 ++++++++--------
>  drivers/clk/at91/at91sam9g45.c |  3 +--
>  drivers/clk/at91/at91sam9n12.c |  3 +--
>  drivers/clk/at91/at91sam9rl.c  |  3 ++-
>  drivers/clk/at91/at91sam9x5.c  | 20 ++++++++++----------
>  drivers/clk/at91/sama5d2.c     |  3 ++-
>  drivers/clk/at91/sama5d3.c     |  2 +-
>  drivers/clk/at91/sama5d4.c     |  3 ++-
>  9 files changed, 28 insertions(+), 28 deletions(-)
> 
> diff --git a/drivers/clk/at91/at91rm9200.c b/drivers/clk/at91/at91rm9200.c
> index 0fad1009f315..428a6f4b9ebc 100644
> --- a/drivers/clk/at91/at91rm9200.c
> +++ b/drivers/clk/at91/at91rm9200.c
> @@ -215,5 +215,4 @@ static void __init at91rm9200_pmc_setup(struct device_node *np)
>   * deferring properly. Once this is fixed, this can be switched to a platform
>   * driver.
>   */
> -CLK_OF_DECLARE_DRIVER(at91rm9200_pmc, "atmel,at91rm9200-pmc",
> -		      at91rm9200_pmc_setup);
> +CLK_OF_DECLARE(at91rm9200_pmc, "atmel,at91rm9200-pmc", at91rm9200_pmc_setup);
> diff --git a/drivers/clk/at91/at91sam9260.c b/drivers/clk/at91/at91sam9260.c
> index ceb5495f723a..b29843bea278 100644
> --- a/drivers/clk/at91/at91sam9260.c
> +++ b/drivers/clk/at91/at91sam9260.c
> @@ -491,26 +491,26 @@ static void __init at91sam9260_pmc_setup(struct device_node *np)
>  {
>  	at91sam926x_pmc_setup(np, &at91sam9260_data);
>  }
> -CLK_OF_DECLARE_DRIVER(at91sam9260_pmc, "atmel,at91sam9260-pmc",
> -		      at91sam9260_pmc_setup);
> +
> +CLK_OF_DECLARE(at91sam9260_pmc, "atmel,at91sam9260-pmc", at91sam9260_pmc_setup);
>  
>  static void __init at91sam9261_pmc_setup(struct device_node *np)
>  {
>  	at91sam926x_pmc_setup(np, &at91sam9261_data);
>  }
> -CLK_OF_DECLARE_DRIVER(at91sam9261_pmc, "atmel,at91sam9261-pmc",
> -		      at91sam9261_pmc_setup);
> +
> +CLK_OF_DECLARE(at91sam9261_pmc, "atmel,at91sam9261-pmc", at91sam9261_pmc_setup);
>  
>  static void __init at91sam9263_pmc_setup(struct device_node *np)
>  {
>  	at91sam926x_pmc_setup(np, &at91sam9263_data);
>  }
> -CLK_OF_DECLARE_DRIVER(at91sam9263_pmc, "atmel,at91sam9263-pmc",
> -		      at91sam9263_pmc_setup);
> +
> +CLK_OF_DECLARE(at91sam9263_pmc, "atmel,at91sam9263-pmc", at91sam9263_pmc_setup);
>  
>  static void __init at91sam9g20_pmc_setup(struct device_node *np)
>  {
>  	at91sam926x_pmc_setup(np, &at91sam9g20_data);
>  }
> -CLK_OF_DECLARE_DRIVER(at91sam9g20_pmc, "atmel,at91sam9g20-pmc",
> -		      at91sam9g20_pmc_setup);
> +
> +CLK_OF_DECLARE(at91sam9g20_pmc, "atmel,at91sam9g20-pmc", at91sam9g20_pmc_setup);
> diff --git a/drivers/clk/at91/at91sam9g45.c b/drivers/clk/at91/at91sam9g45.c
> index 0214333dedd3..15da0dfe3ef2 100644
> --- a/drivers/clk/at91/at91sam9g45.c
> +++ b/drivers/clk/at91/at91sam9g45.c
> @@ -228,5 +228,4 @@ static void __init at91sam9g45_pmc_setup(struct device_node *np)
>   * The TCB is used as the clocksource so its clock is needed early. This means
>   * this can't be a platform driver.
>   */
> -CLK_OF_DECLARE_DRIVER(at91sam9g45_pmc, "atmel,at91sam9g45-pmc",
> -		      at91sam9g45_pmc_setup);
> +CLK_OF_DECLARE(at91sam9g45_pmc, "atmel,at91sam9g45-pmc", at91sam9g45_pmc_setup);
> diff --git a/drivers/clk/at91/at91sam9n12.c b/drivers/clk/at91/at91sam9n12.c
> index f9db5316a7f1..7fe435f4b46b 100644
> --- a/drivers/clk/at91/at91sam9n12.c
> +++ b/drivers/clk/at91/at91sam9n12.c
> @@ -255,5 +255,4 @@ static void __init at91sam9n12_pmc_setup(struct device_node *np)
>   * The TCB is used as the clocksource so its clock is needed early. This means
>   * this can't be a platform driver.
>   */
> -CLK_OF_DECLARE_DRIVER(at91sam9n12_pmc, "atmel,at91sam9n12-pmc",
> -		      at91sam9n12_pmc_setup);
> +CLK_OF_DECLARE(at91sam9n12_pmc, "atmel,at91sam9n12-pmc", at91sam9n12_pmc_setup);
> diff --git a/drivers/clk/at91/at91sam9rl.c b/drivers/clk/at91/at91sam9rl.c
> index 66736e03cfef..ecbabf5162bd 100644
> --- a/drivers/clk/at91/at91sam9rl.c
> +++ b/drivers/clk/at91/at91sam9rl.c
> @@ -186,4 +186,5 @@ static void __init at91sam9rl_pmc_setup(struct device_node *np)
>  err_free:
>  	kfree(at91sam9rl_pmc);
>  }
> -CLK_OF_DECLARE_DRIVER(at91sam9rl_pmc, "atmel,at91sam9rl-pmc", at91sam9rl_pmc_setup);
> +
> +CLK_OF_DECLARE(at91sam9rl_pmc, "atmel,at91sam9rl-pmc", at91sam9rl_pmc_setup);
> diff --git a/drivers/clk/at91/at91sam9x5.c b/drivers/clk/at91/at91sam9x5.c
> index 79b9d3667228..5cce48c64ea2 100644
> --- a/drivers/clk/at91/at91sam9x5.c
> +++ b/drivers/clk/at91/at91sam9x5.c
> @@ -302,33 +302,33 @@ static void __init at91sam9g15_pmc_setup(struct device_node *np)
>  {
>  	at91sam9x5_pmc_setup(np, at91sam9g15_periphck, true);
>  }
> -CLK_OF_DECLARE_DRIVER(at91sam9g15_pmc, "atmel,at91sam9g15-pmc",
> -		      at91sam9g15_pmc_setup);
> +
> +CLK_OF_DECLARE(at91sam9g15_pmc, "atmel,at91sam9g15-pmc", at91sam9g15_pmc_setup);
>  
>  static void __init at91sam9g25_pmc_setup(struct device_node *np)
>  {
>  	at91sam9x5_pmc_setup(np, at91sam9g25_periphck, false);
>  }
> -CLK_OF_DECLARE_DRIVER(at91sam9g25_pmc, "atmel,at91sam9g25-pmc",
> -		      at91sam9g25_pmc_setup);
> +
> +CLK_OF_DECLARE(at91sam9g25_pmc, "atmel,at91sam9g25-pmc", at91sam9g25_pmc_setup);
>  
>  static void __init at91sam9g35_pmc_setup(struct device_node *np)
>  {
>  	at91sam9x5_pmc_setup(np, at91sam9g35_periphck, true);
>  }
> -CLK_OF_DECLARE_DRIVER(at91sam9g35_pmc, "atmel,at91sam9g35-pmc",
> -		      at91sam9g35_pmc_setup);
> +
> +CLK_OF_DECLARE(at91sam9g35_pmc, "atmel,at91sam9g35-pmc", at91sam9g35_pmc_setup);
>  
>  static void __init at91sam9x25_pmc_setup(struct device_node *np)
>  {
>  	at91sam9x5_pmc_setup(np, at91sam9x25_periphck, false);
>  }
> -CLK_OF_DECLARE_DRIVER(at91sam9x25_pmc, "atmel,at91sam9x25-pmc",
> -		      at91sam9x25_pmc_setup);
> +
> +CLK_OF_DECLARE(at91sam9x25_pmc, "atmel,at91sam9x25-pmc", at91sam9x25_pmc_setup);
>  
>  static void __init at91sam9x35_pmc_setup(struct device_node *np)
>  {
>  	at91sam9x5_pmc_setup(np, at91sam9x35_periphck, true);
>  }
> -CLK_OF_DECLARE_DRIVER(at91sam9x35_pmc, "atmel,at91sam9x35-pmc",
> -		      at91sam9x35_pmc_setup);
> +
> +CLK_OF_DECLARE(at91sam9x35_pmc, "atmel,at91sam9x35-pmc", at91sam9x35_pmc_setup);
> diff --git a/drivers/clk/at91/sama5d2.c b/drivers/clk/at91/sama5d2.c
> index 9a5cbc7cd55a..3d1f78176c3e 100644
> --- a/drivers/clk/at91/sama5d2.c
> +++ b/drivers/clk/at91/sama5d2.c
> @@ -372,4 +372,5 @@ static void __init sama5d2_pmc_setup(struct device_node *np)
>  err_free:
>  	kfree(sama5d2_pmc);
>  }
> -CLK_OF_DECLARE_DRIVER(sama5d2_pmc, "atmel,sama5d2-pmc", sama5d2_pmc_setup);
> +
> +CLK_OF_DECLARE(sama5d2_pmc, "atmel,sama5d2-pmc", sama5d2_pmc_setup);
> diff --git a/drivers/clk/at91/sama5d3.c b/drivers/clk/at91/sama5d3.c
> index 87009ee8effc..d376257807d2 100644
> --- a/drivers/clk/at91/sama5d3.c
> +++ b/drivers/clk/at91/sama5d3.c
> @@ -255,4 +255,4 @@ static void __init sama5d3_pmc_setup(struct device_node *np)
>   * The TCB is used as the clocksource so its clock is needed early. This means
>   * this can't be a platform driver.
>   */
> -CLK_OF_DECLARE_DRIVER(sama5d3_pmc, "atmel,sama5d3-pmc", sama5d3_pmc_setup);
> +CLK_OF_DECLARE(sama5d3_pmc, "atmel,sama5d3-pmc", sama5d3_pmc_setup);
> diff --git a/drivers/clk/at91/sama5d4.c b/drivers/clk/at91/sama5d4.c
> index 57fff790188b..5cbaac68da44 100644
> --- a/drivers/clk/at91/sama5d4.c
> +++ b/drivers/clk/at91/sama5d4.c
> @@ -286,4 +286,5 @@ static void __init sama5d4_pmc_setup(struct device_node *np)
>  err_free:
>  	kfree(sama5d4_pmc);
>  }
> -CLK_OF_DECLARE_DRIVER(sama5d4_pmc, "atmel,sama5d4-pmc", sama5d4_pmc_setup);
> +
> +CLK_OF_DECLARE(sama5d4_pmc, "atmel,sama5d4-pmc", sama5d4_pmc_setup);
>
Stephen Boyd Feb. 10, 2021, 12:54 a.m. UTC | #5
Quoting Tudor.Ambarus@microchip.com (2021-02-08 01:49:45)
> Hi, Michael, Stephen,
> 
> Do you plan to take this patch for v5.12?
> If fw_devlink will remain set to ON for v5.12, some of our boards will
> no longer boot without this patch.

Is fw_devlink defaulted to on for v5.12?
Stephen Boyd Feb. 10, 2021, 12:56 a.m. UTC | #6
Quoting Tudor Ambarus (2021-02-03 07:43:32)
> These are all "early clocks" that require initialization just at
> of_clk_init() time. Use CLK_OF_DECLARE() to declare them.
> 
> This also fixes a problem that was spotted when fw_devlink was
> set to 'on' by default: the boards failed to boot. The reason is
> that CLK_OF_DECLARE_DRIVER() clears the OF_POPULATED and causes
> the consumers of the clock to be postponed by fw_devlink until
> the second initialization routine of the clock has been completed.
> One of the consumers of the clock is the timer, which is used as a
> clocksource, and needs the clock initialized early. Postponing the
> timers caused the fail at boot.
> 
> Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
> ---

Applied to clk-next
Saravana Kannan Feb. 10, 2021, 12:56 a.m. UTC | #7
On Tue, Feb 9, 2021 at 4:54 PM Stephen Boyd <sboyd@kernel.org> wrote:
>
> Quoting Tudor.Ambarus@microchip.com (2021-02-08 01:49:45)
> > Hi, Michael, Stephen,
> >
> > Do you plan to take this patch for v5.12?
> > If fw_devlink will remain set to ON for v5.12, some of our boards will
> > no longer boot without this patch.
>
> Is fw_devlink defaulted to on for v5.12?

Yes.

-Saravana
Geert Uytterhoeven Feb. 10, 2021, 8:51 a.m. UTC | #8
Hi Saravana,

On Wed, Feb 10, 2021 at 1:57 AM Saravana Kannan <saravanak@google.com> wrote:
> On Tue, Feb 9, 2021 at 4:54 PM Stephen Boyd <sboyd@kernel.org> wrote:
> > Quoting Tudor.Ambarus@microchip.com (2021-02-08 01:49:45)
> > > Do you plan to take this patch for v5.12?
> > > If fw_devlink will remain set to ON for v5.12, some of our boards will
> > > no longer boot without this patch.
> >
> > Is fw_devlink defaulted to on for v5.12?
>
> Yes.

Have all issues been identified and understood?
Have all issues been fixed, reviewed, and committed?
Have all fixes entered linux-next?
Have all fixes been migrated from submaintainers to maintainers?

We're already at v5.11-rc7.
Yes, we can get fixes into v5.12-rc7. Or v5.12-rc9...

Gr{oetje,eeting}s,

                        Geert


--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Saravana Kannan Feb. 10, 2021, 8:57 a.m. UTC | #9
On Wed, Feb 10, 2021 at 12:51 AM Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
>
> Hi Saravana,
>
> On Wed, Feb 10, 2021 at 1:57 AM Saravana Kannan <saravanak@google.com> wrote:
> > On Tue, Feb 9, 2021 at 4:54 PM Stephen Boyd <sboyd@kernel.org> wrote:
> > > Quoting Tudor.Ambarus@microchip.com (2021-02-08 01:49:45)
> > > > Do you plan to take this patch for v5.12?
> > > > If fw_devlink will remain set to ON for v5.12, some of our boards will
> > > > no longer boot without this patch.
> > >
> > > Is fw_devlink defaulted to on for v5.12?
> >
> > Yes.
>
> Have all issues been identified and understood?
> Have all issues been fixed, reviewed, and committed?
> Have all fixes entered linux-next?
> Have all fixes been migrated from submaintainers to maintainers?

I'm hoping Tudor has reported and the fixes that have gone in so far
addressed all his issues. Otherwise, they need to be reported so we
can fix them.

As of now, there's no pending fix that hasn't landed in maintainer
trees. So that's good.

-Saravana

>
> We're already at v5.11-rc7.
> Yes, we can get fixes into v5.12-rc7. Or v5.12-rc9...
>
> Gr{oetje,eeting}s,
>
>                         Geert
>
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                 -- Linus Torvalds
Greg KH Feb. 10, 2021, 9 a.m. UTC | #10
On Wed, Feb 10, 2021 at 09:51:14AM +0100, Geert Uytterhoeven wrote:
> Hi Saravana,
> 
> On Wed, Feb 10, 2021 at 1:57 AM Saravana Kannan <saravanak@google.com> wrote:
> > On Tue, Feb 9, 2021 at 4:54 PM Stephen Boyd <sboyd@kernel.org> wrote:
> > > Quoting Tudor.Ambarus@microchip.com (2021-02-08 01:49:45)
> > > > Do you plan to take this patch for v5.12?
> > > > If fw_devlink will remain set to ON for v5.12, some of our boards will
> > > > no longer boot without this patch.
> > >
> > > Is fw_devlink defaulted to on for v5.12?
> >
> > Yes.
> 
> Have all issues been identified and understood?
> Have all issues been fixed, reviewed, and committed?
> Have all fixes entered linux-next?
> Have all fixes been migrated from submaintainers to maintainers?
> 
> We're already at v5.11-rc7.
> Yes, we can get fixes into v5.12-rc7. Or v5.12-rc9...

Yeah, I'm leaning toward not making it the default for 5.12-rc1 because
not everything seems to be working, let's see how the rest of the week
goes...

thanks,

greg k-h
Geert Uytterhoeven Feb. 10, 2021, 9:10 a.m. UTC | #11
Hi Saravana,

On Wed, Feb 10, 2021 at 9:57 AM Saravana Kannan <saravanak@google.com> wrote:
> On Wed, Feb 10, 2021 at 12:51 AM Geert Uytterhoeven
> <geert@linux-m68k.org> wrote:
> > On Wed, Feb 10, 2021 at 1:57 AM Saravana Kannan <saravanak@google.com> wrote:
> > > On Tue, Feb 9, 2021 at 4:54 PM Stephen Boyd <sboyd@kernel.org> wrote:
> > > > Quoting Tudor.Ambarus@microchip.com (2021-02-08 01:49:45)
> > > > > Do you plan to take this patch for v5.12?
> > > > > If fw_devlink will remain set to ON for v5.12, some of our boards will
> > > > > no longer boot without this patch.
> > > >
> > > > Is fw_devlink defaulted to on for v5.12?
> > >
> > > Yes.
> >
> > Have all issues been identified and understood?
> > Have all issues been fixed, reviewed, and committed?
> > Have all fixes entered linux-next?
> > Have all fixes been migrated from submaintainers to maintainers?
>
> I'm hoping Tudor has reported and the fixes that have gone in so far
> addressed all his issues. Otherwise, they need to be reported so we
> can fix them.
>
> As of now, there's no pending fix that hasn't landed in maintainer
> trees. So that's good.

You're talking about driver core fixes.
What about driver fixes? E.g. pull request for (arm-)soc should be
srnt before -rc6.

Gr{oetje,eeting}s,

                        Geert
Rob Herring (Arm) Feb. 10, 2021, 4:22 p.m. UTC | #12
On Wed, Feb 10, 2021 at 10:00:14AM +0100, Greg Kroah-Hartman wrote:
> On Wed, Feb 10, 2021 at 09:51:14AM +0100, Geert Uytterhoeven wrote:
> > Hi Saravana,
> > 
> > On Wed, Feb 10, 2021 at 1:57 AM Saravana Kannan <saravanak@google.com> wrote:
> > > On Tue, Feb 9, 2021 at 4:54 PM Stephen Boyd <sboyd@kernel.org> wrote:
> > > > Quoting Tudor.Ambarus@microchip.com (2021-02-08 01:49:45)
> > > > > Do you plan to take this patch for v5.12?
> > > > > If fw_devlink will remain set to ON for v5.12, some of our boards will
> > > > > no longer boot without this patch.
> > > >
> > > > Is fw_devlink defaulted to on for v5.12?
> > >
> > > Yes.
> > 
> > Have all issues been identified and understood?
> > Have all issues been fixed, reviewed, and committed?
> > Have all fixes entered linux-next?
> > Have all fixes been migrated from submaintainers to maintainers?

This can never be true for these types of per platform issues. There are 
folks that test linux-next Then there are ones that test rc1. And 
(unfortunately) so-on ending at testing only LTS releases.

> > We're already at v5.11-rc7.
> > Yes, we can get fixes into v5.12-rc7. Or v5.12-rc9...
> 
> Yeah, I'm leaning toward not making it the default for 5.12-rc1 because
> not everything seems to be working, let's see how the rest of the week
> goes...

I think there's some value waiting until after rc1 to turn off if just 
to find a few more issues.

Rob
diff mbox series

Patch

diff --git a/drivers/clk/at91/at91rm9200.c b/drivers/clk/at91/at91rm9200.c
index 0fad1009f315..428a6f4b9ebc 100644
--- a/drivers/clk/at91/at91rm9200.c
+++ b/drivers/clk/at91/at91rm9200.c
@@ -215,5 +215,4 @@  static void __init at91rm9200_pmc_setup(struct device_node *np)
  * deferring properly. Once this is fixed, this can be switched to a platform
  * driver.
  */
-CLK_OF_DECLARE_DRIVER(at91rm9200_pmc, "atmel,at91rm9200-pmc",
-		      at91rm9200_pmc_setup);
+CLK_OF_DECLARE(at91rm9200_pmc, "atmel,at91rm9200-pmc", at91rm9200_pmc_setup);
diff --git a/drivers/clk/at91/at91sam9260.c b/drivers/clk/at91/at91sam9260.c
index ceb5495f723a..b29843bea278 100644
--- a/drivers/clk/at91/at91sam9260.c
+++ b/drivers/clk/at91/at91sam9260.c
@@ -491,26 +491,26 @@  static void __init at91sam9260_pmc_setup(struct device_node *np)
 {
 	at91sam926x_pmc_setup(np, &at91sam9260_data);
 }
-CLK_OF_DECLARE_DRIVER(at91sam9260_pmc, "atmel,at91sam9260-pmc",
-		      at91sam9260_pmc_setup);
+
+CLK_OF_DECLARE(at91sam9260_pmc, "atmel,at91sam9260-pmc", at91sam9260_pmc_setup);
 
 static void __init at91sam9261_pmc_setup(struct device_node *np)
 {
 	at91sam926x_pmc_setup(np, &at91sam9261_data);
 }
-CLK_OF_DECLARE_DRIVER(at91sam9261_pmc, "atmel,at91sam9261-pmc",
-		      at91sam9261_pmc_setup);
+
+CLK_OF_DECLARE(at91sam9261_pmc, "atmel,at91sam9261-pmc", at91sam9261_pmc_setup);
 
 static void __init at91sam9263_pmc_setup(struct device_node *np)
 {
 	at91sam926x_pmc_setup(np, &at91sam9263_data);
 }
-CLK_OF_DECLARE_DRIVER(at91sam9263_pmc, "atmel,at91sam9263-pmc",
-		      at91sam9263_pmc_setup);
+
+CLK_OF_DECLARE(at91sam9263_pmc, "atmel,at91sam9263-pmc", at91sam9263_pmc_setup);
 
 static void __init at91sam9g20_pmc_setup(struct device_node *np)
 {
 	at91sam926x_pmc_setup(np, &at91sam9g20_data);
 }
-CLK_OF_DECLARE_DRIVER(at91sam9g20_pmc, "atmel,at91sam9g20-pmc",
-		      at91sam9g20_pmc_setup);
+
+CLK_OF_DECLARE(at91sam9g20_pmc, "atmel,at91sam9g20-pmc", at91sam9g20_pmc_setup);
diff --git a/drivers/clk/at91/at91sam9g45.c b/drivers/clk/at91/at91sam9g45.c
index 0214333dedd3..15da0dfe3ef2 100644
--- a/drivers/clk/at91/at91sam9g45.c
+++ b/drivers/clk/at91/at91sam9g45.c
@@ -228,5 +228,4 @@  static void __init at91sam9g45_pmc_setup(struct device_node *np)
  * The TCB is used as the clocksource so its clock is needed early. This means
  * this can't be a platform driver.
  */
-CLK_OF_DECLARE_DRIVER(at91sam9g45_pmc, "atmel,at91sam9g45-pmc",
-		      at91sam9g45_pmc_setup);
+CLK_OF_DECLARE(at91sam9g45_pmc, "atmel,at91sam9g45-pmc", at91sam9g45_pmc_setup);
diff --git a/drivers/clk/at91/at91sam9n12.c b/drivers/clk/at91/at91sam9n12.c
index f9db5316a7f1..7fe435f4b46b 100644
--- a/drivers/clk/at91/at91sam9n12.c
+++ b/drivers/clk/at91/at91sam9n12.c
@@ -255,5 +255,4 @@  static void __init at91sam9n12_pmc_setup(struct device_node *np)
  * The TCB is used as the clocksource so its clock is needed early. This means
  * this can't be a platform driver.
  */
-CLK_OF_DECLARE_DRIVER(at91sam9n12_pmc, "atmel,at91sam9n12-pmc",
-		      at91sam9n12_pmc_setup);
+CLK_OF_DECLARE(at91sam9n12_pmc, "atmel,at91sam9n12-pmc", at91sam9n12_pmc_setup);
diff --git a/drivers/clk/at91/at91sam9rl.c b/drivers/clk/at91/at91sam9rl.c
index 66736e03cfef..ecbabf5162bd 100644
--- a/drivers/clk/at91/at91sam9rl.c
+++ b/drivers/clk/at91/at91sam9rl.c
@@ -186,4 +186,5 @@  static void __init at91sam9rl_pmc_setup(struct device_node *np)
 err_free:
 	kfree(at91sam9rl_pmc);
 }
-CLK_OF_DECLARE_DRIVER(at91sam9rl_pmc, "atmel,at91sam9rl-pmc", at91sam9rl_pmc_setup);
+
+CLK_OF_DECLARE(at91sam9rl_pmc, "atmel,at91sam9rl-pmc", at91sam9rl_pmc_setup);
diff --git a/drivers/clk/at91/at91sam9x5.c b/drivers/clk/at91/at91sam9x5.c
index 79b9d3667228..5cce48c64ea2 100644
--- a/drivers/clk/at91/at91sam9x5.c
+++ b/drivers/clk/at91/at91sam9x5.c
@@ -302,33 +302,33 @@  static void __init at91sam9g15_pmc_setup(struct device_node *np)
 {
 	at91sam9x5_pmc_setup(np, at91sam9g15_periphck, true);
 }
-CLK_OF_DECLARE_DRIVER(at91sam9g15_pmc, "atmel,at91sam9g15-pmc",
-		      at91sam9g15_pmc_setup);
+
+CLK_OF_DECLARE(at91sam9g15_pmc, "atmel,at91sam9g15-pmc", at91sam9g15_pmc_setup);
 
 static void __init at91sam9g25_pmc_setup(struct device_node *np)
 {
 	at91sam9x5_pmc_setup(np, at91sam9g25_periphck, false);
 }
-CLK_OF_DECLARE_DRIVER(at91sam9g25_pmc, "atmel,at91sam9g25-pmc",
-		      at91sam9g25_pmc_setup);
+
+CLK_OF_DECLARE(at91sam9g25_pmc, "atmel,at91sam9g25-pmc", at91sam9g25_pmc_setup);
 
 static void __init at91sam9g35_pmc_setup(struct device_node *np)
 {
 	at91sam9x5_pmc_setup(np, at91sam9g35_periphck, true);
 }
-CLK_OF_DECLARE_DRIVER(at91sam9g35_pmc, "atmel,at91sam9g35-pmc",
-		      at91sam9g35_pmc_setup);
+
+CLK_OF_DECLARE(at91sam9g35_pmc, "atmel,at91sam9g35-pmc", at91sam9g35_pmc_setup);
 
 static void __init at91sam9x25_pmc_setup(struct device_node *np)
 {
 	at91sam9x5_pmc_setup(np, at91sam9x25_periphck, false);
 }
-CLK_OF_DECLARE_DRIVER(at91sam9x25_pmc, "atmel,at91sam9x25-pmc",
-		      at91sam9x25_pmc_setup);
+
+CLK_OF_DECLARE(at91sam9x25_pmc, "atmel,at91sam9x25-pmc", at91sam9x25_pmc_setup);
 
 static void __init at91sam9x35_pmc_setup(struct device_node *np)
 {
 	at91sam9x5_pmc_setup(np, at91sam9x35_periphck, true);
 }
-CLK_OF_DECLARE_DRIVER(at91sam9x35_pmc, "atmel,at91sam9x35-pmc",
-		      at91sam9x35_pmc_setup);
+
+CLK_OF_DECLARE(at91sam9x35_pmc, "atmel,at91sam9x35-pmc", at91sam9x35_pmc_setup);
diff --git a/drivers/clk/at91/sama5d2.c b/drivers/clk/at91/sama5d2.c
index 9a5cbc7cd55a..3d1f78176c3e 100644
--- a/drivers/clk/at91/sama5d2.c
+++ b/drivers/clk/at91/sama5d2.c
@@ -372,4 +372,5 @@  static void __init sama5d2_pmc_setup(struct device_node *np)
 err_free:
 	kfree(sama5d2_pmc);
 }
-CLK_OF_DECLARE_DRIVER(sama5d2_pmc, "atmel,sama5d2-pmc", sama5d2_pmc_setup);
+
+CLK_OF_DECLARE(sama5d2_pmc, "atmel,sama5d2-pmc", sama5d2_pmc_setup);
diff --git a/drivers/clk/at91/sama5d3.c b/drivers/clk/at91/sama5d3.c
index 87009ee8effc..d376257807d2 100644
--- a/drivers/clk/at91/sama5d3.c
+++ b/drivers/clk/at91/sama5d3.c
@@ -255,4 +255,4 @@  static void __init sama5d3_pmc_setup(struct device_node *np)
  * The TCB is used as the clocksource so its clock is needed early. This means
  * this can't be a platform driver.
  */
-CLK_OF_DECLARE_DRIVER(sama5d3_pmc, "atmel,sama5d3-pmc", sama5d3_pmc_setup);
+CLK_OF_DECLARE(sama5d3_pmc, "atmel,sama5d3-pmc", sama5d3_pmc_setup);
diff --git a/drivers/clk/at91/sama5d4.c b/drivers/clk/at91/sama5d4.c
index 57fff790188b..5cbaac68da44 100644
--- a/drivers/clk/at91/sama5d4.c
+++ b/drivers/clk/at91/sama5d4.c
@@ -286,4 +286,5 @@  static void __init sama5d4_pmc_setup(struct device_node *np)
 err_free:
 	kfree(sama5d4_pmc);
 }
-CLK_OF_DECLARE_DRIVER(sama5d4_pmc, "atmel,sama5d4-pmc", sama5d4_pmc_setup);
+
+CLK_OF_DECLARE(sama5d4_pmc, "atmel,sama5d4-pmc", sama5d4_pmc_setup);