MTD: Pack the geometry structure so that is can handle larger erase blocks

This commit is contained in:
Gregory Nutt 2013-11-27 11:04:11 -06:00
parent ac275259bd
commit 1fed0407b3
2 changed files with 7 additions and 3 deletions

View File

@ -6106,3 +6106,7 @@
(2013-11-23)
* configs/sama5d3x-ek/src/sam_nand.c: Add support for auto-mounting
NAND MTD block or NXFFS devices (2013-11-25).
* include/mtd/mtd.h: Packed the geometry structure so that it can
support larger erase block sizes without increasing the size of
the geometry structure (2013-11-27).

View File

@ -79,9 +79,9 @@
struct mtd_geometry_s
{
uint16_t blocksize; /* Size of one read/write block */
uint16_t erasesize; /* Size of one erase blocks -- must be a multiple
* of blocksize. */
uint32_t blocksize :14; /* Size of one read/write block. Largest: 16KB-1 */
uint32_t erasesize :18; /* Size of one erase blocks -- must be a multiple
* of blocksize. Largest: 512KB-1 */
size_t neraseblocks; /* Number of erase blocks */
};