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