diff mbox series

[PATHv1,8/9] omap3: rename mem_init

Message ID 20231204120446.3277-9-maxim.uvarov@linaro.org
State New
Headers show
Series net fixes prior lwip | expand

Commit Message

Maxim Uvarov Dec. 4, 2023, 12:04 p.m. UTC
Rename mem_init to solve following compilation error with lwip
integrated code:
+arm-linux-gnueabi-ld.bfd: net/lwip/lwip-external/src/core/mem.o: in
  function `mem_init':
+net/lwip/lwip-external/src/core/mem.c:162: multiple definition
  of `mem_init';
  arch/arm/mach-omap2/omap3/sdrc.o:arch/arm/mach-omap2/omap3/
  sdrc.c:240: first defined here
+make[1]: *** [Makefile:1764: u-boot] Error 1
+/opt/gcc-13.1.0-nolibc/arm-linux-gnueabi/bin/../lib/gcc/arm-linux-
  gnueabi/13.1.0/../../
../../arm-linux-gnueabi/bin/ld: net/lwip/lwip-external/src/core/
  mem.o (symbol from
  plugin): in function `mem_init':
+(.text+0x0): multiple definition of `mem_init'; arch/arm/mach-omap2/
  omap3/emif4.o
  (symbol from plugin):(.text+0x0): first defined here
+collect2: error: ld returned 1 exit status
+(.text+0x0): multiple definition of `mem_init'; arch/arm/mach-omap2/
  omap3/sdrc.o
  (symbol from plugin):(.text+0x0): first defined here
+Image 'simple-bin' is missing external blobs and is non-functional:
   tee-os
+/binman/simple-bin/fit/images/op-tee/tee-os (tee-os):

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
---
 arch/arm/include/asm/arch-omap3/mem.h | 2 +-
 arch/arm/mach-omap2/omap3/board.c     | 2 +-
 arch/arm/mach-omap2/omap3/emif4.c     | 4 ++--
 arch/arm/mach-omap2/omap3/sdrc.c      | 6 +++---
 4 files changed, 7 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/arch/arm/include/asm/arch-omap3/mem.h b/arch/arm/include/asm/arch-omap3/mem.h
index 569779c55e..fce3568eca 100644
--- a/arch/arm/include/asm/arch-omap3/mem.h
+++ b/arch/arm/include/asm/arch-omap3/mem.h
@@ -475,7 +475,7 @@  enum {
 #ifndef __ASSEMBLY__
 
 /* Function prototypes */
-void mem_init(void);
+void omap3_mem_init(void);
 
 u32 is_mem_sdr(void);
 u32 mem_ok(u32 cs);
diff --git a/arch/arm/mach-omap2/omap3/board.c b/arch/arm/mach-omap2/omap3/board.c
index 8b70251457..c76a95dd5d 100644
--- a/arch/arm/mach-omap2/omap3/board.c
+++ b/arch/arm/mach-omap2/omap3/board.c
@@ -216,7 +216,7 @@  void s_init(void)
 void board_init_f(ulong dummy)
 {
 	early_system_init();
-	mem_init();
+	omap3_mem_init();
 	/*
 	* Save the boot parameters passed from romcode.
 	* We cannot delay the saving further than this,
diff --git a/arch/arm/mach-omap2/omap3/emif4.c b/arch/arm/mach-omap2/omap3/emif4.c
index 7e5a281922..4fbfb387ab 100644
--- a/arch/arm/mach-omap2/omap3/emif4.c
+++ b/arch/arm/mach-omap2/omap3/emif4.c
@@ -159,10 +159,10 @@  int dram_init_banksize(void)
 }
 
 /*
- * mem_init() -
+ * omap3_mem_init() -
  *  - Initialize memory subsystem
  */
-void mem_init(void)
+void omap3_mem_init(void)
 {
 	do_emif4_init();
 }
diff --git a/arch/arm/mach-omap2/omap3/sdrc.c b/arch/arm/mach-omap2/omap3/sdrc.c
index 5d43e7c9cf..f2a0769b9d 100644
--- a/arch/arm/mach-omap2/omap3/sdrc.c
+++ b/arch/arm/mach-omap2/omap3/sdrc.c
@@ -4,7 +4,7 @@ 
  *
  * This file has been created after exctracting and consolidating
  * the SDRC related content from mem.c and board.c, also created
- * generic init function (mem_init).
+ * generic init function (omap3_mem_init).
  *
  * Copyright (C) 2004-2010
  * Texas Instruments Incorporated - https://www.ti.com/
@@ -232,11 +232,11 @@  int dram_init_banksize(void)
 }
 
 /*
- * mem_init -
+ * map3_mem_init -
  *  - Init the sdrc chip,
  *  - Selects CS0 and CS1,
  */
-void mem_init(void)
+void omap3_mem_init(void)
 {
 	/* only init up first bank here */
 	do_sdrc_init(CS0, EARLY_INIT);