[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7071b6fa-f7ed-c879-4a43-44100dbe6121@microchip.com>
Date: Tue, 15 Oct 2019 09:23:35 +0000
From: <Claudiu.Beznea@...rochip.com>
To: <daniel.lezcano@...aro.org>, <robh+dt@...nel.org>,
<mark.rutland@....com>, <linux@...linux.org.uk>, <nsekhar@...com>,
<bgolaszewski@...libre.com>, <monstr@...str.eu>,
<john@...ozen.org>, <ralf@...ux-mips.org>, <paul.burton@...s.com>,
<jhogan@...nel.org>, <lftan@...era.com>, <tglx@...utronix.de>,
<vgupta@...opsys.com>, <marc.zyngier@....com>,
<patrice.chotard@...com>, <mcoquelin.stm32@...il.com>,
<alexandre.torgue@...com>, <eric@...olt.net>, <wahrenst@....net>,
<f.fainelli@...il.com>, <rjui@...adcom.com>,
<sbranden@...adcom.com>, <bcm-kernel-feedback-list@...adcom.com>,
<linus.walleij@...aro.org>, <shc_work@...l.ru>, <kgene@...nel.org>,
<krzk@...nel.org>, <ysato@...rs.sourceforge.jp>,
<liviu.dudau@....com>, <sudeep.holla@....com>,
<lorenzo.pieralisi@....com>, <shawnguo@...nel.org>,
<s.hauer@...gutronix.de>, <kernel@...gutronix.de>,
<festevam@...il.com>, <linux-imx@....com>, <baohua@...nel.org>,
<Nicolas.Ferre@...rochip.com>, <alexandre.belloni@...tlin.com>,
<Ludovic.Desroches@...rochip.com>, <baruch@...s.co.il>,
<u.kleine-koenig@...gutronix.de>, <guoren@...nel.org>,
<kaloz@...nwrt.org>, <khalasa@...p.pl>, <ssantosh@...nel.org>,
<vz@...ia.com>, <slemieux.tyco@...il.com>, <khilman@...libre.com>,
<avifishman70@...il.com>, <tmaimon77@...il.com>,
<tali.perry1@...il.com>, <venture@...gle.com>, <yuenn@...gle.com>,
<benjaminfair@...gle.com>, <afaerber@...e.de>,
<manivannan.sadhasivam@...aro.org>, <narmstrong@...libre.com>,
<agross@...nel.org>, <palmer@...ive.com>, <aou@...s.berkeley.edu>,
<heiko@...ech.de>, <orsonzhai@...il.com>, <baolin.wang@...aro.org>,
<zhang.lyra@...il.com>, <maxime.ripard@...tlin.com>,
<wens@...e.org>, <thierry.reding@...il.com>,
<jonathanh@...dia.com>, <linux@...sktech.co.nz>,
<john.stultz@...aro.org>, <sboyd@...nel.org>,
<matthias.bgg@...il.com>
CC: <devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-mips@...r.kernel.org>, <nios2-dev@...ts.rocketboards.org>,
<linux-snps-arc@...ts.infradead.org>,
<linux-stm32@...md-mailman.stormreply.com>,
<linux-rpi-kernel@...ts.infradead.org>,
<linux-samsung-soc@...r.kernel.org>,
<uclinux-h8-devel@...ts.sourceforge.jp>,
<linux-amlogic@...ts.infradead.org>, <openbmc@...ts.ozlabs.org>,
<linux-oxnas@...ups.io>, <linux-arm-msm@...r.kernel.org>,
<linux-unisoc@...ts.infradead.org>,
<linux-riscv@...ts.infradead.org>,
<linux-rockchip@...ts.infradead.org>,
<linux-tegra@...r.kernel.org>, <linux-mediatek@...ts.infradead.org>
Subject: Re: [PATCH 0/7] add support for clocksource/clockevent DT selection
Hi Daniel,
On 13.10.2019 21:16, Daniel Lezcano wrote:
> Hi Claudiu,
>
> sorry for the delay, I was OoO again.
No problem, thank you for your reply.
>
> On 03/10/2019 12:43, Claudiu.Beznea@...rochip.com wrote:
>>
>>
>> On 02.10.2019 16:35, Claudiu Beznea wrote:
>>> Hi Daniel,
>>>
>>> Taking into account that Rob doesn't agree with the solution proposed in
>>> this series do you think there is a chance to merge this driver as is?
>>
>> Sorry, I was talking here about the driver at [1].
>>
>> [1] https://lore.kernel.org/lkml/1552580772-8499-1-git-send-email-claudiu.beznea@microchip.com/
>
> Damn! 7 months old. I'm truly sorry we do not have progress on this. Let
> fix this once and for all.
>
> In the driver:
>
> ret = of_property_read_u32(node, "clock-frequency", &freq);
>
> It is unclear how is used this property. It should be the frequency
> driving the timer, but can we get from a clk_get_rate() and a fixed divider?
>
The timer could be driven by 2 clock sources, one is called peripheral
clock and is the clock that is also driving the IP itself, and one is
called generic clock (this could drive only the timer itself) and should be
at least 3 times lower than the peripheral clock.
We could choose the clock driving the timer by setting the PIT64B_MR.SGCLK
bit (0 - means the timer itself is driven by peripheral clock, 1 - means
the timer is driven by the generic clock).
The timer clock source could be divided by MR.PRES + 1.
So, I used the clock-frequency DT binding to let user choose the timer's
frequency. Based on the value provided via this DT binding the best clock
source and prescaler is chosen via mchp_pit64b_pres_prepare() function.
As the datasheet for the product that is using this IP is open now, I'm
inserting here a link to it [1].
Thank you,
Claudiu Beznea
[1]
http://ww1.microchip.com/downloads/en/DeviceDoc/SAM9X60-Data-Sheet-DS60001579A.pdf
>
Powered by blists - more mailing lists