Arnd Bergmann | c11fc34 | 2015-01-30 10:45:33 +0100 | [diff] [blame] | 1 | #ifndef _IOP13XX_PCI_H_ |
| 2 | #define _IOP13XX_PCI_H_ |
| 3 | #include <linux/io.h> |
| 4 | #include <mach/irqs.h> |
| 5 | |
Rob Herring | 17d971e | 2012-02-29 10:58:05 -0600 | [diff] [blame] | 6 | #include <linux/types.h> |
| 7 | |
Arnd Bergmann | abf2ba1 | 2012-09-14 20:17:50 +0000 | [diff] [blame] | 8 | extern void __iomem *iop13xx_atue_mem_base; |
| 9 | extern void __iomem *iop13xx_atux_mem_base; |
Rob Herring | 17d971e | 2012-02-29 10:58:05 -0600 | [diff] [blame] | 10 | extern size_t iop13xx_atue_mem_size; |
| 11 | extern size_t iop13xx_atux_mem_size; |
Arnd Bergmann | c11fc34 | 2015-01-30 10:45:33 +0100 | [diff] [blame] | 12 | |
| 13 | struct pci_sys_data; |
| 14 | struct hw_pci; |
| 15 | int iop13xx_pci_setup(int nr, struct pci_sys_data *sys); |
| 16 | struct pci_bus *iop13xx_scan_bus(int nr, struct pci_sys_data *); |
| 17 | void iop13xx_atu_select(struct hw_pci *plat_pci); |
| 18 | void iop13xx_pci_init(void); |
| 19 | void iop13xx_map_pci_memory(void); |
| 20 | |
| 21 | #define IOP_PCI_STATUS_ERROR (PCI_STATUS_PARITY | \ |
| 22 | PCI_STATUS_SIG_TARGET_ABORT | \ |
| 23 | PCI_STATUS_REC_TARGET_ABORT | \ |
| 24 | PCI_STATUS_REC_TARGET_ABORT | \ |
| 25 | PCI_STATUS_REC_MASTER_ABORT | \ |
| 26 | PCI_STATUS_SIG_SYSTEM_ERROR | \ |
| 27 | PCI_STATUS_DETECTED_PARITY) |
| 28 | |
| 29 | #define IOP13XX_ATUE_ATUISR_ERROR (IOP13XX_ATUE_STAT_HALT_ON_ERROR | \ |
| 30 | IOP13XX_ATUE_STAT_ROOT_SYS_ERR | \ |
| 31 | IOP13XX_ATUE_STAT_PCI_IFACE_ERR | \ |
| 32 | IOP13XX_ATUE_STAT_ERR_COR | \ |
| 33 | IOP13XX_ATUE_STAT_ERR_UNCOR | \ |
| 34 | IOP13XX_ATUE_STAT_CRS | \ |
| 35 | IOP13XX_ATUE_STAT_DET_PAR_ERR | \ |
| 36 | IOP13XX_ATUE_STAT_EXT_REC_MABORT | \ |
| 37 | IOP13XX_ATUE_STAT_SIG_TABORT | \ |
| 38 | IOP13XX_ATUE_STAT_EXT_REC_TABORT | \ |
| 39 | IOP13XX_ATUE_STAT_MASTER_DATA_PAR) |
| 40 | |
| 41 | #define IOP13XX_ATUX_ATUISR_ERROR (IOP13XX_ATUX_STAT_TX_SCEM | \ |
| 42 | IOP13XX_ATUX_STAT_REC_SCEM | \ |
| 43 | IOP13XX_ATUX_STAT_TX_SERR | \ |
| 44 | IOP13XX_ATUX_STAT_DET_PAR_ERR | \ |
| 45 | IOP13XX_ATUX_STAT_INT_REC_MABORT | \ |
| 46 | IOP13XX_ATUX_STAT_REC_SERR | \ |
| 47 | IOP13XX_ATUX_STAT_EXT_REC_MABORT | \ |
| 48 | IOP13XX_ATUX_STAT_EXT_REC_TABORT | \ |
| 49 | IOP13XX_ATUX_STAT_EXT_SIG_TABORT | \ |
| 50 | IOP13XX_ATUX_STAT_MASTER_DATA_PAR) |
| 51 | |
| 52 | /* PCI interrupts |
| 53 | */ |
| 54 | #define ATUX_INTA IRQ_IOP13XX_XINT0 |
| 55 | #define ATUX_INTB IRQ_IOP13XX_XINT1 |
| 56 | #define ATUX_INTC IRQ_IOP13XX_XINT2 |
| 57 | #define ATUX_INTD IRQ_IOP13XX_XINT3 |
| 58 | |
| 59 | #define ATUE_INTA IRQ_IOP13XX_ATUE_IMA |
| 60 | #define ATUE_INTB IRQ_IOP13XX_ATUE_IMB |
| 61 | #define ATUE_INTC IRQ_IOP13XX_ATUE_IMC |
| 62 | #define ATUE_INTD IRQ_IOP13XX_ATUE_IMD |
| 63 | |
| 64 | #endif /* _IOP13XX_PCI_H_ */ |