From a1c023b900298774f073fe3d06a56f454599fe3d Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Thu, 24 Sep 2020 14:58:21 +0200 Subject: [PATCH] software/bios/cmds/cmd_litedram: enable sdram_software_control before sdram_mode_register_write. --- litex/soc/software/bios/cmds/cmd_litedram.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/litex/soc/software/bios/cmds/cmd_litedram.c b/litex/soc/software/bios/cmds/cmd_litedram.c index f01728c61..f1d8e2784 100644 --- a/litex/soc/software/bios/cmds/cmd_litedram.c +++ b/litex/soc/software/bios/cmds/cmd_litedram.c @@ -164,8 +164,10 @@ static void sdram_mr_write_handler(int nb_params, char **params) printf("Incorrect value"); return; } - printf("Writing 0x%04x to MR%d", value, reg); + sdram_software_control_on(); + printf("Writing 0x%04x to MR%d\n", value, reg); sdram_mode_register_write(reg, value); + sdram_software_control_off(); } define_command(sdram_mr_write, sdram_mr_write_handler, "Write SDRAM Mode Register", LITEDRAM_CMDS); #endif