9#ifndef VME_TSI148_DRIVER_H
10#define VME_TSI148_DRIVER_H
75#define VME_MODE_PREFETCH_ENABLE VME_AM_IS_MEMORY
76#define _LD_VME_MODE_PREFETCHSZ 24
77#define VME_MODE_PREFETCH_SIZE(x) (((x)&3)<<_LD_VME_MODE_PREFETCHSZ)
83#define VME_MODE_MATCH_MASK (3<<30)
84#define VME_MODE_EXACT_MATCH (2<<30)
85#define VME_MODE_AS_MATCH (1<<30)
91typedef volatile uint32_t BERegister;
105vmeTsi148FindPciBase(
int instance, BERegister **pbase);
116vmeTsi148InitInstance(
unsigned instance);
128vmeTsi148ResetXX(BERegister *base);
136vmeTsi148ResetBusXX(BERegister *base);
140vmeTsi148ResetBus(
void);
169vmeTsi148OutboundPortCfgXX(
172 unsigned long address_space,
173 unsigned long vme_address,
174 unsigned long pci_address,
175 unsigned long length);
178vmeTsi148OutboundPortCfg(
180 unsigned long address_space,
181 unsigned long vme_address,
182 unsigned long pci_address,
183 unsigned long length);
188vmeTsi148InboundPortCfgXX(
191 unsigned long address_space,
192 unsigned long vme_address,
193 unsigned long pci_address,
194 unsigned long length);
197vmeTsi148InboundPortCfg(
199 unsigned long address_space,
200 unsigned long vme_address,
201 unsigned long pci_address,
202 unsigned long length);
259#ifdef _VME_TSI148_DECLARE_SHOW_ROUTINES
266vmeTsi148OutboundPortsShowXX(BERegister *base, FILE *f);
269vmeTsi148OutboundPortsShow(FILE *f);
276vmeTsi148InboundPortsShowXX(BERegister *base, FILE *f);
279vmeTsi148InboundPortsShow(FILE *f);
286vmeTsi148DisableAllInboundPortsXX(BERegister *base);
289vmeTsi148DisableAllInboundPorts(
void);
292vmeTsi148DisableAllOutboundPortsXX(BERegister *base);
295vmeTsi148DisableAllOutboundPorts(
void);
297# define TSI_VEAT_VES (1<<31)
298# define TSI_VEAT_VEOF (1<<30)
299# define TSI_VEAT_VESCL (1<<29)
300# define TSI_VEAT_2eOT (1<<21)
301# define TSI_VEAT_2eST (1<<20)
302# define TSI_VEAT_BERR (1<<19)
303# define TSI_VEAT_LWORD (1<<18)
304# define TSI_VEAT_WRITE (1<<17)
305# define TSI_VEAT_IACK (1<<16)
306# define TSI_VEAT_DS1 (1<<15)
307# define TSI_VEAT_DS0 (1<<14)
308# define TSI_VEAT_AM(v) (((v)>>8)&63)
309# define TSI_VEAT_XAM(v) ((v)&255)
328vmeTsi148ClearVMEBusErrorsXX(BERegister *base, uint32_t *paddr);
331vmeTsi148ClearVMEBusErrors(uint32_t *paddr);
352vmeTsi148MapCRGXX(BERegister *base, uint32_t vme_base, uint32_t address_space);
355vmeTsi148MapCRG(uint32_t vme_base, uint32_t address_space);
378typedef void (*VmeTsi148ISR) (
void *usrArg,
unsigned long vector);
384vmeTsi148InstallISR(
unsigned long vector, VmeTsi148ISR handler,
void *usrArg);
391vmeTsi148RemoveISR(
unsigned long vector, VmeTsi148ISR handler,
void *usrArg);
397vmeTsi148ISRGet(
unsigned long vector,
void **parg);
407vmeTsi148IntEnable(
unsigned int level);
410vmeTsi148IntDisable(
unsigned int level);
422vmeTsi148IntIsEnabled(
unsigned int level);
433vmeTsi148SetIackWidth(
int level,
int width);
471vmeTsi148IntRoute(
unsigned int level,
unsigned int pin);
502vmeTsi148IntRaiseXX(BERegister *base,
int level,
unsigned vector);
505vmeTsi148IntRaise(
int level,
unsigned vector);
531vmeTsi148IntLoopbackTst(
int level,
unsigned vector);
549#define TSI_DMA_INT_VEC 257
550#define TSI_LERR_INT_VEC 258
551#define TSI_VERR_INT_VEC 259
553#define TSI_VME_SW_IACK_INT_VEC 261
555#define TSI_SYSFAIL_INT_VEC 263
556#define TSI_ACFAIL_INT_VEC 264
557#define TSI_MBOX0_INT_VEC 265
558#define TSI_MBOX1_INT_VEC 266
559#define TSI_MBOX2_INT_VEC 267
560#define TSI_MBOX3_INT_VEC 268
561#define TSI_LM0_INT_VEC 269
562#define TSI_LM1_INT_VEC 270
563#define TSI_LM2_INT_VEC 271
564#define TSI_LM3_INT_VEC 272
567#define TSI_VIES_INT_VEC 273
568#define TSI_DMA1_INT_VEC 274
570#define TSI_NUM_INT_VECS 275
572#ifdef __INSIDE_RTEMS_BSP__
650#define VMETSI148_IRQ_MGR_FLAG_SHARED 1
652vmeTsi148InstallIrqMgrAlt(
int shared,
int tsi_pin0,
int pic_pin0, ...);
655vmeTsi148InstallIrqMgrVa(
int shared,
int tsi_pin0,
int pic_pin0, va_list ap);
vxworks compatible addressing modes