diff mbox

[U-Boot] spl: Change printf to puts for "Unsupported boot-device"

Message ID 1422373509-13313-1-git-send-email-sr@denx.de
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Stefan Roese Jan. 27, 2015, 3:45 p.m. UTC
Microblaze currently doesn't use printf in SPL. So this one line was the only
reference to it and resulted in the printf functionality to be pulled in.
Exceeding the 4k size limit. Lets change the printf back to puts so that
Microblaze is fixed again. The only drawback is that the detected boot-device
number will not be printed. But this message alone should be helpful enough
to get an idea where the boot process is broken.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Tom Rini <trini@ti.com>
Cc: Michal Simek <michal.simek@xilinx.com>
---
 common/spl/spl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tom Rini Jan. 27, 2015, 4:02 p.m. UTC | #1
On Tue, Jan 27, 2015 at 04:45:09PM +0100, Stefan Roese wrote:

> Microblaze currently doesn't use printf in SPL. So this one line was the only
> reference to it and resulted in the printf functionality to be pulled in.
> Exceeding the 4k size limit. Lets change the printf back to puts so that
> Microblaze is fixed again. The only drawback is that the detected boot-device
> number will not be printed. But this message alone should be helpful enough
> to get an idea where the boot process is broken.
> 
> Signed-off-by: Stefan Roese <sr@denx.de>
> Cc: Tom Rini <trini@ti.com>
> Cc: Michal Simek <michal.simek@xilinx.com>

Since we have a debug() higher up that will print out what the value is,
I'm OK with this and I'll apply shortly, thanks!
Michal Simek Jan. 27, 2015, 6:02 p.m. UTC | #2
On 01/27/2015 05:02 PM, Tom Rini wrote:
> On Tue, Jan 27, 2015 at 04:45:09PM +0100, Stefan Roese wrote:
> 
>> Microblaze currently doesn't use printf in SPL. So this one line was the only
>> reference to it and resulted in the printf functionality to be pulled in.
>> Exceeding the 4k size limit. Lets change the printf back to puts so that
>> Microblaze is fixed again. The only drawback is that the detected boot-device
>> number will not be printed. But this message alone should be helpful enough
>> to get an idea where the boot process is broken.
>>
>> Signed-off-by: Stefan Roese <sr@denx.de>
>> Cc: Tom Rini <trini@ti.com>
>> Cc: Michal Simek <michal.simek@xilinx.com>
> 
> Since we have a debug() higher up that will print out what the value is,
> I'm OK with this and I'll apply shortly, thanks!
> 

Works for me.
Acked-by: Michal Simek <michal.simek@xilinx.com>

Thanks,
Michal
Tom Rini Jan. 29, 2015, 2 p.m. UTC | #3
On Tue, Jan 27, 2015 at 04:45:09PM +0100, Stefan Roese wrote:

> Microblaze currently doesn't use printf in SPL. So this one line was the only
> reference to it and resulted in the printf functionality to be pulled in.
> Exceeding the 4k size limit. Lets change the printf back to puts so that
> Microblaze is fixed again. The only drawback is that the detected boot-device
> number will not be printed. But this message alone should be helpful enough
> to get an idea where the boot process is broken.
> 
> Signed-off-by: Stefan Roese <sr@denx.de>
> Cc: Tom Rini <trini@ti.com>
> Cc: Michal Simek <michal.simek@xilinx.com>
> Acked-by: Michal Simek <michal.simek@xilinx.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/common/spl/spl.c b/common/spl/spl.c
index 1826c47..daaeb50 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -231,7 +231,7 @@  void board_init_r(gd_t *dummy1, ulong dummy2)
 #endif
 	default:
 #if defined(CONFIG_SPL_SERIAL_SUPPORT) && defined(CONFIG_SPL_LIBCOMMON_SUPPORT)
-		printf("SPL: Unsupported Boot Device %d\n", boot_device);
+		puts("SPL: Unsupported Boot Device!\n");
 #endif
 		hang();
 	}