1 /****************************************************************************
2 * Driver for Solarflare Solarstorm network controllers and boards
3 * Copyright 2005 Fen Systems Ltd.
4 * Copyright 2006 Solarflare Communications Inc.
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published
8 * by the Free Software Foundation, incorporated herein by reference.
14 #include "net_driver.h"
16 /**************************************************************************
18 * Basic SPI command set and bit definitions
20 *************************************************************************/
23 * Commands common to all known devices.
27 /* Write status register */
30 /* Write data to memory array */
31 #define SPI_WRITE 0x02
33 /* Read data from memory array */
36 /* Reset write enable latch */
39 /* Read status register */
42 /* Set write enable latch */
45 /* SST: Enable write to status register */
46 #define SPI_SST_EWSR 0x50
49 * Status register bits. Not all bits are supported on all devices.
53 /* Write-protect pin enabled */
54 #define SPI_STATUS_WPEN 0x80
56 /* Block protection bit 2 */
57 #define SPI_STATUS_BP2 0x10
59 /* Block protection bit 1 */
60 #define SPI_STATUS_BP1 0x08
62 /* Block protection bit 0 */
63 #define SPI_STATUS_BP0 0x04
65 /* State of the write enable latch */
66 #define SPI_STATUS_WEN 0x02
68 /* Device busy flag */
69 #define SPI_STATUS_NRDY 0x01
71 #endif /* EFX_SPI_H */