summaryrefslogtreecommitdiff
path: root/arch/powerpc/sysdev
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-08-29 06:56:59 (GMT)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-10-11 05:53:41 (GMT)
commit762fd3ab6d2c4b438ce49f54860dc509e591209c (patch)
tree246825b8359f906571e4acf373f89bc3f8eaf3ee /arch/powerpc/sysdev
parent5f33af4c0059255bcbf82a98a3789a01171b72e5 (diff)
downloadlinux-fsl-qoriq-762fd3ab6d2c4b438ce49f54860dc509e591209c.tar.xz
powerpc/scom: Create debugfs files using ibm,chip-id if available
When creating the debugfs scom files, use "ibm,chip-id" as the scom%d index rather than a simple made up number when possible. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/sysdev')
-rw-r--r--arch/powerpc/sysdev/scom.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/powerpc/sysdev/scom.c b/arch/powerpc/sysdev/scom.c
index 413622d..cb20d54 100644
--- a/arch/powerpc/sysdev/scom.c
+++ b/arch/powerpc/sysdev/scom.c
@@ -196,8 +196,13 @@ static int scom_debug_init(void)
return -1;
i = rc = 0;
- for_each_node_with_property(dn, "scom-controller")
- rc |= scom_debug_init_one(root, dn, i++);
+ for_each_node_with_property(dn, "scom-controller") {
+ int id = of_get_ibm_chip_id(dn);
+ if (id == -1)
+ id = i;
+ rc |= scom_debug_init_one(root, dn, id);
+ i++;
+ }
return rc;
}