Commit e665f029 authored by Rob Herring's avatar Rob Herring Committed by Stephen Boyd

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

In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Cc: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Stephen Boyd <sboyd@kernel.org>
Cc: linux-clk@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-renesas-soc@vger.kernel.org
Cc: linux-omap@vger.kernel.org
Signed-off-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent 5b394b2d
...@@ -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;
...@@ -710,7 +710,7 @@ static int cdce925_probe(struct i2c_client *client, ...@@ -710,7 +710,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 +727,8 @@ static int cdce925_probe(struct i2c_client *client, ...@@ -727,8 +727,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);
...@@ -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);
} }
......
...@@ -312,8 +312,8 @@ static void __init cpg_div6_clock_init(struct device_node *np) ...@@ -312,8 +312,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;
} }
...@@ -324,8 +324,8 @@ static void __init cpg_div6_clock_init(struct device_node *np) ...@@ -324,8 +324,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;
} }
...@@ -337,8 +337,8 @@ static void __init cpg_div6_clock_init(struct device_node *np) ...@@ -337,8 +337,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;
} }
......
...@@ -86,8 +86,8 @@ static void __init emev2_smu_clkdiv_init(struct device_node *np) ...@@ -86,8 +86,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);
...@@ -104,7 +104,7 @@ static void __init emev2_smu_gclk_init(struct device_node *np) ...@@ -104,7 +104,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);
...@@ -239,8 +239,8 @@ static void __init cpg_mstp_clocks_init(struct device_node *np) ...@@ -239,8 +239,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",
__func__, np->name, name, clkidx); __func__, np, name, clkidx);
continue; continue;
} }
...@@ -259,8 +259,8 @@ static void __init cpg_mstp_clocks_init(struct device_node *np) ...@@ -259,8 +259,8 @@ static void __init cpg_mstp_clocks_init(struct device_node *np)
*/ */
clk_register_clkdev(clks[clkidx], name, NULL); clk_register_clkdev(clks[clkidx], name, NULL);
} else { } else {
pr_err("%s: failed to register %s %s clock (%ld)\n", pr_err("%s: failed to register %pOFn %s clock (%ld)\n",
__func__, np->name, name, PTR_ERR(clks[clkidx])); __func__, np, name, PTR_ERR(clks[clkidx]));
} }
} }
......
...@@ -228,8 +228,8 @@ static void __init r8a73a4_cpg_clocks_init(struct device_node *np) ...@@ -228,8 +228,8 @@ static void __init r8a73a4_cpg_clocks_init(struct device_node *np)
clk = r8a73a4_cpg_register_clock(np, cpg, name); clk = r8a73a4_cpg_register_clock(np, cpg, name);
if (IS_ERR(clk)) if (IS_ERR(clk))
pr_err("%s: failed to register %s %s clock (%ld)\n", pr_err("%s: failed to register %pOFn %s clock (%ld)\n",
__func__, np->name, name, PTR_ERR(clk)); __func__, np, name, PTR_ERR(clk));
else else
cpg->data.clks[i] = clk; cpg->data.clks[i] = clk;
} }
......
...@@ -187,8 +187,8 @@ static void __init r8a7740_cpg_clocks_init(struct device_node *np) ...@@ -187,8 +187,8 @@ static void __init r8a7740_cpg_clocks_init(struct device_node *np)
clk = r8a7740_cpg_register_clock(np, cpg, name); clk = r8a7740_cpg_register_clock(np, cpg, name);
if (IS_ERR(clk)) if (IS_ERR(clk))
pr_err("%s: failed to register %s %s clock (%ld)\n", pr_err("%s: failed to register %pOFn %s clock (%ld)\n",
__func__, np->name, name, PTR_ERR(clk)); __func__, np, name, PTR_ERR(clk));
else else
cpg->data.clks[i] = clk; cpg->data.clks[i] = clk;
} }
......
...@@ -130,8 +130,8 @@ static void __init r8a7778_cpg_clocks_init(struct device_node *np) ...@@ -130,8 +130,8 @@ static void __init r8a7778_cpg_clocks_init(struct device_node *np)
clk = r8a7778_cpg_register_clock(np, cpg, name); clk = r8a7778_cpg_register_clock(np, cpg, name);
if (IS_ERR(clk)) if (IS_ERR(clk))
pr_err("%s: failed to register %s %s clock (%ld)\n", pr_err("%s: failed to register %pOFn %s clock (%ld)\n",
__func__, np->name, name, PTR_ERR(clk)); __func__, np, name, PTR_ERR(clk));
else else
cpg->data.clks[i] = clk; cpg->data.clks[i] = clk;
} }
......
...@@ -164,8 +164,8 @@ static void __init r8a7779_cpg_clocks_init(struct device_node *np) ...@@ -164,8 +164,8 @@ static void __init r8a7779_cpg_clocks_init(struct device_node *np)
clk = r8a7779_cpg_register_clock(np, cpg, config, clk = r8a7779_cpg_register_clock(np, cpg, config,
plla_mult, name); plla_mult, name);
if (IS_ERR(clk)) if (IS_ERR(clk))
pr_err("%s: failed to register %s %s clock (%ld)\n", pr_err("%s: failed to register %pOFn %s clock (%ld)\n",
__func__, np->name, name, PTR_ERR(clk)); __func__, np, name, PTR_ERR(clk));
else else
cpg->data.clks[i] = clk; cpg->data.clks[i] = clk;
} }
......
...@@ -445,8 +445,8 @@ static void __init rcar_gen2_cpg_clocks_init(struct device_node *np) ...@@ -445,8 +445,8 @@ static void __init rcar_gen2_cpg_clocks_init(struct device_node *np)
clk = rcar_gen2_cpg_register_clock(np, cpg, config, name); clk = rcar_gen2_cpg_register_clock(np, cpg, config, name);
if (IS_ERR(clk)) if (IS_ERR(clk))
pr_err("%s: failed to register %s %s clock (%ld)\n", pr_err("%s: failed to register %pOFn %s clock (%ld)\n",
__func__, np->name, name, PTR_ERR(clk)); __func__, np, name, PTR_ERR(clk));
else else
cpg->data.clks[i] = clk; cpg->data.clks[i] = clk;
} }
......
...@@ -113,8 +113,8 @@ static void __init rz_cpg_clocks_init(struct device_node *np) ...@@ -113,8 +113,8 @@ static void __init rz_cpg_clocks_init(struct device_node *np)
clk = rz_cpg_register_clock(np, cpg, name); clk = rz_cpg_register_clock(np, cpg, name);
if (IS_ERR(clk)) if (IS_ERR(clk))
pr_err("%s: failed to register %s %s clock (%ld)\n", pr_err("%s: failed to register %pOFn %s clock (%ld)\n",
__func__, np->name, name, PTR_ERR(clk)); __func__, np, name, PTR_ERR(clk));
else else
cpg->data.clks[i] = clk; cpg->data.clks[i] = clk;
} }
......
...@@ -206,8 +206,8 @@ static void __init sh73a0_cpg_clocks_init(struct device_node *np) ...@@ -206,8 +206,8 @@ static void __init sh73a0_cpg_clocks_init(struct device_node *np)
clk = sh73a0_cpg_register_clock(np, cpg, name); clk = sh73a0_cpg_register_clock(np, cpg, name);
if (IS_ERR(clk)) if (IS_ERR(clk))
pr_err("%s: failed to register %s %s clock (%ld)\n", pr_err("%s: failed to register %pOFn %s clock (%ld)\n",
__func__, np->name, name, PTR_ERR(clk)); __func__, np, name, PTR_ERR(clk));
else else
cpg->data.clks[i] = clk; cpg->data.clks[i] = clk;
} }
......
...@@ -936,7 +936,7 @@ static void __init st_of_quadfs_setup(struct device_node *np, ...@@ -936,7 +936,7 @@ static void __init st_of_quadfs_setup(struct device_node *np,
if (!clk_parent_name) if (!clk_parent_name)
return; return;
pll_name = kasprintf(GFP_KERNEL, "%s.pll", np->name); pll_name = kasprintf(GFP_KERNEL, "%pOFn.pll", np);
if (!pll_name) if (!pll_name)
return; return;
......
...@@ -140,8 +140,8 @@ static void __init sun9i_a80_mod0_setup(struct device_node *node) ...@@ -140,8 +140,8 @@ static void __init sun9i_a80_mod0_setup(struct device_node *node)
reg = of_io_request_and_map(node, 0, of_node_full_name(node)); reg = of_io_request_and_map(node, 0, of_node_full_name(node));
if (IS_ERR(reg)) { if (IS_ERR(reg)) {
pr_err("Could not get registers for mod0-clk: %s\n", pr_err("Could not get registers for mod0-clk: %pOFn\n",
node->name); node);
return; return;
} }
...@@ -306,7 +306,7 @@ static void __init sunxi_mmc_setup(struct device_node *node, ...@@ -306,7 +306,7 @@ static void __init sunxi_mmc_setup(struct device_node *node,
reg = of_io_request_and_map(node, 0, of_node_full_name(node)); reg = of_io_request_and_map(node, 0, of_node_full_name(node));
if (IS_ERR(reg)) { if (IS_ERR(reg)) {
pr_err("Couldn't map the %s clock registers\n", node->name); pr_err("Couldn't map the %pOFn clock registers\n", node);
return; return;
} }
......
...@@ -88,8 +88,8 @@ static void __init sun9i_a80_pll4_setup(struct device_node *node) ...@@ -88,8 +88,8 @@ static void __init sun9i_a80_pll4_setup(struct device_node *node)
reg = of_io_request_and_map(node, 0, of_node_full_name(node)); reg = of_io_request_and_map(node, 0, of_node_full_name(node));
if (IS_ERR(reg)) { if (IS_ERR(reg)) {
pr_err("Could not get registers for a80-pll4-clk: %s\n", pr_err("Could not get registers for a80-pll4-clk: %pOFn\n",
node->name); node);
return; return;
} }
...@@ -142,8 +142,8 @@ static void __init sun9i_a80_gt_setup(struct device_node *node) ...@@ -142,8 +142,8 @@ static void __init sun9i_a80_gt_setup(struct device_node *node)
reg = of_io_request_and_map(node, 0, of_node_full_name(node)); reg = of_io_request_and_map(node, 0, of_node_full_name(node));
if (IS_ERR(reg)) { if (IS_ERR(reg)) {
pr_err("Could not get registers for a80-gt-clk: %s\n", pr_err("Could not get registers for a80-gt-clk: %pOFn\n",
node->name); node);
return; return;
} }
...@@ -197,8 +197,8 @@ static void __init sun9i_a80_ahb_setup(struct device_node *node) ...@@ -197,8 +197,8 @@ static void __init sun9i_a80_ahb_setup(struct device_node *node)
reg = of_io_request_and_map(node, 0, of_node_full_name(node)); reg = of_io_request_and_map(node, 0, of_node_full_name(node));
if (IS_ERR(reg)) { if (IS_ERR(reg)) {
pr_err("Could not get registers for a80-ahb-clk: %s\n", pr_err("Could not get registers for a80-ahb-clk: %pOFn\n",
node->name); node);
return; return;
} }
...@@ -223,8 +223,8 @@ static void __init sun9i_a80_apb0_setup(struct device_node *node) ...@@ -223,8 +223,8 @@ static void __init sun9i_a80_apb0_setup(struct device_node *node)
reg = of_io_request_and_map(node, 0, of_node_full_name(node)); reg = of_io_request_and_map(node, 0, of_node_full_name(node));
if (IS_ERR(reg)) { if (IS_ERR(reg)) {
pr_err("Could not get registers for a80-apb0-clk: %s\n", pr_err("Could not get registers for a80-apb0-clk: %pOFn\n",
node->name); node);
return; return;
} }
...@@ -280,8 +280,8 @@ static void __init sun9i_a80_apb1_setup(struct device_node *node) ...@@ -280,8 +280,8 @@ static void __init sun9i_a80_apb1_setup(struct device_node *node)
reg = of_io_request_and_map(node, 0, of_node_full_name(node)); reg = of_io_request_and_map(node, 0, of_node_full_name(node));
if (IS_ERR(reg)) { if (IS_ERR(reg)) {
pr_err("Could not get registers for a80-apb1-clk: %s\n", pr_err("Could not get registers for a80-apb1-clk: %pOFn\n",
node->name); node);
return; return;
} }
......
...@@ -568,8 +568,8 @@ static struct clk * __init sunxi_factors_clk_setup(struct device_node *node, ...@@ -568,8 +568,8 @@ static struct clk * __init sunxi_factors_clk_setup(struct device_node *node,
reg = of_iomap(node, 0); reg = of_iomap(node, 0);
if (!reg) { if (!reg) {
pr_err("Could not get registers for factors-clk: %s\n", pr_err("Could not get registers for factors-clk: %pOFn\n",
node->name); node);
return NULL; return NULL;
} }
......
...@@ -143,8 +143,8 @@ static void __init omap_clk_register_apll(void *user, ...@@ -143,8 +143,8 @@ static void __init omap_clk_register_apll(void *user,
clk = of_clk_get(node, 0); clk = of_clk_get(node, 0);
if (IS_ERR(clk)) { if (IS_ERR(clk)) {
pr_debug("clk-ref for %s not ready, retry\n", pr_debug("clk-ref for %pOFn not ready, retry\n",
node->name); node);
if (!ti_clk_retry_init(node, hw, omap_clk_register_apll)) if (!ti_clk_retry_init(node, hw, omap_clk_register_apll))
return; return;
...@@ -155,8 +155,8 @@ static void __init omap_clk_register_apll(void *user, ...@@ -155,8 +155,8 @@ static void __init omap_clk_register_apll(void *user,
clk = of_clk_get(node, 1); clk = of_clk_get(node, 1);
if (IS_ERR(clk)) { if (IS_ERR(clk)) {
pr_debug("clk-bypass for %s not ready, retry\n", pr_debug("clk-bypass for %pOFn not ready, retry\n",
node->name); node);
if (!ti_clk_retry_init(node, hw, omap_clk_register_apll)) if (!ti_clk_retry_init(node, hw, omap_clk_register_apll))
return; return;
...@@ -202,7 +202,7 @@ static void __init of_dra7_apll_setup(struct device_node *node) ...@@ -202,7 +202,7 @@ static void __init of_dra7_apll_setup(struct device_node *node)
init->num_parents = of_clk_get_parent_count(node); init->num_parents = of_clk_get_parent_count(node);
if (init->num_parents < 1) { if (init->num_parents < 1) {
pr_err("dra7 apll %s must have parent(s)\n", node->name); pr_err("dra7 apll %pOFn must have parent(s)\n", node);
goto cleanup; goto cleanup;
} }
...@@ -366,7 +366,7 @@ static void __init of_omap2_apll_setup(struct device_node *node) ...@@ -366,7 +366,7 @@ static void __init of_omap2_apll_setup(struct device_node *node)
init->num_parents = of_clk_get_parent_count(node); init->num_parents = of_clk_get_parent_count(node);
if (init->num_parents != 1) { if (init->num_parents != 1) {
pr_err("%s must have one parent\n", node->name); pr_err("%pOFn must have one parent\n", node);
goto cleanup; goto cleanup;
} }
...@@ -374,13 +374,13 @@ static void __init of_omap2_apll_setup(struct device_node *node) ...@@ -374,13 +374,13 @@ static void __init of_omap2_apll_setup(struct device_node *node)
init->parent_names = &parent_name; init->parent_names = &parent_name;
if (of_property_read_u32(node, "ti,clock-frequency", &val)) { if (of_property_read_u32(node, "ti,clock-frequency", &val)) {
pr_err("%s missing clock-frequency\n", node->name); pr_err("%pOFn missing clock-frequency\n", node);
goto cleanup; goto cleanup;
} }
clk_hw->fixed_rate = val; clk_hw->fixed_rate = val;
if (of_property_read_u32(node, "ti,bit-shift", &val)) { if (of_property_read_u32(node, "ti,bit-shift", &val)) {
pr_err("%s missing bit-shift\n", node->name); pr_err("%pOFn missing bit-shift\n", node);
goto cleanup; goto cleanup;
} }
...@@ -389,7 +389,7 @@ static void __init of_omap2_apll_setup(struct device_node *node) ...@@ -389,7 +389,7 @@ static void __init of_omap2_apll_setup(struct device_node *node)
ad->autoidle_mask = 0x3 << val; ad->autoidle_mask = 0x3 << val;
if (of_property_read_u32(node, "ti,idlest-shift", &val)) { if (of_property_read_u32(node, "ti,idlest-shift", &val)) {
pr_err("%s missing idlest-shift\n", node->name); pr_err("%pOFn missing idlest-shift\n", node);
goto cleanup; goto cleanup;
} }
......
...@@ -190,8 +190,8 @@ static void __init of_dra7_atl_clock_setup(struct device_node *node) ...@@ -190,8 +190,8 @@ static void __init of_dra7_atl_clock_setup(struct device_node *node)
init.num_parents = of_clk_get_parent_count(node); init.num_parents = of_clk_get_parent_count(node);
if (init.num_parents != 1) { if (init.num_parents != 1) {
pr_err("%s: atl clock %s must have 1 parent\n", __func__, pr_err("%s: atl clock %pOFn must have 1 parent\n", __func__,
node->name); node);
goto cleanup; goto cleanup;
} }
......
...@@ -223,7 +223,7 @@ int __init ti_clk_retry_init(struct device_node *node, void *user, ...@@ -223,7 +223,7 @@ int __init ti_clk_retry_init(struct device_node *node, void *user,
{ {
struct clk_init_item *retry; struct clk_init_item *retry;
pr_debug("%s: adding to retry list...\n", node->name); pr_debug("%pOFn: adding to retry list...\n", node);
retry = kzalloc(sizeof(*retry), GFP_KERNEL); retry = kzalloc(sizeof(*retry), GFP_KERNEL);
if (!retry) if (!retry)
return -ENOMEM; return -ENOMEM;
...@@ -258,14 +258,14 @@ int ti_clk_get_reg_addr(struct device_node *node, int index, ...@@ -258,14 +258,14 @@ int ti_clk_get_reg_addr(struct device_node *node, int index,
} }
if (i == CLK_MAX_MEMMAPS) { if (i == CLK_MAX_MEMMAPS) {
pr_err("clk-provider not found for %s!\n", node->name); pr_err("clk-provider not found for %pOFn!\n", node);
return -ENOENT; return -ENOENT;
} }
reg->index = i; reg->index = i;
if (of_property_read_u32_index(node, "reg", index, &val)) { if (of_property_read_u32_index(node, "reg", index, &val)) {
pr_err("%s must have reg[%d]!\n", node->name, index); pr_err("%pOFn must have reg[%d]!\n", node, index);
return -EINVAL; return -EINVAL;
} }
...@@ -312,7 +312,7 @@ int __init omap2_clk_provider_init(struct device_node *parent, int index, ...@@ -312,7 +312,7 @@ int __init omap2_clk_provider_init(struct device_node *parent, int index,
/* get clocks for this parent */ /* get clocks for this parent */
clocks = of_get_child_by_name(parent, "clocks"); clocks = of_get_child_by_name(parent, "clocks");
if (!clocks) { if (!clocks) {
pr_err("%s missing 'clocks' child node.\n", parent->name); pr_err("%pOFn missing 'clocks' child node.\n", parent);
return -EINVAL; return -EINVAL;
} }
...@@ -365,7 +365,7 @@ void ti_dt_clk_init_retry_clks(void) ...@@ -365,7 +365,7 @@ void ti_dt_clk_init_retry_clks(void)
while (!list_empty(&retry_list) && retries) { while (!list_empty(&retry_list) && retries) {
list_for_each_entry_safe(retry, tmp, &retry_list, link) { list_for_each_entry_safe(retry, tmp, &retry_list, link) {
pr_debug("retry-init: %s\n", retry->node->name); pr_debug("retry-init: %pOFn\n", retry->node);
retry->func(retry->user, retry->node); retry->func(retry->user, retry->node);
list_del(&retry->link); list_del(&retry->link);
kfree(retry); kfree(retry);
......
...@@ -259,8 +259,8 @@ _ti_clkctrl_clk_register(struct omap_clkctrl_provider *provider, ...@@ -259,8 +259,8 @@ _ti_clkctrl_clk_register(struct omap_clkctrl_provider *provider,
struct omap_clkctrl_clk *clkctrl_clk; struct omap_clkctrl_clk *clkctrl_clk;
int ret = 0; int ret = 0;
init.name = kasprintf(GFP_KERNEL, "%s:%s:%04x:%d", node->parent->name, init.name = kasprintf(GFP_KERNEL, "%pOFn:%pOFn:%04x:%d", node->parent,
node->name, offset, bit); node, offset, bit);
clkctrl_clk = kzalloc(sizeof(*clkctrl_clk), GFP_KERNEL); clkctrl_clk = kzalloc(sizeof(*clkctrl_clk), GFP_KERNEL);
if (!init.name || !clkctrl_clk) { if (!init.name || !clkctrl_clk) {
ret = -ENOMEM; ret = -ENOMEM;
...@@ -492,8 +492,7 @@ static void __init _ti_omap4_clkctrl_setup(struct device_node *node) ...@@ -492,8 +492,7 @@ static void __init _ti_omap4_clkctrl_setup(struct device_node *node)
provider->base = of_iomap(node, 0); provider->base = of_iomap(node, 0);
provider->clkdm_name = kmalloc(strlen(node->parent->name) + 3, provider->clkdm_name = kasprintf(GFP_KERNEL, "%pOFnxxx", node->parent);
GFP_KERNEL);
if (!provider->clkdm_name) { if (!provider->clkdm_name) {
kfree(provider); kfree(provider);
return; return;
...@@ -503,8 +502,7 @@ static void __init _ti_omap4_clkctrl_setup(struct device_node *node) ...@@ -503,8 +502,7 @@ static void __init _ti_omap4_clkctrl_setup(struct device_node *node)
* Create default clkdm name, replace _cm from end of parent node * Create default clkdm name, replace _cm from end of parent node
* name with _clkdm * name with _clkdm
*/ */
strcpy(provider->clkdm_name, node->parent->name); provider->clkdm_name[strlen(provider->clkdm_name) - 5] = 0;
provider->clkdm_name[strlen(provider->clkdm_name) - 2] = 0;
strcat(provider->clkdm_name, "clkdm"); strcat(provider->clkdm_name, "clkdm");
INIT_LIST_HEAD(&provider->clocks); INIT_LIST_HEAD(&provider->clocks);
...@@ -539,8 +537,8 @@ static void __init _ti_omap4_clkctrl_setup(struct device_node *node) ...@@ -539,8 +537,8 @@ static void __init _ti_omap4_clkctrl_setup(struct device_node *node)
init.flags = 0; init.flags = 0;
if (reg_data->flags & CLKF_SET_RATE_PARENT) if (reg_data->flags & CLKF_SET_RATE_PARENT)
init.flags |= CLK_SET_RATE_PARENT; init.flags |= CLK_SET_RATE_PARENT;
init.name = kasprintf(GFP_KERNEL, "%s:%s:%04x:%d", init.name = kasprintf(GFP_KERNEL, "%pOFn:%pOFn:%04x:%d",
node->parent->name, node->name, node->parent, node,
reg_data->offset, 0); reg_data->offset, 0);
clkctrl_clk = kzalloc(sizeof(*clkctrl_clk), GFP_KERNEL); clkctrl_clk = kzalloc(sizeof(*clkctrl_clk), GFP_KERNEL);
if (!init.name || !clkctrl_clk) if (!init.name || !clkctrl_clk)
......
...@@ -135,8 +135,8 @@ static void __init _register_composite(void *user, ...@@ -135,8 +135,8 @@ static void __init _register_composite(void *user,
comp = _lookup_component(cclk->comp_nodes[i]); comp = _lookup_component(cclk->comp_nodes[i]);
if (!comp) { if (!comp) {
pr_debug("component %s not ready for %s, retry\n", pr_debug("component %s not ready for %pOFn, retry\n",
cclk->comp_nodes[i]->name, node->name); cclk->comp_nodes[i]->name, node);
if (!ti_clk_retry_init(node, hw, if (!ti_clk_retry_init(node, hw,
_register_composite)) _register_composite))
return; return;
...@@ -144,8 +144,8 @@ static void __init _register_composite(void *user, ...@@ -144,8 +144,8 @@ static void __init _register_composite(void *user,
goto cleanup; goto cleanup;
} }
if (cclk->comp_clks[comp->type] != NULL) { if (cclk->comp_clks[comp->type] != NULL) {
pr_err("duplicate component types for %s (%s)!\n", pr_err("duplicate component types for %pOFn (%s)!\n",
node->name, component_clk_types[comp->type]); node, component_clk_types[comp->type]);
goto cleanup; goto cleanup;
} }
...@@ -168,7 +168,7 @@ static void __init _register_composite(void *user, ...@@ -168,7 +168,7 @@ static void __init _register_composite(void *user,
} }
if (!num_parents) { if (!num_parents) {
pr_err("%s: no parents found for %s!\n", __func__, node->name); pr_err("%s: no parents found for %pOFn!\n", __func__, node);
goto cleanup; goto cleanup;
} }
...@@ -212,7 +212,7 @@ static void __init of_ti_composite_clk_setup(struct device_node *node) ...@@ -212,7 +212,7 @@ static void __init of_ti_composite_clk_setup(struct device_node *node)
num_clks = of_clk_get_parent_count(node); num_clks = of_clk_get_parent_count(node);
if (!num_clks) { if (!num_clks) {
pr_err("composite clk %s must have component(s)\n", node->name); pr_err("composite clk %pOFn must have component(s)\n", node);
return; return;
} }
...@@ -248,7 +248,7 @@ int __init ti_clk_add_component(struct device_node *node, struct clk_hw *hw, ...@@ -248,7 +248,7 @@ int __init ti_clk_add_component(struct device_node *node, struct clk_hw *hw,
num_parents = of_clk_get_parent_count(node); num_parents = of_clk_get_parent_count(node);
if (!num_parents) { if (!num_parents) {
pr_err("component-clock %s must have parent(s)\n", node->name); pr_err("component-clock %pOFn must have parent(s)\n", node);
return -EINVAL; return -EINVAL;
} }
......
...@@ -492,7 +492,7 @@ __init ti_clk_get_div_table(struct device_node *node) ...@@ -492,7 +492,7 @@ __init ti_clk_get_div_table(struct device_node *node)
} }
if (!valid_div) { if (!valid_div) {
pr_err("no valid dividers for %s table\n", node->name); pr_err("no valid dividers for %pOFn table\n", node);
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);
} }
...@@ -530,7 +530,7 @@ static int _get_divider_width(struct device_node *node, ...@@ -530,7 +530,7 @@ static int _get_divider_width(struct device_node *node,
min_div = 1; min_div = 1;
if (of_property_read_u32(node, "ti,max-div", &max_div)) { if (of_property_read_u32(node, "ti,max-div", &max_div)) {
pr_err("no max-div for %s!\n", node->name); pr_err("no max-div for %pOFn!\n", node);
return -EINVAL; return -EINVAL;
} }
......
...@@ -162,8 +162,8 @@ static void __init _register_dpll(void *user, ...@@ -162,8 +162,8 @@ static void __init _register_dpll(void *user,
clk = of_clk_get(node, 0); clk = of_clk_get(node, 0);
if (IS_ERR(clk)) { if (IS_ERR(clk)) {
pr_debug("clk-ref missing for %s, retry later\n", pr_debug("clk-ref missing for %pOFn, retry later\n",
node->name); node);
if (!ti_clk_retry_init(node, hw, _register_dpll)) if (!ti_clk_retry_init(node, hw, _register_dpll))
return; return;
...@@ -175,8 +175,8 @@ static void __init _register_dpll(void *user, ...@@ -175,8 +175,8 @@ static void __init _register_dpll(void *user,
clk = of_clk_get(node, 1); clk = of_clk_get(node, 1);
if (IS_ERR(clk)) { if (IS_ERR(clk)) {
pr_debug("clk-bypass missing for %s, retry later\n", pr_debug("clk-bypass missing for %pOFn, retry later\n",
node->name); node);
if (!ti_clk_retry_init(node, hw, _register_dpll)) if (!ti_clk_retry_init(node, hw, _register_dpll))
return; return;
...@@ -226,7 +226,7 @@ static void _register_dpll_x2(struct device_node *node, ...@@ -226,7 +226,7 @@ static void _register_dpll_x2(struct device_node *node,
parent_name = of_clk_get_parent_name(node, 0); parent_name = of_clk_get_parent_name(node, 0);
if (!parent_name) { if (!parent_name) {
pr_err("%s must have parent\n", node->name); pr_err("%pOFn must have parent\n", node);
return; return;
} }
...@@ -305,7 +305,7 @@ static void __init of_ti_dpll_setup(struct device_node *node, ...@@ -305,7 +305,7 @@ static void __init of_ti_dpll_setup(struct device_node *node,
init->num_parents = of_clk_get_parent_count(node); init->num_parents = of_clk_get_parent_count(node);
if (!init->num_parents) { if (!init->num_parents) {
pr_err("%s must have parent(s)\n", node->name); pr_err("%pOFn must have parent(s)\n", node);
goto cleanup; goto cleanup;
} }
......
...@@ -555,7 +555,7 @@ static void __init ti_fapll_setup(struct device_node *node) ...@@ -555,7 +555,7 @@ static void __init ti_fapll_setup(struct device_node *node)
init->num_parents = of_clk_get_parent_count(node); init->num_parents = of_clk_get_parent_count(node);
if (init->num_parents != 2) { if (init->num_parents != 2) {
pr_err("%s must have two parents\n", node->name); pr_err("%pOFn must have two parents\n", node);
goto free; goto free;
} }
...@@ -564,19 +564,19 @@ static void __init ti_fapll_setup(struct device_node *node) ...@@ -564,19 +564,19 @@ static void __init ti_fapll_setup(struct device_node *node)
fd->clk_ref = of_clk_get(node, 0); fd->clk_ref = of_clk_get(node, 0);
if (IS_ERR(fd->clk_ref)) { if (IS_ERR(fd->clk_ref)) {
pr_err("%s could not get clk_ref\n", node->name); pr_err("%pOFn could not get clk_ref\n", node);
goto free; goto free;
} }
fd->clk_bypass = of_clk_get(node, 1); fd->clk_bypass = of_clk_get(node, 1);
if (IS_ERR(fd->clk_bypass)) { if (IS_ERR(fd->clk_bypass)) {
pr_err("%s could not get clk_bypass\n", node->name); pr_err("%pOFn could not get clk_bypass\n", node);
goto free; goto free;
} }
fd->base = of_iomap(node, 0); fd->base = of_iomap(node, 0);
if (!fd->base) { if (!fd->base) {
pr_err("%s could not get IO base\n", node->name); pr_err("%pOFn could not get IO base\n", node);
goto free; goto free;
} }
......
...@@ -42,12 +42,12 @@ static void __init of_ti_fixed_factor_clk_setup(struct device_node *node) ...@@ -42,12 +42,12 @@ static void __init of_ti_fixed_factor_clk_setup(struct device_node *node)
u32 flags = 0; u32 flags = 0;
if (of_property_read_u32(node, "ti,clock-div", &div)) { if (of_property_read_u32(node, "ti,clock-div", &div)) {
pr_err("%s must have a clock-div property\n", node->name); pr_err("%pOFn must have a clock-div property\n", node);
return; return;
} }
if (of_property_read_u32(node, "ti,clock-mult", &mult)) { if (of_property_read_u32(node, "ti,clock-mult", &mult)) {
pr_err("%s must have a clock-mult property\n", node->name); pr_err("%pOFn must have a clock-mult property\n", node);
return; return;
} }
......
...@@ -179,7 +179,7 @@ static void __init _of_ti_gate_clk_setup(struct device_node *node, ...@@ -179,7 +179,7 @@ static void __init _of_ti_gate_clk_setup(struct device_node *node,
} }
if (of_clk_get_parent_count(node) != 1) { if (of_clk_get_parent_count(node) != 1) {
pr_err("%s must have 1 parent\n", node->name); pr_err("%pOFn must have 1 parent\n", node);
return; return;
} }
......
...@@ -84,7 +84,7 @@ static void __init _of_ti_interface_clk_setup(struct device_node *node, ...@@ -84,7 +84,7 @@ static void __init _of_ti_interface_clk_setup(struct device_node *node,
parent_name = of_clk_get_parent_name(node, 0); parent_name = of_clk_get_parent_name(node, 0);
if (!parent_name) { if (!parent_name) {
pr_err("%s must have a parent\n", node->name); pr_err("%pOFn must have a parent\n", node);
return; return;
} }
......
...@@ -186,7 +186,7 @@ static void of_mux_clk_setup(struct device_node *node) ...@@ -186,7 +186,7 @@ static void of_mux_clk_setup(struct device_node *node)
num_parents = of_clk_get_parent_count(node); num_parents = of_clk_get_parent_count(node);
if (num_parents < 2) { if (num_parents < 2) {
pr_err("mux-clock %s must have parents\n", node->name); pr_err("mux-clock %pOFn must have parents\n", node);
return; return;
} }
parent_names = kzalloc((sizeof(char *) * num_parents), GFP_KERNEL); parent_names = kzalloc((sizeof(char *) * num_parents), GFP_KERNEL);
...@@ -278,7 +278,7 @@ static void __init of_ti_composite_mux_clk_setup(struct device_node *node) ...@@ -278,7 +278,7 @@ static void __init of_ti_composite_mux_clk_setup(struct device_node *node)
num_parents = of_clk_get_parent_count(node); num_parents = of_clk_get_parent_count(node);
if (num_parents < 2) { if (num_parents < 2) {
pr_err("%s must have parents\n", node->name); pr_err("%pOFn must have parents\n", node);
goto cleanup; goto cleanup;
} }
......
...@@ -602,7 +602,7 @@ void __init zynq_clock_init(void) ...@@ -602,7 +602,7 @@ void __init zynq_clock_init(void)
} }
if (of_address_to_resource(np, 0, &res)) { if (of_address_to_resource(np, 0, &res)) {
pr_err("%s: failed to get resource\n", np->name); pr_err("%pOFn: failed to get resource\n", np);
goto np_err; goto np_err;
} }
...@@ -611,7 +611,7 @@ void __init zynq_clock_init(void) ...@@ -611,7 +611,7 @@ void __init zynq_clock_init(void)
if (slcr->data) { if (slcr->data) {
zynq_clkc_base = (__force void __iomem *)slcr->data + res.start; zynq_clkc_base = (__force void __iomem *)slcr->data + res.start;
} else { } else {
pr_err("%s: Unable to get I/O memory\n", np->name); pr_err("%pOFn: Unable to get I/O memory\n", np);
of_node_put(slcr); of_node_put(slcr);
goto np_err; goto np_err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment