Re: [U-Boot] [PATCH 05/19] 4xx_ibm_ddr2_autocalib.c: Fix GCC 4.6 build warnings

2011-11-16 Thread Wolfgang Denk
Dear Stefan Roese,

In message 1321380131-6351-1-git-send-email...@denx.de you wrote:
 Fix:
 4xx_ibm_ddr2_autocalib.c: In function 'get_membase':
 4xx_ibm_ddr2_autocalib.c:157:8: warning: variable 'bxcf' set but not used 
 [-Wunused-but-set-variable]
 4xx_ibm_ddr2_autocalib.c: In function 'DQS_calibration_methodB':
 4xx_ibm_ddr2_autocalib.c:722:8: warning: variable 'rffd' set but not used 
 [-Wunused-but-set-variable]
 
 Signed-off-by: Stefan Roese s...@denx.de
 ---
  arch/powerpc/cpu/ppc4xx/4xx_ibm_ddr2_autocalib.c |   15 +--
  1 files changed, 9 insertions(+), 6 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
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: w...@denx.de
In a business, marketroids, salespukes, and  lawyers  have  different
goals from those who actually do work and produce something. Usually,
is  is the former who triumph over the latter, due to the simple rule
that those who print the money make the rules.
 -- Tom Christiansen in 5jdcls$b04$2...@csnews.cs.colorado.edu
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 05/19] 4xx_ibm_ddr2_autocalib.c: Fix GCC 4.6 build warnings

2011-11-15 Thread Stefan Roese
Fix:
4xx_ibm_ddr2_autocalib.c: In function 'get_membase':
4xx_ibm_ddr2_autocalib.c:157:8: warning: variable 'bxcf' set but not used 
[-Wunused-but-set-variable]
4xx_ibm_ddr2_autocalib.c: In function 'DQS_calibration_methodB':
4xx_ibm_ddr2_autocalib.c:722:8: warning: variable 'rffd' set but not used 
[-Wunused-but-set-variable]

Signed-off-by: Stefan Roese s...@denx.de
---
 arch/powerpc/cpu/ppc4xx/4xx_ibm_ddr2_autocalib.c |   15 +--
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/arch/powerpc/cpu/ppc4xx/4xx_ibm_ddr2_autocalib.c 
b/arch/powerpc/cpu/ppc4xx/4xx_ibm_ddr2_autocalib.c
index 4b8e65a..3c87bfb 100644
--- a/arch/powerpc/cpu/ppc4xx/4xx_ibm_ddr2_autocalib.c
+++ b/arch/powerpc/cpu/ppc4xx/4xx_ibm_ddr2_autocalib.c
@@ -154,18 +154,20 @@ u32 ddr_rdss_opt(ulong) __attribute__((weak, 
alias(__ddr_rdss_opt)));
 
 static u32 *get_membase(int bxcr_num)
 {
-   ulong bxcf;
u32 *membase;
 
 #if defined(SDRAM_R0BAS)
/* BAS from Memory Queue rank reg. */
membase =
(u32 *)(SDRAM_RXBAS_SDBA_DECODE(mfdcr_any(SDRAM_R0BAS+bxcr_num)));
-   bxcf = 0;   /* just to satisfy the compiler */
 #else
-   /* BAS from SDRAM_MBxCF mem rank reg. */
-   mfsdram(SDRAM_MB0CF + (bxcr_num2), bxcf);
-   membase = (u32 *)((bxcf  0xfff8)  3);
+   {
+   ulong bxcf;
+
+   /* BAS from SDRAM_MBxCF mem rank reg. */
+   mfsdram(SDRAM_MB0CF + (bxcr_num2), bxcf);
+   membase = (u32 *)((bxcf  0xfff8)  3);
+   }
 #endif
 
return membase;
@@ -719,7 +721,9 @@ static u32 program_DQS_calibration_methodB(struct 
ddrautocal *ddrcal)
 static u32 DQS_calibration_methodB(struct ddrautocal *cal)
 {
ulong rfdc_reg;
+#ifndef CONFIG_DDR_RFDC_FIXED
ulong rffd;
+#endif
 
ulong rqdc_reg;
ulong rqfd;
@@ -837,7 +841,6 @@ static u32 DQS_calibration_methodB(struct ddrautocal *cal)
mtsdram(SDRAM_RFDC, rfdc_reg | SDRAM_RFDC_RFFD_ENCODE(rffd_average));
 #endif /* CONFIG_DDR_RFDC_FIXED */
 
-   rffd = rffd_average;
in_window = 0;
 
curr_win_min = curr_win_max = 0;
-- 
1.7.7.3

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot