From patchwork Mon Jan 18 23:52:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathew McBride X-Patchwork-Id: 365640 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp250110jam; Mon, 18 Jan 2021 15:53:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJxmQivPS00Ja2jLnQF3tV7ID1rGnjnvhpE1LUEF4C8Wwbu2S9gJce4VwVBBGpIrMzNmFews X-Received: by 2002:a05:6402:1249:: with SMTP id l9mr1248922edw.375.1611014036294; Mon, 18 Jan 2021 15:53:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611014036; cv=none; d=google.com; s=arc-20160816; b=ZMtrsc4ysfLQDi3uZYeOoczGh7CzCBBbQ7yKfyv0RKLXtiQ331SCA2adg8VzIwIjs7 1ikNei4AgahLvUbn/ObGtnhQaW+IjlFmkI78oxvhJh4PPDdKeCiD26oMGFs5Y5jgTAu/ aEGaw9qeAsvHUrqLw9M5wARPZ7lNH3jX4unW7yaVKtH0Un+fcZJboqGn9o5nBc0QaU4E UFA202XNtma5t728JNjYXPTlx0pKSRPwMXtw4GuVOyNEdAQvJmJSlrXIgcxta4PrMNdv wua6ZGjRN5gtoSiRglGTA2glfsMkZPpnsZ8W7HW2RCK4w1uIRl5ZlozUXSOK9rDsFVx1 U7wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:dkim-signature; bh=r0QcwHhIvmEp3iepry6r7E8GfQJLys+AxsYxVwaV8mU=; b=qZb3EOy9ig4S6nizrEjFVe4UWWa/Im/a31KE+kAZY6XqGb7s3En7VTddlG3HtwXJCK XAiwTFzfV76bERUgz0PMoT1fmQ97W11JiY6W2l0N65xV3lN0mmlAmWuKhcq2KqoqODae PX2Et3KCnnvyLmuL9UontVh/27V1ocMom9SJLFEKg1V58soMp1KuQULpiDzX9s7VNvX2 QPrJMHsfS5R1krMccq8mwhSktiOFXLuB3YOMSiTPwU57LaQgc1whEetw9sSLoGVOngLE tUPXNjz04qvCBop2kseCPSplftiTneI9XE17bshrXz8SoEcTVw9UtB0UtaPWowJez9oM dlfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@traverse.com.au header.s=fm2 header.b=bcPdrffN; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b="RytTyPk/"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id g5si800528eje.528.2021.01.18.15.53.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jan 2021 15:53:56 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@traverse.com.au header.s=fm2 header.b=bcPdrffN; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b="RytTyPk/"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 57E18828A5; Tue, 19 Jan 2021 00:53:45 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=traverse.com.au Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=traverse.com.au header.i=@traverse.com.au header.b="bcPdrffN"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="RytTyPk/"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7A4AB827C3; Tue, 19 Jan 2021 00:53:39 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9DBF3827AD for ; Tue, 19 Jan 2021 00:53:36 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=traverse.com.au Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=matt@traverse.com.au Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id DCA055C0218; Mon, 18 Jan 2021 18:53:35 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 18 Jan 2021 18:53:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=traverse.com.au; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=r0QcwHhIvmEp3 iepry6r7E8GfQJLys+AxsYxVwaV8mU=; b=bcPdrffNjFQk6nTLjbuB0qUs1PxEg VvWVdepANMHu3PR2Uxqdp+9C4oC1Vd8FXPvR52YgWkfIBMp/T8+yCN4ldf850iRj fR7WSTsI96b7rqltFZviCpi6zIEQ0MV5CLbf9vLCxFjnoOQZsU9aDqTNnkCrrinc GQPMgQwk+0zEqzRExpkiA90e2LgobeWuadYZha5xf9ylPcfkyKuaDN+hHbK9p1oB wVSI+PSRgE9nXDJCLppnqPkhQs0w9lvoGDZ5YRtgnAtSSm0BtvkBw4ZYLqKVrOi2 gINjk/PBfhYRHuihVXAKkoFyo6eQO5zJX2TS5If14wdTX8ixMi08T8Yyw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=r0QcwHhIvmEp3iepry6r7E8GfQJLys+AxsYxVwaV8mU=; b=RytTyPk/ e1bzwbbWVK990KRgShXf9vgxK6Ljfo6vaIj/hwEl2g0FYzuIxXLSuQT+l3aksVXU +n1C17JILvcxhGHh8izDR+PGkYZqTugdSRmLwwk1SVrYJ3Y1DbpSGDL/0mh58Sh8 dNqhGUbKMFnkpCAAbzhuy4zQgr0u/A0sUx9Syg8mefzoGXyfxRU1h+tVcJXLraT8 LaL8yCrxOKlhDvMZCYcigvFvGsOOVedQ22Ln73R/FiEyHX665sF2RgGDmxi2H3tf +Xce7HIgWzY2/LzU/hDttlg3g8PpM+le/ExtFG42zXLdbQa2b3BacnOdzldv71gL 8l41k5k66oTKCQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrtdelgddufecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepofgrthhhvgif ucfotgeurhhiuggvuceomhgrthhtsehtrhgrvhgvrhhsvgdrtghomhdrrghuqeenucggtf frrghtthgvrhhnpeekleevteelvdduheetgfdvfeelueekffeggeethedtteeljeeivedv gfehjeejheenucfkphepudduledrudejrdduheeirddugedunecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhgrthhtsehtrhgrvhgvrhhsvgdr tghomhdrrghu X-ME-Proxy: Received: from localhost.localdomain (119-17-156-141.77119c.mel.static.aussiebb.net [119.17.156.141]) by mail.messagingengine.com (Postfix) with ESMTPA id 55954240065; Mon, 18 Jan 2021 18:53:34 -0500 (EST) From: Mathew McBride To: Jagan Teki , u-boot@lists.denx.de Cc: Priyanka Jain , Michael Walle , Mathew McBride Subject: [PATCH 1/3] mem: spi-mem: define spi_mem_default_supports_op Date: Mon, 18 Jan 2021 23:52:54 +0000 Message-Id: <20210118235256.29748-2-matt@traverse.com.au> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210118235256.29748-1-matt@traverse.com.au> References: <20210118235256.29748-1-matt@traverse.com.au> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean spi_mem_default_supports_op is used internally by controller drivers to verify operation semantics are correct. Signed-off-by: Mathew McBride --- include/spi-mem.h | 10 ++++++++++ 1 file changed, 10 insertions(+) -- 2.30.0 diff --git a/include/spi-mem.h b/include/spi-mem.h index ca0f55c8fd..92c640dabe 100644 --- a/include/spi-mem.h +++ b/include/spi-mem.h @@ -216,6 +216,10 @@ int spi_controller_dma_map_mem_op_data(struct spi_controller *ctlr, void spi_controller_dma_unmap_mem_op_data(struct spi_controller *ctlr, const struct spi_mem_op *op, struct sg_table *sg); + +bool spi_mem_default_supports_op(struct spi_mem *mem, + const struct spi_mem_op *op); + #else static inline int spi_controller_dma_map_mem_op_data(struct spi_controller *ctlr, @@ -231,6 +235,12 @@ spi_controller_dma_unmap_mem_op_data(struct spi_controller *ctlr, struct sg_table *sg) { } + +bool spi_mem_default_supports_op(struct spi_mem *mem, + const struct spi_mem_op *op) +{ + return false; +} #endif /* CONFIG_SPI_MEM */ #endif /* __UBOOT__ */ From patchwork Mon Jan 18 23:52:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathew McBride X-Patchwork-Id: 365645 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp250274jam; Mon, 18 Jan 2021 15:54:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJykjgAjTGg0r15kVZuTUQn3Cp3sySetFKQeNNQE4kjmitWTMxtvEfwUiyEltN5wQTSaQGu+ X-Received: by 2002:a17:906:22c7:: with SMTP id q7mr1305310eja.486.1611014051728; Mon, 18 Jan 2021 15:54:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611014051; cv=none; d=google.com; s=arc-20160816; b=n1KENZLGgme/QihmY1bUoJRyv3eEH4nNmEz8Agyd1uuudtzIAO/WdWnXi7YHLQCg9b re5woeMjoCn2OBkT2uvrYahwVUahtSecLzmPCHLnUvjO69qScJyo7Pvq/ti7VnSzy61S yTtSco2Z3nHVnkdsCZir9KdPUSCXNNq92RnSxkc5b8mUyOUAUSdsBa25CT/xp2HrcvKp lsDx5ohcwk3FYg/+5x1MQ5DivZcVqQEt0LSDxuRS0g/E8MZRCvH/dMaKGkENcrBhHBex m7E5kPv+tqCKEVgiJZNvnMK+58o1SNnKwpR84qF/XGRrctpR12AW/YK2BWoYm6F5JU2n Ka3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:dkim-signature; bh=/KqLIC8WyE/7NS0w4auxoHVEWAm4eByW0MpUskmGuzM=; b=wmZscAyUqFZMP4qVJ1/nLJSxQem1FSEyTvnGZp8Cf4vt9yyNLq1VWWc6SDC3A9sqBT Kau7CFUONdhKSI4trCMbTEZ7HFw5AeRURq29LzK1EXJ+EQKR526deOZmuU105cZZXov0 Rcjr5t3vVE+6uQzDV+dp2xQnJ4v6UGkNb3eKv8QXvxHYWu62bew7zXsqFn75vzddDgac dvQNdTG4AnJhugvXxs7FYV/1Dk/RpyBLlFvuxGBrdQ34tDcWKAQ73qaYt3VwXr/W7CdE PMa8ni0MRhmWhYUPXd1L/IlLxulj4VHZD+jvTuDXyJIN3KUAZBWsztSNpl9eAbuCrg7K wORQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@traverse.com.au header.s=fm2 header.b=DfkK1S6M; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=PXt5whfY; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id p18si6253879ejm.276.2021.01.18.15.54.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jan 2021 15:54:11 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@traverse.com.au header.s=fm2 header.b=DfkK1S6M; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=PXt5whfY; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 14F80828B6; Tue, 19 Jan 2021 00:53:51 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=traverse.com.au Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=traverse.com.au header.i=@traverse.com.au header.b="DfkK1S6M"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="PXt5whfY"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 04DB4828B6; Tue, 19 Jan 2021 00:53:49 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 636168289B for ; Tue, 19 Jan 2021 00:53:43 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=traverse.com.au Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=matt@traverse.com.au Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id AA06C5C0208; Mon, 18 Jan 2021 18:53:42 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Mon, 18 Jan 2021 18:53:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=traverse.com.au; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=/KqLIC8WyE/7N S0w4auxoHVEWAm4eByW0MpUskmGuzM=; b=DfkK1S6MdK27OdXQQsw1soYDGNxyM gDUdswfDm+m1eIFWqs/vIM5DtNMnQU/nVuqtqTo73QrBpXqdqfLA3TDdsZ3OTUOg uimEVWfsxLllbW1tqohjSgItHRZLAukDa5/9D55fskqpRW33Zt/3apGZh8rzTXG/ VIw0JlhElL3pH8kN9k7HZWnoDlR2TZOCtj0z6u82R4ixba1+JvPeIo45V0x6F94W EHpZ+7CAFPh/LWSq1a/PrhnJrxRDNFkMggF0NpRu4tlPbXhf0WH42QbJicrdTZL3 sOnUnJVU0XM/OJIKwvLAjbd76fWnghgXMEotzclbHQVS6dXAturcgFuAQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=/KqLIC8WyE/7NS0w4auxoHVEWAm4eByW0MpUskmGuzM=; b=PXt5whfY AbRHekFkppQw3RN9qc8oSvZxmJOEwv315PQLG1EibUfh6FLD7rVAD8tM8hGXEZfA d/WR0Pgh7ZZXhdJkOvzLeZavwI+RjC1uvLfropd7dirO3CC0nq5C2cJAuXGP+o8O 27NYRQ7oPoTFMOncR6js2TooDPexjwpIEFC3w+C0yccrsAb6ZWE1yqOggNTQaeCu S46BT1bjmgeq0zE6jjw9H3CoAqwfXPUc2ATpGbUqP7ftjR+P+cOVSrpzQiiB2+KH WGo3Kel4CzmQj+OjO9KsFtVa6yY0X+bxmYLiN8DqNden9AtWFgoQTgXwUGwF2NvF nXJaAJafN575RQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrtdelgddugecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculddutddmnecujfgurhephffvufffkffojghfggfgsedtkeertdertddt necuhfhrohhmpeforghthhgvficuofgtuehrihguvgcuoehmrghtthesthhrrghvvghrsh gvrdgtohhmrdgruheqnecuggftrfgrthhtvghrnhephedukeegvefhfeeuiedugeejlefg iedtveevkeektefgieetteetffelveevtdelnecuffhomhgrihhnpehkvghrnhgvlhdroh hrghenucfkphepudduledrudejrdduheeirddugedunecuvehluhhsthgvrhfuihiivgep tdenucfrrghrrghmpehmrghilhhfrhhomhepmhgrthhtsehtrhgrvhgvrhhsvgdrtghomh drrghu X-ME-Proxy: Received: from localhost.localdomain (119-17-156-141.77119c.mel.static.aussiebb.net [119.17.156.141]) by mail.messagingengine.com (Postfix) with ESMTPA id 8816324005B; Mon, 18 Jan 2021 18:53:40 -0500 (EST) From: Mathew McBride To: Jagan Teki , u-boot@lists.denx.de Cc: Priyanka Jain , Michael Walle , Mathew McBride , Mark Brown Subject: [PATCH 2/3] spi: fsl_qspi: Ensure width is respected in spi-mem operations Date: Mon, 18 Jan 2021 23:52:55 +0000 Message-Id: <20210118235256.29748-3-matt@traverse.com.au> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210118235256.29748-1-matt@traverse.com.au> References: <20210118235256.29748-1-matt@traverse.com.au> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Adapted from kernel commit b0177aca7aea From: Michael Walle Make use of a core helper to ensure the desired width is respected when calling spi-mem operators. Otherwise only the SPI controller will be matched with the flash chip, which might lead to wrong widths. Also consider the width specified by the user in the device tree. Fixes: 91afd36f38 ("spi: Add a driver for the Freescale/NXP QuadSPI controller") Signed-off-by: Michael Walle Link: https://lore.kernel.org/r/20200114154613.8195-1-michael@walle.cc Signed-off-by: Mark Brown Signed-off-by: Mathew McBride [adapt for U-Boot] --- drivers/spi/fsl_qspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.30.0 diff --git a/drivers/spi/fsl_qspi.c b/drivers/spi/fsl_qspi.c index 8bc7038a82..2a1f3a0c44 100644 --- a/drivers/spi/fsl_qspi.c +++ b/drivers/spi/fsl_qspi.c @@ -409,7 +409,7 @@ static bool fsl_qspi_supports_op(struct spi_slave *slave, op->data.nbytes > q->devtype_data->txfifo) return false; - return true; + return spi_mem_default_supports_op(slave, op); } static void fsl_qspi_prepare_lut(struct fsl_qspi *q, From patchwork Mon Jan 18 23:52:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathew McBride X-Patchwork-Id: 365652 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp250321jam; Mon, 18 Jan 2021 15:54:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJzkerVCo+mdd50YwK0RX+EwL8Y5B/ljGkeA0VFjbukLsGUZsrmcRaUxcH87VcbCavVOs6Pm X-Received: by 2002:a17:906:4f0d:: with SMTP id t13mr1357131eju.10.1611014057287; Mon, 18 Jan 2021 15:54:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611014057; cv=none; d=google.com; s=arc-20160816; b=Lvs8TYOyouCd2aJzyi6OM0/z82evtNRTGH2M5YUtQvKxttE8fkFKedGUJOS2jwi5Ij UMfThv8hc4SA173jVkFbDC6TPbsd1E0woTUw3QbWho4SHd6a9rZCddrGymA7/kK13t6x dW27Fx8oC3I4yQVrUR+A4VjjIBwpKIA+apCXWcB11DwRZzf1wZC0rheJnCMk8dMjg6oe q2Bj/M3nVd5hSGulGd/UFl8zJvBp3qHm+xVf7cgrUknSTXekbUAAW2NjCNs17W/uq2nn adjOdch1dmtwUnBtrpsBraGIKguZ3tOWN0iWNxHisZRWuOnA6VP/tNCCt/5gh4z6+wdW UZnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:dkim-signature; bh=B5MexJR5lZYGMuBRGtASxjTfdSh4xd17HDFHOkC3TGg=; b=WISn7382W09jRXh/daxSSs2PubgmUHlq9tHePB8A1MZ2uI2RfpOBvzAiUDDcNKb4Tn eGfzoa3GmBgkzUXRbzxcpFg9qFqJ+WWYKYI5gpaQB0Bzfy/sRXi3HU2CsPXZ86wXh+IX 0Yltfzy9esoEO0aWjOEhkuYaOh2dL+za92MaliZQTKXyNdeE7MWOGgCPd8NKD07NQxIQ Smkt6Vt+hE6t2P8BiWTlnR6e5/Bqu+CqMuTSuMZFMcMlP7eiTqj3lR+buYA5kPJ08LYN uz5XojJ5Hl1s16J8pcdhajEH2iQ48NPnf2R11or1N4QuxodOxsBZatZ0rTLhZbyWPF6D uxOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@traverse.com.au header.s=fm2 header.b=ecpork4C; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=PEVVw705; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id u15si8794062edt.339.2021.01.18.15.54.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jan 2021 15:54:17 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@traverse.com.au header.s=fm2 header.b=ecpork4C; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=PEVVw705; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 802F2828AC; Tue, 19 Jan 2021 00:53:55 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=traverse.com.au Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=traverse.com.au header.i=@traverse.com.au header.b="ecpork4C"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="PEVVw705"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C8889828BB; Tue, 19 Jan 2021 00:53:50 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1A75E828AB for ; Tue, 19 Jan 2021 00:53:46 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=traverse.com.au Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=matt@traverse.com.au Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 545BE5C003F; Mon, 18 Jan 2021 18:53:45 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Mon, 18 Jan 2021 18:53:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=traverse.com.au; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=B5MexJR5lZYGM uBRGtASxjTfdSh4xd17HDFHOkC3TGg=; b=ecpork4CdnDG78orw5lNsxBktL7ph oNU2mCI74r51BLy/u4HLDlt5UVOminUo9EQYvv/PMtWDom8vHSdYIs0Wew/XNZKN bEnLBhuRbsFVFNcAIJX+gFBkKIVfCUsgFfpiFNnNKUJ+0letiCQsE1R49ubJ/iF5 CHosJ7iBstMAJMkdKL84NcGvWHeaCIl1i/+O0OP4Jqp5cCRWmiP39nwUVvn3IsEi aqJqq2vgzRGPl6CMHX+9s4vPlXr025Xg1F+nksCDOC4kY1eLFFVjrZPB9radHQNJ MZdcZuCvQ2e18oVxD9ZqdbhMkgRwoz6ABgzwymTUmgux5F8i6Qpu92rLw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=B5MexJR5lZYGMuBRGtASxjTfdSh4xd17HDFHOkC3TGg=; b=PEVVw705 PXRS58tPSDwlHKs/9V1dHzcCaYpzMxR5x6cF7EzU5QcgSFVChpGw1PSmBVhV0Fmq SJkmzVqIP+7Aer/hVMcGQtPUAe7RAw+kCPWjPVljCHYveAmswdhuO0Pxjy7eMjDn uxmgUX2mXJAYJ7Goxtl4+jkkuDXGnDjm0yw9PQwm7fJQkVRLDJmrnIYzPk5SAE3v 3badHaxmLi+esyeYrUD22BWkxnPKtOKfjLg+NagrwdlwjIYQi1DWoS0y0NZKzd7Z yVJDNuCqPynBDyXoAi0P5XHI0+bUhLlr94kIBqfdQ7oo23F9jFHWBBrpxr2azlz/ f3L8dxV0xyyILQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrtdelgddugecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepofgrthhhvgif ucfotgeurhhiuggvuceomhgrthhtsehtrhgrvhgvrhhsvgdrtghomhdrrghuqeenucggtf frrghtthgvrhhnpeekleevteelvdduheetgfdvfeelueekffeggeethedtteeljeeivedv gfehjeejheenucfkphepudduledrudejrdduheeirddugedunecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhgrthhtsehtrhgrvhgvrhhsvgdr tghomhdrrghu X-ME-Proxy: Received: from localhost.localdomain (119-17-156-141.77119c.mel.static.aussiebb.net [119.17.156.141]) by mail.messagingengine.com (Postfix) with ESMTPA id 9365824005A; Mon, 18 Jan 2021 18:53:43 -0500 (EST) From: Mathew McBride To: Jagan Teki , u-boot@lists.denx.de Cc: Priyanka Jain , Michael Walle , Mathew McBride Subject: [PATCH 3/3] spi: fsl_qspi: apply the same settings for LS1088 as LS208x Date: Mon, 18 Jan 2021 23:52:56 +0000 Message-Id: <20210118235256.29748-4-matt@traverse.com.au> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210118235256.29748-1-matt@traverse.com.au> References: <20210118235256.29748-1-matt@traverse.com.au> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean The LS1088 requires the same QUADSPI_QURIK_BASE_INTERNAL workaround as the LS208x and also has a 64 byte TX buffer. With the previous settings SPI-NAND reads over AHB were corrupted. Fixes: 91afd36f3802 ("spi: Transform the FSL QuadSPI driver to use the SPI MEM API") Signed-off-by: Mathew McBride --- drivers/spi/fsl_qspi.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) -- 2.30.0 diff --git a/drivers/spi/fsl_qspi.c b/drivers/spi/fsl_qspi.c index 2a1f3a0c44..f965301d6a 100644 --- a/drivers/spi/fsl_qspi.c +++ b/drivers/spi/fsl_qspi.c @@ -259,14 +259,6 @@ static const struct fsl_qspi_devtype_data ls1021a_data = { .little_endian = false, }; -static const struct fsl_qspi_devtype_data ls1088a_data = { - .rxfifo = SZ_128, - .txfifo = SZ_128, - .ahb_buf_size = SZ_1K, - .quirks = QUADSPI_QUIRK_TKT253890, - .little_endian = true, -}; - static const struct fsl_qspi_devtype_data ls2080a_data = { .rxfifo = SZ_128, .txfifo = SZ_64, @@ -877,7 +869,7 @@ static const struct udevice_id fsl_qspi_ids[] = { { .compatible = "fsl,imx7d-qspi", .data = (ulong)&imx7d_data, }, { .compatible = "fsl,imx7ulp-qspi", .data = (ulong)&imx7ulp_data, }, { .compatible = "fsl,ls1021a-qspi", .data = (ulong)&ls1021a_data, }, - { .compatible = "fsl,ls1088a-qspi", .data = (ulong)&ls1088a_data, }, + { .compatible = "fsl,ls1088a-qspi", .data = (ulong)&ls2080a_data, }, { .compatible = "fsl,ls2080a-qspi", .data = (ulong)&ls2080a_data, }, { } };