Tiva PHY: Hard code some properties of the internal PHY
This commit is contained in:
parent
aef65efd38
commit
f67363e1ff
@ -736,18 +736,20 @@ config TIVA_PHY_RMII
|
||||
|
||||
endchoice # PHY selection
|
||||
|
||||
config TIVA_PHYADDR
|
||||
int "PHY address"
|
||||
default 1
|
||||
---help---
|
||||
The 5-bit address of the PHY on the board. Default: 1
|
||||
|
||||
config TIVA_AUTONEG
|
||||
bool "Use autonegotiation"
|
||||
default y
|
||||
---help---
|
||||
Use PHY autonegotiation to determine speed and mode
|
||||
|
||||
if !TIVA_PHY_INTERNAL
|
||||
|
||||
config TIVA_PHYADDR
|
||||
int "PHY address"
|
||||
default 1
|
||||
---help---
|
||||
The 5-bit address of the PHY on the board. Default: 1
|
||||
|
||||
if !TIVA_AUTONEG
|
||||
config TIVA_ETHFD
|
||||
bool "Full duplex"
|
||||
@ -845,6 +847,7 @@ config TIVA_PHYSR_100FD
|
||||
|
||||
endif # TIVA_PHYSR_ALTCONFIG
|
||||
endif # TIVA_AUTONEG
|
||||
endif # !TIVA_PHY_INTERNAL
|
||||
|
||||
config TIVA_EMAC_NRXDESC
|
||||
int "Number of RX descriptors"
|
||||
|
@ -1077,7 +1077,7 @@
|
||||
#define EPHY_FCSCR_FCSCNT_SHIFT (0) /* Bits 0-7: False Carrier Event Counter */
|
||||
#define EPHY_FCSCR_FCSCNT_MASK (0xff << EPHY_FCSCR_FCSCNT_SHIFT)
|
||||
|
||||
/* Ethernet PHY Receive Error Count *16-bit value) */
|
||||
/* Ethernet PHY Receive Error Count (16-bit value) */
|
||||
|
||||
/* Ethernet PHY BIST Control */
|
||||
|
||||
|
@ -102,17 +102,44 @@
|
||||
# error High priority work queue support is required
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_TIVA_PHYADDR
|
||||
# error CONFIG_TIVA_PHYADDR must be defined in the NuttX configuration
|
||||
#endif
|
||||
/* Are we using the internal PHY or an external PHY? */
|
||||
|
||||
#if defined(CONFIG_TIVA_PHY_INTERNAL)
|
||||
|
||||
/* Internal PHY */
|
||||
|
||||
# if defined(CONFIG_TIVA_PHY_MII) ||defined(CONFIG_TIVA_PHY_RMII)
|
||||
# warning CONFIG_TIVA_PHY_MII or CONFIG_TIVA_PHY_RMII defined with internal PHY
|
||||
# endif
|
||||
|
||||
# undef CONFIG_TIVA_PHY_MII
|
||||
# undef CONFIG_TIVA_PHY_RMII
|
||||
|
||||
/* Properties of the internal PHY are hard-coded */
|
||||
|
||||
# undef CONFIG_TIVA_PHYADDR
|
||||
# undef CONFIG_TIVA_PHYSR_ALTCONFIG
|
||||
# undef CONFIG_TIVA_PHYSR_ALTMODE
|
||||
# undef CONFIG_TIVA_PHYSR_10HD
|
||||
# undef CONFIG_TIVA_PHYSR_100HD
|
||||
# undef CONFIG_TIVA_PHYSR_10FD
|
||||
# undef CONFIG_TIVA_PHYSR_100FD
|
||||
# undef CONFIG_TIVA_PHYSR_SPEED
|
||||
# undef CONFIG_TIVA_PHYSR_100MBPS
|
||||
# undef CONFIG_TIVA_PHYSR_MODE
|
||||
# undef CONFIG_TIVA_PHYSR_FULLDUPLEX
|
||||
|
||||
# define CONFIG_TIVA_PHYADDR 1
|
||||
# define CONFIG_TIVA_PHYSR TIVA_EPHY_STS
|
||||
# define CONFIG_TIVA_PHYSR_SPEED EPHY_STS_SPEED
|
||||
# define CONFIG_TIVA_PHYSR_100MBPS 0
|
||||
# define CONFIG_TIVA_PHYSR_MODE EPHY_STS_DUPLEX
|
||||
# define CONFIG_TIVA_PHYSR_FULLDUPLEX EPHY_STS_DUPLEX
|
||||
|
||||
#else
|
||||
|
||||
/* External PHY. Properties must be provided in the configuration */
|
||||
|
||||
# if !defined(CONFIG_TIVA_PHY_MII) && !defined(CONFIG_TIVA_PHY_RMII)
|
||||
# warning None of CONFIG_TIVA_PHY_INTERNAL, CONFIG_TIVA_PHY_MII, or CONFIG_TIVA_PHY_RMII defined
|
||||
# endif
|
||||
@ -122,6 +149,10 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_TIVA_PHYADDR
|
||||
# error CONFIG_TIVA_PHYADDR must be defined in the NuttX configuration
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TIVA_AUTONEG
|
||||
# ifndef CONFIG_TIVA_PHYSR
|
||||
# error CONFIG_TIVA_PHYSR must be defined in the NuttX configuration
|
||||
|
Loading…
Reference in New Issue
Block a user