puts("\n");
}
#endif
- volatile uint32_t *qspi = (uint32_t*)SPI_FLASH_BASE;
+ volatile uint32_t *qspi = (uint32_t*)SPI_FLASH_BASE+0x600000;
//volatile uint8_t *qspi_bytes = (uint8_t*)spi_offs;
// let's not, eh? writel(0xDEAF0123, (unsigned long)&(qspi[0]));
// tmp = readl((unsigned long)&(qspi[0]));
// another terrible hack: copy from flash at offset 0x600000
// a block of size 0x600000 into mem address 0x600000, then
// jump to it. this allows a dtb image to be executed
- uint32_t *mem = (uint32_t*)0x600000;
- fl_read(mem, 0x600000, 0x600000);
+ puts("copy QSPI\n");
+ volatile uint32_t *mem = (uint32_t*)0x600000;
+ fl_read(mem, 0x600000, 0x600000); // shorter (testing) 0x8000);
+ puts("dump mem\n");
+ for (int i=0;i<256;i++) {
+ tmp = readl((unsigned long)&(mem[i]));
+ uart_writeuint32(tmp);
+ puts(" ");
+ if ((i & 0x7) == 0x7) puts("\r\n");
+ }
+ puts("\r\n");
mtspr(8, 0x600000); // move address to LR
__asm__ volatile("blr");
}