Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a755af52 authored by Heiner Kallweit's avatar Heiner Kallweit Committed by Mark Brown
Browse files

spi: fsl-espi: simplify fsl_espi_setup_transfer



Simplify fsl_espi_setup_transfer a little.

Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent daae020c
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -166,12 +166,10 @@ static void fsl_espi_setup_transfer(struct spi_device *spi,
	mpc8xxx_spi->get_rx = cs->get_rx;
	mpc8xxx_spi->get_tx = cs->get_tx;

	bits_per_word = bits_per_word - 1;

	/* mask out bits we are going to set */
	cs->hw_mode &= ~(CSMODE_LEN(0xF) | CSMODE_DIV16 | CSMODE_PM(0xF));

	cs->hw_mode |= CSMODE_LEN(bits_per_word);
	cs->hw_mode |= CSMODE_LEN(bits_per_word - 1);

	if ((mpc8xxx_spi->spibrg / hz) > 64) {
		cs->hw_mode |= CSMODE_DIV16;