mtd: handle partitioning on devices with 0 erasesize
authorChris Packham <chris.packham@alliedtelesis.co.nz>
Fri, 9 Jun 2017 03:58:31 +0000 (15:58 +1200)
committerBrian Norris <computersforpeace@gmail.com>
Tue, 13 Jun 2017 17:00:55 +0000 (10:00 -0700)
commit1eeef2d7483a7e3f8d2dd2a5b9939b3b814dc549
treed640a89b2e161c18606348a885fd5434e5d143a9
parentc46adf0976eacadd60920da5b8bf8e27299183bd
mtd: handle partitioning on devices with 0 erasesize

erasesize is meaningful for flash devices but for SRAM there is no
concept of an erase block so erasesize is set to 0. When partitioning
these devices instead of ensuring partitions fall on erasesize
boundaries we ensure they fall on writesize boundaries.

Helped-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/mtdpart.c