Changeset 3d5e190 in mainline for uspace/srv/hw/netif/dp8390/dp8390.h
- Timestamp:
- 2011-01-06T23:50:48Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7c34b28f, 854151c, ae1f70e
- Parents:
- ba21938 (diff), 7922dea (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hw/netif/dp8390/dp8390.h
rba21938 r3d5e190 89 89 90 90 /** Page 1, read/write */ 91 #define DP_PAR0 0x1 /* Physical Address Register 0*/92 #define DP_PAR1 0x2 /* Physical Address Register 1*/93 #define DP_PAR2 0x3 /* Physical Address Register 2*/94 #define DP_PAR3 0x4 /* Physical Address Register 3*/95 #define DP_PAR4 0x5 /* Physical Address Register 4*/96 #define DP_PAR5 0x6 /* Physical Address Register 5*/97 #define DP_CURR 0x7 /* Current Page Register*/98 #define DP_MAR0 0x8 /* Multicast Address Register 0*/99 #define DP_MAR1 0x9 /* Multicast Address Register 1*/100 #define DP_MAR2 0xA /* Multicast Address Register 2*/101 #define DP_MAR3 0xB /* Multicast Address Register 3*/102 #define DP_MAR4 0xC /* Multicast Address Register 4*/103 #define DP_MAR5 0xD /* Multicast Address Register 5*/104 #define DP_MAR6 0xE /* Multicast Address Register 6*/105 #define DP_MAR7 0xF /* Multicast Address Register 7*/91 #define DP_PAR0 0x01 /**< Physical Address Register 0 */ 92 #define DP_PAR1 0x02 /**< Physical Address Register 1 */ 93 #define DP_PAR2 0x03 /**< Physical Address Register 2 */ 94 #define DP_PAR3 0x04 /**< Physical Address Register 3 */ 95 #define DP_PAR4 0x05 /**< Physical Address Register 4 */ 96 #define DP_PAR5 0x06 /**< Physical Address Register 5 */ 97 #define DP_CURR 0x07 /**< Current Page Register */ 98 #define DP_MAR0 0x08 /**< Multicast Address Register 0 */ 99 #define DP_MAR1 0x09 /**< Multicast Address Register 1 */ 100 #define DP_MAR2 0x0a /**< Multicast Address Register 2 */ 101 #define DP_MAR3 0x0b /**< Multicast Address Register 3 */ 102 #define DP_MAR4 0x0c /**< Multicast Address Register 4 */ 103 #define DP_MAR5 0x0d /**< Multicast Address Register 5 */ 104 #define DP_MAR6 0x0e /**< Multicast Address Register 6 */ 105 #define DP_MAR7 0x0f /**< Multicast Address Register 7 */ 106 106 107 107 /* Bits in dp_cr */ … … 245 245 #define outb_reg1(dep, reg, data) (outb(dep->de_dp8390_port + reg, data)) 246 246 247 /* Software interface to the dp8390 driver */248 249 struct dpeth;250 251 typedef void (*dp_initf_t)(struct dpeth *dep);252 typedef void (*dp_stopf_t)(struct dpeth *dep);253 typedef void (*dp_user2nicf_t)(struct dpeth *dep, void *buf, size_t offset, int nic_addr, size_t size);254 typedef void (*dp_nic2userf_t)(struct dpeth *dep, int nic_addr, void *buf, size_t offset, size_t size);255 typedef void (*dp_getblock_t)(struct dpeth *dep, int page, size_t offset, size_t size, void *dst);256 257 247 #define SENDQ_NR 2 /* Maximum size of the send queue */ 258 248 #define SENDQ_PAGES 6 /* 6 * DP_PAGESIZE >= 1514 bytes */ … … 264 254 * routine knows the irq and/or memory address because they are 265 255 * hardwired in the board, the probe should modify these fields. 266 * Futhermore, the probe routine should also fill in de_initf and267 * de_stopf fields with the appropriate function pointers.268 256 */ 269 257 port_t de_base_port; 270 258 int de_irq; 271 dp_initf_t de_initf; 272 dp_stopf_t de_stopf; 273 char de_name[sizeof("dp8390#n")]; 274 275 /* 276 * The initf function fills the following fields. Only cards that do 277 * programmed I/O fill in the de_pata_port field. 278 * In addition, the init routine has to fill in the sendq data 279 * structures. 280 */ 259 281 260 ether_addr_t de_address; 282 261 port_t de_dp8390_port; … … 300 279 301 280 /* Fields for internal use by the dp8390 driver. */ 302 int de_flags;303 int de_mode;304 281 eth_stat_t de_stat; 305 dp_user2nicf_t de_user2nicf; 306 dp_nic2userf_t de_nic2userf; 307 dp_getblock_t de_getblockf; 282 283 /* Driver flags */ 284 bool up; 285 bool enabled; 286 bool stopped; 287 bool sending; 288 bool send_avail; 308 289 } dpeth_t; 309 290 310 #define DEF_EMPTY 0x000311 #define DEF_PACK_SEND 0x001312 #define DEF_SEND_AVAIL 0x004313 #define DEF_PROMISC 0x040314 #define DEF_MULTI 0x080315 #define DEF_BROAD 0x100316 #define DEF_ENABLED 0x200317 #define DEF_STOPPED 0x400318 319 #define DEM_DISABLED 0x0320 #define DEM_ENABLED 0x2321 322 291 #endif 323 292
Note:
See TracChangeset
for help on using the changeset viewer.