Changeset 570 for trunk/hal/tsar_mips32/drivers/soclib_pic.c
- Timestamp:
- Oct 5, 2018, 12:08:35 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/tsar_mips32/drivers/soclib_pic.c
r550 r570 49 49 ////////////////////////////////////////////////////////////////////////////////////// 50 50 51 /////////////////////////////// 51 ///////////////////////////////////// 52 52 uint32_t soclib_pic_wti_alloc( void ) 53 53 { … … 68 68 } // end soclib_pic_wti_alloc() 69 69 70 /////////////////////////////////////// 70 ///////////////////////////////////////////// 71 71 inline uint32_t * soclib_pic_xcu_base( void ) 72 72 { … … 111 111 } 112 112 113 ///////////////////////////// 113 /////////////////////////////////// 114 114 void soclib_pic_irq_handler( void ) 115 115 { … … 156 156 157 157 // 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"); 161 160 } 162 161 //////////////////////////////////////////////////////////////// … … 267 266 xptr_t iopic_seg_xp = XPTR( iopic_seg_cxy, 268 267 iopic_seg_ptr + i*IOPIC_SPAN + IOPIC_MASK ); 269 hal_remote_s w( iopic_seg_xp , 0 );268 hal_remote_s32( iopic_seg_xp , 0 ); 270 269 } 271 270 … … 358 357 359 358 // get extended and local pointers on IOPIC segment base 360 xptr_t seg_pic_xp = hal_remote_l wd( XPTR( pic_cxy , &pic_ptr->base ) );359 xptr_t seg_pic_xp = hal_remote_l64( XPTR( pic_cxy , &pic_ptr->base ) ); 361 360 cxy_t seg_pic_cxy = GET_CXY( seg_pic_xp ); 362 361 uint32_t * seg_pic_ptr = (uint32_t *)GET_PTR( seg_pic_xp ); … … 399 398 xptr_t lsb_xp = XPTR( seg_pic_cxy , seg_pic_ptr+hwi_id*IOPIC_SPAN+IOPIC_ADDRESS ); 400 399 xptr_t msb_xp = XPTR( seg_pic_cxy , seg_pic_ptr+hwi_id*IOPIC_SPAN+IOPIC_EXTEND ); 401 hal_remote_s w( lsb_xp , lsb_wdata );402 hal_remote_s w( msb_xp , msb_wdata );400 hal_remote_s32( lsb_xp , lsb_wdata ); 401 hal_remote_s32( msb_xp , msb_wdata ); 403 402 404 403 // enable IRQ in IOPIC 405 hal_remote_s w( 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 ); 406 405 407 406 // update the WTI interrupt vector for core[lid] … … 460 459 461 460 // get the source chdev IRQ type and index 462 uint32_t irq_type = hal_remote_l w( XPTR( src_chdev_cxy , &src_chdev_ptr->irq_type ) );463 uint32_t irq_id = hal_remote_l w( 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 ) ); 464 463 465 464 if( irq_type == SOCLIB_TYPE_HWI ) … … 467 466 // enable this HWI in remote XCU controller 468 467 // in TSAR : XCU output [4*lid] is connected to core [lid] 469 hal_remote_s w( XPTR( src_chdev_cxy ,468 hal_remote_s32( XPTR( src_chdev_cxy , 470 469 &seg_xcu_ptr[ (XCU_MSK_HWI_ENABLE << 5) | (lid<<2) ] ) , (1 << irq_id) ); 471 470 } … … 474 473 // enable this WTI in remote XCU controller 475 474 // in TSAR : XCU output [4*lid] is connected to core [lid] 476 hal_remote_s w( XPTR( src_chdev_cxy ,475 hal_remote_s32( XPTR( src_chdev_cxy , 477 476 &seg_xcu_ptr[ (XCU_MSK_WTI_ENABLE << 5) | (lid<<2) ] ) , (1 << irq_id) ); 478 477 } … … 495 494 496 495 // get the source chdev IRQ type and index 497 uint32_t irq_type = hal_remote_l w( XPTR( src_chdev_cxy , &src_chdev_ptr->irq_type ) );498 uint32_t irq_id = hal_remote_l w( 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 ) ); 499 498 500 499 if( irq_type == SOCLIB_TYPE_HWI ) … … 502 501 // enable this HWI in remote XCU controller 503 502 // in TSAR : XCU output [4*lid] is connected to core [lid] 504 hal_remote_s w( XPTR( src_chdev_cxy ,503 hal_remote_s32( XPTR( src_chdev_cxy , 505 504 &seg_xcu_ptr[(XCU_MSK_HWI_DISABLE << 5) | (lid<<2) ] ) , (1 << irq_id) ); 506 505 } … … 509 508 // enable this WTI in remote XCU controller 510 509 // in TSAR : XCU output [4*lid] is connected to core [lid] 511 hal_remote_s w( XPTR( src_chdev_cxy ,510 hal_remote_s32( XPTR( src_chdev_cxy , 512 511 &seg_xcu_ptr[(XCU_MSK_WTI_DISABLE << 5) | (lid<<2) ] ) , (1 << irq_id) ); 513 512 } … … 558 557 559 558 // write to WTI mailbox[cxy][lid] 560 hal_remote_s w( XPTR( cxy , &base[(XCU_WTI_REG << 5) | lid ] ) , 0 );559 hal_remote_s32( XPTR( cxy , &base[(XCU_WTI_REG << 5) | lid ] ) , 0 ); 561 560 } 562 561
Note: See TracChangeset
for help on using the changeset viewer.