@@ -21,6 +21,13 @@ config MMC_BLOCK_QUIRKS
help
Say Y here to enable various workarounds for known cards.
+config MMC_BLOCK_QUIRK_TOSHIBA_MMC32G
+ tristate "Toshiba MMC32G quirks"
+ depends on MMC_BLOCK_QUIRKS
+ default n
+ help
+ Say Y if you have a Toshiba MMC32G eMMC card.
+
config MMC_BLOCK_BOUNCE
bool "Use bounce buffer for simple hosts"
depends on MMC_BLOCK
@@ -109,3 +109,33 @@ int mmc_blk_quirk_register(struct mmc_blk_quirk *quirk, bool is_mmc)
rb_insert_color(&quirk->rb_node, &quirk_tree[!is_mmc]);
return 0;
}
+
+#ifdef CONFIG_MMC_BLOCK_QUIRK_TOSHIBA_MMC32G
+static int toshiba_mmc32g(struct mmc_blk_data *md, struct mmc_card *card)
+{
+ printk(KERN_INFO "Applying Toshiba MMC32G workarounds\n");
+
+ /* Page size 8K, this card doesn't like unaligned writes
+ across 8K boundary. */
+ md->write_align_size = 8192;
+ return 0;
+}
+
+static struct mmc_blk_quirk toshiba_mmc32g_q = {
+ .name = "MMC32G",
+ .manfid = 0x11,
+ .oemid = 0x0100,
+
+ /* Any date, any revision, */
+ .rev_start = 0,
+ .rev_end = (u64) -1,
+ .probe = toshiba_mmc32g
+};
+
+int __init mmc_toshiba_quirks(void)
+{
+ return mmc_blk_quirk_register(&toshiba_mmc32g_q, true);
+}
+
+device_initcall(mmc_toshiba_quirks);
+#endif /* CONFIG_MMC_BLOCK_QUIRK_TOSHIBA_MMC32G */