svn commit: r238403 - head/sys/arm/at91
Warner Losh
imp at FreeBSD.org
Thu Jul 12 19:11:38 UTC 2012
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;
More information about the svn-src-head
mailing list