blob: 47295894bf910205db04cb116d6379ae6b53b03a [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Benjamin Herrenschmidt38e9d362017-01-30 18:11:55 +11002#ifndef __ISA_BRIDGE_H
3#define __ISA_BRIDGE_H
4
5#ifdef CONFIG_PPC64
6
7extern void isa_bridge_find_early(struct pci_controller *hose);
Benjamin Herrenschmidtb3c711a92017-01-30 18:11:56 +11008extern void isa_bridge_init_non_pci(struct device_node *np);
Benjamin Herrenschmidt38e9d362017-01-30 18:11:55 +11009
10static inline int isa_vaddr_is_ioport(void __iomem *address)
11{
12 /* Check if address hits the reserved legacy IO range */
13 unsigned long ea = (unsigned long)address;
14 return ea >= ISA_IO_BASE && ea < ISA_IO_END;
15}
16
17#else
18
19static inline int isa_vaddr_is_ioport(void __iomem *address)
20{
21 /* No specific ISA handling on ppc32 at this stage, it
22 * all goes through PCI
23 */
24 return 0;
25}
26
27#endif
28
29#endif /* __ISA_BRIDGE_H */
30