aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/spi.h
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2008-11-04 15:33:11 -0500
committerJeff Garzik <jgarzik@redhat.com>2008-11-06 00:49:56 -0500
commit0a95f56323ce93dac354c1b2d54bf959a985cf7d (patch)
treefbf11f9284c25fc5c0520fda649c3850d180da3b /drivers/net/sfc/spi.h
parent2883f552f2c6c6ccb2021643652c6d930f205f6f (diff)
sfc: Clean up non-volatile memory partitioning
Move flash and EEPROM partition boundary constants into spi.h and rename them to be consistent. Add a comment on the partitioning. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/sfc/spi.h')
-rw-r--r--drivers/net/sfc/spi.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/sfc/spi.h b/drivers/net/sfc/spi.h
index feef61942377..b73f86cf5fa2 100644
--- a/drivers/net/sfc/spi.h
+++ b/drivers/net/sfc/spi.h
@@ -63,4 +63,21 @@ int falcon_spi_read(const struct efx_spi_device *spi, loff_t start,
63int falcon_spi_write(const struct efx_spi_device *spi, loff_t start, 63int falcon_spi_write(const struct efx_spi_device *spi, loff_t start,
64 size_t len, size_t *retlen, const u8 *buffer); 64 size_t len, size_t *retlen, const u8 *buffer);
65 65
66/*
67 * SFC4000 flash is partitioned into:
68 * 0-0x400 chip and board config (see falcon_hwdefs.h)
69 * 0x400-0x8000 unused (or may contain VPD if EEPROM not present)
70 * 0x8000-end boot code (mapped to PCI expansion ROM)
71 * SFC4000 small EEPROM (size < 0x400) is used for VPD only.
72 * SFC4000 large EEPROM (size >= 0x400) is partitioned into:
73 * 0-0x400 chip and board config
74 * configurable VPD
75 * 0x800-0x1800 boot config
76 * Aside from the chip and board config, all of these are optional and may
77 * be absent or truncated depending on the devices used.
78 */
79#define FALCON_NVCONFIG_END 0x400U
80#define EFX_EEPROM_BOOTCONFIG_START 0x800U
81#define EFX_EEPROM_BOOTCONFIG_END 0x1800U
82
66#endif /* EFX_SPI_H */ 83#endif /* EFX_SPI_H */