Ignore:
Timestamp:
Apr 26, 2017, 2:10:21 PM (7 years ago)
Author:
alain
Message:

Introduce the chdev_t structure in place of device_t.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/drivers/soclib/soclib_xcu.h

    r1 r4  
    2626
    2727#include <hal_types.h>
    28 #include <device.h>
     28#include <chdev.h>
    2929
    3030/******************************************************************************************
     
    5252
    5353/******************************************************************************************
    54  * This function initialises the local XCU device masks registers for a given
     54 * This function initialises the local XCU masks registers for a given
    5555 * core identified by its local index.
    5656 ******************************************************************************************
    57  * @ icu       : pointer on the local ICU device descriptor
    58  * @ lid       : core local index
     57 * @ icu       : pointer on the local ICU chdev descriptor.
     58 * @ lid       : core local index.
    5959 *****************************************************************************************/
    60 void soclib_xcu_init( device_t * icu,
    61                       lid_t      lid );
     60void soclib_xcu_init( chdev_t * icu,
     61                      lid_t     lid );
    6262
    6363/******************************************************************************************
    64  * This function set bits in a remote XCU mask register for a given IRQ type,
    65  * and a given core. As it uses remote accesses, it can be callet in any cluster.
     64 * This function set bits in the local XCU mask register for a given IRQ type,
     65 * and a given core. It must be called by a local thread.
    6666 * Only the bits with "1" value in mask argument are set, other bits are not modified.
    6767 * All input IRQs of requested types corresponding to "1" bits in mask are enabled.
    6868 ******************************************************************************************
    69  * @ icu_xp     : extended pointer on the remote XCU device descriptor.
    70  * @ mask       : mask value
    71  * @ type       : HWI_TYPE / PTI_TYPE / WTI_TYPE
    72  * @ lid        : local core index == output IRQ index
     69 * @ icu     : pointer on local XCU chdev descriptor
     70 * @ mask    : mask value
     71 * @ type    : HWI_TYPE / PTI_TYPE / WTI_TYPE
     72 * @ lid     : local core index == output IRQ index
    7373 *****************************************************************************************/
    74 void  soclib_xcu_enable_irq( xptr_t     icu_xp,
     74void  soclib_xcu_enable_irq( chdev_t  * icu,
    7575                             uint32_t   mask,
    7676                             uint32_t   type,
     
    7878
    7979/******************************************************************************************
    80  * This function clear bits in a remote XCU mask register for a given IRQ type,
    81  * and a given core. As it uses remote accesses, it can be callet in any cluster.
     80 * This function clear bits in the local XCU mask register for a given IRQ type,
     81 * and a given core. It must be called by a local thread.
    8282 * Only the bits with "1" value in mask argument are cleared, other bits are not modified.
    8383 * All input IRQs of requested types corresponding to "1" bits in mask are disabled.
    8484 ******************************************************************************************
    85  * @ icu_xp     : extended pointer on the remote XCU device descriptor.
    86  * @ mask       : mask value
    87  * @ type       : HWI_TYPE / PTI_TYPE / WTI_TYPE
    88  * @ lid        : local core index == output IRQ index
     85 * @ icu     : pointer on local XCU chdev descriptor
     86 * @ mask    : mask value
     87 * @ type    : HWI_TYPE / PTI_TYPE / WTI_TYPE
     88 * @ lid     : local core index == output IRQ index
    8989 *****************************************************************************************/
    90 void  soclib_xcu_disable_irq( xptr_t     icu_xp,
     90void  soclib_xcu_disable_irq( chdev_t  * icu,
    9191                              uint32_t   mask,
    9292                              uint32_t   type,
     
    9696 * This function set the period value for a local XCU timer.
    9797 ******************************************************************************************
    98  * @ icu        : pointer on the local ICU device descriptor
     98 * @ icu        : pointer on the local XCU chdev descriptor
    9999 * @ index      : timer index = PTI index
    100100 * @ period     : Value to be written
    101101 *****************************************************************************************/
    102 void  soclib_xcu_set_period( device_t * icu,
     102void  soclib_xcu_set_period( chdev_t * icu,
    103103                             uint32_t   index,
    104104                             uint32_t   period );
     
    107107 * This function acknowledge a PTI IRQ for a local XCU timer.
    108108 ******************************************************************************************
    109  * @ icu        : pointer on the local ICU device descriptor
     109 * @ icu        : pointer on the local XCU chdev descriptor
    110110 * @ index      : timer index = PTI index
    111111 * @ the returned value in not significant, but acknowledge requires a read.
    112112 *****************************************************************************************/
    113 uint32_t soclib_xcu_ack_timer( device_t * icu,
     113uint32_t soclib_xcu_ack_timer( chdev_t * icu,
    114114                               uint32_t   index );
    115115
     
    118118 * If no active interrupt => status == 0 / else => status = index + 1
    119119 ******************************************************************************************
    120  * @ icu        : pointer on the local ICU device descriptor.
     120 * @ icu        : pointer on the local XCU chdev descriptor
    121121 * @ lid        : core local index.
    122122 * @ hwi_status : buffer for returned HWI status
     
    124124 * @ pti_status : buffer for returned PTI status
    125125 *****************************************************************************************/
    126 void  soclib_xcu_get_status( device_t * icu,
     126void  soclib_xcu_get_status( chdev_t * icu,
    127127                             lid_t      lid,
    128128                             uint32_t * hwi_status,
     
    144144 * This function does not access the SOCLIB_XCU hardware device.
    145145 ******************************************************************************************
    146  * @ icu     : pointer on the local ICU device descriptor.
     146 * @ icu     : pointer on the local XCU chdev descriptor
    147147 * @ index   : WTI mailbox index.
    148148 *****************************************************************************************/
    149 uint32_t * soclib_xcu_wti_ptr( device_t * icu,
     149uint32_t * soclib_xcu_wti_ptr( chdev_t * icu,
    150150                               uint32_t   index );
    151151
Note: See TracChangeset for help on using the changeset viewer.