Changeset 295 for soft/giet_vm/giet_drivers/nic_driver.c
- Timestamp:
- Mar 26, 2014, 6:44:44 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_drivers/nic_driver.c
r258 r295 56 56 #define in_unckdata __attribute__((section (".unckdata"))) 57 57 58 /////////////////////////////////////////////////////////////////////////////// 59 // This low_level function returns the value contained in register (index). 60 /////////////////////////////////////////////////////////////////////////////// 61 unsigned int _nic_get_register( unsigned int channel, 62 unsigned int index ) 63 { 64 unsigned int* vaddr = (unsigned int*)&seg_nic_base + 65 NIC_CHANNEL_SPAN*channel + index; 66 return _io_extended_read( vaddr ); 67 } 68 69 /////////////////////////////////////////////////////////////////////////////// 70 // This low-level function set a new value in register (index). 71 /////////////////////////////////////////////////////////////////////////////// 72 void _nic_set_register( unsigned int channel, 73 unsigned int index, 74 unsigned int value ) 75 { 76 unsigned int* vaddr = (unsigned int*)&seg_nic_base + 77 NIC_CHANNEL_SPAN*channel + index; 78 _io_extended_write( vaddr, value ); 79 } 80 58 81 ////////////////////////////////////////////////////////////////////////////////// 59 // _nic_sync_write()60 82 // Transfer data from an memory buffer to the NIC device using a memcpy. 61 83 // - buffer : base address of the memory buffer. … … 65 87 unsigned int length ) 66 88 { 67 _p uts("[GIET ERROR] _nic_sync_write function not implemented\n");89 _printf("[GIET ERROR] _nic_sync_write function not implemented\n"); 68 90 _exit(); 69 91 … … 73 95 } 74 96 ////////////////////////////////////////////////////////////////////////////////// 75 // _nic_sync_read()76 97 // Transfer data from the NIC device to a memory buffer using a memcpy. 77 98 // - buffer : base address of the memory buffer. … … 81 102 unsigned int length ) 82 103 { 83 _p uts("[GIET ERROR] _nic_sync_read function not implemented\n");104 _printf("[GIET ERROR] _nic_sync_read function not implemented\n"); 84 105 _exit(); 85 106 … … 89 110 } 90 111 ////////////////////////////////////////////////////////////////////////////////// 91 // _nic_cma_start()92 112 // Returns 0 if success, > 0 if error. 93 113 ////////////////////////////////////////////////////////////////////////////////// 94 114 unsigned int _nic_cma_start( ) 95 115 { 96 _p uts("[GIET ERROR] _nic_cma_start functionnot implemented\n");116 _printf("[GIET ERROR] _nic_cma_start() not implemented\n"); 97 117 _exit(); 98 118 … … 101 121 } 102 122 ////////////////////////////////////////////////////////////////////////////////// 103 // _nic_cma_stop()104 123 // Returns 0 if success, > 0 if error. 105 124 ////////////////////////////////////////////////////////////////////////////////// 106 125 unsigned int _nic_cma_stop() 107 126 { 108 _p uts("[GIET ERROR] _nic_cma_stop functionnot implemented\n");127 _printf("[GIET ERROR] _nic_cma_stop() not implemented\n"); 109 128 _exit(); 110 129 … … 113 132 } 114 133 134 ////////////////////////////////////////////////////////////////////////////////// 135 // This ISR handles IRQx from a NIC RX channeL 136 ////////////////////////////////////////////////////////////////////////////////// 137 void _nic_rx_isr( unsigned int irq_type, 138 unsigned int irq_id, 139 unsigned int channel ) 140 { 141 _printf("[GIET ERROR] _nic_rx_isr() not implemented\n"); 142 _exit(); 143 } 144 145 ////////////////////////////////////////////////////////////////////////////////// 146 // This ISR handles IRQx from a NIC RX channeL 147 ////////////////////////////////////////////////////////////////////////////////// 148 void _nic_tx_isr( unsigned int irq_type, 149 unsigned int irq_id, 150 unsigned int channel ) 151 { 152 _printf("[GIET ERROR] _nic_tx_isr() not implemented\n"); 153 _exit(); 154 } 115 155 116 156 // Local Variables:
Note: See TracChangeset
for help on using the changeset viewer.