Ignore:
Timestamp:
Apr 26, 2017, 2:10:21 PM (8 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_pic.c

    r1 r4  
    2323
    2424#include <hal_types.h>
    25 #include <device.h>
     25#include <chdev.h>
    2626#include <soclib_pic.h>
    2727#include <soclib_xcu.h>
     
    3131
    3232
    33 //////////////////////////////////////
    34 void soclib_pic_init( xptr_t  dev_xp )
     33////////////////////////////////////////
     34void soclib_pic_init( chdev_t  * chdev )
    3535{
    36     // get PIC device descriptor cluster and local pointer
    37     cxy_t      dev_cxy = GET_CXY( dev_xp );
    38     device_t * dev_ptr = (device_t *)GET_PTR( dev_xp );
    39  
    40     // get extended pointer on PIC segment base from PIC device descriptor
    41     xptr_t seg_xp = (xptr_t)hal_remote_lwd( XPTR( dev_cxy , &dev_ptr->base ) );
    42  
    4336    // get PIC controller segment cluster and local pointer
    44     cxy_t      seg_cxy = (cxy_t)GET_CXY( seg_xp );
    45     uint32_t * seg_ptr = (uint32_t *)GET_PTR( seg_xp );
     37    cxy_t      seg_cxy = (cxy_t)GET_CXY( chdev->base );
     38    uint32_t * seg_ptr = (uint32_t *)GET_PTR( chdev->base );
    4639    uint32_t   i;
    4740
     
    5952{
    6053    // get PIC device descriptor cluster and local pointer
    61     cxy_t      dev_cxy = GET_CXY( dev_xp );
    62     device_t * dev_ptr = (device_t *)GET_PTR( dev_xp );
     54    cxy_t     dev_cxy = GET_CXY( dev_xp );
     55    chdev_t * dev_ptr = (chdev_t *)GET_PTR( dev_xp );
    6356 
    6457    // get extended pointer on PIC segment base from PIC device descriptor
     
    8578{
    8679    // get PIC device descriptor cluster and local pointer
    87     cxy_t      dev_cxy = GET_CXY( dev_xp );
    88     device_t * dev_ptr = (device_t *)GET_PTR( dev_xp );
     80    cxy_t     dev_cxy = GET_CXY( dev_xp );
     81    chdev_t * dev_ptr = (chdev_t *)GET_PTR( dev_xp );
    8982 
    9083    // get extended pointer on PIC segment base from PIC device descriptor
     
    10598{
    10699    // get PIC device descriptor cluster and local pointer
    107     cxy_t      dev_cxy = GET_CXY( dev_xp );
    108     device_t * dev_ptr = (device_t *)GET_PTR( dev_xp );
     100    cxy_t     dev_cxy = GET_CXY( dev_xp );
     101    chdev_t * dev_ptr = (chdev_t *)GET_PTR( dev_xp );
    109102 
    110103    // get extended pointer on PIC segment base from PIC device descriptor
Note: See TracChangeset for help on using the changeset viewer.