From owner-svn-src-all@FreeBSD.ORG Thu Jul 12 19:11:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8B441106566C; Thu, 12 Jul 2012 19:11:38 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 76EAF8FC18; Thu, 12 Jul 2012 19:11:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6CJBcDA024173; Thu, 12 Jul 2012 19:11:38 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6CJBcnL024169; Thu, 12 Jul 2012 19:11:38 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207121911.q6CJBcnL024169@svn.freebsd.org> From: Warner Losh Date: Thu, 12 Jul 2012 19:11:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238403 - head/sys/arm/at91 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jul 2012 19:11:38 -0000 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;