]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
memory: Add NVIDIA Tegra memory controller support
authorThierry Reding <treding@nvidia.com>
Wed, 16 Apr 2014 07:24:44 +0000 (09:24 +0200)
committerThierry Reding <treding@nvidia.com>
Thu, 4 Dec 2014 15:11:47 +0000 (16:11 +0100)
commit8918465163171322c77a19d5258a95f56d89d2e4
tree4d818b6d61af15bffc6c60316c7b5d64efb01bde
parent4bc567dd60a1cfa9abd8484cff2de31cdf51649d
memory: Add NVIDIA Tegra memory controller support

The memory controller on NVIDIA Tegra exposes various knobs that can be
used to tune the behaviour of the clients attached to it.

Currently this driver sets up the latency allowance registers to the HW
defaults. Eventually an API should be exported by this driver (via a
custom API or a generic subsystem) to allow clients to register latency
requirements.

This driver also registers an IOMMU (SMMU) that's implemented by the
memory controller. It is supported on Tegra30, Tegra114 and Tegra124
currently. Tegra20 has a GART instead.

The Tegra SMMU operates on memory clients and SWGROUPs. A memory client
is a unidirectional, special-purpose DMA master. A SWGROUP represents a
set of memory clients that form a logical functional unit corresponding
to a single device. Typically a device has two clients: one client for
read transactions and one client for write transactions, but there are
also devices that have only read clients, but many of them (such as the
display controllers).

Because there is no 1:1 relationship between memory clients and devices
the driver keeps a table of memory clients and the SWGROUPs that they
belong to per SoC. Note that this is an exception and due to the fact
that the SMMU is tightly integrated with the rest of the Tegra SoC. The
use of these tables is discouraged in drivers for generic IOMMU devices
such as the ARM SMMU because the same IOMMU could be used in any number
of SoCs and keeping such tables for each SoC would not scale.

Acked-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Thierry Reding <treding@nvidia.com>
16 files changed:
drivers/iommu/Kconfig
drivers/iommu/tegra-smmu.c
drivers/memory/Kconfig
drivers/memory/Makefile
drivers/memory/tegra/Kconfig [new file with mode: 0644]
drivers/memory/tegra/Makefile [new file with mode: 0644]
drivers/memory/tegra/mc.c [new file with mode: 0644]
drivers/memory/tegra/mc.h [new file with mode: 0644]
drivers/memory/tegra/tegra114.c [new file with mode: 0644]
drivers/memory/tegra/tegra124.c [new file with mode: 0644]
drivers/memory/tegra/tegra30.c [new file with mode: 0644]
drivers/memory/tegra30-mc.c [deleted file]
include/dt-bindings/memory/tegra114-mc.h [new file with mode: 0644]
include/dt-bindings/memory/tegra124-mc.h [new file with mode: 0644]
include/dt-bindings/memory/tegra30-mc.h [new file with mode: 0644]
include/soc/tegra/mc.h [new file with mode: 0644]