summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/cmd_bmp.c2
-rw-r--r--common/env_nand.c6
-rw-r--r--common/usb.c9
3 files changed, 11 insertions, 6 deletions
diff --git a/common/cmd_bmp.c b/common/cmd_bmp.c
index f2a48f7..23fc82f 100644
--- a/common/cmd_bmp.c
+++ b/common/cmd_bmp.c
@@ -79,7 +79,7 @@ bmp_image_t *gunzip_bmp(unsigned long addr, unsigned long *lenp)
return NULL;
}
- puts("Gzipped BMP image detected!\n");
+ debug("Gzipped BMP image detected!\n");
return bmp;
}
diff --git a/common/env_nand.c b/common/env_nand.c
index a4480cb..980425a 100644
--- a/common/env_nand.c
+++ b/common/env_nand.c
@@ -181,7 +181,10 @@ int writeenv(size_t offset, u_char *buf)
return 0;
}
+
#ifdef CONFIG_ENV_OFFSET_REDUND
+static unsigned char env_flags;
+
int saveenv(void)
{
env_t env_new;
@@ -205,7 +208,7 @@ int saveenv(void)
return 1;
}
env_new.crc = crc32(0, env_new.data, ENV_SIZE);
- ++env_new.flags; /* increase the serial */
+ env_new.flags = ++env_flags; /* increase the serial */
if(gd->env_valid == 1) {
puts("Erasing redundant NAND...\n");
@@ -399,6 +402,7 @@ void env_relocate_spec(void)
else
ep = tmp_env2;
+ env_flags = ep->flags;
env_import((char *)ep, 0);
free(tmp_env1);
diff --git a/common/usb.c b/common/usb.c
index 10e23de..44a435a 100644
--- a/common/usb.c
+++ b/common/usb.c
@@ -55,7 +55,10 @@
#include <asm/4xx_pci.h>
#endif
-#undef USB_DEBUG
+#ifdef DEBUG
+#define USB_DEBUG
+#define USB_HUB_DEBUG
+#endif
#ifdef USB_DEBUG
#define USB_PRINTF(fmt, args...) printf(fmt , ##args)
@@ -960,8 +963,6 @@ void usb_scan_devices(void)
* Probes device for being a hub and configurate it
*/
-#undef USB_HUB_DEBUG
-
#ifdef USB_HUB_DEBUG
#define USB_HUB_PRINTF(fmt, args...) printf(fmt , ##args)
#else
@@ -1220,7 +1221,7 @@ int usb_hub_configure(struct usb_device *dev)
hub->desc.DeviceRemovable[i] = descriptor->DeviceRemovable[i];
for (i = 0; i < ((hub->desc.bNbrPorts + 1 + 7)/8); i++)
- hub->desc.DeviceRemovable[i] = descriptor->PortPowerCtrlMask[i];
+ hub->desc.PortPowerCtrlMask[i] = descriptor->PortPowerCtrlMask[i];
dev->maxchild = descriptor->bNbrPorts;
USB_HUB_PRINTF("%d ports detected\n", dev->maxchild);