From patchwork Wed Apr 19 06:06:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaewon Kim X-Patchwork-Id: 13216433 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 4C939C77B7A for ; Wed, 19 Apr 2023 06:28:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232052AbjDSG2T (ORCPT ); Wed, 19 Apr 2023 02:28:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231644AbjDSG2R (ORCPT ); Wed, 19 Apr 2023 02:28:17 -0400 Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C23F47689 for ; Tue, 18 Apr 2023 23:27:58 -0700 (PDT) Received: from epcas2p2.samsung.com (unknown [182.195.41.54]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20230419062757epoutp02ca97a12c97b01dfc9b3c4ac7db0de0fe~XQhzA6cd72609626096epoutp02W for ; Wed, 19 Apr 2023 06:27:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20230419062757epoutp02ca97a12c97b01dfc9b3c4ac7db0de0fe~XQhzA6cd72609626096epoutp02W DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1681885677; bh=ObxsSdFs5WAZmJuj7FAlx5qDmt4YK3vF0QVFupjZfVs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ejlT5y75N+b3Rjum0pSHtSak/M/dMsBuKwNVqhOwTTg8CgJDVWk4sNAw7sfz2eO+D iAhGkONne2AdxwOE8GJBYFGQh2TrRbzQwwxmOwcw1zoblqJPGhItPztGwtpja0MUgg YHsit7Jicwwjdk5aa1MxarLzoTwvxuPklWCOET4c= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20230419062756epcas2p370909a87da2f81f7461caa8c89808af4~XQhyXBwTY0412704127epcas2p3g; Wed, 19 Apr 2023 06:27:56 +0000 (GMT) Received: from epsmges2p1.samsung.com (unknown [182.195.36.88]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4Q1W7J0YsQz4x9Q8; Wed, 19 Apr 2023 06:27:56 +0000 (GMT) Received: from epcas2p2.samsung.com ( [182.195.41.54]) by epsmges2p1.samsung.com (Symantec Messaging Gateway) with SMTP id 84.C2.09961.BE98F346; Wed, 19 Apr 2023 15:27:55 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas2p4.samsung.com (KnoxPortal) with ESMTPA id 20230419062755epcas2p43a646bbae5f01e3120331407ad873318~XQhxQbeOd2842728427epcas2p4Q; Wed, 19 Apr 2023 06:27:55 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20230419062755epsmtrp177357b9586a7d9848c0d786aabf99ca1~XQhxPur2P2169721697epsmtrp1F; Wed, 19 Apr 2023 06:27:55 +0000 (GMT) X-AuditID: b6c32a45-e13fa700000026e9-54-643f89ebed4f Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 41.71.08609.BE98F346; Wed, 19 Apr 2023 15:27:55 +0900 (KST) Received: from localhost.localdomain (unknown [10.229.9.55]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20230419062755epsmtip2b08d471e899b00fb8fd358f6a2225488~XQhxDWS_G0394003940epsmtip2W; Wed, 19 Apr 2023 06:27:54 +0000 (GMT) From: Jaewon Kim To: Mark Brown , Krzysztof Kozlowski , Andi Shyti , 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 v2 2/4] spi: s3c64xx: add cpu_relax in polling loop Date: Wed, 19 Apr 2023 15:06:37 +0900 Message-Id: <20230419060639.38853-3-jaewon02.kim@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230419060639.38853-1-jaewon02.kim@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrHKsWRmVeSWpSXmKPExsWy7bCmme7rTvsUgx/95hYP5m1js1j84zmT xdSHT9gsLu/XttjRcITVYu/rrewWmx5fY7W4vGsOm8WM8/uYLBo/3mR34PK4vuQTs8emVZ1s Hneu7WHz2Lyk3qNvyypGj8+b5ALYorJtMlITU1KLFFLzkvNTMvPSbZW8g+Od403NDAx1DS0t zJUU8hJzU22VXHwCdN0yc4AOU1IoS8wpBQoFJBYXK+nb2RTll5akKmTkF5fYKqUWpOQUmBfo FSfmFpfmpevlpZZYGRoYGJkCFSZkZ7T8+cRUsIu14tPSc0wNjEdZuhg5OSQETCQ+rDjH3MXI xSEksINRYs3GD4wQzidGiSvLrzBBOJ8ZJVq+nmKEafnR3AJmCwnsYpS4+N4Kougjo8ScM0dY QRJsAtoS39cvZgVJiAgsZpTY+/cL2BJmgRuMEt1vNgNt5+AQFnCWOHMDrIFFQFWicfsysKm8 ArYSs4/dYYXYJi+xesMBZhCbU8BOYuGna2wgcyQEXrJLHJ7/jxmiyEVizbWjUOcJS7w6voUd wpaSeNnfBmVnS7RP/wM1tELi4obZbBC2scSsZ+2MIPcwC2hKrN+lD2JKCChLHLkFDiNmAT6J jsN/2SHCvBIdbUIQjWoS96eegxoiIzHpyEomCNtD4sjMXWyQMJnIKPH3wjfmCYxysxAWLGBk XMUollpQnJueWmxUYAiPseT83E2M4ISn5bqDcfLbD3qHGJk4GA8xSnA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lh xCnOnf9wT3+zb2+41NziGs4b8Sw+HBP4fM5+Tt13rT7D4Uzf9MVPXs4R+j5Z4BjnnftWHTab 5wUruPLOuP1l04S6H9dCWD+6LGVXExabLDJn0fH3t26ffLL24SZZn9SQa5fmS583Whcx5c4h Awam0oiEsnzjB0yhzMyLLjG3TH1o/JOFucJ+4jTW93Vqmzm4fA7LpTv99nx39uLh5TZznR4m WmWeu/CPW0T9X9ymn1U//69vyhIvC5i5+6lNjkRHW9rJbZ/9S2S3CZb/Wbvjxtz6HL6AvACZ 4w1LTJe/qf6/wUpo87r38+/WGVx92RRwOzXk04miRK/a0GYlluKMREMt5qLiRAA82Q5OvAIA AA== X-CMS-MailID: 20230419062755epcas2p43a646bbae5f01e3120331407ad873318 X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230419062755epcas2p43a646bbae5f01e3120331407ad873318 References: <20230419060639.38853-1-jaewon02.kim@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Adds cpu_relax() to prevent long busy-wait. There is busy-wait loop to check data transfer completion in polling mode. Signed-off-by: Jaewon Kim --- drivers/spi/spi-s3c64xx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 273aa02322d9..886722fb40ea 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -568,6 +568,7 @@ static int s3c64xx_wait_for_pio(struct s3c64xx_spi_driver_data *sdd, val = msecs_to_loops(ms); do { + cpu_relax(); status = readl(regs + S3C64XX_SPI_STATUS); } while (RX_FIFO_LVL(status, sdd) < xfer->len && --val);