Changeset 4 for trunk/kernel/drivers/soclib/soclib_pic.c
- Timestamp:
- Apr 26, 2017, 2:10:21 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/drivers/soclib/soclib_pic.c
r1 r4 23 23 24 24 #include <hal_types.h> 25 #include < device.h>25 #include <chdev.h> 26 26 #include <soclib_pic.h> 27 27 #include <soclib_xcu.h> … … 31 31 32 32 33 ////////////////////////////////////// 34 void soclib_pic_init( xptr_t dev_xp)33 //////////////////////////////////////// 34 void soclib_pic_init( chdev_t * chdev ) 35 35 { 36 // get PIC device descriptor cluster and local pointer37 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 descriptor41 xptr_t seg_xp = (xptr_t)hal_remote_lwd( XPTR( dev_cxy , &dev_ptr->base ) );42 43 36 // 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 ); 46 39 uint32_t i; 47 40 … … 59 52 { 60 53 // get PIC device descriptor cluster and local pointer 61 cxy_t 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 ); 63 56 64 57 // get extended pointer on PIC segment base from PIC device descriptor … … 85 78 { 86 79 // get PIC device descriptor cluster and local pointer 87 cxy_t 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 ); 89 82 90 83 // get extended pointer on PIC segment base from PIC device descriptor … … 105 98 { 106 99 // get PIC device descriptor cluster and local pointer 107 cxy_t 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 ); 109 102 110 103 // get extended pointer on PIC segment base from PIC device descriptor
Note: See TracChangeset
for help on using the changeset viewer.