bios: add more Ultrascale SDRAM debug with sdram_cdly command to set clk/cmd delay.
This commit is contained in:
parent
c4ce6da6c8
commit
bcbf558b6b
|
@ -390,6 +390,7 @@ static void help(void)
|
|||
#endif
|
||||
#ifdef USDDRPHY_DEBUG
|
||||
puts("");
|
||||
puts("sdram_cdly value - Set SDRAM clk/cmd delay");
|
||||
puts("sdram_cal - run SDRAM calibration");
|
||||
puts("sdram_mpr - read SDRAM MPR");
|
||||
puts("sdram_mrwr reg value - write SDRAM mode registers");
|
||||
|
@ -486,6 +487,8 @@ static void do_command(char *c)
|
|||
else if(strcmp(token, "sdtest") == 0) sdcard_test(atoi(get_token(&c)));
|
||||
#endif
|
||||
#ifdef USDDRPHY_DEBUG
|
||||
else if(strcmp(token, "sdram_cdly") == 0)
|
||||
ddrphy_cdly(atoi(get_token(&c)));
|
||||
else if(strcmp(token, "sdram_cal") == 0)
|
||||
sdrcal();
|
||||
else if(strcmp(token, "sdram_mpr") == 0)
|
||||
|
|
|
@ -257,8 +257,9 @@ void sdrwr(char *startaddr)
|
|||
#define NBMODULES DFII_PIX_DATA_BYTES/2
|
||||
#endif
|
||||
|
||||
#ifdef DDRPHY_CMD_DELAY
|
||||
static void ddrphy_cdly(unsigned int delay) {
|
||||
#if defined(DDRPHY_CMD_DELAY) || defined(USDDRPHY_DEBUG)
|
||||
void ddrphy_cdly(unsigned int delay) {
|
||||
printf("Setting clk/cmd delay to %d taps\n", delay);
|
||||
#if CSR_DDRPHY_EN_VTC_ADDR
|
||||
ddrphy_en_vtc_write(0);
|
||||
#endif
|
||||
|
@ -994,7 +995,6 @@ int sdrinit(void)
|
|||
ddrphy_en_vtc_write(0);
|
||||
#endif
|
||||
#ifdef DDRPHY_CMD_DELAY
|
||||
printf("Setting clk/cmd delay to %d taps\n", DDRPHY_CMD_DELAY);
|
||||
ddrphy_cdly(DDRPHY_CMD_DELAY);
|
||||
#endif
|
||||
sdrlevel();
|
||||
|
|
|
@ -27,6 +27,10 @@ int memtest_silent(void);
|
|||
int memtest(void);
|
||||
int sdrinit(void);
|
||||
|
||||
#if defined(DDRPHY_CMD_DELAY) || defined(USDDRPHY_DEBUG)
|
||||
void ddrphy_cdly(unsigned int delay);
|
||||
#endif
|
||||
|
||||
#ifdef USDDRPHY_DEBUG
|
||||
void sdrcal(void);
|
||||
void sdrmrwr(char reg, int value);
|
||||
|
|
Loading…
Reference in New Issue