netinitialize: call xxx_netinitialize unconditionally
The xxx_netinitialize is defined to a function only if CONFIG_NET=y and CONFIG_NETDEV_LATEINIT=n. Otherwise it is defined to an empty macro. Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
parent
00efcd3308
commit
3fff4508c7
@ -122,11 +122,9 @@ void up_initialize(void)
|
||||
arm_serialinit();
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_NETDEV_LATEINIT
|
||||
/* Initialize the network */
|
||||
|
||||
arm_netinitialize();
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_USBDEV) || defined(CONFIG_USBHOST)
|
||||
/* Initialize USB -- device and/or host */
|
||||
|
@ -54,30 +54,6 @@ extern "C"
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Function: arm_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 arm_internal.h.
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success; Negated errno on failure.
|
||||
*
|
||||
* Assumptions:
|
||||
* Called very early in the initialization sequence.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if !defined(CONFIG_NETDEV_LATEINIT)
|
||||
void arm_netinitialize(void);
|
||||
#else
|
||||
|
||||
/****************************************************************************
|
||||
* Function: imxrt_netinitialize
|
||||
*
|
||||
@ -95,6 +71,7 @@ void arm_netinitialize(void);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_NETDEV_LATEINIT
|
||||
int imxrt_netinitialize(int intf);
|
||||
#endif
|
||||
|
||||
|
@ -70,31 +70,8 @@ extern "C"
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if !defined(CONFIG_NETDEV_LATEINIT)
|
||||
|
||||
void arm_netinitialize(void);
|
||||
|
||||
/****************************************************************************
|
||||
* Function: imxrt_caninitialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the CAN controller and driver
|
||||
*
|
||||
* Input Parameters:
|
||||
* intf - In the case where there are multiple CAN devices, this value
|
||||
* identifies which CAN device is to be initialized.
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success; Negated errno on failure.
|
||||
*
|
||||
* Assumptions:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#else
|
||||
|
||||
#ifdef CONFIG_NETDEV_LATEINIT
|
||||
int imxrt_caninitialize(int intf);
|
||||
|
||||
#endif
|
||||
|
||||
#undef EXTERN
|
||||
@ -104,4 +81,4 @@ int imxrt_caninitialize(int intf);
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* CONFIG_IMXRT_FLEXCAN */
|
||||
#endif /* __ARCH_ARM_SRC_IMXRT_IMXRT_FLEXCAN_H */
|
||||
#endif /* __ARCH_ARM_SRC_IMXRT_IMXRT_FLEXCAN_H */
|
||||
|
@ -54,32 +54,6 @@ extern "C"
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
#if !defined(CONFIG_NETDEV_LATEINIT)
|
||||
|
||||
/****************************************************************************
|
||||
* Function: arm_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 arm_internal.h.
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success; Negated errno on failure.
|
||||
*
|
||||
* Assumptions:
|
||||
* Called very early in the initialization sequence.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void arm_netinitialize(void);
|
||||
|
||||
#else
|
||||
|
||||
/****************************************************************************
|
||||
* Function: s32k1xx_netinitialize
|
||||
*
|
||||
@ -97,8 +71,8 @@ void arm_netinitialize(void);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_NETDEV_LATEINIT
|
||||
int s32k1xx_netinitialize(int intf);
|
||||
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -50,32 +50,6 @@ extern "C"
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
#if !defined(CONFIG_NETDEV_LATEINIT)
|
||||
|
||||
/****************************************************************************
|
||||
* Function: arm_netinitialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the enabled CAN device interfaces. If there are more
|
||||
* different network devices in the chip, then board-specific logic will
|
||||
* have to provide this function to determine which, if any, network
|
||||
* devices should be initialized.
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success; Negated errno on failure.
|
||||
*
|
||||
* Assumptions:
|
||||
* Called very early in the initialization sequence.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void arm_netinitialize(void);
|
||||
|
||||
#else
|
||||
|
||||
/****************************************************************************
|
||||
* Function: s32k1xx_caninitialize
|
||||
*
|
||||
@ -93,8 +67,8 @@ void arm_netinitialize(void);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_NETDEV_LATEINIT
|
||||
int s32k1xx_caninitialize(int intf);
|
||||
|
||||
#endif
|
||||
|
||||
#undef EXTERN
|
||||
|
@ -55,25 +55,6 @@ extern "C"
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Function: arm_netinitialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the EMAC driver. Also prototyped in arm_internal.h.
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success; Negated errno on failure.
|
||||
*
|
||||
* Assumptions:
|
||||
* Called very early in the initialization sequence.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void arm_netinitialize(void);
|
||||
|
||||
/****************************************************************************
|
||||
* Function: sam_phy_boardinitialize
|
||||
*
|
||||
|
@ -151,11 +151,9 @@ void up_initialize(void)
|
||||
up_serialinit();
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_NETDEV_LATEINIT
|
||||
/* Initialize the network */
|
||||
|
||||
up_netinitialize();
|
||||
#endif
|
||||
|
||||
/* Initialize USB */
|
||||
|
||||
|
@ -107,11 +107,9 @@ void up_initialize(void)
|
||||
up_serialinit();
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_NETDEV_LATEINIT
|
||||
/* Initialize the network */
|
||||
|
||||
up_netinitialize();
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_USBDEV) || defined(CONFIG_USBHOST)
|
||||
/* Initialize USB -- device and/or host */
|
||||
|
@ -84,11 +84,9 @@ void up_initialize(void)
|
||||
up_serialinit();
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_NETDEV_LATEINIT
|
||||
/* Initialize the network */
|
||||
|
||||
up_netinitialize();
|
||||
#endif
|
||||
|
||||
/* Initialize USB */
|
||||
|
||||
|
@ -84,11 +84,9 @@ void up_initialize(void)
|
||||
up_serialinit();
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_NETDEV_LATEINIT
|
||||
/* Initialize the network */
|
||||
|
||||
up_netinitialize();
|
||||
#endif
|
||||
|
||||
/* Initialize USB -- device and/or host */
|
||||
|
||||
|
@ -180,11 +180,9 @@ void up_initialize(void)
|
||||
|
||||
or1k_print_cpuinfo();
|
||||
|
||||
#ifndef CONFIG_NETDEV_LATEINIT
|
||||
/* Initialize the network */
|
||||
|
||||
up_netinitialize();
|
||||
#endif
|
||||
|
||||
/* Initialize USB -- device and/or host */
|
||||
|
||||
|
@ -67,11 +67,9 @@ void up_initialize(void)
|
||||
up_serialinit();
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_NETDEV_LATEINIT
|
||||
/* Initialize the network */
|
||||
|
||||
up_netinitialize();
|
||||
#endif
|
||||
|
||||
/* Initialize USB */
|
||||
|
||||
|
@ -105,11 +105,9 @@ void up_initialize(void)
|
||||
riscv_serialinit();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NET
|
||||
/* Initialize the network */
|
||||
|
||||
riscv_netinitialize();
|
||||
#endif
|
||||
|
||||
board_autoled_on(LED_IRQSENABLED);
|
||||
}
|
||||
|
@ -52,8 +52,8 @@
|
||||
#endif
|
||||
|
||||
#include "riscv_internal.h"
|
||||
#include "hardware/mpfs_ethernet.h"
|
||||
#include "mpfs_memorymap.h"
|
||||
#include "mpfs_ethernet.h"
|
||||
|
||||
#if defined(CONFIG_NET) && defined(CONFIG_MPFS_ETHMAC)
|
||||
|
||||
|
@ -61,7 +61,9 @@ extern "C"
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_NETDEV_LATEINIT
|
||||
int mpfs_ethinitialize(int intf);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Function: mpfs_phy_boardinitialize
|
||||
|
@ -84,11 +84,9 @@ void up_initialize(void)
|
||||
up_serialinit();
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_NETDEV_LATEINIT
|
||||
/* Initialize the network */
|
||||
|
||||
up_netinitialize();
|
||||
#endif
|
||||
|
||||
/* Initialize USB -- device and/or host */
|
||||
|
||||
|
@ -115,11 +115,9 @@ void up_initialize(void)
|
||||
up_serialinit();
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_NETDEV_LATEINIT
|
||||
/* Initialize the network */
|
||||
|
||||
up_netinitialize();
|
||||
#endif
|
||||
|
||||
/* Initialize USB -- device and/or host */
|
||||
|
||||
|
@ -125,11 +125,9 @@ void up_initialize(void)
|
||||
xtensa_serialinit();
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_NETDEV_LATEINIT
|
||||
/* Initialize the network */
|
||||
|
||||
up_netinitialize();
|
||||
#endif
|
||||
|
||||
/* Initialize USB -- device and/or host */
|
||||
|
||||
|
@ -84,11 +84,9 @@ void up_initialize(void)
|
||||
z16_serialinit();
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_NETDEV_LATEINIT
|
||||
/* Initialize the network */
|
||||
|
||||
z16_netinitialize();
|
||||
#endif
|
||||
|
||||
board_autoled_on(LED_IRQSENABLED);
|
||||
}
|
||||
|
@ -86,11 +86,9 @@ void up_initialize(void)
|
||||
z80_serial_initialize();
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_NETDEV_LATEINIT
|
||||
/* Initialize the network */
|
||||
|
||||
up_netinitialize();
|
||||
#endif
|
||||
|
||||
board_autoled_on(LED_IRQSENABLED);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user