LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Olof Johansson <olof@lixom.net>
To: paulus@samba.org
Cc: linuxppc-dev@ozlabs.org
Subject: [POWERPC] pasemi: add pasemi_pci_getcfgaddr()
Date: Tue, 4 Sep 2007 21:08:30 -0500	[thread overview]
Message-ID: <20070905020830.GB25900@lixom.net> (raw)
In-Reply-To: <20070905020733.GA25900@lixom.net>

commit aa37284d64c33d4755072d4bb4b5b1304d415d97
Author: Olof Johansson <olof@lixom.net>
Date:   Sat Sep 1 15:43:52 2007 -0500

    [POWERPC] pasemi: add pasemi_pci_getcfgaddr()
    
    Add pasemi_pci_getcfgaddr(), to get the remapped address of a specific
    config register for a PCI device.
    
    Signed-off-by: Olof Johansson <olof@lixom.net>

diff --git a/arch/powerpc/platforms/pasemi/pasemi.h b/arch/powerpc/platforms/pasemi/pasemi.h
index be84954..6fd2fe7 100644
--- a/arch/powerpc/platforms/pasemi/pasemi.h
+++ b/arch/powerpc/platforms/pasemi/pasemi.h
@@ -6,6 +6,8 @@ extern void pas_pci_init(void);
 extern void __devinit pas_pci_irq_fixup(struct pci_dev *dev);
 extern void __devinit pas_pci_dma_dev_setup(struct pci_dev *dev);
 
+extern void __iomem *pasemi_pci_getcfgaddr(struct pci_dev *dev, int offset);
+
 extern void __init alloc_iobmap_l2(void);
 
 extern void __init pasemi_idle_init(void);
diff --git a/arch/powerpc/platforms/pasemi/pci.c b/arch/powerpc/platforms/pasemi/pci.c
index 03d1d07..fcfb3df 100644
--- a/arch/powerpc/platforms/pasemi/pci.c
+++ b/arch/powerpc/platforms/pasemi/pci.c
@@ -175,3 +175,12 @@ void __init pas_pci_init(void)
 	/* Use the common resource allocation mechanism */
 	pci_probe_only = 1;
 }
+
+void __iomem *pasemi_pci_getcfgaddr(struct pci_dev *dev, int offset)
+{
+	struct pci_controller *hose;
+
+	hose = pci_bus_to_host(bus);
+
+	return pa_pxp_cfg_addr(hose, hose->number, dev->devfn, int offset)
+}

  reply	other threads:[~2007-09-05  3:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-05  2:07 Please pull from 'for-2.6.24' branch Olof Johansson
2007-09-05  2:08 ` Olof Johansson [this message]
2007-09-05  2:08 ` [POWERPC] pasemi: Add workaround for erratum 5945 Olof Johansson
2007-09-05  2:09 ` [POWERPC] pasemi: Export more SPRs to sysfs when CONFIG_DEBUG_KERNEL=y Olof Johansson
2007-09-05  2:09 ` [POWERPC] pasemi: Print more information at machine check Olof Johansson
2007-09-05  2:09 ` [POWERPC] pasemi: Move pasemi_idle_init() to late_initcall() Olof Johansson
2007-09-10 15:44   ` Nathan Lynch
2007-09-10 16:00     ` Olof Johansson

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=20070905020830.GB25900@lixom.net \
    --to=olof@lixom.net \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.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