On 28/01/19 12:27 PM, Jagan Teki wrote: > On Wed, Dec 12, 2018 at 11:08 PM Vignesh R <vigne...@ti.com> wrote: >> >> Add non DM version of SPI_MEM to support easy migration to new SPI NOR >> framework. This can be removed once DM_SPI conversion is complete. >> >> Signed-off-by: Vignesh R <vigne...@ti.com> >> --- >> drivers/spi/Kconfig | 4 +- >> drivers/spi/Makefile | 1 + >> drivers/spi/spi-mem-nodm.c | 89 ++++++++++++++++++++++++++++++++++++++ >> 3 files changed, 92 insertions(+), 2 deletions(-) >> create mode 100644 drivers/spi/spi-mem-nodm.c >> [...] >> +int spi_mem_adjust_op_size(struct spi_slave *slave, >> + struct spi_mem_op *op) >> +{ >> + return 0; > > Does it not return data size of SPI mem, or not need for non-dm? >
/** * spi_mem_adjust_op_size() - Adjust the data size of a SPI mem operation to * match controller limitations * @slave: the SPI device * @op: the operation to adjust * * Some controllers have FIFO limitations and must split a data transfer * operation into multiple ones, others require a specific alignment for * optimized accesses. This function allows SPI mem drivers to split a single * operation into multiple sub-operations when required. * * Return: a negative error code if the controller can't properly adjust @op, * 0 otherwise. Note that @op->data.nbytes will be updated if @op * can't be handled in a single step. */ I will modify the function to take care of spi->max_write_size and spi->max_read_size in DM and non-DM case (instead of spi-nor-core.c). -- Regards Vignesh _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot