TEGRA: Really implement early printf. The original version

was cut&pasted from another SoC.

Pointy-hat to: mmel

MFC after: 2 weeks
This commit is contained in:
mmel 2016-10-18 12:21:45 +00:00
parent f79fc75dc7
commit 7947ae9eb8

View File

@ -120,18 +120,18 @@ tegra124_cpu_reset(platform_t plat)
/*
* Early putc routine for EARLY_PRINTF support. To use, add to kernel config:
* option SOCDEV_PA=0x02000000
* option SOCDEV_VA=0x02000000
* option SOCDEV_PA=0x70000000
* option SOCDEV_VA=0x70000000
* option EARLY_PRINTF
*/
#if 0
#ifdef EARLY_PRINTF
static void
tegra124_early_putc(int c)
{
volatile uint32_t * UART_STAT_REG = (uint32_t *)0x02020098;
volatile uint32_t * UART_TX_REG = (uint32_t *)0x02020040;
const uint32_t UART_TXRDY = (1 << 3);
volatile uint32_t * UART_STAT_REG = (uint32_t *)(0x70006314);
volatile uint32_t * UART_TX_REG = (uint32_t *)(0x70006300);
const uint32_t UART_TXRDY = (1 << 6);
while ((*UART_STAT_REG & UART_TXRDY) == 0)
continue;
*UART_TX_REG = c;