[PATCH 1/1] clk: kendryte/pll.h: do not redefine nop()

Bin Meng bmeng.cn at gmail.com
Mon Aug 3 05:29:20 CEST 2020


On Tue, Jul 28, 2020 at 11:52 PM Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>
> The kendryte PLL code uses nop as barrier. The macro is not defined for
> the sandbox on x86 but is defined on RISC-V.

Is this kendryte PLL driver built for Sandbox?

>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> ---
>  include/kendryte/pll.h | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/include/kendryte/pll.h b/include/kendryte/pll.h
> index c8e3200799..55a40b9c97 100644
> --- a/include/kendryte/pll.h
> +++ b/include/kendryte/pll.h
> @@ -7,6 +7,7 @@
>
>  #include <clk.h>
>  #include <test/export.h>
> +#include <asm/io.h>
>
>  #define K210_PLL_CLKR GENMASK(3, 0)
>  #define K210_PLL_CLKF GENMASK(9, 4)
> @@ -43,9 +44,13 @@ struct k210_pll_config {
>  #ifdef CONFIG_UNIT_TEST
>  TEST_STATIC int k210_pll_calc_config(u32 rate, u32 rate_in,
>                                      struct k210_pll_config *best);
> +
> +#ifndef nop
>  #define nop()
>  #endif

Maybe we can fix the kendryte PLL driver to use:

asm volatile ("nop");

??

Regards,
Bin


More information about the U-Boot mailing list