diff mbox series

[U-Boot,02/19] dm: cpu: Add timebase frequency to the platdata

Message ID 1542097327-6629-3-git-send-email-bmeng.cn@gmail.com
State Superseded
Delegated to: Andes
Headers show
Series riscv: Adding RISC-V CPU and timer driver | expand

Commit Message

Bin Meng Nov. 13, 2018, 8:21 a.m. UTC
This adds a timebase_freq member to the 'struct cpu_platdata', to
hold the "timebase-frequency" value in the cpu or /cpus node.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
---

 include/cpu.h | 3 +++
 1 file changed, 3 insertions(+)

Comments

Simon Glass Nov. 13, 2018, 8:01 p.m. UTC | #1
On 13 November 2018 at 00:21, Bin Meng <bmeng.cn@gmail.com> wrote:
> This adds a timebase_freq member to the 'struct cpu_platdata', to
> hold the "timebase-frequency" value in the cpu or /cpus node.
>
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> ---
>
>  include/cpu.h | 3 +++
>  1 file changed, 3 insertions(+)

Reviewed-by: Simon Glass <sjg@chromium.org>

Could we have comments for the struct members?
Bin Meng Nov. 14, 2018, 1:14 a.m. UTC | #2
Hi Simon,

On Wed, Nov 14, 2018 at 4:02 AM Simon Glass <sjg@chromium.org> wrote:
>
> On 13 November 2018 at 00:21, Bin Meng <bmeng.cn@gmail.com> wrote:
> > This adds a timebase_freq member to the 'struct cpu_platdata', to
> > hold the "timebase-frequency" value in the cpu or /cpus node.
> >
> > Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> > ---
> >
> >  include/cpu.h | 3 +++
> >  1 file changed, 3 insertions(+)
>
> Reviewed-by: Simon Glass <sjg@chromium.org>
>
> Could we have comments for the struct members?

There are already comments added for the struct members. I am not sure
what additional comments do you want to add?

Regards,
Bin
Lukas Auer Nov. 14, 2018, 9:17 p.m. UTC | #3
Hi Bin,

On Tue, 2018-11-13 at 00:21 -0800, Bin Meng wrote:
> This adds a timebase_freq member to the 'struct cpu_platdata', to
> hold the "timebase-frequency" value in the cpu or /cpus node.
> 
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> ---
> 
>  include/cpu.h | 3 +++
>  1 file changed, 3 insertions(+)
> 

Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>

> diff --git a/include/cpu.h b/include/cpu.h
> index 367c5f4..176a276 100644
> --- a/include/cpu.h
> +++ b/include/cpu.h
> @@ -14,6 +14,8 @@
>   * @device_id:     Driver-defined device identifier
>   * @family:        DMTF CPU Family identifier
>   * @id:            DMTF CPU Processor identifier
> + * @timebase_freq: the current frequency at which the cpu timer
> timebase
> + *		   registers are updated (in HZ)

nit: Hz

Thanks,
Lukas

>   *
>   * This can be accessed with dev_get_parent_platdata() for any
> UCLASS_CPU
>   * device.
> @@ -24,6 +26,7 @@ struct cpu_platdata {
>  	ulong device_id;
>  	u16 family;
>  	u32 id[2];
> +	u32 timebase_freq;
>  };
>  
>  /* CPU features - mostly just a placeholder for now */
Simon Glass Nov. 15, 2018, 7:21 p.m. UTC | #4
Hi Bin,

On 13 November 2018 at 17:14, Bin Meng <bmeng.cn@gmail.com> wrote:
> Hi Simon,
>
> On Wed, Nov 14, 2018 at 4:02 AM Simon Glass <sjg@chromium.org> wrote:
>>
>> On 13 November 2018 at 00:21, Bin Meng <bmeng.cn@gmail.com> wrote:
>> > This adds a timebase_freq member to the 'struct cpu_platdata', to
>> > hold the "timebase-frequency" value in the cpu or /cpus node.
>> >
>> > Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
>> > ---
>> >
>> >  include/cpu.h | 3 +++
>> >  1 file changed, 3 insertions(+)
>>
>> Reviewed-by: Simon Glass <sjg@chromium.org>
>>
>> Could we have comments for the struct members?
>
> There are already comments added for the struct members. I am not sure
> what additional comments do you want to add?

Yes. I'm not sure what I was thinking there.

Regards,
Simon
diff mbox series

Patch

diff --git a/include/cpu.h b/include/cpu.h
index 367c5f4..176a276 100644
--- a/include/cpu.h
+++ b/include/cpu.h
@@ -14,6 +14,8 @@ 
  * @device_id:     Driver-defined device identifier
  * @family:        DMTF CPU Family identifier
  * @id:            DMTF CPU Processor identifier
+ * @timebase_freq: the current frequency at which the cpu timer timebase
+ *		   registers are updated (in HZ)
  *
  * This can be accessed with dev_get_parent_platdata() for any UCLASS_CPU
  * device.
@@ -24,6 +26,7 @@  struct cpu_platdata {
 	ulong device_id;
 	u16 family;
 	u32 id[2];
+	u32 timebase_freq;
 };
 
 /* CPU features - mostly just a placeholder for now */