• Maxime Chevallier's avatar
    spi: imx: Use the longuest possible burst size when in dynamic_burst · 2ca300ac
    Maxime Chevallier authored
    Dynamic burst mode allows to group together multiple words and send them
    in one continuous burst. When the number of bytes to be sent is not a
    strict multiple of the FIFO entry size (32 bits), the controller expects
    the non aligned bits to be sent first.
    
    This commit adds support for this particular constraint, avoiding the
    need to send the non-aligned bytes one by one at the end of the
    transfer, speeding-up transfer speed in that case.
    
    With this method, a transfer is divided into multiple bursts, limited in
    size by the maximum amount of data that the controller can transfer in
    one continuous burst (which is 512 bytes).
    
    The non-512 byte part of the transfer is sent first. The remaining bytes
    to be transferred in the current burst is stored in the 'remainder'
    field.
    
    With this method, the read_u32 field is no longer necessary, and is
    removed.
    
    This was tested on imx6 solo and imx6 quad.
    Signed-off-by: default avatarMaxime Chevallier <maxime.chevallier@bootlin.com>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    2ca300ac
spi-imx.c 43.4 KB