
Hi Philipp,
On Wed, Dec 11, 2019 at 7:10 PM Philipp Tomsich philipp.tomsich@theobroma-systems.com wrote:
On 11.12.2019, at 14:26, Jagan Teki jagan@amarulasolutions.com wrote:
The maximum transfer length (in a single transaction) for the Rockchip SPI controller is 64Kframes (i.e. 0x10000 frames) of 8bit or 16bit frames and is encoded as (num_frames - 1) in CTRLR1.
So the 0x10000 is offset value for 64K but the actual size value would be 'minus 1' from 0x10000.
NAK. Please see 2 code lines below your change to see that the “minus 1” is applied there… so a todo of 0x10000 will write 0xffff to regs->ctrlr1.
The problem must be somewhere else and this patch will only mask the underlying issue.
Please check the below changes. the max transfer size is 64K - 1 which is 0xffff and we need to write -1 of this to cr1.
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/d... https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/d...