Nut/OS  4.10.3
API Reference
at91_emac.h
Go to the documentation of this file.
00001 #ifndef _ARCH_ARM_AT91_EMAC_H_
00002 #define _ARCH_ARM_AT91_EMAC_H_
00003 
00004 /*
00005  * Copyright (C) 2006 by egnite Software GmbH. All rights reserved.
00006  *
00007  * Redistribution and use in source and binary forms, with or without
00008  * modification, are permitted provided that the following conditions
00009  * are met:
00010  *
00011  * 1. Redistributions of source code must retain the above copyright
00012  *    notice, this list of conditions and the following disclaimer.
00013  * 2. Redistributions in binary form must reproduce the above copyright
00014  *    notice, this list of conditions and the following disclaimer in the
00015  *    documentation and/or other materials provided with the distribution.
00016  * 3. Neither the name of the copyright holders nor the names of
00017  *    contributors may be used to endorse or promote products derived
00018  *    from this software without specific prior written permission.
00019  *
00020  * THIS SOFTWARE IS PROVIDED BY EGNITE SOFTWARE GMBH AND CONTRIBUTORS
00021  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00022  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
00023  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL EGNITE
00024  * SOFTWARE GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
00025  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
00026  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
00027  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
00028  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00029  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
00030  * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00031  * SUCH DAMAGE.
00032  *
00033  * For additional information see http://www.ethernut.de/
00034  */
00035 
00056 
00059 #define EMAC_NCR_OFF                0x00000000  
00060 #define EMAC_NCR    (EMAC_BASE + EMAC_NCR_OFF)  
00062 #define EMAC_LB                     0x00000001  
00063 #define EMAC_LLB                    0x00000002  
00064 #define EMAC_RE                     0x00000004  
00065 #define EMAC_TE                     0x00000008  
00066 #define EMAC_MPE                    0x00000010  
00067 #define EMAC_CLRSTAT                0x00000020  
00068 #define EMAC_INCSTAT                0x00000040  
00069 #define EMAC_WESTAT                 0x00000080  
00070 #define EMAC_BP                     0x00000100  
00071 #define EMAC_TSTART                 0x00000200  
00072 #define EMAC_THALT                  0x00000400  
00073 #define EMAC_TPFR                   0x00000800  
00074 #define EMAC_TZQ                    0x00001000  
00076 
00077 
00079 #define EMAC_NCFGR_OFF              0x00000004  
00080 #define EMAC_NCFGR (EMAC_BASE + EMAC_NCFGR_OFF) 
00082 #define EMAC_SPD                    0x00000001  
00083 #define EMAC_FD                     0x00000002  
00084 #define EMAC_JFRAME                 0x00000008  
00085 #define EMAC_CAF                    0x00000010  
00086 #define EMAC_NBC                    0x00000020  
00087 #define EMAC_MTI                    0x00000040  
00088 #define EMAC_UNI                    0x00000080  
00089 #define EMAC_BIG                    0x00000100  
00090 #define EMAC_EAE                    0x00000200  
00091 #define EMAC_CLK                    0x00000C00  
00092 #define EMAC_CLK_HCLK_8             0x00000000  
00093 #define EMAC_CLK_HCLK_16            0x00000400  
00094 #define EMAC_CLK_HCLK_32            0x00000800  
00095 #define EMAC_CLK_HCLK_64            0x00000C00  
00096 #define EMAC_RTY                    0x00001000  
00097 #define EMAC_PAE                    0x00002000  
00098 #define EMAC_RBOF                   0x0000C000  
00099 #define EMAC_RBOF_OFFSET_0          0x00000000  
00100 #define EMAC_RBOF_OFFSET_1          0x00004000  
00101 #define EMAC_RBOF_OFFSET_2          0x00008000  
00102 #define EMAC_RBOF_OFFSET_3          0x0000C000  
00103 #define EMAC_RLCE                   0x00010000  
00104 #define EMAC_DRFCS                  0x00020000  
00105 #define EMAC_EFRHD                  0x00040000  
00106 #define EMAC_IRXFCS                 0x00080000  
00108 
00109 
00111 #define EMAC_NSR_OFF                0x00000008  
00112 #define EMAC_NSR    (EMAC_BASE + EMAC_NSR_OFF)  
00113 #define EMAC_LINKR                  0x00000001  
00114 #define EMAC_MDIO                   0x00000002  
00115 #define EMAC_IDLE                   0x00000004  
00117 
00118 
00120 #define EMAC_TSR_OFF                0x00000014  
00121 #define EMAC_TSR    (EMAC_BASE + EMAC_TSR_OFF)  
00123 #define EMAC_UBR                    0x00000001  
00124 #define EMAC_COL                    0x00000002  
00125 #define EMAC_RLES                   0x00000004  
00126 #define EMAC_TGO                    0x00000008  
00127 #define EMAC_BEX                    0x00000010  
00128 #define EMAC_COMP                   0x00000020  
00129 #define EMAC_UND                    0x00000040  
00131 
00132 
00134 #define EMAC_RBQP_OFF               0x00000018  
00135 #define EMAC_RBQP   (EMAC_BASE + EMAC_RBQP_OFF) 
00136 #define EMAC_TBQP_OFF               0x0000001C  
00137 #define EMAC_TBQP   (EMAC_BASE + EMAC_TBQP_OFF) 
00139 
00140 
00142 #define EMAC_RSR_OFF                0x00000020  
00143 #define EMAC_RSR    (EMAC_BASE + EMAC_RSR_OFF)  
00145 #define EMAC_BNA                    0x00000001  
00146 #define EMAC_REC                    0x00000002  
00147 #define EMAC_OVR                    0x00000004  
00149 
00150 
00152 #define EMAC_ISR_OFF                0x00000024  
00153 #define EMAC_ISR    (EMAC_BASE + EMAC_ISR_OFF)  
00154 #define EMAC_IER_OFF                0x00000028  
00155 #define EMAC_IER    (EMAC_BASE + EMAC_IER_OFF)  
00156 #define EMAC_IDR_OFF                0x0000002C  
00157 #define EMAC_IDR    (EMAC_BASE + EMAC_IDR_OFF)  
00158 #define EMAC_IMR_OFF                0x00000030  
00159 #define EMAC_IMR    (EMAC_BASE + EMAC_IMR_OFF)  
00161 #define EMAC_MFD                    0x00000001  
00162 #define EMAC_RCOMP                  0x00000002  
00163 #define EMAC_RXUBR                  0x00000004  
00164 #define EMAC_TXUBR                  0x00000008  
00165 #define EMAC_TUND                   0x00000010  
00166 #define EMAC_RLEX                   0x00000020  
00167 #define EMAC_TXERR                  0x00000040  
00168 #define EMAC_TCOMP                  0x00000080  
00169 #define EMAC_LINK                   0x00000200  
00170 #define EMAC_ROVR                   0x00000400  
00171 #define EMAC_HRESP                  0x00000800  
00172 #define EMAC_PFR                    0x00001000  
00173 #define EMAC_PTZ                    0x00002000  
00175 
00176 
00178 #define EMAC_MAN_OFF                0x00000034  
00179 #define EMAC_MAN    (EMAC_BASE + EMAC_MAN_OFF)  
00181 #define EMAC_DATA                   0x0000FFFF  
00182 #define EMAC_DATA_LSB                       0   
00183 #define EMAC_CODE                   0x00020000  
00184 #define EMAC_REGA                   0x007C0000  
00185 #define EMAC_REGA_LSB                       18  
00186 #define EMAC_PHYA                   0x0F800000  
00187 #define EMAC_PHYA_LSB                       23  
00188 #define EMAC_RW                     0x30000000  
00189 #define EMAC_RW_READ                0x20000000  
00190 #define EMAC_RW_WRITE               0x10000000  
00191 #define EMAC_SOF                    0x40000000  
00193 
00194 
00196 #define EMAC_PTR_OFF                0x00000038  
00197 #define EMAC_PTR    (EMAC_BASE + EMAC_PTR_OFF)  
00199 #define EMAC_PTIME                  0x0000FFFF  
00201 
00202 
00204 #define EMAC_PFRR_OFF               0x0000003C  
00205 #define EMAC_PFRR  (EMAC_BASE + EMAC_PFRR_OFF)  
00206 #define EMAC_FTO_OFF                0x00000040  
00207 #define EMAC_FTO    (EMAC_BASE + EMAC_FTO_OFF)  
00208 #define EMAC_SCF_OFF                0x00000044  
00209 #define EMAC_SCF    (EMAC_BASE + EMAC_SCF_OFF)  
00210 #define EMAC_MCF_OFF                0x00000048  
00211 #define EMAC_MCF    (EMAC_BASE + EMAC_MCF_OFF)  
00212 #define EMAC_FRO_OFF                0x0000004C  
00213 #define EMAC_FRO    (EMAC_BASE + EMAC_FRO_OFF)  
00214 #define EMAC_FCSE_OFF               0x00000050  
00215 #define EMAC_FCSE   (EMAC_BASE + EMAC_FCSE_OFF) 
00216 #define EMAC_ALE_OFF                0x00000054  
00217 #define EMAC_ALE    (EMAC_BASE + EMAC_ALE_OFF)  
00218 #define EMAC_DTF_OFF                0x00000058  
00219 #define EMAC_DTF    (EMAC_BASE + EMAC_DTF_OFF)  
00220 #define EMAC_LCOL_OFF               0x0000005C  
00221 #define EMAC_LCOL   (EMAC_BASE + EMAC_LCOL_OFF) 
00222 #define EMAC_ECOL_OFF               0x00000060  
00223 #define EMAC_ECOL   (EMAC_BASE + EMAC_ECOL_OFF) 
00224 #define EMAC_TUNDR_OFF              0x00000064  
00225 #define EMAC_TUNDR (EMAC_BASE + EMAC_TUNDR_OFF) 
00226 #define EMAC_CSE_OFF                0x00000068  
00227 #define EMAC_CSE    (EMAC_BASE + EMAC_CSE_OFF)  
00228 #define EMAC_RRE_OFF                0x0000006C  
00229 #define EMAC_RRE    (EMAC_BASE + EMAC_RRE_OFF)  
00230 #define EMAC_ROV_OFF                0x00000070  
00231 #define EMAC_ROV    (EMAC_BASE + EMAC_ROV_OFF)  
00232 #define EMAC_RSE_OFF                0x00000074  
00233 #define EMAC_RSE    (EMAC_BASE + EMAC_RSE_OFF)  
00234 #define EMAC_ELE_OFF                0x00000078  
00235 #define EMAC_ELE    (EMAC_BASE + EMAC_ELE_OFF)  
00236 #define EMAC_RJA_OFF                0x0000007C  
00237 #define EMAC_RJA    (EMAC_BASE + EMAC_RJA_OFF)  
00238 #define EMAC_USF_OFF                0x00000080  
00239 #define EMAC_USF    (EMAC_BASE + EMAC_USF_OFF)  
00240 #define EMAC_STE_OFF                0x00000084  
00241 #define EMAC_STE    (EMAC_BASE + EMAC_STE_OFF)  
00242 #define EMAC_RLE_OFF                0x00000088  
00243 #define EMAC_RLE    (EMAC_BASE + EMAC_RLE_OFF)  
00244 #define EMAC_TPF_OFF                0x0000008C  
00245 #define EMAC_TPF    (EMAC_BASE + EMAC_TPF_OFF)  
00247 
00248 
00250 #define EMAC_HRB_OFF                0x00000090  
00251 #define EMAC_HRB    (EMAC_BASE + EMAC_HRB_OFF)  
00252 #define EMAC_HRT_OFF                0x00000094  
00253 #define EMAC_HRT    (EMAC_BASE + EMAC_HRT_OFF)  
00254 #define EMAC_SA1L_OFF               0x00000098  
00255 #define EMAC_SA1L   (EMAC_BASE + EMAC_SA1L_OFF) 
00256 #define EMAC_SA1H_OFF               0x0000009C  
00257 #define EMAC_SA1H   (EMAC_BASE + EMAC_SA1H_OFF) 
00258 #define EMAC_SA2L_OFF               0x000000A0  
00259 #define EMAC_SA2L   (EMAC_BASE + EMAC_SA2L_OFF) 
00260 #define EMAC_SA2H_OFF               0x000000A4  
00261 #define EMAC_SA2H   (EMAC_BASE + EMAC_SA2H_OFF) 
00262 #define EMAC_SA3L_OFF               0x000000A8  
00263 #define EMAC_SA3L   (EMAC_BASE + EMAC_SA3L_OFF) 
00264 #define EMAC_SA3H_OFF               0x000000AC  
00265 #define EMAC_SA3H   (EMAC_BASE + EMAC_SA3H_OFF) 
00266 #define EMAC_SA4L_OFF               0x000000B0  
00267 #define EMAC_SA4L   (EMAC_BASE + EMAC_SA4L_OFF) 
00268 #define EMAC_SA4H_OFF               0x000000B4  
00269 #define EMAC_SA4H   (EMAC_BASE + EMAC_SA4H_OFF) 
00271 
00272 
00274 #define EMAC_TID_OFF                0x000000B8  
00275 #define EMAC_TID    (EMAC_BASE + EMAC_TID_OFF)  
00276 #define EMAC_TPQ_OFF                0x000000BC  
00277 #define EMAC_TPQ    (EMAC_BASE + EMAC_TPQ_OFF)  
00279 
00280 
00282 #define EMAC_USRIO_OFF              0x000000C0  
00283 #define EMAC_USRIO (EMAC_BASE + EMAC_USRIO_OFF) 
00285 #define EMAC_RMII                   0x00000001  
00286 #define EMAC_CLKEN                  0x00000002  
00288 
00289 
00291 #define EMAC_WOL_OFF                0x000000C4  
00292 #define EMAC_WOL    (EMAC_BASE + EMAC_WOL_OFF)  
00293 #define EMAC_IP                     0x0000FFFF  
00294 #define EMAC_MAG                    0x00010000  
00295 #define EMAC_ARP                    0x00020000  
00296 #define EMAC_SA1                    0x00040000  
00298 
00299 
00301 #define EMAC_REV_OFF                0x000000FC  
00302 #define EMAC_REV    (EMAC_BASE + EMAC_REV_OFF)  
00303 #define EMAC_REVREF                 0x0000FFFF  
00304 #define EMAC_PARTREF                0xFFFF0000  
00306 
00307 
00309 #endif                          /* _ARCH_ARM_AT91_EMAC_H_ */