configs/: Change some *err() message to *info() messages if what was a *dbg() message does not indicate and error condition.
This commit is contained in:
parent
5073bf1de6
commit
c494454bc4
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -75,5 +75,5 @@
|
||||
|
||||
void sam_usbsuspend(FAR struct usbdev_s *dev, bool resume)
|
||||
{
|
||||
ullerr("resume: %d\n", resume);
|
||||
ullinfo("resume: %d\n", resume);
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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");
|
||||
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
||||
/************************************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user