EFM32/DM320: Convert *err() to either *info() or add ERROR:, depending on if an error is reported
This commit is contained in:
parent
24a9722723
commit
9e048e167f
@ -928,7 +928,7 @@ static void dm320_hwinitialize(void)
|
||||
/* Set up the rectangular cursor with defaults */
|
||||
|
||||
#ifdef CONFIG_FB_HWCURSOR
|
||||
gerr("Initialize rectangular cursor\n");
|
||||
lcdinfo("Initialize rectangular cursor\n");
|
||||
|
||||
putreg16(0, DM320_OSD_CURXP);
|
||||
putreg16(0, DM320_OSD_CURYP);
|
||||
@ -1385,7 +1385,7 @@ int up_fbinitialize(int display)
|
||||
ret = dm320_allocvideomemory();
|
||||
if (ret != 0)
|
||||
{
|
||||
gerr("Failed to allocate video buffers\n");
|
||||
lcderr("ERROR: Failed to allocate video buffers\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -268,7 +268,7 @@ struct dm320_epinfo_s
|
||||
|
||||
/* Register operations */
|
||||
|
||||
#if defined(CONFIG_DM320_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG_FEATURES)
|
||||
#ifdef CONFIG_DM320_USBDEV_REGDEBUG
|
||||
static uint32_t dm320_getreg8(uint32_t addr);
|
||||
static uint32_t dm320_getreg16(uint32_t addr);
|
||||
static uint32_t dm320_getreg32(uint32_t addr);
|
||||
@ -422,7 +422,7 @@ static const struct dm320_epinfo_s g_epinfo[DM320_NENDPOINTS] =
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_DM320_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG_FEATURES)
|
||||
#ifdef CONFIG_DM320_USBDEV_REGDEBUG
|
||||
static uint8_t dm320_getreg8(uint32_t addr)
|
||||
{
|
||||
static uint32_t prevaddr = 0;
|
||||
@ -443,7 +443,7 @@ static uint8_t dm320_getreg8(uint32_t addr)
|
||||
{
|
||||
if (count == 4)
|
||||
{
|
||||
_llerr("...\n");
|
||||
ullinfo("...\n");
|
||||
}
|
||||
|
||||
return val;
|
||||
@ -460,7 +460,7 @@ static uint8_t dm320_getreg8(uint32_t addr)
|
||||
{
|
||||
/* Yes.. then show how many times the value repeated */
|
||||
|
||||
_llerr("[repeats %d more times]\n", count-3);
|
||||
ullinfo("[repeats %d more times]\n", count-3);
|
||||
}
|
||||
|
||||
/* Save the new address, value, and count */
|
||||
@ -472,7 +472,7 @@ static uint8_t dm320_getreg8(uint32_t addr)
|
||||
|
||||
/* Show the register value read */
|
||||
|
||||
_llerr("%08x->%02x\n", addr, val);
|
||||
ullinfo("%08x->%02x\n", addr, val);
|
||||
return val;
|
||||
}
|
||||
#endif
|
||||
@ -485,7 +485,7 @@ static uint8_t dm320_getreg8(uint32_t addr)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_DM320_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG_FEATURES)
|
||||
#ifdef CONFIG_DM320_USBDEV_REGDEBUG
|
||||
static uint32_t dm320_getreg16(uint32_t addr)
|
||||
{
|
||||
static uint32_t prevaddr = 0;
|
||||
@ -506,7 +506,7 @@ static uint32_t dm320_getreg16(uint32_t addr)
|
||||
{
|
||||
if (count == 4)
|
||||
{
|
||||
_llerr("...\n");
|
||||
ullinfo("...\n");
|
||||
}
|
||||
|
||||
return val;
|
||||
@ -523,7 +523,7 @@ static uint32_t dm320_getreg16(uint32_t addr)
|
||||
{
|
||||
/* Yes.. then show how many times the value repeated */
|
||||
|
||||
_llerr("[repeats %d more times]\n", count-3);
|
||||
ullinfo("[repeats %d more times]\n", count-3);
|
||||
}
|
||||
|
||||
/* Save the new address, value, and count */
|
||||
@ -535,7 +535,7 @@ static uint32_t dm320_getreg16(uint32_t addr)
|
||||
|
||||
/* Show the register value read */
|
||||
|
||||
_llerr("%08x->%04x\n", addr, val);
|
||||
ullinfo("%08x->%04x\n", addr, val);
|
||||
return val;
|
||||
}
|
||||
#endif
|
||||
@ -548,7 +548,7 @@ static uint32_t dm320_getreg16(uint32_t addr)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_DM320_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG_FEATURES)
|
||||
#ifdef CONFIG_DM320_USBDEV_REGDEBUG
|
||||
static uint32_t dm320_getreg32(uint32_t addr)
|
||||
{
|
||||
static uint32_t prevaddr = 0;
|
||||
@ -569,7 +569,7 @@ static uint32_t dm320_getreg32(uint32_t addr)
|
||||
{
|
||||
if (count == 4)
|
||||
{
|
||||
_llerr("...\n");
|
||||
ullinfo("...\n");
|
||||
}
|
||||
|
||||
return val;
|
||||
@ -586,7 +586,7 @@ static uint32_t dm320_getreg32(uint32_t addr)
|
||||
{
|
||||
/* Yes.. then show how many times the value repeated */
|
||||
|
||||
_llerr("[repeats %d more times]\n", count-3);
|
||||
ullinfo("[repeats %d more times]\n", count-3);
|
||||
}
|
||||
|
||||
/* Save the new address, value, and count */
|
||||
@ -598,7 +598,7 @@ static uint32_t dm320_getreg32(uint32_t addr)
|
||||
|
||||
/* Show the register value read */
|
||||
|
||||
_llerr("%08x->%08x\n", addr, val);
|
||||
ullinfo("%08x->%08x\n", addr, val);
|
||||
return val;
|
||||
}
|
||||
#endif
|
||||
@ -611,12 +611,12 @@ static uint32_t dm320_getreg32(uint32_t addr)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_DM320_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG_FEATURES)
|
||||
#ifdef CONFIG_DM320_USBDEV_REGDEBUG
|
||||
static void dm320_putreg8(uint8_t val, uint32_t addr)
|
||||
{
|
||||
/* Show the register value being written */
|
||||
|
||||
_llerr("%08x<-%02x\n", addr, val);
|
||||
ullinfo("%08x<-%02x\n", addr, val);
|
||||
|
||||
/* Write the value */
|
||||
|
||||
@ -632,12 +632,12 @@ static void dm320_putreg8(uint8_t val, uint32_t addr)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_DM320_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG_FEATURES)
|
||||
#ifdef CONFIG_DM320_USBDEV_REGDEBUG
|
||||
static void dm320_putreg16(uint16_t val, uint32_t addr)
|
||||
{
|
||||
/* Show the register value being written */
|
||||
|
||||
_llerr("%08x<-%04x\n", addr, val);
|
||||
ullinfo("%08x<-%04x\n", addr, val);
|
||||
|
||||
/* Write the value */
|
||||
|
||||
@ -653,12 +653,12 @@ static void dm320_putreg16(uint16_t val, uint32_t addr)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_DM320_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG_FEATURES)
|
||||
#ifdef CONFIG_DM320_USBDEV_REGDEBUG
|
||||
static void dm320_putreg32(uint32_t val, uint32_t addr)
|
||||
{
|
||||
/* Show the register value being written */
|
||||
|
||||
_llerr("%08x<-%08x\n", addr, val);
|
||||
ullinfo("%08x<-%08x\n", addr, val);
|
||||
|
||||
/* Write the value */
|
||||
|
||||
@ -2415,9 +2415,9 @@ void up_usbinitialize(void)
|
||||
memset(priv, 0, sizeof(struct dm320_usbdev_s));
|
||||
priv->usbdev.ops = &g_devops;
|
||||
|
||||
#ifdef CONFIG_DEBUG_USB
|
||||
#ifdef CONFIG_DEBUG_USB_INFO
|
||||
chiprev = dm320_getreg16(DM320_BUSC_REVR);
|
||||
ullerr("DM320 revision : %d.%d\n", chiprev >> 4, chiprev & 0x0f);
|
||||
ullinfo("DM320 revision : %d.%d\n", chiprev >> 4, chiprev & 0x0f);
|
||||
#endif
|
||||
|
||||
/* Enable USB clock & GIO clock */
|
||||
|
@ -1191,7 +1191,7 @@ static int adc_interrupt(FAR struct adc_dev_s *dev)
|
||||
adcsr = adc_getreg(priv, EFM32_ADC_SR_OFFSET);
|
||||
if ((adcsr & ADC_SR_AWD) != 0)
|
||||
{
|
||||
allerr("WARNING: Analog Watchdog, Value converted out of range!\n");
|
||||
allwarn("WARNING: Analog Watchdog, Value converted out of range!\n");
|
||||
}
|
||||
|
||||
/* EOC: End of conversion */
|
||||
@ -1298,7 +1298,7 @@ struct adc_dev_s *efm32_adcinitialize(int intf, const uint8_t *chanlist, int nch
|
||||
else
|
||||
#endif
|
||||
{
|
||||
aerr("No ADC interface defined\n");
|
||||
aerr("ERROR: No ADC interface defined\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -745,7 +745,7 @@ void efm32_dmastop(DMA_HANDLE handle)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_DEBUG_DMA
|
||||
#ifdef CONFIG_DEBUG_DMA_INFO
|
||||
void efm32_dmasample(DMA_HANDLE handle, struct efm32_dmaregs_s *regs)
|
||||
{
|
||||
struct dma_channel_s *dmach = (struct dma_channel_s *)handle;
|
||||
@ -798,35 +798,35 @@ void efm32_dmasample(DMA_HANDLE handle, struct efm32_dmaregs_s *regs)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_DEBUG_DMA
|
||||
#ifdef CONFIG_DEBUG_DMA_INFO
|
||||
void efm32_dmadump(DMA_HANDLE handle, const struct efm32_dmaregs_s *regs,
|
||||
const char *msg)
|
||||
{
|
||||
struct dma_channel_s *dmach = (struct dma_channel_s *)handle;
|
||||
|
||||
dmaerr("%s\n", msg);
|
||||
dmaerr(" DMA Registers:\n");
|
||||
dmaerr(" STATUS: %08x\n", regs->status);
|
||||
dmaerr(" CTRLBASE: %08x\n", regs->ctrlbase);
|
||||
dmaerr(" ALTCTRLBASE: %08x\n", regs->altctrlbase);
|
||||
dmaerr(" CHWAITSTATUS: %08x\n", regs->chwaitstatus);
|
||||
dmaerr(" CHUSEBURSTS: %08x\n", regs->chusebursts);
|
||||
dmaerr(" CHREQMASKS: %08x\n", regs->chreqmasks);
|
||||
dmaerr(" CHENS: %08x\n", regs->chens);
|
||||
dmaerr(" CHALTS: %08x\n", regs->chalts);
|
||||
dmaerr(" CHPRIS: %08x\n", regs->chpris);
|
||||
dmaerr(" ERRORC: %08x\n", regs->errorc);
|
||||
dmaerr(" CHREQSTATUS: %08x\n", regs->chreqstatus);
|
||||
dmaerr(" CHSREQSTATUS: %08x\n", regs->chsreqstatus);
|
||||
dmaerr(" IEN: %08x\n", regs->ien);
|
||||
dmainfo("%s\n", msg);
|
||||
dmainfo(" DMA Registers:\n");
|
||||
dmainfo(" STATUS: %08x\n", regs->status);
|
||||
dmainfo(" CTRLBASE: %08x\n", regs->ctrlbase);
|
||||
dmainfo(" ALTCTRLBASE: %08x\n", regs->altctrlbase);
|
||||
dmainfo(" CHWAITSTATUS: %08x\n", regs->chwaitstatus);
|
||||
dmainfo(" CHUSEBURSTS: %08x\n", regs->chusebursts);
|
||||
dmainfo(" CHREQMASKS: %08x\n", regs->chreqmasks);
|
||||
dmainfo(" CHENS: %08x\n", regs->chens);
|
||||
dmainfo(" CHALTS: %08x\n", regs->chalts);
|
||||
dmainfo(" CHPRIS: %08x\n", regs->chpris);
|
||||
dmainfo(" ERRORC: %08x\n", regs->errorc);
|
||||
dmainfo(" CHREQSTATUS: %08x\n", regs->chreqstatus);
|
||||
dmainfo(" CHSREQSTATUS: %08x\n", regs->chsreqstatus);
|
||||
dmainfo(" IEN: %08x\n", regs->ien);
|
||||
#if defined(CONFIG_EFM32_EFM32GG)
|
||||
dmaerr(" CTRL: %08x\n", regs->ctrl);
|
||||
dmaerr(" RDS: %08x\n", regs->rds);
|
||||
dmaerr(" LOOP0: %08x\n", regs->loop0);
|
||||
dmaerr(" LOOP1: %08x\n", regs->loop1);
|
||||
dmaerr(" RECT0: %08x\n", regs->rect0);
|
||||
dmainfo(" CTRL: %08x\n", regs->ctrl);
|
||||
dmainfo(" RDS: %08x\n", regs->rds);
|
||||
dmainfo(" LOOP0: %08x\n", regs->loop0);
|
||||
dmainfo(" LOOP1: %08x\n", regs->loop1);
|
||||
dmainfo(" RECT0: %08x\n", regs->rect0);
|
||||
#endif
|
||||
dmaerr(" DMA Channel %d Registers:\n", dmach->chan);
|
||||
dmaerr(" CHCTRL: %08x\n", regs->chnctrl);
|
||||
dmainfo(" DMA Channel %d Registers:\n", dmach->chan);
|
||||
dmainfo(" CHCTRL: %08x\n", regs->chnctrl);
|
||||
}
|
||||
#endif
|
||||
|
@ -109,7 +109,7 @@ typedef FAR void *DMA_HANDLE;
|
||||
|
||||
typedef void (*dma_callback_t)(DMA_HANDLE handle, uint8_t status, void *arg);
|
||||
|
||||
#ifdef CONFIG_DEBUG_DMA
|
||||
#ifdef CONFIG_DEBUG_DMA_INFO
|
||||
struct efm32_dmaregs_s
|
||||
{
|
||||
uint32_t status; /* DMA Status Register */
|
||||
@ -282,7 +282,7 @@ void efm32_dmastop(DMA_HANDLE handle);
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_DEBUG_DMA
|
||||
#ifdef CONFIG_DEBUG_DMA_INFO
|
||||
void efm32_dmasample(DMA_HANDLE handle, struct efm32_dmaregs_s *regs);
|
||||
#else
|
||||
# define efm32_dmasample(handle,regs)
|
||||
@ -299,7 +299,7 @@ void efm32_dmasample(DMA_HANDLE handle, struct efm32_dmaregs_s *regs);
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_DEBUG_DMA
|
||||
#ifdef CONFIG_DEBUG_DMA_INFO
|
||||
void efm32_dmadump(DMA_HANDLE handle, const struct efm32_dmaregs_s *regs,
|
||||
const char *msg);
|
||||
#else
|
||||
|
@ -751,7 +751,7 @@ static void efm32_i2c_tracenew(FAR struct efm32_i2c_priv_s *priv)
|
||||
|
||||
if (priv->tndx >= (CONFIG_I2C_NTRACE - 1))
|
||||
{
|
||||
i2cerr("Trace table overflow\n");
|
||||
i2cerr("ERROR: Trace table overflow\n");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1526,9 +1526,9 @@ static int efm32_i2c_transfer(FAR struct i2c_master_s *dev,
|
||||
{
|
||||
ret = -ETIMEDOUT;
|
||||
|
||||
i2cerr("Timed out: I2Cx_STATE: 0x%04x I2Cx_STATUS: 0x%08x\n",
|
||||
efm32_i2c_getreg(priv, EFM32_I2C_STATE_OFFSET),
|
||||
efm32_i2c_getreg(priv, EFM32_I2C_STATUS_OFFSET));
|
||||
i2cerr("ERROR: Timed out: I2Cx_STATE: 0x%04x I2Cx_STATUS: 0x%08x\n",
|
||||
efm32_i2c_getreg(priv, EFM32_I2C_STATE_OFFSET),
|
||||
efm32_i2c_getreg(priv, EFM32_I2C_STATUS_OFFSET));
|
||||
|
||||
/* Abort */
|
||||
|
||||
|
@ -395,7 +395,7 @@ static int pwm_timer(FAR struct efm32_pwmtimer_s *priv,
|
||||
|
||||
if (efm32_timer_set_freq(priv->base, priv->pclk, info->frequency) < 0)
|
||||
{
|
||||
pwmerr("Cannot set TIMER frequency %dHz from clock %dHz\n",
|
||||
pwmerr("ERROR: Cannot set TIMER frequency %dHz from clock %dHz\n",
|
||||
info->frequency, priv->pclk);
|
||||
return -EINVAL;
|
||||
}
|
||||
@ -914,7 +914,7 @@ FAR struct pwm_lowerhalf_s *efm32_pwminitialize(int timer)
|
||||
#endif
|
||||
|
||||
default:
|
||||
pwmerr("No such timer configured\n");
|
||||
pwmerr("ERROR: No such timer configured\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@
|
||||
* Private Types
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_EFM32_RMU_DEBUG
|
||||
#if defined(CONFIG_EFM32_RMU_DEBUG) && defined(CONFIG_DEBUG_WARN)
|
||||
typedef struct
|
||||
{
|
||||
const uint32_t val;
|
||||
@ -76,7 +76,7 @@ typedef struct
|
||||
* Private Data
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_EFM32_RMU_DEBUG
|
||||
#if defined(CONFIG_EFM32_RMU_DEBUG) && defined(CONFIG_DEBUG_WARN)
|
||||
static efm32_reset_cause_list_t efm32_reset_cause_list[] =
|
||||
{
|
||||
{
|
||||
@ -191,7 +191,7 @@ uint32_t g_efm32_rstcause;
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_EFM32_RMU_DEBUG
|
||||
#if defined(CONFIG_EFM32_RMU_DEBUG) && defined(CONFIG_DEBUG_WARN)
|
||||
const char *efm32_reset_cause_list_str(uint32_t reg, unsigned int *idx)
|
||||
{
|
||||
int len = sizeof(efm32_reset_cause_list)/sizeof(efm32_reset_cause_list[0]);
|
||||
@ -261,8 +261,8 @@ void efm32_rmu_initialize(void)
|
||||
putreg32(EMU_LOCK_LOCKKEY_LOCK, EMU_LOCK_LOCKKEY_LOCK);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_EFM32_RMU_DEBUG
|
||||
rmuerr("RMU => reg = 0x%08X\n", g_efm32_rstcause);
|
||||
#if defined(CONFIG_EFM32_RMU_DEBUG) && defined(CONFIG_DEBUG_WARN)
|
||||
rmuwarn("RMU => reg = 0x%08X\n", g_efm32_rstcause);
|
||||
for (; ; )
|
||||
{
|
||||
const char *str;
|
||||
@ -273,7 +273,7 @@ void efm32_rmu_initialize(void)
|
||||
break;
|
||||
}
|
||||
|
||||
rmuerr("RMU => %s\n", str);
|
||||
rmuwarn("RMU => %s\n", str);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -50,20 +50,17 @@
|
||||
****************************************************************************/
|
||||
/* Configuration ************************************************************/
|
||||
|
||||
#ifndef CONFIG_DEBUG_FEATURES
|
||||
# undef CONFIG_DEBUG_INFO
|
||||
#ifndef CONFIG_DEBUG_ERROR
|
||||
# undef CONFIG_EFM32_RMU_DEBUG
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_EFM32_RMU_DEBUG
|
||||
# define rmuerr _llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define rmuinfo _llerr
|
||||
# else
|
||||
# define rmuinfo(x...)
|
||||
# endif
|
||||
# define rmuerr _llerr
|
||||
# define rmuwarn _llwarn
|
||||
# define rmuinfo _llinfo
|
||||
#else
|
||||
# define rmuerr(x...)
|
||||
# define rmuwarn(x...)
|
||||
# define rmuinfo(x...)
|
||||
#endif
|
||||
|
||||
|
@ -114,6 +114,10 @@
|
||||
# error "FIFO allocations exceed FIFO memory size"
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_DEBUG_USB_INFO
|
||||
# undef CONFIG_EFM32_USBDEV_REGDEBUG
|
||||
#endif
|
||||
|
||||
/* The actual FIFO addresses that we use must be aligned to 4-byte boundaries;
|
||||
* FIFO sizes must be provided in units of 32-bit words.
|
||||
*/
|
||||
@ -474,7 +478,7 @@ struct efm32_usbdev_s
|
||||
|
||||
/* Register operations ********************************************************/
|
||||
|
||||
#if defined(CONFIG_EFM32_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG_FEATURES)
|
||||
#ifdef CONFIG_EFM32_USBDEV_REGDEBUG
|
||||
static uint32_t efm32_getreg(uint32_t addr);
|
||||
static void efm32_putreg(uint32_t val, uint32_t addr);
|
||||
#else
|
||||
@ -794,7 +798,7 @@ const struct trace_msg_t g_usb_trace_strings_intdecode[] =
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_EFM32_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG_FEATURES)
|
||||
#ifdef CONFIG_EFM32_USBDEV_REGDEBUG
|
||||
static uint32_t efm32_getreg(uint32_t addr)
|
||||
{
|
||||
static uint32_t prevaddr = 0;
|
||||
@ -815,7 +819,7 @@ static uint32_t efm32_getreg(uint32_t addr)
|
||||
{
|
||||
if (count == 4)
|
||||
{
|
||||
_llerr("...\n");
|
||||
ullinfo("...\n");
|
||||
}
|
||||
|
||||
return val;
|
||||
@ -832,7 +836,7 @@ static uint32_t efm32_getreg(uint32_t addr)
|
||||
{
|
||||
/* Yes.. then show how many times the value repeated */
|
||||
|
||||
_llerr("[repeats %d more times]\n", count-3);
|
||||
ullinfo("[repeats %d more times]\n", count-3);
|
||||
}
|
||||
|
||||
/* Save the new address, value, and count */
|
||||
@ -844,7 +848,7 @@ static uint32_t efm32_getreg(uint32_t addr)
|
||||
|
||||
/* Show the register value read */
|
||||
|
||||
_llerr("%08x->%08x\n", addr, val);
|
||||
ullinfo("%08x->%08x\n", addr, val);
|
||||
return val;
|
||||
}
|
||||
#endif
|
||||
@ -857,12 +861,12 @@ static uint32_t efm32_getreg(uint32_t addr)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_EFM32_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG_FEATURES)
|
||||
#ifdef CONFIG_EFM32_USBDEV_REGDEBUG
|
||||
static void efm32_putreg(uint32_t val, uint32_t addr)
|
||||
{
|
||||
/* Show the register value being written */
|
||||
|
||||
_llerr("%08x<-%08x\n", addr, val);
|
||||
ullinfo("%08x<-%08x\n", addr, val);
|
||||
|
||||
/* Write the value */
|
||||
|
||||
@ -2629,7 +2633,7 @@ static inline void efm32_epout_interrupt(FAR struct efm32_usbdev_s *priv)
|
||||
if ((daint & 1) != 0)
|
||||
{
|
||||
regval = efm32_getreg(EFM32_USB_DOEPINT(epno));
|
||||
ullerr("DOEPINT(%d) = %08x\n", epno, regval);
|
||||
ullinfo("DOEPINT(%d) = %08x\n", epno, regval);
|
||||
efm32_putreg(0xFF, EFM32_USB_DOEPINT(epno));
|
||||
}
|
||||
|
||||
@ -2859,8 +2863,8 @@ static inline void efm32_epin_interrupt(FAR struct efm32_usbdev_s *priv)
|
||||
{
|
||||
if ((daint & 1) != 0)
|
||||
{
|
||||
ullerr("DIEPINT(%d) = %08x\n",
|
||||
epno, efm32_getreg(EFM32_USB_DIEPINT(epno)));
|
||||
ullinfo("DIEPINT(%d) = %08x\n",
|
||||
epno, efm32_getreg(EFM32_USB_DIEPINT(epno)));
|
||||
efm32_putreg(0xFF, EFM32_USB_DIEPINT(epno));
|
||||
}
|
||||
|
||||
@ -3799,7 +3803,7 @@ static int efm32_epout_configure(FAR struct efm32_ep_s *privep, uint8_t eptype,
|
||||
break;
|
||||
|
||||
default:
|
||||
uerr("Unsupported maxpacket: %d\n", maxpacket);
|
||||
uerr("ERROR: Unsupported maxpacket: %d\n", maxpacket);
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
@ -3894,7 +3898,7 @@ static int efm32_epin_configure(FAR struct efm32_ep_s *privep, uint8_t eptype,
|
||||
break;
|
||||
|
||||
default:
|
||||
uerr("Unsupported maxpacket: %d\n", maxpacket);
|
||||
uerr("ERROR: Unsupported maxpacket: %d\n", maxpacket);
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
@ -5482,7 +5486,7 @@ void up_usbinitialize(void)
|
||||
ret = irq_attach(EFM32_IRQ_USB, efm32_usbinterrupt);
|
||||
if (ret < 0)
|
||||
{
|
||||
uerr("irq_attach failed\n", ret);
|
||||
uerr("ERROR: irq_attach failed\n", ret);
|
||||
goto errout;
|
||||
}
|
||||
|
||||
|
@ -123,7 +123,7 @@
|
||||
|
||||
/* Register/packet debug depends on CONFIG_DEBUG_FEATURES */
|
||||
|
||||
#ifndef CONFIG_DEBUG_FEATURES
|
||||
#ifndef CONFIG_DEBUG_USB_INFO
|
||||
# undef CONFIG_EFM32_USBHOST_REGDEBUG
|
||||
# undef CONFIG_EFM32_USBHOST_PKTDUMP
|
||||
#endif
|
||||
@ -582,7 +582,7 @@ static const struct efm32_usbhost_trace_s g_trace2[TRACE2_NSTRINGS] =
|
||||
#ifdef CONFIG_EFM32_USBHOST_REGDEBUG
|
||||
static void efm32_printreg(uint32_t addr, uint32_t val, bool iswrite)
|
||||
{
|
||||
_llerr("%08x%s%08x\n", addr, iswrite ? "<-" : "->", val);
|
||||
ullinfo("%08x%s%08x\n", addr, iswrite ? "<-" : "->", val);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -632,7 +632,7 @@ static void efm32_checkreg(uint32_t addr, uint32_t val, bool iswrite)
|
||||
{
|
||||
/* No.. More than one. */
|
||||
|
||||
_llerr("[repeats %d more times]\n", count);
|
||||
ullinfo("[repeats %d more times]\n", count);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user