static int kvaser_pci_add_chan(struct pci_dev *pdev, int channel, struct net_device **master_dev, void __iomem *conf_addr, void __iomem *res_addr, void __iomem *base_addr) { struct net_device *dev; struct sja1000_priv *priv; struct kvaser_pci *board; int err, init_step; dev = alloc_sja1000dev(sizeof(struct kvaser_pci)); if (dev == NULL) return -ENOMEM; priv = netdev_priv(dev); board = priv->priv; board->pci_dev = pdev; board->channel = channel; /* S5920 */ board->conf_addr = conf_addr; /* XILINX board wide address */ board->res_addr = res_addr; if (channel == 0) { board->xilinx_ver = ioread8(board->res_addr + XILINX_VERINT) >> 4; init_step = 2; /* Assert PTADR# - we're in passive mode so the other bits are not important */ iowrite32(0x80808080UL, board->conf_addr + S5920_PTCR); /* Enable interrupts from card */ kvaser_pci_enable_irq(dev); } else {
static int kvaser_pci_add_chan(struct pci_dev *pdev, int channel, struct net_device **master_dev, void __iomem *conf_addr, void __iomem *res_addr, void __iomem *base_addr) { struct net_device *dev; struct sja1000_priv *priv; struct kvaser_pci *board; int err, init_step; dev = alloc_sja1000dev(sizeof(struct kvaser_pci)); if (dev == NULL) return -ENOMEM; priv = netdev_priv(dev); board = priv->priv; board->pci_dev = pdev; board->channel = channel; board->conf_addr = conf_addr; board->res_addr = res_addr; if (channel == 0) { board->xilinx_ver = ioread8(board->res_addr + XILINX_VERINT) >> 4; init_step = 2; iowrite32(0x80808080UL, board->conf_addr + S5920_PTCR); kvaser_pci_enable_irq(dev); } else {