diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2013-09-14 08:19:36 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2013-09-14 08:19:36 -0600 |
commit | 06bf997730c96a77095d8beb789577a376856c4e (patch) | |
tree | b7b9dfa0ca260bba9f623f9b3c767ac2de19cb97 /nuttx/arch/arm/src/sama5/sam_emac.h | |
parent | 7581dba539fa936ae5ebc9c91e34553118b8a51a (diff) | |
download | px4-nuttx-06bf997730c96a77095d8beb789577a376856c4e.tar.gz px4-nuttx-06bf997730c96a77095d8beb789577a376856c4e.tar.bz2 px4-nuttx-06bf997730c96a77095d8beb789577a376856c4e.zip |
SAMA5: Update Ethernet initalization logic to handle both EMAC and GMAC
Diffstat (limited to 'nuttx/arch/arm/src/sama5/sam_emac.h')
-rw-r--r-- | nuttx/arch/arm/src/sama5/sam_emac.h | 51 |
1 files changed, 40 insertions, 11 deletions
diff --git a/nuttx/arch/arm/src/sama5/sam_emac.h b/nuttx/arch/arm/src/sama5/sam_emac.h index df71da4b8..31b73ee25 100644 --- a/nuttx/arch/arm/src/sama5/sam_emac.h +++ b/nuttx/arch/arm/src/sama5/sam_emac.h @@ -45,12 +45,20 @@ #include "chip.h" #include "chip/sam_emac.h" -#ifndef __ASSEMBLY__ +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ +/* Definitions for use with sam_phy_boardinitialize */ + +#define GMAC_INTF 0 +#define EMAC_INTF 1 /************************************************************************************ * Public Functions ************************************************************************************/ +#ifndef __ASSEMBLY__ + #undef EXTERN #if defined(__cplusplus) #define EXTERN extern "C" @@ -59,26 +67,47 @@ extern "C" { #define EXTERN extern #endif -/************************************************************************************ - * Function: sam_ethinitialize +/**************************************************************************** + * Function: sam_gmac_initialize * * Description: - * Initialize the Ethernet driver for one interface. If the STM32 chip supports - * multiple Ethernet controllers, then board specific logic must implement - * up_netinitialize() and call this function to initialize the desired interfaces. + * Initialize the GMAC driver. * - * Parameters: - * intf - In the case where there are multiple EMACs, this value identifies which - * EMAC is to be initialized. + * Input Parameters: + * None * * Returned Value: * OK on success; Negated errno on failure. * * Assumptions: + * Called very early in the initialization sequence. * - ************************************************************************************/ + ****************************************************************************/ + +#ifdef CONFIG_SAMA5_GMAC +int sam_gmac_initialize(void); +#endif -int sam_ethinitialize(int intf); +/**************************************************************************** + * Function: sam_emac_initialize + * + * Description: + * Initialize the EMAC driver. + * + * Input Parameters: + * None + * + * Returned Value: + * OK on success; Negated errno on failure. + * + * Assumptions: + * Called very early in the initialization sequence. + * + ****************************************************************************/ + +#ifdef CONFIG_SAMA5_EMAC +int sam_emac_initialize(void); +#endif /************************************************************************************ * Function: sam_phy_boardinitialize |