📄 at91sam9260_emac.h
字号:
/* linux/include/asm-arm/arch-at91sam9260/at91sam9260_emac.h
*
* Hardware definition for the emac peripheral in the ATMEL at91sam9260 processor
*
* Generated 01/16/2006 (17:06:46) AT91 SW Application Group from EMACB_6119A V1.6
*
* 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 SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
* DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 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.,
* 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __AT91SAM9260_EMAC_H
#define __AT91SAM9260_EMAC_H
/* -------------------------------------------------------- */
/* EMAC ID definitions for AT91SAM9260 */
/* -------------------------------------------------------- */
#ifndef AT91C_ID_EMAC
#define AT91C_ID_EMAC 21 /**< Ethernet Mac id */
#endif /* AT91C_ID_EMAC */
/* -------------------------------------------------------- */
/* EMAC Base Address definitions for AT91SAM9260 */
/* -------------------------------------------------------- */
#define AT91C_BASE_EMACB 0xFFFC4000 /**< EMACB base address */
/* -------------------------------------------------------- */
/* PIO definition for EMAC hardware peripheral */
/* -------------------------------------------------------- */
#define AT91C_PA29_ECOL (1 << 29) /**< Ethernet MAC Collision Detected */
#define AT91C_PA28_ECRS (1 << 28) /**< Ethernet MAC Carrier Sense/Carrier Sense and Data Valid */
#define AT91C_PC21_EF100 (1 << 21) /**< Ethernet MAC Force 100 Mbits/sec */
#define AT91C_PA20_EMDC (1 << 20) /**< Ethernet MAC Management Data Clock */
#define AT91C_PA21_EMDIO (1 << 21) /**< Ethernet MAC Management Data Input/Output */
#define AT91C_PA14_ERX0 (1 << 14) /**< Ethernet MAC Receive Data 0 */
#define AT91C_PA15_ERX1 (1 << 15) /**< Ethernet MAC Receive Data 1 */
#define AT91C_PA25_ERX2 (1 << 25) /**< Ethernet MAC Receive Data 2 */
#define AT91C_PA26_ERX3 (1 << 26) /**< Ethernet MAC Receive Data 3 */
#define AT91C_PA27_ERXCK (1 << 27) /**< Ethernet MAC Receive Clock */
#define AT91C_PA17_ERXDV (1 << 17) /**< Ethernet MAC Receive Data Valid */
#define AT91C_PA18_ERXER (1 << 18) /**< Ethernet MAC Receive Error */
#define AT91C_PA12_ETX0 (1 << 12) /**< Ethernet MAC Transmit Data 0 */
#define AT91C_PA13_ETX1 (1 << 13) /**< Ethernet MAC Transmit Data 1 */
#define AT91C_PA23_ETX2 (1 << 23) /**< Ethernet MAC Transmit Data 2 */
#define AT91C_PA24_ETX3 (1 << 24) /**< Ethernet MAC Transmit Data 3 */
#define AT91C_PA19_ETXCK (1 << 19) /**< Ethernet MAC Transmit Clock/Reference Clock */
#define AT91C_PA16_ETXEN (1 << 16) /**< Ethernet MAC Transmit Enable */
#define AT91C_PA22_ETXER (1 << 22) /**< Ethernet MAC Transmikt Coding Error */
/* -------------------------------------------------------- */
/* Register offset definition for EMAC hardware peripheral */
/* -------------------------------------------------------- */
#define EMAC_NCR (0x0000) /**< Network Control Register */
#define EMAC_NCFGR (0x0004) /**< Network Configuration Register */
#define EMAC_NSR (0x0008) /**< Network Status Register */
#define EMAC_TSR (0x0014) /**< Transmit Status Register */
#define EMAC_RBQP (0x0018) /**< Receive Buffer Queue Pointer */
#define EMAC_TBQP (0x001C) /**< Transmit Buffer Queue Pointer */
#define EMAC_RSR (0x0020) /**< Receive Status Register */
#define EMAC_ISR (0x0024) /**< Interrupt Status Register */
#define EMAC_IER (0x0028) /**< Interrupt Enable Register */
#define EMAC_IDR (0x002C) /**< Interrupt Disable Register */
#define EMAC_IMR (0x0030) /**< Interrupt Mask Register */
#define EMAC_MAN (0x0034) /**< PHY Maintenance Register */
#define EMAC_PTR (0x0038) /**< Pause Time Register */
#define EMAC_PFR (0x003C) /**< Pause Frames received Register */
#define EMAC_FTO (0x0040) /**< Frames Transmitted OK Register */
#define EMAC_SCF (0x0044) /**< Single Collision Frame Register */
#define EMAC_MCF (0x0048) /**< Multiple Collision Frame Register */
#define EMAC_FRO (0x004C) /**< Frames Received OK Register */
#define EMAC_FCSE (0x0050) /**< Frame Check Sequence Error Register */
#define EMAC_ALE (0x0054) /**< Alignment Error Register */
#define EMAC_DTF (0x0058) /**< Deferred Transmission Frame Register */
#define EMAC_LCOL (0x005C) /**< Late Collision Register */
#define EMAC_ECOL (0x0060) /**< Excessive Collision Register */
#define EMAC_TUND (0x0064) /**< Transmit Underrun Error Register */
#define EMAC_CSE (0x0068) /**< Carrier Sense Error Register */
#define EMAC_RRE (0x006C) /**< Receive Ressource Error Register */
#define EMAC_ROV (0x0070) /**< Receive Overrun Errors Register */
#define EMAC_RSE (0x0074) /**< Receive Symbol Errors Register */
#define EMAC_ELE (0x0078) /**< Excessive Length Errors Register */
#define EMAC_RJA (0x007C) /**< Receive Jabbers Register */
#define EMAC_USF (0x0080) /**< Undersize Frames Register */
#define EMAC_STE (0x0084) /**< SQE Test Error Register */
#define EMAC_RLE (0x0088) /**< Receive Length Field Mismatch Register */
#define EMAC_TPF (0x008C) /**< Transmitted Pause Frames Register */
#define EMAC_HRB (0x0090) /**< Hash Address Bottom[31:0] */
#define EMAC_HRT (0x0094) /**< Hash Address Top[63:32] */
#define EMAC_SA1L (0x0098) /**< Specific Address 1 Bottom, First 4 bytes */
#define EMAC_SA1H (0x009C) /**< Specific Address 1 Top, Last 2 bytes */
#define EMAC_SA2L (0x00A0) /**< Specific Address 2 Bottom, First 4 bytes */
#define EMAC_SA2H (0x00A4) /**< Specific Address 2 Top, Last 2 bytes */
#define EMAC_SA3L (0x00A8) /**< Specific Address 3 Bottom, First 4 bytes */
#define EMAC_SA3H (0x00AC) /**< Specific Address 3 Top, Last 2 bytes */
#define EMAC_SA4L (0x00B0) /**< Specific Address 4 Bottom, First 4 bytes */
#define EMAC_SA4H (0x00B4) /**< Specific Address 4 Top, Last 2 bytes */
#define EMAC_TID (0x00B8) /**< Type ID Checking Register */
#define EMAC_TPQ (0x00BC) /**< Transmit Pause Quantum Register */
#define EMAC_USRIO (0x00C0) /**< USER Input/Output Register */
#define EMAC_WOL (0x00C4) /**< Wake On LAN Register */
#define EMAC_REV (0x00FC) /**< Revision Register */
/* -------------------------------------------------------- */
/* Bitfields definition for EMAC hardware peripheral */
/* -------------------------------------------------------- */
/* --- Register EMAC_NCR */
#define AT91C_EMAC_LB (0x1 << 0 ) /**< (EMAC) Loopback. Optional. When set, loopback signal is at high level. */
#define AT91C_EMAC_LLB (0x1 << 1 ) /**< (EMAC) Loopback local. */
#define AT91C_EMAC_RE (0x1 << 2 ) /**< (EMAC) Receive enable. */
#define AT91C_EMAC_TE (0x1 << 3 ) /**< (EMAC) Transmit enable. */
#define AT91C_EMAC_MPE (0x1 << 4 ) /**< (EMAC) Management port enable. */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -