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

Heiko Schocher hs at denx.de
Wed Oct 15 09:51:19 CEST 2008


Hello Jason,

compiling actual u-boot-next branch for a powerpc board,
shows following warning:

[hs at 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 at pollux u-boot]$

introduced from commit:
-------------------------------------------------------------------------------
author  Jason Jin <Jason.jin at freescale.com>
         Fri, 10 Oct 2008 03:41:01 +0000 (11:41 +0800)
committer       Wolfgang Denk <wd at 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 at freescale.com>
Acked-by: Andy Fleming <afleming at 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 at 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")));

 /************************************************************************
  *
-- 
1.5.6.1

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany


More information about the U-Boot mailing list