All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] armv8: ls1088a: Update MC boot sequence
@ 2017-10-04  9:10 Bogdan Purcareata
  2017-10-04 17:22 ` York Sun
  0 siblings, 1 reply; 3+ messages in thread
From: Bogdan Purcareata @ 2017-10-04  9:10 UTC (permalink / raw)
  To: u-boot

This patch follows the work of previous commits:
5707dfb02e drivers: net: fsl-mc: Fixup MAC addresses in DPC
33a8991a87 drivers: net: fsl-mc: Link MC boot to PHY_RESET_R
1161dbcc0a drivers: net: fsl-mc: Include MAC addr fixup to DPL

Add support for LS1088 platforms, to make sure u-boot env MAC addresses
are properly set in DPC / DPL.

Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com>
---
 board/freescale/ls1088a/eth_ls1088aqds.c | 14 ++++++++------
 board/freescale/ls1088a/eth_ls1088ardb.c | 13 ++++++++-----
 include/configs/ls1088a_common.h         |  6 ++++++
 3 files changed, 22 insertions(+), 11 deletions(-)

diff --git a/board/freescale/ls1088a/eth_ls1088aqds.c b/board/freescale/ls1088a/eth_ls1088aqds.c
index c19f59a..de70aee 100644
--- a/board/freescale/ls1088a/eth_ls1088aqds.c
+++ b/board/freescale/ls1088a/eth_ls1088aqds.c
@@ -14,14 +14,13 @@
 #include <fm_eth.h>
 #include <i2c.h>
 #include <miiphy.h>
+#include <fsl-mc/fsl_mc.h>
 #include <fsl-mc/ldpaa_wriop.h>
 
 #include "../common/qixis.h"
 
 #include "ls1088a_qixis.h"
 
-#define MC_BOOT_ENV_VAR "mcinitcmd"
-
 #ifdef CONFIG_FSL_MC_ENET
 
 #define SFP_TX		0
@@ -612,7 +611,6 @@ static void ls1088a_handle_phy_interface_rgmii(int dpmac_id)
 int board_eth_init(bd_t *bis)
 {
 	int error = 0, i;
-	char *mc_boot_env_var;
 #ifdef CONFIG_FSL_MC_ENET
 	struct memac_mdio_info *memac_mdio0_info;
 	char *env_hwconfig = env_get("hwconfig");
@@ -655,9 +653,6 @@ int board_eth_init(bd_t *bis)
 		}
 	}
 
-	mc_boot_env_var = env_get(MC_BOOT_ENV_VAR);
-	if (mc_boot_env_var)
-		run_command_list(mc_boot_env_var, -1, 0);
 	error = cpu_eth_init(bis);
 
 	if (hwconfig_f("xqsgmii", env_hwconfig)) {
@@ -681,3 +676,10 @@ int board_eth_init(bd_t *bis)
 	error = pci_eth_init(bis);
 	return error;
 }
+
+#if defined(CONFIG_RESET_PHY_R)
+void reset_phy(void)
+{
+	mc_env_boot();
+}
+#endif /* CONFIG_RESET_PHY_R */
diff --git a/board/freescale/ls1088a/eth_ls1088ardb.c b/board/freescale/ls1088a/eth_ls1088ardb.c
index 853d815..97accc9 100644
--- a/board/freescale/ls1088a/eth_ls1088ardb.c
+++ b/board/freescale/ls1088a/eth_ls1088ardb.c
@@ -15,15 +15,14 @@
 #include <asm/io.h>
 #include <exports.h>
 #include <asm/arch/fsl_serdes.h>
+#include <fsl-mc/fsl_mc.h>
 #include <fsl-mc/ldpaa_wriop.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#define MC_BOOT_ENV_VAR "mcinitcmd"
 int board_eth_init(bd_t *bis)
 {
 #if defined(CONFIG_FSL_MC_ENET)
-	char *mc_boot_env_var;
 	int i, interface;
 	struct memac_mdio_info mdio_info;
 	struct mii_dev *dev;
@@ -92,11 +91,15 @@ int board_eth_init(bd_t *bis)
 	dev = miiphy_get_dev_by_name(DEFAULT_WRIOP_MDIO2_NAME);
 	wriop_set_mdio(WRIOP1_DPMAC2, dev);
 
-	mc_boot_env_var = env_get(MC_BOOT_ENV_VAR);
-	if (mc_boot_env_var)
-		run_command_list(mc_boot_env_var, -1, 0);
 	cpu_eth_init(bis);
 #endif /* CONFIG_FMAN_ENET */
 
 	return pci_eth_init(bis);
 }
+
+#if defined(CONFIG_RESET_PHY_R)
+void reset_phy(void)
+{
+	mc_env_boot();
+}
+#endif /* CONFIG_RESET_PHY_R */
diff --git a/include/configs/ls1088a_common.h b/include/configs/ls1088a_common.h
index 84e9b14..fa058f7 100644
--- a/include/configs/ls1088a_common.h
+++ b/include/configs/ls1088a_common.h
@@ -122,6 +122,12 @@ unsigned long long get_qixis_addr(void);
 #define CONFIG_SYS_LS_MC_DRAM_DPL_OFFSET    0x00F20000
 #define CONFIG_SYS_LS_MC_AIOP_IMG_MAX_LENGTH	0x200000
 #define CONFIG_SYS_LS_MC_DRAM_AIOP_IMG_OFFSET	0x07000000
+
+/* Define phy_reset function to boot the MC based on mcinitcmd.
+ * This happens late enough to properly fixup u-boot env MAC addresses.
+ */
+#define CONFIG_RESET_PHY_R
+
 /*
  * Carve out a DDR region which will not be used by u-boot/Linux
  *
-- 
2.7.4

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

* [U-Boot] [PATCH] armv8: ls1088a: Update MC boot sequence
  2017-10-04  9:10 [U-Boot] [PATCH] armv8: ls1088a: Update MC boot sequence Bogdan Purcareata
@ 2017-10-04 17:22 ` York Sun
  2017-10-05  6:46   ` Bogdan Purcareata
  0 siblings, 1 reply; 3+ messages in thread
From: York Sun @ 2017-10-04 17:22 UTC (permalink / raw)
  To: u-boot

On 10/04/2017 02:10 AM, Bogdan Purcareata wrote:
> This patch follows the work of previous commits:
> 5707dfb02e drivers: net: fsl-mc: Fixup MAC addresses in DPC
> 33a8991a87 drivers: net: fsl-mc: Link MC boot to PHY_RESET_R
> 1161dbcc0a drivers: net: fsl-mc: Include MAC addr fixup to DPL

These are not commit message. They belong to under the --- line under
your signature.

> 
> Add support for LS1088 platforms, to make sure u-boot env MAC addresses
> are properly set in DPC / DPL.

This message doesn't match the change. You are removing mc_boot_env_var
from qds and rdb files and replace it with a common function call to
reset phy. You are not actually adding support for LS1088 platforms.
Please revise your commit message.

York

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

* [U-Boot] [PATCH] armv8: ls1088a: Update MC boot sequence
  2017-10-04 17:22 ` York Sun
@ 2017-10-05  6:46   ` Bogdan Purcareata
  0 siblings, 0 replies; 3+ messages in thread
From: Bogdan Purcareata @ 2017-10-05  6:46 UTC (permalink / raw)
  To: u-boot

Hello York,

> -----Original Message-----
> From: York Sun
> Sent: Wednesday, October 04, 2017 8:22 PM
> To: Bogdan Purcareata <bogdan.purcareata@nxp.com>; Prabhakar Kushwaha
> <prabhakar.kushwaha@nxp.com>; Ashish Kumar <ashish.kumar@nxp.com>; u-
> boot at lists.denx.de
> Subject: Re: [PATCH] armv8: ls1088a: Update MC boot sequence
> 
> On 10/04/2017 02:10 AM, Bogdan Purcareata wrote:
> > This patch follows the work of previous commits:
> > 5707dfb02e drivers: net: fsl-mc: Fixup MAC addresses in DPC
> > 33a8991a87 drivers: net: fsl-mc: Link MC boot to PHY_RESET_R
> > 1161dbcc0a drivers: net: fsl-mc: Include MAC addr fixup to DPL
> 
> These are not commit message. They belong to under the --- line under
> your signature.

I mentioned the patches to provide the overall context of the refactoring work.

> >
> > Add support for LS1088 platforms, to make sure u-boot env MAC addresses
> > are properly set in DPC / DPL.
> 
> This message doesn't match the change. You are removing mc_boot_env_var
> from qds and rdb files and replace it with a common function call to
> reset phy. You are not actually adding support for LS1088 platforms.
> Please revise your commit message.

I agree I was ambiguous there - I was referring to the support mentioned in the above patches.

I will send a v2 to incorporate your suggestions.

Thank you!
Bogdan P.

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

end of thread, other threads:[~2017-10-05  6:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-04  9:10 [U-Boot] [PATCH] armv8: ls1088a: Update MC boot sequence Bogdan Purcareata
2017-10-04 17:22 ` York Sun
2017-10-05  6:46   ` Bogdan Purcareata

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.