Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Dec 2005 06:07:42 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 88022 for review
Message-ID:  <200512110607.jBB67g9e083187@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=88022

Change 88022 by imp@imp_plunger on 2005/12/11 06:07:13

	Minor uart tweaks.  The console is on DBGU not USART0 on the KB9202,
	so hard wire it there.  Add commented out x86 specific code that
	I hope to soon make non x86 specific.

Affected files ...

.. //depot/projects/arm/src/sys/arm/at91/uart_cpu_at91rm92usart.c#4 edit

Differences ...

==== //depot/projects/arm/src/sys/arm/at91/uart_cpu_at91rm92usart.c#4 (text+ko) ====

@@ -54,20 +54,23 @@
 int
 uart_cpu_getdev(int devtype, struct uart_devinfo *di)
 {
-        uint32_t *ptr = (uint32_t *)(AT91RM92_BASE + AT91RM92_SYS_BASE);
-        *(uint32_t *)((char *)ptr + PIOC_SODR) = AT91RM92_PIO_PC18;
-        *(uint32_t *)((char *)ptr + PIOC_SODR) = AT91RM92_PIO_PC19;
-        *(uint32_t *)((char *)ptr + PIOC_SODR) = AT91RM92_PIO_PC20;
-        
+#if 0
+	/*
+	 * We can't enable this yet since it is ns8250 specific
+	 * at the moment.
+	 */
+	/* Check the environment. */
+	if (uart_getenv(devtype, di) == 0)
+		return (0);
+#endif
 #ifdef CONSOLE_USART
 	di->ops = usart_at91rm92_ops;
 	di->bas.chan = 0;
 	di->bas.bst = &at91rm92_bs_tag;
 	/* 
 	 * XXX: Not pretty, but will work because we map VA == PA early
-	 * for some devices.
+	 * for the last 1MB of memory.
 	 */
-	di->bas.bsh = AT91RM92_BASE + AT91RM92_USART0_BASE;
 	di->bas.bsh = AT91RM92_BASE + AT91RM92_SYS_BASE + DBGU_CR;
 	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?200512110607.jBB67g9e083187>