public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] ppc4xx: Disable pci node in device tree on CPCI405 pci adapters
@ 2009-01-02 11:18 Matthias Fuchs
  2009-01-14 10:37 ` Stefan Roese
  0 siblings, 1 reply; 2+ messages in thread
From: Matthias Fuchs @ 2009-01-02 11:18 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
---
 board/esd/cpci405/cpci405.c |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/board/esd/cpci405/cpci405.c b/board/esd/cpci405/cpci405.c
index 9bb5f63..bd569a6 100644
--- a/board/esd/cpci405/cpci405.c
+++ b/board/esd/cpci405/cpci405.c
@@ -21,6 +21,8 @@
  * MA 02111-1307 USA
  */
 #include <common.h>
+#include <libfdt.h>
+#include <fdt_support.h>
 #include <asm/processor.h>
 #include <asm/io.h>
 #include <command.h>
@@ -523,6 +525,28 @@ int pci_pre_init(struct pci_controller *hose)
 }
 #endif /* defined(CONFIG_PCI) */
 
+#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
+void ft_board_setup(void *blob, bd_t *bd)
+{
+	int rc;
+
+	__ft_board_setup(blob, bd);
+
+	/*
+	 * Disable PCI in adapter mode.
+	 */
+	if (!cpci405_host()) {
+		rc = fdt_find_and_setprop(blob, "/plb/pci at ec000000", "status",
+					  "disabled", sizeof("disabled"), 1);
+		if (rc) {
+			printf("Unable to update property status in PCI node, "
+			       "err=%s\n",
+			       fdt_strerror(rc));
+		}
+	}
+}
+#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */
+
 #if defined(CONFIG_CPCI405AB)
 #define ONE_WIRE_CLEAR	 out_be16((void*)(CONFIG_SYS_FPGA_BASE_ADDR +	\
 					  CONFIG_SYS_FPGA_MODE),	\
-- 
1.5.6.3

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

* [U-Boot] [PATCH] ppc4xx: Disable pci node in device tree on CPCI405 pci adapters
  2009-01-02 11:18 [U-Boot] [PATCH] ppc4xx: Disable pci node in device tree on CPCI405 pci adapters Matthias Fuchs
@ 2009-01-14 10:37 ` Stefan Roese
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Roese @ 2009-01-14 10:37 UTC (permalink / raw)
  To: u-boot

On Friday 02 January 2009, Matthias Fuchs wrote:
> Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>

Added to u-boot/master.

Thanks.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================

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

end of thread, other threads:[~2009-01-14 10:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-02 11:18 [U-Boot] [PATCH] ppc4xx: Disable pci node in device tree on CPCI405 pci adapters Matthias Fuchs
2009-01-14 10:37 ` Stefan Roese

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox