Thread (45 messages) 45 messages, 11 authors, 2014-11-05

[RFC 04/10] memory: Add Tegra124 memory controller support

From: Thierry Reding <hidden>
Date: 2014-06-27 11:15:22
Also in: linux-devicetree, linux-iommu, linux-tegra, lkml

On Fri, Jun 27, 2014 at 01:07:04PM +0200, Arnd Bergmann wrote:
On Thursday 26 June 2014 22:49:44 Thierry Reding wrote:
quoted
+static const struct tegra_mc_client tegra124_mc_clients[] = {
+       {
+               .id = 0x01,
+               .name = "display0a",
+               .swgroup = TEGRA_SWGROUP_DC,
+               .smmu = {
+                       .reg = 0x228,
+                       .bit = 1,
+               },
+               .latency = {
+                       .reg = 0x2e8,
+                       .shift = 0,
+                       .mask = 0xff,
+                       .def = 0xc2,
+               },
+       }, {
This is a rather long table that I assume would need to get duplicated
and modified for each specific SoC. Have you considered to put the information
into DT instead, as auxiliary data in the iommu specifier as provided by
the device?
Most of this data really is register information and I don't think that
belongs in DT. Also since this is fixed for a given SoC and in no way
configurable (well, with the exception of the .def field above) I don't
see any point in parsing this from device tree.

Also only the .smmu substruct is immediately relevant to the IOMMU part
of the driver. The .swgroup field could possibly also be moved into that
substructure since it is only relevant to the IOMMU.

So essentially what this table does is map SWGROUPs (which are provided
in the IOMMU specifier) to the clients and registers that the IOMMU
programming needs. As an analogy it corresponds roughly to the pins and
pingroups tables of pinctrl drivers. Those don't belong in device tree
either.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140627/26343dbd/attachment.sig>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help