Ignore:
Timestamp:
Mar 27, 2015, 11:51:33 AM (10 years ago)
Author:
alain
Message:

1) Removing the IOC driver (integrated in the FAT library).
2) Simplifying the BDV, HBA, SDC, RDK drivers: they support
only two modes (synchronous => polling / descheduling => IRQ),
and only one access function (for both read/write).

File:
1 edited

Legend:

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

    r496 r529  
    8787                    unsigned int irq_type )
    8888{
    89 #if USE_XCU
    9089    // parameters checking
    9190    unsigned int x = cluster_xy >> Y_WIDTH;
     
    106105
    107106    _xcu_set_register(cluster_xy, func, channel, value);
    108 
    109 #else
    110     _printf("[GIET ERROR] _xcu_set_mask() should not be used if USE_XCU not set\n");
    111     _exit();
    112 #endif
    113107}
    114108
     
    119113                     unsigned int * irq_type )
    120114{
    121 #if USE_XCU
    122115    // parameters checking
    123116    unsigned int x = cluster_xy >> Y_WIDTH;
     
    153146        *index = 32;
    154147    }
    155  
    156 #else
    157     _printf("[GIET ERROR] _xcu_get_index should not be used if USE_XCU is not set\n");
    158     _exit();
    159 #endif
    160148}
    161149
     
    165153                    unsigned int wdata )
    166154{
    167 #if USE_XCU
    168155    // parameters checking
    169156    unsigned int x = cluster_xy >> Y_WIDTH;
     
    174161
    175162    _xcu_set_register(cluster_xy, XCU_WTI_REG, wti_index, wdata);
    176 
    177 #else
    178     _printf("[GIET ERROR] _xcu_send_wti() should not be used if USE_XCU is not set\n");
    179     _exit();
    180 #endif
    181163}
    182164
     
    186168                          unsigned int wdata )
    187169{
    188 #if USE_XCU
    189170    // parameters checking
    190171    unsigned int x = cluster_xy >> Y_WIDTH;
     
    199180
    200181    _physical_write(paddr, wdata);
    201 
    202 #else
    203     _puts("[GIET ERROR] _xcu_send_wti() should not be used if USE_XCU is not set\n");
    204     _exit();
    205 #endif
    206 }
     182}
     183
    207184///////////////////////////////////////////////////
    208185void _xcu_get_wti_value( unsigned int   cluster_xy,
     
    210187                         unsigned int * value )
    211188{
    212 #if USE_XCU
    213189    // parameters checking
    214190    unsigned int x = cluster_xy >> Y_WIDTH;
     
    219195 
    220196    *value = _xcu_get_register(cluster_xy, XCU_WTI_REG, wti_index);
    221 
    222 #else
    223     _printf("[GIET ERROR] in _xcu_get_wti_value() USE_XCU is not set\n");
    224     _exit();
    225 #endif
    226197}
    227198
     
    230201                           unsigned int * address )
    231202{
    232 #if USE_XCU
    233     if (wti_index >= 32)           _exit();
     203    if (wti_index >= 32)  _exit();
    234204 
    235205    *address = SEG_XCU_BASE + (XCU_REG(XCU_WTI_REG, wti_index)<<2);
    236 
    237 #else
    238     _printf("[GIET ERROR] in _xcu_get_wti_address() USE_XCU is not set\n");
    239     _exit();
    240 #endif
    241206}
    242207
     
    246211                       unsigned int period )
    247212{
    248 #if USE_XCU
    249213    // parameters checking
    250214    unsigned int x = cluster_xy >> Y_WIDTH;
     
    254218
    255219    _xcu_set_register(cluster_xy, XCU_PTI_PER, pti_index, period);
    256 
    257 #else
    258     _printf("[GIET ERROR] in _xcu_timer_start() USE_XCU is not set\n");
    259     _exit();
    260 #endif
    261220}
    262221
     
    265224                      unsigned int pti_index)
    266225{
    267 #if USE_XCU
    268226    // parameters checking
    269227    unsigned int x = cluster_xy >> Y_WIDTH;
     
    273231
    274232    _xcu_set_register(cluster_xy, XCU_PTI_PER, pti_index, 0);
    275 
    276 #else
    277     _printf("[GIET ERROR] in _xcu_timer_stop() USE_XCU is not set\n");
    278     _exit();
    279 #endif
    280233}
    281234
    282235///////////////////////////////////////////////////////////
    283 unsigned int _xcu_timer_reset_irq( unsigned int cluster_xy,
    284                                    unsigned int pti_index )
    285 {
    286 #if USE_XCU
     236void _xcu_timer_reset_irq( unsigned int cluster_xy,
     237                           unsigned int pti_index )
     238{
    287239    // parameters checking
    288240    unsigned int x = cluster_xy >> Y_WIDTH;
     
    292244
    293245    // This return value is not used / avoid a compilation warning.
    294     return _xcu_get_register(cluster_xy, XCU_PTI_ACK, pti_index);
    295 
    296 #else
    297     _puts("[GIET ERROR] in _xcu_timer_reset_irq() USE_XCU is not set\n");
    298     _exit();
    299     return 0;
    300 #endif
     246    x = _xcu_get_register(cluster_xy, XCU_PTI_ACK, pti_index);
    301247}
    302248
     
    305251                           unsigned int pti_index )
    306252{
    307 #if USE_XCU
    308253    // parameters checking
    309254    unsigned int x = cluster_xy >> Y_WIDTH;
     
    318263    _xcu_set_register(cluster_xy, XCU_PTI_PER, pti_index, 0);
    319264    _xcu_set_register(cluster_xy, XCU_PTI_PER, pti_index, per);
    320 
    321 #else
    322     _puts("[GIET ERROR] in _xcu_timer_reset_cpt() USE_XCU is not set\n");
    323     _exit();
    324 #endif
    325265}
    326266
Note: See TracChangeset for help on using the changeset viewer.