Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp2699177imn; Tue, 2 Aug 2022 12:36:29 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sHakWnDIdT+8t7rhEdDAZvwwJs0edXNGKfhVvHyiWKgzzinGy+k8+3orZ3iVUBwfjjCKOa X-Received: by 2002:a63:1648:0:b0:41a:49f9:77ae with SMTP id 8-20020a631648000000b0041a49f977aemr18269270pgw.377.1659468988664; Tue, 02 Aug 2022 12:36:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659468988; cv=none; d=google.com; s=arc-20160816; b=I7IqByGGQCTTL1tCpRBpzToVK6+M6lvzZDwSw/yeRHsNaS+Auu6QK926dUh3WYSDV1 zgquDRe4vS2d/Cy/kgsZ3bUXUIbePc+R46Ys3Ne4CHpaUc3oYdqlPX8SY/Zzc1D7Htap AH0qdx3fcG0B/Ztpu3mZYLIFfLRHdA23qe6PsxxvbtiyH++rZPwjou7DN4s+K9SfRvhQ i67i5/4om0fn/GQY8liK0G/ZaU/TeI5W3mdtJRuXlX/0sbSHU8h2A0cKNeTlFMf+aDDH U5CsaEgeZFlobXon4/xAtk16JQm143Xldk+erqovc6P1/t4h5BWpWULyHMXckwbRALm2 nWsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=EjGVxyDkV9EwZQAo//S7aUs832EmpwiRik/RJSwUzGY=; b=qJ2SSL281rCjKiqFq522ia4GlVDLa/R9slPunTC0gQM2hvjDIJsVFElb4RlzESmZAq xJqq08g+1a3AinabKFptMorf9lZtxDKi8Cg5gCqV7oi2spMSwNC5kwyQkIrtfy4ZtK4S aZzVbVrVyeD9A130AgUF0hCgwl3qF5DU3oea64U2RIrvapWnyLRAhS3ZTPowxMFUg07k 5Yq0QQMYoPmrrtovCbqzXOduFNe4fsWjBdUj5mbcNwJUEAnsMR+demTmZX+CL20N/IAt UXb4oXSvEUZd40kviKZpfXG+ZUwOZNo2j5yQHsmrClZAdgWC3WqgN5KeTAC9JeGJeRNu 0kFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UHuxmrVZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j7-20020a170903024700b0016bde60cc84si188404plh.355.2022.08.02.12.36.14; Tue, 02 Aug 2022 12:36:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UHuxmrVZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231911AbiHBTN4 (ORCPT + 99 others); Tue, 2 Aug 2022 15:13:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229532AbiHBTNy (ORCPT ); Tue, 2 Aug 2022 15:13:54 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97D7C52DCD; Tue, 2 Aug 2022 12:13:53 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 55B57B8207C; Tue, 2 Aug 2022 19:13:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 58F9FC433C1; Tue, 2 Aug 2022 19:13:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659467631; bh=T3MBopdOtWixQ3FCkNcXkYUgaM6a+BZ5M1L3tYAPinc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UHuxmrVZA/HqE72SdIgz/Y9s94Vyu8TDSWQQQz9mcp07n6m2w4vVfRiAnrES90+9J TDd+xn849tl2BR1+rxm+XrxZ/AtElelYlUiiL1sNb+jVvoXzIOIMiKwervMN7lECCY rkAHoVHnD+URn9EwSe/uaPiViJ1jmzVprTyBn+ht6dUqxbzxzKuGO/OoxxI+P91Sml bK+4L5IK3sfnA+I5eeRm+WfcWdLTkDy9xdsqEnWQYeFuSttclXj1ERSH++pr1aOhAF 8F8BcPEtMpw96z259gEshriJuDWOB5pYolttpZudqA1e9vrE+3hd5j73wacXIpA673 j3NA5OOU3RzEw== Date: Tue, 2 Aug 2022 20:13:44 +0100 From: Mark Brown To: Sudip Mukherjee Cc: Serge Semin , Rob Herring , Krzysztof Kozlowski , greentime.hu@sifive.com, jude.onyenegecha@sifive.com, william.salmon@sifive.com, adnan.chowdhury@sifive.com, ben.dooks@sifive.com, linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, jeegar.lakhani@sifive.com Subject: Re: [PATCH 04/11] spi: dw: use TMOD_RO to read in enhanced spi modes Message-ID: References: <20220802175755.6530-1-sudip.mukherjee@sifive.com> <20220802175755.6530-5-sudip.mukherjee@sifive.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="7HxAbNud4AYGSDtm" Content-Disposition: inline In-Reply-To: <20220802175755.6530-5-sudip.mukherjee@sifive.com> X-Cookie: Stay on the trail. X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --7HxAbNud4AYGSDtm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 02, 2022 at 06:57:48PM +0100, Sudip Mukherjee wrote: > When we are using the enhanced spi modes we can not use EEPROM Read. > The Synopsys datasheet mentions EEPROM Read is not applicable in > enhanced SPI modes. We will need to use Receive only mode. >=20 > Signed-off-by: Sudip Mukherjee > --- > drivers/spi/spi-dw-core.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/spi/spi-dw-core.c b/drivers/spi/spi-dw-core.c > index 8c84a2e991b5..8e624620864f 100644 > --- a/drivers/spi/spi-dw-core.c > +++ b/drivers/spi/spi-dw-core.c > @@ -727,7 +727,10 @@ static int dw_spi_exec_mem_op(struct spi_mem *mem, c= onst struct spi_mem_op *op) > cfg.dfs =3D 8; > cfg.freq =3D clamp(mem->spi->max_speed_hz, 0U, dws->max_mem_freq); > if (op->data.dir =3D=3D SPI_MEM_DATA_IN) { > - cfg.tmode =3D DW_SPI_CTRLR0_TMOD_EPROMREAD; > + if (enhanced_spi) > + cfg.tmode =3D DW_SPI_CTRLR0_TMOD_RO; > + else > + cfg.tmode =3D DW_SPI_CTRLR0_TMOD_EPROMREAD; This is fixing the previous commit... --7HxAbNud4AYGSDtm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmLpd2gACgkQJNaLcl1U h9AdcQf/fp0qGacGXOTmxLhzXNUGajNyCyIQp3hVO43WcLLNP1qX7SwYdQqpJsWL +Uodapi9ubYTtcuQRK/vTodDYvuYLM4lCY3uEga/7aTesUwFrYL/ExoW8eaqI67B HC6fmMyp44SZHhKAjp5ayY7HXg0e/eAAY8LwapbRfFC8W93kVApYWirG9hPCYS+W HGw+HZ80eyBcA0fQNBXzWqfD0Mr0LpIy0itNFZQU/kqcJANcBYuL23i1XkvLFhTJ I0sOmMtidWMjhig9BvOtfmenSOMvNMVd/PIgGdHI8o21d8f4odJJ9Meni8q4jxkE s1oep2Sjf6h+xyDDUGGHUoO2irGkBw== =mC5X -----END PGP SIGNATURE----- --7HxAbNud4AYGSDtm--