From 85f55a2a97a0e7335870697397b6023a12521a78 Mon Sep 17 00:00:00 2001 From: Ian Lepore Date: Wed, 27 Feb 2019 04:19:29 +0000 Subject: [PATCH] Child nodes with a compatible property are not slices, according to the devicetree/bindings/mtd/partitions.txt document, so just ignore them. --- sys/dev/fdt/fdt_slicer.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/dev/fdt/fdt_slicer.c b/sys/dev/fdt/fdt_slicer.c index 03bc6803fab7..61ae3e5e9276 100644 --- a/sys/dev/fdt/fdt_slicer.c +++ b/sys/dev/fdt/fdt_slicer.c @@ -73,6 +73,10 @@ fill_slices(device_t dev, const char *provider __unused, node = ofw_bus_get_node(dev); for (child = OF_child(node); child != 0; child = OF_peer(child)) { + /* Nodes with a compatible property are not slices. */ + if (OF_hasprop(child, "compatible")) + continue; + if (i == FLASH_SLICES_MAX_NUM) { debugf("not enough buffer for slice i=%d\n", i); break;