Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp935930ybi; Fri, 14 Jun 2019 05:59:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqzGwC9FfLABh6HCEv7d4ek8IUDC7xRDVAU18ma84dGnYY6FqGYhkaBElyBm5/CRBX3jiQKY X-Received: by 2002:aa7:8e50:: with SMTP id d16mr91192015pfr.65.1560517194128; Fri, 14 Jun 2019 05:59:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560517194; cv=none; d=google.com; s=arc-20160816; b=fyIJjyWCzqzn92Qfyr1nsOOcxeNF+RqVJh3pPElweWynpLEQluPdHnB6ipyLJSWGgM GuE0v8XZAQG0mbwRwTN35LkphCEaUjrU6Bu0cTZJkbzmUuay156WlvLnxyzx28mJo+mJ PJO9hsMgdDlGlpQB7LFyJZ8PkXyAYhPNdTT6d7bGxwHbTkAz/4OXWAZHj/sH4loHO4IB kLTtfkBTv+ddvuf2Uk0egBNZXQv2T7PZeuy5PwQq/Z59WXOMCImIC+9saRMBkCx2PqAU e8mGeDTnEVXOzVGDW0bQxaROk0+M6RjfTdqWGToJAoYFJDF0fhdehLbaZjT/ieUcNs52 0BGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=uQ8yzHOjkW41ivb+1Z6T8xTF6SFBEluVIUwyeYGrPg8=; b=bBeJxsIhb4iQrqk+Yeg7zja/PFaEE13W95DZzl5C6qdJAHQrbzkw01awHBCv0lQCIv Pl14H038hZU6KMLvSUSnsAUyxGH2MpdHJP/aSerr94BaG3atOUowpWxyT5Mn0InyWHtY U2UqQ5q5hRfCZqZxgGaKgrVCDX0/vPmIkPjdxuL7jSgocNBUipV7SgMB1zwcuWl0PK9s gtJQoUNURkM5tU7ONIpbCIRkyLqESkQqwj8Q30VUBebBN1WfcNaQxewTfx0UbK4oYI7Q S6frEfm8moSoNQHFwIGrwAZ43d2v3bYXqaY7ZLDbkOSHyNcOdC0TkwfqiIqOCs9ui6lz ZPgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QxTgsjt5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 21si2471602pgy.283.2019.06.14.05.59.38; Fri, 14 Jun 2019 05:59:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QxTgsjt5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727954AbfFNM7K (ORCPT + 99 others); Fri, 14 Jun 2019 08:59:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:45336 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727654AbfFNM7K (ORCPT ); Fri, 14 Jun 2019 08:59:10 -0400 Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3F629217D7; Fri, 14 Jun 2019 12:59:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560517148; bh=d5XKOHRlv9JZdac1o7rwUyg/Yr9lYppTOJuFXN+lS4s=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=QxTgsjt5ppQyUB47pRpIZqkG891XIXtlnRvxHcD9rgMTioeUc/N/j3eUlvT/ZkwDt uEfm3ZZqSEYsH99v+4sc9jY8rahLSQVh8S+9jkjjAZwCxKjCs0/xb414FLz3cuqI/b 0+msLxD6tFOFtktEmJxcDJs17xDVP/M+kubU3PMc= Received: by mail-lf1-f46.google.com with SMTP id u10so1648119lfm.12; Fri, 14 Jun 2019 05:59:08 -0700 (PDT) X-Gm-Message-State: APjAAAW/Osq9z6M5D2ivv3aNtNgdcMihClVGMRZPuxbBaRCHYLU/ejg0 jPtRR1p/nE1Js8Eh5FkUFOSLCNKZg79z2GHlrV0= X-Received: by 2002:ac2:4891:: with SMTP id x17mr12738142lfc.60.1560517146467; Fri, 14 Jun 2019 05:59:06 -0700 (PDT) MIME-Version: 1.0 References: <20190614095309.24100-1-l.luba@partner.samsung.com> <20190614095309.24100-9-l.luba@partner.samsung.com> In-Reply-To: <20190614095309.24100-9-l.luba@partner.samsung.com> From: Krzysztof Kozlowski Date: Fri, 14 Jun 2019 14:58:55 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v10 08/13] drivers: memory: add DMC driver for Exynos5422 To: Lukasz Luba Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, "linux-samsung-soc@vger.kernel.org" , linux-clk@vger.kernel.org, mturquette@baylibre.com, sboyd@kernel.org, =?UTF-8?B?QmFydMWCb21pZWogxbtvxYJuaWVya2lld2ljeg==?= , kgene@kernel.org, Chanwoo Choi , kyungmin.park@samsung.com, Marek Szyprowski , s.nawrocki@samsung.com, myungjoo.ham@samsung.com, keescook@chromium.org, tony@atomide.com, jroedel@suse.de, treding@nvidia.com, digetx@gmail.com, gregkh@linuxfoundation.org, willy.mh.wolff.ml@gmail.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 14 Jun 2019 at 11:53, Lukasz Luba wrote: > > This patch adds driver for Exynos5422 Dynamic Memory Controller. > The driver provides support for dynamic frequency and voltage scaling for > DMC and DRAM. It supports changing timings of DRAM running with different > frequency. There is also an algorithm to calculate timigns based on > memory description provided in DT. > The patch also contains needed MAINTAINERS file update. > > Signed-off-by: Lukasz Luba > --- > MAINTAINERS | 8 + > drivers/memory/samsung/Kconfig | 17 + > drivers/memory/samsung/Makefile | 1 + > drivers/memory/samsung/exynos5422-dmc.c | 1262 +++++++++++++++++++++++ > 4 files changed, 1288 insertions(+) > create mode 100644 drivers/memory/samsung/exynos5422-dmc.c > > diff --git a/MAINTAINERS b/MAINTAINERS > index 57f496cff999..6ffccfd95351 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -3470,6 +3470,14 @@ S: Maintained > F: drivers/devfreq/exynos-bus.c > F: Documentation/devicetree/bindings/devfreq/exynos-bus.txt > > +DMC FREQUENCY DRIVER FOR SAMSUNG EXYNOS5422 Eh, more comments from my side. "For the hard of thinking, this list is meant to remain in alphabetical order." > +M: Lukasz Luba > +L: linux-pm@vger.kernel.org > +L: linux-samsung-soc@vger.kernel.org > +S: Maintained > +F: drivers/memory/samsung/exynos5422-dmc.c > +F: Documentation/devicetree/bindings/memory-controllers/exynos5422-dmc.txt > + > BUSLOGIC SCSI DRIVER > M: Khalid Aziz > L: linux-scsi@vger.kernel.org > diff --git a/drivers/memory/samsung/Kconfig b/drivers/memory/samsung/Kconfig > index 79ce7ea58903..c93baa029654 100644 > --- a/drivers/memory/samsung/Kconfig > +++ b/drivers/memory/samsung/Kconfig > @@ -5,6 +5,23 @@ config SAMSUNG_MC > Support for the Memory Controller (MC) devices found on > Samsung Exynos SoCs. > > +config ARM_EXYNOS5422_DMC Why you added prefix of ARM to CONFIG_? I think none of other Exynos Kconfig options follow such convention (except devfreq). > + tristate "ARM EXYNOS5422 Dynamic Memory Controller driver" > + depends on ARCH_EXYNOS > + select DDR In general select should be used only for non-visible symbols and DDR is visible. Use depends. > + select PM_DEVFREQ This definitely cannot be select. You do not select entire subsystem because some similar driver was chosen. > + select DEVFREQ_GOV_SIMPLE_ONDEMAND > + select DEVFREQ_GOV_USERSPACE I think only simple_ondemand is needed. Is userspace governor necessary for working? Or actually maybe both could be skipped? > + select PM_DEVFREQ_EVENT Again, depends. > + select PM_OPP > + help > + This adds driver for Exynos5422 DMC (Dynamic Memory Controller). > + The driver provides support for Dynamic Voltage and Frequency Scaling in > + DMC and DRAM. It also supports changing timings of DRAM running with > + different frequency. The timings are calculated based on DT memory > + information. > + > + > if SAMSUNG_MC Why this is outside of SAMSUNG_MC? Best regards, Krzysztof