i3c: mipi-i3c-hci: Round IBI data chunk size to HW supported value
authorJarkko Nikula <jarkko.nikula@linux.intel.com>
Fri, 28 Jun 2024 13:15:59 +0000 (16:15 +0300)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Fri, 26 Jul 2024 12:21:29 +0000 (14:21 +0200)
commit4642f7eddb75efb5944ff21e5340ccce66928ff1
tree0b5ea266c9bf92ddce591c19efa74edcf90e23cd
parent8a2be2f1db268ec735419e53ef04ca039fc027dc
i3c: mipi-i3c-hci: Round IBI data chunk size to HW supported value

The dma.c: hci_dma_init() sets the CHUNK_SIZE field in the IBI_SETUP
register incorrectly if the calculated ibi_chunk_sz is not exactly
2^(n+2) bytes, where n is 0..6.

Fix this by rounding the chunk size up to nearest 2^(n+2) bytes.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Link: https://lore.kernel.org/r/20240628131559.502822-4-jarkko.nikula@linux.intel.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/i3c/master/mipi-i3c-hci/dma.c