PERFORCE change 161796 for review
Andrew Turner
andrew at FreeBSD.org
Sat May 9 01:04:47 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=161796
Change 161796 by andrew at andrew_bender on 2009/05/09 01:03:48
Use the correct uart on the NeoFreerunner
Affected files ...
.. //depot/projects/arm/src/sys/arm/s3c2xx0/board_neo.c#2 edit
Differences ...
==== //depot/projects/arm/src/sys/arm/s3c2xx0/board_neo.c#2 (text+ko) ====
@@ -51,12 +51,23 @@
#include <arm/s3c2xx0/s3c2410reg.h>
#include <arm/s3c2xx0/s3c2xx0board.h>
+#define ioreg_read32(a) (*(volatile uint32_t *)(a))
+
extern vm_offset_t s3c2410_uart_vaddr;
long
board_init(void)
{
- s3c2410_uart_vaddr = S3C24X0_UART_BASE(0);
+ switch(ioreg_read32(S3C24X0_GPIO_BASE + GPIO_GSTATUS1) >> 16) {
+ case 0x3241:
+ /* We are on a Neo1973 or Qemu */
+ s3c2410_uart_vaddr = S3C24X0_UART_BASE(0);
+ break;
+ case 0x3244:
+ /* We are on a Neo Freerunner */
+ s3c2410_uart_vaddr = S3C24X0_UART_BASE(2);
+ break;
+ }
/* TODO: Use s3c2xx0_ramsize */
return (128 * 1024 * 1024);
More information about the p4-projects
mailing list