Skip to content

Commit

Permalink
powerpc/microwatt: Populate platform bus from device-tree
Browse files Browse the repository at this point in the history
Just like any other embedded platform.

Add an empty soc node.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Reviewed-by: Segher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/YMwWx98+PMibZq/G@thinks.paulus.ozlabs.org
  • Loading branch information
Benjamin Herrenschmidt authored and Michael Ellerman committed Jun 21, 2021
1 parent 151b88e commit 0d0f9e5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions arch/powerpc/boot/dts/microwatt.dts
Original file line number Diff line number Diff line change
Expand Up @@ -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>;
};
};
8 changes: 8 additions & 0 deletions arch/powerpc/platforms/microwatt/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#include <linux/kernel.h>
#include <linux/stddef.h>
#include <linux/init.h>
#include <linux/of.h>
#include <linux/of_platform.h>
#include <asm/machdep.h>
#include <asm/time.h>

Expand All @@ -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,
Expand Down

0 comments on commit 0d0f9e5

Please sign in to comment.