linux/drivers/clk/hisilicon
Leo Yan a925810f6e clk: Hi3660: register fixed_rate_clks with CLK_OF_DECLARE_DRIVER
The timer will register into system at very early phase at kernel boot;
if timer needs to use clock, the clock should be get ready in function
of_clk_init() so later the timer driver probe can retrieve clock
successfully. This is finished in below flow on arm64:

  start_kernel()
    `-> time_init()
          `-> of_clk_init(NULL)    => register timer's clock
          `-> clocksource_probe()  => register timer

On Hi3660 the sp804 timer uses clock "osc32k", this clock is registered
as platform driver rather than CLK_OF_DECLARE_DRIVER method. As result,
sp804 timer probe returns failure due if cannot bind clock properly.

To fix the failure, this patch is to split crgctrl clocks into two
subsets. One part is for fixed_rate_clks which includes pre-defined
fixed rate clocks, and "osc32k" clock is in this category; So we change
their registration to CLK_OF_DECLARE_DRIVER method, as result the clocks
can be registered ahead with function of_clk_init() and timer driver can
bind timer clock successfully; the rest of the crgctrl clocks are still
registered by the probe of the platform driver.

This patch also adds checking for all crgctrl clocks registration and
print out log if any clock has failure.

Signed-off-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2017-06-19 16:36:48 -07:00
..
clk-hi3519.c clk: hisilicon: hi3519: add driver remove path and fix some issues 2016-06-30 12:35:20 -07:00
clk-hi3620.c clk: hi3620: Fix a typo in one variable name 2017-04-19 11:29:49 -07:00
clk-hi3660.c clk: Hi3660: register fixed_rate_clks with CLK_OF_DECLARE_DRIVER 2017-06-19 16:36:48 -07:00
clk-hi6220-stub.c clk: hisilicon: Remove CLK_IS_ROOT 2016-03-02 17:43:32 -08:00
clk-hi6220.c clk: hi6220: add debug APB clock 2017-04-12 18:07:31 +02:00
clk-hip04.c clk: hisilicon: Remove CLK_IS_ROOT 2016-03-02 17:43:32 -08:00
clk-hix5hd2.c clk: hisilicon: Remove CLK_IS_ROOT 2016-03-02 17:43:32 -08:00
clk.c clk: hisilicon: Delete error messages for failed memory allocations in hisi_clk_init() 2017-04-19 10:45:52 -07:00
clk.h clk: hisilicon: add hisi_clk_unregister_* functions 2016-06-30 12:35:18 -07:00
clkdivider-hi6220.c clk: hi6220: fix missing clk.h include 2016-06-20 17:45:13 -07:00
clkgate-separated.c clk: hisilicon: fix lock assignment 2017-01-26 16:18:34 -08:00
crg-hi3516cv300.c clk: hisilicon: add CRG driver for Hi3516CV300 SoC 2016-11-14 12:04:39 -08:00
crg-hi3798cv200.c clk: hisilicon: add CRG driver for Hi3798CV200 SoC 2016-11-11 15:43:49 -08:00
crg.h clk: hisilicon: add CRG driver for Hi3798CV200 SoC 2016-11-11 15:43:49 -08:00
Kconfig clk: hisilicon: Add clock driver for hi3660 SoC 2017-01-09 16:20:38 -08:00
Makefile clk: hisilicon: Add clock driver for hi3660 SoC 2017-01-09 16:20:38 -08:00
reset.c reset: hisilicon: change the definition of hisi_reset_init 2016-06-30 12:33:22 -07:00
reset.h reset: hisilicon: change the definition of hisi_reset_init 2016-06-30 12:33:22 -07:00