From c494454bc442a9d77ea4d80e9036a118a12df91f Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 13 Jun 2016 07:43:55 -0600 Subject: [PATCH] configs/: Change some *err() message to *info() messages if what was a *dbg() message does not indicate and error condition. --- configs/sam3u-ek/src/sam_lcd.c | 30 ++++++++++------- configs/sam3u-ek/src/sam_touchscreen.c | 6 ++-- configs/sam3u-ek/src/sam_usbdev.c | 2 +- configs/sam4e-ek/src/sam_ads7843e.c | 6 ++-- configs/sam4e-ek/src/sam_ethernet.c | 24 +++++++++----- configs/sam4e-ek/src/sam_hsmci.c | 4 +-- configs/sam4e-ek/src/sam_udp.c | 2 +- configs/sam4l-xplained/src/sam_mmcsd.c | 4 +-- .../sam4l-xplained/src/sam_ug2832hsweg04.c | 4 +-- configs/sam4s-xplained-pro/src/sam_hsmci.c | 6 ++-- configs/sam4s-xplained-pro/src/sam_tc.c | 16 +++++----- configs/sam4s-xplained-pro/src/sam_udp.c | 2 +- configs/sam4s-xplained-pro/src/sam_wdt.c | 12 +++---- configs/sama5d3-xplained/src/sam_adc.c | 2 +- configs/sama5d3-xplained/src/sam_ethernet.c | 32 ++++++++++++------- configs/sama5d3-xplained/src/sam_hsmci.c | 8 ++--- configs/sama5d3-xplained/src/sam_pwm.c | 4 +-- configs/sama5d3-xplained/src/sam_usb.c | 2 +- configs/sama5d3x-ek/src/sam_adc.c | 2 +- configs/sama5d3x-ek/src/sam_ethernet.c | 32 ++++++++++++------- configs/sama5d3x-ek/src/sam_hsmci.c | 8 ++--- configs/sama5d3x-ek/src/sam_pwm.c | 4 +-- configs/sama5d3x-ek/src/sam_touchscreen.c | 2 +- configs/sama5d3x-ek/src/sam_usb.c | 2 +- configs/sama5d3x-ek/src/sam_wm8904.c | 8 ++--- configs/sama5d4-ek/src/sam_adc.c | 2 +- configs/sama5d4-ek/src/sam_audio_null.c | 4 +-- configs/sama5d4-ek/src/sam_ethernet.c | 32 ++++++++++++------- configs/sama5d4-ek/src/sam_maxtouch.c | 4 +-- configs/sama5d4-ek/src/sam_pwm.c | 4 +-- configs/sama5d4-ek/src/sam_usb.c | 2 +- configs/sama5d4-ek/src/sam_wm8904.c | 8 ++--- configs/samd20-xplained/src/sam_mmcsd.c | 4 +-- .../samd20-xplained/src/sam_ug2832hsweg04.c | 4 +-- configs/samd21-xplained/src/sam_mmcsd.c | 4 +-- .../samd21-xplained/src/sam_ug2832hsweg04.c | 4 +-- configs/same70-xplained/src/sam_ethernet.c | 24 +++++++++----- configs/same70-xplained/src/sam_usbdev.c | 2 +- configs/saml21-xplained/src/sam_mmcsd.c | 4 +-- .../saml21-xplained/src/sam_ug2832hsweg04.c | 4 +-- configs/samv71-xult/src/sam_audio_null.c | 4 +-- configs/samv71-xult/src/sam_ethernet.c | 25 ++++++++++----- configs/samv71-xult/src/sam_ili9488.c | 2 +- configs/samv71-xult/src/sam_maxtouch.c | 4 +-- configs/samv71-xult/src/sam_usbdev.c | 2 +- configs/samv71-xult/src/sam_wm8904.c | 8 ++--- configs/shenzhou/src/stm32_adc.c | 2 +- configs/shenzhou/src/stm32_ili93xx.c | 22 ++++++------- configs/shenzhou/src/stm32_mmcsd.c | 4 +-- configs/shenzhou/src/stm32_spi.c | 8 ++--- configs/shenzhou/src/stm32_ssd1289.c | 14 ++++---- configs/shenzhou/src/stm32_touchscreen.c | 6 ++-- configs/shenzhou/src/stm32_usb.c | 2 +- configs/sim/src/sim_touchscreen.c | 12 +++---- configs/spark/src/stm32_spi.c | 6 ++-- configs/spark/src/stm32_usbdev.c | 4 +-- configs/spark/src/stm32_wireless.c | 6 ++-- configs/stm32f4discovery/src/stm32_ethernet.c | 8 +++++ 58 files changed, 264 insertions(+), 205 deletions(-) diff --git a/configs/sam3u-ek/src/sam_lcd.c b/configs/sam3u-ek/src/sam_lcd.c index f93e1e467f..c9e11964c5 100644 --- a/configs/sam3u-ek/src/sam_lcd.c +++ b/configs/sam3u-ek/src/sam_lcd.c @@ -160,16 +160,22 @@ /* Debug ******************************************************************************/ #ifdef CONFIG_LCD_REGDEBUG -# define regerr(format, ...) info(format, ##__VA_ARGS__) +# define regerr(format, ...) err(format, ##__VA_ARGS__) +# define regwarn(format, ...) warn(format, ##__VA_ARGS__) +# define reginfo(format, ...) info(format, ##__VA_ARGS__) #else # define regerr(x...) +# define regwarn(x...) +# define reginfo(x...) #endif #ifdef CONFIG_DEBUG_LCD # define lcderr(format, ...) err(format, ##__VA_ARGS__) +# define lcdwarn(format, ...) warn(format, ##__VA_ARGS__) # define lcdinfo(format, ...) info(format, ##__VA_ARGS__) #else # define lcderr(x...) +# define lcdwarn(x...) # define lcdinfo(x...) #endif @@ -438,7 +444,7 @@ static struct sam_dev_s g_lcddev_s = static void sam_putreg(uint16_t reg, uint16_t data) { - regerr("base: %08x RS: %04x data: %04x\n", LCD_BASE, LCD_BASE + HX843X_LCD_RS, data); + reginfo("base: %08x RS: %04x data: %04x\n", LCD_BASE, LCD_BASE + HX843X_LCD_RS, data); putreg16(reg, LCD_BASE); putreg16(data, LCD_BASE + HX843X_LCD_RS); } @@ -457,7 +463,7 @@ static uint16_t sam_getreg(uint16_t reg) uint16_t data; putreg16(reg, LCD_BASE); data = getreg16(LCD_BASE + HX843X_LCD_RS); - regerr("base: %08x RS: %04x data: %04x\n", LCD_BASE, LCD_BASE + HX843X_LCD_RS, data); + reginfo("base: %08x RS: %04x data: %04x\n", LCD_BASE, LCD_BASE + HX843X_LCD_RS, data); return data; } #endif @@ -586,7 +592,7 @@ static void sam_dumpreg(uint8_t startreg, uint8_t endreg) for (addr = startreg; addr <= endreg; addr++) { value = sam_getreg(addr); - lcderr(" %02x: %04x\n", addr, value); + lcdinfo(" %02x: %04x\n", addr, value); } } #endif @@ -912,7 +918,7 @@ int board_lcd_initialize(void) /* Enable SMC peripheral clock */ putreg32((1 << SAM_PID_SMC), SAM_PMC_PCER); - regerr("PMC PCSR: %08x SMC: %08x\n", getreg32(SAM_PMC_PCSR), (1 << SAM_PID_SMC)); + reginfo("PMC PCSR: %08x SMC: %08x\n", getreg32(SAM_PMC_PCSR), (1 << SAM_PID_SMC)); /* Configure SMC CS2 */ @@ -932,12 +938,12 @@ int board_lcd_initialize(void) regval |= (SMCCS_MODE_READMODE) | (SMCCS_MODE_WRITEMODE) | (SMCCS_MODE_DBW_16BITS); putreg32(regval, SAM_SMCCS_MODE(2)); - regerr("SMC SETUP[%08x]: %08x PULSE[%08x]: %08x\n", - SAM_SMCCS_SETUP(2), getreg32(SAM_SMCCS_SETUP(2)), - SAM_SMCCS_PULSE(2), getreg32(SAM_SMCCS_PULSE(2))); - regerr(" CYCLE[%08x]: %08x MODE[%08x]: %08x\n", - SAM_SMCCS_CYCLE(2), getreg32(SAM_SMCCS_CYCLE(2)), - SAM_SMCCS_MODE(2), getreg32(SAM_SMCCS_MODE(2))); + reginfo("SMC SETUP[%08x]: %08x PULSE[%08x]: %08x\n", + SAM_SMCCS_SETUP(2), getreg32(SAM_SMCCS_SETUP(2)), + SAM_SMCCS_PULSE(2), getreg32(SAM_SMCCS_PULSE(2))); + reginfo(" CYCLE[%08x]: %08x MODE[%08x]: %08x\n", + SAM_SMCCS_CYCLE(2), getreg32(SAM_SMCCS_CYCLE(2)), + SAM_SMCCS_MODE(2), getreg32(SAM_SMCCS_MODE(2))); /* Check HX8347 Chip ID */ @@ -946,7 +952,7 @@ int board_lcd_initialize(void) lcdinfo("Chip ID: %04x\n", hxregval); if (hxregval != HX8347_CHIPID) { - lcderr("Bad chip ID: %04x Expected: %04x\n", hxregval, HX8347_CHIPID); + lcderr("ERROR: Bad chip ID: %04x Expected: %04x\n", hxregval, HX8347_CHIPID); return -ENODEV; } #endif diff --git a/configs/sam3u-ek/src/sam_touchscreen.c b/configs/sam3u-ek/src/sam_touchscreen.c index 0c10f8ae1e..7dec7f8e7a 100644 --- a/configs/sam3u-ek/src/sam_touchscreen.c +++ b/configs/sam3u-ek/src/sam_touchscreen.c @@ -238,7 +238,7 @@ int board_tsc_setup(int minor) FAR struct spi_dev_s *dev; int ret; - ierr("minor %d\n", minor); + iinfo("minor %d\n", minor); DEBUGASSERT(minor == 0); /* Configure and enable the ADS7843E interrupt pin as an input */ @@ -255,7 +255,7 @@ int board_tsc_setup(int minor) dev = sam_spibus_initialize(TSC_CSNUM); if (!dev) { - ierr("Failed to initialize SPI chip select %d\n", TSC_CSNUM); + ierr("ERROR: Failed to initialize SPI chip select %d\n", TSC_CSNUM); return -ENODEV; } @@ -264,7 +264,7 @@ int board_tsc_setup(int minor) ret = ads7843e_register(dev, &g_tscinfo, CONFIG_ADS7843E_DEVMINOR); if (ret < 0) { - ierr("Failed to initialize SPI chip select %d\n", TSC_CSNUM); + ierr("ERROR: Failed to initialize SPI chip select %d\n", TSC_CSNUM); /* sam_spibus_uninitialize(dev); */ return -ENODEV; } diff --git a/configs/sam3u-ek/src/sam_usbdev.c b/configs/sam3u-ek/src/sam_usbdev.c index da36afc2da..ae3d3ba68e 100644 --- a/configs/sam3u-ek/src/sam_usbdev.c +++ b/configs/sam3u-ek/src/sam_usbdev.c @@ -75,5 +75,5 @@ void sam_usbsuspend(FAR struct usbdev_s *dev, bool resume) { - ullerr("resume: %d\n", resume); + ullinfo("resume: %d\n", resume); } diff --git a/configs/sam4e-ek/src/sam_ads7843e.c b/configs/sam4e-ek/src/sam_ads7843e.c index 01e35b06d9..d4b555aa44 100644 --- a/configs/sam4e-ek/src/sam_ads7843e.c +++ b/configs/sam4e-ek/src/sam_ads7843e.c @@ -235,7 +235,7 @@ int board_tsc_setup(int minor) FAR struct spi_dev_s *dev; int ret; - ierr("minor %d\n", minor); + iinfo("minor %d\n", minor); DEBUGASSERT(minor == 0); /* Configure and enable the ADS7843E interrupt pin as an input */ @@ -252,7 +252,7 @@ int board_tsc_setup(int minor) dev = sam_spibus_initialize(TSC_CSNUM); if (!dev) { - ierr("Failed to initialize SPI chip select %d\n", TSC_CSNUM); + ierr("ERROR: Failed to initialize SPI chip select %d\n", TSC_CSNUM); return -ENODEV; } @@ -261,7 +261,7 @@ int board_tsc_setup(int minor) ret = ads7843e_register(dev, &g_tscinfo, CONFIG_ADS7843E_DEVMINOR); if (ret < 0) { - ierr("Failed to initialize SPI chip select %d\n", TSC_CSNUM); + ierr("ERROR: Failed to initialize SPI chip select %d\n", TSC_CSNUM); /* sam_spibus_uninitialize(dev); */ return -ENODEV; } diff --git a/configs/sam4e-ek/src/sam_ethernet.c b/configs/sam4e-ek/src/sam_ethernet.c index f243414a50..b949658ada 100644 --- a/configs/sam4e-ek/src/sam_ethernet.c +++ b/configs/sam4e-ek/src/sam_ethernet.c @@ -75,10 +75,18 @@ #ifdef CONFIG_NETDEV_PHY_DEBUG # define phyerr err +# define phywarn warn +# define phyinfo info # define phyllerr llerr +# define phyllwarn llwarn +# define phyllinfo llinfo #else # define phyerr(x...) +# define phywarn(x...) +# define phyinfo(x...) # define phyllerr(x...) +# define phyllwarn(x...) +# define phyllinfo(x...) #endif /************************************************************************************ @@ -100,7 +108,7 @@ static xcpt_t g_emac_handler; #ifdef CONFIG_SAM34_GPIOD_IRQ static void sam_emac_phy_enable(bool enable) { - phyerr("IRQ%d: enable=%d\n", SAM_PHY_IRQ, enable); + phyinfo("IRQ%d: enable=%d\n", SAM_PHY_IRQ, enable); if (enable) { sam_gpioirqenable(SAM_PHY_IRQ); @@ -126,7 +134,7 @@ static void sam_emac_phy_enable(bool enable) void weak_function sam_netinitialize(void) { - phyerr("Configuring %08x\n", GPIO_PHY_IRQ); + phyinfo("Configuring %08x\n", GPIO_PHY_IRQ); sam_configgpio(GPIO_PHY_IRQ); } @@ -206,11 +214,11 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) DEBUGASSERT(intf); ninfo("%s: handler=%p\n", intf, handler); - phyerr("EMAC: devname=%s\n", SAM34_EMAC_DEVNAME); + phyinfo("EMAC: devname=%s\n", SAM34_EMAC_DEVNAME); if (strcmp(intf, SAM34_EMAC_DEVNAME) == 0) { - phyerr("Select EMAC\n"); + phyinfo("Select EMAC\n"); phandler = &g_emac_handler; pinset = GPIO_PHY_IRQ; irq = SAM_PHY_IRQ; @@ -218,7 +226,7 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) } else { - nerr("Unsupported interface: %s\n", intf); + nerr("ERROR: Unsupported interface: %s\n", intf); return NULL; } @@ -237,15 +245,15 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) if (handler) { - phyerr("Configure pin: %08x\n", pinset); + phyinfo("Configure pin: %08x\n", pinset); sam_gpioirq(pinset); - phyerr("Attach IRQ%d\n", irq); + phyinfo("Attach IRQ%d\n", irq); (void)irq_attach(irq, handler); } else { - phyerr("Detach IRQ%d\n", irq); + phyinfo("Detach IRQ%d\n", irq); (void)irq_detach(irq); enabler = NULL; } diff --git a/configs/sam4e-ek/src/sam_hsmci.c b/configs/sam4e-ek/src/sam_hsmci.c index d9d0d675ab..b10dc5c2fc 100644 --- a/configs/sam4e-ek/src/sam_hsmci.c +++ b/configs/sam4e-ek/src/sam_hsmci.c @@ -144,7 +144,7 @@ int sam_hsmci_initialize(int minor) g_hsmci.hsmci = sdio_initialize(0); if (!g_hsmci.hsmci) { - ferr("Failed to initialize SDIO\n"); + ferr("ERROR: Failed to initialize SDIO\n"); return -ENODEV; } @@ -153,7 +153,7 @@ int sam_hsmci_initialize(int minor) ret = mmcsd_slotinitialize(minor, g_hsmci.hsmci); if (ret != OK) { - ferr("Failed to bind SDIO to the MMC/SD driver: %d\n", ret); + ferr("ERROR: Failed to bind SDIO to the MMC/SD driver: %d\n", ret); return ret; } diff --git a/configs/sam4e-ek/src/sam_udp.c b/configs/sam4e-ek/src/sam_udp.c index 7ed32cb291..d275ffef74 100644 --- a/configs/sam4e-ek/src/sam_udp.c +++ b/configs/sam4e-ek/src/sam_udp.c @@ -83,5 +83,5 @@ void sam_udp_suspend(FAR struct usbdev_s *dev, bool resume) { - ullerr("resume: %d\n", resume); + ullinfo("resume: %d\n", resume); } diff --git a/configs/sam4l-xplained/src/sam_mmcsd.c b/configs/sam4l-xplained/src/sam_mmcsd.c index f4603d8107..4cd42ab6c2 100644 --- a/configs/sam4l-xplained/src/sam_mmcsd.c +++ b/configs/sam4l-xplained/src/sam_mmcsd.c @@ -99,7 +99,7 @@ int sam_sdinitialize(int minor) spi = sam_spibus_initialize(SD_CSNO); if (!spi) { - ferr("Failed to initialize SPI chip select %d\n", SD_CSNO); + ferr("ERROR: Failed to initialize SPI chip select %d\n", SD_CSNO); return -ENODEV; } @@ -113,7 +113,7 @@ int sam_sdinitialize(int minor) ret = mmcsd_spislotinitialize(minor, SAM34_MMCSDSLOTNO, spi); if (ret < 0) { - ferr("Failed to bind SPI chip select %d to MMC/SD slot %d: %d\n", + ferr("ERROR: Failed to bind SPI chip select %d to MMC/SD slot %d: %d\n", SD_CSNO, SAM34_MMCSDSLOTNO, ret); return ret; } diff --git a/configs/sam4l-xplained/src/sam_ug2832hsweg04.c b/configs/sam4l-xplained/src/sam_ug2832hsweg04.c index a6a7e9cfda..e2de87e24a 100644 --- a/configs/sam4l-xplained/src/sam_ug2832hsweg04.c +++ b/configs/sam4l-xplained/src/sam_ug2832hsweg04.c @@ -157,7 +157,7 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno) spi = sam_spibus_initialize(OLED_CSNO); if (!spi) { - lcderr("Failed to initialize SPI port 1\n"); + lcderr("ERROR: Failed to initialize SPI port 1\n"); } else { @@ -166,7 +166,7 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno) dev = ssd1306_initialize(spi, devno); if (!dev) { - lcderr("Failed to bind SPI port 1 to OLED %d: %d\n", devno); + lcderr("ERROR: Failed to bind SPI port 1 to OLED %d: %d\n", devno); } else { diff --git a/configs/sam4s-xplained-pro/src/sam_hsmci.c b/configs/sam4s-xplained-pro/src/sam_hsmci.c index d7404ddd37..d01a199815 100644 --- a/configs/sam4s-xplained-pro/src/sam_hsmci.c +++ b/configs/sam4s-xplained-pro/src/sam_hsmci.c @@ -135,7 +135,7 @@ static int sam_hsmci_cardetect_int(int irq, void *regs) int sam_hsmci_initialize(void) { int ret; - ferr("Initializing SDIO\n"); + finfo("Initializing SDIO\n"); /* Have we already initialized? */ @@ -147,7 +147,7 @@ int sam_hsmci_initialize(void) g_hsmci.hsmci = sdio_initialize(CONFIG_NSH_MMCSDSLOTNO); if (!g_hsmci.hsmci) { - ferr("Failed to initialize SDIO\n"); + ferr("ERROR: Failed to initialize SDIO\n"); return -ENODEV; } @@ -156,7 +156,7 @@ int sam_hsmci_initialize(void) ret = mmcsd_slotinitialize(CONFIG_NSH_MMCSDMINOR, g_hsmci.hsmci); if (ret != OK) { - ferr("Failed to bind SDIO to the MMC/SD driver: %d\n", ret); + ferr("ERROR: Failed to bind SDIO to the MMC/SD driver: %d\n", ret); return ret; } diff --git a/configs/sam4s-xplained-pro/src/sam_tc.c b/configs/sam4s-xplained-pro/src/sam_tc.c index ab036d212b..12b374a738 100644 --- a/configs/sam4s-xplained-pro/src/sam_tc.c +++ b/configs/sam4s-xplained-pro/src/sam_tc.c @@ -211,7 +211,7 @@ int sam_timerinitialize(void) fd = open(CONFIG_SAM4S_XPLAINED_PRO_SCHED_TIMER_DEVPATH, O_RDONLY); if (fd < 0) { - tcerr("open %s failed: %d\n", + tcerr("ERROR: open %s failed: %d\n", CONFIG_SAM4S_XPLAINED_PRO_SCHED_TIMER_DEVPATH, errno); goto errout; } @@ -222,7 +222,7 @@ int sam_timerinitialize(void) ret = ioctl(fd, TCIOC_SETTIMEOUT, (unsigned long)USEC_PER_TICK); if (ret < 0) { - tcerr("ioctl(TCIOC_SETTIMEOUT) failed: %d\n", errno); + tcerr("ERROR: ioctl(TCIOC_SETTIMEOUT) failed: %d\n", errno); goto errout_with_dev; } @@ -235,7 +235,7 @@ int sam_timerinitialize(void) ret = ioctl(fd, TCIOC_SETHANDLER, (unsigned long)&tccb); if (ret < 0) { - tcerr("ioctl(TCIOC_SETHANDLER) failed: %d\n", errno); + tcerr("ERROR: ioctl(TCIOC_SETHANDLER) failed: %d\n", errno); goto errout_with_dev; } } @@ -246,7 +246,7 @@ int sam_timerinitialize(void) ret = ioctl(fd, TCIOC_START, 0); if (ret < 0) { - tcerr("ioctl(TCIOC_START) failed: %d\n", errno); + tcerr("ERROR: ioctl(TCIOC_START) failed: %d\n", errno); goto errout_with_dev; } #endif @@ -259,7 +259,7 @@ int sam_timerinitialize(void) fd = open(CONFIG_SAM4S_XPLAINED_PRO_CPULOAD_TIMER_DEVPATH, O_RDONLY); if (fd < 0) { - tcerr("open %s failed: %d\n", + tcerr("ERROR: open %s failed: %d\n", CONFIG_SAM4S_XPLAINED_PRO_CPULOAD_TIMER_DEVPATH, errno); goto errout; } @@ -272,7 +272,7 @@ int sam_timerinitialize(void) (unsigned long)1000000 / CONFIG_SCHED_CPULOAD_TICKSPERSEC); if (ret < 0) { - tcerr("ioctl(TCIOC_SETTIMEOUT) failed: %d\n", errno); + tcerr("ERROR: ioctl(TCIOC_SETTIMEOUT) failed: %d\n", errno); goto errout_with_dev; } @@ -286,7 +286,7 @@ int sam_timerinitialize(void) ret = ioctl(fd, TCIOC_SETHANDLER, (unsigned long)&tccb); if (ret < 0) { - tcerr("ioctl(TCIOC_SETHANDLER) failed: %d\n", errno); + tcerr("ERROR: ioctl(TCIOC_SETHANDLER) failed: %d\n", errno); goto errout_with_dev; } } @@ -297,7 +297,7 @@ int sam_timerinitialize(void) ret = ioctl(fd, TCIOC_START, 0); if (ret < 0) { - tcerr("ioctl(TCIOC_START) failed: %d\n", errno); + tcerr("ERROR: ioctl(TCIOC_START) failed: %d\n", errno); goto errout_with_dev; } #endif diff --git a/configs/sam4s-xplained-pro/src/sam_udp.c b/configs/sam4s-xplained-pro/src/sam_udp.c index 6ea2507bec..2f83c9d12f 100644 --- a/configs/sam4s-xplained-pro/src/sam_udp.c +++ b/configs/sam4s-xplained-pro/src/sam_udp.c @@ -84,5 +84,5 @@ void sam_udp_suspend(FAR struct usbdev_s *dev, bool resume) { - ullerr("resume: %d\n", resume); + ullinfo("resume: %d\n", resume); } diff --git a/configs/sam4s-xplained-pro/src/sam_wdt.c b/configs/sam4s-xplained-pro/src/sam_wdt.c index 1229069905..5ad2a36255 100644 --- a/configs/sam4s-xplained-pro/src/sam_wdt.c +++ b/configs/sam4s-xplained-pro/src/sam_wdt.c @@ -128,7 +128,7 @@ static int wdog_daemon(int argc, char *argv[]) fd = open(CONFIG_WATCHDOG_DEVPATH, O_RDONLY); if (fd < 0) { - wdgerr("open %s failed: %d\n", CONFIG_WATCHDOG_DEVPATH, errno); + wdgerr("ERROR: open %s failed: %d\n", CONFIG_WATCHDOG_DEVPATH, errno); goto errout; } @@ -138,7 +138,7 @@ static int wdog_daemon(int argc, char *argv[]) ret = ioctl(fd, WDIOC_START, 0); if (ret < 0) { - wdgerr("ioctl(WDIOC_START) failed: %d\n", errno); + wdgerr("ERROR: ioctl(WDIOC_START) failed: %d\n", errno); goto errout_with_dev; } @@ -151,7 +151,7 @@ static int wdog_daemon(int argc, char *argv[]) ret = ioctl(fd, WDIOC_KEEPALIVE, 0); if (ret < 0) { - wdgerr("ioctl(WDIOC_KEEPALIVE) failed: %d\n", errno); + wdgerr("ERROR: ioctl(WDIOC_KEEPALIVE) failed: %d\n", errno); goto errout_with_dev; } } @@ -190,7 +190,7 @@ int sam_watchdog_initialize(void) fd = open(CONFIG_WATCHDOG_DEVPATH, O_RDONLY); if (fd < 0) { - wdgerr("open %s failed: %d\n", CONFIG_WATCHDOG_DEVPATH, errno); + wdgerr("ERROR: open %s failed: %d\n", CONFIG_WATCHDOG_DEVPATH, errno); goto errout; } @@ -200,7 +200,7 @@ int sam_watchdog_initialize(void) ret = ioctl(fd, WDIOC_SETTIMEOUT, (unsigned long)CONFIG_WDT_TIMEOUT); if (ret < 0) { - wdgerr("ioctl(WDIOC_SETTIMEOUT) failed: %d\n", errno); + wdgerr("ERROR: ioctl(WDIOC_SETTIMEOUT) failed: %d\n", errno); goto errout_with_dev; } @@ -210,7 +210,7 @@ int sam_watchdog_initialize(void) ret = ioctl(fd, WDIOC_MINTIME, (unsigned long)CONFIG_WDT_MINTIME); if (ret < 0) { - wdgerr("ioctl(WDIOC_MINTIME) failed: %d\n", errno); + wdgerr("ERROR: ioctl(WDIOC_MINTIME) failed: %d\n", errno); goto errout_with_dev; } diff --git a/configs/sama5d3-xplained/src/sam_adc.c b/configs/sama5d3-xplained/src/sam_adc.c index 876669ad56..797dbe182e 100644 --- a/configs/sama5d3-xplained/src/sam_adc.c +++ b/configs/sama5d3-xplained/src/sam_adc.c @@ -97,7 +97,7 @@ int board_adc_initialize(void) ret = adc_register("/dev/adc0", adc); if (ret < 0) { - aerr("adc_register failed: %d\n", ret); + aerr("ERROR: adc_register failed: %d\n", ret); return ret; } diff --git a/configs/sama5d3-xplained/src/sam_ethernet.c b/configs/sama5d3-xplained/src/sam_ethernet.c index d7a29ed54e..c6ef0d3f53 100644 --- a/configs/sama5d3-xplained/src/sam_ethernet.c +++ b/configs/sama5d3-xplained/src/sam_ethernet.c @@ -85,10 +85,18 @@ #ifdef CONFIG_NETDEV_PHY_DEBUG # define phyerr err +# define phywarn warn +# define phyinfo info # define phyllerr llerr +# define phyllwarn llwarn +# define phyllinfo llinfo #else # define phyerr(x...) +# define phywarn(x...) +# define phyinfo(x...) # define phyllerr(x...) +# define phyllwarn(x...) +# define phyllinfo(x...) #endif /************************************************************************************ @@ -116,7 +124,7 @@ static xcpt_t g_gmac_handler; #ifdef CONFIG_SAMA5_EMACA static void sam_emac_phy_enable(bool enable) { - phyerr("IRQ%d: enable=%d\n", IRQ_INT_ETH1, enable); + phyinfo("IRQ%d: enable=%d\n", IRQ_INT_ETH1, enable); if (enable) { sam_pioirqenable(IRQ_INT_ETH1); @@ -132,7 +140,7 @@ static void sam_emac_phy_enable(bool enable) #ifdef CONFIG_SAMA5_GMAC static void sam_gmac_phy_enable(bool enable) { - phyerr("IRQ%d: enable=%d\n", IRQ_INT_ETH0, enable); + phyinfo("IRQ%d: enable=%d\n", IRQ_INT_ETH0, enable); if (enable) { sam_pioirqenable(IRQ_INT_ETH0); @@ -179,7 +187,7 @@ void weak_function sam_netinitialize(void) * The KSZ8051 PHY interrupt is available on PE30 INT_ETH1 */ - phyerr("Configuring %08x\n", PIO_INT_ETH1); + phyinfo("Configuring %08x\n", PIO_INT_ETH1); sam_configpio(PIO_INT_ETH1); #endif @@ -196,7 +204,7 @@ void weak_function sam_netinitialize(void) * The KSZ9021/31 interrupt is available on PB35 INT_GETH0 */ - phyerr("Configuring %08x\n", PIO_INT_ETH0); + phyinfo("Configuring %08x\n", PIO_INT_ETH0); sam_configpio(PIO_INT_ETH0); #endif } @@ -278,16 +286,16 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) ninfo("%s: handler=%p\n", intf, handler); #ifdef CONFIG_SAMA5_EMACA - phyerr("EMAC: devname=%s\n", SAMA5_EMAC_DEVNAME); + phyinfo("EMAC: devname=%s\n", SAMA5_EMAC_DEVNAME); #endif #ifdef CONFIG_SAMA5_GMAC - phyerr("GMAC: devname=%s\n", SAMA5_GMAC_DEVNAME); + phyinfo("GMAC: devname=%s\n", SAMA5_GMAC_DEVNAME); #endif #ifdef CONFIG_SAMA5_EMACA if (strcmp(intf, SAMA5_EMAC_DEVNAME) == 0) { - phyerr("Select EMAC\n"); + phyinfo("Select EMAC\n"); phandler = &g_emac_handler; pinset = PIO_INT_ETH1; irq = IRQ_INT_ETH1; @@ -298,7 +306,7 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) #ifdef CONFIG_SAMA5_GMAC if (strcmp(intf, SAMA5_GMAC_DEVNAME) == 0) { - phyerr("Select GMAC\n"); + phyinfo("Select GMAC\n"); phandler = &g_gmac_handler; pinset = PIO_INT_ETH0; irq = IRQ_INT_ETH0; @@ -307,7 +315,7 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) else #endif { - nerr("Unsupported interface: %s\n", intf); + nerr("ERROR: Unsupported interface: %s\n", intf); return NULL; } @@ -326,15 +334,15 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) if (handler) { - phyerr("Configure pin: %08x\n", pinset); + phyinfo("Configure pin: %08x\n", pinset); sam_pioirq(pinset); - phyerr("Attach IRQ%d\n", irq); + phyinfo("Attach IRQ%d\n", irq); (void)irq_attach(irq, handler); } else { - phyerr("Detach IRQ%d\n", irq); + phyinfo("Detach IRQ%d\n", irq); (void)irq_detach(irq); enabler = NULL; } diff --git a/configs/sama5d3-xplained/src/sam_hsmci.c b/configs/sama5d3-xplained/src/sam_hsmci.c index a3416189fb..cbb8e3b654 100644 --- a/configs/sama5d3-xplained/src/sam_hsmci.c +++ b/configs/sama5d3-xplained/src/sam_hsmci.c @@ -257,7 +257,7 @@ int sam_hsmci_initialize(int slotno, int minor) state = sam_hsmci_state(slotno); if (!state) { - ferr("No state for slotno %d\n", slotno); + ferr("ERROR: No state for slotno %d\n", slotno); return -EINVAL; } @@ -271,7 +271,7 @@ int sam_hsmci_initialize(int slotno, int minor) state->hsmci = sdio_initialize(slotno); if (!state->hsmci) { - ferr("Failed to initialize SDIO slot %d\n", slotno); + ferr("ERROR: Failed to initialize SDIO slot %d\n", slotno); return -ENODEV; } @@ -280,7 +280,7 @@ int sam_hsmci_initialize(int slotno, int minor) ret = mmcsd_slotinitialize(minor, state->hsmci); if (ret != OK) { - ferr("Failed to bind SDIO to the MMC/SD driver: %d\n", ret); + ferr("ERROR: Failed to bind SDIO to the MMC/SD driver: %d\n", ret); return ret; } @@ -317,7 +317,7 @@ bool sam_cardinserted(int slotno) state = sam_hsmci_state(slotno); if (!state) { - ferr("No state for slotno %d\n", slotno); + ferr("ERROR: No state for slotno %d\n", slotno); return false; } diff --git a/configs/sama5d3-xplained/src/sam_pwm.c b/configs/sama5d3-xplained/src/sam_pwm.c index 15be11b576..cd78ff2338 100644 --- a/configs/sama5d3-xplained/src/sam_pwm.c +++ b/configs/sama5d3-xplained/src/sam_pwm.c @@ -139,7 +139,7 @@ int board_pwm_setup(void) pwm = sam_pwminitialize(CONFIG_SAMA5D3XPLAINED_CHANNEL); if (!pwm) { - err("Failed to get the SAMA5 PWM lower half\n"); + err("ERROR: Failed to get the SAMA5 PWM lower half\n"); return -ENODEV; } @@ -148,7 +148,7 @@ int board_pwm_setup(void) ret = pwm_register("/dev/pwm0", pwm); if (ret < 0) { - aerr("pwm_register failed: %d\n", ret); + aerr("ERROR: pwm_register failed: %d\n", ret); return ret; } diff --git a/configs/sama5d3-xplained/src/sam_usb.c b/configs/sama5d3-xplained/src/sam_usb.c index a12e09f31b..98aafc0dbb 100644 --- a/configs/sama5d3-xplained/src/sam_usb.c +++ b/configs/sama5d3-xplained/src/sam_usb.c @@ -546,7 +546,7 @@ xcpt_t sam_setup_overcurrent(xcpt_t handler) #ifdef CONFIG_USBDEV void sam_usbsuspend(FAR struct usbdev_s *dev, bool resume) { - ullerr("resume: %d\n", resume); + ullinfo("resume: %d\n", resume); } #endif diff --git a/configs/sama5d3x-ek/src/sam_adc.c b/configs/sama5d3x-ek/src/sam_adc.c index 2c9c5e974f..2600ffd098 100644 --- a/configs/sama5d3x-ek/src/sam_adc.c +++ b/configs/sama5d3x-ek/src/sam_adc.c @@ -101,7 +101,7 @@ int board_adc_setup(void) ret = adc_register("/dev/adc0", adc); if (ret < 0) { - aerr("adc_register failed: %d\n", ret); + aerr("ERROR: adc_register failed: %d\n", ret); return ret; } diff --git a/configs/sama5d3x-ek/src/sam_ethernet.c b/configs/sama5d3x-ek/src/sam_ethernet.c index 4285577a03..ec7a9a21c6 100644 --- a/configs/sama5d3x-ek/src/sam_ethernet.c +++ b/configs/sama5d3x-ek/src/sam_ethernet.c @@ -85,10 +85,18 @@ #ifdef CONFIG_NETDEV_PHY_DEBUG # define phyerr err +# define phywarn warn +# define phyinfo info # define phyllerr llerr +# define phyllwarn llwarn +# define phyllinfo llinfo #else # define phyerr(x...) +# define phywarn(x...) +# define phyinfo(x...) # define phyllerr(x...) +# define phyllwarn(x...) +# define phyllinfo(x...) #endif /************************************************************************************ @@ -116,7 +124,7 @@ static xcpt_t g_gmac_handler; #ifdef CONFIG_SAMA5_EMACA static void sam_emac_phy_enable(bool enable) { - phyerr("IRQ%d: enable=%d\n", IRQ_INT_ETH1, enable); + phyinfo("IRQ%d: enable=%d\n", IRQ_INT_ETH1, enable); if (enable) { sam_pioirqenable(IRQ_INT_ETH1); @@ -132,7 +140,7 @@ static void sam_emac_phy_enable(bool enable) #ifdef CONFIG_SAMA5_GMAC static void sam_gmac_phy_enable(bool enable) { - phyerr("IRQ%d: enable=%d\n", IRQ_INT_ETH0, enable); + phyinfo("IRQ%d: enable=%d\n", IRQ_INT_ETH0, enable); if (enable) { sam_pioirqenable(IRQ_INT_ETH0); @@ -179,7 +187,7 @@ void weak_function sam_netinitialize(void) * The KSZ8051 PHY interrupt is available on PE30 INT_ETH1 */ - phyerr("Configuring %08x\n", PIO_INT_ETH1); + phyinfo("Configuring %08x\n", PIO_INT_ETH1); sam_configpio(PIO_INT_ETH1); #endif @@ -196,7 +204,7 @@ void weak_function sam_netinitialize(void) * The KSZ9021/31 interrupt is available on PB35 INT_GETH0 */ - phyerr("Configuring %08x\n", PIO_INT_ETH0); + phyinfo("Configuring %08x\n", PIO_INT_ETH0); sam_configpio(PIO_INT_ETH0); #endif } @@ -278,16 +286,16 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) ninfo("%s: handler=%p\n", intf, handler); #ifdef CONFIG_SAMA5_EMACA - phyerr("EMAC: devname=%s\n", SAMA5_EMAC_DEVNAME); + phyinfo("EMAC: devname=%s\n", SAMA5_EMAC_DEVNAME); #endif #ifdef CONFIG_SAMA5_GMAC - phyerr("GMAC: devname=%s\n", SAMA5_GMAC_DEVNAME); + phyinfo("GMAC: devname=%s\n", SAMA5_GMAC_DEVNAME); #endif #ifdef CONFIG_SAMA5_EMACA if (strcmp(intf, SAMA5_EMAC_DEVNAME) == 0) { - phyerr("Select EMAC\n"); + phyinfo("Select EMAC\n"); phandler = &g_emac_handler; pinset = PIO_INT_ETH1; irq = IRQ_INT_ETH1; @@ -298,7 +306,7 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) #ifdef CONFIG_SAMA5_GMAC if (strcmp(intf, SAMA5_GMAC_DEVNAME) == 0) { - phyerr("Select GMAC\n"); + phyinfo("Select GMAC\n"); phandler = &g_gmac_handler; pinset = PIO_INT_ETH0; irq = IRQ_INT_ETH0; @@ -307,7 +315,7 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) else #endif { - nerr("Unsupported interface: %s\n", intf); + nerr("ERROR: Unsupported interface: %s\n", intf); return NULL; } @@ -326,15 +334,15 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) if (handler) { - phyerr("Configure pin: %08x\n", pinset); + phyinfo("Configure pin: %08x\n", pinset); sam_pioirq(pinset); - phyerr("Attach IRQ%d\n", irq); + phyinfo("Attach IRQ%d\n", irq); (void)irq_attach(irq, handler); } else { - phyerr("Detach IRQ%d\n", irq); + phyinfo("Detach IRQ%d\n", irq); (void)irq_detach(irq); enabler = NULL; } diff --git a/configs/sama5d3x-ek/src/sam_hsmci.c b/configs/sama5d3x-ek/src/sam_hsmci.c index 5976b2ca3e..8cbcfa4e40 100644 --- a/configs/sama5d3x-ek/src/sam_hsmci.c +++ b/configs/sama5d3x-ek/src/sam_hsmci.c @@ -257,7 +257,7 @@ int sam_hsmci_initialize(int slotno, int minor) state = sam_hsmci_state(slotno); if (!state) { - ferr("No state for slotno %d\n", slotno); + ferr("ERROR: No state for slotno %d\n", slotno); return -EINVAL; } @@ -271,7 +271,7 @@ int sam_hsmci_initialize(int slotno, int minor) state->hsmci = sdio_initialize(slotno); if (!state->hsmci) { - ferr("Failed to initialize SDIO slot %d\n", slotno); + ferr("ERROR: Failed to initialize SDIO slot %d\n", slotno); return -ENODEV; } @@ -280,7 +280,7 @@ int sam_hsmci_initialize(int slotno, int minor) ret = mmcsd_slotinitialize(minor, state->hsmci); if (ret != OK) { - ferr("Failed to bind SDIO to the MMC/SD driver: %d\n", ret); + ferr("ERROR: Failed to bind SDIO to the MMC/SD driver: %d\n", ret); return ret; } @@ -317,7 +317,7 @@ bool sam_cardinserted(int slotno) state = sam_hsmci_state(slotno); if (!state) { - ferr("No state for slotno %d\n", slotno); + ferr("ERROR: No state for slotno %d\n", slotno); return false; } diff --git a/configs/sama5d3x-ek/src/sam_pwm.c b/configs/sama5d3x-ek/src/sam_pwm.c index 6bafa8c2db..26d14ce4dc 100644 --- a/configs/sama5d3x-ek/src/sam_pwm.c +++ b/configs/sama5d3x-ek/src/sam_pwm.c @@ -139,7 +139,7 @@ int board_pwm_setup(void) pwm = sam_pwminitialize(CONFIG_SAMA5D3xEK_CHANNEL); if (!pwm) { - err("Failed to get the SAMA5 PWM lower half\n"); + err("ERROR: Failed to get the SAMA5 PWM lower half\n"); return -ENODEV; } @@ -148,7 +148,7 @@ int board_pwm_setup(void) ret = pwm_register("/dev/pwm0", pwm); if (ret < 0) { - aerr("pwm_register failed: %d\n", ret); + aerr("ERROR: pwm_register failed: %d\n", ret); return ret; } diff --git a/configs/sama5d3x-ek/src/sam_touchscreen.c b/configs/sama5d3x-ek/src/sam_touchscreen.c index 2b03f01cb1..ba5126643a 100644 --- a/configs/sama5d3x-ek/src/sam_touchscreen.c +++ b/configs/sama5d3x-ek/src/sam_touchscreen.c @@ -108,7 +108,7 @@ int board_tsc_setup(int minor) static bool initialized = false; int ret; - ierr("initialized:%d minor:%d\n", initialized, minor); + iinfo("initialized:%d minor:%d\n", initialized, minor); DEBUGASSERT(minor == 0); /* Since there is no uninitialized logic, this initialization can be diff --git a/configs/sama5d3x-ek/src/sam_usb.c b/configs/sama5d3x-ek/src/sam_usb.c index 91b5cfbf9c..e8d7c5c705 100644 --- a/configs/sama5d3x-ek/src/sam_usb.c +++ b/configs/sama5d3x-ek/src/sam_usb.c @@ -538,7 +538,7 @@ xcpt_t sam_setup_overcurrent(xcpt_t handler) #ifdef CONFIG_USBDEV void sam_usbsuspend(FAR struct usbdev_s *dev, bool resume) { - ullerr("resume: %d\n", resume); + ullinfo("resume: %d\n", resume); } #endif diff --git a/configs/sama5d3x-ek/src/sam_wm8904.c b/configs/sama5d3x-ek/src/sam_wm8904.c index 4df81d2178..7727afcd35 100644 --- a/configs/sama5d3x-ek/src/sam_wm8904.c +++ b/configs/sama5d3x-ek/src/sam_wm8904.c @@ -253,7 +253,7 @@ int sam_wm8904_initialize(int minor) char devname[12]; int ret; - auderr("minor %d\n", minor); + audinfo("minor %d\n", minor); DEBUGASSERT(minor >= 0 && minor <= 25); /* Have we already initialized? Since we never uninitialize we must prevent @@ -273,7 +273,7 @@ int sam_wm8904_initialize(int minor) i2c = sam_i2cbus_initialize(WM8904_TWI_BUS); if (!i2c) { - auderr("Failed to initialize TWI%d\n", WM8904_TWI_BUS); + auderr("ERROR: Failed to initialize TWI%d\n", WM8904_TWI_BUS); ret = -ENODEV; goto errout; } @@ -283,7 +283,7 @@ int sam_wm8904_initialize(int minor) i2s = sam_ssc_initialize(WM8904_SSC_BUS); if (!i2s) { - auderr("Failed to initialize SSC%d\n", WM8904_SSC_BUS); + auderr("ERROR: Failed to initialize SSC%d\n", WM8904_SSC_BUS); ret = -ENODEV; goto errout_with_i2c; } @@ -325,7 +325,7 @@ int sam_wm8904_initialize(int minor) wm8904 = wm8904_initialize(i2c, i2s, &g_wm8904info.lower); if (!wm8904) { - auderr("Failed to initialize the WM8904\n"); + auderr("ERROR: Failed to initialize the WM8904\n"); ret = -ENODEV; goto errout_with_irq; } diff --git a/configs/sama5d4-ek/src/sam_adc.c b/configs/sama5d4-ek/src/sam_adc.c index 7615553455..762caccd20 100644 --- a/configs/sama5d4-ek/src/sam_adc.c +++ b/configs/sama5d4-ek/src/sam_adc.c @@ -100,7 +100,7 @@ int board_adc_setup(void) ret = adc_register("/dev/adc0", adc); if (ret < 0) { - aerr("adc_register failed: %d\n", ret); + aerr("ERROR: adc_register failed: %d\n", ret); return ret; } diff --git a/configs/sama5d4-ek/src/sam_audio_null.c b/configs/sama5d4-ek/src/sam_audio_null.c index f5bf2c5980..2777298deb 100644 --- a/configs/sama5d4-ek/src/sam_audio_null.c +++ b/configs/sama5d4-ek/src/sam_audio_null.c @@ -100,7 +100,7 @@ int sam_audio_null_initialize(int minor) char devname[12]; int ret; - auderr("minor %d\n", minor); + audinfo("minor %d\n", minor); DEBUGASSERT(minor >= 0 && minor <= 25); /* Have we already initialized? Since we never uninitialize we must prevent @@ -117,7 +117,7 @@ int sam_audio_null_initialize(int minor) nullaudio = audio_null_initialize(); if (!nullaudio) { - auderr("Failed to get the NULL audio interface\n"); + auderr("ERROR: Failed to get the NULL audio interface\n"); ret = -ENODEV; goto errout; } diff --git a/configs/sama5d4-ek/src/sam_ethernet.c b/configs/sama5d4-ek/src/sam_ethernet.c index 25cf9813b2..952d60771a 100644 --- a/configs/sama5d4-ek/src/sam_ethernet.c +++ b/configs/sama5d4-ek/src/sam_ethernet.c @@ -85,10 +85,18 @@ #ifdef CONFIG_NETDEV_PHY_DEBUG # define phyerr err +# define phywarn warn +# define phyinfo info # define phyllerr llerr +# define phyllwarn llwarn +# define phyllinfo llinfo #else # define phyerr(x...) +# define phywarn(x...) +# define phyinfo(x...) # define phyllerr(x...) +# define phyllwarn(x...) +# define phyllinfo(x...) #endif /************************************************************************************ @@ -116,7 +124,7 @@ static xcpt_t g_emac1_handler; #ifdef CONFIG_SAMA5_EMAC0 static void sam_emac0_phy_enable(bool enable) { - phyerr("IRQ%d: enable=%d\n", IRQ_INT_ETH0, enable); + phyinfo("IRQ%d: enable=%d\n", IRQ_INT_ETH0, enable); if (enable) { sam_pioirqenable(IRQ_INT_ETH0); @@ -132,7 +140,7 @@ static void sam_emac0_phy_enable(bool enable) #ifdef CONFIG_SAMA5_EMAC1 static void sam_emac1_phy_enable(bool enable) { - phyerr("IRQ%d: enable=%d\n", IRQ_INT_ETH1, enable); + phyinfo("IRQ%d: enable=%d\n", IRQ_INT_ETH1, enable); if (enable) { sam_pioirqenable(IRQ_INT_ETH1); @@ -160,12 +168,12 @@ static void sam_emac1_phy_enable(bool enable) void weak_function sam_netinitialize(void) { #ifdef CONFIG_SAMA5_EMAC0 - phyerr("Configuring %08x\n", PIO_INT_ETH0); + phyinfo("Configuring %08x\n", PIO_INT_ETH0); sam_configpio(PIO_INT_ETH0); #endif #ifdef CONFIG_SAMA5_EMAC1 - phyerr("Configuring %08x\n", PIO_INT_ETH1); + phyinfo("Configuring %08x\n", PIO_INT_ETH1); sam_configpio(PIO_INT_ETH1); #endif } @@ -247,16 +255,16 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) ninfo("%s: handler=%p\n", intf, handler); #ifdef CONFIG_SAMA5_EMAC0 - phyerr("EMAC0: devname=%s\n", SAMA5_EMAC0_DEVNAME); + phyinfo("EMAC0: devname=%s\n", SAMA5_EMAC0_DEVNAME); #endif #ifdef CONFIG_SAMA5_EMAC1 - phyerr("EMAC1: devname=%s\n", SAMA5_EMAC1_DEVNAME); + phyinfo("EMAC1: devname=%s\n", SAMA5_EMAC1_DEVNAME); #endif #ifdef CONFIG_SAMA5_EMAC0 if (strcmp(intf, SAMA5_EMAC0_DEVNAME) == 0) { - phyerr("Select EMAC0\n"); + phyinfo("Select EMAC0\n"); phandler = &g_emac0_handler; pinset = PIO_INT_ETH0; irq = IRQ_INT_ETH0; @@ -267,7 +275,7 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) #ifdef CONFIG_SAMA5_EMAC1 if (strcmp(intf, SAMA5_EMAC1_DEVNAME) == 0) { - phyerr("Select EMAC1\n"); + phyinfo("Select EMAC1\n"); phandler = &g_emac1_handler; pinset = PIO_INT_ETH1; irq = IRQ_INT_ETH1; @@ -276,7 +284,7 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) else #endif { - nerr("Unsupported interface: %s\n", intf); + nerr("ERROR: Unsupported interface: %s\n", intf); return NULL; } @@ -295,15 +303,15 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) if (handler) { - phyerr("Configure pin: %08x\n", pinset); + phyinfo("Configure pin: %08x\n", pinset); sam_pioirq(pinset); - phyerr("Attach IRQ%d\n", irq); + phyinfo("Attach IRQ%d\n", irq); (void)irq_attach(irq, handler); } else { - phyerr("Detach IRQ%d\n", irq); + phyinfo("Detach IRQ%d\n", irq); (void)irq_detach(irq); enabler = NULL; } diff --git a/configs/sama5d4-ek/src/sam_maxtouch.c b/configs/sama5d4-ek/src/sam_maxtouch.c index 1129ba4c4b..adc98320ad 100644 --- a/configs/sama5d4-ek/src/sam_maxtouch.c +++ b/configs/sama5d4-ek/src/sam_maxtouch.c @@ -242,7 +242,7 @@ int board_tsc_setup(int minor) static bool initialized = false; int ret; - ierr("minor %d\n", minor); + iinfo("minor %d\n", minor); DEBUGASSERT(minor == 0); /* Have we already initialized? Since we never uninitialize we must prevent @@ -262,7 +262,7 @@ int board_tsc_setup(int minor) i2c = sam_i2cbus_initialize(MXT_TWI_BUS); if (!i2c) { - ierr("Failed to initialize I2C%d\n", MXT_TWI_BUS); + ierr("ERROR: Failed to initialize I2C%d\n", MXT_TWI_BUS); return -ENODEV; } diff --git a/configs/sama5d4-ek/src/sam_pwm.c b/configs/sama5d4-ek/src/sam_pwm.c index 10496a6cd9..5e74de17f1 100644 --- a/configs/sama5d4-ek/src/sam_pwm.c +++ b/configs/sama5d4-ek/src/sam_pwm.c @@ -139,7 +139,7 @@ int board_pwm_setup(void) pwm = sam_pwminitialize(CONFIG_SAMA5D4EK_CHANNEL); if (!pwm) { - err("Failed to get the SAMA5 PWM lower half\n"); + err("ERROR: Failed to get the SAMA5 PWM lower half\n"); return -ENODEV; } @@ -148,7 +148,7 @@ int board_pwm_setup(void) ret = pwm_register("/dev/pwm0", pwm); if (ret < 0) { - aerr("pwm_register failed: %d\n", ret); + aerr("ERROR: pwm_register failed: %d\n", ret); return ret; } diff --git a/configs/sama5d4-ek/src/sam_usb.c b/configs/sama5d4-ek/src/sam_usb.c index f2009f6361..3b9bbc407c 100644 --- a/configs/sama5d4-ek/src/sam_usb.c +++ b/configs/sama5d4-ek/src/sam_usb.c @@ -539,7 +539,7 @@ xcpt_t sam_setup_overcurrent(xcpt_t handler) #ifdef CONFIG_USBDEV void sam_usbsuspend(FAR struct usbdev_s *dev, bool resume) { - ullerr("resume: %d\n", resume); + ullinfo("resume: %d\n", resume); } #endif diff --git a/configs/sama5d4-ek/src/sam_wm8904.c b/configs/sama5d4-ek/src/sam_wm8904.c index 17c50ffc4d..7afb4b85af 100644 --- a/configs/sama5d4-ek/src/sam_wm8904.c +++ b/configs/sama5d4-ek/src/sam_wm8904.c @@ -253,7 +253,7 @@ int sam_wm8904_initialize(int minor) char devname[12]; int ret; - auderr("minor %d\n", minor); + audinfo("minor %d\n", minor); DEBUGASSERT(minor >= 0 && minor <= 25); /* Have we already initialized? Since we never uninitialize we must prevent @@ -273,7 +273,7 @@ int sam_wm8904_initialize(int minor) i2c = sam_i2cbus_initialize(WM8904_TWI_BUS); if (!i2c) { - auderr("Failed to initialize TWI%d\n", WM8904_TWI_BUS); + auderr("ERROR: Failed to initialize TWI%d\n", WM8904_TWI_BUS); ret = -ENODEV; goto errout; } @@ -283,7 +283,7 @@ int sam_wm8904_initialize(int minor) i2s = sam_ssc_initialize(WM8904_SSC_BUS); if (!i2s) { - auderr("Failed to initialize SSC%d\n", WM8904_SSC_BUS); + auderr("ERROR: Failed to initialize SSC%d\n", WM8904_SSC_BUS); ret = -ENODEV; goto errout_with_i2c; } @@ -325,7 +325,7 @@ int sam_wm8904_initialize(int minor) wm8904 = wm8904_initialize(i2c, i2s, &g_wm8904info.lower); if (!wm8904) { - auderr("Failed to initialize the WM8904\n"); + auderr("ERROR: Failed to initialize the WM8904\n"); ret = -ENODEV; goto errout_with_irq; } diff --git a/configs/samd20-xplained/src/sam_mmcsd.c b/configs/samd20-xplained/src/sam_mmcsd.c index 1cfe12e2ec..1470db2a1a 100644 --- a/configs/samd20-xplained/src/sam_mmcsd.c +++ b/configs/samd20-xplained/src/sam_mmcsd.c @@ -100,7 +100,7 @@ int sam_sdinitialize(int port, int minor) spi = sam_spibus_initialize(port); if (!spi) { - ferr("Failed to initialize SPI%d\n", port); + ferr("ERROR: Failed to initialize SPI%d\n", port); return -ENODEV; } @@ -113,7 +113,7 @@ int sam_sdinitialize(int port, int minor) ret = mmcsd_spislotinitialize(minor, SAMDL_MMCSDSLOTNO, spi); if (ret < 0) { - ferr("Failed to bind SPI%d to MMC/SD slot %d: %d\n", + ferr("ERROR: Failed to bind SPI%d to MMC/SD slot %d: %d\n", port, SAMDL_MMCSDSLOTNO, ret); return ret; } diff --git a/configs/samd20-xplained/src/sam_ug2832hsweg04.c b/configs/samd20-xplained/src/sam_ug2832hsweg04.c index 900f6fb0db..2728353e9f 100644 --- a/configs/samd20-xplained/src/sam_ug2832hsweg04.c +++ b/configs/samd20-xplained/src/sam_ug2832hsweg04.c @@ -187,7 +187,7 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno) spi = sam_spibus_initialize(OLED_CSNO); if (!spi) { - lcderr("Failed to initialize SPI port 1\n"); + lcderr("ERROR: Failed to initialize SPI port 1\n"); } else { @@ -196,7 +196,7 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno) dev = ssd1306_initialize(spi, devno); if (!dev) { - lcderr("Failed to bind SPI port 1 to OLED %d: %d\n", devno); + lcderr("ERROR: Failed to bind SPI port 1 to OLED %d: %d\n", devno); } else { diff --git a/configs/samd21-xplained/src/sam_mmcsd.c b/configs/samd21-xplained/src/sam_mmcsd.c index 1b828aea17..caa2c32a23 100644 --- a/configs/samd21-xplained/src/sam_mmcsd.c +++ b/configs/samd21-xplained/src/sam_mmcsd.c @@ -100,7 +100,7 @@ int sam_sdinitialize(int port, int minor) spi = sam_spibus_initialize(port); if (!spi) { - ferr("Failed to initialize SPI%d\n", port); + ferr("ERROR: Failed to initialize SPI%d\n", port); return -ENODEV; } @@ -113,7 +113,7 @@ int sam_sdinitialize(int port, int minor) ret = mmcsd_spislotinitialize(minor, SAMDL_MMCSDSLOTNO, spi); if (ret < 0) { - ferr("Failed to bind SPI%d to MMC/SD slot %d: %d\n", + ferr("ERROR: Failed to bind SPI%d to MMC/SD slot %d: %d\n", port, SAMDL_MMCSDSLOTNO, ret); return ret; } diff --git a/configs/samd21-xplained/src/sam_ug2832hsweg04.c b/configs/samd21-xplained/src/sam_ug2832hsweg04.c index 6ecd3320cf..35999d286d 100644 --- a/configs/samd21-xplained/src/sam_ug2832hsweg04.c +++ b/configs/samd21-xplained/src/sam_ug2832hsweg04.c @@ -187,7 +187,7 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno) spi = sam_spibus_initialize(OLED_CSNO); if (!spi) { - lcderr("Failed to initialize SPI port 1\n"); + lcderr("ERROR: Failed to initialize SPI port 1\n"); } else { @@ -196,7 +196,7 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno) dev = ssd1306_initialize(spi, devno); if (!dev) { - lcderr("Failed to bind SPI port 1 to OLED %d: %d\n", devno); + lcderr("ERROR: Failed to bind SPI port 1 to OLED %d: %d\n", devno); } else { diff --git a/configs/same70-xplained/src/sam_ethernet.c b/configs/same70-xplained/src/sam_ethernet.c index 4f4492692b..ca56f783d6 100644 --- a/configs/same70-xplained/src/sam_ethernet.c +++ b/configs/same70-xplained/src/sam_ethernet.c @@ -81,10 +81,18 @@ #ifdef CONFIG_NETDEV_PHY_DEBUG # define phyerr err +# define phywarn warn +# define phyinfo info # define phyllerr llerr +# define phyllwarn llwarn +# define phyllinfo llinfo #else # define phyerr(x...) +# define phywarn(x...) +# define phyinfo(x...) # define phyllerr(x...) +# define phyllwarn(x...) +# define phyllinfo(x...) #endif /************************************************************************************ @@ -106,7 +114,7 @@ static xcpt_t g_emac0_handler; #ifdef CONFIG_SAMV7_GPIOA_IRQ static void sam_emac0_phy_enable(bool enable) { - phyerr("IRQ%d: enable=%d\n", IRQ_EMAC0_INT, enable); + phyinfo("IRQ%d: enable=%d\n", IRQ_EMAC0_INT, enable); if (enable) { sam_gpioirqenable(IRQ_EMAC0_INT); @@ -134,7 +142,7 @@ void weak_function sam_netinitialize(void) { /* Configure the PHY interrupt GPIO */ - phyerr("Configuring %08x\n", GPIO_EMAC0_INT); + phyinfo("Configuring %08x\n", GPIO_EMAC0_INT); sam_configgpio(GPIO_EMAC0_INT); /* Configure PHY /RESET output */ @@ -310,11 +318,11 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) DEBUGASSERT(intf); ninfo("%s: handler=%p\n", intf, handler); - phyerr("EMAC0: devname=%s\n", SAMV7_EMAC0_DEVNAME); + phyinfo("EMAC0: devname=%s\n", SAMV7_EMAC0_DEVNAME); if (strcmp(intf, SAMV7_EMAC0_DEVNAME) == 0) { - phyerr("Select EMAC0\n"); + phyinfo("Select EMAC0\n"); phandler = &g_emac0_handler; pinset = GPIO_EMAC0_INT; irq = IRQ_EMAC0_INT; @@ -322,7 +330,7 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) } else { - nerr("Unsupported interface: %s\n", intf); + nerr("ERROR: Unsupported interface: %s\n", intf); return NULL; } @@ -341,15 +349,15 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) if (handler) { - phyerr("Configure pin: %08x\n", pinset); + phyinfo("Configure pin: %08x\n", pinset); sam_gpioirq(pinset); - phyerr("Attach IRQ%d\n", irq); + phyinfo("Attach IRQ%d\n", irq); (void)irq_attach(irq, handler); } else { - phyerr("Detach IRQ%d\n", irq); + phyinfo("Detach IRQ%d\n", irq); (void)irq_detach(irq); enabler = NULL; } diff --git a/configs/same70-xplained/src/sam_usbdev.c b/configs/same70-xplained/src/sam_usbdev.c index 444cf8bbb2..e4be8a893a 100644 --- a/configs/same70-xplained/src/sam_usbdev.c +++ b/configs/same70-xplained/src/sam_usbdev.c @@ -94,5 +94,5 @@ void sam_usbinitialize(void) void sam_usbsuspend(FAR struct usbdev_s *dev, bool resume) { - ullerr("resume: %d\n", resume); + ullinfo("resume: %d\n", resume); } diff --git a/configs/saml21-xplained/src/sam_mmcsd.c b/configs/saml21-xplained/src/sam_mmcsd.c index 5dbff63a89..b57f1d58ff 100644 --- a/configs/saml21-xplained/src/sam_mmcsd.c +++ b/configs/saml21-xplained/src/sam_mmcsd.c @@ -100,7 +100,7 @@ int sam_sdinitialize(int port, int minor) spi = sam_spibus_initialize(port); if (!spi) { - ferr("Failed to initialize SPI%d\n", port); + ferr("ERROR: Failed to initialize SPI%d\n", port); return -ENODEV; } @@ -113,7 +113,7 @@ int sam_sdinitialize(int port, int minor) ret = mmcsd_spislotinitialize(minor, SAMDL_MMCSDSLOTNO, spi); if (ret < 0) { - ferr("Failed to bind SPI%d to MMC/SD slot %d: %d\n", + ferr("ERROR: Failed to bind SPI%d to MMC/SD slot %d: %d\n", port, SAMDL_MMCSDSLOTNO, ret); return ret; } diff --git a/configs/saml21-xplained/src/sam_ug2832hsweg04.c b/configs/saml21-xplained/src/sam_ug2832hsweg04.c index 9cbbfab082..bee4cc4f3a 100644 --- a/configs/saml21-xplained/src/sam_ug2832hsweg04.c +++ b/configs/saml21-xplained/src/sam_ug2832hsweg04.c @@ -187,7 +187,7 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno) spi = sam_spibus_initialize(OLED_CSNO); if (!spi) { - lcderr("Failed to initialize SPI port 1\n"); + lcderr("ERROR: Failed to initialize SPI port 1\n"); } else { @@ -196,7 +196,7 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno) dev = ssd1306_initialize(spi, devno); if (!dev) { - lcderr("Failed to bind SPI port 1 to OLED %d: %d\n", devno); + lcderr("ERROR: Failed to bind SPI port 1 to OLED %d: %d\n", devno); } else { diff --git a/configs/samv71-xult/src/sam_audio_null.c b/configs/samv71-xult/src/sam_audio_null.c index 59a599eceb..a1edbc5019 100644 --- a/configs/samv71-xult/src/sam_audio_null.c +++ b/configs/samv71-xult/src/sam_audio_null.c @@ -100,7 +100,7 @@ int sam_audio_null_initialize(int minor) char devname[12]; int ret; - auderr("minor %d\n", minor); + audinfo("minor %d\n", minor); DEBUGASSERT(minor >= 0 && minor <= 25); /* Have we already initialized? Since we never uninitialize we must prevent @@ -117,7 +117,7 @@ int sam_audio_null_initialize(int minor) nullaudio = audio_null_initialize(); if (!nullaudio) { - auderr("Failed to get the NULL audio interface\n"); + auderr("ERROR: Failed to get the NULL audio interface\n"); ret = -ENODEV; goto errout; } diff --git a/configs/samv71-xult/src/sam_ethernet.c b/configs/samv71-xult/src/sam_ethernet.c index 4c3b3ad680..119ada6455 100644 --- a/configs/samv71-xult/src/sam_ethernet.c +++ b/configs/samv71-xult/src/sam_ethernet.c @@ -81,10 +81,18 @@ #ifdef CONFIG_NETDEV_PHY_DEBUG # define phyerr err +# define phywarn warn +# define phyinfo info # define phyllerr llerr +# define phyllwarn llwarn +# define phyllinfo llinfo #else # define phyerr(x...) +# define phywarn(x...) +# define phyinfo(x...) # define phyllerr(x...) +# define phyllwarn(x...) +# define phyllinfo(x...) #endif /************************************************************************************ @@ -106,7 +114,7 @@ static xcpt_t g_emac0_handler; #ifdef CONFIG_SAMV7_GPIOA_IRQ static void sam_emac0_phy_enable(bool enable) { - phyerr("IRQ%d: enable=%d\n", IRQ_EMAC0_INT, enable); + phyinfo("IRQ%d: enable=%d\n", IRQ_EMAC0_INT, enable); if (enable) { sam_gpioirqenable(IRQ_EMAC0_INT); @@ -134,7 +142,7 @@ void weak_function sam_netinitialize(void) { /* Configure the PHY interrupt GPIO */ - phyerr("Configuring %08x\n", GPIO_EMAC0_INT); + phyinfo("Configuring %08x\n", GPIO_EMAC0_INT); sam_configgpio(GPIO_EMAC0_INT); /* Configure the PHY SIGDET input */ @@ -314,11 +322,12 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) DEBUGASSERT(intf); ninfo("%s: handler=%p\n", intf, handler); - phyerr("EMAC0: devname=%s\n", SAMV7_EMAC0_DEVNAME); + phyinfo("EMAC0: devname=%s\n", SAMV7_EMAC0_DEVNAME); if (strcmp(intf, SAMV7_EMAC0_DEVNAME) == 0) { - phyerr("Select EMAC0\n"); + phyinfo("Select EMAC0\n"); + phandler = &g_emac0_handler; pinset = GPIO_EMAC0_INT; irq = IRQ_EMAC0_INT; @@ -326,7 +335,7 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) } else { - nerr("Unsupported interface: %s\n", intf); + nerr("ERROR: Unsupported interface: %s\n", intf); return NULL; } @@ -345,15 +354,15 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) if (handler) { - phyerr("Configure pin: %08x\n", pinset); + phyinfo("Configure pin: %08x\n", pinset); sam_gpioirq(pinset); - phyerr("Attach IRQ%d\n", irq); + phyinfo("Attach IRQ%d\n", irq); (void)irq_attach(irq, handler); } else { - phyerr("Detach IRQ%d\n", irq); + phyinfo("Detach IRQ%d\n", irq); (void)irq_detach(irq); enabler = NULL; } diff --git a/configs/samv71-xult/src/sam_ili9488.c b/configs/samv71-xult/src/sam_ili9488.c index aba728c7b5..21f939f644 100644 --- a/configs/samv71-xult/src/sam_ili9488.c +++ b/configs/samv71-xult/src/sam_ili9488.c @@ -874,7 +874,7 @@ static void sam_lcd_dumpone(struct sam_dev_s *priv, int index, } else { - ferr("%s: Not collected\n", msg); + finfo("%s: Not collected\n", msg); } } #endif diff --git a/configs/samv71-xult/src/sam_maxtouch.c b/configs/samv71-xult/src/sam_maxtouch.c index 2f44a0759b..7bce968fcd 100644 --- a/configs/samv71-xult/src/sam_maxtouch.c +++ b/configs/samv71-xult/src/sam_maxtouch.c @@ -241,7 +241,7 @@ int board_tsc_setup(int minor) static bool initialized = false; int ret; - ierr("minor %d\n", minor); + iinfo("minor %d\n", minor); DEBUGASSERT(minor == 0); /* Have we already initialized? Since we never uninitialize we must prevent @@ -261,7 +261,7 @@ int board_tsc_setup(int minor) i2c = sam_i2cbus_initialize(MXT_TWI_BUS); if (!i2c) { - ierr("Failed to initialize I2C%d\n", MXT_TWI_BUS); + ierr("ERROR: Failed to initialize I2C%d\n", MXT_TWI_BUS); return -ENODEV; } diff --git a/configs/samv71-xult/src/sam_usbdev.c b/configs/samv71-xult/src/sam_usbdev.c index cc718cf7ed..39e39a1997 100644 --- a/configs/samv71-xult/src/sam_usbdev.c +++ b/configs/samv71-xult/src/sam_usbdev.c @@ -94,5 +94,5 @@ void sam_usbinitialize(void) void sam_usbsuspend(FAR struct usbdev_s *dev, bool resume) { - ullerr("resume: %d\n", resume); + ullinfo("resume: %d\n", resume); } diff --git a/configs/samv71-xult/src/sam_wm8904.c b/configs/samv71-xult/src/sam_wm8904.c index 352a89c560..abb920bd0b 100644 --- a/configs/samv71-xult/src/sam_wm8904.c +++ b/configs/samv71-xult/src/sam_wm8904.c @@ -253,7 +253,7 @@ int sam_wm8904_initialize(int minor) char devname[12]; int ret; - auderr("minor %d\n", minor); + audinfo("minor %d\n", minor); DEBUGASSERT(minor >= 0 && minor <= 25); /* Have we already initialized? Since we never uninitialize we must prevent @@ -273,7 +273,7 @@ int sam_wm8904_initialize(int minor) i2c = sam_i2cbus_initialize(WM8904_TWI_BUS); if (!i2c) { - auderr("Failed to initialize TWI%d\n", WM8904_TWI_BUS); + auderr("ERROR: Failed to initialize TWI%d\n", WM8904_TWI_BUS); ret = -ENODEV; goto errout; } @@ -283,7 +283,7 @@ int sam_wm8904_initialize(int minor) i2s = sam_ssc_initialize(WM8904_SSC_BUS); if (!i2s) { - auderr("Failed to initialize SSC%d\n", WM8904_SSC_BUS); + auderr("ERROR: Failed to initialize SSC%d\n", WM8904_SSC_BUS); ret = -ENODEV; goto errout_with_i2c; } @@ -325,7 +325,7 @@ int sam_wm8904_initialize(int minor) wm8904 = wm8904_initialize(i2c, i2s, &g_wm8904info.lower); if (!wm8904) { - auderr("Failed to initialize the WM8904\n"); + auderr("ERROR: Failed to initialize the WM8904\n"); ret = -ENODEV; goto errout_with_irq; } diff --git a/configs/shenzhou/src/stm32_adc.c b/configs/shenzhou/src/stm32_adc.c index dbdc5a2963..0b61b68f8e 100644 --- a/configs/shenzhou/src/stm32_adc.c +++ b/configs/shenzhou/src/stm32_adc.c @@ -154,7 +154,7 @@ int board_adc_setup(void) ret = adc_register("/dev/adc0", adc); if (ret < 0) { - aerr("adc_register failed: %d\n", ret); + aerr("ERROR: adc_register failed: %d\n", ret); return ret; } diff --git a/configs/shenzhou/src/stm32_ili93xx.c b/configs/shenzhou/src/stm32_ili93xx.c index dfe869e7f6..6b43340ad5 100644 --- a/configs/shenzhou/src/stm32_ili93xx.c +++ b/configs/shenzhou/src/stm32_ili93xx.c @@ -594,18 +594,18 @@ static struct stm32_dev_s g_lcddev = #ifdef CONFIG_LCD_REGDEBUG static void stm32_lcdshow(FAR struct stm32_lower_s *priv, FAR const char *msg) { - err("%s:\n", msg); - err(" CRTL RS: %d CS: %d RD: %d WR: %d LE: %d\n", - getreg32(LCD_RS_READ), getreg32(LCD_CS_READ), getreg32(LCD_RD_READ), - getreg32(LCD_WR_READ), getreg32(LCD_LE_READ)); - err(" DATA CR: %08x %08x\n", getreg32(LCD_CRL), getreg32(LCD_CRH)); + info("%s:\n", msg); + info(" CRTL RS: %d CS: %d RD: %d WR: %d LE: %d\n", + getreg32(LCD_RS_READ), getreg32(LCD_CS_READ), getreg32(LCD_RD_READ), + getreg32(LCD_WR_READ), getreg32(LCD_LE_READ)); + info(" DATA CR: %08x %08x\n", getreg32(LCD_CRL), getreg32(LCD_CRH)); if (priv->output) { - err(" OUTPUT: %08x\n", getreg32(LCD_ODR)); + info(" OUTPUT: %08x\n", getreg32(LCD_ODR)); } else { - err(" INPUT: %08x\n", getreg32(LCD_IDR)); + info(" INPUT: %08x\n", getreg32(LCD_IDR)); } } #endif @@ -1254,7 +1254,7 @@ static int stm32_setpower(struct lcd_dev_s *dev, int power) else #endif { - gerr("Unsupported LCD: %d\n", priv->type); + lcderr("ERROR: Unsupported LCD: %d\n", priv->type); } up_mdelay(50); @@ -1780,7 +1780,7 @@ static inline int stm32_lcdinitialize(FAR struct stm32_dev_s *priv) up_mdelay(50); id = stm32_readreg(priv, LCD_REG_0); /* Read the ID register */ - lcderr("LCD ID: %04x\n", id); + lcdinfo("LCD ID: %04x\n", id); stm32_lcdoutput(priv); up_mdelay(10); @@ -1852,11 +1852,11 @@ static inline int stm32_lcdinitialize(FAR struct stm32_dev_s *priv) else #endif { - lcderr("Unsupported LCD type\n"); + lcderr("ERROR: Unsupported LCD type\n"); ret = -ENODEV; } - lcderr("LCD type: %d\n", priv->type); + lcdinfo("LCD type: %d\n", priv->type); return ret; } diff --git a/configs/shenzhou/src/stm32_mmcsd.c b/configs/shenzhou/src/stm32_mmcsd.c index b1ebe96400..3621c655ea 100644 --- a/configs/shenzhou/src/stm32_mmcsd.c +++ b/configs/shenzhou/src/stm32_mmcsd.c @@ -100,7 +100,7 @@ int stm32_sdinitialize(int minor) spi = stm32_spibus_initialize(STM32_MMCSDSPIPORTNO); if (!spi) { - ferr("Failed to initialize SPI port %d\n", STM32_MMCSDSPIPORTNO); + ferr("ERROR: Failed to initialize SPI port %d\n", STM32_MMCSDSPIPORTNO); return -ENODEV; } @@ -114,7 +114,7 @@ int stm32_sdinitialize(int minor) ret = mmcsd_spislotinitialize(minor, STM32_MMCSDSLOTNO, spi); if (ret < 0) { - ferr("Failed to bind SPI port %d to MMC/SD slot %d: %d\n", + ferr("ERROR: Failed to bind SPI port %d to MMC/SD slot %d: %d\n", STM32_MMCSDSPIPORTNO, STM32_MMCSDSLOTNO, ret); return ret; } diff --git a/configs/shenzhou/src/stm32_spi.c b/configs/shenzhou/src/stm32_spi.c index 9f85fca6f3..747f92cfc9 100644 --- a/configs/shenzhou/src/stm32_spi.c +++ b/configs/shenzhou/src/stm32_spi.c @@ -75,10 +75,6 @@ # define spiinfo(x...) #endif -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -145,7 +141,7 @@ void weak_function stm32_spidev_initialize(void) #ifdef CONFIG_STM32_SPI1 void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spierr("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); /* SPI1 connects to the SD CARD and to the SPI FLASH */ @@ -181,7 +177,7 @@ uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32_SPI3 void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spierr("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); /* SPI3 connects to TFT LCD (for touchscreen and SD) and the RF24L01 2.4G * wireless module. diff --git a/configs/shenzhou/src/stm32_ssd1289.c b/configs/shenzhou/src/stm32_ssd1289.c index 7a28c222ca..f602f7e9d0 100644 --- a/configs/shenzhou/src/stm32_ssd1289.c +++ b/configs/shenzhou/src/stm32_ssd1289.c @@ -277,18 +277,18 @@ static struct stm32_lower_s g_lcdlower = #ifdef CONFIG_LCD_REGDEBUG static void stm32_lcdshow(FAR struct stm32_lower_s *priv, FAR const char *msg) { - err("%s:\n", msg); - err(" CRTL RS: %d CS: %d RD: %d WR: %d LE: %d\n", - getreg32(LCD_RS_READ), getreg32(LCD_CS_READ), getreg32(LCD_RD_READ), - getreg32(LCD_WR_READ), getreg32(LCD_LE_READ)); - err(" DATA CR: %08x %08x\n", getreg32(LCD_CRL), getreg32(LCD_CRH)); + info("%s:\n", msg); + info(" CRTL RS: %d CS: %d RD: %d WR: %d LE: %d\n", + getreg32(LCD_RS_READ), getreg32(LCD_CS_READ), getreg32(LCD_RD_READ), + getreg32(LCD_WR_READ), getreg32(LCD_LE_READ)); + info(" DATA CR: %08x %08x\n", getreg32(LCD_CRL), getreg32(LCD_CRH)); if (priv->output) { - err(" OUTPUT: %08x\n", getreg32(LCD_ODR)); + info(" OUTPUT: %08x\n", getreg32(LCD_ODR)); } else { - err(" INPUT: %08x\n", getreg32(LCD_IDR)); + info(" INPUT: %08x\n", getreg32(LCD_IDR)); } } #endif diff --git a/configs/shenzhou/src/stm32_touchscreen.c b/configs/shenzhou/src/stm32_touchscreen.c index b20789cd9e..dec42e95ff 100644 --- a/configs/shenzhou/src/stm32_touchscreen.c +++ b/configs/shenzhou/src/stm32_touchscreen.c @@ -251,7 +251,7 @@ int board_tsc_setup(int minor) FAR struct spi_dev_s *dev; int ret; - ierr("minor %d\n", minor); + iinfo("minor %d\n", minor); DEBUGASSERT(minor == 0); /* Configure and enable the ADS7843E interrupt pin as an input. */ @@ -263,7 +263,7 @@ int board_tsc_setup(int minor) dev = stm32_spibus_initialize(CONFIG_ADS7843E_SPIDEV); if (!dev) { - ierr("Failed to initialize SPI bus %d\n", CONFIG_ADS7843E_SPIDEV); + ierr("ERROR: Failed to initialize SPI bus %d\n", CONFIG_ADS7843E_SPIDEV); return -ENODEV; } @@ -272,7 +272,7 @@ int board_tsc_setup(int minor) ret = ads7843e_register(dev, &g_tscinfo.dev, CONFIG_ADS7843E_DEVMINOR); if (ret < 0) { - ierr("Failed to initialize SPI bus %d\n", CONFIG_ADS7843E_SPIDEV); + ierr("ERROR: Failed to initialize SPI bus %d\n", CONFIG_ADS7843E_SPIDEV); /* up_spiuninitialize(dev); */ return -ENODEV; } diff --git a/configs/shenzhou/src/stm32_usb.c b/configs/shenzhou/src/stm32_usb.c index 054270e04d..35c2ff422b 100644 --- a/configs/shenzhou/src/stm32_usb.c +++ b/configs/shenzhou/src/stm32_usb.c @@ -300,7 +300,7 @@ xcpt_t stm32_setup_overcurrent(xcpt_t handler) #ifdef CONFIG_USBDEV void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) { - ullerr("resume: %d\n", resume); + ullinfo("resume: %d\n", resume); } #endif diff --git a/configs/sim/src/sim_touchscreen.c b/configs/sim/src/sim_touchscreen.c index 622e631382..c81c88325e 100644 --- a/configs/sim/src/sim_touchscreen.c +++ b/configs/sim/src/sim_touchscreen.c @@ -111,14 +111,14 @@ int board_tsc_setup(int minor) ret = up_fbinitialize(0); if (ret < 0) { - ierr("up_fbinitialize failed: %d\n", -ret); + ierr("ERROR: up_fbinitialize failed: %d\n", -ret); goto errout; } dev = up_fbgetvplane(0, 0); if (!dev) { - ierr("up_fbgetvplane 0 failed\n"); + ierr("ERROR: up_fbgetvplane 0 failed\n"); ret = -ENODEV; goto errout_with_fb; } @@ -130,7 +130,7 @@ int board_tsc_setup(int minor) if (!g_simtc.hnx) { ret = -errno; - ierr("nx_open failed: %d\n", ret); + ierr("ERROR: nx_open failed: %d\n", ret); goto errout_with_fb; } @@ -140,7 +140,7 @@ int board_tsc_setup(int minor) ret = vnc_default_fbinitialize(0, g_simtc.hnx); if (ret < 0) { - ierr("vnc_default_fbinitialize failed: %d\n", ret); + ierr("ERROR: vnc_default_fbinitialize failed: %d\n", ret); goto errout_with_fb; } #endif @@ -153,7 +153,7 @@ int board_tsc_setup(int minor) ret = nx_setbgcolor(g_simtc.hnx, &color); if (ret < 0) { - ierr("nx_setbgcolor failed: %d\n", ret); + ierr("ERROR: nx_setbgcolor failed: %d\n", ret); goto errout_with_nx; } @@ -162,7 +162,7 @@ int board_tsc_setup(int minor) ret = board_tsc_setup(minor); if (ret < 0) { - ierr("board_tsc_setup failed: %d\n", ret); + ierr("ERROR: board_tsc_setup failed: %d\n", ret); goto errout_with_nx; } return OK; diff --git a/configs/spark/src/stm32_spi.c b/configs/spark/src/stm32_spi.c index 8871b805a8..572dd22c0a 100644 --- a/configs/spark/src/stm32_spi.c +++ b/configs/spark/src/stm32_spi.c @@ -134,7 +134,7 @@ void weak_function stm32_spidev_initialize(void) #ifdef CONFIG_STM32_SPI1 void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spierr("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) @@ -146,7 +146,7 @@ uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32_SPI2 void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spierr("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); #if defined(CONFIG_MTD_SST25) @@ -176,7 +176,7 @@ uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32_SPI3 void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) - spierr("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } diff --git a/configs/spark/src/stm32_usbdev.c b/configs/spark/src/stm32_usbdev.c index 9b801a670a..47f8d558ed 100644 --- a/configs/spark/src/stm32_usbdev.c +++ b/configs/spark/src/stm32_usbdev.c @@ -74,7 +74,7 @@ void stm32_usbinitialize(void) { - ullerr("called\n"); + ullinfo("called\n"); /* USB Soft Connect Pullup */ @@ -113,5 +113,5 @@ int stm32_usbpullup(FAR struct usbdev_s *dev, bool enable) void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) { - ullerr("resume: %d\n", resume); + ullinfo("resume: %d\n", resume); } diff --git a/configs/spark/src/stm32_wireless.c b/configs/spark/src/stm32_wireless.c index 69a73be746..2d1f6855d8 100644 --- a/configs/spark/src/stm32_wireless.c +++ b/configs/spark/src/stm32_wireless.c @@ -281,7 +281,7 @@ int wireless_archinitialize(size_t max_rx_size) /* Init SPI bus */ - ierr("minor %d\n", minor); + iinfo("minor %d\n", minor); DEBUGASSERT(CONFIG_CC3000_DEVMINOR == 0); #ifdef CONFIG_CC3000_PROBES @@ -296,7 +296,7 @@ int wireless_archinitialize(size_t max_rx_size) spi = stm32_spibus_initialize(CONFIG_CC3000_SPIDEV); if (!spi) { - ierr("Failed to initialize SPI bus %d\n", CONFIG_CC3000_SPIDEV); + ierr("ERROR: Failed to initialize SPI bus %d\n", CONFIG_CC3000_SPIDEV); return -ENODEV; } @@ -305,7 +305,7 @@ int wireless_archinitialize(size_t max_rx_size) int ret = cc3000_register(spi, &g_cc3000_info.dev, CONFIG_CC3000_DEVMINOR); if (ret < 0) { - ierr("Failed to initialize SPI bus %d\n", CONFIG_CC3000_SPIDEV); + ierr("ERROR: Failed to initialize SPI bus %d\n", CONFIG_CC3000_SPIDEV); return -ENODEV; } diff --git a/configs/stm32f4discovery/src/stm32_ethernet.c b/configs/stm32f4discovery/src/stm32_ethernet.c index 6ccd0b7271..6c58def651 100644 --- a/configs/stm32f4discovery/src/stm32_ethernet.c +++ b/configs/stm32f4discovery/src/stm32_ethernet.c @@ -80,10 +80,18 @@ #ifdef CONFIG_NETDEV_PHY_DEBUG # define phyerr err +# define phywarn warn +# define phyinfo info # define phyllerr llerr +# define phyllwarn llwarn +# define phyllinfo llinfo #else # define phyerr(x...) +# define phywarn(x...) +# define phyinfo(x...) # define phyllerr(x...) +# define phyllwarn(x...) +# define phyllinfo(x...) #endif /************************************************************************************