On 2/3/21 3:01 PM, Bin Meng wrote:
> From: Bin Meng <bin.m...@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.m...@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é <f4...@amsat.org>


Reply via email to