linux/arch/arm/mach-tegra
Stephen Warren fe2639892c ARM: tegra: uncompress.h: Choose a UART at runtime
With this change we automatically detect which UART to use for
for printing during decompression. The detection involves coordination
with the bootloader: it's expected that the bootloader will leave a
'D' (for [D]ebug) in the UART scratchpad register for whichever UART we
should use for debugging.

If we don't find any such UART, we fall back to the UART that was
specified during config time: CONFIG_TEGRA_DEBUG_UART_XXX.

As a side effect of this change, uncompress debug messages will work
if you've specified CONFIG_TEGRA_DEBUG_UART_NONE, provided the
bootloader obeys the protocol.

This change is in line with what is documented in
Documentation/arm/Booting.

Other approaches considered:
* Hardcode based on machine ID (as many other ARM boards do).
  OK, but nice to not have yet another place to add per-board
  code. Better to have bootloader parse device tree and pass us
  this info.
* Check for TXE bit (like SA1110). Nice (and doesn't require
  a bootloader change), but a little less explicit. Also: if
  bootloader (for some reason) uses another UART, it needs to
  remember to turn it off before jumping to the kernel or we may
  print to it. NOTE: adapting this patch to check TXE too would
  be easy if desired.

Signed-off-by: Doug Anderson <dianders@chromium.org>
[swarren: Added clock/reset condition checks]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Doug Anderson <dianders@chromium.org>
Acked-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
2012-02-06 18:25:00 -08:00
..
include/mach ARM: tegra: uncompress.h: Choose a UART at runtime 2012-02-06 18:25:00 -08:00
Kconfig arm/tegra: Make MACH_TEGRA_DT depend on ARCH_TEGRA_2x_SOC 2011-12-19 18:06:27 -08:00
Makefile ARM: tegra: use APB DMA for accessing APB devices 2012-02-06 18:24:58 -08:00
Makefile.boot arm/tegra: add support for tegra30 based board cardhu 2011-12-17 20:15:38 -08:00
apbio.c ARM: tegra: use APB DMA for accessing APB devices 2012-02-06 18:24:58 -08:00
apbio.h ARM: tegra: use APB DMA for accessing APB devices 2012-02-06 18:24:58 -08:00
board-dt-tegra20.c Board-level changes 2012-01-09 14:37:41 -08:00
board-dt-tegra30.c arm/tegra: add support for tegra30 based board cardhu 2011-12-17 20:15:38 -08:00
board-harmony-pcie.c arm/tegra: Harmony PCIe: Don't touch pinmux 2011-12-19 18:03:10 -08:00
board-harmony-pinmux.c Merge branch 'tegra/soc' into next/boards 2012-01-06 23:09:14 +00:00
board-harmony-power.c arm/tegra: Harmony: Configure PMC for low-level interrupts 2011-10-13 15:04:55 -07:00
board-harmony.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound 2012-01-12 08:00:30 -08:00
board-harmony.h ARM: 7101/1: arm/tegra: Replace <mach/gpio.h> with <mach/gpio-tegra.h> 2011-09-27 00:20:53 +01:00
board-paz00-pinmux.c Merge branch 'tegra/soc' into next/boards 2012-01-06 23:09:14 +00:00
board-paz00.c Merge branch 'samsung/cleanup' into next/boards 2012-01-09 17:06:36 +00:00
board-paz00.h ARM: tegra: paz00: add support for wakeup gpio key 2011-12-07 21:13:47 -08:00
board-pinmux.c arm/tegra: Use bus notifiers to trigger pinmux setup 2011-12-19 18:03:11 -08:00
board-pinmux.h arm/tegra: Refactor board-*-pinmux.c to share code 2011-12-19 18:03:11 -08:00
board-seaboard-pinmux.c Merge branch 'tegra/soc' into next/boards 2012-01-06 23:09:14 +00:00
board-seaboard.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound 2012-01-12 08:00:30 -08:00
board-seaboard.h Merge branch 'depends/rmk/gpio' into next/board 2011-10-21 16:46:26 +02:00
board-trimslice-pinmux.c Merge branch 'tegra/soc' into next/boards 2012-01-06 23:09:14 +00:00
board-trimslice.c Merge branch 'samsung/cleanup' into next/boards 2012-01-09 17:06:36 +00:00
board-trimslice.h ARM: 7101/1: arm/tegra: Replace <mach/gpio.h> with <mach/gpio-tegra.h> 2011-09-27 00:20:53 +01:00
board.h arm/tegra: Delete tegra_init_clock() 2011-12-19 18:06:05 -08:00
clock.c arm/tegra: Delete tegra_init_clock() 2011-12-19 18:06:05 -08:00
clock.h arm/tegra: don't export clk_measure_input_freq 2011-12-17 20:15:08 -08:00
common.c Merge branch 'samsung/cleanup' into next/boards 2012-01-09 17:06:36 +00:00
cpu-tegra.c Merge branch 'next/cleanup' of git://git.linaro.org/people/arnd/arm-soc 2011-11-01 20:11:00 -07:00
devices.c Merge branch 'next/devel' of git://git.linaro.org/people/arnd/arm-soc 2011-11-01 20:31:25 -07:00
devices.h arm/tegra: Prep boards for gpio/pinmux conversion to pdevs 2011-10-11 17:19:56 -07:00
dma.c ARM: tegra: Pause DMA when reading transfer count 2012-02-06 18:24:59 -08:00
fuse.c ARM: tegra: fuse: add bct strapping reading 2012-02-06 18:24:59 -08:00
fuse.h ARM: tegra: fuse: add bct strapping reading 2012-02-06 18:24:59 -08:00
gpio-names.h [ARM] tegra: add GPIO support 2010-08-05 14:57:02 -07:00
headsmp.S [ARM] tegra: SMP support 2010-08-05 14:57:01 -07:00
hotplug.c ARM: fix wrongly patched constants 2011-01-14 12:06:26 +00:00
io.c ARM: mach-tegra: remove arch specific special handling for ioremap 2011-11-16 18:06:18 -05:00
irq.c Merge branch 'samsung/cleanup' into next/boards 2012-01-09 17:06:36 +00:00
localtimer.c ARM: 6759/1: smp: Select local timers vs broadcast timer support runtime 2011-02-23 17:54:27 +00:00
pcie.c Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci 2012-01-11 18:50:26 -08:00
pinmux-tegra20-tables.c arm/tegra: Fix section mismatch errors in tegra20 pinmux 2011-12-19 18:04:41 -08:00
pinmux-tegra30-tables.c arm/tegra: Fix section mismatch errors in tegra30 pinmux 2011-12-19 18:04:41 -08:00
pinmux.c arm/tegra: pinmux tables and definitions for tegra30 2011-12-17 20:15:33 -08:00
platsmp.c ARM: smp: fix clipping of number of CPUs 2011-10-20 22:06:57 +01:00
powergate.c ARM: tegra: tegra_powergate_is_powered should be static 2011-10-13 14:08:28 -07:00
tegra2_clocks.c ARM: tegra: fuse: add functions to access chip revision 2012-02-06 18:24:59 -08:00
tegra2_emc.c ARM: tegra: emc: device tree support 2012-02-06 18:24:59 -08:00
tegra2_emc.h ARM: tegra: emc: convert tegra2_emc to a platform driver 2012-02-06 18:24:59 -08:00
timer.c Merge branch 'samsung/cleanup' into next/boards 2012-01-09 17:06:36 +00:00
usb_phy.c ARM: 7101/1: arm/tegra: Replace <mach/gpio.h> with <mach/gpio-tegra.h> 2011-09-27 00:20:53 +01:00