mirror of
https://github.com/apache/nuttx.git
synced 2026-09-21 13:25:12 +08:00
SAMA5: Back out most of commit c37b5b7b97d0644743c04f2c3d9e2b7ef9f5d698. Things are going to have to be done differently
This commit is contained in:
+266
-17
@@ -61,6 +61,10 @@ config SAMA5_HAVE_GMAC
|
||||
bool
|
||||
default n
|
||||
|
||||
config SAMA5_HAVE_EMAC
|
||||
bool
|
||||
default n
|
||||
|
||||
config SAMA5_HAVE_EMAC0
|
||||
bool
|
||||
default n
|
||||
@@ -141,7 +145,7 @@ choice
|
||||
config ARCH_CHIP_ATSAMA5D31
|
||||
bool "Atmel ATSAMA5D31"
|
||||
select ARCH_CHIP_SAMA5D3
|
||||
select SAMA5_HAVE_EMAC0
|
||||
select SAMA5_HAVE_EMAC
|
||||
select SAMA5_HAVE_HSMCI2
|
||||
select SAMA5_HAVE_LCDC
|
||||
select SAMA5_HAVE_UART0
|
||||
@@ -168,7 +172,7 @@ config ARCH_CHIP_ATSAMA5D34
|
||||
config ARCH_CHIP_ATSAMA5D35
|
||||
bool "Atmel ATSAMA5D35"
|
||||
select ARCH_CHIP_SAMA5D3
|
||||
select SAMA5_HAVE_EMAC0
|
||||
select SAMA5_HAVE_EMAC
|
||||
select SAMA5_HAVE_GMAC
|
||||
select SAMA5_HAVE_HSMCI2
|
||||
select SAMA5_HAVE_UART0
|
||||
@@ -181,7 +185,7 @@ config ARCH_CHIP_ATSAMA5D35
|
||||
config ARCH_CHIP_ATSAMA5D36
|
||||
bool "Atmel ATSAMA5D356"
|
||||
select ARCH_CHIP_SAMA5D3
|
||||
select SAMA5_HAVE_EMAC0
|
||||
select SAMA5_HAVE_EMAC
|
||||
select SAMA5_HAVE_GMAC
|
||||
select SAMA5_HAVE_HSMCI2
|
||||
select SAMA5_HAVE_LCDC
|
||||
@@ -418,6 +422,13 @@ config SAMA5_GMAC
|
||||
select NETDEVICES
|
||||
select ARCH_HAVE_PHY
|
||||
|
||||
config SAMA5_EMAC
|
||||
bool "10/100MBps Ethernet MAC (EMAC0)"
|
||||
default n
|
||||
depends on SAMA5_HAVE_EMAC
|
||||
select NETDEVICES
|
||||
select ARCH_HAVE_PHY
|
||||
|
||||
config SAMA5_EMAC0
|
||||
bool "10/100MBps Ethernet MAC (EMAC0)"
|
||||
default n
|
||||
@@ -1146,6 +1157,185 @@ config SAMA5_GMAC_REGDEBUG
|
||||
endmenu # GMAC device driver options
|
||||
endif # SAMA5_GMAC
|
||||
|
||||
if SAMA5_EMAC
|
||||
|
||||
menu "EMAC device driver options"
|
||||
|
||||
config SAMA5_EMAC_NRXBUFFERS
|
||||
int "Number of RX buffers"
|
||||
default 16
|
||||
---help---
|
||||
EMAC buffer memory is segmented into 128 byte units (not
|
||||
configurable). This setting provides the number of such 128 byte
|
||||
units used for reception. This is also equal to the number of RX
|
||||
descriptors that will be allocated The selected value must be an
|
||||
even power of 2.
|
||||
|
||||
config SAMA5_EMAC_NTXBUFFERS
|
||||
int "Number of TX buffers"
|
||||
default 8
|
||||
---help---
|
||||
EMAC buffer memory is segmented into full Ethernet packets (size
|
||||
NET_BUFSIZE bytes). This setting provides the number of such packets
|
||||
that can be in flight. This is also equal to the number of TX
|
||||
descriptors that will be allocated.
|
||||
|
||||
config SAMA5_EMAC_PREALLOCATE
|
||||
bool "Preallocate buffers"
|
||||
default n
|
||||
---help---
|
||||
Buffer an descriptor many may either be allocated from the memory
|
||||
pool or pre-allocated to lie in .bss. This options selected pre-
|
||||
allocated buffer memory.
|
||||
|
||||
config SAMA5_EMAC_NBC
|
||||
bool "Disable Broadcast"
|
||||
default n
|
||||
---help---
|
||||
Select to disable receipt of broadcast packets.
|
||||
|
||||
config SAMA5_EMAC_PHYADDR
|
||||
int "PHY address"
|
||||
default 1
|
||||
---help---
|
||||
The 5-bit address of the PHY on the board. Default: 1
|
||||
|
||||
config SAMA5_EMAC_PHYINIT
|
||||
bool "Board-specific PHY Initialization"
|
||||
default n
|
||||
---help---
|
||||
Some boards require specialized initialization of the PHY before it can be used.
|
||||
This may include such things as configuring GPIOs, resetting the PHY, etc. If
|
||||
SAMA5_EMAC_PHYINIT is defined in the configuration then the board specific logic must
|
||||
provide sam_phyinitialize(); The SAMA5 EMAC driver will call this function
|
||||
one time before it first uses the PHY.
|
||||
|
||||
config SAMA5_EMAC_MII
|
||||
bool "Use MII interface"
|
||||
default n
|
||||
---help---
|
||||
Support Ethernet MII interface (vs RMII).
|
||||
|
||||
config SAMA5_EMAC_RMII
|
||||
bool
|
||||
default y if !SAMA5_EMAC_MII
|
||||
default n if SAMA5_EMAC_MII
|
||||
|
||||
config SAMA5_EMAC_AUTONEG
|
||||
bool "Use autonegotiation"
|
||||
default y
|
||||
---help---
|
||||
Use PHY autonegotiation to determine speed and mode
|
||||
|
||||
config SAMA5_EMAC_ETHFD
|
||||
bool "Full duplex"
|
||||
default n
|
||||
depends on !SAMA5_EMAC_AUTONEG
|
||||
---help---
|
||||
If SAMA5_EMAC_AUTONEG is not defined, then this may be defined to select full duplex
|
||||
mode. Default: half-duplex
|
||||
|
||||
config SAMA5_EMAC_ETH100MBPS
|
||||
bool "100 Mbps"
|
||||
default n
|
||||
depends on !SAMA5_EMAC_AUTONEG
|
||||
---help---
|
||||
If SAMA5_EMAC_AUTONEG is not defined, then this may be defined to select 100 MBps
|
||||
speed. Default: 10 Mbps
|
||||
|
||||
config SAMA5_EMAC_PHYSR
|
||||
int "PHY Status Register Address (decimal)"
|
||||
depends on SAMA5_EMAC_AUTONEG
|
||||
---help---
|
||||
This must be provided if SAMA5_EMAC_AUTONEG is defined. The PHY status register
|
||||
address may diff from PHY to PHY. This configuration sets the address of
|
||||
the PHY status register.
|
||||
|
||||
config SAMA5_EMAC_PHYSR_ALTCONFIG
|
||||
bool "PHY Status Alternate Bit Layout"
|
||||
default n
|
||||
depends on SAMA5_EMAC_AUTONEG
|
||||
---help---
|
||||
Different PHYs present speed and mode information in different ways. Some
|
||||
will present separate information for speed and mode (this is the default).
|
||||
Those PHYs, for example, may provide a 10/100 Mbps indication and a separate
|
||||
full/half duplex indication. This options selects an alternative representation
|
||||
where speed and mode information are combined. This might mean, for example,
|
||||
separate bits for 10HD, 100HD, 10FD and 100FD.
|
||||
|
||||
config SAMA5_EMAC_PHYSR_SPEED
|
||||
hex "PHY Speed Mask"
|
||||
depends on SAMA5_EMAC_AUTONEG && !SAMA5_EMAC_PHYSR_ALTCONFIG
|
||||
---help---
|
||||
This must be provided if SAMA5_EMAC_AUTONEG is defined. This provides bit mask
|
||||
for isolating the 10 or 100MBps speed indication.
|
||||
|
||||
config SAMA5_EMAC_PHYSR_100MBPS
|
||||
hex "PHY 100Mbps Speed Value"
|
||||
depends on SAMA5_EMAC_AUTONEG && !SAMA5_EMAC_PHYSR_ALTCONFIG
|
||||
---help---
|
||||
This must be provided if SAMA5_EMAC_AUTONEG is defined. This provides the value
|
||||
of the speed bit(s) indicating 100MBps speed.
|
||||
|
||||
config SAMA5_EMAC_PHYSR_MODE
|
||||
hex "PHY Mode Mask"
|
||||
depends on SAMA5_EMAC_AUTONEG && !SAMA5_EMAC_PHYSR_ALTCONFIG
|
||||
---help---
|
||||
This must be provided if SAMA5_EMAC_AUTONEG is defined. This provide bit mask
|
||||
for isolating the full or half duplex mode bits.
|
||||
|
||||
config SAMA5_EMAC_PHYSR_FULLDUPLEX
|
||||
hex "PHY Full Duplex Mode Value"
|
||||
depends on SAMA5_EMAC_AUTONEG && !SAMA5_EMAC_PHYSR_ALTCONFIG
|
||||
---help---
|
||||
This must be provided if SAMA5_EMAC_AUTONEG is defined. This provides the
|
||||
value of the mode bits indicating full duplex mode.
|
||||
|
||||
config SAMA5_EMAC_PHYSR_ALTMODE
|
||||
hex "PHY Mode Mask"
|
||||
depends on SAMA5_EMAC_AUTONEG && SAMA5_EMAC_PHYSR_ALTCONFIG
|
||||
---help---
|
||||
This must be provided if SAMA5_EMAC_AUTONEG is defined. This provide bit mask
|
||||
for isolating the speed and full/half duplex mode bits.
|
||||
|
||||
config SAMA5_EMAC_PHYSR_10HD
|
||||
hex "10MBase-T Half Duplex Value"
|
||||
depends on SAMA5_EMAC_AUTONEG && SAMA5_EMAC_PHYSR_ALTCONFIG
|
||||
---help---
|
||||
This must be provided if SAMA5_EMAC_AUTONEG is defined. This is the value
|
||||
under the bit mask that represents the 10Mbps, half duplex setting.
|
||||
|
||||
config SAMA5_EMAC_PHYSR_100HD
|
||||
hex "100Base-T Half Duplex Value"
|
||||
depends on SAMA5_EMAC_AUTONEG && SAMA5_EMAC_PHYSR_ALTCONFIG
|
||||
---help---
|
||||
This must be provided if SAMA5_EMAC_AUTONEG is defined. This is the value
|
||||
under the bit mask that represents the 100Mbps, half duplex setting.
|
||||
|
||||
config SAMA5_EMAC_PHYSR_10FD
|
||||
hex "10Base-T Full Duplex Value"
|
||||
depends on SAMA5_EMAC_AUTONEG && SAMA5_EMAC_PHYSR_ALTCONFIG
|
||||
---help---
|
||||
This must be provided if SAMA5_EMAC_AUTONEG is defined. This is the value
|
||||
under the bit mask that represents the 10Mbps, full duplex setting.
|
||||
|
||||
config SAMA5_EMAC_PHYSR_100FD
|
||||
hex "100Base-T Full Duplex Value"
|
||||
depends on SAMA5_EMAC_AUTONEG && SAMA5_EMAC_PHYSR_ALTCONFIG
|
||||
---help---
|
||||
This must be provided if SAMA5_EMAC_AUTONEG is defined. This is the value
|
||||
under the bit mask that represents the 100Mbps, full duplex setting.
|
||||
|
||||
config SAMA5_EMAC_REGDEBUG
|
||||
bool "Register-Level Debug"
|
||||
default n
|
||||
depends on DEBUG
|
||||
---help---
|
||||
Enable very low-level register access debug. Depends on DEBUG.
|
||||
|
||||
endmenu # EMAC device driver options
|
||||
endif # SAMA5_EMAC
|
||||
|
||||
if SAMA5_EMAC0
|
||||
|
||||
menu "EMAC0 device driver options"
|
||||
@@ -1199,16 +1389,43 @@ config SAMA5_EMAC0_PHYINIT
|
||||
provide sam_phyinitialize(); The SAMA5 EMAC driver will call this function
|
||||
one time before it first uses the PHY.
|
||||
|
||||
choice
|
||||
prompt "PHY interface"
|
||||
default SAMA5_EMAC0_MII
|
||||
|
||||
config SAMA5_EMAC0_MII
|
||||
bool "Use MII interface"
|
||||
default n
|
||||
bool "MII"
|
||||
---help---
|
||||
Support Ethernet MII interface (vs RMII).
|
||||
|
||||
config SAMA5_EMAC0_RMII
|
||||
bool
|
||||
default y if !SAMA5_EMAC0_MII
|
||||
default n if SAMA5_EMAC0_MII
|
||||
bool "RMII"
|
||||
depends on !ARCH_CHIP_SAM4E
|
||||
---help---
|
||||
Support Ethernet RMII interface (vs MII).
|
||||
|
||||
endchoice # PHY interface
|
||||
|
||||
config SAMA5_EMAC0_CLAUSE45
|
||||
bool "Clause 45 MII"
|
||||
depends on SAMA5_EMAC0_MII
|
||||
---help---
|
||||
MDIO was originally defined in Clause 22 of IEEE RFC802.3. In the
|
||||
original specification, a single MDIO interface is able to access up
|
||||
to 32 registers in 32 different PHY devices. To meet the needs the
|
||||
expanding needs of 10-Gigabit Ethernet devices, Clause 45 of the
|
||||
802.3ae specification provided the following additions to MDIO:
|
||||
|
||||
- Ability to access 65,536 registers in 32 different devices on
|
||||
32 different ports
|
||||
- Additional OP-code and ST-code for Indirect Address register
|
||||
access for 10 Gigabit Ethernet
|
||||
- End-to-end fault signaling
|
||||
- Multiple loopback points
|
||||
- Low voltage electrical specification
|
||||
|
||||
By default, Clause 22 PHYs will be supported unless this option is
|
||||
selected.
|
||||
|
||||
config SAMA5_EMAC0_AUTONEG
|
||||
bool "Use autonegotiation"
|
||||
@@ -1378,16 +1595,43 @@ config SAMA5_EMAC1_PHYINIT
|
||||
provide sam_phyinitialize(); The SAMA5 EMAC driver will call this function
|
||||
one time before it first uses the PHY.
|
||||
|
||||
choice
|
||||
prompt "PHY interface"
|
||||
default SAMA5_EMAC1_MII
|
||||
|
||||
config SAMA5_EMAC1_MII
|
||||
bool "Use MII interface"
|
||||
default n
|
||||
bool "MII"
|
||||
---help---
|
||||
Support Ethernet MII interface (vs RMII).
|
||||
|
||||
config SAMA5_EMAC1_RMII
|
||||
bool
|
||||
default y if !SAMA5_EMAC1_MII
|
||||
default n if SAMA5_EMAC1_MII
|
||||
bool "RMII"
|
||||
depends on !ARCH_CHIP_SAM4E
|
||||
---help---
|
||||
Support Ethernet RMII interface (vs MII).
|
||||
|
||||
endchoice # PHY interface
|
||||
|
||||
config SAMA5_EMAC1_CLAUSE45
|
||||
bool "Clause 45 MII"
|
||||
depends on SAMA5_EMAC1_MII
|
||||
---help---
|
||||
MDIO was originally defined in Clause 22 of IEEE RFC802.3. In the
|
||||
original specification, a single MDIO interface is able to access up
|
||||
to 32 registers in 32 different PHY devices. To meet the needs the
|
||||
expanding needs of 10-Gigabit Ethernet devices, Clause 45 of the
|
||||
802.3ae specification provided the following additions to MDIO:
|
||||
|
||||
- Ability to access 65,536 registers in 32 different devices on
|
||||
32 different ports
|
||||
- Additional OP-code and ST-code for Indirect Address register
|
||||
access for 10 Gigabit Ethernet
|
||||
- End-to-end fault signaling
|
||||
- Multiple loopback points
|
||||
- Low voltage electrical specification
|
||||
|
||||
By default, Clause 22 PHYs will be supported unless this option is
|
||||
selected.
|
||||
|
||||
config SAMA5_EMAC1_AUTONEG
|
||||
bool "Use autonegotiation"
|
||||
@@ -1504,12 +1748,17 @@ config SAMA5_EMAC1_REGDEBUG
|
||||
endmenu # EMAC1 device driver options
|
||||
endif # SAMA5_EMAC1
|
||||
|
||||
if SAMA5_EMAC0 || SAMA5_EMAC1 || SAMA5_GMAC
|
||||
if SAMA5_EMAC || SAMA5_EMAC0 || SAMA5_EMAC1 || SAMA5_GMAC
|
||||
choice
|
||||
prompt "Which device is eth0"
|
||||
default SAMA5_GMAC_ISETH0 if SAMA5_GMAC
|
||||
default SAMA5_EMAC0_ISETH0 if SAMA5_EMAC0 && !SAMA5_GMAC
|
||||
default SAMA5_EMAC1_ISETH0 if SAMA5_EMAC1 && !SAMA5_EMAC0 && !SAMA5_GMAC
|
||||
default SAMA5_EMAC_ISETH0 if SAMA5_EMAC && !SAMA5_GMAC
|
||||
default SAMA5_EMAC0_ISETH0 if SAMA5_EMAC0 && !SAM_EMAC && !SAMA5_GMAC
|
||||
default SAMA5_EMAC1_ISETH0 if SAMA5_EMAC1 && !SAM_EMAC && !SAMA5_EMAC0 && !SAMA5_GMAC
|
||||
|
||||
config SAMA5_EMAC_ISETH0
|
||||
bool "EMAC is eth0"
|
||||
depends on SAMA5_EMAC
|
||||
|
||||
config SAMA5_EMAC0_ISETH0
|
||||
bool "EMAC0 is eth0"
|
||||
@@ -1524,7 +1773,7 @@ config SAMA5_GMAC_ISETH0
|
||||
depends on SAMA5_GMAC
|
||||
|
||||
endchoice # Which device is eth0
|
||||
endif # SAMA5_EMAC0 || SAMA5_EMAC1 || SAMA5_GMAC
|
||||
endif # SAMA4_EMAC || SAMA5_EMAC0 || SAMA5_EMAC1 || SAMA5_GMAC
|
||||
|
||||
if SAMA5_CAN0 || SAMA5_CAN1
|
||||
|
||||
|
||||
@@ -190,7 +190,7 @@ endif
|
||||
|
||||
ifeq ($(CONFIG_NET),y)
|
||||
CHIP_CSRCS += sam_ethernet.c
|
||||
ifeq ($(CONFIG_SAMA5_EMAC0),y)
|
||||
ifeq ($(CONFIG_SAMA5_EMAC),y)
|
||||
CHIP_CSRCS += sam_emac.c
|
||||
endif
|
||||
ifeq ($(CONFIG_SAMA5_GMAC),y)
|
||||
|
||||
@@ -99,99 +99,52 @@
|
||||
|
||||
/* EMAC Register Addresses **********************************************************/
|
||||
|
||||
#define SAM_EMAC0_NCR (SAM_EMAC0_VBASE+SAM_EMAC_NCR_OFFSET)
|
||||
#define SAM_EMAC0_NCFGR (SAM_EMAC0_VBASE+SAM_EMAC_NCFGR_OFFSET)
|
||||
#define SAM_EMAC0_NSR (SAM_EMAC0_VBASE+SAM_EMAC_NSR_OFFSET)
|
||||
#define SAM_EMAC0_TSR (SAM_EMAC0_VBASE+SAM_EMAC_TSR_OFFSET)
|
||||
#define SAM_EMAC0_RBQP (SAM_EMAC0_VBASE+SAM_EMAC_RBQP_OFFSET)
|
||||
#define SAM_EMAC0_TBQP (SAM_EMAC0_VBASE+SAM_EMAC_TBQP_OFFSET)
|
||||
#define SAM_EMAC0_RSR (SAM_EMAC0_VBASE+SAM_EMAC_RSR_OFFSET)
|
||||
#define SAM_EMAC0_ISR (SAM_EMAC0_VBASE+SAM_EMAC_ISR_OFFSET)
|
||||
#define SAM_EMAC0_IER (SAM_EMAC0_VBASE+SAM_EMAC_IER_OFFSET)
|
||||
#define SAM_EMAC0_IDR (SAM_EMAC0_VBASE+SAM_EMAC_IDR_OFFSET)
|
||||
#define SAM_EMAC0_IMR (SAM_EMAC0_VBASE+SAM_EMAC_IMR_OFFSET)
|
||||
#define SAM_EMAC0_MAN (SAM_EMAC0_VBASE+SAM_EMAC_MAN_OFFSET)
|
||||
#define SAM_EMAC0_PTR (SAM_EMAC0_VBASE+SAM_EMAC_PTR_OFFSET)
|
||||
#define SAM_EMAC0_PFR (SAM_EMAC0_VBASE+SAM_EMAC_PFR_OFFSET)
|
||||
#define SAM_EMAC0_FTO (SAM_EMAC0_VBASE+SAM_EMAC_FTO_OFFSET)
|
||||
#define SAM_EMAC0_SCF (SAM_EMAC0_VBASE+SAM_EMAC_SCF_OFFSET)
|
||||
#define SAM_EMAC0_MCF (SAM_EMAC0_VBASE+SAM_EMAC_MCF_OFFSET)
|
||||
#define SAM_EMAC0_FRO (SAM_EMAC0_VBASE+SAM_EMAC_FRO_OFFSET)
|
||||
#define SAM_EMAC0_FCSE (SAM_EMAC0_VBASE+SAM_EMAC_FCSE_OFFSET)
|
||||
#define SAM_EMAC0_ALE (SAM_EMAC0_VBASE+SAM_EMAC_ALE_OFFSET)
|
||||
#define SAM_EMAC0_DTF (SAM_EMAC0_VBASE+SAM_EMAC_DTF_OFFSET)
|
||||
#define SAM_EMAC0_LCOL (SAM_EMAC0_VBASE+SAM_EMAC_LCOL_OFFSET)
|
||||
#define SAM_EMAC0_ECOL (SAM_EMAC0_VBASE+SAM_EMAC_ECOL_OFFSET)
|
||||
#define SAM_EMAC0_TUND (SAM_EMAC0_VBASE+SAM_EMAC_TUND_OFFSET)
|
||||
#define SAM_EMAC0_CSE (SAM_EMAC0_VBASE+SAM_EMAC_CSE_OFFSET)
|
||||
#define SAM_EMAC0_RRE (SAM_EMAC0_VBASE+SAM_EMAC_RRE_OFFSET)
|
||||
#define SAM_EMAC0_ROV (SAM_EMAC0_VBASE+SAM_EMAC_ROV_OFFSET)
|
||||
#define SAM_EMAC0_RSE (SAM_EMAC0_VBASE+SAM_EMAC_RSE_OFFSET)
|
||||
#define SAM_EMAC0_ELE (SAM_EMAC0_VBASE+SAM_EMAC_ELE_OFFSET)
|
||||
#define SAM_EMAC0_RJA (SAM_EMAC0_VBASE+SAM_EMAC_RJA_OFFSET)
|
||||
#define SAM_EMAC0_USF (SAM_EMAC0_VBASE+SAM_EMAC_USF_OFFSET)
|
||||
#define SAM_EMAC0_STE (SAM_EMAC0_VBASE+SAM_EMAC_STE_OFFSET)
|
||||
#define SAM_EMAC0_RLE (SAM_EMAC0_VBASE+SAM_EMAC_RLE_OFFSET)
|
||||
#define SAM_EMAC0_HRB (SAM_EMAC0_VBASE+SAM_EMAC_HRB_OFFSET)
|
||||
#define SAM_EMAC0_HRT (SAM_EMAC0_VBASE+SAM_EMAC_HRT_OFFSET)
|
||||
#define SAM_EMAC0_SA1B (SAM_EMAC0_VBASE+SAM_EMAC_SA1B_OFFSET)
|
||||
#define SAM_EMAC0_SA1T (SAM_EMAC0_VBASE+SAM_EMAC_SA1T_OFFSET)
|
||||
#define SAM_EMAC0_SA2B (SAM_EMAC0_VBASE+SAM_EMAC_SA2B_OFFSET)
|
||||
#define SAM_EMAC0_SA2T (SAM_EMAC0_VBASE+SAM_EMAC_SA2T_OFFSET)
|
||||
#define SAM_EMAC0_SA3B (SAM_EMAC0_VBASE+SAM_EMAC_SA3B_OFFSET)
|
||||
#define SAM_EMAC0_SA3T (SAM_EMAC0_VBASE+SAM_EMAC_SA3T_OFFSET)
|
||||
#define SAM_EMAC0_SA4B (SAM_EMAC0_VBASE+SAM_EMAC_SA4B_OFFSET)
|
||||
#define SAM_EMAC0_SA4T (SAM_EMAC0_VBASE+SAM_EMAC_SA4T_OFFSET)
|
||||
#define SAM_EMAC0_TID (SAM_EMAC0_VBASE+SAM_EMAC_TID_OFFSET)
|
||||
#define SAM_EMAC0_USRIO (SAM_EMAC0_VBASE+SAM_EMAC_USRIO_OFFSET)
|
||||
#define SAM_EMAC0_WOL (SAM_EMAC0_VBASE+SAM_EMAC_WOL_OFFSET)
|
||||
|
||||
#define SAM_EMAC1_NCR (SAM_EMAC1_VBASE+SAM_EMAC_NCR_OFFSET)
|
||||
#define SAM_EMAC1_NCFGR (SAM_EMAC1_VBASE+SAM_EMAC_NCFGR_OFFSET)
|
||||
#define SAM_EMAC1_NSR (SAM_EMAC1_VBASE+SAM_EMAC_NSR_OFFSET)
|
||||
#define SAM_EMAC1_TSR (SAM_EMAC1_VBASE+SAM_EMAC_TSR_OFFSET)
|
||||
#define SAM_EMAC1_RBQP (SAM_EMAC1_VBASE+SAM_EMAC_RBQP_OFFSET)
|
||||
#define SAM_EMAC1_TBQP (SAM_EMAC1_VBASE+SAM_EMAC_TBQP_OFFSET)
|
||||
#define SAM_EMAC1_RSR (SAM_EMAC1_VBASE+SAM_EMAC_RSR_OFFSET)
|
||||
#define SAM_EMAC1_ISR (SAM_EMAC1_VBASE+SAM_EMAC_ISR_OFFSET)
|
||||
#define SAM_EMAC1_IER (SAM_EMAC1_VBASE+SAM_EMAC_IER_OFFSET)
|
||||
#define SAM_EMAC1_IDR (SAM_EMAC1_VBASE+SAM_EMAC_IDR_OFFSET)
|
||||
#define SAM_EMAC1_IMR (SAM_EMAC1_VBASE+SAM_EMAC_IMR_OFFSET)
|
||||
#define SAM_EMAC1_MAN (SAM_EMAC1_VBASE+SAM_EMAC_MAN_OFFSET)
|
||||
#define SAM_EMAC1_PTR (SAM_EMAC1_VBASE+SAM_EMAC_PTR_OFFSET)
|
||||
#define SAM_EMAC1_PFR (SAM_EMAC1_VBASE+SAM_EMAC_PFR_OFFSET)
|
||||
#define SAM_EMAC1_FTO (SAM_EMAC1_VBASE+SAM_EMAC_FTO_OFFSET)
|
||||
#define SAM_EMAC1_SCF (SAM_EMAC1_VBASE+SAM_EMAC_SCF_OFFSET)
|
||||
#define SAM_EMAC1_MCF (SAM_EMAC1_VBASE+SAM_EMAC_MCF_OFFSET)
|
||||
#define SAM_EMAC1_FRO (SAM_EMAC1_VBASE+SAM_EMAC_FRO_OFFSET)
|
||||
#define SAM_EMAC1_FCSE (SAM_EMAC1_VBASE+SAM_EMAC_FCSE_OFFSET)
|
||||
#define SAM_EMAC1_ALE (SAM_EMAC1_VBASE+SAM_EMAC_ALE_OFFSET)
|
||||
#define SAM_EMAC1_DTF (SAM_EMAC1_VBASE+SAM_EMAC_DTF_OFFSET)
|
||||
#define SAM_EMAC1_LCOL (SAM_EMAC1_VBASE+SAM_EMAC_LCOL_OFFSET)
|
||||
#define SAM_EMAC1_ECOL (SAM_EMAC1_VBASE+SAM_EMAC_ECOL_OFFSET)
|
||||
#define SAM_EMAC1_TUND (SAM_EMAC1_VBASE+SAM_EMAC_TUND_OFFSET)
|
||||
#define SAM_EMAC1_CSE (SAM_EMAC1_VBASE+SAM_EMAC_CSE_OFFSET)
|
||||
#define SAM_EMAC1_RRE (SAM_EMAC1_VBASE+SAM_EMAC_RRE_OFFSET)
|
||||
#define SAM_EMAC1_ROV (SAM_EMAC1_VBASE+SAM_EMAC_ROV_OFFSET)
|
||||
#define SAM_EMAC1_RSE (SAM_EMAC1_VBASE+SAM_EMAC_RSE_OFFSET)
|
||||
#define SAM_EMAC1_ELE (SAM_EMAC1_VBASE+SAM_EMAC_ELE_OFFSET)
|
||||
#define SAM_EMAC1_RJA (SAM_EMAC1_VBASE+SAM_EMAC_RJA_OFFSET)
|
||||
#define SAM_EMAC1_USF (SAM_EMAC1_VBASE+SAM_EMAC_USF_OFFSET)
|
||||
#define SAM_EMAC1_STE (SAM_EMAC1_VBASE+SAM_EMAC_STE_OFFSET)
|
||||
#define SAM_EMAC1_RLE (SAM_EMAC1_VBASE+SAM_EMAC_RLE_OFFSET)
|
||||
#define SAM_EMAC1_HRB (SAM_EMAC1_VBASE+SAM_EMAC_HRB_OFFSET)
|
||||
#define SAM_EMAC1_HRT (SAM_EMAC1_VBASE+SAM_EMAC_HRT_OFFSET)
|
||||
#define SAM_EMAC1_SA1B (SAM_EMAC1_VBASE+SAM_EMAC_SA1B_OFFSET)
|
||||
#define SAM_EMAC1_SA1T (SAM_EMAC1_VBASE+SAM_EMAC_SA1T_OFFSET)
|
||||
#define SAM_EMAC1_SA2B (SAM_EMAC1_VBASE+SAM_EMAC_SA2B_OFFSET)
|
||||
#define SAM_EMAC1_SA2T (SAM_EMAC1_VBASE+SAM_EMAC_SA2T_OFFSET)
|
||||
#define SAM_EMAC1_SA3B (SAM_EMAC1_VBASE+SAM_EMAC_SA3B_OFFSET)
|
||||
#define SAM_EMAC1_SA3T (SAM_EMAC1_VBASE+SAM_EMAC_SA3T_OFFSET)
|
||||
#define SAM_EMAC1_SA4B (SAM_EMAC1_VBASE+SAM_EMAC_SA4B_OFFSET)
|
||||
#define SAM_EMAC1_SA4T (SAM_EMAC1_VBASE+SAM_EMAC_SA4T_OFFSET)
|
||||
#define SAM_EMAC1_TID (SAM_EMAC1_VBASE+SAM_EMAC_TID_OFFSET)
|
||||
#define SAM_EMAC1_USRIO (SAM_EMAC1_VBASE+SAM_EMAC_USRIO_OFFSET)
|
||||
#define SAM_EMAC1_WOL (SAM_EMAC1_VBASE+SAM_EMAC_WOL_OFFSET)
|
||||
#define SAM_EMAC_NCR (SAM_EMAC_VBASE+SAM_EMAC_NCR_OFFSET)
|
||||
#define SAM_EMAC_NCFGR (SAM_EMAC_VBASE+SAM_EMAC_NCFGR_OFFSET)
|
||||
#define SAM_EMAC_NSR (SAM_EMAC_VBASE+SAM_EMAC_NSR_OFFSET)
|
||||
#define SAM_EMAC_TSR (SAM_EMAC_VBASE+SAM_EMAC_TSR_OFFSET)
|
||||
#define SAM_EMAC_RBQP (SAM_EMAC_VBASE+SAM_EMAC_RBQP_OFFSET)
|
||||
#define SAM_EMAC_TBQP (SAM_EMAC_VBASE+SAM_EMAC_TBQP_OFFSET)
|
||||
#define SAM_EMAC_RSR (SAM_EMAC_VBASE+SAM_EMAC_RSR_OFFSET)
|
||||
#define SAM_EMAC_ISR (SAM_EMAC_VBASE+SAM_EMAC_ISR_OFFSET)
|
||||
#define SAM_EMAC_IER (SAM_EMAC_VBASE+SAM_EMAC_IER_OFFSET)
|
||||
#define SAM_EMAC_IDR (SAM_EMAC_VBASE+SAM_EMAC_IDR_OFFSET)
|
||||
#define SAM_EMAC_IMR (SAM_EMAC_VBASE+SAM_EMAC_IMR_OFFSET)
|
||||
#define SAM_EMAC_MAN (SAM_EMAC_VBASE+SAM_EMAC_MAN_OFFSET)
|
||||
#define SAM_EMAC_PTR (SAM_EMAC_VBASE+SAM_EMAC_PTR_OFFSET)
|
||||
#define SAM_EMAC_PFR (SAM_EMAC_VBASE+SAM_EMAC_PFR_OFFSET)
|
||||
#define SAM_EMAC_FTO (SAM_EMAC_VBASE+SAM_EMAC_FTO_OFFSET)
|
||||
#define SAM_EMAC_SCF (SAM_EMAC_VBASE+SAM_EMAC_SCF_OFFSET)
|
||||
#define SAM_EMAC_MCF (SAM_EMAC_VBASE+SAM_EMAC_MCF_OFFSET)
|
||||
#define SAM_EMAC_FRO (SAM_EMAC_VBASE+SAM_EMAC_FRO_OFFSET)
|
||||
#define SAM_EMAC_FCSE (SAM_EMAC_VBASE+SAM_EMAC_FCSE_OFFSET)
|
||||
#define SAM_EMAC_ALE (SAM_EMAC_VBASE+SAM_EMAC_ALE_OFFSET)
|
||||
#define SAM_EMAC_DTF (SAM_EMAC_VBASE+SAM_EMAC_DTF_OFFSET)
|
||||
#define SAM_EMAC_LCOL (SAM_EMAC_VBASE+SAM_EMAC_LCOL_OFFSET)
|
||||
#define SAM_EMAC_ECOL (SAM_EMAC_VBASE+SAM_EMAC_ECOL_OFFSET)
|
||||
#define SAM_EMAC_TUND (SAM_EMAC_VBASE+SAM_EMAC_TUND_OFFSET)
|
||||
#define SAM_EMAC_CSE (SAM_EMAC_VBASE+SAM_EMAC_CSE_OFFSET)
|
||||
#define SAM_EMAC_RRE (SAM_EMAC_VBASE+SAM_EMAC_RRE_OFFSET)
|
||||
#define SAM_EMAC_ROV (SAM_EMAC_VBASE+SAM_EMAC_ROV_OFFSET)
|
||||
#define SAM_EMAC_RSE (SAM_EMAC_VBASE+SAM_EMAC_RSE_OFFSET)
|
||||
#define SAM_EMAC_ELE (SAM_EMAC_VBASE+SAM_EMAC_ELE_OFFSET)
|
||||
#define SAM_EMAC_RJA (SAM_EMAC_VBASE+SAM_EMAC_RJA_OFFSET)
|
||||
#define SAM_EMAC_USF (SAM_EMAC_VBASE+SAM_EMAC_USF_OFFSET)
|
||||
#define SAM_EMAC_STE (SAM_EMAC_VBASE+SAM_EMAC_STE_OFFSET)
|
||||
#define SAM_EMAC_RLE (SAM_EMAC_VBASE+SAM_EMAC_RLE_OFFSET)
|
||||
#define SAM_EMAC_HRB (SAM_EMAC_VBASE+SAM_EMAC_HRB_OFFSET)
|
||||
#define SAM_EMAC_HRT (SAM_EMAC_VBASE+SAM_EMAC_HRT_OFFSET)
|
||||
#define SAM_EMAC_SA1B (SAM_EMAC_VBASE+SAM_EMAC_SA1B_OFFSET)
|
||||
#define SAM_EMAC_SA1T (SAM_EMAC_VBASE+SAM_EMAC_SA1T_OFFSET)
|
||||
#define SAM_EMAC_SA2B (SAM_EMAC_VBASE+SAM_EMAC_SA2B_OFFSET)
|
||||
#define SAM_EMAC_SA2T (SAM_EMAC_VBASE+SAM_EMAC_SA2T_OFFSET)
|
||||
#define SAM_EMAC_SA3B (SAM_EMAC_VBASE+SAM_EMAC_SA3B_OFFSET)
|
||||
#define SAM_EMAC_SA3T (SAM_EMAC_VBASE+SAM_EMAC_SA3T_OFFSET)
|
||||
#define SAM_EMAC_SA4B (SAM_EMAC_VBASE+SAM_EMAC_SA4B_OFFSET)
|
||||
#define SAM_EMAC_SA4T (SAM_EMAC_VBASE+SAM_EMAC_SA4T_OFFSET)
|
||||
#define SAM_EMAC_TID (SAM_EMAC_VBASE+SAM_EMAC_TID_OFFSET)
|
||||
#define SAM_EMAC_USRIO (SAM_EMAC_VBASE+SAM_EMAC_USRIO_OFFSET)
|
||||
#define SAM_EMAC_WOL (SAM_EMAC_VBASE+SAM_EMAC_WOL_OFFSET)
|
||||
|
||||
/* EMAC Register Bit Definitions ****************************************************/
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
# define SAM_USART2_OFFSET 0x00020000 /* 0x00020000-0x00023fff: USART2 */
|
||||
# define SAM_USART3_OFFSET 0x00024000 /* 0x00024000-0x00027fff: USART3 */
|
||||
# define SAM_UART1_OFFSET 0x00028000 /* 0x00028000-0x0002bfff: UART1 */
|
||||
# define SAM_EMAC0_OFFSET 0x0002c000 /* 0x0002c000-0x0002ffff: EMAC */
|
||||
# define SAM_EMAC_OFFSET 0x0002c000 /* 0x0002c000-0x0002ffff: EMAC */
|
||||
# define SAM_UDPHS_OFFSET 0x00030000 /* 0x00030000-0x00033fff: UDPHS */
|
||||
# define SAM_SHA_OFFSET 0x00034000 /* 0x00034000-0x00037fff: SHA */
|
||||
# define SAM_AES_OFFSET 0x00038000 /* 0x00038000-0x0003bfff: AES */
|
||||
@@ -414,7 +414,7 @@
|
||||
#define SAM_USART2_VBASE (SAM_PERIPHB_VSECTION+SAM_USART2_OFFSET)
|
||||
#define SAM_USART3_VBASE (SAM_PERIPHB_VSECTION+SAM_USART3_OFFSET)
|
||||
#define SAM_UART1_VBASE (SAM_PERIPHB_VSECTION+SAM_UART1_OFFSET)
|
||||
#define SAM_EMAC0_VBASE (SAM_PERIPHB_VSECTION+SAM_EMAC0_OFFSET)
|
||||
#define SAM_EMAC_VBASE (SAM_PERIPHB_VSECTION+SAM_EMAC_OFFSET)
|
||||
#define SAM_UDPHS_VBASE (SAM_PERIPHB_VSECTION+SAM_UDPHS_OFFSET)
|
||||
#define SAM_SHA_VBASE (SAM_PERIPHB_VSECTION+SAM_SHA_OFFSET)
|
||||
#define SAM_AES_VBASE (SAM_PERIPHB_VSECTION+SAM_AES_OFFSET)
|
||||
|
||||
@@ -133,16 +133,16 @@
|
||||
|
||||
/* RMII Ethernet 10/100 - EMAC */
|
||||
|
||||
#define PIO_EMAC0_CRSDV (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOC | PIO_PIN5) /* Type: GPIO */
|
||||
#define PIO_EMAC0_MDC (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOC | PIO_PIN8) /* Type: GPIO */
|
||||
#define PIO_EMAC0_MDIO (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOC | PIO_PIN9) /* Type: GPIO */
|
||||
#define PIO_EMAC0_REFCK (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOC | PIO_PIN7) /* Type: GPIO */
|
||||
#define PIO_EMAC0_RX0 (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOC | PIO_PIN2) /* Type: GPIO */
|
||||
#define PIO_EMAC0_RX1 (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOC | PIO_PIN3) /* Type: GPIO */
|
||||
#define PIO_EMAC0_RXER (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOC | PIO_PIN6) /* Type: GPIO */
|
||||
#define PIO_EMAC0_TX0 (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOC | PIO_PIN0) /* Type: GPIO */
|
||||
#define PIO_EMAC0_TX1 (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOC | PIO_PIN1) /* Type: GPIO */
|
||||
#define PIO_EMAC0_TXEN (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOC | PIO_PIN4) /* Type: GPIO */
|
||||
#define PIO_EMAC_CRSDV (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOC | PIO_PIN5) /* Type: GPIO */
|
||||
#define PIO_EMAC_MDC (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOC | PIO_PIN8) /* Type: GPIO */
|
||||
#define PIO_EMAC_MDIO (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOC | PIO_PIN9) /* Type: GPIO */
|
||||
#define PIO_EMAC_REFCK (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOC | PIO_PIN7) /* Type: GPIO */
|
||||
#define PIO_EMAC_RX0 (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOC | PIO_PIN2) /* Type: GPIO */
|
||||
#define PIO_EMAC_RX1 (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOC | PIO_PIN3) /* Type: GPIO */
|
||||
#define PIO_EMAC_RXER (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOC | PIO_PIN6) /* Type: GPIO */
|
||||
#define PIO_EMAC_TX0 (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOC | PIO_PIN0) /* Type: GPIO */
|
||||
#define PIO_EMAC_TX1 (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOC | PIO_PIN1) /* Type: GPIO */
|
||||
#define PIO_EMAC_TXEN (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOC | PIO_PIN4) /* Type: GPIO */
|
||||
|
||||
/* GIgabit Ethernet 10/100/1000 - GMAC */
|
||||
|
||||
|
||||
+168
-168
File diff suppressed because it is too large
Load Diff
@@ -109,7 +109,7 @@ static inline void up_gmac_initialize(void)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SAMA5_EMAC0
|
||||
#ifdef CONFIG_SAMA5_EMAC
|
||||
static inline void up_emac_initialize(void)
|
||||
{
|
||||
int ret;
|
||||
@@ -162,4 +162,4 @@ void up_netinitialize(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* CONFIG_NET && CONFIG_SAMA5_EMAC0 */
|
||||
#endif /* CONFIG_NET */
|
||||
|
||||
@@ -60,11 +60,11 @@
|
||||
# undef CONFIG_SAMA5_GMAC_ISETH0
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_SAMA5_EMAC0
|
||||
# undef CONFIG_SAMA5_EMAC0_ISETH0
|
||||
#ifndef CONFIG_SAMA5_EMAC
|
||||
# undef CONFIG_SAMA5_EMAC_ISETH0
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SAMA5_GMAC_ISETH0) && defined(CONFIG_SAMA5_EMAC0_ISETH0)
|
||||
#if defined(CONFIG_SAMA5_GMAC_ISETH0) && defined(CONFIG_SAMA5_EMAC_ISETH0)
|
||||
# error GMAC and EMAC cannot both be ETH0
|
||||
#endif
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SAMA5_EMAC0_ISETH0)
|
||||
#if defined(CONFIG_SAMA5_EMAC_ISETH0)
|
||||
# if defined(CONFIG_ETH0_PHY_DM9161)
|
||||
# define SAMA5_EMAC_PHY_DM9161 1
|
||||
# elif defined(CONFIG_ETH0_PHY_LAN8700)
|
||||
@@ -106,7 +106,7 @@
|
||||
# else
|
||||
# error ETH0 PHY unrecognized
|
||||
# endif
|
||||
#elif defined(CONFIG_SAMA5_EMAC0)
|
||||
#elif defined(CONFIG_SAMA5_EMAC)
|
||||
# if defined(CONFIG_ETH1_PHY_DM9161)
|
||||
# define SAMA5_EMAC_PHY_DM9161 1
|
||||
# elif defined(CONFIG_ETH1_PHY_LAN8700)
|
||||
@@ -172,7 +172,7 @@ int sam_gmac_initialize(void);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SAMA5_EMAC0
|
||||
#ifdef CONFIG_SAMA5_EMAC
|
||||
int sam_emac_initialize(void);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -180,4 +180,4 @@ int sam_isi_initialize(void)
|
||||
#warning Missing logic
|
||||
}
|
||||
|
||||
#endif /* CONFIG_SAMA5_ISI && CONFIG_SAMA5_EMAC0 */
|
||||
#endif /* CONFIG_SAMA5_ISI */
|
||||
|
||||
@@ -238,4 +238,4 @@ void sam_pck_enable(enum pckid_e pckid, bool enable)
|
||||
putreg32(regval, regaddr);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_SAMA5_ISI && CONFIG_SAMA5_EMAC0 */
|
||||
#endif /* CONFIG_SAMA5_ISI */
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
#define sam_uhphs_enableclk() sam_enableperiph1(SAM_PID_UHPHS)
|
||||
#define sam_udphs_enableclk() sam_enableperiph1(SAM_PID_UDPHS)
|
||||
#define sam_gmac_enableclk() sam_enableperiph1(SAM_PID_GMAC)
|
||||
#define sam_emac0_enableclk() sam_enableperiph1(SAM_PID_EMAC0)
|
||||
#define sam_emac_enableclk() sam_enableperiph1(SAM_PID_EMAC)
|
||||
#define sam_lcdc_enableclk() sam_enableperiph1(SAM_PID_LCDC)
|
||||
#define sam_isi_enableclk() sam_enableperiph1(SAM_PID_ISI)
|
||||
#define sam_ssc0_enableclk() sam_enableperiph1(SAM_PID_SSC0)
|
||||
@@ -141,7 +141,7 @@
|
||||
#define sam_uhphs_disableclk() sam_disableperiph1(SAM_PID_UHPHS)
|
||||
#define sam_udphs_disableclk() sam_disableperiph1(SAM_PID_UDPHS)
|
||||
#define sam_gmac_disableclk() sam_disableperiph1(SAM_PID_GMAC)
|
||||
#define sam_emac0_disableclk() sam_disableperiph1(SAM_PID_EMAC0)
|
||||
#define sam_emac_disableclk() sam_disableperiph1(SAM_PID_EMAC)
|
||||
#define sam_lcdc_disableclk() sam_disableperiph1(SAM_PID_LCDC)
|
||||
#define sam_isi_disableclk() sam_disableperiph1(SAM_PID_ISI)
|
||||
#define sam_ssc0_disableclk() sam_disableperiph1(SAM_PID_SSC0)
|
||||
|
||||
@@ -748,25 +748,25 @@ Networking
|
||||
peripherals: (1) The 10/100Base-T EMAC peripheral and (2) the
|
||||
10/100/1000Base-T GMAC peripheral.
|
||||
|
||||
Selecting the EMAC0 peripheral
|
||||
Selecting the EMAC peripheral
|
||||
-----------------------------
|
||||
|
||||
System Type -> SAMA5 Peripheral Support
|
||||
CONFIG_SAMA5_EMAC0=y : Enable the EMAC peripheral
|
||||
CONFIG_SAMA5_EMAC=y : Enable the EMAC peripheral
|
||||
|
||||
System Type -> EMAC device driver options
|
||||
CONFIG_SAMA5_EMAC0_NRXBUFFERS=16 : Set aside some RS and TX buffers
|
||||
CONFIG_SAMA5_EMAC0_NTXBUFFERS=4
|
||||
CONFIG_SAMA5_EMAC0_PHYADDR=1 : KSZ9031 PHY is at address 1
|
||||
CONFIG_SAMA5_EMAC0_AUTONEG=y : Use autonegotiation
|
||||
CONFIG_SAMA5_EMAC0_RMII=y : Either MII or RMII interface should work
|
||||
CONFIG_SAMA5_EMAC0_PHYSR=30 : Address of PHY status register on KSZ9031
|
||||
CONFIG_SAMA5_EMAC0_PHYSR_ALTCONFIG=y : Needed for KSZ9031
|
||||
CONFIG_SAMA5_EMAC0_PHYSR_ALTMODE=0x7 : " " " " " "
|
||||
CONFIG_SAMA5_EMAC0_PHYSR_10HD=0x1 : " " " " " "
|
||||
CONFIG_SAMA5_EMAC0_PHYSR_100HD=0x2 : " " " " " "
|
||||
CONFIG_SAMA5_EMAC0_PHYSR_10FD=0x5 : " " " " " "
|
||||
CONFIG_SAMA5_EMAC0_PHYSR_100FD=0x6 : " " " " " "
|
||||
CONFIG_SAMA5_EMAC_NRXBUFFERS=16 : Set aside some RS and TX buffers
|
||||
CONFIG_SAMA5_EMAC_NTXBUFFERS=4
|
||||
CONFIG_SAMA5_EMAC_PHYADDR=1 : KSZ9031 PHY is at address 1
|
||||
CONFIG_SAMA5_EMAC_AUTONEG=y : Use autonegotiation
|
||||
CONFIG_SAMA5_EMAC_RMII=y : Either MII or RMII interface should work
|
||||
CONFIG_SAMA5_EMAC_PHYSR=30 : Address of PHY status register on KSZ9031
|
||||
CONFIG_SAMA5_EMAC_PHYSR_ALTCONFIG=y : Needed for KSZ9031
|
||||
CONFIG_SAMA5_EMAC_PHYSR_ALTMODE=0x7 : " " " " " "
|
||||
CONFIG_SAMA5_EMAC_PHYSR_10HD=0x1 : " " " " " "
|
||||
CONFIG_SAMA5_EMAC_PHYSR_100HD=0x2 : " " " " " "
|
||||
CONFIG_SAMA5_EMAC_PHYSR_10FD=0x5 : " " " " " "
|
||||
CONFIG_SAMA5_EMAC_PHYSR_100FD=0x6 : " " " " " "
|
||||
|
||||
PHY selection. Later in the configuration steps, you will need to select
|
||||
the KSZ9031 PHY for EMAC (See below)
|
||||
@@ -2477,7 +2477,7 @@ SAMA5D3-Xplained Configuration Options
|
||||
CONFIG_SAMA5_UHPHS - USB Host High Speed
|
||||
CONFIG_SAMA5_UDPHS - USB Device High Speed
|
||||
CONFIG_SAMA5_GMAC - Gigabit Ethernet MAC
|
||||
CONFIG_SAMA5_EMAC0 - Ethernet MAC 0
|
||||
CONFIG_SAMA5_EMAC - Ethernet MAC
|
||||
CONFIG_SAMA5_LCDC - LCD Controller
|
||||
CONFIG_SAMA5_ISI - Image Sensor Interface
|
||||
CONFIG_SAMA5_SSC0 - Synchronous Serial Controller 0
|
||||
|
||||
@@ -335,7 +335,7 @@ void sam_boardinitialize(void);
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
#if defined(CONFIG_NET) && (defined(CONFIG_SAMA5_EMAC0) || defined(CONFIG_SAMA5_GMAC)) && \
|
||||
#if defined(CONFIG_NET) && (defined(CONFIG_SAMA5_EMAC) || defined(CONFIG_SAMA5_GMAC)) && \
|
||||
defined(CONFIG_SAMA5_PIOE_IRQ)
|
||||
xcpt_t sam_phyirq(int intf, xcpt_t irqhandler);
|
||||
#endif
|
||||
|
||||
@@ -128,7 +128,7 @@ CONFIG_SAMA5_HAVE_CAN0=y
|
||||
CONFIG_SAMA5_HAVE_CAN1=y
|
||||
CONFIG_SAMA5_HAVE_LCDC=y
|
||||
CONFIG_SAMA5_HAVE_GMAC=y
|
||||
CONFIG_SAMA5_HAVE_EMAC0=y
|
||||
CONFIG_SAMA5_HAVE_EMAC=y
|
||||
CONFIG_SAMA5_HAVE_HSMCI2=y
|
||||
CONFIG_SAMA5_HAVE_TC1=y
|
||||
# CONFIG_ARCH_CHIP_ATSAMA5D31 is not set
|
||||
@@ -169,7 +169,7 @@ CONFIG_SAMA5_HSMC=y
|
||||
# CONFIG_SAMA5_UHPHS is not set
|
||||
# CONFIG_SAMA5_UDPHS is not set
|
||||
# CONFIG_SAMA5_GMAC is not set
|
||||
# CONFIG_SAMA5_EMAC0 is not set
|
||||
# CONFIG_SAMA5_EMAC is not set
|
||||
# CONFIG_SAMA5_LCDC is not set
|
||||
# CONFIG_SAMA5_ISI is not set
|
||||
# CONFIG_SAMA5_CAN0 is not set
|
||||
|
||||
@@ -84,7 +84,7 @@ CSRCS += sam_usb.c
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_SAMA5_EMAC0),y)
|
||||
ifeq ($(CONFIG_SAMA5_EMAC),y)
|
||||
CSRCS += sam_ethernet.c
|
||||
else
|
||||
ifeq ($(CONFIG_SAMA5_GMAC),y)
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SAMA5_PIOE_IRQ
|
||||
#ifdef CONFIG_SAMA5_EMAC0
|
||||
#ifdef CONFIG_SAMA5_EMAC
|
||||
static xcpt g_emac_handler;
|
||||
#endif
|
||||
#ifdef CONFIG_SAMA5_GMAC
|
||||
@@ -138,7 +138,7 @@ xcpt_t sam_phyirq(int intf, xcpt_t irqhandler)
|
||||
xcpt_t oldhandler;
|
||||
int irq;
|
||||
|
||||
#ifdef CONFIG_SAMA5_EMAC0
|
||||
#ifdef CONFIG_SAMA5_EMAC
|
||||
if (intf == EMAC_INTF)
|
||||
{
|
||||
handler = &g_emac_handler;
|
||||
|
||||
@@ -255,7 +255,7 @@
|
||||
|
||||
/* Networking */
|
||||
|
||||
#if !defined(CONFIG_NET) || (!defined(CONFIG_SAMA5_EMAC0) && !defined(CONFIG_SAMA5_GMAC))
|
||||
#if !defined(CONFIG_NET) || (!defined(CONFIG_SAMA5_EMAC) && !defined(CONFIG_SAMA5_GMAC))
|
||||
# undef HAVE_NETWORK
|
||||
#endif
|
||||
|
||||
|
||||
@@ -891,29 +891,29 @@ Networking
|
||||
the EMAC peripheral; Only the SAMA5D33, SAMA5D34, and SAMA5D35 support
|
||||
the GMAC perpheral! NOTE that the SAMA5D35 supports both!
|
||||
|
||||
Selecting the EMAC0 peripheral
|
||||
------------------------------
|
||||
Selecting the EMAC peripheral
|
||||
-----------------------------
|
||||
|
||||
System Type
|
||||
CONFIG_ARCH_CHIP_ATSAMA5D31=y : SAMA5D31 or SAMAD35 support EMAC
|
||||
CONFIG_ARCH_CHIP_ATSAMA5D35=y : (others do not)
|
||||
|
||||
System Type -> SAMA5 Peripheral Support
|
||||
CONFIG_SAMA5_EMAC0=y : Enable the EMAC peripheral
|
||||
CONFIG_SAMA5_EMAC=y : Enable the EMAC peripheral
|
||||
|
||||
System Type -> EMAC0 device driver options
|
||||
CONFIG_SAMA5_EMAC0_NRXBUFFERS=16 : Set aside some RS and TX buffers
|
||||
CONFIG_SAMA5_EMAC0_NTXBUFFERS=4
|
||||
CONFIG_SAMA5_EMAC0_PHYADDR=1 : KSZ8021/31 PHY is at address 1
|
||||
CONFIG_SAMA5_EMAC0_AUTONEG=y : Use autonegotiation
|
||||
CONFIG_SAMA5_EMAC0_RMII=y : Either MII or RMII interface should work
|
||||
CONFIG_SAMA5_EMAC0_PHYSR=30 : Address of PHY status register on KSZ8021/31
|
||||
CONFIG_SAMA5_EMAC0_PHYSR_ALTCONFIG=y : Needed for KSZ8021/31
|
||||
CONFIG_SAMA5_EMAC0_PHYSR_ALTMODE=0x7 : " " " " " "
|
||||
CONFIG_SAMA5_EMAC0_PHYSR_10HD=0x1 : " " " " " "
|
||||
CONFIG_SAMA5_EMAC0_PHYSR_100HD=0x2 : " " " " " "
|
||||
CONFIG_SAMA5_EMAC0_PHYSR_10FD=0x5 : " " " " " "
|
||||
CONFIG_SAMA5_EMAC0_PHYSR_100FD=0x6 : " " " " " "
|
||||
System Type -> EMAC device driver options
|
||||
CONFIG_SAMA5_EMAC_NRXBUFFERS=16 : Set aside some RS and TX buffers
|
||||
CONFIG_SAMA5_EMAC_NTXBUFFERS=4
|
||||
CONFIG_SAMA5_EMAC_PHYADDR=1 : KSZ8021/31 PHY is at address 1
|
||||
CONFIG_SAMA5_EMAC_AUTONEG=y : Use autonegotiation
|
||||
CONFIG_SAMA5_EMAC_RMII=y : Either MII or RMII interface should work
|
||||
CONFIG_SAMA5_EMAC_PHYSR=30 : Address of PHY status register on KSZ8021/31
|
||||
CONFIG_SAMA5_EMAC_PHYSR_ALTCONFIG=y : Needed for KSZ8021/31
|
||||
CONFIG_SAMA5_EMAC_PHYSR_ALTMODE=0x7 : " " " " " "
|
||||
CONFIG_SAMA5_EMAC_PHYSR_10HD=0x1 : " " " " " "
|
||||
CONFIG_SAMA5_EMAC_PHYSR_100HD=0x2 : " " " " " "
|
||||
CONFIG_SAMA5_EMAC_PHYSR_10FD=0x5 : " " " " " "
|
||||
CONFIG_SAMA5_EMAC_PHYSR_100FD=0x6 : " " " " " "
|
||||
|
||||
PHY selection. Later in the configuration steps, you will need to select
|
||||
the KSZ8021/31 PHY for EMAC (See below)
|
||||
@@ -2822,7 +2822,7 @@ SAMA5D3x-EK Configuration Options
|
||||
CONFIG_SAMA5_UHPHS - USB Host High Speed
|
||||
CONFIG_SAMA5_UDPHS - USB Device High Speed
|
||||
CONFIG_SAMA5_GMAC - Gigabit Ethernet MAC
|
||||
CONFIG_SAMA5_EMAC0 - Ethernet MAC 0
|
||||
CONFIG_SAMA5_EMAC - Ethernet MAC
|
||||
CONFIG_SAMA5_LCDC - LCD Controller
|
||||
CONFIG_SAMA5_ISI - Image Sensor Interface
|
||||
CONFIG_SAMA5_SSC0 - Synchronous Serial Controller 0
|
||||
|
||||
@@ -133,7 +133,7 @@ CONFIG_USBHOST_ISOC_DISABLE=y
|
||||
# CONFIG_SAMA5_HAVE_CAN1 is not set
|
||||
CONFIG_SAMA5_HAVE_LCDC=y
|
||||
CONFIG_SAMA5_HAVE_GMAC=y
|
||||
# CONFIG_SAMA5_HAVE_EMAC0 is not set
|
||||
# CONFIG_SAMA5_HAVE_EMAC is not set
|
||||
# CONFIG_SAMA5_HAVE_HSMCI2 is not set
|
||||
# CONFIG_SAMA5_HAVE_TC1 is not set
|
||||
# CONFIG_ARCH_CHIP_ATSAMA5D31 is not set
|
||||
|
||||
@@ -128,7 +128,7 @@ CONFIG_ARMV7A_TOOLCHAIN_CODESOURCERYW=y
|
||||
# CONFIG_SAMA5_HAVE_CAN1 is not set
|
||||
CONFIG_SAMA5_HAVE_LCDC=y
|
||||
CONFIG_SAMA5_HAVE_GMAC=y
|
||||
# CONFIG_SAMA5_HAVE_EMAC0 is not set
|
||||
# CONFIG_SAMA5_HAVE_EMAC is not set
|
||||
# CONFIG_SAMA5_HAVE_HSMCI2 is not set
|
||||
# CONFIG_SAMA5_HAVE_TC1 is not set
|
||||
# CONFIG_ARCH_CHIP_ATSAMA5D31 is not set
|
||||
|
||||
@@ -376,7 +376,7 @@ void sam_boardinitialize(void);
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
#if defined(CONFIG_NET) && (defined(CONFIG_SAMA5_EMAC0) || defined(CONFIG_SAMA5_GMAC)) && \
|
||||
#if defined(CONFIG_NET) && (defined(CONFIG_SAMA5_EMAC) || defined(CONFIG_SAMA5_GMAC)) && \
|
||||
defined(CONFIG_SAMA5_PIOE_IRQ)
|
||||
xcpt_t sam_phyirq(int intf, xcpt_t irqhandler);
|
||||
#endif
|
||||
|
||||
@@ -128,7 +128,7 @@ CONFIG_ARMV7A_TOOLCHAIN_CODESOURCERYW=y
|
||||
# CONFIG_SAMA5_HAVE_CAN1 is not set
|
||||
CONFIG_SAMA5_HAVE_LCDC=y
|
||||
CONFIG_SAMA5_HAVE_GMAC=y
|
||||
# CONFIG_SAMA5_HAVE_EMAC0 is not set
|
||||
# CONFIG_SAMA5_HAVE_EMAC is not set
|
||||
# CONFIG_SAMA5_HAVE_HSMCI2 is not set
|
||||
# CONFIG_SAMA5_HAVE_TC1 is not set
|
||||
# CONFIG_ARCH_CHIP_ATSAMA5D31 is not set
|
||||
|
||||
@@ -128,7 +128,7 @@ CONFIG_ARMV7A_TOOLCHAIN_CODESOURCERYW=y
|
||||
# CONFIG_SAMA5_HAVE_CAN1 is not set
|
||||
CONFIG_SAMA5_HAVE_LCDC=y
|
||||
CONFIG_SAMA5_HAVE_GMAC=y
|
||||
# CONFIG_SAMA5_HAVE_EMAC0 is not set
|
||||
# CONFIG_SAMA5_HAVE_EMAC is not set
|
||||
# CONFIG_SAMA5_HAVE_HSMCI2 is not set
|
||||
# CONFIG_SAMA5_HAVE_TC1 is not set
|
||||
# CONFIG_ARCH_CHIP_ATSAMA5D31 is not set
|
||||
|
||||
@@ -128,7 +128,7 @@ CONFIG_ARMV7A_TOOLCHAIN_CODESOURCERYW=y
|
||||
# CONFIG_SAMA5_HAVE_CAN1 is not set
|
||||
CONFIG_SAMA5_HAVE_LCDC=y
|
||||
CONFIG_SAMA5_HAVE_GMAC=y
|
||||
# CONFIG_SAMA5_HAVE_EMAC0 is not set
|
||||
# CONFIG_SAMA5_HAVE_EMAC is not set
|
||||
# CONFIG_SAMA5_HAVE_HSMCI2 is not set
|
||||
# CONFIG_SAMA5_HAVE_TC1 is not set
|
||||
# CONFIG_ARCH_CHIP_ATSAMA5D31 is not set
|
||||
|
||||
@@ -128,7 +128,7 @@ CONFIG_ARMV7A_TOOLCHAIN_CODESOURCERYW=y
|
||||
# CONFIG_SAMA5_HAVE_CAN1 is not set
|
||||
CONFIG_SAMA5_HAVE_LCDC=y
|
||||
CONFIG_SAMA5_HAVE_GMAC=y
|
||||
# CONFIG_SAMA5_HAVE_EMAC0 is not set
|
||||
# CONFIG_SAMA5_HAVE_EMAC is not set
|
||||
# CONFIG_SAMA5_HAVE_HSMCI2 is not set
|
||||
# CONFIG_SAMA5_HAVE_TC1 is not set
|
||||
# CONFIG_ARCH_CHIP_ATSAMA5D31 is not set
|
||||
|
||||
@@ -128,7 +128,7 @@ CONFIG_ARMV7A_TOOLCHAIN_CODESOURCERYW=y
|
||||
# CONFIG_SAMA5_HAVE_CAN1 is not set
|
||||
CONFIG_SAMA5_HAVE_LCDC=y
|
||||
CONFIG_SAMA5_HAVE_GMAC=y
|
||||
# CONFIG_SAMA5_HAVE_EMAC0 is not set
|
||||
# CONFIG_SAMA5_HAVE_EMAC is not set
|
||||
# CONFIG_SAMA5_HAVE_HSMCI2 is not set
|
||||
# CONFIG_SAMA5_HAVE_TC1 is not set
|
||||
# CONFIG_ARCH_CHIP_ATSAMA5D31 is not set
|
||||
|
||||
@@ -98,7 +98,7 @@ CSRCS += sam_usb.c
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_SAMA5_EMAC0),y)
|
||||
ifeq ($(CONFIG_SAMA5_EMAC),y)
|
||||
CSRCS += sam_ethernet.c
|
||||
else
|
||||
ifeq ($(CONFIG_SAMA5_GMAC),y)
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SAMA5_PIOE_IRQ
|
||||
#ifdef CONFIG_SAMA5_EMAC0
|
||||
#ifdef CONFIG_SAMA5_EMAC
|
||||
static xcpt g_emac_handler;
|
||||
#endif
|
||||
#ifdef CONFIG_SAMA5_GMAC
|
||||
@@ -138,7 +138,7 @@ xcpt_t sam_phyirq(int intf, xcpt_t irqhandler)
|
||||
xcpt_t oldhandler;
|
||||
int irq;
|
||||
|
||||
#ifdef CONFIG_SAMA5_EMAC0
|
||||
#ifdef CONFIG_SAMA5_EMAC
|
||||
if (intf == EMAC_INTF)
|
||||
{
|
||||
handler = &g_emac_handler;
|
||||
|
||||
@@ -314,7 +314,7 @@
|
||||
|
||||
/* Networking */
|
||||
|
||||
#if !defined(CONFIG_NET) || (!defined(CONFIG_SAMA5_EMAC0) && !defined(CONFIG_SAMA5_GMAC))
|
||||
#if !defined(CONFIG_NET) || (!defined(CONFIG_SAMA5_EMAC) && !defined(CONFIG_SAMA5_GMAC))
|
||||
# undef HAVE_NETWORK
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user