Ignore:
Timestamp:
Nov 11, 2014, 4:10:53 PM (10 years ago)
Author:
alain
Message:

Simplifying the NIC and CMA drivers.
Complex functionnalities have been moved to the sys_handler.c file.

File:
1 edited

Legend:

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

    r437 r448  
    3434
    3535////////////////////////////////////////////////////
    36 void _cma_start_channel( unsigned int       channel,
     36void _cma_channel_start( unsigned int       channel,
    3737                         unsigned long long src_paddr,
    3838                         unsigned int       src_nbufs,
     
    5353
    5454//////////////////////////////////////////////
    55 void _cma_stop_channel( unsigned int channel )
     55void _cma_channel_stop( unsigned int channel )
    5656{
    57     _cma_set_register( channel, CHBUF_RUN      , 0 );
     57    _cma_set_register( channel, CHBUF_RUN, 0 );
    5858}
    5959
     
    6363               unsigned int channel )
    6464{
    65     _puts("\n[GIET ERROR] _cma_isr() not implemented\n");
    66     _exit();
     65    // get CMA channel status
     66    unsigned int status = _cma_get_register( channel, CHBUF_STATUS );
     67
     68    if (status == CHANNEL_SRC_DESC_ERROR )
     69        _printf("\n[CMA WARNING] CMA channel %d blocked at cycle %d : "
     70                "impossible access to source chbuf descriptor\n",
     71                channel, _get_proctime() );
     72
     73    else if (status == CHANNEL_SRC_DATA_ERROR )
     74        _printf("\n[CMA WARNING] CMA channel %d blocked at cycle %d : "
     75                "impossible access to source data buffer\n",
     76                channel, _get_proctime() );
     77
     78    else if (status == CHANNEL_DST_DESC_ERROR )
     79        _printf("\n[CMA WARNING] CMA channel %d blocked at cycle %d : "
     80                "impossible access to destination chbuf descriptor\n",
     81                channel, _get_proctime() );
     82
     83    else if (status == CHANNEL_DST_DATA_ERROR )
     84        _printf("\n[CMA WARNING] CMA channel %d blocked at cycle %d : "
     85                "impossible access to destination data buffer\n",
     86                channel, _get_proctime() );
     87
     88    else
     89        _printf("\n[CMA WARNING] CMA channel %d : "
     90                "... strange IRQ received, but channel not blocked...",
     91                channel, _get_proctime() );
     92   
     93    // acknowledge IRQ
     94    _cma_set_register( channel, CHBUF_RUN, 0 );
    6795}
    6896
Note: See TracChangeset for help on using the changeset viewer.