[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 11/20] eepro100: Use symbolic names for bits in EEPR
From: |
Stefan Weil |
Subject: |
[Qemu-devel] [PATCH 11/20] eepro100: Use symbolic names for bits in EEPROM id |
Date: |
Sun, 14 Feb 2010 17:16:20 +0100 |
Signed-off-by: Stefan Weil <address@hidden>
---
hw/eepro100.c | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/hw/eepro100.c b/hw/eepro100.c
index c647322..01bcd6d 100644
--- a/hw/eepro100.c
+++ b/hw/eepro100.c
@@ -272,6 +272,21 @@ typedef enum {
eeprom_smbus_addr = 0x90,
} EEPROMOffset;
+/* Bit values for EEPROM ID word. */
+typedef enum {
+ eeprom_id_mdm = BIT(0), /* Modem */
+ eeprom_id_stb = BIT(1), /* Standby Enable */
+ eeprom_id_wmr = BIT(2), /* ??? */
+ eeprom_id_wol = BIT(5), /* Wake on LAN */
+ eeprom_id_dpd = BIT(6), /* Deep Power Down */
+ eeprom_id_alt = BIT(7), /* */
+ /* BITS(10, 8) device revision */
+ eeprom_id_bd = BIT(11), /* boot disable */
+ eeprom_id_id = BIT(13), /* id bit */
+ /* BITS(15, 14) signature */
+ eeprom_id_valid = BIT(14), /* signature for valid eeprom */
+} eeprom_id_bit;
+
/* Default values for MDI (PHY) registers */
static const uint16_t eepro100_mdi_default[] = {
/* MDI Registers 0 - 6, 7 */
@@ -643,7 +658,7 @@ static void nic_selective_reset(EEPRO100State * s)
uint16_t *eeprom_contents = eeprom93xx_data(s->eeprom);
//~ eeprom93xx_reset(s->eeprom);
memcpy(eeprom_contents, s->conf.macaddr.a, 6);
- eeprom_contents[eeprom_id] = 0x4000;
+ eeprom_contents[eeprom_id] = eeprom_id_valid;
if (s->device == i82557B || s->device == i82557C)
eeprom_contents[5] = 0x0100;
eeprom_contents[eeprom_phy_id] = 1;
--
1.6.6.1
- [Qemu-devel] [PATCH 01/20] eepro100: Fix compiler errors from debug messages, (continued)
- [Qemu-devel] [PATCH 01/20] eepro100: Fix compiler errors from debug messages, Stefan Weil, 2010/02/14
- [Qemu-devel] [PATCH 02/20] eepro100: Add missing SCB register names, Stefan Weil, 2010/02/14
- [Qemu-devel] [PATCH 03/20] eepro100: Fix PXE boot, Stefan Weil, 2010/02/14
- [Qemu-devel] [PATCH 04/20] eepro100: Support gpxe boot for all eepro100 devices, Stefan Weil, 2010/02/14
- [Qemu-devel] [PATCH 05/20] eepro100: Add all supported devices to pci.c, Stefan Weil, 2010/02/14
- [Qemu-devel] [PATCH 06/20] eepro100: Add TODO list, Stefan Weil, 2010/02/14
- [Qemu-devel] [PATCH 07/20] eepro100: Update copyright notice, Stefan Weil, 2010/02/14
- [Qemu-devel] [PATCH 08/20] eepro100: Add device descriptions, Stefan Weil, 2010/02/14
- [Qemu-devel] [PATCH 09/20] eepro100: Use symbolic names and BIT macros in binary operations, Stefan Weil, 2010/02/14
- [Qemu-devel] [PATCH 10/20] eepro100: Remove old unused code, Stefan Weil, 2010/02/14
- [Qemu-devel] [PATCH 11/20] eepro100: Use symbolic names for bits in EEPROM id,
Stefan Weil <=
- [Qemu-devel] [PATCH 12/20] eepro100: Replace variable name to fix a compiler warning, Stefan Weil, 2010/02/14
- [Qemu-devel] [PATCH 13/20] eepro100: Support RNR interrupt, Stefan Weil, 2010/02/14
- [Qemu-devel] [PATCH 14/20] eepro100: Fix CU Start command, Stefan Weil, 2010/02/14
- [Qemu-devel] [PATCH 15/20] eepro100: Prettify code (no functional changes), Stefan Weil, 2010/02/14
- [Qemu-devel] [PATCH 16/20] eepro100: Use tx.status, Stefan Weil, 2010/02/14
- [Qemu-devel] [PATCH 17/20] eepro100: New function for reading command block, Stefan Weil, 2010/02/14
- [Qemu-devel] [PATCH 18/20] eepro100: Add diagnose command, Stefan Weil, 2010/02/14
- [Qemu-devel] [PATCH 19/20] eepro100: Remove C++ comments, Stefan Weil, 2010/02/14
- [Qemu-devel] [PATCH 20/20] eepro100: Keep includes sorted, Stefan Weil, 2010/02/14
- [Qemu-devel] Re: [PATCH 11/20] eepro100: Use symbolic names for bits in EEPROM id, Michael S. Tsirkin, 2010/02/21