public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/3] ARM: bcm2835: implement phys_to_bus/bus_to_phys
Date: Wed, 25 Mar 2015 12:53:39 +0100	[thread overview]
Message-ID: <201503251253.39949.marex@denx.de> (raw)
In-Reply-To: <1427249255-27427-2-git-send-email-swarren@wwwdotorg.org>

On Wednesday, March 25, 2015 at 03:07:34 AM, Stephen Warren wrote:
> The BCM283[56] contain both a L1 and L2 cache between the GPU (a/k/a
> VideoCore CPU?) and DRAM. DMA-capable peripherals can also optionally
> access DRAM via this same  L2 cache (although they always bypass the L1
> cache). Peripherals select whether to use or bypass the cache via the
> top two bits of the bus address.
> 
> An IOMMU exists between the ARM CPU and the rest of the system. This
> controls whether the ARM CPU's accesses use or bypass the L1 and/or L2
> cache. This IOMMU is configured/controlled exclusively by the VideoCore
> CPU.
> 
> In order for DRAM accesses made by the ARM core to be coherent with
> accesses made by other DMA peripherals, we must program a bus address
> into those peripherals that causes the peripheral's accesses to use the
> same set of caches that the ARM core's accesses will use.
> 
> On the RPi1, the VideoCore firmware sets up the IOMMU to enable use of
> the L2 cache. This corresponds to addresses based at 0x40000000.
> 
> On the RPi2, the VideoCore firmware sets up the IOMMU to disable use of
> the L2 cache. This corresponds to addresses based at 0xc0000000.
> 
> This patch implements U-Boot's phys_to_bus/bus_to_phys APIs according
> to those rules.
> 
> For full details of this setup, please see Dom Cobley's description at:
> http://lists.denx.de/pipermail/u-boot/2015-March/208201.html
> http://permalink.gmane.org/gmane.comp.boot-loaders.u-boot/215038
> https://www.mail-archive.com/u-boot at lists.denx.de/msg166568.html
> 
> Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>

Applied to -next, thanks!

Best regards,
Marek Vasut

  reply	other threads:[~2015-03-25 11:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-25  2:07 [U-Boot] [PATCH 1/3] Create API to map between CPU physical and bus addresses Stephen Warren
2015-03-25  2:07 ` [U-Boot] [PATCH 2/3] ARM: bcm2835: implement phys_to_bus/bus_to_phys Stephen Warren
2015-03-25 11:53   ` Marek Vasut [this message]
2015-03-25  2:07 ` [U-Boot] [PATCH 3/3] usb: dwc2: use phys_to_bus/bus_to_phys Stephen Warren
2015-03-25 11:55   ` Marek Vasut
2015-03-25 11:55 ` [U-Boot] [PATCH 1/3] Create API to map between CPU physical and bus addresses Marek Vasut
2015-03-25 14:40   ` Stephen Warren
2015-03-25 14:57     ` Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201503251253.39949.marex@denx.de \
    --to=marex@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox