All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH V2] ARM: bcm2835: use phys_to_bus() for mbox
@ 2015-04-07  2:28 Stephen Warren
  2015-04-07  2:57 ` Marek Vasut
  2015-05-28 13:24 ` [U-Boot] [U-Boot,V2] " Tom Rini
  0 siblings, 2 replies; 5+ messages in thread
From: Stephen Warren @ 2015-04-07  2:28 UTC (permalink / raw)
  To: u-boot

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>
---
v2: Rebase on top of bcm283x mbox header move.

While this isn't USB-related, it does depend on patches that went into
the USB topic/dwc2 tree. Either this can be merged there, or we'll have
to wait until that branch is merged into u-boot/master and then merge
this.

As best I can tell, this is the last place we need to do this. SDHCI has
potential but CONFIG_MMC_SDMA isn't set so I don't believe the code does
any DMA. LCD has potential, but the VideoCore allocates the display
surface, programs the display engine, and passes the surface's CPU pointer
back to the CPU in a firmware message, of U-Boot isn't involved in setting
up the DMA HW.
---
 arch/arm/mach-bcm283x/mbox.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-bcm283x/mbox.c b/arch/arm/mach-bcm283x/mbox.c
index 3b17a31eacfd..1af9be78c68a 100644
--- a/arch/arm/mach-bcm283x/mbox.c
+++ b/arch/arm/mach-bcm283x/mbox.c
@@ -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;
 	}
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH V2] ARM: bcm2835: use phys_to_bus() for mbox
  2015-04-07  2:28 [U-Boot] [PATCH V2] ARM: bcm2835: use phys_to_bus() for mbox Stephen Warren
@ 2015-04-07  2:57 ` Marek Vasut
  2015-05-28 13:24 ` [U-Boot] [U-Boot,V2] " Tom Rini
  1 sibling, 0 replies; 5+ messages in thread
From: Marek Vasut @ 2015-04-07  2:57 UTC (permalink / raw)
  To: u-boot

On Tuesday, April 07, 2015 at 04:28:39 AM, Stephen Warren wrote:
> 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>

Applied to u-boot-usb topic/dwc2 , thanks!

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [U-Boot,V2] ARM: bcm2835: use phys_to_bus() for mbox
  2015-04-07  2:28 [U-Boot] [PATCH V2] ARM: bcm2835: use phys_to_bus() for mbox Stephen Warren
  2015-04-07  2:57 ` Marek Vasut
@ 2015-05-28 13:24 ` Tom Rini
  2015-05-28 20:59   ` Stephen Warren
  2015-05-28 22:14   ` Tom Rini
  1 sibling, 2 replies; 5+ messages in thread
From: Tom Rini @ 2015-05-28 13:24 UTC (permalink / raw)
  To: u-boot

On Mon, Apr 06, 2015 at 08:28:39PM -0600, Stephen Warren wrote:

> 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>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150528/ad746caf/attachment.sig>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [U-Boot,V2] ARM: bcm2835: use phys_to_bus() for mbox
  2015-05-28 13:24 ` [U-Boot] [U-Boot,V2] " Tom Rini
@ 2015-05-28 20:59   ` Stephen Warren
  2015-05-28 22:14   ` Tom Rini
  1 sibling, 0 replies; 5+ messages in thread
From: Stephen Warren @ 2015-05-28 20:59 UTC (permalink / raw)
  To: u-boot

On 05/28/2015 07:24 AM, Tom Rini wrote:
> On Mon, Apr 06, 2015 at 08:28:39PM -0600, Stephen Warren wrote:
> 
>> 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>
> 
> Applied to u-boot/master, thanks!

That's odd. Since this patch had a dependency on a series that touched
the DWC2 USB driver, Marek applied this to a USB branch back on Apr
14, and it's been pulled into u-boot/master since then. See
122426d46e31 "ARM: bcm2835: use phys_to_bus() for mbox".

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [U-Boot,V2] ARM: bcm2835: use phys_to_bus() for mbox
  2015-05-28 13:24 ` [U-Boot] [U-Boot,V2] " Tom Rini
  2015-05-28 20:59   ` Stephen Warren
@ 2015-05-28 22:14   ` Tom Rini
  1 sibling, 0 replies; 5+ messages in thread
From: Tom Rini @ 2015-05-28 22:14 UTC (permalink / raw)
  To: u-boot

On Thu, May 28, 2015 at 09:24:59AM -0400, Tom Rini wrote:
> On Mon, Apr 06, 2015 at 08:28:39PM -0600, Stephen Warren wrote:
> 
> > 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>
> 
> Applied to u-boot/master, thanks!

Mutter about patchwork being out of sync, I see this has been in for
some time..

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150528/2c315c97/attachment.sig>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-05-28 22:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-07  2:28 [U-Boot] [PATCH V2] ARM: bcm2835: use phys_to_bus() for mbox Stephen Warren
2015-04-07  2:57 ` Marek Vasut
2015-05-28 13:24 ` [U-Boot] [U-Boot,V2] " Tom Rini
2015-05-28 20:59   ` Stephen Warren
2015-05-28 22:14   ` Tom Rini

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.