Changeset 33 in XOpenSparcT1 for trunk/sw/uart.c


Ignore:
Timestamp:
04/07/11 16:19:25 (13 years ago)
Author:
pntsvt00
Message:

checkpoint

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sw/uart.c

    r32 r33  
    11#include "uart.h" 
    22 
    3 const int UART_BASE_ADR[1] = {0}; 
     3const long UART_BASE_ADR[1] = {0x800000FFF0C2C000}; 
    44const int UART_BAUDS[1] = {0}; 
    55const int IN_CLK =50000000; 
     
    3232volatile int tx_level, rx_level; 
    3333 
    34 void main() __attribute__((noreturn)); 
    35 void main()  
     34void sal_main() __attribute__((noreturn)); 
     35void sal_main()  
    3636{ 
    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 
     45stackp: 
     46                set     CONFIG_SYS_INIT_SP_OFFSET, %fp 
     47                andn    %fp, 0x0f, %fp 
     48                sub     %fp, 64, %sp 
     49*/ 
    3950        uart_init(0); 
    4051        for(;;) {  
     
    4960        int divisor; 
    5061        float float_divisor; 
    51          
    5262        /* Reset receiver and transmiter */ 
    5363        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 
    5568        /* Disable all interrupts */ 
    5669        REG8(UART_BASE_ADR[core] + UART_IER) = 0x00; 
Note: See TracChangeset for help on using the changeset viewer.