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>
This commit is contained in:
parent
5f33af4c00
commit
762fd3ab6d
1 changed files with 7 additions and 2 deletions
|
@ -196,8 +196,13 @@ static int scom_debug_init(void)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
i = rc = 0;
|
i = rc = 0;
|
||||||
for_each_node_with_property(dn, "scom-controller")
|
for_each_node_with_property(dn, "scom-controller") {
|
||||||
rc |= scom_debug_init_one(root, dn, i++);
|
int id = of_get_ibm_chip_id(dn);
|
||||||
|
if (id == -1)
|
||||||
|
id = i;
|
||||||
|
rc |= scom_debug_init_one(root, dn, id);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue