drivers: Merge the common driver initialization into one place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
ea614090cd
commit
c96c96a399
@ -22,23 +22,8 @@
|
|||||||
* Included Files
|
* Included Files
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
|
||||||
|
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
#include <nuttx/arch.h>
|
#include <nuttx/arch.h>
|
||||||
#include <nuttx/board.h>
|
#include <nuttx/board.h>
|
||||||
#include <nuttx/drivers/drivers.h>
|
|
||||||
#include <nuttx/fs/loop.h>
|
|
||||||
#include <nuttx/net/loopback.h>
|
|
||||||
#include <nuttx/net/tun.h>
|
|
||||||
#include <nuttx/net/telnet.h>
|
|
||||||
#include <nuttx/note/note_driver.h>
|
|
||||||
#include <nuttx/syslog/syslog_console.h>
|
|
||||||
#include <nuttx/serial/pty.h>
|
|
||||||
#include <nuttx/crypto/crypto.h>
|
|
||||||
#include <nuttx/power/pm.h>
|
|
||||||
|
|
||||||
#include <arch/board/board.h>
|
#include <arch/board/board.h>
|
||||||
|
|
||||||
#include "arm_arch.h"
|
#include "arm_arch.h"
|
||||||
@ -49,7 +34,7 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: up_color_intstack
|
* Name: arm_color_intstack
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Set the interrupt stack to a value so that later we can determine how
|
* Set the interrupt stack to a value so that later we can determine how
|
||||||
@ -58,7 +43,7 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if defined(CONFIG_STACK_COLORATION) && CONFIG_ARCH_INTERRUPTSTACK > 3
|
#if defined(CONFIG_STACK_COLORATION) && CONFIG_ARCH_INTERRUPTSTACK > 3
|
||||||
static inline void up_color_intstack(void)
|
static inline void arm_color_intstack(void)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
uint32_t *ptr = (uint32_t *)arm_intstack_alloc();
|
uint32_t *ptr = (uint32_t *)arm_intstack_alloc();
|
||||||
@ -75,7 +60,7 @@ static inline void up_color_intstack(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
# define up_color_intstack()
|
# define arm_color_intstack()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@ -101,13 +86,9 @@ static inline void up_color_intstack(void)
|
|||||||
|
|
||||||
void up_initialize(void)
|
void up_initialize(void)
|
||||||
{
|
{
|
||||||
/* Initialize global variables */
|
|
||||||
|
|
||||||
CURRENT_REGS = NULL;
|
|
||||||
|
|
||||||
/* Colorize the interrupt stack */
|
/* Colorize the interrupt stack */
|
||||||
|
|
||||||
up_color_intstack();
|
arm_color_intstack();
|
||||||
|
|
||||||
/* Add any extra memory fragments to the memory manager */
|
/* Add any extra memory fragments to the memory manager */
|
||||||
|
|
||||||
@ -136,92 +117,18 @@ void up_initialize(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Register devices */
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_NULL)
|
|
||||||
devnull_register(); /* Standard /dev/null */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_RANDOM)
|
|
||||||
devrandom_register(); /* Standard /dev/random */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_URANDOM)
|
|
||||||
devurandom_register(); /* Standard /dev/urandom */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_ZERO)
|
|
||||||
devzero_register(); /* Standard /dev/zero */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_LOOP)
|
|
||||||
loop_register(); /* Standard /dev/loop */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DRIVER_NOTE)
|
|
||||||
note_register(); /* Non-standard /dev/note */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialize the serial device driver */
|
/* Initialize the serial device driver */
|
||||||
|
|
||||||
#ifdef USE_SERIALDRIVER
|
#ifdef USE_SERIALDRIVER
|
||||||
arm_serialinit();
|
arm_serialinit();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_RPMSG_UART
|
|
||||||
rpmsg_serialinit();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialize the console device driver (if it is other than the standard
|
|
||||||
* serial driver).
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if defined (CONFIG_LWL_CONSOLE)
|
|
||||||
lwlconsole_init();
|
|
||||||
#elif defined(CONFIG_CONSOLE_SYSLOG)
|
|
||||||
syslog_console_init();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_PSEUDOTERM_SUSV1
|
|
||||||
/* Register the master pseudo-terminal multiplexor device */
|
|
||||||
|
|
||||||
ptmx_register();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_CRYPTO)
|
|
||||||
/* Initialize the HW crypto and /dev/crypto */
|
|
||||||
|
|
||||||
up_cryptoinitialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_CRYPTO_CRYPTODEV
|
|
||||||
devcrypto_register();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_NETDEV_LATEINIT
|
#ifndef CONFIG_NETDEV_LATEINIT
|
||||||
/* Initialize the network */
|
/* Initialize the network */
|
||||||
|
|
||||||
arm_netinitialize();
|
arm_netinitialize();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_NET_LOOPBACK
|
|
||||||
/* Initialize the local loopback device */
|
|
||||||
|
|
||||||
localhost_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_NET_TUN
|
|
||||||
/* Initialize the TUN device */
|
|
||||||
|
|
||||||
tun_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_NETDEV_TELNET
|
|
||||||
/* Initialize the Telnet session factory */
|
|
||||||
|
|
||||||
telnet_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_USBDEV) || defined(CONFIG_USBHOST)
|
#if defined(CONFIG_USBDEV) || defined(CONFIG_USBHOST)
|
||||||
/* Initialize USB -- device and/or host */
|
/* Initialize USB -- device and/or host */
|
||||||
|
|
||||||
|
@ -445,14 +445,6 @@ void arm_serialinit(void);
|
|||||||
void arm_earlyserialinit(void);
|
void arm_earlyserialinit(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_RPMSG_UART
|
|
||||||
void rpmsg_serialinit(void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_LWL_CONSOLE
|
|
||||||
void lwlconsole_init(void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* DMA **********************************************************************/
|
/* DMA **********************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_DMA
|
#ifdef CONFIG_ARCH_DMA
|
||||||
@ -475,10 +467,6 @@ void arm_addregion(void);
|
|||||||
# define arm_addregion()
|
# define arm_addregion()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Watchdog timer ***********************************************************/
|
|
||||||
|
|
||||||
void arm_wdtinit(void);
|
|
||||||
|
|
||||||
/* Networking ***************************************************************/
|
/* Networking ***************************************************************/
|
||||||
|
|
||||||
/* Defined in board/xyz_network.c for board-specific Ethernet
|
/* Defined in board/xyz_network.c for board-specific Ethernet
|
||||||
|
@ -38,7 +38,6 @@
|
|||||||
#include <nuttx/irq.h>
|
#include <nuttx/irq.h>
|
||||||
#include <nuttx/arch.h>
|
#include <nuttx/arch.h>
|
||||||
#include <nuttx/init.h>
|
#include <nuttx/init.h>
|
||||||
#include <nuttx/power/pm.h>
|
|
||||||
#include <nuttx/fs/ioctl.h>
|
#include <nuttx/fs/ioctl.h>
|
||||||
#include <nuttx/serial/serial.h>
|
#include <nuttx/serial/serial.h>
|
||||||
#include <nuttx/wqueue.h>
|
#include <nuttx/wqueue.h>
|
||||||
|
@ -2668,7 +2668,7 @@ int imx_netinitialize(int intf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: up_netinitialize
|
* Name: arm_netinitialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Initialize the first network interface. If there are more than one
|
* Initialize the first network interface. If there are more than one
|
||||||
|
@ -54,28 +54,6 @@ extern "C"
|
|||||||
#define EXTERN extern
|
#define EXTERN extern
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Function: up_netinitialize
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* Initialize the first network interface. If there are more than one
|
|
||||||
* interface in the chip, then board-specific logic will have to provide
|
|
||||||
* this function to determine which, if any, Ethernet controllers should
|
|
||||||
* be initialized. Also prototyped in up_internal.h.
|
|
||||||
*
|
|
||||||
* Input Parameters:
|
|
||||||
* None
|
|
||||||
*
|
|
||||||
* Returned Value:
|
|
||||||
* OK on success; Negated errno on failure.
|
|
||||||
*
|
|
||||||
* Assumptions:
|
|
||||||
* Called very early in the initialization sequence.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
void up_netinitialize(void);
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Function: imx_phy_boardinitialize
|
* Function: imx_phy_boardinitialize
|
||||||
*
|
*
|
||||||
|
@ -61,7 +61,6 @@
|
|||||||
#include <nuttx/arch.h>
|
#include <nuttx/arch.h>
|
||||||
#include <nuttx/semaphore.h>
|
#include <nuttx/semaphore.h>
|
||||||
#include <nuttx/spi/spi.h>
|
#include <nuttx/spi/spi.h>
|
||||||
#include <nuttx/power/pm.h>
|
|
||||||
|
|
||||||
#include <arch/board/board.h>
|
#include <arch/board/board.h>
|
||||||
|
|
||||||
|
@ -23,7 +23,8 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
#include <nuttx/power/pm.h>
|
|
||||||
|
#include "arm_internal.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
@ -49,7 +50,4 @@
|
|||||||
|
|
||||||
void arm_pminitialize(void)
|
void arm_pminitialize(void)
|
||||||
{
|
{
|
||||||
/* Then initialize the NuttX power management subsystem proper */
|
|
||||||
|
|
||||||
pm_initialize();
|
|
||||||
}
|
}
|
||||||
|
@ -24,8 +24,6 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <nuttx/power/pm.h>
|
|
||||||
|
|
||||||
#include "arm_internal.h"
|
#include "arm_internal.h"
|
||||||
|
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
@ -54,9 +52,6 @@
|
|||||||
|
|
||||||
void arm_pminitialize(void)
|
void arm_pminitialize(void)
|
||||||
{
|
{
|
||||||
/* Then initialize the NuttX power management subsystem proper */
|
|
||||||
|
|
||||||
pm_initialize();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_PM */
|
#endif /* CONFIG_PM */
|
||||||
|
@ -24,8 +24,6 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <nuttx/power/pm.h>
|
|
||||||
|
|
||||||
#include "arm_internal.h"
|
#include "arm_internal.h"
|
||||||
#include "stm32_pm.h"
|
#include "stm32_pm.h"
|
||||||
|
|
||||||
@ -55,9 +53,6 @@
|
|||||||
|
|
||||||
void arm_pminitialize(void)
|
void arm_pminitialize(void)
|
||||||
{
|
{
|
||||||
/* Then initialize the NuttX power management subsystem proper */
|
|
||||||
|
|
||||||
pm_initialize();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_PM */
|
#endif /* CONFIG_PM */
|
||||||
|
@ -24,8 +24,6 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <nuttx/power/pm.h>
|
|
||||||
|
|
||||||
#include "arm_internal.h"
|
#include "arm_internal.h"
|
||||||
#include "stm32_pm.h"
|
#include "stm32_pm.h"
|
||||||
|
|
||||||
@ -55,9 +53,6 @@
|
|||||||
|
|
||||||
void arm_pminitialize(void)
|
void arm_pminitialize(void)
|
||||||
{
|
{
|
||||||
/* Then initialize the NuttX power management subsystem proper */
|
|
||||||
|
|
||||||
pm_initialize();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_PM */
|
#endif /* CONFIG_PM */
|
||||||
|
@ -24,8 +24,6 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <nuttx/power/pm.h>
|
|
||||||
|
|
||||||
#include "arm_internal.h"
|
#include "arm_internal.h"
|
||||||
#include "stm32_pm.h"
|
#include "stm32_pm.h"
|
||||||
|
|
||||||
@ -55,9 +53,6 @@
|
|||||||
|
|
||||||
void arm_pminitialize(void)
|
void arm_pminitialize(void)
|
||||||
{
|
{
|
||||||
/* Then initialize the NuttX power management subsystem proper */
|
|
||||||
|
|
||||||
pm_initialize();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_PM */
|
#endif /* CONFIG_PM */
|
||||||
|
@ -24,8 +24,6 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <nuttx/power/pm.h>
|
|
||||||
|
|
||||||
#include "arm_internal.h"
|
#include "arm_internal.h"
|
||||||
#include "stm32l4_pm.h"
|
#include "stm32l4_pm.h"
|
||||||
|
|
||||||
@ -55,9 +53,6 @@
|
|||||||
|
|
||||||
void arm_pminitialize(void)
|
void arm_pminitialize(void)
|
||||||
{
|
{
|
||||||
/* Then initialize the NuttX power management subsystem proper */
|
|
||||||
|
|
||||||
pm_initialize();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_PM */
|
#endif /* CONFIG_PM */
|
||||||
|
@ -22,22 +22,8 @@
|
|||||||
* Included Files
|
* Included Files
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
|
||||||
|
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
#include <nuttx/arch.h>
|
#include <nuttx/arch.h>
|
||||||
#include <nuttx/drivers/drivers.h>
|
#include <nuttx/board.h>
|
||||||
#include <nuttx/fs/loop.h>
|
|
||||||
#include <nuttx/net/loopback.h>
|
|
||||||
#include <nuttx/net/tun.h>
|
|
||||||
#include <nuttx/net/telnet.h>
|
|
||||||
#include <nuttx/note/note_driver.h>
|
|
||||||
#include <nuttx/syslog/syslog_console.h>
|
|
||||||
#include <nuttx/serial/pty.h>
|
|
||||||
#include <nuttx/crypto/crypto.h>
|
|
||||||
#include <nuttx/power/pm.h>
|
|
||||||
|
|
||||||
#include <arch/board/board.h>
|
#include <arch/board/board.h>
|
||||||
|
|
||||||
#include "up_arch.h"
|
#include "up_arch.h"
|
||||||
@ -129,10 +115,6 @@ static inline void up_color_intstack(void)
|
|||||||
|
|
||||||
void up_initialize(void)
|
void up_initialize(void)
|
||||||
{
|
{
|
||||||
/* Initialize global variables */
|
|
||||||
|
|
||||||
g_current_regs = NULL;
|
|
||||||
|
|
||||||
/* Colorize the interrupt stack */
|
/* Colorize the interrupt stack */
|
||||||
|
|
||||||
up_color_intstack();
|
up_color_intstack();
|
||||||
@ -164,90 +146,18 @@ void up_initialize(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Register devices */
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_NULL)
|
|
||||||
devnull_register(); /* Standard /dev/null */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_RANDOM)
|
|
||||||
devrandom_register(); /* Standard /dev/random */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_URANDOM)
|
|
||||||
devurandom_register(); /* Standard /dev/urandom */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_ZERO)
|
|
||||||
devzero_register(); /* Standard /dev/zero */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_LOOP)
|
|
||||||
loop_register(); /* Standard /dev/loop */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DRIVER_NOTE)
|
|
||||||
note_register(); /* Non-standard /dev/note */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialize the serial device driver */
|
/* Initialize the serial device driver */
|
||||||
|
|
||||||
#ifdef USE_SERIALDRIVER
|
#ifdef USE_SERIALDRIVER
|
||||||
up_serialinit();
|
up_serialinit();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_RPMSG_UART
|
|
||||||
rpmsg_serialinit();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialize the console device driver (if it is other than the standard
|
|
||||||
* serial driver).
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if defined(CONFIG_CONSOLE_SYSLOG)
|
|
||||||
syslog_console_init();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_PSEUDOTERM_SUSV1
|
|
||||||
/* Register the master pseudo-terminal multiplexor device */
|
|
||||||
|
|
||||||
ptmx_register();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_CRYPTO)
|
|
||||||
/* Initialize the HW crypto and /dev/crypto */
|
|
||||||
|
|
||||||
up_cryptoinitialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_CRYPTO_CRYPTODEV
|
|
||||||
devcrypto_register();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_NETDEV_LATEINIT
|
#ifndef CONFIG_NETDEV_LATEINIT
|
||||||
/* Initialize the network */
|
/* Initialize the network */
|
||||||
|
|
||||||
up_netinitialize();
|
up_netinitialize();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_NET_LOOPBACK
|
|
||||||
/* Initialize the local loopback device */
|
|
||||||
|
|
||||||
localhost_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_NET_TUN
|
|
||||||
/* Initialize the TUN device */
|
|
||||||
|
|
||||||
tun_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_NETDEV_TELNET
|
|
||||||
/* Initialize the Telnet session factory */
|
|
||||||
|
|
||||||
telnet_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialize USB */
|
/* Initialize USB */
|
||||||
|
|
||||||
up_usbinitialize();
|
up_usbinitialize();
|
||||||
|
@ -140,10 +140,6 @@ void up_earlyserialinit(void);
|
|||||||
void up_serialinit(void);
|
void up_serialinit(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_RPMSG_UART
|
|
||||||
void rpmsg_serialinit(void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Defined in chip/xxx_ethernet.c */
|
/* Defined in chip/xxx_ethernet.c */
|
||||||
|
|
||||||
#if defined(CONFIG_NET) && !defined(CONFIG_NETDEV_LATEINIT)
|
#if defined(CONFIG_NET) && !defined(CONFIG_NETDEV_LATEINIT)
|
||||||
|
@ -163,8 +163,5 @@ void weak_function up_cpu_normal(void)
|
|||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
void up_pminitialize(void)
|
void up_pminitialize(void)
|
||||||
{
|
{
|
||||||
/* Then initialize the power management subsystem proper */
|
|
||||||
|
|
||||||
pm_initialize();
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -22,30 +22,10 @@
|
|||||||
* Included Files
|
* Included Files
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
|
||||||
|
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
#include <nuttx/arch.h>
|
#include <nuttx/arch.h>
|
||||||
#include <nuttx/sched_note.h>
|
|
||||||
#include <nuttx/mm/iob.h>
|
|
||||||
#include <nuttx/drivers/drivers.h>
|
|
||||||
#include <nuttx/fs/loop.h>
|
|
||||||
#include <nuttx/net/loopback.h>
|
|
||||||
#include <nuttx/net/tun.h>
|
|
||||||
#include <nuttx/net/telnet.h>
|
|
||||||
#include <nuttx/syslog/ramlog.h>
|
|
||||||
#include <nuttx/syslog/syslog.h>
|
|
||||||
#include <nuttx/syslog/syslog_console.h>
|
|
||||||
#include <nuttx/serial/pty.h>
|
|
||||||
#include <nuttx/crypto/crypto.h>
|
|
||||||
#include <nuttx/power/pm.h>
|
|
||||||
|
|
||||||
#include <arch/board/board.h>
|
|
||||||
|
|
||||||
#include "up_arch.h"
|
#include "up_arch.h"
|
||||||
#include "up_internal.h"
|
#include "up_internal.h"
|
||||||
#include "chip.h"
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Functions
|
* Private Functions
|
||||||
@ -96,10 +76,6 @@ static inline void up_color_intstack(void)
|
|||||||
|
|
||||||
void up_initialize(void)
|
void up_initialize(void)
|
||||||
{
|
{
|
||||||
/* Initialize global variables */
|
|
||||||
|
|
||||||
CURRENT_REGS = NULL;
|
|
||||||
|
|
||||||
/* Colorize the interrupt stack */
|
/* Colorize the interrupt stack */
|
||||||
|
|
||||||
up_color_intstack();
|
up_color_intstack();
|
||||||
@ -126,93 +102,18 @@ void up_initialize(void)
|
|||||||
up_dma_initialize();
|
up_dma_initialize();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Register devices */
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_NULL)
|
|
||||||
devnull_register(); /* Standard /dev/null */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_RANDOM)
|
|
||||||
devrandom_register(); /* Standard /dev/random */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_URANDOM)
|
|
||||||
devurandom_register(); /* Standard /dev/urandom */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_ZERO)
|
|
||||||
devzero_register(); /* Standard /dev/zero */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_LOOP)
|
|
||||||
loop_register(); /* Standard /dev/loop */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_SCHED_INSTRUMENTATION_BUFFER) && \
|
|
||||||
defined(CONFIG_DRIVER_NOTE)
|
|
||||||
note_register(); /* Non-standard /dev/note */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialize the serial device driver */
|
/* Initialize the serial device driver */
|
||||||
|
|
||||||
#ifdef USE_SERIALDRIVER
|
#ifdef USE_SERIALDRIVER
|
||||||
up_serialinit();
|
up_serialinit();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_RPMSG_UART
|
|
||||||
rpmsg_serialinit();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialize the console device driver (if it is other than the standard
|
|
||||||
* serial driver).
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if defined (CONFIG_ARM_LWL_CONSOLE)
|
|
||||||
lwlconsole_init();
|
|
||||||
#elif defined(CONFIG_CONSOLE_SYSLOG)
|
|
||||||
syslog_console_init();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_PSEUDOTERM_SUSV1
|
|
||||||
/* Register the master pseudo-terminal multiplexor device */
|
|
||||||
|
|
||||||
ptmx_register();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_CRYPTO)
|
|
||||||
/* Initialize the HW crypto and /dev/crypto */
|
|
||||||
|
|
||||||
up_cryptoinitialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_CRYPTO_CRYPTODEV
|
|
||||||
devcrypto_register();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_NETDEV_LATEINIT
|
#ifndef CONFIG_NETDEV_LATEINIT
|
||||||
/* Initialize the network */
|
/* Initialize the network */
|
||||||
|
|
||||||
up_netinitialize();
|
up_netinitialize();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_NET_LOOPBACK
|
|
||||||
/* Initialize the local loopback device */
|
|
||||||
|
|
||||||
localhost_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_NET_TUN
|
|
||||||
/* Initialize the TUN device */
|
|
||||||
|
|
||||||
tun_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_NETDEV_TELNET
|
|
||||||
/* Initialize the Telnet session factory */
|
|
||||||
|
|
||||||
telnet_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_USBDEV) || defined(CONFIG_USBHOST)
|
#if defined(CONFIG_USBDEV) || defined(CONFIG_USBHOST)
|
||||||
/* Initialize USB -- device and/or host */
|
/* Initialize USB -- device and/or host */
|
||||||
|
|
||||||
|
@ -248,8 +248,6 @@ void up_cpu_normal(void);
|
|||||||
|
|
||||||
/* Interrupt handling *******************************************************/
|
/* Interrupt handling *******************************************************/
|
||||||
|
|
||||||
void up_irqinitialize(void);
|
|
||||||
|
|
||||||
/* Interrupt acknowledge and dispatch */
|
/* Interrupt acknowledge and dispatch */
|
||||||
|
|
||||||
uint32_t *up_doirq(int irq, uint32_t *regs);
|
uint32_t *up_doirq(int irq, uint32_t *regs);
|
||||||
@ -261,10 +259,6 @@ int up_hardfault(int irq, FAR void *context, FAR void *arg);
|
|||||||
|
|
||||||
void up_svcall_handler(void);
|
void up_svcall_handler(void);
|
||||||
|
|
||||||
/* System timer *************************************************************/
|
|
||||||
|
|
||||||
void up_timer_initialize(void);
|
|
||||||
|
|
||||||
/* Low level serial output **************************************************/
|
/* Low level serial output **************************************************/
|
||||||
|
|
||||||
#ifdef USE_SERIALDRIVER
|
#ifdef USE_SERIALDRIVER
|
||||||
@ -279,20 +273,6 @@ void up_earlyserialinit(void);
|
|||||||
# define up_earlyserialinit()
|
# define up_earlyserialinit()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_RPMSG_UART
|
|
||||||
void rpmsg_serialinit(void);
|
|
||||||
#else
|
|
||||||
# define rpmsg_serialinit()
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Defined in drivers/lowconsole.c */
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEV_LOWCONSOLE
|
|
||||||
void lowconsole_init(void);
|
|
||||||
#else
|
|
||||||
# define lowconsole_init()
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* DMA **********************************************************************/
|
/* DMA **********************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_DMA
|
#ifdef CONFIG_ARCH_DMA
|
||||||
@ -307,10 +287,6 @@ void up_addregion(void);
|
|||||||
# define up_addregion()
|
# define up_addregion()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Watchdog timer ***********************************************************/
|
|
||||||
|
|
||||||
void up_wdtinit(void);
|
|
||||||
|
|
||||||
/* Networking ***************************************************************/
|
/* Networking ***************************************************************/
|
||||||
|
|
||||||
#if defined(CONFIG_NET) && !defined(CONFIG_NETDEV_LATEINIT)
|
#if defined(CONFIG_NET) && !defined(CONFIG_NETDEV_LATEINIT)
|
||||||
|
@ -22,22 +22,9 @@
|
|||||||
* Included Files
|
* Included Files
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
|
||||||
|
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
#include <nuttx/arch.h>
|
#include <nuttx/arch.h>
|
||||||
#include <nuttx/board.h>
|
#include <nuttx/board.h>
|
||||||
#include <nuttx/drivers/drivers.h>
|
#include <arch/board/board.h>
|
||||||
#include <nuttx/fs/loop.h>
|
|
||||||
#include <nuttx/net/loopback.h>
|
|
||||||
#include <nuttx/net/tun.h>
|
|
||||||
#include <nuttx/net/telnet.h>
|
|
||||||
#include <nuttx/note/note_driver.h>
|
|
||||||
#include <nuttx/syslog/syslog_console.h>
|
|
||||||
#include <nuttx/serial/pty.h>
|
|
||||||
#include <nuttx/crypto/crypto.h>
|
|
||||||
#include <nuttx/power/pm.h>
|
|
||||||
|
|
||||||
#include "up_arch.h"
|
#include "up_arch.h"
|
||||||
#include "up_internal.h"
|
#include "up_internal.h"
|
||||||
@ -65,10 +52,6 @@
|
|||||||
|
|
||||||
void up_initialize(void)
|
void up_initialize(void)
|
||||||
{
|
{
|
||||||
/* Initialize global variables */
|
|
||||||
|
|
||||||
g_current_regs = NULL;
|
|
||||||
|
|
||||||
/* Add any extra memory fragments to the memory manager */
|
/* Add any extra memory fragments to the memory manager */
|
||||||
|
|
||||||
up_addregion();
|
up_addregion();
|
||||||
@ -96,93 +79,20 @@ void up_initialize(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Register devices */
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_NULL)
|
|
||||||
devnull_register(); /* Standard /dev/null */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_RANDOM)
|
|
||||||
devrandom_register(); /* Standard /dev/random */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_URANDOM)
|
|
||||||
devurandom_register(); /* Standard /dev/urandom */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_ZERO)
|
|
||||||
devzero_register(); /* Standard /dev/zero */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_LOOP)
|
|
||||||
loop_register(); /* Standard /dev/loop */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DRIVER_NOTE)
|
|
||||||
note_register(); /* Non-standard /dev/note */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialize the serial device driver */
|
/* Initialize the serial device driver */
|
||||||
|
|
||||||
#ifdef USE_SERIALDRIVER
|
#ifdef USE_SERIALDRIVER
|
||||||
up_serialinit();
|
up_serialinit();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_RPMSG_UART
|
|
||||||
rpmsg_serialinit();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialize the console device driver (if it is other than the standard
|
|
||||||
* serial driver).
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if defined(CONFIG_CONSOLE_SYSLOG)
|
|
||||||
syslog_console_init();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_PSEUDOTERM_SUSV1
|
|
||||||
/* Register the master pseudo-terminal multiplexor device */
|
|
||||||
|
|
||||||
ptmx_register();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_CRYPTO)
|
|
||||||
/* Initialize the HW crypto and /dev/crypto */
|
|
||||||
|
|
||||||
up_cryptoinitialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_CRYPTO_CRYPTODEV
|
|
||||||
devcrypto_register();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_NETDEV_LATEINIT
|
#ifndef CONFIG_NETDEV_LATEINIT
|
||||||
/* Initialize the network */
|
/* Initialize the network */
|
||||||
|
|
||||||
up_netinitialize();
|
up_netinitialize();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_NET_LOOPBACK
|
|
||||||
/* Initialize the local loopback device */
|
|
||||||
|
|
||||||
localhost_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_NET_TUN
|
|
||||||
/* Initialize the TUN device */
|
|
||||||
|
|
||||||
tun_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_NETDEV_TELNET
|
|
||||||
/* Initialize the Telnet session factory */
|
|
||||||
|
|
||||||
telnet_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialize USB */
|
/* Initialize USB */
|
||||||
|
|
||||||
up_usbinitialize();
|
up_usbinitialize();
|
||||||
|
|
||||||
board_autoled_on(LED_IRQSENABLED);
|
board_autoled_on(LED_IRQSENABLED);
|
||||||
}
|
}
|
||||||
|
@ -157,10 +157,6 @@ void up_earlyserialinit(void);
|
|||||||
void up_serialinit(void);
|
void up_serialinit(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_RPMSG_UART
|
|
||||||
void rpmsg_serialinit(void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void up_lowputc(char ch);
|
void up_lowputc(char ch);
|
||||||
void up_lowputs(const char *str);
|
void up_lowputs(const char *str);
|
||||||
|
|
||||||
@ -178,8 +174,6 @@ void up_addregion(void);
|
|||||||
void weak_function up_dma_initialize(void);
|
void weak_function up_dma_initialize(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void up_wdtinit(void);
|
|
||||||
|
|
||||||
#if defined(CONFIG_NET) && !defined(CONFIG_NETDEV_LATEINIT)
|
#if defined(CONFIG_NET) && !defined(CONFIG_NETDEV_LATEINIT)
|
||||||
void up_netinitialize(void);
|
void up_netinitialize(void);
|
||||||
#else
|
#else
|
||||||
|
@ -22,23 +22,8 @@
|
|||||||
* Included Files
|
* Included Files
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
|
||||||
|
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
#include <nuttx/arch.h>
|
#include <nuttx/arch.h>
|
||||||
#include <nuttx/board.h>
|
#include <nuttx/board.h>
|
||||||
#include <nuttx/drivers/drivers.h>
|
|
||||||
#include <nuttx/fs/loop.h>
|
|
||||||
#include <nuttx/net/loopback.h>
|
|
||||||
#include <nuttx/net/tun.h>
|
|
||||||
#include <nuttx/net/telnet.h>
|
|
||||||
#include <nuttx/note/note_driver.h>
|
|
||||||
#include <nuttx/syslog/syslog_console.h>
|
|
||||||
#include <nuttx/serial/pty.h>
|
|
||||||
#include <nuttx/crypto/crypto.h>
|
|
||||||
#include <nuttx/power/pm.h>
|
|
||||||
|
|
||||||
#include <arch/board/board.h>
|
#include <arch/board/board.h>
|
||||||
|
|
||||||
#include "mips_arch.h"
|
#include "mips_arch.h"
|
||||||
@ -67,10 +52,6 @@
|
|||||||
|
|
||||||
void up_initialize(void)
|
void up_initialize(void)
|
||||||
{
|
{
|
||||||
/* Initialize global variables */
|
|
||||||
|
|
||||||
CURRENT_REGS = NULL;
|
|
||||||
|
|
||||||
/* Add any extra memory fragments to the memory manager */
|
/* Add any extra memory fragments to the memory manager */
|
||||||
|
|
||||||
up_addregion();
|
up_addregion();
|
||||||
@ -98,90 +79,18 @@ void up_initialize(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Register devices */
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_NULL)
|
|
||||||
devnull_register(); /* Standard /dev/null */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_RANDOM)
|
|
||||||
devrandom_register(); /* Standard /dev/random */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_URANDOM)
|
|
||||||
devurandom_register(); /* Standard /dev/urandom */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_ZERO)
|
|
||||||
devzero_register(); /* Standard /dev/zero */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_LOOP)
|
|
||||||
loop_register(); /* Standard /dev/loop */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DRIVER_NOTE)
|
|
||||||
note_register(); /* Non-standard /dev/note */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialize the serial device driver */
|
/* Initialize the serial device driver */
|
||||||
|
|
||||||
#ifdef USE_SERIALDRIVER
|
#ifdef USE_SERIALDRIVER
|
||||||
up_serialinit();
|
up_serialinit();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_RPMSG_UART
|
|
||||||
rpmsg_serialinit();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialize the console device driver (if it is other than the standard
|
|
||||||
* serial driver).
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if defined(CONFIG_CONSOLE_SYSLOG)
|
|
||||||
syslog_console_init();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_PSEUDOTERM_SUSV1
|
|
||||||
/* Register the master pseudo-terminal multiplexor device */
|
|
||||||
|
|
||||||
ptmx_register();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_CRYPTO)
|
|
||||||
/* Initialize the HW crypto and /dev/crypto */
|
|
||||||
|
|
||||||
up_cryptoinitialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_CRYPTO_CRYPTODEV
|
|
||||||
devcrypto_register();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_NETDEV_LATEINIT
|
#ifndef CONFIG_NETDEV_LATEINIT
|
||||||
/* Initialize the network */
|
/* Initialize the network */
|
||||||
|
|
||||||
up_netinitialize();
|
up_netinitialize();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_NET_LOOPBACK
|
|
||||||
/* Initialize the local loopback device */
|
|
||||||
|
|
||||||
localhost_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_NET_TUN
|
|
||||||
/* Initialize the TUN device */
|
|
||||||
|
|
||||||
tun_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_NETDEV_TELNET
|
|
||||||
/* Initialize the Telnet session factory */
|
|
||||||
|
|
||||||
telnet_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialize USB -- device and/or host */
|
/* Initialize USB -- device and/or host */
|
||||||
|
|
||||||
up_usbinitialize();
|
up_usbinitialize();
|
||||||
|
@ -244,10 +244,6 @@ void up_earlyserialinit(void);
|
|||||||
void up_serialinit(void);
|
void up_serialinit(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_RPMSG_UART
|
|
||||||
void rpmsg_serialinit(void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Network */
|
/* Network */
|
||||||
|
|
||||||
#if defined(CONFIG_NET) && !defined(CONFIG_NETDEV_LATEINIT)
|
#if defined(CONFIG_NET) && !defined(CONFIG_NETDEV_LATEINIT)
|
||||||
|
@ -104,12 +104,6 @@ extern uint32_t g_idle_topstack;
|
|||||||
|
|
||||||
void lm32_board_initialize(void);
|
void lm32_board_initialize(void);
|
||||||
|
|
||||||
/* Memory allocation ********************************************************/
|
|
||||||
|
|
||||||
#if CONFIG_MM_REGIONS > 1
|
|
||||||
void lm32_add_region(void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Context switching ********************************************************/
|
/* Context switching ********************************************************/
|
||||||
|
|
||||||
void lm32_copystate(uint32_t *dest, uint32_t *src);
|
void lm32_copystate(uint32_t *dest, uint32_t *src);
|
||||||
@ -123,18 +117,6 @@ uint32_t *lm32_doirq(int irq, uint32_t *regs);
|
|||||||
|
|
||||||
int lm32_swint(int irq, FAR void *context, FAR void *arg);
|
int lm32_swint(int irq, FAR void *context, FAR void *arg);
|
||||||
|
|
||||||
/* Rpmsg serial *************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_RPMSG_UART
|
|
||||||
void rpmsg_serialinit(void);
|
|
||||||
#else
|
|
||||||
# define rpmsg_serialinit()
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* System timer *************************************************************/
|
|
||||||
|
|
||||||
void lm32_timer_initialize(void);
|
|
||||||
|
|
||||||
/* Signal handling **********************************************************/
|
/* Signal handling **********************************************************/
|
||||||
|
|
||||||
void lm32_sigdeliver(void);
|
void lm32_sigdeliver(void);
|
||||||
|
@ -70,19 +70,3 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
|||||||
*heap_start = (FAR void *)g_idle_topstack;
|
*heap_start = (FAR void *)g_idle_topstack;
|
||||||
*heap_size = CONFIG_RAM_END - g_idle_topstack;
|
*heap_size = CONFIG_RAM_END - g_idle_topstack;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: lm32_add_region
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* Memory may be added in non-contiguous chunks. Additional chunks are
|
|
||||||
* added by calling this function.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#if CONFIG_MM_REGIONS > 1
|
|
||||||
void lm32_add_region(void)
|
|
||||||
{
|
|
||||||
#warning Missing logic
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
@ -22,26 +22,9 @@
|
|||||||
* Included Files
|
* Included Files
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
|
||||||
|
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
#include <nuttx/arch.h>
|
#include <nuttx/arch.h>
|
||||||
#include <nuttx/sched_note.h>
|
|
||||||
#include <nuttx/drivers/drivers.h>
|
|
||||||
#include <nuttx/fs/loop.h>
|
|
||||||
#include <nuttx/net/loopback.h>
|
|
||||||
#include <nuttx/net/tun.h>
|
|
||||||
#include <nuttx/net/telnet.h>
|
|
||||||
#include <nuttx/syslog/syslog.h>
|
|
||||||
#include <nuttx/serial/pty.h>
|
|
||||||
#include <nuttx/crypto/crypto.h>
|
|
||||||
#include <nuttx/power/pm.h>
|
|
||||||
|
|
||||||
#include <arch/board/board.h>
|
|
||||||
|
|
||||||
#include "misoc.h"
|
#include "misoc.h"
|
||||||
#include "lm32.h"
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
@ -53,10 +36,6 @@ void up_initialize(void)
|
|||||||
|
|
||||||
misoc_serial_initialize();
|
misoc_serial_initialize();
|
||||||
|
|
||||||
#ifdef CONFIG_RPMSG_UART
|
|
||||||
rpmsg_serialinit();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 0 /* REVISIT */
|
#if 0 /* REVISIT */
|
||||||
/* Initialize the network cores */
|
/* Initialize the network cores */
|
||||||
|
|
||||||
|
@ -104,12 +104,6 @@ extern uint32_t g_idle_topstack;
|
|||||||
|
|
||||||
void minerva_board_initialize(void);
|
void minerva_board_initialize(void);
|
||||||
|
|
||||||
/* Memory allocation ********************************************************/
|
|
||||||
|
|
||||||
#if CONFIG_MM_REGIONS > 1
|
|
||||||
void minerva_add_region(void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Context switching ********************************************************/
|
/* Context switching ********************************************************/
|
||||||
|
|
||||||
void minerva_copystate(uint32_t * dest, uint32_t * src);
|
void minerva_copystate(uint32_t * dest, uint32_t * src);
|
||||||
@ -123,18 +117,6 @@ uint32_t *minerva_doirq(int irq, uint32_t * regs);
|
|||||||
|
|
||||||
int minerva_swint(int irq, FAR void *context, FAR void *arg);
|
int minerva_swint(int irq, FAR void *context, FAR void *arg);
|
||||||
|
|
||||||
/* Rpmsg serial *************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_RPMSG_UART
|
|
||||||
void rpmsg_serialinit(void);
|
|
||||||
#else
|
|
||||||
# define rpmsg_serialinit()
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* System timer *************************************************************/
|
|
||||||
|
|
||||||
void minerva_timer_initialize(void);
|
|
||||||
|
|
||||||
/* Signal handling **********************************************************/
|
/* Signal handling **********************************************************/
|
||||||
|
|
||||||
void minerva_sigdeliver(void);
|
void minerva_sigdeliver(void);
|
||||||
|
@ -58,19 +58,3 @@ void up_allocate_heap(FAR void **heap_start, size_t * heap_size)
|
|||||||
*heap_start = (FAR void *)g_idle_topstack;
|
*heap_start = (FAR void *)g_idle_topstack;
|
||||||
*heap_size = CONFIG_RAM_END - g_idle_topstack;
|
*heap_size = CONFIG_RAM_END - g_idle_topstack;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: minerva_add_region
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* Memory may be added in non-contiguous chunks. Additional chunks are
|
|
||||||
* added by calling this function.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#if CONFIG_MM_REGIONS > 1
|
|
||||||
void minerva_add_region(void)
|
|
||||||
{
|
|
||||||
# warning Missing logic
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
@ -22,26 +22,9 @@
|
|||||||
* Included Files
|
* Included Files
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
|
||||||
|
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
#include <nuttx/arch.h>
|
#include <nuttx/arch.h>
|
||||||
#include <nuttx/sched_note.h>
|
|
||||||
#include <nuttx/drivers/drivers.h>
|
|
||||||
#include <nuttx/fs/loop.h>
|
|
||||||
#include <nuttx/net/loopback.h>
|
|
||||||
#include <nuttx/net/tun.h>
|
|
||||||
#include <nuttx/net/telnet.h>
|
|
||||||
#include <nuttx/syslog/syslog.h>
|
|
||||||
#include <nuttx/serial/pty.h>
|
|
||||||
#include <nuttx/crypto/crypto.h>
|
|
||||||
#include <nuttx/power/pm.h>
|
|
||||||
|
|
||||||
#include <arch/board/board.h>
|
|
||||||
|
|
||||||
#include "misoc.h"
|
#include "misoc.h"
|
||||||
#include "minerva.h"
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
@ -53,10 +36,6 @@ void up_initialize(void)
|
|||||||
|
|
||||||
misoc_serial_initialize();
|
misoc_serial_initialize();
|
||||||
|
|
||||||
#ifdef CONFIG_RPMSG_UART
|
|
||||||
rpmsg_serialinit();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialize the network cores */
|
/* Initialize the network cores */
|
||||||
|
|
||||||
#ifdef CONFIG_MISOC_ETHERNET
|
#ifdef CONFIG_MISOC_ETHERNET
|
||||||
|
@ -22,28 +22,12 @@
|
|||||||
* Included Files
|
* Included Files
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
|
||||||
|
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
#include <nuttx/arch.h>
|
#include <nuttx/arch.h>
|
||||||
#include <nuttx/board.h>
|
#include <nuttx/board.h>
|
||||||
#include <nuttx/drivers/drivers.h>
|
|
||||||
#include <nuttx/fs/loop.h>
|
|
||||||
#include <nuttx/net/loopback.h>
|
|
||||||
#include <nuttx/net/tun.h>
|
|
||||||
#include <nuttx/net/telnet.h>
|
|
||||||
#include <nuttx/note/note_driver.h>
|
|
||||||
#include <nuttx/syslog/syslog_console.h>
|
|
||||||
#include <nuttx/serial/pty.h>
|
|
||||||
#include <nuttx/crypto/crypto.h>
|
|
||||||
#include <nuttx/power/pm.h>
|
|
||||||
|
|
||||||
#include <arch/board/board.h>
|
#include <arch/board/board.h>
|
||||||
|
|
||||||
#include <arch/spr.h>
|
#include <arch/spr.h>
|
||||||
|
|
||||||
#include "up_arch.h"
|
|
||||||
#include "up_internal.h"
|
#include "up_internal.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@ -157,10 +141,6 @@ static inline void up_color_intstack(void)
|
|||||||
|
|
||||||
void up_initialize(void)
|
void up_initialize(void)
|
||||||
{
|
{
|
||||||
/* Initialize global variables */
|
|
||||||
|
|
||||||
CURRENT_REGS = NULL;
|
|
||||||
|
|
||||||
/* Colorize the interrupt stack */
|
/* Colorize the interrupt stack */
|
||||||
|
|
||||||
up_color_intstack();
|
up_color_intstack();
|
||||||
@ -192,92 +172,20 @@ void up_initialize(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Register devices */
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_NULL)
|
|
||||||
devnull_register(); /* Standard /dev/null */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_RANDOM)
|
|
||||||
devrandom_register(); /* Standard /dev/random */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_URANDOM)
|
|
||||||
devurandom_register(); /* Standard /dev/urandom */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_ZERO)
|
|
||||||
devzero_register(); /* Standard /dev/zero */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_LOOP)
|
|
||||||
loop_register(); /* Standard /dev/loop */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DRIVER_NOTE)
|
|
||||||
note_register(); /* Non-standard /dev/note */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialize the serial device driver */
|
/* Initialize the serial device driver */
|
||||||
|
|
||||||
up_serialinit();
|
up_serialinit();
|
||||||
|
|
||||||
#ifdef CONFIG_RPMSG_UART
|
|
||||||
rpmsg_serialinit();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialize the console device driver (if it is other than the standard
|
|
||||||
* serial driver).
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if defined(CONFIG_CONSOLE_SYSLOG)
|
|
||||||
syslog_console_init();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_PSEUDOTERM_SUSV1
|
|
||||||
/* Register the master pseudo-terminal multiplexor device */
|
|
||||||
|
|
||||||
ptmx_register();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Print OpenRISC CPU information */
|
/* Print OpenRISC CPU information */
|
||||||
|
|
||||||
or1k_print_cpuinfo();
|
or1k_print_cpuinfo();
|
||||||
|
|
||||||
#if defined(CONFIG_CRYPTO)
|
|
||||||
/* Initialize the HW crypto and /dev/crypto */
|
|
||||||
|
|
||||||
up_cryptoinitialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_CRYPTO_CRYPTODEV
|
|
||||||
devcrypto_register();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_NETDEV_LATEINIT
|
#ifndef CONFIG_NETDEV_LATEINIT
|
||||||
/* Initialize the network */
|
/* Initialize the network */
|
||||||
|
|
||||||
up_netinitialize();
|
up_netinitialize();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_NET_LOOPBACK
|
|
||||||
/* Initialize the local loopback device */
|
|
||||||
|
|
||||||
localhost_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_NET_TUN
|
|
||||||
/* Initialize the TUN device */
|
|
||||||
|
|
||||||
tun_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_NETDEV_TELNET
|
|
||||||
/* Initialize the Telnet session factory */
|
|
||||||
|
|
||||||
telnet_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialize USB -- device and/or host */
|
/* Initialize USB -- device and/or host */
|
||||||
|
|
||||||
up_usbinitialize();
|
up_usbinitialize();
|
||||||
|
@ -279,10 +279,6 @@ void up_serialinit(void);
|
|||||||
void up_earlyserialinit(void);
|
void up_earlyserialinit(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_RPMSG_UART
|
|
||||||
void rpmsg_serialinit(void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* DMA **********************************************************************/
|
/* DMA **********************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_DMA
|
#ifdef CONFIG_ARCH_DMA
|
||||||
@ -305,10 +301,6 @@ void up_addregion(void);
|
|||||||
# define up_addregion()
|
# define up_addregion()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Watchdog timer ***********************************************************/
|
|
||||||
|
|
||||||
void up_wdtinit(void);
|
|
||||||
|
|
||||||
/* Networking ***************************************************************/
|
/* Networking ***************************************************************/
|
||||||
|
|
||||||
/* Defined in board/xyz_network.c for board-specific Ethernet
|
/* Defined in board/xyz_network.c for board-specific Ethernet
|
||||||
|
@ -22,22 +22,9 @@
|
|||||||
* Included Files
|
* Included Files
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
|
||||||
|
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
#include <nuttx/arch.h>
|
#include <nuttx/arch.h>
|
||||||
#include <nuttx/board.h>
|
#include <nuttx/board.h>
|
||||||
#include <nuttx/drivers/drivers.h>
|
#include <arch/board/board.h>
|
||||||
#include <nuttx/fs/loop.h>
|
|
||||||
#include <nuttx/net/loopback.h>
|
|
||||||
#include <nuttx/net/tun.h>
|
|
||||||
#include <nuttx/net/telnet.h>
|
|
||||||
#include <nuttx/note/note_driver.h>
|
|
||||||
#include <nuttx/syslog/syslog_console.h>
|
|
||||||
#include <nuttx/serial/pty.h>
|
|
||||||
#include <nuttx/crypto/crypto.h>
|
|
||||||
#include <nuttx/power/pm.h>
|
|
||||||
|
|
||||||
#include "up_arch.h"
|
#include "up_arch.h"
|
||||||
#include "up_internal.h"
|
#include "up_internal.h"
|
||||||
@ -65,10 +52,6 @@
|
|||||||
|
|
||||||
void up_initialize(void)
|
void up_initialize(void)
|
||||||
{
|
{
|
||||||
/* Initialize global variables */
|
|
||||||
|
|
||||||
g_current_regs = NULL;
|
|
||||||
|
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
/* Initialize the power management subsystem. This MCU-specific function
|
/* Initialize the power management subsystem. This MCU-specific function
|
||||||
* must be called *very* early in the initialization sequence *before* any
|
* must be called *very* early in the initialization sequence *before* any
|
||||||
@ -79,97 +62,20 @@ void up_initialize(void)
|
|||||||
up_pminitialize();
|
up_pminitialize();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Register devices */
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_NULL)
|
|
||||||
devnull_register(); /* Standard /dev/null */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_RANDOM)
|
|
||||||
devrandom_register(); /* Standard /dev/random */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_URANDOM)
|
|
||||||
devurandom_register(); /* Standard /dev/urandom */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_ZERO)
|
|
||||||
devzero_register(); /* Standard /dev/zero */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_LOOP)
|
|
||||||
loop_register(); /* Standard /dev/loop */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DRIVER_NOTE)
|
|
||||||
note_register(); /* Non-standard /dev/note */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialize the serial device driver */
|
/* Initialize the serial device driver */
|
||||||
|
|
||||||
#ifdef USE_SERIALDRIVER
|
#ifdef USE_SERIALDRIVER
|
||||||
up_serialinit();
|
up_serialinit();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_RPMSG_UART
|
|
||||||
rpmsg_serialinit();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialize the console device driver (if it is other than the standard
|
|
||||||
* serial driver). NOTE that the naming implies that the console is a
|
|
||||||
* serial driver. That is usually the case, however, if no UARTs are
|
|
||||||
* enabled, the console could also be provided through some other device,
|
|
||||||
* such as an LCD.
|
|
||||||
* Architecture-specific logic will have to detect that case.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if defined(CONFIG_CONSOLE_SYSLOG)
|
|
||||||
syslog_console_init();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_PSEUDOTERM_SUSV1
|
|
||||||
/* Register the master pseudo-terminal multiplexor device */
|
|
||||||
|
|
||||||
ptmx_register();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_CRYPTO)
|
|
||||||
/* Initialize the HW crypto and /dev/crypto */
|
|
||||||
|
|
||||||
up_cryptoinitialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_CRYPTO_CRYPTODEV
|
|
||||||
devcrypto_register();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_NETDEV_LATEINIT
|
#ifndef CONFIG_NETDEV_LATEINIT
|
||||||
/* Initialize the network */
|
/* Initialize the network */
|
||||||
|
|
||||||
up_netinitialize();
|
up_netinitialize();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_NET_LOOPBACK
|
|
||||||
/* Initialize the local loopback device */
|
|
||||||
|
|
||||||
localhost_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_NET_TUN
|
|
||||||
/* Initialize the TUN device */
|
|
||||||
|
|
||||||
tun_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_NETDEV_TELNET
|
|
||||||
/* Initialize the Telnet session factory */
|
|
||||||
|
|
||||||
telnet_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialize USB */
|
/* Initialize USB */
|
||||||
|
|
||||||
up_usbinitialize();
|
up_usbinitialize();
|
||||||
|
|
||||||
board_autoled_on(LED_IRQSENABLED);
|
board_autoled_on(LED_IRQSENABLED);
|
||||||
}
|
}
|
||||||
|
@ -164,14 +164,6 @@ void up_consoleinit(void);
|
|||||||
void up_serialinit(void);
|
void up_serialinit(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_RPMSG_UART
|
|
||||||
void rpmsg_serialinit(void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Defined in xyz_watchdog.c */
|
|
||||||
|
|
||||||
void up_wdtinit(void);
|
|
||||||
|
|
||||||
/* Defined in board/xyz_lcd.c */
|
/* Defined in board/xyz_lcd.c */
|
||||||
|
|
||||||
#ifdef CONFIG_SLCD_CONSOLE
|
#ifdef CONFIG_SLCD_CONSOLE
|
||||||
|
@ -22,21 +22,10 @@
|
|||||||
* Included Files
|
* Included Files
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
|
||||||
|
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
#include <nuttx/arch.h>
|
#include <nuttx/arch.h>
|
||||||
#include <nuttx/board.h>
|
#include <nuttx/board.h>
|
||||||
#include <nuttx/serial/pty.h>
|
|
||||||
#include <nuttx/note/note_driver.h>
|
|
||||||
#include <nuttx/syslog/syslog_console.h>
|
|
||||||
#include <nuttx/drivers/drivers.h>
|
|
||||||
#include <nuttx/net/telnet.h>
|
|
||||||
|
|
||||||
#include <arch/board/board.h>
|
#include <arch/board/board.h>
|
||||||
|
|
||||||
#include "sched/sched.h"
|
|
||||||
#include "riscv_arch.h"
|
#include "riscv_arch.h"
|
||||||
#include "riscv_internal.h"
|
#include "riscv_internal.h"
|
||||||
|
|
||||||
@ -111,63 +100,11 @@ void up_initialize(void)
|
|||||||
riscv_pminitialize();
|
riscv_pminitialize();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Register devices */
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_NULL)
|
|
||||||
devnull_register(); /* Standard /dev/null */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_RANDOM)
|
|
||||||
devrandom_register(); /* Standard /dev/random */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_URANDOM)
|
|
||||||
devurandom_register(); /* Standard /dev/urandom */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_ZERO)
|
|
||||||
devzero_register(); /* Standard /dev/zero */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DRIVER_NOTE)
|
|
||||||
note_register(); /* Non-standard /dev/note */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialize the serial device driver */
|
/* Initialize the serial device driver */
|
||||||
|
|
||||||
#ifdef USE_SERIALDRIVER
|
#ifdef USE_SERIALDRIVER
|
||||||
riscv_serialinit();
|
riscv_serialinit();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_RPMSG_UART
|
|
||||||
rpmsg_serialinit();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialize the console device driver (if it is other than the standard
|
|
||||||
* serial driver).
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if defined(CONFIG_CONSOLE_SYSLOG)
|
|
||||||
syslog_console_init();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_PSEUDOTERM_SUSV1
|
|
||||||
/* Register the master pseudo-terminal multiplexor device */
|
|
||||||
|
|
||||||
ptmx_register();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_NET_LOOPBACK
|
|
||||||
/* Initialize the local loopback device */
|
|
||||||
|
|
||||||
localhost_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_NETDEV_TELNET
|
|
||||||
/* Initialize the Telnet session factory */
|
|
||||||
|
|
||||||
telnet_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
board_autoled_on(LED_IRQSENABLED);
|
board_autoled_on(LED_IRQSENABLED);
|
||||||
}
|
}
|
||||||
|
@ -225,10 +225,6 @@ void riscv_serialinit(void);
|
|||||||
void riscv_earlyserialinit(void);
|
void riscv_earlyserialinit(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_RPMSG_UART
|
|
||||||
void rpmsg_serialinit(void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Exception Handler ********************************************************/
|
/* Exception Handler ********************************************************/
|
||||||
|
|
||||||
void riscv_fault(int irq, uintptr_t *regs);
|
void riscv_fault(int irq, uintptr_t *regs);
|
||||||
|
@ -41,12 +41,6 @@
|
|||||||
|
|
||||||
#define ESP32C3_INT_PRIO_DEF 1
|
#define ESP32C3_INT_PRIO_DEF 1
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: up_irqinitialize
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
void up_irqinitialize(void);
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: esp32c3_bind_irq
|
* Name: esp32c3_bind_irq
|
||||||
*
|
*
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
#include <nuttx/power/pm.h>
|
|
||||||
|
|
||||||
#include "esp32c3_pm.h"
|
#include "esp32c3_pm.h"
|
||||||
|
|
||||||
@ -43,9 +42,6 @@
|
|||||||
|
|
||||||
void riscv_pminitialize(void)
|
void riscv_pminitialize(void)
|
||||||
{
|
{
|
||||||
/* Then initialize the NuttX power management subsystem proper */
|
|
||||||
|
|
||||||
pm_initialize();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_PM */
|
#endif /* CONFIG_PM */
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
#include <nuttx/irq.h>
|
#include <nuttx/irq.h>
|
||||||
#include <nuttx/arch.h>
|
#include <nuttx/arch.h>
|
||||||
#include <nuttx/serial/serial.h>
|
#include <nuttx/serial/serial.h>
|
||||||
#include <nuttx/power/pm.h>
|
|
||||||
|
|
||||||
#ifdef CONFIG_SERIAL_TERMIOS
|
#ifdef CONFIG_SERIAL_TERMIOS
|
||||||
# include <termios.h>
|
# include <termios.h>
|
||||||
|
@ -22,30 +22,13 @@
|
|||||||
* Included Files
|
* Included Files
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
|
||||||
|
|
||||||
#include <assert.h>
|
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
#include <nuttx/arch.h>
|
#include <nuttx/arch.h>
|
||||||
#include <nuttx/audio/audio.h>
|
#include <nuttx/audio/audio.h>
|
||||||
#include <nuttx/clock.h>
|
|
||||||
#include <nuttx/drivers/drivers.h>
|
|
||||||
#include <nuttx/fs/loop.h>
|
|
||||||
#include <nuttx/fs/ioctl.h>
|
|
||||||
#include <nuttx/kthread.h>
|
#include <nuttx/kthread.h>
|
||||||
#include <nuttx/motor/foc/foc_dummy.h>
|
#include <nuttx/motor/foc/foc_dummy.h>
|
||||||
#include <nuttx/net/loopback.h>
|
|
||||||
#include <nuttx/net/tun.h>
|
|
||||||
#include <nuttx/net/telnet.h>
|
|
||||||
#include <nuttx/mtd/mtd.h>
|
#include <nuttx/mtd/mtd.h>
|
||||||
#include <nuttx/note/note_driver.h>
|
|
||||||
#include <nuttx/syslog/syslog_console.h>
|
|
||||||
#include <nuttx/serial/pty.h>
|
|
||||||
#include <nuttx/spi/spi_flash.h>
|
#include <nuttx/spi/spi_flash.h>
|
||||||
#include <nuttx/spi/qspi_flash.h>
|
#include <nuttx/spi/qspi_flash.h>
|
||||||
#include <nuttx/crypto/crypto.h>
|
|
||||||
#include <nuttx/power/pm.h>
|
|
||||||
|
|
||||||
#include "up_internal.h"
|
#include "up_internal.h"
|
||||||
|
|
||||||
@ -206,19 +189,6 @@ static int up_loop_task(int argc, FAR char **argv)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void up_loop_init(void)
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
/* Use loop_task to simulate the IRQ */
|
|
||||||
|
|
||||||
ret = kthread_create("loop_task", 1,
|
|
||||||
CONFIG_DEFAULT_TASK_STACKSIZE,
|
|
||||||
up_loop_task, NULL);
|
|
||||||
|
|
||||||
DEBUGASSERT(ret > 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@ -245,70 +215,10 @@ static void up_loop_init(void)
|
|||||||
|
|
||||||
void up_initialize(void)
|
void up_initialize(void)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_PM
|
|
||||||
/* Initialize the power management subsystem. This MCU-specific function
|
|
||||||
* must be called *very* early in the initialization sequence *before* any
|
|
||||||
* other device drivers are initialized (since they may attempt to register
|
|
||||||
* with the power management subsystem).
|
|
||||||
*/
|
|
||||||
|
|
||||||
pm_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Register devices */
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_NULL)
|
|
||||||
devnull_register(); /* Standard /dev/null */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_RANDOM)
|
|
||||||
devrandom_register(); /* Standard /dev/random */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_URANDOM)
|
|
||||||
devurandom_register(); /* Standard /dev/urandom */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_ZERO)
|
|
||||||
devzero_register(); /* Standard /dev/zero */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_LOOP)
|
|
||||||
loop_register(); /* Standard /dev/loop */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DRIVER_NOTE)
|
|
||||||
note_register(); /* Non-standard /dev/note */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_RPMSG_UART
|
|
||||||
rpmsg_serialinit();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Register some tty-port to access tty-port on sim platform */
|
/* Register some tty-port to access tty-port on sim platform */
|
||||||
|
|
||||||
up_uartinit();
|
up_uartinit();
|
||||||
|
|
||||||
#if defined(CONFIG_CONSOLE_SYSLOG)
|
|
||||||
syslog_console_init();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_PSEUDOTERM_SUSV1
|
|
||||||
/* Register the master pseudo-terminal multiplexor device */
|
|
||||||
|
|
||||||
ptmx_register();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_CRYPTO)
|
|
||||||
/* Initialize the HW crypto and /dev/crypto */
|
|
||||||
|
|
||||||
up_cryptoinitialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_CRYPTO_CRYPTODEV
|
|
||||||
devcrypto_register();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_FS_FAT) && !defined(CONFIG_DISABLE_MOUNTPOINT)
|
#if defined(CONFIG_FS_FAT) && !defined(CONFIG_DISABLE_MOUNTPOINT)
|
||||||
up_registerblockdevice(); /* Our FAT ramdisk at /dev/ram0 */
|
up_registerblockdevice(); /* Our FAT ramdisk at /dev/ram0 */
|
||||||
#endif
|
#endif
|
||||||
@ -323,24 +233,6 @@ void up_initialize(void)
|
|||||||
usrsock_init();
|
usrsock_init();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_NET_LOOPBACK
|
|
||||||
/* Initialize the local loopback device */
|
|
||||||
|
|
||||||
localhost_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_NET_TUN
|
|
||||||
/* Initialize the TUN device */
|
|
||||||
|
|
||||||
tun_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_NETDEV_TELNET
|
|
||||||
/* Initialize the Telnet session factory */
|
|
||||||
|
|
||||||
telnet_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_FS_SMARTFS) && defined(CONFIG_MTD_SMART) && \
|
#if defined(CONFIG_FS_SMARTFS) && defined(CONFIG_MTD_SMART) && \
|
||||||
(defined(CONFIG_SPI_FLASH) || defined(CONFIG_QSPI_FLASH))
|
(defined(CONFIG_SPI_FLASH) || defined(CONFIG_QSPI_FLASH))
|
||||||
up_init_smartfs();
|
up_init_smartfs();
|
||||||
@ -351,5 +243,7 @@ void up_initialize(void)
|
|||||||
audio_register("pcm0c", sim_audio_initialize(false));
|
audio_register("pcm0c", sim_audio_initialize(false));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
up_loop_init();
|
kthread_create("loop_task", SCHED_PRIORITY_MIN,
|
||||||
|
CONFIG_DEFAULT_TASK_STACKSIZE,
|
||||||
|
up_loop_task, NULL);
|
||||||
}
|
}
|
||||||
|
@ -189,12 +189,6 @@ int up_init_ipi(int irq);
|
|||||||
void up_timer_update(void);
|
void up_timer_update(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* rpmsg_serialinit *********************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_RPMSG_UART
|
|
||||||
void rpmsg_serialinit(void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* up_uart.c ****************************************************************/
|
/* up_uart.c ****************************************************************/
|
||||||
|
|
||||||
void up_uartinit(void);
|
void up_uartinit(void);
|
||||||
|
@ -22,23 +22,8 @@
|
|||||||
* Included Files
|
* Included Files
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
|
||||||
|
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
#include <nuttx/arch.h>
|
#include <nuttx/arch.h>
|
||||||
#include <nuttx/sched_note.h>
|
#include <nuttx/board.h>
|
||||||
#include <nuttx/mm/iob.h>
|
|
||||||
#include <nuttx/drivers/drivers.h>
|
|
||||||
#include <nuttx/fs/loop.h>
|
|
||||||
#include <nuttx/net/loopback.h>
|
|
||||||
#include <nuttx/net/tun.h>
|
|
||||||
#include <nuttx/net/telnet.h>
|
|
||||||
#include <nuttx/syslog/syslog.h>
|
|
||||||
#include <nuttx/syslog/syslog_console.h>
|
|
||||||
#include <nuttx/serial/pty.h>
|
|
||||||
#include <nuttx/crypto/crypto.h>
|
|
||||||
|
|
||||||
#include <arch/board/board.h>
|
#include <arch/board/board.h>
|
||||||
|
|
||||||
#include "up_arch.h"
|
#include "up_arch.h"
|
||||||
@ -140,10 +125,6 @@ static inline void up_color_intstack(void)
|
|||||||
|
|
||||||
void up_initialize(void)
|
void up_initialize(void)
|
||||||
{
|
{
|
||||||
/* Initialize global variables */
|
|
||||||
|
|
||||||
g_current_regs = NULL;
|
|
||||||
|
|
||||||
/* Colorize the interrupt stack */
|
/* Colorize the interrupt stack */
|
||||||
|
|
||||||
up_color_intstack();
|
up_color_intstack();
|
||||||
@ -152,10 +133,6 @@ void up_initialize(void)
|
|||||||
|
|
||||||
up_addregion();
|
up_addregion();
|
||||||
|
|
||||||
/* Initialize the interrupt subsystem */
|
|
||||||
|
|
||||||
up_irqinitialize();
|
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_DMA
|
#ifdef CONFIG_ARCH_DMA
|
||||||
/* Initialize the DMA subsystem if the weak function up_dma_initialize has
|
/* Initialize the DMA subsystem if the weak function up_dma_initialize has
|
||||||
* been brought into the build
|
* been brought into the build
|
||||||
@ -169,109 +146,12 @@ void up_initialize(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_MM_IOB
|
|
||||||
/* Initialize IO buffering */
|
|
||||||
|
|
||||||
iob_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Register devices */
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_NULL)
|
|
||||||
devnull_register(); /* Standard /dev/null */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_RANDOM)
|
|
||||||
devrandom_register(); /* Standard /dev/random */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_URANDOM)
|
|
||||||
devurandom_register(); /* Standard /dev/urandom */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_ZERO)
|
|
||||||
devzero_register(); /* Standard /dev/zero */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_LOOP)
|
|
||||||
loop_register(); /* Standard /dev/loop */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_SCHED_INSTRUMENTATION_BUFFER) && \
|
|
||||||
defined(CONFIG_DRIVER_NOTE)
|
|
||||||
note_register(); /* Non-standard /dev/note */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialize the serial device driver */
|
/* Initialize the serial device driver */
|
||||||
|
|
||||||
#ifdef USE_SERIALDRIVER
|
#ifdef USE_SERIALDRIVER
|
||||||
up_serialinit();
|
up_serialinit();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_RPMSG_UART
|
|
||||||
rpmsg_serialinit();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialize the console device driver (if it is other than the standard
|
|
||||||
* serial driver).
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_LOWCONSOLE)
|
|
||||||
lowconsole_init();
|
|
||||||
#elif defined(CONFIG_CONSOLE_SYSLOG)
|
|
||||||
syslog_console_init();
|
|
||||||
#elif defined(CONFIG_RAMLOG_CONSOLE)
|
|
||||||
ramlog_consoleinit();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_PSEUDOTERM_SUSV1
|
|
||||||
/* Register the master pseudo-terminal multiplexor device */
|
|
||||||
|
|
||||||
(void)ptmx_register();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialize the console device driver (if it is other than the standard
|
|
||||||
* serial driver).
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if defined(CONFIG_CONSOLE_SYSLOG)
|
|
||||||
syslog_console_init();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_CRYPTO)
|
|
||||||
/* Initialize the HW crypto and /dev/crypto */
|
|
||||||
|
|
||||||
up_cryptoinitialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_CRYPTO_CRYPTODEV
|
|
||||||
devcrypto_register();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_NETDEV_LATEINIT
|
|
||||||
/* Initialize the network */
|
|
||||||
|
|
||||||
up_netinitialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_NETDEV_LOOPBACK
|
|
||||||
/* Initialize the local loopback device */
|
|
||||||
|
|
||||||
(void)localhost_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_NET_TUN
|
|
||||||
/* Initialize the TUN device */
|
|
||||||
|
|
||||||
(void)tun_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_NETDEV_TELNET
|
|
||||||
/* Initialize the Telnet session factory */
|
|
||||||
|
|
||||||
(void)telnet_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialize USB */
|
/* Initialize USB */
|
||||||
|
|
||||||
up_usbinitialize();
|
up_usbinitialize();
|
||||||
|
@ -183,14 +183,6 @@ void up_copystate(uint32_t *dest, uint32_t *src);
|
|||||||
|
|
||||||
void up_lowputs(const char *str);
|
void up_lowputs(const char *str);
|
||||||
|
|
||||||
/* Defined in drivers/lowconsole.c */
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEV_LOWCONSOLE
|
|
||||||
void lowconsole_init(void);
|
|
||||||
#else
|
|
||||||
# define lowconsole_init()
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Debug */
|
/* Debug */
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_STACKDUMP
|
#ifdef CONFIG_ARCH_STACKDUMP
|
||||||
@ -217,7 +209,6 @@ void up_sigdeliver(void);
|
|||||||
|
|
||||||
/* IRQs */
|
/* IRQs */
|
||||||
|
|
||||||
void up_irqinitialize(void);
|
|
||||||
bool up_pending_irq(int irq);
|
bool up_pending_irq(int irq);
|
||||||
void up_clrpend_irq(int irq);
|
void up_clrpend_irq(int irq);
|
||||||
|
|
||||||
@ -241,8 +232,6 @@ void up_lowputc(char ch);
|
|||||||
void up_earlyserialinit(void);
|
void up_earlyserialinit(void);
|
||||||
void up_serialinit(void);
|
void up_serialinit(void);
|
||||||
|
|
||||||
void rpmsg_serialinit(void);
|
|
||||||
|
|
||||||
/* Network */
|
/* Network */
|
||||||
|
|
||||||
#if defined(CONFIG_NET) && !defined(CONFIG_NETDEV_LATEINIT)
|
#if defined(CONFIG_NET) && !defined(CONFIG_NETDEV_LATEINIT)
|
||||||
|
@ -22,23 +22,8 @@
|
|||||||
* Included Files
|
* Included Files
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
|
||||||
|
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
#include <nuttx/arch.h>
|
#include <nuttx/arch.h>
|
||||||
#include <nuttx/board.h>
|
#include <nuttx/board.h>
|
||||||
#include <nuttx/drivers/drivers.h>
|
|
||||||
#include <nuttx/fs/loop.h>
|
|
||||||
#include <nuttx/net/loopback.h>
|
|
||||||
#include <nuttx/net/tun.h>
|
|
||||||
#include <nuttx/net/telnet.h>
|
|
||||||
#include <nuttx/note/note_driver.h>
|
|
||||||
#include <nuttx/syslog/syslog_console.h>
|
|
||||||
#include <nuttx/serial/pty.h>
|
|
||||||
#include <nuttx/crypto/crypto.h>
|
|
||||||
#include <nuttx/power/pm.h>
|
|
||||||
|
|
||||||
#include <arch/board/board.h>
|
#include <arch/board/board.h>
|
||||||
|
|
||||||
#include "up_arch.h"
|
#include "up_arch.h"
|
||||||
@ -67,10 +52,6 @@
|
|||||||
|
|
||||||
void up_initialize(void)
|
void up_initialize(void)
|
||||||
{
|
{
|
||||||
/* Initialize global variables */
|
|
||||||
|
|
||||||
g_current_regs = NULL;
|
|
||||||
|
|
||||||
/* Add any extra memory fragments to the memory manager */
|
/* Add any extra memory fragments to the memory manager */
|
||||||
|
|
||||||
up_addregion();
|
up_addregion();
|
||||||
@ -98,90 +79,18 @@ void up_initialize(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Register devices */
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_NULL)
|
|
||||||
devnull_register(); /* Standard /dev/null */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_RANDOM)
|
|
||||||
devrandom_register(); /* Standard /dev/random */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_URANDOM)
|
|
||||||
devurandom_register(); /* Standard /dev/urandom */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_ZERO)
|
|
||||||
devzero_register(); /* Standard /dev/zero */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_LOOP)
|
|
||||||
loop_register(); /* Standard /dev/loop */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DRIVER_NOTE)
|
|
||||||
note_register(); /* Non-standard /dev/note */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialize the serial device driver */
|
/* Initialize the serial device driver */
|
||||||
|
|
||||||
#ifdef USE_SERIALDRIVER
|
#ifdef USE_SERIALDRIVER
|
||||||
up_serialinit();
|
up_serialinit();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_RPMSG_UART
|
|
||||||
rpmsg_serialinit();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialize the console device driver (if it is other than the standard
|
|
||||||
* serial driver).
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if defined(CONFIG_CONSOLE_SYSLOG)
|
|
||||||
syslog_console_init();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_PSEUDOTERM_SUSV1
|
|
||||||
/* Register the master pseudo-terminal multiplexor device */
|
|
||||||
|
|
||||||
ptmx_register();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_CRYPTO)
|
|
||||||
/* Initialize the HW crypto and /dev/crypto */
|
|
||||||
|
|
||||||
up_cryptoinitialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_CRYPTO_CRYPTODEV
|
|
||||||
devcrypto_register();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_NETDEV_LATEINIT
|
#ifndef CONFIG_NETDEV_LATEINIT
|
||||||
/* Initialize the network */
|
/* Initialize the network */
|
||||||
|
|
||||||
up_netinitialize();
|
up_netinitialize();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_NET_LOOPBACK
|
|
||||||
/* Initialize the local loopback device */
|
|
||||||
|
|
||||||
localhost_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_NET_TUN
|
|
||||||
/* Initialize the TUN device */
|
|
||||||
|
|
||||||
tun_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_NETDEV_TELNET
|
|
||||||
/* Initialize the Telnet session factory */
|
|
||||||
|
|
||||||
telnet_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialize USB -- device and/or host */
|
/* Initialize USB -- device and/or host */
|
||||||
|
|
||||||
up_usbinitialize();
|
up_usbinitialize();
|
||||||
|
@ -201,14 +201,6 @@ void up_earlyserialinit(void);
|
|||||||
void up_serialinit(void);
|
void up_serialinit(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_RPMSG_UART
|
|
||||||
void rpmsg_serialinit(void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Defined in xyz_watchdog.c */
|
|
||||||
|
|
||||||
void up_wdtinit(void);
|
|
||||||
|
|
||||||
/* Defined in board/up_network.c */
|
/* Defined in board/up_network.c */
|
||||||
|
|
||||||
#if defined(CONFIG_NET) && !defined(CONFIG_NETDEV_LATEINIT)
|
#if defined(CONFIG_NET) && !defined(CONFIG_NETDEV_LATEINIT)
|
||||||
|
@ -22,28 +22,10 @@
|
|||||||
* Included Files
|
* Included Files
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
|
||||||
|
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
#include <nuttx/arch.h>
|
#include <nuttx/arch.h>
|
||||||
#include <nuttx/board.h>
|
#include <nuttx/board.h>
|
||||||
#include <nuttx/mm/iob.h>
|
|
||||||
#include <nuttx/drivers/drivers.h>
|
|
||||||
#include <nuttx/fs/loop.h>
|
|
||||||
#include <nuttx/net/loopback.h>
|
|
||||||
#include <nuttx/net/tun.h>
|
|
||||||
#include <nuttx/net/telnet.h>
|
|
||||||
#include <nuttx/syslog/syslog.h>
|
|
||||||
#include <nuttx/note/note_driver.h>
|
|
||||||
#include <nuttx/syslog/syslog_console.h>
|
|
||||||
#include <nuttx/serial/pty.h>
|
|
||||||
#include <nuttx/crypto/crypto.h>
|
|
||||||
#include <nuttx/power/pm.h>
|
|
||||||
|
|
||||||
#include <arch/board/board.h>
|
#include <arch/board/board.h>
|
||||||
|
|
||||||
#include "sched/sched.h"
|
|
||||||
#include "up_arch.h"
|
#include "up_arch.h"
|
||||||
#include "up_internal.h"
|
#include "up_internal.h"
|
||||||
|
|
||||||
@ -101,10 +83,6 @@ static void up_calibratedelay(void)
|
|||||||
|
|
||||||
void up_initialize(void)
|
void up_initialize(void)
|
||||||
{
|
{
|
||||||
/* Initialize global variables */
|
|
||||||
|
|
||||||
g_current_regs = NULL;
|
|
||||||
|
|
||||||
/* Add any extra memory fragments to the memory manager */
|
/* Add any extra memory fragments to the memory manager */
|
||||||
|
|
||||||
up_addregion();
|
up_addregion();
|
||||||
@ -132,90 +110,18 @@ void up_initialize(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Register devices */
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_NULL)
|
|
||||||
devnull_register(); /* Standard /dev/null */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_RANDOM)
|
|
||||||
devrandom_register(); /* Standard /dev/random */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_URANDOM)
|
|
||||||
devurandom_register(); /* Standard /dev/urandom */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_ZERO)
|
|
||||||
devzero_register(); /* Standard /dev/zero */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_LOOP)
|
|
||||||
loop_register(); /* Standard /dev/loop */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DRIVER_NOTE)
|
|
||||||
note_register(); /* Non-standard /dev/note */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialize the serial device driver */
|
/* Initialize the serial device driver */
|
||||||
|
|
||||||
#ifdef USE_SERIALDRIVER
|
#ifdef USE_SERIALDRIVER
|
||||||
up_serialinit();
|
up_serialinit();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_RPMSG_UART
|
|
||||||
rpmsg_serialinit();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialize the console device driver (if it is other than the standard
|
|
||||||
* serial driver).
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if defined(CONFIG_CONSOLE_SYSLOG)
|
|
||||||
syslog_console_init();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_PSEUDOTERM_SUSV1
|
|
||||||
/* Register the master pseudo-terminal multiplexor device */
|
|
||||||
|
|
||||||
ptmx_register();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_CRYPTO)
|
|
||||||
/* Initialize the HW crypto and /dev/crypto */
|
|
||||||
|
|
||||||
up_cryptoinitialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_CRYPTO_CRYPTODEV
|
|
||||||
devcrypto_register();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_NETDEV_LATEINIT
|
#ifndef CONFIG_NETDEV_LATEINIT
|
||||||
/* Initialize the network */
|
/* Initialize the network */
|
||||||
|
|
||||||
up_netinitialize();
|
up_netinitialize();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_NET_LOOPBACK
|
|
||||||
/* Initialize the local loopback device */
|
|
||||||
|
|
||||||
localhost_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_NET_TUN
|
|
||||||
/* Initialize the TUN device */
|
|
||||||
|
|
||||||
tun_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_NETDEV_TELNET
|
|
||||||
/* Initialize the Telnet session factory */
|
|
||||||
|
|
||||||
telnet_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialize USB -- device and/or host */
|
/* Initialize USB -- device and/or host */
|
||||||
|
|
||||||
up_usbinitialize();
|
up_usbinitialize();
|
||||||
|
@ -189,7 +189,6 @@ void x86_64_boardinitialize(void);
|
|||||||
void up_copystate(uint64_t *dest, uint64_t *src);
|
void up_copystate(uint64_t *dest, uint64_t *src);
|
||||||
void up_savestate(uint64_t *regs);
|
void up_savestate(uint64_t *regs);
|
||||||
void up_decodeirq(uint64_t *regs);
|
void up_decodeirq(uint64_t *regs);
|
||||||
void up_irqinitialize(void);
|
|
||||||
#ifdef CONFIG_ARCH_DMA
|
#ifdef CONFIG_ARCH_DMA
|
||||||
void weak_function up_dmainitialize(void);
|
void weak_function up_dmainitialize(void);
|
||||||
#endif
|
#endif
|
||||||
@ -218,10 +217,6 @@ void up_addregion(void);
|
|||||||
void up_earlyserialinit(void);
|
void up_earlyserialinit(void);
|
||||||
void up_serialinit(void);
|
void up_serialinit(void);
|
||||||
|
|
||||||
/* Defined in xyz_watchdog.c */
|
|
||||||
|
|
||||||
void up_wdtinit(void);
|
|
||||||
|
|
||||||
/* Defined in xyz_timerisr.c */
|
/* Defined in xyz_timerisr.c */
|
||||||
|
|
||||||
void x86_64_timer_calibrate_freq(void);
|
void x86_64_timer_calibrate_freq(void);
|
||||||
|
@ -320,8 +320,6 @@ void up_lowputc(char ch);
|
|||||||
void xtensa_earlyserialinit(void);
|
void xtensa_earlyserialinit(void);
|
||||||
void xtensa_serialinit(void);
|
void xtensa_serialinit(void);
|
||||||
|
|
||||||
void rpmsg_serialinit(void);
|
|
||||||
|
|
||||||
/* Network */
|
/* Network */
|
||||||
|
|
||||||
#if defined(CONFIG_NET) && !defined(CONFIG_NETDEV_LATEINIT)
|
#if defined(CONFIG_NET) && !defined(CONFIG_NETDEV_LATEINIT)
|
||||||
|
@ -22,23 +22,8 @@
|
|||||||
* Included Files
|
* Included Files
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
|
||||||
|
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
#include <nuttx/arch.h>
|
#include <nuttx/arch.h>
|
||||||
#include <nuttx/board.h>
|
#include <nuttx/board.h>
|
||||||
#include <nuttx/drivers/drivers.h>
|
|
||||||
#include <nuttx/fs/loop.h>
|
|
||||||
#include <nuttx/net/loopback.h>
|
|
||||||
#include <nuttx/net/tun.h>
|
|
||||||
#include <nuttx/net/telnet.h>
|
|
||||||
#include <nuttx/note/note_driver.h>
|
|
||||||
#include <nuttx/syslog/syslog_console.h>
|
|
||||||
#include <nuttx/serial/pty.h>
|
|
||||||
#include <nuttx/crypto/crypto.h>
|
|
||||||
#include <nuttx/power/pm.h>
|
|
||||||
|
|
||||||
#include <arch/board/board.h>
|
#include <arch/board/board.h>
|
||||||
|
|
||||||
#include "xtensa.h"
|
#include "xtensa.h"
|
||||||
@ -99,17 +84,8 @@ static inline void xtensa_color_intstack(void)
|
|||||||
|
|
||||||
void up_initialize(void)
|
void up_initialize(void)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
|
|
||||||
xtensa_color_intstack();
|
xtensa_color_intstack();
|
||||||
|
|
||||||
/* Initialize global variables */
|
|
||||||
|
|
||||||
for (i = 0; i < CONFIG_SMP_NCPUS; i++)
|
|
||||||
{
|
|
||||||
g_current_regs[i] = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Add any extra memory fragments to the memory manager */
|
/* Add any extra memory fragments to the memory manager */
|
||||||
|
|
||||||
xtensa_add_region();
|
xtensa_add_region();
|
||||||
@ -143,90 +119,18 @@ void up_initialize(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Register devices */
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_NULL)
|
|
||||||
devnull_register(); /* Standard /dev/null */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_RANDOM)
|
|
||||||
devrandom_register(); /* Standard /dev/random */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_URANDOM)
|
|
||||||
devurandom_register(); /* Standard /dev/urandom */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_ZERO)
|
|
||||||
devzero_register(); /* Standard /dev/zero */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_LOOP)
|
|
||||||
loop_register(); /* Standard /dev/loop */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DRIVER_NOTE)
|
|
||||||
note_register(); /* Non-standard /dev/note */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialize the serial device driver */
|
/* Initialize the serial device driver */
|
||||||
|
|
||||||
#ifdef USE_SERIALDRIVER
|
#ifdef USE_SERIALDRIVER
|
||||||
xtensa_serialinit();
|
xtensa_serialinit();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_RPMSG_UART
|
|
||||||
rpmsg_serialinit();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialize the console device driver (if it is other than the standard
|
|
||||||
* serial driver).
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if defined(CONFIG_CONSOLE_SYSLOG)
|
|
||||||
syslog_console_init();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_PSEUDOTERM_SUSV1
|
|
||||||
/* Register the master pseudo-terminal multiplexor device */
|
|
||||||
|
|
||||||
ptmx_register();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_CRYPTO)
|
|
||||||
/* Initialize the HW crypto and /dev/crypto */
|
|
||||||
|
|
||||||
up_cryptoinitialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_CRYPTO_CRYPTODEV
|
|
||||||
devcrypto_register();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_NETDEV_LATEINIT
|
#ifndef CONFIG_NETDEV_LATEINIT
|
||||||
/* Initialize the network */
|
/* Initialize the network */
|
||||||
|
|
||||||
up_netinitialize();
|
up_netinitialize();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_NET_LOOPBACK
|
|
||||||
/* Initialize the local loopback device */
|
|
||||||
|
|
||||||
localhost_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_NET_TUN
|
|
||||||
/* Initialize the TUN device */
|
|
||||||
|
|
||||||
tun_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_NETDEV_TELNET
|
|
||||||
/* Initialize the Telnet session factory */
|
|
||||||
|
|
||||||
telnet_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialize USB -- device and/or host */
|
/* Initialize USB -- device and/or host */
|
||||||
|
|
||||||
up_usbinitialize();
|
up_usbinitialize();
|
||||||
|
@ -23,8 +23,8 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
#include <nuttx/power/pm.h>
|
|
||||||
|
|
||||||
|
#include "xtensa.h"
|
||||||
#include "esp32_pm.h"
|
#include "esp32_pm.h"
|
||||||
|
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
@ -46,10 +46,6 @@ void xtensa_pminitialize(void)
|
|||||||
/* Initialize RTC parameters */
|
/* Initialize RTC parameters */
|
||||||
|
|
||||||
esp32_pminit();
|
esp32_pminit();
|
||||||
|
|
||||||
/* Then initialize the NuttX power management subsystem proper */
|
|
||||||
|
|
||||||
pm_initialize();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_PM */
|
#endif /* CONFIG_PM */
|
||||||
|
@ -22,23 +22,8 @@
|
|||||||
* Included Files
|
* Included Files
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
|
||||||
|
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
#include <nuttx/arch.h>
|
#include <nuttx/arch.h>
|
||||||
#include <nuttx/board.h>
|
#include <nuttx/board.h>
|
||||||
#include <nuttx/drivers/drivers.h>
|
|
||||||
#include <nuttx/fs/loop.h>
|
|
||||||
#include <nuttx/net/loopback.h>
|
|
||||||
#include <nuttx/net/tun.h>
|
|
||||||
#include <nuttx/net/telnet.h>
|
|
||||||
#include <nuttx/note/note_driver.h>
|
|
||||||
#include <nuttx/syslog/syslog_console.h>
|
|
||||||
#include <nuttx/serial/pty.h>
|
|
||||||
#include <nuttx/crypto/crypto.h>
|
|
||||||
#include <nuttx/power/pm.h>
|
|
||||||
|
|
||||||
#include <arch/board/board.h>
|
#include <arch/board/board.h>
|
||||||
|
|
||||||
#include "z16_arch.h"
|
#include "z16_arch.h"
|
||||||
@ -78,10 +63,6 @@ volatile FAR chipreg_t *g_current_regs;
|
|||||||
|
|
||||||
void up_initialize(void)
|
void up_initialize(void)
|
||||||
{
|
{
|
||||||
/* Initialize global variables */
|
|
||||||
|
|
||||||
g_current_regs = NULL;
|
|
||||||
|
|
||||||
#if CONFIG_MM_REGIONS > 1
|
#if CONFIG_MM_REGIONS > 1
|
||||||
/* Add any extra memory fragments to the memory manager */
|
/* Add any extra memory fragments to the memory manager */
|
||||||
|
|
||||||
@ -98,89 +79,17 @@ void up_initialize(void)
|
|||||||
up_pminitialize();
|
up_pminitialize();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Register devices */
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_NULL)
|
|
||||||
devnull_register(); /* Standard /dev/null */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_RANDOM)
|
|
||||||
devrandom_register(); /* Standard /dev/random */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_URANDOM)
|
|
||||||
devurandom_register(); /* Standard /dev/urandom */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_ZERO)
|
|
||||||
devzero_register(); /* Standard /dev/zero */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_LOOP)
|
|
||||||
loop_register(); /* Standard /dev/loop */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DRIVER_NOTE)
|
|
||||||
note_register(); /* Non-standard /dev/note */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialize the serial device driver */
|
/* Initialize the serial device driver */
|
||||||
|
|
||||||
#ifdef USE_SERIALDRIVER
|
#ifdef USE_SERIALDRIVER
|
||||||
z16_serialinit();
|
z16_serialinit();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_RPMSG_UART
|
|
||||||
rpmsg_serialinit();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialize the console device driver (if it is other than the standard
|
|
||||||
* serial driver).
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if defined(CONFIG_CONSOLE_SYSLOG)
|
|
||||||
syslog_console_init();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_PSEUDOTERM_SUSV1
|
|
||||||
/* Register the master pseudo-terminal multiplexor device */
|
|
||||||
|
|
||||||
ptmx_register();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_CRYPTO)
|
|
||||||
/* Initialize the HW crypto and /dev/crypto */
|
|
||||||
|
|
||||||
up_cryptoinitialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_CRYPTO_CRYPTODEV
|
|
||||||
devcrypto_register();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_NETDEV_LATEINIT
|
#ifndef CONFIG_NETDEV_LATEINIT
|
||||||
/* Initialize the network */
|
/* Initialize the network */
|
||||||
|
|
||||||
z16_netinitialize();
|
z16_netinitialize();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_NET_LOOPBACK
|
|
||||||
/* Initialize the local loopback device */
|
|
||||||
|
|
||||||
localhost_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_NET_TUN
|
|
||||||
/* Initialize the TUN device */
|
|
||||||
|
|
||||||
tun_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_NETDEV_TELNET
|
|
||||||
/* Initialize the Telnet session factory */
|
|
||||||
|
|
||||||
telnet_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
board_autoled_on(LED_IRQSENABLED);
|
board_autoled_on(LED_IRQSENABLED);
|
||||||
}
|
}
|
||||||
|
@ -148,10 +148,6 @@ void z16_serialinit(void);
|
|||||||
void z16_earlyserialinit(void);
|
void z16_earlyserialinit(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_RPMSG_UART
|
|
||||||
void rpmsg_serialinit(void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Defined in xyz_irq.c */
|
/* Defined in xyz_irq.c */
|
||||||
|
|
||||||
void z16_ack_irq(int irq);
|
void z16_ack_irq(int irq);
|
||||||
|
@ -22,24 +22,8 @@
|
|||||||
* Included Files
|
* Included Files
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
|
||||||
|
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
#include <nuttx/arch.h>
|
#include <nuttx/arch.h>
|
||||||
#include <nuttx/board.h>
|
#include <nuttx/board.h>
|
||||||
#include <nuttx/mm/mm.h>
|
|
||||||
#include <nuttx/drivers/drivers.h>
|
|
||||||
#include <nuttx/fs/loop.h>
|
|
||||||
#include <nuttx/net/loopback.h>
|
|
||||||
#include <nuttx/net/telnet.h>
|
|
||||||
#include <nuttx/net/tun.h>
|
|
||||||
#include <nuttx/note/note_driver.h>
|
|
||||||
#include <nuttx/syslog/syslog_console.h>
|
|
||||||
#include <nuttx/serial/pty.h>
|
|
||||||
#include <nuttx/crypto/crypto.h>
|
|
||||||
#include <nuttx/power/pm.h>
|
|
||||||
|
|
||||||
#include <arch/board/board.h>
|
#include <arch/board/board.h>
|
||||||
|
|
||||||
#include "chip/switch.h"
|
#include "chip/switch.h"
|
||||||
@ -97,89 +81,17 @@ void up_initialize(void)
|
|||||||
z80_mmu_initialize();
|
z80_mmu_initialize();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Register devices */
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_NULL)
|
|
||||||
devnull_register(); /* Standard /dev/null */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_RANDOM)
|
|
||||||
devrandom_register(); /* Standard /dev/random */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_URANDOM)
|
|
||||||
devurandom_register(); /* Standard /dev/urandom */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_ZERO)
|
|
||||||
devzero_register(); /* Standard /dev/zero */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_LOOP)
|
|
||||||
loop_register(); /* Standard /dev/loop */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DRIVER_NOTE)
|
|
||||||
note_register(); /* Non-standard /dev/note */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialize the serial device driver */
|
/* Initialize the serial device driver */
|
||||||
|
|
||||||
#ifdef USE_SERIALDRIVER
|
#ifdef USE_SERIALDRIVER
|
||||||
z80_serial_initialize();
|
z80_serial_initialize();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_RPMSG_UART
|
|
||||||
rpmsg_serialinit();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialize the console device driver (if it is other than the standard
|
|
||||||
* serial driver).
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if defined(CONFIG_CONSOLE_SYSLOG)
|
|
||||||
syslog_console_init();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_PSEUDOTERM_SUSV1
|
|
||||||
/* Register the master pseudo-terminal multiplexor device */
|
|
||||||
|
|
||||||
ptmx_register();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_CRYPTO)
|
|
||||||
/* Initialize the HW crypto and /dev/crypto */
|
|
||||||
|
|
||||||
up_cryptoinitialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_CRYPTO_CRYPTODEV
|
|
||||||
devcrypto_register();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_NETDEV_LATEINIT
|
#ifndef CONFIG_NETDEV_LATEINIT
|
||||||
/* Initialize the network */
|
/* Initialize the network */
|
||||||
|
|
||||||
up_netinitialize();
|
up_netinitialize();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_NET_LOOPBACK
|
|
||||||
/* Initialize the local loopback device */
|
|
||||||
|
|
||||||
localhost_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_NET_TUN
|
|
||||||
/* Initialize the TUN device */
|
|
||||||
|
|
||||||
tun_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_NETDEV_TELNET
|
|
||||||
/* Initialize the Telnet session factory */
|
|
||||||
|
|
||||||
telnet_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
board_autoled_on(LED_IRQSENABLED);
|
board_autoled_on(LED_IRQSENABLED);
|
||||||
}
|
}
|
||||||
|
@ -105,12 +105,6 @@ void z80_serial_initialize(void);
|
|||||||
# define z80_serial_initialize()
|
# define z80_serial_initialize()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_RPMSG_UART
|
|
||||||
void rpmsg_serialinit(void);
|
|
||||||
#else
|
|
||||||
# define rpmsg_serialinit()
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Architecture specific hook into the timer interrupt handler */
|
/* Architecture specific hook into the timer interrupt handler */
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_TIMERHOOK
|
#ifdef CONFIG_ARCH_TIMERHOOK
|
||||||
|
@ -28,8 +28,8 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
|
#include <nuttx/board.h>
|
||||||
#include <arch/board/board.h>
|
#include <arch/board/board.h>
|
||||||
#include <nuttx/power/pm.h>
|
|
||||||
|
|
||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
#include "arm_arch.h"
|
#include "arm_arch.h"
|
||||||
|
@ -28,8 +28,8 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
|
#include <nuttx/board.h>
|
||||||
#include <arch/board/board.h>
|
#include <arch/board/board.h>
|
||||||
#include <nuttx/power/pm.h>
|
|
||||||
|
|
||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
#include "arm_arch.h"
|
#include "arm_arch.h"
|
||||||
|
@ -28,8 +28,8 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
|
#include <nuttx/board.h>
|
||||||
#include <arch/board/board.h>
|
#include <arch/board/board.h>
|
||||||
#include <nuttx/power/pm.h>
|
|
||||||
|
|
||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
#include "arm_arch.h"
|
#include "arm_arch.h"
|
||||||
|
@ -29,7 +29,6 @@
|
|||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
#include <nuttx/board.h>
|
#include <nuttx/board.h>
|
||||||
#include <nuttx/power/pm.h>
|
|
||||||
#include <arch/board/board.h>
|
#include <arch/board/board.h>
|
||||||
|
|
||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
|
@ -28,8 +28,8 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
|
#include <nuttx/board.h>
|
||||||
#include <arch/board/board.h>
|
#include <arch/board/board.h>
|
||||||
#include <nuttx/power/pm.h>
|
|
||||||
|
|
||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
#include "arm_arch.h"
|
#include "arm_arch.h"
|
||||||
|
@ -29,7 +29,6 @@
|
|||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
#include <nuttx/board.h>
|
#include <nuttx/board.h>
|
||||||
#include <nuttx/power/pm.h>
|
|
||||||
#include <arch/board/board.h>
|
#include <arch/board/board.h>
|
||||||
|
|
||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
|
@ -24,8 +24,6 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <nuttx/power/pm.h>
|
|
||||||
|
|
||||||
#include "arm_internal.h"
|
#include "arm_internal.h"
|
||||||
#include "stm32_pm.h"
|
#include "stm32_pm.h"
|
||||||
#include "mikroe-stm32f4.h"
|
#include "mikroe-stm32f4.h"
|
||||||
@ -56,10 +54,6 @@
|
|||||||
|
|
||||||
void arm_pminitialize(void)
|
void arm_pminitialize(void)
|
||||||
{
|
{
|
||||||
/* Then initialize the NuttX power management subsystem proper */
|
|
||||||
|
|
||||||
pm_initialize();
|
|
||||||
|
|
||||||
#if defined(CONFIG_ARCH_IDLE_CUSTOM) && defined(CONFIG_PM_BUTTONS)
|
#if defined(CONFIG_ARCH_IDLE_CUSTOM) && defined(CONFIG_PM_BUTTONS)
|
||||||
/* Initialize the buttons to wake up the system from low power modes */
|
/* Initialize the buttons to wake up the system from low power modes */
|
||||||
|
|
||||||
|
@ -27,8 +27,9 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
|
#include <nuttx/board.h>
|
||||||
#include <arch/board/board.h>
|
#include <arch/board/board.h>
|
||||||
#include <nuttx/power/pm.h>
|
|
||||||
|
|
||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
#include "arm_arch.h"
|
#include "arm_arch.h"
|
||||||
|
@ -27,8 +27,9 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
|
#include <nuttx/board.h>
|
||||||
#include <arch/board/board.h>
|
#include <arch/board/board.h>
|
||||||
#include <nuttx/power/pm.h>
|
|
||||||
|
|
||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
#include "arm_arch.h"
|
#include "arm_arch.h"
|
||||||
|
@ -24,9 +24,6 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <nuttx/board.h>
|
|
||||||
#include <nuttx/power/pm.h>
|
|
||||||
|
|
||||||
#include "arm_internal.h"
|
#include "arm_internal.h"
|
||||||
#include "stm32_pm.h"
|
#include "stm32_pm.h"
|
||||||
#include "omnibusf4.h"
|
#include "omnibusf4.h"
|
||||||
@ -57,10 +54,6 @@
|
|||||||
|
|
||||||
void arm_pminitialize(void)
|
void arm_pminitialize(void)
|
||||||
{
|
{
|
||||||
/* Then initialize the NuttX power management subsystem proper */
|
|
||||||
|
|
||||||
pm_initialize();
|
|
||||||
|
|
||||||
#if defined(CONFIG_ARCH_IDLE_CUSTOM) && defined(CONFIG_PM_BUTTONS)
|
#if defined(CONFIG_ARCH_IDLE_CUSTOM) && defined(CONFIG_PM_BUTTONS)
|
||||||
/* Initialize the buttons to wake up the system from low power modes */
|
/* Initialize the buttons to wake up the system from low power modes */
|
||||||
|
|
||||||
|
@ -24,8 +24,6 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <nuttx/power/pm.h>
|
|
||||||
|
|
||||||
#include "arm_internal.h"
|
#include "arm_internal.h"
|
||||||
#include "stm32_pm.h"
|
#include "stm32_pm.h"
|
||||||
#include "stm3210e-eval.h"
|
#include "stm3210e-eval.h"
|
||||||
@ -56,10 +54,6 @@
|
|||||||
|
|
||||||
void arm_pminitialize(void)
|
void arm_pminitialize(void)
|
||||||
{
|
{
|
||||||
/* Then initialize the NuttX power management subsystem proper */
|
|
||||||
|
|
||||||
pm_initialize();
|
|
||||||
|
|
||||||
#if defined(CONFIG_ARCH_IDLE_CUSTOM) && defined(CONFIG_PM_BUTTONS)
|
#if defined(CONFIG_ARCH_IDLE_CUSTOM) && defined(CONFIG_PM_BUTTONS)
|
||||||
/* Initialize the buttons to wake up the system from low power modes */
|
/* Initialize the buttons to wake up the system from low power modes */
|
||||||
|
|
||||||
|
@ -24,9 +24,6 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <nuttx/board.h>
|
|
||||||
#include <nuttx/power/pm.h>
|
|
||||||
|
|
||||||
#include "arm_internal.h"
|
#include "arm_internal.h"
|
||||||
#include "stm32_pm.h"
|
#include "stm32_pm.h"
|
||||||
#include "stm32f4discovery.h"
|
#include "stm32f4discovery.h"
|
||||||
@ -57,10 +54,6 @@
|
|||||||
|
|
||||||
void arm_pminitialize(void)
|
void arm_pminitialize(void)
|
||||||
{
|
{
|
||||||
/* Then initialize the NuttX power management subsystem proper */
|
|
||||||
|
|
||||||
pm_initialize();
|
|
||||||
|
|
||||||
#if defined(CONFIG_ARCH_IDLE_CUSTOM) && defined(CONFIG_PM_BUTTONS)
|
#if defined(CONFIG_ARCH_IDLE_CUSTOM) && defined(CONFIG_PM_BUTTONS)
|
||||||
/* Initialize the buttons to wake up the system from low power modes */
|
/* Initialize the buttons to wake up the system from low power modes */
|
||||||
|
|
||||||
|
@ -29,7 +29,6 @@
|
|||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
#include <nuttx/board.h>
|
#include <nuttx/board.h>
|
||||||
#include <nuttx/power/pm.h>
|
|
||||||
#include <arch/board/board.h>
|
#include <arch/board/board.h>
|
||||||
|
|
||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
|
@ -20,6 +20,8 @@
|
|||||||
|
|
||||||
include $(TOPDIR)/Make.defs
|
include $(TOPDIR)/Make.defs
|
||||||
|
|
||||||
|
CSRCS = drivers_initialize.c
|
||||||
|
|
||||||
# Include support for various drivers. Each Make.defs file will add its
|
# Include support for various drivers. Each Make.defs file will add its
|
||||||
# files to the source file list, add its DEPPATH info, and will add
|
# files to the source file list, add its DEPPATH info, and will add
|
||||||
# the appropriate paths to the VPATH variable
|
# the appropriate paths to the VPATH variable
|
||||||
|
139
drivers/drivers_initialize.c
Normal file
139
drivers/drivers_initialize.c
Normal file
@ -0,0 +1,139 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
* drivers/drivers_initialize.c
|
||||||
|
*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership. The
|
||||||
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the
|
||||||
|
* License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
* License for the specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Included Files
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#include <nuttx/crypto/crypto.h>
|
||||||
|
#include <nuttx/drivers/drivers.h>
|
||||||
|
#include <nuttx/fs/loop.h>
|
||||||
|
#include <nuttx/net/loopback.h>
|
||||||
|
#include <nuttx/net/tun.h>
|
||||||
|
#include <nuttx/net/telnet.h>
|
||||||
|
#include <nuttx/note/note_driver.h>
|
||||||
|
#include <nuttx/power/pm.h>
|
||||||
|
#include <nuttx/syslog/syslog.h>
|
||||||
|
#include <nuttx/syslog/syslog_console.h>
|
||||||
|
#include <nuttx/serial/pty.h>
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Public Functions
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: drivers_initialize
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* drivers_initialize will be called once during OS initialization after
|
||||||
|
* the basic OS services have been initialized.
|
||||||
|
*
|
||||||
|
* drivers_initialize is called after the OS initialized but before the
|
||||||
|
* user initialization logic has been started and before the libraries
|
||||||
|
* have been initialized. OS services and driver services are available.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
void drivers_initialize(void)
|
||||||
|
{
|
||||||
|
#ifdef CONFIG_PM
|
||||||
|
/* Initialize power management subsystem proper */
|
||||||
|
|
||||||
|
pm_initialize();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Register devices */
|
||||||
|
|
||||||
|
syslog_initialize();
|
||||||
|
|
||||||
|
#if defined(CONFIG_DEV_NULL)
|
||||||
|
devnull_register(); /* Standard /dev/null */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(CONFIG_DEV_RANDOM)
|
||||||
|
devrandom_register(); /* Standard /dev/random */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(CONFIG_DEV_URANDOM)
|
||||||
|
devurandom_register(); /* Standard /dev/urandom */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(CONFIG_DEV_ZERO)
|
||||||
|
devzero_register(); /* Standard /dev/zero */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(CONFIG_DEV_LOOP)
|
||||||
|
loop_register(); /* Standard /dev/loop */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(CONFIG_DRIVER_NOTE)
|
||||||
|
note_register(); /* Non-standard /dev/note */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Initialize the serial device driver */
|
||||||
|
|
||||||
|
#ifdef CONFIG_RPMSG_UART
|
||||||
|
rpmsg_serialinit();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Initialize the console device driver (if it is other than the standard
|
||||||
|
* serial driver).
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined(CONFIG_LWL_CONSOLE)
|
||||||
|
lwlconsole_init();
|
||||||
|
#elif defined(CONFIG_CONSOLE_SYSLOG)
|
||||||
|
syslog_console_init();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_PSEUDOTERM_SUSV1
|
||||||
|
/* Register the master pseudo-terminal multiplexor device */
|
||||||
|
|
||||||
|
ptmx_register();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(CONFIG_CRYPTO)
|
||||||
|
/* Initialize the HW crypto and /dev/crypto */
|
||||||
|
|
||||||
|
up_cryptoinitialize();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_CRYPTO_CRYPTODEV
|
||||||
|
devcrypto_register();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_NET_LOOPBACK
|
||||||
|
/* Initialize the local loopback device */
|
||||||
|
|
||||||
|
localhost_initialize();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_NET_TUN
|
||||||
|
/* Initialize the TUN device */
|
||||||
|
|
||||||
|
tun_initialize();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_NETDEV_TELNET
|
||||||
|
/* Initialize the Telnet session factory */
|
||||||
|
|
||||||
|
telnet_initialize();
|
||||||
|
#endif
|
||||||
|
}
|
@ -36,7 +36,6 @@
|
|||||||
#include <nuttx/fs/fs.h>
|
#include <nuttx/fs/fs.h>
|
||||||
#include <nuttx/irq.h>
|
#include <nuttx/irq.h>
|
||||||
#include <nuttx/kmalloc.h>
|
#include <nuttx/kmalloc.h>
|
||||||
#include <nuttx/power/pm.h>
|
|
||||||
#include <nuttx/semaphore.h>
|
#include <nuttx/semaphore.h>
|
||||||
#include <nuttx/efuse/efuse.h>
|
#include <nuttx/efuse/efuse.h>
|
||||||
|
|
||||||
|
@ -43,6 +43,16 @@ extern "C"
|
|||||||
#define EXTERN extern
|
#define EXTERN extern
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: drivers_initialize
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Initialize chip and board independent general driver
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
void drivers_initialize(void);
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: devnull_register
|
* Name: devnull_register
|
||||||
*
|
*
|
||||||
@ -217,6 +227,16 @@ ssize_t bchlib_write(FAR void *handle, FAR const char *buffer, size_t offset,
|
|||||||
|
|
||||||
void lwlconsole_init(void);
|
void lwlconsole_init(void);
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: rpmsg_serialinit
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Register rpmsg serial driver
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
void rpmsg_serialinit(void);
|
||||||
|
|
||||||
#undef EXTERN
|
#undef EXTERN
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
}
|
}
|
||||||
|
@ -39,8 +39,8 @@
|
|||||||
#include <nuttx/mm/mm.h>
|
#include <nuttx/mm/mm.h>
|
||||||
#include <nuttx/kmalloc.h>
|
#include <nuttx/kmalloc.h>
|
||||||
#include <nuttx/sched_note.h>
|
#include <nuttx/sched_note.h>
|
||||||
#include <nuttx/syslog/syslog.h>
|
|
||||||
#include <nuttx/binfmt/binfmt.h>
|
#include <nuttx/binfmt/binfmt.h>
|
||||||
|
#include <nuttx/drivers/drivers.h>
|
||||||
#include <nuttx/init.h>
|
#include <nuttx/init.h>
|
||||||
#include <nuttx/tls.h>
|
#include <nuttx/tls.h>
|
||||||
|
|
||||||
@ -648,6 +648,10 @@ void nx_start(void)
|
|||||||
binfmt_initialize();
|
binfmt_initialize();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Initialize common drivers */
|
||||||
|
|
||||||
|
drivers_initialize();
|
||||||
|
|
||||||
/* Initialize Hardware Facilities *****************************************/
|
/* Initialize Hardware Facilities *****************************************/
|
||||||
|
|
||||||
/* The processor specific details of running the operating system
|
/* The processor specific details of running the operating system
|
||||||
@ -698,15 +702,6 @@ void nx_start(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Start SYSLOG ***********************************************************/
|
|
||||||
|
|
||||||
/* Late initialization of the system logging device. Some SYSLOG channel
|
|
||||||
* must be initialized late in the initialization sequence because it may
|
|
||||||
* depend on having IDLE task file structures setup.
|
|
||||||
*/
|
|
||||||
|
|
||||||
syslog_initialize();
|
|
||||||
|
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
/* Start all CPUs *********************************************************/
|
/* Start all CPUs *********************************************************/
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user