mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 11:26:12 +08:00
arch/risc-v/src/mpfs/mpfs_ethernet.c: Fix compilation with CONFIG_DEBUG_NET
- Fix compilation failure "error: 'mpfs_phydump' defined but not used [-Werror=unused-function]" - Add debug dump of phy registers. Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
This commit is contained in:
committed by
Xiang Xiao
parent
ea321d86cb
commit
cc662453c1
@@ -2246,7 +2246,8 @@ static int mpfs_phyfind(struct mpfs_ethmac_s *priv, uint8_t *phyaddr)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if defined(CONFIG_DEBUG_NET) && defined(CONFIG_DEBUG_INFO)
|
#if defined(CONFIG_DEBUG_NET) && defined(CONFIG_DEBUG_INFO) && \
|
||||||
|
defined(ETH_HAS_MDIO_PHY)
|
||||||
static void mpfs_phydump(struct mpfs_ethmac_s *priv)
|
static void mpfs_phydump(struct mpfs_ethmac_s *priv)
|
||||||
{
|
{
|
||||||
uint16_t phyval;
|
uint16_t phyval;
|
||||||
@@ -2601,6 +2602,8 @@ static void mpfs_linkspeed(struct mpfs_ethmac_s *priv)
|
|||||||
|
|
||||||
mac_putreg(priv, NETWORK_CONFIG, regval);
|
mac_putreg(priv, NETWORK_CONFIG, regval);
|
||||||
mac_putreg(priv, NETWORK_CONTROL, ncr);
|
mac_putreg(priv, NETWORK_CONTROL, ncr);
|
||||||
|
|
||||||
|
mpfs_phydump(priv);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user