stm32: SocketCAN: allow non-late netdev initialization
This commit is contained in:
parent
b6d9eab7c9
commit
0a37bd8d4f
@ -2461,3 +2461,28 @@ int stm32_cansockinitialize(int port)
|
||||
errout:
|
||||
return ret;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: arm_netinitialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the CAN device interfaces. If there is more than one device
|
||||
* interface in the chip, then board-specific logic will have to provide
|
||||
* this function to determine which, if any, CAN interfaces should be
|
||||
* initialized.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if !defined(CONFIG_NETDEV_LATEINIT)
|
||||
void arm_netinitialize(void)
|
||||
{
|
||||
#ifdef CONFIG_STM32_CAN1
|
||||
stm32_cansockinitialize(0);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_CAN2
|
||||
stm32_cansockinitialize(1);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -3293,3 +3293,28 @@ int stm32_fdcansockinitialize(int port)
|
||||
errout:
|
||||
return ret;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: arm_netinitialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the CAN device interfaces. If there is more than one device
|
||||
* interface in the chip, then board-specific logic will have to provide
|
||||
* this function to determine which, if any, CAN interfaces should be
|
||||
* initialized.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if !defined(CONFIG_NETDEV_LATEINIT)
|
||||
void arm_netinitialize(void)
|
||||
{
|
||||
#ifdef CONFIG_STM32_CAN1
|
||||
stm32_fdcansockinitialize(0);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_CAN2
|
||||
stm32_fdcansockinitialize(1);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user