mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
bios: remove references to 'DDR' SDRAM, as we also support SDR SDRAM
This commit is contained in:
parent
e9b49ebb44
commit
dc2024f54d
3 changed files with 29 additions and 27 deletions
|
@ -375,13 +375,13 @@ static void do_command(char *c)
|
|||
#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));
|
||||
|
@ -505,7 +505,7 @@ static void boot_sequence(void)
|
|||
int main(int i, char **c)
|
||||
{
|
||||
char buffer[64];
|
||||
int ddr_ok;
|
||||
int sdr_ok;
|
||||
|
||||
irq_setmask(0);
|
||||
irq_setie(1);
|
||||
|
@ -519,11 +519,11 @@ int main(int i, char **c)
|
|||
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");
|
||||
|
|
|
@ -24,19 +24,19 @@ static void cdelay(int i)
|
|||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
@ -61,14 +61,14 @@ void ddrrow(char *_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);
|
||||
|
@ -82,6 +82,7 @@ void ddrrd(char *startaddr)
|
|||
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++)
|
||||
|
@ -89,14 +90,14 @@ void ddrrd(char *startaddr)
|
|||
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);
|
||||
|
@ -105,6 +106,7 @@ void ddrwr(char *startaddr)
|
|||
return;
|
||||
}
|
||||
|
||||
// FIXME
|
||||
for(i=0;i<8;i++) {
|
||||
MMPTR(0xe0001018+4*i) = i;
|
||||
MMPTR(0xe000106c+4*i) = 0xf0 + i;
|
||||
|
@ -154,9 +156,9 @@ int memtest(void)
|
|||
}
|
||||
}
|
||||
|
||||
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);
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
#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 */
|
||||
|
|
Loading…
Reference in a new issue