blob: 0410346e2cf65d78415889af029f7b1fced3cd5e [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * linux/include/asm-generic/pci.h
3 *
4 * Copyright (C) 2003 Russell King
5 */
6#ifndef _ASM_GENERIC_PCI_H
7#define _ASM_GENERIC_PCI_H
8
Bjorn Helgaas36a66cd2012-02-23 20:19:00 -07009#define ARCH_HAS_GENERIC_PCI_OFFSETS
Dominik Brodowski43c34732005-08-04 18:06:21 -070010
Alex Chianga7db5042009-06-22 08:08:07 -060011static inline struct resource *
12pcibios_select_root(struct pci_dev *pdev, struct resource *res)
13{
14 struct resource *root = NULL;
15
16 if (res->flags & IORESOURCE_IO)
17 root = &ioport_resource;
18 if (res->flags & IORESOURCE_MEM)
19 root = &iomem_resource;
20
21 return root;
22}
Linus Torvalds1da177e2005-04-16 15:20:36 -070023
24#ifndef HAVE_ARCH_PCI_GET_LEGACY_IDE_IRQ
25static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
26{
27 return channel ? 15 : 14;
28}
29#endif /* HAVE_ARCH_PCI_GET_LEGACY_IDE_IRQ */
30
Arnd Bergmannd7c4f1b2009-05-13 22:56:31 +000031/*
32 * By default, assume that no iommu is in use and that the PCI
33 * space is mapped to address physical 0.
34 */
35#ifndef PCI_DMA_BUS_IS_PHYS
36#define PCI_DMA_BUS_IS_PHYS (1)
Linus Torvalds1da177e2005-04-16 15:20:36 -070037#endif
Arnd Bergmannd7c4f1b2009-05-13 22:56:31 +000038
39#endif /* _ASM_GENERIC_PCI_H */