soc: Convert to using %pOF instead of full_name
Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring <robh@kernel.org> Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Matthias Brugger <matthias.bgg@gmail.com> Acked-by: Simon Horman <horms+renesas@verge.net.au> Cc: Scott Wood <oss@buserror.net> Cc: Qiang Zhao <qiang.zhao@nxp.com> Cc: Magnus Damm <magnus.damm@gmail.com> Cc: Kukjin Kim <kgene@kernel.org> Cc: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
Родитель
9c0982d809
Коммит
37c342cba5
|
@ -177,8 +177,8 @@ static int fsl_bman_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||||
if (!res) {
|
if (!res) {
|
||||||
dev_err(dev, "Can't get %s property 'IORESOURCE_MEM'\n",
|
dev_err(dev, "Can't get %pOF property 'IORESOURCE_MEM'\n",
|
||||||
node->full_name);
|
node);
|
||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
}
|
}
|
||||||
bm_ccsr_start = devm_ioremap(dev, res->start, resource_size(res));
|
bm_ccsr_start = devm_ioremap(dev, res->start, resource_size(res));
|
||||||
|
@ -205,14 +205,14 @@ static int fsl_bman_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
err_irq = platform_get_irq(pdev, 0);
|
err_irq = platform_get_irq(pdev, 0);
|
||||||
if (err_irq <= 0) {
|
if (err_irq <= 0) {
|
||||||
dev_info(dev, "Can't get %s IRQ\n", node->full_name);
|
dev_info(dev, "Can't get %pOF IRQ\n", node);
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
ret = devm_request_irq(dev, err_irq, bman_isr, IRQF_SHARED, "bman-err",
|
ret = devm_request_irq(dev, err_irq, bman_isr, IRQF_SHARED, "bman-err",
|
||||||
dev);
|
dev);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(dev, "devm_request_irq() failed %d for '%s'\n",
|
dev_err(dev, "devm_request_irq() failed %d for '%pOF'\n",
|
||||||
ret, node->full_name);
|
ret, node);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
/* Disable Buffer Pool State Change */
|
/* Disable Buffer Pool State Change */
|
||||||
|
|
|
@ -103,16 +103,14 @@ static int bman_portal_probe(struct platform_device *pdev)
|
||||||
addr_phys[0] = platform_get_resource(pdev, IORESOURCE_MEM,
|
addr_phys[0] = platform_get_resource(pdev, IORESOURCE_MEM,
|
||||||
DPAA_PORTAL_CE);
|
DPAA_PORTAL_CE);
|
||||||
if (!addr_phys[0]) {
|
if (!addr_phys[0]) {
|
||||||
dev_err(dev, "Can't get %s property 'reg::CE'\n",
|
dev_err(dev, "Can't get %pOF property 'reg::CE'\n", node);
|
||||||
node->full_name);
|
|
||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
addr_phys[1] = platform_get_resource(pdev, IORESOURCE_MEM,
|
addr_phys[1] = platform_get_resource(pdev, IORESOURCE_MEM,
|
||||||
DPAA_PORTAL_CI);
|
DPAA_PORTAL_CI);
|
||||||
if (!addr_phys[1]) {
|
if (!addr_phys[1]) {
|
||||||
dev_err(dev, "Can't get %s property 'reg::CI'\n",
|
dev_err(dev, "Can't get %pOF property 'reg::CI'\n", node);
|
||||||
node->full_name);
|
|
||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,7 +118,7 @@ static int bman_portal_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
irq = platform_get_irq(pdev, 0);
|
irq = platform_get_irq(pdev, 0);
|
||||||
if (irq <= 0) {
|
if (irq <= 0) {
|
||||||
dev_err(dev, "Can't get %s IRQ'\n", node->full_name);
|
dev_err(dev, "Can't get %pOF IRQ'\n", node);
|
||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
}
|
}
|
||||||
pcfg->irq = irq;
|
pcfg->irq = irq;
|
||||||
|
|
|
@ -695,8 +695,8 @@ static int fsl_qman_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||||
if (!res) {
|
if (!res) {
|
||||||
dev_err(dev, "Can't get %s property 'IORESOURCE_MEM'\n",
|
dev_err(dev, "Can't get %pOF property 'IORESOURCE_MEM'\n",
|
||||||
node->full_name);
|
node);
|
||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
}
|
}
|
||||||
qm_ccsr_start = devm_ioremap(dev, res->start, resource_size(res));
|
qm_ccsr_start = devm_ioremap(dev, res->start, resource_size(res));
|
||||||
|
@ -740,15 +740,15 @@ static int fsl_qman_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
err_irq = platform_get_irq(pdev, 0);
|
err_irq = platform_get_irq(pdev, 0);
|
||||||
if (err_irq <= 0) {
|
if (err_irq <= 0) {
|
||||||
dev_info(dev, "Can't get %s property 'interrupts'\n",
|
dev_info(dev, "Can't get %pOF property 'interrupts'\n",
|
||||||
node->full_name);
|
node);
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
ret = devm_request_irq(dev, err_irq, qman_isr, IRQF_SHARED, "qman-err",
|
ret = devm_request_irq(dev, err_irq, qman_isr, IRQF_SHARED, "qman-err",
|
||||||
dev);
|
dev);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(dev, "devm_request_irq() failed %d for '%s'\n",
|
dev_err(dev, "devm_request_irq() failed %d for '%pOF'\n",
|
||||||
ret, node->full_name);
|
ret, node);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -237,30 +237,27 @@ static int qman_portal_probe(struct platform_device *pdev)
|
||||||
addr_phys[0] = platform_get_resource(pdev, IORESOURCE_MEM,
|
addr_phys[0] = platform_get_resource(pdev, IORESOURCE_MEM,
|
||||||
DPAA_PORTAL_CE);
|
DPAA_PORTAL_CE);
|
||||||
if (!addr_phys[0]) {
|
if (!addr_phys[0]) {
|
||||||
dev_err(dev, "Can't get %s property 'reg::CE'\n",
|
dev_err(dev, "Can't get %pOF property 'reg::CE'\n", node);
|
||||||
node->full_name);
|
|
||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
addr_phys[1] = platform_get_resource(pdev, IORESOURCE_MEM,
|
addr_phys[1] = platform_get_resource(pdev, IORESOURCE_MEM,
|
||||||
DPAA_PORTAL_CI);
|
DPAA_PORTAL_CI);
|
||||||
if (!addr_phys[1]) {
|
if (!addr_phys[1]) {
|
||||||
dev_err(dev, "Can't get %s property 'reg::CI'\n",
|
dev_err(dev, "Can't get %pOF property 'reg::CI'\n", node);
|
||||||
node->full_name);
|
|
||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = of_property_read_u32(node, "cell-index", &val);
|
err = of_property_read_u32(node, "cell-index", &val);
|
||||||
if (err) {
|
if (err) {
|
||||||
dev_err(dev, "Can't get %s property 'cell-index'\n",
|
dev_err(dev, "Can't get %pOF property 'cell-index'\n", node);
|
||||||
node->full_name);
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
pcfg->channel = val;
|
pcfg->channel = val;
|
||||||
pcfg->cpu = -1;
|
pcfg->cpu = -1;
|
||||||
irq = platform_get_irq(pdev, 0);
|
irq = platform_get_irq(pdev, 0);
|
||||||
if (irq <= 0) {
|
if (irq <= 0) {
|
||||||
dev_err(dev, "Can't get %s IRQ\n", node->full_name);
|
dev_err(dev, "Can't get %pOF IRQ\n", node);
|
||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
}
|
}
|
||||||
pcfg->irq = irq;
|
pcfg->irq = irq;
|
||||||
|
|
|
@ -304,8 +304,8 @@ static int __init qe_add_gpiochips(void)
|
||||||
goto err;
|
goto err;
|
||||||
continue;
|
continue;
|
||||||
err:
|
err:
|
||||||
pr_err("%s: registration failed with status %d\n",
|
pr_err("%pOF: registration failed with status %d\n",
|
||||||
np->full_name, ret);
|
np, ret);
|
||||||
kfree(qe_gc);
|
kfree(qe_gc);
|
||||||
/* try others anyway */
|
/* try others anyway */
|
||||||
}
|
}
|
||||||
|
|
|
@ -1233,8 +1233,8 @@ static int pwrap_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
ret = of_platform_populate(np, NULL, NULL, wrp->dev);
|
ret = of_platform_populate(np, NULL, NULL, wrp->dev);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_dbg(wrp->dev, "failed to create child devices at %s\n",
|
dev_dbg(wrp->dev, "failed to create child devices at %pOF\n",
|
||||||
np->full_name);
|
np);
|
||||||
goto err_out2;
|
goto err_out2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ static int __init rcar_rst_init(void)
|
||||||
|
|
||||||
base = of_iomap(np, 0);
|
base = of_iomap(np, 0);
|
||||||
if (!base) {
|
if (!base) {
|
||||||
pr_warn("%s: Cannot map regs\n", np->full_name);
|
pr_warn("%pOF: Cannot map regs\n", np);
|
||||||
error = -ENOMEM;
|
error = -ENOMEM;
|
||||||
goto out_put;
|
goto out_put;
|
||||||
}
|
}
|
||||||
|
@ -70,7 +70,7 @@ static int __init rcar_rst_init(void)
|
||||||
cfg = match->data;
|
cfg = match->data;
|
||||||
saved_mode = ioread32(base + cfg->modemr);
|
saved_mode = ioread32(base + cfg->modemr);
|
||||||
|
|
||||||
pr_debug("%s: MODE = 0x%08x\n", np->full_name, saved_mode);
|
pr_debug("%pOF: MODE = 0x%08x\n", np, saved_mode);
|
||||||
|
|
||||||
out_put:
|
out_put:
|
||||||
of_node_put(np);
|
of_node_put(np);
|
||||||
|
|
|
@ -323,7 +323,7 @@ static int __init rcar_sysc_pd_init(void)
|
||||||
|
|
||||||
base = of_iomap(np, 0);
|
base = of_iomap(np, 0);
|
||||||
if (!base) {
|
if (!base) {
|
||||||
pr_warn("%s: Cannot map regs\n", np->full_name);
|
pr_warn("%pOF: Cannot map regs\n", np);
|
||||||
error = -ENOMEM;
|
error = -ENOMEM;
|
||||||
goto out_put;
|
goto out_put;
|
||||||
}
|
}
|
||||||
|
@ -348,13 +348,13 @@ static int __init rcar_sysc_pd_init(void)
|
||||||
*/
|
*/
|
||||||
syscimr = ioread32(base + SYSCIMR);
|
syscimr = ioread32(base + SYSCIMR);
|
||||||
syscimr |= syscier;
|
syscimr |= syscier;
|
||||||
pr_debug("%s: syscimr = 0x%08x\n", np->full_name, syscimr);
|
pr_debug("%pOF: syscimr = 0x%08x\n", np, syscimr);
|
||||||
iowrite32(syscimr, base + SYSCIMR);
|
iowrite32(syscimr, base + SYSCIMR);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* SYSC needs all interrupt sources enabled to control power.
|
* SYSC needs all interrupt sources enabled to control power.
|
||||||
*/
|
*/
|
||||||
pr_debug("%s: syscier = 0x%08x\n", np->full_name, syscier);
|
pr_debug("%pOF: syscier = 0x%08x\n", np, syscier);
|
||||||
iowrite32(syscier, base + SYSCIER);
|
iowrite32(syscier, base + SYSCIER);
|
||||||
|
|
||||||
for (i = 0; i < info->num_areas; i++) {
|
for (i = 0; i < info->num_areas; i++) {
|
||||||
|
|
|
@ -237,11 +237,11 @@ no_clk:
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (of_genpd_add_subdomain(&parent, &child))
|
if (of_genpd_add_subdomain(&parent, &child))
|
||||||
pr_warn("%s failed to add subdomain: %s\n",
|
pr_warn("%pOF failed to add subdomain: %pOF\n",
|
||||||
parent.np->full_name, child.np->full_name);
|
parent.np, child.np);
|
||||||
else
|
else
|
||||||
pr_info("%s has as child subdomain: %s.\n",
|
pr_info("%pOF has as child subdomain: %pOF.\n",
|
||||||
parent.np->full_name, child.np->full_name);
|
parent.np, child.np);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче