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:
parent
f79fc75dc7
commit
7947ae9eb8
@ -120,18 +120,18 @@ tegra124_cpu_reset(platform_t plat)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Early putc routine for EARLY_PRINTF support. To use, add to kernel config:
|
* Early putc routine for EARLY_PRINTF support. To use, add to kernel config:
|
||||||
* option SOCDEV_PA=0x02000000
|
* option SOCDEV_PA=0x70000000
|
||||||
* option SOCDEV_VA=0x02000000
|
* option SOCDEV_VA=0x70000000
|
||||||
* option EARLY_PRINTF
|
* option EARLY_PRINTF
|
||||||
*/
|
*/
|
||||||
#if 0
|
#ifdef EARLY_PRINTF
|
||||||
static void
|
static void
|
||||||
tegra124_early_putc(int c)
|
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)
|
while ((*UART_STAT_REG & UART_TXRDY) == 0)
|
||||||
continue;
|
continue;
|
||||||
*UART_TX_REG = c;
|
*UART_TX_REG = c;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user