summaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2.h
diff options
context:
space:
mode:
authorMichael Chan <mchan@broadcom.com>2007-07-16 18:26:23 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2007-07-18 01:46:46 -0700
commite30372c91273bb5777597362c74e63f96d9cd434 (patch)
treec81534ad188650d51219c59e920701a43b5c3075 /drivers/net/bnx2.h
parentcb32da0416b823b7f4b65e7e85d6cba16ca4d1e1 (diff)
downloadlinux-stable-e30372c91273bb5777597362c74e63f96d9cd434.tar.gz
linux-stable-e30372c91273bb5777597362c74e63f96d9cd434.tar.bz2
linux-stable-e30372c91273bb5777597362c74e63f96d9cd434.zip
[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 {
#define ST_MICRO_FLASH_PAGE_SIZE 256
#define ST_MICRO_FLASH_BASE_TOTAL_SIZE 65536
+#define BCM5709_FLASH_PAGE_BITS 8
+#define BCM5709_FLASH_PHY_PAGE_SIZE (1 << BCM5709_FLASH_PAGE_BITS)
+#define BCM5709_FLASH_BYTE_ADDR_MASK (BCM5709_FLASH_PHY_PAGE_SIZE-1)
+#define BCM5709_FLASH_PAGE_SIZE 256
+
#define NVRAM_TIMEOUT_COUNT 30000
@@ -6449,7 +6454,10 @@ struct flash_spec {
u32 config2;
u32 config3;
u32 write1;
- u32 buffered;
+ u32 flags;
+#define BNX2_NV_BUFFERED 0x00000001
+#define BNX2_NV_TRANSLATE 0x00000002
+#define BNX2_NV_WREN 0x00000004
u32 page_bits;
u32 page_size;
u32 addr_mask;