diff options
author | Jeetesh Burman <jburman@nvidia.com> | 2015-03-24 23:04:07 +0530 |
---|---|---|
committer | Matthew Pedro <mapedro@nvidia.com> | 2015-05-04 13:42:04 -0700 |
commit | af2031797899b32504e32af377fa65875c06a746 (patch) | |
tree | 74df41e867f5567730f195f8c4803aaf393d3a1c /drivers/mmc | |
parent | 3c5f4d1060669ec73dc0ceb4e9a876a55a89c5eb (diff) |
mmc: tegra: Initialize margin addition variables
Initialize tap hole variables used in the temperature margin
calculations.
Bug 1532100
Change-Id: I494d5ab1600f13c8861de860532021107bfd745e
Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Reviewed-on: http://git-master/r/436633
(cherry picked from commit a106c31d73581db47c951b8cc196629993b96571)
Signed-off-by: Jeetesh Burman <jburman@nvidia.com>
Reviewed-on: http://git-master/r/721901
GVS: Gerrit_Virtual_Submit
Reviewed-by: Naveen Kumar Arepalli <naveenk@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/sdhci-tegra.c | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c index 6f2b566a1b67..add1615a2c9f 100644 --- a/drivers/mmc/host/sdhci-tegra.c +++ b/drivers/mmc/host/sdhci-tegra.c @@ -1927,6 +1927,9 @@ 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) { @@ -1936,8 +1939,12 @@ 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) { - tap_margin = get_tuning_tap_hole_margins(sdhci, - tuning_data->calc_values.t2t_vmax); + 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_value += ((7 * tap_hole) / 100) + tap_margin; } } @@ -1952,6 +1959,9 @@ 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) { @@ -1961,8 +1971,12 @@ static int slide_window_end(struct sdhci_host *sdhci, } else if (edge_attr == WIN_EDGE_HOLE) { if (tap_hole >= 0) { tap_value = tap_hole; - tap_margin = get_tuning_tap_hole_margins(sdhci, - tuning_data->calc_values.t2t_vmin); + 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_value -= ((7 * tap_hole) / 100) + tap_margin; } @@ -1974,8 +1988,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 = 0; - int vmax_tap_hole = 0; + int vmin_tap_hole = -1; + int vmax_tap_hole = -1; u8 i = 0; for (i = 0; i < tuning_data->num_of_valid_tap_wins; i++) { |