summaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/falcon_hwdefs.h
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2008-09-01 12:48:55 +0100
committerJeff Garzik <jgarzik@redhat.com>2008-09-03 09:53:48 -0400
commita515089c963b045f65c495cee1d344d8cb75e1d1 (patch)
tree55bc6bbbe1d70b3cc2bbcbc1d778d4271efcf480 /drivers/net/sfc/falcon_hwdefs.h
parent2467ca46b6bb7672ed59fc74ac6780bf10bcd742 (diff)
sfc: Rework the bitfield header so that we can identify fields by bit number
This will support register self-tests. From: Steve Hodgson <shodgson@solarflare.com> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/sfc/falcon_hwdefs.h')
-rw-r--r--drivers/net/sfc/falcon_hwdefs.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/sfc/falcon_hwdefs.h b/drivers/net/sfc/falcon_hwdefs.h
index 7c784f71f18..a3260dfb49a 100644
--- a/drivers/net/sfc/falcon_hwdefs.h
+++ b/drivers/net/sfc/falcon_hwdefs.h
@@ -1147,8 +1147,8 @@ struct falcon_nvconfig_board_v3 {
#define SPI_DEV_TYPE_ERASE_SIZE_WIDTH 5
#define SPI_DEV_TYPE_BLOCK_SIZE_LBN 24
#define SPI_DEV_TYPE_BLOCK_SIZE_WIDTH 5
-#define SPI_DEV_TYPE_FIELD(type, field) \
- (((type) >> EFX_LOW_BIT(field)) & EFX_MASK32(field))
+#define SPI_DEV_TYPE_FIELD(type, field) \
+ (((type) >> EFX_LOW_BIT(field)) & EFX_MASK32(EFX_WIDTH(field)))
#define NVCONFIG_BASE 0x300
#define NVCONFIG_BOARD_MAGIC_NUM 0xFA1C