1*9745fb07SJonathan Yong /* SPDX-License-Identifier: GPL-2.0 */
2*9745fb07SJonathan Yong /*
3*9745fb07SJonathan Yong  * Primary to Sideband (P2SB) bridge access support
4*9745fb07SJonathan Yong  */
5*9745fb07SJonathan Yong 
6*9745fb07SJonathan Yong #ifndef _PLATFORM_DATA_X86_P2SB_H
7*9745fb07SJonathan Yong #define _PLATFORM_DATA_X86_P2SB_H
8*9745fb07SJonathan Yong 
9*9745fb07SJonathan Yong #include <linux/errno.h>
10*9745fb07SJonathan Yong #include <linux/kconfig.h>
11*9745fb07SJonathan Yong 
12*9745fb07SJonathan Yong struct pci_bus;
13*9745fb07SJonathan Yong struct resource;
14*9745fb07SJonathan Yong 
15*9745fb07SJonathan Yong #if IS_BUILTIN(CONFIG_P2SB)
16*9745fb07SJonathan Yong 
17*9745fb07SJonathan Yong int p2sb_bar(struct pci_bus *bus, unsigned int devfn, struct resource *mem);
18*9745fb07SJonathan Yong 
19*9745fb07SJonathan Yong #else /* CONFIG_P2SB */
20*9745fb07SJonathan Yong 
p2sb_bar(struct pci_bus * bus,unsigned int devfn,struct resource * mem)21*9745fb07SJonathan Yong static inline int p2sb_bar(struct pci_bus *bus, unsigned int devfn, struct resource *mem)
22*9745fb07SJonathan Yong {
23*9745fb07SJonathan Yong 	return -ENODEV;
24*9745fb07SJonathan Yong }
25*9745fb07SJonathan Yong 
26*9745fb07SJonathan Yong #endif /* CONFIG_P2SB is not set */
27*9745fb07SJonathan Yong 
28*9745fb07SJonathan Yong #endif /* _PLATFORM_DATA_X86_P2SB_H */
29