Kernel/arm7 - Serial works (realview-pb-a8)
[tpg/acess2.git] / Kernel / arch / arm7 / debug.c
1 /**
2  */
3 #include <acess.h>
4
5 // === CONSTANTS ===
6 //#define UART0_BASE    0x10009000
7 #define UART0_BASE      0xF0000000
8
9 // === PROTOTYPES ===
10 void    KernelPanic_SetMode(void);
11 void    KernelPanic_PutChar(char Ch);
12 void    StartupPrint(const char *str);
13
14 // === GLOBALS ===
15  int    giDebug_SerialInitialised = 0;
16
17 // === CODE ===
18 void Debug_PutCharDebug(char ch)
19 {
20 //      while( *(volatile Uint32*)(SERIAL_BASE + SERIAL_REG_FLAG) & SERIAL_FLAG_FULL )
21                 ;
22         
23 //      *(volatile Uint32*)(SERIAL_BASE + SERIAL_REG_DATA) = ch;
24         *(volatile Uint32*)(UART0_BASE) = ch;
25 }
26
27 void Debug_PutStringDebug(const char *str)
28 {
29         for( ; *str; str++ )
30                 Debug_PutCharDebug( *str );
31 }
32
33 void KernelPanic_SetMode(void)
34 {
35 }
36
37 void KernelPanic_PutChar(char ch)
38 {
39         Debug_PutCharDebug(ch);
40 }
41
42 void StartupPrint(const char *str)
43 {
44 }
45

UCC git Repository :: git.ucc.asn.au