[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/2] hw/ppc: e500: Use a macro for the platform clock frequen
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH 1/2] hw/ppc: e500: Use a macro for the platform clock frequency |
Date: |
Wed, 3 Feb 2021 15:10:31 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 |
On 2/3/21 3:01 PM, Bin Meng wrote:
> From: Bin Meng <bin.meng@windriver.com>
>
> At present the platform clock frequency is using a magic number.
> Convert it to a macro and use it everywhere.
>
> Signed-off-by: Bin Meng <bin.meng@windriver.com>
> ---
>
> hw/ppc/e500.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c
> index c64b5d0..672ccd5 100644
> --- a/hw/ppc/e500.c
> +++ b/hw/ppc/e500.c
> @@ -74,6 +74,8 @@
> #define MPC8544_I2C_IRQ 43
> #define RTC_REGS_OFFSET 0x68
>
> +#define PLATFORM_CLK_FREQ 400000000
Consider 1/ using unit in variable name and 2/ decompose:
#define PLATFORM_CLK_FREQ_HZ (400 * 1000 * 1000)
Regardless:
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>