liblitedram/sdram.c: Fix DFII_PIX_DATA_BYTES computation.

DFII CSR size is not necessarily multiple of 4 (often the case but not with ECC for example).
This commit is contained in:
Florent Kermarrec 2021-07-09 17:32:43 +02:00
parent 2b49430f2c
commit b29a99cd0b

View file

@ -57,7 +57,7 @@ __attribute__((unused)) void cdelay(int i)
#define MEMTEST_DATA_SIZE (2*1024*1024)
#endif
#define DFII_PIX_DATA_BYTES DFII_PIX_DATA_SIZE*CONFIG_CSR_DATA_WIDTH/8
#define DFII_PIX_DATA_BYTES SDRAM_PHY_DATABITS*SDRAM_PHY_XDR/8
int sdram_get_databits(void) {
return SDRAM_PHY_DATABITS;