From b1fa91a681797e4d133a1d047880548bcde3d11f Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 26 May 2015 06:46:09 -0600 Subject: [PATCH] MTD: Increase size of the geometry structure to support FLASH parts with 246KiB erase blocks --- include/nuttx/mtd/mtd.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/include/nuttx/mtd/mtd.h b/include/nuttx/mtd/mtd.h index b2a192c9756..4162cde6f9f 100644 --- a/include/nuttx/mtd/mtd.h +++ b/include/nuttx/mtd/mtd.h @@ -2,7 +2,7 @@ * include/nuttx/mtd/mtd.h * Memory Technology Device (MTD) interface * - * Copyright (C) 2009-2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2009-2013, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -83,10 +83,11 @@ struct mtd_geometry_s { - 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 */ + uint16_t blocksize; /* Size of one read/write block. */ + /* Probably 16-bits wasted here for alignment */ + uint32_t erasesize; /* Size of one erase blocks -- must be a multiple + * of blocksize.*/ + uint32_t neraseblocks; /* Number of erase blocks */ }; /* The following defines the information for writing bytes to a sector