
On 12/13/2012 01:36 PM, Wolfgang Denk wrote:
Dear Stephen Warren,
In message 50CA1BB8.4000704@wwwdotorg.org you wrote:
Arghh... Do we really, really have to invent yet another way to pass hardware configuration information? Especially one totally incompatible to any other system?
This is a special case for the console UART. The idea is to get that up and running well before device tree is parsed in any way. For example, Tegra's SPL doesn't touch the device tree in any way (or even know one exists) but does want to print (possibly error) messages in a generic fashion. Similarly, many problems could occur before the device tree is parsed (e.g. the user forgets to provide one...), and having specifically the console UART set up before that allows those errors to be reported, rather than requiring a JTAG or similar debugger.
My intent is that ODMDATA will definitely only be used for the console UART, and will NOT be used for anything else like LCD, RTC, ... Those other devices will certainly be configured via device tree.
We've been there before, you know.
I'm not quite sure what the implication is here.
OK - what is the scope of visibility of such code? Will it be strictly board specific only? Or SoC specific? Arch? Global?
It's partially SoC-specific, partially global.
Note that by "all" and "global" here, I'm talking relative to all Tegra SoCs, not about anything non-Tegra. "SoC-specific" means different for Tegra20, Tegra30, Tegra114, etc.
In every Tegra SoC, the boot ROM reads a BCT (Boot Configuration Table) at boot. The BCT contains e.g. SDRAM controller configuration and other low-level boot information. The BCT is stored within the boot flash. The ODMDATA fields are stored within the BCT. The offset of the ODMDATA within the BCT is SoC-specific since the BCT structure is SoC-specific.
The ODMDATA for all Tegra SoCs includes fields that define (a) which UART to use (so far, identical across all SoCs) (b) the pinmux configuration to use, and other information (mainly SDRAM size at the moment). Since the pinmux HW is SoC-specific, so is the exact format of the UART pinmux configuration data.
For more details on Tegra BCTs, you may refer to: ftp://download.nvidia.com/tegra-public-appnotes/index.html http://nv-tegra.nvidia.com/gitweb/?p=tools/cbootimage.git;a=summary
Note that in the latter case, I haven't pushed out the patches which document the UART pinmux fields yet, but will very soon; most likely as soon as we've resolved this conversation.