diff options
author | Matt Carlson <mcarlson@broadcom.com> | 2009-12-03 08:36:22 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-12-03 13:18:04 -0800 |
commit | 141518c95870228da4e050fbe31a8f0c9df82c72 (patch) | |
tree | 377e3cb707cf848213f5aeb653dd50cae572135c /drivers/net/tg3.h | |
parent | b703df6f628ab63eaa875232551b1f2f0503b9af (diff) | |
download | kernel_samsung_smdk4412-141518c95870228da4e050fbe31a8f0c9df82c72.zip kernel_samsung_smdk4412-141518c95870228da4e050fbe31a8f0c9df82c72.tar.gz kernel_samsung_smdk4412-141518c95870228da4e050fbe31a8f0c9df82c72.tar.bz2 |
tg3: Add some VPD preprocessor constants
This patch cleans up the VPD code by creating preprocessor definitions
and using them in the place of hardcoded constants.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tg3.h')
-rw-r--r-- | drivers/net/tg3.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h index 6a2c310..cd30889 100644 --- a/drivers/net/tg3.h +++ b/drivers/net/tg3.h @@ -1821,6 +1821,11 @@ #define TG3_OTP_DEFAULT 0x286c1640 + +/* Hardware Legacy NVRAM layout */ +#define TG3_NVM_VPD_OFF 0x100 +#define TG3_NVM_VPD_LEN 256 + /* Hardware Selfboot NVRAM layout */ #define TG3_NVM_HWSB_CFG1 0x00000004 #define TG3_NVM_HWSB_CFG1_MAJMSK 0xf8000000 @@ -2893,8 +2898,9 @@ struct tg3 { u32 led_ctrl; u32 phy_otp; - char board_part_number[24]; -#define TG3_VER_SIZE 32 +#define TG3_BPN_SIZE 24 + char board_part_number[TG3_BPN_SIZE]; +#define TG3_VER_SIZE ETHTOOL_FWVERS_LEN char fw_ver[TG3_VER_SIZE]; u32 nic_sram_data_cfg; u32 pci_clock_ctrl; |