lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 21 Oct 2019 08:58:10 +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 18.10.2019 23:24, Daniel Lezcano wrote:
> Hi Claudiu,
> 
> On 15/10/2019 11:23, Claudiu.Beznea@...rochip.com wrote:
> 
> [ ... ]
> 
>> 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.
> 
> I'm willing to take the driver but I doubt the purpose of the
> clock-frequency is to let the user choose the frequency.
> 

I found this approach in the following already integrated drivers:
drivers/clocksource/armv7m_systick.c
drivers/clocksource/bcm2835_timer.c
drivers/clocksource/bcm_kona_timer.c
drivers/clocksource/mips-gic-timer.c
drivers/clocksource/mps2-timer.c
drivers/clocksource/timer-qcom.c
drivers/clocksource/arm_arch_timer.c

Looking through the documentation of these, most of them document this DT
property as the frequency of the clock that drivers the timer, but none of
them seems to have some IP internal dividers so that the timer to tick at
different frequency than the clock that feeds the IP. From the
documentation of the above drivers;
drivers/clocksource/armv7m_systick.c
	- clock-frequency : The rate in HZ in input of the ARM SysTick

drivers/clocksource/bcm2835_timer.c
	- clock-frequency : The frequency of the clock that drives the counter, in
Hz.
drivers/clocksource/bcm_kona_timer.c
	- clock-frequency: frequency that the clock operates

drivers/clocksource/mips-gic-timer.c
	clock-frequency : Clock frequency at which the GIC timers operate.
drivers/clocksource/mps2-timer.c
	- clock-frequency : The rate in HZ in input of the ARM MPS2 timer

drivers/clocksource/timer-qcom.c
	- clock-frequency : The frequency of the debug timer and the general
purpose
                    timer(s) in Hz in that order.


This is why I also chose this DT bindings.

If you want I can stick to a fixed frequency hard coded in the driver.
Please let me know if this would be OK for you.

Thank you,
Claudiu Beznea

> 
> [ ... ]
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ