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 93DACC6FD18 for ; Wed, 19 Apr 2023 08:04:29 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=YuHl+rHlph0ptBQEEdSebGAWUD4nNlsC8BDEyVXIPG0=; b=kFAGIRF2IKVJcV IOvdF64TXB+wJK1nVXlbGgb+m4G29xkLAdMcHWVkQhG7KdQTEc166mO+BwOHXpnYWZx1jiIMiD2Lz 9c2jMRErrzuN3qaeBzXnOWhSXswhNajpRUcdrjO9LJZiO4NydcvxtuZfoVIArqjVwdi11hKGrtlPS w6KN0mhb59l6C1C593nVSk7klHcafs58apbKF9Wirnlo7v0aMIrfcYorlIBEs3BBBfE7RKXif6fRY qhrgk5SIv6xmgBX6Acic7NMYij+wUlOYkXgXQDXLI4Q88BLnh9rUbcz5FTYCBKOFqOrQxapDxqBVU jgUudkp8DRpoY/Rtx6bA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pp2mo-004Wd5-0A; Wed, 19 Apr 2023 08:03:30 +0000 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pp2mk-004WbQ-2s for linux-arm-kernel@lists.infradead.org; Wed, 19 Apr 2023 08:03:28 +0000 Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-506bf4cbecbso901276a12.1 for ; Wed, 19 Apr 2023 01:03:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681891401; x=1684483401; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=EI1YComog4rA7OF+HOwhO9/TQv8utz9ZLP9QGa/GLwE=; b=r/ucemiZJuDiA5vpi5XomiHMtv/lGO0GnkLNm4C53kw4jG6ytb+TGNdHO9XTDoGOUs VvYJ1X1JtgzaYGi9XgFWXkQ3A+ApT7soIbcGRKyYgdohgGSHg+FXQBGVi2lYvtHABEpB clVNwJi+jbDlFxKf3VLEKLlopi/ANA0Fmv3NF92L4LYORYz9mZzAnTOX8y3TzutoC5sj Fn8rziK56HOhgMn2XwKJHaiF212rbqN0QSH90ElfqeUrQE3rHGbkZkj3it0VXmJLrWWu PX1nELYa8XnMgJIhn+12WFmJ6KBycvtQdJhhwnNq+jL2ndof1UUT6jt92itNAsVCJQmy bJPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681891401; x=1684483401; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=EI1YComog4rA7OF+HOwhO9/TQv8utz9ZLP9QGa/GLwE=; b=HW8MXTAZGUy3ko+ScgpLJ1YVfaZnGei7tX48p6qJNeylaWIJ3GNtSASeTu2t/Rn8By aOxIe1KPMoUqY26hu6jNdpMVF8yDaW6UqvhFcgg478L1xxYTiGoH3q6C5RcrOgY/YQGq 1LVoIgAOIcRq67ECjOxj47ISwyk0nQ4IIxkL/5ACEsgyQMrZfmuBFNyojNS2IxT6lgGX Rv5+A8VlBxYJS/M6uVulAnn2GduuPKcBN3HXdT88hW7XMwkc1zQiRcFQJ+GGJLwB4+t5 A5dhpDA3eJczq9XsBx7N91vN+Ld6Ri90jq7o/XctwYA7ydKRXdGAxKgn98ngedM2O6h8 UhQw== X-Gm-Message-State: AAQBX9d2ctlYp561sbDpjuDbT3R/HtS3YhfXnPt5N1BY3p+nUANYz4AR IAf4480X/9Sxz6OjPs3gR17EOA== X-Google-Smtp-Source: AKy350Z89TV9b5CQ5dMks6JPzzIhSrjODtafrwNBlmUmpvdcv/16ARInRyjVls8RymMBKO3tlwL4KQ== X-Received: by 2002:aa7:c3c8:0:b0:506:85b4:b14b with SMTP id l8-20020aa7c3c8000000b0050685b4b14bmr4800801edr.29.1681891401444; Wed, 19 Apr 2023 01:03:21 -0700 (PDT) Received: from ?IPV6:2a02:810d:15c0:828:62f5:eb43:f726:5fee? ([2a02:810d:15c0:828:62f5:eb43:f726:5fee]) by smtp.gmail.com with ESMTPSA id l12-20020a056402344c00b00504803f4071sm7861606edc.44.2023.04.19.01.03.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Apr 2023 01:03:21 -0700 (PDT) Message-ID: <41ebe41f-d773-7cc3-dcad-8574c858645e@linaro.org> Date: Wed, 19 Apr 2023 10:03:20 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH v2 1/4] spi: s3c64xx: changed to PIO mode if there is no DMA Content-Language: en-US To: Jaewon Kim , Mark Brown , 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 References: <20230419060639.38853-1-jaewon02.kim@samsung.com> <20230419060639.38853-2-jaewon02.kim@samsung.com> From: Krzysztof Kozlowski 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_010326_955502_20692BCC X-CRM114-Status: GOOD ( 20.26 ) 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: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 19/04/2023 08:06, Jaewon Kim wrote: > Polling mode supported with qurik if there was no DMA in the SOC. typo: quirk You missed verb in your first part of sentence. I don't understand it. > However, there are cased where we cannot or do not want to use DMA. > To support this case, if DMA is not set, it is switched to polling mode. > > 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(-) > > 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 > > #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) > @@ -1067,6 +1066,11 @@ static struct s3c64xx_spi_info *s3c64xx_spi_parse_dt(struct device *dev) > sci->num_cs = temp; > } > > + if (!of_find_property(dev->of_node, "dmas", NULL)) { > + dev_warn(dev, "cannot find DMA, changed to PIO mode\n"); You said it is desired option, so should not be a warning. I would make it debug at most. > + sci->polling = 1; Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel