Child nodes with a compatible property are not slices, according to the

devicetree/bindings/mtd/partitions.txt document, so just ignore them.
This commit is contained in:
Ian Lepore 2019-02-27 04:19:29 +00:00
parent db58d718e9
commit 85f55a2a97
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=344615

View File

@ -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;