changeset 993:d92e4aadeeb3

target-utils/c139explore: a cleaner way of setting the fixed UART base address
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Wed, 30 Dec 2015 22:12:35 +0000
parents a7b0b426f9ca
children 63ea60e7fbbc
files target-utils/c139explore/Makefile target-utils/c139explore/main.c target-utils/c139explore/uartbase.S
diffstat 3 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/target-utils/c139explore/Makefile	Wed Dec 30 21:28:41 2015 +0000
+++ b/target-utils/c139explore/Makefile	Wed Dec 30 22:12:35 2015 +0000
@@ -5,7 +5,7 @@
 OBJCOPY=arm-elf-objcopy
 
 PROG=	c139explore
-OBJS=	crt0.o backlight.o cmdtab.o lcd.o main.o mygetchar.o uwire.o
+OBJS=	crt0.o backlight.o cmdtab.o lcd.o main.o mygetchar.o uartbase.o uwire.o
 LIBS=	../libcommon/libcommon.a ../libprintf/libprintf.a ../libbase/libbase.a
 LDS=	../env/compalram.lds
 
--- a/target-utils/c139explore/main.c	Wed Dec 30 21:28:41 2015 +0000
+++ b/target-utils/c139explore/main.c	Wed Dec 30 22:12:35 2015 +0000
@@ -1,13 +1,9 @@
 #include "types.h"
-#include "ns16550.h"
-
-struct ns16550_regs *uart_base;
 
 main()
 {
 	/* delay kludge workaround for defect in fc-compalram */
 	osmo_delay_ms(30);
-	uart_base = (struct ns16550_regs *) 0xFFFF5800;
 	printf("C139 hardware exploration utility running\n");
 	/* GPIO init */
 	*(volatile u16 *)0xfffe4802 = 0x0002;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/target-utils/c139explore/uartbase.S	Wed Dec 30 22:12:35 2015 +0000
@@ -0,0 +1,5 @@
+	.section	.rodata
+	.balign	4
+	.globl	uart_base
+uart_base:
+	.word	0xFFFF5800