* [U-Boot-Users] [PATCH V2] ppc4xx: Canyonlands: Disable PCIe0/SATA in dev-tree depending on selection
@ 2008-05-16 17:03 Stefan Roese
2008-05-18 20:27 ` Wolfgang Denk
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Roese @ 2008-05-16 17:03 UTC (permalink / raw)
To: u-boot
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>
---
board/amcc/canyonlands/canyonlands.c | 26 ++++++++++++++++++++++++++
1 files changed, 26 insertions(+), 0 deletions(-)
diff --git a/board/amcc/canyonlands/canyonlands.c b/board/amcc/canyonlands/canyonlands.c
index 9986e9a..9c458b9 100644
--- a/board/amcc/canyonlands/canyonlands.c
+++ b/board/amcc/canyonlands/canyonlands.c
@@ -479,5 +479,31 @@ void ft_board_setup(void *blob, bd_t *bd)
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 at 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 at 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) */
--
1.5.5.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* [U-Boot-Users] [PATCH V2] ppc4xx: Canyonlands: Disable PCIe0/SATA in dev-tree depending on selection
2008-05-16 17:03 [U-Boot-Users] [PATCH V2] ppc4xx: Canyonlands: Disable PCIe0/SATA in dev-tree depending on selection Stefan Roese
@ 2008-05-18 20:27 ` Wolfgang Denk
0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Denk @ 2008-05-18 20:27 UTC (permalink / raw)
To: u-boot
In message <1210957416-8291-1-git-send-email-sr@denx.de> you wrote:
>
> + if (rc)
> + printf("Unable to update property status in PCIe node, err=%s\n",
> + fdt_strerror(rc));
This "if" needs curly braces.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
You're dead, Jim.
-- McCoy, "The Tholian Web", stardate unknown
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-05-18 20:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-16 17:03 [U-Boot-Users] [PATCH V2] ppc4xx: Canyonlands: Disable PCIe0/SATA in dev-tree depending on selection Stefan Roese
2008-05-18 20:27 ` Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox