Changeset 320 for soft/giet_vm


Ignore:
Timestamp:
Jun 10, 2014, 12:33:23 PM (10 years ago)
Author:
alain
Message:

All drivers have been modified to use only the information
contained in the hard_config.h file

Location:
soft/giet_vm/giet_drivers
Files:
22 edited

Legend:

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

    r313 r320  
    4242// An error code is returned if these conditions are not verified.
    4343//
    44 // The "seg_ioc_base" must be defined in giet_vsegs.ld file.
     44// The SEG_IOC_BASE address must be defined in the hard_config.h file.
    4545///////////////////////////////////////////////////////////////////////////////////
    4646// Implementation notes:
     
    5555
    5656#include <giet_config.h>
     57#include <hard_config.h>
    5758#include <bdv_driver.h>
    5859#include <xcu_driver.h>
     
    7778unsigned int _bdv_get_register( unsigned int index )
    7879{
    79     unsigned int* vaddr = (unsigned int*)&seg_ioc_base + index;
     80    unsigned int* vaddr = (unsigned int*)SEG_IOC_BASE + index;
    8081    return _io_extended_read( vaddr );
    8182}
     
    8788                        unsigned int value )
    8889{
    89     unsigned int* vaddr = (unsigned int*)&seg_ioc_base + index;
     90    unsigned int* vaddr = (unsigned int*)SEG_IOC_BASE + index;
    9091    _io_extended_write( vaddr, value );
    9192}
     
    185186        _it_disable( &save_sr );
    186187       
     188
    187189        // set _bdv_gtid and reset runnable
    188190        _bdv_gtid = (gpid<<16) + ltid;
     
    300302               unsigned int channel )   // unused
    301303{
    302     unsigned int procid     = _get_procid();
    303     unsigned int cluster_xy = procid / NB_PROCS_MAX;
    304     unsigned int lpid       = procid % NB_PROCS_MAX;
    305 
    306304    // get BDV status (and reset IRQ)
    307305    unsigned int status =  _bdv_get_register( BLOCK_DEVICE_STATUS );
     
    311309         (status == BLOCK_DEVICE_BUSY) )   return;
    312310 
    313     // reset WTI in XCU if WTI type
    314     if ( irq_type == IRQ_TYPE_WTI )
    315     {
    316         unsigned int value;
    317         _xcu_get_wti_value( cluster_xy, irq_id, &value );
    318     }
    319    
    320311    // save status in kernel buffer _bdv_status
    321312    _bdv_status = status;
    322313
    323314    // identify task waiting on BDV
    324     unsigned int rprocid    = _bdv_gtid>>16;
    325     unsigned int ltid       = _bdv_gtid & 0xFFFF;
    326     unsigned int remote_xy  = rprocid / NB_PROCS_MAX;
     315    unsigned int rprocid     = _bdv_gtid>>16;
     316    unsigned int ltid        = _bdv_gtid & 0xFFFF;
     317    unsigned int remote_xy   = rprocid / NB_PROCS_MAX;
     318    unsigned int remote_lpid = rprocid % NB_PROCS_MAX;
    327319
    328320    // re-activates sleeping task
     
    333325
    334326    // requires a context switch for remote processor running the waiting task
    335     _xcu_send_wti( remote_xy,    // cluster index
    336                    lpid,         // local processor index
     327    _xcu_send_wti( remote_xy,    // remote cluster index
     328                   remote_lpid,  // remote local processor index
    337329                   0 );          // don't force context switch if not idle
    338330
    339331#if GIET_DEBUG_IRQS  // we don't take the TTY lock to avoid deadlock
     332unsigned int procid     = _get_procid();
     333unsigned int cluster_xy = procid / NB_PROCS_MAX;
     334unsigned int lpid       = procid % NB_PROCS_MAX;
    340335unsigned int x              = cluster_xy >> Y_WIDTH;
    341336unsigned int y              = cluster_xy & ((1<<Y_WIDTH)-1);
    342337unsigned int rx             = remote_xy >> Y_WIDTH;
    343338unsigned int ry             = remote_xy & ((1<<Y_WIDTH)-1);
    344 unsigned int rlpid          = rprocid % NB_PROCS_MAX;
    345339_puts("\n[IRQS DEBUG] Processor[");
    346340_putd(x );
     
    358352_putd(ry );
    359353_puts(",");
    360 _putd(rlpid );
     354_putd(remote_lpid );
    361355_puts(" / bdv status = ");
    362356_putx(_bdv_status );
  • soft/giet_vm/giet_drivers/cma_driver.c

    r298 r320  
    1212// to display images, or with the SocLib vci_multi_nic controller to tranfer
    1313// both RX and TX packets between NIC and memory buffers.
    14 ///////////////////////////////////////////////////////////////////////////////////
     14//
     15// The SEG_DMA_BASE address must be defined in the hard_config.h file
     16////////////////////////////////////////////////////////////////////////////////////
    1517// Implementation notes:
    1618// 1. The higher level access functions can be found in the fbf_driver and
     
    2224
    2325#include <cma_driver.h>
    24 #include <utils.h>                  // for seg_cma_base
    25 #include <hard_config.h>            // for X_IO / Y_IO
     26#include <hard_config.h>         
     27#include <utils.h>
     28
     29#if !defined(SEG_CMA_BASE)
     30# error: You must define SEG_CMA_BASE in the hard_config.h file
     31#endif
    2632
    2733///////////////////////////////////////////////////////////////////////////////
     
    3137                                unsigned int index )
    3238{
    33     unsigned int* vaddr = (unsigned int*)&seg_cma_base +
     39    unsigned int* vaddr = (unsigned int*)SEG_CMA_BASE +
    3440                           CHBUF_CHANNEL_SPAN*channel + index;
    3541    return _io_extended_read( vaddr );
     
    4349                        unsigned int value )
    4450{
    45     unsigned int* vaddr = (unsigned int*)&seg_cma_base +
     51    unsigned int* vaddr = (unsigned int*)SEG_CMA_BASE +
    4652                           CHBUF_CHANNEL_SPAN*channel + index;
    4753    _io_extended_write( vaddr, value );
     
    5561               unsigned int channel )
    5662{
    57     _printf("\n[GIET ERROR] _cma_isr() nor implemented\n");
     63    _printf("\n[GIET ERROR] _cma_isr() not implemented\n");
    5864    _exit();
    5965}
  • soft/giet_vm/giet_drivers/dma_driver.c

    r313 r320  
    1818// there is no lock protecting exclusive access to the channel.
    1919// As the kernel uses a polling policy on the DMA_STATUS register to detect
    20 // transfer completion, the DMA IRQ is not used, and there is no DMA_ISR.
     20// transfer completion, the DMA IRQ is not used.
     21//
     22// The virtual base address of the segment associated to a channel is:
     23//    SEG_DMA_BASE + cluster_xy * vseg_cluster_increment + DMA_SPAN * channel_id
     24//
     25// The SEG_DMA_BASE virtual address mus be defined in the hard_config.h file.
    2126////////////////////////////////////////////////////////////////////////////////////
    22 // The virtual base address of the segment associated to a channel is:
    23 //
    24 //    seg_dma_base + cluster_xy * vseg_cluster_increment + DMA_SPAN * channel_id
    25 //
    26 ////////////////////////////////////////////////////////////////////////////////////
    2727
    2828#include <giet_config.h>
     29#include <hard_config.h>
    2930#include <dma_driver.h>
    30 #include <utils.h>
    3131#include <tty_driver.h>
    3232#include <vmem.h>
     33#include <utils.h>
    3334
    3435#if !defined(X_SIZE)
     
    5051#if !defined(NB_DMA_CHANNELS)
    5152# error: You must define NB_DMA_CHANNELS in the hard_config.h file
     53#endif
     54
     55#if !defined(SEG_DMA_BASE)
     56# error: You must define SEG_DMA_BASE in the hard_config.h file
     57#endif
     58
     59#if !defined(VSEG_CLUSTER_INCREMENT)
     60# error: You must define VSEG_CLUSTER_INCREMENT in the hard_config.h file
    5261#endif
    5362
     
    7382
    7483    // compute DMA base address
    75     unsigned int* dma_address = (unsigned int*) ((unsigned int)&seg_dma_base +
    76                                 (cluster_xy * (unsigned int)&vseg_cluster_increment));
     84    unsigned int* dma_address = (unsigned int*) ( SEG_DMA_BASE +
     85                                (cluster_xy * VSEG_CLUSTER_INCREMENT) );
    7786
    7887    // disable interrupt for selected channel
     
    101110
    102111    // compute DMA base address
    103     unsigned int* dma_address = (unsigned int*) ((unsigned int)&seg_dma_base +
    104                                 (cluster_xy * (unsigned int)&vseg_cluster_increment));
     112    unsigned int* dma_address = (unsigned int*) ( SEG_DMA_BASE +
     113                                (cluster_xy * VSEG_CLUSTER_INCREMENT) );
    105114
    106115    // reset selected channel
     
    128137
    129138    // compute DMA base address
    130     unsigned int * dma_address = (unsigned int *) ((unsigned int)&seg_dma_base +
    131                                  (cluster_xy * (unsigned int)&vseg_cluster_increment));
     139    unsigned int * dma_address = (unsigned int *) ( SEG_DMA_BASE +
     140                                 (cluster_xy * VSEG_CLUSTER_INCREMENT) );
    132141
    133142    // get selected channel status
     
    159168
    160169    // compute DMA base address
    161     unsigned int * dma_address = (unsigned int *) ((unsigned int)&seg_dma_base +
    162                                  (cluster_xy * (unsigned int)&vseg_cluster_increment));
     170    unsigned int * dma_address = (unsigned int *) ( SEG_DMA_BASE +
     171                                 (cluster_xy * VSEG_CLUSTER_INCREMENT) );
    163172
    164173    // selected channel configuration and lauching
     
    304313} // end _dma_copy
    305314
     315///////////////////////////////////////////////////////////////////////////////
     316// This ISR handles the IRQ generated by a DMA channel.
     317///////////////////////////////////////////////////////////////////////////////
     318void _dma_isr( unsigned int irq_type,
     319               unsigned int irq_id,
     320               unsigned int channel )
     321{
     322    _printf("\n[GIET ERROR] _dma_isr() not implemented\n");
     323    _exit();
     324}
     325
    306326
    307327
  • soft/giet_vm/giet_drivers/dma_driver.h

    r263 r320  
    6363                        unsigned int size );
    6464
     65extern void _dma_isr( unsigned int irq_type,
     66                      unsigned int irq_id,
     67                      unsigned int channel );
     68
    6569///////////////////////////////////////////////////////////////////////////////////
    6670
  • soft/giet_vm/giet_drivers/fbf_driver.c

    r297 r320  
    1919// A CMA channel must be allocated to the task requesting it in the mapping_info,
    2020// and stored in the task context.
     21//
     22// The SEG_FBF_BASE virtual address must be defined in hard_config.h file.
    2123///////////////////////////////////////////////////////////////////////////////////
    22 // The seg_fbf_base virtual address must be defined in giet_vsegs.ld file.
    23 ///////////////////////////////////////////////////////////////////////////////////
    2424
    2525#include <giet_config.h>
     26#include <hard_config.h>
    2627#include <fbf_driver.h>
    2728#include <utils.h>
     
    3334#include <vmem.h>
    3435
     36#if !defined(SEG_FBF_BASE)
     37# error: You must define SEG_FBF_BASE in the hard_config.h file
     38#endif
     39
    3540#if !defined(GIET_USE_IOMMU)
    3641# error: You must define GIET_USE_IOMMU in the giet_config.h file
     
    5762                            unsigned int length)
    5863{
    59     char* fbf_address = (char *)&seg_fbf_base + offset;
     64    char* fbf_address = (char *)SEG_FBF_BASE + offset;
    6065
    6166    _memcpy( fbf_address, buffer, length);
     
    7479                            unsigned int   length)
    7580{
    76     char* fbf_address = (char *)&seg_fbf_base + offset;
     81    char* fbf_address = (char *)SEG_FBF_BASE + offset;
    7782
    7883    _memcpy( buffer, fbf_address, length);
     
    176181
    177182    // compute and register frame buffer physical address
    178     vaddr = ((unsigned int)&seg_fbf_base);
     183    vaddr = ((unsigned int)SEG_FBF_BASE);
    179184    ko    = _v2p_translate( (page_table_t*) user_ptab,
    180185                         (vaddr >> 12),
  • soft/giet_vm/giet_drivers/hba_driver.c

    r295 r320  
    99// block oriented, external storage contrÃŽler, respecting the AHCI standard.
    1010//
    11 // The seg_ioc_base (standard HBA virtual base address) and seg_ioc_base_bis
    12 // (backup HBA virtual base address) must be defined in giet_vsegs.ld file.
     11// The SEG_IOC_BASE virtual address must be defined in the hard_config.h file.
    1312//////////////////////////////////////////////////////////////////////////////////
    1413// Implementation notes:
     
    6766                                unsigned int index )
    6867{
    69     unsigned int* vaddr = (unsigned int*)&seg_ioc_base + channel*HBA_SPAN + index;
     68    unsigned int* vaddr = (unsigned int*)SEG_IOC_BASE + channel*HBA_SPAN + index;
    7069    return _io_extended_read( vaddr );
    7170}
     
    7877                        unsigned int value )
    7978{
    80     unsigned int* vaddr = (unsigned int*)&seg_ioc_base + channel*HBA_SPAN + index;
     79    unsigned int* vaddr = (unsigned int*)SEG_IOC_BASE + channel*HBA_SPAN + index;
    8180    _io_extended_write( vaddr, value );
    8281}
  • soft/giet_vm/giet_drivers/icu_driver.c

    r295 r320  
    1515////////////////////////////////////////////////////////////////////////////////
    1616// The virtual base address of the segment associated to the component is:
     17//      SEG_ICU_BASE + cluster_xy * VSEG_CLUSTER_INCREMENT
    1718//
    18 //      seg_icu_base + cluster_xy * vseg_cluster_increment
    19 //
    20 // The seg_icu_base and vseg_cluster_increment values must be defined
    21 // in giet_vsegs.ld file.
     19// SEG_ICU_BASE and VSEG_CLUSTER_INCREMENT must be defined in hard_config.h
    2220////////////////////////////////////////////////////////////////////////////////
    2321
     
    4745#endif
    4846
    49 #if !defined( USE_XICU )
    50 # error: You must define USE_XICU in the hard_config.h file
     47#if !defined( USE_XCU )
     48# error: You must define USE_XCU in the hard_config.h file
     49#endif
     50
     51#if !defined(SEG_ICU_BASE)
     52# error: You must define SEG_ICU_BASE in the hard_config.h file
     53#endif
     54
     55#if !defined(VSEG_CLUSTER_INCREMENT)
     56# error: You must define VSEG_CLUSTER_INCREMENT in the hard_config.h file
    5157#endif
    5258
     
    6975    if (proc_id >= NB_PROCS_MAX) return 1;
    7076
    71 #if USE_XICU
     77#if USE_XCU
    7278    _printf("[GIET ERROR] _icu_set_mask() should not be used if USE_XICU is set\n");
    7379    return 1;
    7480#else
    75     unsigned int * icu_address = (unsigned int *) ((unsigned int)&seg_icu_base +
    76                                  (cluster_xy * (unsigned int)&vseg_cluster_increment));
     81    unsigned int * icu_address = (unsigned int *) ( SEG_ICU_BASE +
     82                                 (cluster_xy * VSEG_CLUSTER_INCREMENT) );
    7783    icu_address[proc_id * ICU_SPAN + ICU_MASK_SET] = value;
    7884    return 0;
     
    97103    if (proc_id >= NB_PROCS_MAX) return 1;
    98104
    99 #if USE_XICU
     105#if USE_XCU
    100106    _printf("[GIET ERROR] _icu_set_mask() should not be used if USE_XICU is set\n");
    101107    return 1;
    102108#else
    103     unsigned int* icu_address = (unsigned int *) ((unsigned int)&seg_icu_base +
    104                                  (cluster_xy * (unsigned int)&vseg_cluster_increment));
     109    unsigned int * icu_address = (unsigned int *) ( SEG_ICU_BASE +
     110                                 (cluster_xy * VSEG_CLUSTER_INCREMENT) );
    105111    *buffer = icu_address[proc_id * ICU_SPAN + ICU_IT_VECTOR];
    106112    return 0;
  • soft/giet_vm/giet_drivers/iob_driver.c

    r298 r320  
    1010// This component can be instanciated in more than one cluster.
    1111///////////////////////////////////////////////////////////////////////////////////
    12 // The seg_iob_base virtual base addresses must be defined in giet_vsegs.ld file.
    13 // The physical base address is supposed to be (cluster_xy << 32) | seg_iob_base.
     12// The SEG_IOB_BASE virtual addresses must be defined in hard_config.h file.
     13// The physical base address is supposed to be (cluster_xy << 32) | SEG_IOB_BASE.
    1414///////////////////////////////////////////////////////////////////////////////////
    1515
     
    1717#include <iob_driver.h>
    1818#include <utils.h>
     19
     20#if !defined(SEG_IOB_BASE)
     21# error: You must define SEG_IOB_BASE in the hard_config.h file
     22#endif
    1923
    2024#if !defined(GIET_USE_IOMMU)
     
    3438                                unsigned int index )       // register index
    3539{
    36     unsigned long long paddr = (unsigned long long)(unsigned int)&seg_iob_base +
     40    unsigned long long paddr = (unsigned long long)SEG_IOB_BASE +
    3741                               ((unsigned long long)cluster_xy << 32) +
    3842                               ((unsigned long long)index << 2);
     
    4852                        unsigned int value )           // value to be written
    4953{
    50     unsigned long long paddr = (unsigned long long)(unsigned int)&seg_iob_base +
     54    unsigned long long paddr = (unsigned long long)SEG_IOB_BASE +
    5155                               ((unsigned long long)cluster_xy << 32) +
    5256                               ((unsigned long long)index << 2);
     
    5458    _physical_write( paddr, value );
    5559}
    56 
    5760
    5861
  • soft/giet_vm/giet_drivers/ioc_driver.c

    r313 r320  
    7575// An error code is returned if these conditions are not verified.
    7676//
    77 // The "seg_ioc_base" virtual base address of the segment containing the
    78 // memory-mapped registers of the device must be defined in the giet_vsegs.ld file.
     77// The SEG_IOC_BASE virtual base address must be defined in hard_config.h,
     78// as it is used by the BDV, HBA and SPI drivers.
     79//
    7980// If the RAMDISK is used, an extra memory segment with virtual base address
    80 // "seg_ramdisk_base" must be defined in the giet_vsegs.ld file.
     81// SEG_RDK_BASE, used by RDK driver, must be defined in hard_config.h.
    8182///////////////////////////////////////////////////////////////////////////////////
    8283// Implementation note:
     
    9798#include <mmc_driver.h>
    9899#include <vmem.h>
     100
     101#if !defined( SEG_IOC_BASE )
     102# error: You must define SEG_IOC_BASE in the hard_config.h file
     103#endif
    99104
    100105#if !defined( USE_IOB )
  • soft/giet_vm/giet_drivers/mmc_driver.c

    r298 r320  
    1010// This component is replicated in all clusters, and can be accessed through
    1111// a configuration interface as a set of uncached, memory mapped registers.
    12 ///////////////////////////////////////////////////////////////////////////////////
     12//
    1313// The (virtual) base address of the associated segment is:
     14//       SEG_MMC_BASE + cluster_id * VSEG_CLUSTER_INCREMENT
    1415//
    15 //       seg_mmc_base + cluster_id * vseg_cluster_increment
    16 //
    17 // The seg_mmc_base and vseg_cluster_increment values must be defined
    18 // in the giet_vsegs.ld file.
     16// SEG_MMC_BASE and VSEG_CLUSTER_INCREMENT must be defined in hard_config.h.
    1917////////////////////////////////////////////////////////////////////////////////
    2018
     
    4038#endif
    4139
     40#if !defined(SEG_MMC_BASE)
     41# error: You must define SEG_MMC_BASE in the hard_config.h file
     42#endif
     43
     44#if !defined(VSEG_CLUSTER_INCREMENT)
     45# error: You must define VSEG_CLUSTER_INCREMENT in the hard_config.h file
     46#endif
     47
    4248///////////////////////////////////////////////////////////////////////////////////
    4349// This function invalidates all cache lines covering a memory buffer defined
     
    6167    }
    6268
    63     unsigned int* mmc_address = (unsigned int*)((unsigned int)&seg_mmc_base +
    64                                 (cluster_xy * (unsigned int)&vseg_cluster_increment));
     69    unsigned int* mmc_address = (unsigned int*)( SEG_MMC_BASE +
     70                                (cluster_xy * VSEG_CLUSTER_INCREMENT) );
    6571
    6672    // get the hard lock protecting exclusive access to MEMC
     
    97103    }
    98104
    99     unsigned int * mmc_address = (unsigned int *) ((unsigned int)&seg_mmc_base +
    100                                  (cluster_xy * (unsigned int)&vseg_cluster_increment));
     105    unsigned int* mmc_address = (unsigned int*)( SEG_MMC_BASE +
     106                                (cluster_xy * VSEG_CLUSTER_INCREMENT) );
    101107
    102108    // get the hard lock protecting exclusive access to MEMC
  • soft/giet_vm/giet_drivers/mwr_driver.c

    r295 r320  
    99//
    1010// This peripheral can be replicated (at most one component per cluster).
    11 ///////////////////////////////////////////////////////////////////////////////////
     11//
    1212// The (virtual) base address of the associated segment is:
     13//       SEG_MWR_BASE + cluster_xy * VSEG_CLUSTER_INCREMENT
    1314//
    14 //       seg_mwr_base + cluster_xy * vseg_cluster_increment
    15 //
    16 // The seg_mwr_base and vseg_cluster_increment values must be defined
    17 // in the giet_vsegs.ld file.
     15// SEG_MWR_BASE and VSEG_CLUSTER_INCREMENT must be defined in hard_config.h
    1816////////////////////////////////////////////////////////////////////////////////
    1917
    2018#include <giet_config.h>
     19#include <hard_config.h>
    2120#include <mwr_driver.h>
    2221#include <utils.h>
     
    3635#if !defined(Y_WIDTH)
    3736# error: You must define X_WIDTH in the hard_config.h file
     37#endif
     38
     39#if !defined(SEG_MWR_BASE)
     40# error: You must define SEG_MWR_BASE in the hard_config.h file
     41#endif
     42
     43#if !defined(VSEG_CLUSTER_INCREMENT)
     44# error: You must define VSEG_CLUSTER_INCREMENT in the hard_config.h file
    3845#endif
    3946
     
    6774
    6875    // compute base address
    69     unsigned int* mwr_address = (unsigned int*) ((unsigned int)&seg_mwr_base +
    70                                  (cluster_xy * (unsigned int)&vseg_cluster_increment));
     76    unsigned int* mwr_address = (unsigned int*) ( SEG_MWR_BASE +
     77                                 (cluster_xy * VSEG_CLUSTER_INCREMENT) );
    7178
    7279    unsigned int lsb = (unsigned int)channel_pbase;
  • soft/giet_vm/giet_drivers/nic_driver.c

    r295 r320  
    2424// One NIC channel and two CMA channels must be allocated to the task
    2525// in the mapping_info data structure.
     26//
     27// The SEG_NIC_BASE address must be defined in the hard_config.h file.
    2628//////////////////////////////////////////////////////////////////////////////////
    2729
     
    3234#if !defined(GIET_USE_IOMMU)
    3335# error: You must define GIET_USE_IOMMU in the giet_config.h file
     36#endif
     37
     38#if !defined(SEG_NIC_BASE)
     39# error: You must define SEG_NIC_BASE in the hard_config.h file
    3440#endif
    3541
     
    6268                                unsigned int index )
    6369{
    64     unsigned int* vaddr = (unsigned int*)&seg_nic_base +
    65                            NIC_CHANNEL_SPAN*channel + index;
     70    unsigned int* vaddr = (unsigned int*)SEG_NIC_BASE +
     71                           NIC_CHANNEL_SPAN * channel + index;
    6672    return _io_extended_read( vaddr );
    6773}
     
    7480                        unsigned int value )
    7581{
    76     unsigned int* vaddr = (unsigned int*)&seg_nic_base +
    77                            NIC_CHANNEL_SPAN*channel + index;
     82    unsigned int* vaddr = (unsigned int*)SEG_NIC_BASE +
     83                           NIC_CHANNEL_SPAN * channel + index;
    7884    _io_extended_write( vaddr, value );
    7985}
  • soft/giet_vm/giet_drivers/pic_driver.c

    r313 r320  
    88// This driver supports the SocLib vci_iopic component.
    99//
    10 // The seg_pic_base address must be defined in giet_vsegs.ld file.
     10// The SEG_PIC_BASE address must be defined in hard_config.h file.
    1111///////////////////////////////////////////////////////////////////////////////////
    1212// Implementation note:
     
    2020#include <utils.h>
    2121
     22#if !defined(SEG_PIC_BASE)
     23# error: You must define SEG_PIC_BASE in the hard_config.h file
     24#endif
     25
    2226/////////////////////////////////////////////////////////////////////////////////
    2327// This low level function returns the value of register (channel / index)
     
    2630                                unsigned int index )
    2731{
    28     unsigned int* vaddr = (unsigned int*)&seg_pic_base + channel*IOPIC_SPAN + index;
     32    unsigned int* vaddr = (unsigned int*)SEG_PIC_BASE + channel*IOPIC_SPAN + index;
    2933    return _io_extended_read( vaddr );
    3034}
     
    3741                        unsigned int value )
    3842{
    39     unsigned int* vaddr = (unsigned int*)&seg_pic_base + channel*IOPIC_SPAN + index;
     43    unsigned int* vaddr = (unsigned int*)SEG_PIC_BASE + channel*IOPIC_SPAN + index;
    4044    _io_extended_write( vaddr, value );
    4145}
  • soft/giet_vm/giet_drivers/rdk_driver.c

    r313 r320  
    1515// As the number of concurrent accesses is not bounded, these functions
    1616// don't use the _ioc_lock variable.
     17//
     18// The SEG_RDK_BASE virtual address must be defined in the hard_config.h
     19// file when the USE_RAMDISK flag is set.
    1720///////////////////////////////////////////////////////////////////////////////////
    1821
    1922#include <giet_config.h>
     23#include <hard_config.h>
    2024#include <rdk_driver.h>
    2125#include <utils.h>
    2226#include <tty_driver.h>
    2327#include <ctx_handler.h>
     28
     29#if !defined(SEG_RDK_BASE)
     30# error: You must define SEG_RDK_BASE in the hard_config.h file
     31#endif
    2432
    2533///////////////////////////////////////////////////////////////////////////////
     
    5462#endif
    5563
    56     char* src = (char*)&seg_ram_disk_base + (512*lba);
     64#if USE_RAM_DISK
     65    char* src = (char*)SEG_RDK_BASE + (512*lba);
    5766    char* dst = (char*)buffer;
    5867    _memcpy( dst, src, count*512 );
    59 
    6068    return 0;
     69#else
     70    _printf("[GIET ERROR] _rdk_read() should not be used if USE_RAM_DISK not set\n");
     71    return 1;
     72#endif
    6173}
    6274
     
    8395#endif
    8496
    85     char* dst = (char*)&seg_ram_disk_base + (512*lba);
     97#if USE_RAM_DISK
     98    char* dst = (char*)SEG_RDK_BASE + (512*lba);
    8699    char* src = (char*)buffer;
    87100    _memcpy( dst, src, count*512 );
    88 
    89101    return 0;
     102#else
     103    _printf("[GIET ERROR] _rdk_write() should not be used if USE_RAM_DISK not set\n");
     104    return 1;
     105#endif
    90106}
    91107
  • soft/giet_vm/giet_drivers/sdc_driver.c

    r295 r320  
    66///////////////////////////////////////////////////////////////////////////////////
    77
     8#include <hard_config.h>
    89#include <sdc_driver.h>
    910#include <tty_driver.h>
     
    338339unsigned int _sdc_init()
    339340{
    340     spi = (struct spi_dev*) &seg_ioc_base;
     341    spi = (struct spi_dev*)SEG_IOC_BASE;
    341342
    342343    // initializing the SPI controller
  • soft/giet_vm/giet_drivers/sim_driver.c

    r258 r320  
    88// This driver supports the vci_sim_helper component.
    99// There is at most one such component in the architecture.
    10 ///////////////////////////////////////////////////////////////////////////////////
    11 // The seg_sim_base address must be defined in the giet_vsegs.ld file.
     10//
     11// The SEG_SIM_BASE address must be defined in the hard_config.h file.
    1212////////////////////////////////////////////////////////////////////////////////
    1313
     14#include <hard_config.h>
    1415#include <giet_config.h>
    1516#include <sim_driver.h>
    16 #include <utils.h>
     17
     18#if !defined(SEG_SIM_BASE)
     19# error: You must define SEG_SIM_BASE in the hard_config.h file
     20#endif
    1721
    1822////////////////////////////////////////////////////////////////////////////////
  • soft/giet_vm/giet_drivers/spi_driver.c

    r289 r320  
    251251}
    252252
     253///////////////////////////////////////////////////////////////////////////////
     254// This ISR handles the IRQ generated by a SPI controler
     255///////////////////////////////////////////////////////////////////////////////
     256void _spi_isr( unsigned int irq_type,
     257               unsigned int irq_id,
     258               unsigned int channel )
     259{
     260    _printf("\n[GIET ERROR] _spi_isr() not implemented\n");
     261    _exit();
     262}
     263
    253264// Local Variables:
    254265// tab-width: 4
  • soft/giet_vm/giet_drivers/spi_driver.h

    r289 r320  
    5151                 int rx_edge         );
    5252
     53extern void _spi_isr( unsigned int irq_type,
     54                      unsigned int irq_id,
     55                      unsigned int channel );
     56
    5357///////////////////////////////////////////////////////////////////////////////
    5458// SPI macros and constants
  • soft/giet_vm/giet_drivers/tim_driver.c

    r295 r320  
    1919//
    2020// The NB_PROCS_MAX and NB_TIM_CHANNELS values must be defined in hard_config.h file.
    21 /////////////////////////////////////////////////////////////////////////////////////
     21//
    2222// The virtual base address of the segment associated to a channel is:
    23 //
    24 //     seg_tim_base + cluster_xy * vseg_cluster_increment + TIMER_SPAN * timer_id
    25 //
    26 // The seg_tim_base and vseg_cluster_increment values must be defined
    27 // in the giet_vsegs.ld file.
     23//     SEG_TIM_BASE + cluster_xy * VSEG_CLUSTER_INCREMENT + TIMER_SPAN * timer_id
     24//
     25// The SEG_TIM_BASE and VSEG_CLUSTER_INCREMENT must be defined in hard_config.h.
    2826/////////////////////////////////////////////////////////////////////////////////////
    2927
     
    3331#include <tty_driver.h>
    3432#include <utils.h>
     33
     34#if !defined(SEG_TIM_BASE)
     35# error: You must define SEG_TIM_BASE in the hard_config.h file
     36#endif
     37
     38#if !defined(VSEG_CLUSTER_INCREMENT)
     39# error: You must define VSEG_CLUSTER_INCREMENT in the hard_config.h file
     40#endif
    3541
    3642#if !defined(X_SIZE)
     
    9298    }
    9399
    94     unsigned int* timer_address = (unsigned int *) ((unsigned int)&seg_tim_base +
    95                                   (cluster_xy * (unsigned int)&vseg_cluster_increment));
     100    unsigned int* timer_address = (unsigned int *) ( SEG_TIM_BASE +
     101                                  (cluster_xy * VSEG_CLUSTER_INCREMENT) );
    96102
    97103    timer_address[local_id * TIMER_SPAN + TIMER_PERIOD] = period;
     
    123129    }
    124130
    125     unsigned int* timer_address = (unsigned int *) ((unsigned int)&seg_tim_base +
    126                                   (cluster_xy * (unsigned int)&vseg_cluster_increment));
     131    unsigned int* timer_address = (unsigned int *) ( SEG_TIM_BASE +
     132                                  (cluster_xy * VSEG_CLUSTER_INCREMENT) );
    127133
    128134    timer_address[local_id * TIMER_SPAN + TIMER_MODE] = 0;
     
    155161    }
    156162
    157     unsigned int * timer_address = (unsigned int *) ((unsigned int)&seg_tim_base +
    158                                    (cluster_xy * (unsigned int)&vseg_cluster_increment));
     163    unsigned int* timer_address = (unsigned int *) ( SEG_TIM_BASE +
     164                                  (cluster_xy * VSEG_CLUSTER_INCREMENT) );
    159165
    160166    timer_address[local_id * TIMER_SPAN + TIMER_RESETIRQ] = 0;
     
    189195
    190196    // We suppose that the TIMER_MODE register value is 0x3
    191     unsigned int * timer_address = (unsigned int *) ((unsigned int)&seg_tim_base +
    192                                    (cluster_xy * (unsigned int)&vseg_cluster_increment));
     197    unsigned int* timer_address = (unsigned int *) ( SEG_TIM_BASE +
     198                                  (cluster_xy * VSEG_CLUSTER_INCREMENT) );
    193199
    194200    unsigned int period = timer_address[local_id * TIMER_SPAN + TIMER_PERIOD];
  • soft/giet_vm/giet_drivers/tty_driver.c

    r315 r320  
    1616// be stored in the context of the task by the boot code.
    1717//
    18 // The seg_tty_base must be defined in giet_vsegs.ld file.
     18// The SEG_TTY_BASE address must be defined in the hard_config.h file.
    1919///////////////////////////////////////////////////////////////////////////////////
    2020// Implementation note:
     
    3131#include <utils.h>
    3232
     33#if !defined(SEG_TTY_BASE)
     34# error: You must define SEG_TTY_BASE in the hard_config.h file
     35#endif
     36
    3337#if !defined(NB_TTY_CHANNELS)
    3438# error: You must define NB_TTY_CHANNELS in the hard_config.h file
     
    6064                                unsigned int index )
    6165{
    62     unsigned int* vaddr = (unsigned int*)&seg_tty_base + channel*TTY_SPAN + index;
     66    unsigned int* vaddr = (unsigned int*)SEG_TTY_BASE + channel*TTY_SPAN + index;
    6367    return _io_extended_read( vaddr );
    6468}
     
    7175                        unsigned int value )
    7276{
    73     unsigned int* vaddr = (unsigned int*)&seg_tty_base + channel*TTY_SPAN + index;
     77    unsigned int* vaddr = (unsigned int*)SEG_TTY_BASE + channel*TTY_SPAN + index;
    7478    _io_extended_write( vaddr, value );
    7579}
  • soft/giet_vm/giet_drivers/xcu_driver.c

    r295 r320  
    55// Copyright (c) UPMC-LIP6
    66///////////////////////////////////////////////////////////////////////////////////
    7 
     7// This peripheral is replicated in aall clusters containing processors.
     8//
     9// SEG_XCU_BASE and VSEG_CLUSTER_INCREMENT must be defined in hard_config.h file.
     10///////////////////////////////////////////////////////////////////////////////////
     11
     12#include <hard_config.h>
    813#include <giet_config.h>
    914#include <xcu_driver.h>
     
    3237#endif
    3338
    34 #if !defined( USE_XICU )
    35 # error: You must define USE_XICU in the hard_config.h file
     39#if !defined( USE_XCU )
     40# error: You must define USE_XCU in the hard_config.h file
     41#endif
     42
     43#if !defined( SEG_XCU_BASE )
     44# error: You must define SEG_XCU_BASE in the hard_config.h file
     45#endif
     46
     47#if !defined( VSEG_CLUSTER_INCREMENT )
     48# error: You must define VSEG_CLUSTER_INCREMENT in the hard_config.h file
    3649#endif
    3750
     
    4760                    unsigned int irq_type )
    4861{
    49 #if USE_XICU
     62#if USE_XCU
    5063    // parameters checking
    5164    unsigned int x = cluster_xy >> Y_WIDTH;
     
    5568    if (channel >= (NB_PROCS_MAX * IRQ_PER_PROCESSOR)) _exit();
    5669
    57     volatile unsigned int* xcu_address =
    58         (unsigned int *) ((unsigned int)&seg_xcu_base +
    59         (cluster_xy * (unsigned int)&vseg_cluster_increment));
     70    unsigned int* xcu_address = (unsigned int *) ( SEG_XCU_BASE +
     71                                (cluster_xy * VSEG_CLUSTER_INCREMENT) );
    6072
    6173    unsigned int func;
    62     if      (irq_type == IRQ_TYPE_PTI) func = XICU_MSK_PTI_ENABLE;
    63     else if (irq_type == IRQ_TYPE_WTI) func = XICU_MSK_WTI_ENABLE;
    64     else if (irq_type == IRQ_TYPE_HWI) func = XICU_MSK_HWI_ENABLE;
     74    if      (irq_type == IRQ_TYPE_PTI) func = XCU_MSK_PTI_ENABLE;
     75    else if (irq_type == IRQ_TYPE_WTI) func = XCU_MSK_WTI_ENABLE;
     76    else if (irq_type == IRQ_TYPE_HWI) func = XCU_MSK_HWI_ENABLE;
    6577    else
    6678    {
     
    6981    }
    7082
    71     xcu_address[XICU_REG(func,channel)] = value;
    72 
    73 #else
    74     _printf("[GIET ERROR] _xcu_set_mask() should not be used if USE_XICU not set\n");
     83    xcu_address[XCU_REG(func,channel)] = value;
     84
     85#else
     86    _printf("[GIET ERROR] _xcu_set_mask() should not be used if USE_XCU not set\n");
    7587    _exit();
    7688#endif
     
    90102                     unsigned int * irq_type )
    91103{
    92 #if USE_XICU
     104#if USE_XCU
    93105    // parameters checking
    94106    unsigned int x = cluster_xy >> Y_WIDTH;
     
    98110    if (channel >= (NB_PROCS_MAX * IRQ_PER_PROCESSOR)) _exit();
    99111
    100     volatile unsigned int* xcu_address =
    101         (unsigned int *) ((unsigned int)&seg_xcu_base +
    102         (cluster_xy * (unsigned int)&vseg_cluster_increment));
    103 
    104     unsigned int prio = xcu_address[XICU_REG(XICU_PRIO,channel)];
     112    unsigned int* xcu_address = (unsigned int *) ( SEG_XCU_BASE +
     113                                (cluster_xy * VSEG_CLUSTER_INCREMENT) );
     114
     115    unsigned int prio = xcu_address[XCU_REG(XCU_PRIO,channel)];
    105116    unsigned int pti_ok = (prio & 0x00000001);
    106117    unsigned int hwi_ok = (prio & 0x00000002);
     
    130141 
    131142#else
    132     _printf("[GIET ERROR] _xcu_get_index should not be used if USE_XICU is not set\n");
     143    _printf("[GIET ERROR] _xcu_get_index should not be used if USE_XCU is not set\n");
    133144    _exit();
    134145#endif
     
    143154                    unsigned int wdata )
    144155{
    145 #if USE_XICU
     156#if USE_XCU
    146157    // parameters checking
    147158    unsigned int x = cluster_xy >> Y_WIDTH;
     
    151162    if (wti_index >= 32)           _exit();
    152163
    153     volatile unsigned int* xcu_address =
    154         (unsigned int *) ((unsigned int)&seg_xcu_base +
    155         (cluster_xy * (unsigned int)&vseg_cluster_increment));
    156 
    157     xcu_address[XICU_REG(XICU_WTI_REG,wti_index)] = wdata;
    158 
    159 #else
    160     _printf("[GIET ERROR] _xcu_send_ipi should not be used if USE_XICU is not set\n");
     164    unsigned int* xcu_address = (unsigned int *) ( SEG_XCU_BASE +
     165                                (cluster_xy * VSEG_CLUSTER_INCREMENT) );
     166
     167    xcu_address[XCU_REG(XCU_WTI_REG,wti_index)] = wdata;
     168
     169#else
     170    _printf("[GIET ERROR] _xcu_send_ipi should not be used if USE_XCU is not set\n");
    161171    _exit();
    162172#endif
     
    173183                         unsigned int * value )
    174184{
    175 #if USE_XICU
     185#if USE_XCU
    176186    // parameters checking
    177187    unsigned int x = cluster_xy >> Y_WIDTH;
     
    181191    if (wti_index >= 32)           _exit();
    182192 
    183     volatile unsigned int* xcu_address =
    184         (unsigned int *) ((unsigned int)&seg_xcu_base +
    185         (cluster_xy * (unsigned int)&vseg_cluster_increment));
    186 
    187     *value = xcu_address[XICU_REG(XICU_WTI_REG, wti_index)];
    188 
    189 #else
    190     _printf("[GIET ERROR] in _xcu_get_wti_value() USE_XICU is not set\n");
     193    unsigned int* xcu_address = (unsigned int *) ( SEG_XCU_BASE +
     194                                (cluster_xy * VSEG_CLUSTER_INCREMENT) );
     195
     196    *value = xcu_address[XCU_REG(XCU_WTI_REG, wti_index)];
     197
     198#else
     199    _printf("[GIET ERROR] in _xcu_get_wti_value() USE_XCU is not set\n");
    191200    _exit();
    192201#endif
     
    203212                           unsigned int * address )
    204213{
    205 #if USE_XICU
     214#if USE_XCU
    206215    if (wti_index >= 32)           _exit();
    207216 
    208     unsigned int xcu_address = (unsigned int)&seg_xcu_base;
    209     *address = xcu_address + (XICU_REG(XICU_WTI_REG, wti_index)<<2);
    210 
    211 #else
    212     _printf("[GIET ERROR] in _xcu_get_wti_address() USE_XICU is not set\n");
    213     _exit();
    214 #endif
    215 }
    216 
    217 ////////////////////////////////////////////////////////////////////////////////
    218 // This function activates a timer contained in XICU by writing in the
     217    unsigned int xcu_address = (unsigned int)SEG_XCU_BASE;
     218    *address = xcu_address + (XCU_REG(XCU_WTI_REG, wti_index)<<2);
     219
     220#else
     221    _printf("[GIET ERROR] in _xcu_get_wti_address() USE_XCU is not set\n");
     222    _exit();
     223#endif
     224}
     225
     226////////////////////////////////////////////////////////////////////////////////
     227// This function activates a timer contained in XCU by writing in the
    219228// proper register the period value.
    220229////////////////////////////////////////////////////////////////////////////////
     
    223232                       unsigned int period )
    224233{
    225 #if USE_XICU
     234#if USE_XCU
    226235    // parameters checking
    227236    unsigned int x = cluster_xy >> Y_WIDTH;
     
    230239    if (y >= Y_SIZE)             _exit();
    231240
    232     volatile unsigned int* xcu_address =
    233         (unsigned int *) ((unsigned int)&seg_xcu_base +
    234         (cluster_xy * (unsigned int)&vseg_cluster_increment));
    235 
    236     xcu_address[XICU_REG(XICU_PTI_PER, pti_index)] = period;
    237 
    238 #else
    239     _printf("[GIET ERROR] in _xcu_timer_start() USE_XICU is not set\n");
    240     _exit();
    241 #endif
    242 }
    243 
    244 //////////////////////////////////////////////////////////////////////////////
    245 // This function desactivates a timer in XICU component
     241    unsigned int* xcu_address = (unsigned int *) ( SEG_XCU_BASE +
     242                                (cluster_xy * VSEG_CLUSTER_INCREMENT) );
     243
     244    xcu_address[XCU_REG(XCU_PTI_PER, pti_index)] = period;
     245
     246#else
     247    _printf("[GIET ERROR] in _xcu_timer_start() USE_XCU is not set\n");
     248    _exit();
     249#endif
     250}
     251
     252//////////////////////////////////////////////////////////////////////////////
     253// This function desactivates a timer in XCU component
    246254// by writing in the proper register.
    247255//////////////////////////////////////////////////////////////////////////////
     
    249257                      unsigned int pti_index)
    250258{
    251 #if USE_XICU
     259#if USE_XCU
    252260    // parameters checking
    253261    unsigned int x = cluster_xy >> Y_WIDTH;
     
    256264    if (y >= Y_SIZE)             _exit();
    257265
    258     volatile unsigned int * xcu_address =
    259         (unsigned int *) ((unsigned int)&seg_xcu_base +
    260         (cluster_xy * (unsigned int)&vseg_cluster_increment));
    261 
    262     xcu_address[XICU_REG(XICU_PTI_PER, pti_index)] = 0;
    263 
    264 #else
    265     _printf("[GIET ERROR] in _xcu_timer_stop() USE_XICU is not set\n");
    266     _exit();
    267 #endif
    268 }
    269 
    270 //////////////////////////////////////////////////////////////////////////////
    271 // This function acknowlegge a timer interrupt in XICU
    272 // component by reading in the proper register.
     266    unsigned int* xcu_address = (unsigned int *) ( SEG_XCU_BASE +
     267                                (cluster_xy * VSEG_CLUSTER_INCREMENT) );
     268
     269    xcu_address[XCU_REG(XCU_PTI_PER, pti_index)] = 0;
     270
     271#else
     272    _printf("[GIET ERROR] in _xcu_timer_stop() USE_XCU is not set\n");
     273    _exit();
     274#endif
     275}
     276
     277//////////////////////////////////////////////////////////////////////////////
     278// This function acknowlegge a timer interrupt in XCU
     279// component by reading in the proper XCU register.
    273280// It can be used by both the isr_switch() for a "system" timer,
    274281// or by the _isr_timer() for an "user" timer.
    275282//////////////////////////////////////////////////////////////////////////////
    276 void _xcu_timer_reset_irq( unsigned int cluster_xy,
    277                            unsigned int pti_index )
    278 {
    279 #if USE_XICU
     283unsigned int _xcu_timer_reset_irq( unsigned int cluster_xy,
     284                                   unsigned int pti_index )
     285{
     286#if USE_XCU
    280287    // parameters checking
    281288    unsigned int x = cluster_xy >> Y_WIDTH;
     
    284291    if (y >= Y_SIZE)             _exit();
    285292
    286     volatile unsigned int * xcu_address =
    287         (unsigned int *) ((unsigned int)&seg_xcu_base +
    288         (cluster_xy * (unsigned int)&vseg_cluster_increment));
    289 
    290     xcu_address[XICU_REG(XICU_PTI_ACK, pti_index)];
    291 
    292 #else
    293     _printf("[GIET ERROR] in _xcu_timer_reset_irq() USE_XICU is not set\n");
    294     _exit();
     293    unsigned int* xcu_address = (unsigned int *) ( SEG_XCU_BASE +
     294                                (cluster_xy * VSEG_CLUSTER_INCREMENT) );
     295
     296    // This return value is not used / avoid a compilation warning.
     297    return xcu_address[XCU_REG(XCU_PTI_ACK, pti_index)];
     298
     299#else
     300    _printf("[GIET ERROR] in _xcu_timer_reset_irq() USE_XCU is not set\n");
     301    _exit();
     302    return 0;
    295303#endif
    296304}
     
    307315                           unsigned int pti_index )
    308316{
    309 #if USE_XICU
     317#if USE_XCU
    310318    // parameters checking
    311319    unsigned int x = cluster_xy >> Y_WIDTH;
     
    314322    if (y >= Y_SIZE)             _exit();
    315323
    316     volatile unsigned int * xcu_address =
    317         (unsigned int *) ((unsigned int) &seg_xcu_base +
    318         (cluster_xy * (unsigned int)&vseg_cluster_increment));
    319 
    320     unsigned int period = xcu_address[XICU_REG(XICU_PTI_PER, pti_index)];
     324    unsigned int* xcu_address = (unsigned int *) ( SEG_XCU_BASE +
     325                                (cluster_xy * VSEG_CLUSTER_INCREMENT) );
     326
     327    unsigned int period = xcu_address[XCU_REG(XCU_PTI_PER, pti_index)];
    321328
    322329    // we write 0 first because if the timer is currently running,
    323330    // the corresponding timer counter is not reset
    324     xcu_address[XICU_REG(XICU_PTI_PER, pti_index)] = 0;
    325     xcu_address[XICU_REG(XICU_PTI_PER, pti_index)] = period;
    326 
    327 #else
    328     _printf("[GIET ERROR] in _xcu_timer_reset_cpt() USE_XICU is not set\n");
     331    xcu_address[XCU_REG(XCU_PTI_PER, pti_index)] = 0;
     332    xcu_address[XCU_REG(XCU_PTI_PER, pti_index)] = period;
     333
     334#else
     335    _printf("[GIET ERROR] in _xcu_timer_reset_cpt() USE_XCU is not set\n");
    329336    _exit();
    330337#endif
  • soft/giet_vm/giet_drivers/xcu_driver.h

    r295 r320  
    2929///////////////////////////////////////////////////////////////////////////////////
    3030
    31 enum Xicu_registers
     31enum Xcu_registers
    3232{
    33     XICU_WTI_REG = 0,
    34     XICU_PTI_PER = 1,
    35     XICU_PTI_VAL = 2,
    36     XICU_PTI_ACK = 3,
     33    XCU_WTI_REG = 0,
     34    XCU_PTI_PER = 1,
     35    XCU_PTI_VAL = 2,
     36    XCU_PTI_ACK = 3,
    3737
    38     XICU_MSK_PTI = 4,
    39     XICU_MSK_PTI_ENABLE = 5,
    40     XICU_MSK_PTI_DISABLE = 6,
    41     XICU_PTI_ACTIVE = 6,
     38    XCU_MSK_PTI = 4,
     39    XCU_MSK_PTI_ENABLE = 5,
     40    XCU_MSK_PTI_DISABLE = 6,
     41    XCU_PTI_ACTIVE = 6,
    4242
    43     XICU_MSK_HWI = 8,
    44     XICU_MSK_HWI_ENABLE = 9,
    45     XICU_MSK_HWI_DISABLE = 10,
    46     XICU_HWI_ACTIVE = 10,
     43    XCU_MSK_HWI = 8,
     44    XCU_MSK_HWI_ENABLE = 9,
     45    XCU_MSK_HWI_DISABLE = 10,
     46    XCU_HWI_ACTIVE = 10,
    4747
    48     XICU_MSK_WTI = 12,
    49     XICU_MSK_WTI_ENABLE = 13,
    50     XICU_MSK_WTI_DISABLE = 14,
    51     XICU_WTI_ACTIVE = 14,
     48    XCU_MSK_WTI = 12,
     49    XCU_MSK_WTI_ENABLE = 13,
     50    XCU_MSK_WTI_DISABLE = 14,
     51    XCU_WTI_ACTIVE = 14,
    5252
    53     XICU_PRIO = 15,
     53    XCU_PRIO = 15,
    5454};
    5555
    56 #define XICU_REG(func, index) (((func)<<5)|(index))
     56#define XCU_REG(func, index) (((func)<<5)|(index))
    5757 
    5858///////////////////////////////////////////////////////////////////////////////////
     
    8888                             unsigned int pti_index );
    8989
    90 extern void _xcu_timer_reset_irq( unsigned int cluster_xy,
    91                                   unsigned int pti_index );
     90extern unsigned int _xcu_timer_reset_irq( unsigned int cluster_xy,
     91                                          unsigned int pti_index );
    9292
    9393extern void _xcu_timer_reset_cpt( unsigned int cluster_xy,
Note: See TracChangeset for help on using the changeset viewer.