aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/devices
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2007-06-28 17:38:38 -0400
committerDavid Woodhouse <dwmw2@infradead.org>2007-06-28 17:38:38 -0400
commit02d087dbc8cfade63205ee78612c5fd3762afc03 (patch)
tree26a5d62381cda36729567756cd20050124335991 /drivers/mtd/devices
parentfa0a8c71f352d89c54f2d3a92f7a8a97cdb7d9a4 (diff)
[MTD] m25p80: Use correct units for binary multiples
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'drivers/mtd/devices')
-rw-r--r--drivers/mtd/devices/m25p80.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index 6668a8c27cb7..98df5bcc02f3 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -36,9 +36,9 @@
36#define OPCODE_READ 0x03 /* Read data bytes (low frequency) */ 36#define OPCODE_READ 0x03 /* Read data bytes (low frequency) */
37#define OPCODE_FAST_READ 0x0b /* Read data bytes (high frequency) */ 37#define OPCODE_FAST_READ 0x0b /* Read data bytes (high frequency) */
38#define OPCODE_PP 0x02 /* Page program (up to 256 bytes) */ 38#define OPCODE_PP 0x02 /* Page program (up to 256 bytes) */
39#define OPCODE_BE_4K 0x20 /* Erase 4K block */ 39#define OPCODE_BE_4K 0x20 /* Erase 4KiB block */
40#define OPCODE_BE_32K 0x52 /* Erase 32K block */ 40#define OPCODE_BE_32K 0x52 /* Erase 32KiB block */
41#define OPCODE_SE 0xd8 /* Sector erase (usually 64K) */ 41#define OPCODE_SE 0xd8 /* Sector erase (usually 64KiB) */
42#define OPCODE_RDID 0x9f /* Read JEDEC ID */ 42#define OPCODE_RDID 0x9f /* Read JEDEC ID */
43 43
44/* Status Register bits. */ 44/* Status Register bits. */
@@ -150,7 +150,7 @@ static int wait_till_ready(struct m25p *flash)
150 */ 150 */
151static int erase_sector(struct m25p *flash, u32 offset) 151static int erase_sector(struct m25p *flash, u32 offset)
152{ 152{
153 DEBUG(MTD_DEBUG_LEVEL3, "%s: %s %dK at 0x%08x\n", 153 DEBUG(MTD_DEBUG_LEVEL3, "%s: %s %dKiB at 0x%08x\n",
154 flash->spi->dev.bus_id, __FUNCTION__, 154 flash->spi->dev.bus_id, __FUNCTION__,
155 flash->mtd.erasesize / 1024, offset); 155 flash->mtd.erasesize / 1024, offset);
156 156
@@ -473,7 +473,7 @@ static struct flash_info __devinitdata m25p_data [] = {
473 { "m25pe80", 0x208014, 64 * 1024, 16, }, 473 { "m25pe80", 0x208014, 64 * 1024, 16, },
474 { "m25pe16", 0x208015, 64 * 1024, 32, SECT_4K, }, 474 { "m25pe16", 0x208015, 64 * 1024, 32, SECT_4K, },
475 475
476 /* Winbond -- w25x "blocks" are 64K, "sectors" are 4K */ 476 /* Winbond -- w25x "blocks" are 64K, "sectors" are 4KiB */
477 { "w25x10", 0xef3011, 64 * 1024, 2, SECT_4K, }, 477 { "w25x10", 0xef3011, 64 * 1024, 2, SECT_4K, },
478 { "w25x20", 0xef3012, 64 * 1024, 4, SECT_4K, }, 478 { "w25x20", 0xef3012, 64 * 1024, 4, SECT_4K, },
479 { "w25x40", 0xef3013, 64 * 1024, 8, SECT_4K, }, 479 { "w25x40", 0xef3013, 64 * 1024, 8, SECT_4K, },
@@ -601,8 +601,8 @@ static int __devinit m25p_probe(struct spi_device *spi)
601 flash->mtd.size / 1024); 601 flash->mtd.size / 1024);
602 602
603 DEBUG(MTD_DEBUG_LEVEL2, 603 DEBUG(MTD_DEBUG_LEVEL2,
604 "mtd .name = %s, .size = 0x%.8x (%uM) " 604 "mtd .name = %s, .size = 0x%.8x (%uMiB) "
605 ".erasesize = 0x%.8x (%uK) .numeraseregions = %d\n", 605 ".erasesize = 0x%.8x (%uKiB) .numeraseregions = %d\n",
606 flash->mtd.name, 606 flash->mtd.name,
607 flash->mtd.size, flash->mtd.size / (1024*1024), 607 flash->mtd.size, flash->mtd.size / (1024*1024),
608 flash->mtd.erasesize, flash->mtd.erasesize / 1024, 608 flash->mtd.erasesize, flash->mtd.erasesize / 1024,
@@ -612,7 +612,7 @@ static int __devinit m25p_probe(struct spi_device *spi)
612 for (i = 0; i < flash->mtd.numeraseregions; i++) 612 for (i = 0; i < flash->mtd.numeraseregions; i++)
613 DEBUG(MTD_DEBUG_LEVEL2, 613 DEBUG(MTD_DEBUG_LEVEL2,
614 "mtd.eraseregions[%d] = { .offset = 0x%.8x, " 614 "mtd.eraseregions[%d] = { .offset = 0x%.8x, "
615 ".erasesize = 0x%.8x (%uK), " 615 ".erasesize = 0x%.8x (%uKiB), "
616 ".numblocks = %d }\n", 616 ".numblocks = %d }\n",
617 i, flash->mtd.eraseregions[i].offset, 617 i, flash->mtd.eraseregions[i].offset,
618 flash->mtd.eraseregions[i].erasesize, 618 flash->mtd.eraseregions[i].erasesize,
@@ -643,7 +643,7 @@ static int __devinit m25p_probe(struct spi_device *spi)
643 for (i = 0; i < nr_parts; i++) { 643 for (i = 0; i < nr_parts; i++) {
644 DEBUG(MTD_DEBUG_LEVEL2, "partitions[%d] = " 644 DEBUG(MTD_DEBUG_LEVEL2, "partitions[%d] = "
645 "{.name = %s, .offset = 0x%.8x, " 645 "{.name = %s, .offset = 0x%.8x, "
646 ".size = 0x%.8x (%uK) }\n", 646 ".size = 0x%.8x (%uKiB) }\n",
647 i, parts[i].name, 647 i, parts[i].name,
648 parts[i].offset, 648 parts[i].offset,
649 parts[i].size, 649 parts[i].size,