From: Stephen Rothwell <sfr@canb.auug.org.au>
To: ppc-dev <linuxppc-dev@ozlabs.org>
Subject: [PATCH 12/19] [POWERPC] iSeries: reduce dependence on pci_dn bussubno
Date: Fri, 7 Dec 2007 01:56:55 +1100 [thread overview]
Message-ID: <20071207015655.bf31fc29.sfr@canb.auug.org.au> (raw)
In-Reply-To: <20071206180045.0eb1db98.sfr@canb.auug.org.au>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
arch/powerpc/platforms/iseries/pci.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/arch/powerpc/platforms/iseries/pci.c b/arch/powerpc/platforms/iseries/pci.c
index b46d8c5..7e00e35 100644
--- a/arch/powerpc/platforms/iseries/pci.c
+++ b/arch/powerpc/platforms/iseries/pci.c
@@ -190,6 +190,7 @@ void __init iSeries_pci_final_fixup(void)
for_each_pci_dev(pdev) {
struct pci_dn *pdn;
const u32 *agent;
+ const u32 *sub_bus;
node = find_device_node(pdev->bus->number, pdev->devfn);
printk("pci dev %p (%x.%x), node %p\n", pdev,
@@ -202,23 +203,23 @@ void __init iSeries_pci_final_fixup(void)
pdn = PCI_DN(node);
agent = of_get_property(node, "linux,agent-id", NULL);
- if (pdn && agent) {
- u8 irq = iSeries_allocate_IRQ(pdn->busno, 0,
- pdn->bussubno);
+ sub_bus = of_get_property(node, "linux,subbus", NULL);
+ if (pdn && agent && sub_bus) {
+ u8 irq = iSeries_allocate_IRQ(pdn->busno, 0, *sub_bus);
int err;
- err = HvCallXm_connectBusUnit(pdn->busno, pdn->bussubno,
+ err = HvCallXm_connectBusUnit(pdn->busno, *sub_bus,
*agent, irq);
if (err)
pci_log_error("Connect Bus Unit",
- pdn->busno, pdn->bussubno, *agent, err);
+ pdn->busno, *sub_bus, *agent, err);
else {
err = HvCallPci_configStore8(pdn->busno,
- pdn->bussubno, *agent,
+ *sub_bus, *agent,
PCI_INTERRUPT_LINE, irq);
if (err)
pci_log_error("PciCfgStore Irq Failed!",
- pdn->busno, pdn->bussubno,
+ pdn->busno, *sub_bus,
*agent, err);
else
pdev->irq = irq;
@@ -229,8 +230,7 @@ void __init iSeries_pci_final_fixup(void)
pdev->sysdata = node;
PCI_DN(node)->pcidev = pdev;
allocate_device_bars(pdev);
- iSeries_Device_Information(pdev, num_dev, pdn->busno,
- pdn->bussubno);
+ iSeries_Device_Information(pdev, num_dev, pdn->busno, *sub_bus);
iommu_devnode_init_iSeries(pdev, node);
}
iSeries_activate_IRQs();
--
1.5.3.7
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
next prev parent reply other threads:[~2007-12-06 15:07 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-06 7:00 Powerpc PCI cleanups (mainly iSeries) Stephen Rothwell
2007-12-06 7:02 ` [PATCH 01/19] [POWERPC] clean up pci-bridge.h Stephen Rothwell
2007-12-06 7:06 ` [PATCH 02/19] [POWERPC] consolidate pci_controller Stephen Rothwell
2007-12-11 0:00 ` Stephen Rothwell
2007-12-06 14:46 ` [PATCH 03/19] [POWERPC] iSeries: move find_Device_Node to avoid a forward declaration Stephen Rothwell
2007-12-06 14:48 ` [PATCH 04/19] [POWERPC] iSeries: cleanup PCI retry code a little Stephen Rothwell
2007-12-06 14:49 ` [PATCH 05/19] [POWERPC] iSeries: deCamelCase pci.c Stephen Rothwell
2007-12-06 14:50 ` [PATCH 06/19] [POWERPC] iSeries: remove some dead code from pci.c Stephen Rothwell
2007-12-06 14:51 ` [PATCH 07/19] [POWERPC] iSeries: unindent and clean iSeries_pci_final_fixup Stephen Rothwell
2007-12-06 18:33 ` Olof Johansson
2007-12-06 14:52 ` [PATCH 08/19] [POWERPC] iSeries: consoldiate PCI IO error check Stephen Rothwell
2007-12-06 14:53 ` [PATCH 09/19] [POWERPC] iSeries: remove one layer of IO routines Stephen Rothwell
2007-12-06 14:54 ` [PATCH 10/19] [POWERPC] iSeries: remove pci_dn dependency from iSeries_Device_Information Stephen Rothwell
2007-12-06 14:55 ` [PATCH 11/19] [POWERPC] iSeries: iseries_ds_addr is only used in pci.c Stephen Rothwell
2007-12-06 14:56 ` Stephen Rothwell [this message]
2007-12-06 14:58 ` [PATCH 13/19] [POWERPC] iSeries: make pcibios_final_fixup not depend on pci_dn Stephen Rothwell
2007-12-06 14:59 ` [PATCH 14/19] [POWERPC] Inline pci_setup_pci_controller as it has become trivial Stephen Rothwell
2007-12-11 0:02 ` Stephen Rothwell
2007-12-06 15:00 ` [PATCH 15/19] [POWERPC] iSeries: call iSeries_pcibios_init from setup_arch Stephen Rothwell
2007-12-06 15:01 ` [PATCH 16/19] [POWERPC] iSeries: hose->buid is always zero for iSeries Stephen Rothwell
2007-12-11 0:03 ` Stephen Rothwell
2007-12-06 15:03 ` [PATCH 17/19] [POWERPC] remove some iSeries platform checks from the PCI code Stephen Rothwell
2007-12-06 15:04 ` [PATCH 18/19] [POWERPC] Don't special case pci_domain_nr() for iSeries Stephen Rothwell
2007-12-06 15:05 ` [PATCH 19/19] [POWERPC] pci_controller->arch_data really is a struct device_node * Stephen Rothwell
2007-12-06 16:56 ` Jon Loeliger
2007-12-09 7:27 ` Benjamin Herrenschmidt
2007-12-10 3:33 ` Stephen Rothwell
2007-12-06 15:07 ` Powerpc PCI cleanups (mainly iSeries) Stephen Rothwell
2007-12-06 15:44 ` Josh Boyer
2007-12-09 7:29 ` Benjamin Herrenschmidt
2007-12-09 14:40 ` Josh Boyer
2007-12-07 5:08 ` [PATCH 1/3] [POWERPC] iSeries: DeCamelCase vpdinfo.c Stephen Rothwell
2007-12-07 5:09 ` [PATCH 2/3] [POWERPC] iSeries: clean up and simplify vdpinfo.c Stephen Rothwell
2007-12-07 5:10 ` [PATCH 3/3] [POWERPC] iSeries: merge vpdinfo.c intp pci.c Stephen Rothwell
2007-12-11 0:06 ` Powerpc PCI cleanups (mainly iSeries) Stephen Rothwell
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=20071207015655.bf31fc29.sfr@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=linuxppc-dev@ozlabs.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;
as well as URLs for NNTP newsgroup(s).