[PATCH v2 07/10] ARM: tegra: pcie: Add device tree support
From: Stephen Warren <hidden>
Date: 2012-06-22 16:20:00
Also in:
linux-devicetree, linux-pci, linux-tegra
From: Stephen Warren <hidden>
Date: 2012-06-22 16:20:00
Also in:
linux-devicetree, linux-pci, linux-tegra
On 06/21/2012 12:47 AM, Thierry Reding wrote: ...
Everybody seems to be happy with this approach, so I'll give it a shot. There is one thing I'm still unsure about, though. What if somebody uses the above scheme and maps the registers to the wrong port. The same goes for the nvidia,ctrl-offset property. It needs to match the register offset because they are directly related. I suppose we could leave that property away and look up the register via the port index (which, as Stephen already said, we'll have to do in other places anyway, unless we list all bit positions in the DT). Can we safely ignore such issues and assume the device tree to always be right? Should we just not care if somebody uses it wrongly?
I think that's pretty much the same thing as plain putting the wrong reg property into any node - the value is wrong, so it doesn't work. There's not too much you can do about it. I'd be happy to remove the nvidia,ctrl-offset property to avoid the need to specify basically the same information multiple times though; nothing wrong with making it easier to write the correct DT content.