Changeset 432 for trunk/hal/tsar_mips32/drivers/soclib_pic.c
- Timestamp:
- Feb 14, 2018, 3:39:35 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/tsar_mips32/drivers/soclib_pic.c
r424 r432 96 96 97 97 // read PRIO register 98 uint32_t prio = base[(XCU_PRIO << 5) | lid]; 98 // in TSAR : XCU output [4*lid] is connected to core [lid] 99 uint32_t prio = base[ (XCU_PRIO << 5) | (lid<<2) ]; 99 100 100 101 *wti_status = (prio & 0x4) ? (((prio >> 24) & 0x1F) + 1) : 0; … … 129 130 &pti_status ); 130 131 131 irq_dmsg("\n[DBG] %s : core[%x,%d] enter / WTI = %x / HWI = %x / WTI = %x\n",132 irq_dmsg("\n[DBG] %s : core[%x,%d] enter / WTI = %x / HWI = %x / PTI = %x\n", 132 133 __FUNCTION__ , local_cxy , core->lid , wti_status , hwi_status , pti_status ); 133 134 … … 447 448 { 448 449 // enable this HWI in remote XCU controller 450 // in TSAR : XCU output [4*lid] is connected to core [lid] 449 451 hal_remote_sw( XPTR( src_chdev_cxy , 450 &seg_xcu_ptr[ (XCU_MSK_HWI_ENABLE << 5) | lid] ) , (1 << irq_id) );452 &seg_xcu_ptr[ (XCU_MSK_HWI_ENABLE << 5) | (lid<<4) ] ) , (1 << irq_id) ); 451 453 } 452 454 else if( irq_type == SOCLIB_TYPE_WTI ) 453 455 { 454 456 // enable this WTI in remote XCU controller 457 // in TSAR : XCU output [4*lid] is connected to core [lid] 455 458 hal_remote_sw( XPTR( src_chdev_cxy , 456 &seg_xcu_ptr[ (XCU_MSK_WTI_ENABLE << 5) | lid] ) , (1 << irq_id) );459 &seg_xcu_ptr[ (XCU_MSK_WTI_ENABLE << 5) | (lid<<4) ] ) , (1 << irq_id) ); 457 460 } 458 461 else … … 479 482 if( irq_type == SOCLIB_TYPE_HWI ) 480 483 { 481 // enable this HWI in remote XCU controller 484 // enable this HWI in remote XCU controller 485 // in TSAR : XCU output [4*lid] is connected to core [lid] 482 486 hal_remote_sw( XPTR( src_chdev_cxy , 483 &seg_xcu_ptr[(XCU_MSK_HWI_DISABLE << 5) | lid] ) , (1 << irq_id) );487 &seg_xcu_ptr[(XCU_MSK_HWI_DISABLE << 5) | (lid<<2) ] ) , (1 << irq_id) ); 484 488 } 485 489 else if( irq_type == SOCLIB_TYPE_WTI ) 486 490 { 487 491 // enable this WTI in remote XCU controller 492 // in TSAR : XCU output [4*lid] is connected to core [lid] 488 493 hal_remote_sw( XPTR( src_chdev_cxy , 489 &seg_xcu_ptr[(XCU_MSK_WTI_DISABLE << 5) | lid] ) , (1 << irq_id) );494 &seg_xcu_ptr[(XCU_MSK_WTI_DISABLE << 5) | (lid<<4) ] ) , (1 << irq_id) ); 490 495 } 491 496 else … … 509 514 510 515 // enable PTI in local XCU controller 511 base[(XCU_MSK_PTI_ENABLE << 5) | lid] = 1 << lid; 516 // In TSAR : XCU output [4*lid] is connected to core [lid] 517 base[ (XCU_MSK_PTI_ENABLE << 5) | (lid<<2) ] = 1 << lid; 512 518 } 513 519 … … 522 528 523 529 // enable WTI in local XCU controller 524 base[(XCU_MSK_WTI_ENABLE << 5) | lid] = 1 << lid; 530 // In TSAR : XCU output [4*lid] is connected to core [lid] 531 base[ (XCU_MSK_WTI_ENABLE << 5) | (lid<<2) ] = 1 << lid; 525 532 } 526 533 … … 533 540 534 541 // write to WTI mailbox[cxy][lid] 535 hal_remote_sw( XPTR( cxy , &base[(XCU_WTI_REG << 5) | lid ] ) , 0 );542 hal_remote_sw( XPTR( cxy , &base[(XCU_WTI_REG << 5) | lid ] ) , 0 ); 536 543 } 537 544 … … 546 553 547 554 // acknowlege IPI 548 uint32_t ack = base[ (XCU_WTI_REG << 5) | lid];555 uint32_t ack = base[ (XCU_WTI_REG << 5) | lid ]; 549 556 550 557 // we must make a fake use for ack value to avoid a warning
Note: See TracChangeset
for help on using the changeset viewer.