/* * (C) Copyright 2011 * eInfochips Ltd. * Written-by: Ajay Bhargav * * (C) Copyright 2010 * Marvell Semiconductor * Contributor: Mahavir Jain * * See file CREDITS for list of people who contributed to this * project. * * 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 */ #ifndef __ARMADA100_FEC_H__ #define __ARMADA100_FEC_H__ #define PORT_NUM 0x0 /* RX & TX descriptor command */ #define BUF_OWNED_BY_DMA (1<<31) /* RX descriptor status */ #define RX_EN_INT (1<<23) #define RX_FIRST_DESC (1<<17) #define RX_LAST_DESC (1<<16) #define RX_ERROR (1<<15) /* TX descriptor command */ #define TX_EN_INT (1<<23) #define TX_GEN_CRC (1<<22) #define TX_ZERO_PADDING (1<<18) #define TX_FIRST_DESC (1<<17) #define TX_LAST_DESC (1<<16) #define TX_ERROR (1<<15) /* smi register */ #define SMI_BUSY (1<<28) /* 0 - Write, 1 - Read */ #define SMI_R_VALID (1<<27) /* 0 - Write, 1 - Read */ #define SMI_OP_W (0<<26) /* Write operation */ #define SMI_OP_R (1<<26) /* Read operation */ #define HASH_ADD 0 #define HASH_DELETE 1 #define HASH_ADDR_TABLE_SIZE 0x4000 /* 16K (1/2K address - PCR_HS == 1) */ #define HOP_NUMBER 12 #define PHY_WAIT_ITERATIONS 1000 /* 1000 iterations * 10uS = 10mS max */ #define PHY_WAIT_MICRO_SECONDS 10 #define ETH_HW_IP_ALIGN 2 /* hw aligns IP header */ #define ETH_EXTRA_HEADER (6+6+2+4) /* dest+src addr+protocol id+crc */ #define MAX_PKT_SIZE 1536 /* Bit definitions of the SDMA Config Reg */ #define SDCR_BSZ_OFF 12 #define SDCR_BSZ8 (3<