Ignore:
Timestamp:
Jun 27, 2017, 2:07:55 PM (5 years ago)
Author:
max@…
Message:

empty out the x86 drivers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/x86_64/drivers/soclib_pic.c

    r75 r76  
    3030#include <vfs.h>
    3131
    32 
    33 ////////////////////////////////////////
    3432void soclib_pic_init( chdev_t  * chdev )
    3533{
    36     // get PIC controller segment cluster and local pointer
    37     cxy_t      seg_cxy = (cxy_t)GET_CXY( chdev->base );
    38     uint32_t * seg_ptr = (uint32_t *)GET_PTR( chdev->base );
    39     uint32_t   i;
    4034
    41     // reset the MASK registers for all input IRQs
    42     for( i = 0 ; i < CONFIG_MAX_IRQS_PER_PIC ; i++ )
    43     {
    44         hal_remote_sw( XPTR( seg_cxy , seg_ptr + i*IOPIC_SPAN + IOPIC_MASK ) , 0 );
    45     }
    4635}
    4736
    48 ////////////////////////////////////////////
    4937void soclib_pic_bind_irq( xptr_t     dev_xp,
    5038                          uint32_t   irq_id,
    5139                          xptr_t     xp_wti )
    5240{
    53     // get PIC device descriptor cluster and local pointer
    54     cxy_t     dev_cxy = GET_CXY( dev_xp );
    55     chdev_t * dev_ptr = (chdev_t *)GET_PTR( dev_xp );
    56  
    57     // get extended pointer on PIC segment base from PIC device descriptor
    58     xptr_t seg_xp = (xptr_t)hal_remote_lwd( XPTR( dev_cxy , &dev_ptr->base ) );
    59  
    60     // get PIC controller segment cluster and local pointer
    61     cxy_t      seg_cxy = (cxy_t)GET_CXY( seg_xp);
    62     uint32_t * seg_ptr = (uint32_t *)GET_PTR( seg_xp );
    6341
    64     uint32_t lsb = (uint32_t)xp_wti;
    65     uint32_t msb  = (uint32_t)(xp_wti>>32);
    66 
    67         // set the IOPIC_ADDRESS and IOPIC_EXTEND registers
    68     hal_remote_sw( XPTR( seg_cxy , seg_ptr+irq_id*IOPIC_SPAN+IOPIC_ADDRESS ) , lsb );
    69     hal_remote_sw( XPTR( seg_cxy , seg_ptr+irq_id*IOPIC_SPAN+IOPIC_EXTEND  ) , msb );
    70 
    71     // set IOPIC_MASK register
    72     hal_remote_sw( XPTR( seg_cxy , seg_ptr+irq_id*IOPIC_SPAN+IOPIC_MASK    ) , 1   );
    7342}
    7443
    75 //////////////////////////////////////////////
    7644void soclib_pic_unbind_irq( xptr_t     dev_xp,
    7745                            uint32_t   irq_id )
    7846{
    79     // get PIC device descriptor cluster and local pointer
    80     cxy_t     dev_cxy = GET_CXY( dev_xp );
    81     chdev_t * dev_ptr = (chdev_t *)GET_PTR( dev_xp );
    82  
    83     // get extended pointer on PIC segment base from PIC device descriptor
    84     xptr_t seg_xp = (xptr_t)hal_remote_lwd( XPTR( dev_cxy , &dev_ptr->base ) );
    85  
    86     // get PIC controller segment cluster and local pointer
    87     cxy_t      seg_cxy = (cxy_t)GET_CXY( seg_xp);
    88     uint32_t * seg_ptr = (uint32_t *)GET_PTR( seg_xp );
    8947
    90     // set IOPIC_MASK register
    91     hal_remote_sw( XPTR( seg_cxy , seg_ptr+irq_id*IOPIC_SPAN+IOPIC_MASK    ) , 0   );
    9248}
    9349
    94 //////////////////////////////////////////////
    9550void soclib_pic_get_status( xptr_t     dev_xp,
    9651                            uint32_t   irq_id,
    9752                            uint32_t * status)
    9853{
    99     // get PIC device descriptor cluster and local pointer
    100     cxy_t     dev_cxy = GET_CXY( dev_xp );
    101     chdev_t * dev_ptr = (chdev_t *)GET_PTR( dev_xp );
    102  
    103     // get extended pointer on PIC segment base from PIC device descriptor
    104     xptr_t seg_xp = (xptr_t)hal_remote_lwd( XPTR( dev_cxy , &dev_ptr->base ) );
    105  
    106     // get PIC controller segment cluster and local pointer
    107     cxy_t      seg_cxy = (cxy_t)GET_CXY( seg_xp);
    108     uint32_t * seg_ptr = (uint32_t *)GET_PTR( seg_xp );
    10954
    110     // return status
    111         *status = hal_remote_lw( XPTR( seg_cxy , seg_ptr+irq_id*IOPIC_SPAN+IOPIC_STATUS ) );
    11255}
    11356
Note: See TracChangeset for help on using the changeset viewer.