wdenk | 5d5317e | 2003-12-07 00:46:27 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Realtek 8019AS Ethernet |
| 3 | * (C) Copyright 2002-2003 |
| 4 | * Xue Ligong(lgxue@hotmail.com),Wang Kehao, ESLAB, whut.edu.cn |
| 5 | * |
| 6 | * See file CREDITS for list of people who contributed to this |
| 7 | * project. |
| 8 | * |
| 9 | * This program is free software; you can redistribute it and/or |
| 10 | * modify it under the terms of the GNU General Public License as |
| 11 | * published by the Free Software Foundation; either version 2 of |
| 12 | * the License, or (at your option) any later version. |
| 13 | * |
| 14 | * This program is distributed in the hope that it will be useful, |
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | * GNU General Public License for more details. |
| 18 | * |
| 19 | * You should have received a copy of the GNU General Public License |
| 20 | * along with this program; if not, write to the Free Software |
| 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
| 22 | * MA 02111-1307 USA |
| 23 | */ |
| 24 | |
| 25 | /* |
| 26 | * This code works in 8bit mode. |
| 27 | * If you need to work in 16bit mode, PLS change it! |
| 28 | */ |
| 29 | |
| 30 | #include <asm/types.h> |
| 31 | #include <config.h> |
| 32 | |
wdenk | 5d5317e | 2003-12-07 00:46:27 +0000 | [diff] [blame] | 33 | #ifdef CONFIG_DRIVER_RTL8019 |
| 34 | |
Wolfgang Denk | a1be476 | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 35 | #define RTL8019_REG_00 (RTL8019_BASE + 0x00) |
| 36 | #define RTL8019_REG_01 (RTL8019_BASE + 0x01) |
| 37 | #define RTL8019_REG_02 (RTL8019_BASE + 0x02) |
| 38 | #define RTL8019_REG_03 (RTL8019_BASE + 0x03) |
| 39 | #define RTL8019_REG_04 (RTL8019_BASE + 0x04) |
| 40 | #define RTL8019_REG_05 (RTL8019_BASE + 0x05) |
| 41 | #define RTL8019_REG_06 (RTL8019_BASE + 0x06) |
| 42 | #define RTL8019_REG_07 (RTL8019_BASE + 0x07) |
| 43 | #define RTL8019_REG_08 (RTL8019_BASE + 0x08) |
| 44 | #define RTL8019_REG_09 (RTL8019_BASE + 0x09) |
| 45 | #define RTL8019_REG_0a (RTL8019_BASE + 0x0a) |
| 46 | #define RTL8019_REG_0b (RTL8019_BASE + 0x0b) |
| 47 | #define RTL8019_REG_0c (RTL8019_BASE + 0x0c) |
| 48 | #define RTL8019_REG_0d (RTL8019_BASE + 0x0d) |
| 49 | #define RTL8019_REG_0e (RTL8019_BASE + 0x0e) |
| 50 | #define RTL8019_REG_0f (RTL8019_BASE + 0x0f) |
| 51 | #define RTL8019_REG_10 (RTL8019_BASE + 0x10) |
| 52 | #define RTL8019_REG_1f (RTL8019_BASE + 0x1f) |
wdenk | 5d5317e | 2003-12-07 00:46:27 +0000 | [diff] [blame] | 53 | |
Wolfgang Denk | a1be476 | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 54 | #define RTL8019_COMMAND RTL8019_REG_00 |
| 55 | #define RTL8019_PAGESTART RTL8019_REG_01 |
| 56 | #define RTL8019_PAGESTOP RTL8019_REG_02 |
| 57 | #define RTL8019_BOUNDARY RTL8019_REG_03 |
| 58 | #define RTL8019_TRANSMITSTATUS RTL8019_REG_04 |
| 59 | #define RTL8019_TRANSMITPAGE RTL8019_REG_04 |
| 60 | #define RTL8019_TRANSMITBYTECOUNT0 RTL8019_REG_05 |
| 61 | #define RTL8019_NCR RTL8019_REG_05 |
| 62 | #define RTL8019_TRANSMITBYTECOUNT1 RTL8019_REG_06 |
| 63 | #define RTL8019_INTERRUPTSTATUS RTL8019_REG_07 |
| 64 | #define RTL8019_CURRENT RTL8019_REG_07 |
| 65 | #define RTL8019_REMOTESTARTADDRESS0 RTL8019_REG_08 |
| 66 | #define RTL8019_CRDMA0 RTL8019_REG_08 |
| 67 | #define RTL8019_REMOTESTARTADDRESS1 RTL8019_REG_09 |
| 68 | #define RTL8019_CRDMA1 RTL8019_REG_09 |
| 69 | #define RTL8019_REMOTEBYTECOUNT0 RTL8019_REG_0a |
| 70 | #define RTL8019_REMOTEBYTECOUNT1 RTL8019_REG_0b |
| 71 | #define RTL8019_RECEIVESTATUS RTL8019_REG_0c |
| 72 | #define RTL8019_RECEIVECONFIGURATION RTL8019_REG_0c |
| 73 | #define RTL8019_TRANSMITCONFIGURATION RTL8019_REG_0d |
| 74 | #define RTL8019_FAE_TALLY RTL8019_REG_0d |
| 75 | #define RTL8019_DATACONFIGURATION RTL8019_REG_0e |
| 76 | #define RTL8019_CRC_TALLY RTL8019_REG_0e |
| 77 | #define RTL8019_INTERRUPTMASK RTL8019_REG_0f |
| 78 | #define RTL8019_MISS_PKT_TALLY RTL8019_REG_0f |
| 79 | #define RTL8019_PHYSICALADDRESS0 RTL8019_REG_01 |
| 80 | #define RTL8019_PHYSICALADDRESS1 RTL8019_REG_02 |
| 81 | #define RTL8019_PHYSICALADDRESS2 RTL8019_REG_03 |
| 82 | #define RTL8019_PHYSICALADDRESS3 RTL8019_REG_04 |
| 83 | #define RTL8019_PHYSICALADDRESS4 RTL8019_REG_05 |
| 84 | #define RTL8019_PHYSICALADDRESS5 RTL8019_REG_06 |
| 85 | #define RTL8019_MULTIADDRESS0 RTL8019_REG_08 |
| 86 | #define RTL8019_MULTIADDRESS1 RTL8019_REG_09 |
| 87 | #define RTL8019_MULTIADDRESS2 RTL8019_REG_0a |
| 88 | #define RTL8019_MULTIADDRESS3 RTL8019_REG_0b |
| 89 | #define RTL8019_MULTIADDRESS4 RTL8019_REG_0c |
| 90 | #define RTL8019_MULTIADDRESS5 RTL8019_REG_0d |
| 91 | #define RTL8019_MULTIADDRESS6 RTL8019_REG_0e |
| 92 | #define RTL8019_MULTIADDRESS7 RTL8019_REG_0f |
| 93 | #define RTL8019_DMA_DATA RTL8019_REG_10 |
| 94 | #define RTL8019_RESET RTL8019_REG_1f |
wdenk | 5d5317e | 2003-12-07 00:46:27 +0000 | [diff] [blame] | 95 | |
Wolfgang Denk | a1be476 | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 96 | #define RTL8019_PAGE0 0x22 |
| 97 | #define RTL8019_PAGE1 0x62 |
| 98 | #define RTL8019_PAGE0DMAWRITE 0x12 |
| 99 | #define RTL8019_PAGE2DMAWRITE 0x92 |
| 100 | #define RTL8019_REMOTEDMAWR 0x12 |
| 101 | #define RTL8019_REMOTEDMARD 0x0A |
| 102 | #define RTL8019_ABORTDMAWR 0x32 |
| 103 | #define RTL8019_ABORTDMARD 0x2A |
| 104 | #define RTL8019_PAGE0STOP 0x21 |
| 105 | #define RTL8019_PAGE1STOP 0x61 |
| 106 | #define RTL8019_TRANSMIT 0x26 |
| 107 | #define RTL8019_TXINPROGRESS 0x04 |
| 108 | #define RTL8019_SEND 0x1A |
wdenk | 5d5317e | 2003-12-07 00:46:27 +0000 | [diff] [blame] | 109 | |
Wolfgang Denk | a1be476 | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 110 | #define RTL8019_PSTART 0x4c |
| 111 | #define RTL8019_PSTOP 0x80 |
| 112 | #define RTL8019_TPSTART 0x40 |
wdenk | 5d5317e | 2003-12-07 00:46:27 +0000 | [diff] [blame] | 113 | |
| 114 | #endif /*end of CONFIG_DRIVER_RTL8019*/ |