Copyright(c) 1999 - 2002 Intel Corporation. All rights reserved.
+ Copyright 2011 Freescale Semiconductor, Inc.
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
#include <asm/io.h>
#include <pci.h>
-#define E1000_ERR(args...) printf("e1000: " args)
+#define E1000_ERR(NIC, fmt, args...) \
+ printf("e1000: %s: ERROR: " fmt, (NIC)->name ,##args)
#ifdef E1000_DEBUG
-#define E1000_DBG(args...) printf("e1000: " args)
-#define DEBUGOUT(fmt,args...) printf(fmt ,##args)
-#define DEBUGFUNC() printf("%s\n", __FUNCTION__);
+#define E1000_DBG(NIC, fmt, args...) \
+ printf("e1000: %s: DEBUG: " fmt, (NIC)->name ,##args)
+#define DEBUGOUT(fmt, args...) printf(fmt ,##args)
+#define DEBUGFUNC() printf("%s\n", __func__);
#else
-#define E1000_DBG(args...)
-#define DEBUGFUNC()
-#define DEBUGOUT(fmt,args...)
+#define E1000_DBG(HW, args...) do { } while (0)
+#define DEBUGFUNC() do { } while (0)
+#define DEBUGOUT(fmt, args...) do { } while (0)
#endif
/* Forward declarations of structures used by the shared code */
e1000_82571,
e1000_82572,
e1000_82573,
+ e1000_82574,
e1000_80003es2lan,
e1000_ich8lan,
e1000_num_macs
e1000_100_full = 3
} e1000_speed_duplex_type;
-typedef enum {
- e1000_lan_a = 0,
- e1000_lan_b = 1
-} e1000_lan_loc;
-
/* Flow Control Settings */
typedef enum {
e1000_fc_none = 0,
e1000_phy_gg82563,
e1000_phy_igp_3,
e1000_phy_ife,
+ e1000_phy_bm,
e1000_phy_undefined = 0xFF
} e1000_phy_type;
#define E1000_DEV_ID_82573E 0x108B
#define E1000_DEV_ID_82573E_IAMT 0x108C
#define E1000_DEV_ID_82573L 0x109A
+#define E1000_DEV_ID_82574L 0x10D3
#define E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3 0x10B5
#define E1000_DEV_ID_80003ES2LAN_COPPER_DPT 0x1096
#define E1000_DEV_ID_80003ES2LAN_SERDES_DPT 0x1098
/* Structure containing variables used by the shared code (e1000_hw.c) */
struct e1000_hw {
+ struct eth_device *nic;
+ unsigned int cardnum;
+
pci_dev_t pdev;
uint8_t *hw_addr;
e1000_mac_type mac_type;
uint32_t phy_init_script;
uint32_t txd_cmd;
e1000_media_type media_type;
- e1000_lan_loc lan_loc;
e1000_fc_type fc;
e1000_bus_type bus_type;
#if 0
#define L1LXT971A_PHY_ID 0x001378E0
#define GG82563_E_PHY_ID 0x01410CA0
+#define BME1000_E_PHY_ID 0x01410CB0
+
/* Miscellaneous PHY bit definitions. */
#define PHY_PREAMBLE 0xFFFFFFFF
#define PHY_SOF 0x01