All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Revert "mmc: sdhi: use maximum width for the sdbuf register"
@ 2017-08-03  9:49 Wolfram Sang
  2017-08-03  9:53 ` Wolfram Sang
  2017-08-03 10:04 ` Biju Das
  0 siblings, 2 replies; 5+ messages in thread
From: Wolfram Sang @ 2017-08-03  9:49 UTC (permalink / raw
  To: linux-mmc
  Cc: linux-renesas-soc, Simon Horman, Biju Das, Ulf Hansson,
	Wolfram Sang

This reverts commit 785b215250310c690142abb1bdbb0767b8487c49. There is a
secondary SDHI instance on Gen2 with has a 32-bit wide SDBUF register
while all other registers are 16 bit apart. So, the logic used here does
not apply and we need to rethink this and start cleanly from scratch.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/mmc/host/renesas_sdhi_core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
index 48da28dfef6465..dd215723fa4312 100644
--- a/drivers/mmc/host/renesas_sdhi_core.c
+++ b/drivers/mmc/host/renesas_sdhi_core.c
@@ -461,7 +461,8 @@ static void renesas_sdhi_enable_dma(struct tmio_mmc_host *host, bool enable)
 {
 	sd_ctrl_write16(host, CTL_DMA_ENABLE, enable ? DMA_ENABLE_DMASDRW : 0);
 
-	renesas_sdhi_sdbuf_width(host, enable ? (16 << host->bus_shift) : 16);
+	/* enable 32bit access if DMA mode if possibile */
+	renesas_sdhi_sdbuf_width(host, enable ? 32 : 16);
 }
 
 int renesas_sdhi_probe(struct platform_device *pdev,
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] Revert "mmc: sdhi: use maximum width for the sdbuf register"
  2017-08-03  9:49 [PATCH] Revert "mmc: sdhi: use maximum width for the sdbuf register" Wolfram Sang
@ 2017-08-03  9:53 ` Wolfram Sang
  2017-08-03 10:52   ` Ulf Hansson
  2017-08-03 10:04 ` Biju Das
  1 sibling, 1 reply; 5+ messages in thread
From: Wolfram Sang @ 2017-08-03  9:53 UTC (permalink / raw
  To: Wolfram Sang
  Cc: linux-mmc, linux-renesas-soc, Simon Horman, Biju Das, Ulf Hansson

[-- Attachment #1: Type: text/plain, Size: 575 bytes --]

On Thu, Aug 03, 2017 at 11:49:47AM +0200, Wolfram Sang wrote:
> This reverts commit 785b215250310c690142abb1bdbb0767b8487c49. There is a
> secondary SDHI instance on Gen2 with has a 32-bit wide SDBUF register
> while all other registers are 16 bit apart. So, the logic used here does
> not apply and we need to rethink this and start cleanly from scratch.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Extra info for Ulf: I can't work on that in the next days, so I thought
it would be good to ASAP fix the regression in mmc/next at least.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] Revert "mmc: sdhi: use maximum width for the sdbuf register"
  2017-08-03  9:49 [PATCH] Revert "mmc: sdhi: use maximum width for the sdbuf register" Wolfram Sang
  2017-08-03  9:53 ` Wolfram Sang
@ 2017-08-03 10:04 ` Biju Das
  1 sibling, 0 replies; 5+ messages in thread
From: Biju Das @ 2017-08-03 10:04 UTC (permalink / raw
  To: Wolfram Sang, linux-mmc@vger.kernel.org
  Cc: linux-renesas-soc@vger.kernel.org, Simon Horman, Ulf Hansson

Tested this patch on iWave RZ/G1M platform.

Tested-by: Biju Das <biju.das@bp.renesas.com>

Regards,
Biju

> -----Original Message-----
> From: Wolfram Sang [mailto:wsa+renesas@sang-engineering.com]
> Sent: 03 August 2017 10:50
> To: linux-mmc@vger.kernel.org
> Cc: linux-renesas-soc@vger.kernel.org; Simon Horman <horms@verge.net.au>;
> Biju Das <biju.das@bp.renesas.com>; Ulf Hansson <ulf.hansson@linaro.org>;
> Wolfram Sang <wsa+renesas@sang-engineering.com>
> Subject: [PATCH] Revert "mmc: sdhi: use maximum width for the sdbuf
> register"
>
> This reverts commit 785b215250310c690142abb1bdbb0767b8487c49. There is
> a secondary SDHI instance on Gen2 with has a 32-bit wide SDBUF register while
> all other registers are 16 bit apart. So, the logic used here does not apply and
> we need to rethink this and start cleanly from scratch.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
>  drivers/mmc/host/renesas_sdhi_core.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/renesas_sdhi_core.c
> b/drivers/mmc/host/renesas_sdhi_core.c
> index 48da28dfef6465..dd215723fa4312 100644
> --- a/drivers/mmc/host/renesas_sdhi_core.c
> +++ b/drivers/mmc/host/renesas_sdhi_core.c
> @@ -461,7 +461,8 @@ static void renesas_sdhi_enable_dma(struct
> tmio_mmc_host *host, bool enable)  {
>  sd_ctrl_write16(host, CTL_DMA_ENABLE, enable ?
> DMA_ENABLE_DMASDRW : 0);
>
> -renesas_sdhi_sdbuf_width(host, enable ? (16 << host->bus_shift) : 16);
> +/* enable 32bit access if DMA mode if possibile */
> +renesas_sdhi_sdbuf_width(host, enable ? 32 : 16);
>  }
>
>  int renesas_sdhi_probe(struct platform_device *pdev,
> --
> 2.11.0




Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Revert "mmc: sdhi: use maximum width for the sdbuf register"
  2017-08-03  9:53 ` Wolfram Sang
@ 2017-08-03 10:52   ` Ulf Hansson
  2017-08-09 18:22     ` Wolfram Sang
  0 siblings, 1 reply; 5+ messages in thread
From: Ulf Hansson @ 2017-08-03 10:52 UTC (permalink / raw
  To: Wolfram Sang
  Cc: Wolfram Sang, linux-mmc@vger.kernel.org, Linux-Renesas,
	Simon Horman, Biju Das

On 3 August 2017 at 11:53, Wolfram Sang <wsa@the-dreams.de> wrote:
> On Thu, Aug 03, 2017 at 11:49:47AM +0200, Wolfram Sang wrote:
>> This reverts commit 785b215250310c690142abb1bdbb0767b8487c49. There is a
>> secondary SDHI instance on Gen2 with has a 32-bit wide SDBUF register
>> while all other registers are 16 bit apart. So, the logic used here does
>> not apply and we need to rethink this and start cleanly from scratch.
>>
>> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
>
> Extra info for Ulf: I can't work on that in the next days, so I thought
> it would be good to ASAP fix the regression in mmc/next at least.
>

Instead of applying this revert, I decided to just drop the original
commit from my next branch.

While working on new version of how to deal with the 32/16 bit
register correctly, please try to include Biju Das in the changelog as
to give him cred from his help with testing.

Kind regards
Uffe

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Revert "mmc: sdhi: use maximum width for the sdbuf register"
  2017-08-03 10:52   ` Ulf Hansson
@ 2017-08-09 18:22     ` Wolfram Sang
  0 siblings, 0 replies; 5+ messages in thread
From: Wolfram Sang @ 2017-08-09 18:22 UTC (permalink / raw
  To: Ulf Hansson
  Cc: Wolfram Sang, linux-mmc@vger.kernel.org, Linux-Renesas,
	Simon Horman, Biju Das

[-- Attachment #1: Type: text/plain, Size: 533 bytes --]


> Instead of applying this revert, I decided to just drop the original
> commit from my next branch.

Hmmmm, yes, rebasing creates a clean history for occasions like this,
but makes working on your next-branch kinda complicated if the base I
merged has gone.

> While working on new version of how to deal with the 32/16 bit
> register correctly, please try to include Biju Das in the changelog as
> to give him cred from his help with testing.

Will do. If you had kept the revert, he would have got a tag for
Reported-by even ;)


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-08-09 18:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-03  9:49 [PATCH] Revert "mmc: sdhi: use maximum width for the sdbuf register" Wolfram Sang
2017-08-03  9:53 ` Wolfram Sang
2017-08-03 10:52   ` Ulf Hansson
2017-08-09 18:22     ` Wolfram Sang
2017-08-03 10:04 ` Biju Das

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.