clk: pxa: export core clocks
authorRobert Jarzmik <robert.jarzmik@free.fr>
Sun, 23 Oct 2016 12:19:29 +0000 (14:19 +0200)
committerStephen Boyd <sboyd@codeaurora.org>
Wed, 2 Nov 2016 00:47:01 +0000 (17:47 -0700)
pxaxxx_get_clk_frequency_khz() needs several clocks to be available
through clk_get(), ie. the cpu clocks, system bus clock and memory
clocks.

Add the missing clkdev so that their rate can be acquired.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/pxa/clk-pxa25x.c
drivers/clk/pxa/clk-pxa27x.c

index 3bb603a27f2b1345da6bf7e76f1e25d5ae0ddee7..6a3009eec830ea7c2b077e3d0fb2a99f06899224 100644 (file)
@@ -189,8 +189,10 @@ RATE_RO_OPS(clk_pxa25x_cpll, "cpll");
 
 static void __init pxa25x_register_core(void)
 {
-       clk_register_clk_pxa25x_cpll();
-       clk_register_clk_pxa25x_run();
+       clkdev_pxa_register(CLK_NONE, "cpll", NULL,
+                           clk_register_clk_pxa25x_cpll());
+       clkdev_pxa_register(CLK_NONE, "run", NULL,
+                           clk_register_clk_pxa25x_run());
        clkdev_pxa_register(CLK_CORE, "core", NULL,
                            clk_register_clk_pxa25x_core());
 }
@@ -212,7 +214,8 @@ static void __init pxa25x_base_clocks_init(void)
 {
        pxa25x_register_plls();
        pxa25x_register_core();
-       clk_register_clk_pxa25x_memory();
+       clkdev_pxa_register(CLK_NONE, "system_bus", NULL,
+                           clk_register_clk_pxa25x_memory());
 }
 
 #define DUMMY_CLK(_con_id, _dev_id, _parent) \
index 3b36e8d0f81ef21fc052e06babd724ad033f2565..9fb40e884999fef24c0b883a92f750155363af22 100644 (file)
@@ -270,9 +270,10 @@ RATE_RO_OPS(clk_pxa27x_run, "run");
 
 static void __init pxa27x_register_core(void)
 {
-       clk_register_clk_pxa27x_cpll();
-       clk_register_clk_pxa27x_run();
-
+       clkdev_pxa_register(CLK_NONE, "cpll", NULL,
+                           clk_register_clk_pxa27x_cpll());
+       clkdev_pxa_register(CLK_NONE, "run", NULL,
+                           clk_register_clk_pxa27x_run());
        clkdev_pxa_register(CLK_CORE, "core", NULL,
                            clk_register_clk_pxa27x_core());
 }
@@ -382,8 +383,10 @@ static void __init pxa27x_base_clocks_init(void)
 {
        pxa27x_register_plls();
        pxa27x_register_core();
-       clk_register_clk_pxa27x_system_bus();
-       clk_register_clk_pxa27x_memory();
+       clkdev_pxa_register(CLK_NONE, "system_bus", NULL,
+                           clk_register_clk_pxa27x_system_bus());
+       clkdev_pxa_register(CLK_NONE, "memory", NULL,
+                           clk_register_clk_pxa27x_memory());
        clk_register_clk_pxa27x_lcd_base();
 }