Changeset 261
- Timestamp:
- Jul 20, 2017, 3:13:58 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/generic/hal_drivers.h
r259 r261 35 35 void hal_drivers_nic_init(chdev_t *nic, uint32_t impl); 36 36 37 void hal_drivers_dma_init(chdev_t *dma, uint32_t impl); 38 37 39 #endif /* HAL_DRIVERS_H_ */ 38 40 -
trunk/hal/tsar_mips32/core/hal_drivers.c
r259 r261 130 130 } 131 131 132 /////////////////////////////////////////////////////////////////////////////// 133 // DMA 134 /////////////////////////////////////////////////////////////////////////////// 135 136 ////////////////////////////////////////// 137 void hal_drivers_dma_init( chdev_t * dma, 138 uint32_t impl ) 139 { 140 if( impl == IMPL_DMA_SCL ) 141 { 142 soclib_dma_init( dma ); 143 } 144 else 145 { 146 assert( false , __FUNCTION__ , "undefined DMA implementation" ); 147 } 148 } 149 -
trunk/hal/tsar_mips32/drivers/soclib_dma.c
r75 r261 34 34 cxy_t dma_cxy = GET_CXY( chdev->base ); 35 35 uint32_t * dma_ptr = (uint32_t *)GET_PTR( chdev->base ); 36 37 // set driver specific fields in chdev descriptor 38 chdev->cmd = &soclib_dma_cmd; 39 chdev->isr = &soclib_dma_isr; 36 40 37 41 // enable interrupts -
trunk/hal/x86_64/core/hal_drivers.c
r259 r261 77 77 x86_panic("NIC driver not implemented"); 78 78 } 79 80 /* -------------------------------------------------------------------------- */ 81 82 void hal_drivers_dma_init(chdev_t *dma, uint32_t impl) 83 { 84 x86_panic("DMA driver not implemented"); 85 } 86 -
trunk/kernel/devices/dev_dma.c
r238 r261 32 32 #include <soclib_dma.h> 33 33 #include <dev_dma.h> 34 #include < soclib_dma.h>34 #include <hal_drivers.h> 35 35 36 36 ///////////////////////////////////////////////////////////////////////////////////////// … … 50 50 snprintf( dma->name , 16 , "dma_%d_%x" , channel , local_cxy ); 51 51 52 // set field "cmd", "isr", and call the relevant driver init function 53 if( impl == IMPL_DMA_SCL ) 54 { 55 dma->cmd = &soclib_dma_cmd; 56 dma->isr = &soclib_dma_isr; 57 soclib_dma_init( dma ); 58 } 59 else 60 { 61 assert( false , __FUNCTION__ , "undefined DMA implementation" ); 62 } 52 // call driver init function 53 hal_drivers_dma_init( dma, impl ); 63 54 64 55 // bind IRQ to the core defined by the DMA channel
Note: See TracChangeset
for help on using the changeset viewer.