Re: [PATCH v2 3/4] clock: Add clock_ns_to_ticks() function

2021-02-11 Thread Luc Michel
On 13:20 Tue 09 Feb , Peter Maydell wrote: > Add a clock_ns_to_ticks() function which does the opposite of > clock_ticks_to_ns(): given a duration in nanoseconds, it returns the > number of clock ticks that would happen in that time. This is useful > for devices that have a free running counte

Re: [PATCH v2 3/4] clock: Add clock_ns_to_ticks() function

2021-02-10 Thread Philippe Mathieu-Daudé
On 2/9/21 2:20 PM, Peter Maydell wrote: > Add a clock_ns_to_ticks() function which does the opposite of > clock_ticks_to_ns(): given a duration in nanoseconds, it returns the > number of clock ticks that would happen in that time. This is useful > for devices that have a free running counter regis

Re: [PATCH v2 3/4] clock: Add clock_ns_to_ticks() function

2021-02-10 Thread Hao Wu
On Tue, Feb 9, 2021 at 5:27 AM Peter Maydell wrote: > Add a clock_ns_to_ticks() function which does the opposite of > clock_ticks_to_ns(): given a duration in nanoseconds, it returns the > number of clock ticks that would happen in that time. This is useful > for devices that have a free running

[PATCH v2 3/4] clock: Add clock_ns_to_ticks() function

2021-02-09 Thread Peter Maydell
Add a clock_ns_to_ticks() function which does the opposite of clock_ticks_to_ns(): given a duration in nanoseconds, it returns the number of clock ticks that would happen in that time. This is useful for devices that have a free running counter register whose value can be calculated when it is rea