xref: /openbmc/linux/arch/mips/include/asm/txx9/pci.h (revision e5451c8f8330e03ad3cfa16048b4daf961af434f)
1*384740dcSRalf Baechle /*
2*384740dcSRalf Baechle  * This file is subject to the terms and conditions of the GNU General Public
3*384740dcSRalf Baechle  * License.  See the file "COPYING" in the main directory of this archive
4*384740dcSRalf Baechle  * for more details.
5*384740dcSRalf Baechle  */
6*384740dcSRalf Baechle #ifndef __ASM_TXX9_PCI_H
7*384740dcSRalf Baechle #define __ASM_TXX9_PCI_H
8*384740dcSRalf Baechle 
9*384740dcSRalf Baechle #include <linux/pci.h>
10*384740dcSRalf Baechle 
11*384740dcSRalf Baechle extern struct pci_controller txx9_primary_pcic;
12*384740dcSRalf Baechle struct pci_controller *
13*384740dcSRalf Baechle txx9_alloc_pci_controller(struct pci_controller *pcic,
14*384740dcSRalf Baechle 			  unsigned long mem_base, unsigned long mem_size,
15*384740dcSRalf Baechle 			  unsigned long io_base, unsigned long io_size);
16*384740dcSRalf Baechle 
17*384740dcSRalf Baechle int txx9_pci66_check(struct pci_controller *hose, int top_bus,
18*384740dcSRalf Baechle 			int current_bus);
19*384740dcSRalf Baechle extern int txx9_pci_mem_high __initdata;
20*384740dcSRalf Baechle 
21*384740dcSRalf Baechle extern int txx9_pci_option;
22*384740dcSRalf Baechle #define TXX9_PCI_OPT_PICMG	0x0002
23*384740dcSRalf Baechle #define TXX9_PCI_OPT_CLK_33	0x0008
24*384740dcSRalf Baechle #define TXX9_PCI_OPT_CLK_66	0x0010
25*384740dcSRalf Baechle #define TXX9_PCI_OPT_CLK_MASK	\
26*384740dcSRalf Baechle 	(TXX9_PCI_OPT_CLK_33 | TXX9_PCI_OPT_CLK_66)
27*384740dcSRalf Baechle #define TXX9_PCI_OPT_CLK_AUTO	TXX9_PCI_OPT_CLK_MASK
28*384740dcSRalf Baechle 
29*384740dcSRalf Baechle enum txx9_pci_err_action {
30*384740dcSRalf Baechle 	TXX9_PCI_ERR_REPORT,
31*384740dcSRalf Baechle 	TXX9_PCI_ERR_IGNORE,
32*384740dcSRalf Baechle 	TXX9_PCI_ERR_PANIC,
33*384740dcSRalf Baechle };
34*384740dcSRalf Baechle extern enum txx9_pci_err_action txx9_pci_err_action;
35*384740dcSRalf Baechle 
36*384740dcSRalf Baechle extern char * (*txx9_board_pcibios_setup)(char *str);
37*384740dcSRalf Baechle char *txx9_pcibios_setup(char *str);
38*384740dcSRalf Baechle 
39*384740dcSRalf Baechle #endif /* __ASM_TXX9_PCI_H */
40