From 0d0f9e5f2fa7aacf22892078a1065fa5d0ce941b Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Fri, 18 Jun 2021 13:45:11 +1000 Subject: [PATCH] powerpc/microwatt: Populate platform bus from device-tree Just like any other embedded platform. Add an empty soc node. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras Reviewed-by: Segher Boessenkool Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/YMwWx98+PMibZq/G@thinks.paulus.ozlabs.org --- arch/powerpc/boot/dts/microwatt.dts | 7 +++++++ arch/powerpc/platforms/microwatt/setup.c | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/arch/powerpc/boot/dts/microwatt.dts b/arch/powerpc/boot/dts/microwatt.dts index ac264ad..9b6140c 100644 --- a/arch/powerpc/boot/dts/microwatt.dts +++ b/arch/powerpc/boot/dts/microwatt.dts @@ -95,4 +95,11 @@ 00 00 00 00 00 00 00 00 40 00 40]; }; + soc@c0000000 { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + + ranges = <0 0 0xc0000000 0x40000000>; + }; }; diff --git a/arch/powerpc/platforms/microwatt/setup.c b/arch/powerpc/platforms/microwatt/setup.c index d80d526..5af4adf 100644 --- a/arch/powerpc/platforms/microwatt/setup.c +++ b/arch/powerpc/platforms/microwatt/setup.c @@ -8,6 +8,8 @@ #include #include #include +#include +#include #include #include @@ -16,6 +18,12 @@ static int __init microwatt_probe(void) return of_machine_is_compatible("microwatt-soc"); } +static int __init microwatt_populate(void) +{ + return of_platform_default_populate(NULL, NULL, NULL); +} +machine_arch_initcall(microwatt, microwatt_populate); + define_machine(microwatt) { .name = "microwatt", .probe = microwatt_probe, -- 2.7.4