summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-12-20 13:00:10 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2013-12-20 15:04:30 +0100
commitd7fe5e2263ae24df5938c220b62029f6131543a1 (patch)
tree8de1764a1eabe2529adae2ba82e90d32d64c1677 /drivers
parent080a4e9c9b43d0a1cda7726bf14a828d4eff3b01 (diff)
downloadbarebox-d7fe5e2263ae24df5938c220b62029f6131543a1.tar.gz
barebox-d7fe5e2263ae24df5938c220b62029f6131543a1.tar.xz
mtd: Add subpagesize to mtd_info_user
ubiformat needs the subpagesize to work correctly. The kernel uses sysfs to pass the subpagesize, but in barebox we have the possibility to extend struct mtd_info_user. Add a corresponding field and use it in ubiformat. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mtd/core.c b/drivers/mtd/core.c
index fc2ac00336..6db1c6db32 100644
--- a/drivers/mtd/core.c
+++ b/drivers/mtd/core.c
@@ -236,6 +236,7 @@ int mtd_ioctl(struct cdev *cdev, int request, void *buf)
user->erasesize = mtd->erasesize;
user->writesize = mtd->writesize;
user->oobsize = mtd->oobsize;
+ user->subpagesize = mtd->writesize >> mtd->subpage_sft;
user->mtd = mtd;
/* The below fields are obsolete */
user->ecctype = -1;