Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp546276img; Thu, 21 Mar 2019 04:01:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqxAxbMA2/d/3naBqYPnhZybnMTRMsBZvwbh6UlST1ICwCLqNfd5XRNTN8iYqxi3PMJFG645 X-Received: by 2002:a63:4a4d:: with SMTP id j13mr2732203pgl.16.1553166117397; Thu, 21 Mar 2019 04:01:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553166117; cv=none; d=google.com; s=arc-20160816; b=xcTdMpvv0OvJp/5G8wzGmLG2iRKMaIhWStJrC1FvzrjNMcj9pKCtf3noLK/M2kRJGL JM9sXns8tWI3kBP9Zdil5NSg1cjDqTxIKdjlcPjxCL2PIf9QxQKFn199Ymo1mngXg6g8 jgQ4rInZhHnvdkZctWkxrR2rpzrwcQQrUPxnIuFLfRgEo1LPgNt88IF6qLV+IDWv4GAh Qalgu0XfHXPVwKHSaOtn82ix5BDb7dFibHQ/UI12+bq4Hht+4+ga1s/JwcAiJbYASV2B yKZoi6Osgrx1qiCYJUau66AdXEF0fX4c3iwbjAS+9wJq/S4NQ+j+wzoJWdEB3391uk// 5Yaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=nDQOrqmIVeRy8ffaF3u5fiRn6lFwAKlfhAKisLN/V6E=; b=cleokcMCK0BojBahKuQ7/PIigynhBo1zxlmYuINsq2ppOSpstTNgW9t6s+2LAI27qF gIyWCoy1tIOJ/aMcodOoqpOayScYmZf3aF+4Xlwfv9hYpH7Cf2Pwrtf049kmsDPTcJyC p6XldHWVKe82WDRwaoPxJt1Kpc+EQ6zN1qsNMQ8UKgeTeOohDx/KxzXffmMcLOX5tdIh Z49aGwLNJzcOKjumdIs4ZDKv7mA4XomEFA06jdqO4ILojADNoIM/9YJXdoMamqJ7hkd4 hsrfNA7Ur8U2zFkVtZwzwYXxsHWbry5Ew6SXJq6BXDyGjczzAToW92Ba2mV/sz/tsGQo +jiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xilinx.onmicrosoft.com header.s=selector1-xilinx-com header.b=arH6BGvv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r11si3888947pga.249.2019.03.21.04.01.38; Thu, 21 Mar 2019 04:01:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@xilinx.onmicrosoft.com header.s=selector1-xilinx-com header.b=arH6BGvv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727894AbfCULAz (ORCPT + 99 others); Thu, 21 Mar 2019 07:00:55 -0400 Received: from mail-eopbgr710080.outbound.protection.outlook.com ([40.107.71.80]:50400 "EHLO NAM05-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726551AbfCULAy (ORCPT ); Thu, 21 Mar 2019 07:00:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nDQOrqmIVeRy8ffaF3u5fiRn6lFwAKlfhAKisLN/V6E=; b=arH6BGvvOOSE1oB00p1sRr3L0oMSAfN0ZcCdP+MwxuCQILAMZ/KWb/AqvJd0AwPBC1RYtb6y6xz6DeoPw4YUiSkok+PpKJwL2sOOJtG825sTCdwpzUGfULvnFflelldNFR2e6iDP7zFlRVAc90+jSvTSqCiNViiG9UGqhTwmFxQ= Received: from MWHPR02MB2623.namprd02.prod.outlook.com (10.168.206.9) by MWHPR02MB2415.namprd02.prod.outlook.com (10.168.244.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1709.15; Thu, 21 Mar 2019 11:00:46 +0000 Received: from MWHPR02MB2623.namprd02.prod.outlook.com ([fe80::c89d:e485:cb5e:89cf]) by MWHPR02MB2623.namprd02.prod.outlook.com ([fe80::c89d:e485:cb5e:89cf%5]) with mapi id 15.20.1709.017; Thu, 21 Mar 2019 11:00:46 +0000 From: Naga Sureshkumar Relli To: Vignesh Raghavendra , "broonie@kernel.org" , "bbrezillon@kernel.org" CC: "linux-spi@vger.kernel.org" , "dwmw2@infradead.org" , "marek.vasut@gmail.com" , "richard@nod.at" , "linux-mtd@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Michal Simek , "nagasuresh12@gmail.com" Subject: RE: [RFC PATCH 2/2] spi: spi-mem: Add support for Zynq QSPI controller Thread-Topic: [RFC PATCH 2/2] spi: spi-mem: Add support for Zynq QSPI controller Thread-Index: AQHUzzOoSBENcbUE5E66VjcEuxsjhqYU4aSAgAEjihA= Date: Thu, 21 Mar 2019 11:00:45 +0000 Message-ID: References: <1551337361-11665-1-git-send-email-naga.sureshkumar.relli@xilinx.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=nagasure@xilinx.com; x-originating-ip: [149.199.50.133] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ea2b8cc5-8730-4de7-0ee7-08d6adec783b x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020);SRVR:MWHPR02MB2415; x-ms-traffictypediagnostic: MWHPR02MB2415: x-microsoft-antispam-prvs: x-forefront-prvs: 0983EAD6B2 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(396003)(366004)(136003)(346002)(39860400002)(376002)(13464003)(51914003)(189003)(199004)(52536014)(8676002)(71200400001)(3846002)(2201001)(6116002)(105586002)(476003)(97736004)(53546011)(30864003)(486006)(53936002)(2906002)(55016002)(68736007)(71190400001)(11346002)(14454004)(86362001)(8936002)(5660300002)(6436002)(316002)(9686003)(54906003)(99286004)(6246003)(66066001)(305945005)(81166006)(478600001)(186003)(26005)(110136005)(7736002)(74316002)(229853002)(102836004)(76176011)(256004)(14444005)(81156014)(6506007)(2501003)(7696005)(446003)(7416002)(25786009)(4326008)(106356001)(33656002);DIR:OUT;SFP:1101;SCL:1;SRVR:MWHPR02MB2415;H:MWHPR02MB2623.namprd02.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: xilinx.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 4cz4h1Zza5YP2fuByouCd0YEFBNFzRKBN+OIzAPlINQNkjyxwy/LkjYFCauby7BqyJgp63G8di3InG6TSU9BRCW66p8AdcOf4HP2so9VfdJ2tgii5ZJgwCqbnkjmqM9IYY1UnYaeKArocZbeIMZpm6cVa9avVaw6lIQjQQo21SEO/yNBWOtykcVRyzieGShR8fPGyD5+NH88HozgpZrhb1W0tPo4ChqaZbbGofGFfCOxcNNzCbi6IAC5ozyrot7N4hJmy48+b9ZLamxEYLwSR4wk1JVfMBZnfnkYuHuhI//g2gPGht/X5+nOhggpV4OnXn7NW2FxwX/DFnS+LCZQbRwPSPFUwi2gmflzkb30YDyfWKPmNf+8697c4W9oEnV6R+DBmh5y+FxVU4xftNzte9AOxEh6BSI9RWzkSZzWXek= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-Network-Message-Id: ea2b8cc5-8730-4de7-0ee7-08d6adec783b X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Mar 2019 11:00:45.8645 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR02MB2415 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SGkgVmlnbmVzaCwNCg0KVGhhbmtzIGZvciB0aGUgcmV2aWV3Lg0KDQo+IC0tLS0tT3JpZ2luYWwg TWVzc2FnZS0tLS0tDQo+IEZyb206IGxpbnV4LXNwaS1vd25lckB2Z2VyLmtlcm5lbC5vcmcgPGxp bnV4LXNwaS1vd25lckB2Z2VyLmtlcm5lbC5vcmc+IE9uIEJlaGFsZiBPZg0KPiBWaWduZXNoIFJh Z2hhdmVuZHJhDQo+IFNlbnQ6IFdlZG5lc2RheSwgTWFyY2ggMjAsIDIwMTkgMTA6NDIgUE0NCj4g VG86IE5hZ2EgU3VyZXNoa3VtYXIgUmVsbGkgPG5hZ2FzdXJlQHhpbGlueC5jb20+OyBicm9vbmll QGtlcm5lbC5vcmc7DQo+IGJicmV6aWxsb25Aa2VybmVsLm9yZw0KPiBDYzogbGludXgtc3BpQHZn ZXIua2VybmVsLm9yZzsgZHdtdzJAaW5mcmFkZWFkLm9yZzsgbWFyZWsudmFzdXRAZ21haWwuY29t Ow0KPiByaWNoYXJkQG5vZC5hdDsgbGludXgtbXRkQGxpc3RzLmluZnJhZGVhZC5vcmc7IGxpbnV4 LWtlcm5lbEB2Z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