147 #if !defined(_CS8900_H_) 152 #include <rtems/rtems_bsdnet.h> 154 #include <sys/param.h> 155 #include <sys/mbuf.h> 156 #include <sys/socket.h> 157 #include <sys/sockio.h> 161 #include <netinet/in.h> 162 #include <netinet/if_ether.h> 176 #define CS8900_ESIA_ID (0x630e) 182 #define CS8900_IO_RX_TX_DATA_PORT0 (0x0000) 183 #define CS8900_IO_TX_TX_DATA_PORT1 (0x0002) 184 #define CS8900_IO_TxCMD (0x0004) 185 #define CS8900_IO_TxLength (0x0006) 186 #define CS8900_IO_ISQ (0x0008) 187 #define CS8900_IO_PACKET_PAGE_PTR (0x000a) 188 #define CS8900_IO_PP_DATA_PORT0 (0x000c) 189 #define CS8900_IO_PP_DATA_PORT1 (0x000e) 199 #define CS8900_PP_PROD_ID (0x0000) 200 #define CS8900_PP_IO_BASE (0x0020) 201 #define CS8900_PP_INT (0x0022) 202 #define CS8900_PP_DMA_CHANNEL (0x0024) 203 #define CS8900_PP_DMA_SOF (0x0026) 204 #define CS8900_PP_DMA_FRM_CNT (0x0028) 205 #define CS8900_PP_DMA_RX_BCNT (0x002a) 206 #define CS8900_PP_MEM_BASE (0x002c) 207 #define CS8900_PP_BPROM_BASE (0x0030) 208 #define CS8900_PP_BPROM_AMASK (0x0034) 209 #define CS8900_PP_EEPROM_CMD (0x0040) 210 #define CS8900_PP_EEPROM_DATA (0x0042) 211 #define CS8900_PP_RX_FRAME_BCNT (0x0050) 217 #define CS8900_PP_RxCFG (0x0102) 218 #define CS8900_PP_RxCTL (0x0104) 219 #define CS8900_PP_TxCFG (0x0106) 220 #define CS8900_PP_TxCMD_READ (0x0108) 221 #define CS8900_PP_BufCFG (0x010a) 222 #define CS8900_PP_LineCFG (0x0112) 223 #define CS8900_PP_SelfCTL (0x0114) 224 #define CS8900_PP_BusCTL (0x0116) 225 #define CS8900_PP_TestCTL (0x0118) 231 #define CS8900_PP_ISQ (0x0120) 232 #define CS8900_PP_RxEvent (0x0124) 233 #define CS8900_PP_TxEvent (0x0128) 234 #define CS8900_PP_BufEvent (0x012c) 235 #define CS8900_PP_RxMISS (0x0130) 236 #define CS8900_PP_TxCol (0x0132) 237 #define CS8900_PP_LineST (0x0134) 238 #define CS8900_PP_SelfST (0x0136) 239 #define CS8900_PP_BusST (0x0138) 240 #define CS8900_PP_TDR (0x013c) 246 #define CS8900_PP_TxCMD (0x0144) 247 #define CS8900_PP_TxLength (0x0146) 253 #define CS8900_PP_LAF (0x0150) 254 #define CS8900_PP_IA (0x0158) 260 #define CS8900_PP_RxStatus (0x0400) 261 #define CS8900_PP_RxLength (0x0402) 262 #define CS8900_PP_RxFrameLoc (0x0404) 263 #define CS8900_PP_TxFrameLoc (0x0a00) 273 #define CS8900_PPP_AUTO_INCREMENT (0x8000) 279 #define CS8900_RX_CONFIG_SKIP_1 (1 << 6) 280 #define CS8900_RX_CONFIG_STREAM_ENABLE (1 << 7) 281 #define CS8900_RX_CONFIG_RX_OK (1 << 8) 282 #define CS8900_RX_CONFIG_RX_DMA (1 << 9) 283 #define CS8900_RX_CONFIG_RX_AUTO_DMA (1 << 10) 284 #define CS8900_RX_CONFIG_BUFFER_CRC (1 << 11) 285 #define CS8900_RX_CONFIG_CRC_ERROR (1 << 12) 286 #define CS8900_RX_CONFIG_RUNT (1 << 13) 287 #define CS8900_RX_CONFIG_EXTRA_DATA (1 << 14) 293 #define CS8900_RX_EVENT_HASH_IA_MATCH (1 << 6) 294 #define CS8900_RX_EVENT_DRIBBLE_BITS (1 << 7) 295 #define CS8900_RX_EVENT_RX_OK (1 << 8) 296 #define CS8900_RX_EVENT_HASHED (1 << 9) 297 #define CS8900_RX_EVENT_IA (1 << 10) 298 #define CS8900_RX_EVENT_BROADCAST (1 << 11) 299 #define CS8900_RX_EVENT_CRC_ERROR (1 << 12) 300 #define CS8900_RX_EVENT_RUNT (1 << 13) 301 #define CS8900_RX_EVENT_EXTRA_DATA (1 << 14) 307 #define CS8900_RX_CTRL_HASH_IA_MATCH (1 << 6) 308 #define CS8900_RX_CTRL_PROMISCUOUS (1 << 7) 309 #define CS8900_RX_CTRL_RX_OK (1 << 8) 310 #define CS8900_RX_CTRL_MULTICAST (1 << 9) 311 #define CS8900_RX_CTRL_INDIVIDUAL (1 << 10) 312 #define CS8900_RX_CTRL_BROADCAST (1 << 11) 313 #define CS8900_RX_CTRL_CRC_ERROR (1 << 12) 314 #define CS8900_RX_CTRL_RUNT (1 << 13) 315 #define CS8900_RX_CTRL_EXTRA_DATA (1 << 14) 321 #define CS8900_TX_CONFIG_LOSS_OF_CARRIER (1 << 6) 322 #define CS8900_TX_CONFIG_SQ_ERROR (1 << 7) 323 #define CS8900_TX_CONFIG_TX_OK (1 << 8) 324 #define CS8900_TX_CONFIG_OUT_OF_WINDOW (1 << 9) 325 #define CS8900_TX_CONFIG_JABBER (1 << 10) 326 #define CS8900_TX_CONFIG_ANY_COLLISION (1 << 11) 327 #define CS8900_TX_CONFIG_16_COLLISION (1 << 15) 333 #define CS8900_TX_EVENT_LOSS_OF_CARRIER (1 << 6) 334 #define CS8900_TX_EVENT_SQ_ERROR (1 << 7) 335 #define CS8900_TX_EVENT_TX_OK (1 << 8) 336 #define CS8900_TX_EVENT_OUT_OF_WINDOW (1 << 9) 337 #define CS8900_TX_EVENT_JABBER (1 << 10) 338 #define CS8900_TX_EVENT_16_COLLISIONS (1 << 15) 344 #define CS8900_TX_CMD_STATUS_TX_START_5 (0 << 6) 345 #define CS8900_TX_CMD_STATUS_TX_START_381 (1 << 6) 346 #define CS8900_TX_CMD_STATUS_TX_START_1021 (2 << 6) 347 #define CS8900_TX_CMD_STATUS_TX_START_ENTIRE (3 << 6) 348 #define CS8900_TX_CMD_STATUS_FORCE (1 << 8) 349 #define CS8900_TX_CMD_STATUS_ONE_COLLISION (1 << 9) 350 #define CS8900_TX_CMD_STATUS_INHIBIT_CRC (1 << 12) 351 #define CS8900_TX_CMD_STATUS_TX_PAD_DISABLED (1 << 13) 357 #define CS8900_BUFFER_CONFIG_SW_INT (1 << 6) 358 #define CS8900_BUFFER_CONFIG_RX_DMA_DONE (1 << 7) 359 #define CS8900_BUFFER_CONFIG_RDY_FOR_TX (1 << 8) 360 #define CS8900_BUFFER_CONFIG_TX_UNDERRUN (1 << 9) 361 #define CS8900_BUFFER_CONFIG_RX_MISSED (1 << 10) 362 #define CS8900_BUFFER_CONFIG_RX_128_BYTES (1 << 11) 363 #define CS8900_BUFFER_CONFIG_TX_COL_OVF (1 << 12) 364 #define CS8900_BUFFER_CONFIG_RX_MISSED_OVF (1 << 13) 365 #define CS8900_BUFFER_CONFIG_RX_DEST_MATCH (1 << 15) 371 #define CS8900_BUFFER_EVENT_SW_INT (1 << 6) 372 #define CS8900_BUFFER_EVENT_RX_DMA_DONE (1 << 7) 373 #define CS8900_BUFFER_EVENT_RDY_FOR_TX (1 << 8) 374 #define CS8900_BUFFER_EVENT_TX_UNDERRUN (1 << 9) 375 #define CS8900_BUFFER_EVENT_RX_MISSED (1 << 10) 376 #define CS8900_BUFFER_EVENT_RX_128_BYTES (1 << 11) 377 #define CS8900_BUFFER_EVENT_RX_DEST_MATCH (1 << 15) 383 #define CS8900_LINE_CTRL_RX_ON (1 << 6) 384 #define CS8900_LINE_CTRL_TX_ON (1 << 7) 385 #define CS8900_LINE_CTRL_AUI (1 << 8) 386 #define CS8900_LINE_CTRL_10BASET (0 << 9) 387 #define CS8900_LINE_CTRL_AUTO_AUI_10BASET (1 << 9) 388 #define CS8900_LINE_CTRL_MOD_BACKOFF (1 << 11) 389 #define CS8900_LINE_CTRL_POLARITY_DISABLED (1 << 12) 390 #define CS8900_LINE_CTRL_2_PART_DEF_DISABLED (1 << 13) 391 #define CS8900_LINE_CTRL_LO_RX_SQUELCH (1 << 14) 397 #define CS8900_LINE_STATUS_LINK_OK (1 << 7) 398 #define CS8900_LINE_STATUS_AUI (1 << 8) 399 #define CS8900_LINE_STATUS_10_BASE_T (1 << 9) 400 #define CS8900_LINE_STATUS_POLARITY_OK (1 << 12) 401 #define CS8900_LINE_STATUS_CRS (1 << 14) 407 #define CS8900_SELF_CTRL_RESET (1 << 6) 408 #define CS8900_SELF_CTRL_SW_SUSPEND (1 << 8) 409 #define CS8900_SELF_CTRL_HW_SLEEP (1 << 9) 410 #define CS8900_SELF_CTRL_HW_STANDBY (1 << 10) 411 #define CS8900_SELF_CTRL_HC0E (1 << 12) 412 #define CS8900_SELF_CTRL_HC1E (1 << 13) 413 #define CS8900_SELF_CTRL_HCB0 (1 << 14) 414 #define CS8900_SELF_CTRL_HCB1 (1 << 15) 420 #define CS8900_SELF_STATUS_3_3_V (1 << 6) 421 #define CS8900_SELF_STATUS_INITD (1 << 7) 422 #define CS8900_SELF_STATUS_SIBUST (1 << 8) 423 #define CS8900_SELF_STATUS_EEPROM_PRESENT (1 << 9) 424 #define CS8900_SELF_STATUS_EEPROM_OK (1 << 10) 425 #define CS8900_SELF_STATUS_EL_PRESENT (1 << 11) 426 #define CS8900_SELF_STATUS_EE_SIZE (1 << 12) 432 #define CS8900_BUS_CTRL_RESET_RX_DMA (1 << 6) 433 #define CS8900_BUS_CTRL_USE_SA (1 << 9) 434 #define CS8900_BUS_CTRL_MEMORY_ENABLE (1 << 10) 435 #define CS8900_BUS_CTRL_DMA_BURST (1 << 11) 436 #define CS8900_BUS_CTRL_IOCHRDYE (1 << 12) 437 #define CS8900_BUS_CTRL_RX_DMA_SIZE (1 << 13) 438 #define CS8900_BUS_CTRL_ENABLE_INT (1 << 15) 444 #define CS8900_BUS_STATUS_TX_BID_ERROR (1 << 7) 445 #define CS8900_BUS_STATUS_RDY_FOR_TX_NOW (1 << 8) 450 #define CS8900_TRACE 0 451 #define CS8900_TRACE_SIZE (400) 457 #define CS8900_RX_QUEUE_SIZE (30) 465 unsigned long rx_packets;
466 unsigned long tx_packets;
467 unsigned long rx_bytes;
468 unsigned long tx_bytes;
469 unsigned long rx_interrupts;
470 unsigned long tx_interrupts;
473 unsigned long rx_dropped;
474 unsigned long rx_no_mbufs;
475 unsigned long rx_no_clusters;
476 unsigned long rx_oversize_errors;
477 unsigned long rx_crc_errors;
478 unsigned long rx_runt_errors;
479 unsigned long rx_missed_errors;
483 unsigned long tx_collisions;
484 unsigned long tx_bid_errors;
485 unsigned long tx_wait_for_rdy4tx;
486 unsigned long tx_rdy4tx;
487 unsigned long tx_underrun_errors;
488 unsigned long tx_dropped;
489 unsigned long tx_resends;
492 unsigned long int_swint_req;
493 unsigned long int_swint_res;
494 unsigned long int_lockup;
496 unsigned long interrupts;
517 unsigned long io_base;
518 unsigned long mem_base;
536 unsigned char mac_address[6];
542 struct arpcom arpcom;
558 struct mbuf *rx_ready_head;
559 struct mbuf *rx_ready_tail;
562 struct mbuf *rx_loaded_head;
563 struct mbuf *rx_loaded_tail;
574 unsigned short trace_key[CS8900_TRACE_SIZE];
575 unsigned long trace_var[CS8900_TRACE_SIZE];
576 unsigned long trace_time[CS8900_TRACE_SIZE];
636 void cs8900_get_mac_addr (
cs8900_device *cs,
unsigned char *mac_address);
672 unsigned short reg,
unsigned short data);
686 unsigned short cs8900_io_get_reg (
cs8900_device *cs,
unsigned short reg);
702 unsigned long reg,
unsigned short data);
717 unsigned short cs8900_mem_get_reg (
cs8900_device *cs,
unsigned long reg);
732 void cs8900_put_data_block (
cs8900_device *cs,
int len,
unsigned char *data);
747 unsigned short cs8900_get_data_block (
cs8900_device *cs,
unsigned char *data);
Definition: deflate.c:115
ISR_Vector_number rtems_vector_number
Control block type used to manage the vectors.
Definition: intr.h:47
ISR_Handler rtems_isr
Return type for interrupt handler.
Definition: intr.h:52
eth_statistics eth_stats
Definition: cs8900.h:584
int cs8900_driver_attach(struct rtems_bsdnet_ifconfig *config, int attaching)
Definition: cs8900.c:1136
Objects_Id rtems_id
Used to manage and manipulate RTEMS object identifiers.
Definition: types.h:83
unsigned v
Definition: tte.h:73