55 DBGC (
device,
"3wire %p reading %zd bytes at %04x\n",
60 DBGC (
device,
"3wire %p could not read: %s\n",
78 const void *
data,
size_t len ) {
85 DBGC (
device,
"3wire %p writing %zd bytes at %04x\n",
91 DBGC (
device,
"3wire %p could not enable writing: %s\n",
99 DBGC (
device,
"3wire %p could not write: %s\n",
128 DBGC (
device,
"3wire %p could not autodetect address " 133 DBGC (
device,
"3wire %p autodetected address length %d\n",
struct arbelprm_rc_send_wqe rc
unsigned int word_len_log2
Word length.
int threewire_write(struct nvs_device *nvs, unsigned int address, const void *data, size_t len)
Write data to three-wire device.
A non-volatile storage device.
uint64_t address
Base address.
#define THREEWIRE_READ
Read data from memory array.
int threewire_read(struct nvs_device *nvs, unsigned int address, void *data, size_t len)
Read data from three-wire device.
Three-wire serial interface.
#define THREEWIRE_WRITE_MDELAY
Time to wait for write cycles to complete.
assert((readw(&hdr->flags) &(GTF_reading|GTF_writing))==0)
#define THREEWIRE_EWEN_ADDRESS
Address to be used for write enable command.
char * strerror(int errno)
Retrieve string representation of error number.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
int threewire_detect_address_len(struct spi_device *device)
Autodetect device address length.
struct nvs_device nvs
NVS device.
void mdelay(unsigned long msecs)
Delay for a fixed number of milliseconds.
#define THREEWIRE_WRITE
Write data to memory array.
uint8_t data[48]
Additional event data.
#define SPI_MODE_THREEWIRE
Threewire-compatible mode.
#define THREEWIRE_EWEN
Write enable.
#define NULL
NULL pointer (VOID *)
#define SPI_AUTODETECT_ADDRESS_LEN
SPI magic autodetection address length.