Skip to contentSkip to conversation

staging: vc04_services: setup DMA and coherent mask

PATCH In review Michael Zoran 2 participants 2 messages Oct 31, 2016 – Nov 7, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 staging: vc04_services: setup DMA and coherent mask

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

---
 .../staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c   | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c +9 -0
index a5afcc5..ba77fd8 100644
@@ -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;
Signature · 1 line
2.10.1
Reviewed-by on v2 1/1
#1 lore raw
Quoted 3 lines · Michael Zoran

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 800 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20161107/14619b5d/attachment.sig>