diff options
author | Stefan Roese | 2008-05-19 07:14:38 +0200 |
---|---|---|
committer | Stefan Roese | 2008-05-19 07:14:38 +0200 |
commit | 16bedc661de0dae767b1377d8413373a3fbcfa79 (patch) | |
tree | dbb10a738a9edebf817995c0aab2269f9b98517a /board/amcc/canyonlands | |
parent | a38dc3ea8614f8b0c41e432b445a9959b9711295 (diff) |
ppc4xx: Canyonlands: Disable PCIe0/SATA in dev-tree depending on selection
When SATA is selected (via jumper J6) we need to disable the first PCIe
node in the device tree, so that Linux doesn't initialize it. Otherwise
the Linux SATA driver will fail to detect the devices.
The same goes the other way around too. So if PCIe is selected we need
to disable the SATA node in the device tree.
This is because PCIe port 0 and SATA on 460EX share the same pins
(multiplexed) and we have to configure in U-Boot which peripheral is
enabled.
Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'board/amcc/canyonlands')
-rw-r--r-- | board/amcc/canyonlands/canyonlands.c | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/board/amcc/canyonlands/canyonlands.c b/board/amcc/canyonlands/canyonlands.c index 9986e9a9c6e..0f660612781 100644 --- a/board/amcc/canyonlands/canyonlands.c +++ b/board/amcc/canyonlands/canyonlands.c @@ -476,8 +476,37 @@ void ft_board_setup(void *blob, bd_t *bd) val[3] = gd->bd->bi_flashsize; rc = fdt_find_and_setprop(blob, "/plb/opb/ebc", "ranges", val, sizeof(val), 1); - if (rc) + if (rc) { printf("Unable to update property NOR mapping, err=%s\n", fdt_strerror(rc)); + } + + if (gd->board_type == BOARD_CANYONLANDS_SATA) { + /* + * When SATA is selected we need to disable the first PCIe + * node in the device tree, so that Linux doesn't initialize + * it. + */ + rc = fdt_find_and_setprop(blob, "/plb/pciex@d00000000", "status", + "disabled", sizeof("disabled"), 1); + if (rc) { + printf("Unable to update property status in PCIe node, err=%s\n", + fdt_strerror(rc)); + } + } + + if (gd->board_type == BOARD_CANYONLANDS_PCIE) { + /* + * When PCIe is selected we need to disable the SATA + * node in the device tree, so that Linux doesn't initialize + * it. + */ + rc = fdt_find_and_setprop(blob, "/plb/sata@bffd1000", "status", + "disabled", sizeof("disabled"), 1); + if (rc) { + printf("Unable to update property status in PCIe node, err=%s\n", + fdt_strerror(rc)); + } + } } #endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */ |