Commit 9710ee14 authored by Stephen Boyd's avatar Stephen Boyd

Merge branches 'clk-dt-name', 'clk-ti-of-node' and 'clk-sa' into clk-next

  - Use updated printk format for OF node names
  - Fix TI code to only search DT subnodes
  - Various static analysis finds

* clk-dt-name:
  clk: Convert to using %pOFn instead of device_node.name

* clk-ti-of-node:
  clk: ti: fix OF child-node lookup

* clk-sa:
  clk: mvebu: armada-37xx-tbg: Switch to clk_get and balance it in probe
  reset: hisilicon: fix potential NULL pointer dereference
  clk: cdce925: release child device nodes
  clk: qcom: clk-branch: Use true and false for boolean values
...@@ -301,13 +301,13 @@ static void __init of_axs10x_pll_clk_setup(struct device_node *node) ...@@ -301,13 +301,13 @@ static void __init of_axs10x_pll_clk_setup(struct device_node *node)
ret = clk_hw_register(NULL, &pll_clk->hw); ret = clk_hw_register(NULL, &pll_clk->hw);
if (ret) { if (ret) {
pr_err("failed to register %s clock\n", node->name); pr_err("failed to register %pOFn clock\n", node);
goto err_unmap_lock; goto err_unmap_lock;
} }
ret = of_clk_add_hw_provider(node, of_clk_hw_simple_get, &pll_clk->hw); ret = of_clk_add_hw_provider(node, of_clk_hw_simple_get, &pll_clk->hw);
if (ret) { if (ret) {
pr_err("failed to add hw provider for %s clock\n", node->name); pr_err("failed to add hw provider for %pOFn clock\n", node);
goto err_unregister_clk; goto err_unregister_clk;
} }
......
...@@ -808,29 +808,29 @@ void __init kona_dt_ccu_setup(struct ccu_data *ccu, ...@@ -808,29 +808,29 @@ void __init kona_dt_ccu_setup(struct ccu_data *ccu,
ret = of_address_to_resource(node, 0, &res); ret = of_address_to_resource(node, 0, &res);
if (ret) { if (ret) {
pr_err("%s: no valid CCU registers found for %s\n", __func__, pr_err("%s: no valid CCU registers found for %pOFn\n", __func__,
node->name); node);
goto out_err; goto out_err;
} }
range = resource_size(&res); range = resource_size(&res);
if (range > (resource_size_t)U32_MAX) { if (range > (resource_size_t)U32_MAX) {
pr_err("%s: address range too large for %s\n", __func__, pr_err("%s: address range too large for %pOFn\n", __func__,
node->name); node);
goto out_err; goto out_err;
} }
ccu->range = (u32)range; ccu->range = (u32)range;
if (!ccu_data_valid(ccu)) { if (!ccu_data_valid(ccu)) {
pr_err("%s: ccu data not valid for %s\n", __func__, node->name); pr_err("%s: ccu data not valid for %pOFn\n", __func__, node);
goto out_err; goto out_err;
} }
ccu->base = ioremap(res.start, ccu->range); ccu->base = ioremap(res.start, ccu->range);
if (!ccu->base) { if (!ccu->base) {
pr_err("%s: unable to map CCU registers for %s\n", __func__, pr_err("%s: unable to map CCU registers for %pOFn\n", __func__,
node->name); node);
goto out_err; goto out_err;
} }
ccu->node = of_node_get(node); ccu->node = of_node_get(node);
...@@ -848,16 +848,16 @@ void __init kona_dt_ccu_setup(struct ccu_data *ccu, ...@@ -848,16 +848,16 @@ void __init kona_dt_ccu_setup(struct ccu_data *ccu,
ret = of_clk_add_hw_provider(node, of_clk_kona_onecell_get, ccu); ret = of_clk_add_hw_provider(node, of_clk_kona_onecell_get, ccu);
if (ret) { if (ret) {
pr_err("%s: error adding ccu %s as provider (%d)\n", __func__, pr_err("%s: error adding ccu %pOFn as provider (%d)\n", __func__,
node->name, ret); node, ret);
goto out_err; goto out_err;
} }
if (!kona_ccu_init(ccu)) if (!kona_ccu_init(ccu))
pr_err("Broadcom %s initialization had errors\n", node->name); pr_err("Broadcom %pOFn initialization had errors\n", node);
return; return;
out_err: out_err:
kona_ccu_teardown(ccu); kona_ccu_teardown(ccu);
pr_err("Broadcom %s setup aborted\n", node->name); pr_err("Broadcom %pOFn setup aborted\n", node);
} }
...@@ -281,7 +281,7 @@ static void __init asm9260_acc_init(struct device_node *np) ...@@ -281,7 +281,7 @@ static void __init asm9260_acc_init(struct device_node *np)
base = of_io_request_and_map(np, 0, np->name); base = of_io_request_and_map(np, 0, np->name);
if (IS_ERR(base)) if (IS_ERR(base))
panic("%s: unable to map resource", np->name); panic("%pOFn: unable to map resource", np);
/* register pll */ /* register pll */
rate = (ioread32(base + HW_SYSPLLCTRL) & 0xffff) * 1000000; rate = (ioread32(base + HW_SYSPLLCTRL) & 0xffff) * 1000000;
...@@ -292,7 +292,7 @@ static void __init asm9260_acc_init(struct device_node *np) ...@@ -292,7 +292,7 @@ static void __init asm9260_acc_init(struct device_node *np)
ref_clk, 0, rate, accuracy); ref_clk, 0, rate, accuracy);
if (IS_ERR(hw)) if (IS_ERR(hw))
panic("%s: can't register REFCLK. Check DT!", np->name); panic("%pOFn: can't register REFCLK. Check DT!", np);
for (n = 0; n < ARRAY_SIZE(asm9260_mux_clks); n++) { for (n = 0; n < ARRAY_SIZE(asm9260_mux_clks); n++) {
const struct asm9260_mux_clock *mc = &asm9260_mux_clks[n]; const struct asm9260_mux_clock *mc = &asm9260_mux_clks[n];
......
...@@ -669,8 +669,8 @@ static int cdce925_probe(struct i2c_client *client, ...@@ -669,8 +669,8 @@ static int cdce925_probe(struct i2c_client *client,
/* Register PLL clocks */ /* Register PLL clocks */
for (i = 0; i < data->chip_info->num_plls; ++i) { for (i = 0; i < data->chip_info->num_plls; ++i) {
pll_clk_name[i] = kasprintf(GFP_KERNEL, "%s.pll%d", pll_clk_name[i] = kasprintf(GFP_KERNEL, "%pOFn.pll%d",
client->dev.of_node->name, i); client->dev.of_node, i);
init.name = pll_clk_name[i]; init.name = pll_clk_name[i];
data->pll[i].chip = data; data->pll[i].chip = data;
data->pll[i].hw.init = &init; data->pll[i].hw.init = &init;
...@@ -703,6 +703,7 @@ static int cdce925_probe(struct i2c_client *client, ...@@ -703,6 +703,7 @@ static int cdce925_probe(struct i2c_client *client,
0x12 + (i*CDCE925_OFFSET_PLL), 0x12 + (i*CDCE925_OFFSET_PLL),
0x07, value & 0x07); 0x07, value & 0x07);
} }
of_node_put(np_output);
} }
/* Register output clock Y1 */ /* Register output clock Y1 */
...@@ -710,7 +711,7 @@ static int cdce925_probe(struct i2c_client *client, ...@@ -710,7 +711,7 @@ static int cdce925_probe(struct i2c_client *client,
init.flags = 0; init.flags = 0;
init.num_parents = 1; init.num_parents = 1;
init.parent_names = &parent_name; /* Mux Y1 to input */ init.parent_names = &parent_name; /* Mux Y1 to input */
init.name = kasprintf(GFP_KERNEL, "%s.Y1", client->dev.of_node->name); init.name = kasprintf(GFP_KERNEL, "%pOFn.Y1", client->dev.of_node);
data->clk[0].chip = data; data->clk[0].chip = data;
data->clk[0].hw.init = &init; data->clk[0].hw.init = &init;
data->clk[0].index = 0; data->clk[0].index = 0;
...@@ -727,8 +728,8 @@ static int cdce925_probe(struct i2c_client *client, ...@@ -727,8 +728,8 @@ static int cdce925_probe(struct i2c_client *client,
init.flags = CLK_SET_RATE_PARENT; init.flags = CLK_SET_RATE_PARENT;
init.num_parents = 1; init.num_parents = 1;
for (i = 1; i < data->chip_info->num_outputs; ++i) { for (i = 1; i < data->chip_info->num_outputs; ++i) {
init.name = kasprintf(GFP_KERNEL, "%s.Y%d", init.name = kasprintf(GFP_KERNEL, "%pOFn.Y%d",
client->dev.of_node->name, i+1); client->dev.of_node, i+1);
data->clk[i].chip = data; data->clk[i].chip = data;
data->clk[i].hw.init = &init; data->clk[i].hw.init = &init;
data->clk[i].index = i; data->clk[i].index = i;
......
...@@ -158,14 +158,14 @@ static struct clk *_of_fixed_factor_clk_setup(struct device_node *node) ...@@ -158,14 +158,14 @@ static struct clk *_of_fixed_factor_clk_setup(struct device_node *node)
int ret; int ret;
if (of_property_read_u32(node, "clock-div", &div)) { if (of_property_read_u32(node, "clock-div", &div)) {
pr_err("%s Fixed factor clock <%s> must have a clock-div property\n", pr_err("%s Fixed factor clock <%pOFn> must have a clock-div property\n",
__func__, node->name); __func__, node);
return ERR_PTR(-EIO); return ERR_PTR(-EIO);
} }
if (of_property_read_u32(node, "clock-mult", &mult)) { if (of_property_read_u32(node, "clock-mult", &mult)) {
pr_err("%s Fixed factor clock <%s> must have a clock-mult property\n", pr_err("%s Fixed factor clock <%pOFn> must have a clock-mult property\n",
__func__, node->name); __func__, node);
return ERR_PTR(-EIO); return ERR_PTR(-EIO);
} }
......
...@@ -233,11 +233,11 @@ static int gpio_clk_driver_probe(struct platform_device *pdev) ...@@ -233,11 +233,11 @@ static int gpio_clk_driver_probe(struct platform_device *pdev)
if (IS_ERR(gpiod)) { if (IS_ERR(gpiod)) {
ret = PTR_ERR(gpiod); ret = PTR_ERR(gpiod);
if (ret == -EPROBE_DEFER) if (ret == -EPROBE_DEFER)
pr_debug("%s: %s: GPIOs not yet available, retry later\n", pr_debug("%pOFn: %s: GPIOs not yet available, retry later\n",
node->name, __func__); node, __func__);
else else
pr_err("%s: %s: Can't get '%s' named GPIO property\n", pr_err("%pOFn: %s: Can't get '%s' named GPIO property\n",
node->name, __func__, node, __func__,
gpio_name); gpio_name);
return ret; return ret;
} }
......
...@@ -390,13 +390,13 @@ static void __init of_hsdk_pll_clk_setup(struct device_node *node) ...@@ -390,13 +390,13 @@ static void __init of_hsdk_pll_clk_setup(struct device_node *node)
ret = clk_hw_register(NULL, &pll_clk->hw); ret = clk_hw_register(NULL, &pll_clk->hw);
if (ret) { if (ret) {
pr_err("failed to register %s clock\n", node->name); pr_err("failed to register %pOFn clock\n", node);
goto err_unmap_spec_regs; goto err_unmap_spec_regs;
} }
ret = of_clk_add_hw_provider(node, of_clk_hw_simple_get, &pll_clk->hw); ret = of_clk_add_hw_provider(node, of_clk_hw_simple_get, &pll_clk->hw);
if (ret) { if (ret) {
pr_err("failed to add hw provider for %s clock\n", node->name); pr_err("failed to add hw provider for %pOFn clock\n", node);
goto err_unmap_spec_regs; goto err_unmap_spec_regs;
} }
......
...@@ -97,8 +97,8 @@ static void __init nomadik_src_init(void) ...@@ -97,8 +97,8 @@ static void __init nomadik_src_init(void)
} }
src_base = of_iomap(np, 0); src_base = of_iomap(np, 0);
if (!src_base) { if (!src_base) {
pr_err("%s: must have src parent node with REGS (%s)\n", pr_err("%s: must have src parent node with REGS (%pOFn)\n",
__func__, np->name); __func__, np);
return; return;
} }
......
...@@ -549,7 +549,7 @@ static void __init npcm7xx_clk_init(struct device_node *clk_np) ...@@ -549,7 +549,7 @@ static void __init npcm7xx_clk_init(struct device_node *clk_np)
ret = of_address_to_resource(clk_np, 0, &res); ret = of_address_to_resource(clk_np, 0, &res);
if (ret) { if (ret) {
pr_err("%s: failed to get resource, ret %d\n", clk_np->name, pr_err("%pOFn: failed to get resource, ret %d\n", clk_np,
ret); ret);
return; return;
} }
......
...@@ -195,8 +195,8 @@ static void palmas_clks_get_clk_data(struct platform_device *pdev, ...@@ -195,8 +195,8 @@ static void palmas_clks_get_clk_data(struct platform_device *pdev,
prop = PALMAS_EXT_CONTROL_NSLEEP; prop = PALMAS_EXT_CONTROL_NSLEEP;
break; break;
default: default:
dev_warn(&pdev->dev, "%s: Invalid ext control option: %u\n", dev_warn(&pdev->dev, "%pOFn: Invalid ext control option: %u\n",
node->name, prop); node, prop);
prop = 0; prop = 0;
break; break;
} }
......
...@@ -945,8 +945,8 @@ static void __init core_mux_init(struct device_node *np) ...@@ -945,8 +945,8 @@ static void __init core_mux_init(struct device_node *np)
rc = of_clk_add_provider(np, of_clk_src_simple_get, clk); rc = of_clk_add_provider(np, of_clk_src_simple_get, clk);
if (rc) { if (rc) {
pr_err("%s: Couldn't register clk provider for node %s: %d\n", pr_err("%s: Couldn't register clk provider for node %pOFn: %d\n",
__func__, np->name, rc); __func__, np, rc);
return; return;
} }
} }
...@@ -1199,8 +1199,8 @@ static void __init legacy_pll_init(struct device_node *np, int idx) ...@@ -1199,8 +1199,8 @@ static void __init legacy_pll_init(struct device_node *np, int idx)
rc = of_clk_add_provider(np, of_clk_src_onecell_get, onecell_data); rc = of_clk_add_provider(np, of_clk_src_onecell_get, onecell_data);
if (rc) { if (rc) {
pr_err("%s: Couldn't register clk provider for node %s: %d\n", pr_err("%s: Couldn't register clk provider for node %pOFn: %d\n",
__func__, np->name, rc); __func__, np, rc);
goto err_cell; goto err_cell;
} }
...@@ -1360,7 +1360,7 @@ static void __init clockgen_init(struct device_node *np) ...@@ -1360,7 +1360,7 @@ static void __init clockgen_init(struct device_node *np)
is_old_ls1021a = true; is_old_ls1021a = true;
} }
if (!clockgen.regs) { if (!clockgen.regs) {
pr_err("%s(): %s: of_iomap() failed\n", __func__, np->name); pr_err("%s(): %pOFn: of_iomap() failed\n", __func__, np);
return; return;
} }
...@@ -1406,8 +1406,8 @@ static void __init clockgen_init(struct device_node *np) ...@@ -1406,8 +1406,8 @@ static void __init clockgen_init(struct device_node *np)
ret = of_clk_add_provider(np, clockgen_clk_get, &clockgen); ret = of_clk_add_provider(np, clockgen_clk_get, &clockgen);
if (ret) { if (ret) {
pr_err("%s: Couldn't register clk provider for node %s: %d\n", pr_err("%s: Couldn't register clk provider for node %pOFn: %d\n",
__func__, np->name, ret); __func__, np, ret);
} }
return; return;
......
...@@ -132,7 +132,7 @@ static int scmi_clocks_probe(struct scmi_device *sdev) ...@@ -132,7 +132,7 @@ static int scmi_clocks_probe(struct scmi_device *sdev)
count = handle->clk_ops->count_get(handle); count = handle->clk_ops->count_get(handle);
if (count < 0) { if (count < 0) {
dev_err(dev, "%s: invalid clock output count\n", np->name); dev_err(dev, "%pOFn: invalid clock output count\n", np);
return -EINVAL; return -EINVAL;
} }
......
...@@ -207,7 +207,7 @@ static int scpi_clk_add(struct device *dev, struct device_node *np, ...@@ -207,7 +207,7 @@ static int scpi_clk_add(struct device *dev, struct device_node *np,
count = of_property_count_strings(np, "clock-output-names"); count = of_property_count_strings(np, "clock-output-names");
if (count < 0) { if (count < 0) {
dev_err(dev, "%s: invalid clock output count\n", np->name); dev_err(dev, "%pOFn: invalid clock output count\n", np);
return -EINVAL; return -EINVAL;
} }
...@@ -232,13 +232,13 @@ static int scpi_clk_add(struct device *dev, struct device_node *np, ...@@ -232,13 +232,13 @@ static int scpi_clk_add(struct device *dev, struct device_node *np,
if (of_property_read_string_index(np, "clock-output-names", if (of_property_read_string_index(np, "clock-output-names",
idx, &name)) { idx, &name)) {
dev_err(dev, "invalid clock name @ %s\n", np->name); dev_err(dev, "invalid clock name @ %pOFn\n", np);
return -EINVAL; return -EINVAL;
} }
if (of_property_read_u32_index(np, "clock-indices", if (of_property_read_u32_index(np, "clock-indices",
idx, &val)) { idx, &val)) {
dev_err(dev, "invalid clock index @ %s\n", np->name); dev_err(dev, "invalid clock index @ %pOFn\n", np);
return -EINVAL; return -EINVAL;
} }
......
...@@ -1215,8 +1215,8 @@ static int si5351_dt_parse(struct i2c_client *client, ...@@ -1215,8 +1215,8 @@ static int si5351_dt_parse(struct i2c_client *client,
/* per clkout properties */ /* per clkout properties */
for_each_child_of_node(np, child) { for_each_child_of_node(np, child) {
if (of_property_read_u32(child, "reg", &num)) { if (of_property_read_u32(child, "reg", &num)) {
dev_err(&client->dev, "missing reg property of %s\n", dev_err(&client->dev, "missing reg property of %pOFn\n",
child->name); child);
goto put_child; goto put_child;
} }
......
...@@ -1433,7 +1433,7 @@ static void __init stm32f4_rcc_init(struct device_node *np) ...@@ -1433,7 +1433,7 @@ static void __init stm32f4_rcc_init(struct device_node *np)
base = of_iomap(np, 0); base = of_iomap(np, 0);
if (!base) { if (!base) {
pr_err("%s: unable to map resource\n", np->name); pr_err("%pOFn: unable to map resource\n", np);
return; return;
} }
......
...@@ -1216,7 +1216,7 @@ static void __init stm32h7_rcc_init(struct device_node *np) ...@@ -1216,7 +1216,7 @@ static void __init stm32h7_rcc_init(struct device_node *np)
/* get RCC base @ from DT */ /* get RCC base @ from DT */
base = of_iomap(np, 0); base = of_iomap(np, 0);
if (!base) { if (!base) {
pr_err("%s: unable to map resource", np->name); pr_err("%pOFn: unable to map resource", np);
goto err_free_clks; goto err_free_clks;
} }
......
...@@ -2088,7 +2088,7 @@ static void stm32mp1_rcc_init(struct device_node *np) ...@@ -2088,7 +2088,7 @@ static void stm32mp1_rcc_init(struct device_node *np)
base = of_iomap(np, 0); base = of_iomap(np, 0);
if (!base) { if (!base) {
pr_err("%s: unable to map resource", np->name); pr_err("%pOFn: unable to map resource", np);
of_node_put(np); of_node_put(np);
return; return;
} }
......
...@@ -54,13 +54,13 @@ static void __init tango4_clkgen_setup(struct device_node *np) ...@@ -54,13 +54,13 @@ static void __init tango4_clkgen_setup(struct device_node *np)
const char *parent = of_clk_get_parent_name(np, 0); const char *parent = of_clk_get_parent_name(np, 0);
if (!base) if (!base)
panic("%s: invalid address\n", np->name); panic("%pOFn: invalid address\n", np);
if (readl(base + CPUCLK_DIV) & DIV_BYPASS) if (readl(base + CPUCLK_DIV) & DIV_BYPASS)
panic("%s: unsupported cpuclk setup\n", np->name); panic("%pOFn: unsupported cpuclk setup\n", np);
if (readl(base + SYSCLK_DIV) & DIV_BYPASS) if (readl(base + SYSCLK_DIV) & DIV_BYPASS)
panic("%s: unsupported sysclk setup\n", np->name); panic("%pOFn: unsupported sysclk setup\n", np);
writel(0x100, base + CPUCLK_DIV); /* disable frequency ramping */ writel(0x100, base + CPUCLK_DIV); /* disable frequency ramping */
...@@ -77,9 +77,9 @@ static void __init tango4_clkgen_setup(struct device_node *np) ...@@ -77,9 +77,9 @@ static void __init tango4_clkgen_setup(struct device_node *np)
pp[3] = clk_register_fixed_factor(NULL, "sdio_clk", "cd6", 0, 1, 2); pp[3] = clk_register_fixed_factor(NULL, "sdio_clk", "cd6", 0, 1, 2);
if (IS_ERR(pp[0]) || IS_ERR(pp[1]) || IS_ERR(pp[2]) || IS_ERR(pp[3])) if (IS_ERR(pp[0]) || IS_ERR(pp[1]) || IS_ERR(pp[2]) || IS_ERR(pp[3]))
panic("%s: clk registration failed\n", np->name); panic("%pOFn: clk registration failed\n", np);
if (of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data)) if (of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data))
panic("%s: clk provider registration failed\n", np->name); panic("%pOFn: clk provider registration failed\n", np);
} }
CLK_OF_DECLARE(tango4_clkgen, "sigma,tango4-clkgen", tango4_clkgen_setup); CLK_OF_DECLARE(tango4_clkgen, "sigma,tango4-clkgen", tango4_clkgen_setup);
...@@ -109,9 +109,8 @@ struct hisi_reset_controller *hisi_reset_init(struct platform_device *pdev) ...@@ -109,9 +109,8 @@ struct hisi_reset_controller *hisi_reset_init(struct platform_device *pdev)
return NULL; return NULL;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
rstc->membase = devm_ioremap(&pdev->dev, rstc->membase = devm_ioremap_resource(&pdev->dev, res);
res->start, resource_size(res)); if (IS_ERR(rstc->membase))
if (!rstc->membase)
return NULL; return NULL;
spin_lock_init(&rstc->lock); spin_lock_init(&rstc->lock);
......
...@@ -245,7 +245,7 @@ static void __init of_psc_clk_init(struct device_node *node, spinlock_t *lock) ...@@ -245,7 +245,7 @@ static void __init of_psc_clk_init(struct device_node *node, spinlock_t *lock)
return; return;
} }
pr_err("%s: error registering clk %s\n", __func__, node->name); pr_err("%s: error registering clk %pOFn\n", __func__, node);
unmap_domain: unmap_domain:
iounmap(data->domain_base); iounmap(data->domain_base);
......
...@@ -219,7 +219,7 @@ static void __init _of_pll_clk_init(struct device_node *node, bool pllctrl) ...@@ -219,7 +219,7 @@ static void __init _of_pll_clk_init(struct device_node *node, bool pllctrl)
} }
out: out:
pr_err("%s: error initializing pll %s\n", __func__, node->name); pr_err("%s: error initializing pll %pOFn\n", __func__, node);
kfree(pll_data); kfree(pll_data);
} }
......
...@@ -96,12 +96,13 @@ static int armada_3700_tbg_clock_probe(struct platform_device *pdev) ...@@ -96,12 +96,13 @@ static int armada_3700_tbg_clock_probe(struct platform_device *pdev)
hw_tbg_data->num = NUM_TBG; hw_tbg_data->num = NUM_TBG;
platform_set_drvdata(pdev, hw_tbg_data); platform_set_drvdata(pdev, hw_tbg_data);
parent = devm_clk_get(dev, NULL); parent = clk_get(dev, NULL);
if (IS_ERR(parent)) { if (IS_ERR(parent)) {
dev_err(dev, "Could get the clock parent\n"); dev_err(dev, "Could get the clock parent\n");
return -EINVAL; return -EINVAL;
} }
parent_name = __clk_get_name(parent); parent_name = __clk_get_name(parent);
clk_put(parent);
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
reg = devm_ioremap_resource(dev, res); reg = devm_ioremap_resource(dev, res);
......
...@@ -18,7 +18,7 @@ static bool clk_branch_in_hwcg_mode(const struct clk_branch *br) ...@@ -18,7 +18,7 @@ static bool clk_branch_in_hwcg_mode(const struct clk_branch *br)
u32 val; u32 val;
if (!br->hwcg_reg) if (!br->hwcg_reg)
return 0; return false;
regmap_read(br->clkr.regmap, br->hwcg_reg, &val); regmap_read(br->clkr.regmap, br->hwcg_reg, &val);
......
...@@ -309,8 +309,8 @@ static void __init cpg_div6_clock_init(struct device_node *np) ...@@ -309,8 +309,8 @@ static void __init cpg_div6_clock_init(struct device_node *np)
num_parents = of_clk_get_parent_count(np); num_parents = of_clk_get_parent_count(np);
if (num_parents < 1) { if (num_parents < 1) {
pr_err("%s: no parent found for %s DIV6 clock\n", pr_err("%s: no parent found for %pOFn DIV6 clock\n",
__func__, np->name); __func__, np);
return; return;
} }
...@@ -321,8 +321,8 @@ static void __init cpg_div6_clock_init(struct device_node *np) ...@@ -321,8 +321,8 @@ static void __init cpg_div6_clock_init(struct device_node *np)
reg = of_iomap(np, 0); reg = of_iomap(np, 0);
if (reg == NULL) { if (reg == NULL) {
pr_err("%s: failed to map %s DIV6 clock register\n", pr_err("%s: failed to map %pOFn DIV6 clock register\n",
__func__, np->name); __func__, np);
goto error; goto error;
} }
...@@ -334,8 +334,8 @@ static void __init cpg_div6_clock_init(struct device_node *np) ...@@ -334,8 +334,8 @@ static void __init cpg_div6_clock_init(struct device_node *np)
clk = cpg_div6_register(clk_name, num_parents, parent_names, reg, NULL); clk = cpg_div6_register(clk_name, num_parents, parent_names, reg, NULL);
if (IS_ERR(clk)) { if (IS_ERR(clk)) {
pr_err("%s: failed to register %s DIV6 clock (%ld)\n", pr_err("%s: failed to register %pOFn DIV6 clock (%ld)\n",
__func__, np->name, PTR_ERR(clk)); __func__, np, PTR_ERR(clk));
goto error; goto error;
} }
......
...@@ -74,8 +74,8 @@ static void __init emev2_smu_clkdiv_init(struct device_node *np) ...@@ -74,8 +74,8 @@ static void __init emev2_smu_clkdiv_init(struct device_node *np)
clk = clk_register_divider(NULL, np->name, parent_name, 0, clk = clk_register_divider(NULL, np->name, parent_name, 0,
smu_base + reg[0], reg[1], 8, 0, &lock); smu_base + reg[0], reg[1], 8, 0, &lock);
of_clk_add_provider(np, of_clk_src_simple_get, clk); of_clk_add_provider(np, of_clk_src_simple_get, clk);
clk_register_clkdev(clk, np->name, NULL); clk_register_clkdev(clk, np->full_name, NULL);
pr_debug("## %s %s %p\n", __func__, np->name, clk); pr_debug("## %s %pOFn %p\n", __func__, np, clk);
} }
CLK_OF_DECLARE(emev2_smu_clkdiv, "renesas,emev2-smu-clkdiv", CLK_OF_DECLARE(emev2_smu_clkdiv, "renesas,emev2-smu-clkdiv",
emev2_smu_clkdiv_init); emev2_smu_clkdiv_init);
...@@ -92,7 +92,7 @@ static void __init emev2_smu_gclk_init(struct device_node *np) ...@@ -92,7 +92,7 @@ static void __init emev2_smu_gclk_init(struct device_node *np)
clk = clk_register_gate(NULL, np->name, parent_name, 0, clk = clk_register_gate(NULL, np->name, parent_name, 0,
smu_base + reg[0], reg[1], 0, &lock); smu_base + reg[0], reg[1], 0, &lock);
of_clk_add_provider(np, of_clk_src_simple_get, clk); of_clk_add_provider(np, of_clk_src_simple_get, clk);
clk_register_clkdev(clk, np->name, NULL); clk_register_clkdev(clk, np->full_name, NULL);
pr_debug("## %s %s %p\n", __func__, np->name, clk); pr_debug("## %s %pOFn %p\n", __func__, np, clk);
} }
CLK_OF_DECLARE(emev2_smu_gclk, "renesas,emev2-smu-gclk", emev2_smu_gclk_init); CLK_OF_DECLARE(emev2_smu_gclk, "renesas,emev2-smu-gclk", emev2_smu_gclk_init);
...@@ -236,8 +236,8 @@ static void __init cpg_mstp_clocks_init(struct device_node *np) ...@@ -236,8 +236,8 @@ static void __init cpg_mstp_clocks_init(struct device_node *np)
break; break;
if (clkidx >= MSTP_MAX_CLOCKS) { if (clkidx >= MSTP_MAX_CLOCKS) {
pr_err("%s: invalid clock %s %s index %u\n", pr_err("%s: invalid clock %pOFn %s index %u\n",