tg3: Add support for 2 new selfboot formats
authorMatt Carlson <mcarlson@broadcom.com>
Wed, 17 Feb 2010 15:16:56 +0000 (15:16 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 18 Feb 2010 01:27:35 +0000 (17:27 -0800)
This patch adds new offsets to the bootcode version extraction code to
support NVRAM format versions 4 and 5.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tg3.c
drivers/net/tg3.h

index 051b18ad3f0cce13856be2afdb0911263137d030..f08e4b8464588f340921d2b23db625f7fa24cfea 100644 (file)
@@ -12753,6 +12753,12 @@ static void __devinit tg3_read_sb_ver(struct tg3 *tp, u32 val)
        case TG3_EEPROM_SB_REVISION_3:
                offset = TG3_EEPROM_SB_F1R3_EDH_OFF;
                break;
+       case TG3_EEPROM_SB_REVISION_4:
+               offset = TG3_EEPROM_SB_F1R4_EDH_OFF;
+               break;
+       case TG3_EEPROM_SB_REVISION_5:
+               offset = TG3_EEPROM_SB_F1R5_EDH_OFF;
+               break;
        default:
                return;
        }
index b4fd59623cfbb8dca3367c26ffc6593b64829d57..ffc12b1cb388589e5af8801f0d8d807f3c5cf58b 100644 (file)
 #define TG3_EEPROM_SB_REVISION_0       0x00000000
 #define TG3_EEPROM_SB_REVISION_2       0x00020000
 #define TG3_EEPROM_SB_REVISION_3       0x00030000
+#define TG3_EEPROM_SB_REVISION_4       0x00040000
+#define TG3_EEPROM_SB_REVISION_5       0x00050000
 #define TG3_EEPROM_MAGIC_HW            0xabcd
 #define TG3_EEPROM_MAGIC_HW_MSK                0xffff
 
 #define TG3_EEPROM_SB_F1R2_EDH_OFF     0x14
 #define TG3_EEPROM_SB_F1R2_MBA_OFF     0x10
 #define TG3_EEPROM_SB_F1R3_EDH_OFF     0x18
+#define TG3_EEPROM_SB_F1R4_EDH_OFF     0x1c
+#define TG3_EEPROM_SB_F1R5_EDH_OFF     0x20
 #define TG3_EEPROM_SB_EDH_MAJ_MASK     0x00000700
 #define TG3_EEPROM_SB_EDH_MAJ_SHFT     8
 #define TG3_EEPROM_SB_EDH_MIN_MASK     0x000000ff