@@ -527,6 +527,9 @@ int dw_spi_add_host(struct device *dev, struct dw_spi *dws)
/* Basic HW init */
spi_hw_init(dev, dws);
+ /* Memory ops? */
+ master->mem_ops = dws->mem_ops;
+
if (dws->dma_ops && dws->dma_ops->dma_init) {
ret = dws->dma_ops->dma_init(dws);
if (ret) {
@@ -3,6 +3,7 @@
#define DW_SPI_HEADER_H
#include <linux/io.h>
+#include <linux/spi/spi-mem.h>
#include <linux/scatterlist.h>
/* Register offsets */
@@ -116,6 +117,7 @@ struct dw_spi {
u16 bus_num;
u16 num_cs; /* supported slave numbers */
void (*set_cs)(struct spi_device *spi, bool enable);
+ const struct spi_controller_mem_ops *mem_ops;
/* Current message transfer state info */
size_t len;