1 /* $NetBSD: rmixl_pcixvar.h,v 1.1.2.1 2010/04/07 19:25:48 cliff Exp $ */ 2 3 #ifndef _MIPS_RMI_PCIX_VAR_H_ 4 #define _MIPS_RMI_PCIX_VAR_H_ 5 6 #include <dev/pci/pcivar.h> 7 8 typedef struct rmixl_pcix_dispatch { 9 LIST_ENTRY(rmixl_pcix_dispatch) next; 10 int (*func)(void *); 11 void *arg; 12 u_int bitno; 13 u_int irq; 14 struct evcnt count; 15 char count_name[32]; 16 } rmixl_pcix_dispatch_t; 17 18 struct rmixl_pcix_softc; 19 20 typedef struct rmixl_pcix_intr { 21 struct rmixl_pcix_softc *sc; 22 LIST_HEAD(, rmixl_pcix_dispatch) dispatch; 23 u_int intrpin; 24 u_int ipl; 25 bool enabled; 26 void *ih; /* mips interrupt handle */ 27 } rmixl_pcix_intr_t; 28 29 #define RMIXL_PCIX_NINTR 4 /* PCI INT[A,B,C,D] */ 30 31 typedef struct rmixl_pcix_softc { 32 device_t sc_dev; 33 struct mips_pci_chipset sc_pci_chipset; 34 bus_space_tag_t sc_pci_cfg_memt; 35 bus_space_tag_t sc_pci_ecfg_memt; 36 bus_dma_tag_t sc_29bit_dmat; 37 bus_dma_tag_t sc_32bit_dmat; 38 bus_dma_tag_t sc_64bit_dmat; 39 int sc_tmsk; 40 void *sc_fatal_ih; 41 void *sc_ih; 42 rmixl_pcix_intr_t sc_intr[RMIXL_PCIX_NINTR]; 43 bool sc_intr_init_done; 44 } rmixl_pcix_softc_t; 45 46 47 extern void rmixl_physaddr_init_pcix(struct extent *); 48 49 #endif /* _MIPS_RMI_PCIX_VAR_H_ */ 50 51