Merge branch 'master' of git://git.denx.de/u-boot-arm
[platform/kernel/u-boot.git] / board / mpl / common / common_util.c
index 8990fc6..61af4ae 100644 (file)
@@ -29,7 +29,6 @@
 #include <asm/processor.h>
 #include <asm/byteorder.h>
 #include <i2c.h>
-#include <devices.h>
 #include <pci.h>
 #include <malloc.h>
 #include <bzlib.h>
@@ -428,35 +427,6 @@ void check_env(void)
        }
 }
 
-
-extern device_t *stdio_devices[];
-extern char *stdio_names[];
-
-void show_stdio_dev(void)
-{
-       /* Print information */
-       puts("In:    ");
-       if (stdio_devices[stdin] == NULL) {
-               puts("No input devices available!\n");
-       } else {
-               printf ("%s\n", stdio_devices[stdin]->name);
-       }
-
-       puts("Out:   ");
-       if (stdio_devices[stdout] == NULL) {
-               puts("No output devices available!\n");
-       } else {
-               printf ("%s\n", stdio_devices[stdout]->name);
-       }
-
-       puts("Err:   ");
-       if (stdio_devices[stderr] == NULL) {
-               puts("No error devices available!\n");
-       } else {
-               printf ("%s\n", stdio_devices[stderr]->name);
-       }
-}
-
 #endif /* #if !defined(CONFIG_PATI) */
 
 int do_mplcommon(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
@@ -559,7 +529,7 @@ int do_mplcommon(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                return 0;
        }
 #endif
-       printf("Usage:\n%s\n", cmdtp->usage);
+       cmd_usage(cmdtp);
        return 1;
 }
 
@@ -591,7 +561,7 @@ void video_get_info_str (int line_number, char *info)
        int i,boot;
        unsigned long pvr;
        char buf[64];
-       char tmp[16];
+       char buf1[32], buf2[32], buf3[32], buf4[32];
        char cpustr[16];
        char *s, *e, bc;
        switch (line_number)
@@ -644,11 +614,12 @@ void video_get_info_str (int line_number, char *info)
                        }
                        buf[i++]=0;
                }
-               sprintf (info," %s %s %s MHz (%lu/%lu/%lu MHz)",
+               sprintf (info," %s %s %s MHz (%s/%s/%s MHz)",
                        buf, cpustr,
-                       strmhz (tmp, gd->cpu_clk), sys_info.freqPLB / 1000000,
-                       sys_info.freqPLB / sys_info.pllOpbDiv / 1000000,
-                       sys_info.freqPLB / sys_info.pllExtBusDiv / 1000000);
+                       strmhz (buf1, gd->cpu_clk),
+                       strmhz (buf2, sys_info.freqPLB),
+                       strmhz (buf3, sys_info.freqPLB / sys_info.pllOpbDiv),
+                       strmhz (buf4, sys_info.freqPLB / sys_info.pllExtBusDiv));
                return;
        case 3:
                /* Memory Info */