All architectures: Register the schedule note driver if enabled

This commit is contained in:
Gregory Nutt 2016-03-17 17:00:59 -06:00
parent 82c58eb609
commit bd846c2e72
9 changed files with 74 additions and 61 deletions

View File

@ -1,7 +1,7 @@
/****************************************************************************
* arch/arm/src/common/up_initialize.c
*
* Copyright (C) 2007-2010, 2012-2015 Gregory Nutt. All rights reserved.
* Copyright (C) 2007-2010, 2012-2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@ -43,6 +43,7 @@
#include <nuttx/arch.h>
#include <nuttx/board.h>
#include <nuttx/sched_note.h>
#include <nuttx/fs/fs.h>
#include <nuttx/fs/loop.h>
#include <nuttx/net/loopback.h>
@ -75,11 +76,13 @@
static void up_calibratedelay(void)
{
int i;
lldbg("Beginning 100s delay\n");
for (i = 0; i < 100; i++)
{
up_mdelay(1000);
}
lldbg("End 100s delay\n");
}
#else
@ -202,6 +205,11 @@ void up_initialize(void)
#endif
#endif /* CONFIG_NFILE_DESCRIPTORS */
#if defined(CONFIG_SCHED_INSTRUMENTATION_BUFFER) && \
defined(CONFIG_DRIVER_NOTE)
note_register(); /* Non-standard /dev/note */
#endif
/* Initialize the serial device driver */
#ifdef USE_SERIALDRIVER

View File

@ -1,7 +1,7 @@
/****************************************************************************
* arch/avr/src/common/up_initialize.c
*
* Copyright (C) 2010, 2012-2013, 2015 Gregory Nutt. All rights reserved.
* Copyright (C) 2010, 2012-2013, 2015-2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@ -42,6 +42,7 @@
#include <debug.h>
#include <nuttx/arch.h>
#include <nuttx/sched_note.h>
#include <nuttx/fs/fs.h>
#include <nuttx/fs/loop.h>
#include <nuttx/net/loopback.h>
@ -58,6 +59,7 @@
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* Determine which (if any) console driver to use. This will probably cause
* up_serialinit to be incorrectly called if there is no USART configured to
* be an RS-232 device (see as an example arch/avr/src/at32uc23/at32uc3_config.h)
@ -104,10 +106,6 @@
# undef CONFIG_RAMLOG_SYSLOG
#endif
/****************************************************************************
* Private Types
****************************************************************************/
/****************************************************************************
* Private Functions
****************************************************************************/
@ -126,11 +124,13 @@
static void up_calibratedelay(void)
{
int i;
lldbg("Beginning 100s delay\n");
for (i = 0; i < 100; i++)
{
up_mdelay(1000);
}
lldbg("End 100s delay\n");
}
#else
@ -242,6 +242,11 @@ void up_initialize(void)
#endif
#endif /* CONFIG_NFILE_DESCRIPTORS */
#if defined(CONFIG_SCHED_INSTRUMENTATION_BUFFER) && \
defined(CONFIG_DRIVER_NOTE)
note_register(); /* Non-standard /dev/note */
#endif
/* Initialize the serial device driver */
#ifdef USE_SERIALDRIVER

View File

@ -1,7 +1,7 @@
/****************************************************************************
* arch/hc/src/common/up_initialize.c
*
* Copyright (C) 2009-2010, 2012-2013, 2015 Gregory Nutt. All rights reserved.
* Copyright (C) 2009-2010, 2012-2013, 2015-2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@ -43,6 +43,7 @@
#include <nuttx/arch.h>
#include <nuttx/board.h>
#include <nuttx/sched_note.h>
#include <nuttx/fs/fs.h>
#include <nuttx/fs/loop.h>
#include <nuttx/net/loopback.h>
@ -54,14 +55,6 @@
#include "up_arch.h"
#include "up_internal.h"
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/****************************************************************************
* Private Types
****************************************************************************/
/****************************************************************************
* Private Functions
****************************************************************************/
@ -80,11 +73,13 @@
static void up_calibratedelay(void)
{
int i;
lldbg("Beginning 100s delay\n");
for (i = 0; i < 100; i++)
{
up_mdelay(1000);
}
lldbg("End 100s delay\n");
}
#else
@ -166,6 +161,11 @@ void up_initialize(void)
#endif
#endif /* CONFIG_NFILE_DESCRIPTORS */
#if defined(CONFIG_SCHED_INSTRUMENTATION_BUFFER) && \
defined(CONFIG_DRIVER_NOTE)
note_register(); /* Non-standard /dev/note */
#endif
/* Initialize the serial device driver */
#ifdef USE_SERIALDRIVER

View File

@ -1,7 +1,7 @@
/****************************************************************************
* arch/mips/src/common/up_initialize.c
*
* Copyright (C) 2011-2013, 2015 Gregory Nutt. All rights reserved.
* Copyright (C) 2011-2013, 2015-2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@ -43,6 +43,7 @@
#include <nuttx/arch.h>
#include <nuttx/board.h>
#include <nuttx/sched_note.h>
#include <nuttx/fs/fs.h>
#include <nuttx/fs/loop.h>
#include <nuttx/net/loopback.h>
@ -56,14 +57,6 @@
#include "up_arch.h"
#include "up_internal.h"
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/****************************************************************************
* Private Types
****************************************************************************/
/****************************************************************************
* Private Functions
****************************************************************************/
@ -82,11 +75,13 @@
static void up_calibratedelay(void)
{
int i;
lldbg("Beginning 100s delay\n");
for (i = 0; i < 100; i++)
{
up_mdelay(1000);
}
lldbg("End 100s delay\n");
}
#else
@ -168,6 +163,11 @@ void up_initialize(void)
#endif
#endif /* CONFIG_NFILE_DESCRIPTORS */
#if defined(CONFIG_SCHED_INSTRUMENTATION_BUFFER) && \
defined(CONFIG_DRIVER_NOTE)
note_register(); /* Non-standard /dev/note */
#endif
/* Initialize the serial device driver */
#ifdef USE_SERIALDRIVER

View File

@ -1,7 +1,7 @@
/****************************************************************************
* arch/sh/src/common/up_initialize.c
*
* Copyright (C) 2008-2010, 2012-2013, 2015 Gregory Nutt. All rights reserved.
* Copyright (C) 2008-2010, 2012-2013, 2015-2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@ -43,6 +43,7 @@
#include <nuttx/arch.h>
#include <nuttx/board.h>
#include <nuttx/sched_note.h>
#include <nuttx/fs/fs.h>
#include <nuttx/fs/loop.h>
#include <nuttx/net/loopback.h>
@ -62,10 +63,6 @@
#undef CONFIG_ARCH_CALIBRATION
/****************************************************************************
* Private Types
****************************************************************************/
/****************************************************************************
* Private Functions
****************************************************************************/
@ -84,11 +81,13 @@
static void up_calibratedelay(void)
{
int i;
slldbg("Beginning 100s delay\n");
for (i = 0; i < 100; i++)
{
up_mdelay(1000);
}
slldbg("End 100s delay\n");
}
#else
@ -153,6 +152,11 @@ void up_initialize(void)
#endif
#endif /* CONFIG_NFILE_DESCRIPTORS */
#if defined(CONFIG_SCHED_INSTRUMENTATION_BUFFER) && \
defined(CONFIG_DRIVER_NOTE)
note_register(); /* Non-standard /dev/note */
#endif
/* Initialize the serial device driver */
#ifdef USE_SERIALDRIVER

View File

@ -1,7 +1,7 @@
/****************************************************************************
* arch/sim/src/up_initialize.c
*
* Copyright (C) 2007-2009, 2011-2015 Gregory Nutt. All rights reserved.
* Copyright (C) 2007-2009, 2011-2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without

View File

@ -1,7 +1,7 @@
/****************************************************************************
* arch/x86/src/common/up_initialize.c
*
* Copyright (C) 2011-2013, 2015 Gregory Nutt. All rights reserved.
* Copyright (C) 2011-2013, 2015-2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@ -43,6 +43,7 @@
#include <nuttx/arch.h>
#include <nuttx/board.h>
#include <nuttx/sched_note.h>
#include <nuttx/fs/fs.h>
#include <nuttx/fs/loop.h>
#include <nuttx/net/loopback.h>
@ -56,14 +57,6 @@
#include "up_arch.h"
#include "up_internal.h"
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/****************************************************************************
* Private Types
****************************************************************************/
/****************************************************************************
* Private Functions
****************************************************************************/
@ -82,11 +75,13 @@
static void up_calibratedelay(void)
{
int i;
lldbg("Beginning 100s delay\n");
for (i = 0; i < 100; i++)
{
up_mdelay(1000);
}
lldbg("End 100s delay\n");
}
#else
@ -168,6 +163,11 @@ void up_initialize(void)
#endif
#endif /* CONFIG_NFILE_DESCRIPTORS */
#if defined(CONFIG_SCHED_INSTRUMENTATION_BUFFER) && \
defined(CONFIG_DRIVER_NOTE)
note_register(); /* Non-standard /dev/note */
#endif
/* Initialize the serial device driver */
#ifdef USE_SERIALDRIVER

View File

@ -1,7 +1,7 @@
/****************************************************************************
* arch/z16/src/common/up_initialize.c
*
* Copyright (C) 2008-2009, 2011-2013, 2015 Gregory Nutt. All rights reserved.
* Copyright (C) 2008-2009, 2011-2013, 2015-2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@ -43,6 +43,7 @@
#include <nuttx/arch.h>
#include <nuttx/board.h>
#include <nuttx/sched_note.h>
#include <nuttx/fs/fs.h>
#include <nuttx/fs/loop.h>
#include <nuttx/net/loopback.h>
@ -56,10 +57,6 @@
#include "up_arch.h"
#include "up_internal.h"
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/****************************************************************************
* Public Data
****************************************************************************/
@ -71,14 +68,6 @@
volatile FAR chipreg_t *g_current_regs;
/****************************************************************************
* Private Types
****************************************************************************/
/****************************************************************************
* Private Data
****************************************************************************/
/****************************************************************************
* Private Functions
****************************************************************************/
@ -97,11 +86,13 @@ volatile FAR chipreg_t *g_current_regs;
static void up_calibratedelay(void)
{
int i;
lldbg("Beginning 100s delay\n");
for (i = 0; i < 100; i++)
{
up_mdelay(1000);
}
lldbg("End 100s delay\n");
}
#else
@ -172,6 +163,11 @@ void up_initialize(void)
#endif
#endif /* CONFIG_NFILE_DESCRIPTORS */
#if defined(CONFIG_SCHED_INSTRUMENTATION_BUFFER) && \
defined(CONFIG_DRIVER_NOTE)
note_register(); /* Non-standard /dev/note */
#endif
/* Initialize the serial device driver */
#ifdef USE_SERIALDRIVER

View File

@ -1,7 +1,7 @@
/****************************************************************************
* arch/z80/src/common/up_initialize.c
*
* Copyright (C) 2007-2009, 2012-2013, 2015 Gregory Nutt. All rights reserved.
* Copyright (C) 2007-2009, 2012-2013, 2015-2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@ -43,6 +43,7 @@
#include <nuttx/arch.h>
#include <nuttx/board.h>
#include <nuttx/sched_note.h>
#include <nuttx/fs/fs.h>
#include <nuttx/fs/loop.h>
#include <nuttx/net/loopback.h>
@ -55,14 +56,6 @@
#include "up_arch.h"
#include "up_internal.h"
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/****************************************************************************
* Private Types
****************************************************************************/
/****************************************************************************
* Private Functions
****************************************************************************/
@ -81,11 +74,13 @@
static void up_calibratedelay(void)
{
int i;
lldbg("Beginning 100s delay\n");
for (i = 0; i < 100; i++)
{
up_mdelay(1000);
}
lldbg("End 100s delay\n");
}
#else
@ -164,6 +159,11 @@ void up_initialize(void)
#endif
#endif /* CONFIG_NFILE_DESCRIPTORS */
#if defined(CONFIG_SCHED_INSTRUMENTATION_BUFFER) && \
defined(CONFIG_DRIVER_NOTE)
note_register(); /* Non-standard /dev/note */
#endif
/* Initialize the serial device driver */
#ifdef USE_SERIALDRIVER