linux/drivers/ipack/carriers/tpci200.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * driver for the carrier TEWS TPCI-200
 *
 * Copyright (C) 2009-2012 CERN (www.cern.ch)
 * Author: Nicolas Serafini, EIC2 SA
 * Author: Samuel Iglesias Gonsalvez <[email protected]>
 */

#ifndef _TPCI200_H_
#define _TPCI200_H_

#include <linux/limits.h>
#include <linux/pci.h>
#include <linux/spinlock.h>
#include <linux/swab.h>
#include <linux/io.h>
#include <linux/ipack.h>

#define TPCI200_NB_SLOT
#define TPCI200_NB_BAR

#define TPCI200_VENDOR_ID
#define TPCI200_DEVICE_ID
#define TPCI200_SUBVENDOR_ID
#define TPCI200_SUBDEVICE_ID

#define TPCI200_CFG_MEM_BAR
#define TPCI200_IP_INTERFACE_BAR
#define TPCI200_IO_ID_INT_SPACES_BAR
#define TPCI200_MEM16_SPACE_BAR
#define TPCI200_MEM8_SPACE_BAR

struct tpci200_regs {} __packed;

#define TPCI200_IFACE_SIZE

#define TPCI200_IO_SPACE_OFF
#define TPCI200_IO_SPACE_INTERVAL
#define TPCI200_IO_SPACE_SIZE
#define TPCI200_ID_SPACE_OFF
#define TPCI200_ID_SPACE_INTERVAL
#define TPCI200_ID_SPACE_SIZE
#define TPCI200_INT_SPACE_OFF
#define TPCI200_INT_SPACE_INTERVAL
#define TPCI200_INT_SPACE_SIZE
#define TPCI200_IOIDINT_SIZE

#define TPCI200_MEM8_SPACE_INTERVAL
#define TPCI200_MEM8_SPACE_SIZE
#define TPCI200_MEM16_SPACE_INTERVAL
#define TPCI200_MEM16_SPACE_SIZE

/* control field in tpci200_regs */
#define TPCI200_INT0_EN
#define TPCI200_INT1_EN
#define TPCI200_INT0_EDGE
#define TPCI200_INT1_EDGE
#define TPCI200_ERR_INT_EN
#define TPCI200_TIME_INT_EN
#define TPCI200_RECOVER_EN
#define TPCI200_CLK32

/* reset field in tpci200_regs */
#define TPCI200_A_RESET
#define TPCI200_B_RESET
#define TPCI200_C_RESET
#define TPCI200_D_RESET

/* status field in tpci200_regs */
#define TPCI200_A_TIMEOUT
#define TPCI200_B_TIMEOUT
#define TPCI200_C_TIMEOUT
#define TPCI200_D_TIMEOUT

#define TPCI200_A_ERROR
#define TPCI200_B_ERROR
#define TPCI200_C_ERROR
#define TPCI200_D_ERROR

#define TPCI200_A_INT0
#define TPCI200_A_INT1
#define TPCI200_B_INT0
#define TPCI200_B_INT1
#define TPCI200_C_INT0
#define TPCI200_C_INT1
#define TPCI200_D_INT0
#define TPCI200_D_INT1

#define TPCI200_SLOT_INT_MASK

/* PCI Configuration registers. The PCI bridge is a PLX Technology PCI9030. */
#define LAS1_DESC
#define LAS2_DESC

/* Bits in the LAS?_DESC registers */
#define LAS_BIT_BIGENDIAN

#define VME_IOID_SPACE
#define VME_MEM_SPACE

/**
 * struct slot_irq - slot IRQ definition.
 * @vector	Vector number
 * @handler	Handler called when IRQ arrives
 * @arg		Handler argument
 *
 */
struct slot_irq {};

/**
 * struct tpci200_slot - data specific to the tpci200 slot.
 * @slot_id	Slot identification gived to external interface
 * @irq		Slot IRQ infos
 * @io_phys	IO physical base address register of the slot
 * @id_phys	ID physical base address register of the slot
 * @int_phys	INT physical base address register of the slot
 * @mem_phys	MEM physical base address register of the slot
 *
 */
struct tpci200_slot {};

/**
 * struct tpci200_infos - informations specific of the TPCI200 tpci200.
 * @pci_dev		PCI device
 * @interface_regs	Pointer to IP interface space (Bar 2)
 * @ioidint_space	Pointer to IP ID, IO and INT space (Bar 3)
 * @mem8_space		Pointer to MEM space (Bar 4)
 *
 */
struct tpci200_infos {};
struct tpci200_board {};

#endif /* _TPCI200_H_ */