All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] [POWERPC] remove compilerwarning in lib_ppc_board.c
Date: Wed, 15 Oct 2008 09:51:19 +0200	[thread overview]
Message-ID: <48F5A0F7.4040509@denx.de> (raw)

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@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")));

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

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

             reply	other threads:[~2008-10-15  7:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-15  7:51 Heiko Schocher [this message]
2008-10-15  8:39 ` [U-Boot] [PATCH] [POWERPC] remove compilerwarning in lib_ppc_board.c Wolfgang Denk
2008-10-15  8:43   ` Jin Zhengxiong-R64188

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48F5A0F7.4040509@denx.de \
    --to=hs@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.