Commit 2f071ff1 authored by Chris Packham's avatar Chris Packham Committed by Brian Norris

mtd: mchp23k256: add partitioning support

Setting the of_node for the mtd device allows the generic mtd code to
setup the partitions.

[Editorial note (Brian): patch still pending on fixing up the "aligned
to eraseblock" partition sanity check, given that this SRAM has no
eraseblocks.]
Signed-off-by: default avatarChris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Tested-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
parent 44225c9c
...@@ -143,6 +143,7 @@ static int mchp23k256_probe(struct spi_device *spi) ...@@ -143,6 +143,7 @@ static int mchp23k256_probe(struct spi_device *spi)
data = dev_get_platdata(&spi->dev); data = dev_get_platdata(&spi->dev);
mtd_set_of_node(&flash->mtd, spi->dev.of_node);
flash->mtd.dev.parent = &spi->dev; flash->mtd.dev.parent = &spi->dev;
flash->mtd.type = MTD_RAM; flash->mtd.type = MTD_RAM;
flash->mtd.flags = MTD_CAP_RAM; flash->mtd.flags = MTD_CAP_RAM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment