Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Oct 2016 12:21:46 +0000 (UTC)
From:      Michal Meloun <mmel@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r307556 - head/sys/arm/nvidia/tegra124
Message-ID:  <201610181221.u9ICLkNc073737@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mmel
Date: Tue Oct 18 12:21:45 2016
New Revision: 307556
URL: https://svnweb.freebsd.org/changeset/base/307556

Log:
  TEGRA: Really implement early printf. The original version
  was cut&pasted from another SoC.
  
  Pointy-hat to: mmel
  
  MFC after: 2 weeks

Modified:
  head/sys/arm/nvidia/tegra124/tegra124_machdep.c

Modified: head/sys/arm/nvidia/tegra124/tegra124_machdep.c
==============================================================================
--- head/sys/arm/nvidia/tegra124/tegra124_machdep.c	Tue Oct 18 10:33:28 2016	(r307555)
+++ head/sys/arm/nvidia/tegra124/tegra124_machdep.c	Tue Oct 18 12:21:45 2016	(r307556)
@@ -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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610181221.u9ICLkNc073737>