Skip to content
Snippets Groups Projects
Commit 0f175039 authored by Michał Łyszczek's avatar Michał Łyszczek
Browse files

Fix compilation warnings for stm32 eth with certain configs

parent 582f3670
No related branches found
No related tags found
No related merge requests found
......@@ -704,7 +704,11 @@ static void stm32_rxdescinit(FAR struct stm32_ethmac_s *priv);
#if defined(CONFIG_NETDEV_PHY_IOCTL) && defined(CONFIG_ARCH_PHY_INTERRUPT)
static int stm32_phyintenable(FAR struct stm32_ethmac_s *priv);
#endif
#if defined(CONFIG_STM32_AUTONEG) ||\
defined(CONFIG_NETDEV_PHY_IOCTL) ||\
defined(CONFIG_ETH0_PHY_DM9161)
static int stm32_phyread(uint16_t phydevaddr, uint16_t phyregaddr, uint16_t *value);
#endif
static int stm32_phywrite(uint16_t phydevaddr, uint16_t phyregaddr, uint16_t value);
#ifdef CONFIG_ETH0_PHY_DM9161
static inline int stm32_dm9161(FAR struct stm32_ethmac_s *priv);
......@@ -3098,6 +3102,9 @@ static int stm32_phyintenable(struct stm32_ethmac_s *priv)
*
****************************************************************************/
#if defined(CONFIG_STM32_AUTONEG) ||\
defined(CONFIG_NETDEV_PHY_IOCTL) ||\
defined(CONFIG_ETH0_PHY_DM9161)
static int stm32_phyread(uint16_t phydevaddr, uint16_t phyregaddr, uint16_t *value)
{
volatile uint32_t timeout;
......@@ -3134,6 +3141,7 @@ static int stm32_phyread(uint16_t phydevaddr, uint16_t phyregaddr, uint16_t *val
return -ETIMEDOUT;
}
#endif
/****************************************************************************
* Function: stm32_phywrite
......@@ -3278,7 +3286,10 @@ static inline int stm32_dm9161(FAR struct stm32_ethmac_s *priv)
static int stm32_phyinit(FAR struct stm32_ethmac_s *priv)
{
#ifdef CONFIG_STM32_AUTOGEN
volatile uint32_t timeout;
#endif
uint32_t regval;
uint16_t phyval;
int ret;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment