iPXE
|
#include <ipxe/ethernet.h>
#include <errno.h>
#include "etherboot.h"
#include "nic.h"
#include <ipxe/isa.h>
#include "smc9000.h"
Go to the source code of this file.
Macros | |
#define | LINUX_OUT_MACROS 1 |
#define | SMC9000_DEBUG 0 |
#define | PRINTK2(args...) |
#define | _outb outb |
#define | _outw outw |
Functions | |
FILE_LICENCE (GPL_ANY) | |
static word | smc_read_phy_register (int ioaddr, byte phyaddr, byte phyreg) |
static void | smc_write_phy_register (int ioaddr, byte phyaddr, byte phyreg, word phydata) |
static int | smc_detect_phy (int ioaddr, byte *pphyaddr) |
static void | smc_phy_configure (int ioaddr) |
static void | smc_reset (int ioaddr) |
static int | smc9000_probe_addr (isa_probe_addr_t ioaddr) |
static void | smc9000_transmit (struct nic *nic, const char *d, unsigned int t, unsigned int s, const char *p) |
static int | smc9000_poll (struct nic *nic, int retrieve) |
static void | smc9000_disable (struct nic *nic, struct isa_device *isa __unused) |
static void | smc9000_irq (struct nic *nic __unused, irq_action_t action __unused) |
static int | smc9000_probe (struct nic *nic, struct isa_device *isa) |
ISA_DRIVER (smc9000_driver, smc9000_probe_addrs, smc9000_probe_addr, GENERIC_ISAPNP_VENDOR, 0x8228) | |
DRIVER ("SMC9000", nic_driver, isa_driver, smc9000_driver, smc9000_probe, smc9000_disable) | |
ISA_ROM ("smc9000", "SMC9000") | |
Variables | |
static const char | smc9000_version [] = "Version 0.99 98-09-30" |
static const char * | interfaces [2] = { "TP", "AUI" } |
static const char * | chip_ids [15] |
static const char | smc91c96_id [] = "SMC91C96" |
static struct nic_operations | smc9000_operations |
static isa_probe_addr_t | smc9000_probe_addrs [] |
FILE_LICENCE | ( | GPL_ANY | ) |
Definition at line 70 of file smc9000.c.
References BANK_SELECT, bits, inw(), ioaddr, MII_MCLK, MII_MDI, MII_MDO, MII_MDOE, MII_REG, outw, printf(), SMC_SELECT_BANK, and udelay().
Referenced by smc_detect_phy(), and smc_phy_configure().
Definition at line 189 of file smc9000.c.
References BANK_SELECT, bits, inw(), ioaddr, MII_MCLK, MII_MDI, MII_MDO, MII_MDOE, MII_REG, outw, printf(), SMC_SELECT_BANK, and udelay().
Referenced by smc_phy_configure().
|
static |
Definition at line 301 of file smc9000.c.
References ioaddr, PHY_ID1_REG, PHY_ID2_REG, printf(), and smc_read_phy_register().
Referenced by smc_phy_configure().
|
static |
Definition at line 353 of file smc9000.c.
References ioaddr, mdelay(), outw, PHY_AD_10_FDX, PHY_AD_10_HDX, PHY_AD_CSMA, PHY_AD_REG, PHY_AD_T4, PHY_AD_TX_FDX, PHY_AD_TX_HDX, PHY_CNTL_ANEG_EN, PHY_CNTL_ANEG_RST, PHY_CNTL_DPLX, PHY_CNTL_REG, PHY_CNTL_RST, PHY_CNTL_SPEED, PHY_INT_CWRD, PHY_INT_DPLXDET, PHY_INT_ESD, PHY_INT_JAB, PHY_INT_LOSSSYNC, PHY_INT_REG, PHY_INT_RPOL, PHY_INT_SPDDET, PHY_INT_SSD, PHY_MASK_REG, PHY_STAT_ANEG_ACK, PHY_STAT_CAP_T4, PHY_STAT_CAP_TF, PHY_STAT_CAP_TH, PHY_STAT_CAP_TXF, PHY_STAT_CAP_TXH, PHY_STAT_REG, PHY_STAT_REM_FLT, PRINTK2, RPC_DEFAULT, RPC_DPLX, RPC_REG, RPC_SPEED, smc_detect_phy(), smc_read_phy_register(), SMC_SELECT_BANK, smc_write_phy_register(), status, and timeout().
Referenced by smc9000_probe().
|
static |
Definition at line 517 of file smc9000.c.
References _outb, _outw, INT_MASK, ioaddr, MC_RESET, MMU_CMD, RCR, RCR_CLEAR, RCR_SOFTRESET, SMC_DELAY, SMC_SELECT_BANK, TCR, and TCR_CLEAR.
Referenced by smc9000_disable(), smc9000_probe(), and smc9000_transmit().
|
static |
|
static |
Definition at line 614 of file smc9000.c.
References _outb, _outw, currticks(), DATA_1, DBG, ETH_ALEN, ETH_HLEN, FIFO_PORTS, htons, IM_ALLOC_INT, IM_TX_INT, inb(), INTERRUPT, inw(), nic::ioaddr, length, MC_ALLOC, MC_ENQUEUE, MC_FREEPKT, MC_RESET, MMU_CMD, nic::node_addr, outsw(), PNR_ARR, POINTER, printf(), PTR_AUTOINC, PTR_READ, smc_reset(), SMC_SELECT_BANK, status, TCR, TCR_ENABLE, TICKS_PER_SEC, and TS_SUCCESS.
|
static |
Definition at line 756 of file smc9000.c.
References _outw, DATA_1, FIFO_PORTS, FP_RXEMPTY, insw(), inw(), nic::ioaddr, MC_RELEASE, MMU_CMD, nic::packet, nic::packetlen, POINTER, printf(), PTR_AUTOINC, PTR_RCV, PTR_READ, RS_ERRORS, and SMC_SELECT_BANK.
|
static |
Definition at line 795 of file smc9000.c.
References _outb, INT_MASK, nic::ioaddr, RCR, RCR_CLEAR, smc_reset(), SMC_SELECT_BANK, TCR, and TCR_CLEAR.
|
static |
|
static |
Definition at line 833 of file smc9000.c.
References _outw, ADDR0, address, CFG, CFG_AUI_SELECT, CHIP_9196, chip_ids, DBG, eth_ntoa(), interfaces, inw(), isa_device::ioaddr, nic::ioaddr, nic::irqno, MCR, media, MIR, nic::nic_op, nic::node_addr, printf(), RCR, RCR_NORMAL, REV_9196, revision, REVISION, smc9000_operations, smc9000_version, smc91c96_id, smc_phy_configure(), smc_reset(), SMC_SELECT_BANK, TCR, and TCR_NORMAL.
ISA_DRIVER | ( | smc9000_driver | , |
smc9000_probe_addrs | , | ||
smc9000_probe_addr | , | ||
GENERIC_ISAPNP_VENDOR | , | ||
0x8228 | |||
) |
DRIVER | ( | "SMC9000" | , |
nic_driver | , | ||
isa_driver | , | ||
smc9000_driver | , | ||
smc9000_probe | , | ||
smc9000_disable | |||
) |
ISA_ROM | ( | "smc9000" | , |
"SMC9000" | |||
) |
|
static |
Definition at line 51 of file smc9000.c.
Referenced by smc9000_probe().
|
static |
Definition at line 52 of file smc9000.c.
Referenced by smc9000_probe(), and usb_describe().
|
static |
Definition at line 53 of file smc9000.c.
Referenced by smc9000_probe(), and smc9000_probe_addr().
|
static |
Definition at line 65 of file smc9000.c.
Referenced by smc9000_probe().
|
static |
Definition at line 821 of file smc9000.c.
Referenced by smc9000_probe().
|
static |