bios/cmds/cmd_litesdcard: rewrite comments/descriptions.
This commit is contained in:
parent
6cb03963f3
commit
55c7461e7b
|
@ -23,13 +23,13 @@ static void sdclk(int nb_params, char **params)
|
||||||
char *c;
|
char *c;
|
||||||
|
|
||||||
if (nb_params < 1) {
|
if (nb_params < 1) {
|
||||||
printf("sdclk <frequ>");
|
printf("sdclk <freq>");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
frequ = strtoul(params[0], &c, 0);
|
frequ = strtoul(params[0], &c, 0);
|
||||||
if (*c != 0) {
|
if (*c != 0) {
|
||||||
printf("Incorrect frequency");
|
printf("Incorrect freq");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,10 +40,10 @@ struct command_struct cmd_sdclk =
|
||||||
{
|
{
|
||||||
.func = sdclk,
|
.func = sdclk,
|
||||||
.name = "sdclk",
|
.name = "sdclk",
|
||||||
.help = "SDCard set clk frequency (Mhz)",
|
.help = "Set SDCard clk freq (Mhz)",
|
||||||
};
|
};
|
||||||
|
|
||||||
define_command(sdclk, sdclk, "SDCard set clk frequency (Mhz)", LITESDCARD_CMDS);
|
define_command(sdclk, sdclk, "Set SDCard clk freq (Mhz)", LITESDCARD_CMDS);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -53,7 +53,7 @@ define_command(sdclk, sdclk, "SDCard set clk frequency (Mhz)", LITESDCARD_CMDS);
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#ifdef CSR_SDCORE_BASE
|
#ifdef CSR_SDCORE_BASE
|
||||||
define_command(sdinit, sdcard_init, "SDCard initialization", LITESDCARD_CMDS);
|
define_command(sdinit, sdcard_init, "Initialize SDCard", LITESDCARD_CMDS);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -69,20 +69,20 @@ static void sdtest(int nb_params, char **params)
|
||||||
char *c;
|
char *c;
|
||||||
|
|
||||||
if (nb_params < 1) {
|
if (nb_params < 1) {
|
||||||
printf("sdtest <number of blocks>");
|
printf("sdtest <blocks>");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
blocks = strtoul(params[0], &c, 0);
|
blocks = strtoul(params[0], &c, 0);
|
||||||
if (*c != 0) {
|
if (*c != 0) {
|
||||||
printf("Incorrect number of blocks to write");
|
printf("Incorrect number of blocks");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
sdcard_test(blocks);
|
sdcard_test(blocks);
|
||||||
}
|
}
|
||||||
|
|
||||||
define_command(sdtest, sdtest, "SDCard test", LITESDCARD_CMDS);
|
define_command(sdtest, sdtest, "Test SDCard Write & Read on N blocks", LITESDCARD_CMDS);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -98,20 +98,20 @@ static void sdtestread(int nb_params, char **params)
|
||||||
char *c;
|
char *c;
|
||||||
|
|
||||||
if (nb_params < 1) {
|
if (nb_params < 1) {
|
||||||
printf("sdtestread <block number>");
|
printf("sdread <block>");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
block = strtoul(params[0], &c, 0);
|
block = strtoul(params[0], &c, 0);
|
||||||
if (*c != 0) {
|
if (*c != 0) {
|
||||||
printf("Incorrect number of block to read");
|
printf("Incorrect block number");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
sdcard_test_read(block);
|
sdcard_test_read(block);
|
||||||
}
|
}
|
||||||
|
|
||||||
define_command(sdtestread, sdtestread, "SDCard test read", LITESDCARD_CMDS);
|
define_command(sdtestread, sdtestread, "Test SDCard Read on block N", LITESDCARD_CMDS);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -127,18 +127,18 @@ static void sdtestwrite(int nb_params, char **params)
|
||||||
char *c;
|
char *c;
|
||||||
|
|
||||||
if (nb_params < 2) {
|
if (nb_params < 2) {
|
||||||
printf("sdtestread <block number> <str to write>");
|
printf("sdtestwrite <block> <str>");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
block = strtoul(params[0], &c, 0);
|
block = strtoul(params[0], &c, 0);
|
||||||
if (*c != 0) {
|
if (*c != 0) {
|
||||||
printf("Incorrect number of block to write");
|
printf("Incorrect block number");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
sdcard_test_write(block, params[1]);
|
sdcard_test_write(block, params[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
define_command(sdtestwrite, sdtestwrite, "SDCard test write", LITESDCARD_CMDS);
|
define_command(sdtestwrite, sdtestwrite, "Test SDCard Write on block N", LITESDCARD_CMDS);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue