Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3823108ybt; Tue, 23 Jun 2020 11:34:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGC/RStDxaJe0Tj2W9mtCFrMeWwMjVw4/RdSILGOEcI3P/a48xcbxhfNVEDSIVbFt7kzVp X-Received: by 2002:a17:906:da05:: with SMTP id fi5mr22062096ejb.95.1592937251846; Tue, 23 Jun 2020 11:34:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592937251; cv=none; d=google.com; s=arc-20160816; b=zFKD6H2R3ZP5e7N8hpapFtxWFTxwjsEjq/PcpZJZpaREvjgdP8tfPOI8QIsSAKmBMJ 96+AjC8F31AzPwjlQuD8ObR8MeucquVXRs9CoO8B34tfLkDr1zONFzfnofAaTKh330x6 jNkfnP2JJHpn9i6W7NW3dSKargQ5jc4Ocaz4mJgLjd7CG47WQv0cwH4ri4oMhGjUqa+a asKkSCRC26kKk967hHDi5Xz6PkMzWmMMj50VejnFvNT0QoMXdbQSMy87OixD1g4bjqeV BZeg2BZihqG+41kY6OI+pFiBHZ0wDIRe05DCzdH486zxNiLNUol6jsfNcMgV2UHKrCuq g+ZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ICZSgKDya0MZb9NLJPQdWRiZClZw58Cs4X/tbJ2rxUc=; b=LSbsX/Y6gabvLcZpi1NSSkFYCbeqcE9eOLpMtP0wD8dS8IxINE6boJI0VZ1/6LDU58 FG/zFB6rsrOHJ7PMTehIE7TqfHnhjdpnumkW+B2Y8eXBTcp97nnLWecRRJxB+JCkIgOL JhXKt45NBkyxKku4WBMQNBKD8XXFFQM0cPDWh5J9DwxkGdGnXoeOHgneK4Yf/ivRdvZ3 RiwvXoqoPiVAMAPxMNKHi6g0sZalpZxzM8c4+MKxCOZ8npv9uFttg/ZltE0dR09rdklf 1QFBM6hisgtTwPj/7XUEU+/wBmCbkrpGkPtW19eZcpZylJc65jcz6UE0uP8/k6Qx+eoc Cp3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=hWHhC8lp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h23si11796771ejx.452.2020.06.23.11.33.48; Tue, 23 Jun 2020 11:34:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=hWHhC8lp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387429AbgFWSbL (ORCPT + 99 others); Tue, 23 Jun 2020 14:31:11 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:54536 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732988AbgFWSbK (ORCPT ); Tue, 23 Jun 2020 14:31:10 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 05NIUqap015214; Tue, 23 Jun 2020 13:30:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1592937052; bh=ICZSgKDya0MZb9NLJPQdWRiZClZw58Cs4X/tbJ2rxUc=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=hWHhC8lpgSWnL/3edl4bB55XXcEVSlnX5q1EbEb7I+oJh8pcxGbIJifUVzi5yAXrR h1K6CTK++JD5IoPqaaD0ucYcvrn3ujFnNhtEON6lQUfzlaLKo34531GKjsnx5+S032 jrjSfhsnNYQqKQ7/cfMIAfXQG0g3EgaxVDhKGdg0= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 05NIUqk4038437 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 23 Jun 2020 13:30:52 -0500 Received: from DFLE109.ent.ti.com (10.64.6.30) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Tue, 23 Jun 2020 13:30:52 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE109.ent.ti.com (10.64.6.30) 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; Tue, 23 Jun 2020 13:30:51 -0500 Received: from pratyush-OptiPlex-790.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 05NIUVJH000942; Tue, 23 Jun 2020 13:30:47 -0500 From: Pratyush Yadav To: Tudor Ambarus , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Mark Brown , Nicolas Ferre , Alexandre Belloni , Ludovic Desroches , Matthias Brugger , Michal Simek , , , , , CC: Pratyush Yadav , Sekhar Nori , Boris Brezillon Subject: [PATCH v10 03/17] spi: atmel-quadspi: reject DTR ops Date: Wed, 24 Jun 2020 00:00:16 +0530 Message-ID: <20200623183030.26591-4-p.yadav@ti.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200623183030.26591-1-p.yadav@ti.com> References: <20200623183030.26591-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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/spi/atmel-quadspi.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/spi/atmel-quadspi.c b/drivers/spi/atmel-quadspi.c index cb44d1e169aa..a898755fb41e 100644 --- a/drivers/spi/atmel-quadspi.c +++ b/drivers/spi/atmel-quadspi.c @@ -285,6 +285,12 @@ static bool atmel_qspi_supports_op(struct spi_mem *mem, op->dummy.nbytes == 0) return false; + /* DTR ops not supported. */ + if (op->cmd.dtr || op->addr.dtr || op->dummy.dtr || op->data.dtr) + return false; + if (op->cmd.nbytes != 1) + return false; + return true; } -- 2.27.0