Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Jul 2012 19:11:38 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r238403 - head/sys/arm/at91
Message-ID:  <201207121911.q6CJBcnL024169@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Thu Jul 12 19:11:37 2012
New Revision: 238403
URL: http://svn.freebsd.org/changeset/base/238403

Log:
  Remember where we found the DBGU and use that for our console.

Modified:
  head/sys/arm/at91/at91_machdep.c
  head/sys/arm/at91/at91var.h
  head/sys/arm/at91/uart_cpu_at91rm9200usart.c

Modified: head/sys/arm/at91/at91_machdep.c
==============================================================================
--- head/sys/arm/at91/at91_machdep.c	Thu Jul 12 16:47:18 2012	(r238402)
+++ head/sys/arm/at91/at91_machdep.c	Thu Jul 12 19:11:37 2012	(r238403)
@@ -402,6 +402,7 @@ at91_try_id(uint32_t dbgu_base)
          * try to get the matching CPU support.
          */
         soc_info.soc_data = at91_match_soc(soc_info.type, soc_info.subtype);
+        soc_info.dbgu_base = AT91_BASE + dbgu_base;
 
 	return (1);
 }

Modified: head/sys/arm/at91/at91var.h
==============================================================================
--- head/sys/arm/at91/at91var.h	Thu Jul 12 16:47:18 2012	(r238402)
+++ head/sys/arm/at91/at91var.h	Thu Jul 12 19:11:37 2012	(r238403)
@@ -121,6 +121,7 @@ struct at91_soc_info {
 	uint32_t cidr;
 	uint32_t exid;
 	char name[AT91_SOC_NAME_MAX];
+	uint32_t dbgu_base;
 	struct at91_soc_data *soc_data;
 };
 

Modified: head/sys/arm/at91/uart_cpu_at91rm9200usart.c
==============================================================================
--- head/sys/arm/at91/uart_cpu_at91rm9200usart.c	Thu Jul 12 16:47:18 2012	(r238402)
+++ head/sys/arm/at91/uart_cpu_at91rm9200usart.c	Thu Jul 12 19:11:37 2012	(r238403)
@@ -71,9 +71,10 @@ uart_cpu_getdev(int devtype, struct uart
 	di->bas.bst = &at91_bs_tag;
 	/*
 	 * XXX: Not pretty, but will work because we map the needed addresses
-	 * early.
+	 * early.  At least we probed this so that the console will work on
+         * all flavors of Atmel we can detect.
 	 */
-	di->bas.bsh = AT91_BASE + AT91RM92_DBGU_BASE;
+	di->bas.bsh = soc_info.dbgu_base;
 	di->baudrate = 115200;
 	di->bas.regshft = 0;
 	di->bas.rclk = 0;



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