summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2009-02-07 23:51:52 +0100
committerWolfgang Denk <wd@denx.de>2009-02-07 23:51:52 +0100
commitf8306cb94f59ae2ace5bfede189944d329e5abb3 (patch)
treec26c402b9d1c3d28f5a54ffd4fcd2f3a393772de /common
parent657f2062d8e17ebf4a55f52c9e71c07c0c94c779 (diff)
parent2d43e873a29ca4959ba6a30fc7fb396d3fd0dccf (diff)
downloadu-boot-imx-f8306cb94f59ae2ace5bfede189944d329e5abb3.zip
u-boot-imx-f8306cb94f59ae2ace5bfede189944d329e5abb3.tar.gz
u-boot-imx-f8306cb94f59ae2ace5bfede189944d329e5abb3.tar.bz2
Merge branch 'master' of ssh://gemini/home/wd/git/u-boot/master
Diffstat (limited to 'common')
-rw-r--r--common/cmd_bdinfo.c3
-rw-r--r--common/cmd_ide.c4
-rw-r--r--common/env_nand.c6
-rw-r--r--common/fdt_support.c4
4 files changed, 12 insertions, 5 deletions
diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c
index 8e9251d..b2d6f84 100644
--- a/common/cmd_bdinfo.c
+++ b/common/cmd_bdinfo.c
@@ -283,6 +283,7 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
#if defined(CONFIG_SYS_MBAR)
print_num ("mbar", bd->bi_mbar_base);
#endif
+ print_str ("cpufreq", strmhz(buf, bd->bi_intfreq));
print_str ("busfreq", strmhz(buf, bd->bi_busfreq));
#ifdef CONFIG_PCI
print_str ("pcifreq", strmhz(buf, bd->bi_pcifreq));
@@ -322,7 +323,7 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
puts ("\nip_addr = ");
print_IPaddr (bd->bi_ip_addr);
#endif
- printf ("\nbaudrate = %d bps\n", bd->bi_baudrate);
+ printf ("\nbaudrate = %ld bps\n", bd->bi_baudrate);
return 0;
}
diff --git a/common/cmd_ide.c b/common/cmd_ide.c
index c9b9a47..8c6ed35 100644
--- a/common/cmd_ide.c
+++ b/common/cmd_ide.c
@@ -45,6 +45,10 @@
#include <mpc5xxx.h>
#endif
+#ifdef CONFIG_MPC512X
+#include <mpc512x.h>
+#endif
+
#include <ide.h>
#include <ata.h>
diff --git a/common/env_nand.c b/common/env_nand.c
index 8af9e74..e490775 100644
--- a/common/env_nand.c
+++ b/common/env_nand.c
@@ -304,9 +304,11 @@ void env_relocate_spec (void)
crc1_ok = (crc32(0, tmp_env1->data, ENV_SIZE) == tmp_env1->crc);
crc2_ok = (crc32(0, tmp_env2->data, ENV_SIZE) == tmp_env2->crc);
- if(!crc1_ok && !crc2_ok)
+ if(!crc1_ok && !crc2_ok) {
+ free(tmp_env1);
+ free(tmp_env2);
return use_default();
- else if(crc1_ok && !crc2_ok)
+ } else if(crc1_ok && !crc2_ok)
gd->env_valid = 1;
else if(!crc1_ok && crc2_ok)
gd->env_valid = 2;
diff --git a/common/fdt_support.c b/common/fdt_support.c
index a79bc08..b54f886 100644
--- a/common/fdt_support.c
+++ b/common/fdt_support.c
@@ -646,8 +646,8 @@ int fdt_pci_dma_ranges(void *blob, int phb_off, struct pci_controller *hose) {
for (r = 0; r < hose->region_count; r++) {
u64 bus_start, phys_start, size;
- /* skip if !PCI_REGION_MEMORY */
- if (!(hose->regions[r].flags & PCI_REGION_MEMORY))
+ /* skip if !PCI_REGION_SYS_MEMORY */
+ if (!(hose->regions[r].flags & PCI_REGION_SYS_MEMORY))
continue;
bus_start = (u64)hose->regions[r].bus_start;