diff options
Diffstat (limited to 'arch/powerpc/include/asm/io.h')
-rw-r--r-- | arch/powerpc/include/asm/io.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/arch/powerpc/include/asm/io.h b/arch/powerpc/include/asm/io.h index 001f2f11c19..2f365f5007a 100644 --- a/arch/powerpc/include/asm/io.h +++ b/arch/powerpc/include/asm/io.h | |||
@@ -481,10 +481,16 @@ __do_out_asm(_rec_outl, "stwbrx") | |||
481 | _memcpy_fromio(dst,PCI_FIX_ADDR(src),n) | 481 | _memcpy_fromio(dst,PCI_FIX_ADDR(src),n) |
482 | #endif /* !CONFIG_EEH */ | 482 | #endif /* !CONFIG_EEH */ |
483 | 483 | ||
484 | #ifdef CONFIG_PPC_INDIRECT_IO | 484 | #ifdef CONFIG_PPC_INDIRECT_PIO |
485 | #define DEF_PCI_HOOK(x) x | 485 | #define DEF_PCI_HOOK_pio(x) x |
486 | #else | ||
487 | #define DEF_PCI_HOOK_pio(x) NULL | ||
488 | #endif | ||
489 | |||
490 | #ifdef CONFIG_PPC_INDIRECT_MMIO | ||
491 | #define DEF_PCI_HOOK_mem(x) x | ||
486 | #else | 492 | #else |
487 | #define DEF_PCI_HOOK(x) NULL | 493 | #define DEF_PCI_HOOK_mem(x) NULL |
488 | #endif | 494 | #endif |
489 | 495 | ||
490 | /* Structure containing all the hooks */ | 496 | /* Structure containing all the hooks */ |
@@ -504,7 +510,7 @@ extern struct ppc_pci_io { | |||
504 | #define DEF_PCI_AC_RET(name, ret, at, al, space, aa) \ | 510 | #define DEF_PCI_AC_RET(name, ret, at, al, space, aa) \ |
505 | static inline ret name at \ | 511 | static inline ret name at \ |
506 | { \ | 512 | { \ |
507 | if (DEF_PCI_HOOK(ppc_pci_io.name) != NULL) \ | 513 | if (DEF_PCI_HOOK_##space(ppc_pci_io.name) != NULL) \ |
508 | return ppc_pci_io.name al; \ | 514 | return ppc_pci_io.name al; \ |
509 | return __do_##name al; \ | 515 | return __do_##name al; \ |
510 | } | 516 | } |
@@ -512,7 +518,7 @@ static inline ret name at \ | |||
512 | #define DEF_PCI_AC_NORET(name, at, al, space, aa) \ | 518 | #define DEF_PCI_AC_NORET(name, at, al, space, aa) \ |
513 | static inline void name at \ | 519 | static inline void name at \ |
514 | { \ | 520 | { \ |
515 | if (DEF_PCI_HOOK(ppc_pci_io.name) != NULL) \ | 521 | if (DEF_PCI_HOOK_##space(ppc_pci_io.name) != NULL) \ |
516 | ppc_pci_io.name al; \ | 522 | ppc_pci_io.name al; \ |
517 | else \ | 523 | else \ |
518 | __do_##name al; \ | 524 | __do_##name al; \ |