3 * Stefan Roese, DENX Software Engineering, sr@denx.de.
5 * See file CREDITS for list of people who contributed to this
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
30 #define CFG_NPE_NUMS 1
31 #ifdef CONFIG_HAS_ETH1
33 #define CFG_NPE_NUMS 2
36 #define NPE_NUM_PORTS 3
37 #define ACTIVE_PORTS 1
39 #define NPE_PKT_SIZE 1600
41 #define CONFIG_DEVS_ETH_INTEL_NPE_MAX_RX_DESCRIPTORS 64
42 #define CONFIG_DEVS_ETH_INTEL_NPE_MAX_TX_DESCRIPTORS 2
44 #define NPE_MBUF_POOL_SIZE \
45 ((CONFIG_DEVS_ETH_INTEL_NPE_MAX_TX_DESCRIPTORS + \
46 CONFIG_DEVS_ETH_INTEL_NPE_MAX_RX_DESCRIPTORS) * \
47 sizeof(IX_OSAL_MBUF) * ACTIVE_PORTS)
49 #define NPE_PKT_POOL_SIZE \
50 ((CONFIG_DEVS_ETH_INTEL_NPE_MAX_TX_DESCRIPTORS + \
51 CONFIG_DEVS_ETH_INTEL_NPE_MAX_RX_DESCRIPTORS) * \
52 NPE_PKT_SIZE * ACTIVE_PORTS)
54 #define NPE_MEM_POOL_SIZE (NPE_MBUF_POOL_SIZE + NPE_PKT_POOL_SIZE)
56 #define PHY_AUTONEGOTIATE_TIMEOUT 4000 /* 4000 ms autonegotiate timeout */
62 u8 active; /* NPE active */
63 u8 eth_id; /* IX_ETH_PORT_1 or IX_ETH_PORT_2 */
64 u8 phy_no; /* which PHY (0 - 31) */
67 IX_OSAL_MBUF *rxQHead;
68 IX_OSAL_MBUF *txQHead;
72 IX_OSAL_MBUF *rx_mbufs;
73 IX_OSAL_MBUF *tx_mbufs;
79 int rx_len[PKTBUFSRX];
85 extern int npe_miiphy_read (char *devname, unsigned char addr,
86 unsigned char reg, unsigned short *value);
87 extern int npe_miiphy_write (char *devname, unsigned char addr,
88 unsigned char reg, unsigned short value);
90 #endif /* ifndef NPE_H */