Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1512901 > unrolled thread

[PATCH v2] staging: vc04_services: setup DMA and coherent mask

Started byMichael Zoran <mzoran@crowfest.net>
First post2016-10-31 22:10 +0100
Last post2016-11-07 17:40 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v2] staging: vc04_services: setup DMA and coherent mask Michael Zoran <mzoran@crowfest.net> - 2016-10-31 22:10 +0100
    Re: [PATCH v2] staging: vc04_services: setup DMA and coherent mask Eric Anholt <eric@anholt.net> - 2016-11-07 17:40 +0100

#1512901 — [PATCH v2] staging: vc04_services: setup DMA and coherent mask

FromMichael Zoran <mzoran@crowfest.net>
Date2016-10-31 22:10 +0100
Subject[PATCH v2] staging: vc04_services: setup DMA and coherent mask
Message-ID<sys0a-7Ib-11@gated-at.bofh.it>
VCHI messages between the CPU and firmware use 32-bit
bus addresses. Explicitly set the DMA mask and coherent
on all platforms.

Signed-off-by: Michael Zoran <mzoran@crowfest.net>
---
 .../staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c   | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c
index a5afcc5..ba77fd8 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c
@@ -97,6 +97,15 @@ int vchiq_platform_init(struct platform_device *pdev, VCHIQ_STATE_T *state)
 	int slot_mem_size, frag_mem_size;
 	int err, irq, i;
 
+	/*
+	 * VCHI messages between the CPU and firmware use
+	 * 32-bit bus addresses.
+	 */
+	err = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32));
+
+	if (err < 0)
+		return err;
+
 	(void)of_property_read_u32(dev->of_node, "cache-line-size",
 				   &g_cache_line_size);
 	g_fragments_size = 2 * g_cache_line_size;
-- 
2.10.1

[toc] | [next] | [standalone]


#1516301

FromEric Anholt <eric@anholt.net>
Date2016-11-07 17:40 +0100
Message-ID<sAV7I-5z9-15@gated-at.bofh.it>
In reply to#1512901

[Multipart message — attachments visible in raw view] — view raw

Michael Zoran <mzoran@crowfest.net> writes:

> VCHI messages between the CPU and firmware use 32-bit
> bus addresses. Explicitly set the DMA mask and coherent
> on all platforms.

Reviewed-by: Eric Anholt <eric@anholt.net>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web