123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181 |
- From 5a25e2437af0db535b17da352fb16680a8dfdeda Mon Sep 17 00:00:00 2001
- From: Tudor Ambarus <[email protected]>
- Date: Wed, 3 Feb 2021 17:43:32 +0200
- Subject: [PATCH 112/247] clk: at91: Fix the declaration of the clocks
- 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 <[email protected]>
- Link: https://lore.kernel.org/r/[email protected]
- Acked-by: Saravana Kannan <[email protected]>
- Tested-by: Eugen Hristev <[email protected]>
- Acked-by: Nicolas Ferre <[email protected]>
- Reviewed-by: Claudiu Beznea <[email protected]>
- Signed-off-by: Stephen Boyd <[email protected]>
- ---
- 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(-)
- --- a/drivers/clk/at91/at91rm9200.c
- +++ b/drivers/clk/at91/at91rm9200.c
- @@ -215,5 +215,4 @@ err_free:
- * 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);
- --- a/drivers/clk/at91/at91sam9260.c
- +++ b/drivers/clk/at91/at91sam9260.c
- @@ -491,26 +491,26 @@ static void __init at91sam9260_pmc_setup
- {
- 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);
- --- a/drivers/clk/at91/at91sam9g45.c
- +++ b/drivers/clk/at91/at91sam9g45.c
- @@ -228,5 +228,4 @@ err_free:
- * 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);
- --- a/drivers/clk/at91/at91sam9n12.c
- +++ b/drivers/clk/at91/at91sam9n12.c
- @@ -255,5 +255,4 @@ err_free:
- * 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);
- --- a/drivers/clk/at91/at91sam9rl.c
- +++ b/drivers/clk/at91/at91sam9rl.c
- @@ -186,4 +186,5 @@ static void __init at91sam9rl_pmc_setup(
- 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);
- --- a/drivers/clk/at91/at91sam9x5.c
- +++ b/drivers/clk/at91/at91sam9x5.c
- @@ -302,33 +302,33 @@ static void __init at91sam9g15_pmc_setup
- {
- 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);
- --- a/drivers/clk/at91/sama5d2.c
- +++ b/drivers/clk/at91/sama5d2.c
- @@ -372,4 +372,5 @@ static void __init sama5d2_pmc_setup(str
- 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);
- --- a/drivers/clk/at91/sama5d3.c
- +++ b/drivers/clk/at91/sama5d3.c
- @@ -255,4 +255,4 @@ err_free:
- * 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);
- --- a/drivers/clk/at91/sama5d4.c
- +++ b/drivers/clk/at91/sama5d4.c
- @@ -286,4 +286,5 @@ static void __init sama5d4_pmc_setup(str
- 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);
|