Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros
smc91x.h File Reference
#include <linux/smc91x.h>

Go to the source code of this file.

Data Structures

struct  smc_local
 

Macros

#define SMC_CAN_USE_8BIT   1
 
#define SMC_CAN_USE_16BIT   1
 
#define SMC_CAN_USE_32BIT   1
 
#define SMC_NOWAIT   1
 
#define SMC_IO_SHIFT   (lp->io_shift)
 
#define SMC_inb(a, r)   readb((a) + (r))
 
#define SMC_inw(a, r)   readw((a) + (r))
 
#define SMC_inl(a, r)   readl((a) + (r))
 
#define SMC_outb(v, a, r)   writeb(v, (a) + (r))
 
#define SMC_outw(v, a, r)   writew(v, (a) + (r))
 
#define SMC_outl(v, a, r)   writel(v, (a) + (r))
 
#define SMC_insw(a, r, p, l)   readsw((a) + (r), p, l)
 
#define SMC_outsw(a, r, p, l)   writesw((a) + (r), p, l)
 
#define SMC_insl(a, r, p, l)   readsl((a) + (r), p, l)
 
#define SMC_outsl(a, r, p, l)   writesl((a) + (r), p, l)
 
#define RPC_LSA_DEFAULT   RPC_LED_100_10
 
#define RPC_LSB_DEFAULT   RPC_LED_TX_RX
 
#define SMC_8BIT(p)   ((p)->cfg.flags & SMC91X_USE_8BIT)
 
#define SMC_16BIT(p)   ((p)->cfg.flags & SMC91X_USE_16BIT)
 
#define SMC_32BIT(p)   ((p)->cfg.flags & SMC91X_USE_32BIT)
 
#define SMC_insb(a, r, p, l)   BUG()
 
#define SMC_outsb(a, r, p, l)   BUG()
 
#define SMC_CAN_USE_DATACS   0
 
#define SMC_IRQ_FLAGS   IRQF_TRIGGER_RISING
 
#define SMC_INTERRUPT_PREAMBLE
 
#define SMC_IO_EXTENT   (16 << SMC_IO_SHIFT)
 
#define SMC_DATA_EXTENT   (4)
 
#define BANK_SELECT   (14 << SMC_IO_SHIFT)
 
#define TCR_REG(lp)   SMC_REG(lp, 0x0000, 0)
 
#define TCR_ENABLE   0x0001
 
#define TCR_LOOP   0x0002
 
#define TCR_FORCOL   0x0004
 
#define TCR_PAD_EN   0x0080
 
#define TCR_NOCRC   0x0100
 
#define TCR_MON_CSN   0x0400
 
#define TCR_FDUPLX   0x0800
 
#define TCR_STP_SQET   0x1000
 
#define TCR_EPH_LOOP   0x2000
 
#define TCR_SWFDUP   0x8000
 
#define TCR_CLEAR   0 /* do NOTHING */
 
#define TCR_DEFAULT   (TCR_ENABLE | TCR_PAD_EN)
 
#define EPH_STATUS_REG(lp)   SMC_REG(lp, 0x0002, 0)
 
#define ES_TX_SUC   0x0001
 
#define ES_SNGL_COL   0x0002
 
#define ES_MUL_COL   0x0004
 
#define ES_LTX_MULT   0x0008
 
#define ES_16COL   0x0010
 
#define ES_SQET   0x0020
 
#define ES_LTXBRD   0x0040
 
#define ES_TXDEFR   0x0080
 
#define ES_LATCOL   0x0200
 
#define ES_LOSTCARR   0x0400
 
#define ES_EXC_DEF   0x0800
 
#define ES_CTR_ROL   0x1000
 
#define ES_LINK_OK   0x4000
 
#define ES_TXUNRN   0x8000
 
#define RCR_REG(lp)   SMC_REG(lp, 0x0004, 0)
 
#define RCR_RX_ABORT   0x0001
 
#define RCR_PRMS   0x0002
 
#define RCR_ALMUL   0x0004
 
#define RCR_RXEN   0x0100
 
#define RCR_STRIP_CRC   0x0200
 
#define RCR_ABORT_ENB   0x0200
 
#define RCR_FILT_CAR   0x0400
 
#define RCR_SOFTRST   0x8000
 
#define RCR_DEFAULT   (RCR_STRIP_CRC | RCR_RXEN)
 
#define RCR_CLEAR   0x0
 
#define COUNTER_REG(lp)   SMC_REG(lp, 0x0006, 0)
 
#define MIR_REG(lp)   SMC_REG(lp, 0x0008, 0)
 
#define RPC_REG(lp)   SMC_REG(lp, 0x000A, 0)
 
#define RPC_SPEED   0x2000
 
#define RPC_DPLX   0x1000
 
#define RPC_ANEG   0x0800
 
#define RPC_LSXA_SHFT   5
 
#define RPC_LSXB_SHFT   2
 
#define RPC_DEFAULT   (RPC_ANEG | RPC_SPEED | RPC_DPLX)
 
#define BSR_REG   0x000E
 
#define CONFIG_REG(lp)   SMC_REG(lp, 0x0000, 1)
 
#define CONFIG_EXT_PHY   0x0200
 
#define CONFIG_GPCNTRL   0x0400
 
#define CONFIG_NO_WAIT   0x1000
 
#define CONFIG_EPH_POWER_EN   0x8000
 
#define CONFIG_DEFAULT   (CONFIG_EPH_POWER_EN)
 
#define BASE_REG(lp)   SMC_REG(lp, 0x0002, 1)
 
#define ADDR0_REG(lp)   SMC_REG(lp, 0x0004, 1)
 
#define ADDR1_REG(lp)   SMC_REG(lp, 0x0006, 1)
 
#define ADDR2_REG(lp)   SMC_REG(lp, 0x0008, 1)
 
#define GP_REG(lp)   SMC_REG(lp, 0x000A, 1)
 
#define CTL_REG(lp)   SMC_REG(lp, 0x000C, 1)
 
#define CTL_RCV_BAD   0x4000
 
#define CTL_AUTO_RELEASE   0x0800
 
#define CTL_LE_ENABLE   0x0080
 
#define CTL_CR_ENABLE   0x0040
 
#define CTL_TE_ENABLE   0x0020
 
#define CTL_EEPROM_SELECT   0x0004
 
#define CTL_RELOAD   0x0002
 
#define CTL_STORE   0x0001
 
#define MMU_CMD_REG(lp)   SMC_REG(lp, 0x0000, 2)
 
#define MC_BUSY   1
 
#define MC_NOP   (0<<5)
 
#define MC_ALLOC   (1<<5)
 
#define MC_RESET   (2<<5)
 
#define MC_REMOVE   (3<<5)
 
#define MC_RELEASE   (4<<5)
 
#define MC_FREEPKT   (5<<5)
 
#define MC_ENQUEUE   (6<<5)
 
#define MC_RSTTXFIFO   (7<<5)
 
#define PN_REG(lp)   SMC_REG(lp, 0x0002, 2)
 
#define AR_REG(lp)   SMC_REG(lp, 0x0003, 2)
 
#define AR_FAILED   0x80
 
#define TXFIFO_REG(lp)   SMC_REG(lp, 0x0004, 2)
 
#define TXFIFO_TEMPTY   0x80
 
#define RXFIFO_REG(lp)   SMC_REG(lp, 0x0005, 2)
 
#define RXFIFO_REMPTY   0x80
 
#define FIFO_REG(lp)   SMC_REG(lp, 0x0004, 2)
 
#define PTR_REG(lp)   SMC_REG(lp, 0x0006, 2)
 
#define PTR_RCV   0x8000
 
#define PTR_AUTOINC   0x4000
 
#define PTR_READ   0x2000
 
#define DATA_REG(lp)   SMC_REG(lp, 0x0008, 2)
 
#define INT_REG(lp)   SMC_REG(lp, 0x000C, 2)
 
#define IM_REG(lp)   SMC_REG(lp, 0x000D, 2)
 
#define IM_MDINT   0x80
 
#define IM_ERCV_INT   0x40
 
#define IM_EPH_INT   0x20
 
#define IM_RX_OVRN_INT   0x10
 
#define IM_ALLOC_INT   0x08
 
#define IM_TX_EMPTY_INT   0x04
 
#define IM_TX_INT   0x02
 
#define IM_RCV_INT   0x01
 
#define MCAST_REG1(lp)   SMC_REG(lp, 0x0000, 3)
 
#define MCAST_REG2(lp)   SMC_REG(lp, 0x0002, 3)
 
#define MCAST_REG3(lp)   SMC_REG(lp, 0x0004, 3)
 
#define MCAST_REG4(lp)   SMC_REG(lp, 0x0006, 3)
 
#define MII_REG(lp)   SMC_REG(lp, 0x0008, 3)
 
#define MII_MSK_CRS100   0x4000
 
#define MII_MDOE   0x0008
 
#define MII_MCLK   0x0004
 
#define MII_MDI   0x0002
 
#define MII_MDO   0x0001
 
#define REV_REG(lp)   SMC_REG(lp, 0x000A, 3)
 
#define ERCV_REG(lp)   SMC_REG(lp, 0x000C, 3)
 
#define ERCV_RCV_DISCRD   0x0080
 
#define ERCV_THRESHOLD   0x001F
 
#define EXT_REG(lp)   SMC_REG(lp, 0x0000, 7)
 
#define CHIP_9192   3
 
#define CHIP_9194   4
 
#define CHIP_9195   5
 
#define CHIP_9196   6
 
#define CHIP_91100   7
 
#define CHIP_91100FD   8
 
#define CHIP_91111FD   9
 
#define RS_ALGNERR   0x8000
 
#define RS_BRODCAST   0x4000
 
#define RS_BADCRC   0x2000
 
#define RS_ODDFRAME   0x1000
 
#define RS_TOOLONG   0x0800
 
#define RS_TOOSHORT   0x0400
 
#define RS_MULTICAST   0x0001
 
#define RS_ERRORS   (RS_ALGNERR | RS_BADCRC | RS_TOOLONG | RS_TOOSHORT)
 
#define PHY_LAN83C183   0x0016f840
 
#define PHY_LAN83C180   0x02821c50
 
#define PHY_CFG1_REG   0x10
 
#define PHY_CFG1_LNKDIS   0x8000
 
#define PHY_CFG1_XMTDIS   0x4000
 
#define PHY_CFG1_XMTPDN   0x2000
 
#define PHY_CFG1_BYPSCR   0x0400
 
#define PHY_CFG1_UNSCDS   0x0200
 
#define PHY_CFG1_EQLZR   0x0100
 
#define PHY_CFG1_CABLE   0x0080
 
#define PHY_CFG1_RLVL0   0x0040
 
#define PHY_CFG1_TLVL_SHIFT   2
 
#define PHY_CFG1_TLVL_MASK   0x003C
 
#define PHY_CFG1_TRF_MASK   0x0003
 
#define PHY_CFG2_REG   0x11
 
#define PHY_CFG2_APOLDIS   0x0020
 
#define PHY_CFG2_JABDIS   0x0010
 
#define PHY_CFG2_MREG   0x0008
 
#define PHY_CFG2_INTMDIO   0x0004
 
#define PHY_INT_REG   0x12
 
#define PHY_INT_INT   0x8000
 
#define PHY_INT_LNKFAIL   0x4000
 
#define PHY_INT_LOSSSYNC   0x2000
 
#define PHY_INT_CWRD   0x1000
 
#define PHY_INT_SSD   0x0800
 
#define PHY_INT_ESD   0x0400
 
#define PHY_INT_RPOL   0x0200
 
#define PHY_INT_JAB   0x0100
 
#define PHY_INT_SPDDET   0x0080
 
#define PHY_INT_DPLXDET   0x0040
 
#define PHY_MASK_REG   0x13
 
#define ECOR   0x8000
 
#define ECOR_RESET   0x80
 
#define ECOR_LEVEL_IRQ   0x40
 
#define ECOR_WR_ATTRIB   0x04
 
#define ECOR_ENABLE   0x01
 
#define ECSR   0x8002
 
#define ECSR_IOIS8   0x20
 
#define ECSR_PWRDWN   0x04
 
#define ECSR_INT   0x02
 
#define ATTRIB_SIZE   ((64*1024) << SMC_IO_SHIFT)
 
#define SMC_REG(lp, reg, bank)   (reg<<SMC_IO_SHIFT)
 
#define SMC_MUST_ALIGN_WRITE(lp)   SMC_32BIT(lp)
 
#define SMC_GET_PN(lp)
 
#define SMC_SET_PN(lp, x)
 
#define SMC_GET_AR(lp)
 
#define SMC_GET_TXFIFO(lp)
 
#define SMC_GET_RXFIFO(lp)
 
#define SMC_GET_INT(lp)
 
#define SMC_ACK_INT(lp, x)
 
#define SMC_GET_INT_MASK(lp)
 
#define SMC_SET_INT_MASK(lp, x)
 
#define SMC_CURRENT_BANK(lp)   SMC_inw(ioaddr, BANK_SELECT)
 
#define SMC_SELECT_BANK(lp, x)
 
#define SMC_GET_BASE(lp)   SMC_inw(ioaddr, BASE_REG(lp))
 
#define SMC_SET_BASE(lp, x)   SMC_outw(x, ioaddr, BASE_REG(lp))
 
#define SMC_GET_CONFIG(lp)   SMC_inw(ioaddr, CONFIG_REG(lp))
 
#define SMC_SET_CONFIG(lp, x)   SMC_outw(x, ioaddr, CONFIG_REG(lp))
 
#define SMC_GET_COUNTER(lp)   SMC_inw(ioaddr, COUNTER_REG(lp))
 
#define SMC_GET_CTL(lp)   SMC_inw(ioaddr, CTL_REG(lp))
 
#define SMC_SET_CTL(lp, x)   SMC_outw(x, ioaddr, CTL_REG(lp))
 
#define SMC_GET_MII(lp)   SMC_inw(ioaddr, MII_REG(lp))
 
#define SMC_GET_GP(lp)   SMC_inw(ioaddr, GP_REG(lp))
 
#define SMC_SET_GP(lp, x)
 
#define SMC_SET_MII(lp, x)   SMC_outw(x, ioaddr, MII_REG(lp))
 
#define SMC_GET_MIR(lp)   SMC_inw(ioaddr, MIR_REG(lp))
 
#define SMC_SET_MIR(lp, x)   SMC_outw(x, ioaddr, MIR_REG(lp))
 
#define SMC_GET_MMU_CMD(lp)   SMC_inw(ioaddr, MMU_CMD_REG(lp))
 
#define SMC_SET_MMU_CMD(lp, x)   SMC_outw(x, ioaddr, MMU_CMD_REG(lp))
 
#define SMC_GET_FIFO(lp)   SMC_inw(ioaddr, FIFO_REG(lp))
 
#define SMC_GET_PTR(lp)   SMC_inw(ioaddr, PTR_REG(lp))
 
#define SMC_SET_PTR(lp, x)
 
#define SMC_GET_EPH_STATUS(lp)   SMC_inw(ioaddr, EPH_STATUS_REG(lp))
 
#define SMC_GET_RCR(lp)   SMC_inw(ioaddr, RCR_REG(lp))
 
#define SMC_SET_RCR(lp, x)   SMC_outw(x, ioaddr, RCR_REG(lp))
 
#define SMC_GET_REV(lp)   SMC_inw(ioaddr, REV_REG(lp))
 
#define SMC_GET_RPC(lp)   SMC_inw(ioaddr, RPC_REG(lp))
 
#define SMC_SET_RPC(lp, x)
 
#define SMC_GET_TCR(lp)   SMC_inw(ioaddr, TCR_REG(lp))
 
#define SMC_SET_TCR(lp, x)   SMC_outw(x, ioaddr, TCR_REG(lp))
 
#define SMC_GET_MAC_ADDR(lp, addr)
 
#define SMC_SET_MAC_ADDR(lp, addr)
 
#define SMC_SET_MCAST(lp, x)
 
#define SMC_PUT_PKT_HDR(lp, status, length)
 
#define SMC_GET_PKT_HDR(lp, status, length)
 
#define SMC_PUSH_DATA(lp, p, l)
 
#define SMC_PULL_DATA(lp, p, l)
 

Macro Definition Documentation

#define ADDR0_REG (   lp)    SMC_REG(lp, 0x0004, 1)

Definition at line 657 of file smc91x.h.

#define ADDR1_REG (   lp)    SMC_REG(lp, 0x0006, 1)

Definition at line 658 of file smc91x.h.

#define ADDR2_REG (   lp)    SMC_REG(lp, 0x0008, 1)

Definition at line 659 of file smc91x.h.

#define AR_FAILED   0x80

Definition at line 702 of file smc91x.h.

#define AR_REG (   lp)    SMC_REG(lp, 0x0003, 2)

Definition at line 701 of file smc91x.h.

#define ATTRIB_SIZE   ((64*1024) << SMC_IO_SHIFT)

Definition at line 889 of file smc91x.h.

#define BANK_SELECT   (14 << SMC_IO_SHIFT)

Definition at line 544 of file smc91x.h.

#define BASE_REG (   lp)    SMC_REG(lp, 0x0002, 1)

Definition at line 652 of file smc91x.h.

#define BSR_REG   0x000E

Definition at line 635 of file smc91x.h.

#define CHIP_91100   7

Definition at line 789 of file smc91x.h.

#define CHIP_91100FD   8

Definition at line 790 of file smc91x.h.

#define CHIP_91111FD   9

Definition at line 791 of file smc91x.h.

#define CHIP_9192   3

Definition at line 785 of file smc91x.h.

#define CHIP_9194   4

Definition at line 786 of file smc91x.h.

#define CHIP_9195   5

Definition at line 787 of file smc91x.h.

#define CHIP_9196   6

Definition at line 788 of file smc91x.h.

#define CONFIG_DEFAULT   (CONFIG_EPH_POWER_EN)

Definition at line 647 of file smc91x.h.

#define CONFIG_EPH_POWER_EN   0x8000

Definition at line 644 of file smc91x.h.

#define CONFIG_EXT_PHY   0x0200

Definition at line 641 of file smc91x.h.

#define CONFIG_GPCNTRL   0x0400

Definition at line 642 of file smc91x.h.

#define CONFIG_NO_WAIT   0x1000

Definition at line 643 of file smc91x.h.

#define CONFIG_REG (   lp)    SMC_REG(lp, 0x0000, 1)

Definition at line 640 of file smc91x.h.

#define COUNTER_REG (   lp)    SMC_REG(lp, 0x0006, 0)

Definition at line 604 of file smc91x.h.

#define CTL_AUTO_RELEASE   0x0800

Definition at line 671 of file smc91x.h.

#define CTL_CR_ENABLE   0x0040

Definition at line 673 of file smc91x.h.

#define CTL_EEPROM_SELECT   0x0004

Definition at line 675 of file smc91x.h.

#define CTL_LE_ENABLE   0x0080

Definition at line 672 of file smc91x.h.

#define CTL_RCV_BAD   0x4000

Definition at line 670 of file smc91x.h.

#define CTL_REG (   lp)    SMC_REG(lp, 0x000C, 1)

Definition at line 669 of file smc91x.h.

#define CTL_RELOAD   0x0002

Definition at line 676 of file smc91x.h.

#define CTL_STORE   0x0001

Definition at line 677 of file smc91x.h.

#define CTL_TE_ENABLE   0x0020

Definition at line 674 of file smc91x.h.

#define DATA_REG (   lp)    SMC_REG(lp, 0x0008, 2)

Definition at line 727 of file smc91x.h.

#define ECOR   0x8000

Definition at line 878 of file smc91x.h.

#define ECOR_ENABLE   0x01

Definition at line 882 of file smc91x.h.

#define ECOR_LEVEL_IRQ   0x40

Definition at line 880 of file smc91x.h.

#define ECOR_RESET   0x80

Definition at line 879 of file smc91x.h.

#define ECOR_WR_ATTRIB   0x04

Definition at line 881 of file smc91x.h.

#define ECSR   0x8002

Definition at line 884 of file smc91x.h.

#define ECSR_INT   0x02

Definition at line 887 of file smc91x.h.

#define ECSR_IOIS8   0x20

Definition at line 885 of file smc91x.h.

#define ECSR_PWRDWN   0x04

Definition at line 886 of file smc91x.h.

#define EPH_STATUS_REG (   lp)    SMC_REG(lp, 0x0002, 0)

Definition at line 568 of file smc91x.h.

#define ERCV_RCV_DISCRD   0x0080

Definition at line 776 of file smc91x.h.

#define ERCV_REG (   lp)    SMC_REG(lp, 0x000C, 3)

Definition at line 775 of file smc91x.h.

#define ERCV_THRESHOLD   0x001F

Definition at line 777 of file smc91x.h.

#define ES_16COL   0x0010

Definition at line 573 of file smc91x.h.

#define ES_CTR_ROL   0x1000

Definition at line 580 of file smc91x.h.

#define ES_EXC_DEF   0x0800

Definition at line 579 of file smc91x.h.

#define ES_LATCOL   0x0200

Definition at line 577 of file smc91x.h.

#define ES_LINK_OK   0x4000

Definition at line 581 of file smc91x.h.

#define ES_LOSTCARR   0x0400

Definition at line 578 of file smc91x.h.

#define ES_LTX_MULT   0x0008

Definition at line 572 of file smc91x.h.

#define ES_LTXBRD   0x0040

Definition at line 575 of file smc91x.h.

#define ES_MUL_COL   0x0004

Definition at line 571 of file smc91x.h.

#define ES_SNGL_COL   0x0002

Definition at line 570 of file smc91x.h.

#define ES_SQET   0x0020

Definition at line 574 of file smc91x.h.

#define ES_TX_SUC   0x0001

Definition at line 569 of file smc91x.h.

#define ES_TXDEFR   0x0080

Definition at line 576 of file smc91x.h.

#define ES_TXUNRN   0x8000

Definition at line 582 of file smc91x.h.

#define EXT_REG (   lp)    SMC_REG(lp, 0x0000, 7)

Definition at line 782 of file smc91x.h.

#define FIFO_REG (   lp)    SMC_REG(lp, 0x0004, 2)

Definition at line 715 of file smc91x.h.

#define GP_REG (   lp)    SMC_REG(lp, 0x000A, 1)

Definition at line 664 of file smc91x.h.

#define IM_ALLOC_INT   0x08

Definition at line 742 of file smc91x.h.

#define IM_EPH_INT   0x20

Definition at line 740 of file smc91x.h.

#define IM_ERCV_INT   0x40

Definition at line 739 of file smc91x.h.

#define IM_MDINT   0x80

Definition at line 738 of file smc91x.h.

#define IM_RCV_INT   0x01

Definition at line 745 of file smc91x.h.

#define IM_REG (   lp)    SMC_REG(lp, 0x000D, 2)

Definition at line 737 of file smc91x.h.

#define IM_RX_OVRN_INT   0x10

Definition at line 741 of file smc91x.h.

#define IM_TX_EMPTY_INT   0x04

Definition at line 743 of file smc91x.h.

#define IM_TX_INT   0x02

Definition at line 744 of file smc91x.h.

#define INT_REG (   lp)    SMC_REG(lp, 0x000C, 2)

Definition at line 732 of file smc91x.h.

#define MC_ALLOC   (1<<5)

Definition at line 685 of file smc91x.h.

#define MC_BUSY   1

Definition at line 683 of file smc91x.h.

#define MC_ENQUEUE   (6<<5)

Definition at line 690 of file smc91x.h.

#define MC_FREEPKT   (5<<5)

Definition at line 689 of file smc91x.h.

#define MC_NOP   (0<<5)

Definition at line 684 of file smc91x.h.

#define MC_RELEASE   (4<<5)

Definition at line 688 of file smc91x.h.

#define MC_REMOVE   (3<<5)

Definition at line 687 of file smc91x.h.

#define MC_RESET   (2<<5)

Definition at line 686 of file smc91x.h.

#define MC_RSTTXFIFO   (7<<5)

Definition at line 691 of file smc91x.h.

#define MCAST_REG1 (   lp)    SMC_REG(lp, 0x0000, 3)

Definition at line 750 of file smc91x.h.

#define MCAST_REG2 (   lp)    SMC_REG(lp, 0x0002, 3)

Definition at line 751 of file smc91x.h.

#define MCAST_REG3 (   lp)    SMC_REG(lp, 0x0004, 3)

Definition at line 752 of file smc91x.h.

#define MCAST_REG4 (   lp)    SMC_REG(lp, 0x0006, 3)

Definition at line 753 of file smc91x.h.

#define MII_MCLK   0x0004

Definition at line 761 of file smc91x.h.

#define MII_MDI   0x0002

Definition at line 762 of file smc91x.h.

#define MII_MDO   0x0001

Definition at line 763 of file smc91x.h.

#define MII_MDOE   0x0008

Definition at line 760 of file smc91x.h.

#define MII_MSK_CRS100   0x4000

Definition at line 759 of file smc91x.h.

#define MII_REG (   lp)    SMC_REG(lp, 0x0008, 3)

Definition at line 758 of file smc91x.h.

#define MIR_REG (   lp)    SMC_REG(lp, 0x0008, 0)

Definition at line 609 of file smc91x.h.

#define MMU_CMD_REG (   lp)    SMC_REG(lp, 0x0000, 2)

Definition at line 682 of file smc91x.h.

#define PHY_CFG1_BYPSCR   0x0400

Definition at line 839 of file smc91x.h.

#define PHY_CFG1_CABLE   0x0080

Definition at line 842 of file smc91x.h.

#define PHY_CFG1_EQLZR   0x0100

Definition at line 841 of file smc91x.h.

#define PHY_CFG1_LNKDIS   0x8000

Definition at line 836 of file smc91x.h.

#define PHY_CFG1_REG   0x10

Definition at line 835 of file smc91x.h.

#define PHY_CFG1_RLVL0   0x0040

Definition at line 843 of file smc91x.h.

#define PHY_CFG1_TLVL_MASK   0x003C

Definition at line 845 of file smc91x.h.

#define PHY_CFG1_TLVL_SHIFT   2

Definition at line 844 of file smc91x.h.

#define PHY_CFG1_TRF_MASK   0x0003

Definition at line 846 of file smc91x.h.

#define PHY_CFG1_UNSCDS   0x0200

Definition at line 840 of file smc91x.h.

#define PHY_CFG1_XMTDIS   0x4000

Definition at line 837 of file smc91x.h.

#define PHY_CFG1_XMTPDN   0x2000

Definition at line 838 of file smc91x.h.

#define PHY_CFG2_APOLDIS   0x0020

Definition at line 851 of file smc91x.h.

#define PHY_CFG2_INTMDIO   0x0004

Definition at line 854 of file smc91x.h.

#define PHY_CFG2_JABDIS   0x0010

Definition at line 852 of file smc91x.h.

#define PHY_CFG2_MREG   0x0008

Definition at line 853 of file smc91x.h.

#define PHY_CFG2_REG   0x11

Definition at line 850 of file smc91x.h.

#define PHY_INT_CWRD   0x1000

Definition at line 861 of file smc91x.h.

#define PHY_INT_DPLXDET   0x0040

Definition at line 867 of file smc91x.h.

#define PHY_INT_ESD   0x0400

Definition at line 863 of file smc91x.h.

#define PHY_INT_INT   0x8000

Definition at line 858 of file smc91x.h.

#define PHY_INT_JAB   0x0100

Definition at line 865 of file smc91x.h.

#define PHY_INT_LNKFAIL   0x4000

Definition at line 859 of file smc91x.h.

#define PHY_INT_LOSSSYNC   0x2000

Definition at line 860 of file smc91x.h.

#define PHY_INT_REG   0x12

Definition at line 857 of file smc91x.h.

#define PHY_INT_RPOL   0x0200

Definition at line 864 of file smc91x.h.

#define PHY_INT_SPDDET   0x0080

Definition at line 866 of file smc91x.h.

#define PHY_INT_SSD   0x0800

Definition at line 862 of file smc91x.h.

#define PHY_LAN83C180   0x02821c50

Definition at line 824 of file smc91x.h.

#define PHY_LAN83C183   0x0016f840

Definition at line 823 of file smc91x.h.

#define PHY_MASK_REG   0x13

Definition at line 870 of file smc91x.h.

#define PN_REG (   lp)    SMC_REG(lp, 0x0002, 2)

Definition at line 696 of file smc91x.h.

#define PTR_AUTOINC   0x4000

Definition at line 721 of file smc91x.h.

#define PTR_RCV   0x8000

Definition at line 720 of file smc91x.h.

#define PTR_READ   0x2000

Definition at line 722 of file smc91x.h.

#define PTR_REG (   lp)    SMC_REG(lp, 0x0006, 2)

Definition at line 719 of file smc91x.h.

#define RCR_ABORT_ENB   0x0200

Definition at line 593 of file smc91x.h.

#define RCR_ALMUL   0x0004

Definition at line 590 of file smc91x.h.

#define RCR_CLEAR   0x0

Definition at line 599 of file smc91x.h.

#define RCR_DEFAULT   (RCR_STRIP_CRC | RCR_RXEN)

Definition at line 598 of file smc91x.h.

#define RCR_FILT_CAR   0x0400

Definition at line 594 of file smc91x.h.

#define RCR_PRMS   0x0002

Definition at line 589 of file smc91x.h.

#define RCR_REG (   lp)    SMC_REG(lp, 0x0004, 0)

Definition at line 587 of file smc91x.h.

#define RCR_RX_ABORT   0x0001

Definition at line 588 of file smc91x.h.

#define RCR_RXEN   0x0100

Definition at line 591 of file smc91x.h.

#define RCR_SOFTRST   0x8000

Definition at line 595 of file smc91x.h.

#define RCR_STRIP_CRC   0x0200

Definition at line 592 of file smc91x.h.

#define REV_REG (   lp)    SMC_REG(lp, 0x000A, 3)

Definition at line 769 of file smc91x.h.

#define RPC_ANEG   0x0800

Definition at line 617 of file smc91x.h.

#define RPC_DEFAULT   (RPC_ANEG | RPC_SPEED | RPC_DPLX)

Definition at line 628 of file smc91x.h.

#define RPC_DPLX   0x1000

Definition at line 616 of file smc91x.h.

#define RPC_LSA_DEFAULT   RPC_LED_100_10

Definition at line 300 of file smc91x.h.

#define RPC_LSB_DEFAULT   RPC_LED_TX_RX

Definition at line 301 of file smc91x.h.

#define RPC_LSXA_SHFT   5

Definition at line 618 of file smc91x.h.

#define RPC_LSXB_SHFT   2

Definition at line 619 of file smc91x.h.

#define RPC_REG (   lp)    SMC_REG(lp, 0x000A, 0)

Definition at line 614 of file smc91x.h.

#define RPC_SPEED   0x2000

Definition at line 615 of file smc91x.h.

#define RS_ALGNERR   0x8000

Definition at line 809 of file smc91x.h.

#define RS_BADCRC   0x2000

Definition at line 811 of file smc91x.h.

#define RS_BRODCAST   0x4000

Definition at line 810 of file smc91x.h.

#define RS_ERRORS   (RS_ALGNERR | RS_BADCRC | RS_TOOLONG | RS_TOOSHORT)

Definition at line 816 of file smc91x.h.

#define RS_MULTICAST   0x0001

Definition at line 815 of file smc91x.h.

#define RS_ODDFRAME   0x1000

Definition at line 812 of file smc91x.h.

#define RS_TOOLONG   0x0800

Definition at line 813 of file smc91x.h.

#define RS_TOOSHORT   0x0400

Definition at line 814 of file smc91x.h.

#define RXFIFO_REG (   lp)    SMC_REG(lp, 0x0005, 2)

Definition at line 712 of file smc91x.h.

#define RXFIFO_REMPTY   0x80

Definition at line 713 of file smc91x.h.

#define SMC_16BIT (   p)    ((p)->cfg.flags & SMC91X_USE_16BIT)

Definition at line 356 of file smc91x.h.

#define SMC_32BIT (   p)    ((p)->cfg.flags & SMC91X_USE_32BIT)

Definition at line 357 of file smc91x.h.

#define SMC_8BIT (   p)    ((p)->cfg.flags & SMC91X_USE_8BIT)

Definition at line 355 of file smc91x.h.

#define SMC_ACK_INT (   lp,
  x 
)
Value:
do { \
if (SMC_8BIT(lp)) \
SMC_outb(x, ioaddr, INT_REG(lp)); \
else { \
unsigned long __flags; \
int __mask; \
local_irq_save(__flags); \
__mask = SMC_inw(ioaddr, INT_REG(lp)) & ~0xff; \
SMC_outw(__mask | (x), ioaddr, INT_REG(lp)); \
local_irq_restore(__flags); \
} \
} while (0)

Definition at line 961 of file smc91x.h.

#define SMC_CAN_USE_16BIT   1

Definition at line 283 of file smc91x.h.

#define SMC_CAN_USE_32BIT   1

Definition at line 284 of file smc91x.h.

#define SMC_CAN_USE_8BIT   1

Definition at line 282 of file smc91x.h.

#define SMC_CAN_USE_DATACS   0

Definition at line 517 of file smc91x.h.

#define SMC_CURRENT_BANK (   lp)    SMC_inw(ioaddr, BANK_SELECT)

Definition at line 987 of file smc91x.h.

#define SMC_DATA_EXTENT   (4)

Definition at line 535 of file smc91x.h.

#define SMC_GET_AR (   lp)
Value:
(SMC_8BIT(lp) ? (SMC_inb(ioaddr, AR_REG(lp))) \
: (SMC_inw(ioaddr, PN_REG(lp)) >> 8))

Definition at line 945 of file smc91x.h.

#define SMC_GET_BASE (   lp)    SMC_inw(ioaddr, BASE_REG(lp))

Definition at line 997 of file smc91x.h.

#define SMC_GET_CONFIG (   lp)    SMC_inw(ioaddr, CONFIG_REG(lp))

Definition at line 1001 of file smc91x.h.

#define SMC_GET_COUNTER (   lp)    SMC_inw(ioaddr, COUNTER_REG(lp))

Definition at line 1005 of file smc91x.h.

#define SMC_GET_CTL (   lp)    SMC_inw(ioaddr, CTL_REG(lp))

Definition at line 1007 of file smc91x.h.

#define SMC_GET_EPH_STATUS (   lp)    SMC_inw(ioaddr, EPH_STATUS_REG(lp))

Definition at line 1045 of file smc91x.h.

#define SMC_GET_FIFO (   lp)    SMC_inw(ioaddr, FIFO_REG(lp))

Definition at line 1033 of file smc91x.h.

#define SMC_GET_GP (   lp)    SMC_inw(ioaddr, GP_REG(lp))

Definition at line 1013 of file smc91x.h.

#define SMC_GET_INT (   lp)
Value:
(SMC_8BIT(lp) ? (SMC_inb(ioaddr, INT_REG(lp))) \
: (SMC_inw(ioaddr, INT_REG(lp)) & 0xFF))

Definition at line 957 of file smc91x.h.

#define SMC_GET_INT_MASK (   lp)
Value:
(SMC_8BIT(lp) ? (SMC_inb(ioaddr, IM_REG(lp))) \
: (SMC_inw(ioaddr, INT_REG(lp)) >> 8))

Definition at line 975 of file smc91x.h.

#define SMC_GET_MAC_ADDR (   lp,
  addr 
)
Value:
do { \
unsigned int __v; \
__v = SMC_inw(ioaddr, ADDR0_REG(lp)); \
addr[0] = __v; addr[1] = __v >> 8; \
__v = SMC_inw(ioaddr, ADDR1_REG(lp)); \
addr[2] = __v; addr[3] = __v >> 8; \
__v = SMC_inw(ioaddr, ADDR2_REG(lp)); \
addr[4] = __v; addr[5] = __v >> 8; \
} while (0)

Definition at line 1068 of file smc91x.h.

#define SMC_GET_MII (   lp)    SMC_inw(ioaddr, MII_REG(lp))

Definition at line 1011 of file smc91x.h.

#define SMC_GET_MIR (   lp)    SMC_inw(ioaddr, MIR_REG(lp))

Definition at line 1025 of file smc91x.h.

#define SMC_GET_MMU_CMD (   lp)    SMC_inw(ioaddr, MMU_CMD_REG(lp))

Definition at line 1029 of file smc91x.h.

#define SMC_GET_PKT_HDR (   lp,
  status,
  length 
)
Value:
do { \
if (SMC_32BIT(lp)) { \
unsigned int __val = SMC_inl(ioaddr, DATA_REG(lp)); \
(status) = __val & 0xffff; \
(length) = __val >> 16; \
} else { \
(status) = SMC_inw(ioaddr, DATA_REG(lp)); \
(length) = SMC_inw(ioaddr, DATA_REG(lp)); \
} \
} while (0)

Definition at line 1107 of file smc91x.h.

#define SMC_GET_PN (   lp)
Value:
(SMC_8BIT(lp) ? (SMC_inb(ioaddr, PN_REG(lp))) \
: (SMC_inw(ioaddr, PN_REG(lp)) & 0xFF))

Definition at line 931 of file smc91x.h.

#define SMC_GET_PTR (   lp)    SMC_inw(ioaddr, PTR_REG(lp))

Definition at line 1035 of file smc91x.h.

#define SMC_GET_RCR (   lp)    SMC_inw(ioaddr, RCR_REG(lp))

Definition at line 1047 of file smc91x.h.

#define SMC_GET_REV (   lp)    SMC_inw(ioaddr, REV_REG(lp))

Definition at line 1051 of file smc91x.h.

#define SMC_GET_RPC (   lp)    SMC_inw(ioaddr, RPC_REG(lp))

Definition at line 1053 of file smc91x.h.

#define SMC_GET_RXFIFO (   lp)
Value:
(SMC_8BIT(lp) ? (SMC_inb(ioaddr, RXFIFO_REG(lp))) \
: (SMC_inw(ioaddr, TXFIFO_REG(lp)) >> 8))

Definition at line 953 of file smc91x.h.

#define SMC_GET_TCR (   lp)    SMC_inw(ioaddr, TCR_REG(lp))

Definition at line 1063 of file smc91x.h.

#define SMC_GET_TXFIFO (   lp)
Value:
(SMC_8BIT(lp) ? (SMC_inb(ioaddr, TXFIFO_REG(lp))) \
: (SMC_inw(ioaddr, TXFIFO_REG(lp)) & 0xFF))

Definition at line 949 of file smc91x.h.

#define SMC_inb (   a,
  r 
)    readb((a) + (r))

Definition at line 289 of file smc91x.h.

#define SMC_inl (   a,
  r 
)    readl((a) + (r))

Definition at line 291 of file smc91x.h.

#define SMC_insb (   a,
  r,
  p,
  l 
)    BUG()

Definition at line 512 of file smc91x.h.

#define SMC_insl (   a,
  r,
  p,
  l 
)    readsl((a) + (r), p, l)

Definition at line 297 of file smc91x.h.

#define SMC_insw (   a,
  r,
  p,
  l 
)    readsw((a) + (r), p, l)

Definition at line 295 of file smc91x.h.

#define SMC_INTERRUPT_PREAMBLE

Definition at line 529 of file smc91x.h.

#define SMC_inw (   a,
  r 
)    readw((a) + (r))

Definition at line 290 of file smc91x.h.

#define SMC_IO_EXTENT   (16 << SMC_IO_SHIFT)

Definition at line 534 of file smc91x.h.

#define SMC_IO_SHIFT   (lp->io_shift)

Definition at line 287 of file smc91x.h.

#define SMC_IRQ_FLAGS   IRQF_TRIGGER_RISING

Definition at line 525 of file smc91x.h.

#define SMC_MUST_ALIGN_WRITE (   lp)    SMC_32BIT(lp)

Definition at line 929 of file smc91x.h.

#define SMC_NOWAIT   1

Definition at line 285 of file smc91x.h.

#define SMC_outb (   v,
  a,
  r 
)    writeb(v, (a) + (r))

Definition at line 292 of file smc91x.h.

#define SMC_outl (   v,
  a,
  r 
)    writel(v, (a) + (r))

Definition at line 294 of file smc91x.h.

#define SMC_outsb (   a,
  r,
  p,
  l 
)    BUG()

Definition at line 513 of file smc91x.h.

#define SMC_outsl (   a,
  r,
  p,
  l 
)    writesl((a) + (r), p, l)

Definition at line 298 of file smc91x.h.

#define SMC_outsw (   a,
  r,
  p,
  l 
)    writesw((a) + (r), p, l)

Definition at line 296 of file smc91x.h.

#define SMC_outw (   v,
  a,
  r 
)    writew(v, (a) + (r))

Definition at line 293 of file smc91x.h.

#define SMC_PULL_DATA (   lp,
  p,
  l 
)

Definition at line 1145 of file smc91x.h.

#define SMC_PUSH_DATA (   lp,
  p,
  l 
)
Value:
do { \
if (SMC_32BIT(lp)) { \
void *__ptr = (p); \
int __len = (l); \
void __iomem *__ioaddr = ioaddr; \
if (__len >= 2 && (unsigned long)__ptr & 2) { \
__len -= 2; \
SMC_outw(*(u16 *)__ptr, ioaddr, \
DATA_REG(lp)); \
__ptr += 2; \
} \
if (SMC_CAN_USE_DATACS && lp->datacs) \
__ioaddr = lp->datacs; \
SMC_outsl(__ioaddr, DATA_REG(lp), __ptr, __len>>2); \
if (__len & 2) { \
__ptr += (__len & ~3); \
SMC_outw(*((u16 *)__ptr), ioaddr, \
DATA_REG(lp)); \
} \
} else if (SMC_16BIT(lp)) \
SMC_outsw(ioaddr, DATA_REG(lp), p, (l) >> 1); \
else if (SMC_8BIT(lp)) \
SMC_outsb(ioaddr, DATA_REG(lp), p, l); \
} while (0)

Definition at line 1119 of file smc91x.h.

#define SMC_PUT_PKT_HDR (   lp,
  status,
  length 
)
Value:
do { \
if (SMC_32BIT(lp)) \
SMC_outl((status) | (length)<<16, ioaddr, \
DATA_REG(lp)); \
else { \
SMC_outw(status, ioaddr, DATA_REG(lp)); \
SMC_outw(length, ioaddr, DATA_REG(lp)); \
} \
} while (0)

Definition at line 1096 of file smc91x.h.

#define SMC_REG (   lp,
  reg,
  bank 
)    (reg<<SMC_IO_SHIFT)

Definition at line 917 of file smc91x.h.

#define SMC_SELECT_BANK (   lp,
  x 
)
Value:
do { \
SMC_outl((x)<<16, ioaddr, 12<<SMC_IO_SHIFT); \
SMC_outw(x, ioaddr, BANK_SELECT); \
} while (0)

Definition at line 989 of file smc91x.h.

#define SMC_SET_BASE (   lp,
  x 
)    SMC_outw(x, ioaddr, BASE_REG(lp))

Definition at line 999 of file smc91x.h.

#define SMC_SET_CONFIG (   lp,
  x 
)    SMC_outw(x, ioaddr, CONFIG_REG(lp))

Definition at line 1003 of file smc91x.h.

#define SMC_SET_CTL (   lp,
  x 
)    SMC_outw(x, ioaddr, CTL_REG(lp))

Definition at line 1009 of file smc91x.h.

#define SMC_SET_GP (   lp,
  x 
)
Value:
do { \
SMC_outl((x)<<16, ioaddr, SMC_REG(lp, 8, 1)); \
SMC_outw(x, ioaddr, GP_REG(lp)); \
} while (0)

Definition at line 1015 of file smc91x.h.

#define SMC_SET_INT_MASK (   lp,
  x 
)
Value:
do { \
if (SMC_8BIT(lp)) \
SMC_outb(x, ioaddr, IM_REG(lp)); \
SMC_outw((x) << 8, ioaddr, INT_REG(lp)); \
} while (0)

Definition at line 979 of file smc91x.h.

#define SMC_SET_MAC_ADDR (   lp,
  addr 
)
Value:
do { \
SMC_outw(addr[0]|(addr[1] << 8), ioaddr, ADDR0_REG(lp)); \
SMC_outw(addr[2]|(addr[3] << 8), ioaddr, ADDR1_REG(lp)); \
SMC_outw(addr[4]|(addr[5] << 8), ioaddr, ADDR2_REG(lp)); \
} while (0)

Definition at line 1080 of file smc91x.h.

#define SMC_SET_MCAST (   lp,
  x 
)
Value:
do { \
const unsigned char *mt = (x); \
SMC_outw(mt[0] | (mt[1] << 8), ioaddr, MCAST_REG1(lp)); \
SMC_outw(mt[2] | (mt[3] << 8), ioaddr, MCAST_REG2(lp)); \
SMC_outw(mt[4] | (mt[5] << 8), ioaddr, MCAST_REG3(lp)); \
SMC_outw(mt[6] | (mt[7] << 8), ioaddr, MCAST_REG4(lp)); \
} while (0)

Definition at line 1087 of file smc91x.h.

#define SMC_SET_MII (   lp,
  x 
)    SMC_outw(x, ioaddr, MII_REG(lp))

Definition at line 1023 of file smc91x.h.

#define SMC_SET_MIR (   lp,
  x 
)    SMC_outw(x, ioaddr, MIR_REG(lp))

Definition at line 1027 of file smc91x.h.

#define SMC_SET_MMU_CMD (   lp,
  x 
)    SMC_outw(x, ioaddr, MMU_CMD_REG(lp))

Definition at line 1031 of file smc91x.h.

#define SMC_SET_PN (   lp,
  x 
)
Value:
do { \
SMC_outl((x)<<16, ioaddr, SMC_REG(lp, 0, 2)); \
else if (SMC_8BIT(lp)) \
SMC_outb(x, ioaddr, PN_REG(lp)); \
SMC_outw(x, ioaddr, PN_REG(lp)); \
} while (0)

Definition at line 935 of file smc91x.h.

#define SMC_SET_PTR (   lp,
  x 
)
Value:
do { \
SMC_outl((x)<<16, ioaddr, SMC_REG(lp, 4, 2)); \
SMC_outw(x, ioaddr, PTR_REG(lp)); \
} while (0)

Definition at line 1037 of file smc91x.h.

#define SMC_SET_RCR (   lp,
  x 
)    SMC_outw(x, ioaddr, RCR_REG(lp))

Definition at line 1049 of file smc91x.h.

#define SMC_SET_RPC (   lp,
  x 
)
Value:
do { \
SMC_outl((x)<<16, ioaddr, SMC_REG(lp, 8, 0)); \
SMC_outw(x, ioaddr, RPC_REG(lp)); \
} while (0)

Definition at line 1055 of file smc91x.h.

#define SMC_SET_TCR (   lp,
  x 
)    SMC_outw(x, ioaddr, TCR_REG(lp))

Definition at line 1065 of file smc91x.h.

#define TCR_CLEAR   0 /* do NOTHING */

Definition at line 561 of file smc91x.h.

#define TCR_DEFAULT   (TCR_ENABLE | TCR_PAD_EN)

Definition at line 563 of file smc91x.h.

#define TCR_ENABLE   0x0001

Definition at line 550 of file smc91x.h.

#define TCR_EPH_LOOP   0x2000

Definition at line 558 of file smc91x.h.

#define TCR_FDUPLX   0x0800

Definition at line 556 of file smc91x.h.

#define TCR_FORCOL   0x0004

Definition at line 552 of file smc91x.h.

#define TCR_LOOP   0x0002

Definition at line 551 of file smc91x.h.

#define TCR_MON_CSN   0x0400

Definition at line 555 of file smc91x.h.

#define TCR_NOCRC   0x0100

Definition at line 554 of file smc91x.h.

#define TCR_PAD_EN   0x0080

Definition at line 553 of file smc91x.h.

#define TCR_REG (   lp)    SMC_REG(lp, 0x0000, 0)

Definition at line 549 of file smc91x.h.

#define TCR_STP_SQET   0x1000

Definition at line 557 of file smc91x.h.

#define TCR_SWFDUP   0x8000

Definition at line 559 of file smc91x.h.

#define TXFIFO_REG (   lp)    SMC_REG(lp, 0x0004, 2)

Definition at line 707 of file smc91x.h.

#define TXFIFO_TEMPTY   0x80

Definition at line 708 of file smc91x.h.