OMAP: HSMMC: avoid erratum workaround when transceiver is attached
authorGrazvydas Ignotas <notasas@gmail.com>
Thu, 15 Mar 2012 23:02:35 +0000 (01:02 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Mon, 19 Mar 2012 23:28:21 +0000 (01:28 +0200)
If transceiver is attached to a MMC host of ES2.1 OMAP, it seems
2.1.1.128 erratum doesn't apply and there is no data corruption,
probably because of different signal timing. The workaround for this
erratum disables multiblock reads, which causes dramatic loss of
performance (over 75% slower), so avoid it when transceiver is present.

Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
arch/arm/mach-omap2/hsmmc.c

index a771fad..606a8cd 100644 (file)
@@ -439,6 +439,13 @@ void __init omap_init_hsmmc(struct omap2_hsmmc_info *hsmmcinfo, int ctrl_nr)
        if (oh->dev_attr != NULL) {
                mmc_dev_attr = oh->dev_attr;
                mmc_data->controller_flags = mmc_dev_attr->flags;
+               /*
+                * erratum 2.1.1.128 doesn't apply if board has
+                * a transceiver is attached
+                */
+               if (hsmmcinfo->transceiver)
+                       mmc_data->controller_flags &=
+                               ~OMAP_HSMMC_BROKEN_MULTIBLOCK_READ;
        }
 
        pdev = omap_device_build(name, ctrl_nr - 1, oh, mmc_data,