#endif
#ifdef DFII_BASE
- else if(strcmp(token, "ddrrow") == 0) ddrrow(get_token(&c));
- else if(strcmp(token, "ddrsw") == 0) ddrsw();
- else if(strcmp(token, "ddrhw") == 0) ddrhw();
- else if(strcmp(token, "ddrrd") == 0) ddrrd(get_token(&c));
- else if(strcmp(token, "ddrwr") == 0) ddrwr(get_token(&c));
+ else if(strcmp(token, "sdrrow") == 0) sdrrow(get_token(&c));
+ else if(strcmp(token, "sdrsw") == 0) sdrsw();
+ else if(strcmp(token, "sdrhw") == 0) sdrhw();
+ else if(strcmp(token, "sdrrd") == 0) sdrrd(get_token(&c));
+ else if(strcmp(token, "sdrwr") == 0) sdrwr(get_token(&c));
else if(strcmp(token, "memtest") == 0) memtest();
- else if(strcmp(token, "ddrinit") == 0) ddrinit();
+ else if(strcmp(token, "sdrinit") == 0) sdrinit();
#endif
else if(strcmp(token, "dfs") == 0) dfs(get_token(&c));
int main(int i, char **c)
{
char buffer[64];
- int ddr_ok;
+ int sdr_ok;
irq_setmask(0);
irq_setie(1);
ethreset();
#endif
#ifdef DFII_BASE
- ddr_ok = ddrinit();
+ sdr_ok = sdrinit();
#else
- ddr_ok = 1;
+ sdr_ok = 1;
#endif
- if(ddr_ok)
+ if(sdr_ok)
boot_sequence();
else
printf("Memory initialization failed\n");
}
}
-void ddrsw(void)
+void sdrsw(void)
{
dfii_control_write(DFII_CONTROL_CKE);
- printf("DDR now under software control\n");
+ printf("SDRAM now under software control\n");
}
-void ddrhw(void)
+void sdrhw(void)
{
dfii_control_write(DFII_CONTROL_SEL|DFII_CONTROL_CKE);
- printf("DDR now under hardware control\n");
+ printf("SDRAM now under hardware control\n");
}
-void ddrrow(char *_row)
+void sdrrow(char *_row)
{
char *c;
unsigned int row;
}
}
-void ddrrd(char *startaddr)
+void sdrrd(char *startaddr)
{
char *c;
unsigned int addr;
int i;
if(*startaddr == 0) {
- printf("ddrrd <address>\n");
+ printf("sdrrd <address>\n");
return;
}
addr = strtoul(startaddr, &c, 0);
command_prd(DFII_COMMAND_CAS|DFII_COMMAND_CS|DFII_COMMAND_RDDATA);
cdelay(15);
+ // FIXME
for(i=0;i<8;i++)
printf("%02x", MMPTR(0xe0001038+4*i));
for(i=0;i<8;i++)
printf("\n");
}
-void ddrwr(char *startaddr)
+void sdrwr(char *startaddr)
{
char *c;
unsigned int addr;
int i;
if(*startaddr == 0) {
- printf("ddrrd <address>\n");
+ printf("sdrrd <address>\n");
return;
}
addr = strtoul(startaddr, &c, 0);
return;
}
+ // FIXME
for(i=0;i<8;i++) {
MMPTR(0xe0001018+4*i) = i;
MMPTR(0xe000106c+4*i) = 0xf0 + i;
}
}
-int ddrinit(void)
+int sdrinit(void)
{
- printf("Initializing DDR SDRAM...\n");
+ printf("Initializing SDRAM...\n");
init_sequence();
dfii_control_write(DFII_CONTROL_SEL|DFII_CONTROL_CKE);
#ifndef __SDRAM_H
#define __SDRAM_H
-void ddrsw(void);
-void ddrhw(void);
-void ddrrow(char *_row);
-void ddrrd(char *startaddr);
-void ddrwr(char *startaddr);
+void sdrsw(void);
+void sdrhw(void);
+void sdrrow(char *_row);
+void sdrrd(char *startaddr);
+void sdrwr(char *startaddr);
int memtest_silent(void);
int memtest(void);
-int ddrinit(void);
+int sdrinit(void);
#endif /* __SDRAM_H */