summaryrefslogtreecommitdiff
path: root/board/esd
diff options
context:
space:
mode:
authorMatthias Fuchs <matthias.fuchs@esd-electronics.com>2009-01-02 12:18:12 +0100
committerStefan Roese <sr@denx.de>2009-01-14 11:18:53 +0100
commit600fe46fb3dab7f07604f9009904f31584415114 (patch)
tree7166b5626289436eaaebf701a81a8ceac2993d6e /board/esd
parentf6a1f490d224c600a09137e58d1026d150b8e679 (diff)
downloadu-boot-imx-600fe46fb3dab7f07604f9009904f31584415114.zip
u-boot-imx-600fe46fb3dab7f07604f9009904f31584415114.tar.gz
u-boot-imx-600fe46fb3dab7f07604f9009904f31584415114.tar.bz2
ppc4xx: Disable pci node in device tree on CPCI405 pci adapters
Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com> Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'board/esd')
-rw-r--r--board/esd/cpci405/cpci405.c24
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@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), \