software/bios: fixup for Ultrascale SDRAM debug
authorGabriel Somlo <gsomlo@gmail.com>
Mon, 9 Mar 2020 14:24:30 +0000 (10:24 -0400)
committerGabriel Somlo <gsomlo@gmail.com>
Mon, 9 Mar 2020 19:32:08 +0000 (15:32 -0400)
Keep CSR accesses independent of csr_data_width and csr_alignment.

Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
litex/soc/software/bios/sdram.c

index 5c9ec680236077eaa6b33e586bc0a1b4eef82246..7654caafa478e496a209b496abbd93ba7ff1d5ca 100644 (file)
@@ -1063,6 +1063,7 @@ static void sdrmproff(void)
 void sdrmpr(void)
 {
        int module, phase;
+       unsigned char buf[DFII_PIX_DATA_BYTES];
        printf("Read SDRAM MPR...\n");
 
        /* rst phy */
@@ -1084,8 +1085,10 @@ void sdrmpr(void)
        for (module=0; module < NBMODULES; module++) {
                printf("m%d: ", module);
                for(phase=0; phase<DFII_NPHASES; phase++) {
-                       printf("%d", MMPTR(sdram_dfii_pix_rddata_addr[phase]+4*(NBMODULES-module-1)) & 0x1);
-                       printf("%d", MMPTR(sdram_dfii_pix_rddata_addr[phase]+4*(2*NBMODULES-module-1)) & 0x1);
+                       csr_rd_buf_uint8(sdram_dfii_pix_rddata_addr[phase],
+                                        buf, DFII_PIX_DATA_BYTES);
+                       printf("%d", buf[  NBMODULES-module-1] & 0x1);
+                       printf("%d", buf[2*NBMODULES-module-1] & 0x1);
                }
                printf("\n");
        }