summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/sm_common.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2013-03-19 10:47:56 +0200
committerDavid Woodhouse <David.Woodhouse@intel.com>2013-04-05 13:22:06 +0100
commit0c4a235cb3c6464fd1886101fa9a1be933e340dd (patch)
tree78c362de9c24878713b8dee646a0bef1cd57df4d /drivers/mtd/nand/sm_common.c
parent5bfa9b71a2d6642506e2dfdf49a66620f54f1d92 (diff)
downloadlinux-0c4a235cb3c6464fd1886101fa9a1be933e340dd.tar.bz2
mtd: nand_ids: use size macros
Use the convenient 'SZ_8K' and 'SZ_16K' macros for the eraseblock size in the NAND IDs table. This is a little more readable. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/nand/sm_common.c')
-rw-r--r--drivers/mtd/nand/sm_common.c51
1 files changed, 26 insertions, 25 deletions
diff --git a/drivers/mtd/nand/sm_common.c b/drivers/mtd/nand/sm_common.c
index 7bcab623acc3..e8181edebddd 100644
--- a/drivers/mtd/nand/sm_common.c
+++ b/drivers/mtd/nand/sm_common.c
@@ -9,6 +9,7 @@
#include <linux/kernel.h>
#include <linux/mtd/nand.h>
#include <linux/module.h>
+#include <linux/sizes.h>
#include "sm_common.h"
static struct nand_ecclayout nand_oob_sm = {
@@ -68,35 +69,35 @@ static int sm_block_markbad(struct mtd_info *mtd, loff_t ofs)
}
static struct nand_flash_dev nand_smartmedia_flash_ids[] = {
- LEGACY_ID_NAND("SmartMedia 2MiB 3,3V ROM", 0x5d, 2, 0x2000, NAND_ROM),
- LEGACY_ID_NAND("SmartMedia 4MiB 3,3V", 0xe3, 4, 0x2000, 0),
- LEGACY_ID_NAND("SmartMedia 4MiB 3,3/5V", 0xe5, 4, 0x2000, 0),
- LEGACY_ID_NAND("SmartMedia 4MiB 5V", 0x6b, 4, 0x2000, 0),
- LEGACY_ID_NAND("SmartMedia 4MiB 3,3V ROM", 0xd5, 4, 0x2000, NAND_ROM),
- LEGACY_ID_NAND("SmartMedia 8MiB 3,3V", 0xe6, 8, 0x2000, 0),
- LEGACY_ID_NAND("SmartMedia 8MiB 3,3V ROM", 0xd6, 8, 0x2000, NAND_ROM),
- LEGACY_ID_NAND("SmartMedia 16MiB 3,3V", 0x73, 16, 0x4000, 0),
- LEGACY_ID_NAND("SmartMedia 16MiB 3,3V ROM", 0x57, 16, 0x4000, NAND_ROM),
- LEGACY_ID_NAND("SmartMedia 32MiB 3,3V", 0x75, 32, 0x4000, 0),
- LEGACY_ID_NAND("SmartMedia 32MiB 3,3V ROM", 0x58, 32, 0x4000, NAND_ROM),
- LEGACY_ID_NAND("SmartMedia 64MiB 3,3V", 0x76, 64, 0x4000, 0),
- LEGACY_ID_NAND("SmartMedia 64MiB 3,3V ROM", 0xd9, 64, 0x4000, NAND_ROM),
- LEGACY_ID_NAND("SmartMedia 128MiB 3,3V", 0x79, 128, 0x4000, 0),
- LEGACY_ID_NAND("SmartMedia 128MiB 3,3V ROM", 0xda, 128, 0x4000, NAND_ROM),
- LEGACY_ID_NAND("SmartMedia 256MiB 3, 3V", 0x71, 256, 0x4000, 0),
- LEGACY_ID_NAND("SmartMedia 256MiB 3,3V ROM", 0x5b, 256, 0x4000, NAND_ROM),
+ LEGACY_ID_NAND("SmartMedia 2MiB 3,3V ROM", 0x5d, 2, SZ_8K, NAND_ROM),
+ LEGACY_ID_NAND("SmartMedia 4MiB 3,3V", 0xe3, 4, SZ_8K, 0),
+ LEGACY_ID_NAND("SmartMedia 4MiB 3,3/5V", 0xe5, 4, SZ_8K, 0),
+ LEGACY_ID_NAND("SmartMedia 4MiB 5V", 0x6b, 4, SZ_8K, 0),
+ LEGACY_ID_NAND("SmartMedia 4MiB 3,3V ROM", 0xd5, 4, SZ_8K, NAND_ROM),
+ LEGACY_ID_NAND("SmartMedia 8MiB 3,3V", 0xe6, 8, SZ_8K, 0),
+ LEGACY_ID_NAND("SmartMedia 8MiB 3,3V ROM", 0xd6, 8, SZ_8K, NAND_ROM),
+ LEGACY_ID_NAND("SmartMedia 16MiB 3,3V", 0x73, 16, SZ_16K, 0),
+ LEGACY_ID_NAND("SmartMedia 16MiB 3,3V ROM", 0x57, 16, SZ_16K, NAND_ROM),
+ LEGACY_ID_NAND("SmartMedia 32MiB 3,3V", 0x75, 32, SZ_16K, 0),
+ LEGACY_ID_NAND("SmartMedia 32MiB 3,3V ROM", 0x58, 32, SZ_16K, NAND_ROM),
+ LEGACY_ID_NAND("SmartMedia 64MiB 3,3V", 0x76, 64, SZ_16K, 0),
+ LEGACY_ID_NAND("SmartMedia 64MiB 3,3V ROM", 0xd9, 64, SZ_16K, NAND_ROM),
+ LEGACY_ID_NAND("SmartMedia 128MiB 3,3V", 0x79, 128, SZ_16K, 0),
+ LEGACY_ID_NAND("SmartMedia 128MiB 3,3V ROM", 0xda, 128, SZ_16K, NAND_ROM),
+ LEGACY_ID_NAND("SmartMedia 256MiB 3, 3V", 0x71, 256, SZ_16K, 0),
+ LEGACY_ID_NAND("SmartMedia 256MiB 3,3V ROM", 0x5b, 256, SZ_16K, NAND_ROM),
{NULL}
};
static struct nand_flash_dev nand_xd_flash_ids[] = {
- LEGACY_ID_NAND("xD 16MiB 3,3V", 0x73, 16, 0x4000, 0),
- LEGACY_ID_NAND("xD 32MiB 3,3V", 0x75, 32, 0x4000, 0),
- LEGACY_ID_NAND("xD 64MiB 3,3V", 0x76, 64, 0x4000, 0),
- LEGACY_ID_NAND("xD 128MiB 3,3V", 0x79, 128, 0x4000, 0),
- LEGACY_ID_NAND("xD 256MiB 3,3V", 0x71, 256, 0x4000, NAND_BROKEN_XD),
- LEGACY_ID_NAND("xD 512MiB 3,3V", 0xdc, 512, 0x4000, NAND_BROKEN_XD),
- LEGACY_ID_NAND("xD 1GiB 3,3V", 0xd3, 1024, 0x4000, NAND_BROKEN_XD),
- LEGACY_ID_NAND("xD 2GiB 3,3V", 0xd5, 2048, 0x4000, NAND_BROKEN_XD),
+ LEGACY_ID_NAND("xD 16MiB 3,3V", 0x73, 16, SZ_16K, 0),
+ LEGACY_ID_NAND("xD 32MiB 3,3V", 0x75, 32, SZ_16K, 0),
+ LEGACY_ID_NAND("xD 64MiB 3,3V", 0x76, 64, SZ_16K, 0),
+ LEGACY_ID_NAND("xD 128MiB 3,3V", 0x79, 128, SZ_16K, 0),
+ LEGACY_ID_NAND("xD 256MiB 3,3V", 0x71, 256, SZ_16K, NAND_BROKEN_XD),
+ LEGACY_ID_NAND("xD 512MiB 3,3V", 0xdc, 512, SZ_16K, NAND_BROKEN_XD),
+ LEGACY_ID_NAND("xD 1GiB 3,3V", 0xd3, 1024, SZ_16K, NAND_BROKEN_XD),
+ LEGACY_ID_NAND("xD 2GiB 3,3V", 0xd5, 2048, SZ_16K, NAND_BROKEN_XD),
{NULL}
};