comparison target-utils/c139explore/main.c @ 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 eb27543ce18e
children
comparison
equal deleted inserted replaced
992:a7b0b426f9ca 993:d92e4aadeeb3
1 #include "types.h" 1 #include "types.h"
2 #include "ns16550.h"
3
4 struct ns16550_regs *uart_base;
5 2
6 main() 3 main()
7 { 4 {
8 /* delay kludge workaround for defect in fc-compalram */ 5 /* delay kludge workaround for defect in fc-compalram */
9 osmo_delay_ms(30); 6 osmo_delay_ms(30);
10 uart_base = (struct ns16550_regs *) 0xFFFF5800;
11 printf("C139 hardware exploration utility running\n"); 7 printf("C139 hardware exploration utility running\n");
12 /* GPIO init */ 8 /* GPIO init */
13 *(volatile u16 *)0xfffe4802 = 0x0002; 9 *(volatile u16 *)0xfffe4802 = 0x0002;
14 *(volatile u16 *)0xfffe4804 = 0xFFF5; 10 *(volatile u16 *)0xfffe4804 = 0xFFF5;
15 /* take peripherals out of reset */ 11 /* take peripherals out of reset */