Changes in uspace/srv/hw/netif/dp8390/ne2000.h [7922dea:849ed54] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hw/netif/dp8390/ne2000.h
r7922dea r849ed54 1 1 /* 2 * Copyright (c) 2009 Lukas Mejdrech 3 * Copyright (c) 2011 Martin Decky 4 * All rights reserved. 2 * Copyright (c) 1987,1997, 2006, Vrije Universiteit, Amsterdam, The Netherlands All rights reserved. Redistribution and use of the MINIX 3 operating system in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 5 3 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 4 * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 5 * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 6 * * Neither the name of the Vrije Universiteit nor the names of the software authors or contributors may be used to endorse or promote products derived from this software without specific prior written permission. 7 * * Any deviations from these conditions require written permission from the copyright holder in advance 9 8 * 10 * - Redistributions of source code must retain the above copyright11 * notice, this list of conditions and the following disclaimer.12 * - Redistributions in binary form must reproduce the above copyright13 * notice, this list of conditions and the following disclaimer in the14 * documentation and/or other materials provided with the distribution.15 * - The name of the author may not be used to endorse or promote products16 * derived from this software without specific prior written permission.17 9 * 18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 10 * Disclaimer 11 * 12 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS, AUTHORS, AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR 19 13 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 20 14 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 21 * IN NO EVENT SHALL THE AUTHORBE LIABLE FOR ANY DIRECT, INDIRECT,15 * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ANY AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 22 16 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 23 17 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, … … 26 20 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27 21 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 * 23 * Changes: 24 * 2009 ported to HelenOS, Lukas Mejdrech 28 25 */ 29 26 30 27 /* 31 * This code is based upon the NE2000 driver for MINIX, 32 * distributed according to a BSD-style license. 33 * 34 * Copyright (c) 1987, 1997, 2006 Vrije Universiteit 35 * Copyright (c) 1992, 1994 Philip Homburg 36 * Copyright (c) 1996 G. Falzoni 37 * 38 */ 28 ne2000.h 29 30 Created: March 15, 1994 by Philip Homburg <philip@f-mnx.phicoh.com> 31 */ 39 32 40 33 /** @addtogroup ne2k … … 50 43 51 44 #include <libarch/ddi.h> 45 52 46 #include "dp8390_port.h" 53 47 54 48 /** DP8390 register offset. 55 49 */ 56 #define NE_DP8390 50 #define NE_DP8390 0x00 57 51 58 52 /** Data register. 59 53 */ 60 #define NE_DATA 54 #define NE_DATA 0x10 61 55 62 56 /** Reset register. 63 57 */ 64 #define NE_RESET 0x1f58 #define NE_RESET 0x1F 65 59 66 60 /** NE1000 data start. 67 61 */ 68 #define NE1000_START 62 #define NE1000_START 0x2000 69 63 70 64 /** NE1000 data size. 71 65 */ 72 #define NE1000_SIZE 66 #define NE1000_SIZE 0x2000 73 67 74 68 /** NE2000 data start. 75 69 */ 76 #define NE2000_START 70 #define NE2000_START 0x4000 77 71 78 72 /** NE2000 data size. 79 73 */ 80 #define NE2000_SIZE 74 #define NE2000_SIZE 0x4000 81 75 82 76 /** Reads 1 byte register. … … 85 79 * @returns The read value. 86 80 */ 87 #define inb_ne(dep, reg) (inb(dep->de_base_port +reg))81 #define inb_ne(dep, reg) (inb(dep->de_base_port+reg)) 88 82 89 83 /** Writes 1 byte register. … … 92 86 * @param[in] data The value to be written. 93 87 */ 94 #define outb_ne(dep, reg, data) (outb(dep->de_base_port +reg, data))88 #define outb_ne(dep, reg, data) (outb(dep->de_base_port+reg, data)) 95 89 96 90 /** Reads 1 word (2 bytes) register. … … 99 93 * @returns The read value. 100 94 */ 101 #define inw_ne(dep, reg) (inw(dep->de_base_port +reg))95 #define inw_ne(dep, reg) (inw(dep->de_base_port+reg)) 102 96 103 97 /** Writes 1 word (2 bytes) register. … … 106 100 * @param[in] data The value to be written. 107 101 */ 108 #define outw_ne(dep, reg, data) (outw(dep->de_base_port +reg, data))102 #define outw_ne(dep, reg, data) (outw(dep->de_base_port+reg, data)) 109 103 110 struct dpeth; 104 #endif /* __NET_NETIF_NE2000_H__ */ 111 105 112 extern int ne_probe(struct dpeth *); 113 extern void ne_init(struct dpeth *); 114 extern void ne_stop(struct dpeth *); 115 116 #endif 106 /* 107 * $PchId: ne2000.h,v 1.4 2004/08/03 12:03:20 philip Exp $ 108 */ 117 109 118 110 /** @}
Note:
See TracChangeset
for help on using the changeset viewer.