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: 13308249 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 39162EB64DC for ; Tue, 11 Jul 2023 08:25:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:References:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: List-Owner; bh=m+TgKMZaCDLEuAb0Gdl0k7MnaId/R+sqtc/EUk3vP9M=; b=GWsNRwyicwfhUE T000f978PmFj+2i6cFmT/VGaadSO2P5BpISOHV9xl1c7YjFb800qBk+/9ibgjyiE/iowJG2CHsFEt ib0kTYktjrqIw6As7apJoWyuXdZhwqL+ATqqaE9Wz9bMKc/AEJZK4eFpxeqZoG0/77yb65fCRQQsD lNakMIg2GS79AKkpD4+EFsLGP01I0538h6TTXQ7fnziPHBTDy5HBIHcvdNnK7rhKveZWVclJ7aM7v iQbJOvM+Y8Omq2ZZridKrvuXNrJTBcZonccB6kmMyauM057tScWb7CpdUaN1ER8Vk/KcZDZcHGLhf 5+1AWDzYDFDpH4sc11KQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qJ8gU-00E64U-0p; Tue, 11 Jul 2023 08:25:22 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qJ8gN-00E62B-39 for linux-arm-kernel@lists.infradead.org; Tue, 11 Jul 2023 08:25:20 +0000 Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20230711082510epoutp02fb4c274e10f781413d72ea5fc9fed13b~wwq1ghTPh0528205282epoutp02M for ; Tue, 11 Jul 2023 08:25:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20230711082510epoutp02fb4c274e10f781413d72ea5fc9fed13b~wwq1ghTPh0528205282epoutp02M 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 3F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fztrFZ3P/awWgx 9eETNovL+7UtdjQcYbXY+3oru8Wmx9dYLS7vmsNmMeP8PiaLxo832R24PDat6mTzuHNtD5vH 5iX1Hn1bVjF6fN4kF8AaxWWTkpqTWZZapG+XwJXxcatMwX22igkLvzM2MN5i7WLk5JAQMJGY P2ErSxcjF4eQwHZGiU27jkAlZCSWP+tjg7CFJe63gMRBit4zStxqfsEMkmAT0Jb4vn4xWEJE YBVQ9/IzjCAOs8A9RomXk74xgVQJC7hKPJzdD2azCKhK3F3XC9TNwcErYCfx8no1xAZ5idUb DjBPYORZwMiwilE0taA4Nz03ucBQrzgxt7g0L10vOT93EyM4rLSCdjAuW/9X7xAjEwfjIUYJ DmYlEd6Cg6tShHhTEiurUovy44tKc1KLDzFKc7AoifMq53SmCAmkJ5akZqemFqQWwWSZODil Gpg6nnP31VhtNxeO+6Nzr2WRkz77l+wZfVOzm12+nc+998V6U+X39uyMYw+2HRT+oVufus7l 17vEjbt2HHiV9mmfx0w2qQubJRwTXYLTpq3wkPrKy3bwpcfOyo+PzFZHub1oDOC5fprBd9kD nol2P0/WtjDX/OkM098+c5tAQ/l+49MLnk/m5bBNDI6zzH0ovevc94bEiati67LN7SJebN9h 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: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230711_012518_765518_90D84265 X-CRM114-Status: GOOD ( 14.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 Reviewed-by: Chanho Park Reviewed-by: Andi Shyti --- 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);