aboutsummaryrefslogtreecommitdiffstats
path: root/board/mpl
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2011-11-15 08:03:45 +0000
committerWolfgang Denk <wd@denx.de>2011-11-16 21:18:12 +0100
commit4e11c3519381368a1d84c6ec4f9fad7cc6116f0a (patch)
tree1d694f45687c6e29025b6570616871a891c17fa1 /board/mpl
parent4233fafe9e190fa57db6ca913978b02789bc98f7 (diff)
downloadu-boot-midas-4e11c3519381368a1d84c6ec4f9fad7cc6116f0a.tar.gz
u-boot-midas-4e11c3519381368a1d84c6ec4f9fad7cc6116f0a.tar.bz2
u-boot-midas-4e11c3519381368a1d84c6ec4f9fad7cc6116f0a.zip
pip405.c: Fix GCC 4.6 build warnings
Fix: pip405.c: In function 'board_early_init_f': pip405.c:192:16: warning: variable 'tctp_clocks' set but not used [-Wunused-but-set-variable] pip405.c:182:16: warning: variable 'dataout' set but not used [-Wunused-but-set-variable] Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'board/mpl')
-rw-r--r--board/mpl/pip405/pip405.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/board/mpl/pip405/pip405.c b/board/mpl/pip405/pip405.c
index 7b48c0617c..a1f0b656d4 100644
--- a/board/mpl/pip405/pip405.c
+++ b/board/mpl/pip405/pip405.c
@@ -179,7 +179,6 @@ void write_4hex (unsigned long val)
int board_early_init_f (void)
{
- unsigned char dataout[1];
unsigned char datain[128];
unsigned long sdram_size = 0;
SDRAM_SETUP *t = (SDRAM_SETUP *) sdram_setup_table;
@@ -189,9 +188,13 @@ int board_early_init_f (void)
unsigned short i;
unsigned char rows, cols, banks, sdram_banks, density;
unsigned char supported_cal, trp_clocks, trcd_clocks, tras_clocks,
- trc_clocks, tctp_clocks;
+ trc_clocks;
unsigned char cal_index, cal_val, spd_version, spd_chksum;
unsigned char buf[8];
+#ifdef SDRAM_DEBUG
+ unsigned char tctp_clocks;
+#endif
+
/* set up the config port */
mtdcr (EBC0_CFGADDR, PB7AP);
mtdcr (EBC0_CFGDATA, CONFIG_PORT_AP);
@@ -210,7 +213,6 @@ int board_early_init_f (void)
/* Read Serial Presence Detect Information */
i2c_init (CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
- dataout[0] = 0;
for (i = 0; i < 128; i++)
datain[i] = 127;
i2c_read(SPD_EEPROM_ADDRESS,0,1,datain,128);
@@ -307,12 +309,13 @@ int board_early_init_f (void)
/* trc_clocks is sum of trp_clocks + tras_clocks */
trc_clocks = trp_clocks + tras_clocks;
+
+#ifdef SDRAM_DEBUG
/* ctp = ((trp + tras) - trp - trcd) => tras - trcd */
tctp_clocks =
((NSto10PS (datain[30]) - NSto10PS (datain[29])) +
(tmemclk - 1)) / tmemclk;
-#ifdef SDRAM_DEBUG
serial_puts ("c_RP: ");
write_hex (trp_clocks);
serial_puts ("\nc_RCD: ");