Message ID | 20200520163053.24357-4-p.yadav@ti.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show
Return-Path: <SRS0=UFBu=7C=vger.kernel.org=linux-spi-owner@kernel.org> Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 19CB313B1 for <patchwork-linux-spi@patchwork.kernel.org>; Wed, 20 May 2020 16:32:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 02ADE207D3 for <patchwork-linux-spi@patchwork.kernel.org>; Wed, 20 May 2020 16:32:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="vFrK46mx" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727020AbgETQcA (ORCPT <rfc822;patchwork-linux-spi@patchwork.kernel.org>); Wed, 20 May 2020 12:32:00 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:53094 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726436AbgETQbe (ORCPT <rfc822;linux-spi@vger.kernel.org>); Wed, 20 May 2020 12:31:34 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 04KGVEHj007484; Wed, 20 May 2020 11:31:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1589992274; bh=8wsmxHh8Fj6nnuOv4RqixX/76ikZXmO9s3dBnceWxdw=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=vFrK46mxAezQewj6YyFjAMer66ljWdv60G5IjfkYyC7coRCRTHjwWTpKryHN1npAG oDTeZyY9Uu8mBdr4eOh0coLdSC+mYqsyhmVe8gv795JrRCcJAN9tbqeRakWR3pEnxJ rfUYjiKyPl/6p7iCWz7rb2lo4O6KjY51uk25wESw= Received: from DFLE104.ent.ti.com (dfle104.ent.ti.com [10.64.6.25]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 04KGVEQT045416 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 20 May 2020 11:31:14 -0500 Received: from DFLE110.ent.ti.com (10.64.6.31) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Wed, 20 May 2020 11:31:14 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Wed, 20 May 2020 11:31:14 -0500 Received: from pratyush-OptiPlex-790.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 04KGUsxS001551; Wed, 20 May 2020 11:31:10 -0500 From: Pratyush Yadav <p.yadav@ti.com> To: Tudor Ambarus <tudor.ambarus@microchip.com>, Miquel Raynal <miquel.raynal@bootlin.com>, Richard Weinberger <richard@nod.at>, Vignesh Raghavendra <vigneshr@ti.com>, Mark Brown <broonie@kernel.org>, Nicolas Ferre <nicolas.ferre@microchip.com>, Alexandre Belloni <alexandre.belloni@bootlin.com>, Ludovic Desroches <ludovic.desroches@microchip.com>, Matthias Brugger <matthias.bgg@gmail.com>, <linux-mtd@lists.infradead.org>, <linux-kernel@vger.kernel.org>, <linux-spi@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-mediatek@lists.infradead.org> CC: Pratyush Yadav <p.yadav@ti.com>, Sekhar Nori <nsekhar@ti.com>, Boris Brezillon <boris.brezillon@collabora.com>, Mason Yang <masonccyang@mxic.com.tw> Subject: [PATCH v6 03/19] spi: spi-mtk-nor: reject DTR ops Date: Wed, 20 May 2020 22:00:37 +0530 Message-ID: <20200520163053.24357-4-p.yadav@ti.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200520163053.24357-1-p.yadav@ti.com> References: <20200520163053.24357-1-p.yadav@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: <linux-spi.vger.kernel.org> X-Mailing-List: linux-spi@vger.kernel.org |
Series |
mtd: spi-nor: add xSPI Octal DTR support
|
expand
|
diff --git a/drivers/spi/spi-mtk-nor.c b/drivers/spi/spi-mtk-nor.c index 7bc302b50396..7015dccedf00 100644 --- a/drivers/spi/spi-mtk-nor.c +++ b/drivers/spi/spi-mtk-nor.c @@ -211,6 +211,10 @@ static bool mtk_nor_supports_op(struct spi_mem *mem, if (op->cmd.buswidth != 1) return false; + /* DTR ops not supported. */ + if (op->cmd.dtr || op->addr.dtr || op->dummy.dtr || op->data.dtr) + return false; + if ((op->addr.nbytes == 3) || (op->addr.nbytes == 4)) { if ((op->data.dir == SPI_MEM_DATA_IN) && mtk_nor_match_read(op)) return true;
Double Transfer Rate (DTR) ops are added in spi-mem. But this controller doesn't support DTR transactions. Since we don't use the default supports_op(), which rejects all DTR ops, do that explicitly in our supports_op(). Signed-off-by: Pratyush Yadav <p.yadav@ti.com> --- drivers/spi/spi-mtk-nor.c | 4 ++++ 1 file changed, 4 insertions(+)