- Timestamp:
- Jul 19, 2017, 3:31:39 PM (7 years ago)
- Location:
- trunk/hal/tsar_mips32
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/tsar_mips32/core/hal_drivers.c
r216 r238 23 23 #include <chdev.h> 24 24 #include <hal_drivers.h> 25 #include < hal_internal.h>25 #include <printk.h> 26 26 27 27 #include <soclib_tty.h> 28 #include <soclib_xcu.h>29 28 #include <soclib_pic.h> 29 #include <soclib_bdv.h> 30 #include <soclib_hba.h> 30 31 31 void hal_drivers_txt_init(chdev_t *dev) 32 /////////////////////////////////////////////////////////////////////////////// 33 // TXT 34 /////////////////////////////////////////////////////////////////////////////// 35 36 ////////////////////////////////////////// 37 void hal_drivers_txt_init( chdev_t * txt ) 32 38 { 33 soclib_tty_init( dev);39 soclib_tty_init( txt ); 34 40 } 35 41 36 /* -------------------------------------------------------------------------- */ 42 /////////////////////////////////////////////////////////////////////////////// 43 // PIC 44 /////////////////////////////////////////////////////////////////////////////// 37 45 38 void hal_drivers_xcu_init(chdev_t *dev, lid_t lid) 46 ////////////////////////////////////////// 47 void hal_drivers_pic_init( chdev_t * pic ) 39 48 { 40 soclib_xcu_init(dev, lid); 49 soclib_pic_init( pic ); 50 51 /* update the PIC chdev extension */ 52 pic->ext.pic.enable_timer = &soclib_pic_enable_timer; 53 pic->ext.pic.enable_irq = &soclib_pic_enable_irq; 54 pic->ext.pic.disable_irq = &soclib_pic_disable_irq; 55 pic->ext.pic.bind_irq = &soclib_pic_bind_irq; 56 pic->ext.pic.send_ipi = &soclib_pic_send_ipi; 57 pic->ext.pic.extend_init = &soclib_pic_extend_init; 41 58 } 42 59 43 void hal_drivers_xcu_disable_irq(chdev_t *icu, uint32_t irq_index, 44 uint32_t irq_type, lid_t lid) 60 /////////////////////////////////////////////////////////////////////////////// 61 // IOC 62 /////////////////////////////////////////////////////////////////////////////// 63 64 ////////////////////////////////////////// 65 void hal_drivers_ioc_init( chdev_t * ioc, 66 uint32_t impl ) 45 67 { 46 soclib_xcu_disable_irq(icu, 1 << irq_index, irq_type, lid); 47 } 48 49 void hal_drivers_xcu_enable_irq(chdev_t *icu, uint32_t irq_index, 50 uint32_t irq_type, lid_t lid) 51 { 52 soclib_xcu_enable_irq(icu, 1 << irq_index, irq_type, lid); 53 } 54 55 /* -------------------------------------------------------------------------- */ 56 57 void hal_drivers_pic_init(chdev_t *dev) 58 { 59 soclib_pic_init(dev); 60 61 /* update the PIC chdev extension */ 62 dev->ext.pic.enable_timer = &soclib_pic_enable_timer; 63 dev->ext.pic.enable_irq = &soclib_pic_enable_irq; 64 dev->ext.pic.disable_irq = &soclib_pic_disable_irq; 65 dev->ext.pic.bind_irq = &soclib_pic_bind_irq; 66 dev->ext.pic.send_ipi = &soclib_pic_send_ipi; 67 dev->ext.pic.extend_init = &soclib_pic_extend_init; 68 } 69 70 /* -------------------------------------------------------------------------- */ 71 72 void hal_drivers_ioc_init(chdev_t *dev, uint32_t impl) 73 { 74 if (impl == IMPL_IOC_BDV) { 75 soclib_bdv_init(dev); 76 } else if (impl == IMPL_IOC_HBA) { 77 soclib_hba_init(dev); 78 } else { 68 if (impl == IMPL_IOC_BDV) 69 { 70 soclib_bdv_init( ioc ); 71 } 72 else if (impl == IMPL_IOC_HBA) 73 { 74 soclib_hba_init( ioc ); 75 } 76 else 77 { 79 78 assert( false , __FUNCTION__ , "undefined IOC device implementation" ); 80 79 } -
trunk/hal/tsar_mips32/core/hal_interrupt.c
r188 r238 27 27 #include <do_interrupt.h> 28 28 #include <hal_interrupt.h> 29 #include<mips32_uzone.h> 29 #include <mips32_uzone.h> 30 #include <soclib_pic.h> 30 31 31 32 /////////////////////////////////////// … … 36 37 thread_user_time_update( this ); 37 38 38 // access ICU deviceto call the relevant ISR39 // access local ICU to call the relevant ISR 39 40 soclib_pic_irq_handler(); 40 41 -
trunk/hal/tsar_mips32/drivers/soclib_pic.h
r205 r238 172 172 * @ chdev : pointer on PIC chdev descriptor. 173 173 *****************************************************************************************/ 174 void soclib_pic_init( chdev_t* pic );174 void soclib_pic_init( struct chdev_s * pic ); 175 175 176 176 /***************************************************************************************** … … 202 202 * @ src_chdev : local pointer on source chdev descriptor. 203 203 *****************************************************************************************/ 204 void soclib_pic_bind_irq( lid_t lid,205 chdev_t* src_chdev );204 void soclib_pic_bind_irq( lid_t lid, 205 struct chdev_s * src_chdev ); 206 206 207 207 /****************************************************************************************** … … 296 296 * This SOCLIB PIC specific is the call-back function is the interrupt handler. 297 297 *****************************************************************************************/ 298 void socli p_pic_irq_handler();298 void soclib_pic_irq_handler(); 299 299 300 300
Note: See TracChangeset
for help on using the changeset viewer.