mmc: Tegra: Fix calculation for partial_win_tap
Graziano Misuraca [Thu, 28 Feb 2013 23:02:50 +0000 (15:02 -0800)]
Bug 1241780

Change-Id: I1dd88a0a463fa90908a4a4bfe749fa526eba3689
Signed-off-by: Graziano Misuraca <gmisuraca@nvidia.com>
Reviewed-on: http://git-master/r/205283
Reviewed-by: Riham Haidar <rhaidar@nvidia.com>
Tested-by: Riham Haidar <rhaidar@nvidia.com>

drivers/mmc/host/sdhci-tegra.c

index ca506f8..7f6aa10 100644 (file)
@@ -1220,7 +1220,8 @@ static void calculate_high_freq_tap_value(struct sdhci_host *sdhci)
                vmax_tap_data->full_win_begin));
        partial_win_tap = ((vmid_tap_data->partial_win -
                vmid_tap_data->sampling_point) +
-               (partial_win_start + vmax_tap_data->sampling_point)) / 2;
+               (partial_win_start + vmax_tap_data->sampling_point));
+       partial_win_tap >>= 1;
        if (partial_win_tap < 0)
                partial_win_tap = 0;
        partial_win_quality = (vmid_tap_data->partial_win -