From patchwork Fri Nov 8 04:24:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Poddar, Sourav" X-Patchwork-Id: 289691 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:770:15f::2]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id CE7D02C0082 for ; Fri, 8 Nov 2013 15:25:17 +1100 (EST) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vedd3-0005Ly-Nk; Fri, 08 Nov 2013 04:25:05 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vedd2-0002Qn-14; Fri, 08 Nov 2013 04:25:04 +0000 Received: from comal.ext.ti.com ([198.47.26.152]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vedcz-0002Pt-Iq for linux-mtd@lists.infradead.org; Fri, 08 Nov 2013 04:25:02 +0000 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id rA84OYCj008559; Thu, 7 Nov 2013 22:24:34 -0600 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id rA84OXLY013395; Thu, 7 Nov 2013 22:24:33 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.2.342.3; Thu, 7 Nov 2013 22:24:33 -0600 Received: from [172.24.145.168] (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id rA84OU3x028000; Thu, 7 Nov 2013 22:24:31 -0600 Message-ID: <527C677E.1030404@ti.com> Date: Fri, 8 Nov 2013 09:54:30 +0530 From: Sourav Poddar User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.28) Gecko/20120313 Thunderbird/3.1.20 MIME-Version: 1.0 To: Brian Norris Subject: Re: [PATCHv3 0/2] m25p80: QUAD read support + cleanup. References: <1383748535-20462-1-git-send-email-sourav.poddar@ti.com> <20131107182955.GV20061@ld-irv-0074.broadcom.com> In-Reply-To: <20131107182955.GV20061@ld-irv-0074.broadcom.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131107_232501_721676_6DC038CE X-CRM114-Status: GOOD ( 20.08 ) X-Spam-Score: -6.9 (------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-6.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [198.47.26.152 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: marex@denx.de, Huang Shijie , linux-mtd@lists.infradead.org, balbi@ti.com, dedekind1@gmail.com X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Hi Brian, On Thursday 07 November 2013 11:59 PM, Brian Norris wrote: > + Huang > > On Wed, Nov 06, 2013 at 08:05:33PM +0530, Sourav Poddar wrote: >> Patch series does the following: >> 1. Cleanup the m25p80 driver to convert bool check for >> read into an enum. This will help adding more read >> commands into the driver easily. >> >> 2. Add quad read support for spansion and macronix flash devices. > Do we have any testing results? I know that some QSPI controllers still > need some more work to be able to support this, but has someone tested > this current patch set with a "true" SPI controller on mainline? > I have tested this with a 3.12-rc6 based internal kernel(as dt patches are not in). You can check the controller at drivers/spi/spi-ti-qspi.c. From driver perspective, there is an additional patch[1] required, it was pulled in by Mark, and I can see it in his tree. Testing details: flash_erase the entire chip mtd write the flash with a particular pattern mtd read the flash > Bri > an diff the write and the read value. [1]: Add dual/quad read mode bit flag for the master controller. These check will be used in the spi framework to determine whether the master controller can do dual/quad read respectively. Signed-off-by: Sourav Poddar --- v1->v2 Added dual mode bit also. drivers/spi/spi-ti-qspi.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti-qspi.c index e12d962..7a45c3e 100644 --- a/drivers/spi/spi-ti-qspi.c +++ b/drivers/spi/spi-ti-qspi.c @@ -472,7 +472,7 @@ static int ti_qspi_probe(struct platform_device *pdev) if (!master) return -ENOMEM; - master->mode_bits = SPI_CPOL | SPI_CPHA; + master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_RX_DUAL | SPI_RX_QUAD; master->bus_num = -1; master->flags = SPI_MASTER_HALF_DUPLEX;