* [PATCH] mips/jazz: provide missing dma_mask/coherent_dma_mask
@ 2018-07-12 13:42 Thomas Bogendoerfer
2018-07-12 16:01 ` Paul Burton
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Bogendoerfer @ 2018-07-12 13:42 UTC (permalink / raw)
To: Ralf Baechle, Paul Burton, James Hogan, linux-mips, linux-kernel
Commit 205e1b7f51e4 ("dma-mapping: warn when there is no coherent_dma_mask")
introduced a warning, if a device is missing a coherent_dma_mask.
ESP and sonic are using dma mapping functions, so they need dma masks.
Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
---
arch/mips/jazz/setup.c | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/arch/mips/jazz/setup.c b/arch/mips/jazz/setup.c
index 448fd41792e4..1b5e121c3f0d 100644
--- a/arch/mips/jazz/setup.c
+++ b/arch/mips/jazz/setup.c
@@ -16,6 +16,7 @@
#include <linux/screen_info.h>
#include <linux/platform_device.h>
#include <linux/serial_8250.h>
+#include <linux/dma-mapping.h>
#include <asm/jazz.h>
#include <asm/jazzdma.h>
@@ -136,10 +137,16 @@ static struct resource jazz_esp_rsrc[] = {
}
};
+static u64 jazz_esp_dma_mask = DMA_BIT_MASK(32);
+
static struct platform_device jazz_esp_pdev = {
.name = "jazz_esp",
.num_resources = ARRAY_SIZE(jazz_esp_rsrc),
- .resource = jazz_esp_rsrc
+ .resource = jazz_esp_rsrc,
+ .dev = {
+ .dma_mask = &jazz_esp_dma_mask,
+ .coherent_dma_mask = DMA_BIT_MASK(32),
+ }
};
static struct resource jazz_sonic_rsrc[] = {
@@ -155,10 +162,16 @@ static struct resource jazz_sonic_rsrc[] = {
}
};
+static u64 jazz_sonic_dma_mask = DMA_BIT_MASK(32);
+
static struct platform_device jazz_sonic_pdev = {
.name = "jazzsonic",
.num_resources = ARRAY_SIZE(jazz_sonic_rsrc),
- .resource = jazz_sonic_rsrc
+ .resource = jazz_sonic_rsrc,
+ .dev = {
+ .dma_mask = &jazz_sonic_dma_mask,
+ .coherent_dma_mask = DMA_BIT_MASK(32),
+ }
};
static struct resource jazz_cmos_rsrc[] = {
--
2.13.7
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mips/jazz: provide missing dma_mask/coherent_dma_mask
2018-07-12 13:42 [PATCH] mips/jazz: provide missing dma_mask/coherent_dma_mask Thomas Bogendoerfer
@ 2018-07-12 16:01 ` Paul Burton
0 siblings, 0 replies; 2+ messages in thread
From: Paul Burton @ 2018-07-12 16:01 UTC (permalink / raw)
To: Thomas Bogendoerfer; +Cc: Ralf Baechle, James Hogan, linux-mips, linux-kernel
Hi Thomas,
On Thu, Jul 12, 2018 at 03:42:55PM +0200, Thomas Bogendoerfer wrote:
> Commit 205e1b7f51e4 ("dma-mapping: warn when there is no coherent_dma_mask")
> introduced a warning, if a device is missing a coherent_dma_mask.
> ESP and sonic are using dma mapping functions, so they need dma masks.
>
> Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
> ---
> arch/mips/jazz/setup.c | 17 +++++++++++++++--
> 1 file changed, 15 insertions(+), 2 deletions(-)
Applied to mips-next for 4.19, thanks!
Paul
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-07-12 16:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-12 13:42 [PATCH] mips/jazz: provide missing dma_mask/coherent_dma_mask Thomas Bogendoerfer
2018-07-12 16:01 ` Paul Burton
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).