Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hw/netif/dp8390/ne2000.h

    r7922dea r849ed54  
    11/*
    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:
    53 *
    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
    98 *
    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.
    179 *
    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
    1913 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
    2014 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    21  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     15 * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ANY AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
    2216 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
    2317 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     
    2620 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    2721 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     22 *
     23 * Changes:
     24 *  2009 ported to HelenOS, Lukas Mejdrech
    2825 */
    2926
    3027/*
    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  */
     28ne2000.h
     29
     30Created:        March 15, 1994 by Philip Homburg <philip@f-mnx.phicoh.com>
     31*/
    3932
    4033/** @addtogroup ne2k
     
    5043
    5144#include <libarch/ddi.h>
     45
    5246#include "dp8390_port.h"
    5347
    5448/** DP8390 register offset.
    5549 */
    56 #define NE_DP8390  0x00
     50#define NE_DP8390       0x00
    5751
    5852/** Data register.
    5953 */
    60 #define NE_DATA  0x10
     54#define NE_DATA         0x10
    6155
    6256/** Reset register.
    6357 */
    64 #define NE_RESET  0x1f
     58#define NE_RESET        0x1F
    6559
    6660/** NE1000 data start.
    6761 */
    68 #define NE1000_START  0x2000
     62#define NE1000_START    0x2000
    6963
    7064/** NE1000 data size.
    7165 */
    72 #define NE1000_SIZE  0x2000
     66#define NE1000_SIZE     0x2000
    7367
    7468/** NE2000 data start.
    7569 */
    76 #define NE2000_START  0x4000
     70#define NE2000_START    0x4000
    7771
    7872/** NE2000 data size.
    7973 */
    80 #define NE2000_SIZE  0x4000
     74#define NE2000_SIZE     0x4000
    8175
    8276/** Reads 1 byte register.
     
    8579 *  @returns The read value.
    8680 */
    87 #define inb_ne(dep, reg)  (inb(dep->de_base_port + reg))
     81#define inb_ne(dep, reg)        (inb(dep->de_base_port+reg))
    8882
    8983/** Writes 1 byte register.
     
    9286 *  @param[in] data The value to be written.
    9387 */
    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))
    9589
    9690/** Reads 1 word (2 bytes) register.
     
    9993 *  @returns The read value.
    10094 */
    101 #define inw_ne(dep, reg)  (inw(dep->de_base_port + reg))
     95#define inw_ne(dep, reg)        (inw(dep->de_base_port+reg))
    10296
    10397/** Writes 1 word (2 bytes) register.
     
    106100 *  @param[in] data The value to be written.
    107101 */
    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))
    109103
    110 struct dpeth;
     104#endif /* __NET_NETIF_NE2000_H__ */
    111105
    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 */
    117109
    118110/** @}
Note: See TracChangeset for help on using the changeset viewer.