linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ppc4xx: Allow 4xx PCI bridge to be disabled via device tree
@ 2008-09-10 15:55 Matthias Fuchs
  2008-09-11  4:30 ` Stefan Roese
  0 siblings, 1 reply; 2+ messages in thread
From: Matthias Fuchs @ 2008-09-10 15:55 UTC (permalink / raw)
  To: linuxppc-dev

This patch allows the 4xx (conventional) PCI bridge to be disabled
via the device tree. This is needed for 4xx PCI adapter hardware.

Use the PCI node's status property to disable the PCI bridge.

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
---
 arch/powerpc/sysdev/ppc4xx_pci.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/sysdev/ppc4xx_pci.c b/arch/powerpc/sysdev/ppc4xx_pci.c
index fb368df..8c13d4f 100644
--- a/arch/powerpc/sysdev/ppc4xx_pci.c
+++ b/arch/powerpc/sysdev/ppc4xx_pci.c
@@ -277,9 +277,16 @@ static void __init ppc4xx_probe_pci_bridge(struct device_node *np)
 	const int *bus_range;
 	int primary = 0;
 
+	/* Check if device is enabled */
+	if (!of_device_is_available(np)) {
+		printk(KERN_INFO "%s: Port disabled via device-tree\n",
+		       np->full_name);
+		return;
+	}
+
 	/* Fetch config space registers address */
 	if (of_address_to_resource(np, 0, &rsrc_cfg)) {
-		printk(KERN_ERR "%s:Can't get PCI config register base !",
+		printk(KERN_ERR "%s: Can't get PCI config register base !",
 		       np->full_name);
 		return;
 	}
-- 
1.5.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ppc4xx: Allow 4xx PCI bridge to be disabled via device tree
  2008-09-10 15:55 [PATCH] ppc4xx: Allow 4xx PCI bridge to be disabled via device tree Matthias Fuchs
@ 2008-09-11  4:30 ` Stefan Roese
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Roese @ 2008-09-11  4:30 UTC (permalink / raw)
  To: linuxppc-dev

On Wednesday 10 September 2008, Matthias Fuchs wrote:
> This patch allows the 4xx (conventional) PCI bridge to be disabled
> via the device tree. This is needed for 4xx PCI adapter hardware.
>
> Use the PCI node's status property to disable the PCI bridge.
>
> Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>

Acked-by: Stefan Roese <sr@denx.de>

Best regards,
Stefan

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-09-11  4:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-10 15:55 [PATCH] ppc4xx: Allow 4xx PCI bridge to be disabled via device tree Matthias Fuchs
2008-09-11  4:30 ` Stefan Roese

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).