diff options
author | Matt Carlson <mcarlson@broadcom.com> | 2008-05-02 16:48:36 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-05-02 16:48:36 -0700 |
commit | fd1122a2593d0bbe19856e3943c859ebfe563583 (patch) | |
tree | 75be50b8a959ef7f772612643d5d60104e9ccceb /drivers/net/tg3.h | |
parent | 8ef214288622bf523a3b3096958292a1c63132ad (diff) | |
download | kernel_samsung_smdk4412-fd1122a2593d0bbe19856e3943c859ebfe563583.zip kernel_samsung_smdk4412-fd1122a2593d0bbe19856e3943c859ebfe563583.tar.gz kernel_samsung_smdk4412-fd1122a2593d0bbe19856e3943c859ebfe563583.tar.bz2 |
tg3: Fix 5761 NVRAM sizes
The 5761 NVRAM sizes assigned to the nvram_size member are half as big
as they should be. This patch corrects the NVRAM sizes and replaces
the hardcoded constants with preprocessor constants for readability.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-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 | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h index ce2be3a..bf387ff 100644 --- a/drivers/net/tg3.h +++ b/drivers/net/tg3.h @@ -2576,6 +2576,13 @@ struct tg3 { int nvram_lock_cnt; u32 nvram_size; +#define TG3_NVRAM_SIZE_64KB 0x00010000 +#define TG3_NVRAM_SIZE_128KB 0x00020000 +#define TG3_NVRAM_SIZE_256KB 0x00040000 +#define TG3_NVRAM_SIZE_512KB 0x00080000 +#define TG3_NVRAM_SIZE_1MB 0x00100000 +#define TG3_NVRAM_SIZE_2MB 0x00200000 + u32 nvram_pagesize; u32 nvram_jedecnum; @@ -2584,10 +2591,10 @@ struct tg3 { #define JEDEC_SAIFUN 0x4f #define JEDEC_SST 0xbf -#define ATMEL_AT24C64_CHIP_SIZE (64 * 1024) +#define ATMEL_AT24C64_CHIP_SIZE TG3_NVRAM_SIZE_64KB #define ATMEL_AT24C64_PAGE_SIZE (32) -#define ATMEL_AT24C512_CHIP_SIZE (512 * 1024) +#define ATMEL_AT24C512_CHIP_SIZE TG3_NVRAM_SIZE_512KB #define ATMEL_AT24C512_PAGE_SIZE (128) #define ATMEL_AT45DB0X1B_PAGE_POS 9 |