linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mmc: renesas_sdhi: remove whitelist for internal DMAC
@ 2019-12-03 19:48 Wolfram Sang
  2019-12-04  9:33 ` Geert Uytterhoeven
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Wolfram Sang @ 2019-12-03 19:48 UTC (permalink / raw)
  To: linux-mmc; +Cc: linux-renesas-soc, Yoshihiro Shimoda, Wolfram Sang

From: Wolfram Sang <wsa+renesas@sang-engineering.com>

We know now that there won't be Gen3 SoCs with both, SYS-DMAC and
internal DMAC. We removed the blacklisting for SYS-DMAC already, so we
can remove the whitelisting for internal DMAC, too. This makes adding
new SoCs easier. We keep the quirk handling, of course.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/mmc/host/renesas_sdhi_internal_dmac.c | 23 ++++---------------
 1 file changed, 4 insertions(+), 19 deletions(-)

diff --git a/drivers/mmc/host/renesas_sdhi_internal_dmac.c b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
index 68fb39a74b8b..47ac53e91241 100644
--- a/drivers/mmc/host/renesas_sdhi_internal_dmac.c
+++ b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
@@ -298,38 +298,23 @@ static const struct tmio_mmc_dma_ops renesas_sdhi_internal_dmac_dma_ops = {
  * Whitelist of specific R-Car Gen3 SoC ES versions to use this DMAC
  * implementation as others may use a different implementation.
  */
-static const struct soc_device_attribute soc_whitelist[] = {
-	/* specific ones */
+static const struct soc_device_attribute soc_dma_quirks[] = {
 	{ .soc_id = "r7s9210",
 	  .data = (void *)BIT(SDHI_INTERNAL_DMAC_ADDR_MODE_FIXED_ONLY) },
 	{ .soc_id = "r8a7795", .revision = "ES1.*",
 	  .data = (void *)BIT(SDHI_INTERNAL_DMAC_ONE_RX_ONLY) },
 	{ .soc_id = "r8a7796", .revision = "ES1.0",
 	  .data = (void *)BIT(SDHI_INTERNAL_DMAC_ONE_RX_ONLY) },
-	/* generic ones */
-	{ .soc_id = "r8a774a1" },
-	{ .soc_id = "r8a774b1" },
-	{ .soc_id = "r8a774c0" },
-	{ .soc_id = "r8a77470" },
-	{ .soc_id = "r8a7795" },
-	{ .soc_id = "r8a7796" },
-	{ .soc_id = "r8a77965" },
-	{ .soc_id = "r8a77970" },
-	{ .soc_id = "r8a77980" },
-	{ .soc_id = "r8a77990" },
-	{ .soc_id = "r8a77995" },
 	{ /* sentinel */ }
 };
 
 static int renesas_sdhi_internal_dmac_probe(struct platform_device *pdev)
 {
-	const struct soc_device_attribute *soc = soc_device_match(soc_whitelist);
+	const struct soc_device_attribute *soc = soc_device_match(soc_dma_quirks);
 	struct device *dev = &pdev->dev;
 
-	if (!soc)
-		return -ENODEV;
-
-	global_flags |= (unsigned long)soc->data;
+	if (soc)
+		global_flags |= (unsigned long)soc->data;
 
 	dev->dma_parms = devm_kzalloc(dev, sizeof(*dev->dma_parms), GFP_KERNEL);
 	if (!dev->dma_parms)
-- 
2.20.1


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

* Re: [PATCH] mmc: renesas_sdhi: remove whitelist for internal DMAC
  2019-12-03 19:48 [PATCH] mmc: renesas_sdhi: remove whitelist for internal DMAC Wolfram Sang
@ 2019-12-04  9:33 ` Geert Uytterhoeven
  2019-12-04 17:59 ` Niklas Söderlund
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2019-12-04  9:33 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Linux MMC List, Linux-Renesas, Yoshihiro Shimoda, Wolfram Sang

On Tue, Dec 3, 2019 at 8:49 PM Wolfram Sang <wsa@the-dreams.de> wrote:
> From: Wolfram Sang <wsa+renesas@sang-engineering.com>
>
> We know now that there won't be Gen3 SoCs with both, SYS-DMAC and
> internal DMAC. We removed the blacklisting for SYS-DMAC already, so we
> can remove the whitelisting for internal DMAC, too. This makes adding
> new SoCs easier. We keep the quirk handling, of course.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH] mmc: renesas_sdhi: remove whitelist for internal DMAC
  2019-12-03 19:48 [PATCH] mmc: renesas_sdhi: remove whitelist for internal DMAC Wolfram Sang
  2019-12-04  9:33 ` Geert Uytterhoeven
@ 2019-12-04 17:59 ` Niklas Söderlund
  2019-12-05 12:12 ` Yoshihiro Shimoda
  2019-12-10 13:09 ` Ulf Hansson
  3 siblings, 0 replies; 5+ messages in thread
From: Niklas Söderlund @ 2019-12-04 17:59 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-mmc, linux-renesas-soc, Yoshihiro Shimoda, Wolfram Sang

Hi Wolfram,

Thanks for your work.

On 2019-12-03 20:48:59 +0100, Wolfram Sang wrote:
> From: Wolfram Sang <wsa+renesas@sang-engineering.com>
> 
> We know now that there won't be Gen3 SoCs with both, SYS-DMAC and
> internal DMAC. We removed the blacklisting for SYS-DMAC already, so we
> can remove the whitelisting for internal DMAC, too. This makes adding
> new SoCs easier. We keep the quirk handling, of course.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

> ---
>  drivers/mmc/host/renesas_sdhi_internal_dmac.c | 23 ++++---------------
>  1 file changed, 4 insertions(+), 19 deletions(-)
> 
> diff --git a/drivers/mmc/host/renesas_sdhi_internal_dmac.c b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
> index 68fb39a74b8b..47ac53e91241 100644
> --- a/drivers/mmc/host/renesas_sdhi_internal_dmac.c
> +++ b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
> @@ -298,38 +298,23 @@ static const struct tmio_mmc_dma_ops renesas_sdhi_internal_dmac_dma_ops = {
>   * Whitelist of specific R-Car Gen3 SoC ES versions to use this DMAC
>   * implementation as others may use a different implementation.
>   */
> -static const struct soc_device_attribute soc_whitelist[] = {
> -	/* specific ones */
> +static const struct soc_device_attribute soc_dma_quirks[] = {
>  	{ .soc_id = "r7s9210",
>  	  .data = (void *)BIT(SDHI_INTERNAL_DMAC_ADDR_MODE_FIXED_ONLY) },
>  	{ .soc_id = "r8a7795", .revision = "ES1.*",
>  	  .data = (void *)BIT(SDHI_INTERNAL_DMAC_ONE_RX_ONLY) },
>  	{ .soc_id = "r8a7796", .revision = "ES1.0",
>  	  .data = (void *)BIT(SDHI_INTERNAL_DMAC_ONE_RX_ONLY) },
> -	/* generic ones */
> -	{ .soc_id = "r8a774a1" },
> -	{ .soc_id = "r8a774b1" },
> -	{ .soc_id = "r8a774c0" },
> -	{ .soc_id = "r8a77470" },
> -	{ .soc_id = "r8a7795" },
> -	{ .soc_id = "r8a7796" },
> -	{ .soc_id = "r8a77965" },
> -	{ .soc_id = "r8a77970" },
> -	{ .soc_id = "r8a77980" },
> -	{ .soc_id = "r8a77990" },
> -	{ .soc_id = "r8a77995" },
>  	{ /* sentinel */ }
>  };
>  
>  static int renesas_sdhi_internal_dmac_probe(struct platform_device *pdev)
>  {
> -	const struct soc_device_attribute *soc = soc_device_match(soc_whitelist);
> +	const struct soc_device_attribute *soc = soc_device_match(soc_dma_quirks);
>  	struct device *dev = &pdev->dev;
>  
> -	if (!soc)
> -		return -ENODEV;
> -
> -	global_flags |= (unsigned long)soc->data;
> +	if (soc)
> +		global_flags |= (unsigned long)soc->data;
>  
>  	dev->dma_parms = devm_kzalloc(dev, sizeof(*dev->dma_parms), GFP_KERNEL);
>  	if (!dev->dma_parms)
> -- 
> 2.20.1
> 

-- 
Regards,
Niklas Söderlund

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

* RE: [PATCH] mmc: renesas_sdhi: remove whitelist for internal DMAC
  2019-12-03 19:48 [PATCH] mmc: renesas_sdhi: remove whitelist for internal DMAC Wolfram Sang
  2019-12-04  9:33 ` Geert Uytterhoeven
  2019-12-04 17:59 ` Niklas Söderlund
@ 2019-12-05 12:12 ` Yoshihiro Shimoda
  2019-12-10 13:09 ` Ulf Hansson
  3 siblings, 0 replies; 5+ messages in thread
From: Yoshihiro Shimoda @ 2019-12-05 12:12 UTC (permalink / raw)
  To: Wolfram Sang, linux-mmc; +Cc: linux-renesas-soc, Wolfram Sang

Hi Wolfram-san,

> From: Wolfram Sang, Sent: Wednesday, December 4, 2019 4:49 AM
> 
> We know now that there won't be Gen3 SoCs with both, SYS-DMAC and
> internal DMAC. We removed the blacklisting for SYS-DMAC already, so we
> can remove the whitelisting for internal DMAC, too. This makes adding
> new SoCs easier. We keep the quirk handling, of course.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Thank you for the patch!

Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>

Best regards,
Yoshihiro Shimoda


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

* Re: [PATCH] mmc: renesas_sdhi: remove whitelist for internal DMAC
  2019-12-03 19:48 [PATCH] mmc: renesas_sdhi: remove whitelist for internal DMAC Wolfram Sang
                   ` (2 preceding siblings ...)
  2019-12-05 12:12 ` Yoshihiro Shimoda
@ 2019-12-10 13:09 ` Ulf Hansson
  3 siblings, 0 replies; 5+ messages in thread
From: Ulf Hansson @ 2019-12-10 13:09 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-mmc, Linux-Renesas, Yoshihiro Shimoda, Wolfram Sang

On Tue, 3 Dec 2019 at 20:49, Wolfram Sang <wsa@the-dreams.de> wrote:
>
> From: Wolfram Sang <wsa+renesas@sang-engineering.com>
>
> We know now that there won't be Gen3 SoCs with both, SYS-DMAC and
> internal DMAC. We removed the blacklisting for SYS-DMAC already, so we
> can remove the whitelisting for internal DMAC, too. This makes adding
> new SoCs easier. We keep the quirk handling, of course.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Applied for next, thanks!

Kind regards
Uffe


> ---
>  drivers/mmc/host/renesas_sdhi_internal_dmac.c | 23 ++++---------------
>  1 file changed, 4 insertions(+), 19 deletions(-)
>
> diff --git a/drivers/mmc/host/renesas_sdhi_internal_dmac.c b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
> index 68fb39a74b8b..47ac53e91241 100644
> --- a/drivers/mmc/host/renesas_sdhi_internal_dmac.c
> +++ b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
> @@ -298,38 +298,23 @@ static const struct tmio_mmc_dma_ops renesas_sdhi_internal_dmac_dma_ops = {
>   * Whitelist of specific R-Car Gen3 SoC ES versions to use this DMAC
>   * implementation as others may use a different implementation.
>   */
> -static const struct soc_device_attribute soc_whitelist[] = {
> -       /* specific ones */
> +static const struct soc_device_attribute soc_dma_quirks[] = {
>         { .soc_id = "r7s9210",
>           .data = (void *)BIT(SDHI_INTERNAL_DMAC_ADDR_MODE_FIXED_ONLY) },
>         { .soc_id = "r8a7795", .revision = "ES1.*",
>           .data = (void *)BIT(SDHI_INTERNAL_DMAC_ONE_RX_ONLY) },
>         { .soc_id = "r8a7796", .revision = "ES1.0",
>           .data = (void *)BIT(SDHI_INTERNAL_DMAC_ONE_RX_ONLY) },
> -       /* generic ones */
> -       { .soc_id = "r8a774a1" },
> -       { .soc_id = "r8a774b1" },
> -       { .soc_id = "r8a774c0" },
> -       { .soc_id = "r8a77470" },
> -       { .soc_id = "r8a7795" },
> -       { .soc_id = "r8a7796" },
> -       { .soc_id = "r8a77965" },
> -       { .soc_id = "r8a77970" },
> -       { .soc_id = "r8a77980" },
> -       { .soc_id = "r8a77990" },
> -       { .soc_id = "r8a77995" },
>         { /* sentinel */ }
>  };
>
>  static int renesas_sdhi_internal_dmac_probe(struct platform_device *pdev)
>  {
> -       const struct soc_device_attribute *soc = soc_device_match(soc_whitelist);
> +       const struct soc_device_attribute *soc = soc_device_match(soc_dma_quirks);
>         struct device *dev = &pdev->dev;
>
> -       if (!soc)
> -               return -ENODEV;
> -
> -       global_flags |= (unsigned long)soc->data;
> +       if (soc)
> +               global_flags |= (unsigned long)soc->data;
>
>         dev->dma_parms = devm_kzalloc(dev, sizeof(*dev->dma_parms), GFP_KERNEL);
>         if (!dev->dma_parms)
> --
> 2.20.1
>

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

end of thread, other threads:[~2019-12-10 13:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-03 19:48 [PATCH] mmc: renesas_sdhi: remove whitelist for internal DMAC Wolfram Sang
2019-12-04  9:33 ` Geert Uytterhoeven
2019-12-04 17:59 ` Niklas Söderlund
2019-12-05 12:12 ` Yoshihiro Shimoda
2019-12-10 13:09 ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).