Commit 4212098181ac91e14374c1207b1e98595f1cc717

Authored by Tom Rini
1 parent 1292eaf353

SPL: Rework how we inform about un-headered images

First, remove the puts from the case where we don't have an mkimage
header as this is somewhat common and intentional for no-arg target
images.  Second, rework the final switch statement in board_init_r to,
in the case of !CONFIG_SPL_OS_BOOT be only about doing debug prints
about if we know what the magic is or not (the CONFIG_SPL_OS_BOOT case
is unchanged).  Then we call jump_to_image_no_args().  This gives us the
same behavior as before but with slightly smaller code.

Signed-off-by: Tom Rini <trini@ti.com>

Showing 1 changed file with 2 additions and 5 deletions Side-by-side Diff

... ... @@ -102,7 +102,6 @@
102 102 spl_image.name, spl_image.load_addr, spl_image.size);
103 103 } else {
104 104 /* Signature not found - assume u-boot.bin */
105   - puts("mkimage signature not found, assuming u-boot.bin ..\n");
106 105 debug("mkimage signature not found - ih_magic = %x\n",
107 106 header->ih_magic);
108 107 /* Let's assume U-Boot will not be more than 200 KB */
109 108  
110 109  
111 110  
... ... @@ -181,19 +180,17 @@
181 180 switch (spl_image.os) {
182 181 case IH_OS_U_BOOT:
183 182 debug("Jumping to U-Boot\n");
184   - jump_to_image_no_args();
185 183 break;
186 184 #ifdef CONFIG_SPL_OS_BOOT
187 185 case IH_OS_LINUX:
188 186 debug("Jumping to Linux\n");
189 187 spl_board_prepare_for_linux();
190 188 jump_to_image_linux((void *)CONFIG_SYS_SPL_ARGS_ADDR);
191   - break;
192 189 #endif
193 190 default:
194   - puts("Unsupported OS image.. Jumping nevertheless..\n");
195   - jump_to_image_no_args();
  191 + debug("Unsupported OS image.. Jumping nevertheless..\n");
196 192 }
  193 + jump_to_image_no_args();
197 194 }
198 195  
199 196 /*