linux/drivers/net/can/sja1000/kvaser_pci.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2008 Per Dalen <[email protected]>
 *
 * Parts of this software are based on (derived) the following:
 *
 * - Kvaser linux driver, version 4.72 BETA
 *   Copyright (C) 2002-2007 KVASER AB
 *
 * - Lincan driver, version 0.3.3, OCERA project
 *   Copyright (C) 2004 Pavel Pisa
 *   Copyright (C) 2001 Arnaud Westenberg
 *
 * - Socketcan SJA1000 drivers
 *   Copyright (C) 2007 Wolfgang Grandegger <[email protected]>
 *   Copyright (c) 2002-2007 Volkswagen Group Electronic Research
 *   Copyright (c) 2003 Matthias Brukner, Trajet Gmbh, Rebenring 33,
 *   38106 Braunschweig, GERMANY
 */

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/netdevice.h>
#include <linux/delay.h>
#include <linux/pci.h>
#include <linux/can/dev.h>
#include <linux/io.h>

#include "sja1000.h"

#define DRV_NAME

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();

#define MAX_NO_OF_CHANNELS

struct kvaser_pci {};

#define KVASER_PCI_CAN_CLOCK

/*
 * The board configuration is probably following:
 * RX1 is connected to ground.
 * TX1 is not connected.
 * CLKO is not connected.
 * Setting the OCR register to 0xDA is a good idea.
 * This means  normal output mode , push-pull and the correct polarity.
 */
#define KVASER_PCI_OCR

/*
 * In the CDR register, you should set CBP to 1.
 * You will probably also want to set the clock divider value to 0
 * (meaning divide-by-2), the Pelican bit, and the clock-off bit
 * (you will have no need for CLKOUT anyway).
 */
#define KVASER_PCI_CDR

/*
 * These register values are valid for revision 14 of the Xilinx logic.
 */
#define XILINX_VERINT

#define XILINX_PRESUMED_VERSION

/*
 * Important S5920 registers
 */
#define S5920_INTCSR
#define S5920_PTCR
#define INTCSR_ADDON_INTENABLE_M


#define KVASER_PCI_PORT_BYTES

#define PCI_CONFIG_PORT_SIZE
#define PCI_PORT_SIZE
#define PCI_PORT_XILINX_SIZE

#define KVASER_PCI_VENDOR_ID1
#define KVASER_PCI_DEVICE_ID1

#define KVASER_PCI_VENDOR_ID2
#define KVASER_PCI_DEVICE_ID2

static const struct pci_device_id kvaser_pci_tbl[] =;

MODULE_DEVICE_TABLE(pci, kvaser_pci_tbl);

static u8 kvaser_pci_read_reg(const struct sja1000_priv *priv, int port)
{}

static void kvaser_pci_write_reg(const struct sja1000_priv *priv,
				 int port, u8 val)
{}

static void kvaser_pci_disable_irq(struct net_device *dev)
{}

static void kvaser_pci_enable_irq(struct net_device *dev)
{}

static int number_of_sja1000_chip(void __iomem *base_addr)
{}

static void kvaser_pci_del_chan(struct net_device *dev)
{}

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)
{}

static int kvaser_pci_init_one(struct pci_dev *pdev,
			       const struct pci_device_id *ent)
{}

static void kvaser_pci_remove_one(struct pci_dev *pdev)
{}

static struct pci_driver kvaser_pci_driver =;

module_pci_driver();