From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Suchanek Subject: [PATCH 0/3] Using SPI NOR flah on sunxi. Date: Thu, 30 Apr 2015 16:22:30 +0200 Message-ID: Reply-To: hramrach-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , To: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org, Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , David Woodhouse , Brian Norris , Marek Vasut , Huang Shijie , Michal Suchanek , Ben Hutchings , Alison Chaiken , Mika Westerberg , "grmoore-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org" , devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: devicetree@vger.kernel.org Hello, I tried to connect a SPI NOR flash to my sunxi board and due to the current sunxi SPI driver limitations it does not work. The SPI driver returns an error when more than 64 bytes are transferred at once due to lack of DMA support. I tried to hack in an option to limit the transfer size and discovered that the return value of write in m25p80 driver is wrong and never checked. This might be useful while working with other devices with limited driver support. Thanks Michal Michal Suchanek (3): MTD: m25p80: fix write return value. MTD: spi-nor: check for short writes in spi_nor_write. MTD: m25p80: Add option to limit SPI transfer size. Documentation/devicetree/bindings/mtd/m25p80.txt | 5 +++ drivers/mtd/devices/m25p80.c | 21 ++++++++++-- drivers/mtd/spi-nor/spi-nor.c | 42 ++++++++++-------------- 3 files changed, 40 insertions(+), 28 deletions(-) -- 2.1.4