Re: [U-Boot] [PATCH v6 1/2] x86: Add TSC-specific timer functions

2018-04-30 Thread Simon Glass
Hi Bin, On 25 April 2018 at 21:42, Bin Meng wrote: > Hi Ivan, > > On Tue, Apr 24, 2018 at 4:41 PM, Bin Meng wrote: >> Hi Ivan, >> >> On Tue, Apr 24, 2018 at 7:56 AM, Ivan Gorinov wrote: >>> Hi Bin, >>> >>> On Mon, Apr 23, 2018 at

Re: [U-Boot] [PATCH v6 1/2] x86: Add TSC-specific timer functions

2018-04-25 Thread Bin Meng
Hi Ivan, On Tue, Apr 24, 2018 at 4:41 PM, Bin Meng wrote: > Hi Ivan, > > On Tue, Apr 24, 2018 at 7:56 AM, Ivan Gorinov wrote: >> Hi Bin, >> >> On Mon, Apr 23, 2018 at 01:38:05AM -0600, Bin Meng wrote: >>> > Coreboot timestamp functions and Quark

Re: [U-Boot] [PATCH v6 1/2] x86: Add TSC-specific timer functions

2018-04-24 Thread Bin Meng
Hi Ivan, On Tue, Apr 24, 2018 at 7:56 AM, Ivan Gorinov wrote: > Hi Bin, > > On Mon, Apr 23, 2018 at 01:38:05AM -0600, Bin Meng wrote: >> > Coreboot timestamp functions and Quark memory reference code use >> > get_tbclk() to get TSC frequency. This will not work if another

Re: [U-Boot] [PATCH v6 1/2] x86: Add TSC-specific timer functions

2018-04-23 Thread Ivan Gorinov
Hi Bin, On Mon, Apr 23, 2018 at 01:38:05AM -0600, Bin Meng wrote: > > Coreboot timestamp functions and Quark memory reference code use > > get_tbclk() to get TSC frequency. This will not work if another > > early timer is selected. > > Thanks for working on this. But get_tbclk() is one API

Re: [U-Boot] [PATCH v6 1/2] x86: Add TSC-specific timer functions

2018-04-23 Thread Andy Shevchenko
On Fri, 2018-04-20 at 11:00 -0700, Ivan Gorinov wrote: > On Fri, Apr 20, 2018 at 06:25:08AM -0600, Andy Shevchenko wrote: > > > - while (rdtsc() < final_tsc) > > > - ; > > > + while (rdtsc() - start_tsc < ticks); > > > > I would rather preserve existing style. > > OK. Existing style

Re: [U-Boot] [PATCH v6 1/2] x86: Add TSC-specific timer functions

2018-04-23 Thread Bin Meng
Hi Ivan, On Mon, Apr 23, 2018 at 3:38 PM, Bin Meng wrote: > Hi Ivan, > > On Fri, Apr 13, 2018 at 6:12 AM, Ivan Gorinov wrote: >> Coreboot timestamp functions and Quark memory reference code use >> get_tbclk() to get TSC frequency. This will not work

Re: [U-Boot] [PATCH v6 1/2] x86: Add TSC-specific timer functions

2018-04-23 Thread Bin Meng
Hi Ivan, On Fri, Apr 13, 2018 at 6:12 AM, Ivan Gorinov wrote: > Coreboot timestamp functions and Quark memory reference code use > get_tbclk() to get TSC frequency. This will not work if another > early timer is selected. > Thanks for working on this. But get_tbclk() is

Re: [U-Boot] [PATCH v6 1/2] x86: Add TSC-specific timer functions

2018-04-20 Thread Ivan Gorinov
On Fri, Apr 20, 2018 at 06:25:08AM -0600, Andy Shevchenko wrote: > > Coreboot timestamp functions and Quark memory reference code use > > get_tbclk() to get TSC frequency. This will not work if another > > early timer is selected. > > > > Add tsc_rate_mhz() function and use it in the code that

Re: [U-Boot] [PATCH v6 1/2] x86: Add TSC-specific timer functions

2018-04-20 Thread Andy Shevchenko
On Thu, 2018-04-12 at 15:12 -0700, Ivan Gorinov wrote: > Coreboot timestamp functions and Quark memory reference code use > get_tbclk() to get TSC frequency. This will not work if another > early timer is selected. > > Add tsc_rate_mhz() function and use it in the code that specifically > needs

[U-Boot] [PATCH v6 1/2] x86: Add TSC-specific timer functions

2018-04-12 Thread Ivan Gorinov
Coreboot timestamp functions and Quark memory reference code use get_tbclk() to get TSC frequency. This will not work if another early timer is selected. Add tsc_rate_mhz() function and use it in the code that specifically needs to get TSC rate regardless of currently selected early timer.