[PATCH] powernv: Search for new flash DT node location
Jack Miller
jack at codezen.org
Tue Aug 2 06:50:35 AEST 2016
Skiboot will place the flash device tree node at ibm,opal/flash/flash at 0
on P9 and later systems, so Linux needs to search for it there as well
as ibm,opal/flash at 0 for backwards compatibility.
Signed-off-by: Jack Miller <jack at codezen.org>
---
arch/powerpc/platforms/powernv/opal.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c
index ae29eaf..2847cb0 100644
--- a/arch/powerpc/platforms/powernv/opal.c
+++ b/arch/powerpc/platforms/powernv/opal.c
@@ -755,9 +755,14 @@ static int __init opal_init(void)
/* Initialize platform devices: IPMI backend, PRD & flash interface */
opal_pdev_init(opal_node, "ibm,opal-ipmi");
- opal_pdev_init(opal_node, "ibm,opal-flash");
+ opal_pdev_init(opal_node, "ibm,opal-flash"); // old <= P8 flash location
opal_pdev_init(opal_node, "ibm,opal-prd");
+ /* New >= P9 flash location */
+ np = of_get_child_by_name(opal_node, "flash");
+ if (np)
+ opal_pdev_init(np, "ibm,opal-flash");
+
/* Initialise OPAL kmsg dumper for flushing console on panic */
opal_kmsg_init();
--
2.9.2
More information about the Linuxppc-dev
mailing list