[PATCH v1 01/15] mips: octeon: Move CVMX_SYNC from octeon_ddr.h to cvmx-regs.h

Stefan Roese sr at denx.de
Wed Apr 7 09:12:27 CEST 2021


This makes is easier to use this macro from non-DDR related files.

Signed-off-by: Stefan Roese <sr at denx.de>
---

 arch/mips/mach-octeon/include/mach/cvmx-regs.h  | 1 +
 arch/mips/mach-octeon/include/mach/octeon_ddr.h | 2 --
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/mips/mach-octeon/include/mach/cvmx-regs.h b/arch/mips/mach-octeon/include/mach/cvmx-regs.h
index 56528bc1bfde..9e86be8f6342 100644
--- a/arch/mips/mach-octeon/include/mach/cvmx-regs.h
+++ b/arch/mips/mach-octeon/include/mach/cvmx-regs.h
@@ -68,6 +68,7 @@
 #define CVMX_POP(result, input)						\
 	asm("pop %[rd],%[rs]" : [rd] "=d"(result) : [rs] "d"(input))
 
+#define CVMX_SYNC   asm volatile("sync\n" : : : "memory")
 #define CVMX_SYNCW  asm volatile("syncw\nsyncw\n" : : : "memory")
 #define CVMX_SYNCS  asm volatile("syncs\n" : : : "memory")
 #define CVMX_SYNCWS asm volatile("syncws\n" : : : "memory")
diff --git a/arch/mips/mach-octeon/include/mach/octeon_ddr.h b/arch/mips/mach-octeon/include/mach/octeon_ddr.h
index 97e7b554ff78..0b5be06daab9 100644
--- a/arch/mips/mach-octeon/include/mach/octeon_ddr.h
+++ b/arch/mips/mach-octeon/include/mach/octeon_ddr.h
@@ -120,8 +120,6 @@ static inline int ddr_verbose(void)
 #define CVMX_TMP_STR(x) CVMX_TMP_STR2(x)
 #define CVMX_TMP_STR2(x) #x
 
-#define CVMX_SYNC asm volatile ("sync" : : : "memory")
-
 #define CVMX_CACHE(op, address, offset)					\
 	asm volatile ("cache " CVMX_TMP_STR(op) ", "			\
 		      CVMX_TMP_STR(offset) "(%[rbase])"			\
-- 
2.31.1



More information about the U-Boot mailing list