]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/cmd_bmp.c
mpc85xx: Setup SRIO memory region LAW for MPC8569E-MDS boards
[karo-tx-uboot.git] / common / cmd_bmp.c
index 2437e2278017664bc05da3c3b1f3c6ffb5e2da1b..faa10a4145b9658b047f64c4157888ded67e1b36 100644 (file)
@@ -26,6 +26,7 @@
  */
 
 #include <common.h>
+#include <lcd.h>
 #include <bmp_layout.h>
 #include <command.h>
 #include <asm/byteorder.h>
@@ -46,7 +47,7 @@ int gunzip(void *, int, unsigned char *, unsigned long *);
  * didn't contain a valid BMP signature.
  */
 #ifdef CONFIG_VIDEO_BMP_GZIP
-static bmp_image_t *gunzip_bmp(unsigned long addr, unsigned long *lenp)
+bmp_image_t *gunzip_bmp(unsigned long addr, unsigned long *lenp)
 {
        void *dst;
        unsigned long len;
@@ -55,19 +56,19 @@ static bmp_image_t *gunzip_bmp(unsigned long addr, unsigned long *lenp)
        /*
         * Decompress bmp image
         */
-       len = CFG_VIDEO_LOGO_MAX_SIZE;
-       dst = malloc(CFG_VIDEO_LOGO_MAX_SIZE);
+       len = CONFIG_SYS_VIDEO_LOGO_MAX_SIZE;
+       dst = malloc(CONFIG_SYS_VIDEO_LOGO_MAX_SIZE);
        if (dst == NULL) {
                puts("Error: malloc in gunzip failed!\n");
                return NULL;
        }
-       if (gunzip(dst, CFG_VIDEO_LOGO_MAX_SIZE, (uchar *)addr, &len) != 0) {
+       if (gunzip(dst, CONFIG_SYS_VIDEO_LOGO_MAX_SIZE, (uchar *)addr, &len) != 0) {
                free(dst);
                return NULL;
        }
-       if (len == CFG_VIDEO_LOGO_MAX_SIZE)
+       if (len == CONFIG_SYS_VIDEO_LOGO_MAX_SIZE)
                puts("Image could be truncated"
-                               " (increase CFG_VIDEO_LOGO_MAX_SIZE)!\n");
+                               " (increase CONFIG_SYS_VIDEO_LOGO_MAX_SIZE)!\n");
 
        bmp = dst;
 
@@ -85,7 +86,7 @@ static bmp_image_t *gunzip_bmp(unsigned long addr, unsigned long *lenp)
        return bmp;
 }
 #else
-static bmp_image_t *gunzip_bmp(unsigned long addr)
+bmp_image_t *gunzip_bmp(unsigned long addr, unsigned long *lenp)
 {
        return NULL;
 }
@@ -120,7 +121,7 @@ int do_bmp(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                y = simple_strtoul(argv[4], NULL, 10);
                break;
        default:
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -132,16 +133,16 @@ int do_bmp(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        } else if (strncmp(argv[1],"display",1) == 0) {
            return (bmp_display(addr, x, y));
        } else {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 }
 
 U_BOOT_CMD(
        bmp,    5,      1,      do_bmp,
-       "bmp     - manipulate BMP image data\n",
+       "manipulate BMP image data",
        "info <imageAddr>          - display image info\n"
-       "bmp display <imageAddr> [x y] - display image at x,y\n"
+       "bmp display <imageAddr> [x y] - display image at x,y"
 );
 
 /*