@@ -65,8 +65,8 @@ extern resource_size_t isa_mem_base;
6565extern bool isa_io_special ;
6666
6767#ifdef CONFIG_PPC32
68- #if defined( CONFIG_PPC_INDIRECT_PIO ) || defined( CONFIG_PPC_INDIRECT_MMIO )
69- #error CONFIG_PPC_INDIRECT_{PIO,MMIO} are not yet supported on 32 bits
68+ #ifdef CONFIG_PPC_INDIRECT_PIO
69+ #error CONFIG_PPC_INDIRECT_PIO is not yet supported on 32 bits
7070#endif
7171#endif
7272
@@ -261,9 +261,9 @@ extern void _memcpy_toio(volatile void __iomem *dest, const void *src,
261261 * for PowerPC is as close as possible to the x86 version of these, and thus
262262 * provides fairly heavy weight barriers for the non-raw versions
263263 *
264- * In addition, they support a hook mechanism when CONFIG_PPC_INDIRECT_MMIO
265- * or CONFIG_PPC_INDIRECT_PIO are set allowing the platform to provide its
266- * own implementation of some or all of the accessors.
264+ * In addition, they support a hook mechanism when CONFIG_PPC_INDIRECT_PIO
265+ * is set allowing the platform to provide its own implementation of some
266+ * of the accessors.
267267 */
268268
269269/*
@@ -277,51 +277,7 @@ extern void _memcpy_toio(volatile void __iomem *dest, const void *src,
277277/* Shortcut to the MMIO argument pointer */
278278#define PCI_IO_ADDR volatile void __iomem *
279279
280- /* Indirect IO address tokens:
281- *
282- * When CONFIG_PPC_INDIRECT_MMIO is set, the platform can provide hooks
283- * on all MMIOs. (Note that this is all 64 bits only for now)
284- *
285- * To help platforms who may need to differentiate MMIO addresses in
286- * their hooks, a bitfield is reserved for use by the platform near the
287- * top of MMIO addresses (not PIO, those have to cope the hard way).
288- *
289- * The highest address in the kernel virtual space are:
290- *
291- * d0003fffffffffff # with Hash MMU
292- * c00fffffffffffff # with Radix MMU
293- *
294- * The top 4 bits are reserved as the region ID on hash, leaving us 8 bits
295- * that can be used for the field.
296- *
297- * The direct IO mapping operations will then mask off those bits
298- * before doing the actual access, though that only happen when
299- * CONFIG_PPC_INDIRECT_MMIO is set, thus be careful when you use that
300- * mechanism
301- *
302- * For PIO, there is a separate CONFIG_PPC_INDIRECT_PIO which makes
303- * all PIO functions call through a hook.
304- */
305-
306- #ifdef CONFIG_PPC_INDIRECT_MMIO
307- #define PCI_IO_IND_TOKEN_SHIFT 52
308- #define PCI_IO_IND_TOKEN_MASK (0xfful << PCI_IO_IND_TOKEN_SHIFT)
309- #define PCI_FIX_ADDR (addr ) \
310- ((PCI_IO_ADDR)(((unsigned long)(addr)) & ~PCI_IO_IND_TOKEN_MASK))
311- #define PCI_GET_ADDR_TOKEN (addr ) \
312- (((unsigned long)(addr) & PCI_IO_IND_TOKEN_MASK) >> \
313- PCI_IO_IND_TOKEN_SHIFT)
314- #define PCI_SET_ADDR_TOKEN (addr , token ) \
315- do { \
316- unsigned long __a = (unsigned long)(addr); \
317- __a &= ~PCI_IO_IND_TOKEN_MASK; \
318- __a |= ((unsigned long)(token)) << PCI_IO_IND_TOKEN_SHIFT; \
319- (addr) = (void __iomem *)__a; \
320- } while(0)
321- #else
322280#define PCI_FIX_ADDR (addr ) (addr)
323- #endif
324-
325281
326282/*
327283 * Non ordered and non-swapping "raw" accessors
@@ -632,11 +588,7 @@ __do_out_asm(_rec_outl, "stwbrx")
632588#define DEF_PCI_HOOK_pio (x ) NULL
633589#endif
634590
635- #ifdef CONFIG_PPC_INDIRECT_MMIO
636- #define DEF_PCI_HOOK_mem (x ) x
637- #else
638591#define DEF_PCI_HOOK_mem (x ) NULL
639- #endif
640592
641593/* Structure containing all the hooks */
642594extern struct ppc_pci_io {
0 commit comments