Skip to content

Commit

Permalink
rockchip: ram: fix debug funcfion define when RAM_ROCKCHIP_DEBUG not set
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
keveryang committed Jul 22, 2020
1 parent 40794c8 commit b32858c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
15 changes: 0 additions & 15 deletions arch/arm/include/asm/arch-rockchip/sdram_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
13 changes: 13 additions & 0 deletions drivers/ram/rockchip/sdram_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

/*
Expand Down

0 comments on commit b32858c

Please sign in to comment.