Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1560333ybh; Tue, 14 Jul 2020 00:42:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8Z86aC+yfvPd3/Rv3ctZBOQ70B2lDWBbk2+gwhXjPZeaQjvpYMVDMW/mGuZbmGpgBwL9L X-Received: by 2002:a05:6402:3d0:: with SMTP id t16mr3075684edw.287.1594712557026; Tue, 14 Jul 2020 00:42:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594712557; cv=none; d=google.com; s=arc-20160816; b=g9SXnws3UXUXUDdtttiCoTvY/VvvGmihmE02rUhL/ENlyW8bR+kckb0U3TUeWSIXND BK7flGKaUpinR/SyCSZFp+8xdtK5cTa//5bXyLJrwDwaWTtS0rCMzu3jwrZ9r1aWDCCY kpF2abhlRG9z4LeAFLMztsHtNZ3l3W4HYaZKmhodcujKHZlsCQOG3/Pt5yaPFUQB+uht rK50zEqav/rzMLCpkP8f/Axrr/cKSzxxpzG/ceTxUPdhqK2590q7Z/7lln3/bKUBRLC6 m9oVWrhjyDSJSgMKSQH+z6Fm+F3bq/WXayCcK9Wj1YPtJcEQbYGEvSlJ/DauQzjXADvh LRlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type :content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:cc:to:subject:dkim-signature :dkim-filter; bh=y+ZhhNn1wQp4ZmdBdTKuuKIZtB5kY5SMp0XXF2kRDdc=; b=QZ4WJrzke2nO4KgRyDvOH2hCr/QbMdKyCmD/2gehumfYxunLm0F2yiHefq1ymUHO+1 3vhxaFfJzSVf08Lu0t8mKiIMFn2NN5kdnw9GWH2qtKouXkGegVkwoNPNaSRuiU7YX6gL G3OGdqbHWB1mVYtNlfd9H1ScfvGJ3+FBi04xX76yncO1p5VtshVblNgQ/dpOyYEe4SN/ mXy8Za4yVWLS3OOnn1uMeoXl33RQr0jeXgVwuBxBU7XgBYlJvFl3/+i10kKbRPn5auoG RROGJh8n6qQ1CKO/p2V9lGD1oMwUffLDxE9BPIpGv5RNuCkTz3LXonrC38eWMYpVYptz HLbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=mpm6h+YP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id by12si10593846edb.99.2020.07.14.00.42.14; Tue, 14 Jul 2020 00:42:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=mpm6h+YP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726370AbgGNHmJ (ORCPT + 99 others); Tue, 14 Jul 2020 03:42:09 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:42697 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725816AbgGNHmI (ORCPT ); Tue, 14 Jul 2020 03:42:08 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200714074206euoutp014b4b931577b200f1032fcf8ac921362d~hjpgSgzAG3067130671euoutp01U for ; Tue, 14 Jul 2020 07:42:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200714074206euoutp014b4b931577b200f1032fcf8ac921362d~hjpgSgzAG3067130671euoutp01U DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1594712526; bh=y+ZhhNn1wQp4ZmdBdTKuuKIZtB5kY5SMp0XXF2kRDdc=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=mpm6h+YPWtBwWRbG/P/p+PWC025kqKzQbRlQDI05xze46LfUJHMnpRJ/7+WRavKs4 Yd8no+u4mNBgohS3F1SsgwARjIeQcLhEipm3tkyQFCvwzluUhgPP3jV/WWtPYmskOw c4v8rd//6PqyWAJT4fbhYqNAgfPOThctt48UGHFU= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200714074206eucas1p1fb143778d8f74c8194a76244d671d3dc~hjpf3ywWJ1881818818eucas1p1x; Tue, 14 Jul 2020 07:42:06 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 48.1C.05997.EC16D0F5; Tue, 14 Jul 2020 08:42:06 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200714074206eucas1p29046b2f20810b8cbbfb4bc04a1ed603a~hjpflSqS31637716377eucas1p2K; Tue, 14 Jul 2020 07:42:06 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200714074206eusmtrp20b47ce0fc6167d9723fb0c7b7a09a586~hjpfkdKAG2603726037eusmtrp2d; Tue, 14 Jul 2020 07:42:06 +0000 (GMT) X-AuditID: cbfec7f4-65dff7000000176d-c8-5f0d61cebeba Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 88.EE.06017.EC16D0F5; Tue, 14 Jul 2020 08:42:06 +0100 (BST) Received: from [106.120.51.71] (unknown [106.120.51.71]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200714074205eusmtip2be77319dfa565188d67ac4e705add0a1~hjpe-MF4h1609116091eusmtip2y; Tue, 14 Jul 2020 07:42:05 +0000 (GMT) Subject: Re: [PATCH v2 2/2] memory: samsung: exynos5422-dmc: Add module param to control IRQ mode To: Lukasz Luba Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, willy.mh.wolff.ml@gmail.com, k.konieczny@samsung.com, cw00.choi@samsung.com, krzk@kernel.org, chanwoo@kernel.org, myungjoo.ham@samsung.com, kyungmin.park@samsung.com, s.nawrocki@samsung.com, kgene@kernel.org From: Bartlomiej Zolnierkiewicz Message-ID: <1a389137-cab5-124a-e198-8be3bc2ca841@samsung.com> Date: Tue, 14 Jul 2020 09:42:05 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20200710191122.11029-3-lukasz.luba@arm.com> Content-Language: en-US Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrEKsWRmVeSWpSXmKPExsWy7djPc7rnEnnjDT6tFreYeOMKi8X1L89Z LRZ8msFq0f/4NbPF+fMb2C3ONr1ht9j0+BqrxeVdc9gsPvceYbSYcX4fk8XCphZ2i9uNK9gs Dr9pZ7X4duIRowOfx5p5axg9ds66y+6xaVUnm8fmJfUefVtWMXp83iQXwBbFZZOSmpNZllqk b5fAlTF3QSNLwXaxip7vaxgbGNcIdTFyckgImEgcn9PD0sXIxSEksIJRYv/Ru2wQzhdGib6X m9ghnM+MEg9aLzPCtEy/+xvMFhJYziixdmoWRNFbRom/914zgSSEBZIlWne/YAOxRQRUJa5d uAu2g1ngDpPEzuf9YAk2ASuJie2rwCbxCthJtL5oBmtmAWo4cuU2WI2oQITEpweHWSFqBCVO znzCAmJzClhKXL+yBqy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B1QhKnJz5BKyXU8BS4vqVNWBxZgF1iT/zLjFD 2OISt57MZ4Kw5SW2v53DPIFRaBaS9llIWmYhaZmFpGUBI8sqRpHU0uLc9NxiI73ixNzi0rx0 veT83E2MwBjeduznlh2MXe+CDzEKcDAq8fBK+PPEC7EmlhVX5h5ilOBgVhLhdTp7Ok6INyWx siq1KD++qDQntfgQoynQcxOZpUST84HpJa8k3tDU0NzC0tDc2NzYzEJJnLdD4GCMkEB6Yklq dmpqQWoRTB8TB6dUA6Pl3bvPt4Zyl7Ot25k5TXdni2bbwm87It/XvfK8O/O/rP9WuUUvn818 uz/F0iGo4uUbCcauJZ77ppior5O6JPT90loe45+KKRyLbQQi7//1E5+vbOK3xv2x1jZure0R 618E2Xdu731lsKVxX0Nlr/Sm93eDvv9RFp+xtDGj3jwopfpNgAPrfg8lluKMREMt5qLiRABL d4c99wIAAA== X-CMS-MailID: 20200714074206eucas1p29046b2f20810b8cbbfb4bc04a1ed603a X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200710191148eucas1p2552537bb911bde44c783d98808efa07f X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200710191148eucas1p2552537bb911bde44c783d98808efa07f References: <20200710191122.11029-1-lukasz.luba@arm.com> <20200710191122.11029-3-lukasz.luba@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 7/10/20 9:11 PM, Lukasz Luba wrote: > The driver can operate in two modes relaying on devfreq monitoring > mechanism which periodically checks the device status or it can use > interrupts when they are provided by loaded Device Tree. The newly > introduced module parameter can be used to choose between devfreq > monitoring and internal interrupts without modifying the Device Tree. > It also sets devfreq monitoring as default when the parameter is not set > (also the case for default when the driver is not built as a module). Could you please explain why should we leave the IRQ mode support in the dmc driver? What are the advantages over the polling mode? In what scenarios it should be used? [ If this is only for documentation purposes then it should be removed as it would stay in (easily accessible) git history anyway.. ] Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics > Reported-by: Willy Wolff > Signed-off-by: Lukasz Luba > --- > drivers/memory/samsung/exynos5422-dmc.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/drivers/memory/samsung/exynos5422-dmc.c b/drivers/memory/samsung/exynos5422-dmc.c > index e03ee35f0ab5..53bfe6b7b703 100644 > --- a/drivers/memory/samsung/exynos5422-dmc.c > +++ b/drivers/memory/samsung/exynos5422-dmc.c > @@ -12,6 +12,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -21,6 +22,10 @@ > #include "../jedec_ddr.h" > #include "../of_memory.h" > > +static int irqmode; > +module_param(irqmode, int, 0644); > +MODULE_PARM_DESC(irqmode, "Enable IRQ mode (0=off [default], 1=on)"); > + > #define EXYNOS5_DREXI_TIMINGAREF (0x0030) > #define EXYNOS5_DREXI_TIMINGROW0 (0x0034) > #define EXYNOS5_DREXI_TIMINGDATA0 (0x0038) > @@ -1428,7 +1433,7 @@ static int exynos5_dmc_probe(struct platform_device *pdev) > /* There is two modes in which the driver works: polling or IRQ */ > irq[0] = platform_get_irq_byname(pdev, "drex_0"); > irq[1] = platform_get_irq_byname(pdev, "drex_1"); > - if (irq[0] > 0 && irq[1] > 0) { > + if (irq[0] > 0 && irq[1] > 0 && irqmode) { > ret = devm_request_threaded_irq(dev, irq[0], NULL, > dmc_irq_thread, IRQF_ONESHOT, > dev_name(dev), dmc); > @@ -1485,7 +1490,7 @@ static int exynos5_dmc_probe(struct platform_device *pdev) > if (dmc->in_irq_mode) > exynos5_dmc_start_perf_events(dmc, PERF_COUNTER_START_VALUE); > > - dev_info(dev, "DMC initialized\n"); > + dev_info(dev, "DMC initialized, in irq mode: %d\n", dmc->in_irq_mode); > > return 0; > >