Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2327732imu; Thu, 10 Jan 2019 12:10:55 -0800 (PST) X-Google-Smtp-Source: ALg8bN5ZVnaqiUrFBzKcG7/6AeARasU02jIZkbcVXrHcDv6lXdE6BdgDsqZKjCHJJGJ4NZzdKcM4 X-Received: by 2002:a63:4c5:: with SMTP id 188mr10778966pge.391.1547151055383; Thu, 10 Jan 2019 12:10:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547151055; cv=none; d=google.com; s=arc-20160816; b=MZPVJ9L9ZSMTElPIxcSf9p3bnEs4hDlTR2JuFmIemAeCgjEvLeKvk7GEM9BcF7MaRc K/Hd7tJbR7/m575CbgnYYStU9eMpsK8t+jzJisFC9tVnTrqeZn/N4uX3M2qgl/Dksc7K tEh5Twd8feGSrdwFTI2J3SSm1gfm1dk7sEEOpbSEsZ4k7jz3xo9vZzoSd+Q5zPz3rPIM dt3nJy4h1vWHJCcw0YjbKYzePTia8E7JthXJF0n4z1pEdEQQbMLOY76IEfiyrQ9XPFZk iXrKpC+of0egox/Kb1G2QzqOeMITFJ6EmRCblif9B0BskJaHz+ZrWYthhHZKsINf9gHm jeQg== 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-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from; bh=sQwcQQHVJd43YSd7VheEcHtcIJvhVPnho8K9J7lDw/E=; b=jjqtYMUQVNWHjsY2jVTPfeuQqkW72uqG7ItaFHDeY1oDk2bwUrA3LXqUZAxz6iHbmt erJzY20DJV1CDEPU0eO1+x4AbMaVXHaZqJHFjEcSDJBzHT9LsrPu57lwDFmL8x1B35jq abotHSdUhrR34HFaG2Dnz8Yl6am1gKStSwNzRjE1NN/frEhnKMWfNNkjooP3sABzlVx6 6tNmSpMEYkEC+pFnE/ogeE0qNGP/KrQZ7Gi8sI1DRyqQemqsfAlxDAimYmrqEvAVPqLb BD7MDr2TXW544yi5IeRmdRNX9rm0umHk/s/h+IgTL9Zk+aDKCRtZu5AGv5/1co0ak8ev xfnw== ARC-Authentication-Results: i=1; mx.google.com; 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 w5si73323755pfl.279.2019.01.10.12.10.39; Thu, 10 Jan 2019 12:10:55 -0800 (PST) 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; 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 S1730265AbfAJR3E (ORCPT + 99 others); Thu, 10 Jan 2019 12:29:04 -0500 Received: from skedge03.snt-world.com ([91.208.41.68]:52924 "EHLO skedge03.snt-world.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730248AbfAJR3D (ORCPT ); Thu, 10 Jan 2019 12:29:03 -0500 Received: from sntmail10s.snt-is.com (unknown [10.203.32.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by skedge03.snt-world.com (Postfix) with ESMTPS id 64DB267A887; Thu, 10 Jan 2019 18:28:58 +0100 (CET) Received: from sntmail12r.snt-is.com (10.203.32.182) by sntmail10s.snt-is.com (10.203.32.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1466.3; Thu, 10 Jan 2019 18:28:58 +0100 Received: from sntmail12r.snt-is.com ([fe80::e551:8750:7bba:3305]) by sntmail12r.snt-is.com ([fe80::e551:8750:7bba:3305%5]) with mapi id 15.01.1466.003; Thu, 10 Jan 2019 18:28:58 +0100 From: Schrempf Frieder To: Yogesh Narayan Gaur , "linux-mtd@lists.infradead.org" , "boris.brezillon@bootlin.com" , "marek.vasut@gmail.com" , "broonie@kernel.org" , "linux-spi@vger.kernel.org" , "devicetree@vger.kernel.org" CC: "robh@kernel.org" , "mark.rutland@arm.com" , "shawnguo@kernel.org" , "linux-arm-kernel@lists.infradead.org" , "computersforpeace@gmail.com" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v6 1/5] spi: spi-mem: Add driver for NXP FlexSPI controller Thread-Topic: [PATCH v6 1/5] spi: spi-mem: Add driver for NXP FlexSPI controller Thread-Index: AQHUpzP8UrlUpBv3BkeiEjKwk1C7CKWotMOA Date: Thu, 10 Jan 2019 17:28:57 +0000 Message-ID: References: <1546939346-20181-1-git-send-email-yogeshnarayan.gaur@nxp.com> <1546939346-20181-2-git-send-email-yogeshnarayan.gaur@nxp.com> In-Reply-To: <1546939346-20181-2-git-send-email-yogeshnarayan.gaur@nxp.com> Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.25.9.42] x-c2processedorg: 51b406b7-48a2-4d03-b652-521f56ac89f3 Content-Type: text/plain; charset="utf-8" Content-ID: Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-SnT-MailScanner-Information: Please contact the ISP for more information X-SnT-MailScanner-ID: 64DB267A887.A076C X-SnT-MailScanner: Found to be clean X-SnT-MailScanner-SpamCheck: X-SnT-MailScanner-From: frieder.schrempf@kontron.de X-SnT-MailScanner-To: boris.brezillon@bootlin.com, broonie@kernel.org, computersforpeace@gmail.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, linux-spi@vger.kernel.org, marek.vasut@gmail.com, mark.rutland@arm.com, robh@kernel.org, shawnguo@kernel.org, yogeshnarayan.gaur@nxp.com X-Spam-Status: No Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SGkgWW9nZXNoLA0KDQpteSBjb21tZW50cyBiZWxvdyBhcmUgbWFpbmx5IGFib3V0IHRoaW5ncyBJ IGFscmVhZHkgbWVudGlvbmVkIGluIG15IA0KcmV2aWV3IGZvciB2NSBhbmQgYWJvdXQgcmVtb3Zp bmcgb3Igc2ltcGxpZnlpbmcgc29tZSB1bm5lY2Vzc2FyeSBvciANCmNvbXBsZXggY29kZS4NCg0K QWxzbyBhcyBJIGdhdGhlcmVkIGZyb20geW91ciBjb252ZXJzYXRpb24gd2l0aCBCb3JpcywgdGhl cmUncyBzdGlsbCBhIA0KY2hlY2sgZm9yIHRoZSBsZW5ndGggb2YgdGhlIHJlcXVlc3RlZCBtZW1v cnkgbWlzc2luZy4NCg0KT24gMDguMDEuMTkgMTA6MjQsIFlvZ2VzaCBOYXJheWFuIEdhdXIgd3Jv dGU6DQpbLi4uXQ0KPiArDQo+ICtzdGF0aWMgYm9vbCBueHBfZnNwaV9zdXBwb3J0c19vcChzdHJ1 Y3Qgc3BpX21lbSAqbWVtLA0KPiArCQkJCSBjb25zdCBzdHJ1Y3Qgc3BpX21lbV9vcCAqb3ApDQo+ ICt7DQo+ICsJc3RydWN0IG54cF9mc3BpICpmID0gc3BpX2NvbnRyb2xsZXJfZ2V0X2RldmRhdGEo bWVtLT5zcGktPm1hc3Rlcik7DQo+ICsJaW50IHJldDsNCj4gKw0KPiArCXJldCA9IG54cF9mc3Bp X2NoZWNrX2J1c3dpZHRoKGYsIG9wLT5jbWQuYnVzd2lkdGgpOw0KPiArDQo+ICsJaWYgKG9wLT5h ZGRyLm5ieXRlcykNCj4gKwkJcmV0IHw9IG54cF9mc3BpX2NoZWNrX2J1c3dpZHRoKGYsIG9wLT5h ZGRyLmJ1c3dpZHRoKTsNCj4gKw0KPiArCWlmIChvcC0+ZHVtbXkubmJ5dGVzKQ0KPiArCQlyZX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