/drivers/cpuidle/

option> The LITMUS^RT kernel.Bjoern Brandenburg
aboutsummaryrefslogblamecommitdiffstats
path: root/drivers/net/atp.h
blob: 0edc642c2c2f4c1d9a90d94d1db07c1a63c0a1bd (plain) (tree)


































































































































































































































































                                                                                        
/* Linux header file for the ATP pocket ethernet adapter. */
/* v1.09 8/9/2000 becker@scyld.com. */

#include <linux/if_ether.h>
#include <linux/types.h>

/* The header prepended to received packets. */
struct rx_header {
    ushort pad;			/* Pad. */
    ushort rx_count;
    ushort rx_status;		/* Unknown bit assignments :-<.  */
    ushort cur_addr;		/* Apparently the current buffer address(?) */
};

#define PAR_DATA	0
#define PAR_STATUS	1
#define PAR_CONTROL 2

enum chip_type { RTL8002, RTL8012 };

#define Ctrl_LNibRead	0x08	/* LP_PSELECP */
#define Ctrl_HNibRead	0
#define Ctrl_LNibWrite	0x08	/* LP_PSELECP */
#define Ctrl_HNibWrite	0
#define Ctrl_SelData	0x04	/* LP_PINITP */
#define Ctrl_IRQEN	0x10	/* LP_PINTEN */

#define EOW	0xE0
#define EOC	0xE0
#define WrAddr	0x40	/* Set address of EPLC read, write register. */
#define RdAddr	0xC0
#define HNib	0x10

enum page0_regs
{
    /* The first six registers hold the ethernet physical station address. */
    PAR0 = 0, PAR1 = 1, PAR2 = 2, PAR3 = 3, PAR4 = 4, PAR5 = 5,
    TxCNT0 = 6, TxCNT1 = 7,		/* The transmit byte count. */
    TxSTAT = 8, RxSTAT = 9,		/* Tx and Rx status. */
    ISR = 10, IMR = 11,			/* Interrupt status and mask. */
    CMR1 = 12,				/* Command register 1. */
    CMR2 = 13,				/* Command register 2. */
    MODSEL = 14,			/* Mode select register. */
    MAR = 14,				/* Memory address register (?). */
    CMR2_h = 0x1d, };

enum eepage_regs
{ PROM_CMD = 6, PROM_DATA = 7 };	/* Note that PROM_CMD is in the "high" bits. */


#define ISR_TxOK	0x01
#define ISR_RxOK	0x04