2 * Platform information definitions for the
3 * universal Freescale Ethernet driver.
5 * Copyright (c) 2003 Intracom S.A.
6 * by Pantelis Antoniou <panto@intracom.gr>
8 * 2005 (c) MontaVista Software, Inc.
9 * Vitaly Bordug <vbordug@ru.mvista.com>
11 * This file is licensed under the terms of the GNU General Public License
12 * version 2. This program is licensed "as is" without any warranty of any
13 * kind, whether express or implied.
19 #include <linux/version.h>
20 #include <asm/types.h>
22 #define FS_ENET_NAME "fs_enet"
36 #define FS_MAX_INDEX 9
38 static inline int fs_get_fec_index(enum fs_id id)
40 if (id >= fsid_fec1 && id <= fsid_fec2)
41 return id - fsid_fec1;
45 static inline int fs_get_fcc_index(enum fs_id id)
47 if (id >= fsid_fcc1 && id <= fsid_fcc3)
48 return id - fsid_fcc1;
52 static inline int fs_get_scc_index(enum fs_id id)
54 if (id >= fsid_scc1 && id <= fsid_scc4)
55 return id - fsid_scc1;
73 struct fs_mii_bus_info {
74 int method; /* mii method */
75 int id; /* the id of the mii_bus */
76 int disable_aneg; /* if the controller needs to negothiate speed & duplex */
77 int lpa; /* the default board-specific vallues will be applied otherwise */
94 int mdio_port; /* port & bit for MDIO */
96 int mdc_port; /* port & bit for MDC */
98 int delay; /* delay in us */
103 struct fs_platform_info {
105 void(*init_ioports)(void);
106 /* device specific information */
107 int fs_no; /* controller index */
109 u32 cp_page; /* CPM page */
110 u32 cp_block; /* CPM sblock */
112 u32 clk_trx; /* some stuff for pins & mux configuration*/
122 int phy_addr; /* the phy address (-1 no phy) */
123 int phy_irq; /* the phy irq (if it exists) */
125 const struct fs_mii_bus_info *bus_info;
127 int rx_ring, tx_ring; /* number of buffers on rx */
128 __u8 macaddr[6]; /* mac address */
129 int rx_copybreak; /* limit we copy small frames */
130 int use_napi; /* use NAPI */
131 int napi_weight; /* NAPI weight */
133 int use_rmii; /* use RMII mode */