Skip to content
Snippets Groups Projects
Commit c48deb90 authored by Bogdan Purcareata's avatar Bogdan Purcareata Committed by York Sun
Browse files

armv8: ls1088a: Update MC boot sequence


The MC boot sequence is contained in mc_env_boot. Update LS1088A
boards to use this function, and hook it to reset_phy so that it's
called late enough, after the ports have been initialized, for
proper DPC / DPL fixup.

Signed-off-by: default avatarBogdan Purcareata <bogdan.purcareata@nxp.com>
Reviewed-by: default avatarYork Sun <york.sun@nxp.com>
parent 710d0cd7
No related branches found
No related tags found
No related merge requests found
...@@ -14,14 +14,13 @@ ...@@ -14,14 +14,13 @@
#include <fm_eth.h> #include <fm_eth.h>
#include <i2c.h> #include <i2c.h>
#include <miiphy.h> #include <miiphy.h>
#include <fsl-mc/fsl_mc.h>
#include <fsl-mc/ldpaa_wriop.h> #include <fsl-mc/ldpaa_wriop.h>
#include "../common/qixis.h" #include "../common/qixis.h"
#include "ls1088a_qixis.h" #include "ls1088a_qixis.h"
#define MC_BOOT_ENV_VAR "mcinitcmd"
#ifdef CONFIG_FSL_MC_ENET #ifdef CONFIG_FSL_MC_ENET
#define SFP_TX 0 #define SFP_TX 0
...@@ -612,7 +611,6 @@ static void ls1088a_handle_phy_interface_rgmii(int dpmac_id) ...@@ -612,7 +611,6 @@ static void ls1088a_handle_phy_interface_rgmii(int dpmac_id)
int board_eth_init(bd_t *bis) int board_eth_init(bd_t *bis)
{ {
int error = 0, i; int error = 0, i;
char *mc_boot_env_var;
#ifdef CONFIG_FSL_MC_ENET #ifdef CONFIG_FSL_MC_ENET
struct memac_mdio_info *memac_mdio0_info; struct memac_mdio_info *memac_mdio0_info;
char *env_hwconfig = env_get("hwconfig"); char *env_hwconfig = env_get("hwconfig");
...@@ -655,9 +653,6 @@ int board_eth_init(bd_t *bis) ...@@ -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); error = cpu_eth_init(bis);
if (hwconfig_f("xqsgmii", env_hwconfig)) { if (hwconfig_f("xqsgmii", env_hwconfig)) {
...@@ -681,3 +676,10 @@ int board_eth_init(bd_t *bis) ...@@ -681,3 +676,10 @@ int board_eth_init(bd_t *bis)
error = pci_eth_init(bis); error = pci_eth_init(bis);
return error; return error;
} }
#if defined(CONFIG_RESET_PHY_R)
void reset_phy(void)
{
mc_env_boot();
}
#endif /* CONFIG_RESET_PHY_R */
...@@ -15,15 +15,14 @@ ...@@ -15,15 +15,14 @@
#include <asm/io.h> #include <asm/io.h>
#include <exports.h> #include <exports.h>
#include <asm/arch/fsl_serdes.h> #include <asm/arch/fsl_serdes.h>
#include <fsl-mc/fsl_mc.h>
#include <fsl-mc/ldpaa_wriop.h> #include <fsl-mc/ldpaa_wriop.h>
DECLARE_GLOBAL_DATA_PTR; DECLARE_GLOBAL_DATA_PTR;
#define MC_BOOT_ENV_VAR "mcinitcmd"
int board_eth_init(bd_t *bis) int board_eth_init(bd_t *bis)
{ {
#if defined(CONFIG_FSL_MC_ENET) #if defined(CONFIG_FSL_MC_ENET)
char *mc_boot_env_var;
int i, interface; int i, interface;
struct memac_mdio_info mdio_info; struct memac_mdio_info mdio_info;
struct mii_dev *dev; struct mii_dev *dev;
...@@ -92,11 +91,15 @@ int board_eth_init(bd_t *bis) ...@@ -92,11 +91,15 @@ int board_eth_init(bd_t *bis)
dev = miiphy_get_dev_by_name(DEFAULT_WRIOP_MDIO2_NAME); dev = miiphy_get_dev_by_name(DEFAULT_WRIOP_MDIO2_NAME);
wriop_set_mdio(WRIOP1_DPMAC2, dev); 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); cpu_eth_init(bis);
#endif /* CONFIG_FMAN_ENET */ #endif /* CONFIG_FMAN_ENET */
return pci_eth_init(bis); return pci_eth_init(bis);
} }
#if defined(CONFIG_RESET_PHY_R)
void reset_phy(void)
{
mc_env_boot();
}
#endif /* CONFIG_RESET_PHY_R */
...@@ -122,6 +122,12 @@ unsigned long long get_qixis_addr(void); ...@@ -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_DRAM_DPL_OFFSET 0x00F20000
#define CONFIG_SYS_LS_MC_AIOP_IMG_MAX_LENGTH 0x200000 #define CONFIG_SYS_LS_MC_AIOP_IMG_MAX_LENGTH 0x200000
#define CONFIG_SYS_LS_MC_DRAM_AIOP_IMG_OFFSET 0x07000000 #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 * Carve out a DDR region which will not be used by u-boot/Linux
* *
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment