mirror of
https://github.com/apache/nuttx.git
synced 2026-05-20 20:44:39 +08:00
drivers/mtd/s25fl1.c: During a MTDIOC_GEOMETRY ioctl call, the driver was incorrectly reporting the blocksize to be the same as the erasesize. The blocksize should be 256 (the page size). This patch fixes that, and now the SmartFS configration is working.
This commit is contained in:
@@ -1375,7 +1375,7 @@ static int s25fl1_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg)
|
||||
geo->erasesize = (1 << S25FL1_SECTOR512_SHIFT);
|
||||
geo->neraseblocks = priv->nsectors << (priv->sectorshift - S25FL1_SECTOR512_SHIFT);
|
||||
#else
|
||||
geo->blocksize = (1 << priv->sectorshift);
|
||||
geo->blocksize = (1 << priv->pageshift);
|
||||
geo->erasesize = (1 << priv->sectorshift);
|
||||
geo->neraseblocks = priv->nsectors;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user