All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 01/13] drivers/block/sym53c8xx.c: Fix GCC 4.6 build warning
@ 2011-11-09 19:28 Wolfgang Denk
  2011-11-09 19:28 ` [U-Boot] [PATCH 02/13] board/evb64260/i2c.c: Coding Style cleanup Wolfgang Denk
                   ` (12 more replies)
  0 siblings, 13 replies; 37+ messages in thread
From: Wolfgang Denk @ 2011-11-09 19:28 UTC (permalink / raw)
  To: u-boot

Fix:
sym53c8xx.c: In function 'scsi_write_dsp':
sym53c8xx.c:456:16: warning: variable 'val' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
---
 drivers/block/sym53c8xx.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/drivers/block/sym53c8xx.c b/drivers/block/sym53c8xx.c
index 8094b41..564aa98 100644
--- a/drivers/block/sym53c8xx.c
+++ b/drivers/block/sym53c8xx.c
@@ -453,11 +453,9 @@ void scsi_int_enable(void)
 
 void scsi_write_dsp(unsigned long start)
 {
-	unsigned long val;
 #ifdef SCSI_SINGLE_STEP
 	unsigned char t;
 #endif
-	val = start;
 	out32r(scsi_mem_addr + DSP,start);
 #ifdef SCSI_SINGLE_STEP
 	t=scsi_read_byte(DCNTL);
-- 
1.7.6.4

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 02/13] board/evb64260/i2c.c: Coding Style cleanup
  2011-11-09 19:28 [U-Boot] [PATCH 01/13] drivers/block/sym53c8xx.c: Fix GCC 4.6 build warning Wolfgang Denk
@ 2011-11-09 19:28 ` Wolfgang Denk
  2011-11-10  6:32   ` Heiko Schocher
  2011-11-16 20:03   ` Wolfgang Denk
  2011-11-09 19:28 ` [U-Boot] [PATCH 03/13] board/evb64260/i2c.c: Fix GCC 4.6 build warnings Wolfgang Denk
                   ` (11 subsequent siblings)
  12 siblings, 2 replies; 37+ messages in thread
From: Wolfgang Denk @ 2011-11-09 19:28 UTC (permalink / raw)
  To: u-boot

Make checkpatch-clean

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Eran Man <eran@nbase.co.il>
---
 board/evb64260/i2c.c |   48 ++++++++++++++++++++++--------------------------
 1 files changed, 22 insertions(+), 26 deletions(-)

diff --git a/board/evb64260/i2c.c b/board/evb64260/i2c.c
index 88d0dac..573f31f 100644
--- a/board/evb64260/i2c.c
+++ b/board/evb64260/i2c.c
@@ -20,25 +20,22 @@ static void
 i2c_init(int speed, int slaveaddr)
 {
 	unsigned int n, m, freq, margin, power;
-	unsigned int actualFreq, actualN=0, actualM=0;
+	unsigned int actualFreq, actualN = 0, actualM = 0;
 	unsigned int control, status;
 	unsigned int minMargin = 0xffffffff;
 	unsigned int tclk = 125000000;
 
 	DP(puts("i2c_init\n"));
 
-	for(n = 0 ; n < 8 ; n++)
-	{
-		for(m = 0 ; m < 16 ; m++)
-		{
+	for (n = 0 ; n < 8 ; n++) {
+		for (m = 0 ; m < 16 ; m++) {
 			power = 2<<n; /* power = 2^(n+1) */
 			freq = tclk/(10*(m+1)*power);
 			if (speed > freq)
 				margin = speed - freq;
 			else
 				margin = freq - speed;
-			if(margin < minMargin)
-			{
+			if (margin < minMargin) {
 				minMargin   = margin;
 				actualFreq  = freq;
 				actualN	    = n;
@@ -91,13 +88,13 @@ i2c_start(void)
 		udelay(I2C_DELAY);
 		if (count > 20) {
 			GT_REG_WRITE(I2C_CONTROL, (0x1 << 4)); /*stop*/
-			return (status);
+			return status;
 		}
 		GT_REG_READ(I2C_STATUS_BAUDE_RATE, &status);
 		count++;
 	}
 
-	return (0);
+	return 0;
 }
 
 static uchar
@@ -110,9 +107,8 @@ i2c_select_device(uchar dev_addr, uchar read, int ten_bit)
 
 	/* Output slave address */
 
-	if (ten_bit) {
+	if (ten_bit)
 		bits = 10;
-	}
 
 	data = (dev_addr << 1);
 	/* set the read bit */
@@ -129,7 +125,7 @@ i2c_select_device(uchar dev_addr, uchar read, int ten_bit)
 		udelay(I2C_DELAY);
 		if (count > 20) {
 			GT_REG_WRITE(I2C_CONTROL, (0x1 << 4)); /*stop*/
-			return(status);
+			return status;
 		}
 		GT_REG_READ(I2C_STATUS_BAUDE_RATE, &status);
 		count++;
@@ -137,14 +133,14 @@ i2c_select_device(uchar dev_addr, uchar read, int ten_bit)
 
 	if (bits == 10) {
 		printf("10 bit I2C addressing not yet implemented\n");
-		return (0xff);
+		return 0xff;
 	}
 
-	return (0);
+	return 0;
 }
 
 static uchar
-i2c_get_data(uchar* return_data, int len) {
+i2c_get_data(uchar *return_data, int len) {
 
 	unsigned int data, status = 0;
 	int count = 0;
@@ -163,7 +159,7 @@ i2c_get_data(uchar* return_data, int len) {
 		count++;
 		while ((status & 0xff) != 0x50) {
 			udelay(I2C_DELAY);
-			if(count > 2) {
+			if (count > 2) {
 				GT_REG_WRITE(I2C_CONTROL, (0x1 << 4)); /*stop*/
 				return 0;
 			}
@@ -178,16 +174,16 @@ i2c_get_data(uchar* return_data, int len) {
 	RESET_REG_BITS(I2C_CONTROL, BIT2|BIT3);
 	while ((status & 0xff) != 0x58) {
 		udelay(I2C_DELAY);
-		if(count > 200) {
+		if (count > 200) {
 			GT_REG_WRITE(I2C_CONTROL, (0x1 << 4)); /*stop*/
-			return (status);
+			return status;
 		}
 		GT_REG_READ(I2C_STATUS_BAUDE_RATE, &status);
 		count++;
 	}
 	GT_REG_WRITE(I2C_CONTROL, (0x1 << 4)); /* stop */
 
-	return (0);
+	return 0;
 }
 
 static uchar
@@ -213,9 +209,9 @@ i2c_write_data(unsigned int data, int len)
 		count++;
 		while ((status & 0xff) != 0x28) {
 			udelay(I2C_DELAY);
-			if(count > 20) {
+			if (count > 20) {
 				GT_REG_WRITE(I2C_CONTROL, (0x1 << 4)); /*stop*/
-				return (status);
+				return status;
 			}
 			GT_REG_READ(I2C_STATUS_BAUDE_RATE, &status);
 			count++;
@@ -227,7 +223,7 @@ i2c_write_data(unsigned int data, int len)
 
 	udelay(I2C_DELAY * 10);
 
-	return (0);
+	return 0;
 }
 
 static uchar
@@ -254,11 +250,11 @@ i2c_set_dev_offset(uchar dev_addr, unsigned int offset, int ten_bit)
 		return status;
 	}
 
-	return (0);
+	return 0;
 }
 
 uchar
-i2c_read(uchar dev_addr, unsigned int offset, int len, uchar* data,
+i2c_read(uchar dev_addr, unsigned int offset, int len, uchar *data,
 	 int ten_bit)
 {
 	uchar status = 0;
@@ -266,7 +262,7 @@ i2c_read(uchar dev_addr, unsigned int offset, int len, uchar* data,
 
 	DP(puts("i2c_read\n"));
 
-	i2c_init(i2cFreq,0);
+	i2c_init(i2cFreq, 0);
 
 	status = i2c_start();
 
@@ -285,7 +281,7 @@ i2c_read(uchar dev_addr, unsigned int offset, int len, uchar* data,
 		return status;
 	}
 
-	i2c_init(i2cFreq,0);
+	i2c_init(i2cFreq, 0);
 
 	status = i2c_start();
 	if (status) {
-- 
1.7.6.4

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 03/13] board/evb64260/i2c.c: Fix GCC 4.6 build warnings
  2011-11-09 19:28 [U-Boot] [PATCH 01/13] drivers/block/sym53c8xx.c: Fix GCC 4.6 build warning Wolfgang Denk
  2011-11-09 19:28 ` [U-Boot] [PATCH 02/13] board/evb64260/i2c.c: Coding Style cleanup Wolfgang Denk
@ 2011-11-09 19:28 ` Wolfgang Denk
  2011-11-10  6:33   ` Heiko Schocher
  2011-11-16 20:03   ` Wolfgang Denk
  2011-11-09 19:28 ` [U-Boot] [PATCH 04/13] board/evb64260/evb64260.c: Fix GC 4.6 build warning Wolfgang Denk
                   ` (10 subsequent siblings)
  12 siblings, 2 replies; 37+ messages in thread
From: Wolfgang Denk @ 2011-11-09 19:28 UTC (permalink / raw)
  To: u-boot

Fix:
i2c.c: In function 'i2c_init':
i2c.c:23:15: warning: variable 'actualFreq' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Eran Man <eran@nbase.co.il>
---
 board/evb64260/i2c.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/board/evb64260/i2c.c b/board/evb64260/i2c.c
index 573f31f..3eae3d9 100644
--- a/board/evb64260/i2c.c
+++ b/board/evb64260/i2c.c
@@ -20,7 +20,7 @@ static void
 i2c_init(int speed, int slaveaddr)
 {
 	unsigned int n, m, freq, margin, power;
-	unsigned int actualFreq, actualN = 0, actualM = 0;
+	unsigned int actualN = 0, actualM = 0;
 	unsigned int control, status;
 	unsigned int minMargin = 0xffffffff;
 	unsigned int tclk = 125000000;
@@ -37,7 +37,6 @@ i2c_init(int speed, int slaveaddr)
 				margin = freq - speed;
 			if (margin < minMargin) {
 				minMargin   = margin;
-				actualFreq  = freq;
 				actualN	    = n;
 				actualM	    = m;
 			}
-- 
1.7.6.4

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 04/13] board/evb64260/evb64260.c: Fix GC 4.6 build warning
  2011-11-09 19:28 [U-Boot] [PATCH 01/13] drivers/block/sym53c8xx.c: Fix GCC 4.6 build warning Wolfgang Denk
  2011-11-09 19:28 ` [U-Boot] [PATCH 02/13] board/evb64260/i2c.c: Coding Style cleanup Wolfgang Denk
  2011-11-09 19:28 ` [U-Boot] [PATCH 03/13] board/evb64260/i2c.c: Fix GCC 4.6 build warnings Wolfgang Denk
@ 2011-11-09 19:28 ` Wolfgang Denk
  2011-11-16 20:03   ` Wolfgang Denk
  2011-11-09 19:28 ` [U-Boot] [PATCH 05/13] board/evb64260/eth.c: Fix GCC " Wolfgang Denk
                   ` (9 subsequent siblings)
  12 siblings, 1 reply; 37+ messages in thread
From: Wolfgang Denk @ 2011-11-09 19:28 UTC (permalink / raw)
  To: u-boot

Fix:
evb64260.c: In function 'debug_led':
evb64260.c:363:6: warning: variable 'dummy' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
---
 board/evb64260/evb64260.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/board/evb64260/evb64260.c b/board/evb64260/evb64260.c
index 80756a5..393320a 100644
--- a/board/evb64260/evb64260.c
+++ b/board/evb64260/evb64260.c
@@ -32,6 +32,7 @@
 #include <galileo/gt64260R.h>
 #include <net.h>
 #include <netdev.h>
+#include <linux/compiler.h>
 
 #include <asm/io.h>
 #include "eth.h"
@@ -360,7 +361,7 @@ debug_led(int led, int mode)
 {
 #if !defined(CONFIG_ZUMA_V2) && !defined(CONFIG_P3G4)
 	volatile int *addr = NULL;
-	int dummy;
+	__maybe_unused int dummy;
 
 	if (mode == 1) {
 		switch (led) {
-- 
1.7.6.4

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 05/13] board/evb64260/eth.c: Fix GCC 4.6 build warning
  2011-11-09 19:28 [U-Boot] [PATCH 01/13] drivers/block/sym53c8xx.c: Fix GCC 4.6 build warning Wolfgang Denk
                   ` (2 preceding siblings ...)
  2011-11-09 19:28 ` [U-Boot] [PATCH 04/13] board/evb64260/evb64260.c: Fix GC 4.6 build warning Wolfgang Denk
@ 2011-11-09 19:28 ` Wolfgang Denk
  2011-11-16 20:04   ` Wolfgang Denk
  2011-11-09 19:28 ` [U-Boot] [PATCH 06/13] board/evb64260/sdram_init.c: Fix GCC 4.6 build warnings Wolfgang Denk
                   ` (8 subsequent siblings)
  12 siblings, 1 reply; 37+ messages in thread
From: Wolfgang Denk @ 2011-11-09 19:28 UTC (permalink / raw)
  To: u-boot

Fix:
eth.c: In function 'gt6426x_handle_SMI':
eth.c:130:15: warning: variable 'psr' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
---
 board/evb64260/eth.c |   37 +++++++++++++++++++------------------
 1 files changed, 19 insertions(+), 18 deletions(-)

diff --git a/board/evb64260/eth.c b/board/evb64260/eth.c
index 1492ffc..c02a9cd 100644
--- a/board/evb64260/eth.c
+++ b/board/evb64260/eth.c
@@ -127,31 +127,32 @@ static void gt6426x_handle_SMI(struct eth_dev_s *p, unsigned int icr)
 #endif
 
     if(icr&0x10000000) {
+#ifdef DEBUG
 	unsigned int psr;
+
 	psr=GTREGREAD(ETHERNET0_PORT_STATUS_REGISTER + p->reg_base);
-#ifdef DEBUG
 	printf("PHY state change:\n"
 	       "  GT:%s:%s:%s:%s\n",
-		psr&1?"100":" 10",
-		psr&8?" Link":"nLink",
-		psr&2?"FD":"HD",
-		psr&4?" FC":"nFC");
+		psr & 1 ? "100" : " 10",
+		psr & 8 ? " Link" : "nLink",
+		psr & 2 ? "FD" : "HD",
+		psr & 4 ? " FC" : "nFC");
 
 #ifdef CONFIG_INTEL_LXT97X /* non-standard mii reg (intel lxt972a) */
 	{
-	unsigned short mii_11;
-	mii_11=miiphy_read_ret(ether_port_phy_addr[p->dev],0x11);
-
-	printf(" mii:%s:%s:%s:%s %s:%s %s\n",
-		mii_11&(1<<14)?"100":" 10",
-		mii_11&(1<<10)?" Link":"nLink",
-		mii_11&(1<<9)?"FD":"HD",
-		mii_11&(1<<4)?" FC":"nFC",
-
-		mii_11&(1<<7)?"ANc":"ANnc",
-		mii_11&(1<<8)?"AN":"Manual",
-		""
-		);
+		unsigned short mii_11;
+		mii_11 = miiphy_read_ret(ether_port_phy_addr[p->dev], 0x11);
+
+		printf(" mii:%s:%s:%s:%s %s:%s %s\n",
+			mii_11 & (1 << 14) ? "100" : " 10",
+			mii_11 & (1 << 10) ? " Link" : "nLink",
+			mii_11 & (1 << 9) ? "FD" : "HD",
+			mii_11 & (1 << 4) ? " FC" : "nFC",
+
+			mii_11 & (1 << 7) ? "ANc" : "ANnc",
+			mii_11 & (1 << 8) ? "AN" : "Manual",
+			""
+			);
 	}
 #endif /* CONFIG_INTEL_LXT97X */
 #endif /* DEBUG */
-- 
1.7.6.4

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 06/13] board/evb64260/sdram_init.c: Fix GCC 4.6 build warnings
  2011-11-09 19:28 [U-Boot] [PATCH 01/13] drivers/block/sym53c8xx.c: Fix GCC 4.6 build warning Wolfgang Denk
                   ` (3 preceding siblings ...)
  2011-11-09 19:28 ` [U-Boot] [PATCH 05/13] board/evb64260/eth.c: Fix GCC " Wolfgang Denk
@ 2011-11-09 19:28 ` Wolfgang Denk
  2011-11-16 20:04   ` Wolfgang Denk
  2011-11-09 19:29 ` [U-Boot] [PATCH 07/13] board/evb64260/zuma_pbb_mbox.c: CodingStyle cleanup Wolfgang Denk
                   ` (7 subsequent siblings)
  12 siblings, 1 reply; 37+ messages in thread
From: Wolfgang Denk @ 2011-11-09 19:28 UTC (permalink / raw)
  To: u-boot

Fix:
sdram_init.c: In function 'setup_sdram_common':
sdram_init.c:333:49: warning: variable 'ecc' set but not used
[-Wunused-but-set-variable]
sdram_init.c: In function 'setup_sdram':
sdram_init.c:410:13: warning: variable 'check' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
---
 board/evb64260/sdram_init.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/board/evb64260/sdram_init.c b/board/evb64260/sdram_init.c
index e2f0769..6f725f6 100644
--- a/board/evb64260/sdram_init.c
+++ b/board/evb64260/sdram_init.c
@@ -29,6 +29,7 @@
 #include <galileo/pci.h>
 #include <galileo/gt64260R.h>
 #include <net.h>
+#include <linux/compiler.h>
 
 #include "eth.h"
 #include "mpsc.h"
@@ -330,7 +331,8 @@ static int check_dimm (uchar slot, sdram_info_t * info)
 static int setup_sdram_common (sdram_info_t info[2])
 {
 	ulong tmp;
-	int tpar = 2, tras_clocks = 5, registered = 1, ecc = 2;
+	int tpar = 2, tras_clocks = 5, registered = 1;
+	__maybe_unused int ecc = 2;
 
 	if (!info[0].banks && !info[1].banks)
 		return 0;
@@ -407,8 +409,9 @@ static int setup_sdram_common (sdram_info_t info[2])
 /* sets up the GT properly with information passed in */
 static int setup_sdram (sdram_info_t * info)
 {
-	ulong tmp, check;
+	ulong tmp;
 	ulong *addr = 0;
+	__maybe_unused ulong check;
 	int i;
 
 	/* sanity checking */
-- 
1.7.6.4

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 07/13] board/evb64260/zuma_pbb_mbox.c: CodingStyle cleanup
  2011-11-09 19:28 [U-Boot] [PATCH 01/13] drivers/block/sym53c8xx.c: Fix GCC 4.6 build warning Wolfgang Denk
                   ` (4 preceding siblings ...)
  2011-11-09 19:28 ` [U-Boot] [PATCH 06/13] board/evb64260/sdram_init.c: Fix GCC 4.6 build warnings Wolfgang Denk
@ 2011-11-09 19:29 ` Wolfgang Denk
  2011-11-16 20:04   ` Wolfgang Denk
  2011-11-09 19:29 ` [U-Boot] [PATCH 08/13] board/evb64260/zuma_pbb_mbox.c: Fix GCC 4.6 build warnings Wolfgang Denk
                   ` (6 subsequent siblings)
  12 siblings, 1 reply; 37+ messages in thread
From: Wolfgang Denk @ 2011-11-09 19:29 UTC (permalink / raw)
  To: u-boot

Make (mostly) checkpatch-clean

Signed-off-by: Wolfgang Denk <wd@denx.de>
---
 board/evb64260/zuma_pbb_mbox.c |  256 +++++++++++++++++++++-------------------
 1 files changed, 132 insertions(+), 124 deletions(-)

diff --git a/board/evb64260/zuma_pbb_mbox.c b/board/evb64260/zuma_pbb_mbox.c
index 8e38102..3d7c976 100644
--- a/board/evb64260/zuma_pbb_mbox.c
+++ b/board/evb64260/zuma_pbb_mbox.c
@@ -12,57 +12,62 @@ struct _zuma_mbox_dev zuma_mbox_dev;
 
 static int zuma_mbox_write(struct _zuma_mbox_dev *dev, unsigned int data)
 {
-  unsigned int status, count = 0, i;
-
-  status = (volatile int)le32_to_cpu(dev->sip->mbox_status);
-
-  while((status & OUT_PENDING) && count < 1000) {
-    count++;
-    for(i=0;i<1000;i++);
-    status = (volatile int)le32_to_cpu(dev->sip->mbox_status);
-  }
-  if(count < 1000) {
-    /* if SET it means msg pending */
-    /* printf("mbox real write %08x\n",data); */
-    dev->sip->mbox_out = cpu_to_le32(data);
-    return 4;
-  }
-
-  printf("mbox tx timeout\n");
-  return 0;
+	unsigned int status, count = 0, i;
+
+	status = (volatile int) le32_to_cpu(dev->sip->mbox_status);
+
+	while ((status & OUT_PENDING) && count < 1000) {
+		count++;
+		for (i = 0; i < 1000; i++)
+			;
+		status = (volatile int) le32_to_cpu(dev->sip->mbox_status);
+	}
+	if (count < 1000) {
+		/* if SET it means msg pending */
+		/* printf("mbox real write %08x\n",data); */
+		dev->sip->mbox_out = cpu_to_le32(data);
+		return 4;
+	}
+
+	printf("mbox tx timeout\n");
+	return 0;
 }
 
 static int zuma_mbox_read(struct _zuma_mbox_dev *dev, unsigned int *data)
 {
-  unsigned int status, count = 0, i;
-
-  status = (volatile int)le32_to_cpu(dev->sip->mbox_status);
-
-  while(!(status & IN_VALID) && count < 1000) {
-    count++;
-    for(i=0;i<1000;i++);
-    status = (volatile int)le32_to_cpu(dev->sip->mbox_status);
-  }
-  if(count < 1000) {
-    /* if SET it means msg pending */
-    *data=le32_to_cpu(dev->sip->mbox_in);
-    /*printf("mbox real read %08x\n", *data); */
-    return 4;
-  }
-  printf("mbox rx timeout\n");
-  return 0;
+	unsigned int status, count = 0, i;
+
+	status = (volatile int) le32_to_cpu(dev->sip->mbox_status);
+
+	while (!(status & IN_VALID) && count < 1000) {
+		count++;
+		for (i = 0; i < 1000; i++)
+			;
+		status = (volatile int) le32_to_cpu(dev->sip->mbox_status);
+	}
+	if (count < 1000) {
+		/* if SET it means msg pending */
+		*data = le32_to_cpu(dev->sip->mbox_in);
+		/*printf("mbox real read %08x\n", *data); */
+		return 4;
+	}
+	printf("mbox rx timeout\n");
+	return 0;
 }
 
 static int zuma_mbox_do_one_mailbox(unsigned int out, unsigned int *in)
 {
-  int ret;
-  ret=zuma_mbox_write(&zuma_mbox_dev,out);
-  /*printf("write 0x%08x (%d bytes)\n", out, ret); */
-  if(ret!=4) return -1;
-  ret=zuma_mbox_read(&zuma_mbox_dev,in);
-  /*printf("read 0x%08x (%d bytes)\n", *in, ret); */
-  if(ret!=4) return -1;
-  return 0;
+	int ret;
+
+	ret = zuma_mbox_write(&zuma_mbox_dev, out);
+	/*printf("write 0x%08x (%d bytes)\n", out, ret); */
+	if (ret != 4)
+		return -1;
+	ret = zuma_mbox_read(&zuma_mbox_dev, in);
+	/*printf("read 0x%08x (%d bytes)\n", *in, ret); */
+	if (ret != 4)
+		return -1;
+	return 0;
 }
 
 
@@ -70,81 +75,82 @@ static int zuma_mbox_do_one_mailbox(unsigned int out, unsigned int *in)
 
 static int zuma_mbox_do_all_mailbox(void)
 {
-  unsigned int data_in;
-  unsigned short sdata_in;
+	unsigned int data_in;
+	unsigned short sdata_in;
 
-  RET_IF_FAILED(zuma_mbox_do_one_mailbox(ZUMA_MBOXMSG_START, &data_in));
+	RET_IF_FAILED(zuma_mbox_do_one_mailbox(ZUMA_MBOXMSG_START, &data_in));
 
-  RET_IF_FAILED(zuma_mbox_do_one_mailbox(ZUMA_MBOXMSG_MACL, &data_in));
-  memcpy(zuma_acc_mac+2,&data_in,4);
-  RET_IF_FAILED(zuma_mbox_do_one_mailbox(ZUMA_MBOXMSG_MACH, &data_in));
-  sdata_in=data_in&0xffff;
-  memcpy(zuma_acc_mac,&sdata_in,2);
+	RET_IF_FAILED(zuma_mbox_do_one_mailbox(ZUMA_MBOXMSG_MACL, &data_in));
+	memcpy(zuma_acc_mac + 2, &data_in, 4);
+	RET_IF_FAILED(zuma_mbox_do_one_mailbox(ZUMA_MBOXMSG_MACH, &data_in));
+	sdata_in = data_in & 0xffff;
+	memcpy(zuma_acc_mac, &sdata_in, 2);
 
-  RET_IF_FAILED(zuma_mbox_do_one_mailbox(ZUMA_MBOXMSG_IP, &data_in));
-  zuma_ip=data_in;
+	RET_IF_FAILED(zuma_mbox_do_one_mailbox(ZUMA_MBOXMSG_IP, &data_in));
+	zuma_ip = data_in;
 
-  RET_IF_FAILED(zuma_mbox_do_one_mailbox(ZUMA_MBOXMSG_SLOT, &data_in));
-  zuma_slot_bac=data_in>>3;
+	RET_IF_FAILED(zuma_mbox_do_one_mailbox(ZUMA_MBOXMSG_SLOT, &data_in));
+	zuma_slot_bac = data_in >> 3;
 
-  RET_IF_FAILED(zuma_mbox_do_one_mailbox(ZUMA_MBOXMSG_BAUD, &data_in));
-  zuma_console_baud = data_in & 0xffff;
-  zuma_debug_baud   = data_in >> 16;
+	RET_IF_FAILED(zuma_mbox_do_one_mailbox(ZUMA_MBOXMSG_BAUD, &data_in));
+	zuma_console_baud = data_in & 0xffff;
+	zuma_debug_baud = data_in >> 16;
 
-  RET_IF_FAILED(zuma_mbox_do_one_mailbox(ZUMA_MBOXMSG_ENG_PRV_MACL, &data_in));
-  memcpy(zuma_prv_mac+2,&data_in,4);
-  RET_IF_FAILED(zuma_mbox_do_one_mailbox(ZUMA_MBOXMSG_ENG_PRV_MACH, &data_in));
-  sdata_in=data_in&0xffff;
-  memcpy(zuma_prv_mac,&sdata_in,2);
+	RET_IF_FAILED(zuma_mbox_do_one_mailbox
+		      (ZUMA_MBOXMSG_ENG_PRV_MACL, &data_in));
+	memcpy(zuma_prv_mac + 2, &data_in, 4);
+	RET_IF_FAILED(zuma_mbox_do_one_mailbox
+		      (ZUMA_MBOXMSG_ENG_PRV_MACH, &data_in));
+	sdata_in = data_in & 0xffff;
+	memcpy(zuma_prv_mac, &sdata_in, 2);
 
-  RET_IF_FAILED(zuma_mbox_do_one_mailbox(ZUMA_MBOXMSG_DONE, &data_in));
+	RET_IF_FAILED(zuma_mbox_do_one_mailbox(ZUMA_MBOXMSG_DONE, &data_in));
 
-  return 0;
+	return 0;
 }
 
 
-static void
-zuma_mbox_dump(void)
+static void zuma_mbox_dump(void)
 {
-  printf("ACC MAC=%04x%08x\n",*(unsigned short *)(&zuma_acc_mac),*(unsigned int *)((char *)&zuma_acc_mac+2));
-  printf("PRV MAC=%04x%08x\n",*(unsigned short *)(&zuma_prv_mac),*(unsigned int *)((char *)&zuma_prv_mac+2));
-  printf("slot:bac=%d:%d\n",(zuma_slot_bac>>2)&0xf, zuma_slot_bac & 0x3);
-  printf("BAUD1=%d BAUD2=%d\n",zuma_console_baud,zuma_debug_baud);
+	printf("ACC MAC=%04x%08x\n", *(unsigned short *) (&zuma_acc_mac),
+	       *(unsigned int *) ((char *) &zuma_acc_mac + 2));
+	printf("PRV MAC=%04x%08x\n", *(unsigned short *) (&zuma_prv_mac),
+	       *(unsigned int *) ((char *) &zuma_prv_mac + 2));
+	printf("slot:bac=%d:%d\n", (zuma_slot_bac >> 2) & 0xf,
+	       zuma_slot_bac & 0x3);
+	printf("BAUD1=%d BAUD2=%d\n", zuma_console_baud, zuma_debug_baud);
 }
 
 
-static void
-zuma_mbox_setenv(void)
+static void zuma_mbox_setenv(void)
 {
-  char *data, buf[32];
-  unsigned char save = 0;
-
-  data = getenv("baudrate");
-
-  if(!data || (zuma_console_baud != simple_strtoul(data, NULL, 10))) {
-    sprintf(buf, "%6d", zuma_console_baud);
-    setenv("baudrate", buf);
-    save=1;
-    printf("baudrate doesn't match from mbox\n");
-  }
-
-  ip_to_string(zuma_ip, buf);
-  setenv("ipaddr", buf);
-
-  sprintf(buf,"%02x:%02x:%02x:%02x:%02x:%02x",
-	  zuma_prv_mac[0],
-	  zuma_prv_mac[1],
-	  zuma_prv_mac[2],
-	  zuma_prv_mac[3],
-	  zuma_prv_mac[4],
-	  zuma_prv_mac[5]);
-  setenv("ethaddr", buf);
-
-  sprintf(buf,"%02x",zuma_slot_bac);
-  setenv("bacslot", buf);
-
-  if(save)
-    saveenv();
+	char *data, buf[32];
+	unsigned char save = 0;
+
+	data = getenv("baudrate");
+
+	if (!data || (zuma_console_baud != simple_strtoul(data, NULL, 10))) {
+		sprintf(buf, "%6d", zuma_console_baud);
+		setenv("baudrate", buf);
+		save = 1;
+		printf("baudrate doesn't match from mbox\n");
+	}
+
+	ip_to_string(zuma_ip, buf);
+	setenv("ipaddr", buf);
+
+	sprintf(buf, "%02x:%02x:%02x:%02x:%02x:%02x",
+		zuma_prv_mac[0],
+		zuma_prv_mac[1],
+		zuma_prv_mac[2],
+		zuma_prv_mac[3], zuma_prv_mac[4], zuma_prv_mac[5]);
+	setenv("ethaddr", buf);
+
+	sprintf(buf, "%02x", zuma_slot_bac);
+	setenv("bacslot", buf);
+
+	if (save)
+		saveenv();
 }
 
 /**
@@ -153,37 +159,39 @@ zuma_mbox_setenv(void)
 
 int zuma_mbox_init(void)
 {
-  unsigned int iobase;
-  memset(&zuma_mbox_dev, 0, sizeof(struct _zuma_mbox_dev));
+	unsigned int iobase;
+
+	memset(&zuma_mbox_dev, 0, sizeof(struct _zuma_mbox_dev));
 
-  zuma_mbox_dev.dev = pci_find_device(VENDOR_ID_ZUMA, DEVICE_ID_ZUMA_PBB, 0);
+	zuma_mbox_dev.dev =
+		pci_find_device(VENDOR_ID_ZUMA, DEVICE_ID_ZUMA_PBB, 0);
 
-  if(zuma_mbox_dev.dev == -1) {
-    printf("no zuma pbb\n");
-    return -1;
-  }
+	if (zuma_mbox_dev.dev == -1) {
+		printf("no zuma pbb\n");
+		return -1;
+	}
 
-  pci_read_config_dword(zuma_mbox_dev.dev, PCI_BASE_ADDRESS_0, &iobase);
+	pci_read_config_dword(zuma_mbox_dev.dev, PCI_BASE_ADDRESS_0, &iobase);
 
-  iobase &= PCI_BASE_ADDRESS_MEM_MASK;
+	iobase &= PCI_BASE_ADDRESS_MEM_MASK;
 
-  zuma_mbox_dev.sip = (PBB_DMA_REG_MAP *)iobase;
+	zuma_mbox_dev.sip = (PBB_DMA_REG_MAP *) iobase;
 
-  zuma_mbox_dev.sip->int_mask.word=0;
+	zuma_mbox_dev.sip->int_mask.word = 0;
 
-  printf("pbb @ %p v%d.%d, timestamp %08x\n", zuma_mbox_dev.sip,
-	 zuma_mbox_dev.sip->version.pci_bits.rev_major,
-	 zuma_mbox_dev.sip->version.pci_bits.rev_minor,
-	 zuma_mbox_dev.sip->timestamp);
+	printf("pbb @ %p v%d.%d, timestamp %08x\n", zuma_mbox_dev.sip,
+	       zuma_mbox_dev.sip->version.pci_bits.rev_major,
+	       zuma_mbox_dev.sip->version.pci_bits.rev_minor,
+	       zuma_mbox_dev.sip->timestamp);
 
-  if (zuma_mbox_do_all_mailbox() == -1) {
-	  printf("mailbox failed.. no ACC?\n");
-	  return -1;
-  }
+	if (zuma_mbox_do_all_mailbox() == -1) {
+		printf("mailbox failed.. no ACC?\n");
+		return -1;
+	}
 
-  zuma_mbox_dump();
+	zuma_mbox_dump();
 
-  zuma_mbox_setenv();
+	zuma_mbox_setenv();
 
-  return 0;
+	return 0;
 }
-- 
1.7.6.4

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 08/13] board/evb64260/zuma_pbb_mbox.c: Fix GCC 4.6 build warnings
  2011-11-09 19:28 [U-Boot] [PATCH 01/13] drivers/block/sym53c8xx.c: Fix GCC 4.6 build warning Wolfgang Denk
                   ` (5 preceding siblings ...)
  2011-11-09 19:29 ` [U-Boot] [PATCH 07/13] board/evb64260/zuma_pbb_mbox.c: CodingStyle cleanup Wolfgang Denk
@ 2011-11-09 19:29 ` Wolfgang Denk
  2011-11-16 20:04   ` Wolfgang Denk
  2011-11-09 19:29 ` [U-Boot] [PATCH 09/13] common/cmd_fdc.c: " Wolfgang Denk
                   ` (5 subsequent siblings)
  12 siblings, 1 reply; 37+ messages in thread
From: Wolfgang Denk @ 2011-11-09 19:29 UTC (permalink / raw)
  To: u-boot

Fix:
zuma_pbb_mbox.c: In function 'zuma_mbox_dump':
zuma_pbb_mbox.c:115:2: warning: dereferencing type-punned pointer will
break strict-aliasing rules [-Wstrict-aliasing]
zuma_pbb_mbox.c:117:2: warning: dereferencing type-punned pointer will
break strict-aliasing rules [-Wstrict-aliasing]

Signed-off-by: Wolfgang Denk <wd@denx.de>
---
 board/evb64260/zuma_pbb_mbox.c |   25 ++++++++++++++++++-------
 1 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/board/evb64260/zuma_pbb_mbox.c b/board/evb64260/zuma_pbb_mbox.c
index 3d7c976..621c64c 100644
--- a/board/evb64260/zuma_pbb_mbox.c
+++ b/board/evb64260/zuma_pbb_mbox.c
@@ -112,13 +112,24 @@ static int zuma_mbox_do_all_mailbox(void)
 
 static void zuma_mbox_dump(void)
 {
-	printf("ACC MAC=%04x%08x\n", *(unsigned short *) (&zuma_acc_mac),
-	       *(unsigned int *) ((char *) &zuma_acc_mac + 2));
-	printf("PRV MAC=%04x%08x\n", *(unsigned short *) (&zuma_prv_mac),
-	       *(unsigned int *) ((char *) &zuma_prv_mac + 2));
-	printf("slot:bac=%d:%d\n", (zuma_slot_bac >> 2) & 0xf,
-	       zuma_slot_bac & 0x3);
-	printf("BAUD1=%d BAUD2=%d\n", zuma_console_baud, zuma_debug_baud);
+	unsigned short s;
+	unsigned int i;
+
+	memcpy(&s, &zuma_acc_mac,    sizeof(s));
+	memcpy(&i, &zuma_acc_mac[2], sizeof(i));
+	printf("ACC MAC=%04x%08x\n", s, i);
+
+	memcpy(&s, &zuma_prv_mac,    sizeof(s));
+	memcpy(&s, &zuma_prv_mac[2], sizeof(i));
+	printf("PRV MAC=%04x%08x\n", s, i);
+
+	printf("slot:bac=%d:%d\n",
+		(zuma_slot_bac >> 2) & 0xf,
+		zuma_slot_bac & 0x3);
+
+	printf("BAUD1=%d BAUD2=%d\n",
+		zuma_console_baud,
+		zuma_debug_baud);
 }
 
 
-- 
1.7.6.4

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 09/13] common/cmd_fdc.c: Fix GCC 4.6 build warnings
  2011-11-09 19:28 [U-Boot] [PATCH 01/13] drivers/block/sym53c8xx.c: Fix GCC 4.6 build warning Wolfgang Denk
                   ` (6 preceding siblings ...)
  2011-11-09 19:29 ` [U-Boot] [PATCH 08/13] board/evb64260/zuma_pbb_mbox.c: Fix GCC 4.6 build warnings Wolfgang Denk
@ 2011-11-09 19:29 ` Wolfgang Denk
  2011-11-16 20:04   ` Wolfgang Denk
  2011-11-09 19:29 ` [U-Boot] [PATCH 10/13] common/cmd_universe.c: Fix GCC 4.6 build warning Wolfgang Denk
                   ` (4 subsequent siblings)
  12 siblings, 1 reply; 37+ messages in thread
From: Wolfgang Denk @ 2011-11-09 19:29 UTC (permalink / raw)
  To: u-boot

Fix:
cmd_fdc.c: In function 'fdc_read_data':
cmd_fdc.c:435:6: warning: variable 'flags' set but not used
[-Wunused-but-set-variable]
cmd_fdc.c:432:16: warning: variable 'pcn' set but not used
[-Wunused-but-set-variable]
cmd_fdc.c:431:20: warning: variable 'lastblk' set but not used
[-Wunused-but-set-variable]

Note: no attempts were made to otherwise cleanup the code.

Signed-off-by: Wolfgang Denk <wd@denx.de>
---
 common/cmd_fdc.c |   29 +++++++++++++++++------------
 1 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/common/cmd_fdc.c b/common/cmd_fdc.c
index 40d12f6..4fe410d 100644
--- a/common/cmd_fdc.c
+++ b/common/cmd_fdc.c
@@ -428,8 +428,8 @@ int fdc_terminate(FDC_COMMAND_STRUCT *pCMD)
 int fdc_read_data(unsigned char *buffer, unsigned long blocks,FDC_COMMAND_STRUCT *pCMD, FD_GEO_STRUCT *pFG)
 {
   /* first seek to start address */
-	unsigned long len,lastblk,readblk,i,timeout,ii,offset;
-	unsigned char pcn,c,retriesrw,retriescal;
+	unsigned long len,readblk,i,timeout,ii,offset;
+	unsigned char c,retriesrw,retriescal;
 	unsigned char *bufferw; /* working buffer */
 	int sect_size;
 	int flags;
@@ -442,18 +442,19 @@ int fdc_read_data(unsigned char *buffer, unsigned long blocks,FDC_COMMAND_STRUCT
 	offset=0;
 	if(fdc_seek(pCMD,pFG)==FALSE) {
 		stop_fdc_drive(pCMD);
-		enable_interrupts();
+		if (flags)
+			enable_interrupts();
 		return FALSE;
 	}
 	if((pCMD->result[STATUS_0]&0x20)!=0x20) {
 		printf("Seek error Status: %02X\n",pCMD->result[STATUS_0]);
 		stop_fdc_drive(pCMD);
-		enable_interrupts();
+		if (flags)
+			enable_interrupts();
 		return FALSE;
 	}
-	pcn=pCMD->result[STATUS_PCN]; /* current track */
 	/* now determine the next seek point */
-	lastblk=pCMD->blnr + blocks;
+	/*	lastblk=pCMD->blnr + blocks; */
 	/*	readblk=(pFG->head*pFG->sect)-(pCMD->blnr%(pFG->head*pFG->sect)); */
 	readblk=pFG->sect-(pCMD->blnr%pFG->sect);
 	PRINTF("1st nr of block possible read %ld start %ld\n",readblk,pCMD->blnr);
@@ -467,7 +468,8 @@ retryrw:
 		pCMD->cmd[COMMAND]=FDC_CMD_READ;
 		if(fdc_issue_cmd(pCMD,pFG)==FALSE) {
 			stop_fdc_drive(pCMD);
-			enable_interrupts();
+			if (flags)
+				enable_interrupts();
 			return FALSE;
 		}
 		for (i=0;i<len;i++) {
@@ -488,14 +490,16 @@ retryrw:
 					if(retriesrw++>FDC_RW_RETRIES) {
 						if (retriescal++>FDC_CAL_RETRIES) {
 							stop_fdc_drive(pCMD);
-							enable_interrupts();
+							if (flags)
+								enable_interrupts();
 							return FALSE;
 						}
 						else {
 							PRINTF(" trying to recalibrate Try %d\n",retriescal);
 							if(fdc_recalibrate(pCMD,pFG)==FALSE) {
 								stop_fdc_drive(pCMD);
-								enable_interrupts();
+								if (flags)
+									enable_interrupts();
 								return FALSE;
 							}
 							retriesrw=0;
@@ -528,7 +532,8 @@ retrycal:
 		/* a seek is necessary */
 		if(fdc_seek(pCMD,pFG)==FALSE) {
 			stop_fdc_drive(pCMD);
-			enable_interrupts();
+			if (flags)
+				enable_interrupts();
 			return FALSE;
 		}
 		if((pCMD->result[STATUS_0]&0x20)!=0x20) {
@@ -536,10 +541,10 @@ retrycal:
 			stop_fdc_drive(pCMD);
 			return FALSE;
 		}
-		pcn=pCMD->result[STATUS_PCN]; /* current track */
 	}while(TRUE); /* start over */
 	stop_fdc_drive(pCMD); /* switch off drive */
-	enable_interrupts();
+	if (flags)
+		enable_interrupts();
 	return TRUE;
 }
 
-- 
1.7.6.4

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 10/13] common/cmd_universe.c: Fix GCC 4.6 build warning
  2011-11-09 19:28 [U-Boot] [PATCH 01/13] drivers/block/sym53c8xx.c: Fix GCC 4.6 build warning Wolfgang Denk
                   ` (7 preceding siblings ...)
  2011-11-09 19:29 ` [U-Boot] [PATCH 09/13] common/cmd_fdc.c: " Wolfgang Denk
@ 2011-11-09 19:29 ` Wolfgang Denk
  2011-11-16 20:04   ` Wolfgang Denk
  2011-11-09 19:29 ` [U-Boot] [PATCH 11/13] drivers/video/ct69000.c: Fix GC " Wolfgang Denk
                   ` (3 subsequent siblings)
  12 siblings, 1 reply; 37+ messages in thread
From: Wolfgang Denk @ 2011-11-09 19:29 UTC (permalink / raw)
  To: u-boot

Fix:
cmd_universe.c: In function 'universe_init':
cmd_universe.c:49:17: warning: variable 'lastError' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
---
 common/cmd_universe.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/common/cmd_universe.c b/common/cmd_universe.c
index a86a574..58384f3 100644
--- a/common/cmd_universe.c
+++ b/common/cmd_universe.c
@@ -46,7 +46,7 @@ static UNI_DEV   *dev;
 
 int universe_init(void)
 {
-	int j, result, lastError = 0;
+	int j, result;
 	pci_dev_t busdevfn;
 	unsigned int val;
 
@@ -126,8 +126,6 @@ int universe_init(void)
  break_30:
 	free(dev);
  break_20:
-	lastError = result;
-
 	return result;
 }
 
-- 
1.7.6.4

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 11/13] drivers/video/ct69000.c: Fix GC 4.6 build warning
  2011-11-09 19:28 [U-Boot] [PATCH 01/13] drivers/block/sym53c8xx.c: Fix GCC 4.6 build warning Wolfgang Denk
                   ` (8 preceding siblings ...)
  2011-11-09 19:29 ` [U-Boot] [PATCH 10/13] common/cmd_universe.c: Fix GCC 4.6 build warning Wolfgang Denk
@ 2011-11-09 19:29 ` Wolfgang Denk
  2011-11-09 20:44   ` Mike Frysinger
                     ` (2 more replies)
  2011-11-09 19:29 ` [U-Boot] [PATCH 12/13] board/esd/cpci750/cpci750.c: Fix error handling Wolfgang Denk
                   ` (2 subsequent siblings)
  12 siblings, 3 replies; 37+ messages in thread
From: Wolfgang Denk @ 2011-11-09 19:29 UTC (permalink / raw)
  To: u-boot

Convert custom debug code to use standard debug() facility.
This also fixes these build warning:
ct69000.c: In function 'FindAndSetPllParamIntoXrRegs':
ct69000.c:706:28: warning: variable 'new_pixclock' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
---
 drivers/video/ct69000.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/video/ct69000.c b/drivers/video/ct69000.c
index 3db614d..0ed5f41 100644
--- a/drivers/video/ct69000.c
+++ b/drivers/video/ct69000.c
@@ -35,9 +35,11 @@
 #undef VGA_DEBUG
 #undef VGA_DUMP_REG
 #ifdef VGA_DEBUG
-#define	PRINTF(fmt,args...)	printf (fmt ,##args)
+#undef _DEBUG
+#define _DEBUG  1
 #else
-#define PRINTF(fmt,args...)
+#undef _DEBUG
+#define _DEBUG  0
 #endif
 
 /* Macros */
@@ -740,7 +742,7 @@ FindAndSetPllParamIntoXrRegs (unsigned int pixelclock,
 	}
 	m += param->mn_diff;
 	n += param->mn_diff;
-	PRINTF ("VCO %d, pd %d, m %d n %d vld %d \n", fvco, pd, m, n, vld);
+	debug("VCO %d, pd %d, m %d n %d vld %d\n", fvco, pd, m, n, vld);
 	xr_cb = ((0x7 & PD) << 4) | (vld == param->vld_set ? 0x04 : 0);
 	/* All four of the registers used for dot clock 2 (XRC8 - XRCB) must be
 	 * written, and in order from XRC8 to XRCB, before the hardware will
@@ -751,7 +753,7 @@ FindAndSetPllParamIntoXrRegs (unsigned int pixelclock,
 	ctWrite_i (CT_XR_O, 0xca, 0);	/* because of a hw bug I guess, but we write */
 	ctWrite_i (CT_XR_O, 0xcb, xr_cb);	/* 0 to it for savety */
 	new_pixclock = ReadPixClckFromXrRegsBack (param);
-	PRINTF ("pixelclock.set = %d, pixelclock.real = %d \n",
+	debug("pixelclock.set = %d, pixelclock.real = %d\n",
 		pixelclock, new_pixclock);
 }
 
@@ -1119,7 +1121,7 @@ video_hw_init (void)
 		pGD->dprBase &= 0xfffff000;
 		pGD->dprBase += 0x00001000;
 	}
-	PRINTF ("Cursor Start %x Pattern Start %x\n", pGD->dprBase,
+	debug("Cursor Start %x Pattern Start %x\n", pGD->dprBase,
 		PATTERN_ADR);
 	pGD->vprBase = pci_mem_base;	/* Dummy */
 	pGD->cprBase = pci_mem_base;	/* Dummy */
-- 
1.7.6.4

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 12/13] board/esd/cpci750/cpci750.c: Fix error handling
  2011-11-09 19:28 [U-Boot] [PATCH 01/13] drivers/block/sym53c8xx.c: Fix GCC 4.6 build warning Wolfgang Denk
                   ` (9 preceding siblings ...)
  2011-11-09 19:29 ` [U-Boot] [PATCH 11/13] drivers/video/ct69000.c: Fix GC " Wolfgang Denk
@ 2011-11-09 19:29 ` Wolfgang Denk
  2011-11-16 20:05   ` Wolfgang Denk
  2011-11-09 19:29 ` [U-Boot] [PATCH 13/13] board/esd/cpci750/sdram_init.c: Fix GCC 4.6 build warnings Wolfgang Denk
  2011-11-16 20:01 ` [U-Boot] [PATCH 01/13] drivers/block/sym53c8xx.c: Fix GCC 4.6 build warning Wolfgang Denk
  12 siblings, 1 reply; 37+ messages in thread
From: Wolfgang Denk @ 2011-11-09 19:29 UTC (permalink / raw)
  To: u-boot

ThE code recorded error conditions but did not pass these on to the
higher level caller.  Fixing this fixes also this build warning:
cpci750.c: In function 'do_loadpci':
cpci750.c:569:6: warning: variable 'status' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Reinhard Arlt <reinhard.arlt@esd-electronics.com>
---
 board/esd/cpci750/cpci750.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/board/esd/cpci750/cpci750.c b/board/esd/cpci750/cpci750.c
index f27d65e..08311c9 100644
--- a/board/esd/cpci750/cpci750.c
+++ b/board/esd/cpci750/cpci750.c
@@ -566,7 +566,7 @@ int do_loadpci(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	volatile unsigned int *ptr;
 	int count = 0;
 	int count2 = 0;
-	int status;
+	int status = 0;
 	char addr[16];
 	char str[] = "\\|/-";
 	char *local_args[2];
@@ -622,7 +622,7 @@ int do_loadpci(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 		break;
 	}
 
-	return 0;
+	return status;
 }
 
 U_BOOT_CMD(
-- 
1.7.6.4

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 13/13] board/esd/cpci750/sdram_init.c: Fix GCC 4.6 build warnings
  2011-11-09 19:28 [U-Boot] [PATCH 01/13] drivers/block/sym53c8xx.c: Fix GCC 4.6 build warning Wolfgang Denk
                   ` (10 preceding siblings ...)
  2011-11-09 19:29 ` [U-Boot] [PATCH 12/13] board/esd/cpci750/cpci750.c: Fix error handling Wolfgang Denk
@ 2011-11-09 19:29 ` Wolfgang Denk
  2011-11-09 20:45   ` Mike Frysinger
  2011-11-16 20:12   ` Wolfgang Denk
  2011-11-16 20:01 ` [U-Boot] [PATCH 01/13] drivers/block/sym53c8xx.c: Fix GCC 4.6 build warning Wolfgang Denk
  12 siblings, 2 replies; 37+ messages in thread
From: Wolfgang Denk @ 2011-11-09 19:29 UTC (permalink / raw)
  To: u-boot

Fix:
sdram_init.c: In function 'check_dimm':
sdram_init.c:267:50: warning: variable 'trrd_clocks' set but not used
[-Wunused-but-set-variable]
sdram_init.c:267:37: warning: variable 'tras_clocks' set but not used
[-Wunused-but-set-variable]
sdram_init.c:267:24: warning: variable 'trcd_clocks' set but not used
[-Wunused-but-set-variable]
sdram_init.c:267:8: warning: variable 'trp_clocks' set but not used
[-Wunused-but-set-variable]
sdram_init.c:253:16: warning: variable 'spd_checksum' set but not used
[-Wunused-but-set-variable]
sdram_init.c: In function 'initdram':
sdram_init.c:1693:14: warning: variable 's1' set but not used
[-Wunused-but-set-variable]
sdram_init.c:1693:6: warning: variable 's0' set but not used
[-Wunused-but-set-variable]

Biggest part o the fix is converting the custom debug code to standard
debug().

No attempts were made to cleanup the code.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Reinhard Arlt <reinhard.arlt@esd-electronics.com>
---
 board/esd/cpci750/sdram_init.c |  508 +++++++++++++++-------------------------
 1 files changed, 195 insertions(+), 313 deletions(-)

diff --git a/board/esd/cpci750/sdram_init.c b/board/esd/cpci750/sdram_init.c
index 615e32a..80c050e 100644
--- a/board/esd/cpci750/sdram_init.c
+++ b/board/esd/cpci750/sdram_init.c
@@ -47,18 +47,6 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#undef	DEBUG
-/* #define DEBUG */
-#ifdef CONFIG_PCI
-#define	MAP_PCI
-#endif /* of CONFIG_PCI */
-
-#ifdef DEBUG
-#define DP(x) x
-#else
-#define DP(x)
-#endif
-
 int set_dfcdlInit(void);	/* setup delay line of Mv64360 */
 
 /* ------------------------------------------------------------------------- */
@@ -250,8 +238,9 @@ NSto10PS(unsigned char spd_byte)
 /* static int check_dimm(uchar slot, AUX_MEM_DIMM_INFO *info) */
 static int check_dimm (uchar slot, AUX_MEM_DIMM_INFO * dimmInfo)
 {
+#if 0
 	unsigned long spd_checksum;
-
+#endif
 	uchar addr = slot == 0 ? DIMM0_I2C_ADDR : DIMM1_I2C_ADDR;
 	int ret;
 	unsigned int i, j, density = 1, devicesForErrCheck = 0;
@@ -264,7 +253,7 @@ static int check_dimm (uchar slot, AUX_MEM_DIMM_INFO * dimmInfo)
 	uchar supp_cal, cal_val;
 	ulong memclk, tmemclk;
 	ulong tmp;
-	uchar trp_clocks = 0, trcd_clocks, tras_clocks, trrd_clocks;
+	uchar trp_clocks = 0, tras_clocks;
 	uchar data[128];
 
 	memclk = gd->bus_clk;
@@ -275,11 +264,11 @@ static int check_dimm (uchar slot, AUX_MEM_DIMM_INFO * dimmInfo)
 
 	ret = 0;
 
-	DP (puts ("before i2c read\n"));
+	debug("before i2c read\n");
 
 	ret = i2c_read (addr, 0, 2, data, 128);
 
-	DP (puts ("after i2c read\n"));
+	debug("after i2c read\n");
 
 	if ((data[64] != 'e') || (data[65] != 's') || (data[66] != 'd')
 	    || (data[67] != '-') || (data[68] != 'g') || (data[69] != 'm')
@@ -345,7 +334,7 @@ static int check_dimm (uchar slot, AUX_MEM_DIMM_INFO * dimmInfo)
 	}
 
 	if (ret) {
-		DP (printf ("No DIMM in slot %d [err = %x]\n", slot, ret));
+		debug("No DIMM in slot %d [err = %x]\n", slot, ret);
 		return 0;
 	} else
 		dimmInfo->slot = slot;	/* start to fill up dimminfo for this "slot" */
@@ -402,8 +391,9 @@ static int check_dimm (uchar slot, AUX_MEM_DIMM_INFO * dimmInfo)
 /*------------------------------------------------------------------------------------------------------------------------------*/
 /* calculate SPD checksum */
 /*------------------------------------------------------------------------------------------------------------------------------*/
-	spd_checksum = 0;
 #if 0				/* test-only */
+	spd_checksum = 0;
+
 	for (i = 0; i <= 62; i++) {
 		spd_checksum += data[i];
 	}
@@ -424,46 +414,40 @@ static int check_dimm (uchar slot, AUX_MEM_DIMM_INFO * dimmInfo)
 			dimmInfo->memoryType = (data[i] == 0x7) ? DDR : SDRAM;
 #ifdef DEBUG
 			if (dimmInfo->memoryType == 0)
-				DP (printf
-				    ("Dram_type in slot %d is:			SDRAM\n",
-				     dimmInfo->slot));
+				debug("Dram_type in slot %d is:			SDRAM\n",
+				     dimmInfo->slot);
 			if (dimmInfo->memoryType == 1)
-				DP (printf
-				    ("Dram_type in slot %d is:			DDRAM\n",
-				     dimmInfo->slot));
+				debug("Dram_type in slot %d is:			DDRAM\n",
+				     dimmInfo->slot);
 #endif
 			break;
 /*------------------------------------------------------------------------------------------------------------------------------*/
 
 		case 3:	/* Number Of Row Addresses */
 			dimmInfo->numOfRowAddresses = data[i];
-			DP (printf
-			    ("Module Number of row addresses:		%d\n",
-			     dimmInfo->numOfRowAddresses));
+			debug("Module Number of row addresses:		%d\n",
+			     dimmInfo->numOfRowAddresses);
 			break;
 /*------------------------------------------------------------------------------------------------------------------------------*/
 
 		case 4:	/* Number Of Column Addresses */
 			dimmInfo->numOfColAddresses = data[i];
-			DP (printf
-			    ("Module Number of col addresses:		%d\n",
-			     dimmInfo->numOfColAddresses));
+			debug("Module Number of col addresses:		%d\n",
+			     dimmInfo->numOfColAddresses);
 			break;
 /*------------------------------------------------------------------------------------------------------------------------------*/
 
 		case 5:	/* Number Of Module Banks */
 			dimmInfo->numOfModuleBanks = data[i];
-			DP (printf
-			    ("Number of Banks on Mod. : 				%d\n",
-			     dimmInfo->numOfModuleBanks));
+			debug("Number of Banks on Mod. : 				%d\n",
+			     dimmInfo->numOfModuleBanks);
 			break;
 /*------------------------------------------------------------------------------------------------------------------------------*/
 
 		case 6:	/* Data Width */
 			dimmInfo->dataWidth = data[i];
-			DP (printf
-			    ("Module Data Width:				%d\n",
-			     dimmInfo->dataWidth));
+			debug("Module Data Width:				%d\n",
+			     dimmInfo->dataWidth);
 			break;
 /*------------------------------------------------------------------------------------------------------------------------------*/
 
@@ -471,33 +455,27 @@ static int check_dimm (uchar slot, AUX_MEM_DIMM_INFO * dimmInfo)
 			switch (data[i]) {
 			case 0x0:
 				dimmInfo->voltageInterface = TTL_5V_TOLERANT;
-				DP (printf
-				    ("Module is 					TTL_5V_TOLERANT\n"));
+				debug("Module is 					TTL_5V_TOLERANT\n");
 				break;
 			case 0x1:
 				dimmInfo->voltageInterface = LVTTL;
-				DP (printf
-				    ("Module is 					LVTTL\n"));
+				debug("Module is 					LVTTL\n");
 				break;
 			case 0x2:
 				dimmInfo->voltageInterface = HSTL_1_5V;
-				DP (printf
-				    ("Module is 					TTL_5V_TOLERANT\n"));
+				debug("Module is 					TTL_5V_TOLERANT\n");
 				break;
 			case 0x3:
 				dimmInfo->voltageInterface = SSTL_3_3V;
-				DP (printf
-				    ("Module is 					HSTL_1_5V\n"));
+				debug("Module is 					HSTL_1_5V\n");
 				break;
 			case 0x4:
 				dimmInfo->voltageInterface = SSTL_2_5V;
-				DP (printf
-				    ("Module is 					SSTL_2_5V\n"));
+				debug("Module is 					SSTL_2_5V\n");
 				break;
 			default:
 				dimmInfo->voltageInterface = VOLTAGE_UNKNOWN;
-				DP (printf
-				    ("Module is 					VOLTAGE_UNKNOWN\n"));
+				debug("Module is 					VOLTAGE_UNKNOWN\n");
 				break;
 			}
 			break;
@@ -516,9 +494,8 @@ static int check_dimm (uchar slot, AUX_MEM_DIMM_INFO * dimmInfo)
 				leftOfPoint;
 			dimmInfo->minimumCycleTimeAtMaxCasLatancy_RoP =
 				rightOfPoint;
-			DP (printf
-			    ("Minimum Cycle Time At Max CasLatancy:		%d.%d [ns]\n",
-			     leftOfPoint, rightOfPoint));
+			debug("Minimum Cycle Time At Max CasLatancy:		%d.%d [ns]\n",
+			     leftOfPoint, rightOfPoint);
 			break;
 /*------------------------------------------------------------------------------------------------------------------------------*/
 
@@ -531,9 +508,8 @@ static int check_dimm (uchar slot, AUX_MEM_DIMM_INFO * dimmInfo)
 			rightOfPoint = time_tmp % div;
 			dimmInfo->clockToDataOut_LoP = leftOfPoint;
 			dimmInfo->clockToDataOut_RoP = rightOfPoint;
-			DP (printf
-			    ("Clock To Data Out:				%d.%2d [ns]\n",
-			     leftOfPoint, rightOfPoint));
+			debug("Clock To Data Out:				%d.%2d [ns]\n",
+			     leftOfPoint, rightOfPoint);
 			/*dimmInfo->clockToDataOut */
 			break;
 /*------------------------------------------------------------------------------------------------------------------------------*/
@@ -541,42 +517,37 @@ static int check_dimm (uchar slot, AUX_MEM_DIMM_INFO * dimmInfo)
 #ifdef CONFIG_MV64360_ECC
 		case 11:	/* Error Check Type */
 			dimmInfo->errorCheckType = data[i];
-			DP (printf
-			    ("Error Check Type (0=NONE):			%d\n",
-			     dimmInfo->errorCheckType));
+			debug("Error Check Type (0=NONE):			%d\n",
+			     dimmInfo->errorCheckType);
 			break;
 #endif /* of ifdef CONFIG_MV64360_ECC */
 /*------------------------------------------------------------------------------------------------------------------------------*/
 
 		case 12:	/* Refresh Interval */
 			dimmInfo->RefreshInterval = data[i];
-			DP (printf
-			    ("RefreshInterval (80= Self refresh Normal, 15.625us) : %x\n",
-			     dimmInfo->RefreshInterval));
+			debug("RefreshInterval (80= Self refresh Normal, 15.625us) : %x\n",
+			     dimmInfo->RefreshInterval);
 			break;
 /*------------------------------------------------------------------------------------------------------------------------------*/
 
 		case 13:	/* Sdram Width */
 			dimmInfo->sdramWidth = data[i];
-			DP (printf
-			    ("Sdram Width:					%d\n",
-			     dimmInfo->sdramWidth));
+			debug("Sdram Width:					%d\n",
+			     dimmInfo->sdramWidth);
 			break;
 /*------------------------------------------------------------------------------------------------------------------------------*/
 
 		case 14:	/* Error Check Data Width */
 			dimmInfo->errorCheckDataWidth = data[i];
-			DP (printf
-			    ("Error Check Data Width:			%d\n",
-			     dimmInfo->errorCheckDataWidth));
+			debug("Error Check Data Width:			%d\n",
+			     dimmInfo->errorCheckDataWidth);
 			break;
 /*------------------------------------------------------------------------------------------------------------------------------*/
 
 		case 15:	/* Minimum Clock Delay */
 			dimmInfo->minClkDelay = data[i];
-			DP (printf
-			    ("Minimum Clock Delay:				%d\n",
-			     dimmInfo->minClkDelay));
+			debug("Minimum Clock Delay:				%d\n",
+			     dimmInfo->minClkDelay);
 			break;
 /*------------------------------------------------------------------------------------------------------------------------------*/
 
@@ -592,26 +563,24 @@ static int check_dimm (uchar slot, AUX_MEM_DIMM_INFO * dimmInfo)
 
 			dimmInfo->burstLengthSupported = data[i];
 #ifdef DEBUG
-			DP (printf
-			    ("Burst Length Supported:			"));
+			debug("Burst Length Supported:			");
 			if (dimmInfo->burstLengthSupported & 0x01)
-				DP (printf ("1, "));
+				debug("1, ");
 			if (dimmInfo->burstLengthSupported & 0x02)
-				DP (printf ("2, "));
+				debug("2, ");
 			if (dimmInfo->burstLengthSupported & 0x04)
-				DP (printf ("4, "));
+				debug("4, ");
 			if (dimmInfo->burstLengthSupported & 0x08)
-				DP (printf ("8, "));
-			DP (printf (" Bit \n"));
+				debug("8, ");
+			debug(" Bit \n");
 #endif
 			break;
 /*------------------------------------------------------------------------------------------------------------------------------*/
 
 		case 17:	/* Number Of Banks On Each Device */
 			dimmInfo->numOfBanksOnEachDevice = data[i];
-			DP (printf
-			    ("Number Of Banks On Each Chip:			%d\n",
-			     dimmInfo->numOfBanksOnEachDevice));
+			debug("Number Of Banks On Each Chip:			%d\n",
+			     dimmInfo->numOfBanksOnEachDevice);
 			break;
 /*------------------------------------------------------------------------------------------------------------------------------*/
 
@@ -631,34 +600,32 @@ static int check_dimm (uchar slot, AUX_MEM_DIMM_INFO * dimmInfo)
 			 ********************************************************/
 			dimmInfo->suportedCasLatencies = data[i];
 #ifdef DEBUG
-			DP (printf
-			    ("Suported Cas Latencies: (CL)			"));
+			debug("Suported Cas Latencies: (CL)			");
 			if (dimmInfo->memoryType == 0) {	/* SDRAM */
 				for (k = 0; k <= 7; k++) {
 					if (dimmInfo->
 					    suportedCasLatencies & (1 << k))
-						DP (printf
-						    ("%d,			",
-						     k + 1));
+						debug("%d,			",
+						     k + 1);
 				}
 
 			} else {	/* DDR-RAM */
 
 				if (dimmInfo->suportedCasLatencies & 1)
-					DP (printf ("1, "));
+					debug("1, ");
 				if (dimmInfo->suportedCasLatencies & 2)
-					DP (printf ("1.5, "));
+					debug("1.5, ");
 				if (dimmInfo->suportedCasLatencies & 4)
-					DP (printf ("2, "));
+					debug("2, ");
 				if (dimmInfo->suportedCasLatencies & 8)
-					DP (printf ("2.5, "));
+					debug("2.5, ");
 				if (dimmInfo->suportedCasLatencies & 16)
-					DP (printf ("3, "));
+					debug("3, ");
 				if (dimmInfo->suportedCasLatencies & 32)
-					DP (printf ("3.5, "));
+					debug("3.5, ");
 
 			}
-			DP (printf ("\n"));
+			debug("\n");
 #endif
 			/* Calculating MAX CAS latency */
 			for (j = 7; j > 0; j--) {
@@ -670,8 +637,7 @@ static int check_dimm (uchar slot, AUX_MEM_DIMM_INFO * dimmInfo)
 						/* CAS latency 1, 1.5, 2, 2.5, 3, 3.5 */
 						switch (j) {
 						case 7:
-							DP (printf
-							    ("Max. Cas Latencies (DDR): 			ERROR !!!\n"));
+							debug("Max. Cas Latencies (DDR): 			ERROR !!!\n");
 							dimmInfo->
 								maxClSupported_DDR
 								=
@@ -679,8 +645,7 @@ static int check_dimm (uchar slot, AUX_MEM_DIMM_INFO * dimmInfo)
 							hang ();
 							break;
 						case 6:
-							DP (printf
-							    ("Max. Cas Latencies (DDR): 			ERROR !!!\n"));
+							debug("Max. Cas Latencies (DDR): 			ERROR !!!\n");
 							dimmInfo->
 								maxClSupported_DDR
 								=
@@ -688,36 +653,31 @@ static int check_dimm (uchar slot, AUX_MEM_DIMM_INFO * dimmInfo)
 							hang ();
 							break;
 						case 5:
-							DP (printf
-							    ("Max. Cas Latencies (DDR): 			3.5 clk's\n"));
+							debug("Max. Cas Latencies (DDR): 			3.5 clk's\n");
 							dimmInfo->
 								maxClSupported_DDR
 								= DDR_CL_3_5;
 							break;
 						case 4:
-							DP (printf
-							    ("Max. Cas Latencies (DDR): 			3 clk's \n"));
+							debug("Max. Cas Latencies (DDR): 			3 clk's \n");
 							dimmInfo->
 								maxClSupported_DDR
 								= DDR_CL_3;
 							break;
 						case 3:
-							DP (printf
-							    ("Max. Cas Latencies (DDR): 			2.5 clk's \n"));
+							debug("Max. Cas Latencies (DDR): 			2.5 clk's \n");
 							dimmInfo->
 								maxClSupported_DDR
 								= DDR_CL_2_5;
 							break;
 						case 2:
-							DP (printf
-							    ("Max. Cas Latencies (DDR): 			2 clk's \n"));
+							debug("Max. Cas Latencies (DDR): 			2 clk's \n");
 							dimmInfo->
 								maxClSupported_DDR
 								= DDR_CL_2;
 							break;
 						case 1:
-							DP (printf
-							    ("Max. Cas Latencies (DDR): 			1.5 clk's \n"));
+							debug("Max. Cas Latencies (DDR): 			1.5 clk's \n");
 							dimmInfo->
 								maxClSupported_DDR
 								= DDR_CL_1_5;
@@ -736,32 +696,29 @@ static int check_dimm (uchar slot, AUX_MEM_DIMM_INFO * dimmInfo)
 							dimmInfo->
 								maxCASlatencySupported_RoP
 								= 0;
-						DP (printf
-						    ("Max. Cas Latencies (DDR LoP.RoP Notation):	%d.%d \n",
+						debug("Max. Cas Latencies (DDR LoP.RoP Notation):	%d.%d \n",
 						     dimmInfo->
 						     maxCASlatencySupported_LoP,
 						     dimmInfo->
-						     maxCASlatencySupported_RoP));
+						     maxCASlatencySupported_RoP);
 						break;
 					case SDRAM:
 						/* CAS latency 1, 2, 3, 4, 5, 6, 7 */
 						dimmInfo->maxClSupported_SD = j;	/*  Cas Latency DDR-RAM Coded			*/
-						DP (printf
-						    ("Max. Cas Latencies (SD): %d\n",
+						debug("Max. Cas Latencies (SD): %d\n",
 						     dimmInfo->
-						     maxClSupported_SD));
+						     maxClSupported_SD);
 						dimmInfo->
 							maxCASlatencySupported_LoP
 							= j;
 						dimmInfo->
 							maxCASlatencySupported_RoP
 							= 0;
-						DP (printf
-						    ("Max. Cas Latencies (DDR LoP.RoP Notation): %d.%d \n",
+						debug("Max. Cas Latencies (DDR LoP.RoP Notation): %d.%d \n",
 						     dimmInfo->
 						     maxCASlatencySupported_LoP,
 						     dimmInfo->
-						     maxCASlatencySupported_RoP));
+						     maxCASlatencySupported_RoP);
 						break;
 					}
 					break;
@@ -771,7 +728,7 @@ static int check_dimm (uchar slot, AUX_MEM_DIMM_INFO * dimmInfo)
 /*------------------------------------------------------------------------------------------------------------------------------*/
 
 		case 21:	/* Buffered Address And Control Inputs */
-			DP (printf ("\nModul Attributes (SPD Byte 21): \n"));
+			debug("\nModul Attributes (SPD Byte 21): \n");
 			dimmInfo->bufferedAddrAndControlInputs =
 				data[i] & BIT0;
 			dimmInfo->registeredAddrAndControlInputs =
@@ -784,62 +741,47 @@ static int check_dimm (uchar slot, AUX_MEM_DIMM_INFO * dimmInfo)
 				(data[i] & BIT5) >> 5;
 			dimmInfo->redundantRowAddressing =
 				(data[i] & BIT6) >> 6;
-#ifdef DEBUG
+
 			if (dimmInfo->bufferedAddrAndControlInputs == 1)
-				DP (printf
-				    (" - Buffered Address/Control Input:		Yes \n"));
+				debug(" - Buffered Address/Control Input:		Yes \n");
 			else
-				DP (printf
-				    (" - Buffered Address/Control Input:		No \n"));
+				debug(" - Buffered Address/Control Input:		No \n");
 
 			if (dimmInfo->registeredAddrAndControlInputs == 1)
-				DP (printf
-				    (" - Registered Address/Control Input:		Yes \n"));
+				debug(" - Registered Address/Control Input:		Yes \n");
 			else
-				DP (printf
-				    (" - Registered Address/Control Input:		No \n"));
+				debug(" - Registered Address/Control Input:		No \n");
 
 			if (dimmInfo->onCardPLL == 1)
-				DP (printf
-				    (" - On-Card PLL (clock):				Yes \n"));
+				debug(" - On-Card PLL (clock):				Yes \n");
 			else
-				DP (printf
-				    (" - On-Card PLL (clock):				No \n"));
+				debug(" - On-Card PLL (clock):				No \n");
 
 			if (dimmInfo->bufferedDQMBinputs == 1)
-				DP (printf
-				    (" - Bufferd DQMB Inputs:				Yes \n"));
+				debug(" - Bufferd DQMB Inputs:				Yes \n");
 			else
-				DP (printf
-				    (" - Bufferd DQMB Inputs:				No \n"));
+				debug(" - Bufferd DQMB Inputs:				No \n");
 
 			if (dimmInfo->registeredDQMBinputs == 1)
-				DP (printf
-				    (" - Registered DQMB Inputs:			Yes \n"));
+				debug(" - Registered DQMB Inputs:			Yes \n");
 			else
-				DP (printf
-				    (" - Registered DQMB Inputs:			No \n"));
+				debug(" - Registered DQMB Inputs:			No \n");
 
 			if (dimmInfo->differentialClockInput == 1)
-				DP (printf
-				    (" - Differential Clock Input:			Yes \n"));
+				debug(" - Differential Clock Input:			Yes \n");
 			else
-				DP (printf
-				    (" - Differential Clock Input:			No \n"));
+				debug(" - Differential Clock Input:			No \n");
 
 			if (dimmInfo->redundantRowAddressing == 1)
-				DP (printf
-				    (" - redundant Row Addressing:			Yes \n"));
+				debug(" - redundant Row Addressing:			Yes \n");
 			else
-				DP (printf
-				    (" - redundant Row Addressing:			No \n"));
+				debug(" - redundant Row Addressing:			No \n");
 
-#endif
 			break;
 /*------------------------------------------------------------------------------------------------------------------------------*/
 
 		case 22:	/* Suported AutoPreCharge */
-			DP (printf ("\nModul Attributes (SPD Byte 22): \n"));
+			debug("\nModul Attributes (SPD Byte 22): \n");
 			dimmInfo->suportedEarlyRasPreCharge = data[i] & BIT0;
 			dimmInfo->suportedAutoPreCharge =
 				(data[i] & BIT1) >> 1;
@@ -851,50 +793,37 @@ static int check_dimm (uchar slot, AUX_MEM_DIMM_INFO * dimmInfo)
 				(data[i] & BIT4) >> 4;
 			dimmInfo->suported5PercentUpperVCC =
 				(data[i] & BIT5) >> 5;
-#ifdef DEBUG
+
 			if (dimmInfo->suportedEarlyRasPreCharge == 1)
-				DP (printf
-				    (" - Early Ras Precharge:			Yes \n"));
+				debug(" - Early Ras Precharge:			Yes \n");
 			else
-				DP (printf
-				    (" -  Early Ras Precharge:			No \n"));
+				debug(" -  Early Ras Precharge:			No \n");
 
 			if (dimmInfo->suportedAutoPreCharge == 1)
-				DP (printf
-				    (" - AutoPreCharge:				Yes \n"));
+				debug(" - AutoPreCharge:				Yes \n");
 			else
-				DP (printf
-				    (" -  AutoPreCharge:				No \n"));
+				debug(" -  AutoPreCharge:				No \n");
 
 			if (dimmInfo->suportedPreChargeAll == 1)
-				DP (printf
-				    (" - Precharge All:				Yes \n"));
+				debug(" - Precharge All:				Yes \n");
 			else
-				DP (printf
-				    (" -  Precharge All:				No \n"));
+				debug(" -  Precharge All:				No \n");
 
 			if (dimmInfo->suportedWrite1ReadBurst == 1)
-				DP (printf
-				    (" - Write 1/ReadBurst:				Yes \n"));
+				debug(" - Write 1/ReadBurst:				Yes \n");
 			else
-				DP (printf
-				    (" -  Write 1/ReadBurst:				No \n"));
+				debug(" -  Write 1/ReadBurst:				No \n");
 
 			if (dimmInfo->suported5PercentLowVCC == 1)
-				DP (printf
-				    (" - lower VCC tolerance:			5 Percent \n"));
+				debug(" - lower VCC tolerance:			5 Percent \n");
 			else
-				DP (printf
-				    ("	- lower VCC tolerance:			10 Percent \n"));
+				debug("	- lower VCC tolerance:			10 Percent \n");
 
 			if (dimmInfo->suported5PercentUpperVCC == 1)
-				DP (printf
-				    (" - upper VCC tolerance:			5 Percent \n"));
+				debug(" - upper VCC tolerance:			5 Percent \n");
 			else
-				DP (printf
-				    (" -  upper VCC tolerance:			10 Percent \n"));
+				debug(" -  upper VCC tolerance:			10 Percent \n");
 
-#endif
 			break;
 /*------------------------------------------------------------------------------------------------------------------------------*/
 
@@ -911,9 +840,8 @@ static int check_dimm (uchar slot, AUX_MEM_DIMM_INFO * dimmInfo)
 				leftOfPoint;
 			dimmInfo->minimumCycleTimeAtMaxCasLatancyMinus1_RoP =
 				rightOfPoint;
-			DP (printf
-			    ("Minimum Cycle Time At 2nd highest CasLatancy (0 = Not supported): %d.%d [ns]\n",
-			     leftOfPoint, rightOfPoint));
+			debug("Minimum Cycle Time At 2nd highest CasLatancy (0 = Not supported): %d.%d [ns]\n",
+			     leftOfPoint, rightOfPoint);
 			/*dimmInfo->minimumCycleTimeAtMaxCasLatancy */
 			break;
 /*------------------------------------------------------------------------------------------------------------------------------*/
@@ -927,9 +855,8 @@ static int check_dimm (uchar slot, AUX_MEM_DIMM_INFO * dimmInfo)
 			rightOfPoint = time_tmp % div;
 			dimmInfo->clockToDataOutMinus1_LoP = leftOfPoint;
 			dimmInfo->clockToDataOutMinus1_RoP = rightOfPoint;
-			DP (printf
-			    ("Clock To Data Out (2nd CL value): 		%d.%2d [ns]\n",
-			     leftOfPoint, rightOfPoint));
+			debug("Clock To Data Out (2nd CL value): 		%d.%2d [ns]\n",
+			     leftOfPoint, rightOfPoint);
 			break;
 /*------------------------------------------------------------------------------------------------------------------------------*/
 
@@ -946,9 +873,8 @@ static int check_dimm (uchar slot, AUX_MEM_DIMM_INFO * dimmInfo)
 				leftOfPoint;
 			dimmInfo->minimumCycleTimeAtMaxCasLatancyMinus2_RoP =
 				rightOfPoint;
-			DP (printf
-			    ("Minimum Cycle Time At 3rd highest CasLatancy (0 = Not supported): %d.%d [ns]\n",
-			     leftOfPoint, rightOfPoint));
+			debug("Minimum Cycle Time At 3rd highest CasLatancy (0 = Not supported): %d.%d [ns]\n",
+			     leftOfPoint, rightOfPoint);
 			/*dimmInfo->minimumCycleTimeAtMaxCasLatancy */
 			break;
 /*------------------------------------------------------------------------------------------------------------------------------*/
@@ -962,9 +888,8 @@ static int check_dimm (uchar slot, AUX_MEM_DIMM_INFO * dimmInfo)
 			rightOfPoint = time_tmp % div;
 			dimmInfo->clockToDataOutMinus2_LoP = leftOfPoint;
 			dimmInfo->clockToDataOutMinus2_RoP = rightOfPoint;
-			DP (printf
-			    ("Clock To Data Out (3rd CL value): 		%d.%2d [ns]\n",
-			     leftOfPoint, rightOfPoint));
+			debug("Clock To Data Out (3rd CL value): 		%d.%2d [ns]\n",
+			     leftOfPoint, rightOfPoint);
 			break;
 /*------------------------------------------------------------------------------------------------------------------------------*/
 
@@ -981,12 +906,10 @@ static int check_dimm (uchar slot, AUX_MEM_DIMM_INFO * dimmInfo)
 			trp_clocks =
 				(dimmInfo->minRowPrechargeTime +
 				 (tmemclk - 1)) / tmemclk;
-			DP (printf
-			    ("*** 1 clock cycle = %ld  10ps intervalls = %ld.%ld ns****\n",
-			     tmemclk, tmemclk / 100, tmemclk % 100));
-			DP (printf
-			    ("Minimum Row Precharge Time [ns]:		%d.%2d = in Clk cycles %d\n",
-			     leftOfPoint, rightOfPoint, trp_clocks));
+			debug("*** 1 clock cycle = %ld  10ps intervalls = %ld.%ld ns****\n",
+			     tmemclk, tmemclk / 100, tmemclk % 100);
+			debug("Minimum Row Precharge Time [ns]:		%d.%2d = in Clk cycles %d\n",
+			     leftOfPoint, rightOfPoint, trp_clocks);
 			break;
 /*------------------------------------------------------------------------------------------------------------------------------*/
 
@@ -1000,12 +923,8 @@ static int check_dimm (uchar slot, AUX_MEM_DIMM_INFO * dimmInfo)
 			rightOfPoint = (data[i] & maskRightOfPoint) * 25;
 
 			dimmInfo->minRowActiveRowActiveDelay = ((leftOfPoint * 100) + rightOfPoint);	/* measured in 100ns Intervals */
-			trrd_clocks =
-				(dimmInfo->minRowActiveRowActiveDelay +
-				 (tmemclk - 1)) / tmemclk;
-			DP (printf
-			    ("Minimum Row Active -To- Row Active Delay [ns]:	%d.%2d = in Clk cycles %d\n",
-			     leftOfPoint, rightOfPoint, trp_clocks));
+			debug("Minimum Row Active -To- Row Active Delay [ns]:	%d.%2d = in Clk cycles %d\n",
+			     leftOfPoint, rightOfPoint, trp_clocks);
 			break;
 /*------------------------------------------------------------------------------------------------------------------------------*/
 
@@ -1019,12 +938,8 @@ static int check_dimm (uchar slot, AUX_MEM_DIMM_INFO * dimmInfo)
 			rightOfPoint = (data[i] & maskRightOfPoint) * 25;
 
 			dimmInfo->minRowActiveRowActiveDelay = ((leftOfPoint * 100) + rightOfPoint);	/* measured in 100ns Intervals */
-			trcd_clocks =
-				(dimmInfo->minRowActiveRowActiveDelay +
-				 (tmemclk - 1)) / tmemclk;
-			DP (printf
-			    ("Minimum Ras-To-Cas Delay [ns]:			%d.%2d = in Clk cycles %d\n",
-			     leftOfPoint, rightOfPoint, trp_clocks));
+			debug("Minimum Ras-To-Cas Delay [ns]:			%d.%2d = in Clk cycles %d\n",
+			     leftOfPoint, rightOfPoint, trp_clocks);
 			break;
 /*------------------------------------------------------------------------------------------------------------------------------*/
 
@@ -1033,41 +948,38 @@ static int check_dimm (uchar slot, AUX_MEM_DIMM_INFO * dimmInfo)
 			tras_clocks =
 				(NSto10PS (data[i]) +
 				 (tmemclk - 1)) / tmemclk;
-			DP (printf
-			    ("Minimum Ras Pulse Width [ns]:			%d = in Clk cycles %d\n",
-			     dimmInfo->minRasPulseWidth, tras_clocks));
+			debug("Minimum Ras Pulse Width [ns]:			%d = in Clk cycles %d\n",
+			     dimmInfo->minRasPulseWidth, tras_clocks);
 
 			break;
 /*------------------------------------------------------------------------------------------------------------------------------*/
 
 		case 31:	/* Module Bank Density */
 			dimmInfo->moduleBankDensity = data[i];
-			DP (printf
-			    ("Module Bank Density:				%d\n",
-			     dimmInfo->moduleBankDensity));
+			debug("Module Bank Density:				%d\n",
+			     dimmInfo->moduleBankDensity);
 #ifdef DEBUG
-			DP (printf
-			    ("*** Offered Densities (more than 1 = Multisize-Module): "));
+			debug("*** Offered Densities (more than 1 = Multisize-Module): ");
 			{
 				if (dimmInfo->moduleBankDensity & 1)
-					DP (printf ("4MB, "));
+					debug("4MB, ");
 				if (dimmInfo->moduleBankDensity & 2)
-					DP (printf ("8MB, "));
+					debug("8MB, ");
 				if (dimmInfo->moduleBankDensity & 4)
-					DP (printf ("16MB, "));
+					debug("16MB, ");
 				if (dimmInfo->moduleBankDensity & 8)
-					DP (printf ("32MB, "));
+					debug("32MB, ");
 				if (dimmInfo->moduleBankDensity & 16)
-					DP (printf ("64MB, "));
+					debug("64MB, ");
 				if (dimmInfo->moduleBankDensity & 32)
-					DP (printf ("128MB, "));
+					debug("128MB, ");
 				if ((dimmInfo->moduleBankDensity & 64)
 				    || (dimmInfo->moduleBankDensity & 128)) {
-					DP (printf ("ERROR, "));
+					debug("ERROR, ");
 					hang ();
 				}
 			}
-			DP (printf ("\n"));
+			debug("\n");
 #endif
 			break;
 /*------------------------------------------------------------------------------------------------------------------------------*/
@@ -1093,9 +1005,8 @@ static int check_dimm (uchar slot, AUX_MEM_DIMM_INFO * dimmInfo)
 			}
 			dimmInfo->addrAndCommandSetupTime =
 				(leftOfPoint * 100 + rightOfPoint) * sign;
-			DP (printf
-			    ("Address And Command Setup Time [ns]:		%d.%d\n",
-			     sign * leftOfPoint, rightOfPoint));
+			debug("Address And Command Setup Time [ns]:		%d.%d\n",
+			     sign * leftOfPoint, rightOfPoint);
 			break;
 /*------------------------------------------------------------------------------------------------------------------------------*/
 
@@ -1120,9 +1031,8 @@ static int check_dimm (uchar slot, AUX_MEM_DIMM_INFO * dimmInfo)
 			}
 			dimmInfo->addrAndCommandHoldTime =
 				(leftOfPoint * 100 + rightOfPoint) * sign;
-			DP (printf
-			    ("Address And Command Hold Time [ns]:		%d.%d\n",
-			     sign * leftOfPoint, rightOfPoint));
+			debug("Address And Command Hold Time [ns]:		%d.%d\n",
+			     sign * leftOfPoint, rightOfPoint);
 			break;
 /*------------------------------------------------------------------------------------------------------------------------------*/
 
@@ -1147,9 +1057,8 @@ static int check_dimm (uchar slot, AUX_MEM_DIMM_INFO * dimmInfo)
 			}
 			dimmInfo->dataInputSetupTime =
 				(leftOfPoint * 100 + rightOfPoint) * sign;
-			DP (printf
-			    ("Data Input Setup Time [ns]:			%d.%d\n",
-			     sign * leftOfPoint, rightOfPoint));
+			debug("Data Input Setup Time [ns]:			%d.%d\n",
+			     sign * leftOfPoint, rightOfPoint);
 			break;
 /*------------------------------------------------------------------------------------------------------------------------------*/
 
@@ -1174,9 +1083,8 @@ static int check_dimm (uchar slot, AUX_MEM_DIMM_INFO * dimmInfo)
 			}
 			dimmInfo->dataInputHoldTime =
 				(leftOfPoint * 100 + rightOfPoint) * sign;
-			DP (printf
-			    ("Data Input Hold Time [ns]:			%d.%d\n\n",
-			     sign * leftOfPoint, rightOfPoint));
+			debug("Data Input Hold Time [ns]:			%d.%d\n\n",
+			     sign * leftOfPoint, rightOfPoint);
 			break;
 /*------------------------------------------------------------------------------------------------------------------------------*/
 		}
@@ -1213,7 +1121,7 @@ static int check_dimm (uchar slot, AUX_MEM_DIMM_INFO * dimmInfo)
 	tmp *= dimmInfo->sdramWidth;
 	tmp = tmp >> 24;	/* div by 0x4000000 (64M)	*/
 	dimmInfo->drb_size = (uchar) tmp;
-	DP (printf ("Module DRB size (n*64Mbit): %d\n", dimmInfo->drb_size));
+	debug("Module DRB size (n*64Mbit): %d\n", dimmInfo->drb_size);
 
 	/* try a CAS latency of 3 first... */
 
@@ -1236,11 +1144,11 @@ static int check_dimm (uchar slot, AUX_MEM_DIMM_INFO * dimmInfo)
 			cal_val = 4;
 	}
 
-	DP (printf ("cal_val = %d\n", cal_val * 5));
+	debug("cal_val = %d\n", cal_val * 5);
 
 	/* bummer, did't work... */
 	if (cal_val == 0) {
-		DP (printf ("Couldn't find a good CAS latency\n"));
+		debug("Couldn't find a good CAS latency\n");
 		hang ();
 		return 0;
 	}
@@ -1267,81 +1175,74 @@ int setup_sdram (AUX_MEM_DIMM_INFO * info)
 
 	/* Program the GT with the discovered data */
 	if (info->registeredAddrAndControlInputs == true)
-		DP (printf
-		    ("Module is registered, but we do not support registered Modules !!!\n"));
+		debug("Module is registered, but we do not support registered Modules !!!\n");
 
 	/* delay line */
 	set_dfcdlInit ();	/* may be its not needed */
-	DP (printf ("Delay line set done\n"));
+	debug("Delay line set done\n");
 
 	/* set SDRAM mode NOP */ /* To_do check it */
 	GT_REG_WRITE (SDRAM_OPERATION, 0x5);
 	while (GTREGREAD (SDRAM_OPERATION) != 0) {
-		DP (printf
-		    ("\n*** SDRAM_OPERATION 1418: Module still busy ... please wait... ***\n"));
+		debug("\n*** SDRAM_OPERATION 1418: Module still busy ... please wait... ***\n");
 	}
 
 #ifdef CONFIG_MV64360_ECC
 	if ((info->errorCheckType == 0x2) && (CPCI750_ECC_TEST)) {
 		/* DRAM has ECC, so turn it on */
 		sdram_config_reg |= BIT18;
-		DP(printf("Enabling ECC\n"));
+		debug("Enabling ECC\n");
 	}
 #endif /* of ifdef CONFIG_MV64360_ECC */
 
 	/* SDRAM configuration */
 	GT_REG_WRITE(SDRAM_CONFIG, sdram_config_reg);
-	DP (printf ("sdram_conf 0x1400: %08x\n", GTREGREAD (SDRAM_CONFIG)));
+	debug("sdram_conf 0x1400: %08x\n", GTREGREAD (SDRAM_CONFIG));
 
 	/* SDRAM open pages controll keep open as much as I can */
 	GT_REG_WRITE (SDRAM_OPEN_PAGES_CONTROL, 0x0);
-	DP (printf
-	    ("sdram_open_pages_controll 0x1414: %08x\n",
-	     GTREGREAD (SDRAM_OPEN_PAGES_CONTROL)));
+	debug("sdram_open_pages_controll 0x1414: %08x\n",
+	     GTREGREAD (SDRAM_OPEN_PAGES_CONTROL));
 
 
 	/* SDRAM D_UNIT_CONTROL_LOW 0x1404 */
 	tmp = (GTREGREAD (D_UNIT_CONTROL_LOW) & 0x01);	/* Clock Domain Sync from power on reset */
 	if (tmp == 0)
-		DP (printf ("Core Signals are sync (by HW-Setting)!!!\n"));
+		debug("Core Signals are sync (by HW-Setting)!!!\n");
 	else
-		DP (printf
-		    ("Core Signals syncs. are bypassed (by HW-Setting)!!!\n"));
+		debug("Core Signals syncs. are bypassed (by HW-Setting)!!!\n");
 
 	/* SDRAM set CAS Lentency according to SPD information */
 	switch (info->memoryType) {
 	case SDRAM:
-		DP (printf ("### SD-RAM not supported yet !!!\n"));
+		debug("### SD-RAM not supported yet !!!\n");
 		hang ();
 		/* ToDo fill SD-RAM if needed !!!!! */
 		break;
 
 	case DDR:
-		DP (printf ("### SET-CL for DDR-RAM\n"));
+		debug("### SET-CL for DDR-RAM\n");
 
 		switch (info->maxClSupported_DDR) {
 		case DDR_CL_3:
 			tmp_dunit_control_low = 0x3c000000;	/* Read-Data sampled on falling edge of Clk */
 			tmp_sdram_mode = 0x32;	/* CL=3 Burstlength = 4 */
-			DP (printf
-			    ("Max. CL is 3 CLKs 0x141c= %08lx, 0x1404 = %08lx\n",
-			     tmp_sdram_mode, tmp_dunit_control_low));
+			debug("Max. CL is 3 CLKs 0x141c= %08lx, 0x1404 = %08lx\n",
+			     tmp_sdram_mode, tmp_dunit_control_low);
 			break;
 
 		case DDR_CL_2_5:
 			if (tmp == 1) {	/* clocks sync */
 				tmp_dunit_control_low = 0x24000000;	/* Read-Data sampled on falling edge of Clk */
 				tmp_sdram_mode = 0x62;	/* CL=2,5 Burstlength = 4 */
-				DP (printf
-				    ("Max. CL is 2,5s CLKs 0x141c= %08lx, 0x1404 = %08lx\n",
-				     tmp_sdram_mode, tmp_dunit_control_low));
+				debug("Max. CL is 2,5s CLKs 0x141c= %08lx, 0x1404 = %08lx\n",
+				     tmp_sdram_mode, tmp_dunit_control_low);
 			} else {	/* clk sync. bypassed	  */
 
 				tmp_dunit_control_low = 0x03000000;	/* Read-Data sampled on rising edge of Clk */
 				tmp_sdram_mode = 0x62;	/* CL=2,5 Burstlength = 4 */
-				DP (printf
-				    ("Max. CL is 2,5 CLKs 0x141c= %08lx, 0x1404 = %08lx\n",
-				     tmp_sdram_mode, tmp_dunit_control_low));
+				debug("Max. CL is 2,5 CLKs 0x141c= %08lx, 0x1404 = %08lx\n",
+				     tmp_sdram_mode, tmp_dunit_control_low);
 			}
 			break;
 
@@ -1349,16 +1250,14 @@ int setup_sdram (AUX_MEM_DIMM_INFO * info)
 			if (tmp == 1) {	/* Sync */
 				tmp_dunit_control_low = 0x03000000;	/* Read-Data sampled on rising edge of Clk */
 				tmp_sdram_mode = 0x22;	/* CL=2 Burstlength = 4 */
-				DP (printf
-				    ("Max. CL is 2s CLKs 0x141c= %08lx, 0x1404 = %08lx\n",
-				     tmp_sdram_mode, tmp_dunit_control_low));
+				debug("Max. CL is 2s CLKs 0x141c= %08lx, 0x1404 = %08lx\n",
+				     tmp_sdram_mode, tmp_dunit_control_low);
 			} else {	/* Not sync.	  */
 
 				tmp_dunit_control_low = 0x3b000000;	/* Read-Data sampled on rising edge of Clk */
 				tmp_sdram_mode = 0x22;	/* CL=2 Burstlength = 4 */
-				DP (printf
-				    ("Max. CL is 2 CLKs 0x141c= %08lx, 0x1404 = %08lx\n",
-				     tmp_sdram_mode, tmp_dunit_control_low));
+				debug("Max. CL is 2 CLKs 0x141c= %08lx, 0x1404 = %08lx\n",
+				     tmp_sdram_mode, tmp_dunit_control_low);
 			}
 			break;
 
@@ -1366,16 +1265,14 @@ int setup_sdram (AUX_MEM_DIMM_INFO * info)
 			if (tmp == 1) {	/* Sync */
 				tmp_dunit_control_low = 0x23000000;	/* Read-Data sampled on falling edge of Clk */
 				tmp_sdram_mode = 0x52;	/* CL=1,5 Burstlength = 4 */
-				DP (printf
-				    ("Max. CL is 1,5s CLKs 0x141c= %08lx, 0x1404 = %08lx\n",
-				     tmp_sdram_mode, tmp_dunit_control_low));
+				debug("Max. CL is 1,5s CLKs 0x141c= %08lx, 0x1404 = %08lx\n",
+				     tmp_sdram_mode, tmp_dunit_control_low);
 			} else {	/* not sync */
 
 				tmp_dunit_control_low = 0x1a000000;	/* Read-Data sampled on rising edge of Clk */
 				tmp_sdram_mode = 0x52;	/* CL=1,5 Burstlength = 4 */
-				DP (printf
-				    ("Max. CL is 1,5 CLKs 0x141c= %08lx, 0x1404 = %08lx\n",
-				     tmp_sdram_mode, tmp_dunit_control_low));
+				debug("Max. CL is 1,5 CLKs 0x141c= %08lx, 0x1404 = %08lx\n",
+				     tmp_sdram_mode, tmp_dunit_control_low);
 			}
 			break;
 
@@ -1393,8 +1290,7 @@ int setup_sdram (AUX_MEM_DIMM_INFO * info)
 	/* set SDRAM mode SetCommand 0x1418 */
 	GT_REG_WRITE (SDRAM_OPERATION, 0x3);
 	while (GTREGREAD (SDRAM_OPERATION) != 0) {
-		DP (printf
-		    ("\n*** SDRAM_OPERATION 1418 after SDRAM_MODE: Module still busy ... please wait... ***\n"));
+		debug("\n*** SDRAM_OPERATION 1418 after SDRAM_MODE: Module still busy ... please wait... ***\n");
 	}
 
 
@@ -1415,8 +1311,7 @@ int setup_sdram (AUX_MEM_DIMM_INFO * info)
 	/* set SDRAM mode SetCommand 0x1418 */
 	GT_REG_WRITE (SDRAM_OPERATION, 0x3);
 	while (GTREGREAD (SDRAM_OPERATION) != 0) {
-		DP (printf
-		    ("\n*** SDRAM_OPERATION 1418 after D_UNIT_CONTROL_LOW: Module still busy ... please wait... ***\n"));
+		debug("\n*** SDRAM_OPERATION 1418 after D_UNIT_CONTROL_LOW: Module still busy ... please wait... ***\n");
 	}
 
 /*------------------------------------------------------------------------------ */
@@ -1428,41 +1323,39 @@ int setup_sdram (AUX_MEM_DIMM_INFO * info)
 	tmp = 0x02;
 
 
-	DP (printf ("drb_size (n*64Mbit): %d\n", info->drb_size));
+	debug("drb_size (n*64Mbit): %d\n", info->drb_size);
 	switch (info->drb_size) {
 	case 1:		/* 64 Mbit */
 	case 2:		/* 128 Mbit */
-		DP (printf ("RAM-Device_size 64Mbit or 128Mbit)\n"));
+		debug("RAM-Device_size 64Mbit or 128Mbit)\n");
 		tmp |= (0x00 << 4);
 		break;
 	case 4:		/* 256 Mbit */
 	case 8:		/* 512 Mbit */
-		DP (printf ("RAM-Device_size 256Mbit or 512Mbit)\n"));
+		debug("RAM-Device_size 256Mbit or 512Mbit)\n");
 		tmp |= (0x01 << 4);
 		break;
 	case 16:		/* 1 Gbit */
 	case 32:		/* 2 Gbit */
-		DP (printf ("RAM-Device_size 1Gbit or 2Gbit)\n"));
+		debug("RAM-Device_size 1Gbit or 2Gbit)\n");
 		tmp |= (0x02 << 4);
 		break;
 	default:
 		printf ("Error in dram size calculation\n");
-		DP (printf ("Assume: RAM-Device_size 1Gbit or 2Gbit)\n"));
+		debug("Assume: RAM-Device_size 1Gbit or 2Gbit)\n");
 		tmp |= (0x02 << 4);
 		return 1;
 	}
 
 	/* SDRAM bank parameters */
 	/* the param registers for slot 1 (banks 2+3) are offset by 0x8 */
-	DP (printf
-	    ("setting up slot %d config with: %08lx \n", info->slot, tmp));
+	debug("setting up slot %d config with: %08lx \n", info->slot, tmp);
 	GT_REG_WRITE (SDRAM_ADDR_CONTROL, tmp);
 
 /* ------------------------------------------------------------------------------ */
 
-	DP (printf
-	    ("setting up sdram_timing_control_low with: %08x \n",
-	     0x11511220));
+	debug("setting up sdram_timing_control_low with: %08x \n",
+	     0x11511220);
 	GT_REG_WRITE (SDRAM_TIMING_CONTROL_LOW, 0x11511220);
 
 
@@ -1474,38 +1367,33 @@ int setup_sdram (AUX_MEM_DIMM_INFO * info)
 	if (info->registeredAddrAndControlInputs
 	    || info->registeredDQMBinputs) {
 		tmp |= (1 << 17);
-		DP (printf
-		    ("SPD says: registered Addr. and Cont.: %d; registered DQMBinputs: %d\n",
+		debug("SPD says: registered Addr. and Cont.: %d; registered DQMBinputs: %d\n",
 		     info->registeredAddrAndControlInputs,
-		     info->registeredDQMBinputs));
+		     info->registeredDQMBinputs);
 	}
 
 	/* Use buffer 1 to return read data to the CPU
 	 * Page 426 MV64360 */
 	tmp |= (1 << 26);
-	DP (printf
-	    ("Before Buffer assignment - sdram_conf: %08x\n",
-	     GTREGREAD (SDRAM_CONFIG)));
-	DP (printf
-	    ("After Buffer assignment - sdram_conf: %08x\n",
-	     GTREGREAD (SDRAM_CONFIG)));
+	debug("Before Buffer assignment - sdram_conf: %08x\n",
+	     GTREGREAD (SDRAM_CONFIG));
+	debug("After Buffer assignment - sdram_conf: %08x\n",
+	     GTREGREAD (SDRAM_CONFIG));
 
 	/* SDRAM timing To_do: */
 
 
 	tmp = GTREGREAD (SDRAM_TIMING_CONTROL_HIGH);
-	DP (printf ("# sdram_timing_control_high is : %08lx \n", tmp));
+	debug("# sdram_timing_control_high is : %08lx \n", tmp);
 
 	/* SDRAM address decode register */
 	/* program this with the default value */
 	tmp = GTREGREAD (SDRAM_ADDR_CONTROL);
-	DP (printf
-	    ("SDRAM address control (before: decode): %08x  ",
-	     GTREGREAD (SDRAM_ADDR_CONTROL)));
+	debug("SDRAM address control (before: decode): %08x  ",
+	     GTREGREAD (SDRAM_ADDR_CONTROL));
 	GT_REG_WRITE (SDRAM_ADDR_CONTROL, (tmp | 0x2));
-	DP (printf
-	    ("SDRAM address control (after: decode): %08x\n",
-	     GTREGREAD (SDRAM_ADDR_CONTROL)));
+	debug("SDRAM address control (after: decode): %08x\n",
+	     GTREGREAD (SDRAM_ADDR_CONTROL));
 
 	/* set the SDRAM configuration for each bank */
 
@@ -1514,8 +1402,7 @@ int setup_sdram (AUX_MEM_DIMM_INFO * info)
 		int l, l1;
 
 		i = info->slot;
-		DP (printf
-		    ("\n*** Running a MRS cycle for bank %d ***\n", i));
+		debug("\n*** Running a MRS cycle for bank %d ***\n", i);
 
 		/* map the bank */
 		memory_map_bank (i, 0, GB / 4);
@@ -1525,15 +1412,13 @@ int setup_sdram (AUX_MEM_DIMM_INFO * info)
 		GT_REG_WRITE (EXTENDED_DRAM_MODE, 0x0);
 		GT_REG_WRITE (SDRAM_OPERATION, 0x4);
 		while (GTREGREAD (SDRAM_OPERATION) != 0) {
-			DP (printf
-			    ("\n*** SDRAM_OPERATION 1418 after SDRAM_MODE: Module still busy ... please wait... ***\n"));
+			debug("\n*** SDRAM_OPERATION 1418 after SDRAM_MODE: Module still busy ... please wait... ***\n");
 		}
 
 		GT_REG_WRITE (SDRAM_MODE, tmp | 0x80);
 		GT_REG_WRITE (SDRAM_OPERATION, 0x3);
 		while (GTREGREAD (SDRAM_OPERATION) != 0) {
-			DP (printf
-			    ("\n*** SDRAM_OPERATION 1418 after SDRAM_MODE: Module still busy ... please wait... ***\n"));
+			debug("\n*** SDRAM_OPERATION 1418 after SDRAM_MODE: Module still busy ... please wait... ***\n");
 		}
 		l1 = 0;
 		for (l=0;l<200;l++)
@@ -1542,15 +1427,13 @@ int setup_sdram (AUX_MEM_DIMM_INFO * info)
 		GT_REG_WRITE (SDRAM_MODE, tmp);
 		GT_REG_WRITE (SDRAM_OPERATION, 0x3);
 		while (GTREGREAD (SDRAM_OPERATION) != 0) {
-			DP (printf
-			    ("\n*** SDRAM_OPERATION 1418 after SDRAM_MODE: Module still busy ... please wait... ***\n"));
+			debug("\n*** SDRAM_OPERATION 1418 after SDRAM_MODE: Module still busy ... please wait... ***\n");
 		}
 
 		/* switch back to normal operation mode */
 		GT_REG_WRITE (SDRAM_OPERATION, 0x5);
 		while (GTREGREAD (SDRAM_OPERATION) != 0) {
-			DP (printf
-			    ("\n*** SDRAM_OPERATION 1418 after SDRAM_MODE: Module still busy ... please wait... ***\n"));
+			debug("\n*** SDRAM_OPERATION 1418 after SDRAM_MODE: Module still busy ... please wait... ***\n");
 		}
 
 #endif /* test only */
@@ -1597,7 +1480,7 @@ dram_size(long int *base, long int maxsize)
 	    *b=save2;
 
 	    if (val != cnt) {
-		    DP(printf("Found %08x  at Address %08x (failure)\n", (unsigned int)val, (unsigned int) addr));
+		    debug("Found %08x @Address %08x (failure)\n", (unsigned int)val, (unsigned int) addr);
 		    /* fix boundary condition.. STARTVAL means zero */
 		    if(cnt==STARTVAL/sizeof(long)) cnt=0;
 		    return (cnt * sizeof(long));
@@ -1690,7 +1573,6 @@ int mv_dma_transfer(int engine, ulong source_addr,
 phys_size_t
 initdram(int board_type)
 {
-	int s0 = 0, s1 = 0;
 	int checkbank[4] = { [0 ... 3] = 0 };
 	ulong realsize, total, check;
 	AUX_MEM_DIMM_INFO dimmInfo1;
@@ -1709,10 +1591,10 @@ initdram(int board_type)
 		printf("Skipping SD- DDRRAM setup due to NHR bit being set\n");
 	} else {
 		/* DIMM0 */
-		s0 = check_dimm(0, &dimmInfo1);
+		(void)check_dimm(0, &dimmInfo1);
 
 		/* DIMM1 */
-		s1 = check_dimm(1, &dimmInfo2);
+		(void)check_dimm(1, &dimmInfo2);
 
 		memory_map_bank(0, 0, 0);
 		memory_map_bank(1, 0, 0);
-- 
1.7.6.4

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 11/13] drivers/video/ct69000.c: Fix GC 4.6 build warning
  2011-11-09 19:29 ` [U-Boot] [PATCH 11/13] drivers/video/ct69000.c: Fix GC " Wolfgang Denk
@ 2011-11-09 20:44   ` Mike Frysinger
  2011-11-10  5:43     ` Wolfgang Denk
  2011-11-10 20:37   ` Anatolij Gustschin
  2011-11-16 20:05   ` Wolfgang Denk
  2 siblings, 1 reply; 37+ messages in thread
From: Mike Frysinger @ 2011-11-09 20:44 UTC (permalink / raw)
  To: u-boot

On Wednesday 09 November 2011 14:29:04 Wolfgang Denk wrote:
> Convert custom debug code to use standard debug() facility.
> This also fixes these build warning:
> ct69000.c: In function 'FindAndSetPllParamIntoXrRegs':
> ct69000.c:706:28: warning: variable 'new_pixclock' set but not used
> [-Wunused-but-set-variable]
> 
> --- a/drivers/video/ct69000.c
> +++ b/drivers/video/ct69000.c
>
>  #undef VGA_DEBUG
>  #undef VGA_DUMP_REG
>  #ifdef VGA_DEBUG
> -#define	PRINTF(fmt,args...)	printf (fmt ,##args)
> +#undef _DEBUG
> +#define _DEBUG  1
>  #else
> -#define PRINTF(fmt,args...)
> +#undef _DEBUG
> +#define _DEBUG  0
>  #endif

so do you still need this ?  since you've converted to debug(), looks like 
this logic can all go away.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111109/ceaea64a/attachment.pgp 

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 13/13] board/esd/cpci750/sdram_init.c: Fix GCC 4.6 build warnings
  2011-11-09 19:29 ` [U-Boot] [PATCH 13/13] board/esd/cpci750/sdram_init.c: Fix GCC 4.6 build warnings Wolfgang Denk
@ 2011-11-09 20:45   ` Mike Frysinger
  2011-11-09 21:33     ` Reinhard.Arlt at t-online.de
  2011-11-16 20:11     ` Wolfgang Denk
  2011-11-16 20:12   ` Wolfgang Denk
  1 sibling, 2 replies; 37+ messages in thread
From: Mike Frysinger @ 2011-11-09 20:45 UTC (permalink / raw)
  To: u-boot

On Wednesday 09 November 2011 14:29:06 Wolfgang Denk wrote:
> --- a/board/esd/cpci750/sdram_init.c
> +++ b/board/esd/cpci750/sdram_init.c
>
>  static int check_dimm (uchar slot, AUX_MEM_DIMM_INFO * dimmInfo)
>  {
> +#if 0
>  	unsigned long spd_checksum;
> -
> +#endif

forgot to just delete ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111109/3e904ad0/attachment.pgp 

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 13/13]  board/esd/cpci750/sdram_init.c: Fix GCC 4.6 build warnings
  2011-11-09 20:45   ` Mike Frysinger
@ 2011-11-09 21:33     ` Reinhard.Arlt at t-online.de
  2011-11-16 20:11     ` Wolfgang Denk
  1 sibling, 0 replies; 37+ messages in thread
From: Reinhard.Arlt at t-online.de @ 2011-11-09 21:33 UTC (permalink / raw)
  To: u-boot

Hello,

delete it...

Reinhard

-----Original-Nachricht-----
Von: Mike Frysinger <vapier@gentoo.org>
An: u-boot at lists.denx.de
Cc: Reinhard Arlt <reinhard.arlt@esd-electronics.com>
Betreff: Re: [U-Boot] [PATCH 13/13] board/esd/cpci750/sdram_init.c: Fix GCC 4.6 build warnings
Datum: Wed, 09 Nov 2011 21:45:06 +0100

On Wednesday 09 November 2011 14:29:06 Wolfgang Denk wrote:
> --- a/board/esd/cpci750/sdram_init.c
> +++ b/board/esd/cpci750/sdram_init.c
>
>  static int check_dimm (uchar slot, AUX_MEM_DIMM_INFO * dimmInfo)
>  {
> +#if 0
>  	unsigned long spd_checksum;
> -
> +#endif

forgot to just delete ?
-mike

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 11/13] drivers/video/ct69000.c: Fix GC 4.6 build warning
  2011-11-09 20:44   ` Mike Frysinger
@ 2011-11-10  5:43     ` Wolfgang Denk
  2011-11-10 16:21       ` Mike Frysinger
  0 siblings, 1 reply; 37+ messages in thread
From: Wolfgang Denk @ 2011-11-10  5:43 UTC (permalink / raw)
  To: u-boot

Dear Mike Frysinger,

In message <201111091544.17111.vapier@gentoo.org> you wrote:
>
> >  #undef VGA_DEBUG
> >  #undef VGA_DUMP_REG
> >  #ifdef VGA_DEBUG
> > -#define	PRINTF(fmt,args...)	printf (fmt ,##args)
> > +#undef _DEBUG
> > +#define _DEBUG  1
> >  #else
> > -#define PRINTF(fmt,args...)
> > +#undef _DEBUG
> > +#define _DEBUG  0
> >  #endif
> 
> so do you still need this ?  since you've converted to debug(), looks like
> this logic can all go away.

It's needed if I want to keep the original behaviour regarding
VGA_DEBUG and VGA_DUMP_REG which were independent before.

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: wd at denx.de
The more we disagree, the more chance there is that at least  one  of
us is right.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 02/13] board/evb64260/i2c.c: Coding Style cleanup
  2011-11-09 19:28 ` [U-Boot] [PATCH 02/13] board/evb64260/i2c.c: Coding Style cleanup Wolfgang Denk
@ 2011-11-10  6:32   ` Heiko Schocher
  2011-11-16 20:03     ` Wolfgang Denk
  2011-11-16 20:03   ` Wolfgang Denk
  1 sibling, 1 reply; 37+ messages in thread
From: Heiko Schocher @ 2011-11-10  6:32 UTC (permalink / raw)
  To: u-boot

Hello Wolfgang,

Wolfgang Denk wrote:
> Make checkpatch-clean
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Eran Man <eran@nbase.co.il>
> ---
>  board/evb64260/i2c.c |   48 ++++++++++++++++++++++--------------------------
>  1 files changed, 22 insertions(+), 26 deletions(-)
> 
> diff --git a/board/evb64260/i2c.c b/board/evb64260/i2c.c
> index 88d0dac..573f31f 100644
> --- a/board/evb64260/i2c.c
> +++ b/board/evb64260/i2c.c
> @@ -20,25 +20,22 @@ static void
>  i2c_init(int speed, int slaveaddr)
>  {
>  	unsigned int n, m, freq, margin, power;
> -	unsigned int actualFreq, actualN=0, actualM=0;
> +	unsigned int actualFreq, actualN = 0, actualM = 0;

Hmm.. we don't use Upper and Lower case mixed for variable names.
This should be cleanuped too.

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

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 03/13] board/evb64260/i2c.c: Fix GCC 4.6 build warnings
  2011-11-09 19:28 ` [U-Boot] [PATCH 03/13] board/evb64260/i2c.c: Fix GCC 4.6 build warnings Wolfgang Denk
@ 2011-11-10  6:33   ` Heiko Schocher
  2011-11-16 20:03   ` Wolfgang Denk
  1 sibling, 0 replies; 37+ messages in thread
From: Heiko Schocher @ 2011-11-10  6:33 UTC (permalink / raw)
  To: u-boot

Hello Wolfgang,

Wolfgang Denk wrote:
> Fix:
> i2c.c: In function 'i2c_init':
> i2c.c:23:15: warning: variable 'actualFreq' set but not used
> [-Wunused-but-set-variable]
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Eran Man <eran@nbase.co.il>
> ---
>  board/evb64260/i2c.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)

Acked-by: Heiko Schocher <hs@denx.de>

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

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 11/13] drivers/video/ct69000.c: Fix GC 4.6 build warning
  2011-11-10  5:43     ` Wolfgang Denk
@ 2011-11-10 16:21       ` Mike Frysinger
  2011-11-10 19:07         ` Wolfgang Denk
  0 siblings, 1 reply; 37+ messages in thread
From: Mike Frysinger @ 2011-11-10 16:21 UTC (permalink / raw)
  To: u-boot

On Thursday 10 November 2011 00:43:54 Wolfgang Denk wrote:
> Mike Frysinger wrote:
> > >  #undef VGA_DEBUG
> > >  #undef VGA_DUMP_REG
> > >  #ifdef VGA_DEBUG
> > > 
> > > -#define	PRINTF(fmt,args...)	printf (fmt ,##args)
> > > +#undef _DEBUG
> > > +#define _DEBUG  1
> > > 
> > >  #else
> > > 
> > > -#define PRINTF(fmt,args...)
> > > +#undef _DEBUG
> > > +#define _DEBUG  0
> > > 
> > >  #endif
> > 
> > so do you still need this ?  since you've converted to debug(), looks
> > like this logic can all go away.
> 
> It's needed if I want to keep the original behaviour regarding
> VGA_DEBUG and VGA_DUMP_REG which were independent before.

ok, i see that now.  i wonder if we need that though.  i don't think there's 
any real difference between doing "#define DEBUG" and "#define VGA_DEBUG".
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111110/7d3ad6cf/attachment.pgp 

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 11/13] drivers/video/ct69000.c: Fix GC 4.6 build warning
  2011-11-10 16:21       ` Mike Frysinger
@ 2011-11-10 19:07         ` Wolfgang Denk
  0 siblings, 0 replies; 37+ messages in thread
From: Wolfgang Denk @ 2011-11-10 19:07 UTC (permalink / raw)
  To: u-boot

Dear Mike Frysinger,

In message <201111101121.38318.vapier@gentoo.org> you wrote:
>
> > It's needed if I want to keep the original behaviour regarding
> > VGA_DEBUG and VGA_DUMP_REG which were independent before.
>
> ok, i see that now.  i wonder if we need that though.  i don't think there's 
> any real difference between doing "#define DEBUG" and "#define VGA_DEBUG".

I agree.  But I did not want to introduce any functional changes here.
All I wanted was to get rid of the warnings.

Please feel free to submit patches for further cleanup - if you look
at that code, you will find plenty opportunity to get over some
otherwise boring hours ;-)

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: wd at denx.de
So we follow our wandering paths, and the very darkness acts  as  our
guide and our doubts serve to reassure us. - Jean-Pierre de Caussade,
eighteenth-century Jesuit priest

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 11/13] drivers/video/ct69000.c: Fix GC 4.6 build warning
  2011-11-09 19:29 ` [U-Boot] [PATCH 11/13] drivers/video/ct69000.c: Fix GC " Wolfgang Denk
  2011-11-09 20:44   ` Mike Frysinger
@ 2011-11-10 20:37   ` Anatolij Gustschin
  2011-11-16 20:05   ` Wolfgang Denk
  2 siblings, 0 replies; 37+ messages in thread
From: Anatolij Gustschin @ 2011-11-10 20:37 UTC (permalink / raw)
  To: u-boot


Acked-by: Anatolij Gustschin <agust@denx.de>

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 01/13] drivers/block/sym53c8xx.c: Fix GCC 4.6 build warning
  2011-11-09 19:28 [U-Boot] [PATCH 01/13] drivers/block/sym53c8xx.c: Fix GCC 4.6 build warning Wolfgang Denk
                   ` (11 preceding siblings ...)
  2011-11-09 19:29 ` [U-Boot] [PATCH 13/13] board/esd/cpci750/sdram_init.c: Fix GCC 4.6 build warnings Wolfgang Denk
@ 2011-11-16 20:01 ` Wolfgang Denk
  12 siblings, 0 replies; 37+ messages in thread
From: Wolfgang Denk @ 2011-11-16 20:01 UTC (permalink / raw)
  To: u-boot

Dear Wolfgang Denk,

In message <1320866946-28235-1-git-send-email-wd@denx.de> you wrote:
> Fix:
> sym53c8xx.c: In function 'scsi_write_dsp':
> sym53c8xx.c:456:16: warning: variable 'val' set but not used
> [-Wunused-but-set-variable]
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> ---
>  drivers/block/sym53c8xx.c |    2 --
>  1 files changed, 0 insertions(+), 2 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: wd at denx.de
That said, there may be good reasons for what you did beyond obsequi-
ous sycophantic parody. Perhaps you might be so kind as to elucidate.
         -- Tom Christiansen in <5ldjbm$jtk$1@csnews.cs.colorado.edu>

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 02/13] board/evb64260/i2c.c: Coding Style cleanup
  2011-11-10  6:32   ` Heiko Schocher
@ 2011-11-16 20:03     ` Wolfgang Denk
  0 siblings, 0 replies; 37+ messages in thread
From: Wolfgang Denk @ 2011-11-16 20:03 UTC (permalink / raw)
  To: u-boot

Dear Heiko Schocher,

In message <4EBB6FF4.5060105@denx.de> you wrote:
> 
> > Make checkpatch-clean
...
> > -	unsigned int actualFreq, actualN=0, actualM=0;
> > +	unsigned int actualFreq, actualN = 0, actualM = 0;
> 
> Hmm.. we don't use Upper and Lower case mixed for variable names.
> This should be cleanuped too.

Yes, you are right.  I didn't have time to do that.  Patches welcome.

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: wd at denx.de
Research is what I'm doing when I don't know what I'm doing.
                                                 -- Wernher von Braun

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 02/13] board/evb64260/i2c.c: Coding Style cleanup
  2011-11-09 19:28 ` [U-Boot] [PATCH 02/13] board/evb64260/i2c.c: Coding Style cleanup Wolfgang Denk
  2011-11-10  6:32   ` Heiko Schocher
@ 2011-11-16 20:03   ` Wolfgang Denk
  1 sibling, 0 replies; 37+ messages in thread
From: Wolfgang Denk @ 2011-11-16 20:03 UTC (permalink / raw)
  To: u-boot

Dear Wolfgang Denk,

In message <1320866946-28235-2-git-send-email-wd@denx.de> you wrote:
> Make checkpatch-clean
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Eran Man <eran@nbase.co.il>
> ---
>  board/evb64260/i2c.c |   48 ++++++++++++++++++++++--------------------------
>  1 files changed, 22 insertions(+), 26 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: wd at denx.de
"Buy land. They've stopped making it."                   - Mark Twain

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 03/13] board/evb64260/i2c.c: Fix GCC 4.6 build warnings
  2011-11-09 19:28 ` [U-Boot] [PATCH 03/13] board/evb64260/i2c.c: Fix GCC 4.6 build warnings Wolfgang Denk
  2011-11-10  6:33   ` Heiko Schocher
@ 2011-11-16 20:03   ` Wolfgang Denk
  1 sibling, 0 replies; 37+ messages in thread
From: Wolfgang Denk @ 2011-11-16 20:03 UTC (permalink / raw)
  To: u-boot

Dear Wolfgang Denk,

In message <1320866946-28235-3-git-send-email-wd@denx.de> you wrote:
> Fix:
> i2c.c: In function 'i2c_init':
> i2c.c:23:15: warning: variable 'actualFreq' set but not used
> [-Wunused-but-set-variable]
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Eran Man <eran@nbase.co.il>
> ---
>  board/evb64260/i2c.c |    3 +--
>  1 files changed, 1 insertions(+), 2 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: wd at denx.de
A little suffering is good for the soul.
	-- Kirk, "The Corbomite Maneuver", stardate 1514.0

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 04/13] board/evb64260/evb64260.c: Fix GC 4.6 build warning
  2011-11-09 19:28 ` [U-Boot] [PATCH 04/13] board/evb64260/evb64260.c: Fix GC 4.6 build warning Wolfgang Denk
@ 2011-11-16 20:03   ` Wolfgang Denk
  0 siblings, 0 replies; 37+ messages in thread
From: Wolfgang Denk @ 2011-11-16 20:03 UTC (permalink / raw)
  To: u-boot

Dear Wolfgang Denk,

In message <1320866946-28235-4-git-send-email-wd@denx.de> you wrote:
> Fix:
> evb64260.c: In function 'debug_led':
> evb64260.c:363:6: warning: variable 'dummy' set but not used
> [-Wunused-but-set-variable]
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> ---
>  board/evb64260/evb64260.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 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: wd at denx.de
Unser Kopf ist rund, damit das Denken die Richtung wechseln kann.
                                                   -- Francis Picabia

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 05/13] board/evb64260/eth.c: Fix GCC 4.6 build warning
  2011-11-09 19:28 ` [U-Boot] [PATCH 05/13] board/evb64260/eth.c: Fix GCC " Wolfgang Denk
@ 2011-11-16 20:04   ` Wolfgang Denk
  0 siblings, 0 replies; 37+ messages in thread
From: Wolfgang Denk @ 2011-11-16 20:04 UTC (permalink / raw)
  To: u-boot

Dear Wolfgang Denk,

In message <1320866946-28235-5-git-send-email-wd@denx.de> you wrote:
> Fix:
> eth.c: In function 'gt6426x_handle_SMI':
> eth.c:130:15: warning: variable 'psr' set but not used
> [-Wunused-but-set-variable]
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> ---
>  board/evb64260/eth.c |   37 +++++++++++++++++++------------------
>  1 files changed, 19 insertions(+), 18 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: wd at denx.de
Absolute: Independent, irresponsible. An absolute monarchy is one  in
which  the  sovereign  does  as  he pleases so long as he pleases the
assassins. Not many absolute monarchies are left, most of them having
been replaced by limited monarchies, where the soverign's  power  for
evil (and for good) is greatly curtailed, and by republics, which are
governed by chance.                                  - Ambrose Bierce

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 06/13] board/evb64260/sdram_init.c: Fix GCC 4.6 build warnings
  2011-11-09 19:28 ` [U-Boot] [PATCH 06/13] board/evb64260/sdram_init.c: Fix GCC 4.6 build warnings Wolfgang Denk
@ 2011-11-16 20:04   ` Wolfgang Denk
  0 siblings, 0 replies; 37+ messages in thread
From: Wolfgang Denk @ 2011-11-16 20:04 UTC (permalink / raw)
  To: u-boot

Dear Wolfgang Denk,

In message <1320866946-28235-6-git-send-email-wd@denx.de> you wrote:
> Fix:
> sdram_init.c: In function 'setup_sdram_common':
> sdram_init.c:333:49: warning: variable 'ecc' set but not used
> [-Wunused-but-set-variable]
> sdram_init.c: In function 'setup_sdram':
> sdram_init.c:410:13: warning: variable 'check' set but not used
> [-Wunused-but-set-variable]
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> ---
>  board/evb64260/sdram_init.c |    7 +++++--
>  1 files changed, 5 insertions(+), 2 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: wd at denx.de
The universe contains any amount of horrible ways  to  be  woken  up,
such as the noise of the mob breaking down the front door, the scream
of fire engines, or the realization that today is the Monday which on
Friday night was a comfortably long way off.
                                 - Terry Pratchett, _Moving Pictures_

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 07/13] board/evb64260/zuma_pbb_mbox.c: CodingStyle cleanup
  2011-11-09 19:29 ` [U-Boot] [PATCH 07/13] board/evb64260/zuma_pbb_mbox.c: CodingStyle cleanup Wolfgang Denk
@ 2011-11-16 20:04   ` Wolfgang Denk
  0 siblings, 0 replies; 37+ messages in thread
From: Wolfgang Denk @ 2011-11-16 20:04 UTC (permalink / raw)
  To: u-boot

Dear Wolfgang Denk,

In message <1320866946-28235-7-git-send-email-wd@denx.de> you wrote:
> Make (mostly) checkpatch-clean
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> ---
>  board/evb64260/zuma_pbb_mbox.c |  256 +++++++++++++++++++++-------------------
>  1 files changed, 132 insertions(+), 124 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: wd at denx.de
All programmers are optimists. Perhaps this modern sorcery especially
attracts those who believe in happy  endings  and  fairy  godmothers.
Perhaps  the  hundreds of nitty frustrations drive away all but those
who habitually focus on the end goal. Perhaps it is merely that  com-
puters  are  young, programmers are younger, and the young are always
optimists. But however the selection process  works,  the  result  is
indisputable:  "This  time  it will surely run," or "I just found the
last bug."              -- Frederick Brooks, "The Mythical Man Month"

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 08/13] board/evb64260/zuma_pbb_mbox.c: Fix GCC 4.6 build warnings
  2011-11-09 19:29 ` [U-Boot] [PATCH 08/13] board/evb64260/zuma_pbb_mbox.c: Fix GCC 4.6 build warnings Wolfgang Denk
@ 2011-11-16 20:04   ` Wolfgang Denk
  0 siblings, 0 replies; 37+ messages in thread
From: Wolfgang Denk @ 2011-11-16 20:04 UTC (permalink / raw)
  To: u-boot

Dear Wolfgang Denk,

In message <1320866946-28235-8-git-send-email-wd@denx.de> you wrote:
> Fix:
> zuma_pbb_mbox.c: In function 'zuma_mbox_dump':
> zuma_pbb_mbox.c:115:2: warning: dereferencing type-punned pointer will
> break strict-aliasing rules [-Wstrict-aliasing]
> zuma_pbb_mbox.c:117:2: warning: dereferencing type-punned pointer will
> break strict-aliasing rules [-Wstrict-aliasing]
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> ---
>  board/evb64260/zuma_pbb_mbox.c |   25 ++++++++++++++++++-------
>  1 files changed, 18 insertions(+), 7 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: wd at denx.de
As far as the laws of mathematics refer to reality, they are not cer-
tain, and as far as they are certain, they do not refer  to  reality.
                                                   -- Albert Einstein

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 09/13] common/cmd_fdc.c: Fix GCC 4.6 build warnings
  2011-11-09 19:29 ` [U-Boot] [PATCH 09/13] common/cmd_fdc.c: " Wolfgang Denk
@ 2011-11-16 20:04   ` Wolfgang Denk
  0 siblings, 0 replies; 37+ messages in thread
From: Wolfgang Denk @ 2011-11-16 20:04 UTC (permalink / raw)
  To: u-boot

Dear Wolfgang Denk,

In message <1320866946-28235-9-git-send-email-wd@denx.de> you wrote:
> Fix:
> cmd_fdc.c: In function 'fdc_read_data':
> cmd_fdc.c:435:6: warning: variable 'flags' set but not used
> [-Wunused-but-set-variable]
> cmd_fdc.c:432:16: warning: variable 'pcn' set but not used
> [-Wunused-but-set-variable]
> cmd_fdc.c:431:20: warning: variable 'lastblk' set but not used
> [-Wunused-but-set-variable]
> 
> Note: no attempts were made to otherwise cleanup the code.
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> ---
>  common/cmd_fdc.c |   29 +++++++++++++++++------------
>  1 files changed, 17 insertions(+), 12 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: wd at denx.de
How many hardware guys does it take to change a light bulb? "Well the
diagnostics say it's fine buddy, so it's a software problem."

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 10/13] common/cmd_universe.c: Fix GCC 4.6 build warning
  2011-11-09 19:29 ` [U-Boot] [PATCH 10/13] common/cmd_universe.c: Fix GCC 4.6 build warning Wolfgang Denk
@ 2011-11-16 20:04   ` Wolfgang Denk
  0 siblings, 0 replies; 37+ messages in thread
From: Wolfgang Denk @ 2011-11-16 20:04 UTC (permalink / raw)
  To: u-boot

Dear Wolfgang Denk,

In message <1320866946-28235-10-git-send-email-wd@denx.de> you wrote:
> Fix:
> cmd_universe.c: In function 'universe_init':
> cmd_universe.c:49:17: warning: variable 'lastError' set but not used
> [-Wunused-but-set-variable]
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> ---
>  common/cmd_universe.c |    4 +---
>  1 files changed, 1 insertions(+), 3 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: wd at denx.de

There were meetings. There were always meetings. And they were  dull,
which is part of the reason they were meetings. Dull likes company.
                                    - Terry Pratchett, _Making_Money_

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 11/13] drivers/video/ct69000.c: Fix GC 4.6 build warning
  2011-11-09 19:29 ` [U-Boot] [PATCH 11/13] drivers/video/ct69000.c: Fix GC " Wolfgang Denk
  2011-11-09 20:44   ` Mike Frysinger
  2011-11-10 20:37   ` Anatolij Gustschin
@ 2011-11-16 20:05   ` Wolfgang Denk
  2 siblings, 0 replies; 37+ messages in thread
From: Wolfgang Denk @ 2011-11-16 20:05 UTC (permalink / raw)
  To: u-boot

Dear Wolfgang Denk,

In message <1320866946-28235-11-git-send-email-wd@denx.de> you wrote:
> Convert custom debug code to use standard debug() facility.
> This also fixes these build warning:
> ct69000.c: In function 'FindAndSetPllParamIntoXrRegs':
> ct69000.c:706:28: warning: variable 'new_pixclock' set but not used
> [-Wunused-but-set-variable]
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> ---
>  drivers/video/ct69000.c |   12 +++++++-----
>  1 files changed, 7 insertions(+), 5 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: wd at denx.de
People with narrow minds usually have broad tongues.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 12/13] board/esd/cpci750/cpci750.c: Fix error handling
  2011-11-09 19:29 ` [U-Boot] [PATCH 12/13] board/esd/cpci750/cpci750.c: Fix error handling Wolfgang Denk
@ 2011-11-16 20:05   ` Wolfgang Denk
  0 siblings, 0 replies; 37+ messages in thread
From: Wolfgang Denk @ 2011-11-16 20:05 UTC (permalink / raw)
  To: u-boot

Dear Wolfgang Denk,

In message <1320866946-28235-12-git-send-email-wd@denx.de> you wrote:
> ThE code recorded error conditions but did not pass these on to the
> higher level caller.  Fixing this fixes also this build warning:
> cpci750.c: In function 'do_loadpci':
> cpci750.c:569:6: warning: variable 'status' set but not used
> [-Wunused-but-set-variable]
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Reinhard Arlt <reinhard.arlt@esd-electronics.com>
> ---
>  board/esd/cpci750/cpci750.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 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: wd at denx.de
Little known fact about Middle Earth:   The Hobbits had a very sophi-
sticated computer network!   It was a Tolkien Ring...

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 13/13] board/esd/cpci750/sdram_init.c: Fix GCC 4.6 build warnings
  2011-11-09 20:45   ` Mike Frysinger
  2011-11-09 21:33     ` Reinhard.Arlt at t-online.de
@ 2011-11-16 20:11     ` Wolfgang Denk
  1 sibling, 0 replies; 37+ messages in thread
From: Wolfgang Denk @ 2011-11-16 20:11 UTC (permalink / raw)
  To: u-boot

Dear Mike Frysinger,

In message <201111091545.07892.vapier@gentoo.org> you wrote:
> >  static int check_dimm (uchar slot, AUX_MEM_DIMM_INFO * dimmInfo)
> >  {
> > +#if 0
> >  	unsigned long spd_checksum;
> > -
> > +#endif
> 
> forgot to just delete ?

Indeed.  Will do in commit.


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: wd at denx.de
In an infinite universe all things are possible, including the possi-
bility that the universe does not exist.
                        - Terry Pratchett, _The Dark Side of the Sun_

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 13/13] board/esd/cpci750/sdram_init.c: Fix GCC 4.6 build warnings
  2011-11-09 19:29 ` [U-Boot] [PATCH 13/13] board/esd/cpci750/sdram_init.c: Fix GCC 4.6 build warnings Wolfgang Denk
  2011-11-09 20:45   ` Mike Frysinger
@ 2011-11-16 20:12   ` Wolfgang Denk
  1 sibling, 0 replies; 37+ messages in thread
From: Wolfgang Denk @ 2011-11-16 20:12 UTC (permalink / raw)
  To: u-boot

Dear Wolfgang Denk,

In message <1320866946-28235-13-git-send-email-wd@denx.de> you wrote:
> Fix:
> sdram_init.c: In function 'check_dimm':
> sdram_init.c:267:50: warning: variable 'trrd_clocks' set but not used
> [-Wunused-but-set-variable]
> sdram_init.c:267:37: warning: variable 'tras_clocks' set but not used
> [-Wunused-but-set-variable]
> sdram_init.c:267:24: warning: variable 'trcd_clocks' set but not used
> [-Wunused-but-set-variable]
> sdram_init.c:267:8: warning: variable 'trp_clocks' set but not used
> [-Wunused-but-set-variable]
> sdram_init.c:253:16: warning: variable 'spd_checksum' set but not used
> [-Wunused-but-set-variable]
> sdram_init.c: In function 'initdram':
> sdram_init.c:1693:14: warning: variable 's1' set but not used
> [-Wunused-but-set-variable]
> sdram_init.c:1693:6: warning: variable 's0' set but not used
> [-Wunused-but-set-variable]
> 
> Biggest part o the fix is converting the custom debug code to standard
> debug().
> 
> No attempts were made to cleanup the code.
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Reinhard Arlt <reinhard.arlt@esd-electronics.com>
> ---
>  board/esd/cpci750/sdram_init.c |  508 +++++++++++++++-------------------------
>  1 files changed, 195 insertions(+), 313 deletions(-)

Applied, thanks. [Also removed the useless "#if 0" / "#endif" part.]

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: wd at denx.de
"What if" is a trademark of Hewlett Packard, so stop using it in your
sentences without permission, or risk being sued.

^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2011-11-16 20:12 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-09 19:28 [U-Boot] [PATCH 01/13] drivers/block/sym53c8xx.c: Fix GCC 4.6 build warning Wolfgang Denk
2011-11-09 19:28 ` [U-Boot] [PATCH 02/13] board/evb64260/i2c.c: Coding Style cleanup Wolfgang Denk
2011-11-10  6:32   ` Heiko Schocher
2011-11-16 20:03     ` Wolfgang Denk
2011-11-16 20:03   ` Wolfgang Denk
2011-11-09 19:28 ` [U-Boot] [PATCH 03/13] board/evb64260/i2c.c: Fix GCC 4.6 build warnings Wolfgang Denk
2011-11-10  6:33   ` Heiko Schocher
2011-11-16 20:03   ` Wolfgang Denk
2011-11-09 19:28 ` [U-Boot] [PATCH 04/13] board/evb64260/evb64260.c: Fix GC 4.6 build warning Wolfgang Denk
2011-11-16 20:03   ` Wolfgang Denk
2011-11-09 19:28 ` [U-Boot] [PATCH 05/13] board/evb64260/eth.c: Fix GCC " Wolfgang Denk
2011-11-16 20:04   ` Wolfgang Denk
2011-11-09 19:28 ` [U-Boot] [PATCH 06/13] board/evb64260/sdram_init.c: Fix GCC 4.6 build warnings Wolfgang Denk
2011-11-16 20:04   ` Wolfgang Denk
2011-11-09 19:29 ` [U-Boot] [PATCH 07/13] board/evb64260/zuma_pbb_mbox.c: CodingStyle cleanup Wolfgang Denk
2011-11-16 20:04   ` Wolfgang Denk
2011-11-09 19:29 ` [U-Boot] [PATCH 08/13] board/evb64260/zuma_pbb_mbox.c: Fix GCC 4.6 build warnings Wolfgang Denk
2011-11-16 20:04   ` Wolfgang Denk
2011-11-09 19:29 ` [U-Boot] [PATCH 09/13] common/cmd_fdc.c: " Wolfgang Denk
2011-11-16 20:04   ` Wolfgang Denk
2011-11-09 19:29 ` [U-Boot] [PATCH 10/13] common/cmd_universe.c: Fix GCC 4.6 build warning Wolfgang Denk
2011-11-16 20:04   ` Wolfgang Denk
2011-11-09 19:29 ` [U-Boot] [PATCH 11/13] drivers/video/ct69000.c: Fix GC " Wolfgang Denk
2011-11-09 20:44   ` Mike Frysinger
2011-11-10  5:43     ` Wolfgang Denk
2011-11-10 16:21       ` Mike Frysinger
2011-11-10 19:07         ` Wolfgang Denk
2011-11-10 20:37   ` Anatolij Gustschin
2011-11-16 20:05   ` Wolfgang Denk
2011-11-09 19:29 ` [U-Boot] [PATCH 12/13] board/esd/cpci750/cpci750.c: Fix error handling Wolfgang Denk
2011-11-16 20:05   ` Wolfgang Denk
2011-11-09 19:29 ` [U-Boot] [PATCH 13/13] board/esd/cpci750/sdram_init.c: Fix GCC 4.6 build warnings Wolfgang Denk
2011-11-09 20:45   ` Mike Frysinger
2011-11-09 21:33     ` Reinhard.Arlt at t-online.de
2011-11-16 20:11     ` Wolfgang Denk
2011-11-16 20:12   ` Wolfgang Denk
2011-11-16 20:01 ` [U-Boot] [PATCH 01/13] drivers/block/sym53c8xx.c: Fix GCC 4.6 build warning Wolfgang Denk

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.