Unverified Commit 23f370c7 authored by Thomas Kopp's avatar Thomas Kopp Committed by Mark Brown
Browse files

spi: atmel: Exposing effective spi speed



This patch implements the reporting of the effectively used speed_hz for
the transfer by setting xfer->effective_speed_hz.

See the following patch, which adds this feature to the SPI core for more
information:
commit 5d7e2b5e ("spi: core: allow reporting the effectivly used speed_hz for a transfer")

Signed-off-by: default avatarThomas Kopp <thomas.kopp@microchip.com>
Reviewed-by: default avatarTudor Ambarus <tudor.ambarus@microchip.com>
Link: https://lore.kernel.org/r/20200921071036.2091-1-thomas.kopp@microchip.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 9d362152
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -858,6 +858,7 @@ static int atmel_spi_set_xfer_speed(struct atmel_spi *as,
	csr = spi_readl(as, CSR0 + 4 * chip_select);
	csr = SPI_BFINS(SCBR, scbr, csr);
	spi_writel(as, CSR0 + 4 * chip_select, csr);
	xfer->effective_speed_hz = bus_hz / scbr;

	return 0;
}