summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-tegra/board-harmony.c
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2012-01-06 10:43:21 +0000
committerOlof Johansson <olof@lixom.net>2012-02-06 18:25:00 -0800
commitfe2639892cb618d5c42ea4570feea8dc497d0487 (patch)
tree8d545ebb7ab0c39aa24ca1963a103e918c49e8ec /arch/arm/mach-tegra/board-harmony.c
parent31bac1375bda9787f18b2f60e0e1ca62258ea09c (diff)
downloadblackbird-op-linux-fe2639892cb618d5c42ea4570feea8dc497d0487.tar.gz
blackbird-op-linux-fe2639892cb618d5c42ea4570feea8dc497d0487.zip
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>
Diffstat (limited to 'arch/arm/mach-tegra/board-harmony.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud