projects/linux·commit e2de8492

[PATCH] mips: add pcibios_select_root

e2de8492 · Yoichi Yuasa <[email protected]> · 2005-09-03 15:56:19 -07:00

Add pcibios_select_root to MIPS.

Signed-off-by: Yoichi Yuasa <[email protected]>
Cc: Ralf Baechle <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
e2de84920d9489f7fd87fa4b04d996d569def4fa
Parents
4ce588cd

Changes

1 files changed · +13 −0

FileStatusAddDelContent
include/asm-mips/pci.hmodified+13−0View file

include/asm-mips/pci.h

View file
diff --git a/include/asm-mips/pci.h b/include/asm-mips/pci.h
index 092900f..049f01f 100644
--- a/include/asm-mips/pci.h
+++ b/include/asm-mips/pci.h
@@ -167,4 +167,17 @@ static inline void pcibios_add_platform_entries(struct pci_dev *dev)
/* Do platform specific device initialization at pci_enable_device() time */
extern int pcibios_plat_dev_init(struct pci_dev *dev);
+static inline struct resource *
+pcibios_select_root(struct pci_dev *pdev, struct resource *res)
+{
+ struct resource *root = NULL;
+
+ if (res->flags & IORESOURCE_IO)
+ root = &ioport_resource;
+ if (res->flags & IORESOURCE_MEM)
+ root = &iomem_resource;
+
+ return root;
+}
+
#endif /* _ASM_PCI_H */