diff --git a/sources/dma.c b/sources/dma.c index c4507e8..e354d37 100644 --- a/sources/dma.c +++ b/sources/dma.c @@ -52,28 +52,24 @@ void *dma_memcpy(void *dst, void *src, size_t n) d = dst; s = src; -//#ifdef _NOT_USED_ start = MCF_SLT0_SCNT; /* first check if we can do a "traditional" memcpy() to the destination and measure speed */ memcpy(d, s, n); -//#endif /* _NOT_USED_ */ - end = MCF_SLT0_SCNT; time = (start - end) / 132 / 1000; - xprintf("memcpy() took %d ms (%d.%d Mbytes/second)\r\n", - time, n / time / 1000, n / time % 1000); + xprintf("memcpy() took %d ms (%f Mbytes/second)\r\n", + time, n / (float) time / 1000.0); flush_and_invalidate_caches(); -//#endif xprintf("clear target area after memcpy():"); start = MCF_SLT0_SCNT; bzero(dst, n); end = MCF_SLT0_SCNT; time = (start - end) / 132; - xprintf("bzero() took %d ms (%d.%d Mbytes/second)\r\n", time, n / time / 1000, n / time % 1000); + xprintf("bzero() took %d ms (%f Mbytes/second)\r\n", time, n / (float) time / 1000.0); xprintf(" finished, flush caches: "); flush_and_invalidate_caches(); @@ -89,6 +85,7 @@ void *dma_memcpy(void *dst, void *src, size_t n) do { ret = MCD_dmaStatus(1); +#ifdef _NOT_USED_ /* suppress annoying printout for now */ switch (ret) { case MCD_NO_DMA: @@ -119,12 +116,13 @@ void *dma_memcpy(void *dst, void *src, size_t n) xprintf("unknown DMA status %d\r\n", ret); break; } +#endif } while (ret != MCD_DONE); end = MCF_SLT0_SCNT; time = (start - end) / 132 / 1000; - xprintf("start = %d, end = %d, time = %d\r\n", start, end, time); - //xprintf("took %d ms (%d.%d Mbytes/second)\r\n", time, n / time / 1000, n / time % 1000); + //xprintf("start = %d, end = %d, time = %d\r\n", start, end, time); + xprintf("took %d ms (%f Mbytes/second)\r\n", time, n / (float) time / 1000.0); /* * verify if copy succeeded @@ -154,7 +152,7 @@ void *dma_memcpy(void *dst, void *src, size_t n) end = MCF_SLT0_SCNT; time = (start - end) / 132 / 1000; - xprintf("took %d ms (%d.%d Mbytes/second)\r\n", time, n / time / 1000, n / time % 1000); + xprintf("took %d ms (%f Mbytes/second)\r\n", time, n / (float) time / 1000.0); } diff --git a/sources/pci.c b/sources/pci.c index ec637db..e2db5fd 100644 --- a/sources/pci.c +++ b/sources/pci.c @@ -87,7 +87,7 @@ void pci_scan(void) xprintf("PCI bus scan\r\n"); for (bus = 0; bus < 1; bus++) { - for (slot = 0; slot < 16; slot++) + for (slot = 0; slot < 32; slot++) { for (function = 0; function < 8; function++) { diff --git a/sources/xhdi_sd.c b/sources/xhdi_sd.c index 965dd0a..a16567f 100644 --- a/sources/xhdi_sd.c +++ b/sources/xhdi_sd.c @@ -195,7 +195,7 @@ uint32_t xhdi_get_capacity(uint16_t major, uint16_t minor, uint32_t *blocks, uin return ERROR; } - xprintf("%s:%d: determined sector count to %ld\r\n", __FILE__, __LINE__, *blocks); + //xprintf("%s:%d: determined sector count to %ld\r\n", __FILE__, __LINE__, *blocks); } if (bs != 0) @@ -206,7 +206,7 @@ uint32_t xhdi_get_capacity(uint16_t major, uint16_t minor, uint32_t *blocks, uin return ERROR; } - xprintf("%s:%d: determined sector size to %ld\r\n", __FILE__, __LINE__, *bs); + //xprintf("%s:%d: determined sector size to %ld\r\n", __FILE__, __LINE__, *bs); } return E_OK; }