From: Luke Kenneth Casson Leighton Date: Sat, 19 Mar 2022 20:46:31 +0000 (+0000) Subject: move quick read/write test for hyperram in coldboot.c X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5fc1d40baa9d80d60d3ac22c8e2191898d729299;p=ls2.git move quick read/write test for hyperram in coldboot.c --- diff --git a/coldboot/coldboot.c b/coldboot/coldboot.c index 2f1374f..2496670 100644 --- a/coldboot/coldboot.c +++ b/coldboot/coldboot.c @@ -66,7 +66,20 @@ int main(void) { console_init(); //puts("Firmware launched...\n"); + puts("fw.."); +#if 0 + volatile uint32_t *hyperram = 0xa0000000; + // quick write/read + writel(0xDEAF0000, (unsigned long)&(hyperram[0])); + tmp = readl((unsigned long)&(hyperram[0])); + puts("read "); + uart_writeuint32(tmp); + + return 0; +#endif + puts("DRAM init... "); + struct gramCtx ctx; struct gramProfile profile = { .mode_registers = { @@ -81,16 +94,6 @@ int main(void) { (void*)DRAM_INIT_BASE); //0x00008000); puts("done\n"); -#if 0 - // quick write/read - writel(0xDEAF0000, (unsigned long)&(ram[0])); - tmp = readl((unsigned long)&(ram[0])); - puts("read "); - uart_writeuint32(tmp); - - return 0; -#endif - #if 1 puts("Rdly\np0: "); for (size_t i = 0; i < 8; i++) {