From d6e73ce02e5c4d74948495f102d57af9b5b1c9fe Mon Sep 17 00:00:00 2001 From: Ioana Ciornei Date: Wed, 1 Apr 2026 18:04:43 +0300 Subject: drivers: net: fsl-mc: remove unused parameter from the wait_for_mc() function The first parameter of the wait_for_mc() function - booting_mc - is not used. Remove it. Signed-off-by: Ioana Ciornei Signed-off-by: Peng Fan --- drivers/net/fsl-mc/mc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/net/fsl-mc/mc.c') diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c index c8ed702f50a..6e42fde536a 100644 --- a/drivers/net/fsl-mc/mc.c +++ b/drivers/net/fsl-mc/mc.c @@ -653,7 +653,7 @@ static int load_mc_aiop_img(u64 aiop_fw_addr) } #endif -static int wait_for_mc(bool booting_mc, u32 *final_reg_gsr) +static int wait_for_mc(u32 *final_reg_gsr) { u32 reg_gsr; u32 mc_fw_boot_status; @@ -792,7 +792,7 @@ int mc_init(u64 mc_fw_addr, u64 mc_dpc_addr) * Deassert reset and release MC core 0 to run */ out_le32(&mc_ccsr_regs->reg_gcr1, GCR1_P1_DE_RST | GCR1_M_ALL_DE_RST); - error = wait_for_mc(true, ®_gsr); + error = wait_for_mc(®_gsr); if (error != 0) goto out; @@ -856,7 +856,7 @@ int mc_apply_dpl(u64 mc_dpl_addr) */ out_le32(&mc_ccsr_regs->reg_gsr, 0x0); printf("fsl-mc: Deploying data path layout ... "); - error = wait_for_mc(false, ®_gsr); + error = wait_for_mc(®_gsr); if (!error) mc_dpl_applied = 0; -- cgit v1.2.3 From d3c0f53d65eefa9081be243e66a03e38d869151d Mon Sep 17 00:00:00 2001 From: Ioana Ciornei Date: Wed, 1 Apr 2026 18:04:44 +0300 Subject: drivers: net: fsl-mc: cleanup the fsl_mc command help text All the parameters that can be currently passed to the fsl_mc command are positional arguments which are mandatory. This is not perfectly clear when reading the help text because of the use of square brackets. Fix this by changing the square brackets, which are commonly used for optional parameters, with < .. >. Signed-off-by: Ioana Ciornei Signed-off-by: Peng Fan --- drivers/net/fsl-mc/mc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers/net/fsl-mc/mc.c') diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c index 6e42fde536a..039375e5dfd 100644 --- a/drivers/net/fsl-mc/mc.c +++ b/drivers/net/fsl-mc/mc.c @@ -2070,12 +2070,12 @@ static int do_fsl_mc(struct cmd_tbl *cmdtp, int flag, int argc, U_BOOT_CMD( fsl_mc, CONFIG_SYS_MAXARGS, 1, do_fsl_mc, "DPAA2 command to manage Management Complex (MC)", - "start mc [FW_addr] [DPC_addr] - Start Management Complex\n" - "fsl_mc apply DPL [DPL_addr] - Apply DPL file\n" - "fsl_mc lazyapply DPL [DPL_addr] - Apply DPL file on exit\n" - "fsl_mc apply spb [spb_addr] - Apply SPB Soft Parser Blob\n" - "fsl_mc start aiop [FW_addr] - Start AIOP\n" - "fsl_mc dump_log - Dump MC Log\n" + "fsl_mc start mc - Start the Management Complex firmware\n" + "fsl_mc apply dpl - Apply the DPL (Data Path Layout) file\n" + "fsl_mc lazyapply dpl - Apply the DPL (Data Path Layout) file on exit\n" + "fsl_mc apply spb - Apply the SPB Soft Parser Blob\n" + "fsl_mc start aiop - Start AIOP\n" + "fsl_mc dump_log - Dump the MC Log\n" ); void mc_env_boot(void) -- cgit v1.2.3 From f0dbde4675e3c37890abf8a61a14b6cb03b2ef67 Mon Sep 17 00:00:00 2001 From: Ioana Ciornei Date: Wed, 1 Apr 2026 18:04:45 +0300 Subject: drivers: net: fsl-mc: add the nowait option when applying the DPL The process through which the MC firmware parses the DPL and initializes all the requested DPAA2 objects is a complex one which can take quite a bit of time. For the those circumstances in which a fast boot is required on DPAA2 based SoCs, add the 'nowait' optional parameter for the fsl_mc [lazy]apply dpl command. When this option is used, the Linux kernel fsl-mc bus must wait for the firmware to finish parsing the DPL before proceeding with probing all the DPAA2 objects. Signed-off-by: Ioana Ciornei Signed-off-by: Peng Fan --- drivers/net/fsl-mc/mc.c | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) (limited to 'drivers/net/fsl-mc/mc.c') diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c index 039375e5dfd..e28f8d96ed7 100644 --- a/drivers/net/fsl-mc/mc.c +++ b/drivers/net/fsl-mc/mc.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0+ /* * Copyright 2014 Freescale Semiconductor, Inc. - * Copyright 2017-2018, 2020-2021 NXP + * Copyright 2017-2018, 2020-2021, 2025 NXP */ #include #include @@ -72,6 +72,7 @@ static u64 mc_lazy_dpl_addr; static u32 dpsparser_obj_id; static u16 dpsparser_handle; static char *mc_err_msg_apply_spb[] = MC_ERROR_MSG_APPLY_SPB; +static bool wait_for_dpl; #ifdef DEBUG void dump_ram_words(const char *title, void *addr) @@ -855,13 +856,20 @@ int mc_apply_dpl(u64 mc_dpl_addr) * Tell the MC to deploy the DPL: */ out_le32(&mc_ccsr_regs->reg_gsr, 0x0); - printf("fsl-mc: Deploying data path layout ... "); - error = wait_for_mc(®_gsr); - if (!error) - mc_dpl_applied = 0; + /* Wait for the MC firmware to finish processing the DPL */ + if (wait_for_dpl) { + printf("fsl-mc: Deploying data path layout ... "); + error = wait_for_mc(®_gsr); + if (error) + return error; + } else { + printf("fsl-mc: Started the DPL deploy process\n"); + } - return error; + mc_dpl_applied = 0; + + return 0; } int get_mc_boot_status(void) @@ -1995,6 +2003,11 @@ static int do_fsl_mc(struct cmd_tbl *cmdtp, int flag, int argc, * later from announce_and_cleanup(). */ mc_lazy_dpl_addr = mc_dpl_addr; + + wait_for_dpl = true; + if (argc >= 5 && strcmp(argv[4], "nowait") == 0) + wait_for_dpl = false; + break; } @@ -2023,6 +2036,10 @@ static int do_fsl_mc(struct cmd_tbl *cmdtp, int flag, int argc, mc_apply_addr = simple_strtoull(argv[3], NULL, 16); + wait_for_dpl = true; + if (argc >= 5 && strcmp(argv[4], "nowait") == 0) + wait_for_dpl = false; + /* The user wants DPL applied now */ if (!fsl_mc_ldpaa_exit(NULL)) err = mc_apply_dpl(mc_apply_addr); @@ -2071,8 +2088,8 @@ U_BOOT_CMD( fsl_mc, CONFIG_SYS_MAXARGS, 1, do_fsl_mc, "DPAA2 command to manage Management Complex (MC)", "fsl_mc start mc - Start the Management Complex firmware\n" - "fsl_mc apply dpl - Apply the DPL (Data Path Layout) file\n" - "fsl_mc lazyapply dpl - Apply the DPL (Data Path Layout) file on exit\n" + "fsl_mc apply dpl [nowait] - Apply the DPL (Data Path Layout) file\n" + "fsl_mc lazyapply dpl [nowait] - Apply the DPL (Data Path Layout) file on exit\n" "fsl_mc apply spb - Apply the SPB Soft Parser Blob\n" "fsl_mc start aiop - Start AIOP\n" "fsl_mc dump_log - Dump the MC Log\n" -- cgit v1.2.3