#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");
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)
#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
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();
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);