Ignore:
Timestamp:
Dec 5, 2014, 3:38:31 PM (10 years ago)
Author:
alain
Message:

Defining the NIC and CMA drivers (validated by the classif application).
Updating other drivers to comply with the new tty0 common file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_drivers/tty_driver.c

    r437 r456  
    1212#include <ctx_handler.h>
    1313#include <utils.h>
     14#include <tty0.h>
    1415
    1516#if !defined(SEG_TTY_BASE)
     
    2122#endif
    2223
    23 #if !defined(GIET_NO_HARD_CC)
    24 # error: You must define GIET_NO_HARD_CC in the giet_config.h file
     24#if (NB_TTY_CHANNELS == 0)
     25# error: The NB_TTY_CHANNELS in the hard_config.h file cannot be 0
    2526#endif
    2627
    27 #if (NB_TTY_CHANNELS < 1)
    28 # error: NB_TTY_CHANNELS cannot be smaller than 1!
    29 #endif
     28////////////////////////////////////////////////////////////////////////////////////
     29//               global variables
     30////////////////////////////////////////////////////////////////////////////////////
    3031
    31 //////////////////////////////////////////////////////////////////////////////
    32 //                global variables
    33 //////////////////////////////////////////////////////////////////////////////
     32simple_lock_t  _tty_tx_lock[NB_TTY_CHANNELS] __attribute__((aligned(64)));
    3433
    35 #define in_unckdata __attribute__((section (".unckdata")))
    36 #define in_kdata    __attribute__((section (".kdata")))
     34unsigned int   _tty_rx_buf[NB_TTY_CHANNELS];
     35unsigned int   _tty_rx_full[NB_TTY_CHANNELS];
    3736
    38 #if GIET_NO_HARD_CC
    39 in_unckdata volatile unsigned int _tty_rx_buf[NB_TTY_CHANNELS];
    40 in_unckdata volatile unsigned int _tty_rx_full[NB_TTY_CHANNELS];
    41 in_unckdata giet_lock_t _tty_lock[NB_TTY_CHANNELS] __attribute__((aligned(64)));
    42 #else
    43 in_kdata volatile unsigned int _tty_rx_buf[NB_TTY_CHANNELS];
    44 in_kdata volatile unsigned int _tty_rx_full[NB_TTY_CHANNELS];
    45 in_kdata giet_lock_t _tty_lock[NB_TTY_CHANNELS] __attribute__((aligned(64)));
    46 #endif
    47 
    48 //////////////////////////////////////////////////////////////////////////////
     37////////////////////////////////////////////////////////////////////////////////////
    4938//               access functions
    50 //////////////////////////////////////////////////////////////////////////////
     39////////////////////////////////////////////////////////////////////////////////////
    5140
    5241/////////////////////////////////////////////////////
     
    6756}
    6857
     58//////////////////////////////////////
     59void _tty_init( unsigned int channel )
     60{
     61    _tty_rx_full[channel] = 0;
     62}
    6963
    7064////////////////////////////////////////
Note: See TracChangeset for help on using the changeset viewer.