mirror of
https://github.com/armbian/linux-cix.git
synced 2026-01-06 12:30:45 -08:00
drivers/net: delete old parallel port de600/de620 drivers
The parallel port is largely replaced by USB, and even in the day where these drivers were current, the documented speed was less than 100kB/s. Let us not pretend that anyone cares about these drivers anymore, or worse - pretend that anyone is using them on a modern kernel. As a side bonus, this is the end of legacy parallel port ethernet, so we get to drop the whole chunk relating to that in the legacy Space.c file containing the non-PCI unified probe dispatch. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
This commit is contained in:
@@ -1,203 +0,0 @@
|
||||
Released 1994-06-13
|
||||
|
||||
|
||||
CONTENTS:
|
||||
|
||||
1. Introduction.
|
||||
2. License.
|
||||
3. Files in this release.
|
||||
4. Installation.
|
||||
5. Problems and tuning.
|
||||
6. Using the drivers with earlier releases.
|
||||
7. Acknowledgments.
|
||||
|
||||
|
||||
1. INTRODUCTION.
|
||||
|
||||
This is a set of Ethernet drivers for the D-Link DE-600/DE-620
|
||||
pocket adapters, for the parallel port on a Linux based machine.
|
||||
Some adapter "clones" will also work. Xircom is _not_ a clone...
|
||||
These drivers _can_ be used as loadable modules,
|
||||
and were developed for use on Linux 1.1.13 and above.
|
||||
For use on Linux 1.0.X, or earlier releases, see below.
|
||||
|
||||
I have used these drivers for NFS, ftp, telnet and X-clients on
|
||||
remote machines. Transmissions with ftp seems to work as
|
||||
good as can be expected (i.e. > 80k bytes/sec) from a
|
||||
parallel port...:-) Receive speeds will be about 60-80% of this.
|
||||
Depending on your machine, somewhat higher speeds can be achieved.
|
||||
|
||||
All comments/fixes to Bjorn Ekwall (bj0rn@blox.se).
|
||||
|
||||
|
||||
2. LICENSE.
|
||||
|
||||
This program is free software; you can redistribute it
|
||||
and/or modify it under the terms of the GNU General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be
|
||||
useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
PURPOSE. See the GNU General Public License for more
|
||||
details.
|
||||
|
||||
You should have received a copy of the GNU General Public
|
||||
License along with this program; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA
|
||||
02139, USA.
|
||||
|
||||
|
||||
3. FILES IN THIS RELEASE.
|
||||
|
||||
README.DLINK This file.
|
||||
de600.c The Source (may it be with You :-) for the DE-600
|
||||
de620.c ditto for the DE-620
|
||||
de620.h Macros for de620.c
|
||||
|
||||
If you are upgrading from the d-link tar release, there will
|
||||
also be a "dlink-patches" file that will patch Linux 1.1.18:
|
||||
linux/drivers/net/Makefile
|
||||
linux/drivers/net/CONFIG
|
||||
linux/drivers/net/MODULES
|
||||
linux/drivers/net/Space.c
|
||||
linux/config.in
|
||||
Apply the patch by:
|
||||
"cd /usr/src; patch -p0 < linux/drivers/net/dlink-patches"
|
||||
The old source, "linux/drivers/net/d_link.c", can be removed.
|
||||
|
||||
|
||||
4. INSTALLATION.
|
||||
|
||||
o Get the latest net binaries, according to current net.wisdom.
|
||||
|
||||
o Read the NET-2 and Ethernet HOWTOs and modify your setup.
|
||||
|
||||
o If your parallel port has a strange address or irq,
|
||||
modify "linux/drivers/net/CONFIG" accordingly, or adjust
|
||||
the parameters in the "tuning" section in the sources.
|
||||
|
||||
If you are going to use the drivers as loadable modules, do _not_
|
||||
enable them while doing "make config", but instead make sure that
|
||||
the drivers are included in "linux/drivers/net/MODULES".
|
||||
|
||||
If you are _not_ going to use the driver(s) as loadable modules,
|
||||
but instead have them included in the kernel, remember to enable
|
||||
the drivers while doing "make config".
|
||||
|
||||
o To include networking and DE600/DE620 support in your kernel:
|
||||
# cd /linux
|
||||
(as modules:)
|
||||
# make config (answer yes on CONFIG_NET and CONFIG_INET)
|
||||
(else included in the kernel:)
|
||||
# make config (answer yes on CONFIG _NET, _INET and _DE600 or _DE620)
|
||||
# make clean
|
||||
# make zImage (or whatever magic you usually do)
|
||||
|
||||
o I use lilo to boot multiple kernels, so that I at least
|
||||
can have one working kernel :-). If you do too, append
|
||||
these lines to /etc/lilo/config:
|
||||
|
||||
image = /linux/zImage
|
||||
label = newlinux
|
||||
root = /dev/hda2 (or whatever YOU have...)
|
||||
|
||||
# /etc/lilo/install
|
||||
|
||||
o Do "sync" and reboot the new kernel with a D-Link
|
||||
DE-600/DE-620 pocket adapter connected.
|
||||
|
||||
o The adapter can be configured with ifconfig eth?
|
||||
where the actual number is decided by the kernel
|
||||
when the drivers are initialized.
|
||||
|
||||
|
||||
5. "PROBLEMS" AND TUNING,
|
||||
|
||||
o If you see error messages from the driver, and if the traffic
|
||||
stops on the adapter, try to do "ifconfig" and "route" once
|
||||
more, just as in "rc.inet1". This should take care of most
|
||||
problems, including effects from power loss, or adapters that
|
||||
aren't connected to the printer port in some way or another.
|
||||
You can somewhat change the behaviour by enabling/disabling
|
||||
the macro SHUTDOWN_WHEN_LOST in the "tuning" section.
|
||||
For the DE-600 there is another macro, CHECK_LOST_DE600,
|
||||
that you might want to read about in the "tuning" section.
|
||||
|
||||
o Some machines have trouble handling the parallel port and
|
||||
the adapter at high speed. If you experience problems:
|
||||
|
||||
DE-600:
|
||||
- The adapter is not recognized at boot, i.e. an Ethernet
|
||||
address of 00:80:c8:... is not shown, try to add another
|
||||
"; SLOW_DOWN_IO"
|
||||
at DE600_SLOW_DOWN in the "tuning" section. As a last resort,
|
||||
uncomment: "#define REALLY_SLOW_IO" (see <asm/io.h> for hints).
|
||||
|
||||
- You experience "timeout" messages: first try to add another
|
||||
"; SLOW_DOWN_IO"
|
||||
at DE600_SLOW_DOWN in the "tuning" section, _then_ try to
|
||||
increase the value (original value: 5) at
|
||||
"if (tickssofar < 5)" near line 422.
|
||||
|
||||
DE-620:
|
||||
- Your parallel port might be "sluggish". To cater for
|
||||
this, there are the macros LOWSPEED and READ_DELAY/WRITE_DELAY
|
||||
in the "tuning" section. Your first step should be to enable
|
||||
LOWSPEED, and after that you can "tune" the XXX_DELAY values.
|
||||
|
||||
o If the adapter _is_ recognized at boot but you get messages
|
||||
about "Network Unreachable", then the problem is probably
|
||||
_not_ with the driver. Check your net configuration instead
|
||||
(ifconfig and route) in "rc.inet1".
|
||||
|
||||
o There is some rudimentary support for debugging, look at
|
||||
the source. Use "-DDE600_DEBUG=3" or "-DDE620_DEBUG=3"
|
||||
when compiling, or include it in "linux/drivers/net/CONFIG".
|
||||
IF YOU HAVE PROBLEMS YOU CAN'T SOLVE: PLEASE COMPILE THE DRIVER
|
||||
WITH DEBUGGING ENABLED, AND SEND ME THE RESULTING OUTPUT!
|
||||
|
||||
|
||||
6. USING THE DRIVERS WITH EARLIER RELEASES.
|
||||
|
||||
The later 1.1.X releases of the Linux kernel include some
|
||||
changes in the networking layer (a.k.a. NET3). This affects
|
||||
these drivers in a few places. The hints that follow are
|
||||
_not_ tested by me, since I don't have the disk space to keep
|
||||
all releases on-line.
|
||||
Known needed changes to date:
|
||||
- release patchfile: some patches will fail, but they should
|
||||
be easy to apply "by hand", since they are trivial.
|
||||
(Space.c: d_link_init() is now called de600_probe())
|
||||
- de600.c: change "mark_bh(NET_BH)" to "mark_bh(INET_BH)".
|
||||
- de620.c: (maybe) change the code around "netif_rx(skb);" to be
|
||||
similar to the code around "dev_rint(...)" in de600.c
|
||||
|
||||
|
||||
7. ACKNOWLEDGMENTS.
|
||||
|
||||
These drivers wouldn't have been done without the base
|
||||
(and support) from Ross Biro, and D-Link Systems Inc.
|
||||
The driver relies upon GPL-ed source from D-Link Systems Inc.
|
||||
and from Russel Nelson at Crynwr Software <nelson@crynwr.com>.
|
||||
|
||||
Additional input also from:
|
||||
Donald Becker <becker@super.org>, Alan Cox <A.Cox@swansea.ac.uk>
|
||||
and Fred N. van Kempen <waltje@uWalt.NL.Mugnet.ORG>
|
||||
|
||||
DE-600 alpha release primary victim^H^H^H^H^H^Htester:
|
||||
- Erik Proper <erikp@cs.kun.nl>.
|
||||
Good input also from several users, most notably
|
||||
- Mark Burton <markb@ordern.demon.co.uk>.
|
||||
|
||||
DE-620 alpha release victims^H^H^H^H^H^H^Htesters:
|
||||
- J. Joshua Kopper <kopper@rtsg.mot.com>
|
||||
- Olav Kvittem <Olav.Kvittem@uninett.no>
|
||||
- Germano Caronni <caronni@nessie.cs.id.ethz.ch>
|
||||
- Jeremy Fitzhardinge <jeremy@suite.sw.oz.au>
|
||||
|
||||
|
||||
Happy hacking!
|
||||
|
||||
Bjorn Ekwall == bj0rn@blox.se
|
||||
@@ -73,9 +73,6 @@ extern struct net_device *mac89x0_probe(int unit);
|
||||
extern struct net_device *cops_probe(int unit);
|
||||
extern struct net_device *ltpc_probe(void);
|
||||
|
||||
/* Detachable devices ("pocket adaptors") */
|
||||
extern struct net_device *de620_probe(int unit);
|
||||
|
||||
/* Fibre Channel adapters */
|
||||
extern int iph5526_probe(struct net_device *dev);
|
||||
|
||||
@@ -185,13 +182,6 @@ static struct devprobe2 isa_probes[] __initdata = {
|
||||
{NULL, 0},
|
||||
};
|
||||
|
||||
static struct devprobe2 parport_probes[] __initdata = {
|
||||
#ifdef CONFIG_DE620 /* D-Link DE-620 adapter */
|
||||
{de620_probe, 0},
|
||||
#endif
|
||||
{NULL, 0},
|
||||
};
|
||||
|
||||
static struct devprobe2 m68k_probes[] __initdata = {
|
||||
#ifdef CONFIG_ATARILANCE /* Lance-based Atari ethernet boards */
|
||||
{atarilance_probe, 0},
|
||||
@@ -230,8 +220,7 @@ static void __init ethif_probe2(int unit)
|
||||
return;
|
||||
|
||||
(void)( probe_list2(unit, m68k_probes, base_addr == 0) &&
|
||||
probe_list2(unit, isa_probes, base_addr == 0) &&
|
||||
probe_list2(unit, parport_probes, base_addr == 0));
|
||||
probe_list2(unit, isa_probes, base_addr == 0));
|
||||
}
|
||||
|
||||
/* Statically configured drivers -- order matters here. */
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
config NET_VENDOR_DLINK
|
||||
bool "D-Link devices"
|
||||
default y
|
||||
depends on PCI || PARPORT
|
||||
depends on PCI
|
||||
---help---
|
||||
If you have a network (Ethernet) card belonging to this class, say Y
|
||||
and read the Ethernet-HOWTO, available from
|
||||
@@ -18,36 +18,6 @@ config NET_VENDOR_DLINK
|
||||
|
||||
if NET_VENDOR_DLINK
|
||||
|
||||
config DE600
|
||||
tristate "D-Link DE600 pocket adapter support"
|
||||
depends on PARPORT
|
||||
---help---
|
||||
This is a network (Ethernet) device which attaches to your parallel
|
||||
port. Read <file:Documentation/networking/DLINK.txt> as well as the
|
||||
Ethernet-HOWTO, available from
|
||||
<http://www.tldp.org/docs.html#howto>, if you want to use
|
||||
this. It is possible to have several devices share a single parallel
|
||||
port and it is safe to compile the corresponding drivers into the
|
||||
kernel.
|
||||
|
||||
To compile this driver as a module, choose M here: the module
|
||||
will be called de600.
|
||||
|
||||
config DE620
|
||||
tristate "D-Link DE620 pocket adapter support"
|
||||
depends on PARPORT
|
||||
---help---
|
||||
This is a network (Ethernet) device which attaches to your parallel
|
||||
port. Read <file:Documentation/networking/DLINK.txt> as well as the
|
||||
Ethernet-HOWTO, available from
|
||||
<http://www.tldp.org/docs.html#howto>, if you want to use
|
||||
this. It is possible to have several devices share a single parallel
|
||||
port and it is safe to compile the corresponding drivers into the
|
||||
kernel.
|
||||
|
||||
To compile this driver as a module, choose M here: the module
|
||||
will be called de620.
|
||||
|
||||
config DL2K
|
||||
tristate "DL2000/TC902x-based Gigabit Ethernet support"
|
||||
depends on PCI
|
||||
|
||||
@@ -2,7 +2,5 @@
|
||||
# Makefile for the D-Link network device drivers.
|
||||
#
|
||||
|
||||
obj-$(CONFIG_DE600) += de600.o
|
||||
obj-$(CONFIG_DE620) += de620.o
|
||||
obj-$(CONFIG_DL2K) += dl2k.o
|
||||
obj-$(CONFIG_SUNDANCE) += sundance.o
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,168 +0,0 @@
|
||||
/**************************************************
|
||||
* *
|
||||
* Definition of D-Link Ethernet Pocket adapter *
|
||||
* *
|
||||
**************************************************/
|
||||
/*
|
||||
* D-Link Ethernet pocket adapter ports
|
||||
*/
|
||||
/*
|
||||
* OK, so I'm cheating, but there are an awful lot of
|
||||
* reads and writes in order to get anything in and out
|
||||
* of the DE-600 with 4 bits at a time in the parallel port,
|
||||
* so every saved instruction really helps :-)
|
||||
*/
|
||||
|
||||
#ifndef DE600_IO
|
||||
#define DE600_IO 0x378
|
||||
#endif
|
||||
|
||||
#define DATA_PORT (DE600_IO)
|
||||
#define STATUS_PORT (DE600_IO + 1)
|
||||
#define COMMAND_PORT (DE600_IO + 2)
|
||||
|
||||
#ifndef DE600_IRQ
|
||||
#define DE600_IRQ 7
|
||||
#endif
|
||||
/*
|
||||
* It really should look like this, and autoprobing as well...
|
||||
*
|
||||
#define DATA_PORT (dev->base_addr + 0)
|
||||
#define STATUS_PORT (dev->base_addr + 1)
|
||||
#define COMMAND_PORT (dev->base_addr + 2)
|
||||
#define DE600_IRQ dev->irq
|
||||
*/
|
||||
|
||||
/*
|
||||
* D-Link COMMAND_PORT commands
|
||||
*/
|
||||
#define SELECT_NIC 0x04 /* select Network Interface Card */
|
||||
#define SELECT_PRN 0x1c /* select Printer */
|
||||
#define NML_PRN 0xec /* normal Printer situation */
|
||||
#define IRQEN 0x10 /* enable IRQ line */
|
||||
|
||||
/*
|
||||
* D-Link STATUS_PORT
|
||||
*/
|
||||
#define RX_BUSY 0x80
|
||||
#define RX_GOOD 0x40
|
||||
#define TX_FAILED16 0x10
|
||||
#define TX_BUSY 0x08
|
||||
|
||||
/*
|
||||
* D-Link DATA_PORT commands
|
||||
* command in low 4 bits
|
||||
* data in high 4 bits
|
||||
* select current data nibble with HI_NIBBLE bit
|
||||
*/
|
||||
#define WRITE_DATA 0x00 /* write memory */
|
||||
#define READ_DATA 0x01 /* read memory */
|
||||
#define STATUS 0x02 /* read status register */
|
||||
#define COMMAND 0x03 /* write command register (see COMMAND below) */
|
||||
#define NULL_COMMAND 0x04 /* null command */
|
||||
#define RX_LEN 0x05 /* read received packet length */
|
||||
#define TX_ADDR 0x06 /* set adapter transmit memory address */
|
||||
#define RW_ADDR 0x07 /* set adapter read/write memory address */
|
||||
#define HI_NIBBLE 0x08 /* read/write the high nibble of data,
|
||||
or-ed with rest of command */
|
||||
|
||||
/*
|
||||
* command register, accessed through DATA_PORT with low bits = COMMAND
|
||||
*/
|
||||
#define RX_ALL 0x01 /* PROMISCUOUS */
|
||||
#define RX_BP 0x02 /* default: BROADCAST & PHYSICAL ADDRESS */
|
||||
#define RX_MBP 0x03 /* MULTICAST, BROADCAST & PHYSICAL ADDRESS */
|
||||
|
||||
#define TX_ENABLE 0x04 /* bit 2 */
|
||||
#define RX_ENABLE 0x08 /* bit 3 */
|
||||
|
||||
#define RESET 0x80 /* set bit 7 high */
|
||||
#define STOP_RESET 0x00 /* set bit 7 low */
|
||||
|
||||
/*
|
||||
* data to command register
|
||||
* (high 4 bits in write to DATA_PORT)
|
||||
*/
|
||||
#define RX_PAGE2_SELECT 0x10 /* bit 4, only 2 pages to select */
|
||||
#define RX_BASE_PAGE 0x20 /* bit 5, always set when specifying RX_ADDR */
|
||||
#define FLIP_IRQ 0x40 /* bit 6 */
|
||||
|
||||
/*
|
||||
* D-Link adapter internal memory:
|
||||
*
|
||||
* 0-2K 1:st transmit page (send from pointer up to 2K)
|
||||
* 2-4K 2:nd transmit page (send from pointer up to 4K)
|
||||
*
|
||||
* 4-6K 1:st receive page (data from 4K upwards)
|
||||
* 6-8K 2:nd receive page (data from 6K upwards)
|
||||
*
|
||||
* 8K+ Adapter ROM (contains magic code and last 3 bytes of Ethernet address)
|
||||
*/
|
||||
#define MEM_2K 0x0800 /* 2048 */
|
||||
#define MEM_4K 0x1000 /* 4096 */
|
||||
#define MEM_6K 0x1800 /* 6144 */
|
||||
#define NODE_ADDRESS 0x2000 /* 8192 */
|
||||
|
||||
#define RUNT 60 /* Too small Ethernet packet */
|
||||
|
||||
/**************************************************
|
||||
* *
|
||||
* End of definition *
|
||||
* *
|
||||
**************************************************/
|
||||
|
||||
/*
|
||||
* Index to functions, as function prototypes.
|
||||
*/
|
||||
/* Routines used internally. (See "convenience macros") */
|
||||
static u8 de600_read_status(struct net_device *dev);
|
||||
static u8 de600_read_byte(unsigned char type, struct net_device *dev);
|
||||
|
||||
/* Put in the device structure. */
|
||||
static int de600_open(struct net_device *dev);
|
||||
static int de600_close(struct net_device *dev);
|
||||
static int de600_start_xmit(struct sk_buff *skb, struct net_device *dev);
|
||||
|
||||
/* Dispatch from interrupts. */
|
||||
static irqreturn_t de600_interrupt(int irq, void *dev_id);
|
||||
static int de600_tx_intr(struct net_device *dev, int irq_status);
|
||||
static void de600_rx_intr(struct net_device *dev);
|
||||
|
||||
/* Initialization */
|
||||
static void trigger_interrupt(struct net_device *dev);
|
||||
static int adapter_init(struct net_device *dev);
|
||||
|
||||
/*
|
||||
* Convenience macros/functions for D-Link adapter
|
||||
*/
|
||||
|
||||
#define select_prn() outb_p(SELECT_PRN, COMMAND_PORT); DE600_SLOW_DOWN
|
||||
#define select_nic() outb_p(SELECT_NIC, COMMAND_PORT); DE600_SLOW_DOWN
|
||||
|
||||
/* Thanks for hints from Mark Burton <markb@ordern.demon.co.uk> */
|
||||
#define de600_put_byte(data) ( \
|
||||
outb_p(((data) << 4) | WRITE_DATA , DATA_PORT), \
|
||||
outb_p(((data) & 0xf0) | WRITE_DATA | HI_NIBBLE, DATA_PORT))
|
||||
|
||||
/*
|
||||
* The first two outb_p()'s below could perhaps be deleted if there
|
||||
* would be more delay in the last two. Not certain about it yet...
|
||||
*/
|
||||
#define de600_put_command(cmd) ( \
|
||||
outb_p(( rx_page << 4) | COMMAND , DATA_PORT), \
|
||||
outb_p(( rx_page & 0xf0) | COMMAND | HI_NIBBLE, DATA_PORT), \
|
||||
outb_p(((rx_page | cmd) << 4) | COMMAND , DATA_PORT), \
|
||||
outb_p(((rx_page | cmd) & 0xf0) | COMMAND | HI_NIBBLE, DATA_PORT))
|
||||
|
||||
#define de600_setup_address(addr,type) ( \
|
||||
outb_p((((addr) << 4) & 0xf0) | type , DATA_PORT), \
|
||||
outb_p(( (addr) & 0xf0) | type | HI_NIBBLE, DATA_PORT), \
|
||||
outb_p((((addr) >> 4) & 0xf0) | type , DATA_PORT), \
|
||||
outb_p((((addr) >> 8) & 0xf0) | type | HI_NIBBLE, DATA_PORT))
|
||||
|
||||
#define rx_page_adr() ((rx_page & RX_PAGE2_SELECT)?(MEM_6K):(MEM_4K))
|
||||
|
||||
/* Flip bit, only 2 pages */
|
||||
#define next_rx_page() (rx_page ^= RX_PAGE2_SELECT)
|
||||
|
||||
#define tx_page_adr(a) (((a) + 1) * MEM_2K)
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,117 +0,0 @@
|
||||
/*********************************************************
|
||||
* *
|
||||
* Definition of D-Link DE-620 Ethernet Pocket adapter *
|
||||
* *
|
||||
*********************************************************/
|
||||
|
||||
/* DE-620's CMD port Command */
|
||||
#define CS0 0x08 /* 1->0 command strobe */
|
||||
#define ICEN 0x04 /* 0=enable DL3520 host interface */
|
||||
#define DS0 0x02 /* 1->0 data strobe 0 */
|
||||
#define DS1 0x01 /* 1->0 data strobe 1 */
|
||||
|
||||
#define WDIR 0x20 /* general 0=read 1=write */
|
||||
#define RDIR 0x00 /* (not 100% confirm ) */
|
||||
#define PS2WDIR 0x00 /* ps/2 mode 1=read, 0=write */
|
||||
#define PS2RDIR 0x20
|
||||
|
||||
#define IRQEN 0x10 /* 1 = enable printer IRQ line */
|
||||
#define SELECTIN 0x08 /* 1 = select printer */
|
||||
#define INITP 0x04 /* 0 = initial printer */
|
||||
#define AUTOFEED 0x02 /* 1 = printer auto form feed */
|
||||
#define STROBE 0x01 /* 0->1 data strobe */
|
||||
|
||||
#define RESET 0x08
|
||||
#define NIS0 0x20 /* 0 = BNC, 1 = UTP */
|
||||
#define NCTL0 0x10
|
||||
|
||||
/* DE-620 DIC Command */
|
||||
#define W_DUMMY 0x00 /* DIC reserved command */
|
||||
#define W_CR 0x20 /* DIC write command register */
|
||||
#define W_NPR 0x40 /* DIC write Next Page Register */
|
||||
#define W_TBR 0x60 /* DIC write Tx Byte Count 1 reg */
|
||||
#define W_RSA 0x80 /* DIC write Remote Start Addr 1 */
|
||||
|
||||
/* DE-620's STAT port bits 7-4 */
|
||||
#define EMPTY 0x80 /* 1 = receive buffer empty */
|
||||
#define INTLEVEL 0x40 /* 1 = interrupt level is high */
|
||||
#define TXBF1 0x20 /* 1 = transmit buffer 1 is in use */
|
||||
#define TXBF0 0x10 /* 1 = transmit buffer 0 is in use */
|
||||
#define READY 0x08 /* 1 = h/w ready to accept cmd/data */
|
||||
|
||||
/* IDC 1 Command */
|
||||
#define W_RSA1 0xa0 /* write remote start address 1 */
|
||||
#define W_RSA0 0xa1 /* write remote start address 0 */
|
||||
#define W_NPRF 0xa2 /* write next page register NPR15-NPR8 */
|
||||
#define W_DFR 0xa3 /* write delay factor register */
|
||||
#define W_CPR 0xa4 /* write current page register */
|
||||
#define W_SPR 0xa5 /* write start page register */
|
||||
#define W_EPR 0xa6 /* write end page register */
|
||||
#define W_SCR 0xa7 /* write system configuration register */
|
||||
#define W_TCR 0xa8 /* write Transceiver Configuration reg */
|
||||
#define W_EIP 0xa9 /* write EEPM Interface port */
|
||||
#define W_PAR0 0xaa /* write physical address register 0 */
|
||||
#define W_PAR1 0xab /* write physical address register 1 */
|
||||
#define W_PAR2 0xac /* write physical address register 2 */
|
||||
#define W_PAR3 0xad /* write physical address register 3 */
|
||||
#define W_PAR4 0xae /* write physical address register 4 */
|
||||
#define W_PAR5 0xaf /* write physical address register 5 */
|
||||
|
||||
/* IDC 2 Command */
|
||||
#define R_STS 0xc0 /* read status register */
|
||||
#define R_CPR 0xc1 /* read current page register */
|
||||
#define R_BPR 0xc2 /* read boundary page register */
|
||||
#define R_TDR 0xc3 /* read time domain reflectometry reg */
|
||||
|
||||
/* STATUS Register */
|
||||
#define EEDI 0x80 /* EEPM DO pin */
|
||||
#define TXSUC 0x40 /* tx success */
|
||||
#define T16 0x20 /* tx fail 16 times */
|
||||
#define TS1 0x40 /* 0=Tx success, 1=T16 */
|
||||
#define TS0 0x20 /* 0=Tx success, 1=T16 */
|
||||
#define RXGOOD 0x10 /* rx a good packet */
|
||||
#define RXCRC 0x08 /* rx a CRC error packet */
|
||||
#define RXSHORT 0x04 /* rx a short packet */
|
||||
#define COLS 0x02 /* coaxial collision status */
|
||||
#define LNKS 0x01 /* UTP link status */
|
||||
|
||||
/* Command Register */
|
||||
#define CLEAR 0x10 /* reset part of hardware */
|
||||
#define NOPER 0x08 /* No Operation */
|
||||
#define RNOP 0x08
|
||||
#define RRA 0x06 /* After RR then auto-advance NPR & BPR(=NPR-1) */
|
||||
#define RRN 0x04 /* Normal Remote Read mode */
|
||||
#define RW1 0x02 /* Remote Write tx buffer 1 ( page 6 - 11 ) */
|
||||
#define RW0 0x00 /* Remote Write tx buffer 0 ( page 0 - 5 ) */
|
||||
#define TXEN 0x01 /* 0->1 tx enable */
|
||||
|
||||
/* System Configuration Register */
|
||||
#define TESTON 0x80 /* test host data transfer reliability */
|
||||
#define SLEEP 0x40 /* sleep mode */
|
||||
#if 0
|
||||
#define FASTMODE 0x04 /* fast mode for intel 82360SL fast mode */
|
||||
#define BYTEMODE 0x02 /* byte mode */
|
||||
#else
|
||||
#define FASTMODE 0x20 /* fast mode for intel 82360SL fast mode */
|
||||
#define BYTEMODE 0x10 /* byte mode */
|
||||
#endif
|
||||
#define NIBBLEMODE 0x00 /* nibble mode */
|
||||
#define IRQINV 0x08 /* turn off IRQ line inverter */
|
||||
#define IRQNML 0x00 /* turn on IRQ line inverter */
|
||||
#define INTON 0x04
|
||||
#define AUTOFFSET 0x02 /* auto shift address to TPR+12 */
|
||||
#define AUTOTX 0x01 /* auto tx when leave RW mode */
|
||||
|
||||
/* Transceiver Configuration Register */
|
||||
#define JABBER 0x80 /* generate jabber condition */
|
||||
#define TXSUCINT 0x40 /* enable tx success interrupt */
|
||||
#define T16INT 0x20 /* enable T16 interrupt */
|
||||
#define RXERRPKT 0x10 /* accept CRC error or short packet */
|
||||
#define EXTERNALB2 0x0C /* external loopback 2 */
|
||||
#define EXTERNALB1 0x08 /* external loopback 1 */
|
||||
#define INTERNALB 0x04 /* internal loopback */
|
||||
#define NMLOPERATE 0x00 /* normal operation */
|
||||
#define RXPBM 0x03 /* rx physical, broadcast, multicast */
|
||||
#define RXPB 0x02 /* rx physical, broadcast */
|
||||
#define RXALL 0x01 /* rx all packet */
|
||||
#define RXOFF 0x00 /* rx disable */
|
||||
Reference in New Issue
Block a user