Skip to contentSkip to conversation

Omap3 fix compiler warnings

U-Boot New Tom Rix 4 participants 11 messages Jun 30, 2009 – Jul 19, 2009

lore
Share & tools
lore

Tom Rix

author
#0 lore raw

This patch is against the arm/next branch.

This fixes OMAP3 boards building warning

cpu.c: In function 'cleanup_before_linux':
cpu.c:64: warning: implicit declaration of function 'v7_flush_dcache_all' cpu.c:64: warning: implicit declaration of function 'get_device_type

Now OMAP3 has clean a build in MAKEALL.

Compile tested with MAKEALL and runtested on Zoom1.

Tom

author
#1 lore raw

PATCH 1/1 OMAP3 Fix compiler warning for v7_flush_dcache_all

On build of omap3 targets in MAKEALL, the *.ERR files have

cpu.c: In function 'cleanup_before_linux':
cpu.c:64: warning: implicit declaration of function 'v7_flush_dcache_all' cpu.c:64: warning: implicit declaration of function 'get_device_type

The functions v7_flush_dcache_all and get_device_type are declared in include/asm-arm/arch-omap3/sys_proto.h, so use this file to declare the functions.

---
 cpu/arm_cortexa8/cpu.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
cpu/arm_cortexa8/cpu.c +3 -0
index fcb5775..ab1cfc7 100644
@@ -35,6 +35,9 @@
 #include <command.h>
 #include <asm/system.h>
 #include <asm/cache.h>
+#ifndef CONFIG_L2_OFF
+#include <asm/arch/sys_proto.h>
+#endif
 
 static void cache_flush(void);
 
Signature · 1 line
1.6.0.4
#2 lore raw

PATCH 1/1 OMAP3 Fix compiler warning for v7_flush_dcache_all

Quoted 20 lines · Tom Rix

On build of omap3 targets in MAKEALL, the *.ERR files have

cpu.c: In function 'cleanup_before_linux':
cpu.c:64: warning: implicit declaration of function 'v7_flush_dcache_all' cpu.c:64: warning: implicit declaration of function 'get_device_type

The functions v7_flush_dcache_all and get_device_type are declared in include/asm-arm/arch-omap3/sys_proto.h, so use this file to declare the functions.

---
 cpu/arm_cortexa8/cpu.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
cpu/arm_cortexa8/cpu.c +0 -0
index fcb5775..ab1cfc7 100644

cpu/arm_cortexa8/cpu.c line 41

Quoted 7 lines
cpu/arm_cortexa8/cpu.c +3 -0
@@ -35,6 +35,9 @@
 #include <command.h>
 #include <asm/system.h>
 #include <asm/cache.h>
+#ifndef CONFIG_L2_OFF
+#include <asm/arch/sys_proto.h>
+#endif
 

v7_flush_dcache_all is not omap3 specific but armv7 specific so we must no need to depend on arch specific header

Best Regards,
J.

author
#3 lore raw

PATCH 1/1 OMAP3 Fix compiler warning for v7_flush_dcache_all

Quoted 17 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 15 lines · Tom Rix

On build of omap3 targets in MAKEALL, the *.ERR files have

cpu.c: In function 'cleanup_before_linux':
cpu.c:64: warning: implicit declaration of function 'v7_flush_dcache_all' cpu.c:64: warning: implicit declaration of function 'get_device_type

The functions v7_flush_dcache_all and get_device_type are declared in include/asm-arm/arch-omap3/sys_proto.h, so use this file to declare the functions.

---
 cpu/arm_cortexa8/cpu.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
Quoted 17 lines

cpu/arm_cortexa8/cpu.c line 42

Quoted 13 lines
cpu/arm_cortexa8/cpu.c +3 -0
index fcb5775..ab1cfc7 100644
@@ -35,6 +35,9 @@
 #include <command.h>
 #include <asm/system.h>
 #include <asm/cache.h>
+#ifndef CONFIG_L2_OFF
+#include <asm/arch/sys_proto.h>
+#endif
 
 

v7_flush_dcache_all is not omap3 specific but armv7 specific so we must no need to depend on arch specific header

That is where they are declared.
Would you rather the declaration be moved from sys_proto.h or to declare them in cpu.c ?
Tom

Quoted 3 lines

Best Regards,
J.

#4 lore raw

PATCH 1/1 OMAP3 Fix compiler warning for v7_flush_dcache_all

Quoted 31 lines · Tom
Quoted 16 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 15 lines · Tom Rix

On build of omap3 targets in MAKEALL, the *.ERR files have

cpu.c: In function 'cleanup_before_linux':
cpu.c:64: warning: implicit declaration of function 'v7_flush_dcache_all' cpu.c:64: warning: implicit declaration of function 'get_device_type

The functions v7_flush_dcache_all and get_device_type are declared in include/asm-arm/arch-omap3/sys_proto.h, so use this file to declare the functions.

---
cpu/arm_cortexa8/cpu.c | 3 +++

1 files changed, 3 insertions(+), 0 deletions(-)
Quoted 14 lines

cpu/arm_cortexa8/cpu.c line 40

Quoted 11 lines
cpu/arm_cortexa8/cpu.c +3 -0
index fcb5775..ab1cfc7 100644
@@ -35,6 +35,9 @@
 #include <command.h>
 #include <asm/system.h>
 #include <asm/cache.h>
+#ifndef CONFIG_L2_OFF
+#include <asm/arch/sys_proto.h>
+#endif

v7_flush_dcache_all is not omap3 specific but armv7 specific so we must no need to depend on arch specific header

Quoted 3 lines

That is where they are declared.
Would you rather the declaration be moved from sys_proto.h or to declare them in cpu.c ?

remove this non needed dependency
and use the generic flush dcache

Best Regards,
J.

author
#5 lore raw

PATCH 1/1 OMAP3 Fix compiler warning for v7_flush_dcache_all

Quoted 37 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 35 lines · Tom
Quoted 33 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 20 lines · Tom Rix

On build of omap3 targets in MAKEALL, the *.ERR files have

cpu.c: In function 'cleanup_before_linux':
cpu.c:64: warning: implicit declaration of function 'v7_flush_dcache_all' cpu.c:64: warning: implicit declaration of function 'get_device_type

The functions v7_flush_dcache_all and get_device_type are declared in include/asm-arm/arch-omap3/sys_proto.h, so use this file to declare the functions.

---
cpu/arm_cortexa8/cpu.c | 3 +++

1 files changed, 3 insertions(+), 0 deletions(-)
cpu/arm_cortexa8/cpu.c +0 -0
index fcb5775..ab1cfc7 100644

cpu/arm_cortexa8/cpu.c line 41

Quoted 7 lines
cpu/arm_cortexa8/cpu.c +3 -0
@@ -35,6 +35,9 @@
 #include <command.h>
 #include <asm/system.h>
 #include <asm/cache.h>
+#ifndef CONFIG_L2_OFF
+#include <asm/arch/sys_proto.h>
+#endif
 

v7_flush_dcache_all is not omap3 specific but armv7 specific so we must no need to depend on arch specific header

Quoted 8 lines
Quoted 4 lines

That is where they are declared.
Would you rather the declaration be moved from sys_proto.h or to declare them in cpu.c ?

remove this non needed dependency
and use the generic flush dcache

Ok. Will do.
Tom

Quoted 3 lines

Best Regards,
J.

#6 lore raw

PATCH 1/1 OMAP3 Fix compiler warning for v7_flush_dcache_all

Quoted 33 lines · Tom
Quoted 32 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 31 lines · Tom
Quoted 30 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 20 lines · Tom Rix

On build of omap3 targets in MAKEALL, the *.ERR files have

cpu.c: In function 'cleanup_before_linux':
cpu.c:64: warning: implicit declaration of function 'v7_flush_dcache_all' cpu.c:64: warning: implicit declaration of function 'get_device_type

The functions v7_flush_dcache_all and get_device_type are declared in include/asm-arm/arch-omap3/sys_proto.h, so use this file to declare the functions.

---
cpu/arm_cortexa8/cpu.c | 3 +++

1 files changed, 3 insertions(+), 0 deletions(-)
cpu/arm_cortexa8/cpu.c +0 -0
index fcb5775..ab1cfc7 100644

cpu/arm_cortexa8/cpu.c line 40

Quoted 6 lines
cpu/arm_cortexa8/cpu.c +3 -0
@@ -35,6 +35,9 @@
 #include <command.h>
 #include <asm/system.h>
 #include <asm/cache.h>
+#ifndef CONFIG_L2_OFF
+#include <asm/arch/sys_proto.h>
+#endif

v7_flush_dcache_all is not omap3 specific but armv7 specific so we must no need to depend on arch specific header

Quoted 7 lines
Quoted 6 lines
Quoted 3 lines

That is where they are declared.
Would you rather the declaration be moved from sys_proto.h or to declare them in cpu.c ?

remove this non needed dependency
and use the generic flush dcache

Ok. Will do.

tks

Best Regards,
J.

#7 lore raw

PATCH 1/1 OMAP3 Fix compiler warning for v7_flush_dcache_all

In reply to Tom
Quoted 44 lines · Tom
Quoted 43 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 41 lines · Tom
Quoted 18 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 16 lines · Tom Rix

On build of omap3 targets in MAKEALL, the *.ERR files have

cpu.c: In function 'cleanup_before_linux':
cpu.c:64: warning: implicit declaration of function 'v7_flush_dcache_all'
cpu.c:64: warning: implicit declaration of function 'get_device_type

The functions v7_flush_dcache_all and get_device_type are declared in include/asm-arm/arch-omap3/sys_proto.h, so use this file to declare the functions.

---
cpu/arm_cortexa8/cpu.c | 3 +++

1 files changed, 3 insertions(+), 0 deletions(-)
Quoted 17 lines

cpu/arm_cortexa8/cpu.c line 41

Quoted 12 lines
cpu/arm_cortexa8/cpu.c +3 -0
index fcb5775..ab1cfc7 100644
@@ -35,6 +35,9 @@
 #include <command.h>
 #include <asm/system.h>
 #include <asm/cache.h>
+#ifndef CONFIG_L2_OFF
+#include <asm/arch/sys_proto.h>
+#endif
 

v7_flush_dcache_all is not omap3 specific but armv7 specific so we must no
need to depend on arch specific header

That is where they are declared.
Would you rather the declaration be moved from sys_proto.h or to declare them in cpu.c ?

Quoted 5 lines
Quoted 4 lines

remove this non needed dependency
and use the generic flush dcache

Ok. Will do.

Not sure if using generic flush dcache would be possible easily. It seems that there are some OMAP3 specific parts necessary. Most probably it's the best idea to move v7_flush_dcache_all() to architecture specific code (e.g. cpu/arm_cortexa8/omap3/*). The various A8 can then fill this function as how they need it for their CPU (or leave it empty).

Best regards

Dirk

#8 lore raw

PATCH 1/1 OMAP3 Fix compiler warning for v7_flush_dcache_all

In reply to Tom Rix

Dear Tom Rix,

Quoted 6 lines · In message <[email protected]> you wrote:

On build of omap3 targets in MAKEALL, the *.ERR files have

cpu.c: In function 'cleanup_before_linux':
cpu.c:64: warning: implicit declaration of function 'v7_flush_dcache_all' cpu.c:64: warning: implicit declaration of function 'get_device_type

Quoted 8 lines

The functions v7_flush_dcache_all and get_device_type are declared in include/asm-arm/arch-omap3/sys_proto.h, so use this file to declare the functions.

---
 cpu/arm_cortexa8/cpu.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 7 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Software suppliers are trying to make their  software  packages  more
``user-friendly''.  .  .  .  Their best approach, so far, has been to
take all the old brochures, and stamp the words, ``user-friendly'' on
the cover.                                               - Bill Gates
#9 lore raw

PATCH 1/1 OMAP3 Fix compiler warning for v7_flush_dcache_all

Dear Wolfgang,

Quoted 13 lines · Wolfgang Denk

Dear Tom Rix,

Quoted 10 lines · In message <[email protected]> you wrote:

On build of omap3 targets in MAKEALL, the *.ERR files have

cpu.c: In function 'cleanup_before_linux':
cpu.c:64: warning: implicit declaration of function 'v7_flush_dcache_all' cpu.c:64: warning: implicit declaration of function 'get_device_type

The functions v7_flush_dcache_all and get_device_type are declared in include/asm-arm/arch-omap3/sys_proto.h, so use this file to declare the functions.

Quoted 6 lines
Quoted 4 lines
---
 cpu/arm_cortexa8/cpu.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Applied, thanks.

Many thanks!

I'm not sure, Tom will have the details, but there might be a newer version of this patch?

http://lists.denx.de/pipermail/u-boot/2009-July/055543.html
http://lists.denx.de/pipermail/u-boot/2009-July/055544.html

Best regards

Dirk

#10 lore raw

PATCH 1/1 OMAP3 Fix compiler warning for v7_flush_dcache_all

Dear Dirk Behme,

Quoted 4 lines · In message <[email protected]> you wrote:
Quoted 4 lines
Quoted 4 lines

The functions v7_flush_dcache_all and get_device_type are declared in include/asm-arm/arch-omap3/sys_proto.h, so use this file to declare the functions.

...

Quoted 1 line
Quoted 1 line

Applied, thanks.

...

Quoted 2 lines

I'm not sure, Tom will have the details, but there might be a newer version of this patch?

Yes, there is. I expect it to go in through the ARM repository. The

part  I  pulled  (adding  "#include  <asm/arch/sys_proto.h>"  for the
needed prototypes) is  still  valid  though:  it  fixes  the  current

problem with the mainline code, and does not conflict with the future change coming (later?) from ARM either.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
C++ is the best example of second-system effect since OS/360.