Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros
de600.h File Reference

Go to the source code of this file.

Macros

#define DE600_IO   0x378
 
#define DATA_PORT   (DE600_IO)
 
#define STATUS_PORT   (DE600_IO + 1)
 
#define COMMAND_PORT   (DE600_IO + 2)
 
#define DE600_IRQ   7
 
#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 */
 
#define RX_BUSY   0x80
 
#define RX_GOOD   0x40
 
#define TX_FAILED16   0x10
 
#define TX_BUSY   0x08
 
#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
 
#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 */
 
#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 */
 
#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 */
 
#define select_prn()   outb_p(SELECT_PRN, COMMAND_PORT); DE600_SLOW_DOWN
 
#define select_nic()   outb_p(SELECT_NIC, COMMAND_PORT); DE600_SLOW_DOWN
 
#define de600_put_byte(data)
 
#define de600_put_command(cmd)
 
#define de600_setup_address(addr, type)
 
#define rx_page_adr()   ((rx_page & RX_PAGE2_SELECT)?(MEM_6K):(MEM_4K))
 
#define next_rx_page()   (rx_page ^= RX_PAGE2_SELECT)
 
#define tx_page_adr(a)   (((a) + 1) * MEM_2K)
 

Macro Definition Documentation

#define COMMAND   0x03 /* write command register (see COMMAND below) */

Definition at line 61 of file de600.h.

#define COMMAND_PORT   (DE600_IO + 2)

Definition at line 22 of file de600.h.

#define DATA_PORT   (DE600_IO)

Definition at line 20 of file de600.h.

#define DE600_IO   0x378

Definition at line 17 of file de600.h.

#define DE600_IRQ   7

Definition at line 25 of file de600.h.

#define de600_put_byte (   data)
Value:
( \
outb_p(((data) << 4) | WRITE_DATA , DATA_PORT), \
outb_p(((data) & 0xf0) | WRITE_DATA | HI_NIBBLE, DATA_PORT))

Definition at line 142 of file de600.h.

#define de600_put_command (   cmd)
Value:
( \
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))

Definition at line 150 of file de600.h.

#define de600_setup_address (   addr,
  type 
)
Value:
( \
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))

Definition at line 156 of file de600.h.

#define FLIP_IRQ   0x40 /* bit 6 */

Definition at line 87 of file de600.h.

#define HI_NIBBLE
Value:
0x08 /* read/write the high nibble of data,
or-ed with rest of command */

Definition at line 66 of file de600.h.

#define IRQEN   0x10 /* enable IRQ line */

Definition at line 42 of file de600.h.

#define MEM_2K   0x0800 /* 2048 */

Definition at line 100 of file de600.h.

#define MEM_4K   0x1000 /* 4096 */

Definition at line 101 of file de600.h.

#define MEM_6K   0x1800 /* 6144 */

Definition at line 102 of file de600.h.

#define next_rx_page ( )    (rx_page ^= RX_PAGE2_SELECT)

Definition at line 165 of file de600.h.

#define NML_PRN   0xec /* normal Printer situation */

Definition at line 41 of file de600.h.

#define NODE_ADDRESS   0x2000 /* 8192 */

Definition at line 103 of file de600.h.

#define NULL_COMMAND   0x04 /* null command */

Definition at line 62 of file de600.h.

#define READ_DATA   0x01 /* read memory */

Definition at line 59 of file de600.h.

#define RESET   0x80 /* set bit 7 high */

Definition at line 78 of file de600.h.

#define RUNT   60 /* Too small Ethernet packet */

Definition at line 105 of file de600.h.

#define RW_ADDR   0x07 /* set adapter read/write memory address */

Definition at line 65 of file de600.h.

#define RX_ALL   0x01 /* PROMISCUOUS */

Definition at line 71 of file de600.h.

#define RX_BASE_PAGE   0x20 /* bit 5, always set when specifying RX_ADDR */

Definition at line 86 of file de600.h.

#define RX_BP   0x02 /* default: BROADCAST & PHYSICAL ADDRESS */

Definition at line 72 of file de600.h.

#define RX_BUSY   0x80

Definition at line 47 of file de600.h.

#define RX_ENABLE   0x08 /* bit 3 */

Definition at line 76 of file de600.h.

#define RX_GOOD   0x40

Definition at line 48 of file de600.h.

#define RX_LEN   0x05 /* read received packet length */

Definition at line 63 of file de600.h.

#define RX_MBP   0x03 /* MULTICAST, BROADCAST & PHYSICAL ADDRESS */

Definition at line 73 of file de600.h.

#define RX_PAGE2_SELECT   0x10 /* bit 4, only 2 pages to select */

Definition at line 85 of file de600.h.

#define rx_page_adr ( )    ((rx_page & RX_PAGE2_SELECT)?(MEM_6K):(MEM_4K))

Definition at line 162 of file de600.h.

#define SELECT_NIC   0x04 /* select Network Interface Card */

Definition at line 39 of file de600.h.

#define select_nic ( )    outb_p(SELECT_NIC, COMMAND_PORT); DE600_SLOW_DOWN

Definition at line 139 of file de600.h.

#define SELECT_PRN   0x1c /* select Printer */

Definition at line 40 of file de600.h.

#define select_prn ( )    outb_p(SELECT_PRN, COMMAND_PORT); DE600_SLOW_DOWN

Definition at line 138 of file de600.h.

#define STATUS   0x02 /* read status register */

Definition at line 60 of file de600.h.

#define STATUS_PORT   (DE600_IO + 1)

Definition at line 21 of file de600.h.

#define STOP_RESET   0x00 /* set bit 7 low */

Definition at line 79 of file de600.h.

#define TX_ADDR   0x06 /* set adapter transmit memory address */

Definition at line 64 of file de600.h.

#define TX_BUSY   0x08

Definition at line 50 of file de600.h.

#define TX_ENABLE   0x04 /* bit 2 */

Definition at line 75 of file de600.h.

#define TX_FAILED16   0x10

Definition at line 49 of file de600.h.

#define tx_page_adr (   a)    (((a) + 1) * MEM_2K)

Definition at line 167 of file de600.h.

#define WRITE_DATA   0x00 /* write memory */

Definition at line 58 of file de600.h.