1*4882a593Smuzhiyun /* 2*4882a593Smuzhiyun Ported to U-Boot by Christian Pellegrin <chri@ascensit.com> 3*4882a593Smuzhiyun 4*4882a593Smuzhiyun Based on sources from the Linux kernel (pcnet_cs.c, 8390.h) and 5*4882a593Smuzhiyun eCOS(if_dp83902a.c, if_dp83902a.h). Both of these 2 wonderful world 6*4882a593Smuzhiyun are GPL, so this is, of course, GPL. 7*4882a593Smuzhiyun 8*4882a593Smuzhiyun ========================================================================== 9*4882a593Smuzhiyun 10*4882a593Smuzhiyun dev/dp83902a.h 11*4882a593Smuzhiyun 12*4882a593Smuzhiyun National Semiconductor DP83902a ethernet chip 13*4882a593Smuzhiyun 14*4882a593Smuzhiyun ========================================================================== 15*4882a593Smuzhiyun ####ECOSGPLCOPYRIGHTBEGIN#### 16*4882a593Smuzhiyun ------------------------------------------- 17*4882a593Smuzhiyun This file is part of eCos, the Embedded Configurable Operating System. 18*4882a593Smuzhiyun Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. 19*4882a593Smuzhiyun 20*4882a593Smuzhiyun eCos is free software; you can redistribute it and/or modify it under 21*4882a593Smuzhiyun the terms of the GNU General Public License as published by the Free 22*4882a593Smuzhiyun Software Foundation; either version 2 or (at your option) any later version. 23*4882a593Smuzhiyun 24*4882a593Smuzhiyun eCos is distributed in the hope that it will be useful, but WITHOUT ANY 25*4882a593Smuzhiyun WARRANTY; without even the implied warranty of MERCHANTABILITY or 26*4882a593Smuzhiyun FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 27*4882a593Smuzhiyun for more details. 28*4882a593Smuzhiyun 29*4882a593Smuzhiyun You should have received a copy of the GNU General Public License along 30*4882a593Smuzhiyun with eCos; if not, write to the Free Software Foundation, Inc., 31*4882a593Smuzhiyun 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. 32*4882a593Smuzhiyun 33*4882a593Smuzhiyun As a special exception, if other files instantiate templates or use macros 34*4882a593Smuzhiyun or inline functions from this file, or you compile this file and link it 35*4882a593Smuzhiyun with other works to produce a work based on this file, this file does not 36*4882a593Smuzhiyun by itself cause the resulting work to be covered by the GNU General Public 37*4882a593Smuzhiyun License. However the source code for this file must still be made available 38*4882a593Smuzhiyun in accordance with section (3) of the GNU General Public License. 39*4882a593Smuzhiyun 40*4882a593Smuzhiyun This exception does not invalidate any other reasons why a work based on 41*4882a593Smuzhiyun this file might be covered by the GNU General Public License. 42*4882a593Smuzhiyun 43*4882a593Smuzhiyun Alternative licenses for eCos may be arranged by contacting Red Hat, Inc. 44*4882a593Smuzhiyun at http://sources.redhat.com/ecos/ecos-license/ 45*4882a593Smuzhiyun ------------------------------------------- 46*4882a593Smuzhiyun ####ECOSGPLCOPYRIGHTEND#### 47*4882a593Smuzhiyun ####BSDCOPYRIGHTBEGIN#### 48*4882a593Smuzhiyun 49*4882a593Smuzhiyun ------------------------------------------- 50*4882a593Smuzhiyun 51*4882a593Smuzhiyun Portions of this software may have been derived from OpenBSD or other sources, 52*4882a593Smuzhiyun and are covered by the appropriate copyright disclaimers included herein. 53*4882a593Smuzhiyun 54*4882a593Smuzhiyun ------------------------------------------- 55*4882a593Smuzhiyun 56*4882a593Smuzhiyun ####BSDCOPYRIGHTEND#### 57*4882a593Smuzhiyun ========================================================================== 58*4882a593Smuzhiyun #####DESCRIPTIONBEGIN#### 59*4882a593Smuzhiyun 60*4882a593Smuzhiyun Author(s): gthomas 61*4882a593Smuzhiyun Contributors: gthomas, jskov 62*4882a593Smuzhiyun Date: 2001-06-13 63*4882a593Smuzhiyun Purpose: 64*4882a593Smuzhiyun Description: 65*4882a593Smuzhiyun 66*4882a593Smuzhiyun ####DESCRIPTIONEND#### 67*4882a593Smuzhiyun 68*4882a593Smuzhiyun ========================================================================== 69*4882a593Smuzhiyun */ 70*4882a593Smuzhiyun 71*4882a593Smuzhiyun /* 72*4882a593Smuzhiyun * NE2000 support header file. 73*4882a593Smuzhiyun * Created by Nobuhiro Iwamatsu <iwamatsu@nigauri.org> 74*4882a593Smuzhiyun */ 75*4882a593Smuzhiyun 76*4882a593Smuzhiyun #ifndef __DRIVERS_NE2000_H__ 77*4882a593Smuzhiyun #define __DRIVERS_NE2000_H__ 78*4882a593Smuzhiyun 79*4882a593Smuzhiyun /* Enable NE2000 basic init function */ 80*4882a593Smuzhiyun #define NE2000_BASIC_INIT 81*4882a593Smuzhiyun 82*4882a593Smuzhiyun #define DP_DATA 0x10 83*4882a593Smuzhiyun #define START_PG 0x50 /* First page of TX buffer */ 84*4882a593Smuzhiyun #define START_PG2 0x48 85*4882a593Smuzhiyun #define STOP_PG 0x80 /* Last page +1 of RX ring */ 86*4882a593Smuzhiyun 87*4882a593Smuzhiyun #define RX_START 0x50 88*4882a593Smuzhiyun #define RX_END 0x80 89*4882a593Smuzhiyun 90*4882a593Smuzhiyun #define DP_IN(_b_, _o_, _d_) (_d_) = *( (vu_char *) ((_b_)+(_o_))) 91*4882a593Smuzhiyun #define DP_OUT(_b_, _o_, _d_) *( (vu_char *) ((_b_)+(_o_))) = (_d_) 92*4882a593Smuzhiyun #define DP_IN_DATA(_b_, _d_) (_d_) = *( (vu_char *) ((_b_))) 93*4882a593Smuzhiyun #define DP_OUT_DATA(_b_, _d_) *( (vu_char *) ((_b_))) = (_d_) 94*4882a593Smuzhiyun #endif /* __DRIVERS_NE2000_H__ */ 95