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

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2008 Sebastian Haas (initial chardev implementation)
 * Copyright (C) 2010 Markus Plessing <[email protected]>
 * Rework for mainline by Oliver Hartkopp <[email protected]>
 */

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/netdevice.h>
#include <linux/delay.h>
#include <linux/io.h>
#include <pcmcia/cistpl.h>
#include <pcmcia/ds.h>
#include <linux/can.h>
#include <linux/can/dev.h>
#include "sja1000.h"

#define DRV_NAME

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

#define EMS_PCMCIA_MAX_CHAN

struct ems_pcmcia_card {};

#define EMS_PCMCIA_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 EMS_PCMCIA_OCR

/*
 * In the CDR register, you should set CBP to 1.
 * You will probably also want to set the clock divider value to 7
 * (meaning direct oscillator output) because the second SJA1000 chip
 * is driven by the first one CLKOUT output.
 */
#define EMS_PCMCIA_CDR
#define EMS_PCMCIA_MEM_SIZE
#define EMS_PCMCIA_CAN_BASE_OFFSET
#define EMS_PCMCIA_CAN_CTRL_SIZE

#define EMS_CMD_RESET
#define EMS_CMD_MAP
#define EMS_CMD_UMAP

static struct pcmcia_device_id ems_pcmcia_tbl[] =;

MODULE_DEVICE_TABLE(pcmcia, ems_pcmcia_tbl);

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

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

static irqreturn_t ems_pcmcia_interrupt(int irq, void *dev_id)
{}

/*
 * Check if a CAN controller is present at the specified location
 * by trying to set 'em into the PeliCAN mode
 */
static inline int ems_pcmcia_check_chan(struct sja1000_priv *priv)
{}

static void ems_pcmcia_del_card(struct pcmcia_device *pdev)
{}

/*
 * Probe PCI device for EMS CAN signature and register each available
 * CAN channel to SJA1000 Socket-CAN subsystem.
 */
static int ems_pcmcia_add_card(struct pcmcia_device *pdev, unsigned long base)
{}

/*
 * Setup PCMCIA socket and probe for EMS CPC-CARD
 */
static int ems_pcmcia_probe(struct pcmcia_device *dev)
{}

/*
 * Release claimed resources
 */
static void ems_pcmcia_remove(struct pcmcia_device *dev)
{}

static struct pcmcia_driver ems_pcmcia_driver =;
module_pcmcia_driver();