Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1148110imu; Thu, 22 Nov 2018 10:59:07 -0800 (PST) X-Google-Smtp-Source: AJdET5e3DOIpQjfpC/iJE//Y0GZ03mHH2GozzXzRGGL9s/ZDCNVVDlI4ev/y1S5pVTHKz64cN4I4 X-Received: by 2002:a62:6181:: with SMTP id v123-v6mr12840022pfb.117.1542913147128; Thu, 22 Nov 2018 10:59:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542913147; cv=none; d=google.com; s=arc-20160816; b=BSS+8JvUtHm/0D2Ti0w/ZsJlDGzgumCpzRx19jAsqFLSArhXlxH6Oy22DGfo1//++p 7Cp+iV0wnDMvfkQXkpbozYAOpumVKi/QOKBpZOrBDmJHxsT6/r/+AYlFe/ri18G/K+Ei CpfsxlUy8n+v9OM143mjaDpfEwIxJKNjbfTtNOWeTniN9UvK2llt67B7tQ+nWP+7K/2p hYjQFyyahPL4ny9UcMkJSP4/mnCRnfiC9ojNFH2ernbcMr33ZbM64piGMoKPenG2TsJq Q/ocmw7seHJ/7Z6JZOkGP7/jD+2P/I3jWpmLLR/40xEnkan5RwJD9qzmW1sQRqfpnDIt affQ== 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 :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature; bh=iha3/v8Unuz6gsDMk51ecqOZOKXxD/Kl3uHaX/5n508=; b=0OpQQ6WarFc/ig/OlhwUc3ERg0VijDXu1tqOnh9BsT+t2xNxbY7FFfwyWO4rnvvkzM hubQRA281ytfQ6UeQ1NknL1vLEQV8p/TdkdD2DvWpltgWY5oszlc7fwL1K+srAM/rXau HA6Gox+Y7xARAtL01EGmC74TeFym55YKr/Qb3akiZdNKyVVwjZLQTCCwT7SCMO9rHrsn 1xqGWpivCcfoXRAa5K3bWpTzfJTd9G/gZzvKfngofqIQsEK9YauxL6V4gD1nbWZCYQtO g+e08q3D6Dpvek37Av29rUiSvwrZA66pT28cGi8+x8zkzyTKsj/MQznlvg7zhwxFSFBS RyWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=QJJ7DyCw; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u4si49028656pga.91.2018.11.22.10.58.52; Thu, 22 Nov 2018 10:59:07 -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; dkim=pass header.i=@nxp.com header.s=selector1 header.b=QJJ7DyCw; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392209AbeKVPwl (ORCPT + 99 others); Thu, 22 Nov 2018 10:52:41 -0500 Received: from mail-eopbgr20043.outbound.protection.outlook.com ([40.107.2.43]:1281 "EHLO EUR02-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728351AbeKVPwl (ORCPT ); Thu, 22 Nov 2018 10:52:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iha3/v8Unuz6gsDMk51ecqOZOKXxD/Kl3uHaX/5n508=; b=QJJ7DyCwVw2bU6A+ICxsuXDsVX4be6wZ3AX5nSjSnXDBka87iY8E59lOlBsSTQLAyCKVAfGnFStp4ylXIv1WG5G/akgp0+Vd4ggmIyYEHvOuo6xqmY7dAGs9XRgubUYtgp/ClRuboF+/UkFM9vOOBhDWWebx/IGyIH1b10oeYH8= Received: from VI1PR04MB5726.eurprd04.prod.outlook.com (20.178.127.24) by VI1PR04MB3055.eurprd04.prod.outlook.com (10.170.228.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1361.15; Thu, 22 Nov 2018 05:14:54 +0000 Received: from VI1PR04MB5726.eurprd04.prod.outlook.com ([fe80::595a:9890:8397:5d51]) by VI1PR04MB5726.eurprd04.prod.outlook.com ([fe80::595a:9890:8397:5d51%3]) with mapi id 15.20.1361.016; Thu, 22 Nov 2018 05:14:54 +0000 From: Yogesh Narayan Gaur To: "linux-mtd@lists.infradead.org" , "boris.brezillon@bootlin.com" , "broonie@kernel.org" , "marek.vasut@gmail.com" , "vigneshr@ti.com" , "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" , "frieder.schrempf@exceet.de" , "linux-kernel@vger.kernel.org" , Yogesh Narayan Gaur Subject: [PATCH v4 5/7] mtd: m25p80: add support of octo mode I/O transfer Thread-Topic: [PATCH v4 5/7] mtd: m25p80: add support of octo mode I/O transfer Thread-Index: AQHUgiJNSdkh7a1cb0+RXLQlwhw+uw== Date: Thu, 22 Nov 2018 05:14:54 +0000 Message-ID: <1542863544-21257-6-git-send-email-yogeshnarayan.gaur@nxp.com> References: <1542863544-21257-1-git-send-email-yogeshnarayan.gaur@nxp.com> In-Reply-To: <1542863544-21257-1-git-send-email-yogeshnarayan.gaur@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: SG2PR01CA0106.apcprd01.prod.exchangelabs.com (2603:1096:3:15::32) To VI1PR04MB5726.eurprd04.prod.outlook.com (2603:10a6:803:e4::24) authentication-results: spf=none (sender IP is ) smtp.mailfrom=yogeshnarayan.gaur@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [14.143.30.134] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;VI1PR04MB3055;6:a69qq/RqxVwIgXtz/vdmAQBWHxyNkOk98W/FkRVZzQhFhVSNEvP4VF8s+YTFyEqkLNG0Xj0D6MCd9G33bD2GMNdm0HzRebiyRCmSWFtfjH9K9Kk3TOcPUmcdQ7F5bgjfWXQPK3AP/gI6fPSncQwy5oz8i7guKGSZ3gdhR/V19xFTp55YUaBMhL2Q68vnP3zq43I+kQyvm8C/K14deU2ACodHPMZsikjuFnVl3D8kxkOPMo4iPQZrWGKKr6aCDBX3Ioj9r1fJcAzMWKCmjkxLG2TPTisbpDdybRbGSC1R8WzqjrzvyLPpazFPIcFEHJBWew7M/rIt9nvLFKxqOypk1JDYSCaKi0UYxaYI173/2378OTny2RxvMeA0DONn/a5EE4eZl3kSx/dk32nKWZoSVmacbX4qTBU3ibV/NIGZNckwY+CzJv2v2nB8c99lePqpkUmwxVeEpky76jR1B+reJA==;5:pYLfACefKkHWhtoQUb3eN7/i3xKBl3u+ILRLqO9nQUH9Lcw6gaKDn2PQ6vQQ/uoyaLjPsWqJsWnl+cXa7elUjp1vswjZR7TU04zSlCaKlNznL2t2bxm2YUEQgJ4JQfm35iuK2ectc+aosaMSMMArxkc+Iqsje8Q1AhJ+6pDk3Tw=;7:8+mSkVFdGU97+ZAJ0NLQf0+2kTnnyBiKY6FW+aYxSOfV54tvhQI72AMttKlO7Xch/9N0+6uDSVYHKEkMWOP4deiHyU3USFsXmSdVuVH5K7Tq3kc+YRvtBljgZfSk5q1ktthwV3ndN/JaCn1p4s1P5g== x-ms-office365-filtering-correlation-id: 45aa75b9-b85f-476e-fa6b-08d650397024 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390098)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:VI1PR04MB3055; x-ms-traffictypediagnostic: VI1PR04MB3055: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(3231442)(944501410)(52105112)(93006095)(93001095)(6055026)(148016)(149066)(150057)(6041310)(20161123564045)(20161123558120)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095);SRVR:VI1PR04MB3055;BCL:0;PCL:0;RULEID:;SRVR:VI1PR04MB3055; x-forefront-prvs: 0864A36BBF x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(396003)(136003)(366004)(39860400002)(376002)(189003)(199004)(8936002)(25786009)(105586002)(316002)(2906002)(106356001)(52116002)(76176011)(4326008)(14454004)(6436002)(6512007)(6486002)(53936002)(39060400002)(68736007)(2616005)(476003)(486006)(99286004)(478600001)(11346002)(446003)(36756003)(102836004)(54906003)(71190400001)(71200400001)(386003)(6506007)(66066001)(6116002)(3846002)(110136005)(26005)(256004)(186003)(14444005)(5660300001)(55236004)(81156014)(78486014)(97736004)(2900100001)(81166006)(8676002)(2201001)(2501003)(305945005)(86362001)(7736002)(7416002);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR04MB3055;H:VI1PR04MB5726.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 4cFXj5D5CtwPhzVPtuLdEsheehFCAcrwfa2ekLnxy6KA2BgAThyPFSCqpnOiRyX24bj4s6+51oULvDsK4fH+jHXvdek8qbNfzAlYTLgAatQ4jJqBAReK+f8+mEr8nT4kLqFXutNvaQY8BNDRR9Wafsg69+dAbrRJGepKv8DAIWuDNIX7mPDugJILE9O9zieIxSkTSEQCXT25I9LZkGOY8DV661ZCBS1Nj1MDp9xAM6ym+S2onUeCcEO2O/uIvARA6Mxg8zWbX/ij7R35Z/IAwSzZMgfC9kXM9ogpgmf795KZsAFufjgBAUGEzpRebvnVOwVkaeQ4j6QH2bUuYPwEXXXKrUfXoc9Q0aZmkG+cu90= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 45aa75b9-b85f-476e-fa6b-08d650397024 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Nov 2018 05:14:54.8083 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB3055 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add support for octo mode I/O data transfer based on the controller (spi) mode. Assign hw-capability mask bits for octo transfer. Signed-off-by: Yogesh Gaur --- Changes for v4: - None Changes for v3: - Modified string 'octal' with 'octo'. Changes for v2: - Incorporated review comments of Boris. drivers/mtd/devices/m25p80.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index c4a1d04..6f3c280 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c @@ -195,7 +195,14 @@ static int m25p_probe(struct spi_mem *spimem) spi_mem_set_drvdata(spimem, flash); flash->spimem =3D spimem; =20 - if (spi->mode & SPI_RX_QUAD) { + if (spi->mode & SPI_RX_OCTO) { + hwcaps.mask |=3D SNOR_HWCAPS_READ_1_1_8; + + if (spi->mode & SPI_TX_OCTO) + hwcaps.mask |=3D (SNOR_HWCAPS_READ_1_8_8 | + SNOR_HWCAPS_PP_1_1_8 | + SNOR_HWCAPS_PP_1_8_8); + } else if (spi->mode & SPI_RX_QUAD) { hwcaps.mask |=3D SNOR_HWCAPS_READ_1_1_4; =20 if (spi->mode & SPI_TX_QUAD) --=20 2.7.4