@@ -268,7 +268,7 @@ struct flash_info {
unsigned sector_size;
u16 n_sectors;
- u16 page_size;
+ u32 page_size;
u16 addr_width;
u32 flags;
@@ -319,7 +319,7 @@ struct flash_info {
};
/* Used when the "_ext_id" is two bytes at most */
-#define INFO(_jedec_id, _ext_id, _sector_size, _n_sectors, _flags) \
+#define INFO_PGZ(_jedec_id, _ext_id, _sector_size, _n_sectors, _page_size, _flags) \
.id = { \
((_jedec_id) >> 16) & 0xff, \
((_jedec_id) >> 8) & 0xff, \
@@ -330,9 +330,12 @@ struct flash_info {
.id_len = (!(_jedec_id) ? 0 : (3 + ((_ext_id) ? 2 : 0))), \
.sector_size = (_sector_size), \
.n_sectors = (_n_sectors), \
- .page_size = 256, \
+ .page_size = (_page_size), \
.flags = (_flags),
+#define INFO(_jedec_id, _ext_id, _sector_size, _n_sectors, _flags) \
+ INFO_PGZ(_jedec_id, _ext_id, _sector_size, _n_sectors, 256, _flags)
+
#define INFO6(_jedec_id, _ext_id, _sector_size, _n_sectors, _flags) \
.id = { \
((_jedec_id) >> 16) & 0xff, \
Allow much larger page sizes than just 256 bytes. Signed-off-by: Richard Weinberger <richard@nod.at> --- drivers/mtd/spi-nor/core.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)