Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1440751

Re: [PATCH 2/2] soc: samsung: Add support for Exynos7 PMU

Path csiph.com!goblin1!goblin.stu.neva.ru!news2.arglkargh.de!news.mixmin.net!aioe.org!gothmog.csi.it!bofh.it!news.nic.it!robomod
From Sylwester Nawrocki <s.nawrocki@samsung.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] soc: samsung: Add support for Exynos7 PMU
Date Mon, 11 Jul 2016 18:40:01 +0200
Message-ID <rTMpr-19f-7@gated-at.bofh.it> (permalink)
References <rRBou-5cR-7@gated-at.bofh.it> <rRBou-5cR-31@gated-at.bofh.it> <rRPB8-6fX-27@gated-at.bofh.it> <rTKH0-8jQ-11@gated-at.bofh.it>
X-Auditid cbfec7f5-f792a6d000001302-d1-5783cb76c417
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0
MIME-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 7bit
X-Brightmail-Tracker H4sIAAAAAAAAA+NgFjrHLMWRmVeSWpSXmKPExsVy+t/xK7plp5vDDfYcV7F4/cLQYs1fJYve BVfZLDY9vsZqcXnXHDaLGef3MTmweeycdZfdY/OSeo++LasYPT5vkgtgieKySUnNySxLLdK3 S+DKONDXxlJwSKDi0OmnzA2MXTxdjJwcEgImEjPvv2OGsMUkLtxbz9bFyMUhJLCUUWJ271x2 COc5o8S3J+0sIFXCAk4Sxx/8A+rg4BARSJKY8K8CoqafSeLkvdtMIA6zwG1GiVlrpjGBNLAJ GEr0Hu1jBLF5BbQkrk6eCxZnEVCV+PJqMRuILSoQIfFk7kmoGkGJH5PvgS3jFAiWWHnuHyvI MmYBdYkpU3JBwswC8hKb17xlnsAoMAtJxyyEqllIqhYwMq9iFE0tTS4oTkrPNdIrTswtLs1L 10vOz93ECAnlrzsYlx6zOsQowMGoxMPbcbI5XIg1say4MvcQowQHs5IIb9QRoBBvSmJlVWpR fnxRaU5q8SFGaQ4WJXHembvehwgJpCeWpGanphakFsFkmTg4pRoYRXPC9zNd5/pRu/TEgxhd Zlt7w4T49d2cK4/uYmT59pn3cn//lNniTl+Sk/kvFzBMO79SvHsRt1zHPMPa3QyXiy+3yluL xW+6MCP56875Ye2HNfSrV2904/X9G5j/WeGsmtc+k3dzf37X/vbzc4fmyUt1B1skDVb4nprn Liy60a0luXbX9EsHlViKMxINtZiLihMBIE8WlWECAAA=
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 48
Organization linux.* mail to news gateway
X-Original-Cc linux-samsung-soc <linux-samsung-soc@vger.kernel.org>, linux-arm-kernel <linux-arm-kernel@lists.infradead.org>, Kukjin Kim <kgene.kim@samsung.com>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
X-Original-Date Mon, 11 Jul 2016 18:38:10 +0200
X-Original-Message-ID <5783CB72.6030501@samsung.com>
X-Original-References <1467750507-13853-1-git-send-email-a.kesavan@samsung.com> <1467750507-13853-3-git-send-email-a.kesavan@samsung.com> <CAJKOXPc=RZEe_zQvnmxXRttppJfGJwyjmkF0XxAnV0YnGxvcyA@mail.gmail.com> <CAM4voanpvkQJ5GcKeXoLcpmTMXkh7f8aznQHDS-0O5YeaVpeuw@mail.gmail.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1440751

Show key headers only | View raw


On 07/11/2016 04:44 PM, Abhilash Kesavan wrote:
>>> +       /*
>>> >> +        * Set clock freeze cycle count to 0 before and after arm clamp or
>>> >> +        * reset signal transition
>>> >> +        */
>>> >> +       node = of_find_compatible_node(NULL, NULL,
>>> >> +                               "samsung,exynos7-clock-atlas");
>>> >> +       if (node) {
>>> >> +               atlas_cmu_base = of_iomap(node, 0);
>>> >> +               if (!atlas_cmu_base)
>>> >> +                       return;
>>> >> +
>>> >> +               __raw_writel(0x0,
>>> >> +                               atlas_cmu_base + EXYNOS7_CORE_ARMCLK_STOPCTRL);
>>> >> +               iounmap(atlas_cmu_base);
>> >
>> > Missing:
>> > of_node_put(node);
>> >
>> > ...but I think this creates unnecessary dependency on different
>> > compatible. I understand that disabling the EXTENDED_CLKSTOP is needed
>> > after configuring the PMU so this code belongs here. However
>> > everything you need is just a mapping of CMU address. The PMU driver
>> > should receive in bindings everything it needs to do its work. Either
>> > it is a phandle to something or an address for iomap. In this case the
>> > PMU should probably get two addresses: PMU and optionally CMU (part of
>> > CMU for example). Of course bindings would have to be updated.
>
> I will add an optional CMU phandle to the PMU bindings.

We could additionally split the CMU_ATLAS region into 2 regions in DT
(derived from exynos7420 documentation):

reg = <0x11800000 0xF08>, // offsets 0x0000...0x0F04
      <0x11801000 0x8C>,  // offsets 0x1000...0x1088

so that the first can be mapped by the clk driver and the second by 
the PMU driver? It seems the first region is strictly clock functionality
related, while the second contains power control related and other 
registers.

However I'm not sure it is a good idea, for consistency this would need 
to be done also for CMU_APOLLO, CMU_MIF{0...3}.  All these CMUs don't have 
DT bindings defined yet though and there is no corresponding dts entries.

-- 
Thanks,
Sylwester

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH 2/2] soc: samsung: Add support for Exynos7 PMU Abhilash Kesavan <kesavan.abhilash@gmail.com> - 2016-07-11 16:50 +0200
  Re: [PATCH 2/2] soc: samsung: Add support for Exynos7 PMU Sylwester Nawrocki <s.nawrocki@samsung.com> - 2016-07-11 18:40 +0200
    Re: [PATCH 2/2] soc: samsung: Add support for Exynos7 PMU Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-07-12 11:00 +0200
  Re: [PATCH 2/2] soc: samsung: Add support for Exynos7 PMU Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-07-12 10:50 +0200

csiph-web