mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-15 01:01:56 -04:00
mmc: host: sdhci-msm: Don't return error on missing bus voting paths
On MDM targets we have only one path for bus voting (sdhc-ddr). If we provide only one path and not the other one then probe will itself fail as per the current logic. Don't return error when bus voting paths not found. Change-Id: Idf5401266793f4d4003391816f7511f8c0754696 Signed-off-by: Sarthak Garg <sartgarg@codeaurora.org>
This commit is contained in:
parent
4b432d2057
commit
94361fce31
1 changed files with 17 additions and 13 deletions
|
|
@ -2862,7 +2862,7 @@ static inline int sdhci_msm_bus_set_vote(struct sdhci_msm_host *msm_host,
|
|||
struct sdhci_msm_bus_vote_data *bvd = msm_host->bus_vote_data;
|
||||
struct msm_bus_path *usecase = bvd->usecase;
|
||||
struct msm_bus_vectors *vec = usecase[vote].vec;
|
||||
int ddr_rc, cpu_rc;
|
||||
int ddr_rc = 0, cpu_rc = 0;
|
||||
|
||||
if (vote == bvd->curr_vote)
|
||||
return 0;
|
||||
|
|
@ -2870,8 +2870,13 @@ static inline int sdhci_msm_bus_set_vote(struct sdhci_msm_host *msm_host,
|
|||
pr_debug("%s: vote:%d sdhc_ddr ab:%llu ib:%llu cpu_sdhc ab:%llu ib:%llu\n",
|
||||
mmc_hostname(host->mmc), vote, vec[0].ab,
|
||||
vec[0].ib, vec[1].ab, vec[1].ib);
|
||||
ddr_rc = icc_set_bw(bvd->sdhc_ddr, vec[0].ab, vec[0].ib);
|
||||
cpu_rc = icc_set_bw(bvd->cpu_sdhc, vec[1].ab, vec[1].ib);
|
||||
|
||||
if (bvd->sdhc_ddr)
|
||||
ddr_rc = icc_set_bw(bvd->sdhc_ddr, vec[0].ab, vec[0].ib);
|
||||
|
||||
if (bvd->cpu_sdhc)
|
||||
cpu_rc = icc_set_bw(bvd->cpu_sdhc, vec[1].ab, vec[1].ib);
|
||||
|
||||
if (ddr_rc || cpu_rc) {
|
||||
pr_err("%s: icc_set() failed\n",
|
||||
mmc_hostname(host->mmc));
|
||||
|
|
@ -2894,8 +2899,8 @@ static void sdhci_msm_bus_get_and_set_vote(struct sdhci_host *host,
|
|||
struct sdhci_msm_host *msm_host = sdhci_pltfm_priv(pltfm_host);
|
||||
|
||||
if (!msm_host->bus_vote_data ||
|
||||
!msm_host->bus_vote_data->sdhc_ddr ||
|
||||
!msm_host->bus_vote_data->cpu_sdhc)
|
||||
(!msm_host->bus_vote_data->sdhc_ddr &&
|
||||
!msm_host->bus_vote_data->cpu_sdhc))
|
||||
return;
|
||||
vote = sdhci_msm_bus_get_vote_for_bw(msm_host, bw);
|
||||
sdhci_msm_bus_set_vote(msm_host, vote);
|
||||
|
|
@ -3004,20 +3009,16 @@ static int sdhci_msm_bus_register(struct sdhci_msm_host *host,
|
|||
|
||||
bsd->sdhc_ddr = of_icc_get(&pdev->dev, "sdhc-ddr");
|
||||
if (IS_ERR_OR_NULL(bsd->sdhc_ddr)) {
|
||||
dev_err(&pdev->dev, "(%ld): failed getting %s path\n",
|
||||
dev_info(&pdev->dev, "(%ld): failed getting %s path\n",
|
||||
PTR_ERR(bsd->sdhc_ddr), "sdhc-ddr");
|
||||
ret = PTR_ERR(bsd->sdhc_ddr);
|
||||
bsd->sdhc_ddr = NULL;
|
||||
return ret;
|
||||
}
|
||||
|
||||
bsd->cpu_sdhc = of_icc_get(&pdev->dev, "cpu-sdhc");
|
||||
if (IS_ERR_OR_NULL(bsd->cpu_sdhc)) {
|
||||
dev_err(&pdev->dev, "(%ld): failed getting %s path\n",
|
||||
dev_info(&pdev->dev, "(%ld): failed getting %s path\n",
|
||||
PTR_ERR(bsd->cpu_sdhc), "cpu-sdhc");
|
||||
ret = PTR_ERR(bsd->cpu_sdhc);
|
||||
bsd->cpu_sdhc = NULL;
|
||||
return ret;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
@ -3028,8 +3029,11 @@ static void sdhci_msm_bus_unregister(struct device *dev,
|
|||
{
|
||||
struct sdhci_msm_bus_vote_data *bsd = host->bus_vote_data;
|
||||
|
||||
icc_put(bsd->sdhc_ddr);
|
||||
icc_put(bsd->cpu_sdhc);
|
||||
if (bsd->sdhc_ddr)
|
||||
icc_put(bsd->sdhc_ddr);
|
||||
|
||||
if (bsd->cpu_sdhc)
|
||||
icc_put(bsd->cpu_sdhc);
|
||||
}
|
||||
|
||||
static void sdhci_msm_bus_voting(struct sdhci_host *host, bool enable)
|
||||
|
|
|
|||
Loading…
Reference in a new issue