All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] board: gateworks: venice: fix dt adjustment for gw73xx baseboard for imx8mp
@ 2024-04-17 20:01 Tim Harvey
  2024-04-20 18:36 ` Fabio Estevam
  0 siblings, 1 reply; 2+ messages in thread
From: Tim Harvey @ 2024-04-17 20:01 UTC (permalink / raw)
  To: Fabio Estevam, u-boot; +Cc: Tim Harvey

The GW73xx baseboard needs a PCI dt adjustment for revC/D based on a
change of the PCIe switch. Make sure we are only doing this for a pci
based ethernet to avoid causing a boot hang when the ethernet1 alias
points to eqos or fec. To know this is a pcie device ensure the alias
begins with the pcie controller.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
---
 board/gateworks/venice/venice.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/board/gateworks/venice/venice.c b/board/gateworks/venice/venice.c
index f54f1186b686..5b105d7659e4 100644
--- a/board/gateworks/venice/venice.c
+++ b/board/gateworks/venice/venice.c
@@ -230,6 +230,7 @@ uint mmc_get_env_part(struct mmc *mmc)
 int ft_board_setup(void *fdt, struct bd_info *bd)
 {
 	const char *base_model = eeprom_get_baseboard_model();
+	const char *path;
 	char pcbrev;
 	int off;
 
@@ -238,10 +239,10 @@ int ft_board_setup(void *fdt, struct bd_info *bd)
 
 	if (!strncmp(base_model, "GW73", 4)) {
 		pcbrev = get_pcb_rev(base_model);
+		path = fdt_get_alias(fdt, "ethernet1");
 
-		if (pcbrev > 'B' && pcbrev < 'E') {
-			printf("adjusting dt for %s\n", base_model);
-
+		if (pcbrev > 'B' && pcbrev < 'E' && path && !strncmp(path, "/soc@0/pcie@", 12)) {
+			printf("adjusting %s pcie\n", base_model);
 			/*
 			 * revC/D/E has PCIe 4-port switch which changes
 			 * ethernet1 PCIe GbE:
-- 
2.25.1


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

* Re: [PATCH] board: gateworks: venice: fix dt adjustment for gw73xx baseboard for imx8mp
  2024-04-17 20:01 [PATCH] board: gateworks: venice: fix dt adjustment for gw73xx baseboard for imx8mp Tim Harvey
@ 2024-04-20 18:36 ` Fabio Estevam
  0 siblings, 0 replies; 2+ messages in thread
From: Fabio Estevam @ 2024-04-20 18:36 UTC (permalink / raw)
  To: Tim Harvey; +Cc: u-boot

On Wed, Apr 17, 2024 at 5:01 PM Tim Harvey <tharvey@gateworks.com> wrote:
>
> The GW73xx baseboard needs a PCI dt adjustment for revC/D based on a
> change of the PCIe switch. Make sure we are only doing this for a pci
> based ethernet to avoid causing a boot hang when the ethernet1 alias
> points to eqos or fec. To know this is a pcie device ensure the alias
> begins with the pcie controller.
>
> Signed-off-by: Tim Harvey <tharvey@gateworks.com>

Applied, thanks.

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

end of thread, other threads:[~2024-04-20 18:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-17 20:01 [PATCH] board: gateworks: venice: fix dt adjustment for gw73xx baseboard for imx8mp Tim Harvey
2024-04-20 18:36 ` Fabio Estevam

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.