From patchwork Tue May 2 06:28:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaewon Kim X-Patchwork-Id: 13228543 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 C0989C7EE23 for ; Tue, 2 May 2023 06:51:31 +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:In-Reply-To: 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: List-Owner; bh=IFzsqA79F+QLd4NJ1QrDelGZ7jdHZs/sOmkiajVQjIg=; b=bP1SEQ++lPlH2S 0y42olg7TVIxh6Uv4Znp0E9HG9shVucnnDOgqiZj8V1Ck33dNDcbNdzMHcBfUi03csmCiPgXLVZDe GNKDyv21ZYwKmbMrsVIguSDQJPNw2E9zTig6KUz668tZHCcS4tmTKF3JN5MwbKOQ7kcM2l1VQaxxE 5oQ+KJC5nT6let/dHbTF0uim53FZrSO56cYPTbEqlkrpht2HzXA/YNzOh3SgcRhcHfEGCA3MbBMkR isAa7MeM+6Yd/c93eRu3Ij+Fpi398T5AECju7npB43H9Wdud7pBmZ8NLeD/IwUIvNZCHv9oQwBChA lAJ35U60CMyTGRRSWv3A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1ptjqQ-000OWG-1f; Tue, 02 May 2023 06:50:38 +0000 Received: from mailout1.samsung.com ([203.254.224.24]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1ptjqK-000ORT-1n for linux-arm-kernel@lists.infradead.org; Tue, 02 May 2023 06:50:35 +0000 Received: from epcas2p1.samsung.com (unknown [182.195.41.53]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20230502065027epoutp01d6ddf3fcd9a5d07ef128f0b307bab70f~bQOKAxzlb2709227092epoutp01B for ; Tue, 2 May 2023 06:50:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20230502065027epoutp01d6ddf3fcd9a5d07ef128f0b307bab70f~bQOKAxzlb2709227092epoutp01B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1683010227; bh=/zhDcDts5LBX2HV/3UzZnXw4YVjg9uzB6LOd9LsN6rk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YSLTli2ccnyF0XCiccrYSVijYzIU3y3bJXBAj2Hegl68T1IaAJACxw8eIMKGPYbYZ CmwcSf8jTFPIzc3/YVHoa2h1tlJ+69u1Fw0S+Di62TvfXtpbuZTW5SZUNBMAIX2PVD Zgtsp5eUDKWeBmKfaYXvBT1LTeKtdlXQPhpO3Qes= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20230502065026epcas2p3c3bbced9152859a716e6d108432f7e32~bQOJiEnwJ1371613716epcas2p3O; Tue, 2 May 2023 06:50:26 +0000 (GMT) Received: from epsmges2p3.samsung.com (unknown [182.195.36.100]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4Q9W1F6vkzz4x9Q6; Tue, 2 May 2023 06:50:25 +0000 (GMT) Received: from epcas2p1.samsung.com ( [182.195.41.53]) by epsmges2p3.samsung.com (Symantec Messaging Gateway) with SMTP id 39.9B.08199.1B2B0546; Tue, 2 May 2023 15:50:25 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas2p4.samsung.com (KnoxPortal) with ESMTPA id 20230502065025epcas2p4143c8ff3d44b7676ea8667c14618f2cd~bQOIKsCsr1117211172epcas2p4A; Tue, 2 May 2023 06:50:25 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20230502065025epsmtrp200b9f15f59b5d2422a3f2ee79378198c~bQOIJ-j0d2944229442epsmtrp2M; Tue, 2 May 2023 06:50:25 +0000 (GMT) X-AuditID: b6c32a47-e99fd70000002007-fd-6450b2b1a730 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id E2.C8.27706.1B2B0546; Tue, 2 May 2023 15:50:25 +0900 (KST) Received: from localhost.localdomain (unknown [10.229.9.55]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20230502065025epsmtip13f5f5d62791d4d87df09e34b99a140c0~bQOIAexil1675316753epsmtip1U; Tue, 2 May 2023 06:50:25 +0000 (GMT) From: Jaewon Kim To: Krzysztof Kozlowski , Andi Shyti , Mark Brown , 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 v3 1/3] spi: s3c64xx: change polling mode to optional Date: Tue, 2 May 2023 15:28:11 +0900 Message-Id: <20230502062813.112434-2-jaewon02.kim@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230502062813.112434-1-jaewon02.kim@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrHKsWRmVeSWpSXmKPExsWy7bCmqe7GTQEpBu/maVo8mLeNzWLxj+dM FlMfPmGzuLxf22JHwxFWi72vt7JbbHp8jdXi8q45bBYzzu9jsmj8eJPdgcvj+pJPzB6bVnWy edy5tofNY/OSe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4oxEQy3mouJEAHDLC9wBBAAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrNLMWRmVeSWpSXmKPExsWy7bCSnO7GTQEpBhs3Clo8mLeNzWLxj+dM FlMfPmGzuLxf22JHwxFWi72vt7JbbHp8jdXi8q45bBYzzu9jsmj8eJPdgcvj+pJPzB6bVnWy edy5tofNY/OSeo++LasYPT5vkgtgi+KySUnNySxLLdK3S+DKaNizgblgBV/F7LPX2BoYf3F3 MXJySAiYSKy61c7excjFISSwm1FiZe9lZoiEjMTyZ31sELawxP2WI6wQRe8ZJdo7DrKAJNgE tCW+r18MlhARWMoo8XjPYxYQh1ngHqPEy0nfmECqhAVcJRZev8IIYrMIqEo03H4F1s0rYCex /8JMJogV8hKrNxwAW80pYC9xr6mFFcQWAqq50vuVdQIj3wJGhlWMkqkFxbnpucWGBYZ5qeV6 xYm5xaV56XrJ+bmbGMHhqaW5g3H7qg96hxiZOBgPMUpwMCuJ8H4o9EsR4k1JrKxKLcqPLyrN SS0+xCjNwaIkznuh62S8kEB6YklqdmpqQWoRTJaJg1Oqgalft9y15KivRW9m2J/H6mmXf+re erTjisVv0bDLU9sy/k1zMGu/GpHj///WWqs1d17ez29Lv9ToHxluWmQTVbrm6WTTMvPTIb8T POPzK93vqit4n3v4TZiLl/WvitCiM/F+G/rZbyaJxNUnOth2RO9m3aG01CiEmf+/n1nlFIvp q9MOqpabrcyS+P3TZuoi+2V1kvEpW6/XLJq1R0at51S8Q2rY8r89FrmbRA0THsZM+nMjTM09 OnV3y4ePbzvvv7jmlZe06/RDb5aaiP9yGsc7dsa+ynhwViHwP9OhNsVH9RHqOzaH511ZwR0f sb9tL5cZa9OHPQ8urd78x/BO6m3Tuo/cx3c3Xrq9ZuLtciWW4oxEQy3mouJEAAg5wce+AgAA X-CMS-MailID: 20230502065025epcas2p4143c8ff3d44b7676ea8667c14618f2cd X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230502065025epcas2p4143c8ff3d44b7676ea8667c14618f2cd References: <20230502062813.112434-1-jaewon02.kim@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230501_235032_994053_78143685 X-CRM114-Status: GOOD ( 21.58 ) 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 Previously, Polling mode was supported as quirk for SOC without DMA. To provide more flexible support for polling mode, it changed to polling mode when the 'dmas' property is not present in the devicetree, rather than using a quirk. Signed-off-by: Jaewon Kim Reviewed-by: Krzysztof Kozlowski --- drivers/spi/spi-s3c64xx.c | 4 ++-- include/linux/platform_data/spi-s3c64xx.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 71d324ec9a70..66ac94022a1b 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -19,7 +19,6 @@ #include #define MAX_SPI_PORTS 12 -#define S3C64XX_SPI_QUIRK_POLL (1 << 0) #define S3C64XX_SPI_QUIRK_CS_AUTO (1 << 1) #define AUTOSUSPEND_TIMEOUT 2000 @@ -116,7 +115,7 @@ #define S3C64XX_SPI_TRAILCNT S3C64XX_SPI_MAX_TRAILCNT #define msecs_to_loops(t) (loops_per_jiffy / 1000 * HZ * t) -#define is_polling(x) (x->port_conf->quirks & S3C64XX_SPI_QUIRK_POLL) +#define is_polling(x) (x->cntrlr_info->polling) #define RXBUSY (1<<2) #define TXBUSY (1<<3) @@ -1068,6 +1067,7 @@ static struct s3c64xx_spi_info *s3c64xx_spi_parse_dt(struct device *dev) } sci->no_cs = of_property_read_bool(dev->of_node, "no-cs-readback"); + sci->polling = !of_property_present(dev->of_node, "dmas"); return sci; } diff --git a/include/linux/platform_data/spi-s3c64xx.h b/include/linux/platform_data/spi-s3c64xx.h index 5df1ace6d2c9..cb7b8ddc899f 100644 --- a/include/linux/platform_data/spi-s3c64xx.h +++ b/include/linux/platform_data/spi-s3c64xx.h @@ -35,6 +35,7 @@ struct s3c64xx_spi_info { int src_clk_nr; int num_cs; bool no_cs; + bool polling; int (*cfg_gpio)(void); };