From patchwork Wed Aug 26 06:26:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ranjit Waghmode X-Patchwork-Id: 7074611 Return-Path: X-Original-To: patchwork-linux-spi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C0B62C05AC for ; Wed, 26 Aug 2015 06:27:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D358C208DD for ; Wed, 26 Aug 2015 06:27:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D8036208DA for ; Wed, 26 Aug 2015 06:27:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755742AbbHZG1I (ORCPT ); Wed, 26 Aug 2015 02:27:08 -0400 Received: from mail-bn1bon0068.outbound.protection.outlook.com ([157.56.111.68]:32715 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755860AbbHZG1G (ORCPT ); Wed, 26 Aug 2015 02:27:06 -0400 Received: from BN1BFFO11HUB031.protection.gbl (10.58.144.178) by BN1BFFO11HUB015.protection.gbl (10.58.144.162) with Microsoft SMTP Server (TLS) id 15.1.249.14; Wed, 26 Aug 2015 06:27:04 +0000 Received: from BN1BFFO11FD043.protection.gbl (10.58.144.33) by BN1BFFO11HUB031.protection.gbl (10.58.144.178) with Microsoft SMTP Server (TLS) id 15.1.249.14; Wed, 26 Aug 2015 06:27:03 +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; 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 BN1BFFO11FD043.mail.protection.outlook.com (10.58.144.106) with Microsoft SMTP Server (TLS) id 15.1.249.14 via Frontend Transport; Wed, 26 Aug 2015 06:27:02 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:51409 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1ZUUAn-0005fB-Mu; Tue, 25 Aug 2015 23:27:01 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1ZUUAn-0000L0-HL; Tue, 25 Aug 2015 23:27:01 -0700 Received: from xsj-pvapsmtp01 (mailhost.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id t7Q6QNA0005658; Tue, 25 Aug 2015 23:26:23 -0700 Received: from [172.23.64.207] (helo=xhd-lin64re117.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1ZUUAf-0000KC-BA; Tue, 25 Aug 2015 23:26:53 -0700 Received: by xhd-lin64re117.xilinx.com (Postfix, from userid 32810) id 7FBC3208FB; Wed, 26 Aug 2015 11:56:52 +0530 (IST) From: Ranjit Waghmode To: , , , , , , , , , , , CC: , , , , , , Ranjit Waghmode Subject: [LINUX RFC v2 2/4] mtd: add spi_device instance to spi_nor struct Date: Wed, 26 Aug 2015 11:56:05 +0530 Message-ID: <1440570367-22569-3-git-send-email-ranjit.waghmode@xilinx.com> X-Mailer: git-send-email 2.1.2 In-Reply-To: <1440570367-22569-1-git-send-email-ranjit.waghmode@xilinx.com> References: <1440570367-22569-1-git-send-email-ranjit.waghmode@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.0.0.1202-21768.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD043; 1:kroU36VfD6GtOa3+3AqWzbMIf6OE9Y7NEExHU9tfTscxE04gWXB9KMCCEm/qxTjke6KwH9j3xUt6bW+EbwPNYHjPxPkn0/McHyKIDzZ3qqiSQt2ZlOauwi82UszeK7wg8+hQtrGYeSoccXZ5EK/OxMef7eyLnnnSMO+QDshgJd/tG/1ODsxNvZBU5bfpFLGgEL03aqdxPC0adRur87AYvIu2D8xRNNCedfqbPWE1aediSmFKNKmyNUXpY9u61WGGTk0zcoj/WnRVqj1Aig/aiS04cwr6FaqABp3UNLfZr0Ju5+vuNZ3vmlM0RqzlXsE3PMeyXi3BKLo3HA1QfAbpQm1OiOI2mbQdXFTaeomUiNO3oYYVFS/VFlHIHV9eS1v7om6XhYWPI4CCLfP9kWMvAA== X-Forefront-Antispam-Report: CIP:149.199.60.100; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(438002)(3050300001)(199003)(189002)(50466002)(42186005)(63266004)(52956003)(19580405001)(48376002)(62966003)(19580395003)(36756003)(77156002)(6806004)(5007970100001)(2201001)(46102003)(87936001)(229853001)(50226001)(50986999)(103686003)(189998001)(5001920100001)(81156007)(5003940100001)(5001770100001)(76176999)(33646002)(5001860100001)(107886002)(5001830100001)(5001960100002)(4001540100001)(86362001)(47776003)(2950100001)(36386004)(64706001)(575784001)(106466001)(46386002)(92566002)(45336002)(7059030)(921003)(107986001)(90966001)(217873001)(1121003)(5001870100001)(4001430100001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1BFFO11HUB031; H:xsj-pvapsmtpgw02; FPR:; SPF:Pass; PTR:xapps1.xilinx.com,unknown-60-100.xilinx.com; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11HUB031; 2:Jo/cjWixbAox6PmHSixrT7Ga+NDegPht/3ziBRCL4eSta8t/O4miD4C6uXMu9gn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sGEmqLZ/IA1DGTEpjAOEZCWOk+aNNkWOWAHibnWQCvpvaMAGyGHhm4mRrJg+vOJBMRgcE9dISE7eQQ1Ijx2rcZKOouVJLxISLQ9ZR37bbULEIJ/QnDZ7OTnFvaegvDveyjz9KGvyKxqAxA0ssit6mHSZYSvXeW4+Ac/EiHHAXbBeIwudNgSItmN0pAfhA0Gj6v9oOfM06zpWyDcCsLCib6W0fS+yMidRpou2JukVcOOuDTb; 4:9MyzPHDzK1O7BCppRdGGEwCELxKUK3ps87LhnrIiBbw5V68q0YE9lYJ+SqNWZk9Vcy4lslASc0ZOCAavX3yBt+Bol9IQzdkOCvVEgyhBys/FKn3pFpoIk4Po7jq3lsKvdH8lgRSUSULOwkG9Vybj/g5CATJKVoeg/hBA6IsBDK0b52+bCXR5g9+Lan4G6Id+oSNgHI0DWZ71dQl0ouv3FPRoDmUOi7XMCHN18FUhUPu3gNSw7OzKbr+P7cQFt28ts1OFMn3BZVvGvFpfggGEijhHOj/nzDWdwO59YEUdkrkfyHEfNc8tNocHX13HuyfR X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(8121501046)(3002001); SRVR:BN1BFFO11HUB031; BCL:0; PCL:0; RULEID:; SRVR:BN1BFFO11HUB031; X-Forefront-PRVS: 0680FADD48 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN1BFFO11HUB031; 23:h2B2zcAmxJI6lbedVtRNNZRyXVxsWyLMTYULx2w?= =?us-ascii?Q?4ZUZ31f/A1daO8lsS5ihAlsN2NePi2TRqdIoGZGG0nr0FvuVO/62LEPxBnTm?= =?us-ascii?Q?J9S5F1hhZqfK3qYr3kOltHZ28lLTuxAIeR5m2Pt+1dLKRxQKQQrVxhMkMBsh?= =?us-ascii?Q?QcfDt8Fgp2gjaLpgOJ3b3XXELw0JgqTbxUvVhnxhPSQdVTDQQXfl9fEqzVOi?= =?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U1+zXmgTYFhdYzLiKu9Y8ORponLIsx?= =?us-ascii?Q?ZkGG6kAZaavJsaX5exUQbA3rVOj6xC56L3ZFedZMxJVipqwugdBi4KVjh8Kw?= =?us-ascii?Q?ll2EYBE635rn2N71hs2I2GA2AggpntJ2630MoPhLH2GQ5l1vjOXIVUSRTR59?= =?us-ascii?Q?3MCqDJtvge16FFf9+DLgBF/KKs2UcYqTIntmP02kaZP2bDBAGFBdVpEvBLcb?= =?us-ascii?Q?6kyP4Niy6+Lp5IMZnDLZOmtA+yVsTbr7MZN9tBJqRU9kHiYjIQWhWHHsV5fc?= =?us-ascii?Q?2Nlqbg5yS7+wnMIa0yImkG10OqP9ESzUNQHpj06l0Bjb02tixdPt4Q4rco9t?= =?us-ascii?Q?Bj5SyAWp/ZW7yrv2Iv+rHo5cP1NMDaVvv8PtcvKTlwX0cMjx6lWSe?= X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11HUB031; 5:SXDjtRFq+5lzOsfz39q9H+TGEXdoy+E/sJJimwDJqbkAdGY/7xlCkkjGnICHoVpxe4oHB0v3a2eUcVwlHEjQFEJlbsCQDSIZ96h/zA22TLi8z9k1EYeWXwmg8qkKD/ITK8hUXXkg3QdHXBR+xPZW4w==; 24:3dkLjT74h6+3OXXpYPEB3m+MmRISuih0SDTFO3rcsR+hs8C7rdhBbAR2xe6JDeEB5yTQVISFl46VzRYWFJcZIZyHhEpeI3OmbF0its9ADWQ= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Aug 2015 06:27:02.5565 (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: BN1BFFO11HUB031 X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11HUB015; 2:Av6qy6OGU2fcNNF/Pm0Rxj+WZ9sGAL3tlNtbYMrC26ZIkwqGNrIZbPxtbFyCLb4YjUruPfbdxjnILp3TPNfbS3zzoPyot2Kh/xMzglcxYlmLe4+a7kmg7HgJR9rAthL3b41+HJbl4oixi9UTL5gZ1q4+qclrNKWdYm9SHSGo3Uk=; 3:9ynif1fTWyYIRmdU9+rtE30Ur8TpyXUL8cQljc5+mlNuTnACDqG9RvmEeN8ZuuRYIhjvnAVuCVqc9bENZ8rzvNq3TwgBq0MBrSnueevuT7vlHUowdM5Fu1RJ886pB+ADLY41x+PDPNtfH9oKrhUzjDg3iAZcuCnGIjqs5Vn9nsgEY0a6Ocg5uG+TWQTIB2C0LQi4wIe/2+QTVNHAeMjRk67pmJxv8Swi28LakvcxLyhqrO65pzy6DQdYjoDmAT0y; 25:dpwsO8bCNJndrWyFq7EqFVg4nXc9Wk9CS3+VhNh/OVDRmHKX3ndVOnF0rRqN9dYPLEGX4Lkfx8e11cmORwXFqEukCWPhKD7U9iQKCaCjJvvv6hgDs9qayg/RqilKQ5nRSV5uin/p+RUMQAoqFn9N0tu112sVyB4D4TtryDGMkj1eontK/0D9QayFTXRjL+FYB9rK3EfjhPnmc2HB4cshK5d/RD/DIdZwZKsmsFASvcNkpqTjEu10Hg6DhZYNoyJvuFPqunnClQWVTOnferRijg==; 23:0FMP8N1M2evF5Nq4OwO5t2yl3hhpK6MvgJmUuEwOBs1lTP8Xu6YcgdP/D1FfHCS2hZJFPb6jzSnbIwQD0URmTtZust7KaaLYTsnhFI6UqxN1ajkgac8nY0kvKUl9MzbzZUuySev0XOmvVxQYQnapj2o4AbsVFVPuUETl4WFSTbCNRIAQJE3hn0gBlsRqPviu X-OriginatorOrg: xilinx.com Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 adds struct spi_device instacne to the spi_nor structure Signed-off-by: Ranjit Waghmode --- V2 Changes: This is new patch, basically splitted on request of Mark Brown --- drivers/mtd/devices/m25p80.c | 1 + include/linux/mtd/spi-nor.h | 1 + 2 files changed, 2 insertions(+) -- 2.1.2 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index d313f948b..174ed0f 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c @@ -207,6 +207,7 @@ static int m25p_probe(struct spi_device *spi) spi_set_drvdata(spi, flash); flash->mtd.priv = nor; flash->spi = spi; + nor->spi = spi; if (spi->mode & SPI_RX_QUAD) mode = SPI_NOR_QUAD; diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h index e540952..1705dc3 100644 --- a/include/linux/mtd/spi-nor.h +++ b/include/linux/mtd/spi-nor.h @@ -163,6 +163,7 @@ struct spi_nor { struct mtd_info *mtd; struct mutex lock; struct device *dev; + struct spi_device *spi; u32 page_size; u8 addr_width; u8 erase_opcode;