On certain systems, such as the Talos II, skiboot emits a partition table for the main PNOR MTD device in the generated device tree. Allow this partition table to be parsed and the partitions to be exposed via MTD device partition nodes. Signed-off-by: Timothy Pearson <tpearson at raptorengineering.com> --- drivers/mtd/devices/powernv_flash.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/devices/powernv_flash.c b/drivers/mtd/devices/powernv_flash.c index c1312b141ae0..a2c6b30925c4 100644 --- a/drivers/mtd/devices/powernv_flash.c +++ b/drivers/mtd/devices/powernv_flash.c @@ -2,6 +2,7 @@ * OPAL PNOR flash MTD abstraction * * Copyright IBM 2015 + * Copyright Raptor Engineering, LLC 2018 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -259,8 +260,10 @@ static int powernv_flash_probe(struct platform_device *pdev) /* * The current flash that skiboot exposes is one contiguous flash chip * with an ffs partition at the start, it should prove easier for users - * to deal with partitions or not as they see fit + * to deal with partitions or not as they see fit. skiboot places this + * on the first MTD partition. */ + mtd_set_of_node(&data->mtd, dev->of_node); return mtd_device_register(&data->mtd, NULL, 0); } -- 2.18.0