ram: stm32mp1: don't display the prompt two times
authorPatrick Delaunay <patrick.delaunay@st.com>
Fri, 6 Mar 2020 10:14:05 +0000 (11:14 +0100)
committerPatrick Delaunay <patrick.delaunay@st.com>
Tue, 24 Mar 2020 13:20:50 +0000 (14:20 +0100)
Remove one "DDR>" display on command
- next
- step
- go

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Acked-by: Patrice Chotard <patrice.chotard@st.com>
drivers/ram/stm32mp1/stm32mp1_interactive.c

index cc9b2e7c96c96e5c8fd4af70fa796cea99ebad19..cedf92cb5f10e334f7d8a29270c01454b39b64da 100644 (file)
@@ -367,7 +367,6 @@ bool stm32mp1_ddr_interactive(void *priv,
                              enum stm32mp1_ddr_interact_step step,
                              const struct stm32mp1_ddr_config *config)
 {
-       const char *prompt = "DDR>";
        char buffer[CONFIG_SYS_CBSIZE];
        char *argv[CONFIG_SYS_MAXARGS + 1];     /* NULL terminated */
        int argc;
@@ -403,13 +402,12 @@ bool stm32mp1_ddr_interactive(void *priv,
        }
 
        printf("%d:%s\n", step, step_str[step]);
-       printf("%s\n", prompt);
 
        if (next_step > step)
                return false;
 
        while (next_step == step) {
-               cli_readline_into_buffer(prompt, buffer, 0);
+               cli_readline_into_buffer("DDR>", buffer, 0);
                argc = cli_simple_parse_line(buffer, argv);
                if (!argc)
                        continue;