summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2020-07-28 17:52:23 +0200
committerAndes <uboot@andestech.com>2020-08-25 09:33:35 +0800
commit183f1e27123769c41b3a73b92839497d4812f790 (patch)
treef2400ae126bffb197a73a308443fac0da3278ed6
parent3ab260105214d56a419c84e6dacbb8ae514548f1 (diff)
clk: kendryte/pll.h: do not redefine nop()
The kendryte PLL code uses nop as barrier. The macro is not defined for the sandbox on x86 but is defined on RISC-V. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Bin Meng <bin.meng@windriver.com>
-rw-r--r--include/kendryte/pll.h5
1 files changed, 5 insertions, 0 deletions
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
+#endif
+
extern const struct clk_ops k210_pll_ops;
struct clk *k210_register_pll_struct(const char *name, const char *parent_name,