Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Dec 2005 15:25:19 GMT
From:      Olivier Houchard <cognet@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 88522 for review
Message-ID:  <200512211525.jBLFPJcl015651@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 <sys/cdefs.h>
 __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 <sys/cdefs.h>
 __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



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