All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ioana Ciornei <ioana.ciornei@nxp.com>
To: u-boot@lists.denx.de
Subject: [PATCH v2 4/4] board: fsl: lx2160ardb: add dts fixup for RevC
Date: Mon, 26 Apr 2021 16:01:13 +0300	[thread overview]
Message-ID: <20210426130113.6514-5-ioana.ciornei@nxp.com> (raw)
In-Reply-To: <20210426130113.6514-1-ioana.ciornei@nxp.com>

Use the newly fdt_fixup_board_phy_revc() function introduced to updated
both kernel's DTS and u-boot's DTS in case we are running with DM_ETH.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Florin Chiculita <florinlaurentiu.chiculita@nxp.com>
---
 board/freescale/lx2160a/eth_lx2160ardb.c | 2 +-
 board/freescale/lx2160a/lx2160a.c        | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/board/freescale/lx2160a/eth_lx2160ardb.c b/board/freescale/lx2160a/eth_lx2160ardb.c
index c693ad9a0a4a..30a3af9f4737 100644
--- a/board/freescale/lx2160a/eth_lx2160ardb.c
+++ b/board/freescale/lx2160a/eth_lx2160ardb.c
@@ -366,5 +366,5 @@ int fdt_fixup_board_phy(void *fdt)
 		}
 	}
 
-	return ret;
+	return fdt_fixup_board_phy_revc(fdt);
 }
diff --git a/board/freescale/lx2160a/lx2160a.c b/board/freescale/lx2160a/lx2160a.c
index 9f1a6979258c..0736735e6f0d 100644
--- a/board/freescale/lx2160a/lx2160a.c
+++ b/board/freescale/lx2160a/lx2160a.c
@@ -189,6 +189,11 @@ int board_fix_fdt(void *fdt)
 						    "fsl,lx2160a-pcie");
 	}
 
+	/* Fixup u-boot's DTS in case this is a revC board and
+	 * we're using DM_ETH.
+	 */
+	if (IS_ENABLED(CONFIG_TARGET_LX2160ARDB) && IS_ENABLED(CONFIG_DM_ETH))
+		fdt_fixup_board_phy_revc(fdt);
 	return 0;
 }
 #endif
@@ -723,6 +728,9 @@ void fdt_fixup_board_enet(void *fdt)
 		fdt_status_okay(fdt, offset);
 #ifndef CONFIG_DM_ETH
 		fdt_fixup_board_phy(fdt);
+#else
+		if (IS_ENABLED(CONFIG_TARGET_LX2160ARDB))
+			fdt_fixup_board_phy_revc(fdt);
 #endif
 	} else {
 		fdt_status_fail(fdt, offset);
-- 
2.17.1

      parent reply	other threads:[~2021-04-26 13:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-26 13:01 [PATCH v2 0/4] board: fsl: lx2160ardb: add networking support for RevC Ioana Ciornei
2021-04-26 13:01 ` [PATCH v2 1/4] board: fsl: lx2160ardb: add api for obtaining board revision Ioana Ciornei
2021-04-26 13:01 ` [PATCH v2 2/4] board: fsl: lx2160ardb: add support for lx2160ardb revC board Ioana Ciornei
2021-04-26 13:01 ` [PATCH v2 3/4] board: fsl: lx2160ardb: add dts fixup function for RevC Ioana Ciornei
2021-05-07  9:04   ` Priyanka Jain
2021-06-17  6:39   ` Priyanka Jain
2021-04-26 13:01 ` Ioana Ciornei [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210426130113.6514-5-ioana.ciornei@nxp.com \
    --to=ioana.ciornei@nxp.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.