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