• Lars-Peter Clausen's avatar
    spi: cadence: Make sure that clock polarity changes are applied · a39e65e9
    Lars-Peter Clausen authored
    It seems that the cadence SPI controller does not immediately change the clock
    polarity setting when writing the CR register. Instead the change is delayed
    until the next transfer starts. This happens after the chip select line has
    already been asserted. As a result the first transfer after a clock polarity
    change will generate spurious clock transitions which typically results in the
    SPI slave not being able to properly understand the message. Toggling the ER
    register seems to cause the SPI controller to apply the clock polarity changes,
    so implement this as a workaround to fix the issue.
    Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
    Signed-off-by: default avatarMark Brown <broonie@linaro.org>
    a39e65e9
spi-cadence.c 20 KB