* [PATCH] mmc: sdhci: fix DRIVER_TYPE_D handling in sdhci_do_set_ios()
@ 2015-05-14 4:55 Petri Gynther
2015-05-19 18:12 ` Petri Gynther
0 siblings, 1 reply; 3+ messages in thread
From: Petri Gynther @ 2015-05-14 4:55 UTC (permalink / raw)
To: linux-mmc; +Cc: ulf.hansson
sdhci_do_set_ios() doesn't currently program SDHCI_HOST_CONTROL2
register correctly when ios->drv_type == MMC_SET_DRIVER_TYPE_D.
Signed-off-by: Petri Gynther <pgynther@google.com>
---
drivers/mmc/host/sdhci.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index c80287a..fe6094d 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1564,6 +1564,8 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios)
ctrl_2 |= SDHCI_CTRL_DRV_TYPE_A;
else if (ios->drv_type == MMC_SET_DRIVER_TYPE_C)
ctrl_2 |= SDHCI_CTRL_DRV_TYPE_C;
+ else if (ios->drv_type == MMC_SET_DRIVER_TYPE_D)
+ ctrl_2 |= SDHCI_CTRL_DRV_TYPE_D;
sdhci_writew(host, ctrl_2, SDHCI_HOST_CONTROL2);
} else {
--
2.2.0.rc0.207.ga3a616c
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mmc: sdhci: fix DRIVER_TYPE_D handling in sdhci_do_set_ios()
2015-05-14 4:55 [PATCH] mmc: sdhci: fix DRIVER_TYPE_D handling in sdhci_do_set_ios() Petri Gynther
@ 2015-05-19 18:12 ` Petri Gynther
2015-05-20 10:44 ` Ulf Hansson
0 siblings, 1 reply; 3+ messages in thread
From: Petri Gynther @ 2015-05-19 18:12 UTC (permalink / raw)
To: ulf.hansson, linux-mmc
Any objections to this patch? In my opinion, this is a must-have fix
for sdhci_do_set_ios() when host->preset_enabled == false and
ios->drv_type == MMC_SET_DRIVER_TYPE_D.
To be complete, I could also add handling for ios->drv_type ==
MMC_SET_DRIVER_TYPE_B, i.e.:
else if (ios->drv_type == MMC_SET_DRIVER_TYPE_B)
ctrl_2 |= SDHCI_CTRL_DRV_TYPE_B;
but that's not absolutely necessary since:
#define SDHCI_CTRL_DRV_TYPE_B 0x0000
On Wed, May 13, 2015 at 9:55 PM, Petri Gynther <pgynther@google.com> wrote:
> sdhci_do_set_ios() doesn't currently program SDHCI_HOST_CONTROL2
> register correctly when ios->drv_type == MMC_SET_DRIVER_TYPE_D.
>
> Signed-off-by: Petri Gynther <pgynther@google.com>
> ---
> drivers/mmc/host/sdhci.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index c80287a..fe6094d 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -1564,6 +1564,8 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios)
> ctrl_2 |= SDHCI_CTRL_DRV_TYPE_A;
> else if (ios->drv_type == MMC_SET_DRIVER_TYPE_C)
> ctrl_2 |= SDHCI_CTRL_DRV_TYPE_C;
> + else if (ios->drv_type == MMC_SET_DRIVER_TYPE_D)
> + ctrl_2 |= SDHCI_CTRL_DRV_TYPE_D;
>
> sdhci_writew(host, ctrl_2, SDHCI_HOST_CONTROL2);
> } else {
> --
> 2.2.0.rc0.207.ga3a616c
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mmc: sdhci: fix DRIVER_TYPE_D handling in sdhci_do_set_ios()
2015-05-19 18:12 ` Petri Gynther
@ 2015-05-20 10:44 ` Ulf Hansson
0 siblings, 0 replies; 3+ messages in thread
From: Ulf Hansson @ 2015-05-20 10:44 UTC (permalink / raw)
To: Petri Gynther; +Cc: linux-mmc
On 19 May 2015 at 20:12, Petri Gynther <pgynther@google.com> wrote:
> Any objections to this patch? In my opinion, this is a must-have fix
> for sdhci_do_set_ios() when host->preset_enabled == false and
> ios->drv_type == MMC_SET_DRIVER_TYPE_D.
>
> To be complete, I could also add handling for ios->drv_type ==
> MMC_SET_DRIVER_TYPE_B, i.e.:
> else if (ios->drv_type == MMC_SET_DRIVER_TYPE_B)
> ctrl_2 |= SDHCI_CTRL_DRV_TYPE_B;
>
> but that's not absolutely necessary since:
> #define SDHCI_CTRL_DRV_TYPE_B 0x0000
Well to be consistent, I would rather see that you add above else if as well.
Can you please send a new version?
Kind regards
Uffe
>
> On Wed, May 13, 2015 at 9:55 PM, Petri Gynther <pgynther@google.com> wrote:
>> sdhci_do_set_ios() doesn't currently program SDHCI_HOST_CONTROL2
>> register correctly when ios->drv_type == MMC_SET_DRIVER_TYPE_D.
>>
>> Signed-off-by: Petri Gynther <pgynther@google.com>
>> ---
>> drivers/mmc/host/sdhci.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
>> index c80287a..fe6094d 100644
>> --- a/drivers/mmc/host/sdhci.c
>> +++ b/drivers/mmc/host/sdhci.c
>> @@ -1564,6 +1564,8 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios)
>> ctrl_2 |= SDHCI_CTRL_DRV_TYPE_A;
>> else if (ios->drv_type == MMC_SET_DRIVER_TYPE_C)
>> ctrl_2 |= SDHCI_CTRL_DRV_TYPE_C;
>> + else if (ios->drv_type == MMC_SET_DRIVER_TYPE_D)
>> + ctrl_2 |= SDHCI_CTRL_DRV_TYPE_D;
>>
>> sdhci_writew(host, ctrl_2, SDHCI_HOST_CONTROL2);
>> } else {
>> --
>> 2.2.0.rc0.207.ga3a616c
>>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-05-20 10:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-14 4:55 [PATCH] mmc: sdhci: fix DRIVER_TYPE_D handling in sdhci_do_set_ios() Petri Gynther
2015-05-19 18:12 ` Petri Gynther
2015-05-20 10:44 ` Ulf Hansson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.