Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753112AbcCaGrz (ORCPT ); Thu, 31 Mar 2016 02:47:55 -0400 Received: from mail-cys01nam02on0042.outbound.protection.outlook.com ([104.47.37.42]:13584 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751282AbcCaGrw convert rfc822-to-8bit (ORCPT ); Thu, 31 Mar 2016 02:47:52 -0400 X-Greylist: delayed 1107 seconds by postgrey-1.27 at vger.kernel.org; Thu, 31 Mar 2016 02:47:52 EDT Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=bestguesspass action=none header.from=xilinx.com; From: Lakshmi Sai Krishna Potthuri To: Mark Brown CC: Michal Simek , Soren Brinkmann , David Woodhouse , Brian Norris , Javier Martinez Canillas , Boris Brezillon , Stephen Warren , Geert Uytterhoeven , "Andrew F. Davis" , Marek Vasut , Jagan Teki , =?iso-8859-2?Q?Rafa=B3_Mi=B3ecki?= , "linux-mtd@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "linux-spi@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Harini Katakam , Punnaiah Choudary Kalluri , Anirudha Sarangi , "saikrishna12468@gmail.com" Subject: RE: [LINUX PATCH 1/2] mtd: Added dummy entry in the spi_transfer structure. Thread-Topic: [LINUX PATCH 1/2] mtd: Added dummy entry in the spi_transfer structure. Thread-Index: AQHRg2wblaRb2/cF/U+RyRMtRqGMUp9jWE8AgAGMzBD//9LggIACS9XQgAK9j4CACWARgA== Date: Thu, 31 Mar 2016 06:14:24 +0000 Message-ID: <4FF8F58FAA9D5D4193D4E554E4352C5902C6E92A@XAP-PVEXMBX02.xlnx.xilinx.com> References: <1458562809-36114-1-git-send-email-lakshmis@xilinx.com> <20160321130734.GS2566@sirena.org.uk> <4FF8F58FAA9D5D4193D4E554E4352C5902C6D34C@XAP-PVEXMBX02.xlnx.xilinx.com> <20160322100615.GA2566@sirena.org.uk> <4FF8F58FAA9D5D4193D4E554E4352C5902C6DB59@XAP-PVEXMBX02.xlnx.xilinx.com> <20160325150109.GF2566@sirena.org.uk> In-Reply-To: <20160325150109.GF2566@sirena.org.uk> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.23.97.224] Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.0.0.1202-22228.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:149.199.60.83;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(438002)(13464003)(377454003)(43544003)(199003)(189002)(24454002)(93886004)(6806005)(217423001)(5008740100001)(586003)(47776003)(55846006)(5004730100002)(5003600100002)(2906002)(1220700001)(110136002)(33656002)(1096002)(189998001)(87936001)(50986999)(11100500001)(76176999)(102836003)(6116002)(106466001)(2900100001)(81166005)(54356999)(19580395003)(3846002)(19580405001)(106116001)(86362001)(2920100001)(50466002)(63266004)(2950100001)(92566002)(5250100002)(5890100001)(107986001)(217873001);DIR:OUT;SFP:1101;SCL:1;SRVR:BL2NAM02HT062;H:xsj-pvapsmtpgw01;FPR:;SPF:Pass;MLV:sfv;A:1;MX:1;LANG:en; X-MS-Office365-Filtering-Correlation-Id: 4daddcb1-3b42-44fa-e984-08d3592bb819 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(8251501002);SRVR:BL2NAM02HT062; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(5005006)(13023025)(13024025)(13017025)(13018025)(8121501046)(13015025)(3002001)(10201501046);SRVR:BL2NAM02HT062;BCL:0;PCL:0;RULEID:;SRVR:BL2NAM02HT062; X-Forefront-PRVS: 0898A6E028 X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2016 06:14:29.3887 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.60.83];Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2NAM02HT062 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3762 Lines: 74 >-----Original Message----- >From: Mark Brown [mailto:broonie@kernel.org] >Sent: Friday, March 25, 2016 8:31 PM >To: Lakshmi Sai Krishna Potthuri >Cc: Michal Simek ; Soren Brinkmann >; David Woodhouse ; Brian >Norris ; Javier Martinez Canillas >; Boris Brezillon electrons.com>; Stephen Warren ; Geert >Uytterhoeven ; Andrew F. Davis ; >Marek Vasut ; Jagan Teki ; Rafa? >Mi?ecki ; linux-mtd@lists.infradead.org; linux- >kernel@vger.kernel.org; linux-spi@vger.kernel.org; linux-arm- >kernel@lists.infradead.org; Harini Katakam ; Punnaiah >Choudary Kalluri ; Anirudha Sarangi > >Subject: Re: [LINUX PATCH 1/2] mtd: Added dummy entry in the spi_transfer >structure. > >On Fri, Mar 25, 2016 at 01:41:16PM +0000, Lakshmi Sai Krishna Potthuri wrote: > >As I'm fairly sure I've said before please fix your mail client to word >wrap within paragraphs at something substantially less than 80 columns. >Doing this makes your messages much easier to read and reply to. > Sorry, there was some issue with my mail client, now I corrected it. >> >This is really not what I'd expect to happen, I'd expect that these dummy >> >cycles would be in addition to the actual data (see my request for better >> >documentation...). If they overlap with the data then what is the point in >> >specifying this? It's more work for the host, what benefit do we get from >> >doing it over just handing it like a normal byte? > >> len field in the transfer structure contains dummy bytes along with actual >data >> bytes, controllers which requires dummy bytes use len field and simply >Ignore >> the dummy field (contains only no of cycles)added in this patch. Controllers >> (like ZynqMP GQSPI) expects dummy in cycles won't work directly by using >> len field because host driver doesn't know that len field of a particular >transfer >> includes dummy bytes or not (and also number of dummy bytes included in >len >> field). In such cases driver use this dummy field to identify the number of >dummy >> cycles and based on that it will send the required number of dummy cycles >(which >> i did in the second patch). > >This doesn't make any sense at all to me. Why does the controller care >what the bytes being sent to and from the device mean? >From the flash point of view, it expects the controller to send the dummy on 1/2/4 lines based on the command. For Quad commands, flash expects 4 lines to be active during dummy phase. Similarly, 2 lines for dual Commands and 1 line for normal/fast commands. Since len field contains total number of cmd+addr+dummy bytes, host driver should take care of sending these bytes on their respective bus widths. Knowing when the dummy is being sent also helps in the correct switching of IO pads (since the data lines are bidirectional) ZynqMP GQSPI is a generic controller, majorly interfaced to flash devices. It seems reasonable for it to know the above information from the flash layer. Adding "dummy" cycles entry should be useful to any controller that cares about it without affecting other spi/qspi controllers. Regards Sai Krishna This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.