[U-Boot] [PATCH] [POWERPC] remove compilerwarning in lib_ppc_board.c

Hello Jason,
compiling actual u-boot-next branch for a powerpc board, shows following warning:
[hs@pollux u-boot]$ make -s all board.c:639: warning: function declaration isn't a prototype board.c:646: warning: function declaration isn't a prototype [hs@pollux u-boot]$
introduced from commit: ------------------------------------------------------------------------------- author Jason Jin Jason.jin@freescale.com Fri, 10 Oct 2008 03:41:01 +0000 (11:41 +0800) committer Wolfgang Denk wd@denx.de Tue, 14 Oct 2008 15:57:27 +0000 (17:57 +0200) commit 0f8cbc1829d9c7d9616fd29b366a99d037facdcd
Do not init SATA when disabled on 8536DS.
SGMII and SATA share the serdes on MPC8536 CPU, When SATA disabled and the driver still try to access the SATA registers, the cpu will hangup. This patch try to fix this by reading the serdes status before the SATA initialize.
Signed-off-by: Jason Jin Jason.jin@freescale.com Acked-by: Andy Fleming afleming@freescale.com -------------------------------------------------------------------------------
This patch solves the warning. Jason, can you please try it, and give your okay for this fix?
Signed-off-by: Heiko Schocher hs@denx.de --- board/freescale/mpc8536ds/mpc8536ds.c | 2 +- lib_ppc/board.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/board/freescale/mpc8536ds/mpc8536ds.c b/board/freescale/mpc8536ds/mpc8536ds.c index 3cf12fd..3066b24 100644 --- a/board/freescale/mpc8536ds/mpc8536ds.c +++ b/board/freescale/mpc8536ds/mpc8536ds.c @@ -608,7 +608,7 @@ get_board_ddr_clk(ulong dummy) } #endif
-int is_sata_supported() +int is_sata_supported(void) { volatile ccsr_gur_t *gur = (void *)(CFG_MPC85xx_GUTS_ADDR); uint devdisr = gur->devdisr; diff --git a/lib_ppc/board.c b/lib_ppc/board.c index 03681e9..3fdd94b 100644 --- a/lib_ppc/board.c +++ b/lib_ppc/board.c @@ -635,7 +635,7 @@ void board_init_f (ulong bootflag) /* NOTREACHED - relocate_code() does not return */ }
-int __is_sata_supported() +int __is_sata_supported(void) { /* For some boards, when sata disabled by the switch, and the * driver still access the sata registers, the cpu will hangup. @@ -643,7 +643,7 @@ int __is_sata_supported() * board have such issue.*/ return 1; } -int is_sata_supported() __attribute__((weak, alias("__is_sata_supported"))); +int is_sata_supported(void) __attribute__((weak, alias("__is_sata_supported")));
/************************************************************************ *

Dear Heiko Schocher,
In message 48F5A0F7.4040509@denx.de you wrote:
compiling actual u-boot-next branch for a powerpc board, shows following warning:
[hs@pollux u-boot]$ make -s all board.c:639: warning: function declaration isn't a prototype board.c:646: warning: function declaration isn't a prototype [hs@pollux u-boot]$
...
This patch solves the warning. Jason, can you please try it, and give your okay for this fix?
I was just looking for a fix for the same issue, so I just checked it in :-)
Thanks!
Best regards,
Wolfgang Denk

-----Original Message----- From: Wolfgang Denk [mailto:wd@denx.de] Sent: Wednesday, October 15, 2008 4:39 PM To: hs@denx.de Cc: Jin Zhengxiong-R64188; Fleming Andy-AFLEMING; u-boot@lists.denx.de Subject: Re: [U-Boot] [PATCH] [POWERPC] remove compilerwarning in lib_ppc_board.c
Dear Heiko Schocher,
In message 48F5A0F7.4040509@denx.de you wrote:
compiling actual u-boot-next branch for a powerpc board, shows following warning:
[hs@pollux u-boot]$ make -s all board.c:639: warning: function declaration isn't a prototype board.c:646: warning: function declaration isn't a prototype [hs@pollux u-boot]$
...
This patch solves the warning. Jason, can you please try
it, and give
your okay for this fix?
I was just looking for a fix for the same issue, so I just checked it in :-)
Thanks!
Best regards,
Wolfgang Denk
Thanks! Two :-)
Jason
-- 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@denx.de Good manners are the settled medium of social, as specie is of commercial, life; returns are equally expected for both. - Lord Chesterfield _Letters to his Son_, 25 December 1753
participants (3)
-
Heiko Schocher
-
Jin Zhengxiong-R64188
-
Wolfgang Denk