1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
238e9d36bSBenjamin Herrenschmidt #ifndef __ISA_BRIDGE_H
338e9d36bSBenjamin Herrenschmidt #define __ISA_BRIDGE_H
438e9d36bSBenjamin Herrenschmidt 
538e9d36bSBenjamin Herrenschmidt #ifdef CONFIG_PPC64
638e9d36bSBenjamin Herrenschmidt 
738e9d36bSBenjamin Herrenschmidt extern void isa_bridge_find_early(struct pci_controller *hose);
8b3c711a9SBenjamin Herrenschmidt extern void isa_bridge_init_non_pci(struct device_node *np);
938e9d36bSBenjamin Herrenschmidt 
isa_vaddr_is_ioport(void __iomem * address)1038e9d36bSBenjamin Herrenschmidt static inline int isa_vaddr_is_ioport(void __iomem *address)
1138e9d36bSBenjamin Herrenschmidt {
1238e9d36bSBenjamin Herrenschmidt 	/* Check if address hits the reserved legacy IO range */
1338e9d36bSBenjamin Herrenschmidt 	unsigned long ea = (unsigned long)address;
1438e9d36bSBenjamin Herrenschmidt 	return ea >= ISA_IO_BASE && ea < ISA_IO_END;
1538e9d36bSBenjamin Herrenschmidt }
1638e9d36bSBenjamin Herrenschmidt 
1738e9d36bSBenjamin Herrenschmidt #else
1838e9d36bSBenjamin Herrenschmidt 
isa_vaddr_is_ioport(void __iomem * address)1938e9d36bSBenjamin Herrenschmidt static inline int isa_vaddr_is_ioport(void __iomem *address)
2038e9d36bSBenjamin Herrenschmidt {
2138e9d36bSBenjamin Herrenschmidt 	/* No specific ISA handling on ppc32 at this stage, it
2238e9d36bSBenjamin Herrenschmidt 	 * all goes through PCI
2338e9d36bSBenjamin Herrenschmidt 	 */
2438e9d36bSBenjamin Herrenschmidt 	return 0;
2538e9d36bSBenjamin Herrenschmidt }
2638e9d36bSBenjamin Herrenschmidt 
2738e9d36bSBenjamin Herrenschmidt #endif
2838e9d36bSBenjamin Herrenschmidt 
2938e9d36bSBenjamin Herrenschmidt #endif /* __ISA_BRIDGE_H */
3038e9d36bSBenjamin Herrenschmidt 
31