[U-Boot] Omap3 fix compiler warnings

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

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.
Signed-off-by: Tom Rix Tom.Rix@windriver.com --- cpu/arm_cortexa8/cpu.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/cpu/arm_cortexa8/cpu.c b/cpu/arm_cortexa8/cpu.c index fcb5775..ab1cfc7 100644 --- a/cpu/arm_cortexa8/cpu.c +++ b/cpu/arm_cortexa8/cpu.c @@ -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);

On 15:04 Tue 30 Jun , Tom Rix 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.
Signed-off-by: Tom Rix Tom.Rix@windriver.com
cpu/arm_cortexa8/cpu.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/cpu/arm_cortexa8/cpu.c b/cpu/arm_cortexa8/cpu.c index fcb5775..ab1cfc7 100644 --- a/cpu/arm_cortexa8/cpu.c +++ b/cpu/arm_cortexa8/cpu.c @@ -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.

Jean-Christophe PLAGNIOL-VILLARD wrote:
On 15:04 Tue 30 Jun , Tom Rix 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.
Signed-off-by: Tom Rix Tom.Rix@windriver.com
cpu/arm_cortexa8/cpu.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/cpu/arm_cortexa8/cpu.c b/cpu/arm_cortexa8/cpu.c index fcb5775..ab1cfc7 100644 --- a/cpu/arm_cortexa8/cpu.c +++ b/cpu/arm_cortexa8/cpu.c @@ -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
Best Regards, J.

On 16:56 Thu 02 Jul , Tom wrote:
Jean-Christophe PLAGNIOL-VILLARD wrote:
On 15:04 Tue 30 Jun , Tom Rix 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.
Signed-off-by: Tom Rix Tom.Rix@windriver.com
cpu/arm_cortexa8/cpu.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/cpu/arm_cortexa8/cpu.c b/cpu/arm_cortexa8/cpu.c index fcb5775..ab1cfc7 100644 --- a/cpu/arm_cortexa8/cpu.c +++ b/cpu/arm_cortexa8/cpu.c @@ -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 ?
remove this non needed dependency and use the generic flush dcache
Best Regards, J.

Jean-Christophe PLAGNIOL-VILLARD wrote:
On 16:56 Thu 02 Jul , Tom wrote:
Jean-Christophe PLAGNIOL-VILLARD wrote:
On 15:04 Tue 30 Jun , Tom Rix 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.
Signed-off-by: Tom Rix Tom.Rix@windriver.com
cpu/arm_cortexa8/cpu.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/cpu/arm_cortexa8/cpu.c b/cpu/arm_cortexa8/cpu.c index fcb5775..ab1cfc7 100644 --- a/cpu/arm_cortexa8/cpu.c +++ b/cpu/arm_cortexa8/cpu.c @@ -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 ?
remove this non needed dependency and use the generic flush dcache
Ok. Will do. Tom
Best Regards, J.

On 07:41 Sat 04 Jul , Tom wrote:
Jean-Christophe PLAGNIOL-VILLARD wrote:
On 16:56 Thu 02 Jul , Tom wrote:
Jean-Christophe PLAGNIOL-VILLARD wrote:
On 15:04 Tue 30 Jun , Tom Rix 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.
Signed-off-by: Tom Rix Tom.Rix@windriver.com
cpu/arm_cortexa8/cpu.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/cpu/arm_cortexa8/cpu.c b/cpu/arm_cortexa8/cpu.c index fcb5775..ab1cfc7 100644 --- a/cpu/arm_cortexa8/cpu.c +++ b/cpu/arm_cortexa8/cpu.c @@ -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 ?
remove this non needed dependency and use the generic flush dcache
Ok. Will do.
tks
Best Regards, J.

Tom wrote:
Jean-Christophe PLAGNIOL-VILLARD wrote:
On 16:56 Thu 02 Jul , Tom wrote:
Jean-Christophe PLAGNIOL-VILLARD wrote:
On 15:04 Tue 30 Jun , Tom Rix 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.
Signed-off-by: Tom Rix Tom.Rix@windriver.com
cpu/arm_cortexa8/cpu.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/cpu/arm_cortexa8/cpu.c b/cpu/arm_cortexa8/cpu.c index fcb5775..ab1cfc7 100644 --- a/cpu/arm_cortexa8/cpu.c +++ b/cpu/arm_cortexa8/cpu.c @@ -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 ?
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

Dear Tom Rix,
In message 1246392253-8431-2-git-send-email-Tom.Rix@windriver.com 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.
Signed-off-by: Tom Rix Tom.Rix@windriver.com
cpu/arm_cortexa8/cpu.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk

Dear Wolfgang,
Wolfgang Denk wrote:
Dear Tom Rix,
In message 1246392253-8431-2-git-send-email-Tom.Rix@windriver.com 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.
Signed-off-by: Tom Rix Tom.Rix@windriver.com
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

Dear Dirk Behme,
In message 4A62BC56.1060800@googlemail.com you wrote:
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.
...
Applied, thanks.
...
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
participants (5)
-
Dirk Behme
-
Jean-Christophe PLAGNIOL-VILLARD
-
Tom
-
Tom Rix
-
Wolfgang Denk