rza1_eth_driver.h File Reference

Renesas RZ/A1 Ethernet MAC driver. 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 RZA1_ETH_RAM_SECTION   ".BSS_DMAC_SAMPLE_INTERNAL_RAM"
 
#define ETHER_ARSTR_ARST   0x00000001
 
#define ETHER_ECMR0_TRCCM   0x04000000
 
#define ETHER_ECMR0_RCSC   0x00800000
 
#define ETHER_ECMR0_DPAD   0x00200000
 
#define ETHER_ECMR0_RZPF   0x00100000
 
#define ETHER_ECMR0_ZPF   0x00080000
 
#define ETHER_ECMR0_PFR   0x00040000
 
#define ETHER_ECMR0_RXF   0x00020000
 
#define ETHER_ECMR0_TXF   0x00010000
 
#define ETHER_ECMR0_MCT   0x00002000
 
#define ETHER_ECMR0_RE   0x00000040
 
#define ETHER_ECMR0_TE   0x00000020
 
#define ETHER_ECMR0_DM   0x00000002
 
#define ETHER_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_DL_16   0x00000000
 
#define ETHER_EDMR0_DL_32   0x00000010
 
#define ETHER_EDMR0_DL_64   0x00000020
 
#define ETHER_EDMR0_SWRT   0x00000002
 
#define ETHER_EDMR0_SWRR   0x00000001
 
#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_TFD_2048   0x00000700
 
#define ETHER_FDR0_RFD   0x0000001F
 
#define ETHER_FDR0_RFD_2048   0x00000007
 
#define ETHER_RMCR0_RNC   0x00000001
 
#define ETHER_FCFTR0_RFF   0x001F0000
 
#define ETHER_FCFTR0_RFF_8   0x00070000
 
#define ETHER_FCFTR0_RFD   0x000000FF
 
#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
 

Functions

error_t rza1EthInit (NetInterface *interface)
 RZ/A1 Ethernet MAC initialization. More...
 
void rza1EthInitGpio (NetInterface *interface)
 GPIO configuration. More...
 
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, NetTxAncillary *ancillary)
 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 opcode, uint8_t phyAddr, uint8_t regAddr, uint16_t data)
 Write PHY register. More...
 
uint16_t rza1EthReadPhyReg (uint8_t opcode, 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 driver.

License

SPDX-License-Identifier: GPL-2.0-or-later

Copyright (C) 2010-2024 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
2.4.4

Definition in file rza1_eth_driver.h.

Macro Definition Documentation

◆ ETHER_ARSTR_ARST

#define ETHER_ARSTR_ARST   0x00000001

Definition at line 78 of file rza1_eth_driver.h.

◆ ETHER_ECMR0_DM

#define ETHER_ECMR0_DM   0x00000002

Definition at line 92 of file rza1_eth_driver.h.

◆ ETHER_ECMR0_DPAD

#define ETHER_ECMR0_DPAD   0x00200000

Definition at line 83 of file rza1_eth_driver.h.

◆ ETHER_ECMR0_MCT

#define ETHER_ECMR0_MCT   0x00002000

Definition at line 89 of file rza1_eth_driver.h.

◆ ETHER_ECMR0_PFR

#define ETHER_ECMR0_PFR   0x00040000

Definition at line 86 of file rza1_eth_driver.h.

◆ ETHER_ECMR0_PRM

#define ETHER_ECMR0_PRM   0x00000001

Definition at line 93 of file rza1_eth_driver.h.

◆ ETHER_ECMR0_RCSC

#define ETHER_ECMR0_RCSC   0x00800000

Definition at line 82 of file rza1_eth_driver.h.

◆ ETHER_ECMR0_RE

#define ETHER_ECMR0_RE   0x00000040

Definition at line 90 of file rza1_eth_driver.h.

◆ ETHER_ECMR0_RXF

#define ETHER_ECMR0_RXF   0x00020000

Definition at line 87 of file rza1_eth_driver.h.

◆ ETHER_ECMR0_RZPF

#define ETHER_ECMR0_RZPF   0x00100000

Definition at line 84 of file rza1_eth_driver.h.

◆ ETHER_ECMR0_TE

#define ETHER_ECMR0_TE   0x00000020

Definition at line 91 of file rza1_eth_driver.h.

◆ ETHER_ECMR0_TRCCM

#define ETHER_ECMR0_TRCCM   0x04000000

Definition at line 81 of file rza1_eth_driver.h.

◆ ETHER_ECMR0_TXF

#define ETHER_ECMR0_TXF   0x00010000

Definition at line 88 of file rza1_eth_driver.h.

◆ ETHER_ECMR0_ZPF

#define ETHER_ECMR0_ZPF   0x00080000

Definition at line 85 of file rza1_eth_driver.h.

◆ ETHER_EDMR0_DE

#define ETHER_EDMR0_DE   0x00000040

Definition at line 109 of file rza1_eth_driver.h.

◆ ETHER_EDMR0_DL

#define ETHER_EDMR0_DL   0x00000030

Definition at line 110 of file rza1_eth_driver.h.

◆ ETHER_EDMR0_DL_16

#define ETHER_EDMR0_DL_16   0x00000000

Definition at line 111 of file rza1_eth_driver.h.

◆ ETHER_EDMR0_DL_32

#define ETHER_EDMR0_DL_32   0x00000010

Definition at line 112 of file rza1_eth_driver.h.

◆ ETHER_EDMR0_DL_64

#define ETHER_EDMR0_DL_64   0x00000020

Definition at line 113 of file rza1_eth_driver.h.

◆ ETHER_EDMR0_SWRR

#define ETHER_EDMR0_SWRR   0x00000001

Definition at line 115 of file rza1_eth_driver.h.

◆ ETHER_EDMR0_SWRT

#define ETHER_EDMR0_SWRT   0x00000002

Definition at line 114 of file rza1_eth_driver.h.

◆ ETHER_EDRRR0_RR

#define ETHER_EDRRR0_RR   0x00000001

Definition at line 121 of file rza1_eth_driver.h.

◆ ETHER_EDSR0_ENR

#define ETHER_EDSR0_ENR   0x00000001

Definition at line 106 of file rza1_eth_driver.h.

◆ ETHER_EDSR0_ENT

#define ETHER_EDSR0_ENT   0x00000002

Definition at line 105 of file rza1_eth_driver.h.

◆ ETHER_EDTRR0_TR

#define ETHER_EDTRR0_TR   0x00000003

Definition at line 118 of file rza1_eth_driver.h.

◆ ETHER_EESIPR0_CERFIP

#define ETHER_EESIPR0_CERFIP   0x00000001

Definition at line 165 of file rza1_eth_driver.h.

◆ ETHER_EESIPR0_ECIIP

#define ETHER_EESIPR0_ECIIP   0x00400000

Definition at line 153 of file rza1_eth_driver.h.

◆ ETHER_EESIPR0_FRIP

#define ETHER_EESIPR0_FRIP   0x00040000

Definition at line 157 of file rza1_eth_driver.h.

◆ ETHER_EESIPR0_PREIP

#define ETHER_EESIPR0_PREIP   0x00000002

Definition at line 164 of file rza1_eth_driver.h.

◆ ETHER_EESIPR0_RABTIP

#define ETHER_EESIPR0_RABTIP   0x02000000

Definition at line 151 of file rza1_eth_driver.h.

◆ ETHER_EESIPR0_RDEIP

#define ETHER_EESIPR0_RDEIP   0x00020000

Definition at line 158 of file rza1_eth_driver.h.

◆ ETHER_EESIPR0_RFCOFIP

#define ETHER_EESIPR0_RFCOFIP   0x01000000

Definition at line 152 of file rza1_eth_driver.h.

◆ ETHER_EESIPR0_RFOFIP

#define ETHER_EESIPR0_RFOFIP   0x00010000

Definition at line 159 of file rza1_eth_driver.h.

◆ ETHER_EESIPR0_RMAFIP

#define ETHER_EESIPR0_RMAFIP   0x00000080

Definition at line 160 of file rza1_eth_driver.h.

◆ ETHER_EESIPR0_ROCIP

#define ETHER_EESIPR0_ROCIP   0x08000000

Definition at line 149 of file rza1_eth_driver.h.

◆ ETHER_EESIPR0_RRFIP

#define ETHER_EESIPR0_RRFIP   0x00000010

Definition at line 161 of file rza1_eth_driver.h.

◆ ETHER_EESIPR0_RTLFIP

#define ETHER_EESIPR0_RTLFIP   0x00000008

Definition at line 162 of file rza1_eth_driver.h.

◆ ETHER_EESIPR0_RTSFIP

#define ETHER_EESIPR0_RTSFIP   0x00000004

Definition at line 163 of file rza1_eth_driver.h.

◆ ETHER_EESIPR0_TABTIP

#define ETHER_EESIPR0_TABTIP   0x04000000

Definition at line 150 of file rza1_eth_driver.h.

◆ ETHER_EESIPR0_TC0IP

#define ETHER_EESIPR0_TC0IP   0x00200000

Definition at line 154 of file rza1_eth_driver.h.

◆ ETHER_EESIPR0_TC1IP

#define ETHER_EESIPR0_TC1IP   0x20000000

Definition at line 147 of file rza1_eth_driver.h.

◆ ETHER_EESIPR0_TDEIP

#define ETHER_EESIPR0_TDEIP   0x00100000

Definition at line 155 of file rza1_eth_driver.h.

◆ ETHER_EESIPR0_TFUFIP

#define ETHER_EESIPR0_TFUFIP   0x00080000

Definition at line 156 of file rza1_eth_driver.h.

◆ ETHER_EESIPR0_TUCIP

#define ETHER_EESIPR0_TUCIP   0x10000000

Definition at line 148 of file rza1_eth_driver.h.

◆ ETHER_EESIPR0_TWBIP

#define ETHER_EESIPR0_TWBIP   0xC0000000

Definition at line 146 of file rza1_eth_driver.h.

◆ ETHER_EESR0_CERF

#define ETHER_EESR0_CERF   0x00000001

Definition at line 143 of file rza1_eth_driver.h.

◆ ETHER_EESR0_ECI

#define ETHER_EESR0_ECI   0x00400000

Definition at line 131 of file rza1_eth_driver.h.

◆ ETHER_EESR0_FR

#define ETHER_EESR0_FR   0x00040000

Definition at line 135 of file rza1_eth_driver.h.

◆ ETHER_EESR0_PRE

#define ETHER_EESR0_PRE   0x00000002

Definition at line 142 of file rza1_eth_driver.h.

◆ ETHER_EESR0_RABT

#define ETHER_EESR0_RABT   0x02000000

Definition at line 129 of file rza1_eth_driver.h.

◆ ETHER_EESR0_RDE

#define ETHER_EESR0_RDE   0x00020000

Definition at line 136 of file rza1_eth_driver.h.

◆ ETHER_EESR0_RFCOF

#define ETHER_EESR0_RFCOF   0x01000000

Definition at line 130 of file rza1_eth_driver.h.

◆ ETHER_EESR0_RFOF

#define ETHER_EESR0_RFOF   0x00010000

Definition at line 137 of file rza1_eth_driver.h.

◆ ETHER_EESR0_RMAF

#define ETHER_EESR0_RMAF   0x00000080

Definition at line 138 of file rza1_eth_driver.h.

◆ ETHER_EESR0_ROC

#define ETHER_EESR0_ROC   0x08000000

Definition at line 127 of file rza1_eth_driver.h.

◆ ETHER_EESR0_RRF

#define ETHER_EESR0_RRF   0x00000010

Definition at line 139 of file rza1_eth_driver.h.

◆ ETHER_EESR0_RTLF

#define ETHER_EESR0_RTLF   0x00000008

Definition at line 140 of file rza1_eth_driver.h.

◆ ETHER_EESR0_RTSF

#define ETHER_EESR0_RTSF   0x00000004

Definition at line 141 of file rza1_eth_driver.h.

◆ ETHER_EESR0_TABT

#define ETHER_EESR0_TABT   0x04000000

Definition at line 128 of file rza1_eth_driver.h.

◆ ETHER_EESR0_TC0

#define ETHER_EESR0_TC0   0x00200000

Definition at line 132 of file rza1_eth_driver.h.

◆ ETHER_EESR0_TC1

#define ETHER_EESR0_TC1   0x20000000

Definition at line 125 of file rza1_eth_driver.h.

◆ ETHER_EESR0_TDE

#define ETHER_EESR0_TDE   0x00100000

Definition at line 133 of file rza1_eth_driver.h.

◆ ETHER_EESR0_TFUF

#define ETHER_EESR0_TFUF   0x00080000

Definition at line 134 of file rza1_eth_driver.h.

◆ ETHER_EESR0_TUC

#define ETHER_EESR0_TUC   0x10000000

Definition at line 126 of file rza1_eth_driver.h.

◆ ETHER_EESR0_TWB

#define ETHER_EESR0_TWB   0xC0000000

Definition at line 124 of file rza1_eth_driver.h.

◆ ETHER_FCFTR0_RFD

#define ETHER_FCFTR0_RFD   0x000000FF

Definition at line 185 of file rza1_eth_driver.h.

◆ ETHER_FCFTR0_RFD_2048

#define ETHER_FCFTR0_RFD_2048   0x00000007

Definition at line 186 of file rza1_eth_driver.h.

◆ ETHER_FCFTR0_RFF

#define ETHER_FCFTR0_RFF   0x001F0000

Definition at line 183 of file rza1_eth_driver.h.

◆ ETHER_FCFTR0_RFF_8

#define ETHER_FCFTR0_RFF_8   0x00070000

Definition at line 184 of file rza1_eth_driver.h.

◆ ETHER_FDR0_RFD

#define ETHER_FDR0_RFD   0x0000001F

Definition at line 176 of file rza1_eth_driver.h.

◆ ETHER_FDR0_RFD_2048

#define ETHER_FDR0_RFD_2048   0x00000007

Definition at line 177 of file rza1_eth_driver.h.

◆ ETHER_FDR0_TFD

#define ETHER_FDR0_TFD   0x00000700

Definition at line 174 of file rza1_eth_driver.h.

◆ ETHER_FDR0_TFD_2048

#define ETHER_FDR0_TFD_2048   0x00000700

Definition at line 175 of file rza1_eth_driver.h.

◆ ETHER_PIR0_MDC

#define ETHER_PIR0_MDC   0x00000001

Definition at line 99 of file rza1_eth_driver.h.

◆ ETHER_PIR0_MDI

#define ETHER_PIR0_MDI   0x00000008

Definition at line 96 of file rza1_eth_driver.h.

◆ ETHER_PIR0_MDO

#define ETHER_PIR0_MDO   0x00000004

Definition at line 97 of file rza1_eth_driver.h.

◆ ETHER_PIR0_MMD

#define ETHER_PIR0_MMD   0x00000002

Definition at line 98 of file rza1_eth_driver.h.

◆ ETHER_RD0_RACT

#define ETHER_RD0_RACT   0x80000000

Definition at line 202 of file rza1_eth_driver.h.

◆ ETHER_RD0_RCS

#define ETHER_RD0_RCS   0x0000FFFF

Definition at line 217 of file rza1_eth_driver.h.

◆ ETHER_RD0_RCSE

#define ETHER_RD0_RCSE   0x04000000

Definition at line 207 of file rza1_eth_driver.h.

◆ ETHER_RD0_RDLE

#define ETHER_RD0_RDLE   0x40000000

Definition at line 203 of file rza1_eth_driver.h.

◆ ETHER_RD0_RFE

#define ETHER_RD0_RFE   0x08000000

Definition at line 206 of file rza1_eth_driver.h.

◆ ETHER_RD0_RFP_EOF

#define ETHER_RD0_RFP_EOF   0x10000000

Definition at line 205 of file rza1_eth_driver.h.

◆ ETHER_RD0_RFP_SOF

#define ETHER_RD0_RFP_SOF   0x20000000

Definition at line 204 of file rza1_eth_driver.h.

◆ ETHER_RD0_RFS_CERF

#define ETHER_RD0_RFS_CERF   0x00010000

Definition at line 216 of file rza1_eth_driver.h.

◆ ETHER_RD0_RFS_MASK

#define ETHER_RD0_RFS_MASK   0x02DF0000

Definition at line 208 of file rza1_eth_driver.h.

◆ ETHER_RD0_RFS_PRE

#define ETHER_RD0_RFS_PRE   0x00020000

Definition at line 215 of file rza1_eth_driver.h.

◆ ETHER_RD0_RFS_RFOF

#define ETHER_RD0_RFS_RFOF   0x02000000

Definition at line 209 of file rza1_eth_driver.h.

◆ ETHER_RD0_RFS_RMAF

#define ETHER_RD0_RFS_RMAF   0x00800000

Definition at line 210 of file rza1_eth_driver.h.

◆ ETHER_RD0_RFS_RRF

#define ETHER_RD0_RFS_RRF   0x00100000

Definition at line 212 of file rza1_eth_driver.h.

◆ ETHER_RD0_RFS_RTLF

#define ETHER_RD0_RFS_RTLF   0x00080000

Definition at line 213 of file rza1_eth_driver.h.

◆ ETHER_RD0_RFS_RTSF

#define ETHER_RD0_RFS_RTSF   0x00040000

Definition at line 214 of file rza1_eth_driver.h.

◆ ETHER_RD0_RFS_RUAF

#define ETHER_RD0_RFS_RUAF   0x00400000

Definition at line 211 of file rza1_eth_driver.h.

◆ ETHER_RD1_RBL

#define ETHER_RD1_RBL   0xFFFF0000

Definition at line 218 of file rza1_eth_driver.h.

◆ ETHER_RD1_RDL

#define ETHER_RD1_RDL   0x0000FFFF

Definition at line 219 of file rza1_eth_driver.h.

◆ ETHER_RD2_RBA

#define ETHER_RD2_RBA   0xFFFFFFFF

Definition at line 220 of file rza1_eth_driver.h.

◆ ETHER_RDFFR0_RDLF

#define ETHER_RDFFR0_RDLF   0x00000001

Definition at line 171 of file rza1_eth_driver.h.

◆ ETHER_RMCR0_RNC

#define ETHER_RMCR0_RNC   0x00000001

Definition at line 180 of file rza1_eth_driver.h.

◆ ETHER_TD0_TACT

#define ETHER_TD0_TACT   0x80000000

Definition at line 189 of file rza1_eth_driver.h.

◆ ETHER_TD0_TDLE

#define ETHER_TD0_TDLE   0x40000000

Definition at line 190 of file rza1_eth_driver.h.

◆ ETHER_TD0_TFE

#define ETHER_TD0_TFE   0x08000000

Definition at line 193 of file rza1_eth_driver.h.

◆ ETHER_TD0_TFP_EOF

#define ETHER_TD0_TFP_EOF   0x10000000

Definition at line 192 of file rza1_eth_driver.h.

◆ ETHER_TD0_TFP_SOF

#define ETHER_TD0_TFP_SOF   0x20000000

Definition at line 191 of file rza1_eth_driver.h.

◆ ETHER_TD0_TFS_MASK

#define ETHER_TD0_TFS_MASK   0x00000300

Definition at line 195 of file rza1_eth_driver.h.

◆ ETHER_TD0_TFS_TABT

#define ETHER_TD0_TFS_TABT   0x00000100

Definition at line 197 of file rza1_eth_driver.h.

◆ ETHER_TD0_TFS_TUC

#define ETHER_TD0_TFS_TUC   0x00000200

Definition at line 196 of file rza1_eth_driver.h.

◆ ETHER_TD0_TWBI

#define ETHER_TD0_TWBI   0x04000000

Definition at line 194 of file rza1_eth_driver.h.

◆ ETHER_TD1_TDL

#define ETHER_TD1_TDL   0xFFFF0000

Definition at line 198 of file rza1_eth_driver.h.

◆ ETHER_TD2_TBA

#define ETHER_TD2_TBA   0xFFFFFFFF

Definition at line 199 of file rza1_eth_driver.h.

◆ ETHER_TDFFR_TDLF

#define ETHER_TDFFR_TDLF   0x00000001

Definition at line 168 of file rza1_eth_driver.h.

◆ ETHER_TSU_ADSBSY_ADSBSY

#define ETHER_TSU_ADSBSY_ADSBSY   0x00000001

Definition at line 102 of file rza1_eth_driver.h.

◆ RZA1_ETH_IRQ_PRIORITY

#define RZA1_ETH_IRQ_PRIORITY   25

Definition at line 67 of file rza1_eth_driver.h.

◆ RZA1_ETH_RAM_SECTION

#define RZA1_ETH_RAM_SECTION   ".BSS_DMAC_SAMPLE_INTERNAL_RAM"

Definition at line 74 of file rza1_eth_driver.h.

◆ RZA1_ETH_RX_BUFFER_COUNT

#define RZA1_ETH_RX_BUFFER_COUNT   8

Definition at line 53 of file rza1_eth_driver.h.

◆ RZA1_ETH_RX_BUFFER_SIZE

#define RZA1_ETH_RX_BUFFER_SIZE   1536

Definition at line 60 of file rza1_eth_driver.h.

◆ RZA1_ETH_TX_BUFFER_COUNT

#define RZA1_ETH_TX_BUFFER_COUNT   8

Definition at line 39 of file rza1_eth_driver.h.

◆ RZA1_ETH_TX_BUFFER_SIZE

#define RZA1_ETH_TX_BUFFER_SIZE   1536

Definition at line 46 of file rza1_eth_driver.h.

Function Documentation

◆ rza1EthDisableIrq()

void rza1EthDisableIrq ( NetInterface interface)

Disable interrupts.

Parameters
[in]interfaceUnderlying network interface

Definition at line 778 of file rza1_eth_driver.c.

◆ rza1EthEnableIrq()

void rza1EthEnableIrq ( NetInterface interface)

Enable interrupts.

Parameters
[in]interfaceUnderlying network interface

Definition at line 750 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 856 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 120 of file rza1_eth_driver.c.

◆ rza1EthInitDmaDesc()

void rza1EthInitDmaDesc ( NetInterface interface)

Initialize DMA descriptor lists.

Parameters
[in]interfaceUnderlying network interface

Definition at line 658 of file rza1_eth_driver.c.

◆ rza1EthInitGpio()

void rza1EthInitGpio ( NetInterface interface)

GPIO configuration.

Parameters
[in]interfaceUnderlying network interface

Definition at line 253 of file rza1_eth_driver.c.

◆ rza1EthIrqHandler()

void rza1EthIrqHandler ( uint32_t  intSense)

RZ/A1 Ethernet MAC interrupt service routine.

Parameters
[in]intSenseUnused parameter

Definition at line 806 of file rza1_eth_driver.c.

◆ rza1EthReadPhyReg()

uint16_t rza1EthReadPhyReg ( uint8_t  opcode,
uint8_t  phyAddr,
uint8_t  regAddr 
)

Read PHY register.

Parameters
[in]opcodeAccess type (2 bits)
[in]phyAddrPHY address (5 bits)
[in]regAddrRegister address (5 bits)
Returns
Register value

Definition at line 1176 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 1249 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 958 of file rza1_eth_driver.c.

◆ rza1EthSendPacket()

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

Send a packet.

Parameters
[in]interfaceUnderlying network interface
[in]bufferMulti-part buffer containing the data to send
[in]offsetOffset to the first data byte
[in]ancillaryAdditional options passed to the stack along with the packet
Returns
Error code

Definition at line 891 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 725 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 1040 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 1113 of file rza1_eth_driver.c.

◆ rza1EthWritePhyReg()

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

Write PHY register.

Parameters
[in]opcodeAccess type (2 bits)
[in]phyAddrPHY address (5 bits)
[in]regAddrRegister address (5 bits)
[in]dataRegister value

Definition at line 1146 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 1209 of file rza1_eth_driver.c.

Variable Documentation

◆ rza1EthDriver

const NicDriver rza1EthDriver
extern

RZ/A1 Ethernet MAC driver.

Definition at line 93 of file rza1_eth_driver.c.