/* SPDX-License-Identifier: GPL-2.0 */
/*
* Stuff for AMCC S5933 PCI Controller
*
* Author: Michal Dobes <dobes@tesnet.cz>
*
* Inspirated from general-purpose AMCC S5933 PCI Matchmaker driver
* made by Andrea Cisternino <acister@pcape1.pi.infn.it>
* and as result of espionage from MITE code made by David A. Schleef.
* Thanks to AMCC for their on-line documentation and bus master DMA
* example.
*/
#ifndef _AMCC_S5933_H_
#define _AMCC_S5933_H_
/****************************************************************************/
/* AMCC Operation Register Offsets - PCI */
/****************************************************************************/
#define AMCC_OP_REG_OMB1 0 x00
#define AMCC_OP_REG_OMB2 0 x04
#define AMCC_OP_REG_OMB3 0 x08
#define AMCC_OP_REG_OMB4 0 x0c
#define AMCC_OP_REG_IMB1 0 x10
#define AMCC_OP_REG_IMB2 0 x14
#define AMCC_OP_REG_IMB3 0 x18
#define AMCC_OP_REG_IMB4 0 x1c
#define AMCC_OP_REG_FIFO 0 x20
#define AMCC_OP_REG_MWAR 0 x24
#define AMCC_OP_REG_MWTC 0 x28
#define AMCC_OP_REG_MRAR 0 x2c
#define AMCC_OP_REG_MRTC 0 x30
#define AMCC_OP_REG_MBEF 0 x34
#define AMCC_OP_REG_INTCSR 0 x38
#define AMCC_OP_REG_INTCSR_SRC (AMCC_OP_REG_INTCSR + 2 ) /* INT source */
#define AMCC_OP_REG_INTCSR_FEC (AMCC_OP_REG_INTCSR + 3 ) /* FIFO ctrl */
#define AMCC_OP_REG_MCSR 0 x3c
#define AMCC_OP_REG_MCSR_NVDATA (AMCC_OP_REG_MCSR + 2 ) /* Data in byte 2 */
#define AMCC_OP_REG_MCSR_NVCMD (AMCC_OP_REG_MCSR + 3 ) /* Command in byte 3 */
#define AMCC_FIFO_DEPTH_DWORD 8
#define AMCC_FIFO_DEPTH_BYTES (8 * sizeof (u32))
/****************************************************************************/
/* AMCC - PCI Interrupt Control/Status Register */
/****************************************************************************/
#define INTCSR_OUTBOX_BYTE(x) ((x) & 0 x3)
#define INTCSR_OUTBOX_SELECT(x) (((x) & 0 x3) << 2 )
#define INTCSR_OUTBOX_EMPTY_INT 0 x10 /* enable outbox empty interrupt */
#define INTCSR_INBOX_BYTE(x) (((x) & 0 x3) << 8 )
#define INTCSR_INBOX_SELECT(x) (((x) & 0 x3) << 10 )
#define INTCSR_INBOX_FULL_INT 0 x1000 /* enable inbox full interrupt */
/* read, or write clear inbox full interrupt */
#define INTCSR_INBOX_INTR_STATUS 0 x20000
/* read only, interrupt asserted */
#define INTCSR_INTR_ASSERTED 0 x800000
/****************************************************************************/
/* AMCC - PCI non-volatile ram command register (byte 3 of AMCC_OP_REG_MCSR) */
/****************************************************************************/
#define MCSR_NV_LOAD_LOW_ADDR 0 x0
#define MCSR_NV_LOAD_HIGH_ADDR 0 x20
#define MCSR_NV_WRITE 0 x40
#define MCSR_NV_READ 0 x60
#define MCSR_NV_MASK 0 x60
#define MCSR_NV_ENABLE 0 x80
#define MCSR_NV_BUSY MCSR_NV_ENABLE
/****************************************************************************/
/* AMCC Operation Registers Size - PCI */
/****************************************************************************/
#define AMCC_OP_REG_SIZE 64 /* in bytes */
/****************************************************************************/
/* AMCC Operation Register Offsets - Add-on */
/****************************************************************************/
#define AMCC_OP_REG_AIMB1 0 x00
#define AMCC_OP_REG_AIMB2 0 x04
#define AMCC_OP_REG_AIMB3 0 x08
#define AMCC_OP_REG_AIMB4 0 x0c
#define AMCC_OP_REG_AOMB1 0 x10
#define AMCC_OP_REG_AOMB2 0 x14
#define AMCC_OP_REG_AOMB3 0 x18
#define AMCC_OP_REG_AOMB4 0 x1c
#define AMCC_OP_REG_AFIFO 0 x20
#define AMCC_OP_REG_AMWAR 0 x24
#define AMCC_OP_REG_APTA 0 x28
#define AMCC_OP_REG_APTD 0 x2c
#define AMCC_OP_REG_AMRAR 0 x30
#define AMCC_OP_REG_AMBEF 0 x34
#define AMCC_OP_REG_AINT 0 x38
#define AMCC_OP_REG_AGCSTS 0 x3c
#define AMCC_OP_REG_AMWTC 0 x58
#define AMCC_OP_REG_AMRTC 0 x5c
/****************************************************************************/
/* AMCC - Add-on General Control/Status Register */
/****************************************************************************/
#define AGCSTS_CONTROL_MASK 0 xfffff000
#define AGCSTS_NV_ACC_MASK 0 xe0000000
#define AGCSTS_RESET_MASK 0 x0e000000
#define AGCSTS_NV_DA_MASK 0 x00ff0000
#define AGCSTS_BIST_MASK 0 x0000f000
#define AGCSTS_STATUS_MASK 0 x000000ff
#define AGCSTS_TCZERO_MASK 0 x000000c0
#define AGCSTS_FIFO_ST_MASK 0 x0000003f
#define AGCSTS_TC_ENABLE 0 x10000000
#define AGCSTS_RESET_MBFLAGS 0 x08000000
#define AGCSTS_RESET_P2A_FIFO 0 x04000000
#define AGCSTS_RESET_A2P_FIFO 0 x02000000
#define AGCSTS_RESET_FIFOS (AGCSTS_RESET_A2P_FIFO | AGCSTS_RESET_P2A_FIFO)
#define AGCSTS_A2P_TCOUNT 0 x00000080
#define AGCSTS_P2A_TCOUNT 0 x00000040
#define AGCSTS_FS_P2A_EMPTY 0 x00000020
#define AGCSTS_FS_P2A_HALF 0 x00000010
#define AGCSTS_FS_P2A_FULL 0 x00000008
#define AGCSTS_FS_A2P_EMPTY 0 x00000004
#define AGCSTS_FS_A2P_HALF 0 x00000002
#define AGCSTS_FS_A2P_FULL 0 x00000001
/****************************************************************************/
/* AMCC - Add-on Interrupt Control/Status Register */
/****************************************************************************/
#define AINT_INT_MASK 0 x00ff0000
#define AINT_SEL_MASK 0 x0000ffff
#define AINT_IS_ENSEL_MASK 0 x00001f1f
#define AINT_INT_ASSERTED 0 x00800000
#define AINT_BM_ERROR 0 x00200000
#define AINT_BIST_INT 0 x00100000
#define AINT_RT_COMPLETE 0 x00080000
#define AINT_WT_COMPLETE 0 x00040000
#define AINT_OUT_MB_INT 0 x00020000
#define AINT_IN_MB_INT 0 x00010000
#define AINT_READ_COMPL 0 x00008000
#define AINT_WRITE_COMPL 0 x00004000
#define AINT_OMB_ENABLE 0 x00001000
#define AINT_OMB_SELECT 0 x00000c00
#define AINT_OMB_BYTE 0 x00000300
#define AINT_IMB_ENABLE 0 x00000010
#define AINT_IMB_SELECT 0 x0000000c
#define AINT_IMB_BYTE 0 x00000003
/* these are bits from various different registers, needs cleanup XXX */
/* Enable Bus Mastering */
#define EN_A2P_TRANSFERS 0 x00000400
/* FIFO Flag Reset */
#define RESET_A2P_FLAGS 0 x04000000L
/* FIFO Relative Priority */
#define A2P_HI_PRIORITY 0 x00000100L
/* Identify Interrupt Sources */
#define ANY_S593X_INT 0 x00800000L
#define READ_TC_INT 0 x00080000L
#define WRITE_TC_INT 0 x00040000L
#define IN_MB_INT 0 x00020000L
#define MASTER_ABORT_INT 0 x00100000L
#define TARGET_ABORT_INT 0 x00200000L
#define BUS_MASTER_INT 0 x00200000L
#endif
Messung V0.5 in Prozent C=96 H=96 G=95
¤ Dauer der Verarbeitung: 0.8 Sekunden
(vorverarbeitet am 2026-06-07)
¤
*© Formatika GbR, Deutschland