From: Sean Anderson Date: Mon, 3 Aug 2020 06:10:46 -0400 Subject: [PATCH 1/1] clk: kendryte/pll.h: do not redefine nop() In-Reply-To: References: <20200728155223.95356-1-xypron.glpk@gmx.de> Message-ID: <94673a2b-b834-5ef1-51b0-eb482a9f3385@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 8/2/20 11:29 PM, Bin Meng wrote: > On Tue, Jul 28, 2020 at 11:52 PM Heinrich Schuchardt 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? Yes. I added a unit test for the parameter calculation function. > >> >> Signed-off-by: Heinrich Schuchardt >> --- >> 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 >> #include >> +#include >> >> #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"); Is that preferred over the nop macro? --Sean