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 <asm/types.h>
21 #define FS_ENET_NAME "fs_enet"
35 #define FS_MAX_INDEX 9
37 static inline int fs_get_fec_index(enum fs_id id)
39 if (id >= fsid_fec1 && id <= fsid_fec2)
40 return id - fsid_fec1;
44 static inline int fs_get_fcc_index(enum fs_id id)
46 if (id >= fsid_fcc1 && id <= fsid_fcc3)
47 return id - fsid_fcc1;
51 static inline int fs_get_scc_index(enum fs_id id)
53 if (id >= fsid_scc1 && id <= fsid_scc4)
54 return id - fsid_scc1;
77 struct fs_mii_bb_platform_info {
78 struct fs_mii_bit mdio_dir;
79 struct fs_mii_bit mdio_dat;
80 struct fs_mii_bit mdc_dat;
81 int mdio_port; /* port & bit for MDIO */
83 int mdc_port; /* port & bit for MDC */
85 int delay; /* delay in us */
86 int irq[32]; /* irqs per phy's */
89 struct fs_platform_info {
91 void(*init_ioports)(void);
92 /* device specific information */
93 int fs_no; /* controller index */
95 u32 cp_page; /* CPM page */
96 u32 cp_block; /* CPM sblock */
98 u32 clk_trx; /* some stuff for pins & mux configuration*/
108 int phy_addr; /* the phy address (-1 no phy) */
110 int phy_irq; /* the phy irq (if it exists) */
112 const struct fs_mii_bus_info *bus_info;
114 int rx_ring, tx_ring; /* number of buffers on rx */
115 __u8 macaddr[6]; /* mac address */
116 int rx_copybreak; /* limit we copy small frames */
117 int use_napi; /* use NAPI */
118 int napi_weight; /* NAPI weight */
120 int use_rmii; /* use RMII mode */
121 int has_phy; /* if the network is phy container as well...*/
123 struct fs_mii_fec_platform_info {