Skip to contentSkip to conversation

ppc4xx: Canyonlands: Disable PCIe port 0 in dev-tree when SATA is selected

PATCH New Stefan Roese 2 participants 2 messages May 16, 2008 – May 18, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ppc4xx: Canyonlands: Disable PCIe port 0 in dev-tree when SATA is selected

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.

---
 board/amcc/canyonlands/canyonlands.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
board/amcc/canyonlands/canyonlands.c +13 -0
index 9986e9a..9c65e72 100644
@@ -479,5 +479,18 @@ 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));
+	}
 }
 #endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */
Signature · 1 line
1.5.5.1
#1 lore raw

PATCH 1/1 ppc4xx: Canyonlands: Disable PCIe port 0 in dev-tree when SATA is selected

board/amcc/canyonlands/canyonlands.c void ft_board_setup(void *blob, bd_t *bd) · line 493

Quoted 4 lines · In message <[email protected]> you wrote:
board/amcc/canyonlands/canyonlands.c +3 -0
+		if (rc)
+			printf("Unable to update property status in PCIe node, err=%s\n",
+			       fdt_strerror(rc));

Multiline statements definitely need curly braces.

Best regards,

Wolfgang Denk

Signature · 5 lines
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
Experience is what causes a person to make new  mistakes  instead  of
old ones.