wdenk | f5f146e | 2003-04-20 16:52:09 +0000 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2002 |
wdenk | b9bbd24 | 2003-06-30 16:24:52 +0000 | [diff] [blame] | 3 | * Detlev Zundel, DENX Software Engineering, dzu@denx.de. |
wdenk | f5f146e | 2003-04-20 16:52:09 +0000 | [diff] [blame] | 4 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 5 | * SPDX-License-Identifier: GPL-2.0+ |
wdenk | f5f146e | 2003-04-20 16:52:09 +0000 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | /* |
| 9 | * BMP handling routines |
| 10 | */ |
| 11 | |
| 12 | #include <common.h> |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 13 | #include <dm.h> |
Alessandro Rubini | 465c45a | 2009-07-19 17:52:27 +0200 | [diff] [blame] | 14 | #include <lcd.h> |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 15 | #include <mapmem.h> |
wdenk | f5f146e | 2003-04-20 16:52:09 +0000 | [diff] [blame] | 16 | #include <bmp_layout.h> |
| 17 | #include <command.h> |
wdenk | 9ca7bbc | 2004-10-09 23:25:58 +0000 | [diff] [blame] | 18 | #include <asm/byteorder.h> |
Stefan Roese | 13b9369 | 2005-10-08 10:19:07 +0200 | [diff] [blame] | 19 | #include <malloc.h> |
Simon Glass | cd161d8 | 2016-01-05 09:30:58 -0700 | [diff] [blame] | 20 | #include <mapmem.h> |
Anatolij Gustschin | b9b5eaf | 2013-07-02 00:04:05 +0200 | [diff] [blame] | 21 | #include <splash.h> |
Stefan Reinauer | 987d1d8 | 2012-09-28 15:11:11 +0000 | [diff] [blame] | 22 | #include <video.h> |
wdenk | f5f146e | 2003-04-20 16:52:09 +0000 | [diff] [blame] | 23 | |
wdenk | f5f146e | 2003-04-20 16:52:09 +0000 | [diff] [blame] | 24 | static int bmp_info (ulong addr); |
wdenk | f5f146e | 2003-04-20 16:52:09 +0000 | [diff] [blame] | 25 | |
| 26 | /* |
Hans-Christian Egtvedt | 68d89dc | 2007-11-30 17:29:59 +0100 | [diff] [blame] | 27 | * Allocate and decompress a BMP image using gunzip(). |
| 28 | * |
Piotr Wilczek | e59e0ff | 2013-06-05 08:14:30 +0200 | [diff] [blame] | 29 | * Returns a pointer to the decompressed image data. This pointer is |
| 30 | * aligned to 32-bit-aligned-address + 2. |
| 31 | * See doc/README.displaying-bmps for explanation. |
| 32 | * |
| 33 | * The allocation address is passed to 'alloc_addr' and must be freed |
| 34 | * by the caller after use. |
Hans-Christian Egtvedt | 68d89dc | 2007-11-30 17:29:59 +0100 | [diff] [blame] | 35 | * |
| 36 | * Returns NULL if decompression failed, or if the decompressed data |
| 37 | * didn't contain a valid BMP signature. |
| 38 | */ |
| 39 | #ifdef CONFIG_VIDEO_BMP_GZIP |
Simon Glass | 92e1f85 | 2015-05-13 07:02:27 -0600 | [diff] [blame] | 40 | struct bmp_image *gunzip_bmp(unsigned long addr, unsigned long *lenp, |
| 41 | void **alloc_addr) |
Hans-Christian Egtvedt | 68d89dc | 2007-11-30 17:29:59 +0100 | [diff] [blame] | 42 | { |
| 43 | void *dst; |
| 44 | unsigned long len; |
Simon Glass | 92e1f85 | 2015-05-13 07:02:27 -0600 | [diff] [blame] | 45 | struct bmp_image *bmp; |
Hans-Christian Egtvedt | 68d89dc | 2007-11-30 17:29:59 +0100 | [diff] [blame] | 46 | |
| 47 | /* |
| 48 | * Decompress bmp image |
| 49 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 50 | len = CONFIG_SYS_VIDEO_LOGO_MAX_SIZE; |
Piotr Wilczek | e59e0ff | 2013-06-05 08:14:30 +0200 | [diff] [blame] | 51 | /* allocate extra 3 bytes for 32-bit-aligned-address + 2 alignment */ |
| 52 | dst = malloc(CONFIG_SYS_VIDEO_LOGO_MAX_SIZE + 3); |
Hans-Christian Egtvedt | 68d89dc | 2007-11-30 17:29:59 +0100 | [diff] [blame] | 53 | if (dst == NULL) { |
| 54 | puts("Error: malloc in gunzip failed!\n"); |
| 55 | return NULL; |
| 56 | } |
Piotr Wilczek | e59e0ff | 2013-06-05 08:14:30 +0200 | [diff] [blame] | 57 | |
| 58 | bmp = dst; |
| 59 | |
| 60 | /* align to 32-bit-aligned-address + 2 */ |
Simon Glass | 92e1f85 | 2015-05-13 07:02:27 -0600 | [diff] [blame] | 61 | bmp = (struct bmp_image *)((((unsigned int)dst + 1) & ~3) + 2); |
Piotr Wilczek | e59e0ff | 2013-06-05 08:14:30 +0200 | [diff] [blame] | 62 | |
Simon Glass | cd161d8 | 2016-01-05 09:30:58 -0700 | [diff] [blame] | 63 | if (gunzip(bmp, CONFIG_SYS_VIDEO_LOGO_MAX_SIZE, map_sysmem(addr, 0), |
| 64 | &len) != 0) { |
Hans-Christian Egtvedt | 68d89dc | 2007-11-30 17:29:59 +0100 | [diff] [blame] | 65 | free(dst); |
| 66 | return NULL; |
| 67 | } |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 68 | if (len == CONFIG_SYS_VIDEO_LOGO_MAX_SIZE) |
Hans-Christian Egtvedt | 68d89dc | 2007-11-30 17:29:59 +0100 | [diff] [blame] | 69 | puts("Image could be truncated" |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 70 | " (increase CONFIG_SYS_VIDEO_LOGO_MAX_SIZE)!\n"); |
Hans-Christian Egtvedt | 68d89dc | 2007-11-30 17:29:59 +0100 | [diff] [blame] | 71 | |
Hans-Christian Egtvedt | 68d89dc | 2007-11-30 17:29:59 +0100 | [diff] [blame] | 72 | /* |
| 73 | * Check for bmp mark 'BM' |
| 74 | */ |
| 75 | if (!((bmp->header.signature[0] == 'B') && |
| 76 | (bmp->header.signature[1] == 'M'))) { |
| 77 | free(dst); |
| 78 | return NULL; |
| 79 | } |
| 80 | |
Wolfgang Denk | af42bb3 | 2011-02-09 15:11:10 +0100 | [diff] [blame] | 81 | debug("Gzipped BMP image detected!\n"); |
Hans-Christian Egtvedt | 68d89dc | 2007-11-30 17:29:59 +0100 | [diff] [blame] | 82 | |
Piotr Wilczek | e59e0ff | 2013-06-05 08:14:30 +0200 | [diff] [blame] | 83 | *alloc_addr = dst; |
Hans-Christian Egtvedt | 68d89dc | 2007-11-30 17:29:59 +0100 | [diff] [blame] | 84 | return bmp; |
| 85 | } |
| 86 | #else |
Simon Glass | 92e1f85 | 2015-05-13 07:02:27 -0600 | [diff] [blame] | 87 | struct bmp_image *gunzip_bmp(unsigned long addr, unsigned long *lenp, |
| 88 | void **alloc_addr) |
Hans-Christian Egtvedt | 68d89dc | 2007-11-30 17:29:59 +0100 | [diff] [blame] | 89 | { |
| 90 | return NULL; |
| 91 | } |
| 92 | #endif |
| 93 | |
Wolfgang Denk | 6262d021 | 2010-06-28 22:00:46 +0200 | [diff] [blame] | 94 | static int do_bmp_info(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) |
Frans Meulenbroeks | c59bc50 | 2010-03-27 11:16:10 +0100 | [diff] [blame] | 95 | { |
| 96 | ulong addr; |
Hans-Christian Egtvedt | 68d89dc | 2007-11-30 17:29:59 +0100 | [diff] [blame] | 97 | |
Frans Meulenbroeks | c59bc50 | 2010-03-27 11:16:10 +0100 | [diff] [blame] | 98 | switch (argc) { |
| 99 | case 1: /* use load_addr as default address */ |
| 100 | addr = load_addr; |
| 101 | break; |
| 102 | case 2: /* use argument */ |
| 103 | addr = simple_strtoul(argv[1], NULL, 16); |
| 104 | break; |
| 105 | default: |
Simon Glass | a06dfc7 | 2011-12-10 08:44:01 +0000 | [diff] [blame] | 106 | return CMD_RET_USAGE; |
Frans Meulenbroeks | c59bc50 | 2010-03-27 11:16:10 +0100 | [diff] [blame] | 107 | } |
| 108 | |
| 109 | return (bmp_info(addr)); |
| 110 | } |
| 111 | |
Wolfgang Denk | 6262d021 | 2010-06-28 22:00:46 +0200 | [diff] [blame] | 112 | static int do_bmp_display(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) |
wdenk | f5f146e | 2003-04-20 16:52:09 +0000 | [diff] [blame] | 113 | { |
| 114 | ulong addr; |
wdenk | e55402c | 2004-03-14 16:51:43 +0000 | [diff] [blame] | 115 | int x = 0, y = 0; |
wdenk | f5f146e | 2003-04-20 16:52:09 +0000 | [diff] [blame] | 116 | |
Anatolij Gustschin | b9b5eaf | 2013-07-02 00:04:05 +0200 | [diff] [blame] | 117 | splash_get_pos(&x, &y); |
| 118 | |
wdenk | f5f146e | 2003-04-20 16:52:09 +0000 | [diff] [blame] | 119 | switch (argc) { |
Frans Meulenbroeks | c59bc50 | 2010-03-27 11:16:10 +0100 | [diff] [blame] | 120 | case 1: /* use load_addr as default address */ |
wdenk | f5f146e | 2003-04-20 16:52:09 +0000 | [diff] [blame] | 121 | addr = load_addr; |
| 122 | break; |
Frans Meulenbroeks | c59bc50 | 2010-03-27 11:16:10 +0100 | [diff] [blame] | 123 | case 2: /* use argument */ |
| 124 | addr = simple_strtoul(argv[1], NULL, 16); |
wdenk | f5f146e | 2003-04-20 16:52:09 +0000 | [diff] [blame] | 125 | break; |
Frans Meulenbroeks | c59bc50 | 2010-03-27 11:16:10 +0100 | [diff] [blame] | 126 | case 4: |
| 127 | addr = simple_strtoul(argv[1], NULL, 16); |
Wolfgang Denk | ec7fbf5 | 2013-10-04 17:43:24 +0200 | [diff] [blame] | 128 | x = simple_strtoul(argv[2], NULL, 10); |
| 129 | y = simple_strtoul(argv[3], NULL, 10); |
| 130 | break; |
wdenk | f5f146e | 2003-04-20 16:52:09 +0000 | [diff] [blame] | 131 | default: |
Simon Glass | a06dfc7 | 2011-12-10 08:44:01 +0000 | [diff] [blame] | 132 | return CMD_RET_USAGE; |
wdenk | f5f146e | 2003-04-20 16:52:09 +0000 | [diff] [blame] | 133 | } |
| 134 | |
Frans Meulenbroeks | c59bc50 | 2010-03-27 11:16:10 +0100 | [diff] [blame] | 135 | return (bmp_display(addr, x, y)); |
| 136 | } |
| 137 | |
| 138 | static cmd_tbl_t cmd_bmp_sub[] = { |
| 139 | U_BOOT_CMD_MKENT(info, 3, 0, do_bmp_info, "", ""), |
| 140 | U_BOOT_CMD_MKENT(display, 5, 0, do_bmp_display, "", ""), |
| 141 | }; |
| 142 | |
Wolfgang Denk | d0813e5 | 2010-10-28 20:00:11 +0200 | [diff] [blame] | 143 | #ifdef CONFIG_NEEDS_MANUAL_RELOC |
Heiko Schocher | aeb2991 | 2010-09-17 13:10:39 +0200 | [diff] [blame] | 144 | void bmp_reloc(void) { |
| 145 | fixup_cmdtable(cmd_bmp_sub, ARRAY_SIZE(cmd_bmp_sub)); |
| 146 | } |
| 147 | #endif |
| 148 | |
Frans Meulenbroeks | c59bc50 | 2010-03-27 11:16:10 +0100 | [diff] [blame] | 149 | /* |
| 150 | * Subroutine: do_bmp |
| 151 | * |
| 152 | * Description: Handler for 'bmp' command.. |
| 153 | * |
| 154 | * Inputs: argv[1] contains the subcommand |
| 155 | * |
| 156 | * Return: None |
| 157 | * |
| 158 | */ |
Wolfgang Denk | 6262d021 | 2010-06-28 22:00:46 +0200 | [diff] [blame] | 159 | static int do_bmp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) |
Frans Meulenbroeks | c59bc50 | 2010-03-27 11:16:10 +0100 | [diff] [blame] | 160 | { |
| 161 | cmd_tbl_t *c; |
| 162 | |
| 163 | /* Strip off leading 'bmp' command argument */ |
| 164 | argc--; |
| 165 | argv++; |
| 166 | |
| 167 | c = find_cmd_tbl(argv[0], &cmd_bmp_sub[0], ARRAY_SIZE(cmd_bmp_sub)); |
| 168 | |
Wolfgang Denk | 3b68311 | 2010-07-17 01:06:04 +0200 | [diff] [blame] | 169 | if (c) |
Frans Meulenbroeks | c59bc50 | 2010-03-27 11:16:10 +0100 | [diff] [blame] | 170 | return c->cmd(cmdtp, flag, argc, argv); |
Wolfgang Denk | 3b68311 | 2010-07-17 01:06:04 +0200 | [diff] [blame] | 171 | else |
Simon Glass | a06dfc7 | 2011-12-10 08:44:01 +0000 | [diff] [blame] | 172 | return CMD_RET_USAGE; |
wdenk | f5f146e | 2003-04-20 16:52:09 +0000 | [diff] [blame] | 173 | } |
| 174 | |
wdenk | f287a24 | 2003-07-01 21:06:45 +0000 | [diff] [blame] | 175 | U_BOOT_CMD( |
wdenk | e55402c | 2004-03-14 16:51:43 +0000 | [diff] [blame] | 176 | bmp, 5, 1, do_bmp, |
Peter Tyser | dfb72b8 | 2009-01-27 18:03:12 -0600 | [diff] [blame] | 177 | "manipulate BMP image data", |
wdenk | e55402c | 2004-03-14 16:51:43 +0000 | [diff] [blame] | 178 | "info <imageAddr> - display image info\n" |
Wolfgang Denk | c54781c | 2009-05-24 17:06:54 +0200 | [diff] [blame] | 179 | "bmp display <imageAddr> [x y] - display image at x,y" |
wdenk | f12e396 | 2003-06-29 21:03:46 +0000 | [diff] [blame] | 180 | ); |
| 181 | |
wdenk | f5f146e | 2003-04-20 16:52:09 +0000 | [diff] [blame] | 182 | /* |
| 183 | * Subroutine: bmp_info |
| 184 | * |
| 185 | * Description: Show information about bmp file in memory |
| 186 | * |
| 187 | * Inputs: addr address of the bmp file |
| 188 | * |
| 189 | * Return: None |
| 190 | * |
| 191 | */ |
| 192 | static int bmp_info(ulong addr) |
| 193 | { |
Simon Glass | cd161d8 | 2016-01-05 09:30:58 -0700 | [diff] [blame] | 194 | struct bmp_image *bmp = (struct bmp_image *)map_sysmem(addr, 0); |
Piotr Wilczek | e59e0ff | 2013-06-05 08:14:30 +0200 | [diff] [blame] | 195 | void *bmp_alloc_addr = NULL; |
Hans-Christian Egtvedt | 68d89dc | 2007-11-30 17:29:59 +0100 | [diff] [blame] | 196 | unsigned long len; |
Stefan Roese | 13b9369 | 2005-10-08 10:19:07 +0200 | [diff] [blame] | 197 | |
wdenk | f5f146e | 2003-04-20 16:52:09 +0000 | [diff] [blame] | 198 | if (!((bmp->header.signature[0]=='B') && |
Hans-Christian Egtvedt | 68d89dc | 2007-11-30 17:29:59 +0100 | [diff] [blame] | 199 | (bmp->header.signature[1]=='M'))) |
Piotr Wilczek | e59e0ff | 2013-06-05 08:14:30 +0200 | [diff] [blame] | 200 | bmp = gunzip_bmp(addr, &len, &bmp_alloc_addr); |
Stefan Roese | 13b9369 | 2005-10-08 10:19:07 +0200 | [diff] [blame] | 201 | |
Hans-Christian Egtvedt | 68d89dc | 2007-11-30 17:29:59 +0100 | [diff] [blame] | 202 | if (bmp == NULL) { |
wdenk | f5f146e | 2003-04-20 16:52:09 +0000 | [diff] [blame] | 203 | printf("There is no valid bmp file at the given address\n"); |
Hans-Christian Egtvedt | 68d89dc | 2007-11-30 17:29:59 +0100 | [diff] [blame] | 204 | return 1; |
wdenk | f5f146e | 2003-04-20 16:52:09 +0000 | [diff] [blame] | 205 | } |
Hans-Christian Egtvedt | 68d89dc | 2007-11-30 17:29:59 +0100 | [diff] [blame] | 206 | |
wdenk | f5f146e | 2003-04-20 16:52:09 +0000 | [diff] [blame] | 207 | printf("Image size : %d x %d\n", le32_to_cpu(bmp->header.width), |
| 208 | le32_to_cpu(bmp->header.height)); |
| 209 | printf("Bits per pixel: %d\n", le16_to_cpu(bmp->header.bit_count)); |
| 210 | printf("Compression : %d\n", le32_to_cpu(bmp->header.compression)); |
Stefan Roese | 13b9369 | 2005-10-08 10:19:07 +0200 | [diff] [blame] | 211 | |
Piotr Wilczek | e59e0ff | 2013-06-05 08:14:30 +0200 | [diff] [blame] | 212 | if (bmp_alloc_addr) |
| 213 | free(bmp_alloc_addr); |
Stefan Roese | 13b9369 | 2005-10-08 10:19:07 +0200 | [diff] [blame] | 214 | |
wdenk | f5f146e | 2003-04-20 16:52:09 +0000 | [diff] [blame] | 215 | return(0); |
| 216 | } |
| 217 | |
| 218 | /* |
| 219 | * Subroutine: bmp_display |
| 220 | * |
| 221 | * Description: Display bmp file located in memory |
| 222 | * |
| 223 | * Inputs: addr address of the bmp file |
| 224 | * |
| 225 | * Return: None |
| 226 | * |
| 227 | */ |
Anatolij Gustschin | 7a49e6f | 2012-04-27 04:38:06 +0000 | [diff] [blame] | 228 | int bmp_display(ulong addr, int x, int y) |
wdenk | f5f146e | 2003-04-20 16:52:09 +0000 | [diff] [blame] | 229 | { |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 230 | #ifdef CONFIG_DM_VIDEO |
| 231 | struct udevice *dev; |
| 232 | #endif |
Hans-Christian Egtvedt | 68d89dc | 2007-11-30 17:29:59 +0100 | [diff] [blame] | 233 | int ret; |
Simon Glass | cd161d8 | 2016-01-05 09:30:58 -0700 | [diff] [blame] | 234 | struct bmp_image *bmp = map_sysmem(addr, 0); |
Piotr Wilczek | e59e0ff | 2013-06-05 08:14:30 +0200 | [diff] [blame] | 235 | void *bmp_alloc_addr = NULL; |
Hans-Christian Egtvedt | 68d89dc | 2007-11-30 17:29:59 +0100 | [diff] [blame] | 236 | unsigned long len; |
| 237 | |
| 238 | if (!((bmp->header.signature[0]=='B') && |
| 239 | (bmp->header.signature[1]=='M'))) |
Piotr Wilczek | e59e0ff | 2013-06-05 08:14:30 +0200 | [diff] [blame] | 240 | bmp = gunzip_bmp(addr, &len, &bmp_alloc_addr); |
Hans-Christian Egtvedt | 68d89dc | 2007-11-30 17:29:59 +0100 | [diff] [blame] | 241 | |
| 242 | if (!bmp) { |
| 243 | printf("There is no valid bmp file at the given address\n"); |
| 244 | return 1; |
| 245 | } |
Simon Glass | cd161d8 | 2016-01-05 09:30:58 -0700 | [diff] [blame] | 246 | addr = map_to_sysmem(bmp); |
Hans-Christian Egtvedt | 68d89dc | 2007-11-30 17:29:59 +0100 | [diff] [blame] | 247 | |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 248 | #ifdef CONFIG_DM_VIDEO |
Simon Glass | c7298e7 | 2016-02-11 13:23:26 -0700 | [diff] [blame] | 249 | ret = uclass_first_device_err(UCLASS_VIDEO, &dev); |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 250 | if (!ret) { |
Simon Glass | c7298e7 | 2016-02-11 13:23:26 -0700 | [diff] [blame] | 251 | bool align = false; |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 252 | |
| 253 | # ifdef CONFIG_SPLASH_SCREEN_ALIGN |
Simon Glass | c7298e7 | 2016-02-11 13:23:26 -0700 | [diff] [blame] | 254 | align = true; |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 255 | # endif /* CONFIG_SPLASH_SCREEN_ALIGN */ |
Simon Glass | c7298e7 | 2016-02-11 13:23:26 -0700 | [diff] [blame] | 256 | ret = video_bmp_display(dev, addr, x, y, align); |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 257 | } |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 258 | #elif defined(CONFIG_LCD) |
Simon Glass | cd161d8 | 2016-01-05 09:30:58 -0700 | [diff] [blame] | 259 | ret = lcd_display_bitmap(addr, x, y); |
wdenk | 7ac1610 | 2004-08-01 22:48:16 +0000 | [diff] [blame] | 260 | #elif defined(CONFIG_VIDEO) |
Simon Glass | cd161d8 | 2016-01-05 09:30:58 -0700 | [diff] [blame] | 261 | ret = video_display_bitmap(addr, x, y); |
wdenk | 7ac1610 | 2004-08-01 22:48:16 +0000 | [diff] [blame] | 262 | #else |
| 263 | # error bmp_display() requires CONFIG_LCD or CONFIG_VIDEO |
wdenk | e55402c | 2004-03-14 16:51:43 +0000 | [diff] [blame] | 264 | #endif |
Hans-Christian Egtvedt | 68d89dc | 2007-11-30 17:29:59 +0100 | [diff] [blame] | 265 | |
Piotr Wilczek | e59e0ff | 2013-06-05 08:14:30 +0200 | [diff] [blame] | 266 | if (bmp_alloc_addr) |
| 267 | free(bmp_alloc_addr); |
Hans-Christian Egtvedt | 68d89dc | 2007-11-30 17:29:59 +0100 | [diff] [blame] | 268 | |
Simon Glass | 476e8af | 2016-01-30 15:45:15 -0700 | [diff] [blame] | 269 | return ret ? CMD_RET_FAILURE : 0; |
wdenk | f5f146e | 2003-04-20 16:52:09 +0000 | [diff] [blame] | 270 | } |