summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeetesh Burman <jburman@nvidia.com>2015-06-18 11:19:52 +0530
committerWinnie Hsu <whsu@nvidia.com>2015-06-18 15:06:27 -0700
commit936b87435df999e93e6cf7d09bbb988761bcd8e9 (patch)
tree8fb68ca38a52e57cc7c39a19b1993b37d9c0e8d8
parentc733bffbc54e150312334ea74a5e741e04767720 (diff)
Revert "mmc: tegra: Initialize margin addition variables"
This reverts commit af2031797899b32504e32af377fa65875c06a746. Signed-off-by: Jeetesh Burman <jburman@nvidia.com> Change-Id: I21c89606f1eed0e7d4445c5dfcf7e6d2382829e7 Reviewed-on: http://git-master/r/759474 GVS: Gerrit_Virtual_Submit Reviewed-by: Winnie Hsu <whsu@nvidia.com>
-rw-r--r--drivers/mmc/host/sdhci-tegra.c26
1 files changed, 6 insertions, 20 deletions
diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
index add1615a2c9f..6f2b566a1b67 100644
--- a/drivers/mmc/host/sdhci-tegra.c
+++ b/drivers/mmc/host/sdhci-tegra.c
@@ -1927,9 +1927,6 @@ static int slide_window_start(struct sdhci_host *sdhci,
struct tegra_tuning_data *tuning_data,
int tap_value, enum tap_win_edge_attr edge_attr, int tap_hole)
{
- struct sdhci_pltfm_host *pltfm_host = sdhci_priv(sdhci);
- struct sdhci_tegra *tegra_host = pltfm_host->priv;
- const struct sdhci_tegra_soc_data *soc_data = tegra_host->soc_data;
int tap_margin = 0;
if (edge_attr == WIN_EDGE_BOUN_START) {
@@ -1939,12 +1936,8 @@ static int slide_window_start(struct sdhci_host *sdhci,
tap_value += (1000 / tuning_data->calc_values.t2t_vmax);
} else if (edge_attr == WIN_EDGE_HOLE) {
if (tap_hole >= 0) {
- if (soc_data->nvquirks & NVQUIRK_TMP_VAR_1_5_TAP_MARGIN)
- tap_margin = 2;
- else
- tap_margin = (((2 * (450 /
- tuning_data->calc_values.t2t_vmax)) +
- 1) / 2);
+ tap_margin = get_tuning_tap_hole_margins(sdhci,
+ tuning_data->calc_values.t2t_vmax);
tap_value += ((7 * tap_hole) / 100) + tap_margin;
}
}
@@ -1959,9 +1952,6 @@ static int slide_window_end(struct sdhci_host *sdhci,
struct tegra_tuning_data *tuning_data,
int tap_value, enum tap_win_edge_attr edge_attr, int tap_hole)
{
- struct sdhci_pltfm_host *pltfm_host = sdhci_priv(sdhci);
- struct sdhci_tegra *tegra_host = pltfm_host->priv;
- const struct sdhci_tegra_soc_data *soc_data = tegra_host->soc_data;
int tap_margin = 0;
if (edge_attr == WIN_EDGE_BOUN_END) {
@@ -1971,12 +1961,8 @@ static int slide_window_end(struct sdhci_host *sdhci,
} else if (edge_attr == WIN_EDGE_HOLE) {
if (tap_hole >= 0) {
tap_value = tap_hole;
- if (soc_data->nvquirks & NVQUIRK_TMP_VAR_1_5_TAP_MARGIN)
- tap_margin = 2;
- else
- tap_margin = (((2 * (450 /
- tuning_data->calc_values.t2t_vmin)) +
- 1) / 2);
+ tap_margin = get_tuning_tap_hole_margins(sdhci,
+ tuning_data->calc_values.t2t_vmin);
}
tap_value -= ((7 * tap_hole) / 100) + tap_margin;
}
@@ -1988,8 +1974,8 @@ static int adjust_window_boundaries(struct sdhci_host *sdhci,
struct tap_window_data *temp_tap_data)
{
struct tap_window_data *tap_data;
- int vmin_tap_hole = -1;
- int vmax_tap_hole = -1;
+ int vmin_tap_hole = 0;
+ int vmax_tap_hole = 0;
u8 i = 0;
for (i = 0; i < tuning_data->num_of_valid_tap_wins; i++) {