aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2.h
diff options
context:
space:
mode:
authorMichael Chan <mchan@broadcom.com>2007-07-16 21:26:23 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-07-18 04:46:46 -0400
commite30372c91273bb5777597362c74e63f96d9cd434 (patch)
treec81534ad188650d51219c59e920701a43b5c3075 /drivers/net/bnx2.h
parentcb32da0416b823b7f4b65e7e85d6cba16ca4d1e1 (diff)
[BNX2]: Support NVRAM on 5709.
The NVRAM interface is slightly modified on the 5709. To properly support it, we need to change the buffered flag in the flash data structure into multiple flags to indicate buffered operation, address translation, and the use of write enable (WREN). The 5709 flash only requires the buffered operation bit to be set. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2.h')
-rw-r--r--drivers/net/bnx2.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h
index d8cd1afeb23d..102adfe1e923 100644
--- a/drivers/net/bnx2.h
+++ b/drivers/net/bnx2.h
@@ -6433,6 +6433,11 @@ struct sw_bd {
6433#define ST_MICRO_FLASH_PAGE_SIZE 256 6433#define ST_MICRO_FLASH_PAGE_SIZE 256
6434#define ST_MICRO_FLASH_BASE_TOTAL_SIZE 65536 6434#define ST_MICRO_FLASH_BASE_TOTAL_SIZE 65536
6435 6435
6436#define BCM5709_FLASH_PAGE_BITS 8
6437#define BCM5709_FLASH_PHY_PAGE_SIZE (1 << BCM5709_FLASH_PAGE_BITS)
6438#define BCM5709_FLASH_BYTE_ADDR_MASK (BCM5709_FLASH_PHY_PAGE_SIZE-1)
6439#define BCM5709_FLASH_PAGE_SIZE 256
6440
6436#define NVRAM_TIMEOUT_COUNT 30000 6441#define NVRAM_TIMEOUT_COUNT 30000
6437 6442
6438 6443
@@ -6449,7 +6454,10 @@ struct flash_spec {
6449 u32 config2; 6454 u32 config2;
6450 u32 config3; 6455 u32 config3;
6451 u32 write1; 6456 u32 write1;
6452 u32 buffered; 6457 u32 flags;
6458#define BNX2_NV_BUFFERED 0x00000001
6459#define BNX2_NV_TRANSLATE 0x00000002
6460#define BNX2_NV_WREN 0x00000004
6453 u32 page_bits; 6461 u32 page_bits;
6454 u32 page_size; 6462 u32 page_size;
6455 u32 addr_mask; 6463 u32 addr_mask;