projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5f33af4
)
powerpc/scom: Create debugfs files using ibm,chip-id if available
author
Benjamin Herrenschmidt
<
[email protected]
>
Thu, 29 Aug 2013 06:56:59 +0000
(16:56 +1000)
committer
Benjamin Herrenschmidt
<
[email protected]
>
Fri, 11 Oct 2013 05:53:41 +0000
(16:53 +1100)
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 <
[email protected]
>
arch/powerpc/sysdev/scom.c
patch
|
blob
|
history
diff --git
a/arch/powerpc/sysdev/scom.c
b/arch/powerpc/sysdev/scom.c
index 413622d54395405a597bf9836f29ffb63719a827..cb20d542a5aafd3f3fb43292a288934708a1bbb9 100644
(file)
--- 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;
}