aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/of/platform.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@linaro.org>2014-05-22 18:50:50 -0400
committerGrant Likely <grant.likely@linaro.org>2014-05-22 19:28:02 -0400
commitba52464a629fab2493925007b00f2ca65d02ed4e (patch)
tree89e9308cbdd7002a32bf7f3a42b8442bf0ba54d9 /drivers/of/platform.c
parent07e461cd7e73a84f0e3757932b93cc80976fd749 (diff)
of: Stop naming platform_device using dcr address
There is now a way to ensure all platform devices get a unique name when populated from the device tree, and the DCR_NATIVE code path is broken anyway. PowerPC Cell (PS3) is the only platform that actually uses this path. Most likely nobody will notice if it is killed. Remove the code and associated ugly #ifdef. The user-visible impact of this patch is that any DCR device on Cell will get a new name in the /sys/devices hierarchy. Signed-off-by: Grant Likely <grant.likely@linaro.org> Cc: Rob Herring <robh@kernel.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/of/platform.c')
-rw-r--r--drivers/of/platform.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index 95c133a0554b..52780a72d09d 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -51,10 +51,6 @@ struct platform_device *of_find_device_by_node(struct device_node *np)
51} 51}
52EXPORT_SYMBOL(of_find_device_by_node); 52EXPORT_SYMBOL(of_find_device_by_node);
53 53
54#if defined(CONFIG_PPC_DCR)
55#include <asm/dcr.h>
56#endif
57
58#ifdef CONFIG_OF_ADDRESS 54#ifdef CONFIG_OF_ADDRESS
59/* 55/*
60 * The following routines scan a subtree and registers a device for 56 * The following routines scan a subtree and registers a device for
@@ -78,26 +74,6 @@ void of_device_make_bus_id(struct device *dev)
78 const __be32 *reg; 74 const __be32 *reg;
79 u64 addr; 75 u64 addr;
80 76
81#ifdef CONFIG_PPC_DCR
82 /*
83 * If it's a DCR based device, use 'd' for native DCRs
84 * and 'D' for MMIO DCRs.
85 */
86 reg = of_get_property(node, "dcr-reg", NULL);
87 if (reg) {
88#ifdef CONFIG_PPC_DCR_NATIVE
89 dev_set_name(dev, "d%x.%s", *reg, node->name);
90#else /* CONFIG_PPC_DCR_NATIVE */
91 u64 addr = of_translate_dcr_address(node, *reg, NULL);
92 if (addr != OF_BAD_ADDR) {
93 dev_set_name(dev, "D%llx.%s",
94 (unsigned long long)addr, node->name);
95 return;
96 }
97#endif /* !CONFIG_PPC_DCR_NATIVE */
98 }
99#endif /* CONFIG_PPC_DCR */
100
101 /* Construct the name, using parent nodes if necessary to ensure uniqueness */ 77 /* Construct the name, using parent nodes if necessary to ensure uniqueness */
102 while (node->parent) { 78 while (node->parent) {
103 /* 79 /*