From patchwork Mon Mar 21 12:20:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sai Krishna Potthuri X-Patchwork-Id: 8632101 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DA9489F6E1 for ; Mon, 21 Mar 2016 12:23:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0B7102017E for ; Mon, 21 Mar 2016 12:23:56 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 27BA020125 for ; Mon, 21 Mar 2016 12:23:55 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ahyph-0002oW-U2; Mon, 21 Mar 2016 12:21:17 +0000 Received: from mail-bl2nam02on0066.outbound.protection.outlook.com ([104.47.38.66] helo=NAM02-BL2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ahypa-0002gk-T2; Mon, 21 Mar 2016 12:21:11 +0000 Received: from BL2NAM02FT017.eop-nam02.prod.protection.outlook.com (10.152.76.59) by BL2NAM02HT105.eop-nam02.prod.protection.outlook.com (10.152.76.156) with Microsoft SMTP Server (TLS) id 15.1.443.6; Mon, 21 Mar 2016 12:20:48 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.100) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.100 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.100; helo=xsj-pvapsmtpgw02; Received: from xsj-pvapsmtpgw02 (149.199.60.100) by BL2NAM02FT017.mail.protection.outlook.com (10.152.77.174) with Microsoft SMTP Server (TLS) id 15.1.443.6 via Frontend Transport; Mon, 21 Mar 2016 12:20:48 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:55399 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1ahypD-00019K-QJ; Mon, 21 Mar 2016 05:20:47 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1ahypD-0008Pj-Lz; Mon, 21 Mar 2016 05:20:47 -0700 Received: from xsj-pvapsmtp01 (xsj-pvapsmtp01.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id u2LCKhnK003044; Mon, 21 Mar 2016 05:20:43 -0700 Received: from [172.23.146.172] (helo=xhdl3764.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1ahyp8-0008P4-Va; Mon, 21 Mar 2016 05:20:43 -0700 Received: by xhdl3764.xilinx.com (Postfix, from userid 14964) id 252D51A2046B; Mon, 21 Mar 2016 17:50:42 +0530 (IST) From: P L Sai Krishna To: Michal Simek , Soren Brinkmann , David Woodhouse , "Brian Norris" , Mark Brown , "Javier Martinez Canillas" , Boris Brezillon , Stephen Warren , Geert Uytterhoeven , "Andrew F. Davis" , Marek Vasut , Jagan Teki , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Subject: [LINUX PATCH 1/2] mtd: Added dummy entry in the spi_transfer structure. Date: Mon, 21 Mar 2016 17:50:08 +0530 Message-ID: <1458562809-36114-1-git-send-email-lakshmis@xilinx.com> X-Mailer: git-send-email 2.1.2 X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.0.0.1202-22206.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:149.199.60.100; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(438002)(199003)(189002)(107886002)(46386002)(189998001)(45336002)(50986999)(2906002)(50226001)(5001770100001)(36756003)(81166005)(5008740100001)(50466002)(90966002)(586003)(4001430100002)(1096002)(36386004)(1220700001)(92566002)(87936001)(86362001)(5003940100001)(47776003)(229853001)(217423001)(33646002)(11100500001)(52956003)(19580395003)(106466001)(63266004)(48376002)(42186005)(103686003)(19580405001)(6806005)(107986001)(921003)(1121003)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:BL2NAM02HT105; H:xsj-pvapsmtpgw02; FPR:; SPF:Pass; MLV:sfv; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: a622cb0e-adb6-4e93-d5ab-08d351833c6f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501002); SRVR:BL2NAM02HT105; X-Microsoft-Antispam-PRVS: <72ad967bac084abf91018b8d6292e165@BL2NAM02HT105.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)(5005006)(13015025)(13024025)(13017025)(8121501046)(13018025)(13023025)(3002001)(10201501046); SRVR:BL2NAM02HT105; BCL:0; PCL:0; RULEID:; SRVR:BL2NAM02HT105; X-Forefront-PRVS: 0888B1D284 X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Mar 2016 12:20:48.4024 (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.100]; Helo=[xsj-pvapsmtpgw02] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2NAM02HT105 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160321_052111_041210_46D51CFE X-CRM114-Status: GOOD ( 11.05 ) X-Spam-Score: -1.9 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Harini Katakam , linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, linux-mtd@lists.infradead.org, P L Sai Krishna , Anirudha Sarangi , Punnaiah Choudary Kalluri , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch does following things. 1. Added dummy entry in the spi_transfer structure. 2. Assigned dummy cycles to dummy member in the transfer structure during read operation. Signed-off-by: P L Sai Krishna --- drivers/mtd/devices/m25p80.c | 1 + include/linux/spi/spi.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index c9c3b7f..7c9fac9 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c @@ -139,6 +139,7 @@ static int m25p80_read(struct spi_nor *nor, loff_t from, size_t len, t[0].tx_buf = flash->command; t[0].len = m25p_cmdsz(nor) + dummy; + t[0].dummy = nor->read_dummy; spi_message_add_tail(&t[0], &m); t[1].rx_buf = buf; diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 857a9a1..3f93526 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h @@ -664,6 +664,7 @@ extern void spi_res_release(struct spi_master *master, * @len: size of rx and tx buffers (in bytes) * @speed_hz: Select a speed other than the device default for this * transfer. If 0 the default (from @spi_device) is used. + * @dummy: number of dummy cycles. * @bits_per_word: select a bits_per_word other than the device default * for this transfer. If 0 the default (from @spi_device) is used. * @cs_change: affects chipselect after this transfer completes @@ -752,6 +753,7 @@ struct spi_transfer { u8 bits_per_word; u16 delay_usecs; u32 speed_hz; + u32 dummy; struct list_head transfer_list; };