Ignore:
Timestamp:
Oct 5, 2018, 12:08:35 AM (6 years ago)
Author:
alain
Message:

Introduction of the soclib_mty driver for the TSAR-LETI architecture.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/tsar_mips32/drivers/soclib_pic.c

    r550 r570  
    4949//////////////////////////////////////////////////////////////////////////////////////
    5050
    51 ///////////////////////////////
     51/////////////////////////////////////
    5252uint32_t soclib_pic_wti_alloc( void )
    5353{
     
    6868}  // end soclib_pic_wti_alloc()
    6969
    70 ///////////////////////////////////////
     70/////////////////////////////////////////////
    7171inline uint32_t * soclib_pic_xcu_base( void )
    7272{
     
    111111}
    112112
    113 /////////////////////////////
     113///////////////////////////////////
    114114void soclib_pic_irq_handler( void )
    115115{
     
    156156
    157157            // check RPC FIFO,  and activate or create a RPC thread
    158             // condition is always true, but we use the ack value
    159             // to avoid a GCC warning
    160             if( ack + 1 ) rpc_check();
     158            // (condition is always true, but we use the ack value to avoid a GCC warning)
     159            if( ack + 1 ) sched_yield("IPI received");
    161160        }
    162161        ////////////////////////////////////////////////////////////////
     
    267266        xptr_t iopic_seg_xp = XPTR( iopic_seg_cxy,
    268267                                    iopic_seg_ptr + i*IOPIC_SPAN + IOPIC_MASK );
    269         hal_remote_sw( iopic_seg_xp , 0 );
     268        hal_remote_s32( iopic_seg_xp , 0 );
    270269    }
    271270
     
    358357
    359358    // get extended and local pointers on IOPIC  segment base
    360     xptr_t     seg_pic_xp  = hal_remote_lwd( XPTR( pic_cxy , &pic_ptr->base ) );
     359    xptr_t     seg_pic_xp  = hal_remote_l64( XPTR( pic_cxy , &pic_ptr->base ) );
    361360    cxy_t      seg_pic_cxy = GET_CXY( seg_pic_xp );
    362361    uint32_t * seg_pic_ptr = (uint32_t *)GET_PTR( seg_pic_xp );
     
    399398        xptr_t   lsb_xp = XPTR( seg_pic_cxy , seg_pic_ptr+hwi_id*IOPIC_SPAN+IOPIC_ADDRESS );
    400399        xptr_t   msb_xp = XPTR( seg_pic_cxy , seg_pic_ptr+hwi_id*IOPIC_SPAN+IOPIC_EXTEND );
    401         hal_remote_sw( lsb_xp , lsb_wdata );
    402         hal_remote_sw( msb_xp , msb_wdata );
     400        hal_remote_s32( lsb_xp , lsb_wdata );
     401        hal_remote_s32( msb_xp , msb_wdata );
    403402
    404403        // enable IRQ in IOPIC
    405         hal_remote_sw( XPTR( seg_pic_cxy , seg_pic_ptr+hwi_id*IOPIC_SPAN+IOPIC_MASK ), 1 );
     404        hal_remote_s32( XPTR( seg_pic_cxy , seg_pic_ptr+hwi_id*IOPIC_SPAN+IOPIC_MASK ), 1 );
    406405
    407406        // update the WTI interrupt vector for core[lid]
     
    460459
    461460    // get the source chdev IRQ type and index
    462     uint32_t irq_type = hal_remote_lw( XPTR( src_chdev_cxy , &src_chdev_ptr->irq_type ) );
    463     uint32_t irq_id   = hal_remote_lw( XPTR( src_chdev_cxy , &src_chdev_ptr->irq_id ) );
     461    uint32_t irq_type = hal_remote_l32( XPTR( src_chdev_cxy , &src_chdev_ptr->irq_type ) );
     462    uint32_t irq_id   = hal_remote_l32( XPTR( src_chdev_cxy , &src_chdev_ptr->irq_id ) );
    464463
    465464    if( irq_type == SOCLIB_TYPE_HWI )
     
    467466        // enable this HWI in remote XCU controller
    468467        // in TSAR : XCU output [4*lid] is connected to core [lid]
    469         hal_remote_sw( XPTR( src_chdev_cxy ,
     468        hal_remote_s32( XPTR( src_chdev_cxy ,
    470469                       &seg_xcu_ptr[ (XCU_MSK_HWI_ENABLE << 5) | (lid<<2) ] ) , (1 << irq_id) );
    471470    }
     
    474473        // enable this WTI in remote XCU controller
    475474        // in TSAR : XCU output [4*lid] is connected to core [lid]
    476         hal_remote_sw( XPTR( src_chdev_cxy ,
     475        hal_remote_s32( XPTR( src_chdev_cxy ,
    477476                       &seg_xcu_ptr[ (XCU_MSK_WTI_ENABLE << 5) | (lid<<2) ] ) , (1 << irq_id) );
    478477    }
     
    495494
    496495    // get the source chdev IRQ type and index
    497     uint32_t irq_type = hal_remote_lw( XPTR( src_chdev_cxy , &src_chdev_ptr->irq_type ) );
    498     uint32_t irq_id   = hal_remote_lw( XPTR( src_chdev_cxy , &src_chdev_ptr->irq_id ) );
     496    uint32_t irq_type = hal_remote_l32( XPTR( src_chdev_cxy , &src_chdev_ptr->irq_type ) );
     497    uint32_t irq_id   = hal_remote_l32( XPTR( src_chdev_cxy , &src_chdev_ptr->irq_id ) );
    499498
    500499    if( irq_type == SOCLIB_TYPE_HWI )
     
    502501        // enable this HWI in remote XCU controller
    503502        // in TSAR : XCU output [4*lid] is connected to core [lid]
    504         hal_remote_sw( XPTR( src_chdev_cxy ,
     503        hal_remote_s32( XPTR( src_chdev_cxy ,
    505504                       &seg_xcu_ptr[(XCU_MSK_HWI_DISABLE << 5) | (lid<<2) ] ) , (1 << irq_id) );
    506505    }
     
    509508        // enable this WTI in remote XCU controller
    510509        // in TSAR : XCU output [4*lid] is connected to core [lid]
    511         hal_remote_sw( XPTR( src_chdev_cxy ,
     510        hal_remote_s32( XPTR( src_chdev_cxy ,
    512511                       &seg_xcu_ptr[(XCU_MSK_WTI_DISABLE << 5) | (lid<<2) ] ) , (1 << irq_id) );
    513512    }
     
    558557
    559558    // write to WTI mailbox[cxy][lid]
    560     hal_remote_sw( XPTR( cxy , &base[(XCU_WTI_REG << 5) | lid ] ) , 0 );
     559    hal_remote_s32( XPTR( cxy , &base[(XCU_WTI_REG << 5) | lid ] ) , 0 );
    561560}
    562561
Note: See TracChangeset for help on using the changeset viewer.