]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
rockchip: ram: fix debug funcfion define when RAM_ROCKCHIP_DEBUG not set
authorKever Yang <kever.yang@rock-chips.com>
Mon, 20 Jul 2020 10:34:12 +0000 (18:34 +0800)
committerKever Yang <kever.yang@rock-chips.com>
Wed, 22 Jul 2020 12:22:33 +0000 (20:22 +0800)
The empty function define should not be in the header file, or else the
build will error with function multi definition after CONFIG_RAM_ROCKCHIP_DEBUG
is disabled.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
arch/arm/include/asm/arch-rockchip/sdram_common.h
drivers/ram/rockchip/sdram_common.c

index 36d31156be25f749b206a673883870e11e593615..5efa6e9445d5008d3a655167ea6d7a83d60b2647 100644 (file)
@@ -114,25 +114,10 @@ struct sdram_base_params {
 #define SYS_REG_ENC_CS1_COL(n, ch)     (((n) - 9) << (0 + 2 * (ch)))
 #define SYS_REG_DEC_CS1_COL(n, ch)     (9 + (((n) >> (0 + 2 * (ch))) & 0x3))
 
-#if !defined(CONFIG_RAM_ROCKCHIP_DEBUG)
-inline void sdram_print_dram_type(unsigned char dramtype)
-{
-}
-
-inline void sdram_print_ddr_info(struct sdram_cap_info *cap_info,
-                                struct sdram_base_params *base)
-{
-}
-
-inline void sdram_print_stride(unsigned int stride)
-{
-}
-#else
 void sdram_print_dram_type(unsigned char dramtype);
 void sdram_print_ddr_info(struct sdram_cap_info *cap_info,
                          struct sdram_base_params *base);
 void sdram_print_stride(unsigned int stride);
-#endif /* CONFIG_RAM_ROCKCHIP_DEBUG */
 
 void sdram_org_config(struct sdram_cap_info *cap_info,
                      struct sdram_base_params *base,
index 6bc51572b2f1a563e43995040eb22894b186d7b1..b3e7421d0854a50157fc89807c38a78ba9a273ba 100644 (file)
@@ -117,6 +117,19 @@ void sdram_print_stride(unsigned int stride)
                printf("no stride\n");
        }
 }
+#else
+inline void sdram_print_dram_type(unsigned char dramtype)
+{
+}
+
+inline void sdram_print_ddr_info(struct sdram_cap_info *cap_info,
+                                struct sdram_base_params *base)
+{
+}
+
+inline void sdram_print_stride(unsigned int stride)
+{
+}
 #endif
 
 /*