* [PATCH v2] staging: vc04_services: setup DMA and coherent mask
@ 2016-10-31 21:02 ` Michael Zoran
0 siblings, 0 replies; 4+ messages in thread
From: Michael Zoran @ 2016-10-31 21:02 UTC (permalink / raw)
To: gregkh
Cc: eric, swarren, lee, mzoran, daniels, noralf, popcornmix,
linux-rpi-kernel, linux-arm-kernel, devel, linux-kernel
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2] staging: vc04_services: setup DMA and coherent mask
@ 2016-10-31 21:02 ` Michael Zoran
0 siblings, 0 replies; 4+ messages in thread
From: Michael Zoran @ 2016-10-31 21:02 UTC (permalink / raw)
To: linux-arm-kernel
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] staging: vc04_services: setup DMA and coherent mask
2016-10-31 21:02 ` Michael Zoran
@ 2016-11-07 16:38 ` Eric Anholt
-1 siblings, 0 replies; 4+ messages in thread
From: Eric Anholt @ 2016-11-07 16:38 UTC (permalink / raw)
To: Michael Zoran, gregkh
Cc: swarren, lee, mzoran, daniels, noralf, popcornmix,
linux-rpi-kernel, linux-arm-kernel, devel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 223 bytes --]
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>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 800 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] staging: vc04_services: setup DMA and coherent mask
@ 2016-11-07 16:38 ` Eric Anholt
0 siblings, 0 replies; 4+ messages in thread
From: Eric Anholt @ 2016-11-07 16:38 UTC (permalink / raw)
To: linux-arm-kernel
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>
-------------- 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>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-11-07 16:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-31 21:02 [PATCH v2] staging: vc04_services: setup DMA and coherent mask Michael Zoran
2016-10-31 21:02 ` Michael Zoran
2016-11-07 16:38 ` Eric Anholt
2016-11-07 16:38 ` Eric Anholt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.