rza1_eth_driver.h File Reference

Renesas RZ/A1 Ethernet MAC controller. More...

#include "core/nic.h"

Go to the source code of this file.

Data Structures

struct  Rza1TxDmaDesc
 Transmit DMA descriptor. More...
 
struct  Rza1RxDmaDesc
 Receive DMA descriptor. More...
 

Macros

#define RZA1_ETH_TX_BUFFER_COUNT   8
 
#define RZA1_ETH_TX_BUFFER_SIZE   1536
 
#define RZA1_ETH_RX_BUFFER_COUNT   8
 
#define RZA1_ETH_RX_BUFFER_SIZE   1536
 
#define RZA1_ETH_IRQ_PRIORITY   25
 
#define ETHER_ARSTR_ARST   0x00000001
 
#define ETH_ECMR0_TRCCM   0x04000000
 
#define ETH_ECMR0_RCSC   0x00800000
 
#define ETH_ECMR0_DPAD   0x00200000
 
#define ETH_ECMR0_RZPF   0x00100000
 
#define ETH_ECMR0_ZPF   0x00080000
 
#define ETH_ECMR0_PFR   0x00040000
 
#define ETH_ECMR0_RXF   0x00020000
 
#define ETH_ECMR0_TXF   0x00010000
 
#define ETH_ECMR0_MCT   0x00002000
 
#define ETH_ECMR0_RE   0x00000040
 
#define ETH_ECMR0_TE   0x00000020
 
#define ETH_ECMR0_DM   0x00000002
 
#define ETH_ECMR0_PRM   0x00000001
 
#define ETHER_PIR0_MDI   0x00000008
 
#define ETHER_PIR0_MDO   0x00000004
 
#define ETHER_PIR0_MMD   0x00000002
 
#define ETHER_PIR0_MDC   0x00000001
 
#define ETHER_TSU_ADSBSY_ADSBSY   0x00000001
 
#define ETHER_EDSR0_ENT   0x00000002
 
#define ETHER_EDSR0_ENR   0x00000001
 
#define ETHER_EDMR0_DE   0x00000040
 
#define ETHER_EDMR0_DL   0x00000030
 
#define ETHER_EDMR0_SWRT   0x00000002
 
#define ETHER_EDMR0_SWRR   0x00000001
 
#define ETHER_EDMR0_DL_16   0x00000000
 
#define ETHER_EDMR0_DL_32   0x00000010
 
#define ETHER_EDMR0_DL_64   0x00000020
 
#define ETHER_EDTRR0_TR   0x00000003
 
#define ETHER_EDRRR0_RR   0x00000001
 
#define ETHER_EESR0_TWB   0xC0000000
 
#define ETHER_EESR0_TC1   0x20000000
 
#define ETHER_EESR0_TUC   0x10000000
 
#define ETHER_EESR0_ROC   0x08000000
 
#define ETHER_EESR0_TABT   0x04000000
 
#define ETHER_EESR0_RABT   0x02000000
 
#define ETHER_EESR0_RFCOF   0x01000000
 
#define ETHER_EESR0_ECI   0x00400000
 
#define ETHER_EESR0_TC0   0x00200000
 
#define ETHER_EESR0_TDE   0x00100000
 
#define ETHER_EESR0_TFUF   0x00080000
 
#define ETHER_EESR0_FR   0x00040000
 
#define ETHER_EESR0_RDE   0x00020000
 
#define ETHER_EESR0_RFOF   0x00010000
 
#define ETHER_EESR0_RMAF   0x00000080
 
#define ETHER_EESR0_RRF   0x00000010
 
#define ETHER_EESR0_RTLF   0x00000008
 
#define ETHER_EESR0_RTSF   0x00000004
 
#define ETHER_EESR0_PRE   0x00000002
 
#define ETHER_EESR0_CERF   0x00000001
 
#define ETHER_EESIPR0_TWBIP   0xC0000000
 
#define ETHER_EESIPR0_TC1IP   0x20000000
 
#define ETHER_EESIPR0_TUCIP   0x10000000
 
#define ETHER_EESIPR0_ROCIP   0x08000000
 
#define ETHER_EESIPR0_TABTIP   0x04000000
 
#define ETHER_EESIPR0_RABTIP   0x02000000
 
#define ETHER_EESIPR0_RFCOFIP   0x01000000
 
#define ETHER_EESIPR0_ECIIP   0x00400000
 
#define ETHER_EESIPR0_TC0IP   0x00200000
 
#define ETHER_EESIPR0_TDEIP   0x00100000
 
#define ETHER_EESIPR0_TFUFIP   0x00080000
 
#define ETHER_EESIPR0_FRIP   0x00040000
 
#define ETHER_EESIPR0_RDEIP   0x00020000
 
#define ETHER_EESIPR0_RFOFIP   0x00010000
 
#define ETHER_EESIPR0_RMAFIP   0x00000080
 
#define ETHER_EESIPR0_RRFIP   0x00000010
 
#define ETHER_EESIPR0_RTLFIP   0x00000008
 
#define ETHER_EESIPR0_RTSFIP   0x00000004
 
#define ETHER_EESIPR0_PREIP   0x00000002
 
#define ETHER_EESIPR0_CERFIP   0x00000001
 
#define ETHER_TDFFR_TDLF   0x00000001
 
#define ETHER_RDFFR0_RDLF   0x00000001
 
#define ETHER_FDR0_TFD   0x00000700
 
#define ETHER_FDR0_RFD   0X0000001F
 
#define ETHER_FDR0_TFD_2048   0x00000700
 
#define ETHER_FDR0_RFD_2048   0x00000007
 
#define ETHER_RMCR0_RNC   0x00000001
 
#define ETHER_FCFTR0_RFF   0x001F0000
 
#define ETHER_FCFTR0_RFD   0x000000FF
 
#define ETHER_FCFTR0_RFF_8   0x00070000
 
#define ETHER_FCFTR0_RFD_2048   0x00000007
 
#define ETHER_TD0_TACT   0x80000000
 
#define ETHER_TD0_TDLE   0x40000000
 
#define ETHER_TD0_TFP_SOF   0x20000000
 
#define ETHER_TD0_TFP_EOF   0x10000000
 
#define ETHER_TD0_TFE   0x08000000
 
#define ETHER_TD0_TWBI   0x04000000
 
#define ETHER_TD0_TFS_MASK   0x00000300
 
#define ETHER_TD0_TFS_TUC   0x00000200
 
#define ETHER_TD0_TFS_TABT   0x00000100
 
#define ETHER_TD1_TDL   0xFFFF0000
 
#define ETHER_TD2_TBA   0xFFFFFFFF
 
#define ETHER_RD0_RACT   0x80000000
 
#define ETHER_RD0_RDLE   0x40000000
 
#define ETHER_RD0_RFP_SOF   0x20000000
 
#define ETHER_RD0_RFP_EOF   0x10000000
 
#define ETHER_RD0_RFE   0x08000000
 
#define ETHER_RD0_RCSE   0x04000000
 
#define ETHER_RD0_RFS_MASK   0x02DF0000
 
#define ETHER_RD0_RFS_RFOF   0x02000000
 
#define ETHER_RD0_RFS_RMAF   0x00800000
 
#define ETHER_RD0_RFS_RUAF   0x00400000
 
#define ETHER_RD0_RFS_RRF   0x00100000
 
#define ETHER_RD0_RFS_RTLF   0x00080000
 
#define ETHER_RD0_RFS_RTSF   0x00040000
 
#define ETHER_RD0_RFS_PRE   0x00020000
 
#define ETHER_RD0_RFS_CERF   0x00010000
 
#define ETHER_RD0_RCS   0x0000FFFF
 
#define ETHER_RD1_RBL   0xFFFF0000
 
#define ETHER_RD1_RDL   0x0000FFFF
 
#define ETHER_RD2_RBA   0xFFFFFFFF
 
#define SMI_SYNC   0xFFFFFFFF
 
#define SMI_START   0x00000001
 
#define SMI_WRITE   0x00000001
 
#define SMI_READ   0x00000002
 
#define SMI_TA   0x00000002
 

Functions

error_t rza1EthInit (NetInterface *interface)
 RZ/A1 Ethernet MAC initialization. More...
 
void rza1EthInitGpio (NetInterface *interface)
 
void rza1EthInitDmaDesc (NetInterface *interface)
 Initialize DMA descriptor lists. More...
 
void rza1EthTick (NetInterface *interface)
 RZ/A1 Ethernet MAC timer handler. More...
 
void rza1EthEnableIrq (NetInterface *interface)
 Enable interrupts. More...
 
void rza1EthDisableIrq (NetInterface *interface)
 Disable interrupts. More...
 
void rza1EthIrqHandler (uint32_t intSense)
 RZ/A1 Ethernet MAC interrupt service routine. More...
 
void rza1EthEventHandler (NetInterface *interface)
 RZ/A1 Ethernet MAC event handler. More...
 
error_t rza1EthSendPacket (NetInterface *interface, const NetBuffer *buffer, size_t offset)
 Send a packet. More...
 
error_t rza1EthReceivePacket (NetInterface *interface)
 Receive a packet. More...
 
error_t rza1EthUpdateMacAddrFilter (NetInterface *interface)
 Configure MAC address filtering. More...
 
error_t rza1EthUpdateMacConfig (NetInterface *interface)
 Adjust MAC configuration parameters for proper operation. More...
 
void rza1EthWritePhyReg (uint8_t phyAddr, uint8_t regAddr, uint16_t data)
 Write PHY register. More...
 
uint16_t rza1EthReadPhyReg (uint8_t phyAddr, uint8_t regAddr)
 Read PHY register. More...
 
void rza1EthWriteSmi (uint32_t data, uint_t length)
 SMI write operation. More...
 
uint32_t rza1EthReadSmi (uint_t length)
 SMI read operation. More...
 

Variables

const NicDriver rza1EthDriver
 RZ/A1 Ethernet MAC driver. More...
 

Detailed Description

Renesas RZ/A1 Ethernet MAC controller.

License

Copyright (C) 2010-2018 Oryx Embedded SARL. All rights reserved.

This file is part of CycloneTCP Open.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
1.9.0

Definition in file rza1_eth_driver.h.

Macro Definition Documentation

◆ ETH_ECMR0_DM

#define ETH_ECMR0_DM   0x00000002

Definition at line 85 of file rza1_eth_driver.h.

◆ ETH_ECMR0_DPAD

#define ETH_ECMR0_DPAD   0x00200000

Definition at line 76 of file rza1_eth_driver.h.

◆ ETH_ECMR0_MCT

#define ETH_ECMR0_MCT   0x00002000

Definition at line 82 of file rza1_eth_driver.h.

◆ ETH_ECMR0_PFR

#define ETH_ECMR0_PFR   0x00040000

Definition at line 79 of file rza1_eth_driver.h.

◆ ETH_ECMR0_PRM

#define ETH_ECMR0_PRM   0x00000001

Definition at line 86 of file rza1_eth_driver.h.

◆ ETH_ECMR0_RCSC

#define ETH_ECMR0_RCSC   0x00800000

Definition at line 75 of file rza1_eth_driver.h.

◆ ETH_ECMR0_RE

#define ETH_ECMR0_RE   0x00000040

Definition at line 83 of file rza1_eth_driver.h.

◆ ETH_ECMR0_RXF

#define ETH_ECMR0_RXF   0x00020000

Definition at line 80 of file rza1_eth_driver.h.

◆ ETH_ECMR0_RZPF

#define ETH_ECMR0_RZPF   0x00100000

Definition at line 77 of file rza1_eth_driver.h.

◆ ETH_ECMR0_TE

#define ETH_ECMR0_TE   0x00000020

Definition at line 84 of file rza1_eth_driver.h.

◆ ETH_ECMR0_TRCCM

#define ETH_ECMR0_TRCCM   0x04000000

Definition at line 74 of file rza1_eth_driver.h.

◆ ETH_ECMR0_TXF

#define ETH_ECMR0_TXF   0x00010000

Definition at line 81 of file rza1_eth_driver.h.

◆ ETH_ECMR0_ZPF

#define ETH_ECMR0_ZPF   0x00080000

Definition at line 78 of file rza1_eth_driver.h.

◆ ETHER_ARSTR_ARST

#define ETHER_ARSTR_ARST   0x00000001

Definition at line 71 of file rza1_eth_driver.h.

◆ ETHER_EDMR0_DE

#define ETHER_EDMR0_DE   0x00000040

Definition at line 102 of file rza1_eth_driver.h.

◆ ETHER_EDMR0_DL

#define ETHER_EDMR0_DL   0x00000030

Definition at line 103 of file rza1_eth_driver.h.

◆ ETHER_EDMR0_DL_16

#define ETHER_EDMR0_DL_16   0x00000000

Definition at line 107 of file rza1_eth_driver.h.

◆ ETHER_EDMR0_DL_32

#define ETHER_EDMR0_DL_32   0x00000010

Definition at line 108 of file rza1_eth_driver.h.

◆ ETHER_EDMR0_DL_64

#define ETHER_EDMR0_DL_64   0x00000020

Definition at line 109 of file rza1_eth_driver.h.

◆ ETHER_EDMR0_SWRR

#define ETHER_EDMR0_SWRR   0x00000001

Definition at line 105 of file rza1_eth_driver.h.

◆ ETHER_EDMR0_SWRT

#define ETHER_EDMR0_SWRT   0x00000002

Definition at line 104 of file rza1_eth_driver.h.

◆ ETHER_EDRRR0_RR

#define ETHER_EDRRR0_RR   0x00000001

Definition at line 115 of file rza1_eth_driver.h.

◆ ETHER_EDSR0_ENR

#define ETHER_EDSR0_ENR   0x00000001

Definition at line 99 of file rza1_eth_driver.h.

◆ ETHER_EDSR0_ENT

#define ETHER_EDSR0_ENT   0x00000002

Definition at line 98 of file rza1_eth_driver.h.

◆ ETHER_EDTRR0_TR

#define ETHER_EDTRR0_TR   0x00000003

Definition at line 112 of file rza1_eth_driver.h.

◆ ETHER_EESIPR0_CERFIP

#define ETHER_EESIPR0_CERFIP   0x00000001

Definition at line 159 of file rza1_eth_driver.h.

◆ ETHER_EESIPR0_ECIIP

#define ETHER_EESIPR0_ECIIP   0x00400000

Definition at line 147 of file rza1_eth_driver.h.

◆ ETHER_EESIPR0_FRIP

#define ETHER_EESIPR0_FRIP   0x00040000

Definition at line 151 of file rza1_eth_driver.h.

◆ ETHER_EESIPR0_PREIP

#define ETHER_EESIPR0_PREIP   0x00000002

Definition at line 158 of file rza1_eth_driver.h.

◆ ETHER_EESIPR0_RABTIP

#define ETHER_EESIPR0_RABTIP   0x02000000

Definition at line 145 of file rza1_eth_driver.h.

◆ ETHER_EESIPR0_RDEIP

#define ETHER_EESIPR0_RDEIP   0x00020000

Definition at line 152 of file rza1_eth_driver.h.

◆ ETHER_EESIPR0_RFCOFIP

#define ETHER_EESIPR0_RFCOFIP   0x01000000

Definition at line 146 of file rza1_eth_driver.h.

◆ ETHER_EESIPR0_RFOFIP

#define ETHER_EESIPR0_RFOFIP   0x00010000

Definition at line 153 of file rza1_eth_driver.h.

◆ ETHER_EESIPR0_RMAFIP

#define ETHER_EESIPR0_RMAFIP   0x00000080

Definition at line 154 of file rza1_eth_driver.h.

◆ ETHER_EESIPR0_ROCIP

#define ETHER_EESIPR0_ROCIP   0x08000000

Definition at line 143 of file rza1_eth_driver.h.

◆ ETHER_EESIPR0_RRFIP

#define ETHER_EESIPR0_RRFIP   0x00000010

Definition at line 155 of file rza1_eth_driver.h.

◆ ETHER_EESIPR0_RTLFIP

#define ETHER_EESIPR0_RTLFIP   0x00000008

Definition at line 156 of file rza1_eth_driver.h.

◆ ETHER_EESIPR0_RTSFIP

#define ETHER_EESIPR0_RTSFIP   0x00000004

Definition at line 157 of file rza1_eth_driver.h.

◆ ETHER_EESIPR0_TABTIP

#define ETHER_EESIPR0_TABTIP   0x04000000

Definition at line 144 of file rza1_eth_driver.h.

◆ ETHER_EESIPR0_TC0IP

#define ETHER_EESIPR0_TC0IP   0x00200000

Definition at line 148 of file rza1_eth_driver.h.

◆ ETHER_EESIPR0_TC1IP

#define ETHER_EESIPR0_TC1IP   0x20000000

Definition at line 141 of file rza1_eth_driver.h.

◆ ETHER_EESIPR0_TDEIP

#define ETHER_EESIPR0_TDEIP   0x00100000

Definition at line 149 of file rza1_eth_driver.h.

◆ ETHER_EESIPR0_TFUFIP

#define ETHER_EESIPR0_TFUFIP   0x00080000

Definition at line 150 of file rza1_eth_driver.h.

◆ ETHER_EESIPR0_TUCIP

#define ETHER_EESIPR0_TUCIP   0x10000000

Definition at line 142 of file rza1_eth_driver.h.

◆ ETHER_EESIPR0_TWBIP

#define ETHER_EESIPR0_TWBIP   0xC0000000

Definition at line 140 of file rza1_eth_driver.h.

◆ ETHER_EESR0_CERF

#define ETHER_EESR0_CERF   0x00000001

Definition at line 137 of file rza1_eth_driver.h.

◆ ETHER_EESR0_ECI

#define ETHER_EESR0_ECI   0x00400000

Definition at line 125 of file rza1_eth_driver.h.

◆ ETHER_EESR0_FR

#define ETHER_EESR0_FR   0x00040000

Definition at line 129 of file rza1_eth_driver.h.

◆ ETHER_EESR0_PRE

#define ETHER_EESR0_PRE   0x00000002

Definition at line 136 of file rza1_eth_driver.h.

◆ ETHER_EESR0_RABT

#define ETHER_EESR0_RABT   0x02000000

Definition at line 123 of file rza1_eth_driver.h.

◆ ETHER_EESR0_RDE

#define ETHER_EESR0_RDE   0x00020000

Definition at line 130 of file rza1_eth_driver.h.

◆ ETHER_EESR0_RFCOF

#define ETHER_EESR0_RFCOF   0x01000000

Definition at line 124 of file rza1_eth_driver.h.

◆ ETHER_EESR0_RFOF

#define ETHER_EESR0_RFOF   0x00010000

Definition at line 131 of file rza1_eth_driver.h.

◆ ETHER_EESR0_RMAF

#define ETHER_EESR0_RMAF   0x00000080

Definition at line 132 of file rza1_eth_driver.h.

◆ ETHER_EESR0_ROC

#define ETHER_EESR0_ROC   0x08000000

Definition at line 121 of file rza1_eth_driver.h.

◆ ETHER_EESR0_RRF

#define ETHER_EESR0_RRF   0x00000010

Definition at line 133 of file rza1_eth_driver.h.

◆ ETHER_EESR0_RTLF

#define ETHER_EESR0_RTLF   0x00000008

Definition at line 134 of file rza1_eth_driver.h.

◆ ETHER_EESR0_RTSF

#define ETHER_EESR0_RTSF   0x00000004

Definition at line 135 of file rza1_eth_driver.h.

◆ ETHER_EESR0_TABT

#define ETHER_EESR0_TABT   0x04000000

Definition at line 122 of file rza1_eth_driver.h.

◆ ETHER_EESR0_TC0

#define ETHER_EESR0_TC0   0x00200000

Definition at line 126 of file rza1_eth_driver.h.

◆ ETHER_EESR0_TC1

#define ETHER_EESR0_TC1   0x20000000

Definition at line 119 of file rza1_eth_driver.h.

◆ ETHER_EESR0_TDE

#define ETHER_EESR0_TDE   0x00100000

Definition at line 127 of file rza1_eth_driver.h.

◆ ETHER_EESR0_TFUF

#define ETHER_EESR0_TFUF   0x00080000

Definition at line 128 of file rza1_eth_driver.h.

◆ ETHER_EESR0_TUC

#define ETHER_EESR0_TUC   0x10000000

Definition at line 120 of file rza1_eth_driver.h.

◆ ETHER_EESR0_TWB

#define ETHER_EESR0_TWB   0xC0000000

Definition at line 118 of file rza1_eth_driver.h.

◆ ETHER_FCFTR0_RFD

#define ETHER_FCFTR0_RFD   0x000000FF

Definition at line 179 of file rza1_eth_driver.h.

◆ ETHER_FCFTR0_RFD_2048

#define ETHER_FCFTR0_RFD_2048   0x00000007

Definition at line 182 of file rza1_eth_driver.h.

◆ ETHER_FCFTR0_RFF

#define ETHER_FCFTR0_RFF   0x001F0000

Definition at line 178 of file rza1_eth_driver.h.

◆ ETHER_FCFTR0_RFF_8

#define ETHER_FCFTR0_RFF_8   0x00070000

Definition at line 181 of file rza1_eth_driver.h.

◆ ETHER_FDR0_RFD

#define ETHER_FDR0_RFD   0X0000001F

Definition at line 169 of file rza1_eth_driver.h.

◆ ETHER_FDR0_RFD_2048

#define ETHER_FDR0_RFD_2048   0x00000007

Definition at line 172 of file rza1_eth_driver.h.

◆ ETHER_FDR0_TFD

#define ETHER_FDR0_TFD   0x00000700

Definition at line 168 of file rza1_eth_driver.h.

◆ ETHER_FDR0_TFD_2048

#define ETHER_FDR0_TFD_2048   0x00000700

Definition at line 171 of file rza1_eth_driver.h.

◆ ETHER_PIR0_MDC

#define ETHER_PIR0_MDC   0x00000001

Definition at line 92 of file rza1_eth_driver.h.

◆ ETHER_PIR0_MDI

#define ETHER_PIR0_MDI   0x00000008

Definition at line 89 of file rza1_eth_driver.h.

◆ ETHER_PIR0_MDO

#define ETHER_PIR0_MDO   0x00000004

Definition at line 90 of file rza1_eth_driver.h.

◆ ETHER_PIR0_MMD

#define ETHER_PIR0_MMD   0x00000002

Definition at line 91 of file rza1_eth_driver.h.

◆ ETHER_RD0_RACT

#define ETHER_RD0_RACT   0x80000000

Definition at line 198 of file rza1_eth_driver.h.

◆ ETHER_RD0_RCS

#define ETHER_RD0_RCS   0x0000FFFF

Definition at line 213 of file rza1_eth_driver.h.

◆ ETHER_RD0_RCSE

#define ETHER_RD0_RCSE   0x04000000

Definition at line 203 of file rza1_eth_driver.h.

◆ ETHER_RD0_RDLE

#define ETHER_RD0_RDLE   0x40000000

Definition at line 199 of file rza1_eth_driver.h.

◆ ETHER_RD0_RFE

#define ETHER_RD0_RFE   0x08000000

Definition at line 202 of file rza1_eth_driver.h.

◆ ETHER_RD0_RFP_EOF

#define ETHER_RD0_RFP_EOF   0x10000000

Definition at line 201 of file rza1_eth_driver.h.

◆ ETHER_RD0_RFP_SOF

#define ETHER_RD0_RFP_SOF   0x20000000

Definition at line 200 of file rza1_eth_driver.h.

◆ ETHER_RD0_RFS_CERF

#define ETHER_RD0_RFS_CERF   0x00010000

Definition at line 212 of file rza1_eth_driver.h.

◆ ETHER_RD0_RFS_MASK

#define ETHER_RD0_RFS_MASK   0x02DF0000

Definition at line 204 of file rza1_eth_driver.h.

◆ ETHER_RD0_RFS_PRE

#define ETHER_RD0_RFS_PRE   0x00020000

Definition at line 211 of file rza1_eth_driver.h.

◆ ETHER_RD0_RFS_RFOF

#define ETHER_RD0_RFS_RFOF   0x02000000

Definition at line 205 of file rza1_eth_driver.h.

◆ ETHER_RD0_RFS_RMAF

#define ETHER_RD0_RFS_RMAF   0x00800000

Definition at line 206 of file rza1_eth_driver.h.

◆ ETHER_RD0_RFS_RRF

#define ETHER_RD0_RFS_RRF   0x00100000

Definition at line 208 of file rza1_eth_driver.h.

◆ ETHER_RD0_RFS_RTLF

#define ETHER_RD0_RFS_RTLF   0x00080000

Definition at line 209 of file rza1_eth_driver.h.

◆ ETHER_RD0_RFS_RTSF

#define ETHER_RD0_RFS_RTSF   0x00040000

Definition at line 210 of file rza1_eth_driver.h.

◆ ETHER_RD0_RFS_RUAF

#define ETHER_RD0_RFS_RUAF   0x00400000

Definition at line 207 of file rza1_eth_driver.h.

◆ ETHER_RD1_RBL

#define ETHER_RD1_RBL   0xFFFF0000

Definition at line 214 of file rza1_eth_driver.h.

◆ ETHER_RD1_RDL

#define ETHER_RD1_RDL   0x0000FFFF

Definition at line 215 of file rza1_eth_driver.h.

◆ ETHER_RD2_RBA

#define ETHER_RD2_RBA   0xFFFFFFFF

Definition at line 216 of file rza1_eth_driver.h.

◆ ETHER_RDFFR0_RDLF

#define ETHER_RDFFR0_RDLF   0x00000001

Definition at line 165 of file rza1_eth_driver.h.

◆ ETHER_RMCR0_RNC

#define ETHER_RMCR0_RNC   0x00000001

Definition at line 175 of file rza1_eth_driver.h.

◆ ETHER_TD0_TACT

#define ETHER_TD0_TACT   0x80000000

Definition at line 185 of file rza1_eth_driver.h.

◆ ETHER_TD0_TDLE

#define ETHER_TD0_TDLE   0x40000000

Definition at line 186 of file rza1_eth_driver.h.

◆ ETHER_TD0_TFE

#define ETHER_TD0_TFE   0x08000000

Definition at line 189 of file rza1_eth_driver.h.

◆ ETHER_TD0_TFP_EOF

#define ETHER_TD0_TFP_EOF   0x10000000

Definition at line 188 of file rza1_eth_driver.h.

◆ ETHER_TD0_TFP_SOF

#define ETHER_TD0_TFP_SOF   0x20000000

Definition at line 187 of file rza1_eth_driver.h.

◆ ETHER_TD0_TFS_MASK

#define ETHER_TD0_TFS_MASK   0x00000300

Definition at line 191 of file rza1_eth_driver.h.

◆ ETHER_TD0_TFS_TABT

#define ETHER_TD0_TFS_TABT   0x00000100

Definition at line 193 of file rza1_eth_driver.h.

◆ ETHER_TD0_TFS_TUC

#define ETHER_TD0_TFS_TUC   0x00000200

Definition at line 192 of file rza1_eth_driver.h.

◆ ETHER_TD0_TWBI

#define ETHER_TD0_TWBI   0x04000000

Definition at line 190 of file rza1_eth_driver.h.

◆ ETHER_TD1_TDL

#define ETHER_TD1_TDL   0xFFFF0000

Definition at line 194 of file rza1_eth_driver.h.

◆ ETHER_TD2_TBA

#define ETHER_TD2_TBA   0xFFFFFFFF

Definition at line 195 of file rza1_eth_driver.h.

◆ ETHER_TDFFR_TDLF

#define ETHER_TDFFR_TDLF   0x00000001

Definition at line 162 of file rza1_eth_driver.h.

◆ ETHER_TSU_ADSBSY_ADSBSY

#define ETHER_TSU_ADSBSY_ADSBSY   0x00000001

Definition at line 95 of file rza1_eth_driver.h.

◆ RZA1_ETH_IRQ_PRIORITY

#define RZA1_ETH_IRQ_PRIORITY   25

Definition at line 65 of file rza1_eth_driver.h.

◆ RZA1_ETH_RX_BUFFER_COUNT

#define RZA1_ETH_RX_BUFFER_COUNT   8

Definition at line 51 of file rza1_eth_driver.h.

◆ RZA1_ETH_RX_BUFFER_SIZE

#define RZA1_ETH_RX_BUFFER_SIZE   1536

Definition at line 58 of file rza1_eth_driver.h.

◆ RZA1_ETH_TX_BUFFER_COUNT

#define RZA1_ETH_TX_BUFFER_COUNT   8

Definition at line 37 of file rza1_eth_driver.h.

◆ RZA1_ETH_TX_BUFFER_SIZE

#define RZA1_ETH_TX_BUFFER_SIZE   1536

Definition at line 44 of file rza1_eth_driver.h.

◆ SMI_READ

#define SMI_READ   0x00000002

Definition at line 222 of file rza1_eth_driver.h.

◆ SMI_START

#define SMI_START   0x00000001

Definition at line 220 of file rza1_eth_driver.h.

◆ SMI_SYNC

#define SMI_SYNC   0xFFFFFFFF

Definition at line 219 of file rza1_eth_driver.h.

◆ SMI_TA

#define SMI_TA   0x00000002

Definition at line 223 of file rza1_eth_driver.h.

◆ SMI_WRITE

#define SMI_WRITE   0x00000001

Definition at line 221 of file rza1_eth_driver.h.

Function Documentation

◆ rza1EthDisableIrq()

void rza1EthDisableIrq ( NetInterface interface)

Disable interrupts.

Parameters
[in]interfaceUnderlying network interface

Definition at line 733 of file rza1_eth_driver.c.

◆ rza1EthEnableIrq()

void rza1EthEnableIrq ( NetInterface interface)

Enable interrupts.

Parameters
[in]interfaceUnderlying network interface

Definition at line 719 of file rza1_eth_driver.c.

◆ rza1EthEventHandler()

void rza1EthEventHandler ( NetInterface interface)

RZ/A1 Ethernet MAC event handler.

Parameters
[in]interfaceUnderlying network interface

Definition at line 797 of file rza1_eth_driver.c.

◆ rza1EthInit()

error_t rza1EthInit ( NetInterface interface)

RZ/A1 Ethernet MAC initialization.

Parameters
[in]interfaceUnderlying network interface
Returns
Error code

Definition at line 114 of file rza1_eth_driver.c.

◆ rza1EthInitDmaDesc()

void rza1EthInitDmaDesc ( NetInterface interface)

Initialize DMA descriptor lists.

Parameters
[in]interfaceUnderlying network interface

Definition at line 640 of file rza1_eth_driver.c.

◆ rza1EthInitGpio()

void rza1EthInitGpio ( NetInterface interface)

◆ rza1EthIrqHandler()

void rza1EthIrqHandler ( uint32_t  intSense)

RZ/A1 Ethernet MAC interrupt service routine.

Parameters
[in]intSenseUnused parameter

Definition at line 747 of file rza1_eth_driver.c.

◆ rza1EthReadPhyReg()

uint16_t rza1EthReadPhyReg ( uint8_t  phyAddr,
uint8_t  regAddr 
)

Read PHY register.

Parameters
[in]phyAddrPHY address
[in]regAddrRegister address
Returns
Register value

Definition at line 1083 of file rza1_eth_driver.c.

◆ rza1EthReadSmi()

uint32_t rza1EthReadSmi ( uint_t  length)

SMI read operation.

Parameters
[in]lengthNumber of bits to be read
Returns
Data resulting from the MDIO read operation

Definition at line 1151 of file rza1_eth_driver.c.

◆ rza1EthReceivePacket()

error_t rza1EthReceivePacket ( NetInterface interface)

Receive a packet.

Parameters
[in]interfaceUnderlying network interface
Returns
Error code

Definition at line 895 of file rza1_eth_driver.c.

◆ rza1EthSendPacket()

error_t rza1EthSendPacket ( NetInterface interface,
const NetBuffer buffer,
size_t  offset 
)

Send a packet.

Parameters
[in]interfaceUnderlying network interface
[in]bufferMulti-part buffer containing the data to send
[in]offsetOffset to the first data byte
Returns
Error code

Definition at line 830 of file rza1_eth_driver.c.

◆ rza1EthTick()

void rza1EthTick ( NetInterface interface)

RZ/A1 Ethernet MAC timer handler.

This routine is periodically called by the TCP/IP stack to handle periodic operations such as polling the link state

Parameters
[in]interfaceUnderlying network interface

Definition at line 707 of file rza1_eth_driver.c.

◆ rza1EthUpdateMacAddrFilter()

error_t rza1EthUpdateMacAddrFilter ( NetInterface interface)

Configure MAC address filtering.

Parameters
[in]interfaceUnderlying network interface
Returns
Error code

Definition at line 973 of file rza1_eth_driver.c.

◆ rza1EthUpdateMacConfig()

error_t rza1EthUpdateMacConfig ( NetInterface interface)

Adjust MAC configuration parameters for proper operation.

Parameters
[in]interfaceUnderlying network interface
Returns
Error code

Definition at line 1035 of file rza1_eth_driver.c.

◆ rza1EthWritePhyReg()

void rza1EthWritePhyReg ( uint8_t  phyAddr,
uint8_t  regAddr,
uint16_t  data 
)

Write PHY register.

Parameters
[in]phyAddrPHY address
[in]regAddrRegister address
[in]dataRegister value

Definition at line 1055 of file rza1_eth_driver.c.

◆ rza1EthWriteSmi()

void rza1EthWriteSmi ( uint32_t  data,
uint_t  length 
)

SMI write operation.

Parameters
[in]dataRaw data to be written
[in]lengthNumber of bits to be written

Definition at line 1115 of file rza1_eth_driver.c.

Variable Documentation

◆ rza1EthDriver

const NicDriver rza1EthDriver

RZ/A1 Ethernet MAC driver.

Definition at line 87 of file rza1_eth_driver.c.