mirror of
https://github.com/apache/nuttx.git
synced 2026-05-25 01:39:44 +08:00
Add _ to the beginning of all debug macros to avoid name collisions
This commit is contained in:
@@ -413,7 +413,7 @@ config DEBUG_ERROR
|
||||
bool "Enable Error Output"
|
||||
default n
|
||||
---help---
|
||||
Enables output from err() statements. Errors are significant system
|
||||
Enables output from [a-z]err() statements. Errors are significant system
|
||||
exceptions that require immediate attention.
|
||||
|
||||
config DEBUG_WARN
|
||||
@@ -421,7 +421,7 @@ config DEBUG_WARN
|
||||
default n
|
||||
depends on DEBUG_ERROR
|
||||
---help---
|
||||
Enables output from warn() statements. Warnings are considered to
|
||||
Enables output from [a-z]warn() statements. Warnings are considered to
|
||||
be various unexpected conditions, potential errors or errors that will
|
||||
not have serious consequences.
|
||||
|
||||
|
||||
@@ -1156,7 +1156,7 @@ static int uart_interrupt(struct uart_dev_s *dev)
|
||||
/* Read the modem status register (MSR) to clear */
|
||||
|
||||
status = up_serialin(priv, A1X_UART_MSR_OFFSET);
|
||||
info("MSR: %02x\n", status);
|
||||
_info("MSR: %02x\n", status);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1167,7 +1167,7 @@ static int uart_interrupt(struct uart_dev_s *dev)
|
||||
/* Read the line status register (LSR) to clear */
|
||||
|
||||
status = up_serialin(priv, A1X_UART_LSR_OFFSET);
|
||||
info("LSR: %02x\n", status);
|
||||
_info("LSR: %02x\n", status);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1192,7 +1192,7 @@ static int uart_interrupt(struct uart_dev_s *dev)
|
||||
|
||||
default:
|
||||
{
|
||||
llerr("Unexpected IIR: %02x\n", status);
|
||||
_llerr("Unexpected IIR: %02x\n", status);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,25 +72,25 @@ void up_dumpnvic(FAR const char *msg)
|
||||
|
||||
flags = enter_critical_section();
|
||||
|
||||
llinfo("NVIC: %s\n", msg);
|
||||
llinfo(" ISER: %08x ICER: %08x ISPR: %08x ICPR: %08x\n",
|
||||
_llinfo("NVIC: %s\n", msg);
|
||||
_llinfo(" ISER: %08x ICER: %08x ISPR: %08x ICPR: %08x\n",
|
||||
getreg32(ARMV6M_NVIC_ISER), getreg32(ARMV6M_NVIC_ICER),
|
||||
getreg32(ARMV6M_NVIC_ISPR), getreg32(ARMV6M_NVIC_ICPR));
|
||||
|
||||
for (i = 0 ; i < 8; i += 4)
|
||||
{
|
||||
llinfo(" IPR%d: %08x IPR%d: %08x IPR%d: %08x IPR%d: %08x\n",
|
||||
_llinfo(" IPR%d: %08x IPR%d: %08x IPR%d: %08x IPR%d: %08x\n",
|
||||
i, getreg32(ARMV6M_NVIC_IPR(i)),
|
||||
i+1, getreg32(ARMV6M_NVIC_IPR(i+1)),
|
||||
i+2, getreg32(ARMV6M_NVIC_IPR(i+2)),
|
||||
i+3, getreg32(ARMV6M_NVIC_IPR(i+3)));
|
||||
}
|
||||
|
||||
llinfo("SYSCON:\n");
|
||||
llinfo(" CPUID: %08x ICSR: %08x AIRCR: %08x SCR: %08x\n",
|
||||
_llinfo("SYSCON:\n");
|
||||
_llinfo(" CPUID: %08x ICSR: %08x AIRCR: %08x SCR: %08x\n",
|
||||
getreg32(ARMV6M_SYSCON_CPUID), getreg32(ARMV6M_SYSCON_ICSR),
|
||||
getreg32(ARMV6M_SYSCON_AIRCR), getreg32(ARMV6M_SYSCON_SCR));
|
||||
llinfo(" CCR: %08x SHPR2: %08x SHPR3: %08x\n",
|
||||
_llinfo(" CCR: %08x SHPR2: %08x SHPR3: %08x\n",
|
||||
getreg32(ARMV6M_SYSCON_CCR), getreg32(ARMV6M_SYSCON_SHPR2),
|
||||
getreg32(ARMV6M_SYSCON_SHPR3));
|
||||
|
||||
|
||||
@@ -55,25 +55,13 @@
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_DEBUG_HARDFAULT
|
||||
# define hferr(format, ...) llerr(format, ##__VA_ARGS__)
|
||||
# define hferr(format, ...) _llerr(format, ##__VA_ARGS__)
|
||||
#else
|
||||
# define hferr(x...)
|
||||
#endif
|
||||
|
||||
#define INSN_SVC0 0xdf00 /* insn: svc 0 */
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
@@ -149,7 +137,7 @@ int up_hardfault(int irq, FAR void *context)
|
||||
#endif
|
||||
|
||||
(void)up_irq_save();
|
||||
llerr("PANIC!!! Hard fault\n");
|
||||
_llerr("PANIC!!! Hard fault\n");
|
||||
PANIC();
|
||||
return OK; /* Won't get here */
|
||||
}
|
||||
|
||||
@@ -64,19 +64,19 @@ static inline void arm_registerdump(FAR struct tcb_s *tcb)
|
||||
{
|
||||
int regndx;
|
||||
|
||||
llerr("CPU%d:\n", up_cpu_index());
|
||||
_llerr("CPU%d:\n", up_cpu_index());
|
||||
|
||||
/* Dump the startup registers */
|
||||
|
||||
for (regndx = REG_R0; regndx <= REG_R15; regndx += 8)
|
||||
{
|
||||
uint32_t *ptr = (uint32_t *)&tcb->xcp.regs[regndx];
|
||||
llerr("R%d: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
_llerr("R%d: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
regndx, ptr[0], ptr[1], ptr[2], ptr[3],
|
||||
ptr[4], ptr[5], ptr[6], ptr[7]);
|
||||
}
|
||||
|
||||
llerr("CPSR: %08x\n", tcb->xcp.regs[REG_CPSR]);
|
||||
_llerr("CPSR: %08x\n", tcb->xcp.regs[REG_CPSR]);
|
||||
}
|
||||
#else
|
||||
# define arm_registerdump(tcb)
|
||||
|
||||
@@ -411,7 +411,7 @@ void up_l2ccinitialize(void)
|
||||
putreg32(L2CC_CR_L2CEN, L2CC_CR);
|
||||
}
|
||||
|
||||
llerr("(%d ways) * (%d bytes/way) = %d bytes\n",
|
||||
_llerr("(%d ways) * (%d bytes/way) = %d bytes\n",
|
||||
PL310_NWAYS, PL310_WAYSIZE, PL310_CACHE_SIZE);
|
||||
}
|
||||
|
||||
|
||||
@@ -222,7 +222,7 @@ static inline void mpu_showtype(void)
|
||||
#ifdef CONFIG_DEBUG_ERROR
|
||||
uint32_t regval = getreg32(MPU_TYPE);
|
||||
|
||||
err("%s MPU Regions: data=%d instr=%d\n",
|
||||
_err("%s MPU Regions: data=%d instr=%d\n",
|
||||
(regval & MPU_TYPE_SEPARATE) != 0 ? "Separate" : "Unified",
|
||||
(regval & MPU_TYPE_DREGION_MASK) >> MPU_TYPE_DREGION_SHIFT,
|
||||
(regval & MPU_TYPE_IREGION_MASK) >> MPU_TYPE_IREGION_SHIFT);
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_DEBUG_HARDFAULT
|
||||
# define hferr(format, ...) llerr(format, ##__VA_ARGS__)
|
||||
# define hferr(format, ...) _llerr(format, ##__VA_ARGS__)
|
||||
#else
|
||||
# define hferr(x...)
|
||||
#endif
|
||||
@@ -179,7 +179,7 @@ int up_hardfault(int irq, FAR void *context)
|
||||
#endif
|
||||
|
||||
(void)up_irq_save();
|
||||
llerr("PANIC!!! Hard fault: %08x\n", getreg32(NVIC_HFAULTS));
|
||||
_llerr("PANIC!!! Hard fault: %08x\n", getreg32(NVIC_HFAULTS));
|
||||
PANIC();
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
#undef DEBUG_MEMFAULTS /* Define to debug memory management faults */
|
||||
|
||||
#ifdef DEBUG_MEMFAULTS
|
||||
# define mferr(format, ...) llerr(format, ##__VA_ARGS__)
|
||||
# define mferr(format, ...) _llerr(format, ##__VA_ARGS__)
|
||||
#else
|
||||
# define mferr(x...)
|
||||
#endif
|
||||
@@ -92,9 +92,9 @@ int up_memfault(int irq, FAR void *context)
|
||||
/* Dump some memory management fault info */
|
||||
|
||||
(void)up_irq_save();
|
||||
llerr("PANIC!!! Memory Management Fault:\n");
|
||||
_llerr("PANIC!!! Memory Management Fault:\n");
|
||||
mferr(" IRQ: %d context: %p\n", irq, regs);
|
||||
llerr(" CFAULTS: %08x MMFAR: %08x\n",
|
||||
_llerr(" CFAULTS: %08x MMFAR: %08x\n",
|
||||
getreg32(NVIC_CFAULTS), getreg32(NVIC_MEMMANAGE_ADDR));
|
||||
mferr(" BASEPRI: %08x PRIMASK: %08x IPSR: %08x CONTROL: %08x\n",
|
||||
getbasepri(), getprimask(), getipsr(), getcontrol());
|
||||
|
||||
@@ -98,7 +98,7 @@ static void up_stackdump(uint32_t sp, uint32_t stack_base)
|
||||
for (stack = sp & ~0x1f; stack < stack_base; stack += 32)
|
||||
{
|
||||
uint32_t *ptr = (uint32_t *)stack;
|
||||
llerr("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
_llerr("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
stack, ptr[0], ptr[1], ptr[2], ptr[3],
|
||||
ptr[4], ptr[5], ptr[6], ptr[7]);
|
||||
}
|
||||
@@ -117,11 +117,11 @@ static void up_taskdump(FAR struct tcb_s *tcb, FAR void *arg)
|
||||
/* Dump interesting properties of this task */
|
||||
|
||||
#if CONFIG_TASK_NAME_SIZE > 0
|
||||
llerr("%s: PID=%d Stack Used=%lu of %lu\n",
|
||||
_llerr("%s: PID=%d Stack Used=%lu of %lu\n",
|
||||
tcb->name, tcb->pid, (unsigned long)up_check_tcbstack(tcb),
|
||||
(unsigned long)tcb->adj_stack_size);
|
||||
#else
|
||||
llerr("PID: %d Stack Used=%lu of %lu\n",
|
||||
_llerr("PID: %d Stack Used=%lu of %lu\n",
|
||||
tcb->pid, (unsigned long)up_check_tcbstack(tcb),
|
||||
(unsigned long)tcb->adj_stack_size);
|
||||
#endif
|
||||
@@ -161,12 +161,12 @@ static inline void up_registerdump(void)
|
||||
for (regs = REG_R0; regs <= REG_R15; regs += 8)
|
||||
{
|
||||
uint32_t *ptr = (uint32_t *)&CURRENT_REGS[regs];
|
||||
llerr("R%d: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
_llerr("R%d: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
regs, ptr[0], ptr[1], ptr[2], ptr[3],
|
||||
ptr[4], ptr[5], ptr[6], ptr[7]);
|
||||
}
|
||||
|
||||
llerr("CPSR: %08x\n", CURRENT_REGS[REG_CPSR]);
|
||||
_llerr("CPSR: %08x\n", CURRENT_REGS[REG_CPSR]);
|
||||
}
|
||||
}
|
||||
#else
|
||||
@@ -230,7 +230,7 @@ static void up_dumpstate(void)
|
||||
ustacksize = (uint32_t)rtcb->adj_stack_size;
|
||||
}
|
||||
|
||||
llerr("Current sp: %08x\n", sp);
|
||||
_llerr("Current sp: %08x\n", sp);
|
||||
|
||||
#if CONFIG_ARCH_INTERRUPTSTACK > 3
|
||||
/* Get the limits on the interrupt stack memory */
|
||||
@@ -240,21 +240,21 @@ static void up_dumpstate(void)
|
||||
|
||||
/* Show interrupt stack info */
|
||||
|
||||
llerr("Interrupt stack:\n");
|
||||
llerr(" base: %08x\n", istackbase);
|
||||
llerr(" size: %08x\n", istacksize);
|
||||
_llerr("Interrupt stack:\n");
|
||||
_llerr(" base: %08x\n", istackbase);
|
||||
_llerr(" size: %08x\n", istacksize);
|
||||
#ifdef CONFIG_STACK_COLORATION
|
||||
llerr(" used: %08x\n", up_check_intstack());
|
||||
_llerr(" used: %08x\n", up_check_intstack());
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Show user stack info */
|
||||
|
||||
llerr("User stack:\n");
|
||||
llerr(" base: %08x\n", ustackbase);
|
||||
llerr(" size: %08x\n", ustacksize);
|
||||
_llerr("User stack:\n");
|
||||
_llerr(" base: %08x\n", ustackbase);
|
||||
_llerr(" size: %08x\n", ustacksize);
|
||||
#ifdef CONFIG_STACK_COLORATION
|
||||
llerr(" used: %08x\n", up_check_tcbstack(rtcb));
|
||||
_llerr(" used: %08x\n", up_check_tcbstack(rtcb));
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_KERNEL_STACK
|
||||
@@ -264,9 +264,9 @@ static void up_dumpstate(void)
|
||||
{
|
||||
kstackbase = (uint32_t)rtcb->xcp.kstack + CONFIG_ARCH_KERNEL_STACKSIZE - 4;
|
||||
|
||||
llerr("Kernel stack:\n");
|
||||
llerr(" base: %08x\n", kstackbase);
|
||||
llerr(" size: %08x\n", CONFIG_ARCH_KERNEL_STACKSIZE);
|
||||
_llerr("Kernel stack:\n");
|
||||
_llerr(" base: %08x\n", kstackbase);
|
||||
_llerr(" size: %08x\n", CONFIG_ARCH_KERNEL_STACKSIZE);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -277,7 +277,7 @@ static void up_dumpstate(void)
|
||||
{
|
||||
/* Yes.. dump the interrupt stack */
|
||||
|
||||
llerr("Interrupt Stack\n", sp);
|
||||
_llerr("Interrupt Stack\n", sp);
|
||||
up_stackdump(sp, istackbase);
|
||||
|
||||
/* Extract the user stack pointer which should lie
|
||||
@@ -285,7 +285,7 @@ static void up_dumpstate(void)
|
||||
*/
|
||||
|
||||
sp = g_intstackbase;
|
||||
llerr("User sp: %08x\n", sp);
|
||||
_llerr("User sp: %08x\n", sp);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -295,7 +295,7 @@ static void up_dumpstate(void)
|
||||
|
||||
if (sp > ustackbase - ustacksize && sp < ustackbase)
|
||||
{
|
||||
llerr("User Stack\n", sp);
|
||||
_llerr("User Stack\n", sp);
|
||||
up_stackdump(sp, ustackbase);
|
||||
}
|
||||
|
||||
@@ -306,7 +306,7 @@ static void up_dumpstate(void)
|
||||
|
||||
if (sp >= (uint32_t)rtcb->xcp.kstack && sp < kstackbase)
|
||||
{
|
||||
llerr("Kernel Stack\n", sp);
|
||||
_llerr("Kernel Stack\n", sp);
|
||||
up_stackdump(sp, kstackbase);
|
||||
}
|
||||
#endif
|
||||
@@ -373,10 +373,10 @@ void up_assert(const uint8_t *filename, int lineno)
|
||||
board_autoled_on(LED_ASSERTION);
|
||||
|
||||
#if CONFIG_TASK_NAME_SIZE > 0
|
||||
llerr("Assertion failed at file:%s line: %d task: %s\n",
|
||||
_llerr("Assertion failed at file:%s line: %d task: %s\n",
|
||||
filename, lineno, rtcb->name);
|
||||
#else
|
||||
llerr("Assertion failed at file:%s line: %d\n",
|
||||
_llerr("Assertion failed at file:%s line: %d\n",
|
||||
filename, lineno);
|
||||
#endif
|
||||
up_dumpstate();
|
||||
|
||||
@@ -411,7 +411,7 @@ void up_l2ccinitialize(void)
|
||||
putreg32(L2CC_CR_L2CEN, L2CC_CR);
|
||||
}
|
||||
|
||||
llerr("(%d ways) * (%d bytes/way) = %d bytes\n",
|
||||
_llerr("(%d ways) * (%d bytes/way) = %d bytes\n",
|
||||
PL310_NWAYS, PL310_WAYSIZE, PL310_CACHE_SIZE);
|
||||
}
|
||||
|
||||
|
||||
@@ -361,7 +361,7 @@ static inline void mpu_showtype(void)
|
||||
{
|
||||
#ifdef CONFIG_DEBUG_FEATURES
|
||||
uint32_t regval = mpu_get_mpuir();
|
||||
err("%s MPU Regions: data=%d instr=%d\n",
|
||||
_err("%s MPU Regions: data=%d instr=%d\n",
|
||||
(regval & MPUIR_SEPARATE) != 0 ? "Separate" : "Unified",
|
||||
(regval & MPUIR_DREGION_MASK) >> MPUIR_DREGION_SHIFT,
|
||||
(regval & MPUIR_IREGION_MASK) >> MPUIR_IREGION_SHIFT);
|
||||
|
||||
@@ -155,7 +155,7 @@ static inline unsigned int wdt_prescaletoptv(unsigned int prescale)
|
||||
}
|
||||
}
|
||||
|
||||
err("prescale=%d -> ptv=%d\n", prescale, ptv);
|
||||
_err("prescale=%d -> ptv=%d\n", prescale, ptv);
|
||||
return ptv;
|
||||
}
|
||||
|
||||
@@ -173,7 +173,7 @@ static int wdt_setusec(uint32_t usec)
|
||||
uint32_t divisor = 1;
|
||||
uint32_t mode;
|
||||
|
||||
err("usec=%d\n", usec);
|
||||
_err("usec=%d\n", usec);
|
||||
|
||||
/* Calculate a value of prescaler and divisor that will be able
|
||||
* to count to the usec. It may not be exact or the best
|
||||
@@ -186,7 +186,7 @@ static int wdt_setusec(uint32_t usec)
|
||||
do
|
||||
{
|
||||
divisor = (CLOCK_MHZx2 * usec) / (prescaler * 2);
|
||||
err("divisor=0x%x prescaler=0x%x\n", divisor, prescaler);
|
||||
_err("divisor=0x%x prescaler=0x%x\n", divisor, prescaler);
|
||||
|
||||
if (divisor >= 0x10000)
|
||||
{
|
||||
@@ -194,7 +194,7 @@ static int wdt_setusec(uint32_t usec)
|
||||
{
|
||||
/* This is the max possible ~2.5 seconds. */
|
||||
|
||||
err("prescaler=0x%x too big!\n", prescaler);
|
||||
_err("prescaler=0x%x too big!\n", prescaler);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
@@ -207,19 +207,19 @@ static int wdt_setusec(uint32_t usec)
|
||||
}
|
||||
while (divisor >= 0x10000);
|
||||
|
||||
err("prescaler=0x%x divisor=0x%x\n", prescaler, divisor);
|
||||
_err("prescaler=0x%x divisor=0x%x\n", prescaler, divisor);
|
||||
|
||||
mode = wdt_prescaletoptv(prescaler);
|
||||
mode &= ~C5471_TIMER_AUTORELOAD; /* One shot mode. */
|
||||
mode |= divisor << 5;
|
||||
err("mode=0x%x\n", mode);
|
||||
_err("mode=0x%x\n", mode);
|
||||
|
||||
c5471_wdt_cntl = mode;
|
||||
|
||||
/* Now start the watchdog */
|
||||
|
||||
c5471_wdt_cntl |= C5471_TIMER_STARTBIT;
|
||||
err("cntl_timer=0x%x\n", c5471_wdt_cntl);
|
||||
_err("cntl_timer=0x%x\n", c5471_wdt_cntl);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -234,17 +234,17 @@ static int wdt_setusec(uint32_t usec)
|
||||
|
||||
static int wdt_interrupt(int irq, void *context)
|
||||
{
|
||||
err("expired\n");
|
||||
_err("expired\n");
|
||||
|
||||
#if defined(CONFIG_SOFTWARE_REBOOT)
|
||||
# if defined(CONFIG_SOFTWARE_TEST)
|
||||
err(" Test only\n");
|
||||
_err(" Test only\n");
|
||||
# else
|
||||
err(" Re-booting\n");
|
||||
_err(" Re-booting\n");
|
||||
# warning "Add logic to reset CPU here"
|
||||
# endif
|
||||
#else
|
||||
err(" No reboot\n");
|
||||
_err(" No reboot\n");
|
||||
#endif
|
||||
return OK;
|
||||
}
|
||||
@@ -259,7 +259,7 @@ static ssize_t wdt_read(struct file *filep, char *buffer, size_t buflen)
|
||||
* not work if the user provides a buffer smaller than 18 bytes.
|
||||
*/
|
||||
|
||||
err("buflen=%d\n", buflen);
|
||||
_err("buflen=%d\n", buflen);
|
||||
if (buflen >= 18)
|
||||
{
|
||||
sprintf(buffer, "%08x %08x\n", c5471_wdt_cntl, c5471_wdt_count);
|
||||
@@ -274,7 +274,7 @@ static ssize_t wdt_read(struct file *filep, char *buffer, size_t buflen)
|
||||
|
||||
static ssize_t wdt_write(struct file *filep, const char *buffer, size_t buflen)
|
||||
{
|
||||
err("buflen=%d\n", buflen);
|
||||
_err("buflen=%d\n", buflen);
|
||||
if (buflen)
|
||||
{
|
||||
/* Reset the timer to the maximum delay */
|
||||
@@ -292,7 +292,7 @@ static ssize_t wdt_write(struct file *filep, const char *buffer, size_t buflen)
|
||||
|
||||
static int wdt_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
{
|
||||
err("ioctl Call: cmd=0x%x arg=0x%x", cmd, arg);
|
||||
_err("ioctl Call: cmd=0x%x arg=0x%x", cmd, arg);
|
||||
|
||||
/* Process the IOCTL command (see arch/watchdog.h) */
|
||||
|
||||
@@ -315,7 +315,7 @@ static int wdt_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
|
||||
static int wdt_open(struct file *filep)
|
||||
{
|
||||
err("");
|
||||
_err("");
|
||||
|
||||
if (g_wdtopen)
|
||||
{
|
||||
@@ -339,7 +339,7 @@ static int wdt_open(struct file *filep)
|
||||
|
||||
static int wdt_close(struct file *filep)
|
||||
{
|
||||
err("");
|
||||
_err("");
|
||||
|
||||
/* The task controlling the watchdog has terminated. Take the timer
|
||||
* the
|
||||
@@ -367,7 +367,7 @@ int up_wdtinit(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
err("C547x Watchdog Driver\n");
|
||||
_err("C547x Watchdog Driver\n");
|
||||
|
||||
/* Register as /dev/wdt */
|
||||
|
||||
@@ -379,7 +379,7 @@ int up_wdtinit(void)
|
||||
|
||||
/* Register for an interrupt level callback through wdt_interrupt */
|
||||
|
||||
err("Attach to IRQ=%d\n", C5471_IRQ_WATCHDOG);
|
||||
_err("Attach to IRQ=%d\n", C5471_IRQ_WATCHDOG);
|
||||
|
||||
/* Make sure that the timer is stopped */
|
||||
|
||||
|
||||
@@ -216,7 +216,7 @@ int spi_xfer(uint8_t dev_idx, uint8_t bitlen, const void *dout, void *din)
|
||||
tmp <<= (32-bitlen); /* align to MSB */
|
||||
}
|
||||
|
||||
err("spi_xfer(dev_idx=%u, bitlen=%u, data_out=0x%08x): ",
|
||||
_err("spi_xfer(dev_idx=%u, bitlen=%u, data_out=0x%08x): ",
|
||||
dev_idx, bitlen, tmp);
|
||||
|
||||
/* fill transmit registers */
|
||||
@@ -236,14 +236,14 @@ int spi_xfer(uint8_t dev_idx, uint8_t bitlen, const void *dout, void *din)
|
||||
}
|
||||
|
||||
putreg16(reg_ctrl, SPI_REG(REG_CTRL));
|
||||
err("reg_ctrl=0x%04x ", reg_ctrl);
|
||||
_err("reg_ctrl=0x%04x ", reg_ctrl);
|
||||
|
||||
/* wait until the transfer is complete */
|
||||
|
||||
while (1)
|
||||
{
|
||||
reg_status = getreg16(SPI_REG(REG_STATUS));
|
||||
err("status=0x%04x ", reg_status);
|
||||
_err("status=0x%04x ", reg_status);
|
||||
if (din && (reg_status & SPI_STATUS_RE))
|
||||
{
|
||||
break;
|
||||
@@ -262,7 +262,7 @@ int spi_xfer(uint8_t dev_idx, uint8_t bitlen, const void *dout, void *din)
|
||||
{
|
||||
tmp = getreg16(SPI_REG(REG_RX_MSB)) << 16;
|
||||
tmp |= getreg16(SPI_REG(REG_RX_LSB));
|
||||
err("data_in=0x%08x ", tmp);
|
||||
_err("data_in=0x%08x ", tmp);
|
||||
|
||||
if (bitlen <= 8)
|
||||
{
|
||||
@@ -278,7 +278,7 @@ int spi_xfer(uint8_t dev_idx, uint8_t bitlen, const void *dout, void *din)
|
||||
}
|
||||
}
|
||||
|
||||
err("\n");
|
||||
_err("\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ int uwire_xfer(int cs, int bitlen, const void *dout, void *din)
|
||||
|
||||
/* FIXME uwire_init always selects CS0 for now */
|
||||
|
||||
err("uwire_xfer(dev_idx=%u, bitlen=%u\n", cs, bitlen);
|
||||
_err("uwire_xfer(dev_idx=%u, bitlen=%u\n", cs, bitlen);
|
||||
|
||||
/* select the chip */
|
||||
|
||||
@@ -128,7 +128,7 @@ int uwire_xfer(int cs, int bitlen, const void *dout, void *din)
|
||||
|
||||
tmp <<= 16 - bitlen; /* align to MSB */
|
||||
putreg16(tmp, UWIRE_REG(REG_DATA));
|
||||
err(", data_out=0x%04hx", tmp);
|
||||
_err(", data_out=0x%04hx", tmp);
|
||||
}
|
||||
|
||||
tmp = (dout ? UWIRE_CSR_BITS_WR(bitlen) : 0) |
|
||||
@@ -142,7 +142,7 @@ int uwire_xfer(int cs, int bitlen, const void *dout, void *din)
|
||||
_uwire_wait(UWIRE_CSR_RDRB, UWIRE_CSR_RDRB);
|
||||
|
||||
tmp = getreg16(UWIRE_REG(REG_DATA));
|
||||
err(", data_in=0x%08x", tmp);
|
||||
_err(", data_in=0x%08x", tmp);
|
||||
|
||||
if (bitlen <= 8)
|
||||
*(uint8_t *)din = tmp & 0xff;
|
||||
@@ -155,7 +155,7 @@ int uwire_xfer(int cs, int bitlen, const void *dout, void *din)
|
||||
putreg16(UWIRE_CSR_IDX(0) | 0, UWIRE_REG(REG_CSR));
|
||||
_uwire_wait(UWIRE_CSR_CSRB, 0);
|
||||
|
||||
err(")\n");
|
||||
_err(")\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -77,13 +77,13 @@ static void up_calibratedelay(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
llerr("Beginning 100s delay\n");
|
||||
_llerr("Beginning 100s delay\n");
|
||||
for (i = 0; i < 100; i++)
|
||||
{
|
||||
up_mdelay(1000);
|
||||
}
|
||||
|
||||
llerr("End 100s delay\n");
|
||||
_llerr("End 100s delay\n");
|
||||
}
|
||||
#else
|
||||
# define up_calibratedelay()
|
||||
|
||||
@@ -443,7 +443,7 @@ static uint8_t dm320_getreg8(uint32_t addr)
|
||||
{
|
||||
if (count == 4)
|
||||
{
|
||||
llerr("...\n");
|
||||
_llerr("...\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);
|
||||
_llerr("[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);
|
||||
_llerr("%08x->%02x\n", addr, val);
|
||||
return val;
|
||||
}
|
||||
#endif
|
||||
@@ -506,7 +506,7 @@ static uint32_t dm320_getreg16(uint32_t addr)
|
||||
{
|
||||
if (count == 4)
|
||||
{
|
||||
llerr("...\n");
|
||||
_llerr("...\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);
|
||||
_llerr("[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);
|
||||
_llerr("%08x->%04x\n", addr, val);
|
||||
return val;
|
||||
}
|
||||
#endif
|
||||
@@ -569,7 +569,7 @@ static uint32_t dm320_getreg32(uint32_t addr)
|
||||
{
|
||||
if (count == 4)
|
||||
{
|
||||
llerr("...\n");
|
||||
_llerr("...\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);
|
||||
_llerr("[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);
|
||||
_llerr("%08x->%08x\n", addr, val);
|
||||
return val;
|
||||
}
|
||||
#endif
|
||||
@@ -616,7 +616,7 @@ static void dm320_putreg8(uint8_t val, uint32_t addr)
|
||||
{
|
||||
/* Show the register value being written */
|
||||
|
||||
llerr("%08x<-%02x\n", addr, val);
|
||||
_llerr("%08x<-%02x\n", addr, val);
|
||||
|
||||
/* Write the value */
|
||||
|
||||
@@ -637,7 +637,7 @@ static void dm320_putreg16(uint16_t val, uint32_t addr)
|
||||
{
|
||||
/* Show the register value being written */
|
||||
|
||||
llerr("%08x<-%04x\n", addr, val);
|
||||
_llerr("%08x<-%04x\n", addr, val);
|
||||
|
||||
/* Write the value */
|
||||
|
||||
@@ -658,7 +658,7 @@ static void dm320_putreg32(uint32_t val, uint32_t addr)
|
||||
{
|
||||
/* Show the register value being written */
|
||||
|
||||
llerr("%08x<-%08x\n", addr, val);
|
||||
_llerr("%08x<-%08x\n", addr, val);
|
||||
|
||||
/* Write the value */
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ static void up_idlepm(void)
|
||||
|
||||
/* Perform board-specific, state-dependent logic here */
|
||||
|
||||
llinfo("newstate= %d oldstate=%d\n", newstate, oldstate);
|
||||
_llinfo("newstate= %d oldstate=%d\n", newstate, oldstate);
|
||||
|
||||
/* Then force the global state change */
|
||||
|
||||
|
||||
@@ -170,7 +170,7 @@ static void efm32_dumpnvic(const char *msg, int irq)
|
||||
static int efm32_nmi(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
err("PANIC!!! NMI received\n");
|
||||
_err("PANIC!!! NMI received\n");
|
||||
PANIC();
|
||||
return 0;
|
||||
}
|
||||
@@ -178,7 +178,7 @@ static int efm32_nmi(int irq, FAR void *context)
|
||||
static int efm32_busfault(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
err("PANIC!!! Bus fault received: %08x\n", getreg32(NVIC_CFAULTS));
|
||||
_err("PANIC!!! Bus fault received: %08x\n", getreg32(NVIC_CFAULTS));
|
||||
PANIC();
|
||||
return 0;
|
||||
}
|
||||
@@ -186,7 +186,7 @@ static int efm32_busfault(int irq, FAR void *context)
|
||||
static int efm32_usagefault(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
err("PANIC!!! Usage fault received: %08x\n", getreg32(NVIC_CFAULTS));
|
||||
_err("PANIC!!! Usage fault received: %08x\n", getreg32(NVIC_CFAULTS));
|
||||
PANIC();
|
||||
return 0;
|
||||
}
|
||||
@@ -194,7 +194,7 @@ static int efm32_usagefault(int irq, FAR void *context)
|
||||
static int efm32_pendsv(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
err("PANIC!!! PendSV received\n");
|
||||
_err("PANIC!!! PendSV received\n");
|
||||
PANIC();
|
||||
return 0;
|
||||
}
|
||||
@@ -202,7 +202,7 @@ static int efm32_pendsv(int irq, FAR void *context)
|
||||
static int efm32_errmonitor(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
err("PANIC!!! Debug Monitor received\n");
|
||||
_err("PANIC!!! Debug Monitor received\n");
|
||||
PANIC();
|
||||
return 0;
|
||||
}
|
||||
@@ -210,7 +210,7 @@ static int efm32_errmonitor(int irq, FAR void *context)
|
||||
static int efm32_reserved(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
err("PANIC!!! Reserved interrupt\n");
|
||||
_err("PANIC!!! Reserved interrupt\n");
|
||||
PANIC();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -518,7 +518,7 @@ static int efm32_interrupt(struct uart_dev_s *dev)
|
||||
* FERR - Framing Error Interrupt Enable
|
||||
*/
|
||||
|
||||
llerr("RX ERROR: %08x\n", intflags);
|
||||
_llerr("RX ERROR: %08x\n", intflags);
|
||||
}
|
||||
|
||||
/* Check for transmit errors */
|
||||
@@ -527,7 +527,7 @@ static int efm32_interrupt(struct uart_dev_s *dev)
|
||||
{
|
||||
/* TXOF - TX Overflow Interrupt Enable */
|
||||
|
||||
llerr("RX ERROR: %08x\n", intflags);
|
||||
_llerr("RX ERROR: %08x\n", intflags);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -56,9 +56,9 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_EFM32_RMU_DEBUG
|
||||
# define rmuerr llerr
|
||||
# define rmuerr _llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define rmuinfo llerr
|
||||
# define rmuinfo _llerr
|
||||
# else
|
||||
# define rmuinfo(x...)
|
||||
# endif
|
||||
|
||||
@@ -780,7 +780,7 @@ static int efm32_rxinterrupt(struct uart_dev_s *dev)
|
||||
* FERR - Framing Error Interrupt Enable
|
||||
*/
|
||||
|
||||
llerr("RX ERROR: %08x\n", intflags);
|
||||
_llerr("RX ERROR: %08x\n", intflags);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -863,7 +863,7 @@ static int efm32_txinterrupt(struct uart_dev_s *dev)
|
||||
{
|
||||
/* TXOF - TX Overflow Interrupt Enable */
|
||||
|
||||
llerr("RX ERROR: %08x\n", intflags);
|
||||
_llerr("RX ERROR: %08x\n", intflags);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -815,7 +815,7 @@ static uint32_t efm32_getreg(uint32_t addr)
|
||||
{
|
||||
if (count == 4)
|
||||
{
|
||||
llerr("...\n");
|
||||
_llerr("...\n");
|
||||
}
|
||||
|
||||
return val;
|
||||
@@ -832,7 +832,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);
|
||||
_llerr("[repeats %d more times]\n", count-3);
|
||||
}
|
||||
|
||||
/* Save the new address, value, and count */
|
||||
@@ -844,7 +844,7 @@ static uint32_t efm32_getreg(uint32_t addr)
|
||||
|
||||
/* Show the register value read */
|
||||
|
||||
llerr("%08x->%08x\n", addr, val);
|
||||
_llerr("%08x->%08x\n", addr, val);
|
||||
return val;
|
||||
}
|
||||
#endif
|
||||
@@ -862,7 +862,7 @@ static void efm32_putreg(uint32_t val, uint32_t addr)
|
||||
{
|
||||
/* Show the register value being written */
|
||||
|
||||
llerr("%08x<-%08x\n", addr, val);
|
||||
_llerr("%08x<-%08x\n", addr, val);
|
||||
|
||||
/* Write the value */
|
||||
|
||||
|
||||
@@ -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);
|
||||
_llerr("%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);
|
||||
_llerr("[repeats %d more times]\n", count);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -173,7 +173,7 @@ static void kinetis_dumpnvic(const char *msg, int irq)
|
||||
static int kinetis_nmi(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
err("PANIC!!! NMI received\n");
|
||||
_err("PANIC!!! NMI received\n");
|
||||
PANIC();
|
||||
return 0;
|
||||
}
|
||||
@@ -181,7 +181,7 @@ static int kinetis_nmi(int irq, FAR void *context)
|
||||
static int kinetis_busfault(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
err("PANIC!!! Bus fault recived\n");
|
||||
_err("PANIC!!! Bus fault recived\n");
|
||||
PANIC();
|
||||
return 0;
|
||||
}
|
||||
@@ -189,7 +189,7 @@ static int kinetis_busfault(int irq, FAR void *context)
|
||||
static int kinetis_usagefault(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
err("PANIC!!! Usage fault received\n");
|
||||
_err("PANIC!!! Usage fault received\n");
|
||||
PANIC();
|
||||
return 0;
|
||||
}
|
||||
@@ -197,7 +197,7 @@ static int kinetis_usagefault(int irq, FAR void *context)
|
||||
static int kinetis_pendsv(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
err("PANIC!!! PendSV received\n");
|
||||
_err("PANIC!!! PendSV received\n");
|
||||
PANIC();
|
||||
return 0;
|
||||
}
|
||||
@@ -205,7 +205,7 @@ static int kinetis_pendsv(int irq, FAR void *context)
|
||||
static int kinetis_errmonitor(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
err("PANIC!!! Debug Monitor received\n");
|
||||
_err("PANIC!!! Debug Monitor received\n");
|
||||
PANIC();
|
||||
return 0;
|
||||
}
|
||||
@@ -213,7 +213,7 @@ static int kinetis_errmonitor(int irq, FAR void *context)
|
||||
static int kinetis_reserved(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
err("PANIC!!! Reserved interrupt\n");
|
||||
_err("PANIC!!! Reserved interrupt\n");
|
||||
PANIC();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -805,7 +805,7 @@ static int up_interrupt(int irq, void *context)
|
||||
*/
|
||||
|
||||
regval = up_serialin(priv, KINETIS_UART_S1_OFFSET);
|
||||
llerr("S1: %02x\n", regval);
|
||||
_llerr("S1: %02x\n", regval);
|
||||
UNUSED(regval);
|
||||
|
||||
regval = up_serialin(priv, KINETIS_UART_D_OFFSET);
|
||||
|
||||
@@ -156,7 +156,7 @@ void __start(void)
|
||||
|
||||
/* Show reset status */
|
||||
|
||||
err("Reset status: %02x:%02x\n",
|
||||
_err("Reset status: %02x:%02x\n",
|
||||
getreg8(KINETIS_SMC_SRSH), getreg8(KINETIS_SMC_SRSL));
|
||||
|
||||
/* Then start NuttX */
|
||||
|
||||
@@ -369,9 +369,9 @@ const struct trace_msg_t g_usb_trace_strings_deverror[] =
|
||||
# undef CONFIG_KHCI_USBDEV_BDTDEBUG
|
||||
# define CONFIG_KHCI_USBDEV_BDTDEBUG 1
|
||||
|
||||
# define regerr llerr
|
||||
# define regerr _llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define reginfo llerr
|
||||
# define reginfo _llerr
|
||||
# else
|
||||
# define reginfo(x...)
|
||||
# endif
|
||||
@@ -389,9 +389,9 @@ const struct trace_msg_t g_usb_trace_strings_deverror[] =
|
||||
|
||||
#ifdef CONFIG_KHCI_USBDEV_BDTDEBUG
|
||||
|
||||
# define bdterr llerr
|
||||
# define bdterr _llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define bdtinfo llerr
|
||||
# define bdtinfo _llerr
|
||||
# else
|
||||
# define bdtinfo(x...)
|
||||
# endif
|
||||
@@ -714,7 +714,7 @@ static uint16_t khci_getreg(uint32_t addr)
|
||||
{
|
||||
if (count == 4)
|
||||
{
|
||||
llerr("...\n");
|
||||
_llerr("...\n");
|
||||
}
|
||||
return val;
|
||||
}
|
||||
@@ -730,7 +730,7 @@ static uint16_t khci_getreg(uint32_t addr)
|
||||
{
|
||||
/* Yes.. then show how many times the value repeated */
|
||||
|
||||
llerr("[repeats %d more times]\n", count-3);
|
||||
_llerr("[repeats %d more times]\n", count-3);
|
||||
}
|
||||
|
||||
/* Save the new address, value, and count */
|
||||
@@ -742,7 +742,7 @@ static uint16_t khci_getreg(uint32_t addr)
|
||||
|
||||
/* Show the register value read */
|
||||
|
||||
llerr("%08x->%04x\n", addr, val);
|
||||
_llerr("%08x->%04x\n", addr, val);
|
||||
return val;
|
||||
}
|
||||
#endif
|
||||
@@ -756,7 +756,7 @@ static void khci_putreg(uint32_t val, uint32_t addr)
|
||||
{
|
||||
/* Show the register value being written */
|
||||
|
||||
llerr("%08x<-%04x\n", addr, val);
|
||||
_llerr("%08x<-%04x\n", addr, val);
|
||||
|
||||
/* Write the value */
|
||||
|
||||
|
||||
@@ -118,9 +118,9 @@ void kl_dumpgpio(gpio_cfgset_t pinset, const char *msg)
|
||||
|
||||
flags = enter_critical_section();
|
||||
|
||||
llinfo("GPIO%c pinset: %08x base: %08x -- %s\n",
|
||||
_llinfo("GPIO%c pinset: %08x base: %08x -- %s\n",
|
||||
g_portchar[port], pinset, base, msg);
|
||||
llinfo(" PDOR: %08x PDIR: %08x PDDR: %08x\n",
|
||||
_llinfo(" PDOR: %08x PDIR: %08x PDDR: %08x\n",
|
||||
getreg32(base + KL_GPIO_PDOR_OFFSET),
|
||||
getreg32(base + KL_GPIO_PDIR_OFFSET),
|
||||
getreg32(base + KL_GPIO_PDDR_OFFSET));
|
||||
|
||||
@@ -103,7 +103,7 @@ static void up_idlepm(void)
|
||||
|
||||
/* Perform board-specific, state-dependent logic here */
|
||||
|
||||
llinfo("newstate= %d oldstate=%d\n", newstate, oldstate);
|
||||
_llinfo("newstate= %d oldstate=%d\n", newstate, oldstate);
|
||||
|
||||
/* Then force the global state change */
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ static void kl_dumpnvic(const char *msg, int irq)
|
||||
static int kl_nmi(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
err("PANIC!!! NMI received\n");
|
||||
_err("PANIC!!! NMI received\n");
|
||||
PANIC();
|
||||
return 0;
|
||||
}
|
||||
@@ -149,7 +149,7 @@ static int kl_nmi(int irq, FAR void *context)
|
||||
static int kl_pendsv(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
err("PANIC!!! PendSV received\n");
|
||||
_err("PANIC!!! PendSV received\n");
|
||||
PANIC();
|
||||
return 0;
|
||||
}
|
||||
@@ -157,7 +157,7 @@ static int kl_pendsv(int irq, FAR void *context)
|
||||
static int kl_reserved(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
err("PANIC!!! Reserved interrupt\n");
|
||||
_err("PANIC!!! Reserved interrupt\n");
|
||||
PANIC();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -485,7 +485,7 @@ struct i2c_master_s *lpc11_i2cbus_initialize(int port)
|
||||
|
||||
if (port > 1)
|
||||
{
|
||||
err("lpc I2C Only support 0,1\n");
|
||||
_err("lpc I2C Only support 0,1\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ static void lpc11_dumpnvic(const char *msg, int irq)
|
||||
static int lpc11_nmi(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
err("PANIC!!! NMI received\n");
|
||||
_err("PANIC!!! NMI received\n");
|
||||
PANIC();
|
||||
return 0;
|
||||
}
|
||||
@@ -145,7 +145,7 @@ static int lpc11_nmi(int irq, FAR void *context)
|
||||
static int lpc11_pendsv(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
err("PANIC!!! PendSV received\n");
|
||||
_err("PANIC!!! PendSV received\n");
|
||||
PANIC();
|
||||
return 0;
|
||||
}
|
||||
@@ -153,7 +153,7 @@ static int lpc11_pendsv(int irq, FAR void *context)
|
||||
static int lpc11_reserved(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
err("PANIC!!! Reserved interrupt\n");
|
||||
_err("PANIC!!! Reserved interrupt\n");
|
||||
PANIC();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -630,7 +630,7 @@ static int up_interrupt(int irq, void *context)
|
||||
/* Read the line status register (LSR) to clear */
|
||||
|
||||
status = up_serialin(priv, LPC11_UART_LSR_OFFSET);
|
||||
info("LSR: %02x\n", status);
|
||||
_info("LSR: %02x\n", status);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -638,7 +638,7 @@ static int up_interrupt(int irq, void *context)
|
||||
|
||||
default:
|
||||
{
|
||||
err("Unexpected IIR: %02x\n", status);
|
||||
_err("Unexpected IIR: %02x\n", status);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -308,7 +308,7 @@ static void can_printreg(uint32_t addr, uint32_t value)
|
||||
{
|
||||
if (count == 4)
|
||||
{
|
||||
llerr("...\n");
|
||||
_llerr("...\n");
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -325,7 +325,7 @@ static void can_printreg(uint32_t addr, uint32_t value)
|
||||
{
|
||||
/* Yes.. then show how many times the value repeated */
|
||||
|
||||
llerr("[repeats %d more times]\n", count-3);
|
||||
_llerr("[repeats %d more times]\n", count-3);
|
||||
}
|
||||
|
||||
/* Save the new address, value, and count */
|
||||
@@ -337,7 +337,7 @@ static void can_printreg(uint32_t addr, uint32_t value)
|
||||
|
||||
/* Show the register value read */
|
||||
|
||||
llerr("%08x->%08x\n", addr, value);
|
||||
_llerr("%08x->%08x\n", addr, value);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -398,7 +398,7 @@ static void can_putreg(struct up_dev_s *priv, int offset, uint32_t value)
|
||||
|
||||
/* Show the register value being written */
|
||||
|
||||
llerr("%08x<-%08x\n", addr, value);
|
||||
_llerr("%08x<-%08x\n", addr, value);
|
||||
|
||||
/* Write the value */
|
||||
|
||||
@@ -458,7 +458,7 @@ static void can_putcommon(uint32_t addr, uint32_t value)
|
||||
{
|
||||
/* Show the register value being written */
|
||||
|
||||
llerr("%08x<-%08x\n", addr, value);
|
||||
_llerr("%08x<-%08x\n", addr, value);
|
||||
|
||||
/* Write the value */
|
||||
|
||||
@@ -681,7 +681,7 @@ static void can_txint(FAR struct can_dev_s *dev, bool enable)
|
||||
|
||||
static int can_ioctl(FAR struct can_dev_s *dev, int cmd, unsigned long arg)
|
||||
{
|
||||
err("Fix me:Not Implemented\n");
|
||||
_err("Fix me:Not Implemented\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -701,7 +701,7 @@ static int can_ioctl(FAR struct can_dev_s *dev, int cmd, unsigned long arg)
|
||||
|
||||
static int can_remoterequest(FAR struct can_dev_s *dev, uint16_t id)
|
||||
{
|
||||
err("Fix me:Not Implemented\n");
|
||||
_err("Fix me:Not Implemented\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -172,7 +172,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");
|
||||
_err("Fix me:Not Implemented\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -415,7 +415,7 @@ static void lpc17_ethreset(struct lpc17_driver_s *priv);
|
||||
#ifdef CONFIG_NET_REGDEBUG
|
||||
static void lpc17_printreg(uint32_t addr, uint32_t val, bool iswrite)
|
||||
{
|
||||
err("%08x%s%08x\n", addr, iswrite ? "<-" : "->", val);
|
||||
_err("%08x%s%08x\n", addr, iswrite ? "<-" : "->", val);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -465,7 +465,7 @@ static void lpc17_checkreg(uint32_t addr, uint32_t val, bool iswrite)
|
||||
{
|
||||
/* No.. More than one. */
|
||||
|
||||
err("[repeats %d more times]\n", count);
|
||||
_err("[repeats %d more times]\n", count);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2319,14 +2319,14 @@ static void lpc17_showpins(void)
|
||||
#if defined(CONFIG_NET_REGDEBUG) && defined(LPC17_HAVE_PHY)
|
||||
static void lpc17_showmii(uint8_t phyaddr, const char *msg)
|
||||
{
|
||||
err("PHY " LPC17_PHYNAME ": %s\n", msg);
|
||||
err(" MCR: %04x\n", lpc17_phyread(phyaddr, MII_MCR));
|
||||
err(" MSR: %04x\n", lpc17_phyread(phyaddr, MII_MSR));
|
||||
err(" ADVERTISE: %04x\n", lpc17_phyread(phyaddr, MII_ADVERTISE));
|
||||
err(" LPA: %04x\n", lpc17_phyread(phyaddr, MII_LPA));
|
||||
err(" EXPANSION: %04x\n", lpc17_phyread(phyaddr, MII_EXPANSION));
|
||||
_err("PHY " LPC17_PHYNAME ": %s\n", msg);
|
||||
_err(" MCR: %04x\n", lpc17_phyread(phyaddr, MII_MCR));
|
||||
_err(" MSR: %04x\n", lpc17_phyread(phyaddr, MII_MSR));
|
||||
_err(" ADVERTISE: %04x\n", lpc17_phyread(phyaddr, MII_ADVERTISE));
|
||||
_err(" LPA: %04x\n", lpc17_phyread(phyaddr, MII_LPA));
|
||||
_err(" EXPANSION: %04x\n", lpc17_phyread(phyaddr, MII_EXPANSION));
|
||||
#ifdef CONFIG_ETH0_PHY_KS8721
|
||||
err(" 10BTCR: %04x\n", lpc17_phyread(phyaddr, MII_KS8721_10BTCR));
|
||||
_err(" 10BTCR: %04x\n", lpc17_phyread(phyaddr, MII_KS8721_10BTCR));
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -485,7 +485,7 @@ struct i2c_master_s *lpc17_i2cbus_initialize(int port)
|
||||
|
||||
if (port > 1)
|
||||
{
|
||||
err("lpc I2C Only support 0,1\n");
|
||||
_err("lpc I2C Only support 0,1\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ static void lpc17_dumpnvic(const char *msg, int irq)
|
||||
static int lpc17_nmi(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
err("PANIC!!! NMI received\n");
|
||||
_err("PANIC!!! NMI received\n");
|
||||
PANIC();
|
||||
return 0;
|
||||
}
|
||||
@@ -160,7 +160,7 @@ static int lpc17_nmi(int irq, FAR void *context)
|
||||
static int lpc17_busfault(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
err("PANIC!!! Bus fault recived\n");
|
||||
_err("PANIC!!! Bus fault recived\n");
|
||||
PANIC();
|
||||
return 0;
|
||||
}
|
||||
@@ -168,7 +168,7 @@ static int lpc17_busfault(int irq, FAR void *context)
|
||||
static int lpc17_usagefault(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
err("PANIC!!! Usage fault received\n");
|
||||
_err("PANIC!!! Usage fault received\n");
|
||||
PANIC();
|
||||
return 0;
|
||||
}
|
||||
@@ -176,7 +176,7 @@ static int lpc17_usagefault(int irq, FAR void *context)
|
||||
static int lpc17_pendsv(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
err("PANIC!!! PendSV received\n");
|
||||
_err("PANIC!!! PendSV received\n");
|
||||
PANIC();
|
||||
return 0;
|
||||
}
|
||||
@@ -184,7 +184,7 @@ static int lpc17_pendsv(int irq, FAR void *context)
|
||||
static int lpc17_errmonitor(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
err("PANIC!!! Debug Monitor received\n");
|
||||
_err("PANIC!!! Debug Monitor received\n");
|
||||
PANIC();
|
||||
return 0;
|
||||
}
|
||||
@@ -192,7 +192,7 @@ static int lpc17_errmonitor(int irq, FAR void *context)
|
||||
static int lpc17_reserved(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
err("PANIC!!! Reserved interrupt\n");
|
||||
_err("PANIC!!! Reserved interrupt\n");
|
||||
PANIC();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1134,7 +1134,7 @@ static int up_interrupt(int irq, void *context)
|
||||
/* Read the modem status register (MSR) to clear */
|
||||
|
||||
status = up_serialin(priv, LPC17_UART_MSR_OFFSET);
|
||||
info("MSR: %02x\n", status);
|
||||
_info("MSR: %02x\n", status);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1145,7 +1145,7 @@ static int up_interrupt(int irq, void *context)
|
||||
/* Read the line status register (LSR) to clear */
|
||||
|
||||
status = up_serialin(priv, LPC17_UART_LSR_OFFSET);
|
||||
info("LSR: %02x\n", status);
|
||||
_info("LSR: %02x\n", status);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1153,7 +1153,7 @@ static int up_interrupt(int irq, void *context)
|
||||
|
||||
default:
|
||||
{
|
||||
err("Unexpected IIR: %02x\n", status);
|
||||
_err("Unexpected IIR: %02x\n", status);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -531,7 +531,7 @@ static struct lpc17_dmadesc_s g_usbddesc[CONFIG_LPC17_USBDEV_NDMADESCRIPTORS];
|
||||
#ifdef CONFIG_LPC17_USBDEV_REGDEBUG
|
||||
static void lpc17_printreg(uint32_t addr, uint32_t val, bool iswrite)
|
||||
{
|
||||
llerr("%08x%s%08x\n", addr, iswrite ? "<-" : "->", val);
|
||||
_llerr("%08x%s%08x\n", addr, iswrite ? "<-" : "->", val);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -581,7 +581,7 @@ static void lpc17_checkreg(uint32_t addr, uint32_t val, bool iswrite)
|
||||
{
|
||||
/* No.. More than one. */
|
||||
|
||||
llerr("[repeats %d more times]\n", count);
|
||||
_llerr("[repeats %d more times]\n", count);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -456,7 +456,7 @@ static struct lpc17_xfrinfo_s g_xfrbuffers[CONFIG_LPC17_USBHOST_NPREALLOC];
|
||||
#ifdef CONFIG_LPC17_USBHOST_REGDEBUG
|
||||
static void lpc17_printreg(uint32_t addr, uint32_t val, bool iswrite)
|
||||
{
|
||||
llerr("%08x%s%08x\n", addr, iswrite ? "<-" : "->", val);
|
||||
_llerr("%08x%s%08x\n", addr, iswrite ? "<-" : "->", val);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -506,7 +506,7 @@ static void lpc17_checkreg(uint32_t addr, uint32_t val, bool iswrite)
|
||||
{
|
||||
/* No.. More than one. */
|
||||
|
||||
llerr("[repeats %d more times]\n", count);
|
||||
_llerr("[repeats %d more times]\n", count);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -530,7 +530,7 @@ static int up_interrupt(int irq, void *context)
|
||||
/* Read the modem status register (MSR) to clear */
|
||||
|
||||
status = up_serialin(priv, LPC214X_UART_MSR_OFFSET);
|
||||
info("MSR: %02x\n", status);
|
||||
_info("MSR: %02x\n", status);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -541,7 +541,7 @@ static int up_interrupt(int irq, void *context)
|
||||
/* Read the line status register (LSR) to clear */
|
||||
|
||||
status = up_serialin(priv, LPC214X_UART_LSR_OFFSET);
|
||||
info("LSR: %02x\n", status);
|
||||
_info("LSR: %02x\n", status);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -549,7 +549,7 @@ static int up_interrupt(int irq, void *context)
|
||||
|
||||
default:
|
||||
{
|
||||
err("Unexpected IIR: %02x\n", status);
|
||||
_err("Unexpected IIR: %02x\n", status);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -539,7 +539,7 @@ static uint32_t lpc214x_getreg(uint32_t addr)
|
||||
{
|
||||
if (count == 4)
|
||||
{
|
||||
llerr("...\n");
|
||||
_llerr("...\n");
|
||||
}
|
||||
|
||||
return val;
|
||||
@@ -556,7 +556,7 @@ static uint32_t lpc214x_getreg(uint32_t addr)
|
||||
{
|
||||
/* Yes.. then show how many times the value repeated */
|
||||
|
||||
llerr("[repeats %d more times]\n", count-3);
|
||||
_llerr("[repeats %d more times]\n", count-3);
|
||||
}
|
||||
|
||||
/* Save the new address, value, and count */
|
||||
@@ -568,7 +568,7 @@ static uint32_t lpc214x_getreg(uint32_t addr)
|
||||
|
||||
/* Show the register value read */
|
||||
|
||||
llerr("%08x->%08x\n", addr, val);
|
||||
_llerr("%08x->%08x\n", addr, val);
|
||||
return val;
|
||||
}
|
||||
#endif
|
||||
@@ -586,7 +586,7 @@ static void lpc214x_putreg(uint32_t val, uint32_t addr)
|
||||
{
|
||||
/* Show the register value being written */
|
||||
|
||||
llerr("%08x<-%08x\n", addr, val);
|
||||
_llerr("%08x<-%08x\n", addr, val);
|
||||
|
||||
/* Write the value */
|
||||
|
||||
|
||||
@@ -490,7 +490,7 @@ struct i2c_master_s *lpc2378_i2cbus_initialize(int port)
|
||||
|
||||
if (port > 1)
|
||||
{
|
||||
err("lpc I2C Only support 0,1\n");
|
||||
_err("lpc I2C Only support 0,1\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -648,7 +648,7 @@ static int up_interrupt(int irq, void *context)
|
||||
/* Read the modem status register (MSR) to clear */
|
||||
|
||||
status = up_serialin(priv, UART_MSR_OFFSET);
|
||||
info("MSR: %02x\n", status);
|
||||
_info("MSR: %02x\n", status);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -659,7 +659,7 @@ static int up_interrupt(int irq, void *context)
|
||||
/* Read the line status register (LSR) to clear */
|
||||
|
||||
status = up_serialin(priv, UART_LSR_OFFSET);
|
||||
info("LSR: %02x\n", status);
|
||||
_info("LSR: %02x\n", status);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -667,7 +667,7 @@ static int up_interrupt(int irq, void *context)
|
||||
|
||||
default:
|
||||
{
|
||||
err("Unexpected IIR: %02x\n", status);
|
||||
_err("Unexpected IIR: %02x\n", status);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -826,7 +826,7 @@ static uint32_t lpc31_swap32(uint32_t value)
|
||||
static void lpc31_printreg(volatile uint32_t *regaddr, uint32_t regval,
|
||||
bool iswrite)
|
||||
{
|
||||
llerr("%08x%s%08x\n", (uintptr_t)regaddr, iswrite ? "<-" : "->", regval);
|
||||
_llerr("%08x%s%08x\n", (uintptr_t)regaddr, iswrite ? "<-" : "->", regval);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -877,7 +877,7 @@ static void lpc31_checkreg(volatile uint32_t *regaddr, uint32_t regval, bool isw
|
||||
{
|
||||
/* No.. More than one. */
|
||||
|
||||
llerr("[repeats %d more times]\n", count);
|
||||
_llerr("[repeats %d more times]\n", count);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -560,7 +560,7 @@ static int up_interrupt(int irq, void *context)
|
||||
|
||||
default:
|
||||
{
|
||||
err("Unexpected IIR: %02x\n", status);
|
||||
_err("Unexpected IIR: %02x\n", status);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -207,7 +207,7 @@ static bool spi_checkreg(bool wr, uint32_t value, uint32_t address)
|
||||
{
|
||||
if (g_ntimes > 0)
|
||||
{
|
||||
llerr("...[Repeats %d times]...\n", g_ntimes);
|
||||
_llerr("...[Repeats %d times]...\n", g_ntimes);
|
||||
}
|
||||
|
||||
g_wrlast = wr;
|
||||
@@ -239,7 +239,7 @@ static void spi_putreg(uint32_t value, uint32_t address)
|
||||
{
|
||||
if (spi_checkreg(true, value, address))
|
||||
{
|
||||
llerr("%08x<-%08x\n", address, value);
|
||||
_llerr("%08x<-%08x\n", address, value);
|
||||
}
|
||||
putreg32(value, address);
|
||||
}
|
||||
@@ -265,7 +265,7 @@ static uint32_t spi_getreg(uint32_t address)
|
||||
uint32_t value = getreg32(address);
|
||||
if (spi_checkreg(false, value, address))
|
||||
{
|
||||
llerr("%08x->%08x\n", address, value);
|
||||
_llerr("%08x->%08x\n", address, value);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
@@ -921,7 +921,7 @@ FAR struct spi_dev_s *lpc31_spibus_initialize(int port)
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_LPC31_SPI_REGDEBUG
|
||||
llerr("PINS: %08x MODE0: %08x MODE1: %08x\n",
|
||||
_llerr("PINS: %08x MODE0: %08x MODE1: %08x\n",
|
||||
spi_getreg(LPC31_IOCONFIG_SPI_PINS),
|
||||
spi_getreg(LPC31_IOCONFIG_SPI_MODE0),
|
||||
spi_getreg(LPC31_IOCONFIG_SPI_MODE1));
|
||||
|
||||
@@ -501,7 +501,7 @@ static uint32_t lpc31_getreg(uint32_t addr)
|
||||
{
|
||||
if (count == 4)
|
||||
{
|
||||
llerr("...\n");
|
||||
_llerr("...\n");
|
||||
}
|
||||
|
||||
return val;
|
||||
@@ -518,7 +518,7 @@ static uint32_t lpc31_getreg(uint32_t addr)
|
||||
{
|
||||
/* Yes.. then show how many times the value repeated */
|
||||
|
||||
llerr("[repeats %d more times]\n", count-3);
|
||||
_llerr("[repeats %d more times]\n", count-3);
|
||||
}
|
||||
|
||||
/* Save the new address, value, and count */
|
||||
@@ -530,7 +530,7 @@ static uint32_t lpc31_getreg(uint32_t addr)
|
||||
|
||||
/* Show the register value read */
|
||||
|
||||
llerr("%08x->%08x\n", addr, val);
|
||||
_llerr("%08x->%08x\n", addr, val);
|
||||
return val;
|
||||
}
|
||||
#endif
|
||||
@@ -548,7 +548,7 @@ static void lpc31_putreg(uint32_t val, uint32_t addr)
|
||||
{
|
||||
/* Show the register value being written */
|
||||
|
||||
llerr("%08x<-%08x\n", addr, val);
|
||||
_llerr("%08x<-%08x\n", addr, val);
|
||||
|
||||
/* Write the value */
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user