add config-dump from SPI
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 29 Mar 2022 19:43:44 +0000 (20:43 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 29 Mar 2022 19:43:44 +0000 (20:43 +0100)
coldboot/coldboot.c

index 5017c39e5f61d65f8f52b541ba70bdfb179424f2..74237ff3c6df6bd8718ddc56ff063ea27e45f603 100644 (file)
@@ -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);