S32K148EVB netdev lateinit to support Enet & CAN at the same time
This commit is contained in:
parent
eca1011b1e
commit
4a40a7c3d7
@ -55,7 +55,7 @@
|
||||
#define EMAC_INTF 0
|
||||
|
||||
/************************************************************************************
|
||||
* Public Functions
|
||||
* Public Function Prototypes
|
||||
************************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
@ -69,6 +69,8 @@ extern "C"
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
#if !defined(CONFIG_NETDEV_LATEINIT)
|
||||
|
||||
/************************************************************************************
|
||||
* Function: arm_netinitialize
|
||||
*
|
||||
@ -91,6 +93,29 @@ extern "C"
|
||||
|
||||
void arm_netinitialize(void);
|
||||
|
||||
#else
|
||||
|
||||
/************************************************************************************
|
||||
* Function: s32k1xx_netinitialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the Ethernet controller and driver
|
||||
*
|
||||
* Input Parameters:
|
||||
* intf - In the case where there are multiple EMACs, this value
|
||||
* identifies which EMAC is to be initialized.
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success; Negated errno on failure.
|
||||
*
|
||||
* Assumptions:
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
int s32k1xx_netinitialize(int intf);
|
||||
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
* Function: s32k1xx_phy_boardinitialize
|
||||
*
|
||||
|
@ -69,6 +69,10 @@
|
||||
#include "s32k1xx_progmem.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_S32K1XX_EEEPROM
|
||||
#include "s32k1xx_eeeprom.h"
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
@ -55,6 +55,10 @@
|
||||
# include "s32k1xx_eeeprom.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_S32K1XX_FLEXCAN
|
||||
# include "s32k1xx_flexcan.h"
|
||||
#endif
|
||||
|
||||
#include "s32k148evb.h"
|
||||
|
||||
/****************************************************************************
|
||||
@ -113,6 +117,26 @@ int s32k1xx_bringup(void)
|
||||
/* Register EEEPROM block device */
|
||||
|
||||
s32k1xx_eeeprom_register(0, 4096);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NETDEV_LATEINIT
|
||||
|
||||
# ifdef CONFIG_S32K1XX_ENET
|
||||
s32k1xx_netinitialize(0);
|
||||
# endif
|
||||
|
||||
# ifdef CONFIG_S32K1XX_FLEXCAN0
|
||||
s32k1xx_caninitialize(0);
|
||||
# endif
|
||||
|
||||
# ifdef CONFIG_S32K1XX_FLEXCAN1
|
||||
s32k1xx_caninitialize(1);
|
||||
# endif
|
||||
|
||||
# ifdef CONFIG_S32K1XX_FLEXCAN2
|
||||
s32k1xx_caninitialize(2);
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user