Merge branches 'clk-warn', 'clk-core', 'clk-spear' and 'clk-qcom-msm8998' into clk...
authorStephen Boyd <sboyd@kernel.org>
Mon, 4 Jun 2018 19:26:39 +0000 (12:26 -0700)
committerStephen Boyd <sboyd@kernel.org>
Mon, 4 Jun 2018 19:26:39 +0000 (12:26 -0700)
* clk-warn:
  clk: Print the clock name and warning cause

* clk-core:
  clk: Remove clk_init_cb typedef

* clk-spear:
  clk: spear: fix WDT clock definition on SPEAr600

* clk-qcom-msm8998:
  clk: qcom: Add MSM8998 Global Clock Control (GCC) driver

drivers/clk/clk.c
drivers/clk/spear/spear6xx_clock.c
include/linux/clk-provider.h

index ea67ac8..9cd7cae 100644 (file)
@@ -548,7 +548,8 @@ static void clk_core_rate_unprotect(struct clk_core *core)
        if (!core)
                return;
 
-       if (WARN_ON(core->protect_count == 0))
+       if (WARN(core->protect_count == 0,
+           "%s already unprotected\n", core->name))
                return;
 
        if (--core->protect_count > 0)
@@ -681,16 +682,18 @@ static void clk_core_unprepare(struct clk_core *core)
        if (!core)
                return;
 
-       if (WARN_ON(core->prepare_count == 0))
+       if (WARN(core->prepare_count == 0,
+           "%s already unprepared\n", core->name))
                return;
 
-       if (WARN_ON(core->prepare_count == 1 && core->flags & CLK_IS_CRITICAL))
+       if (WARN(core->prepare_count == 1 && core->flags & CLK_IS_CRITICAL,
+           "Unpreparing critical %s\n", core->name))
                return;
 
        if (--core->prepare_count > 0)
                return;
 
-       WARN_ON(core->enable_count > 0);
+       WARN(core->enable_count > 0, "Unpreparing enabled %s\n", core->name);
 
        trace_clk_unprepare(core);
 
@@ -808,10 +811,11 @@ static void clk_core_disable(struct clk_core *core)
        if (!core)
                return;
 
-       if (WARN_ON(core->enable_count == 0))
+       if (WARN(core->enable_count == 0, "%s already disabled\n", core->name))
                return;
 
-       if (WARN_ON(core->enable_count == 1 && core->flags & CLK_IS_CRITICAL))
+       if (WARN(core->enable_count == 1 && core->flags & CLK_IS_CRITICAL,
+           "Disabling critical %s\n", core->name))
                return;
 
        if (--core->enable_count > 0)
@@ -866,7 +870,8 @@ static int clk_core_enable(struct clk_core *core)
        if (!core)
                return 0;
 
-       if (WARN_ON(core->prepare_count == 0))
+       if (WARN(core->prepare_count == 0,
+           "Enabling unprepared %s\n", core->name))
                return -ESHUTDOWN;
 
        if (core->enable_count == 0) {
@@ -3906,7 +3911,7 @@ int of_clk_parent_fill(struct device_node *np, const char **parents,
 EXPORT_SYMBOL_GPL(of_clk_parent_fill);
 
 struct clock_provider {
-       of_clk_init_cb_t clk_init_cb;
+       void (*clk_init_cb)(struct device_node *);
        struct device_node *np;
        struct list_head node;
 };
index f911d9f..47810be 100644 (file)
@@ -147,7 +147,7 @@ void __init spear6xx_clk_init(void __iomem *misc_base)
 
        clk = clk_register_fixed_factor(NULL, "wdt_clk", "osc_30m_clk", 0, 1,
                        1);
-       clk_register_clkdev(clk, NULL, "wdt");
+       clk_register_clkdev(clk, NULL, "fc880000.wdt");
 
        /* clock derived from pll1 clk */
        clk = clk_register_fixed_factor(NULL, "cpu_clk", "pll1_clk",
index 210a890..410a862 100644 (file)
@@ -802,8 +802,6 @@ unsigned long clk_hw_round_rate(struct clk_hw *hw, unsigned long rate);
 
 struct of_device_id;
 
-typedef void (*of_clk_init_cb_t)(struct device_node *);
-
 struct clk_onecell_data {
        struct clk **clks;
        unsigned int clk_num;