From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Kumar Gala <galak@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 03/25] [POWERPC] Add the ability to find PCI capabilities early on
Date: Tue, 24 Jul 2007 11:37:10 +1000 [thread overview]
Message-ID: <1185241030.5439.182.camel@localhost.localdomain> (raw)
In-Reply-To: <11852238161546-git-send-email-galak@kernel.crashing.org>
On Mon, 2007-07-23 at 15:49 -0500, Kumar Gala wrote:
> Added early_find_capability that wraps pci_bus_find_capability and uses
> fake_pci_bus() to allow us to call it before we've fully setup the
> pci_controller.
>
> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
I want to try to get rid of the early stuff at one point, but that will
not happen before some major rework of powerpc PCI code so for now,
that's good to go.
Ben.
> ---
> arch/powerpc/kernel/pci_32.c | 7 +++++++
> include/asm-powerpc/pci-bridge.h | 3 +++
> 2 files changed, 10 insertions(+), 0 deletions(-)
>
> diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c
> index 0adf077..bfcfa14 100644
> --- a/arch/powerpc/kernel/pci_32.c
> +++ b/arch/powerpc/kernel/pci_32.c
> @@ -1468,3 +1468,10 @@ EARLY_PCI_OP(read, dword, u32 *)
> EARLY_PCI_OP(write, byte, u8)
> EARLY_PCI_OP(write, word, u16)
> EARLY_PCI_OP(write, dword, u32)
> +
> +extern int pci_bus_find_capability (struct pci_bus *bus, unsigned int devfn, int cap);
> +int early_find_capability(struct pci_controller *hose, int bus, int devfn,
> + int cap)
> +{
> + return pci_bus_find_capability(fake_pci_bus(hose, bus), devfn, cap);
> +}
> diff --git a/include/asm-powerpc/pci-bridge.h b/include/asm-powerpc/pci-bridge.h
> index e72c2a6..7a00b8e 100644
> --- a/include/asm-powerpc/pci-bridge.h
> +++ b/include/asm-powerpc/pci-bridge.h
> @@ -79,6 +79,9 @@ int early_write_config_word(struct pci_controller *hose, int bus, int dev_fn,
> int early_write_config_dword(struct pci_controller *hose, int bus, int dev_fn,
> int where, u32 val);
>
> +extern int early_find_capability(struct pci_controller *hose, int bus,
> + int dev_fn, int cap);
> +
> extern void setup_indirect_pci_nomap(struct pci_controller* hose,
> void __iomem *cfg_addr, void __iomem *cfg_data);
> extern void setup_indirect_pci(struct pci_controller* hose,
prev parent reply other threads:[~2007-07-24 1:37 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-23 20:49 [PATCH 00/25] Freescale PCI/PCIe support/fixup/cleanup Kumar Gala
2007-07-23 20:49 ` [PATCH 01/25] [POWERPC] Create common fsl pci/e files based on 86xx platforms Kumar Gala
2007-07-23 20:49 ` [PATCH 02/25] [POWERPC] Rewrite Freescale PCI/PCIe support for 8{3, 5, 6}xx Kumar Gala
2007-07-23 20:49 ` [PATCH 03/25] [POWERPC] Add the ability to find PCI capabilities early on Kumar Gala
2007-07-23 20:49 ` [PATCH 04/25] [POWERPC] Added indirect quirk to handle PCIe PHB that have issue w/no link Kumar Gala
2007-07-23 20:49 ` [PATCH 05/25] [POWERPC] FSL: Cleanup how we detect if we are a PCIe controller Kumar Gala
2007-07-23 20:49 ` [PATCH 06/25] [POWERPC] Add 8548 CDS PCI express controller node and PCI-X device node Kumar Gala
2007-07-23 20:49 ` [PATCH 07/25] [POWERPC] Update PCI nodes in the 83xx/85xx boards device tree Kumar Gala
2007-07-23 20:49 ` [PATCH 08/25] [POWERPC] Use Freescale pci/pcie common code for 85xx boards Kumar Gala
2007-07-23 20:49 ` [PATCH 09/25] [POWERPC] Add basic PCI node for mpc8568mds board Kumar Gala
2007-07-23 20:49 ` [PATCH 10/25] [POWERPC] Fixup resources on pci_bus for PCIe PHB when no device is connected Kumar Gala
2007-07-23 20:49 ` [PATCH 11/25] [POWERPC] 85xx: Added 8568 PCIe support Kumar Gala
2007-07-23 20:49 ` [PATCH 12/25] [POWERPC] 85xx: Add quirk to ignore bogus FPGA on CDS Kumar Gala
2007-07-23 20:50 ` [PATCH 13/25] [POWERPC] Removed setup_indirect_pci_nomap Kumar Gala
2007-07-23 20:50 ` [PATCH 14/25] [POWERPC] Make endianess of cfg_addr for indirect pci ops runtime Kumar Gala
2007-07-23 20:50 ` [PATCH 15/25] [POWERPC] Add basic PCI/PCI Express support for 8544DS board Kumar Gala
2007-07-23 20:50 ` [PATCH 16/25] [POWERPC] Provide ability to setup P2P bridge registers from struct resource Kumar Gala
2007-07-23 20:50 ` [PATCH 17/25] [POWERPC] Make sure virtual P2P bridge registers are setup on PCIe PHB Kumar Gala
2007-07-23 20:50 ` [PATCH 18/25] [POWERPC] FSL: Add support for PCI-X controllers Kumar Gala
2007-07-23 20:50 ` [PATCH 19/25] [POWERPC] 85xxCDS: Allow 8259 cascade to share an MPIC interrupt line Kumar Gala
2007-07-23 20:50 ` [PATCH 20/25] [POWERPC] 85xxCDS: Make sure restart resets the PCI bus Kumar Gala
2007-07-23 20:50 ` [PATCH 21/25] [POWERPC] 85xxCDS: Delay 8259 cascade hookup Kumar Gala
2007-07-23 20:50 ` [PATCH 22/25] [POWERPC] 85xxCDS: Misc 8548 PCI Corrections Kumar Gala
2007-07-23 20:50 ` [PATCH 23/25] [POWERPC] 85xxCDS: MPC8548 DTS cleanup Kumar Gala
2007-07-23 20:50 ` [PATCH 24/25] [POWERPC] Add Freescale PCI VENDOR ID and 8641 device IDs Kumar Gala
2007-07-23 20:50 ` [PATCH 25/25] [POWERPC] 85xx: Added needed MPC85xx PCI " Kumar Gala
2007-07-23 21:30 ` [PATCH 23/25] [POWERPC] 85xxCDS: MPC8548 DTS cleanup Scott Wood
2007-07-24 11:52 ` [PATCH 21/25] [POWERPC] 85xxCDS: Delay 8259 cascade hookup Paul Mackerras
2007-07-24 15:34 ` Kumar Gala
2007-07-24 1:48 ` [PATCH 19/25] [POWERPC] 85xxCDS: Allow 8259 cascade to share an MPIC interrupt line Benjamin Herrenschmidt
2007-07-24 2:47 ` Kumar Gala
2007-07-24 3:41 ` Kumar Gala
2007-07-24 1:45 ` [PATCH 16/25] [POWERPC] Provide ability to setup P2P bridge registers from struct resource Benjamin Herrenschmidt
2007-07-24 1:43 ` [PATCH 14/25] [POWERPC] Make endianess of cfg_addr for indirect pci ops runtime Benjamin Herrenschmidt
2007-07-24 2:30 ` Kumar Gala
2007-07-24 1:40 ` [PATCH 13/25] [POWERPC] Removed setup_indirect_pci_nomap Benjamin Herrenschmidt
2007-07-24 1:39 ` [PATCH 04/25] [POWERPC] Added indirect quirk to handle PCIe PHB that have issue w/no link Benjamin Herrenschmidt
2007-07-24 2:28 ` Kumar Gala
2007-07-24 1:37 ` Benjamin Herrenschmidt [this message]
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=1185241030.5439.182.camel@localhost.localdomain \
--to=benh@kernel.crashing.org \
--cc=galak@kernel.crashing.org \
--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).