Changeset 33 in XOpenSparcT1 for trunk/sw/uart.c
- Timestamp:
- 04/07/11 16:19:25 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sw/uart.c
r32 r33 1 1 #include "uart.h" 2 2 3 const int UART_BASE_ADR[1] = {0};3 const long UART_BASE_ADR[1] = {0x800000FFF0C2C000}; 4 4 const int UART_BAUDS[1] = {0}; 5 5 const int IN_CLK =50000000; … … 32 32 volatile int tx_level, rx_level; 33 33 34 void main() __attribute__((noreturn));35 void main()34 void sal_main() __attribute__((noreturn)); 35 void sal_main() 36 36 { 37 asm("mov 0x00, %sp\n"); 38 asm("mov 0x00, %fp\n"); 37 38 39 /* 40 #define CONFIG_SYS_GBL_DATA_SIZE 128 / size in bytes reserved for initial data 41 #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) 42 #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET 43 44 45 stackp: 46 set CONFIG_SYS_INIT_SP_OFFSET, %fp 47 andn %fp, 0x0f, %fp 48 sub %fp, 64, %sp 49 */ 39 50 uart_init(0); 40 51 for(;;) { … … 49 60 int divisor; 50 61 float float_divisor; 51 52 62 /* Reset receiver and transmiter */ 53 63 REG8( UART_FCR ) = UART_FCR_ENABLE_FIFO | UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT | UART_FCR_TRIGGER_14; 54 64 //asm("clr %sp \n"); 65 //asm("sethi %hi(8), %sp \n"); 66 //asm("mov 0xfff, %sp \n"); 67 55 68 /* Disable all interrupts */ 56 69 REG8(UART_BASE_ADR[core] + UART_IER) = 0x00;
Note: See TracChangeset
for help on using the changeset viewer.