]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ARM: bcm2835: use phys_to_bus() for mbox
authorStephen Warren <swarren@wwwdotorg.org>
Tue, 7 Apr 2015 02:28:39 +0000 (20:28 -0600)
committerMarek Vasut <marex@denx.de>
Tue, 14 Apr 2015 03:47:59 +0000 (05:47 +0200)
When we communicate with the VideoCore to perform property mailbox
transactions, that is a DMA operation as far as the property buffer
is concerned. Use phys_to_bus() on that buffer.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
arch/arm/mach-bcm283x/mbox.c

index 3b17a31eacfd6e5ab092e53bca87c4d0d408ca92..1af9be78c68a3ccb5ba019a3f1e95e9122160142 100644 (file)
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <asm/io.h>
 #include <asm/arch/mbox.h>
+#include <phys2bus.h>
 
 #define TIMEOUT 1000 /* ms */
 
@@ -110,10 +111,10 @@ int bcm2835_mbox_call_prop(u32 chan, struct bcm2835_mbox_hdr *buffer)
        dump_buf(buffer);
 #endif
 
-       ret = bcm2835_mbox_call_raw(chan, (u32)buffer, &rbuffer);
+       ret = bcm2835_mbox_call_raw(chan, phys_to_bus((u32)buffer), &rbuffer);
        if (ret)
                return ret;
-       if (rbuffer != (u32)buffer) {
+       if (rbuffer != phys_to_bus((u32)buffer)) {
                printf("mbox: Response buffer mismatch\n");
                return -1;
        }