diff mbox

[v5,4/5] mtd: mchp23k256: add partitioning support

Message ID 20170602032119.22282-5-chris.packham@alliedtelesis.co.nz
State Accepted
Headers show

Commit Message

Chris Packham June 2, 2017, 3:21 a.m. UTC
Setting the of_node for the mtd device allows the generic mtd code to
setup the partitions.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Andrew Lunn <andrew@lunn.ch>
---
Changes in v2
- collect revew/test from Andrew
Changes in v3:
- remove setting of erasesize
Changes in v4:
- none
Changes in v5:
- update commit message

 drivers/mtd/devices/mchp23k256.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Brian Norris June 8, 2017, 11:33 p.m. UTC | #1
On Fri, Jun 02, 2017 at 03:21:18PM +1200, Chris Packham wrote:
> Setting the of_node for the mtd device allows the generic mtd code to
> setup the partitions.
> 
> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> Tested-by: Andrew Lunn <andrew@lunn.ch>

Applied patches 4 and 5, with an editorial note on this one, to note the
outstanding issue about fixing up the eraseblock-boundary check in the
partitioning code.

1 and 2 were already applied, and I had a change request on patch 3.

Regards,
Brian
Chris Packham June 8, 2017, 11:40 p.m. UTC | #2
On 09/06/17 11:33, Brian Norris wrote:
> On Fri, Jun 02, 2017 at 03:21:18PM +1200, Chris Packham wrote:
>> Setting the of_node for the mtd device allows the generic mtd code to
>> setup the partitions.
>>
>> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
>> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
>> Tested-by: Andrew Lunn <andrew@lunn.ch>
> 
> Applied patches 4 and 5, with an editorial note on this one, to note the
> outstanding issue about fixing up the eraseblock-boundary check in the
> partitioning code.
> 
> 1 and 2 were already applied, and I had a change request on patch 3.

Thanks Brian,

I'll take a look at the suggestions on patch 3.
diff mbox

Patch

diff --git a/drivers/mtd/devices/mchp23k256.c b/drivers/mtd/devices/mchp23k256.c
index 2542f5b8b63f..3e5feb454644 100644
--- a/drivers/mtd/devices/mchp23k256.c
+++ b/drivers/mtd/devices/mchp23k256.c
@@ -143,6 +143,7 @@  static int mchp23k256_probe(struct spi_device *spi)
 
 	data = dev_get_platdata(&spi->dev);
 
+	mtd_set_of_node(&flash->mtd, spi->dev.of_node);
 	flash->mtd.dev.parent	= &spi->dev;
 	flash->mtd.type		= MTD_RAM;
 	flash->mtd.flags	= MTD_CAP_RAM;