From patchwork Tue Jul 11 08:20:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaewon Kim X-Patchwork-Id: 702195 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E29D2C001DF for ; Tue, 11 Jul 2023 08:25:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231273AbjGKIZT (ORCPT ); Tue, 11 Jul 2023 04:25:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231154AbjGKIZR (ORCPT ); Tue, 11 Jul 2023 04:25:17 -0400 Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 192E49C for ; Tue, 11 Jul 2023 01:25:12 -0700 (PDT) Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20230711082510epoutp01a4d5b5866fe685b890ec1067209f8da0~wwq1naR3i2683326833epoutp01S for ; Tue, 11 Jul 2023 08:25:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20230711082510epoutp01a4d5b5866fe685b890ec1067209f8da0~wwq1naR3i2683326833epoutp01S DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1689063910; bh=+x3YgvcySm4e4OWhzCgiX503lxS9Tal1A2wn7/lnMtM=; h=From:To:Cc:Subject:Date:References:From; b=AioBY9DPhNboTY4DImvuidDheOTLB0gsQSIvEecrpeQknmETriEcvh17yq5BAesKI DPVZ05r5de0gg2NR88uIYgJv9wq7A6xBkC03nShhyZFd+NcbJ3y56RNnEjAxTCC1i/ oHII1++nONYMxmwNd0T2o1VlJp0T2jsartOsC4ns= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20230711082509epcas2p2089503c1f234b156a89711d21ecf4415~wwq01jGLE0267302673epcas2p2l; Tue, 11 Jul 2023 08:25:09 +0000 (GMT) Received: from epsmges2p4.samsung.com (unknown [182.195.36.92]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4R0YpD4Y5Qz4x9Ps; Tue, 11 Jul 2023 08:25:08 +0000 (GMT) Received: from epcas2p2.samsung.com ( [182.195.41.54]) by epsmges2p4.samsung.com (Symantec Messaging Gateway) with SMTP id A5.35.32393.4E11DA46; Tue, 11 Jul 2023 17:25:08 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas2p3.samsung.com (KnoxPortal) with ESMTPA id 20230711082508epcas2p3088d488035e7e2910bf087d640e9c268~wwqznTvSd0591905919epcas2p3v; Tue, 11 Jul 2023 08:25:08 +0000 (GMT) Received: from epsmgmcp1.samsung.com (unknown [182.195.42.82]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20230711082508epsmtrp15a884d0c37a11b08c3c3af853551c67e~wwqzmUZtC0611406114epsmtrp1L; Tue, 11 Jul 2023 08:25:08 +0000 (GMT) X-AuditID: b6c32a48-87fff70000007e89-35-64ad11e4878e Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgmcp1.samsung.com (Symantec Messaging Gateway) with SMTP id 9F.4D.64355.3E11DA46; Tue, 11 Jul 2023 17:25:07 +0900 (KST) Received: from localhost.localdomain (unknown [10.229.9.55]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20230711082507epsmtip1ec149368577a49a67b0b31a5bb4ab76c~wwqzWUhre2887328873epsmtip1e; Tue, 11 Jul 2023 08:25:07 +0000 (GMT) From: Jaewon Kim To: Andi Shyti , Mark Brown , Krzysztof Kozlowski , Alim Akhtar Cc: linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Chanho Park , Jaewon Kim Subject: [PATCH] spi: s3c64xx: clear loopback bit after loopback test Date: Tue, 11 Jul 2023 17:20:20 +0900 Message-Id: <20230711082020.138165-1-jaewon02.kim@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrNKsWRmVeSWpSXmKPExsWy7bCmme4TwbUpBo8nK1k8mLeNzeL+1w5G i6kPn7BZXN6vbbGj4Qirxd7XW9ktNj2+xmpxedccNosZ5/cxWTR+vMnuwOWxaVUnm8eda3vY PDYvqffo27KK0ePzJrkA1qhsm4zUxJTUIoXUvOT8lMy8dFsl7+B453hTMwNDXUNLC3MlhbzE 3FRbJRefAF23zBygm5QUyhJzSoFCAYnFxUr6djZF+aUlqQoZ+cUltkqpBSk5BeYFesWJucWl eel6eaklVoYGBkamQIUJ2Rkft8oU3GermLDwO2MD4y3WLkZODgkBE4l1M7YwdTFycQgJ7GCU +HKrmxXC+cQosfHaZhY459OuF0wwLfMnbIVK7GSUmNr0hhnC+cgo8Xbjf2aQKjYBbYnv6xeD zRIRWMEose3CB7AWZoEbjBLdb0AGc3IIC7hKPJzdDzaXRUBV4u66XqBuDg5eATuJl9erIdbJ S6zecIAZwt7FLrH0qi+E7SLRtmofG4QtLPHq+BZ2CFtK4mV/G5SdLdE+/Q/UpxUSFzfMhqo3 lpj1rJ0RZBWzgKbE+l36IKaEgLLEkVtghzEL8El0HP7LDhHmlehoE4JoVJO4P/Uc1BAZiUlH VkLDxEOia2ETWFxIIFZi5aEzjBMYZWchzF/AyLiKUSy1oDg3PbXYqMAEHkfJ+bmbGMGpTMtj B+Pstx/0DjEycTAeYpTgYFYS4S04uCpFiDclsbIqtSg/vqg0J7X4EKMpMLAmMkuJJucDk2le SbyhiaWBiZmZobmRqYG5kjjvvda5KUIC6YklqdmpqQWpRTB9T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H0ovevc94bEiati67LN7SJebN9h mXnI9R3LyRKBqp36db0h2Ud/OVq8O8VvtPLLq6rcmpYTfwT7Jnfb6d7ynP1L+8Xj4KDwRTsP P7BqSzy1v4nlV+a902/7/nw3WDL9jZHDtDO/VUx3LnyZGR6o2vDq/2PxaSFVdZbdMipOgisC WKyUWIozEg21mIuKEwFt2bCemgIAAA== X-CMS-MailID: 20230711082508epcas2p3088d488035e7e2910bf087d640e9c268 X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230711082508epcas2p3088d488035e7e2910bf087d640e9c268 References: Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org When SPI loopback transfer is performed, S3C64XX_SPI_MODE_SELF_LOOPBACK bit still remained. It works as loopback even if the next transfer is not spi loopback mode. If not SPI_LOOP, needs to clear S3C64XX_SPI_MODE_SELF_LOOPBACK bit. Signed-off-by: Jaewon Kim --- drivers/spi/spi-s3c64xx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index fd55697144cc..b6c2659a66ca 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -684,6 +684,8 @@ static int s3c64xx_spi_config(struct s3c64xx_spi_driver_data *sdd) if ((sdd->cur_mode & SPI_LOOP) && sdd->port_conf->has_loopback) val |= S3C64XX_SPI_MODE_SELF_LOOPBACK; + else + val &= ~S3C64XX_SPI_MODE_SELF_LOOPBACK; writel(val, regs + S3C64XX_SPI_MODE_CFG);