53 return (
command | ( ( (
address >> 8 ) & munge_address ) << 3 ) );
68 for ( i = 0 ; i < 50 ; i++ ) {
100 DBG (
"SPI %p failed to read data from device\n",
device );
117 const void *
data,
size_t len ) {
128 DBG (
"SPI %p failed to write-enable device\n",
device );
134 DBG (
"SPI %p failed to write data to device\n",
device );
139 DBG (
"SPI %p failed to complete write operation\n",
device );
struct arbelprm_rc_send_wqe rc
#define SPI_WREN
Set write enable latch.
#define SPI_RDSR
Read status register.
A non-volatile storage device.
uint64_t address
Base address.
int spi_write(struct nvs_device *nvs, unsigned int address, const void *data, size_t len)
Write data to SPI device.
int spi_read(struct nvs_device *nvs, unsigned int address, void *data, size_t len)
Read data from SPI device.
#define SPI_READ
Read data from memory array.
void udelay(unsigned long usecs)
Delay for a fixed number of microseconds.
#define SPI_WRITE
Write data to memory array.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
static int spi_wait(struct spi_device *device)
Wait for SPI device to complete operation.
#define SPI_STATUS_NRDY
Device busy flag.
static unsigned int spi_command(unsigned int command, unsigned int address, int munge_address)
Munge SPI device address into command.
struct nvs_device nvs
NVS device.
uint8_t data[48]
Additional event data.
#define DBG(...)
Print a debugging message.
#define NULL
NULL pointer (VOID *)
#define ETIMEDOUT
Connection timed out.