From mboxrd@z Thu Jan 1 00:00:00 1970 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 A0A95C6FD18 for ; Wed, 19 Apr 2023 15:48:03 +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-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ZBAY512X0hELLTll6lT3JEBeMlmgFx34v2UaJQxByq4=; b=PulYwNZz8pctLzbYYMw4P03N9G WM22/2fZumzxzQWR7ibbD4lNIIfiNf8+LZ1d2ML+LxmrZw2f4+BzvJFh0RaH6JzR4oCGGb5YJK8GK 4zCH9j/Dca9v4xTPPcpOW+mmrw1Xdh8ma7vQiqCBxF85dJ1WOzRJWlDs/dz5cHNdEIKADmcLgvA+b TA+4s3IHhXQZBPh7yjzBTtM/4Vs9KXqNjYLMCz7L+J4FqmgyNaSm4tRFLzRA6Xiaw6eD9t7dRXhVV gp48fbuhYK1pLurq3oeFAWP8JkoncbAkJV5r6T9RM+gxsWYXoUQgbu8Br53d2CDV3W4IXhgKhmq5E LcMG0CYA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1ppA1S-005oH2-2Q; Wed, 19 Apr 2023 15:47:06 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1ppA1P-005oGX-3B for linux-arm-kernel@lists.infradead.org; Wed, 19 Apr 2023 15:47:05 +0000 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 dfw.source.kernel.org (Postfix) with ESMTPS id 76A5560B6B; Wed, 19 Apr 2023 15:47:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0B5E8C433EF; Wed, 19 Apr 2023 15:47:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681919221; bh=wr7CnKmrpEbT4OAdlGdrtt1dX2ep3MIz5NvcC74tElk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OJAd3I0DLoZLoH1POP9v7XG5IlW2WgDl6mSe1m69HJTOd59MF9OJu8OrzUqDbmN4j w/4GSfr55HUUap7woocdXuAZZsRfhzRmZIXcG/zaqU168is0zE4H8npE7oZ0S//w7d RngzbEvxCcr1rDnTVp05+xvAKuq3aeqmf4EE43F4aYkSNwO5imiFC0x/JsCX3JCdjy wUOsEvoAvq/zFE0ZxogTfphX+7ddXKXhHtlQAA1LlL5Anok68/hvyLl1SPU8oNqhze QarlSV9ioerltHUA4Bw6B77czgyvgZmvfHkzKXXV+p+AHCu3fdmb+n0jIwC/IaPLxr xXmjEEQf0Rbdg== Date: Wed, 19 Apr 2023 17:46:57 +0200 From: Andi Shyti To: Jaewon Kim Cc: Mark Brown , Krzysztof Kozlowski , Andi Shyti , Alim Akhtar , linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Chanho Park Subject: Re: [PATCH v2 1/4] spi: s3c64xx: changed to PIO mode if there is no DMA Message-ID: <20230419154657.h2kp7ouddy6m7l4r@intel.intel> References: <20230419060639.38853-1-jaewon02.kim@samsung.com> <20230419060639.38853-2-jaewon02.kim@samsung.com> MIME-Version: 1.0 In-Reply-To: <20230419060639.38853-2-jaewon02.kim@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230419_084704_121077_38154E49 X-CRM114-Status: GOOD ( 23.35 ) 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: , Content-Type: multipart/mixed; boundary="===============1274758094256063754==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============1274758094256063754== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="cckin4xh754itsjt" Content-Disposition: inline --cckin4xh754itsjt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Jaewon, On Wed, Apr 19, 2023 at 03:06:36PM +0900, Jaewon Kim wrote: > Polling mode supported with qurik if there was no DMA in the SOC. I think you want to say here that "Through quirks we choose to use polling mode whenever there is no DMA in the SoC". > However, there are cased where we cannot or do not want to use DMA. /cased/cases/ > To support this case, if DMA is not set, it is switched to polling mode. You haven't really described what you are doing here... you could just write something like: "Use DTS properties to select wether to use polling or DMA mode." Side note, please use the imperative form when you want to describe what you have done to fix the issue. > Signed-off-by: Jaewon Kim > --- > drivers/spi/spi-s3c64xx.c | 8 ++++++-- > include/linux/platform_data/spi-s3c64xx.h | 1 + > 2 files changed, 7 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c > index 71d324ec9a70..273aa02322d9 100644 > --- a/drivers/spi/spi-s3c64xx.c > +++ b/drivers/spi/spi-s3c64xx.c > @@ -19,7 +19,6 @@ > #include > =20 > #define MAX_SPI_PORTS 12 > -#define S3C64XX_SPI_QUIRK_POLL (1 << 0) > #define S3C64XX_SPI_QUIRK_CS_AUTO (1 << 1) > #define AUTOSUSPEND_TIMEOUT 2000 > =20 > @@ -116,7 +115,7 @@ > #define S3C64XX_SPI_TRAILCNT S3C64XX_SPI_MAX_TRAILCNT > =20 > #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) > =20 > #define RXBUSY (1<<2) > #define TXBUSY (1<<3) > @@ -1067,6 +1066,11 @@ static struct s3c64xx_spi_info *s3c64xx_spi_parse_= dt(struct device *dev) > sci->num_cs =3D temp; > } > =20 > + if (!of_find_property(dev->of_node, "dmas", NULL)) { > + dev_warn(dev, "cannot find DMA, changed to PIO mode\n"); > + sci->polling =3D 1; sci->polling =3D true; But it could be even better: sci->polling =3D !of_find_property(dev->of_node, "dmas", NULL)); and you get rid of the dev_warn() that is not required. Andi --cckin4xh754itsjt Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQScDfrjQa34uOld1VLaeAVmJtMtbgUCZEAM8AAKCRDaeAVmJtMt brz+AP9FdshhlbJoiOlwJlMu/QXvgAitd0xQA1alj6GOQtyK7gD/XNPMbYrf1gEO fI5feLcKerXaFWVZVDkntoCe8eGsLA0= =UwH6 -----END PGP SIGNATURE----- --cckin4xh754itsjt-- --===============1274758094256063754== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============1274758094256063754==--