From owner-p4-projects@FreeBSD.ORG Wed Dec 21 15:25:21 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2254716A420; Wed, 21 Dec 2005 15:25:21 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D4DE816A41F for ; Wed, 21 Dec 2005 15:25:20 +0000 (GMT) (envelope-from cognet@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5C9BA43D55 for ; Wed, 21 Dec 2005 15:25:19 +0000 (GMT) (envelope-from cognet@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id jBLFPJaX015654 for ; Wed, 21 Dec 2005 15:25:19 GMT (envelope-from cognet@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id jBLFPJcl015651 for perforce@freebsd.org; Wed, 21 Dec 2005 15:25:19 GMT (envelope-from cognet@freebsd.org) Date: Wed, 21 Dec 2005 15:25:19 GMT Message-Id: <200512211525.jBLFPJcl015651@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cognet@freebsd.org using -f From: Olivier Houchard To: Perforce Change Reviews Cc: Subject: PERFORCE change 88522 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2005 15:25:22 -0000 http://perforce.freebsd.org/chv.cgi?CH=88522 Change 88522 by cognet@cognet on 2005/12/21 15:24:39 Add a new option to use the USART0 as the console instead of DBGU, USART0_CONSOLE, and use it for Skyeye. This is enough to get Skyeye to boot a FreeBSD kernel again. Affected files ... .. //depot/projects/arm/src/sys/arm/at91/uart_bus_at91usart.c#3 edit .. //depot/projects/arm/src/sys/arm/at91/uart_cpu_at91rm9200usart.c#4 edit .. //depot/projects/arm/src/sys/arm/conf/SKYEYE#2 edit .. //depot/projects/arm/src/sys/conf/options.arm#6 edit Differences ... ==== //depot/projects/arm/src/sys/arm/at91/uart_bus_at91usart.c#3 (text+ko) ==== @@ -22,6 +22,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "opt_uart.h" + #include __FBSDID("$FreeBSD$"); @@ -91,7 +93,11 @@ * Setting sc_sysdev makes this device a 'system device' and * indirectly makes it the system console. */ +#ifdef USART0_CONSOLE if (device_get_unit(dev) == 0) +#else + if (device_get_unit(dev) == 0) +#endif sc->sc_sysdev = SLIST_FIRST(&uart_sysdevs); sc->sc_class = &at91_usart_class; bcopy(&sc->sc_sysdev->bas, &sc->sc_bas, sizeof(sc->sc_bas)); ==== //depot/projects/arm/src/sys/arm/at91/uart_cpu_at91rm9200usart.c#4 (text+ko) ==== @@ -24,6 +24,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "opt_uart.h" + #include __FBSDID("$FreeBSD: src/sys/arm/sa11x0/uart_cpu_sa1110.c,v 1.3 2005/01/05 21:58:48 imp Exp $"); @@ -60,10 +62,15 @@ * XXX: Not pretty, but will work because we map VA == PA early * for the last 1MB of memory. */ +#ifdef USART0_CONSOLE + di->bas.bsh = AT91RM92_BASE + AT91RM92_USART0_BASE; + di->baudrate = 38400; +#else di->bas.bsh = AT91RM92_BASE + AT91RM92_SYS_BASE + DBGU; + di->baudrate = 115200; +#endif di->bas.regshft = 0; di->bas.rclk = 0; - di->baudrate = 115200; di->databits = 8; di->stopbits = 1; di->parity = UART_PARITY_NONE; ==== //depot/projects/arm/src/sys/arm/conf/SKYEYE#2 (text+ko) ==== @@ -32,6 +32,8 @@ options DDB options KDB +options USART0_CONSOLE + options SCHED_4BSD #4BSD scheduler options INET #InterNETworking options INET6 #IPv6 communications protocols ==== //depot/projects/arm/src/sys/conf/options.arm#6 (text+ko) ==== @@ -12,6 +12,7 @@ PHYSADDR opt_global.h KERNPHYSADDR opt_global.h KERNVIRTADDR opt_global.h +USART0_CONSOLE opt_uart.h STARTUP_PAGETABLE_ADDR opt_global.h VERBOSE_INIT_ARM opt_global.h XSCALE_CACHE_READ_WRITE_ALLOCATE opt_global.h