aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Ball <cjb@laptop.org>2011-11-11 22:01:43 -0500
committerChris Ball <cjb@laptop.org>2012-01-11 23:58:40 -0500
commitc59d44739a8519cb7abdcd7cb7fd88f807dec9fd (patch)
tree0a256af5ab15fba3850b76c543415c89da6d41f1
parentdf16219f365f7f5a2d88a6e123251d57255cca3f (diff)
mmc: card: Use manufacturer ID symbols in card quirks.
No functional change; adds macros for card manufacturer IDs. Signed-off-by: Chris Ball <cjb@laptop.org> Cc: Andrei E. Warkentin <andrey.warkentin@gmail.com> Cc: Stefan Nilsson XK <stefan.xk.nilsson@stericsson.com>
-rw-r--r--drivers/mmc/card/block.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index 1e0e27cbe987..c80bb6de40b8 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -1584,13 +1584,22 @@ static int mmc_add_disk(struct mmc_blk_data *md)
1584 return ret; 1584 return ret;
1585} 1585}
1586 1586
1587#define CID_MANFID_SANDISK 0x2
1588#define CID_MANFID_TOSHIBA 0x11
1589#define CID_MANFID_MICRON 0x13
1590
1587static const struct mmc_fixup blk_fixups[] = 1591static const struct mmc_fixup blk_fixups[] =
1588{ 1592{
1589 MMC_FIXUP("SEM02G", 0x2, 0x100, add_quirk, MMC_QUIRK_INAND_CMD38), 1593 MMC_FIXUP("SEM02G", CID_MANFID_SANDISK, 0x100, add_quirk,
1590 MMC_FIXUP("SEM04G", 0x2, 0x100, add_quirk, MMC_QUIRK_INAND_CMD38), 1594 MMC_QUIRK_INAND_CMD38),
1591 MMC_FIXUP("SEM08G", 0x2, 0x100, add_quirk, MMC_QUIRK_INAND_CMD38), 1595 MMC_FIXUP("SEM04G", CID_MANFID_SANDISK, 0x100, add_quirk,
1592 MMC_FIXUP("SEM16G", 0x2, 0x100, add_quirk, MMC_QUIRK_INAND_CMD38), 1596 MMC_QUIRK_INAND_CMD38),
1593 MMC_FIXUP("SEM32G", 0x2, 0x100, add_quirk, MMC_QUIRK_INAND_CMD38), 1597 MMC_FIXUP("SEM08G", CID_MANFID_SANDISK, 0x100, add_quirk,
1598 MMC_QUIRK_INAND_CMD38),
1599 MMC_FIXUP("SEM16G", CID_MANFID_SANDISK, 0x100, add_quirk,
1600 MMC_QUIRK_INAND_CMD38),
1601 MMC_FIXUP("SEM32G", CID_MANFID_SANDISK, 0x100, add_quirk,
1602 MMC_QUIRK_INAND_CMD38),
1594 1603
1595 /* 1604 /*
1596 * Some MMC cards experience performance degradation with CMD23 1605 * Some MMC cards experience performance degradation with CMD23
@@ -1600,18 +1609,18 @@ static const struct mmc_fixup blk_fixups[] =
1600 * 1609 *
1601 * N.B. This doesn't affect SD cards. 1610 * N.B. This doesn't affect SD cards.
1602 */ 1611 */
1603 MMC_FIXUP("MMC08G", 0x11, CID_OEMID_ANY, add_quirk_mmc, 1612 MMC_FIXUP("MMC08G", CID_MANFID_TOSHIBA, CID_OEMID_ANY, add_quirk_mmc,
1604 MMC_QUIRK_BLK_NO_CMD23), 1613 MMC_QUIRK_BLK_NO_CMD23),
1605 MMC_FIXUP("MMC16G", 0x11, CID_OEMID_ANY, add_quirk_mmc, 1614 MMC_FIXUP("MMC16G", CID_MANFID_TOSHIBA, CID_OEMID_ANY, add_quirk_mmc,
1606 MMC_QUIRK_BLK_NO_CMD23), 1615 MMC_QUIRK_BLK_NO_CMD23),
1607 MMC_FIXUP("MMC32G", 0x11, CID_OEMID_ANY, add_quirk_mmc, 1616 MMC_FIXUP("MMC32G", CID_MANFID_TOSHIBA, CID_OEMID_ANY, add_quirk_mmc,
1608 MMC_QUIRK_BLK_NO_CMD23), 1617 MMC_QUIRK_BLK_NO_CMD23),
1609 1618
1610 /* 1619 /*
1611 * Some Micron MMC cards needs longer data read timeout than 1620 * Some Micron MMC cards needs longer data read timeout than
1612 * indicated in CSD. 1621 * indicated in CSD.
1613 */ 1622 */
1614 MMC_FIXUP(CID_NAME_ANY, 0x13, 0x200, add_quirk_mmc, 1623 MMC_FIXUP(CID_NAME_ANY, CID_MANFID_MICRON, 0x200, add_quirk_mmc,
1615 MMC_QUIRK_LONG_READ_TIME), 1624 MMC_QUIRK_LONG_READ_TIME),
1616 1625
1617 END_FIXUP 1626 END_FIXUP