lkml.org 
[lkml]   [2017]   [Jun]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Applied "spi: imx: dynamic burst length adjust for PIO mode" to the spi tree
Hello Sascha

On 06/30/2017 05:14 AM, Sascha Hauer wrote:
> Hi Mark,
>
> On Fri, Jun 30, 2017 at 01:00:22PM +0100, Mark Brown wrote:
>> The patch
>>
>> spi: imx: dynamic burst length adjust for PIO mode
>>
>> has been applied to the spi tree at
>>
>> git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git
> Argh, I wasn't fast enough. I just ran spi-loopback-test.ko with this
> patch and it doesn't work properly.
>
>> + if (spi_imx->count == spi_imx->remainder) {
>> + ctrl = readl(spi_imx->base + MX51_ECSPI_CTRL);
>> + ctrl&= ~MX51_ECSPI_CTRL_BL_MASK;
>> + if (spi_imx->count> MX51_ECSPI_CTRL_MAX_BURST) {
>> + spi_imx->remainder = spi_imx->count %
>> + MX51_ECSPI_CTRL_MAX_BURST;
>> + val = MX51_ECSPI_CTRL_MAX_BURST;
> This is wrong. MX51_ECSPI_CTRL_MAX_BURST contains the burst length in
> bytes, but the register 'val' is written to takes the burst length in
> bits - 1, so this should be:
>
> val = MX51_ECSPI_CTRL_MAX_BURST * 8 - 1;
>
> instead.
Thanks for pointing this out,
I will submit a fix patch.


Thanks,
Jiada
> Sascha
>

\
 
 \ /
  Last update: 2017-06-30 23:14    [W:0.048 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site