Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756157AbcCaLM1 (ORCPT ); Thu, 31 Mar 2016 07:12:27 -0400 Received: from mail-sn1nam02on0044.outbound.protection.outlook.com ([104.47.36.44]:4608 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751884AbcCaLMY (ORCPT ); Thu, 31 Mar 2016 07:12:24 -0400 X-Greylist: delayed 17871 seconds by postgrey-1.27 at vger.kernel.org; Thu, 31 Mar 2016 07:12:23 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: Geert Uytterhoeven CC: Mark Brown , Michal Simek , "Soren Brinkmann" , David Woodhouse , "Brian Norris" , Javier Martinez Canillas , Boris Brezillon , Stephen Warren , Geert Uytterhoeven , "Andrew F. Davis" , Marek Vasut , Jagan Teki , =?utf-8?B?UmFmYcWCIE1pxYJlY2tp?= , "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//9LggIACS9XQgAK9j4CACWARgP//oB6AgACuA0A= Date: Thu, 31 Mar 2016 11:12:17 +0000 Message-ID: <4FF8F58FAA9D5D4193D4E554E4352C5902C6EA12@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> <4FF8F58FAA9D5D4193D4E554E4352C5902C6E92A@XAP-PVEXMBX02.xlnx.xilinx.com> In-Reply-To: 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="utf-8" MIME-Version: 1.0 X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.0.0.1202-22230.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)(377454003)(43544003)(13464003)(24454002)(189002)(199003)(33656002)(63266004)(19580405001)(81166005)(50986999)(102836003)(1220700001)(217423001)(106466001)(55846006)(1096002)(19580395003)(6806005)(4326007)(76176999)(106116001)(5004730100002)(54356999)(5008740100001)(3846002)(2906002)(11100500001)(189998001)(110136002)(93886004)(5003600100002)(6116002)(50466002)(87936001)(92566002)(23676002)(586003)(5890100001)(5250100002)(2920100001)(2950100001)(86362001)(2900100001)(47776003)(107986001)(217873001);DIR:OUT;SFP:1101;SCL:1;SRVR:SN1NAM02HT158;H:xsj-pvapsmtpgw01;FPR:;SPF:Pass;MLV:sfv;MX:1;A:1;LANG:en; X-MS-Office365-Filtering-Correlation-Id: 391bdc97-0370-439b-3fcc-08d3595554e1 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(8251501002);SRVR:SN1NAM02HT158; X-Microsoft-Antispam-PRVS: <8f67f42564494ade911037834c0d61c5@SN1NAM02HT158.eop-nam02.prod.protection.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(13023025)(8121501046)(13017025)(5005006)(13015025)(13024025)(13018025)(10201501046)(3002001);SRVR:SN1NAM02HT158;BCL:0;PCL:0;RULEID:;SRVR:SN1NAM02HT158; X-Forefront-PRVS: 0898A6E028 X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2016 11:12:21.3637 (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: SN1NAM02HT158 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id u2VBCWlx030140 Content-Length: 4139 Lines: 84 Hi, >-----Original Message----- >From: geert.uytterhoeven@gmail.com >[mailto:geert.uytterhoeven@gmail.com] On Behalf Of Geert Uytterhoeven >Sent: Thursday, March 31, 2016 1:58 PM >To: Lakshmi Sai Krishna Potthuri >Cc: Mark Brown ; Michal Simek ; >Soren Brinkmann ; David Woodhouse >; Brian Norris ; >Javier Martinez Canillas ; Boris Brezillon >; 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 ; saikrishna12468@gmail.com >Subject: Re: [LINUX PATCH 1/2] mtd: Added dummy entry in the spi_transfer >structure. > >On Thu, Mar 31, 2016 at 8:14 AM, Lakshmi Sai Krishna Potthuri > wrote: >>>> >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. > >The m25p80 driver already uses dummy cycles, using real spi_transfer >structs, which have tx_nbits/rx_nbits fields to indicate how many data lines >to use. m25p80 implementation just send command, address and dummy together with tx_nbit field as 1 and host driver can't differentiate between them. Command and address go on one line and dummy should send based on the command as explained my previous mail. 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.