Buildable with ENABLE_DP8390_LOG
This commit is contained in:
@@ -42,11 +42,11 @@ dp8390_log(const char *fmt, ...)
|
|||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
||||||
if (dp8390_do_log >= lvl) {
|
// if (dp8390_do_log >= lvl) {
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
pclog_ex(fmt, ap);
|
pclog_ex(fmt, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#define dp8390_log(lvl, fmt, ...)
|
#define dp8390_log(lvl, fmt, ...)
|
||||||
@@ -97,8 +97,8 @@ dp8390_chipmem_read(dp8390_t *dev, uint32_t addr, unsigned int len)
|
|||||||
uint32_t retval = 0;
|
uint32_t retval = 0;
|
||||||
|
|
||||||
#ifdef ENABLE_DP8390_LOG
|
#ifdef ENABLE_DP8390_LOG
|
||||||
if ((len > 1) && (addr & (len - 1))
|
if ((len > 1) && (addr & (len - 1)))
|
||||||
dp3890_log("DP8390: unaligned chipmem word read\n");
|
dp8390_log("DP8390: unaligned chipmem word read\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
dp8390_log("DP8390: Chipmem Read Address=%04x\n", addr);
|
dp8390_log("DP8390: Chipmem Read Address=%04x\n", addr);
|
||||||
@@ -126,7 +126,7 @@ dp8390_chipmem_write(dp8390_t *dev, uint32_t addr, uint32_t val, unsigned len)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
#ifdef ENABLE_DP8390_LOG
|
#ifdef ENABLE_DP8390_LOG
|
||||||
if ((len > 1) && (addr & (len - 1))
|
if ((len > 1) && (addr & (len - 1)))
|
||||||
dp8390_log("DP8390: unaligned chipmem word write\n");
|
dp8390_log("DP8390: unaligned chipmem word write\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -199,7 +199,7 @@ dp8390_write_cr(dp8390_t *dev, uint32_t val)
|
|||||||
dev->remote_start = dev->remote_dma = dev->bound_ptr * 256;
|
dev->remote_start = dev->remote_dma = dev->bound_ptr * 256;
|
||||||
dev->remote_bytes = (uint16_t) dp8390_chipmem_read(dev, dev->bound_ptr * 256 + 2, 2);
|
dev->remote_bytes = (uint16_t) dp8390_chipmem_read(dev, dev->bound_ptr * 256 + 2, 2);
|
||||||
dp8390_log("DP8390: sending buffer #x%x length %d\n",
|
dp8390_log("DP8390: sending buffer #x%x length %d\n",
|
||||||
dev->dp8390.remote_start, dev->dp8390.remote_bytes);
|
dev->remote_start, dev->remote_bytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check for start-tx */
|
/* Check for start-tx */
|
||||||
@@ -283,7 +283,7 @@ dp8390_rx_common(void *priv, uint8_t *buf, int io_len)
|
|||||||
int endbytes;
|
int endbytes;
|
||||||
|
|
||||||
if (io_len != 60)
|
if (io_len != 60)
|
||||||
dp8390_log("%s: rx_frame with length %d\n", dev->name, io_len);
|
dp8390_log("rx_frame with length %d\n", io_len);
|
||||||
|
|
||||||
if ((dev->CR.stop != 0) || (dev->page_start == 0))
|
if ((dev->CR.stop != 0) || (dev->page_start == 0))
|
||||||
return 0;
|
return 0;
|
||||||
@@ -801,9 +801,9 @@ dp8390_page1_write(dp8390_t *dev, uint32_t off, uint32_t val, unsigned len)
|
|||||||
dev->physaddr[off - 1] = val;
|
dev->physaddr[off - 1] = val;
|
||||||
if (off == 6)
|
if (off == 6)
|
||||||
dp8390_log("DP8390: Physical address set to %02x:%02x:%02x:%02x:%02x:%02x\n",
|
dp8390_log("DP8390: Physical address set to %02x:%02x:%02x:%02x:%02x:%02x\n",
|
||||||
dev->dp8390->physaddr[0], dev->dp8390.physaddr[1],
|
dev->physaddr[0], dev->physaddr[1],
|
||||||
dev->dp8390->physaddr[2], dev->dp8390.physaddr[3],
|
dev->physaddr[2], dev->physaddr[3],
|
||||||
dev->dp8390->physaddr[4], dev->dp8390.physaddr[5]);
|
dev->physaddr[4], dev->physaddr[5]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x07: /* CURR */
|
case 0x07: /* CURR */
|
||||||
|
Reference in New Issue
Block a user