| 1 |
|
| 2 |
|
| 3 |
#ifndef _NE2K_H__ |
| 4 |
#define _NE2K_H__ |
| 5 |
|
| 6 |
#include <stdint.h> |
| 7 |
|
| 8 |
void ne2k_append_data(unsigned char *d, int len, unsigned int base); |
| 9 |
int ne2k_init(unsigned int eth_nic_base); |
| 10 |
void ne2k_transmit(unsigned int eth_nic_base); |
| 11 |
|
| 12 |
#if CONFIG(CONSOLE_NE2K) && (ENV_ROMSTAGE_OR_BEFORE || ENV_RAMSTAGE) |
| 13 |
static inline void __ne2k_init(void) |
| 14 |
{ |
| 15 |
ne2k_init(CONFIG_CONSOLE_NE2K_IO_PORT); |
| 16 |
} |
| 17 |
static inline void __ne2k_tx_byte(u8 data) |
| 18 |
{ |
| 19 |
ne2k_append_data(&data, 1, CONFIG_CONSOLE_NE2K_IO_PORT); |
| 20 |
} |
| 21 |
static inline void __ne2k_tx_flush(void) |
| 22 |
{ |
| 23 |
ne2k_transmit(CONFIG_CONSOLE_NE2K_IO_PORT); |
| 24 |
} |
| 25 |
#else |
| 26 |
static inline void __ne2k_init(void) {} |
| 27 |
static inline void __ne2k_tx_byte(u8 data) {} |
| 28 |
static inline void __ne2k_tx_flush(void) {} |
| 29 |
#endif |
| 30 |
|
| 31 |
#endif |