18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci#ifndef __ISA_BRIDGE_H 38c2ecf20Sopenharmony_ci#define __ISA_BRIDGE_H 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci#ifdef CONFIG_PPC64 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ciextern void isa_bridge_find_early(struct pci_controller *hose); 88c2ecf20Sopenharmony_ciextern void isa_bridge_init_non_pci(struct device_node *np); 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_cistatic inline int isa_vaddr_is_ioport(void __iomem *address) 118c2ecf20Sopenharmony_ci{ 128c2ecf20Sopenharmony_ci /* Check if address hits the reserved legacy IO range */ 138c2ecf20Sopenharmony_ci unsigned long ea = (unsigned long)address; 148c2ecf20Sopenharmony_ci return ea >= ISA_IO_BASE && ea < ISA_IO_END; 158c2ecf20Sopenharmony_ci} 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci#else 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_cistatic inline int isa_vaddr_is_ioport(void __iomem *address) 208c2ecf20Sopenharmony_ci{ 218c2ecf20Sopenharmony_ci /* No specific ISA handling on ppc32 at this stage, it 228c2ecf20Sopenharmony_ci * all goes through PCI 238c2ecf20Sopenharmony_ci */ 248c2ecf20Sopenharmony_ci return 0; 258c2ecf20Sopenharmony_ci} 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ci#endif 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ci#endif /* __ISA_BRIDGE_H */ 308c2ecf20Sopenharmony_ci 31