mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dominik Brodowski <linux@dominikbrodowski.net>
To: Grant Grundler <grundler@parisc-linux.org>
Cc: akpm@osdl.org, greg@kroah.com,
	linux-pci@atrey.karlin.mff.cuni.cz,
	linux-pcmcia@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: [PATCH] pcibios_bus_to_resource for parisc [Was: Re: [PATCH 8/8] pci and yenta: pcibios_bus_to_resource]
Date: Sat, 23 Jul 2005 21:54:11 +0200	[thread overview]
Message-ID: <20050723195411.GC11065@dominikbrodowski.de> (raw)
In-Reply-To: <20050718194216.GC11016@colo.lackof.org>

On Mon, Jul 18, 2005 at 01:42:16PM -0600, Grant Grundler wrote:
> On Tue, Jul 12, 2005 at 12:21:38AM +0200, Dominik Brodowski wrote:
> > In yenta_socket, we default to using the resource setting of the CardBus
> > bridge. However, this is a PCI-bus-centric view of resources and thus
> > needs to be converted to generic resources first. Therefore, add a call
> > to pcibios_bus_to_resource() call in between. This function is a mere
> > wrapper on x86 and friends, however on some others it already exists, is
> > added in this patch (alpha, arm, ppc, ppc64) or still needs to be 
> > provided (parisc -- where is its pcibios_resource_to_bus() ?).
> 
> in arch/parisc/kernel/pci.c?
> At least, it seems to be present in the 2.6.13-rc1 tree
> on cvs.parisc-linux.org tree.

Oh, yes, I seem to have missed it. Sorry. Does this patch look good?


Add pcibios_bus_to_resource for parisc.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>

Index: 2.6.13-rc3-git2/arch/parisc/kernel/pci.c
===================================================================
--- 2.6.13-rc3-git2.orig/arch/parisc/kernel/pci.c
+++ 2.6.13-rc3-git2/arch/parisc/kernel/pci.c
@@ -255,8 +255,26 @@ void __devinit pcibios_resource_to_bus(s
 	pcibios_link_hba_resources(&hba->lmmio_space, bus->resource[1]);
 }
 
+void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
+			      struct pci_bus_region *region)
+{
+	struct pci_bus *bus = dev->bus;
+	struct pci_hba_data *hba = HBA_DATA(bus->bridge->platform_data);
+
+	if (res->flags & IORESOURCE_MEM) {
+		res->start = PCI_HOST_ADDR(hba, region->start);
+		res->end = PCI_HOST_ADDR(hba, region->end);
+	}
+
+	if (res->flags & IORESOURCE_IO) {
+		res->start = region->start;
+		res->end = region->end;
+	}
+}
+
 #ifdef CONFIG_HOTPLUG
 EXPORT_SYMBOL(pcibios_resource_to_bus);
+EXPORT_SYMBOL(pcibios_bus_to_resource);
 #endif
 
 /*

  reply	other threads:[~2005-07-23 20:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-11 22:21 [PATCH 8/8] pci and yenta: pcibios_bus_to_resource Dominik Brodowski
2005-07-11 22:28 ` Russell King
2005-07-18 19:42 ` Grant Grundler
2005-07-23 19:54   ` Dominik Brodowski [this message]
2005-07-25  1:28     ` [PATCH] pcibios_bus_to_resource for parisc [Was: Re: [PATCH 8/8] pci and yenta: pcibios_bus_to_resource] Grant Grundler
2005-07-26 23:50 ` [PATCH 8/8] pci and yenta: pcibios_bus_to_resource Greg KH
2005-07-29 21:20   ` Dominik Brodowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050723195411.GC11065@dominikbrodowski.de \
    --to=linux@dominikbrodowski.net \
    --cc=akpm@osdl.org \
    --cc=greg@kroah.com \
    --cc=grundler@parisc-linux.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    --cc=linux-pcmcia@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®