* [U-Boot] [PATCH 00/14] More fixes GCC 4.6 build warnings
@ 2011-11-30 8:17 Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 01/14] alpr board: Fix " Wolfgang Denk
` (13 more replies)
0 siblings, 14 replies; 41+ messages in thread
From: Wolfgang Denk @ 2011-11-30 8:17 UTC (permalink / raw)
To: u-boot
Here is anothe rbatch of patches for GCC 4.6 build warnings on PPC
boards.
Note that not all patches are actually checkpatch-clean. There are
some boards which are more or less dead (for example, the Marvell
DB64360 and DB64460 boards): they have not been actively maintained
for a number of years, but making them build-clean was about the same
effort as removing them, so I decided to kep them for now, but I did
not invest efforts n a real cleanup.
Wolfgang Denk (14):
alpr board: Fix GCC 4.6 build warnings
board/amirix/ap1000/flash.c: Fix GCC 4.6 build warning
drivers/block/sata_dwc.c: Fix GCC 4.6 build warning
board/cray/L1/flash.c: Fix GCC 4.6 build warning
DB64360: Fix GCC 4.6 build warnings
DB64460: Fix GCC 4.6 build warnings
board/sandburst/common/flash.c: Fix GCC 4.6 build warning
drivers/usb/host/sl811-hcd.c: Fix GCC 4.6 build warning
post/board/lwmon5/gdc.c: Fix GCC 4.6 build warning
board/mpl/common/flash.c: Fix GCC 4.6 build warning
board/freescale/mpc8610hpcd/mpc8610hpcd.c: Fix GCC 4.6 build warning
arch/powerpc/cpu/mpc86xx/cpu.c: Fix GCC 4.6 build warning
board/sbc405/strataflash.c: Fix GCC 4.6 build warning
board/emk/top860/top860.c: Fix GCC 4.6 build warning
arch/powerpc/cpu/mpc86xx/cpu.c | 3 -
board/Marvell/db64360/db64360.c | 3 +-
board/Marvell/db64360/mv_eth.c | 33 +--
board/Marvell/db64360/sdram_init.c | 517 ++++++++++++++---------------
board/Marvell/db64460/db64460.c | 3 +-
board/Marvell/db64460/mv_eth.c | 33 +--
board/Marvell/db64460/sdram_init.c | 515 ++++++++++++++---------------
board/amirix/ap1000/flash.c | 3 -
board/cray/L1/flash.c | 25 +-
board/emk/top860/top860.c | 7 +-
board/freescale/mpc8610hpcd/mpc8610hpcd.c | 3 +-
board/mpl/common/flash.c | 3 +-
board/prodrive/alpr/fpga.c | 3 -
board/prodrive/alpr/nand.c | 4 +-
board/sandburst/common/flash.c | 5 +-
board/sbc405/strataflash.c | 3 -
drivers/block/sata_dwc.c | 6 +-
drivers/usb/host/sl811-hcd.c | 12 +-
post/board/lwmon5/gdc.c | 3 +-
19 files changed, 535 insertions(+), 649 deletions(-)
--
1.7.6.4
^ permalink raw reply [flat|nested] 41+ messages in thread
* [U-Boot] [PATCH 01/14] alpr board: Fix GCC 4.6 build warnings
2011-11-30 8:17 [U-Boot] [PATCH 00/14] More fixes GCC 4.6 build warnings Wolfgang Denk
@ 2011-11-30 8:17 ` Wolfgang Denk
2011-12-01 8:55 ` Stefan Roese
2011-12-01 23:09 ` Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 02/14] board/amirix/ap1000/flash.c: Fix GCC 4.6 build warning Wolfgang Denk
` (12 subsequent siblings)
13 siblings, 2 replies; 41+ messages in thread
From: Wolfgang Denk @ 2011-11-30 8:17 UTC (permalink / raw)
To: u-boot
Fix:
fpga.c: In function 'fpga_pre_fn':
fpga.c:88:16: warning: variable 'reg' set but not used
[-Wunused-but-set-variable]
nand.c: In function 'alpr_nand_dev_ready':
nand.c:125:18: warning: variable 'val' set but not used
[-Wunused-but-set-variable]
Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Stefan Roese <sr@denx.de>
---
total: 0 errors, 0 warnings, 22 lines checked
NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
board/prodrive/alpr/fpga.c | 3 ---
board/prodrive/alpr/nand.c | 4 +---
2 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/board/prodrive/alpr/fpga.c b/board/prodrive/alpr/fpga.c
index e7686ad..1cce798 100644
--- a/board/prodrive/alpr/fpga.c
+++ b/board/prodrive/alpr/fpga.c
@@ -85,9 +85,6 @@ static unsigned long regval;
/* PROGRAM_SEL_DPR = LOW */
int fpga_pre_fn(int cookie)
{
- unsigned long reg;
-
- reg = in32(GPIO0_IR);
/* Enable the FPGA Chain */
SET_GPIO_REG_1(GPIO0_TCR, CONFIG_SYS_GPIO_PROG_EN);
SET_GPIO_REG_0(GPIO0_ODR, CONFIG_SYS_GPIO_PROG_EN);
diff --git a/board/prodrive/alpr/nand.c b/board/prodrive/alpr/nand.c
index b18c96b..d35cfed 100644
--- a/board/prodrive/alpr/nand.c
+++ b/board/prodrive/alpr/nand.c
@@ -122,12 +122,10 @@ static int alpr_nand_verify_buf(struct mtd_info *mtd, const u_char *buf, int len
static int alpr_nand_dev_ready(struct mtd_info *mtd)
{
- volatile u_char val;
-
/*
* Blocking read to wait for NAND to be ready
*/
- val = readb(&(alpr_ndfc->addr_wait));
+ (void)readb(&(alpr_ndfc->addr_wait));
/*
* Return always true
--
1.7.6.4
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [U-Boot] [PATCH 02/14] board/amirix/ap1000/flash.c: Fix GCC 4.6 build warning
2011-11-30 8:17 [U-Boot] [PATCH 00/14] More fixes GCC 4.6 build warnings Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 01/14] alpr board: Fix " Wolfgang Denk
@ 2011-11-30 8:17 ` Wolfgang Denk
2011-12-01 22:10 ` Marek Vasut
2011-12-01 23:10 ` Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 03/14] drivers/block/sata_dwc.c: " Wolfgang Denk
` (11 subsequent siblings)
13 siblings, 2 replies; 41+ messages in thread
From: Wolfgang Denk @ 2011-11-30 8:17 UTC (permalink / raw)
To: u-boot
Fix:
flash.c: In function 'flash_write_cfiword':
flash.c:778:11: warning: variable 'ctladdr' set but not used
[-Wunused-but-set-variable]
Signed-off-by: Wolfgang Denk <wd@denx.de>
---
total: 0 errors, 0 warnings, 12 lines checked
NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
board/amirix/ap1000/flash.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/board/amirix/ap1000/flash.c b/board/amirix/ap1000/flash.c
index 1e742e5..bf8877e 100644
--- a/board/amirix/ap1000/flash.c
+++ b/board/amirix/ap1000/flash.c
@@ -774,12 +774,9 @@ static ulong flash_get_size (ulong base, int banknum)
static int flash_write_cfiword (flash_info_t * info, ulong dest,
cfiword_t cword)
{
-
- cfiptr_t ctladdr;
cfiptr_t cptr;
int flag;
- ctladdr.cp = flash_make_addr (info, 0, 0);
cptr.cp = (uchar *) dest;
/* Check if Flash is (sufficiently) erased */
--
1.7.6.4
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [U-Boot] [PATCH 03/14] drivers/block/sata_dwc.c: Fix GCC 4.6 build warning
2011-11-30 8:17 [U-Boot] [PATCH 00/14] More fixes GCC 4.6 build warnings Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 01/14] alpr board: Fix " Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 02/14] board/amirix/ap1000/flash.c: Fix GCC 4.6 build warning Wolfgang Denk
@ 2011-11-30 8:17 ` Wolfgang Denk
2011-12-01 23:10 ` Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 04/14] board/cray/L1/flash.c: " Wolfgang Denk
` (10 subsequent siblings)
13 siblings, 1 reply; 41+ messages in thread
From: Wolfgang Denk @ 2011-11-30 8:17 UTC (permalink / raw)
To: u-boot
Fix:
sata_dwc.c: In function 'scan_sata':
sata_dwc.c:535:38: warning: variable 'udma_mask' set but not used
[-Wunused-but-set-variable]
Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Kazuaki Ichinohe <kazuichi@fsi.co.jp>
---
total: 0 errors, 0 warnings, 18 lines checked
NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
drivers/block/sata_dwc.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/drivers/block/sata_dwc.c b/drivers/block/sata_dwc.c
index 69ec5fd..75101b5 100644
--- a/drivers/block/sata_dwc.c
+++ b/drivers/block/sata_dwc.c
@@ -532,7 +532,7 @@ int scan_sata(int dev)
u8 status;
const u16 *id;
struct ata_device *ata_dev = &ata_device;
- unsigned long pio_mask, mwdma_mask, udma_mask;
+ unsigned long pio_mask, mwdma_mask;
char revbuf[7];
u16 iobuf[ATA_SECTOR_WORDS];
@@ -622,10 +622,6 @@ int scan_sata(int dev)
mwdma_mask |= (1 << 4);
}
- udma_mask = 0;
- if (id[ATA_ID_FIELD_VALID] & (1 << 2))
- udma_mask = id[ATA_ID_UDMA_MODES] & 0xff;
-
if (ata_dev->class == ATA_DEV_ATA) {
if (ata_id_is_cfa(id)) {
if (id[162] & 1)
--
1.7.6.4
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [U-Boot] [PATCH 04/14] board/cray/L1/flash.c: Fix GCC 4.6 build warning
2011-11-30 8:17 [U-Boot] [PATCH 00/14] More fixes GCC 4.6 build warnings Wolfgang Denk
` (2 preceding siblings ...)
2011-11-30 8:17 ` [U-Boot] [PATCH 03/14] drivers/block/sata_dwc.c: " Wolfgang Denk
@ 2011-11-30 8:17 ` Wolfgang Denk
2011-12-01 22:10 ` Marek Vasut
2011-12-01 23:11 ` Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 05/14] DB64360: Fix GCC 4.6 build warnings Wolfgang Denk
` (9 subsequent siblings)
13 siblings, 2 replies; 41+ messages in thread
From: Wolfgang Denk @ 2011-11-30 8:17 UTC (permalink / raw)
To: u-boot
Fix:
flash.c: In function 'flash_erase':
flash.c:276:24: warning: variable 'l_sect' set but not used
[-Wunused-but-set-variable]
Signed-off-by: Wolfgang Denk <wd@denx.de>
---
total: 0 errors, 0 warnings, 49 lines checked
NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
board/cray/L1/flash.c | 25 +++++++++++--------------
1 files changed, 11 insertions(+), 14 deletions(-)
diff --git a/board/cray/L1/flash.c b/board/cray/L1/flash.c
index a3d893e..77a2100 100644
--- a/board/cray/L1/flash.c
+++ b/board/cray/L1/flash.c
@@ -273,7 +273,7 @@ int flash_erase (flash_info_t *info, int s_first, int s_last)
{
volatile FLASH_WORD_SIZE *addr = (FLASH_WORD_SIZE *)(info->start[0]);
volatile FLASH_WORD_SIZE *addr2;
- int flag, prot, sect, l_sect;
+ int flag, prot, sect;
if ((s_first < 0) || (s_first > s_last)) {
if (info->flash_id == FLASH_UNKNOWN) {
@@ -303,16 +303,14 @@ int flash_erase (flash_info_t *info, int s_first, int s_last)
printf ("\n");
}
- l_sect = -1;
-
/* Disable interrupts which might cause a timeout here */
flag = disable_interrupts();
/* Start erase on unprotected sectors */
for (sect = s_first; sect<=s_last; sect++) {
if (info->protect[sect] == 0) { /* not protected */
- addr2 = (FLASH_WORD_SIZE *)(info->start[sect]);
- printf("Erasing sector %p\n", addr2);
+ addr2 = (FLASH_WORD_SIZE *)(info->start[sect]);
+ printf("Erasing sector %p\n", addr2);
addr[ADDR0] = (FLASH_WORD_SIZE)0x00AA00AA;
addr[ADDR1] = (FLASH_WORD_SIZE)0x00550055;
@@ -320,15 +318,14 @@ int flash_erase (flash_info_t *info, int s_first, int s_last)
addr[ADDR0] = (FLASH_WORD_SIZE)0x00AA00AA;
addr[ADDR1] = (FLASH_WORD_SIZE)0x00550055;
addr2[0] = (FLASH_WORD_SIZE)0x00300030; /* sector erase */
- l_sect = sect;
- /*
- * Wait for each sector to complete, it's more
- * reliable. According to AMD Spec, you must
- * issue all erase commands within a specified
- * timeout. This has been seen to fail, especially
- * if printf()s are included (for debug)!!
- */
- wait_for_DQ7(info, sect);
+ /*
+ * Wait for each sector to complete, it's more
+ * reliable. According to AMD Spec, you must
+ * issue all erase commands within a specified
+ * timeout. This has been seen to fail, especially
+ * if printf()s are included (for debug)!!
+ */
+ wait_for_DQ7(info, sect);
}
}
--
1.7.6.4
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [U-Boot] [PATCH 05/14] DB64360: Fix GCC 4.6 build warnings
2011-11-30 8:17 [U-Boot] [PATCH 00/14] More fixes GCC 4.6 build warnings Wolfgang Denk
` (3 preceding siblings ...)
2011-11-30 8:17 ` [U-Boot] [PATCH 04/14] board/cray/L1/flash.c: " Wolfgang Denk
@ 2011-11-30 8:17 ` Wolfgang Denk
2011-12-01 23:11 ` Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 06/14] DB64460: " Wolfgang Denk
` (8 subsequent siblings)
13 siblings, 1 reply; 41+ messages in thread
From: Wolfgang Denk @ 2011-11-30 8:17 UTC (permalink / raw)
To: u-boot
Fix:
db64360.c: In function 'debug_led':
db64360.c:413:6: warning: variable 'dummy' set but not used [-Wunused-but-set-variable]
mv_eth.c: In function 'mv64360_eth_real_open':
mv_eth.c:424:6: warning: variable 'port_status' set but not used [-Wunused-but-set-variable]
mv_eth.c: In function 'mv64360_eth_stop':
mv_eth.c:642:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]
mv_eth.c: In function 'mv64360_eth_xmit':
mv_eth.c:718:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]
mv_eth.c: In function 'mv64360_eth_receive':
mv_eth.c:803:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]
mv_eth.c: In function 'mv64360_eth_get_stats':
mv_eth.c:902:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]
mv_eth.c: In function 'mv64360_eth_update_stat':
mv_eth.c:930:24: warning: variable 'dummy' set but not used [-Wunused-but-set-variable]
mv_eth.c:929:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]
mv_eth.c: In function 'mv64360_eth_print_stat':
mv_eth.c:1011:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]
mv_eth.c: In function 'eth_clear_mib_counters':
mv_eth.c:2068:15: warning: variable 'dummy' set but not used [-Wunused-but-set-variable]
sdram_init.c: In function 'check_dimm':
sdram_init.c:289:50: warning: variable 'trrd_clocks' set but not used [-Wunused-but-set-variable]
sdram_init.c:289:37: warning: variable 'tras_clocks' set but not used [-Wunused-but-set-variable]
sdram_init.c:289:24: warning: variable 'trcd_clocks' set but not used [-Wunused-but-set-variable]
sdram_init.c:289:8: warning: variable 'trp_clocks' set but not used [-Wunused-but-set-variable]
sdram_init.c:279:34: warning: variable 'devicesForErrCheck' set but not used [-Wunused-but-set-variable]
sdram_init.c: In function 'setup_sdram':
sdram_init.c:1256:13: warning: variable 'check' set but not used [-Wunused-but-set-variable]
sdram_init.c: In function 'initdram':
sdram_init.c:1735:25: warning: variable 'check' set but not used [-Wunused-but-set-variable]
sdram_init.c:1733:14: warning: variable 's1' set but not used [-Wunused-but-set-variable]
sdram_init.c:1733:6: warning: variable 's0' set but not used [-Wunused-but-set-variable]
Note: no attempt was make to clean up the mess coding style and
other issues in sdram_init.c
Signed-off-by: Wolfgang Denk <wd@denx.de>
---
WARNING: space prohibited between function name and open parenthesis '('
WARNING: line over 80 characters
WARNING: unnecessary whitespace before a quoted newline
...
total: 0 errors, 101 warnings, 1327 lines checked
NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
Warnings ignored, no further cleanup attempted.
board/Marvell/db64360/db64360.c | 3 +-
board/Marvell/db64360/mv_eth.c | 33 +--
board/Marvell/db64360/sdram_init.c | 517 +++++++++++++++++-------------------
3 files changed, 254 insertions(+), 299 deletions(-)
diff --git a/board/Marvell/db64360/db64360.c b/board/Marvell/db64360/db64360.c
index 35b695e..5183466 100644
--- a/board/Marvell/db64360/db64360.c
+++ b/board/Marvell/db64360/db64360.c
@@ -34,6 +34,7 @@
#include "../include/mv_gen_reg.h"
#include <net.h>
#include <netdev.h>
+#include <linux/compiler.h>
#include "eth.h"
#include "mpsc.h"
@@ -410,7 +411,7 @@ int checkboard (void)
void debug_led (int led, int mode)
{
volatile int *addr = 0;
- int dummy;
+ __maybe_unused int dummy;
if (mode == 1) {
switch (led) {
diff --git a/board/Marvell/db64360/mv_eth.c b/board/Marvell/db64360/mv_eth.c
index 30304b0..6340585 100644
--- a/board/Marvell/db64360/mv_eth.c
+++ b/board/Marvell/db64360/mv_eth.c
@@ -421,7 +421,7 @@ static int mv64360_eth_real_open (struct eth_device *dev)
ETH_PORT_INFO *ethernet_private;
struct mv64360_eth_priv *port_private;
unsigned int port_num;
- u32 port_status, phy_reg_data;
+ u32 phy_reg_data;
ethernet_private = (ETH_PORT_INFO *) dev->priv;
/* ronen - when we update the MAC env params we only update dev->enetaddr
@@ -519,7 +519,7 @@ static int mv64360_eth_real_open (struct eth_device *dev)
*/
MV_REG_WRITE (MV64360_ETH_MAXIMUM_TRANSMIT_UNIT (port_num), 0);
- port_status = MV_REG_READ (MV64360_ETH_PORT_STATUS_REG (port_num));
+ MV_REG_READ (MV64360_ETH_PORT_STATUS_REG (port_num));
/* Check Link status on phy */
eth_port_read_smi_reg (port_num, 1, &phy_reg_data);
@@ -637,15 +637,6 @@ static int mv64360_eth_free_rx_rings (struct eth_device *dev)
int mv64360_eth_stop (struct eth_device *dev)
{
- ETH_PORT_INFO *ethernet_private;
- struct mv64360_eth_priv *port_private;
- unsigned int port_num;
-
- ethernet_private = (ETH_PORT_INFO *) dev->priv;
- port_private =
- (struct mv64360_eth_priv *) ethernet_private->port_private;
- port_num = port_private->port_num;
-
/* Disable all gigE address decoder */
MV_REG_WRITE (MV64360_ETH_BASE_ADDR_ENABLE_REG, 0x3f);
DP (printf ("%s Ethernet stop called ... \n", __FUNCTION__));
@@ -715,7 +706,6 @@ int mv64360_eth_xmit (struct eth_device *dev, volatile void *dataPtr,
{
ETH_PORT_INFO *ethernet_private;
struct mv64360_eth_priv *port_private;
- unsigned int port_num;
PKT_INFO pkt_info;
ETH_FUNC_RET_STATUS status;
struct net_device_stats *stats;
@@ -724,7 +714,6 @@ int mv64360_eth_xmit (struct eth_device *dev, volatile void *dataPtr,
ethernet_private = (ETH_PORT_INFO *) dev->priv;
port_private =
(struct mv64360_eth_priv *) ethernet_private->port_private;
- port_num = port_private->port_num;
stats = port_private->stats;
@@ -800,15 +789,12 @@ int mv64360_eth_receive (struct eth_device *dev)
{
ETH_PORT_INFO *ethernet_private;
struct mv64360_eth_priv *port_private;
- unsigned int port_num;
PKT_INFO pkt_info;
struct net_device_stats *stats;
-
ethernet_private = (ETH_PORT_INFO *) dev->priv;
port_private =
(struct mv64360_eth_priv *) ethernet_private->port_private;
- port_num = port_private->port_num;
stats = port_private->stats;
while ((eth_port_receive (ethernet_private, ETH_Q0, &pkt_info) ==
@@ -899,12 +885,10 @@ static struct net_device_stats *mv64360_eth_get_stats (struct eth_device *dev)
{
ETH_PORT_INFO *ethernet_private;
struct mv64360_eth_priv *port_private;
- unsigned int port_num;
ethernet_private = (ETH_PORT_INFO *) dev->priv;
port_private =
(struct mv64360_eth_priv *) ethernet_private->port_private;
- port_num = port_private->port_num;
mv64360_eth_update_stat (dev);
@@ -926,13 +910,10 @@ static void mv64360_eth_update_stat (struct eth_device *dev)
ETH_PORT_INFO *ethernet_private;
struct mv64360_eth_priv *port_private;
struct net_device_stats *stats;
- unsigned int port_num;
- volatile unsigned int dummy;
ethernet_private = (ETH_PORT_INFO *) dev->priv;
port_private =
(struct mv64360_eth_priv *) ethernet_private->port_private;
- port_num = port_private->port_num;
stats = port_private->stats;
/* These are false updates */
@@ -955,12 +936,12 @@ static void mv64360_eth_update_stat (struct eth_device *dev)
* But the unsigned long in PowerPC and MIPS are 32bit. So the next read
* is just a dummy read for proper work of the GigE port
*/
- dummy = eth_read_mib_counter (ethernet_private->port_num,
+ eth_read_mib_counter (ethernet_private->port_num,
ETH_MIB_GOOD_OCTETS_RECEIVED_HIGH);
stats->tx_bytes += (unsigned long)
eth_read_mib_counter (ethernet_private->port_num,
ETH_MIB_GOOD_OCTETS_SENT_LOW);
- dummy = eth_read_mib_counter (ethernet_private->port_num,
+ eth_read_mib_counter (ethernet_private->port_num,
ETH_MIB_GOOD_OCTETS_SENT_HIGH);
stats->rx_errors += (unsigned long)
eth_read_mib_counter (ethernet_private->port_num,
@@ -1008,12 +989,10 @@ static void mv64360_eth_print_stat (struct eth_device *dev)
ETH_PORT_INFO *ethernet_private;
struct mv64360_eth_priv *port_private;
struct net_device_stats *stats;
- unsigned int port_num;
ethernet_private = (ETH_PORT_INFO *) dev->priv;
port_private =
(struct mv64360_eth_priv *) ethernet_private->port_private;
- port_num = port_private->port_num;
stats = port_private->stats;
/* These are false updates */
@@ -2065,13 +2044,11 @@ static void eth_port_init_mac_tables (ETH_PORT eth_port_num)
static void eth_clear_mib_counters (ETH_PORT eth_port_num)
{
int i;
- unsigned int dummy;
/* Perform dummy reads from MIB counters */
for (i = ETH_MIB_GOOD_OCTETS_RECEIVED_LOW; i < ETH_MIB_LATE_COLLISION;
i += 4)
- dummy = MV_REG_READ ((MV64360_ETH_MIB_COUNTERS_BASE
- (eth_port_num) + i));
+ MV_REG_READ((MV64360_ETH_MIB_COUNTERS_BASE(eth_port_num) + i));
return;
}
diff --git a/board/Marvell/db64360/sdram_init.c b/board/Marvell/db64360/sdram_init.c
index d52d3f0..e62ed0c 100644
--- a/board/Marvell/db64360/sdram_init.c
+++ b/board/Marvell/db64360/sdram_init.c
@@ -44,15 +44,8 @@
DECLARE_GLOBAL_DATA_PTR;
-#undef DEBUG
#define MAP_PCI
-#ifdef DEBUG
-#define DP(x) x
-#else
-#define DP(x)
-#endif
-
int set_dfcdlInit (void); /* setup delay line of Mv64360 */
int mvDmaIsChannelActive (int);
int mvDmaSetMemorySpace (ulong, ulong, ulong, ulong, ulong);
@@ -276,7 +269,7 @@ return 0;
#else
uchar addr = slot == 0 ? DIMM0_I2C_ADDR : DIMM1_I2C_ADDR;
int ret;
- unsigned int i, j, density = 1, devicesForErrCheck = 0;
+ unsigned int i, j, density = 1;
#ifdef DEBUG
unsigned int k;
@@ -286,17 +279,17 @@ return 0;
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;
tmemclk = 1000000000 / (memclk / 100); /* in 10 ps units */
- DP (puts ("before i2c read\n"));
+ debug("before i2c read\n");
ret = i2c_read (addr, 0, 1, data, 128);
- DP (puts ("after i2c read\n"));
+ debug("after i2c read\n");
/* zero all the values */
memset (dimmInfo, 0, sizeof (*dimmInfo));
@@ -307,7 +300,7 @@ return 0;
}
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" */
@@ -385,48 +378,46 @@ return 0;
switch (i) {
case 2: /* Memory type (DDR / SDRAM) */
dimmInfo->memoryType = (data[i] == 0x7) ? DDR : SDRAM;
-#ifdef DEBUG
if (dimmInfo->memoryType == 0)
- DP (printf
+ debug
("Dram_type in slot %d is: SDRAM\n",
- dimmInfo->slot));
+ dimmInfo->slot);
if (dimmInfo->memoryType == 1)
- DP (printf
+ debug
("Dram_type in slot %d is: DDRAM\n",
- dimmInfo->slot));
-#endif
+ dimmInfo->slot);
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
case 3: /* Number Of Row Addresses */
dimmInfo->numOfRowAddresses = data[i];
- DP (printf
+ debug
("Module Number of row addresses: %d\n",
- dimmInfo->numOfRowAddresses));
+ dimmInfo->numOfRowAddresses);
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
case 4: /* Number Of Column Addresses */
dimmInfo->numOfColAddresses = data[i];
- DP (printf
+ debug
("Module Number of col addresses: %d\n",
- dimmInfo->numOfColAddresses));
+ dimmInfo->numOfColAddresses);
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
case 5: /* Number Of Module Banks */
dimmInfo->numOfModuleBanks = data[i];
- DP (printf
+ debug
("Number of Banks on Mod. : %d\n",
- dimmInfo->numOfModuleBanks));
+ dimmInfo->numOfModuleBanks);
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
case 6: /* Data Width */
dimmInfo->dataWidth = data[i];
- DP (printf
+ debug
("Module Data Width: %d\n",
- dimmInfo->dataWidth));
+ dimmInfo->dataWidth);
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
@@ -434,33 +425,33 @@ return 0;
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;
@@ -479,9 +470,9 @@ return 0;
leftOfPoint;
dimmInfo->minimumCycleTimeAtMaxCasLatancy_RoP =
rightOfPoint;
- DP (printf
+ debug
("Minimum Cycle Time At Max CasLatancy: %d.%d [ns]\n",
- leftOfPoint, rightOfPoint));
+ leftOfPoint, rightOfPoint);
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
@@ -494,49 +485,49 @@ return 0;
rightOfPoint = time_tmp % div;
dimmInfo->clockToDataOut_LoP = leftOfPoint;
dimmInfo->clockToDataOut_RoP = rightOfPoint;
- DP (printf ("Clock To Data Out: %d.%2d [ns]\n", leftOfPoint, rightOfPoint)); /*dimmInfo->clockToDataOut */
+ debug("Clock To Data Out: %d.%2d [ns]\n", leftOfPoint, rightOfPoint); /*dimmInfo->clockToDataOut */
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
/*#ifdef CONFIG_ECC */
case 11: /* Error Check Type */
dimmInfo->errorCheckType = data[i];
- DP (printf
+ debug
("Error Check Type (0=NONE): %d\n",
- dimmInfo->errorCheckType));
+ dimmInfo->errorCheckType);
break;
/* #endif */
/*------------------------------------------------------------------------------------------------------------------------------*/
case 12: /* Refresh Interval */
dimmInfo->RefreshInterval = data[i];
- DP (printf
+ debug
("RefreshInterval (80= Self refresh Normal, 15.625us) : %x\n",
- dimmInfo->RefreshInterval));
+ dimmInfo->RefreshInterval);
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
case 13: /* Sdram Width */
dimmInfo->sdramWidth = data[i];
- DP (printf
+ debug
("Sdram Width: %d\n",
- dimmInfo->sdramWidth));
+ dimmInfo->sdramWidth);
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
case 14: /* Error Check Data Width */
dimmInfo->errorCheckDataWidth = data[i];
- DP (printf
+ debug
("Error Check Data Width: %d\n",
- dimmInfo->errorCheckDataWidth));
+ dimmInfo->errorCheckDataWidth);
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
case 15: /* Minimum Clock Delay */
dimmInfo->minClkDelay = data[i];
- DP (printf
+ debug
("Minimum Clock Delay: %d\n",
- dimmInfo->minClkDelay));
+ dimmInfo->minClkDelay);
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
@@ -552,26 +543,26 @@ return 0;
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
+ debug
("Number Of Banks On Each Chip: %d\n",
- dimmInfo->numOfBanksOnEachDevice));
+ dimmInfo->numOfBanksOnEachDevice);
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
@@ -591,34 +582,34 @@ return 0;
********************************************************/
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
+ debug
("%d, ",
- k + 1));
+ 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--) {
@@ -630,8 +621,8 @@ return 0;
/* 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
=
@@ -639,8 +630,8 @@ return 0;
hang ();
break;
case 6:
- DP (printf
- ("Max. Cas Latencies (DDR): ERROR !!!\n"));
+ debug
+ ("Max. Cas Latencies (DDR): ERROR !!!\n");
dimmInfo->
maxClSupported_DDR
=
@@ -648,36 +639,36 @@ return 0;
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;
@@ -707,8 +698,8 @@ return 0;
dimmInfo->
maxClSupported_DDR
>> 1;
- DP (printf
- ("*** Change actual Cas Latencies cause of minimumCycleTime n"));
+ debug
+ ("*** Change actual Cas Latencies cause of minimumCycleTime n");
}
/* ronen - checkif the Dimm frequency compared to the Sysclock. */
if ((dimmInfo->
@@ -744,32 +735,32 @@ return 0;
dimmInfo->
maxCASlatencySupported_RoP
= 0;
- DP (printf
+ 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
+ debug
("Max. Cas Latencies (SD): %d\n",
dimmInfo->
- maxClSupported_SD));
+ maxClSupported_SD);
dimmInfo->
maxCASlatencySupported_LoP
= j;
dimmInfo->
maxCASlatencySupported_RoP
= 0;
- DP (printf
+ debug
("Max. Cas Latencies (DDR LoP.RoP Notation): %d.%d \n",
dimmInfo->
maxCASlatencySupported_LoP,
dimmInfo->
- maxCASlatencySupported_RoP));
+ maxCASlatencySupported_RoP);
break;
}
break;
@@ -779,7 +770,7 @@ return 0;
/*------------------------------------------------------------------------------------------------------------------------------*/
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 =
@@ -794,60 +785,60 @@ return 0;
(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;
@@ -861,46 +852,46 @@ return 0;
(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;
@@ -919,7 +910,7 @@ return 0;
leftOfPoint;
dimmInfo->minimumCycleTimeAtMaxCasLatancyMinus1_RoP =
rightOfPoint;
- DP (printf ("Minimum Cycle Time At 2nd highest CasLatancy (0 = Not supported): %d.%d [ns]\n", leftOfPoint, rightOfPoint)); /*dimmInfo->minimumCycleTimeAtMaxCasLatancy */
+ debug("Minimum Cycle Time At 2nd highest CasLatancy (0 = Not supported): %d.%d [ns]\n", leftOfPoint, rightOfPoint); /*dimmInfo->minimumCycleTimeAtMaxCasLatancy */
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
@@ -932,9 +923,9 @@ return 0;
rightOfPoint = time_tmp % div;
dimmInfo->clockToDataOutMinus1_LoP = leftOfPoint;
dimmInfo->clockToDataOutMinus1_RoP = rightOfPoint;
- DP (printf
+ debug
("Clock To Data Out (2nd CL value): %d.%2d [ns]\n",
- leftOfPoint, rightOfPoint));
+ leftOfPoint, rightOfPoint);
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
@@ -951,7 +942,7 @@ return 0;
leftOfPoint;
dimmInfo->minimumCycleTimeAtMaxCasLatancyMinus2_RoP =
rightOfPoint;
- DP (printf ("Minimum Cycle Time At 3rd highest CasLatancy (0 = Not supported): %d.%d [ns]\n", leftOfPoint, rightOfPoint)); /*dimmInfo->minimumCycleTimeAtMaxCasLatancy */
+ debug("Minimum Cycle Time At 3rd highest CasLatancy (0 = Not supported): %d.%d [ns]\n", leftOfPoint, rightOfPoint); /*dimmInfo->minimumCycleTimeAtMaxCasLatancy */
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
@@ -964,9 +955,9 @@ return 0;
rightOfPoint = time_tmp % div;
dimmInfo->clockToDataOutMinus2_LoP = leftOfPoint;
dimmInfo->clockToDataOutMinus2_RoP = rightOfPoint;
- DP (printf
+ debug
("Clock To Data Out (3rd CL value): %d.%2d [ns]\n",
- leftOfPoint, rightOfPoint));
+ leftOfPoint, rightOfPoint);
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
@@ -983,12 +974,12 @@ return 0;
trp_clocks =
(dimmInfo->minRowPrechargeTime +
(tmemclk - 1)) / tmemclk;
- DP (printf
+ debug
("*** 1 clock cycle = %ld 10ps intervalls = %ld.%ld ns****\n",
- tmemclk, tmemclk / 100, tmemclk % 100));
- DP (printf
+ tmemclk, tmemclk / 100, tmemclk % 100);
+ debug
("Minimum Row Precharge Time [ns]: %d.%2d = in Clk cycles %d\n",
- leftOfPoint, rightOfPoint, trp_clocks));
+ leftOfPoint, rightOfPoint, trp_clocks);
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
@@ -1002,12 +993,9 @@ return 0;
rightOfPoint = (data[i] & maskRightOfPoint) * 25;
dimmInfo->minRowActiveRowActiveDelay = ((leftOfPoint * 100) + rightOfPoint); /* measured in 100ns Intervals */
- trrd_clocks =
- (dimmInfo->minRowActiveRowActiveDelay +
- (tmemclk - 1)) / tmemclk;
- DP (printf
+ debug
("Minimum Row Active -To- Row Active Delay [ns]: %d.%2d = in Clk cycles %d\n",
- leftOfPoint, rightOfPoint, trp_clocks));
+ leftOfPoint, rightOfPoint, trp_clocks);
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
@@ -1021,12 +1009,9 @@ return 0;
rightOfPoint = (data[i] & maskRightOfPoint) * 25;
dimmInfo->minRowActiveRowActiveDelay = ((leftOfPoint * 100) + rightOfPoint); /* measured in 100ns Intervals */
- trcd_clocks =
- (dimmInfo->minRowActiveRowActiveDelay +
- (tmemclk - 1)) / tmemclk;
- DP (printf
+ debug
("Minimum Ras-To-Cas Delay [ns]: %d.%2d = in Clk cycles %d\n",
- leftOfPoint, rightOfPoint, trp_clocks));
+ leftOfPoint, rightOfPoint, trp_clocks);
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
@@ -1035,41 +1020,41 @@ return 0;
tras_clocks =
(NSto10PS (data[i]) +
(tmemclk - 1)) / tmemclk;
- DP (printf
+ debug
("Minimum Ras Pulse Width [ns]: %d = in Clk cycles %d\n",
- dimmInfo->minRasPulseWidth, tras_clocks));
+ dimmInfo->minRasPulseWidth, tras_clocks);
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
case 31: /* Module Bank Density */
dimmInfo->moduleBankDensity = data[i];
- DP (printf
+ debug
("Module Bank Density: %d\n",
- dimmInfo->moduleBankDensity));
+ 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;
/*------------------------------------------------------------------------------------------------------------------------------*/
@@ -1095,9 +1080,9 @@ return 0;
}
dimmInfo->addrAndCommandSetupTime =
(leftOfPoint * 100 + rightOfPoint) * sign;
- DP (printf
+ debug
("Address And Command Setup Time [ns]: %d.%d\n",
- sign * leftOfPoint, rightOfPoint));
+ sign * leftOfPoint, rightOfPoint);
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
@@ -1122,9 +1107,9 @@ return 0;
}
dimmInfo->addrAndCommandHoldTime =
(leftOfPoint * 100 + rightOfPoint) * sign;
- DP (printf
+ debug
("Address And Command Hold Time [ns]: %d.%d\n",
- sign * leftOfPoint, rightOfPoint));
+ sign * leftOfPoint, rightOfPoint);
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
@@ -1149,9 +1134,9 @@ return 0;
}
dimmInfo->dataInputSetupTime =
(leftOfPoint * 100 + rightOfPoint) * sign;
- DP (printf
+ debug
("Data Input Setup Time [ns]: %d.%d\n",
- sign * leftOfPoint, rightOfPoint));
+ sign * leftOfPoint, rightOfPoint);
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
@@ -1176,9 +1161,9 @@ return 0;
}
dimmInfo->dataInputHoldTime =
(leftOfPoint * 100 + rightOfPoint) * sign;
- DP (printf
+ debug
("Data Input Hold Time [ns]: %d.%d\n\n",
- sign * leftOfPoint, rightOfPoint));
+ sign * leftOfPoint, rightOfPoint);
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
}
@@ -1194,8 +1179,6 @@ return 0;
dimmInfo->numberOfDevices =
(dimmInfo->dataWidth / dimmInfo->sdramWidth) *
dimmInfo->numOfModuleBanks;
- devicesForErrCheck =
- (dimmInfo->dataWidth - 64) / dimmInfo->sdramWidth;
if ((dimmInfo->errorCheckType == 0x1)
|| (dimmInfo->errorCheckType == 0x2)
|| (dimmInfo->errorCheckType == 0x3)) {
@@ -1217,7 +1200,7 @@ return 0;
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 +1219,11 @@ return 0;
cal_val = 2;
}
- DP (printf ("cal_val = %d\n", cal_val));
+ debug("cal_val = %d\n", cal_val);
/* 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;
}
@@ -1272,13 +1255,13 @@ int setup_sdram (AUX_MEM_DIMM_INFO * info)
/* 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");
}
/* SDRAM configuration */
@@ -1329,12 +1312,12 @@ int setup_sdram (AUX_MEM_DIMM_INFO * info)
hang ();
break;
}
- DP (printf ("calculated refresh interval %0x\n", sdram_config_reg));
+ debug("calculated refresh interval %0x\n", sdram_config_reg);
/* make sure the refresh value is only 14 bits */
if (sdram_config_reg > 0x1fff)
sdram_config_reg = 0x1fff;
- DP (printf ("adjusted refresh interval %0x\n", sdram_config_reg));
+ debug("adjusted refresh interval %0x\n", sdram_config_reg);
/* we want physical bank interleaving and */
/* virtual bank interleaving enabled so do nothing */
@@ -1344,30 +1327,30 @@ int setup_sdram (AUX_MEM_DIMM_INFO * info)
if (info->registeredAddrAndControlInputs == 1) {
/* it's registered DRAM, so set the reg. DRAM bit */
sdram_config_reg = sdram_config_reg | BIT17;
- DP (printf ("Enabling registered DRAM bit\n"));
+ debug("Enabling registered DRAM bit\n");
}
/* turn on DRAM ECC? */
#ifdef CONFIG_MV64360_ECC
if (info->errorCheckType == 0x2) {
/* DRAM has ECC, so turn it on */
sdram_config_reg = sdram_config_reg | BIT18;
- DP (printf ("Enabling ECC\n"));
+ debug("Enabling ECC\n");
}
#endif
/* set the data DQS pin configuration */
switch (info->sdramWidth) {
case 0x4: /* memory is x4 */
sdram_config_reg = sdram_config_reg | BIT20 | BIT21;
- DP (printf ("Data DQS pins set for 16 pins\n"));
+ debug("Data DQS pins set for 16 pins\n");
break;
case 0x8: /* memory is x8 or x16 */
case 0x10:
sdram_config_reg = sdram_config_reg | BIT21;
- DP (printf ("Data DQS pins set for 8 pins\n"));
+ debug("Data DQS pins set for 8 pins\n");
break;
case 0x20: /* memory is x32 */
/* both bits are cleared for x32 so nothing to do */
- DP (printf ("Data DQS pins set for 2 pins\n"));
+ debug("Data DQS pins set for 2 pins\n");
break;
default: /* memory width unsupported */
printf ("DRAM chip width is unknown!\n");
@@ -1390,23 +1373,23 @@ int setup_sdram (AUX_MEM_DIMM_INFO * info)
/* write the value into the SDRAM configuration register */
GT_REG_WRITE (SDRAM_CONFIG, sdram_config_reg);
- DP (printf
+ debug
("OOOOOOOOO sdram_conf 0x1400: %08x\n",
- GTREGREAD (SDRAM_CONFIG)));
+ GTREGREAD (SDRAM_CONFIG));
/* SDRAM open pages control keep open as much as I can */
GT_REG_WRITE (SDRAM_OPEN_PAGES_CONTROL, 0x0);
- DP (printf
+ debug
("sdram_open_pages_controll 0x1414: %08x\n",
- GTREGREAD (SDRAM_OPEN_PAGES_CONTROL)));
+ 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 Latency according to SPD information */
switch (info->memoryType) {
@@ -1419,7 +1402,7 @@ int setup_sdram (AUX_MEM_DIMM_INFO * info)
/* Calculate the settings for SDRAM mode and Dunit control low registers */
/* Values set according to technical bulletin TB-92 rev. c */
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_sdram_mode = 0x32; /* CL=3 Burstlength = 4 */
@@ -1428,18 +1411,18 @@ int setup_sdram (AUX_MEM_DIMM_INFO * info)
tmp_dunit_control_low = 0x05110051;
else
tmp_dunit_control_low = 0x24110051;
- DP (printf
+ debug
("Max. CL is 3 CLKs 0x141c= %08lx, 0x1404 = %08lx\n",
- tmp_sdram_mode, tmp_dunit_control_low));
+ tmp_sdram_mode, tmp_dunit_control_low);
} else { /* clk sync. bypassed */
if (info->registeredAddrAndControlInputs == 1) /* registerd DDR SDRAM? */
tmp_dunit_control_low = 0x2C1107F2;
else
tmp_dunit_control_low = 0x3C1107d2;
- DP (printf
+ debug
("Max. CL is 3 CLKs 0x141c= %08lx, 0x1404 = %08lx\n",
- tmp_sdram_mode, tmp_dunit_control_low));
+ tmp_sdram_mode, tmp_dunit_control_low);
}
break;
case DDR_CL_2_5:
@@ -1449,9 +1432,9 @@ int setup_sdram (AUX_MEM_DIMM_INFO * info)
tmp_dunit_control_low = 0x25110051;
else
tmp_dunit_control_low = 0x24110051;
- DP (printf
+ debug
("Max. CL is 2.5 CLKs 0x141c= %08lx, 0x1404 = %08lx\n",
- tmp_sdram_mode, tmp_dunit_control_low));
+ tmp_sdram_mode, tmp_dunit_control_low);
} else { /* clk sync. bypassed */
if (info->registeredAddrAndControlInputs == 1) { /* registerd DDR SDRAM? */
@@ -1460,9 +1443,9 @@ int setup_sdram (AUX_MEM_DIMM_INFO * info)
hang ();
} else
tmp_dunit_control_low = 0x1B1107d2;
- DP (printf
+ debug
("Max. CL is 2.5 CLKs 0x141c= %08lx, 0x1404 = %08lx\n",
- tmp_sdram_mode, tmp_dunit_control_low));
+ tmp_sdram_mode, tmp_dunit_control_low);
}
break;
case DDR_CL_2:
@@ -1472,9 +1455,9 @@ int setup_sdram (AUX_MEM_DIMM_INFO * info)
tmp_dunit_control_low = 0x04110051;
else
tmp_dunit_control_low = 0x03110051;
- DP (printf
+ debug
("Max. CL is 2 CLKs 0x141c= %08lx, 0x1404 = %08lx\n",
- tmp_sdram_mode, tmp_dunit_control_low));
+ tmp_sdram_mode, tmp_dunit_control_low);
} else { /* clk sync. bypassed */
if (info->registeredAddrAndControlInputs == 1) { /* registerd DDR SDRAM? */
@@ -1483,9 +1466,9 @@ int setup_sdram (AUX_MEM_DIMM_INFO * info)
hang ();
} else
tmp_dunit_control_low = 0x3B1107d2;
- DP (printf
+ debug
("Max. CL is 2 CLKs 0x141c= %08lx, 0x1404 = %08lx\n",
- tmp_sdram_mode, tmp_dunit_control_low));
+ tmp_sdram_mode, tmp_dunit_control_low);
}
break;
case DDR_CL_1_5:
@@ -1495,9 +1478,9 @@ int setup_sdram (AUX_MEM_DIMM_INFO * info)
tmp_dunit_control_low = 0x24110051;
else
tmp_dunit_control_low = 0x23110051;
- DP (printf
+ debug
("Max. CL is 1.5 CLKs 0x141c= %08lx, 0x1404 = %08lx\n",
- tmp_sdram_mode, tmp_dunit_control_low));
+ tmp_sdram_mode, tmp_dunit_control_low);
} else { /* clk sync. bypassed */
if (info->registeredAddrAndControlInputs == 1) { /* registerd DDR SDRAM? */
@@ -1506,9 +1489,9 @@ int setup_sdram (AUX_MEM_DIMM_INFO * info)
hang ();
} else
tmp_dunit_control_low = 0x1A1107d2;
- DP (printf
+ debug
("Max. CL is 1.5 CLKs 0x141c= %08lx, 0x1404 = %08lx\n",
- tmp_sdram_mode, tmp_dunit_control_low));
+ tmp_sdram_mode, tmp_dunit_control_low);
}
break;
@@ -1528,8 +1511,8 @@ 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 0x1418 after SDRAM_MODE: Module still busy ... please wait... ***\n"));
+ debug
+ ("\n*** SDRAM_OPERATION 0x1418 after SDRAM_MODE: Module still busy ... please wait... ***\n");
}
/* SDRAM D_UNIT_CONTROL_LOW 0x1404 */
@@ -1538,8 +1521,8 @@ 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");
}
/*------------------------------------------------------------------------------ */
@@ -1549,29 +1532,29 @@ int setup_sdram (AUX_MEM_DIMM_INFO * info)
/* program this with the default value */
tmp = 0x02; /* power-up default address select decoding value */
- DP (printf ("drb_size (n*64Mbit): %d\n", info->drb_size));
+ debug("drb_size (n*64Mbit): %d\n", info->drb_size);
/* figure out the DRAM chip size */
sdram_chip_size =
(1 << (info->numOfRowAddresses + info->numOfColAddresses));
sdram_chip_size *= info->sdramWidth;
sdram_chip_size *= 4;
- DP (printf ("computed sdram chip size is %#lx\n", sdram_chip_size));
+ debug("computed sdram chip size is %#lx\n", sdram_chip_size);
/* divide sdram chip size by 64 Mbits */
sdram_chip_size = sdram_chip_size / 0x4000000;
switch (sdram_chip_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:
@@ -1582,15 +1565,15 @@ int setup_sdram (AUX_MEM_DIMM_INFO * info)
/* SDRAM address control */
GT_REG_WRITE (SDRAM_ADDR_CONTROL, tmp);
- DP (printf
+ debug
("setting up sdram address control (0x1410) with: %08lx \n",
- tmp));
+ tmp);
/* ------------------------------------------------------------------------------ */
/* same settings for registerd & non-registerd DDR SDRAM */
- DP (printf
+ debug
("setting up sdram_timing_control_low (0x1408) with: %08x \n",
- 0x11511220));
+ 0x11511220);
GT_REG_WRITE (SDRAM_TIMING_CONTROL_LOW, 0x11511220);
@@ -1602,42 +1585,38 @@ int setup_sdram (AUX_MEM_DIMM_INFO * info)
if (info->registeredAddrAndControlInputs
|| info->registeredDQMBinputs) {
tmp |= (1 << 17);
- DP (printf
+ 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
+ debug
("Before Buffer assignment - sdram_conf (0x1400): %08x\n",
- GTREGREAD (SDRAM_CONFIG)));
- DP (printf
+ GTREGREAD (SDRAM_CONFIG));
+ debug
("After Buffer assignment - sdram_conf (0x1400): %08x\n",
- GTREGREAD (SDRAM_CONFIG)));
+ GTREGREAD (SDRAM_CONFIG));
/* SDRAM timing To_do: */
/* ------------------------------------------------------------------------------ */
- DP (printf
+ debug
("setting up sdram_timing_control_high (0x140c) with: %08x \n",
- 0x9));
+ 0x9);
GT_REG_WRITE (SDRAM_TIMING_CONTROL_HIGH, 0x9);
- DP (printf
+ debug
("setting up sdram address pads control (0x14c0) with: %08x \n",
- 0x7d5014a));
+ 0x7d5014a);
GT_REG_WRITE (SDRAM_ADDR_CTRL_PADS_CALIBRATION, 0x7d5014a);
- DP (printf
- indent: Standard input:1450: Warning:old style assignment ambiguity in "=*". Assuming "= *"
-
-indent: Standard input:1451: Warning:old style assignment ambiguity in "=*". Assuming "= *"
-
+ debug
("setting up sdram data pads control (0x14c4) with: %08x \n",
- 0x7d5014a));
+ 0x7d5014a);
GT_REG_WRITE (SDRAM_DATA_PADS_CALIBRATION, 0x7d5014a);
/* ------------------------------------------------------------------------------ */
@@ -1647,8 +1626,8 @@ indent: Standard input:1451: Warning:old style assignment ambiguity in "=*". As
/* for (i = info->slot * 2; i < ((info->slot * 2) + info->banks); i++) */
{
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);
@@ -1656,17 +1635,17 @@ indent: Standard input:1451: Warning:old style assignment ambiguity in "=*". As
/* set SDRAM mode */ /* To_do check it */
GT_REG_WRITE (SDRAM_OPERATION, 0x3);
check = GTREGREAD (SDRAM_OPERATION);
- DP (printf
+ debug
("\n*** SDRAM_OPERATION 1418 (0 = Normal Operation) = %08lx ***\n",
- check));
+ check);
/* switch back to normal operation mode */
GT_REG_WRITE (SDRAM_OPERATION, 0);
check = GTREGREAD (SDRAM_OPERATION);
- DP (printf
+ debug
("\n*** SDRAM_OPERATION 1418 (0 = Normal Operation) = %08lx ***\n",
- check));
+ check);
/* unmap the bank */
memory_map_bank (i, 0, 0);
@@ -1712,9 +1691,9 @@ long int dram_size (long int *base, long int maxsize)
*b = save2;
if (val != cnt) {
- DP (printf
+ debug
("Found %08x at Address %08x (failure)\n",
- (unsigned int) val, (unsigned int) addr));
+ (unsigned int) val, (unsigned int) addr);
/* fix boundary condition.. STARTVAL means zero */
if (cnt == STARTVAL / sizeof (long))
cnt = 0;
@@ -1730,9 +1709,8 @@ long int dram_size (long int *base, long int maxsize)
* controlling logic happens */
phys_size_t initdram (int board_type)
{
- int s0 = 0, s1 = 0;
int checkbank[4] = {[0 ... 3] = 0 };
- ulong realsize, total, check;
+ ulong realsize, total;
AUX_MEM_DIMM_INFO dimmInfo1;
AUX_MEM_DIMM_INFO dimmInfo2;
int nhr, bank_no;
@@ -1747,10 +1725,10 @@ phys_size_t initdram (int board_type)
printf ("Skipping SD- DDRRAM setup due to NHR bit being set\n");
} else {
/* DIMM0 */
- s0 = check_dimm (0, &dimmInfo1);
+ check_dimm (0, &dimmInfo1);
/* DIMM1 */
- s1 = check_dimm (1, &dimmInfo2);
+ check_dimm (1, &dimmInfo2);
memory_map_bank (0, 0, 0);
memory_map_bank (1, 0, 0);
@@ -1784,7 +1762,6 @@ phys_size_t initdram (int board_type)
/* next, size the SDRAM banks */
realsize = total = 0;
- check = GB / 4;
if (dimmInfo1.numOfModuleBanks > 0) {
checkbank[0] = 1;
}
--
1.7.6.4
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [U-Boot] [PATCH 06/14] DB64460: Fix GCC 4.6 build warnings
2011-11-30 8:17 [U-Boot] [PATCH 00/14] More fixes GCC 4.6 build warnings Wolfgang Denk
` (4 preceding siblings ...)
2011-11-30 8:17 ` [U-Boot] [PATCH 05/14] DB64360: Fix GCC 4.6 build warnings Wolfgang Denk
@ 2011-11-30 8:17 ` Wolfgang Denk
2011-12-01 23:11 ` Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 07/14] board/sandburst/common/flash.c: Fix GCC 4.6 build warning Wolfgang Denk
` (7 subsequent siblings)
13 siblings, 1 reply; 41+ messages in thread
From: Wolfgang Denk @ 2011-11-30 8:17 UTC (permalink / raw)
To: u-boot
Fix:
db64460.c: In function 'debug_led':
db64460.c:413:6: warning: variable 'dummy' set but not used [-Wunused-but-set-variable]
mv_eth.c: In function 'mv64460_eth_real_open':
mv_eth.c:423:6: warning: variable 'port_status' set but not used [-Wunused-but-set-variable]
mv_eth.c: In function 'mv64460_eth_stop':
mv_eth.c:641:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]
mv_eth.c: In function 'mv64460_eth_xmit':
mv_eth.c:717:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]
mv_eth.c: In function 'mv64460_eth_receive':
mv_eth.c:802:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]
mv_eth.c: In function 'mv64460_eth_get_stats':
mv_eth.c:901:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]
mv_eth.c: In function 'mv64460_eth_update_stat':
mv_eth.c:929:24: warning: variable 'dummy' set but not used [-Wunused-but-set-variable]
mv_eth.c:928:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]
mv_eth.c: In function 'mv64460_eth_print_stat':
mv_eth.c:1010:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]
mv_eth.c: In function 'eth_clear_mib_counters':
mv_eth.c:2067:15: warning: variable 'dummy' set but not used [-Wunused-but-set-variable]
sdram_init.c: In function 'check_dimm':
sdram_init.c:289:50: warning: variable 'trrd_clocks' set but not used [-Wunused-but-set-variable]
sdram_init.c:289:37: warning: variable 'tras_clocks' set but not used [-Wunused-but-set-variable]
sdram_init.c:289:24: warning: variable 'trcd_clocks' set but not used [-Wunused-but-set-variable]
sdram_init.c:289:8: warning: variable 'trp_clocks' set but not used [-Wunused-but-set-variable]
sdram_init.c:279:34: warning: variable 'devicesForErrCheck' set but not used [-Wunused-but-set-variable]
sdram_init.c: In function 'setup_sdram':
sdram_init.c:1255:13: warning: variable 'check' set but not used [-Wunused-but-set-variable]
sdram_init.c: In function 'initdram':
sdram_init.c:1744:25: warning: variable 'check' set but not used [-Wunused-but-set-variable]
sdram_init.c:1742:14: warning: variable 's1' set but not used [-Wunused-but-set-variable]
sdram_init.c:1742:6: warning: variable 's0' set but not used [-Wunused-but-set-variable]
Note: no attempt was make to clean up the mess coding style and
other issues in sdram_init.c
Signed-off-by: Wolfgang Denk <wd@denx.de>
---
WARNING: space prohibited between function name and open parenthesis '('
WARNING: unnecessary whitespace before a quoted newline
WARNING: line over 80 characters
...
total: 0 errors, 117 warnings, 1335 lines checked
NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
Warnings ignored, no further cleanup attempted.
board/Marvell/db64460/db64460.c | 3 +-
board/Marvell/db64460/mv_eth.c | 33 +--
board/Marvell/db64460/sdram_init.c | 515 +++++++++++++++++-------------------
3 files changed, 255 insertions(+), 296 deletions(-)
diff --git a/board/Marvell/db64460/db64460.c b/board/Marvell/db64460/db64460.c
index 14e6355..a7836ed 100644
--- a/board/Marvell/db64460/db64460.c
+++ b/board/Marvell/db64460/db64460.c
@@ -34,6 +34,7 @@
#include "../include/mv_gen_reg.h"
#include <net.h>
#include <netdev.h>
+#include <linux/compiler.h>
#include "eth.h"
#include "mpsc.h"
@@ -410,7 +411,7 @@ int checkboard (void)
void debug_led (int led, int mode)
{
volatile int *addr = 0;
- int dummy;
+ __maybe_unused int dummy;
if (mode == 1) {
switch (led) {
diff --git a/board/Marvell/db64460/mv_eth.c b/board/Marvell/db64460/mv_eth.c
index cd9d5a4..4aefbaf 100644
--- a/board/Marvell/db64460/mv_eth.c
+++ b/board/Marvell/db64460/mv_eth.c
@@ -420,7 +420,7 @@ static int mv64460_eth_real_open (struct eth_device *dev)
ETH_PORT_INFO *ethernet_private;
struct mv64460_eth_priv *port_private;
unsigned int port_num;
- u32 port_status, phy_reg_data;
+ u32 phy_reg_data;
ethernet_private = (ETH_PORT_INFO *) dev->priv;
/* ronen - when we update the MAC env params we only update dev->enetaddr
@@ -518,7 +518,7 @@ static int mv64460_eth_real_open (struct eth_device *dev)
*/
MV_REG_WRITE (MV64460_ETH_MAXIMUM_TRANSMIT_UNIT (port_num), 0);
- port_status = MV_REG_READ (MV64460_ETH_PORT_STATUS_REG (port_num));
+ MV_REG_READ (MV64460_ETH_PORT_STATUS_REG (port_num));
/* Check Link status on phy */
eth_port_read_smi_reg (port_num, 1, &phy_reg_data);
@@ -636,15 +636,6 @@ static int mv64460_eth_free_rx_rings (struct eth_device *dev)
int mv64460_eth_stop (struct eth_device *dev)
{
- ETH_PORT_INFO *ethernet_private;
- struct mv64460_eth_priv *port_private;
- unsigned int port_num;
-
- ethernet_private = (ETH_PORT_INFO *) dev->priv;
- port_private =
- (struct mv64460_eth_priv *) ethernet_private->port_private;
- port_num = port_private->port_num;
-
/* Disable all gigE address decoder */
MV_REG_WRITE (MV64460_ETH_BASE_ADDR_ENABLE_REG, 0x3f);
DP (printf ("%s Ethernet stop called ... \n", __FUNCTION__));
@@ -714,7 +705,6 @@ int mv64460_eth_xmit (struct eth_device *dev, volatile void *dataPtr,
{
ETH_PORT_INFO *ethernet_private;
struct mv64460_eth_priv *port_private;
- unsigned int port_num;
PKT_INFO pkt_info;
ETH_FUNC_RET_STATUS status;
struct net_device_stats *stats;
@@ -723,7 +713,6 @@ int mv64460_eth_xmit (struct eth_device *dev, volatile void *dataPtr,
ethernet_private = (ETH_PORT_INFO *) dev->priv;
port_private =
(struct mv64460_eth_priv *) ethernet_private->port_private;
- port_num = port_private->port_num;
stats = port_private->stats;
@@ -799,15 +788,12 @@ int mv64460_eth_receive (struct eth_device *dev)
{
ETH_PORT_INFO *ethernet_private;
struct mv64460_eth_priv *port_private;
- unsigned int port_num;
PKT_INFO pkt_info;
struct net_device_stats *stats;
-
ethernet_private = (ETH_PORT_INFO *) dev->priv;
port_private =
(struct mv64460_eth_priv *) ethernet_private->port_private;
- port_num = port_private->port_num;
stats = port_private->stats;
while ((eth_port_receive (ethernet_private, ETH_Q0, &pkt_info) ==
@@ -898,12 +884,10 @@ static struct net_device_stats *mv64460_eth_get_stats (struct eth_device *dev)
{
ETH_PORT_INFO *ethernet_private;
struct mv64460_eth_priv *port_private;
- unsigned int port_num;
ethernet_private = (ETH_PORT_INFO *) dev->priv;
port_private =
(struct mv64460_eth_priv *) ethernet_private->port_private;
- port_num = port_private->port_num;
mv64460_eth_update_stat (dev);
@@ -925,13 +909,10 @@ static void mv64460_eth_update_stat (struct eth_device *dev)
ETH_PORT_INFO *ethernet_private;
struct mv64460_eth_priv *port_private;
struct net_device_stats *stats;
- unsigned int port_num;
- volatile unsigned int dummy;
ethernet_private = (ETH_PORT_INFO *) dev->priv;
port_private =
(struct mv64460_eth_priv *) ethernet_private->port_private;
- port_num = port_private->port_num;
stats = port_private->stats;
/* These are false updates */
@@ -954,12 +935,12 @@ static void mv64460_eth_update_stat (struct eth_device *dev)
* But the unsigned long in PowerPC and MIPS are 32bit. So the next read
* is just a dummy read for proper work of the GigE port
*/
- dummy = eth_read_mib_counter (ethernet_private->port_num,
+ eth_read_mib_counter (ethernet_private->port_num,
ETH_MIB_GOOD_OCTETS_RECEIVED_HIGH);
stats->tx_bytes += (unsigned long)
eth_read_mib_counter (ethernet_private->port_num,
ETH_MIB_GOOD_OCTETS_SENT_LOW);
- dummy = eth_read_mib_counter (ethernet_private->port_num,
+ eth_read_mib_counter (ethernet_private->port_num,
ETH_MIB_GOOD_OCTETS_SENT_HIGH);
stats->rx_errors += (unsigned long)
eth_read_mib_counter (ethernet_private->port_num,
@@ -1007,12 +988,10 @@ static void mv64460_eth_print_stat (struct eth_device *dev)
ETH_PORT_INFO *ethernet_private;
struct mv64460_eth_priv *port_private;
struct net_device_stats *stats;
- unsigned int port_num;
ethernet_private = (ETH_PORT_INFO *) dev->priv;
port_private =
(struct mv64460_eth_priv *) ethernet_private->port_private;
- port_num = port_private->port_num;
stats = port_private->stats;
/* These are false updates */
@@ -2064,13 +2043,11 @@ static void eth_port_init_mac_tables (ETH_PORT eth_port_num)
static void eth_clear_mib_counters (ETH_PORT eth_port_num)
{
int i;
- unsigned int dummy;
/* Perform dummy reads from MIB counters */
for (i = ETH_MIB_GOOD_OCTETS_RECEIVED_LOW; i < ETH_MIB_LATE_COLLISION;
i += 4)
- dummy = MV_REG_READ ((MV64460_ETH_MIB_COUNTERS_BASE
- (eth_port_num) + i));
+ MV_REG_READ((MV64460_ETH_MIB_COUNTERS_BASE(eth_port_num) + i));
return;
}
diff --git a/board/Marvell/db64460/sdram_init.c b/board/Marvell/db64460/sdram_init.c
index e328d8f..6297447 100644
--- a/board/Marvell/db64460/sdram_init.c
+++ b/board/Marvell/db64460/sdram_init.c
@@ -44,15 +44,8 @@
DECLARE_GLOBAL_DATA_PTR;
-#undef DEBUG
#define MAP_PCI
-#ifdef DEBUG
-#define DP(x) x
-#else
-#define DP(x)
-#endif
-
int set_dfcdlInit (void); /* setup delay line of Mv64460 */
int mvDmaIsChannelActive (int);
int mvDmaSetMemorySpace (ulong, ulong, ulong, ulong, ulong);
@@ -69,14 +62,12 @@ memory_map_bank (unsigned int bankNo,
#endif
-#ifdef DEBUG
if (bankLength > 0) {
- printf ("mapping bank %d at %08x - %08x\n",
+ debug("mapping bank %d at %08x - %08x\n",
bankNo, bankBase, bankBase + bankLength - 1);
} else {
- printf ("unmapping bank %d\n", bankNo);
+ debug("unmapping bank %d\n", bankNo);
}
-#endif
memoryMapBank (bankNo, bankBase, bankLength);
@@ -276,7 +267,7 @@ return 0;
#else
uchar addr = slot == 0 ? DIMM0_I2C_ADDR : DIMM1_I2C_ADDR;
int ret;
- unsigned int i, j, density = 1, devicesForErrCheck = 0;
+ unsigned int i, j, density = 1;
#ifdef DEBUG
unsigned int k;
@@ -286,17 +277,17 @@ return 0;
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;
tmemclk = 1000000000 / (memclk / 100); /* in 10 ps units */
- DP (puts ("before i2c read\n"));
+ debug("before i2c read\n");
ret = i2c_read (addr, 0, 1, data, 128);
- DP (puts ("after i2c read\n"));
+ debug("after i2c read\n");
/* zero all the values */
memset (dimmInfo, 0, sizeof (*dimmInfo));
@@ -307,7 +298,7 @@ return 0;
}
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" */
@@ -387,46 +378,46 @@ return 0;
dimmInfo->memoryType = (data[i] == 0x7) ? DDR : SDRAM;
#ifdef DEBUG
if (dimmInfo->memoryType == 0)
- DP (printf
+ debug
("Dram_type in slot %d is: SDRAM\n",
- dimmInfo->slot));
+ dimmInfo->slot);
if (dimmInfo->memoryType == 1)
- DP (printf
+ debug
("Dram_type in slot %d is: DDRAM\n",
- dimmInfo->slot));
+ dimmInfo->slot);
#endif
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
case 3: /* Number Of Row Addresses */
dimmInfo->numOfRowAddresses = data[i];
- DP (printf
+ debug
("Module Number of row addresses: %d\n",
- dimmInfo->numOfRowAddresses));
+ dimmInfo->numOfRowAddresses);
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
case 4: /* Number Of Column Addresses */
dimmInfo->numOfColAddresses = data[i];
- DP (printf
+ debug
("Module Number of col addresses: %d\n",
- dimmInfo->numOfColAddresses));
+ dimmInfo->numOfColAddresses);
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
case 5: /* Number Of Module Banks */
dimmInfo->numOfModuleBanks = data[i];
- DP (printf
+ debug
("Number of Banks on Mod. : %d\n",
- dimmInfo->numOfModuleBanks));
+ dimmInfo->numOfModuleBanks);
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
case 6: /* Data Width */
dimmInfo->dataWidth = data[i];
- DP (printf
+ debug
("Module Data Width: %d\n",
- dimmInfo->dataWidth));
+ dimmInfo->dataWidth);
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
@@ -434,33 +425,33 @@ return 0;
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;
@@ -479,9 +470,9 @@ return 0;
leftOfPoint;
dimmInfo->minimumCycleTimeAtMaxCasLatancy_RoP =
rightOfPoint;
- DP (printf
+ debug
("Minimum Cycle Time At Max CasLatancy: %d.%d [ns]\n",
- leftOfPoint, rightOfPoint));
+ leftOfPoint, rightOfPoint);
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
@@ -494,49 +485,49 @@ return 0;
rightOfPoint = time_tmp % div;
dimmInfo->clockToDataOut_LoP = leftOfPoint;
dimmInfo->clockToDataOut_RoP = rightOfPoint;
- DP (printf ("Clock To Data Out: %d.%2d [ns]\n", leftOfPoint, rightOfPoint)); /*dimmInfo->clockToDataOut */
+ debug("Clock To Data Out: %d.%2d [ns]\n", leftOfPoint, rightOfPoint); /*dimmInfo->clockToDataOut */
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
/*#ifdef CONFIG_ECC */
case 11: /* Error Check Type */
dimmInfo->errorCheckType = data[i];
- DP (printf
+ debug
("Error Check Type (0=NONE): %d\n",
- dimmInfo->errorCheckType));
+ dimmInfo->errorCheckType);
break;
/* #endif */
/*------------------------------------------------------------------------------------------------------------------------------*/
case 12: /* Refresh Interval */
dimmInfo->RefreshInterval = data[i];
- DP (printf
+ debug
("RefreshInterval (80= Self refresh Normal, 15.625us) : %x\n",
- dimmInfo->RefreshInterval));
+ dimmInfo->RefreshInterval);
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
case 13: /* Sdram Width */
dimmInfo->sdramWidth = data[i];
- DP (printf
+ debug
("Sdram Width: %d\n",
- dimmInfo->sdramWidth));
+ dimmInfo->sdramWidth);
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
case 14: /* Error Check Data Width */
dimmInfo->errorCheckDataWidth = data[i];
- DP (printf
+ debug
("Error Check Data Width: %d\n",
- dimmInfo->errorCheckDataWidth));
+ dimmInfo->errorCheckDataWidth);
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
case 15: /* Minimum Clock Delay */
dimmInfo->minClkDelay = data[i];
- DP (printf
+ debug
("Minimum Clock Delay: %d\n",
- dimmInfo->minClkDelay));
+ dimmInfo->minClkDelay);
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
@@ -552,26 +543,26 @@ return 0;
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
+ debug
("Number Of Banks On Each Chip: %d\n",
- dimmInfo->numOfBanksOnEachDevice));
+ dimmInfo->numOfBanksOnEachDevice);
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
@@ -591,34 +582,34 @@ return 0;
********************************************************/
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
+ debug
("%d, ",
- k + 1));
+ 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--) {
@@ -630,8 +621,8 @@ return 0;
/* 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
=
@@ -639,8 +630,8 @@ return 0;
hang ();
break;
case 6:
- DP (printf
- ("Max. Cas Latencies (DDR): ERROR !!!\n"));
+ debug
+ ("Max. Cas Latencies (DDR): ERROR !!!\n");
dimmInfo->
maxClSupported_DDR
=
@@ -648,36 +639,36 @@ return 0;
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;
@@ -707,8 +698,8 @@ return 0;
dimmInfo->
maxClSupported_DDR
>> 1;
- DP (printf
- ("*** Change actual Cas Latencies cause of minimumCycleTime n"));
+ debug
+ ("*** Change actual Cas Latencies cause of minimumCycleTime n");
}
/* ronen - checkif the Dimm frequency compared to the Sysclock. */
if ((dimmInfo->
@@ -744,32 +735,32 @@ return 0;
dimmInfo->
maxCASlatencySupported_RoP
= 0;
- DP (printf
+ 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
+ debug
("Max. Cas Latencies (SD): %d\n",
dimmInfo->
- maxClSupported_SD));
+ maxClSupported_SD);
dimmInfo->
maxCASlatencySupported_LoP
= j;
dimmInfo->
maxCASlatencySupported_RoP
= 0;
- DP (printf
+ debug
("Max. Cas Latencies (DDR LoP.RoP Notation): %d.%d \n",
dimmInfo->
maxCASlatencySupported_LoP,
dimmInfo->
- maxCASlatencySupported_RoP));
+ maxCASlatencySupported_RoP);
break;
}
break;
@@ -779,7 +770,7 @@ return 0;
/*------------------------------------------------------------------------------------------------------------------------------*/
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 =
@@ -794,60 +785,60 @@ return 0;
(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;
@@ -861,46 +852,46 @@ return 0;
(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;
@@ -919,7 +910,7 @@ return 0;
leftOfPoint;
dimmInfo->minimumCycleTimeAtMaxCasLatancyMinus1_RoP =
rightOfPoint;
- DP (printf ("Minimum Cycle Time At 2nd highest CasLatancy (0 = Not supported): %d.%d [ns]\n", leftOfPoint, rightOfPoint)); /*dimmInfo->minimumCycleTimeAtMaxCasLatancy */
+ debug("Minimum Cycle Time At 2nd highest CasLatancy (0 = Not supported): %d.%d [ns]\n", leftOfPoint, rightOfPoint); /*dimmInfo->minimumCycleTimeAtMaxCasLatancy */
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
@@ -932,9 +923,9 @@ return 0;
rightOfPoint = time_tmp % div;
dimmInfo->clockToDataOutMinus1_LoP = leftOfPoint;
dimmInfo->clockToDataOutMinus1_RoP = rightOfPoint;
- DP (printf
+ debug
("Clock To Data Out (2nd CL value): %d.%2d [ns]\n",
- leftOfPoint, rightOfPoint));
+ leftOfPoint, rightOfPoint);
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
@@ -951,7 +942,7 @@ return 0;
leftOfPoint;
dimmInfo->minimumCycleTimeAtMaxCasLatancyMinus2_RoP =
rightOfPoint;
- DP (printf ("Minimum Cycle Time At 3rd highest CasLatancy (0 = Not supported): %d.%d [ns]\n", leftOfPoint, rightOfPoint)); /*dimmInfo->minimumCycleTimeAtMaxCasLatancy */
+ debug("Minimum Cycle Time At 3rd highest CasLatancy (0 = Not supported): %d.%d [ns]\n", leftOfPoint, rightOfPoint); /*dimmInfo->minimumCycleTimeAtMaxCasLatancy */
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
@@ -964,9 +955,9 @@ return 0;
rightOfPoint = time_tmp % div;
dimmInfo->clockToDataOutMinus2_LoP = leftOfPoint;
dimmInfo->clockToDataOutMinus2_RoP = rightOfPoint;
- DP (printf
+ debug
("Clock To Data Out (3rd CL value): %d.%2d [ns]\n",
- leftOfPoint, rightOfPoint));
+ leftOfPoint, rightOfPoint);
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
@@ -983,12 +974,12 @@ return 0;
trp_clocks =
(dimmInfo->minRowPrechargeTime +
(tmemclk - 1)) / tmemclk;
- DP (printf
+ debug
("*** 1 clock cycle = %ld 10ps intervalls = %ld.%ld ns****\n",
- tmemclk, tmemclk / 100, tmemclk % 100));
- DP (printf
+ tmemclk, tmemclk / 100, tmemclk % 100);
+ debug
("Minimum Row Precharge Time [ns]: %d.%2d = in Clk cycles %d\n",
- leftOfPoint, rightOfPoint, trp_clocks));
+ leftOfPoint, rightOfPoint, trp_clocks);
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
@@ -1002,12 +993,9 @@ return 0;
rightOfPoint = (data[i] & maskRightOfPoint) * 25;
dimmInfo->minRowActiveRowActiveDelay = ((leftOfPoint * 100) + rightOfPoint); /* measured in 100ns Intervals */
- trrd_clocks =
- (dimmInfo->minRowActiveRowActiveDelay +
- (tmemclk - 1)) / tmemclk;
- DP (printf
+ debug
("Minimum Row Active -To- Row Active Delay [ns]: %d.%2d = in Clk cycles %d\n",
- leftOfPoint, rightOfPoint, trp_clocks));
+ leftOfPoint, rightOfPoint, trp_clocks);
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
@@ -1021,12 +1009,9 @@ return 0;
rightOfPoint = (data[i] & maskRightOfPoint) * 25;
dimmInfo->minRowActiveRowActiveDelay = ((leftOfPoint * 100) + rightOfPoint); /* measured in 100ns Intervals */
- trcd_clocks =
- (dimmInfo->minRowActiveRowActiveDelay +
- (tmemclk - 1)) / tmemclk;
- DP (printf
+ debug
("Minimum Ras-To-Cas Delay [ns]: %d.%2d = in Clk cycles %d\n",
- leftOfPoint, rightOfPoint, trp_clocks));
+ leftOfPoint, rightOfPoint, trp_clocks);
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
@@ -1035,41 +1020,41 @@ return 0;
tras_clocks =
(NSto10PS (data[i]) +
(tmemclk - 1)) / tmemclk;
- DP (printf
+ debug
("Minimum Ras Pulse Width [ns]: %d = in Clk cycles %d\n",
- dimmInfo->minRasPulseWidth, tras_clocks));
+ dimmInfo->minRasPulseWidth, tras_clocks);
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
case 31: /* Module Bank Density */
dimmInfo->moduleBankDensity = data[i];
- DP (printf
+ debug
("Module Bank Density: %d\n",
- dimmInfo->moduleBankDensity));
+ 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;
/*------------------------------------------------------------------------------------------------------------------------------*/
@@ -1095,9 +1080,9 @@ return 0;
}
dimmInfo->addrAndCommandSetupTime =
(leftOfPoint * 100 + rightOfPoint) * sign;
- DP (printf
+ debug
("Address And Command Setup Time [ns]: %d.%d\n",
- sign * leftOfPoint, rightOfPoint));
+ sign * leftOfPoint, rightOfPoint);
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
@@ -1122,9 +1107,9 @@ return 0;
}
dimmInfo->addrAndCommandHoldTime =
(leftOfPoint * 100 + rightOfPoint) * sign;
- DP (printf
+ debug
("Address And Command Hold Time [ns]: %d.%d\n",
- sign * leftOfPoint, rightOfPoint));
+ sign * leftOfPoint, rightOfPoint);
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
@@ -1149,9 +1134,9 @@ return 0;
}
dimmInfo->dataInputSetupTime =
(leftOfPoint * 100 + rightOfPoint) * sign;
- DP (printf
+ debug
("Data Input Setup Time [ns]: %d.%d\n",
- sign * leftOfPoint, rightOfPoint));
+ sign * leftOfPoint, rightOfPoint);
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
@@ -1176,9 +1161,9 @@ return 0;
}
dimmInfo->dataInputHoldTime =
(leftOfPoint * 100 + rightOfPoint) * sign;
- DP (printf
+ debug
("Data Input Hold Time [ns]: %d.%d\n\n",
- sign * leftOfPoint, rightOfPoint));
+ sign * leftOfPoint, rightOfPoint);
break;
/*------------------------------------------------------------------------------------------------------------------------------*/
}
@@ -1194,8 +1179,6 @@ return 0;
dimmInfo->numberOfDevices =
(dimmInfo->dataWidth / dimmInfo->sdramWidth) *
dimmInfo->numOfModuleBanks;
- devicesForErrCheck =
- (dimmInfo->dataWidth - 64) / dimmInfo->sdramWidth;
if ((dimmInfo->errorCheckType == 0x1)
|| (dimmInfo->errorCheckType == 0x2)
|| (dimmInfo->errorCheckType == 0x3)) {
@@ -1217,7 +1200,7 @@ return 0;
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 +1219,11 @@ return 0;
cal_val = 2;
}
- DP (printf ("cal_val = %d\n", cal_val));
+ debug("cal_val = %d\n", cal_val);
/* 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;
}
@@ -1271,13 +1254,13 @@ int setup_sdram (AUX_MEM_DIMM_INFO * info)
/* 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");
}
/* SDRAM configuration */
@@ -1328,12 +1311,12 @@ int setup_sdram (AUX_MEM_DIMM_INFO * info)
hang ();
break;
}
- DP (printf ("calculated refresh interval %0x\n", sdram_config_reg));
+ debug("calculated refresh interval %0x\n", sdram_config_reg);
/* make sure the refresh value is only 14 bits */
if (sdram_config_reg > 0x1fff)
sdram_config_reg = 0x1fff;
- DP (printf ("adjusted refresh interval %0x\n", sdram_config_reg));
+ debug("adjusted refresh interval %0x\n", sdram_config_reg);
/* we want physical bank interleaving and */
/* virtual bank interleaving enabled so do nothing */
@@ -1343,30 +1326,30 @@ int setup_sdram (AUX_MEM_DIMM_INFO * info)
if (info->registeredAddrAndControlInputs == 1) {
/* it's registered DRAM, so set the reg. DRAM bit */
sdram_config_reg = sdram_config_reg | BIT17;
- DP (printf ("Enabling registered DRAM bit\n"));
+ debug("Enabling registered DRAM bit\n");
}
/* turn on DRAM ECC? */
#ifdef CONFIG_MV64460_ECC
if (info->errorCheckType == 0x2) {
/* DRAM has ECC, so turn it on */
sdram_config_reg = sdram_config_reg | BIT18;
- DP (printf ("Enabling ECC\n"));
+ debug("Enabling ECC\n");
}
#endif
/* set the data DQS pin configuration */
switch (info->sdramWidth) {
case 0x4: /* memory is x4 */
sdram_config_reg = sdram_config_reg | BIT20 | BIT21;
- DP (printf ("Data DQS pins set for 16 pins\n"));
+ debug("Data DQS pins set for 16 pins\n");
break;
case 0x8: /* memory is x8 or x16 */
case 0x10:
sdram_config_reg = sdram_config_reg | BIT21;
- DP (printf ("Data DQS pins set for 8 pins\n"));
+ debug("Data DQS pins set for 8 pins\n");
break;
case 0x20: /* memory is x32 */
/* both bits are cleared for x32 so nothing to do */
- DP (printf ("Data DQS pins set for 2 pins\n"));
+ debug("Data DQS pins set for 2 pins\n");
break;
default: /* memory width unsupported */
printf ("DRAM chip width is unknown!\n");
@@ -1392,21 +1375,21 @@ int setup_sdram (AUX_MEM_DIMM_INFO * info)
/* write the value into the SDRAM configuration register */
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 control keep open as much as I can */
GT_REG_WRITE (SDRAM_OPEN_PAGES_CONTROL, 0x0);
- DP (printf
+ debug
("sdram_open_pages_controll 0x1414: %08x\n",
- GTREGREAD (SDRAM_OPEN_PAGES_CONTROL)));
+ 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 Latency according to SPD information */
switch (info->memoryType) {
@@ -1419,7 +1402,7 @@ int setup_sdram (AUX_MEM_DIMM_INFO * info)
/* Calculate the settings for SDRAM mode and Dunit control low registers */
/* Values set according to technical bulletin TB-92 rev. c */
case DDR:
- DP (printf ("### SET-CL for DDR-RAM\n"));
+ debug("### SET-CL for DDR-RAM\n");
/* ronen db64460 - change the tmp_dunit_control_low setting!!! */
switch (info->maxClSupported_DDR) {
case DDR_CL_3:
@@ -1429,9 +1412,9 @@ int setup_sdram (AUX_MEM_DIMM_INFO * info)
tmp_dunit_control_low = 0x05110051;
else
tmp_dunit_control_low = 0x24110051;
- DP (printf
+ debug
("Max. CL is 3 CLKs 0x141c= %08lx, 0x1404 = %08lx\n",
- tmp_sdram_mode, tmp_dunit_control_low));
+ tmp_sdram_mode, tmp_dunit_control_low);
printf ("Warnning: DRAM ClkSync was never tested(db64460)!!!!!\n");
} else { /* clk sync. bypassed */
@@ -1439,9 +1422,9 @@ int setup_sdram (AUX_MEM_DIMM_INFO * info)
tmp_dunit_control_low = 0xC5000540;
else
tmp_dunit_control_low = 0xC4000540;
- DP (printf
+ debug
("Max. CL is 3 CLKs 0x141c= %08lx, 0x1404 = %08lx\n",
- tmp_sdram_mode, tmp_dunit_control_low));
+ tmp_sdram_mode, tmp_dunit_control_low);
}
break;
case DDR_CL_2_5:
@@ -1451,9 +1434,9 @@ int setup_sdram (AUX_MEM_DIMM_INFO * info)
tmp_dunit_control_low = 0x25110051;
else
tmp_dunit_control_low = 0x24110051;
- DP (printf
+ debug
("Max. CL is 2.5 CLKs 0x141c= %08lx, 0x1404 = %08lx\n",
- tmp_sdram_mode, tmp_dunit_control_low));
+ tmp_sdram_mode, tmp_dunit_control_low);
printf ("Warnning: DRAM ClkSync was never tested(db64460)!!!!!\n");
} else { /* clk sync. bypassed */
@@ -1464,9 +1447,9 @@ int setup_sdram (AUX_MEM_DIMM_INFO * info)
/* hang();1 */
} else
tmp_dunit_control_low = 0xC4000540;
- DP (printf
+ debug
("Max. CL is 2.5 CLKs 0x141c= %08lx, 0x1404 = %08lx\n",
- tmp_sdram_mode, tmp_dunit_control_low));
+ tmp_sdram_mode, tmp_dunit_control_low);
}
break;
case DDR_CL_2:
@@ -1476,9 +1459,9 @@ int setup_sdram (AUX_MEM_DIMM_INFO * info)
tmp_dunit_control_low = 0x04110051;
else
tmp_dunit_control_low = 0x03110051;
- DP (printf
+ debug
("Max. CL is 2 CLKs 0x141c= %08lx, 0x1404 = %08lx\n",
- tmp_sdram_mode, tmp_dunit_control_low));
+ tmp_sdram_mode, tmp_dunit_control_low);
printf ("Warnning: DRAM ClkSync was never tested(db64460)!!!!!\n");
} else { /* clk sync. bypassed */
@@ -1489,9 +1472,9 @@ int setup_sdram (AUX_MEM_DIMM_INFO * info)
tmp_dunit_control_low = 0xC4000540;
} else
tmp_dunit_control_low = 0xC3000540;;
- DP (printf
+ debug
("Max. CL is 2 CLKs 0x141c= %08lx, 0x1404 = %08lx\n",
- tmp_sdram_mode, tmp_dunit_control_low));
+ tmp_sdram_mode, tmp_dunit_control_low);
}
break;
case DDR_CL_1_5:
@@ -1501,9 +1484,9 @@ int setup_sdram (AUX_MEM_DIMM_INFO * info)
tmp_dunit_control_low = 0x24110051;
else
tmp_dunit_control_low = 0x23110051;
- DP (printf
+ debug
("Max. CL is 1.5 CLKs 0x141c= %08lx, 0x1404 = %08lx\n",
- tmp_sdram_mode, tmp_dunit_control_low));
+ tmp_sdram_mode, tmp_dunit_control_low);
printf ("Warnning: DRAM ClkSync was never tested(db64460)!!!!!\n");
} else { /* clk sync. bypassed */
@@ -1514,9 +1497,9 @@ int setup_sdram (AUX_MEM_DIMM_INFO * info)
tmp_dunit_control_low = 0xC4000540;
} else
tmp_dunit_control_low = 0xC3000540;
- DP (printf
+ debug
("Max. CL is 1.5 CLKs 0x141c= %08lx, 0x1404 = %08lx\n",
- tmp_sdram_mode, tmp_dunit_control_low));
+ tmp_sdram_mode, tmp_dunit_control_low);
}
break;
@@ -1536,8 +1519,8 @@ 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 0x1418 after SDRAM_MODE: Module still busy ... please wait... ***\n"));
+ debug
+ ("\n*** SDRAM_OPERATION 0x1418 after SDRAM_MODE: Module still busy ... please wait... ***\n");
}
/* SDRAM D_UNIT_CONTROL_LOW 0x1404 */
@@ -1546,8 +1529,8 @@ 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");
}
/*------------------------------------------------------------------------------ */
@@ -1557,29 +1540,29 @@ int setup_sdram (AUX_MEM_DIMM_INFO * info)
/* program this with the default value */
tmp = 0x02; /* power-up default address select decoding value */
- DP (printf ("drb_size (n*64Mbit): %d\n", info->drb_size));
+ debug("drb_size (n*64Mbit): %d\n", info->drb_size);
/* figure out the DRAM chip size */
sdram_chip_size =
(1 << (info->numOfRowAddresses + info->numOfColAddresses));
sdram_chip_size *= info->sdramWidth;
sdram_chip_size *= 4;
- DP (printf ("computed sdram chip size is %#lx\n", sdram_chip_size));
+ debug("computed sdram chip size is %#lx\n", sdram_chip_size);
/* divide sdram chip size by 64 Mbits */
sdram_chip_size = sdram_chip_size / 0x4000000;
switch (sdram_chip_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:
@@ -1590,15 +1573,15 @@ int setup_sdram (AUX_MEM_DIMM_INFO * info)
/* SDRAM address control */
GT_REG_WRITE (SDRAM_ADDR_CONTROL, tmp);
- DP (printf
+ debug
("setting up sdram address control (0x1410) with: %08lx \n",
- tmp));
+ tmp);
/* ------------------------------------------------------------------------------ */
/* same settings for registerd & non-registerd DDR SDRAM */
- DP (printf
+ debug
("setting up sdram_timing_control_low (0x1408) with: %08x \n",
- 0x01501220));
+ 0x01501220);
/*ronen db64460 */
GT_REG_WRITE (SDRAM_TIMING_CONTROL_LOW, 0x01501220);
@@ -1611,10 +1594,10 @@ int setup_sdram (AUX_MEM_DIMM_INFO * info)
if (info->registeredAddrAndControlInputs
|| info->registeredDQMBinputs) {
tmp |= (1 << 17);
- DP (printf
+ 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
@@ -1624,29 +1607,29 @@ indent: Standard input:1465: Warning:old style assignment ambiguity in "=*". As
4460 */
tmp |= (1 << 26);
- DP (printf
+ debug
("Before Buffer assignment - sdram_conf (0x1400): %08x\n",
- GTREGREAD (SDRAM_CONFIG)));
- DP (printf
+ GTREGREAD (SDRAM_CONFIG));
+ debug
("After Buffer assignment - sdram_conf (0x1400): %08x\n",
- GTREGREAD (SDRAM_CONFIG)));
+ GTREGREAD (SDRAM_CONFIG));
/* SDRAM timing To_do: */
/* ------------------------------------------------------------------------------ */
/* ronen db64460 */
- DP (printf
+ debug
("setting up sdram_timing_control_high (0x140c) with: %08x \n",
- 0xc));
+ 0xc);
GT_REG_WRITE (SDRAM_TIMING_CONTROL_HIGH, 0xc);
- DP (printf
+ debug
("setting up sdram address pads control (0x14c0) with: %08x \n",
- 0x7d5014a));
+ 0x7d5014a);
GT_REG_WRITE (SDRAM_ADDR_CTRL_PADS_CALIBRATION, 0x7d5014a);
- DP (printf
+ debug
("setting up sdram data pads control (0x14c4) with: %08x \n",
- 0x7d5014a));
+ 0x7d5014a);
GT_REG_WRITE (SDRAM_DATA_PADS_CALIBRATION, 0x7d5014a);
/* ------------------------------------------------------------------------------ */
@@ -1656,8 +1639,8 @@ indent: Standard input:1465: Warning:old style assignment ambiguity in "=*". As
/* for (i = info->slot * 2; i < ((info->slot * 2) + info->banks); i++) */
{
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);
@@ -1665,17 +1648,17 @@ indent: Standard input:1465: Warning:old style assignment ambiguity in "=*". As
/* set SDRAM mode */ /* To_do check it */
GT_REG_WRITE (SDRAM_OPERATION, 0x3);
check = GTREGREAD (SDRAM_OPERATION);
- DP (printf
+ debug
("\n*** SDRAM_OPERATION 1418 (0 = Normal Operation) = %08lx ***\n",
- check));
+ check);
/* switch back to normal operation mode */
GT_REG_WRITE (SDRAM_OPERATION, 0);
check = GTREGREAD (SDRAM_OPERATION);
- DP (printf
+ debug
("\n*** SDRAM_OPERATION 1418 (0 = Normal Operation) = %08lx ***\n",
- check));
+ check);
/* unmap the bank */
memory_map_bank (i, 0, 0);
@@ -1721,9 +1704,9 @@ long int dram_size (long int *base, long int maxsize)
*b = save2;
if (val != cnt) {
- DP (printf
+ debug
("Found %08x at Address %08x (failure)\n",
- (unsigned int) val, (unsigned int) addr));
+ (unsigned int) val, (unsigned int) addr);
/* fix boundary condition.. STARTVAL means zero */
if (cnt == STARTVAL / sizeof (long))
cnt = 0;
@@ -1739,9 +1722,8 @@ long int dram_size (long int *base, long int maxsize)
* controlling logic happens */
phys_size_t initdram (int board_type)
{
- int s0 = 0, s1 = 0;
int checkbank[4] = {[0 ... 3] = 0 };
- ulong realsize, total, check;
+ ulong realsize, total;
AUX_MEM_DIMM_INFO dimmInfo1;
AUX_MEM_DIMM_INFO dimmInfo2;
int nhr, bank_no;
@@ -1756,10 +1738,10 @@ phys_size_t initdram (int board_type)
printf ("Skipping SD- DDRRAM setup due to NHR bit being set\n");
} else {
/* DIMM0 */
- s0 = check_dimm (0, &dimmInfo1);
+ check_dimm (0, &dimmInfo1);
/* DIMM1 */
- s1 = check_dimm (1, &dimmInfo2);
+ check_dimm (1, &dimmInfo2);
memory_map_bank (0, 0, 0);
memory_map_bank (1, 0, 0);
@@ -1793,7 +1775,6 @@ phys_size_t initdram (int board_type)
/* next, size the SDRAM banks */
realsize = total = 0;
- check = GB / 4;
if (dimmInfo1.numOfModuleBanks > 0) {
checkbank[0] = 1;
}
--
1.7.6.4
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [U-Boot] [PATCH 07/14] board/sandburst/common/flash.c: Fix GCC 4.6 build warning
2011-11-30 8:17 [U-Boot] [PATCH 00/14] More fixes GCC 4.6 build warnings Wolfgang Denk
` (5 preceding siblings ...)
2011-11-30 8:17 ` [U-Boot] [PATCH 06/14] DB64460: " Wolfgang Denk
@ 2011-11-30 8:17 ` Wolfgang Denk
2011-12-01 22:11 ` Marek Vasut
2011-12-01 23:12 ` Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 08/14] drivers/usb/host/sl811-hcd.c: " Wolfgang Denk
` (6 subsequent siblings)
13 siblings, 2 replies; 41+ messages in thread
From: Wolfgang Denk @ 2011-11-30 8:17 UTC (permalink / raw)
To: u-boot
Fix:
../common/flash.c: In function 'flash_erase':
../common/flash.c:307:24: warning: variable 'l_sect' set but not used
[-Wunused-but-set-variable]
Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Travis Sawyer <travis.sawyer@sandburst.com>
---
total: 0 errors, 0 warnings, 23 lines checked
NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
board/sandburst/common/flash.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/board/sandburst/common/flash.c b/board/sandburst/common/flash.c
index c65cb96..818a7c3 100644
--- a/board/sandburst/common/flash.c
+++ b/board/sandburst/common/flash.c
@@ -304,7 +304,7 @@ int flash_erase (flash_info_t *info, int s_first, int s_last)
{
volatile FLASH_WORD_SIZE *addr = (FLASH_WORD_SIZE *)(info->start[0]);
volatile FLASH_WORD_SIZE *addr2;
- int flag, prot, sect, l_sect;
+ int flag, prot, sect;
int i;
if ((s_first < 0) || (s_first > s_last)) {
@@ -335,8 +335,6 @@ int flash_erase (flash_info_t *info, int s_first, int s_last)
printf ("\n");
}
- l_sect = -1;
-
/* Disable interrupts which might cause a timeout here */
flag = disable_interrupts();
@@ -363,7 +361,6 @@ int flash_erase (flash_info_t *info, int s_first, int s_last)
addr[ADDR1] = (FLASH_WORD_SIZE)0x00550055;
addr2[0] = (FLASH_WORD_SIZE)0x00300030; /* sector erase */
}
- l_sect = sect;
/*
* Wait for each sector to complete, it's more
* reliable. According to AMD Spec, you must
--
1.7.6.4
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [U-Boot] [PATCH 08/14] drivers/usb/host/sl811-hcd.c: Fix GCC 4.6 build warning
2011-11-30 8:17 [U-Boot] [PATCH 00/14] More fixes GCC 4.6 build warnings Wolfgang Denk
` (6 preceding siblings ...)
2011-11-30 8:17 ` [U-Boot] [PATCH 07/14] board/sandburst/common/flash.c: Fix GCC 4.6 build warning Wolfgang Denk
@ 2011-11-30 8:17 ` Wolfgang Denk
2011-12-01 22:13 ` Marek Vasut
2011-12-01 23:14 ` Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 09/14] post/board/lwmon5/gdc.c: " Wolfgang Denk
` (5 subsequent siblings)
13 siblings, 2 replies; 41+ messages in thread
From: Wolfgang Denk @ 2011-11-30 8:17 UTC (permalink / raw)
To: u-boot
Fix:
sl811-hcd.c: In function 'sl811_rh_submit_urb':
sl811-hcd.c:556:8: warning: variable 'wIndex' set but not used
[-Wunused-but-set-variable]
Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Remy Bohmer <linux@bohmer.net>
---
WARNING: space prohibited between function name and open parenthesis '('
#31: FILE: drivers/usb/host/sl811-hcd.c:554:
+ __u16 wValue = le16_to_cpu (cmd->value);
WARNING: space prohibited between function name and open parenthesis '('
#32: FILE: drivers/usb/host/sl811-hcd.c:555:
+ __u16 wLength = le16_to_cpu (cmd->length);
WARNING: space prohibited between function name and open parenthesis '('
#34: FILE: drivers/usb/host/sl811-hcd.c:557:
+ __u16 wIndex = le16_to_cpu (cmd->index);
total: 0 errors, 3 warnings, 25 lines checked
NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
Warnings ignored. No further cleanup attempted.
drivers/usb/host/sl811-hcd.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c
index c713d42..bb27dd5 100644
--- a/drivers/usb/host/sl811-hcd.c
+++ b/drivers/usb/host/sl811-hcd.c
@@ -550,11 +550,12 @@ static int sl811_rh_submit_urb(struct usb_device *usb_dev, unsigned long pipe,
__u8 *bufp = data_buf;
int len = 0;
int status = 0;
-
__u16 bmRType_bReq;
- __u16 wValue;
- __u16 wIndex;
- __u16 wLength;
+ __u16 wValue = le16_to_cpu (cmd->value);
+ __u16 wLength = le16_to_cpu (cmd->length);
+#ifdef SL811_DEBUG
+ __u16 wIndex = le16_to_cpu (cmd->index);
+#endif
if (usb_pipeint(pipe)) {
PDEBUG(0, "interrupt transfer unimplemented!\n");
@@ -562,9 +563,6 @@ static int sl811_rh_submit_urb(struct usb_device *usb_dev, unsigned long pipe,
}
bmRType_bReq = cmd->requesttype | (cmd->request << 8);
- wValue = le16_to_cpu (cmd->value);
- wIndex = le16_to_cpu (cmd->index);
- wLength = le16_to_cpu (cmd->length);
PDEBUG(5, "submit rh urb, req = %d(%x) val = %#x index = %#x len=%d\n",
bmRType_bReq, bmRType_bReq, wValue, wIndex, wLength);
--
1.7.6.4
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [U-Boot] [PATCH 09/14] post/board/lwmon5/gdc.c: Fix GCC 4.6 build warning
2011-11-30 8:17 [U-Boot] [PATCH 00/14] More fixes GCC 4.6 build warnings Wolfgang Denk
` (7 preceding siblings ...)
2011-11-30 8:17 ` [U-Boot] [PATCH 08/14] drivers/usb/host/sl811-hcd.c: " Wolfgang Denk
@ 2011-11-30 8:17 ` Wolfgang Denk
2011-12-01 8:55 ` Stefan Roese
2011-12-01 23:14 ` Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 10/14] board/mpl/common/flash.c: " Wolfgang Denk
` (4 subsequent siblings)
13 siblings, 2 replies; 41+ messages in thread
From: Wolfgang Denk @ 2011-11-30 8:17 UTC (permalink / raw)
To: u-boot
Fix:
gdc.c: In function 'gdc_test_reg_one':
gdc.c:66:6: warning: variable 'ret' set but not used
[-Wunused-but-set-variable]
Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Stefan Roese <sr@denx.de>
---
total: 0 errors, 0 warnings, 14 lines checked
NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
post/board/lwmon5/gdc.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/post/board/lwmon5/gdc.c b/post/board/lwmon5/gdc.c
index 719194b..6bbd2c2 100644
--- a/post/board/lwmon5/gdc.c
+++ b/post/board/lwmon5/gdc.c
@@ -63,13 +63,12 @@ const static unsigned long otherpattern = 0x01234567;
/* test write/read og a given LIME Register */
static int gdc_test_reg_one(uint value)
{
- int ret;
uint read_value;
/* write test pattern */
out_be32((void *)GDC_SCRATCH_REG, value);
/* read other location (protect against data lines capacity) */
- ret = in_be32((void *)GDC_RAM_START);
+ in_be32((void *)GDC_RAM_START);
/* verify test pattern */
read_value = in_be32((void *)GDC_SCRATCH_REG);
if (read_value != value) {
--
1.7.6.4
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [U-Boot] [PATCH 10/14] board/mpl/common/flash.c: Fix GCC 4.6 build warning
2011-11-30 8:17 [U-Boot] [PATCH 00/14] More fixes GCC 4.6 build warnings Wolfgang Denk
` (8 preceding siblings ...)
2011-11-30 8:17 ` [U-Boot] [PATCH 09/14] post/board/lwmon5/gdc.c: " Wolfgang Denk
@ 2011-11-30 8:17 ` Wolfgang Denk
2011-12-01 22:14 ` Marek Vasut
2011-12-01 23:16 ` Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 11/14] board/freescale/mpc8610hpcd/mpc8610hpcd.c: " Wolfgang Denk
` (3 subsequent siblings)
13 siblings, 2 replies; 41+ messages in thread
From: Wolfgang Denk @ 2011-11-30 8:17 UTC (permalink / raw)
To: u-boot
Fix:
../common/flash.c: In function 'flash_init':
../common/flash.c:160:16: warning: variable 'size_b1' set but not used
[-Wunused-but-set-variable]
Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Denis Peter <d.peter@mpl.ch>
---
ERROR: space required after that ',' (ctx:VxV)
#26: FILE: board/mpl/common/flash.c:160:
+ unsigned long flashcr,size_reg;
^
total: 1 errors, 0 warnings, 15 lines checked
NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
Error ignored. No further cleanup attempted.
board/mpl/common/flash.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/board/mpl/common/flash.c b/board/mpl/common/flash.c
index 81d7271..d5b63c0 100644
--- a/board/mpl/common/flash.c
+++ b/board/mpl/common/flash.c
@@ -157,7 +157,7 @@ unsigned long flash_init (void)
int i;
#if !defined(CONFIG_PATI)
- unsigned long size_b1,flashcr,size_reg;
+ unsigned long flashcr,size_reg;
int mode;
extern char version_string;
char *p = &version_string;
@@ -197,7 +197,6 @@ unsigned long flash_init (void)
#if !defined(CONFIG_PATI)
/* protect reset vector */
flash_info[0].protect[flash_info[0].sector_count-1] = 1;
- size_b1 = 0 ;
flash_info[0].size = size_b0;
/* set up flash cs according to the size */
size_reg=(flash_info[0].size >>20);
--
1.7.6.4
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [U-Boot] [PATCH 11/14] board/freescale/mpc8610hpcd/mpc8610hpcd.c: Fix GCC 4.6 build warning
2011-11-30 8:17 [U-Boot] [PATCH 00/14] More fixes GCC 4.6 build warnings Wolfgang Denk
` (9 preceding siblings ...)
2011-11-30 8:17 ` [U-Boot] [PATCH 10/14] board/mpl/common/flash.c: " Wolfgang Denk
@ 2011-11-30 8:17 ` Wolfgang Denk
2011-11-30 13:55 ` Kumar Gala
2011-12-01 23:16 ` Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 12/14] arch/powerpc/cpu/mpc86xx/cpu.c: " Wolfgang Denk
` (2 subsequent siblings)
13 siblings, 2 replies; 41+ messages in thread
From: Wolfgang Denk @ 2011-11-30 8:17 UTC (permalink / raw)
To: u-boot
Fix:
mpc8610hpcd.c: In function 'pci_init_board':
mpc8610hpcd.c:238:15: warning: variable 'pordevsr' set but not used
[-Wunused-but-set-variable]
Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Kumar Gala <galak@kernel.crashing.org>
---
total: 0 errors, 0 warnings, 13 lines checked
NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
board/freescale/mpc8610hpcd/mpc8610hpcd.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/board/freescale/mpc8610hpcd/mpc8610hpcd.c b/board/freescale/mpc8610hpcd/mpc8610hpcd.c
index 5b3b560..2bcd5e6 100644
--- a/board/freescale/mpc8610hpcd/mpc8610hpcd.c
+++ b/board/freescale/mpc8610hpcd/mpc8610hpcd.c
@@ -235,12 +235,11 @@ void pci_init_board(void)
volatile immap_t *immap = (immap_t *) CONFIG_SYS_CCSRBAR;
volatile ccsr_gur_t *gur = &immap->im_gur;
struct fsl_pci_info pci_info;
- u32 devdisr, pordevsr;
+ u32 devdisr;
int first_free_busno;
int pci_agent;
devdisr = in_be32(&gur->devdisr);
- pordevsr = in_be32(&gur->pordevsr);
first_free_busno = fsl_pcie_init_board(0);
--
1.7.6.4
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [U-Boot] [PATCH 12/14] arch/powerpc/cpu/mpc86xx/cpu.c: Fix GCC 4.6 build warning
2011-11-30 8:17 [U-Boot] [PATCH 00/14] More fixes GCC 4.6 build warnings Wolfgang Denk
` (10 preceding siblings ...)
2011-11-30 8:17 ` [U-Boot] [PATCH 11/14] board/freescale/mpc8610hpcd/mpc8610hpcd.c: " Wolfgang Denk
@ 2011-11-30 8:17 ` Wolfgang Denk
2011-11-30 13:55 ` Kumar Gala
2011-12-01 23:16 ` Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 13/14] board/sbc405/strataflash.c: " Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 14/14] board/emk/top860/top860.c: " Wolfgang Denk
13 siblings, 2 replies; 41+ messages in thread
From: Wolfgang Denk @ 2011-11-30 8:17 UTC (permalink / raw)
To: u-boot
Fix:
cpu.c: In function 'checkcpu':
cpu.c:51:7: warning: variable 'ver' set but not used
[-Wunused-but-set-variable]
Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Kumar Gala <galak@kernel.crashing.org>
---
total: 0 errors, 0 warnings, 21 lines checked
NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
arch/powerpc/cpu/mpc86xx/cpu.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/cpu/mpc86xx/cpu.c b/arch/powerpc/cpu/mpc86xx/cpu.c
index ffcc8e6..d2c8c78 100644
--- a/arch/powerpc/cpu/mpc86xx/cpu.c
+++ b/arch/powerpc/cpu/mpc86xx/cpu.c
@@ -48,7 +48,6 @@ checkcpu(void)
{
sys_info_t sysinfo;
uint pvr, svr;
- uint ver;
uint major, minor;
char buf1[32], buf2[32];
volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
@@ -57,7 +56,6 @@ checkcpu(void)
uint msscr0 = mfspr(MSSCR0);
svr = get_svr();
- ver = SVR_SOC_VER(svr);
major = SVR_MAJ(svr);
minor = SVR_MIN(svr);
@@ -77,7 +75,6 @@ checkcpu(void)
puts("Core: ");
pvr = get_pvr();
- ver = PVR_E600_VER(pvr);
major = PVR_E600_MAJ(pvr);
minor = PVR_E600_MIN(pvr);
--
1.7.6.4
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [U-Boot] [PATCH 13/14] board/sbc405/strataflash.c: Fix GCC 4.6 build warning
2011-11-30 8:17 [U-Boot] [PATCH 00/14] More fixes GCC 4.6 build warnings Wolfgang Denk
` (11 preceding siblings ...)
2011-11-30 8:17 ` [U-Boot] [PATCH 12/14] arch/powerpc/cpu/mpc86xx/cpu.c: " Wolfgang Denk
@ 2011-11-30 8:17 ` Wolfgang Denk
2011-12-01 22:14 ` Marek Vasut
2011-12-01 23:17 ` Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 14/14] board/emk/top860/top860.c: " Wolfgang Denk
13 siblings, 2 replies; 41+ messages in thread
From: Wolfgang Denk @ 2011-11-30 8:17 UTC (permalink / raw)
To: u-boot
Fix:
strataflash.c: In function 'flash_write_cfiword':
strataflash.c:673:11: warning: variable 'ctladdr' set but not used
[-Wunused-but-set-variable]
Signed-off-by: Wolfgang Denk <wd@denx.de>
---
total: 0 errors, 0 warnings, 14 lines checked
NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
board/sbc405/strataflash.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/board/sbc405/strataflash.c b/board/sbc405/strataflash.c
index e5863d6..b0d3c6c 100644
--- a/board/sbc405/strataflash.c
+++ b/board/sbc405/strataflash.c
@@ -670,14 +670,11 @@ static ulong flash_get_size (ulong base, int banknum)
static int flash_write_cfiword (flash_info_t *info, ulong dest, cfiword_t cword)
{
- cfiptr_t ctladdr;
cfiptr_t cptr;
int flag;
- ctladdr.cp = flash_make_addr(info, 0, 0);
cptr.cp = (uchar *)dest;
-
/* Check if Flash is (sufficiently) erased */
switch(info->portwidth) {
case FLASH_CFI_8BIT:
--
1.7.6.4
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [U-Boot] [PATCH 14/14] board/emk/top860/top860.c: Fix GCC 4.6 build warning
2011-11-30 8:17 [U-Boot] [PATCH 00/14] More fixes GCC 4.6 build warnings Wolfgang Denk
` (12 preceding siblings ...)
2011-11-30 8:17 ` [U-Boot] [PATCH 13/14] board/sbc405/strataflash.c: " Wolfgang Denk
@ 2011-11-30 8:17 ` Wolfgang Denk
2011-12-01 23:17 ` Wolfgang Denk
13 siblings, 1 reply; 41+ messages in thread
From: Wolfgang Denk @ 2011-11-30 8:17 UTC (permalink / raw)
To: u-boot
Fix:
top860.c: In function 'initdram':
top860.c:90:11: warning: variable 'j' set but not used
[-Wunused-but-set-variable]
Note: No attempts were made to convert this file completely to using
I/O accessors. This is left as an exercise for the board maintainer.
Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Reinhard Meyer <reinhard.meyer@emk-elektronik.de>
---
total: 0 errors, 0 warnings, 25 lines checked
NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
board/emk/top860/top860.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/board/emk/top860/top860.c b/board/emk/top860/top860.c
index 76f7a0c..4df7f0e 100644
--- a/board/emk/top860/top860.c
+++ b/board/emk/top860/top860.c
@@ -34,6 +34,7 @@
#include <common.h>
#include <commproc.h>
#include <mpc8xx.h>
+#include <asm/io.h>
/*****************************************************************************
* UPM table for 60ns EDO RAM at 25 MHz bus/external clock
@@ -87,7 +88,7 @@ phys_size_t initdram (int board_type)
*/
if ((ulong) initdram & 0xff000000) {
volatile uint *addr1, *addr2;
- uint i, j;
+ uint i;
upmconfig (UPMA, (uint *) edo_60ns_25MHz_tbl,
sizeof (edo_60ns_25MHz_tbl) / sizeof (uint));
@@ -100,8 +101,8 @@ phys_size_t initdram (int board_type)
*/
addr1 = (volatile uint *) 0;
addr2 = (volatile uint *) 0x00400000;
- for (i = 0, j = 0; i < 8; i++)
- j = addr1[0];
+ for (i = 0; i < 8; i++)
+ in_be32(addr1);
/*
* Now check whether we got 4MB or 16MB populated
--
1.7.6.4
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [U-Boot] [PATCH 12/14] arch/powerpc/cpu/mpc86xx/cpu.c: Fix GCC 4.6 build warning
2011-11-30 8:17 ` [U-Boot] [PATCH 12/14] arch/powerpc/cpu/mpc86xx/cpu.c: " Wolfgang Denk
@ 2011-11-30 13:55 ` Kumar Gala
2011-12-01 23:16 ` Wolfgang Denk
1 sibling, 0 replies; 41+ messages in thread
From: Kumar Gala @ 2011-11-30 13:55 UTC (permalink / raw)
To: u-boot
On Nov 30, 2011, at 2:17 AM, Wolfgang Denk wrote:
> Fix:
> cpu.c: In function 'checkcpu':
> cpu.c:51:7: warning: variable 'ver' set but not used
> [-Wunused-but-set-variable]
>
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Kumar Gala <galak@kernel.crashing.org>
> ---
> total: 0 errors, 0 warnings, 21 lines checked
> NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
Acked-by: Kumar Gala <galak@kernel.crashing.org>
- k
^ permalink raw reply [flat|nested] 41+ messages in thread
* [U-Boot] [PATCH 11/14] board/freescale/mpc8610hpcd/mpc8610hpcd.c: Fix GCC 4.6 build warning
2011-11-30 8:17 ` [U-Boot] [PATCH 11/14] board/freescale/mpc8610hpcd/mpc8610hpcd.c: " Wolfgang Denk
@ 2011-11-30 13:55 ` Kumar Gala
2011-12-01 23:16 ` Wolfgang Denk
1 sibling, 0 replies; 41+ messages in thread
From: Kumar Gala @ 2011-11-30 13:55 UTC (permalink / raw)
To: u-boot
On Nov 30, 2011, at 2:17 AM, Wolfgang Denk wrote:
> Fix:
> mpc8610hpcd.c: In function 'pci_init_board':
> mpc8610hpcd.c:238:15: warning: variable 'pordevsr' set but not used
> [-Wunused-but-set-variable]
>
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Kumar Gala <galak@kernel.crashing.org>
> ---
> total: 0 errors, 0 warnings, 13 lines checked
> NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
>
> board/freescale/mpc8610hpcd/mpc8610hpcd.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
Acked-by: Kumar Gala <galak@kernel.crashing.org>
- k
^ permalink raw reply [flat|nested] 41+ messages in thread
* [U-Boot] [PATCH 01/14] alpr board: Fix GCC 4.6 build warnings
2011-11-30 8:17 ` [U-Boot] [PATCH 01/14] alpr board: Fix " Wolfgang Denk
@ 2011-12-01 8:55 ` Stefan Roese
2011-12-01 23:09 ` Wolfgang Denk
1 sibling, 0 replies; 41+ messages in thread
From: Stefan Roese @ 2011-12-01 8:55 UTC (permalink / raw)
To: u-boot
On Wednesday 30 November 2011 09:17:44 Wolfgang Denk wrote:
> Fix:
> fpga.c: In function 'fpga_pre_fn':
> fpga.c:88:16: warning: variable 'reg' set but not used
> [-Wunused-but-set-variable]
> nand.c: In function 'alpr_nand_dev_ready':
> nand.c:125:18: warning: variable 'val' set but not used
> [-Wunused-but-set-variable]
>
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Stefan Roese <sr@denx.de>
Thanks.
Acked-by: Stefan Roese <sr@denx.de>
Best regards,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
^ permalink raw reply [flat|nested] 41+ messages in thread
* [U-Boot] [PATCH 09/14] post/board/lwmon5/gdc.c: Fix GCC 4.6 build warning
2011-11-30 8:17 ` [U-Boot] [PATCH 09/14] post/board/lwmon5/gdc.c: " Wolfgang Denk
@ 2011-12-01 8:55 ` Stefan Roese
2011-12-01 23:14 ` Wolfgang Denk
1 sibling, 0 replies; 41+ messages in thread
From: Stefan Roese @ 2011-12-01 8:55 UTC (permalink / raw)
To: u-boot
On Wednesday 30 November 2011 09:17:52 Wolfgang Denk wrote:
> Fix:
> gdc.c: In function 'gdc_test_reg_one':
> gdc.c:66:6: warning: variable 'ret' set but not used
> [-Wunused-but-set-variable]
>
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Stefan Roese <sr@denx.de>
Thanks.
Acked-by: Stefan Roese <sr@denx.de>
Best regards,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
^ permalink raw reply [flat|nested] 41+ messages in thread
* [U-Boot] [PATCH 02/14] board/amirix/ap1000/flash.c: Fix GCC 4.6 build warning
2011-11-30 8:17 ` [U-Boot] [PATCH 02/14] board/amirix/ap1000/flash.c: Fix GCC 4.6 build warning Wolfgang Denk
@ 2011-12-01 22:10 ` Marek Vasut
2011-12-01 23:10 ` Wolfgang Denk
1 sibling, 0 replies; 41+ messages in thread
From: Marek Vasut @ 2011-12-01 22:10 UTC (permalink / raw)
To: u-boot
> Fix:
> flash.c: In function 'flash_write_cfiword':
> flash.c:778:11: warning: variable 'ctladdr' set but not used
> [-Wunused-but-set-variable]
>
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> ---
> total: 0 errors, 0 warnings, 12 lines checked
> NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX
> MULTISTATEMENT_MACRO_USE_DO_WHILE
>
> board/amirix/ap1000/flash.c | 3 ---
> 1 files changed, 0 insertions(+), 3 deletions(-)
>
> diff --git a/board/amirix/ap1000/flash.c b/board/amirix/ap1000/flash.c
> index 1e742e5..bf8877e 100644
> --- a/board/amirix/ap1000/flash.c
> +++ b/board/amirix/ap1000/flash.c
> @@ -774,12 +774,9 @@ static ulong flash_get_size (ulong base, int banknum)
> static int flash_write_cfiword (flash_info_t * info, ulong dest,
> cfiword_t cword)
> {
> -
> - cfiptr_t ctladdr;
> cfiptr_t cptr;
> int flag;
>
> - ctladdr.cp = flash_make_addr (info, 0, 0);
> cptr.cp = (uchar *) dest;
>
> /* Check if Flash is (sufficiently) erased */
Logically looks OK
Acked-by: Marek Vasut <marek.vasut@gmail.com>
^ permalink raw reply [flat|nested] 41+ messages in thread
* [U-Boot] [PATCH 04/14] board/cray/L1/flash.c: Fix GCC 4.6 build warning
2011-11-30 8:17 ` [U-Boot] [PATCH 04/14] board/cray/L1/flash.c: " Wolfgang Denk
@ 2011-12-01 22:10 ` Marek Vasut
2011-12-01 23:11 ` Wolfgang Denk
1 sibling, 0 replies; 41+ messages in thread
From: Marek Vasut @ 2011-12-01 22:10 UTC (permalink / raw)
To: u-boot
> Fix:
> flash.c: In function 'flash_erase':
> flash.c:276:24: warning: variable 'l_sect' set but not used
> [-Wunused-but-set-variable]
>
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> ---
> total: 0 errors, 0 warnings, 49 lines checked
> NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX
> MULTISTATEMENT_MACRO_USE_DO_WHILE
>
> board/cray/L1/flash.c | 25 +++++++++++--------------
> 1 files changed, 11 insertions(+), 14 deletions(-)
>
> diff --git a/board/cray/L1/flash.c b/board/cray/L1/flash.c
> index a3d893e..77a2100 100644
> --- a/board/cray/L1/flash.c
> +++ b/board/cray/L1/flash.c
> @@ -273,7 +273,7 @@ int flash_erase (flash_info_t *info, int s_first,
int
> s_last) {
> volatile FLASH_WORD_SIZE *addr = (FLASH_WORD_SIZE *)(info->start[0]);
> volatile FLASH_WORD_SIZE *addr2;
> - int flag, prot, sect, l_sect;
> + int flag, prot, sect;
>
> if ((s_first < 0) || (s_first > s_last)) {
> if (info->flash_id == FLASH_UNKNOWN) {
> @@ -303,16 +303,14 @@ int flash_erase (flash_info_t *info, int s_first,
int
> s_last) printf ("\n");
> }
>
> - l_sect = -1;
> -
> /* Disable interrupts which might cause a timeout here */
> flag = disable_interrupts();
>
> /* Start erase on unprotected sectors */
> for (sect = s_first; sect<=s_last; sect++) {
> if (info->protect[sect] == 0) { /* not protected */
> - addr2 = (FLASH_WORD_SIZE *)(info->start[sect]);
> - printf("Erasing sector %p\n", addr2);
> + addr2 = (FLASH_WORD_SIZE *)(info->start[sect]);
> + printf("Erasing sector %p\n", addr2);
>
> addr[ADDR0] = (FLASH_WORD_SIZE)0x00AA00AA;
> addr[ADDR1] = (FLASH_WORD_SIZE)0x00550055;
> @@ -320,15 +318,14 @@ int flash_erase (flash_info_t *info, int s_first,
int
> s_last) addr[ADDR0] = (FLASH_WORD_SIZE)0x00AA00AA;
> addr[ADDR1] = (FLASH_WORD_SIZE)0x00550055;
> addr2[0] = (FLASH_WORD_SIZE)0x00300030; /* sector erase
*/
> - l_sect = sect;
> - /*
> - * Wait for each sector to complete, it's more
> - * reliable. According to AMD Spec, you must
> - * issue all erase commands within a specified
> - * timeout. This has been seen to fail, especially
> - * if printf()s are included (for debug)!!
> - */
> - wait_for_DQ7(info, sect);
> + /*
> + * Wait for each sector to complete, it's more
> + * reliable. According to AMD Spec, you must
> + * issue all erase commands within a specified
> + * timeout. This has been seen to fail, especially
> + * if printf()s are included (for debug)!!
> + */
> + wait_for_DQ7(info, sect);
> }
> }
Logically looks OK
Acked-by: Marek Vasut <marek.vasut@gmail.com>
^ permalink raw reply [flat|nested] 41+ messages in thread
* [U-Boot] [PATCH 07/14] board/sandburst/common/flash.c: Fix GCC 4.6 build warning
2011-11-30 8:17 ` [U-Boot] [PATCH 07/14] board/sandburst/common/flash.c: Fix GCC 4.6 build warning Wolfgang Denk
@ 2011-12-01 22:11 ` Marek Vasut
2011-12-01 23:12 ` Wolfgang Denk
1 sibling, 0 replies; 41+ messages in thread
From: Marek Vasut @ 2011-12-01 22:11 UTC (permalink / raw)
To: u-boot
> Fix:
> ../common/flash.c: In function 'flash_erase':
> ../common/flash.c:307:24: warning: variable 'l_sect' set but not used
> [-Wunused-but-set-variable]
>
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Travis Sawyer <travis.sawyer@sandburst.com>
> ---
> total: 0 errors, 0 warnings, 23 lines checked
> NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX
> MULTISTATEMENT_MACRO_USE_DO_WHILE
>
> board/sandburst/common/flash.c | 5 +----
> 1 files changed, 1 insertions(+), 4 deletions(-)
>
> diff --git a/board/sandburst/common/flash.c
> b/board/sandburst/common/flash.c index c65cb96..818a7c3 100644
> --- a/board/sandburst/common/flash.c
> +++ b/board/sandburst/common/flash.c
> @@ -304,7 +304,7 @@ int flash_erase (flash_info_t *info, int s_first, int
> s_last) {
> volatile FLASH_WORD_SIZE *addr = (FLASH_WORD_SIZE *)(info->start[0]);
> volatile FLASH_WORD_SIZE *addr2;
> - int flag, prot, sect, l_sect;
> + int flag, prot, sect;
> int i;
>
> if ((s_first < 0) || (s_first > s_last)) {
> @@ -335,8 +335,6 @@ int flash_erase (flash_info_t *info, int s_first, int
> s_last) printf ("\n");
> }
>
> - l_sect = -1;
> -
> /* Disable interrupts which might cause a timeout here */
> flag = disable_interrupts();
>
> @@ -363,7 +361,6 @@ int flash_erase (flash_info_t *info, int s_first, int
> s_last) addr[ADDR1] = (FLASH_WORD_SIZE)0x00550055;
> addr2[0] = (FLASH_WORD_SIZE)0x00300030; /*
sector erase */
> }
> - l_sect = sect;
> /*
> * Wait for each sector to complete, it's more
> * reliable. According to AMD Spec, you must
Logically looks OK
Acked-by: Marek Vasut <marek.vasut@gmail.com>
^ permalink raw reply [flat|nested] 41+ messages in thread
* [U-Boot] [PATCH 08/14] drivers/usb/host/sl811-hcd.c: Fix GCC 4.6 build warning
2011-11-30 8:17 ` [U-Boot] [PATCH 08/14] drivers/usb/host/sl811-hcd.c: " Wolfgang Denk
@ 2011-12-01 22:13 ` Marek Vasut
2011-12-01 23:13 ` Wolfgang Denk
2011-12-01 23:14 ` Wolfgang Denk
1 sibling, 1 reply; 41+ messages in thread
From: Marek Vasut @ 2011-12-01 22:13 UTC (permalink / raw)
To: u-boot
> Fix:
> sl811-hcd.c: In function 'sl811_rh_submit_urb':
> sl811-hcd.c:556:8: warning: variable 'wIndex' set but not used
> [-Wunused-but-set-variable]
>
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Remy Bohmer <linux@bohmer.net>
> ---
I don't really understand this one (I didn't look too hard either). But I'd be
careful about this.
Also, isn't the Cc missing ? I see only To and Cc to the list in the mail
header.
M
^ permalink raw reply [flat|nested] 41+ messages in thread
* [U-Boot] [PATCH 10/14] board/mpl/common/flash.c: Fix GCC 4.6 build warning
2011-11-30 8:17 ` [U-Boot] [PATCH 10/14] board/mpl/common/flash.c: " Wolfgang Denk
@ 2011-12-01 22:14 ` Marek Vasut
2011-12-01 23:15 ` Wolfgang Denk
2011-12-01 23:16 ` Wolfgang Denk
1 sibling, 1 reply; 41+ messages in thread
From: Marek Vasut @ 2011-12-01 22:14 UTC (permalink / raw)
To: u-boot
> Fix:
> ../common/flash.c: In function 'flash_init':
> ../common/flash.c:160:16: warning: variable 'size_b1' set but not used
> [-Wunused-but-set-variable]
>
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Denis Peter <d.peter@mpl.ch>
> ---
> ERROR: space required after that ',' (ctx:VxV)
> #26: FILE: board/mpl/common/flash.c:160:
> + unsigned long flashcr,size_reg;
> ^
>
> total: 1 errors, 0 warnings, 15 lines checked
>
> NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX
> MULTISTATEMENT_MACRO_USE_DO_WHILE
>
> Error ignored. No further cleanup attempted.
>
> board/mpl/common/flash.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/board/mpl/common/flash.c b/board/mpl/common/flash.c
> index 81d7271..d5b63c0 100644
> --- a/board/mpl/common/flash.c
> +++ b/board/mpl/common/flash.c
> @@ -157,7 +157,7 @@ unsigned long flash_init (void)
> int i;
>
> #if !defined(CONFIG_PATI)
> - unsigned long size_b1,flashcr,size_reg;
> + unsigned long flashcr,size_reg;
Can you please add space after the comma (", ") ? Thank you.
> int mode;
> extern char version_string;
> char *p = &version_string;
> @@ -197,7 +197,6 @@ unsigned long flash_init (void)
> #if !defined(CONFIG_PATI)
> /* protect reset vector */
> flash_info[0].protect[flash_info[0].sector_count-1] = 1;
> - size_b1 = 0 ;
> flash_info[0].size = size_b0;
> /* set up flash cs according to the size */
> size_reg=(flash_info[0].size >>20);
Otherwise, logic looks OK
Acked-by: Marek Vasut <marek.vasut@gmail.com>
^ permalink raw reply [flat|nested] 41+ messages in thread
* [U-Boot] [PATCH 13/14] board/sbc405/strataflash.c: Fix GCC 4.6 build warning
2011-11-30 8:17 ` [U-Boot] [PATCH 13/14] board/sbc405/strataflash.c: " Wolfgang Denk
@ 2011-12-01 22:14 ` Marek Vasut
2011-12-01 23:17 ` Wolfgang Denk
1 sibling, 0 replies; 41+ messages in thread
From: Marek Vasut @ 2011-12-01 22:14 UTC (permalink / raw)
To: u-boot
> Fix:
> strataflash.c: In function 'flash_write_cfiword':
> strataflash.c:673:11: warning: variable 'ctladdr' set but not used
> [-Wunused-but-set-variable]
>
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> ---
> total: 0 errors, 0 warnings, 14 lines checked
> NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX
> MULTISTATEMENT_MACRO_USE_DO_WHILE
>
> board/sbc405/strataflash.c | 3 ---
> 1 files changed, 0 insertions(+), 3 deletions(-)
>
> diff --git a/board/sbc405/strataflash.c b/board/sbc405/strataflash.c
> index e5863d6..b0d3c6c 100644
> --- a/board/sbc405/strataflash.c
> +++ b/board/sbc405/strataflash.c
> @@ -670,14 +670,11 @@ static ulong flash_get_size (ulong base, int banknum)
> static int flash_write_cfiword (flash_info_t *info, ulong dest, cfiword_t
> cword) {
>
> - cfiptr_t ctladdr;
> cfiptr_t cptr;
> int flag;
>
> - ctladdr.cp = flash_make_addr(info, 0, 0);
> cptr.cp = (uchar *)dest;
>
> -
> /* Check if Flash is (sufficiently) erased */
> switch(info->portwidth) {
> case FLASH_CFI_8BIT:
The logic looks OK
Acked-by: Marek Vasut <marek.vasut@gmail.com>
^ permalink raw reply [flat|nested] 41+ messages in thread
* [U-Boot] [PATCH 01/14] alpr board: Fix GCC 4.6 build warnings
2011-11-30 8:17 ` [U-Boot] [PATCH 01/14] alpr board: Fix " Wolfgang Denk
2011-12-01 8:55 ` Stefan Roese
@ 2011-12-01 23:09 ` Wolfgang Denk
1 sibling, 0 replies; 41+ messages in thread
From: Wolfgang Denk @ 2011-12-01 23:09 UTC (permalink / raw)
To: u-boot
Dear Wolfgang Denk,
In message <1322641077-829-2-git-send-email-wd@denx.de> you wrote:
> Fix:
> fpga.c: In function 'fpga_pre_fn':
> fpga.c:88:16: warning: variable 'reg' set but not used
> [-Wunused-but-set-variable]
> nand.c: In function 'alpr_nand_dev_ready':
> nand.c:125:18: warning: variable 'val' set but not used
> [-Wunused-but-set-variable]
>
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Stefan Roese <sr@denx.de>
> ---
> total: 0 errors, 0 warnings, 22 lines checked
> NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
>
> board/prodrive/alpr/fpga.c | 3 ---
> board/prodrive/alpr/nand.c | 4 +---
> 2 files changed, 1 insertions(+), 6 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
You can observe a lot just by watchin'. - Yogi Berra
^ permalink raw reply [flat|nested] 41+ messages in thread
* [U-Boot] [PATCH 02/14] board/amirix/ap1000/flash.c: Fix GCC 4.6 build warning
2011-11-30 8:17 ` [U-Boot] [PATCH 02/14] board/amirix/ap1000/flash.c: Fix GCC 4.6 build warning Wolfgang Denk
2011-12-01 22:10 ` Marek Vasut
@ 2011-12-01 23:10 ` Wolfgang Denk
1 sibling, 0 replies; 41+ messages in thread
From: Wolfgang Denk @ 2011-12-01 23:10 UTC (permalink / raw)
To: u-boot
Dear Wolfgang Denk,
In message <1322641077-829-3-git-send-email-wd@denx.de> you wrote:
> Fix:
> flash.c: In function 'flash_write_cfiword':
> flash.c:778:11: warning: variable 'ctladdr' set but not used
> [-Wunused-but-set-variable]
>
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> ---
> total: 0 errors, 0 warnings, 12 lines checked
> NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
>
> board/amirix/ap1000/flash.c | 3 ---
> 1 files changed, 0 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
The only person who always got his work done by Friday
was Robinson Crusoe.
^ permalink raw reply [flat|nested] 41+ messages in thread
* [U-Boot] [PATCH 03/14] drivers/block/sata_dwc.c: Fix GCC 4.6 build warning
2011-11-30 8:17 ` [U-Boot] [PATCH 03/14] drivers/block/sata_dwc.c: " Wolfgang Denk
@ 2011-12-01 23:10 ` Wolfgang Denk
0 siblings, 0 replies; 41+ messages in thread
From: Wolfgang Denk @ 2011-12-01 23:10 UTC (permalink / raw)
To: u-boot
Dear Wolfgang Denk,
In message <1322641077-829-4-git-send-email-wd@denx.de> you wrote:
> Fix:
> sata_dwc.c: In function 'scan_sata':
> sata_dwc.c:535:38: warning: variable 'udma_mask' set but not used
> [-Wunused-but-set-variable]
>
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Kazuaki Ichinohe <kazuichi@fsi.co.jp>
> ---
> total: 0 errors, 0 warnings, 18 lines checked
> NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
>
> drivers/block/sata_dwc.c | 6 +-----
> 1 files changed, 1 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
"I've finally learned what `upward compatible' means. It means we get
to keep all our old mistakes." - Dennie van Tassel
^ permalink raw reply [flat|nested] 41+ messages in thread
* [U-Boot] [PATCH 04/14] board/cray/L1/flash.c: Fix GCC 4.6 build warning
2011-11-30 8:17 ` [U-Boot] [PATCH 04/14] board/cray/L1/flash.c: " Wolfgang Denk
2011-12-01 22:10 ` Marek Vasut
@ 2011-12-01 23:11 ` Wolfgang Denk
1 sibling, 0 replies; 41+ messages in thread
From: Wolfgang Denk @ 2011-12-01 23:11 UTC (permalink / raw)
To: u-boot
Dear Wolfgang Denk,
In message <1322641077-829-5-git-send-email-wd@denx.de> you wrote:
> Fix:
> flash.c: In function 'flash_erase':
> flash.c:276:24: warning: variable 'l_sect' set but not used
> [-Wunused-but-set-variable]
>
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> ---
> total: 0 errors, 0 warnings, 49 lines checked
> NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
>
> board/cray/L1/flash.c | 25 +++++++++++--------------
> 1 files changed, 11 insertions(+), 14 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
"I dislike companies that have a we-are-the-high-priests-of-hardware-
so-you'll-like-what-we-give-you attitude. I like commodity markets in
which iron-and-silicon hawkers know that they exist to provide fast
toys for software types like me to play with..." - Eric S. Raymond
^ permalink raw reply [flat|nested] 41+ messages in thread
* [U-Boot] [PATCH 05/14] DB64360: Fix GCC 4.6 build warnings
2011-11-30 8:17 ` [U-Boot] [PATCH 05/14] DB64360: Fix GCC 4.6 build warnings Wolfgang Denk
@ 2011-12-01 23:11 ` Wolfgang Denk
0 siblings, 0 replies; 41+ messages in thread
From: Wolfgang Denk @ 2011-12-01 23:11 UTC (permalink / raw)
To: u-boot
Dear Wolfgang Denk,
In message <1322641077-829-6-git-send-email-wd@denx.de> you wrote:
> Fix:
> db64360.c: In function 'debug_led':
> db64360.c:413:6: warning: variable 'dummy' set but not used [-Wunused-but-set-variable]
> mv_eth.c: In function 'mv64360_eth_real_open':
> mv_eth.c:424:6: warning: variable 'port_status' set but not used [-Wunused-but-set-variable]
> mv_eth.c: In function 'mv64360_eth_stop':
> mv_eth.c:642:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]
> mv_eth.c: In function 'mv64360_eth_xmit':
> mv_eth.c:718:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]
> mv_eth.c: In function 'mv64360_eth_receive':
> mv_eth.c:803:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]
> mv_eth.c: In function 'mv64360_eth_get_stats':
> mv_eth.c:902:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]
> mv_eth.c: In function 'mv64360_eth_update_stat':
> mv_eth.c:930:24: warning: variable 'dummy' set but not used [-Wunused-but-set-variable]
> mv_eth.c:929:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]
> mv_eth.c: In function 'mv64360_eth_print_stat':
> mv_eth.c:1011:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]
> mv_eth.c: In function 'eth_clear_mib_counters':
> mv_eth.c:2068:15: warning: variable 'dummy' set but not used [-Wunused-but-set-variable]
> sdram_init.c: In function 'check_dimm':
> sdram_init.c:289:50: warning: variable 'trrd_clocks' set but not used [-Wunused-but-set-variable]
> sdram_init.c:289:37: warning: variable 'tras_clocks' set but not used [-Wunused-but-set-variable]
> sdram_init.c:289:24: warning: variable 'trcd_clocks' set but not used [-Wunused-but-set-variable]
> sdram_init.c:289:8: warning: variable 'trp_clocks' set but not used [-Wunused-but-set-variable]
> sdram_init.c:279:34: warning: variable 'devicesForErrCheck' set but not used [-Wunused-but-set-variable]
> sdram_init.c: In function 'setup_sdram':
> sdram_init.c:1256:13: warning: variable 'check' set but not used [-Wunused-but-set-variable]
> sdram_init.c: In function 'initdram':
> sdram_init.c:1735:25: warning: variable 'check' set but not used [-Wunused-but-set-variable]
> sdram_init.c:1733:14: warning: variable 's1' set but not used [-Wunused-but-set-variable]
> sdram_init.c:1733:6: warning: variable 's0' set but not used [-Wunused-but-set-variable]
>
> Note: no attempt was make to clean up the mess coding style and
> other issues in sdram_init.c
>
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> ---
> WARNING: space prohibited between function name and open parenthesis '('
> WARNING: line over 80 characters
> WARNING: unnecessary whitespace before a quoted newline
> ...
> total: 0 errors, 101 warnings, 1327 lines checked
>
> NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
>
> Warnings ignored, no further cleanup attempted.
>
> board/Marvell/db64360/db64360.c | 3 +-
> board/Marvell/db64360/mv_eth.c | 33 +--
> board/Marvell/db64360/sdram_init.c | 517 +++++++++++++++++-------------------
> 3 files changed, 254 insertions(+), 299 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
In general, if you think something isn't in Perl, try it out, because
it usually is :-) - Larry Wall in <1991Jul31.174523.9447@netlabs.com>
^ permalink raw reply [flat|nested] 41+ messages in thread
* [U-Boot] [PATCH 06/14] DB64460: Fix GCC 4.6 build warnings
2011-11-30 8:17 ` [U-Boot] [PATCH 06/14] DB64460: " Wolfgang Denk
@ 2011-12-01 23:11 ` Wolfgang Denk
0 siblings, 0 replies; 41+ messages in thread
From: Wolfgang Denk @ 2011-12-01 23:11 UTC (permalink / raw)
To: u-boot
Dear Wolfgang Denk,
In message <1322641077-829-7-git-send-email-wd@denx.de> you wrote:
> Fix:
> db64460.c: In function 'debug_led':
> db64460.c:413:6: warning: variable 'dummy' set but not used [-Wunused-but-set-variable]
> mv_eth.c: In function 'mv64460_eth_real_open':
> mv_eth.c:423:6: warning: variable 'port_status' set but not used [-Wunused-but-set-variable]
> mv_eth.c: In function 'mv64460_eth_stop':
> mv_eth.c:641:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]
> mv_eth.c: In function 'mv64460_eth_xmit':
> mv_eth.c:717:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]
> mv_eth.c: In function 'mv64460_eth_receive':
> mv_eth.c:802:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]
> mv_eth.c: In function 'mv64460_eth_get_stats':
> mv_eth.c:901:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]
> mv_eth.c: In function 'mv64460_eth_update_stat':
> mv_eth.c:929:24: warning: variable 'dummy' set but not used [-Wunused-but-set-variable]
> mv_eth.c:928:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]
> mv_eth.c: In function 'mv64460_eth_print_stat':
> mv_eth.c:1010:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]
> mv_eth.c: In function 'eth_clear_mib_counters':
> mv_eth.c:2067:15: warning: variable 'dummy' set but not used [-Wunused-but-set-variable]
> sdram_init.c: In function 'check_dimm':
> sdram_init.c:289:50: warning: variable 'trrd_clocks' set but not used [-Wunused-but-set-variable]
> sdram_init.c:289:37: warning: variable 'tras_clocks' set but not used [-Wunused-but-set-variable]
> sdram_init.c:289:24: warning: variable 'trcd_clocks' set but not used [-Wunused-but-set-variable]
> sdram_init.c:289:8: warning: variable 'trp_clocks' set but not used [-Wunused-but-set-variable]
> sdram_init.c:279:34: warning: variable 'devicesForErrCheck' set but not used [-Wunused-but-set-variable]
> sdram_init.c: In function 'setup_sdram':
> sdram_init.c:1255:13: warning: variable 'check' set but not used [-Wunused-but-set-variable]
> sdram_init.c: In function 'initdram':
> sdram_init.c:1744:25: warning: variable 'check' set but not used [-Wunused-but-set-variable]
> sdram_init.c:1742:14: warning: variable 's1' set but not used [-Wunused-but-set-variable]
> sdram_init.c:1742:6: warning: variable 's0' set but not used [-Wunused-but-set-variable]
>
> Note: no attempt was make to clean up the mess coding style and
> other issues in sdram_init.c
>
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> ---
> WARNING: space prohibited between function name and open parenthesis '('
> WARNING: unnecessary whitespace before a quoted newline
> WARNING: line over 80 characters
> ...
> total: 0 errors, 117 warnings, 1335 lines checked
>
> NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
>
> Warnings ignored, no further cleanup attempted.
>
> board/Marvell/db64460/db64460.c | 3 +-
> board/Marvell/db64460/mv_eth.c | 33 +--
> board/Marvell/db64460/sdram_init.c | 515 +++++++++++++++++-------------------
> 3 files changed, 255 insertions(+), 296 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 of 1992, they're called European Economic Community fries.
^ permalink raw reply [flat|nested] 41+ messages in thread
* [U-Boot] [PATCH 07/14] board/sandburst/common/flash.c: Fix GCC 4.6 build warning
2011-11-30 8:17 ` [U-Boot] [PATCH 07/14] board/sandburst/common/flash.c: Fix GCC 4.6 build warning Wolfgang Denk
2011-12-01 22:11 ` Marek Vasut
@ 2011-12-01 23:12 ` Wolfgang Denk
1 sibling, 0 replies; 41+ messages in thread
From: Wolfgang Denk @ 2011-12-01 23:12 UTC (permalink / raw)
To: u-boot
Dear Wolfgang Denk,
In message <1322641077-829-8-git-send-email-wd@denx.de> you wrote:
> Fix:
> ../common/flash.c: In function 'flash_erase':
> ../common/flash.c:307:24: warning: variable 'l_sect' set but not used
> [-Wunused-but-set-variable]
>
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Travis Sawyer <travis.sawyer@sandburst.com>
> ---
> total: 0 errors, 0 warnings, 23 lines checked
> NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
>
> board/sandburst/common/flash.c | 5 +----
> 1 files changed, 1 insertions(+), 4 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
"In the long run, every program becomes rococo, and then rubble."
- Alan Perlis
^ permalink raw reply [flat|nested] 41+ messages in thread
* [U-Boot] [PATCH 08/14] drivers/usb/host/sl811-hcd.c: Fix GCC 4.6 build warning
2011-12-01 22:13 ` Marek Vasut
@ 2011-12-01 23:13 ` Wolfgang Denk
0 siblings, 0 replies; 41+ messages in thread
From: Wolfgang Denk @ 2011-12-01 23:13 UTC (permalink / raw)
To: u-boot
Dear Marek Vasut,
In message <201112012313.16518.marek.vasut@gmail.com> you wrote:
> > Fix:
> > sl811-hcd.c: In function 'sl811_rh_submit_urb':
> > sl811-hcd.c:556:8: warning: variable 'wIndex' set but not used
> > [-Wunused-but-set-variable]
> >
> > Signed-off-by: Wolfgang Denk <wd@denx.de>
> > Cc: Remy Bohmer <linux@bohmer.net>
> > ---
>
> I don't really understand this one (I didn't look too hard either). But I'd be
> careful about this.
Have a second look, please.
> Also, isn't the Cc missing ? I see only To and Cc to the list in the mail
> header.
Which Cc: is missing?
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 general, if you think something isn't in Perl, try it out, because
it usually is :-) - Larry Wall in <1991Jul31.174523.9447@netlabs.com>
^ permalink raw reply [flat|nested] 41+ messages in thread
* [U-Boot] [PATCH 08/14] drivers/usb/host/sl811-hcd.c: Fix GCC 4.6 build warning
2011-11-30 8:17 ` [U-Boot] [PATCH 08/14] drivers/usb/host/sl811-hcd.c: " Wolfgang Denk
2011-12-01 22:13 ` Marek Vasut
@ 2011-12-01 23:14 ` Wolfgang Denk
1 sibling, 0 replies; 41+ messages in thread
From: Wolfgang Denk @ 2011-12-01 23:14 UTC (permalink / raw)
To: u-boot
Dear Wolfgang Denk,
In message <1322641077-829-9-git-send-email-wd@denx.de> you wrote:
> Fix:
> sl811-hcd.c: In function 'sl811_rh_submit_urb':
> sl811-hcd.c:556:8: warning: variable 'wIndex' set but not used
> [-Wunused-but-set-variable]
>
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Remy Bohmer <linux@bohmer.net>
> ---
> WARNING: space prohibited between function name and open parenthesis '('
> #31: FILE: drivers/usb/host/sl811-hcd.c:554:
> + __u16 wValue = le16_to_cpu (cmd->value);
>
> WARNING: space prohibited between function name and open parenthesis '('
> #32: FILE: drivers/usb/host/sl811-hcd.c:555:
> + __u16 wLength = le16_to_cpu (cmd->length);
>
> WARNING: space prohibited between function name and open parenthesis '('
> #34: FILE: drivers/usb/host/sl811-hcd.c:557:
> + __u16 wIndex = le16_to_cpu (cmd->index);
>
> total: 0 errors, 3 warnings, 25 lines checked
>
> NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
>
> Warnings ignored. No further cleanup attempted.
>
> drivers/usb/host/sl811-hcd.c | 12 +++++-------
> 1 files changed, 5 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
While most peoples' opinions change, the conviction of their correct-
ness never does.
^ permalink raw reply [flat|nested] 41+ messages in thread
* [U-Boot] [PATCH 09/14] post/board/lwmon5/gdc.c: Fix GCC 4.6 build warning
2011-11-30 8:17 ` [U-Boot] [PATCH 09/14] post/board/lwmon5/gdc.c: " Wolfgang Denk
2011-12-01 8:55 ` Stefan Roese
@ 2011-12-01 23:14 ` Wolfgang Denk
1 sibling, 0 replies; 41+ messages in thread
From: Wolfgang Denk @ 2011-12-01 23:14 UTC (permalink / raw)
To: u-boot
Dear Wolfgang Denk,
In message <1322641077-829-10-git-send-email-wd@denx.de> you wrote:
> Fix:
> gdc.c: In function 'gdc_test_reg_one':
> gdc.c:66:6: warning: variable 'ret' set but not used
> [-Wunused-but-set-variable]
>
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Stefan Roese <sr@denx.de>
> ---
> total: 0 errors, 0 warnings, 14 lines checked
> NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
>
> post/board/lwmon5/gdc.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
Blast medicine anyway! We've learned to tie into every organ in the
human body but one. The brain! The brain is what life is all about.
-- McCoy, "The Menagerie", stardate 3012.4
^ permalink raw reply [flat|nested] 41+ messages in thread
* [U-Boot] [PATCH 10/14] board/mpl/common/flash.c: Fix GCC 4.6 build warning
2011-12-01 22:14 ` Marek Vasut
@ 2011-12-01 23:15 ` Wolfgang Denk
0 siblings, 0 replies; 41+ messages in thread
From: Wolfgang Denk @ 2011-12-01 23:15 UTC (permalink / raw)
To: u-boot
Dear Marek Vasut,
In message <201112012314.25106.marek.vasut@gmail.com> you wrote:
> > Fix:
> > ../common/flash.c: In function 'flash_init':
> > ../common/flash.c:160:16: warning: variable 'size_b1' set but not used
> > [-Wunused-but-set-variable]
> >
> > Signed-off-by: Wolfgang Denk <wd@denx.de>
> > Cc: Denis Peter <d.peter@mpl.ch>
> > ---
> > ERROR: space required after that ',' (ctx:VxV)
> > #26: FILE: board/mpl/common/flash.c:160:
> > + unsigned long flashcr,size_reg;
> > ^
> >
> > total: 1 errors, 0 warnings, 15 lines checked
> >
> > NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX
> > MULTISTATEMENT_MACRO_USE_DO_WHILE
> >
> > Error ignored. No further cleanup attempted.
...
> > - unsigned long size_b1,flashcr,size_reg;
> > + unsigned long flashcr,size_reg;
>
> Can you please add space after the comma (", ") ? Thank you.
No. I intentionally don't start cleaning up this file.
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
Q: How do you play religious roulette?
A: You stand around in a circle and blaspheme and see who gets
struck by lightning first.
^ permalink raw reply [flat|nested] 41+ messages in thread
* [U-Boot] [PATCH 10/14] board/mpl/common/flash.c: Fix GCC 4.6 build warning
2011-11-30 8:17 ` [U-Boot] [PATCH 10/14] board/mpl/common/flash.c: " Wolfgang Denk
2011-12-01 22:14 ` Marek Vasut
@ 2011-12-01 23:16 ` Wolfgang Denk
1 sibling, 0 replies; 41+ messages in thread
From: Wolfgang Denk @ 2011-12-01 23:16 UTC (permalink / raw)
To: u-boot
Dear Wolfgang Denk,
In message <1322641077-829-11-git-send-email-wd@denx.de> you wrote:
> Fix:
> ../common/flash.c: In function 'flash_init':
> ../common/flash.c:160:16: warning: variable 'size_b1' set but not used
> [-Wunused-but-set-variable]
>
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Denis Peter <d.peter@mpl.ch>
> ---
> ERROR: space required after that ',' (ctx:VxV)
> #26: FILE: board/mpl/common/flash.c:160:
> + unsigned long flashcr,size_reg;
> ^
>
> total: 1 errors, 0 warnings, 15 lines checked
>
> NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
>
> Error ignored. No further cleanup attempted.
>
> board/mpl/common/flash.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
Make it right before you make it faster.
^ permalink raw reply [flat|nested] 41+ messages in thread
* [U-Boot] [PATCH 11/14] board/freescale/mpc8610hpcd/mpc8610hpcd.c: Fix GCC 4.6 build warning
2011-11-30 8:17 ` [U-Boot] [PATCH 11/14] board/freescale/mpc8610hpcd/mpc8610hpcd.c: " Wolfgang Denk
2011-11-30 13:55 ` Kumar Gala
@ 2011-12-01 23:16 ` Wolfgang Denk
1 sibling, 0 replies; 41+ messages in thread
From: Wolfgang Denk @ 2011-12-01 23:16 UTC (permalink / raw)
To: u-boot
Dear Wolfgang Denk,
In message <1322641077-829-12-git-send-email-wd@denx.de> you wrote:
> Fix:
> mpc8610hpcd.c: In function 'pci_init_board':
> mpc8610hpcd.c:238:15: warning: variable 'pordevsr' set but not used
> [-Wunused-but-set-variable]
>
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Kumar Gala <galak@kernel.crashing.org>
> ---
> total: 0 errors, 0 warnings, 13 lines checked
> NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
>
> board/freescale/mpc8610hpcd/mpc8610hpcd.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
The software required `Windows 95 or better', so I installed Linux.
^ permalink raw reply [flat|nested] 41+ messages in thread
* [U-Boot] [PATCH 12/14] arch/powerpc/cpu/mpc86xx/cpu.c: Fix GCC 4.6 build warning
2011-11-30 8:17 ` [U-Boot] [PATCH 12/14] arch/powerpc/cpu/mpc86xx/cpu.c: " Wolfgang Denk
2011-11-30 13:55 ` Kumar Gala
@ 2011-12-01 23:16 ` Wolfgang Denk
1 sibling, 0 replies; 41+ messages in thread
From: Wolfgang Denk @ 2011-12-01 23:16 UTC (permalink / raw)
To: u-boot
Dear Wolfgang Denk,
In message <1322641077-829-13-git-send-email-wd@denx.de> you wrote:
> Fix:
> cpu.c: In function 'checkcpu':
> cpu.c:51:7: warning: variable 'ver' set but not used
> [-Wunused-but-set-variable]
>
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Kumar Gala <galak@kernel.crashing.org>
> ---
> total: 0 errors, 0 warnings, 21 lines checked
> NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
>
> arch/powerpc/cpu/mpc86xx/cpu.c | 3 ---
> 1 files changed, 0 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
"Logic and practical information do not seem to apply here."
"You admit that?"
"To deny the facts would be illogical, Doctor"
-- Spock and McCoy, "A Piece of the Action", stardate unknown
^ permalink raw reply [flat|nested] 41+ messages in thread
* [U-Boot] [PATCH 13/14] board/sbc405/strataflash.c: Fix GCC 4.6 build warning
2011-11-30 8:17 ` [U-Boot] [PATCH 13/14] board/sbc405/strataflash.c: " Wolfgang Denk
2011-12-01 22:14 ` Marek Vasut
@ 2011-12-01 23:17 ` Wolfgang Denk
1 sibling, 0 replies; 41+ messages in thread
From: Wolfgang Denk @ 2011-12-01 23:17 UTC (permalink / raw)
To: u-boot
Dear Wolfgang Denk,
In message <1322641077-829-14-git-send-email-wd@denx.de> you wrote:
> Fix:
> strataflash.c: In function 'flash_write_cfiword':
> strataflash.c:673:11: warning: variable 'ctladdr' set but not used
> [-Wunused-but-set-variable]
>
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> ---
> total: 0 errors, 0 warnings, 14 lines checked
> NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
>
> board/sbc405/strataflash.c | 3 ---
> 1 files changed, 0 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
It seems intuitively obvious to me, which means that it might be
wrong. -- Chris Torek
^ permalink raw reply [flat|nested] 41+ messages in thread
* [U-Boot] [PATCH 14/14] board/emk/top860/top860.c: Fix GCC 4.6 build warning
2011-11-30 8:17 ` [U-Boot] [PATCH 14/14] board/emk/top860/top860.c: " Wolfgang Denk
@ 2011-12-01 23:17 ` Wolfgang Denk
0 siblings, 0 replies; 41+ messages in thread
From: Wolfgang Denk @ 2011-12-01 23:17 UTC (permalink / raw)
To: u-boot
Dear Wolfgang Denk,
In message <1322641077-829-15-git-send-email-wd@denx.de> you wrote:
> Fix:
> top860.c: In function 'initdram':
> top860.c:90:11: warning: variable 'j' set but not used
> [-Wunused-but-set-variable]
>
> Note: No attempts were made to convert this file completely to using
> I/O accessors. This is left as an exercise for the board maintainer.
>
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Reinhard Meyer <reinhard.meyer@emk-elektronik.de>
> ---
> total: 0 errors, 0 warnings, 25 lines checked
> NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
>
> board/emk/top860/top860.c | 7 ++++---
> 1 files changed, 4 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
Actual war is a very messy business. Very, very messy business.
-- Kirk, "A Taste of Armageddon", stardate 3193.0
^ permalink raw reply [flat|nested] 41+ messages in thread
end of thread, other threads:[~2011-12-01 23:17 UTC | newest]
Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-30 8:17 [U-Boot] [PATCH 00/14] More fixes GCC 4.6 build warnings Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 01/14] alpr board: Fix " Wolfgang Denk
2011-12-01 8:55 ` Stefan Roese
2011-12-01 23:09 ` Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 02/14] board/amirix/ap1000/flash.c: Fix GCC 4.6 build warning Wolfgang Denk
2011-12-01 22:10 ` Marek Vasut
2011-12-01 23:10 ` Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 03/14] drivers/block/sata_dwc.c: " Wolfgang Denk
2011-12-01 23:10 ` Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 04/14] board/cray/L1/flash.c: " Wolfgang Denk
2011-12-01 22:10 ` Marek Vasut
2011-12-01 23:11 ` Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 05/14] DB64360: Fix GCC 4.6 build warnings Wolfgang Denk
2011-12-01 23:11 ` Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 06/14] DB64460: " Wolfgang Denk
2011-12-01 23:11 ` Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 07/14] board/sandburst/common/flash.c: Fix GCC 4.6 build warning Wolfgang Denk
2011-12-01 22:11 ` Marek Vasut
2011-12-01 23:12 ` Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 08/14] drivers/usb/host/sl811-hcd.c: " Wolfgang Denk
2011-12-01 22:13 ` Marek Vasut
2011-12-01 23:13 ` Wolfgang Denk
2011-12-01 23:14 ` Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 09/14] post/board/lwmon5/gdc.c: " Wolfgang Denk
2011-12-01 8:55 ` Stefan Roese
2011-12-01 23:14 ` Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 10/14] board/mpl/common/flash.c: " Wolfgang Denk
2011-12-01 22:14 ` Marek Vasut
2011-12-01 23:15 ` Wolfgang Denk
2011-12-01 23:16 ` Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 11/14] board/freescale/mpc8610hpcd/mpc8610hpcd.c: " Wolfgang Denk
2011-11-30 13:55 ` Kumar Gala
2011-12-01 23:16 ` Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 12/14] arch/powerpc/cpu/mpc86xx/cpu.c: " Wolfgang Denk
2011-11-30 13:55 ` Kumar Gala
2011-12-01 23:16 ` Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 13/14] board/sbc405/strataflash.c: " Wolfgang Denk
2011-12-01 22:14 ` Marek Vasut
2011-12-01 23:17 ` Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 14/14] board/emk/top860/top860.c: " Wolfgang Denk
2011-12-01 23:17 ` 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.