From: Luke Kenneth Casson Leighton Date: Tue, 29 Mar 2022 19:43:44 +0000 (+0100) Subject: add config-dump from SPI X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fa9478961421c7d68328eaeea9e3a5a2e3b6f744;p=ls2.git add config-dump from SPI --- diff --git a/coldboot/coldboot.c b/coldboot/coldboot.c index 5017c39..74237ff 100644 --- a/coldboot/coldboot.c +++ b/coldboot/coldboot.c @@ -68,9 +68,29 @@ int main(void) { puts("fw.."); #if 1 + // print out configuration parameters for QSPI + volatile uint32_t *qspi_cfg = (uint32_t*)0xc0003000; + for (int k=0; k < 10; k++) { + tmp = readl((unsigned long)&(qspi_cfg[k])); + puts("cfg"); + uart_writeuint32(k); + puts(" "); + uart_writeuint32(tmp); + puts("\n"); + } + volatile uint32_t *qspi = (uint32_t*)0x10000000; // let's not, eh? writel(0xDEAF0123, (unsigned long)&(qspi[0])); // tmp = readl((unsigned long)&(qspi[0])); +#if 0 + while (1) { + // quick read + tmp = readl((unsigned long)&(qspi[0x1000/4])); + puts("read 0x1000"); + uart_writeuint32(tmp); + putchar(10); + } +#endif while (1) { unsigned char c = getchar(); putchar(c);