[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdVT2M7pPHDDHmoNF_zVXhz1PUm5PiYxDKcAjSAcfSDiZg@mail.gmail.com>
Date: Thu, 4 Jun 2015 08:42:59 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Michal Suchanek <hramrach@...il.com>
Cc: Rob Herring <robh+dt@...nel.org>, Pawel Moll <pawel.moll@....com>,
Mark Rutland <mark.rutland@....com>,
Ian Campbell <ijc+devicetree@...lion.org.uk>,
Kumar Gala <galak@...eaurora.org>,
Russell King <linux@....linux.org.uk>,
Kukjin Kim <kgene@...nel.org>,
Krzysztof Kozlowski <k.kozlowski@...sung.com>,
Vinod Koul <vinod.koul@...el.com>,
Dan Williams <dan.j.williams@...el.com>,
David Woodhouse <dwmw2@...radead.org>,
Brian Norris <computersforpeace@...il.com>,
Han Xu <han.xu@...escale.com>, Mark Brown <broonie@...nel.org>,
Geert Uytterhoeven <geert+renesas@...der.be>,
Marek Vasut <marex@...x.de>,
Rafał Miłecki <zajec5@...il.com>,
Alison Chaiken <alison_chaiken@...tor.com>,
Huang Shijie <b32955@...escale.com>,
Ben Hutchings <ben@...adent.org.uk>,
Knut Wohlrab <knut.wohlrab@...bosch.com>,
Bean Huo 霍斌斌 (beanhuo)
<beanhuo@...ron.com>, "grmoore@...era.com" <grmoore@...era.com>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-samsung-soc@...r.kernel.org"
<linux-samsung-soc@...r.kernel.org>, dmaengine@...r.kernel.org,
MTD Maling List <linux-mtd@...ts.infradead.org>,
linux-spi <linux-spi@...r.kernel.org>
Subject: Re: [PATCH 08/11] MTD: m25p80: Add option to limit SPI transfer size.
On Wed, Jun 3, 2015 at 11:26 PM, Michal Suchanek <hramrach@...il.com> wrote:
> On sunxi the SPI controller currently does not have DMA support and fails
> any transfer larger than 63 bytes.
This is a driver limitation, not a hardware limitation.
> On Exynos the pl330 DMA controller fails any transfer larger than 64kb
> when using slower speed like 40MHz and any transfer larger than 128bytes
> when running at 133MHz.
This may be a driver bug.
> The best thing is that in both cases the controller can just lock up and
> never finish potentially leaving the hardware in unusable state.
>
> So it is required that the m25p80 driver actively prevents doing
> transfers that are too large for the current driver state on a
> particular piece of hardware.
OK.
> Signed-off-by: Michal Suchanek <hramrach@...il.com>
>
> --
>
> Update commit message and documentation text.
> ---
> .../devicetree/bindings/mtd/jedec,spi-nor.txt | 6 ++++++
> drivers/mtd/devices/m25p80.c | 24 ++++++++++++++++++++--
> 2 files changed, 28 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt b/Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt
> index 2bee681..4e63ae8 100644
> --- a/Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt
> +++ b/Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt
> @@ -19,6 +19,12 @@ Optional properties:
> all chips and support for it can not be detected at runtime.
> Refer to your chips' datasheet to check if this is supported
> by your chip.
> +- linux,max_tx_len : With some SPI controller drivers possible transfer size is
> + limited. This may be hardware or driver bug.
> + Transfer data in chunks no larger than this value.
> + Using this option may severely degrade performance and
> + possibly flash memory life when max_tx_len is smaller than
> + flash page size (typically 256 bytes)
DT describes the hardware, not buggy drivers.
So IMHO this doesn't belong in DT, but it can be a field in struct spi_master.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists