-#if defined(CONFIG_HAS_DATAFLASH)
- /* Print the lines.
- *
- * We buffer all read data, so we can make sure data is read only
- * once, and all accesses are with the specified bus width.
- */
- nbytes = length * size;
- do {
- char linebuf[DISP_LINE_LEN];
- void* p;
- linebytes = (nbytes>DISP_LINE_LEN)?DISP_LINE_LEN:nbytes;
-
- rc = read_dataflash(addr, (linebytes/size)*size, linebuf);
- p = (rc == DATAFLASH_OK) ? linebuf : (void*)addr;
- print_buffer(addr, p, size, linebytes/size, DISP_LINE_LEN/size);
-
- nbytes -= linebytes;
- addr += linebytes;
- if (ctrlc()) {
- rc = 1;
- break;
- }
- } while (nbytes > 0);
-#else
-
-# if defined(CONFIG_BLACKFIN)
- /* See if we're trying to display L1 inst */
- if (addr_bfin_on_chip_mem(addr)) {
- char linebuf[DISP_LINE_LEN];
- ulong linebytes, nbytes = length * size;
- do {
- linebytes = (nbytes > DISP_LINE_LEN) ? DISP_LINE_LEN : nbytes;
- memcpy(linebuf, (void *)addr, linebytes);
- print_buffer(addr, linebuf, size, linebytes/size, DISP_LINE_LEN/size);
-
- nbytes -= linebytes;
- addr += linebytes;
- if (ctrlc()) {
- rc = 1;
- break;
- }
- } while (nbytes > 0);
- } else
-# endif
-
- {
- ulong bytes = size * length;
- const void *buf = map_sysmem(addr, bytes);