drivers/mtd/sst.c: Fixes for 512 byte sector mode. From David Sidrane

This commit is contained in:
Gregory Nutt 2013-10-27 18:53:09 -06:00
parent d812f25496
commit 6eba2e7897
1 changed files with 1 additions and 1 deletions

View File

@ -1155,7 +1155,7 @@ static int sst25_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg)
#ifdef CONFIG_SST25_SECTOR512 #ifdef CONFIG_SST25_SECTOR512
geo->blocksize = (1 << SST25_SECTOR_SHIFT); geo->blocksize = (1 << SST25_SECTOR_SHIFT);
geo->erasesize = (1 << SST25_SECTOR_SHIFT); geo->erasesize = (1 << SST25_SECTOR_SHIFT);
geo->neraseblocks = priv->nsectors << (priv->sectorshift - ); geo->neraseblocks = priv->nsectors << (priv->sectorshift - 9);
#else #else
geo->blocksize = (1 << priv->sectorshift); geo->blocksize = (1 << priv->sectorshift);
geo->erasesize = (1 << priv->sectorshift); geo->erasesize = (1 << priv->sectorshift);