- Timestamp:
- Jul 20, 2017, 3:06:35 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/generic/hal_drivers.h
r257 r259 16 16 * 17 17 * You should have received a copy of the GNU General Public License 18 * along with ALMOS-MKH .; if not, write to the Free Software Foundation,18 * along with ALMOS-MKH; if not, write to the Free Software Foundation, 19 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 20 20 */ … … 33 33 void hal_drivers_mmc_init(chdev_t *mmc, uint32_t impl); 34 34 35 void hal_drivers_nic_init(chdev_t *nic, uint32_t impl); 36 35 37 #endif /* HAL_DRIVERS_H_ */ 36 38 -
trunk/hal/tsar_mips32/core/hal_drivers.c
r257 r259 112 112 } 113 113 114 /////////////////////////////////////////////////////////////////////////////// 115 // NIC 116 /////////////////////////////////////////////////////////////////////////////// 117 118 ////////////////////////////////////////// 119 void hal_drivers_nic_init( chdev_t * nic, 120 uint32_t impl ) 121 { 122 if( impl == IMPL_NIC_SOC ) 123 { 124 soclib_nic_init( nic ); 125 } 126 else 127 { 128 assert( false , __FUNCTION__ , "undefined NIC device implementation" ); 129 } 130 } 131 -
trunk/hal/tsar_mips32/drivers/soclib_nic.c
r75 r259 39 39 uint32_t i; 40 40 kmem_req_t req; 41 42 // set driver specific fields in chdev descriptor 43 chdev->cmd = &soclib_nic_cmd; 44 chdev->isr = &soclib_nic_isr; 41 45 42 46 // get hardware device cluster and local pointer -
trunk/hal/x86_64/core/hal_drivers.c
r257 r259 71 71 } 72 72 73 /* -------------------------------------------------------------------------- */ 74 75 void hal_drivers_nic_init(chdev_t *nic, uint32_t impl) 76 { 77 x86_panic("NIC driver not implemented"); 78 } -
trunk/kernel/devices/dev_nic.c
r238 r259 27 27 #include <chdev.h> 28 28 #include <thread.h> 29 #include < soclib_nic.h>29 #include <hal_drivers.h> 30 30 #include <dev_nic.h> 31 31 … … 54 54 else snprintf( nic->name , 16 , "nic_tx_%d" , channel ); 55 55 56 // set driver specific fields in chdev descriptor and call driver init function 57 if( impl == IMPL_NIC_SOC ) 58 { 59 nic->cmd = &soclib_nic_cmd; 60 nic->isr = &soclib_nic_isr; 61 soclib_nic_init( nic ); 62 } 63 else 64 { 65 assert( false , __FUNCTION__ , "undefined NIC device implementation" ); 66 } 56 // call driver init function 57 hal_drivers_nic_init( nic , impl ); 67 58 68 59 // select a core to execute the NIC server thread
Note: See TracChangeset
for help on using the changeset viewer.