|
@@ -116,17 +116,19 @@ static void test_download(void)
|
|
(uint32_t)((val * 0x89abcdefULL) >> 32) +
|
|
(uint32_t)((val * 0x89abcdefULL) >> 32) +
|
|
(w * 0x76543210);
|
|
(w * 0x76543210);
|
|
}
|
|
}
|
|
- con_printf("%u/%u words OK\n\n", ok, words);
|
|
|
|
-
|
|
|
|
- for (unsigned int o = 0; o < (512*1024); o += (64*1024)) {
|
|
|
|
- volatile uint16_t *hp = (uint16_t *)(SDRAM_ADDR + o);
|
|
|
|
- p = (uint32_t *)(SDRAM_ADDR + o);
|
|
|
|
- for (unsigned int w = 0; w < 8; w++) {
|
|
|
|
- uint16_t l = *hp++;
|
|
|
|
- uint16_t h = *hp++;
|
|
|
|
- con_printf(" %04x.%04x", l, h);
|
|
|
|
|
|
+ con_printf("SDRAM download: %u/%u words OK\n", ok, words);
|
|
|
|
+
|
|
|
|
+ if (ok != words) {
|
|
|
|
+ for (unsigned int o = 0; o < (512*1024); o += (64*1024)) {
|
|
|
|
+ volatile uint16_t *hp = (uint16_t *)(SDRAM_ADDR + o);
|
|
|
|
+ p = (uint32_t *)(SDRAM_ADDR + o);
|
|
|
|
+ for (unsigned int w = 0; w < 8; w++) {
|
|
|
|
+ uint16_t l = *hp++;
|
|
|
|
+ uint16_t h = *hp++;
|
|
|
|
+ con_printf(" %04x.%04x", l, h);
|
|
|
|
+ }
|
|
|
|
+ con_putc('\n');
|
|
}
|
|
}
|
|
- con_putc('\n');
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -296,10 +298,11 @@ void main(void)
|
|
scrub_sdram();
|
|
scrub_sdram();
|
|
|
|
|
|
irq_count = timer_irq_count;
|
|
irq_count = timer_irq_count;
|
|
- done = rdtime() - timer_irq_start;
|
|
|
|
|
|
+ done = rdtime() - time_zero; /* timer_irq_start */
|
|
|
|
|
|
- con_printf("%u timer interrupts received in %u us\n",
|
|
|
|
- irq_count, done/(CPU_HZ/1000000));
|
|
|
|
|
|
+ con_printf("%u timer interrupts received in %u ms, ~%u expected\n",
|
|
|
|
+ irq_count, done/(CPU_HZ/1000),
|
|
|
|
+ (done+(CPU_HZ/64))/(CPU_HZ/32));
|
|
|
|
|
|
udelay(1000000);
|
|
udelay(1000000);
|
|
con_puts("*** Doing reset ***\n");
|
|
con_puts("*** Doing reset ***\n");
|