patch-2.4.25 linux-2.4.25/drivers/net/au1000_eth.h
Next file: linux-2.4.25/drivers/net/de4x5.c
Previous file: linux-2.4.25/drivers/net/au1000_eth.c
Back to the patch index
Back to the overall index
- Lines: 121
- Date:
2004-02-18 05:36:31.000000000 -0800
- Orig file:
linux-2.4.24/drivers/net/au1000_eth.h
- Orig date:
2002-11-28 15:53:13.000000000 -0800
diff -urN linux-2.4.24/drivers/net/au1000_eth.h linux-2.4.25/drivers/net/au1000_eth.h
@@ -1,10 +1,13 @@
/*
- * Alchemy Semi Au1000 ethernet driver include file
+ *
+ * Alchemy Au1x00 ethernet driver include file
*
* Author: Pete Popov <ppopov@mvista.com>
*
* Copyright 2001 MontaVista Software Inc.
*
+ * ########################################################################
+ *
* This program is free software; you can distribute it and/or modify it
* under the terms of the GNU General Public License (Version 2) as
* published by the Free Software Foundation.
@@ -17,14 +20,16 @@
* 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.,
* 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
+ *
+ * ########################################################################
+ *
+ *
*/
-#include <linux/config.h>
-#define NUM_INTERFACES 2
#define MAC_IOSIZE 0x10000
-#define NUM_RX_DMA 4 /* Au1000 has 4 rx hardware descriptors */
-#define NUM_TX_DMA 4 /* Au1000 has 4 tx hardware descriptors */
+#define NUM_RX_DMA 4 /* Au1x00 has 4 rx hardware descriptors */
+#define NUM_TX_DMA 4 /* Au1x00 has 4 tx hardware descriptors */
#define NUM_RX_BUFFS 4
#define NUM_TX_BUFFS 4
@@ -33,12 +38,6 @@
#define ETH_TX_TIMEOUT HZ/4
#define MAC_MIN_PKT_SIZE 64
-#if defined(CONFIG_MIPS_PB1000) || defined(CONFIG_MIPS_PB1500) || defined(CONFIG_MIPS_PB1100)
-#define PHY_ADDRESS 0
-#define PHY_CONTROL_DEFAULT 0x3000
-#define PHY_CONTROL_REG_ADDR 0
-#endif
-
#define MULTICAST_FILTER_LIMIT 64
/* FIXME
@@ -54,11 +53,13 @@
#define MII_ANLPAR 0x0005
#define MII_AEXP 0x0006
#define MII_ANEXT 0x0007
-#define MII_LSI_CONFIG 0x0011
-#define MII_LSI_STAT 0x0012
-#define MII_AUX_CNTRL 0x0018
-#define MII_INT 0x001A
+#define MII_LSI_PHY_CONFIG 0x0011
+/* Status register */
+#define MII_LSI_PHY_STAT 0x0012
+#define MII_AMD_PHY_STAT MII_LSI_PHY_STAT
+#define MII_INTEL_PHY_STAT 0x0011
+#define MII_AUX_CNTRL 0x0018
/* mii registers specific to AMD 79C901 */
#define MII_STATUS_SUMMARY = 0x0018
@@ -121,23 +122,30 @@
#define MII_STSSUM_AUTO 0x0002
#define MII_STSSUM_SPD 0x0001
-/* lsi status register */
-
-#define MII_LSI_STAT_FDX 0x0040
-#define MII_LSI_STAT_SPD 0x0080
+/* lsi phy status register */
+#define MII_LSI_PHY_STAT_FDX 0x0040
+#define MII_LSI_PHY_STAT_SPD 0x0080
+
+/* amd phy status register */
+#define MII_AMD_PHY_STAT_FDX 0x0800
+#define MII_AMD_PHY_STAT_SPD 0x0400
+
+/* intel phy status register */
+#define MII_INTEL_PHY_STAT_FDX 0x0200
+#define MII_INTEL_PHY_STAT_SPD 0x4000
/* Auxilliary Control/Status Register */
#define MII_AUX_FDX 0x0001
#define MII_AUX_100 0x0002
#define MII_AUX_F100 0x0004
#define MII_AUX_ANEG 0x0008
-#define MII_FDX_LED 0x8000
typedef struct mii_phy {
struct mii_phy * next;
struct mii_chip_info * chip_info;
- int phy_addr;
u16 status;
+ u32 *mii_control_reg;
+ u32 *mii_data_reg;
} mii_phy_t;
struct phy_ops {
@@ -204,6 +212,7 @@
u32 tx_tail;
u32 tx_full;
+ int mac_id;
mii_phy_t *mii;
struct phy_ops *phy_ops;
@@ -217,7 +226,7 @@
u8 *hash_table;
u32 hash_mode;
u32 intr_work_done; /* number of Rx and Tx pkts processed in the isr */
- u32 phy_addr; /* PHY address */
+ int phy_addr; /* phy address */
u32 options; /* User-settable misc. driver options. */
u32 drv_flags;
struct net_device_stats stats;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)