From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from dec59.ruk.cuni.cz ([2001:718:1e03:4::11]) by bombadil.infradead.org with smtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YnpWv-0005aR-T4 for linux-mtd@lists.infradead.org; Thu, 30 Apr 2015 14:33:38 +0000 Message-Id: From: Michal Suchanek Date: Thu, 30 Apr 2015 16:22:30 +0200 Subject: [PATCH 0/3] Using SPI NOR flah on sunxi. To: linux-sunxi@googlegroups.com, Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , David Woodhouse , Brian Norris , Marek Vasut , Huang Shijie , Michal Suchanek , "Rafał Miłecki" , Ben Hutchings , Alison Chaiken , Mika Westerberg , "Bean Huo 霍斌斌 \(beanhuo\)" , "grmoore@altera.com" , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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