Ignore:
Timestamp:
Jul 12, 2017, 8:12:41 PM (7 years ago)
Author:
alain
Message:

Redefine the PIC device API.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/kern/chdev.h

    r23 r188  
    120120    uint32_t             channel;     /*! channel index                                  */
    121121    bool_t               is_rx;       /*! relevant for NIC peripheral channels only      */
    122         xptr_t               base;        /*! extended pointer on channel segment paddr      */
     122        xptr_t               base;        /*! extended pointer on channel device segment     */
    123123    char                 name[16];    /*! name (required by DEVFS)                       */
    124124
     
    177177
    178178/******************************************************************************************
    179  * This structure defines the input IRQS for the PIC device, that is used by all external
    180  * peripherals (IOC, NIC, TXT, etc.) to signal completion of an I/O operation. It describes
    181  * the hardware wiring of IRQs between external peripherals and PIC, as each entry in this
    182  * structure contains the input IRQ index in PIC. Value is -1 for an unused input.
    183  * For a multi-channels peripheral, there is one chdev and one IRQ per channel.
    184  * This structure is replicated in each cluster. It is allocated as a global variable
    185  * in the kernel_init.c file, and is initialised during kernel init.
    186  *****************************************************************************************/
    187 
    188 typedef struct chdev_pic_input_s
    189 {
    190     uint32_t   txt[CONFIG_MAX_TXT_CHANNELS];
    191     uint32_t   ioc[CONFIG_MAX_IOC_CHANNELS];
    192     uint32_t   nic_rx[CONFIG_MAX_NIC_CHANNELS];
    193     uint32_t   nic_tx[CONFIG_MAX_NIC_CHANNELS];
    194 }
    195 chdev_pic_input_t;
    196 
    197 /******************************************************************************************
    198  * This structure defines the input IRQS for the ICU device, that is used by all internal
    199  * peripherals IRQS (DMA, MMC, etc.) to signal completion of an I/O operation. It describes
    200  * the hardware wiring of IRQs between internal peripherals and ICU, as each entry in this
    201  * structure contains the input IRQ index in ICU. Value is -1 for an unused input.
    202  * For a multi-channels peripheral, there is one chdev and one IRQ per channel.
    203  * This structure is replicated in each cluster. It is allocated as a global variable
    204  * in the kernel_init.c file, and is initialised during kernel init.
    205  *****************************************************************************************/
    206 
    207 typedef struct chdev_icu_input_s
    208 {
    209     uint32_t   dma[CONFIG_MAX_DMA_CHANNELS];
    210     uint32_t   mmc;                             // MMC is single channel
    211 }
    212 chdev_icu_input_t;
    213 
    214 /******************************************************************************************
    215179 * This function display relevant values for a chdev descriptor.
    216180 ******************************************************************************************
Note: See TracChangeset for help on using the changeset viewer.