linux/drivers/net/wan/wanxl.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * wanXL serial card driver for Linux
 * definitions common to host driver and card firmware
 *
 * Copyright (C) 2003 Krzysztof Halasa <[email protected]>
 */

#define RESET_WHILE_LOADING

/* you must rebuild the firmware if any of the following is changed */
#define DETECT_RAM
#define QUICC_MEMCPY_USES_PLX


#define STATUS_CABLE_V35
#define STATUS_CABLE_X21
#define STATUS_CABLE_V24
#define STATUS_CABLE_EIA530
#define STATUS_CABLE_INVALID
#define STATUS_CABLE_NONE

#define STATUS_CABLE_DCE
#define STATUS_CABLE_DSR
#define STATUS_CABLE_DCD
#define STATUS_CABLE_PM_SHIFT

#define PDM_OFFSET

#define TX_BUFFERS
#define RX_BUFFERS
#define RX_QUEUE_LENGTH

#define PACKET_EMPTY
#define PACKET_FULL
#define PACKET_SENT
#define PACKET_UNDERRUN
#define PACKET_PORT_MASK

/* bit numbers in PLX9060 doorbell registers */
#define DOORBELL_FROM_CARD_TX_0
#define DOORBELL_FROM_CARD_TX_1
#define DOORBELL_FROM_CARD_TX_2
#define DOORBELL_FROM_CARD_TX_3
#define DOORBELL_FROM_CARD_RX
#define DOORBELL_FROM_CARD_CABLE_0
#define DOORBELL_FROM_CARD_CABLE_1
#define DOORBELL_FROM_CARD_CABLE_2
#define DOORBELL_FROM_CARD_CABLE_3

#define DOORBELL_TO_CARD_OPEN_0
#define DOORBELL_TO_CARD_OPEN_1
#define DOORBELL_TO_CARD_OPEN_2
#define DOORBELL_TO_CARD_OPEN_3
#define DOORBELL_TO_CARD_CLOSE_0
#define DOORBELL_TO_CARD_CLOSE_1
#define DOORBELL_TO_CARD_CLOSE_2
#define DOORBELL_TO_CARD_CLOSE_3
#define DOORBELL_TO_CARD_TX_0
#define DOORBELL_TO_CARD_TX_1
#define DOORBELL_TO_CARD_TX_2
#define DOORBELL_TO_CARD_TX_3

/* firmware-only status bits, starting from last DOORBELL_TO_CARD + 1 */
#define TASK_SCC_0
#define TASK_SCC_1
#define TASK_SCC_2
#define TASK_SCC_3

#define ALIGN32(x)
#define BUFFER_LENGTH

/* Address of TX and RX buffers in 68360 address space */
#define BUFFERS_ADDR

#ifndef __ASSEMBLER__
#define PLX_OFFSET
#else
#define PLX_OFFSET
#endif

#define PLX_MAILBOX_0
#define PLX_MAILBOX_1
#define PLX_MAILBOX_2
#define PLX_MAILBOX_3
#define PLX_MAILBOX_4
#define PLX_MAILBOX_5
#define PLX_MAILBOX_6
#define PLX_MAILBOX_7
#define PLX_DOORBELL_TO_CARD
#define PLX_DOORBELL_FROM_CARD
#define PLX_INTERRUPT_CS
#define PLX_CONTROL

#ifdef __ASSEMBLER__
#define PLX_DMA_0_MODE
#define PLX_DMA_0_PCI
#define PLX_DMA_0_LOCAL
#define PLX_DMA_0_LENGTH
#define PLX_DMA_0_DESC
#define PLX_DMA_1_MODE
#define PLX_DMA_1_PCI
#define PLX_DMA_1_LOCAL
#define PLX_DMA_1_LENGTH
#define PLX_DMA_1_DESC
#define PLX_DMA_CMD_STS
#define PLX_DMA_ARBITR_0
#define PLX_DMA_ARBITR_1
#endif

#define DESC_LENGTH

/* offsets from start of status_t */
/* card to host */
#define STATUS_OPEN
#define STATUS_CABLE
#define STATUS_RX_OVERRUNS
#define STATUS_RX_FRAME_ERRORS

/* host to card */
#define STATUS_PARITY
#define STATUS_ENCODING
#define STATUS_CLOCKING
#define STATUS_TX_DESCS

#ifndef __ASSEMBLER__

desc_t;


port_status_t;

#endif /* __ASSEMBLER__ */