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

Introduce dev_fbf, dev dma, dev_iob

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/devices/dev_ioc.h

    r1 r3  
    2525#define _DEV_IOC_H
    2626
     27#include <almos_config.h>
    2728#include <hal_types.h>
    2829
    2930/****  Forward declarations  ****/
    3031
    31 struct device_s;
     32struct chdev_s;
    3233
    3334/*****************************************************************************************
     
    104105
    105106/******************************************************************************************
    106  * This function completes the IOC device descriptor initialisation,
     107 * This function completes the IOC chdev descriptor initialisation,
    107108 * namely the link with the implementation specific driver.
    108  * The func, impl, channel, is_rxt, base, and size fields must be previously initialised.
     109 * The func, impl, channel, is_rx, base fields have been previously initialised.
    109110 * It calls the specific driver initialisation function, to initialise the hardware
    110111 * device and the specific data structures when required.
    111  * It creates the associated server thread.
    112  * It can be executed in another cluster than the cluster containing the device descriptor
    113  * or the hardware device itself.
     112 * It creates the associated server thread and allocates a WTI from local ICU.
     113 * It must de executed by a local thread.
    114114 ******************************************************************************************
    115  * @ xp_dev     : extended pointer on IOC device descriptor.
     115 * @ chdev     : local pointer on IOC chdev descriptor.
    116116 *****************************************************************************************/
    117 void dev_ioc_init( xptr_t  xp_dev );
     117void dev_ioc_init( struct chdev_s * chdev );
    118118
    119119/******************************************************************************************
     
    149149                       uint32_t       count );
    150150
    151 /******************************************************************************************
    152  * This function is executed by the server thread associated to the IOC device descriptor.
    153  * This thread is created and activated by the dev_ioc_init() function.
    154  * It executes an infinite loop to handle sequencially all commands registered
    155  * by the client threads in the device waiting queue, calling the driver CMD function.
    156  * 
    157  * - If the peripheral can only handle one single command, the driver block the server
    158  *   thread on the THREAD_BLOCKED_DEV_ISR condition, waiting I/O operation conmpletion.
    159  *   The server thread must be reacticated by the driver ISR function.
    160  * - If the peripheral can handle several commands in parallel (AHCI is an example), the
    161  *   driver does not block the server thread (it is only descheduled if the number of
    162  *   commands exceeeds the max number of parallel commands supported by the peripheral.
    163  *
    164  * When the waiting queue is empty, the server thread blocks on the THREAD_BLOCKED_CMD
    165  * condition and deschedule. It is re-activated by a client thread registering a command.
    166  ******************************************************************************************
    167  * @ dev     : local pointer on IOC device descriptor.
    168  *****************************************************************************************/
    169 void dev_ioc_server( struct device_s * dev );
    170 
    171151#endif  /* _DEV_IOC_H */
Note: See TracChangeset for help on using the changeset viewer.