blob: 71b9c57e1fded94766c14557760f3699419f43a5 [file] [log] [blame]
Arnd Bergmannc11fc342015-01-30 10:45:33 +01001#ifndef _IOP13XX_PCI_H_
2#define _IOP13XX_PCI_H_
3#include <linux/io.h>
4#include <mach/irqs.h>
5
Rob Herring17d971e2012-02-29 10:58:05 -06006#include <linux/types.h>
7
Arnd Bergmannabf2ba12012-09-14 20:17:50 +00008extern void __iomem *iop13xx_atue_mem_base;
9extern void __iomem *iop13xx_atux_mem_base;
Rob Herring17d971e2012-02-29 10:58:05 -060010extern size_t iop13xx_atue_mem_size;
11extern size_t iop13xx_atux_mem_size;
Arnd Bergmannc11fc342015-01-30 10:45:33 +010012
13struct pci_sys_data;
14struct hw_pci;
15int iop13xx_pci_setup(int nr, struct pci_sys_data *sys);
16struct pci_bus *iop13xx_scan_bus(int nr, struct pci_sys_data *);
17void iop13xx_atu_select(struct hw_pci *plat_pci);
18void iop13xx_pci_init(void);
19void 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_ */