Ignore:
Timestamp:
Jan 14, 2013, 4:39:14 PM (12 years ago)
Author:
cfuguet
Message:

Fixing bug in boot_tty.c:

Use address of tty status when reading with the ioread32 function.

Makefile and ioc.c:
Introducing SYSCLK_FREQ environment variable to choose a clock frequency when
using FPGA platform. 50000000 Hz by default.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/softs/tsar_boot/io_drivers/ioc.c

    r279 r286  
    5555//    // iterate on lines to invalidate each one of them
    5656//    for ( i=0; i<size; i+=dcache_line_size )
    57 //        asm volatile(" cache %0, %1"
    58 //                :
    59 //                :"i" (0x11), "R" (*((char*)buffer+i)));
     57//        asm volatile
     58//            (" mtc2 %0,     $7\n"
     59//             :
     60//             : "r" (*((char*)buffer+i))
     61//             );
    6062//}
    6163
     
    105107    boot_puts(init_begin);
    106108
     109#ifndef SYSCLK_FREQ
     110#warning "Using default value for SYSCLK_FREQ = 50000000"
     111#define SYSCLK_FREQ 50000000U
     112#endif
     113
    107114    /**
    108115     * Initializing the SPI controller
     
    111118      _spi_device   ,
    112119      200000        , /**< SPI_clk: 200 Khz */
    113       50000000      , /**< Sys_clk: 50  Mhz */
     120      SYSCLK_FREQ   , /**< Sys_clk          */
    114121      8             , /**< Charlen: 8       */
    115122      SPI_TX_NEGEDGE,
     
    132139        _spi_device ,
    133140        10000000    , /**< SPI_clkL 10 Mhz */
    134         50000000    , /**< Sys_clk: 50 Mhz */
     141        SYSCLK_FREQ , /**< Sys_clk        */
    135142        -1          , /**< Charlen: 8      */
    136143        -1          ,
     
    327334
    328335    //_ioc_lock = 0;
    329     //
    330     //_dcache_buf_invalidate(buffer, count);
    331336
    332337    return 0;
Note: See TracChangeset for help on using the changeset viewer.