diff mbox series

[4.4.y-cip,36/83] mmc: sh_mobile_sdhi: add ocr_mask option

Message ID 1573115572-13513-37-git-send-email-biju.das@bp.renesas.com (mailing list archive)
State Changes Requested
Headers show
Series Add RZ/G1C SD/eMMC support | expand

Commit Message

Biju Das Nov. 7, 2019, 8:32 a.m. UTC
From: Chris Brandt <chris.brandt@renesas.com>

commit f19417f38264f9a2f7b4627aa4060133c237b211 upstream.

In moving platforms from board files to DT, there still needs to be a way
to set the ocr_mask setting for the tmio driver during probe. Without this
setting, the probe will fail because the supported voltages are not known.

This patch will also traditional platform registration platforms to
migrate to DT.

Signed-off-by: Chris Brandt <chris.brandt@renesas.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Biju Das <biju.das@bp.renesas.com>
---
 drivers/mmc/host/sh_mobile_sdhi.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Pavel Machek Nov. 8, 2019, 9:28 a.m. UTC | #1
Hi!

> commit f19417f38264f9a2f7b4627aa4060133c237b211 upstream.
> 
> In moving platforms from board files to DT, there still needs to be a way
> to set the ocr_mask setting for the tmio driver during probe. Without this
> setting, the probe will fail because the supported voltages are not known.
> 
> This patch will also traditional platform registration platforms to
> migrate to DT.

This is not quite english.

> +++ b/drivers/mmc/host/sh_mobile_sdhi.c
> @@ -49,6 +49,7 @@
>  
>  struct sh_mobile_sdhi_of_data {
>  	unsigned long tmio_flags;
> +	u32	      tmio_ocr_mask;
>  	unsigned long capabilities;
>  	unsigned long capabilities2;
>  	enum dma_slave_buswidth dma_buswidth;
> @@ -370,6 +371,7 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev)
>  		const struct sh_mobile_sdhi_of_data *of_data = of_id->data;
>  
>  		mmc_data->flags |= of_data->tmio_flags;
> +		mmc_data->ocr_mask = of_data->tmio_ocr_mask;
>  		mmc_data->capabilities |= of_data->capabilities;
>  		mmc_data->capabilities2 |= of_data->capabilities2;
>  		mmc_data->dma_rx_offset = of_data->dma_rx_offset;

And as of_data->tmio_ocr_mask is never written, I don't see how this
can fix the problem effect.

Best regards,

								Pavel
Biju Das Nov. 19, 2019, 8:39 a.m. UTC | #2
Hi Pavel,

Thanks for the feedback.

> Subject: Re: [PATCH 4.4.y-cip 36/83] mmc: sh_mobile_sdhi: add ocr_mask
> option
> 
> Hi!
> 
> > commit f19417f38264f9a2f7b4627aa4060133c237b211 upstream.
> >
> > In moving platforms from board files to DT, there still needs to be a
> > way to set the ocr_mask setting for the tmio driver during probe.
> > Without this setting, the probe will fail because the supported voltages are
> not known.
> >
> > This patch will also traditional platform registration platforms to
> > migrate to DT.
> 
> This is not quite english.
> 
> > +++ b/drivers/mmc/host/sh_mobile_sdhi.c
> > @@ -49,6 +49,7 @@
> >
> >  struct sh_mobile_sdhi_of_data {
> >  	unsigned long tmio_flags;
> > +	u32	      tmio_ocr_mask;
> >  	unsigned long capabilities;
> >  	unsigned long capabilities2;
> >  	enum dma_slave_buswidth dma_buswidth; @@ -370,6 +371,7 @@
> static int
> > sh_mobile_sdhi_probe(struct platform_device *pdev)
> >  		const struct sh_mobile_sdhi_of_data *of_data = of_id-
> >data;
> >
> >  		mmc_data->flags |= of_data->tmio_flags;
> > +		mmc_data->ocr_mask = of_data->tmio_ocr_mask;
> >  		mmc_data->capabilities |= of_data->capabilities;
> >  		mmc_data->capabilities2 |= of_data->capabilities2;
> >  		mmc_data->dma_rx_offset = of_data->dma_rx_offset;
> 
> And as of_data->tmio_ocr_mask is never written, I don't see how this can fix
> the problem effect.

This patch fixes the problem on RZ/A boards.
https://cregit.linuxsources.org/code/4.11/drivers/mmc/host/sh_mobile_sdhi.c.html

regards,
Biju
diff mbox series

Patch

diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c
index 3d186cc..9124246 100644
--- a/drivers/mmc/host/sh_mobile_sdhi.c
+++ b/drivers/mmc/host/sh_mobile_sdhi.c
@@ -49,6 +49,7 @@ 
 
 struct sh_mobile_sdhi_of_data {
 	unsigned long tmio_flags;
+	u32	      tmio_ocr_mask;
 	unsigned long capabilities;
 	unsigned long capabilities2;
 	enum dma_slave_buswidth dma_buswidth;
@@ -370,6 +371,7 @@  static int sh_mobile_sdhi_probe(struct platform_device *pdev)
 		const struct sh_mobile_sdhi_of_data *of_data = of_id->data;
 
 		mmc_data->flags |= of_data->tmio_flags;
+		mmc_data->ocr_mask = of_data->tmio_ocr_mask;
 		mmc_data->capabilities |= of_data->capabilities;
 		mmc_data->capabilities2 |= of_data->capabilities2;
 		mmc_data->dma_rx_offset = of_data->dma_rx_offset;