linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mfd: davinci_voicecodec: remove pointless #include
@ 2019-06-28 10:41 Arnd Bergmann
  2019-06-28 10:47 ` Arnd Bergmann
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2019-06-28 10:41 UTC (permalink / raw)
  To: Lee Jones; +Cc: Arnd Bergmann, Richard Fontana, linux-kernel

When building davinci as multiplatform, we get a build error
in this file:

drivers/mfd/davinci_voicecodec.c:22:10: fatal error: 'mach/hardware.h' file not found

The header is only used to access the io_v2p() macro, but the
result is already known because that comes from the resource
a little bit earlier.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/mfd/davinci_voicecodec.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/mfd/davinci_voicecodec.c b/drivers/mfd/davinci_voicecodec.c
index 13ca7203e193..e5c8bc998eb4 100644
--- a/drivers/mfd/davinci_voicecodec.c
+++ b/drivers/mfd/davinci_voicecodec.c
@@ -19,7 +19,6 @@
 #include <sound/pcm.h>
 
 #include <linux/mfd/davinci_voicecodec.h>
-#include <mach/hardware.h>
 
 static const struct regmap_config davinci_vc_regmap = {
 	.reg_bits = 32,
@@ -31,6 +30,7 @@ static int __init davinci_vc_probe(struct platform_device *pdev)
 	struct davinci_vc *davinci_vc;
 	struct resource *res;
 	struct mfd_cell *cell = NULL;
+	dma_addr_t fifo_base;
 	int ret;
 
 	davinci_vc = devm_kzalloc(&pdev->dev,
@@ -48,6 +48,7 @@ static int __init davinci_vc_probe(struct platform_device *pdev)
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 
+	fifo_base = (dma_addr_t)res->start;
 	davinci_vc->base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(davinci_vc->base)) {
 		ret = PTR_ERR(davinci_vc->base);
@@ -70,8 +71,7 @@ static int __init davinci_vc_probe(struct platform_device *pdev)
 	}
 
 	davinci_vc->davinci_vcif.dma_tx_channel = res->start;
-	davinci_vc->davinci_vcif.dma_tx_addr =
-		(dma_addr_t)(io_v2p(davinci_vc->base) + DAVINCI_VC_WFIFO);
+	davinci_vc->davinci_vcif.dma_tx_addr = fifo_base + DAVINCI_VC_WFIFO;
 
 	res = platform_get_resource(pdev, IORESOURCE_DMA, 1);
 	if (!res) {
@@ -81,8 +81,7 @@ static int __init davinci_vc_probe(struct platform_device *pdev)
 	}
 
 	davinci_vc->davinci_vcif.dma_rx_channel = res->start;
-	davinci_vc->davinci_vcif.dma_rx_addr =
-		(dma_addr_t)(io_v2p(davinci_vc->base) + DAVINCI_VC_RFIFO);
+	davinci_vc->davinci_vcif.dma_rx_addr = fifo_base + DAVINCI_VC_RFIFO;
 
 	davinci_vc->dev = &pdev->dev;
 	davinci_vc->pdev = pdev;
-- 
2.20.0


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

* Re: [PATCH] mfd: davinci_voicecodec: remove pointless #include
  2019-06-28 10:41 [PATCH] mfd: davinci_voicecodec: remove pointless #include Arnd Bergmann
@ 2019-06-28 10:47 ` Arnd Bergmann
  2019-07-01 14:42   ` Sekhar Nori
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2019-06-28 10:47 UTC (permalink / raw)
  To: Lee Jones
  Cc: Richard Fontana, Linux Kernel Mailing List, Sekhar Nori,
	Bartosz Golaszewski, Linux ARM

[I missed the davinci maintainers on cc here, sorry]

On Fri, Jun 28, 2019 at 12:41 PM Arnd Bergmann <arnd@arndb.de> wrote:
>
> When building davinci as multiplatform, we get a build error
> in this file:
>
> drivers/mfd/davinci_voicecodec.c:22:10: fatal error: 'mach/hardware.h' file not found
>
> The header is only used to access the io_v2p() macro, but the
> result is already known because that comes from the resource
> a little bit earlier.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/mfd/davinci_voicecodec.c | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/mfd/davinci_voicecodec.c b/drivers/mfd/davinci_voicecodec.c
> index 13ca7203e193..e5c8bc998eb4 100644
> --- a/drivers/mfd/davinci_voicecodec.c
> +++ b/drivers/mfd/davinci_voicecodec.c
> @@ -19,7 +19,6 @@
>  #include <sound/pcm.h>
>
>  #include <linux/mfd/davinci_voicecodec.h>
> -#include <mach/hardware.h>
>
>  static const struct regmap_config davinci_vc_regmap = {
>         .reg_bits = 32,
> @@ -31,6 +30,7 @@ static int __init davinci_vc_probe(struct platform_device *pdev)
>         struct davinci_vc *davinci_vc;
>         struct resource *res;
>         struct mfd_cell *cell = NULL;
> +       dma_addr_t fifo_base;
>         int ret;
>
>         davinci_vc = devm_kzalloc(&pdev->dev,
> @@ -48,6 +48,7 @@ static int __init davinci_vc_probe(struct platform_device *pdev)
>
>         res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>
> +       fifo_base = (dma_addr_t)res->start;
>         davinci_vc->base = devm_ioremap_resource(&pdev->dev, res);
>         if (IS_ERR(davinci_vc->base)) {
>                 ret = PTR_ERR(davinci_vc->base);
> @@ -70,8 +71,7 @@ static int __init davinci_vc_probe(struct platform_device *pdev)
>         }
>
>         davinci_vc->davinci_vcif.dma_tx_channel = res->start;
> -       davinci_vc->davinci_vcif.dma_tx_addr =
> -               (dma_addr_t)(io_v2p(davinci_vc->base) + DAVINCI_VC_WFIFO);
> +       davinci_vc->davinci_vcif.dma_tx_addr = fifo_base + DAVINCI_VC_WFIFO;
>
>         res = platform_get_resource(pdev, IORESOURCE_DMA, 1);
>         if (!res) {
> @@ -81,8 +81,7 @@ static int __init davinci_vc_probe(struct platform_device *pdev)
>         }
>
>         davinci_vc->davinci_vcif.dma_rx_channel = res->start;
> -       davinci_vc->davinci_vcif.dma_rx_addr =
> -               (dma_addr_t)(io_v2p(davinci_vc->base) + DAVINCI_VC_RFIFO);
> +       davinci_vc->davinci_vcif.dma_rx_addr = fifo_base + DAVINCI_VC_RFIFO;
>
>         davinci_vc->dev = &pdev->dev;
>         davinci_vc->pdev = pdev;
> --
> 2.20.0
>

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

* Re: [PATCH] mfd: davinci_voicecodec: remove pointless #include
  2019-06-28 10:47 ` Arnd Bergmann
@ 2019-07-01 14:42   ` Sekhar Nori
  0 siblings, 0 replies; 3+ messages in thread
From: Sekhar Nori @ 2019-07-01 14:42 UTC (permalink / raw)
  To: Arnd Bergmann, Lee Jones
  Cc: Richard Fontana, Linux Kernel Mailing List, Bartosz Golaszewski,
	Linux ARM

On 28/06/19 4:17 PM, Arnd Bergmann wrote:
> [I missed the davinci maintainers on cc here, sorry]
> 
> On Fri, Jun 28, 2019 at 12:41 PM Arnd Bergmann <arnd@arndb.de> wrote:
>>
>> When building davinci as multiplatform, we get a build error
>> in this file:
>>
>> drivers/mfd/davinci_voicecodec.c:22:10: fatal error: 'mach/hardware.h' file not found
>>
>> The header is only used to access the io_v2p() macro, but the
>> result is already known because that comes from the resource
>> a little bit earlier.
>>
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Sekhar Nori <nsekhar@ti.com>

Thanks,
Sekhar

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

end of thread, other threads:[~2019-07-01 14:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-28 10:41 [PATCH] mfd: davinci_voicecodec: remove pointless #include Arnd Bergmann
2019-06-28 10:47 ` Arnd Bergmann
2019-07-01 14:42   ` Sekhar Nori

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).