linux/arch/arm/mach-tegra/include/mach
Stephen Warren 80881dae52 ARM: tegra: uncompress.h: Implement TEGRA_DEBUG_UART_AUTO_ODMDATA
Tegra has 5 UARTS which could be used for low-level debug output. Commit
fe26398 "ARM: tegra: uncompress.h: Choose a UART at runtime" implemented
one method for the kernel to automatically determine which of these to
use at run-time, so that the same DEBUG_LL-enabled kernel image could be
used across multiple Tegra boards. The required bootloader-side setup for
that option is implemented in NVIDIA's various downstream U-Boot branches,
but the U-Boot maintainers have refused to accept it upstream.

This change implements an alternative automatic UART selection option
using ODMDATA. This is a 32-bit value programmed into Tegra's boot memory
which provides a few pieces of basic board-specific information, including
a field that indicates the console UART. Setting up this value is part of
the standard Tegra boot architecture, and so requires no Tegra-specific
hacks in the bootloader's UART driver.

Note that in theory, the format of ODMDATA is board-specific. However, in
practice all boards use the same location/size/values for the UART field.
ODMDATA[19:18] (which drive the type of debug console) is more problematic,
since some boards use value 2 for UART and others use 3. This patch just
accepts either value; if this doesn't work well for a given board, I'd
suggest simply not enabling this debug option when building for that board.

Note that the kernel assumes the bootloader has already set up any required
pinmux settings for the UART; there is no way the kernel can do this for
itself prior to knowing which board it's running on. In practice, people
using this feature are highly likely to be using bootloaders that have
indeed configured the pinmux. This assumption existed prior to this patch.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
2012-04-10 13:41:36 -06:00
..
clk.h ARM: tegra: add support for new clock framework features 2012-02-06 09:16:15 -08:00
debug-macro.S ARM: cleanups of io includes 2012-03-29 18:02:10 -07:00
dma.h ARM: tegra: dma: fix buildbreak for !CONFIG_TEGRA_SYSTEM_DMA 2012-01-24 00:48:06 -08:00
gpio-tegra.h gpio: tegra: Dynamically allocate IRQ base, and support DT 2012-02-06 18:25:00 -08:00
gpio.h ARM: mark empty gpio.h files empty 2011-10-29 13:05:46 +02:00
io.h ARM: kill off __mem_pci 2012-03-06 21:34:45 -06:00
iomap.h ARM: cleanups of io includes 2012-03-29 18:02:10 -07:00
irammap.h ARM: tegra: Pass uncompress.h UART selection to DEBUG_LL 2012-02-06 18:25:00 -08:00
irqs.h ARM: tegra: add support for tegra30 interrupts 2012-02-06 09:16:14 -08:00
kbc.h Input: tegra-kbc - allow skipping setting up some of GPIO pins 2012-02-03 00:29:06 -08:00
pinconf-tegra.h pinctrl: add a driver for NVIDIA Tegra 2012-03-06 10:51:46 +01:00
pinmux-tegra20.h arm/tegra: rename tegra20 pinmux files 2011-12-17 20:15:25 -08:00
pinmux-tegra30.h arm/tegra: pinmux tables and definitions for tegra30 2011-12-17 20:15:33 -08:00
pinmux.h arm/tegra: pinmux tables and definitions for tegra30 2011-12-17 20:15:33 -08:00
powergate.h ARM: tegra: support for Tegra30 CPU powerdomains 2012-02-26 14:44:45 -08:00
sdhci.h mmc: tegra: add pm_flags 2011-05-24 20:59:30 -04:00
smmu.h ARM: IOMMU: Tegra30: Add iommu_ops for SMMU driver 2012-01-26 13:59:02 +01:00
suspend.h ARM: tegra: Add prototypes for subsystem suspend functions 2011-02-09 21:57:01 -08:00
tegra_wm8903_pdata.h ARM: Tegra: Add to tegra_wm8903_platform_data 2011-04-18 17:55:58 +01:00
timex.h
uncompress.h ARM: tegra: uncompress.h: Implement TEGRA_DEBUG_UART_AUTO_ODMDATA 2012-04-10 13:41:36 -06:00
usb_phy.h usb: otg: Rename otg_transceiver to usb_phy 2012-02-13 13:34:36 +02:00