* [PATCHv1 0/2] mmc: sdhci-msm: Addresses minor cleanups @ 2017-01-24 8:50 Ritesh Harjani 2017-01-24 8:50 ` [PATCHv1 1/2] mmc: sdhci-msm: Remove platform_execute_tuning from sdhci_msm_ops Ritesh Harjani 2017-01-24 8:50 ` [PATCHv1 2/2] mmc: sdhci-msm: Remove unnecessary comments of CDC init sequence Ritesh Harjani 0 siblings, 2 replies; 7+ messages in thread From: Ritesh Harjani @ 2017-01-24 8:50 UTC (permalink / raw) To: adrian.hunter, ulf.hansson Cc: linux-mmc, linux-kernel, shawn.lin, linux-arm-msm, georgi.djakov, asutoshd, stummala, venkatg, pramod.gurav, jeremymc, git, Ritesh Harjani Hi Ulf/Adrian, I see that patch series at [1] was already taken by Ulf in next branch. So as requested by Ulf, please find the below two patch fixes/cleanup on top of next branch. Patch 1:- Addresses comment from Adrian [2] Patch 2:- Addresses comment from Stephen [3] links [1]:- https://lkml.org/lkml/2017/1/10/70 [2]:- https://lkml.org/lkml/2017/1/19/153 [3]:- https://lkml.org/lkml/2017/1/20/542 Ritesh Harjani (2): mmc: sdhci-msm: Remove platform_execute_tuning from sdhci_msm_ops mmc: sdhci-msm: Remove unnecessary comments of CDC init sequence drivers/mmc/host/sdhci-msm.c | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCHv1 1/2] mmc: sdhci-msm: Remove platform_execute_tuning from sdhci_msm_ops 2017-01-24 8:50 [PATCHv1 0/2] mmc: sdhci-msm: Addresses minor cleanups Ritesh Harjani @ 2017-01-24 8:50 ` Ritesh Harjani 2017-01-30 9:04 ` Adrian Hunter 2017-01-30 10:04 ` Ulf Hansson 2017-01-24 8:50 ` [PATCHv1 2/2] mmc: sdhci-msm: Remove unnecessary comments of CDC init sequence Ritesh Harjani 1 sibling, 2 replies; 7+ messages in thread From: Ritesh Harjani @ 2017-01-24 8:50 UTC (permalink / raw) To: adrian.hunter, ulf.hansson Cc: linux-mmc, linux-kernel, shawn.lin, linux-arm-msm, georgi.djakov, asutoshd, stummala, venkatg, pramod.gurav, jeremymc, git, Ritesh Harjani platform_execute_tuning should not really exist as it does not do anything useful. So remove this ops and directly plug sdhci_msm_execute_tuning with mmc_host_ops. Also in case of HS400 tuning clear SDHCI_HS400_TUNING flag once HS400 related mode selection is done. Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org> --- drivers/mmc/host/sdhci-msm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c index f958697..b3e8f44 100644 --- a/drivers/mmc/host/sdhci-msm.c +++ b/drivers/mmc/host/sdhci-msm.c @@ -827,12 +827,12 @@ static int sdhci_msm_hs400_dll_calibration(struct sdhci_host *host) return ret; } -static int sdhci_msm_execute_tuning(struct sdhci_host *host, u32 opcode) +static int sdhci_msm_execute_tuning(struct mmc_host *mmc, u32 opcode) { + struct sdhci_host *host = mmc_priv(mmc); int tuning_seq_cnt = 3; u8 phase, tuned_phases[16], tuned_phase_cnt = 0; int rc; - struct mmc_host *mmc = host->mmc; struct mmc_ios ios = host->mmc->ios; struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); struct sdhci_msm_host *msm_host = sdhci_pltfm_priv(pltfm_host); @@ -855,6 +855,7 @@ static int sdhci_msm_execute_tuning(struct sdhci_host *host, u32 opcode) if (host->flags & SDHCI_HS400_TUNING) { sdhci_msm_hc_select_mode(host); msm_set_clock_rate_for_bus_mode(host, ios.clock); + host->flags &= ~SDHCI_HS400_TUNING; } retry: @@ -1119,7 +1120,6 @@ static void sdhci_msm_set_clock(struct sdhci_host *host, unsigned int clock) MODULE_DEVICE_TABLE(of, sdhci_msm_dt_match); static const struct sdhci_ops sdhci_msm_ops = { - .platform_execute_tuning = sdhci_msm_execute_tuning, .reset = sdhci_reset, .set_clock = sdhci_msm_set_clock, .get_min_clock = sdhci_msm_get_min_clock, @@ -1294,6 +1294,7 @@ static int sdhci_msm_probe(struct platform_device *pdev) MSM_MMC_AUTOSUSPEND_DELAY_MS); pm_runtime_use_autosuspend(&pdev->dev); + host->mmc_host_ops.execute_tuning = sdhci_msm_execute_tuning; ret = sdhci_add_host(host); if (ret) goto pm_runtime_disable; -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project. ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCHv1 1/2] mmc: sdhci-msm: Remove platform_execute_tuning from sdhci_msm_ops 2017-01-24 8:50 ` [PATCHv1 1/2] mmc: sdhci-msm: Remove platform_execute_tuning from sdhci_msm_ops Ritesh Harjani @ 2017-01-30 9:04 ` Adrian Hunter 2017-01-30 10:04 ` Ulf Hansson 1 sibling, 0 replies; 7+ messages in thread From: Adrian Hunter @ 2017-01-30 9:04 UTC (permalink / raw) To: Ritesh Harjani, ulf.hansson Cc: linux-mmc, linux-kernel, shawn.lin, linux-arm-msm, georgi.djakov, asutoshd, stummala, venkatg, pramod.gurav, jeremymc, git On 24/01/17 10:50, Ritesh Harjani wrote: > platform_execute_tuning should not really exist as it does not > do anything useful. > > So remove this ops and directly plug sdhci_msm_execute_tuning > with mmc_host_ops. > > Also in case of HS400 tuning clear SDHCI_HS400_TUNING flag once > HS400 related mode selection is done. > > Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org> Acked-by: Adrian Hunter <adrian.hunter@intel.com> > --- > drivers/mmc/host/sdhci-msm.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c > index f958697..b3e8f44 100644 > --- a/drivers/mmc/host/sdhci-msm.c > +++ b/drivers/mmc/host/sdhci-msm.c > @@ -827,12 +827,12 @@ static int sdhci_msm_hs400_dll_calibration(struct sdhci_host *host) > return ret; > } > > -static int sdhci_msm_execute_tuning(struct sdhci_host *host, u32 opcode) > +static int sdhci_msm_execute_tuning(struct mmc_host *mmc, u32 opcode) > { > + struct sdhci_host *host = mmc_priv(mmc); > int tuning_seq_cnt = 3; > u8 phase, tuned_phases[16], tuned_phase_cnt = 0; > int rc; > - struct mmc_host *mmc = host->mmc; > struct mmc_ios ios = host->mmc->ios; > struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); > struct sdhci_msm_host *msm_host = sdhci_pltfm_priv(pltfm_host); > @@ -855,6 +855,7 @@ static int sdhci_msm_execute_tuning(struct sdhci_host *host, u32 opcode) > if (host->flags & SDHCI_HS400_TUNING) { > sdhci_msm_hc_select_mode(host); > msm_set_clock_rate_for_bus_mode(host, ios.clock); > + host->flags &= ~SDHCI_HS400_TUNING; > } > > retry: > @@ -1119,7 +1120,6 @@ static void sdhci_msm_set_clock(struct sdhci_host *host, unsigned int clock) > MODULE_DEVICE_TABLE(of, sdhci_msm_dt_match); > > static const struct sdhci_ops sdhci_msm_ops = { > - .platform_execute_tuning = sdhci_msm_execute_tuning, > .reset = sdhci_reset, > .set_clock = sdhci_msm_set_clock, > .get_min_clock = sdhci_msm_get_min_clock, > @@ -1294,6 +1294,7 @@ static int sdhci_msm_probe(struct platform_device *pdev) > MSM_MMC_AUTOSUSPEND_DELAY_MS); > pm_runtime_use_autosuspend(&pdev->dev); > > + host->mmc_host_ops.execute_tuning = sdhci_msm_execute_tuning; > ret = sdhci_add_host(host); > if (ret) > goto pm_runtime_disable; > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCHv1 1/2] mmc: sdhci-msm: Remove platform_execute_tuning from sdhci_msm_ops 2017-01-24 8:50 ` [PATCHv1 1/2] mmc: sdhci-msm: Remove platform_execute_tuning from sdhci_msm_ops Ritesh Harjani 2017-01-30 9:04 ` Adrian Hunter @ 2017-01-30 10:04 ` Ulf Hansson 1 sibling, 0 replies; 7+ messages in thread From: Ulf Hansson @ 2017-01-30 10:04 UTC (permalink / raw) To: Ritesh Harjani Cc: Adrian Hunter, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Shawn Lin, linux-arm-msm@vger.kernel.org, Georgi Djakov, Asutosh Das, Sahitya Tummala, Venkat Gopalakrishnan, Pramod Gurav, jeremymc, git On 24 January 2017 at 09:50, Ritesh Harjani <riteshh@codeaurora.org> wrote: > platform_execute_tuning should not really exist as it does not > do anything useful. > > So remove this ops and directly plug sdhci_msm_execute_tuning > with mmc_host_ops. > > Also in case of HS400 tuning clear SDHCI_HS400_TUNING flag once > HS400 related mode selection is done. > > Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org> Thanks, applied for next! Kind regards Uffe > --- > drivers/mmc/host/sdhci-msm.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c > index f958697..b3e8f44 100644 > --- a/drivers/mmc/host/sdhci-msm.c > +++ b/drivers/mmc/host/sdhci-msm.c > @@ -827,12 +827,12 @@ static int sdhci_msm_hs400_dll_calibration(struct sdhci_host *host) > return ret; > } > > -static int sdhci_msm_execute_tuning(struct sdhci_host *host, u32 opcode) > +static int sdhci_msm_execute_tuning(struct mmc_host *mmc, u32 opcode) > { > + struct sdhci_host *host = mmc_priv(mmc); > int tuning_seq_cnt = 3; > u8 phase, tuned_phases[16], tuned_phase_cnt = 0; > int rc; > - struct mmc_host *mmc = host->mmc; > struct mmc_ios ios = host->mmc->ios; > struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); > struct sdhci_msm_host *msm_host = sdhci_pltfm_priv(pltfm_host); > @@ -855,6 +855,7 @@ static int sdhci_msm_execute_tuning(struct sdhci_host *host, u32 opcode) > if (host->flags & SDHCI_HS400_TUNING) { > sdhci_msm_hc_select_mode(host); > msm_set_clock_rate_for_bus_mode(host, ios.clock); > + host->flags &= ~SDHCI_HS400_TUNING; > } > > retry: > @@ -1119,7 +1120,6 @@ static void sdhci_msm_set_clock(struct sdhci_host *host, unsigned int clock) > MODULE_DEVICE_TABLE(of, sdhci_msm_dt_match); > > static const struct sdhci_ops sdhci_msm_ops = { > - .platform_execute_tuning = sdhci_msm_execute_tuning, > .reset = sdhci_reset, > .set_clock = sdhci_msm_set_clock, > .get_min_clock = sdhci_msm_get_min_clock, > @@ -1294,6 +1294,7 @@ static int sdhci_msm_probe(struct platform_device *pdev) > MSM_MMC_AUTOSUSPEND_DELAY_MS); > pm_runtime_use_autosuspend(&pdev->dev); > > + host->mmc_host_ops.execute_tuning = sdhci_msm_execute_tuning; > ret = sdhci_add_host(host); > if (ret) > goto pm_runtime_disable; > -- > The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, > a Linux Foundation Collaborative Project. > ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCHv1 2/2] mmc: sdhci-msm: Remove unnecessary comments of CDC init sequence 2017-01-24 8:50 [PATCHv1 0/2] mmc: sdhci-msm: Addresses minor cleanups Ritesh Harjani 2017-01-24 8:50 ` [PATCHv1 1/2] mmc: sdhci-msm: Remove platform_execute_tuning from sdhci_msm_ops Ritesh Harjani @ 2017-01-24 8:50 ` Ritesh Harjani 2017-01-30 9:04 ` Adrian Hunter 2017-01-30 10:04 ` Ulf Hansson 1 sibling, 2 replies; 7+ messages in thread From: Ritesh Harjani @ 2017-01-24 8:50 UTC (permalink / raw) To: adrian.hunter, ulf.hansson Cc: linux-mmc, linux-kernel, shawn.lin, linux-arm-msm, georgi.djakov, asutoshd, stummala, venkatg, pramod.gurav, jeremymc, git, Ritesh Harjani This removes CDC init sequence comments which are not useful anyway. Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org> --- drivers/mmc/host/sdhci-msm.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c index b3e8f44..10cdc84 100644 --- a/drivers/mmc/host/sdhci-msm.c +++ b/drivers/mmc/host/sdhci-msm.c @@ -664,19 +664,7 @@ static int sdhci_msm_cdclp533_calibration(struct sdhci_host *host) config &= ~CORE_START_CDC_TRAFFIC; writel_relaxed(config, host->ioaddr + CORE_DDR_200_CFG); - /* - * Perform CDC Register Initialization Sequence - * - * CORE_CSR_CDC_CTLR_CFG0 0x11800EC - * CORE_CSR_CDC_CTLR_CFG1 0x3011111 - * CORE_CSR_CDC_CAL_TIMER_CFG0 0x1201000 - * CORE_CSR_CDC_CAL_TIMER_CFG1 0x4 - * CORE_CSR_CDC_REFCOUNT_CFG 0xCB732020 - * CORE_CSR_CDC_COARSE_CAL_CFG 0xB19 - * CORE_CSR_CDC_DELAY_CFG 0x3AC - * CORE_CDC_OFFSET_CFG 0x0 - * CORE_CDC_SLAVE_DDA_CFG 0x16334 - */ + /* Perform CDC Register Initialization Sequence */ writel_relaxed(0x11800EC, host->ioaddr + CORE_CSR_CDC_CTLR_CFG0); writel_relaxed(0x3011111, host->ioaddr + CORE_CSR_CDC_CTLR_CFG1); -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project. ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCHv1 2/2] mmc: sdhci-msm: Remove unnecessary comments of CDC init sequence 2017-01-24 8:50 ` [PATCHv1 2/2] mmc: sdhci-msm: Remove unnecessary comments of CDC init sequence Ritesh Harjani @ 2017-01-30 9:04 ` Adrian Hunter 2017-01-30 10:04 ` Ulf Hansson 1 sibling, 0 replies; 7+ messages in thread From: Adrian Hunter @ 2017-01-30 9:04 UTC (permalink / raw) To: Ritesh Harjani, ulf.hansson Cc: linux-mmc, linux-kernel, shawn.lin, linux-arm-msm, georgi.djakov, asutoshd, stummala, venkatg, pramod.gurav, jeremymc, git On 24/01/17 10:50, Ritesh Harjani wrote: > This removes CDC init sequence comments which are > not useful anyway. > > Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org> Acked-by: Adrian Hunter <adrian.hunter@intel.com> > --- > drivers/mmc/host/sdhci-msm.c | 14 +------------- > 1 file changed, 1 insertion(+), 13 deletions(-) > > diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c > index b3e8f44..10cdc84 100644 > --- a/drivers/mmc/host/sdhci-msm.c > +++ b/drivers/mmc/host/sdhci-msm.c > @@ -664,19 +664,7 @@ static int sdhci_msm_cdclp533_calibration(struct sdhci_host *host) > config &= ~CORE_START_CDC_TRAFFIC; > writel_relaxed(config, host->ioaddr + CORE_DDR_200_CFG); > > - /* > - * Perform CDC Register Initialization Sequence > - * > - * CORE_CSR_CDC_CTLR_CFG0 0x11800EC > - * CORE_CSR_CDC_CTLR_CFG1 0x3011111 > - * CORE_CSR_CDC_CAL_TIMER_CFG0 0x1201000 > - * CORE_CSR_CDC_CAL_TIMER_CFG1 0x4 > - * CORE_CSR_CDC_REFCOUNT_CFG 0xCB732020 > - * CORE_CSR_CDC_COARSE_CAL_CFG 0xB19 > - * CORE_CSR_CDC_DELAY_CFG 0x3AC > - * CORE_CDC_OFFSET_CFG 0x0 > - * CORE_CDC_SLAVE_DDA_CFG 0x16334 > - */ > + /* Perform CDC Register Initialization Sequence */ > > writel_relaxed(0x11800EC, host->ioaddr + CORE_CSR_CDC_CTLR_CFG0); > writel_relaxed(0x3011111, host->ioaddr + CORE_CSR_CDC_CTLR_CFG1); > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCHv1 2/2] mmc: sdhci-msm: Remove unnecessary comments of CDC init sequence 2017-01-24 8:50 ` [PATCHv1 2/2] mmc: sdhci-msm: Remove unnecessary comments of CDC init sequence Ritesh Harjani 2017-01-30 9:04 ` Adrian Hunter @ 2017-01-30 10:04 ` Ulf Hansson 1 sibling, 0 replies; 7+ messages in thread From: Ulf Hansson @ 2017-01-30 10:04 UTC (permalink / raw) To: Ritesh Harjani Cc: Adrian Hunter, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Shawn Lin, linux-arm-msm@vger.kernel.org, Georgi Djakov, Asutosh Das, Sahitya Tummala, Venkat Gopalakrishnan, Pramod Gurav, jeremymc, git On 24 January 2017 at 09:50, Ritesh Harjani <riteshh@codeaurora.org> wrote: > This removes CDC init sequence comments which are > not useful anyway. > > Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org> Thanks, applied for next! Kind regards Uffe > --- > drivers/mmc/host/sdhci-msm.c | 14 +------------- > 1 file changed, 1 insertion(+), 13 deletions(-) > > diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c > index b3e8f44..10cdc84 100644 > --- a/drivers/mmc/host/sdhci-msm.c > +++ b/drivers/mmc/host/sdhci-msm.c > @@ -664,19 +664,7 @@ static int sdhci_msm_cdclp533_calibration(struct sdhci_host *host) > config &= ~CORE_START_CDC_TRAFFIC; > writel_relaxed(config, host->ioaddr + CORE_DDR_200_CFG); > > - /* > - * Perform CDC Register Initialization Sequence > - * > - * CORE_CSR_CDC_CTLR_CFG0 0x11800EC > - * CORE_CSR_CDC_CTLR_CFG1 0x3011111 > - * CORE_CSR_CDC_CAL_TIMER_CFG0 0x1201000 > - * CORE_CSR_CDC_CAL_TIMER_CFG1 0x4 > - * CORE_CSR_CDC_REFCOUNT_CFG 0xCB732020 > - * CORE_CSR_CDC_COARSE_CAL_CFG 0xB19 > - * CORE_CSR_CDC_DELAY_CFG 0x3AC > - * CORE_CDC_OFFSET_CFG 0x0 > - * CORE_CDC_SLAVE_DDA_CFG 0x16334 > - */ > + /* Perform CDC Register Initialization Sequence */ > > writel_relaxed(0x11800EC, host->ioaddr + CORE_CSR_CDC_CTLR_CFG0); > writel_relaxed(0x3011111, host->ioaddr + CORE_CSR_CDC_CTLR_CFG1); > -- > The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, > a Linux Foundation Collaborative Project. > ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-01-30 10:34 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-01-24 8:50 [PATCHv1 0/2] mmc: sdhci-msm: Addresses minor cleanups Ritesh Harjani 2017-01-24 8:50 ` [PATCHv1 1/2] mmc: sdhci-msm: Remove platform_execute_tuning from sdhci_msm_ops Ritesh Harjani 2017-01-30 9:04 ` Adrian Hunter 2017-01-30 10:04 ` Ulf Hansson 2017-01-24 8:50 ` [PATCHv1 2/2] mmc: sdhci-msm: Remove unnecessary comments of CDC init sequence Ritesh Harjani 2017-01-30 9:04 ` Adrian Hunter 2017-01-30 10:04 ` Ulf Hansson
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox