Skip to content

Commit

Permalink
mips/jazz: provide missing dma_mask/coherent_dma_mask
Browse files Browse the repository at this point in the history
Commit 205e1b7 ("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.

[paul.burton@mips.com:
  - Wrap commit message.]

Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
Signed-off-by: Paul Burton <paul.burton@mips.com>
Patchwork: https://patchwork.linux-mips.org/patch/19828/
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: James Hogan <jhogan@kernel.org>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
  • Loading branch information
Thomas Bogendoerfer authored and Paul Burton committed Jul 12, 2018
1 parent ddba595 commit b5d6912
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions arch/mips/jazz/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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[] = {
Expand All @@ -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[] = {
Expand Down

0 comments on commit b5d6912

Please sign in to comment.