LPC43xx: Convert *err() to either *info() or add ERROR:, depending on if an error is reported
This commit is contained in:
parent
3017bf15b1
commit
349748dd7e
@ -457,9 +457,9 @@ config LPC43_RMII
|
||||
config LPC43_ETHERNET_REGDEBUG
|
||||
bool "Register-Level Debug"
|
||||
default n
|
||||
depends on DEBUG_FEATURES
|
||||
depends on DEBUG_NET_INFO
|
||||
---help---
|
||||
Enable very low-level register access debug. Depends on CONFIG_DEBUG_FEATURES.
|
||||
Enable very low-level register access debug. Depends on CONFIG_DEBUG_NET_INFO.
|
||||
|
||||
endmenu # Ethernet MAC configuration
|
||||
endif # LPC43_ETHERNET
|
||||
|
@ -173,7 +173,7 @@ static int dac_send(FAR struct dac_dev_s *dev, FAR struct dac_msg_s *msg)
|
||||
|
||||
static int dac_ioctl(FAR struct dac_dev_s *dev, int cmd, unsigned long arg)
|
||||
{
|
||||
_err("Fix me:Not Implemented\n");
|
||||
aerr("ERROR: Fix me:Not Implemented\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -105,7 +105,7 @@
|
||||
|
||||
/* Debug options */
|
||||
|
||||
#ifndef CONFIG_DEBUG_FEATURES
|
||||
#ifndef CONFIG_DEBUG_USB_INFO
|
||||
# undef CONFIG_LPC43_EHCI_REGDEBUG
|
||||
#endif
|
||||
|
||||
@ -817,7 +817,7 @@ static uint32_t lpc43_swap32(uint32_t value)
|
||||
static void lpc43_printreg(volatile uint32_t *regaddr, uint32_t regval,
|
||||
bool iswrite)
|
||||
{
|
||||
_llerr("%08x%s%08x\n", (uintptr_t)regaddr, iswrite ? "<-" : "->", regval);
|
||||
ullinfo("%08x%s%08x\n", (uintptr_t)regaddr, iswrite ? "<-" : "->", regval);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -868,7 +868,7 @@ static void lpc43_checkreg(volatile uint32_t *regaddr, uint32_t regval, bool isw
|
||||
{
|
||||
/* No.. More than one. */
|
||||
|
||||
_llerr("[repeats %d more times]\n", count);
|
||||
ullinfo("[repeats %d more times]\n", count);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1350,13 +1350,13 @@ static int lpc43_qh_discard(struct lpc43_qh_s *qh)
|
||||
#ifdef CONFIG_LPC43_EHCI_REGDEBUG
|
||||
static void lpc43_qtd_print(struct lpc43_qtd_s *qtd)
|
||||
{
|
||||
uerr(" QTD[%p]:\n", qtd);
|
||||
uerr(" hw:\n");
|
||||
uerr(" nqp: %08x alt: %08x token: %08x\n",
|
||||
qtd->hw.nqp, qtd->hw.alt, qtd->hw.token);
|
||||
uerr(" bpl: %08x %08x %08x %08x %08x\n",
|
||||
qtd->hw.bpl[0], qtd->hw.bpl[1], qtd->hw.bpl[2],
|
||||
qtd->hw.bpl[3], qtd->hw.bpl[4]);
|
||||
uinfo(" QTD[%p]:\n", qtd);
|
||||
uinfo(" hw:\n");
|
||||
uinfo(" nqp: %08x alt: %08x token: %08x\n",
|
||||
qtd->hw.nqp, qtd->hw.alt, qtd->hw.token);
|
||||
uinfo(" bpl: %08x %08x %08x %08x %08x\n",
|
||||
qtd->hw.bpl[0], qtd->hw.bpl[1], qtd->hw.bpl[2],
|
||||
qtd->hw.bpl[3], qtd->hw.bpl[4]);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1374,30 +1374,30 @@ static void lpc43_qh_print(struct lpc43_qh_s *qh)
|
||||
struct lpc43_epinfo_s *epinfo;
|
||||
struct ehci_overlay_s *overlay;
|
||||
|
||||
uerr("QH[%p]:\n", qh);
|
||||
uerr(" hw:\n");
|
||||
uerr(" hlp: %08x epchar: %08x epcaps: %08x cqp: %08x\n",
|
||||
qh->hw.hlp, qh->hw.epchar, qh->hw.epcaps, qh->hw.cqp);
|
||||
uinfo("QH[%p]:\n", qh);
|
||||
uinfo(" hw:\n");
|
||||
uinfo(" hlp: %08x epchar: %08x epcaps: %08x cqp: %08x\n",
|
||||
qh->hw.hlp, qh->hw.epchar, qh->hw.epcaps, qh->hw.cqp);
|
||||
|
||||
overlay = &qh->hw.overlay;
|
||||
uerr(" overlay:\n");
|
||||
uerr(" nqp: %08x alt: %08x token: %08x\n",
|
||||
overlay->nqp, overlay->alt, overlay->token);
|
||||
uerr(" bpl: %08x %08x %08x %08x %08x\n",
|
||||
overlay->bpl[0], overlay->bpl[1], overlay->bpl[2],
|
||||
overlay->bpl[3], overlay->bpl[4]);
|
||||
uinfo(" overlay:\n");
|
||||
uinfo(" nqp: %08x alt: %08x token: %08x\n",
|
||||
overlay->nqp, overlay->alt, overlay->token);
|
||||
uinfo(" bpl: %08x %08x %08x %08x %08x\n",
|
||||
overlay->bpl[0], overlay->bpl[1], overlay->bpl[2],
|
||||
overlay->bpl[3], overlay->bpl[4]);
|
||||
|
||||
uerr(" fqp:\n", qh->fqp);
|
||||
uinfo(" fqp:\n", qh->fqp);
|
||||
|
||||
epinfo = qh->epinfo;
|
||||
uerr(" epinfo[%p]:\n", epinfo);
|
||||
uinfo(" epinfo[%p]:\n", epinfo);
|
||||
if (epinfo)
|
||||
{
|
||||
uerr(" EP%d DIR=%s FA=%08x TYPE=%d MaxPacket=%d\n",
|
||||
epinfo->epno, epinfo->dirin ? "IN" : "OUT", epinfo->devaddr,
|
||||
epinfo->xfrtype, epinfo->maxpacket);
|
||||
uerr(" Toggle=%d iocwait=%d speed=%d result=%d\n",
|
||||
epinfo->toggle, epinfo->iocwait, epinfo->speed, epinfo->result);
|
||||
uinfo(" EP%d DIR=%s FA=%08x TYPE=%d MaxPacket=%d\n",
|
||||
epinfo->epno, epinfo->dirin ? "IN" : "OUT", epinfo->devaddr,
|
||||
epinfo->xfrtype, epinfo->maxpacket);
|
||||
uinfo(" Toggle=%d iocwait=%d speed=%d result=%d\n",
|
||||
epinfo->toggle, epinfo->iocwait, epinfo->speed, epinfo->result);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -197,7 +197,7 @@
|
||||
* enabled.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_DEBUG_FEATURES
|
||||
#ifndef CONFIG_DEBUG_NET_INFO
|
||||
# undef CONFIG_LPC43_ETHMAC_REGDEBUG
|
||||
#endif
|
||||
|
||||
@ -559,7 +559,7 @@ static struct lpc43_ethmac_s g_lpc43ethmac;
|
||||
****************************************************************************/
|
||||
/* Register operations ******************************************************/
|
||||
|
||||
#if defined(CONFIG_LPC43_ETHMAC_REGDEBUG) && defined(CONFIG_DEBUG_FEATURES)
|
||||
#ifdef CONFIG_LPC43_ETHMAC_REGDEBUG
|
||||
static uint32_t lpc43_getreg(uint32_t addr);
|
||||
static void lpc43_putreg(uint32_t val, uint32_t addr);
|
||||
static void lpc43_checksetup(void);
|
||||
@ -683,7 +683,7 @@ static int lpc43_ethconfig(FAR struct lpc43_ethmac_s *priv);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_LPC43_ETHMAC_REGDEBUG) && defined(CONFIG_DEBUG_FEATURES)
|
||||
#ifdef CONFIG_LPC43_ETHMAC_REGDEBUG
|
||||
static uint32_t lpc43_getreg(uint32_t addr)
|
||||
{
|
||||
static uint32_t prevaddr = 0;
|
||||
@ -704,7 +704,7 @@ static uint32_t lpc43_getreg(uint32_t addr)
|
||||
{
|
||||
if (count == 4)
|
||||
{
|
||||
_llerr("...\n");
|
||||
nllinfo("...\n");
|
||||
}
|
||||
|
||||
return val;
|
||||
@ -721,7 +721,7 @@ static uint32_t lpc43_getreg(uint32_t addr)
|
||||
{
|
||||
/* Yes.. then show how many times the value repeated */
|
||||
|
||||
_llerr("[repeats %d more times]\n", count-3);
|
||||
nllinfo("[repeats %d more times]\n", count-3);
|
||||
}
|
||||
|
||||
/* Save the new address, value, and count */
|
||||
@ -733,7 +733,7 @@ static uint32_t lpc43_getreg(uint32_t addr)
|
||||
|
||||
/* Show the register value read */
|
||||
|
||||
_llerr("%08x->%08x\n", addr, val);
|
||||
nllinfo("%08x->%08x\n", addr, val);
|
||||
return val;
|
||||
}
|
||||
#endif
|
||||
@ -755,12 +755,12 @@ static uint32_t lpc43_getreg(uint32_t addr)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_LPC43_ETHMAC_REGDEBUG) && defined(CONFIG_DEBUG_FEATURES)
|
||||
#ifdef CONFIG_LPC43_ETHMAC_REGDEBUG
|
||||
static void lpc43_putreg(uint32_t val, uint32_t addr)
|
||||
{
|
||||
/* Show the register value being written */
|
||||
|
||||
_llerr("%08x<-%08x\n", addr, val);
|
||||
nllinfo("%08x<-%08x\n", addr, val);
|
||||
|
||||
/* Write the value */
|
||||
|
||||
@ -782,7 +782,7 @@ static void lpc43_putreg(uint32_t val, uint32_t addr)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_LPC43_ETHMAC_REGDEBUG) && defined(CONFIG_DEBUG_FEATURES)
|
||||
#ifdef CONFIG_LPC43_ETHMAC_REGDEBUG
|
||||
static void lpc43_checksetup(void)
|
||||
{
|
||||
}
|
||||
@ -1440,7 +1440,7 @@ static int lpc43_recvframe(FAR struct lpc43_ethmac_s *priv)
|
||||
|
||||
if (!lpc43_isfreebuffer(priv))
|
||||
{
|
||||
nllerr("No free buffers\n");
|
||||
nllerr("ERROR: No free buffers\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@ -1547,7 +1547,7 @@ static int lpc43_recvframe(FAR struct lpc43_ethmac_s *priv)
|
||||
* scanning logic, and continue scanning with the next frame.
|
||||
*/
|
||||
|
||||
nllerr("DROPPED: RX descriptor errors: %08x\n", rxdesc->rdes0);
|
||||
nllwarn("WARNING: Dropped, RX descriptor errors: %08x\n", rxdesc->rdes0);
|
||||
lpc43_freesegment(priv, rxcurr, priv->segments);
|
||||
}
|
||||
}
|
||||
@ -1608,7 +1608,7 @@ static void lpc43_receive(FAR struct lpc43_ethmac_s *priv)
|
||||
|
||||
if (dev->d_len > CONFIG_NET_ETH_MTU)
|
||||
{
|
||||
nllerr("DROPPED: Too big: %d\n", dev->d_len);
|
||||
nllwarn("WARNING: Dropped, Too big: %d\n", dev->d_len);
|
||||
/* Free dropped packet buffer */
|
||||
|
||||
if (dev->d_buf)
|
||||
@ -1727,7 +1727,7 @@ static void lpc43_receive(FAR struct lpc43_ethmac_s *priv)
|
||||
else
|
||||
#endif
|
||||
{
|
||||
nllerr("DROPPED: Unknown type: %04x\n", BUF->type);
|
||||
nllwarn("WARNING: Dropped, Unknown type: %04x\n", BUF->type);
|
||||
}
|
||||
|
||||
/* We are finished with the RX buffer. NOTE: If the buffer is
|
||||
@ -1975,7 +1975,7 @@ static inline void lpc43_interrupt_process(FAR struct lpc43_ethmac_s *priv)
|
||||
{
|
||||
/* Just let the user know what happened */
|
||||
|
||||
nllerr("Abnormal event(s): %08x\n", dmasr);
|
||||
nllerr("ERROR: Abnormal event(s): %08x\n", dmasr);
|
||||
|
||||
/* Clear all pending abnormal events */
|
||||
|
||||
@ -2179,7 +2179,7 @@ static void lpc43_txtimeout_expiry(int argc, uint32_t arg, ...)
|
||||
{
|
||||
FAR struct lpc43_ethmac_s *priv = (FAR struct lpc43_ethmac_s *)arg;
|
||||
|
||||
nllerr("Timeout!\n");
|
||||
nllinfo("Timeout!\n");
|
||||
|
||||
#ifdef CONFIG_NET_NOINTS
|
||||
/* Disable further Ethernet interrupts. This will prevent some race
|
||||
@ -2381,15 +2381,15 @@ static int lpc43_ifup(struct net_driver_s *dev)
|
||||
int ret;
|
||||
|
||||
#ifdef CONFIG_NET_IPv4
|
||||
nerr("Bringing up: %d.%d.%d.%d\n",
|
||||
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
|
||||
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
|
||||
ninfo("Bringing up: %d.%d.%d.%d\n",
|
||||
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
|
||||
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
|
||||
#endif
|
||||
#ifdef CONFIG_NET_IPv6
|
||||
nerr("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
|
||||
dev->d_ipv6addr[0], dev->d_ipv6addr[1], dev->d_ipv6addr[2],
|
||||
dev->d_ipv6addr[3], dev->d_ipv6addr[4], dev->d_ipv6addr[5],
|
||||
dev->d_ipv6addr[6], dev->d_ipv6addr[7]);
|
||||
ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
|
||||
dev->d_ipv6addr[0], dev->d_ipv6addr[1], dev->d_ipv6addr[2],
|
||||
dev->d_ipv6addr[3], dev->d_ipv6addr[4], dev->d_ipv6addr[5],
|
||||
dev->d_ipv6addr[6], dev->d_ipv6addr[7]);
|
||||
#endif
|
||||
|
||||
/* Configure the Ethernet interface for DMA operation. */
|
||||
@ -2435,7 +2435,7 @@ static int lpc43_ifdown(struct net_driver_s *dev)
|
||||
FAR struct lpc43_ethmac_s *priv = (FAR struct lpc43_ethmac_s *)dev->d_private;
|
||||
irqstate_t flags;
|
||||
|
||||
nerr("Taking the network down\n");
|
||||
ninfo("Taking the network down\n");
|
||||
|
||||
/* Disable the Ethernet interrupt */
|
||||
|
||||
@ -3065,7 +3065,7 @@ static int lpc43_phyread(uint16_t phydevaddr, uint16_t phyregaddr, uint16_t *val
|
||||
}
|
||||
}
|
||||
|
||||
nerr("MII transfer timed out: phydevaddr: %04x phyregaddr: %04x\n",
|
||||
nerr("ERROR: MII transfer timed out: phydevaddr: %04x phyregaddr: %04x\n",
|
||||
phydevaddr, phyregaddr);
|
||||
|
||||
return -ETIMEDOUT;
|
||||
@ -3124,7 +3124,7 @@ static int lpc43_phywrite(uint16_t phydevaddr, uint16_t phyregaddr, uint16_t val
|
||||
}
|
||||
}
|
||||
|
||||
nerr("MII transfer timed out: phydevaddr: %04x phyregaddr: %04x value: %04x\n",
|
||||
nerr("ERROR: MII transfer timed out: phydevaddr: %04x phyregaddr: %04x value: %04x\n",
|
||||
phydevaddr, phyregaddr, value);
|
||||
|
||||
return -ETIMEDOUT;
|
||||
@ -3161,7 +3161,7 @@ static inline int lpc43_dm9161(FAR struct lpc43_ethmac_s *priv)
|
||||
ret = lpc43_phyread(CONFIG_LPC43_PHYADDR, MII_PHYID1, &phyval);
|
||||
if (ret < 0)
|
||||
{
|
||||
nerr("Failed to read the PHY ID1: %d\n", ret);
|
||||
nerr("ERROR: Failed to read the PHY ID1: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -3179,7 +3179,7 @@ static inline int lpc43_dm9161(FAR struct lpc43_ethmac_s *priv)
|
||||
ret = lpc43_phyread(CONFIG_LPC43_PHYADDR, 16, &phyval);
|
||||
if (ret < 0)
|
||||
{
|
||||
nerr("Failed to read the PHY Register 0x10: %d\n", ret);
|
||||
nerr("ERROR: Failed to read the PHY Register 0x10: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -3236,7 +3236,7 @@ static int lpc43_phyinit(FAR struct lpc43_ethmac_s *priv)
|
||||
ret = lpc43_phywrite(CONFIG_LPC43_PHYADDR, MII_MCR, MII_MCR_RESET);
|
||||
if (ret < 0)
|
||||
{
|
||||
nerr("Failed to reset the PHY: %d\n", ret);
|
||||
nerr("ERROR: Failed to reset the PHY: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -3248,7 +3248,7 @@ static int lpc43_phyinit(FAR struct lpc43_ethmac_s *priv)
|
||||
ret = lpc43_phy_boardinitialize(0);
|
||||
if (ret < 0)
|
||||
{
|
||||
nerr("Failed to initialize the PHY: %d\n", ret);
|
||||
nerr("ERROR: Failed to initialize the PHY: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
@ -3273,7 +3273,7 @@ static int lpc43_phyinit(FAR struct lpc43_ethmac_s *priv)
|
||||
ret = lpc43_phyread(CONFIG_LPC43_PHYADDR, MII_MSR, &phyval);
|
||||
if (ret < 0)
|
||||
{
|
||||
nerr("Failed to read the PHY MSR: %d\n", ret);
|
||||
nerr("ERROR: Failed to read the PHY MSR: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
else if ((phyval & MII_MSR_LINKSTATUS) != 0)
|
||||
@ -3284,7 +3284,7 @@ static int lpc43_phyinit(FAR struct lpc43_ethmac_s *priv)
|
||||
|
||||
if (timeout >= PHY_RETRY_TIMEOUT)
|
||||
{
|
||||
nerr("Timed out waiting for link status: %04x\n", phyval);
|
||||
nerr("ERROR: Timed out waiting for link status: %04x\n", phyval);
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
@ -3293,7 +3293,7 @@ static int lpc43_phyinit(FAR struct lpc43_ethmac_s *priv)
|
||||
ret = lpc43_phywrite(CONFIG_LPC43_PHYADDR, MII_MCR, MII_MCR_ANENABLE);
|
||||
if (ret < 0)
|
||||
{
|
||||
nerr("Failed to enable auto-negotiation: %d\n", ret);
|
||||
nerr("ERROR: Failed to enable auto-negotiation: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -3304,7 +3304,7 @@ static int lpc43_phyinit(FAR struct lpc43_ethmac_s *priv)
|
||||
ret = lpc43_phyread(CONFIG_LPC43_PHYADDR, MII_MSR, &phyval);
|
||||
if (ret < 0)
|
||||
{
|
||||
nerr("Failed to read the PHY MSR: %d\n", ret);
|
||||
nerr("ERROR: Failed to read the PHY MSR: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
else if ((phyval & MII_MSR_ANEGCOMPLETE) != 0)
|
||||
@ -3315,7 +3315,7 @@ static int lpc43_phyinit(FAR struct lpc43_ethmac_s *priv)
|
||||
|
||||
if (timeout >= PHY_RETRY_TIMEOUT)
|
||||
{
|
||||
nerr("Timed out waiting for auto-negotiation\n");
|
||||
nerr("ERROR: Timed out waiting for auto-negotiation\n");
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
@ -3324,7 +3324,7 @@ static int lpc43_phyinit(FAR struct lpc43_ethmac_s *priv)
|
||||
ret = lpc43_phyread(CONFIG_LPC43_PHYADDR, CONFIG_LPC43_PHYSR, &phyval);
|
||||
if (ret < 0)
|
||||
{
|
||||
nerr("Failed to read PHY status register\n");
|
||||
nerr("ERROR: Failed to read PHY status register\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -3418,7 +3418,7 @@ static int lpc43_phyinit(FAR struct lpc43_ethmac_s *priv)
|
||||
ret = lpc43_phywrite(CONFIG_LPC43_PHYADDR, MII_MCR, phyval);
|
||||
if (ret < 0)
|
||||
{
|
||||
nerr("Failed to write the PHY MCR: %d\n", ret);
|
||||
nerr("ERROR: Failed to write the PHY MCR: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -3434,9 +3434,9 @@ static int lpc43_phyinit(FAR struct lpc43_ethmac_s *priv)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
nerr("Duplex: %s Speed: %d MBps\n",
|
||||
priv->fduplex ? "FULL" : "HALF",
|
||||
priv->mbps100 ? 100 : 10);
|
||||
ninfo("Duplex: %s Speed: %d MBps\n",
|
||||
priv->fduplex ? "FULL" : "HALF",
|
||||
priv->mbps100 ? 100 : 10);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
@ -464,7 +464,7 @@ struct i2c_master_s *lpc43_i2cbus_initialize(int port)
|
||||
|
||||
if (port > 1)
|
||||
{
|
||||
_err("lpc I2C Only support 0,1\n");
|
||||
i2cerr("ERROR: lpc I2C Only suppors ports 0 and 1\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -201,8 +201,8 @@ void up_timer_initialize(void)
|
||||
mask_bits++;
|
||||
}
|
||||
|
||||
_llerr("mask_bits = %d, mask = %X, ticks_per_int = %d\r\n",
|
||||
mask_bits, (0xffffffff << (32 - mask_bits)), ticks_per_int);
|
||||
tmrllinfo("mask_bits = %d, mask = %X, ticks_per_int = %d\r\n",
|
||||
mask_bits, (0xffffffff << (32 - mask_bits)), ticks_per_int);
|
||||
|
||||
/* Set the mask and compare value so we get interrupts every
|
||||
* RIT_TIMER_RESOLUTION cycles.
|
||||
|
@ -873,7 +873,7 @@ static int up_interrupt(int irq, void *context)
|
||||
|
||||
default:
|
||||
{
|
||||
_err("Unexpected IIR: %02x\n", status);
|
||||
_llerr("ERROR: Unexpected IIR: %02x\n", status);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -259,7 +259,7 @@ static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency)
|
||||
priv->frequency = frequency;
|
||||
priv->actual = actual;
|
||||
|
||||
spierr("Frequency %d->%d\n", frequency, actual);
|
||||
spiinfo("Frequency %d->%d\n", frequency, actual);
|
||||
return actual;
|
||||
}
|
||||
|
||||
@ -421,7 +421,7 @@ static void spi_sndblock(FAR struct spi_dev_s *dev, FAR const void *buffer, size
|
||||
FAR uint8_t *ptr = (FAR uint8_t *)buffer;
|
||||
uint8_t data;
|
||||
|
||||
spierr("nwords: %d\n", nwords);
|
||||
spiinfo("nwords: %d\n", nwords);
|
||||
while (nwords)
|
||||
{
|
||||
/* Write the data to transmitted to the SPI Data Register */
|
||||
@ -466,7 +466,7 @@ static void spi_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, size_t nw
|
||||
{
|
||||
FAR uint8_t *ptr = (FAR uint8_t *)buffer;
|
||||
|
||||
spierr("nwords: %d\n", nwords);
|
||||
spiinfo("nwords: %d\n", nwords);
|
||||
while (nwords)
|
||||
{
|
||||
/* Write some dummy data to the SPI Data Register in order to clock the
|
||||
|
@ -352,7 +352,7 @@ static uint32_t ssp_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency)
|
||||
priv->frequency = frequency;
|
||||
priv->actual = actual;
|
||||
|
||||
spierr("Frequency %d->%d\n", frequency, actual);
|
||||
spiinfo("Frequency %d->%d\n", frequency, actual);
|
||||
return actual;
|
||||
}
|
||||
|
||||
@ -403,7 +403,7 @@ static void ssp_setmode(FAR struct spi_dev_s *dev, enum spi_mode_e mode)
|
||||
break;
|
||||
|
||||
default:
|
||||
spierr("Bad mode: %d\n", mode);
|
||||
spierr("ERROR: Bad mode: %d\n", mode);
|
||||
DEBUGASSERT(FALSE);
|
||||
return;
|
||||
}
|
||||
@ -491,7 +491,7 @@ static uint16_t ssp_send(FAR struct spi_dev_s *dev, uint16_t wd)
|
||||
/* Get the value from the RX FIFO and return it */
|
||||
|
||||
regval = ssp_getreg(priv, LPC43_SSP_DR_OFFSET);
|
||||
spierr("%04x->%04x\n", wd, regval);
|
||||
spiinfo("%04x->%04x\n", wd, regval);
|
||||
return (uint16_t)regval;
|
||||
}
|
||||
|
||||
@ -538,7 +538,7 @@ static void ssp_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer,
|
||||
|
||||
/* While there is remaining to be sent (and no synchronization error has occurred) */
|
||||
|
||||
spierr("nwords: %d\n", nwords);
|
||||
spiinfo("nwords: %d\n", nwords);
|
||||
|
||||
tx.pv = txbuffer;
|
||||
rx.pv = rxbuffer;
|
||||
|
@ -361,7 +361,7 @@ struct lpc43_usbdev_s
|
||||
|
||||
/* Register operations ********************************************************/
|
||||
|
||||
#if defined(CONFIG_LPC43_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG_FEATURES)
|
||||
#ifdef CONFIG_LPC43_USBDEV_REGDEBUG
|
||||
static uint32_t lpc43_getreg(uint32_t addr);
|
||||
static void lpc43_putreg(uint32_t val, uint32_t addr);
|
||||
#else
|
||||
@ -501,7 +501,7 @@ static const struct usbdev_ops_s g_devops =
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_LPC43_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG_FEATURES)
|
||||
#ifdef CONFIG_LPC43_USBDEV_REGDEBUG
|
||||
static uint32_t lpc43_getreg(uint32_t addr)
|
||||
{
|
||||
static uint32_t prevaddr = 0;
|
||||
@ -522,7 +522,7 @@ static uint32_t lpc43_getreg(uint32_t addr)
|
||||
{
|
||||
if (count == 4)
|
||||
{
|
||||
_llerr("...\n");
|
||||
usbllinfo("...\n");
|
||||
}
|
||||
|
||||
return val;
|
||||
@ -539,7 +539,7 @@ static uint32_t lpc43_getreg(uint32_t addr)
|
||||
{
|
||||
/* Yes.. then show how many times the value repeated */
|
||||
|
||||
_llerr("[repeats %d more times]\n", count-3);
|
||||
usbllinfo("[repeats %d more times]\n", count-3);
|
||||
}
|
||||
|
||||
/* Save the new address, value, and count */
|
||||
@ -551,7 +551,7 @@ static uint32_t lpc43_getreg(uint32_t addr)
|
||||
|
||||
/* Show the register value read */
|
||||
|
||||
_llerr("%08x->%08x\n", addr, val);
|
||||
usbllinfo("%08x->%08x\n", addr, val);
|
||||
return val;
|
||||
}
|
||||
#endif
|
||||
@ -564,12 +564,12 @@ static uint32_t lpc43_getreg(uint32_t addr)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_LPC43_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG_FEATURES)
|
||||
#ifdef CONFIG_LPC43_USBDEV_REGDEBUG
|
||||
static void lpc43_putreg(uint32_t val, uint32_t addr)
|
||||
{
|
||||
/* Show the register value being written */
|
||||
|
||||
_llerr("%08x<-%08x\n", addr, val);
|
||||
usbllinfo("%08x<-%08x\n", addr, val);
|
||||
|
||||
/* Write the value */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user