Re: [PATCH 2/2] spi: sh-msiof: Use DMA if possible

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Hoan,

On Fri, Jan 11, 2019 at 10:27 AM Hoan <na-hoan@xxxxxxxxxxx> wrote:
> On 2019/01/11 18:09, Geert Uytterhoeven wrote:
> > On Fri, Jan 11, 2019 at 9:59 AM Nguyen An Hoan <na-hoan@xxxxxxxxxxx> wrote:
> >> From: Hoan Nguyen An <na-hoan@xxxxxxxxxxx>
> >>
> >> Currently, this driver only supports feature for DMA 32-bits.
> >> In this case, only if the data length is divisible by 4 to use
> >> DMA, otherwise PIO will be used. This patch will suggest use
> >> the DMA 32-bits with 4bytes of words, then the remaining data
> >> will be transmitted by PIO mode.
> >>
> >> Signed-off-by: Hoan Nguyen An <na-hoan@xxxxxxxxxxx>
> > Thanks for your patch, that's a great idea!
> >
> > Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
> > with a small suggestion below.
> Currently, I only test the transmit-receive spi with AT25C eeprom,
> because the maximum length of data I test with eeprom is only 18 bytes,
> so with this patch, there will be times when clock timing time and pulse
> of data transmission (I Observed by  sigrock logic analyzer) will not be
> beautiful compared to PIO mode.
> I worry if other devices using this driver also limit the maximum length
> of transmission/reception to 18bytes.

One other issue is that MSIOF drops the hardware chip select in between
transfers.  Before, transfers that fully fit in the FIFO were sent in a
single transfer, keeping the hardware chip select asserted during the
full transfer.
If transfers are split, and you need the chip select to be asserted
during the full transfer, you have to use a GPIO chip select instead.
I believe the split can already happen since your commit 916d9802e4b0723c
("spi: sh-msiof: Reduce the number of times write to and perform the
transmission from FIFO")?

However, for most SPI slave devices (e.g. AT25), that issue is moot, as
they need a GPIO chip select anyway, to avoid dropping the chip select
in between transfers belonging to the same message.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux