diff --git a/litex/soc/software/bios/cmds/cmd_litedram.c b/litex/soc/software/bios/cmds/cmd_litedram.c index d07cf750e..461adc92f 100644 --- a/litex/soc/software/bios/cmds/cmd_litedram.c +++ b/litex/soc/software/bios/cmds/cmd_litedram.c @@ -14,168 +14,6 @@ #include "../command.h" #include "../helpers.h" -/** - * Command "sdrrow" - * - * Precharge/Activate row - * - */ -#ifdef CSR_SDRAM_BASE -static void sdrrow_handler(int nb_params, char **params) -{ - char *c; - unsigned int row; - - if (nb_params < 1) { - sdrrow(0); - printf("Precharged"); - } - - row = strtoul(params[0], &c, 0); - if (*c != 0) { - printf("Incorrect row"); - return; - } - - sdrrow(row); - printf("Activated row %d", row); -} -define_command(sdrrow, sdrrow_handler, "Precharge/Activate row", LITEDRAM_CMDS); -#endif - -/** - * Command "sdrsw" - * - * Gives SDRAM control to SW - * - */ -#ifdef CSR_SDRAM_BASE -define_command(sdrsw, sdrsw, "Gives SDRAM control to SW", LITEDRAM_CMDS); -#endif - -/** - * Command "sdrhw" - * - * Gives SDRAM control to HW - * - */ -#ifdef CSR_SDRAM_BASE -define_command(sdrhw, sdrhw, "Gives SDRAM control to HW", LITEDRAM_CMDS); -#endif - -/** - * Command "sdrrdbuf" - * - * Dump SDRAM read buffer - * - */ -#ifdef CSR_SDRAM_BASE -static void sdrrdbuf_handler(int nb_params, char **params) -{ - sdrrdbuf(-1); -} - -define_command(sdrrdbuf, sdrrdbuf_handler, "Dump SDRAM read buffer", LITEDRAM_CMDS); -#endif - -/** - * Command "sdrrd" - * - * Read SDRAM data - * - */ -#ifdef CSR_SDRAM_BASE -static void sdrrd_handler(int nb_params, char **params) -{ - unsigned int addr; - int dq; - char *c; - - if (nb_params < 1) { - printf("sdrrd
"); - return; - } - - addr = strtoul(params[0], &c, 0); - if (*c != 0) { - printf("Incorrect address"); - return; - } - - if (nb_params < 2) - dq = -1; - else { - dq = strtoul(params[1], &c, 0); - if (*c != 0) { - printf("Incorrect DQ"); - return; - } - } - - sdrrd(addr, dq); -} - -define_command(sdrrd, sdrrd_handler, "Read SDRAM data", LITEDRAM_CMDS); -#endif - -/** - * Command "sdrrderr" - * - * Print SDRAM read errors - * - */ -#ifdef CSR_SDRAM_BASE -static void sdrrderr_handler(int nb_params, char **params) -{ - int count; - char *c; - - if (nb_params < 1) { - printf("sdrrderr