Changeset 43c3937 in mainline for uspace/srv/hw/netif/dp8390/ne2000.h
- Timestamp:
- 2011-01-07T10:43:15Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5097bed4
- Parents:
- 5f7d96e (diff), 0f191a2 (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/ne2000.h
r5f7d96e r43c3937 1 1 /* 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: 2 * Copyright (c) 2009 Lukas Mejdrech 3 * Copyright (c) 2011 Martin Decky 4 * All rights reserved. 3 5 * 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 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 8 9 * 10 * - Redistributions of source code must retain the above copyright 11 * notice, this list of conditions and the following disclaimer. 12 * - Redistributions in binary form must reproduce the above copyright 13 * notice, this list of conditions and the following disclaimer in the 14 * documentation and/or other materials provided with the distribution. 15 * - The name of the author may not be used to endorse or promote products 16 * derived from this software without specific prior written permission. 9 17 * 10 * Disclaimer 11 * 12 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS, AUTHORS, AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR 18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 13 19 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 14 20 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 15 * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ANY AUTHORS OR CONTRIBUTORSBE LIABLE FOR ANY DIRECT, INDIRECT,21 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 16 22 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 17 23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, … … 20 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 21 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 *23 * Changes:24 * 2009 ported to HelenOS, Lukas Mejdrech25 28 */ 26 29 27 30 /* 28 ne2000.h 29 30 Created: March 15, 1994 by Philip Homburg <philip@f-mnx.phicoh.com> 31 */ 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 */ 32 39 33 40 /** @addtogroup ne2k … … 43 50 44 51 #include <libarch/ddi.h> 45 46 52 #include "dp8390_port.h" 47 53 48 54 /** DP8390 register offset. 49 55 */ 50 #define NE_DP8390 56 #define NE_DP8390 0x00 51 57 52 58 /** Data register. 53 59 */ 54 #define NE_DATA 60 #define NE_DATA 0x10 55 61 56 62 /** Reset register. 57 63 */ 58 #define NE_RESET 0x1F64 #define NE_RESET 0x1f 59 65 60 66 /** NE1000 data start. 61 67 */ 62 #define NE1000_START 68 #define NE1000_START 0x2000 63 69 64 70 /** NE1000 data size. 65 71 */ 66 #define NE1000_SIZE 72 #define NE1000_SIZE 0x2000 67 73 68 74 /** NE2000 data start. 69 75 */ 70 #define NE2000_START 76 #define NE2000_START 0x4000 71 77 72 78 /** NE2000 data size. 73 79 */ 74 #define NE2000_SIZE 80 #define NE2000_SIZE 0x4000 75 81 76 82 /** Reads 1 byte register. … … 79 85 * @returns The read value. 80 86 */ 81 #define inb_ne(dep, reg) (inb(dep->de_base_port+reg))87 #define inb_ne(dep, reg) (inb(dep->de_base_port + reg)) 82 88 83 89 /** Writes 1 byte register. … … 86 92 * @param[in] data The value to be written. 87 93 */ 88 #define outb_ne(dep, reg, data) (outb(dep->de_base_port+reg, data))94 #define outb_ne(dep, reg, data) (outb(dep->de_base_port + reg, data)) 89 95 90 96 /** Reads 1 word (2 bytes) register. … … 93 99 * @returns The read value. 94 100 */ 95 #define inw_ne(dep, reg) (inw(dep->de_base_port+reg))101 #define inw_ne(dep, reg) (inw(dep->de_base_port + reg)) 96 102 97 103 /** Writes 1 word (2 bytes) register. … … 100 106 * @param[in] data The value to be written. 101 107 */ 102 #define outw_ne(dep, reg, data) (outw(dep->de_base_port+reg, data))108 #define outw_ne(dep, reg, data) (outw(dep->de_base_port + reg, data)) 103 109 104 #endif /* __NET_NETIF_NE2000_H__ */ 110 struct dpeth; 105 111 106 /* 107 * $PchId: ne2000.h,v 1.4 2004/08/03 12:03:20 philip Exp $ 108 */ 112 extern int ne_probe(struct dpeth *); 113 extern void ne_init(struct dpeth *); 114 extern void ne_stop(struct dpeth *); 115 116 #endif 109 117 110 118 /** @}
Note:
See TracChangeset
for help on using the changeset viewer.