lkml.org 
[lkml]   [2005]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] mips: add pcibios_bus_to_resource
Hi,

This patch has added pcibios_bus_to_resource to MIPS.
Please apply.

Yoichi

Signed-off-by: Yoichi Yuasa <yuasa@hh.iij4u.or.jp>

diff -urN -X dontdiff mm1-orig/arch/mips/pci/pci.c mm1/arch/mips/pci/pci.c
--- mm1-orig/arch/mips/pci/pci.c 2005-08-21 01:35:21.000000000 +0900
+++ mm1/arch/mips/pci/pci.c 2005-08-21 01:38:06.000000000 +0900
@@ -292,8 +292,25 @@
region->end = res->end - offset;
}

+void __devinit
+pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
+ struct pci_bus_region *region)
+{
+ struct pci_controller *hose = (struct pci_controller *)dev->sysdata;
+ unsigned long offset = 0;
+
+ if (res->flags & IORESOURCE_IO)
+ offset = hose->io_offset;
+ else if (res->flags & IORESOURCE_MEM)
+ offset = hose->mem_offset;
+
+ res->start = region->start + offset;
+ res->end = region->end + offset;
+}
+
#ifdef CONFIG_HOTPLUG
EXPORT_SYMBOL(pcibios_resource_to_bus);
+EXPORT_SYMBOL(pcibios_bus_to_resource);
EXPORT_SYMBOL(PCIBIOS_MIN_IO);
EXPORT_SYMBOL(PCIBIOS_MIN_MEM);
#endif
diff -urN -X dontdiff mm1-orig/include/asm-mips/pci.h mm1/include/asm-mips/pci.h
--- mm1-orig/include/asm-mips/pci.h 2005-08-21 01:38:19.000000000 +0900
+++ mm1/include/asm-mips/pci.h 2005-08-21 01:41:01.000000000 +0900
@@ -142,6 +142,8 @@

extern void pcibios_resource_to_bus(struct pci_dev *dev,
struct pci_bus_region *region, struct resource *res);
+extern void pcibios_bus_to_resource(struct pci_dev *dev,
+ struct resource *res, struct pci_bus_region *region);

#ifdef CONFIG_PCI_DOMAINS


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-08-21 14:29    [W:0.039 / U:3.920 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site