All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2] spl: Change debug to printf for "Unsupported boot-device"
@ 2014-11-11 18:03 Stefan Roese
  2014-11-13  6:52 ` Heiko Schocher
  2014-11-24 22:10 ` [U-Boot] [U-Boot, " Tom Rini
  0 siblings, 2 replies; 8+ messages in thread
From: Stefan Roese @ 2014-11-11 18:03 UTC (permalink / raw)
  To: u-boot

We had the problem on an AM33xx platform, that SPL detected an
unsupported boot-device. But since this message is a debug message
it took a bit of time to really know, where the hangup in SPL
resulted from. So let's change this debug message to a printf
and also print the detected boot-device that is not supported.
This makes debugging of such cases much easier.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Tom Rini <trini@ti.com>
---
v2:
- Added #if check so that the printf is only included when serial support
  is enabled.
- Compile tested on all ARM boards

 common/spl/spl.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/common/spl/spl.c b/common/spl/spl.c
index d85bab3..cef7bca 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -216,7 +216,9 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
 		break;
 #endif
 	default:
-		debug("SPL: Un-supported Boot Device\n");
+#if defined(CONFIG_SPL_SERIAL_SUPPORT) && defined(CONFIG_SPL_LIBCOMMON_SUPPORT)
+		printf("SPL: Unsupported Boot Device %d\n", boot_device);
+#endif
 		hang();
 	}
 
-- 
2.1.3

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH v2] spl: Change debug to printf for "Unsupported boot-device"
  2014-11-11 18:03 [U-Boot] [PATCH v2] spl: Change debug to printf for "Unsupported boot-device" Stefan Roese
@ 2014-11-13  6:52 ` Heiko Schocher
  2014-11-24 22:10 ` [U-Boot] [U-Boot, " Tom Rini
  1 sibling, 0 replies; 8+ messages in thread
From: Heiko Schocher @ 2014-11-13  6:52 UTC (permalink / raw)
  To: u-boot

Hello Stefan,

Am 11.11.2014 19:03, schrieb Stefan Roese:
> We had the problem on an AM33xx platform, that SPL detected an
> unsupported boot-device. But since this message is a debug message
> it took a bit of time to really know, where the hangup in SPL
> resulted from. So let's change this debug message to a printf
> and also print the detected boot-device that is not supported.
> This makes debugging of such cases much easier.
>
> Signed-off-by: Stefan Roese <sr@denx.de>
> Cc: Wolfgang Denk <wd@denx.de>
> Cc: Tom Rini <trini@ti.com>
> ---
> v2:
> - Added #if check so that the printf is only included when serial support
>    is enabled.
> - Compile tested on all ARM boards
>
>   common/spl/spl.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)

Yes, I think this is a good idea, as I stepped also in the same problem.
I tend to first activate debug when I have not working SPL code ... but
this is not possible for example on running systems ... on the other side,
this problem should raise only in the development state ...

The same for other places ... like UBI ... see my question [1].
It would be nice to have this ubi errormessages enabled, but this cost a
lot of space ...

But for this patch, I think it is okay to enable it by default ... so:

Acked-by: Heiko Schocher <hs@denx.de>

bye,
Heiko

[1]  [U-Boot] mtd, ubi: errormessage handling
https://patchwork.ozlabs.org/patch/405259/

>
> diff --git a/common/spl/spl.c b/common/spl/spl.c
> index d85bab3..cef7bca 100644
> --- a/common/spl/spl.c
> +++ b/common/spl/spl.c
> @@ -216,7 +216,9 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
>   		break;
>   #endif
>   	default:
> -		debug("SPL: Un-supported Boot Device\n");
> +#if defined(CONFIG_SPL_SERIAL_SUPPORT) && defined(CONFIG_SPL_LIBCOMMON_SUPPORT)
> +		printf("SPL: Unsupported Boot Device %d\n", boot_device);
> +#endif
>   		hang();
>   	}
>
>

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [U-Boot, v2] spl: Change debug to printf for "Unsupported boot-device"
  2014-11-11 18:03 [U-Boot] [PATCH v2] spl: Change debug to printf for "Unsupported boot-device" Stefan Roese
  2014-11-13  6:52 ` Heiko Schocher
@ 2014-11-24 22:10 ` Tom Rini
  2015-01-27 13:43   ` Michal Simek
  1 sibling, 1 reply; 8+ messages in thread
From: Tom Rini @ 2014-11-24 22:10 UTC (permalink / raw)
  To: u-boot

On Tue, Nov 11, 2014 at 07:03:55PM +0100, Stefan Roese wrote:

> We had the problem on an AM33xx platform, that SPL detected an
> unsupported boot-device. But since this message is a debug message
> it took a bit of time to really know, where the hangup in SPL
> resulted from. So let's change this debug message to a printf
> and also print the detected boot-device that is not supported.
> This makes debugging of such cases much easier.
> 
> Signed-off-by: Stefan Roese <sr@denx.de>
> Cc: Wolfgang Denk <wd@denx.de>
> Cc: Tom Rini <trini@ti.com>
> Acked-by: Heiko Schocher <hs@denx.de>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141124/3ea3dbf1/attachment.pgp>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [U-Boot, v2] spl: Change debug to printf for "Unsupported boot-device"
  2014-11-24 22:10 ` [U-Boot] [U-Boot, " Tom Rini
@ 2015-01-27 13:43   ` Michal Simek
  2015-01-27 14:08     ` Stefan Roese
  2015-01-27 14:22     ` Tom Rini
  0 siblings, 2 replies; 8+ messages in thread
From: Michal Simek @ 2015-01-27 13:43 UTC (permalink / raw)
  To: u-boot

Hi guys,

2014-11-24 23:10 GMT+01:00 Tom Rini <trini@ti.com>:

> On Tue, Nov 11, 2014 at 07:03:55PM +0100, Stefan Roese wrote:
>
> > We had the problem on an AM33xx platform, that SPL detected an
> > unsupported boot-device. But since this message is a debug message
> > it took a bit of time to really know, where the hangup in SPL
> > resulted from. So let's change this debug message to a printf
> > and also print the detected boot-device that is not supported.
> > This makes debugging of such cases much easier.
> >
> > Signed-off-by: Stefan Roese <sr@denx.de>
> > Cc: Wolfgang Denk <wd@denx.de>
> > Cc: Tom Rini <trini@ti.com>
> > Acked-by: Heiko Schocher <hs@denx.de>
>
> Applied to u-boot/master, thanks!
>
>
This patch is causing problem on Microblaze because SPL exceed 4k limit.
It is only one printf which is called in entire SPL that's why this should
be solved a little bit differently.

Thanks,
Michal


-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [U-Boot, v2] spl: Change debug to printf for "Unsupported boot-device"
  2015-01-27 13:43   ` Michal Simek
@ 2015-01-27 14:08     ` Stefan Roese
  2015-01-27 14:22     ` Tom Rini
  1 sibling, 0 replies; 8+ messages in thread
From: Stefan Roese @ 2015-01-27 14:08 UTC (permalink / raw)
  To: u-boot

Hi Michal,

On 27.01.2015 14:43, Michal Simek wrote:
>     On Tue, Nov 11, 2014 at 07:03:55PM +0100, Stefan Roese wrote:
>
>     > We had the problem on an AM33xx platform, that SPL detected an
>     > unsupported boot-device. But since this message is a debug message
>     > it took a bit of time to really know, where the hangup in SPL
>     > resulted from. So let's change this debug message to a printf
>     > and also print the detected boot-device that is not supported.
>     > This makes debugging of such cases much easier.
>     >
>     > Signed-off-by: Stefan Roese <sr at denx.de <mailto:sr@denx.de>>
>     > Cc: Wolfgang Denk <wd at denx.de <mailto:wd@denx.de>>
>     > Cc: Tom Rini <trini at ti.com <mailto:trini@ti.com>>
>      > Acked-by: Heiko Schocher <hs at denx.de <mailto:hs@denx.de>>
>
>     Applied to u-boot/master, thanks!
>
>
> This patch is causing problem on Microblaze because SPL exceed 4k limit.
> It is only one printf which is called in entire SPL that's why this should
> be solved a little bit differently.

Ups. Yes, sorry. This one line definitely shouldn't cause all the printf 
stuff to be included. I'll try to address this quickly...

Thanks,
Stefan

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [U-Boot, v2] spl: Change debug to printf for "Unsupported boot-device"
  2015-01-27 13:43   ` Michal Simek
  2015-01-27 14:08     ` Stefan Roese
@ 2015-01-27 14:22     ` Tom Rini
  2015-01-27 14:38       ` Stefan Roese
  1 sibling, 1 reply; 8+ messages in thread
From: Tom Rini @ 2015-01-27 14:22 UTC (permalink / raw)
  To: u-boot

On Tue, Jan 27, 2015 at 02:43:57PM +0100, Michal Simek wrote:
> Hi guys,
> 
> 2014-11-24 23:10 GMT+01:00 Tom Rini <trini@ti.com>:
> 
> > On Tue, Nov 11, 2014 at 07:03:55PM +0100, Stefan Roese wrote:
> >
> > > We had the problem on an AM33xx platform, that SPL detected an
> > > unsupported boot-device. But since this message is a debug message
> > > it took a bit of time to really know, where the hangup in SPL
> > > resulted from. So let's change this debug message to a printf
> > > and also print the detected boot-device that is not supported.
> > > This makes debugging of such cases much easier.
> > >
> > > Signed-off-by: Stefan Roese <sr@denx.de>
> > > Cc: Wolfgang Denk <wd@denx.de>
> > > Cc: Tom Rini <trini@ti.com>
> > > Acked-by: Heiko Schocher <hs@denx.de>
> >
> > Applied to u-boot/master, thanks!
> >
> >
> This patch is causing problem on Microblaze because SPL exceed 4k limit.
> It is only one printf which is called in entire SPL that's why this should
> be solved a little bit differently.

OK, but for clarity you need and are using both
CONFIG_SPL_SERIAL_SUPPORT and CONFIG_SPL_LIBCOMMON_SUPPORT because
you're using puts but not printf, yes?

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150127/6e5518f4/attachment.pgp>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [U-Boot, v2] spl: Change debug to printf for "Unsupported boot-device"
  2015-01-27 14:22     ` Tom Rini
@ 2015-01-27 14:38       ` Stefan Roese
  2015-01-27 14:40         ` Michal Simek
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Roese @ 2015-01-27 14:38 UTC (permalink / raw)
  To: u-boot

On 27.01.2015 15:22, Tom Rini wrote:
>>>> We had the problem on an AM33xx platform, that SPL detected an
>>>> unsupported boot-device. But since this message is a debug message
>>>> it took a bit of time to really know, where the hangup in SPL
>>>> resulted from. So let's change this debug message to a printf
>>>> and also print the detected boot-device that is not supported.
>>>> This makes debugging of such cases much easier.
>>>>
>>>> Signed-off-by: Stefan Roese <sr@denx.de>
>>>> Cc: Wolfgang Denk <wd@denx.de>
>>>> Cc: Tom Rini <trini@ti.com>
>>>> Acked-by: Heiko Schocher <hs@denx.de>
>>>
>>> Applied to u-boot/master, thanks!
>>>
>>>
>> This patch is causing problem on Microblaze because SPL exceed 4k limit.
>> It is only one printf which is called in entire SPL that's why this should
>> be solved a little bit differently.
>
> OK, but for clarity you need and are using both
> CONFIG_SPL_SERIAL_SUPPORT and CONFIG_SPL_LIBCOMMON_SUPPORT because
> you're using puts but not printf, yes?

Right. If this is the case (only puts usage on Microblaze), then its 
perhaps best that I change this line to puts as well. Okay?

Thanks,
Stefan

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [U-Boot, v2] spl: Change debug to printf for "Unsupported boot-device"
  2015-01-27 14:38       ` Stefan Roese
@ 2015-01-27 14:40         ` Michal Simek
  0 siblings, 0 replies; 8+ messages in thread
From: Michal Simek @ 2015-01-27 14:40 UTC (permalink / raw)
  To: u-boot

2015-01-27 15:38 GMT+01:00 Stefan Roese <sr@denx.de>:

> On 27.01.2015 15:22, Tom Rini wrote:
>
>> We had the problem on an AM33xx platform, that SPL detected an
>>>>> unsupported boot-device. But since this message is a debug message
>>>>> it took a bit of time to really know, where the hangup in SPL
>>>>> resulted from. So let's change this debug message to a printf
>>>>> and also print the detected boot-device that is not supported.
>>>>> This makes debugging of such cases much easier.
>>>>>
>>>>> Signed-off-by: Stefan Roese <sr@denx.de>
>>>>> Cc: Wolfgang Denk <wd@denx.de>
>>>>> Cc: Tom Rini <trini@ti.com>
>>>>> Acked-by: Heiko Schocher <hs@denx.de>
>>>>>
>>>>
>>>> Applied to u-boot/master, thanks!
>>>>
>>>>
>>>>  This patch is causing problem on Microblaze because SPL exceed 4k
>>> limit.
>>> It is only one printf which is called in entire SPL that's why this
>>> should
>>> be solved a little bit differently.
>>>
>>
>> OK, but for clarity you need and are using both
>> CONFIG_SPL_SERIAL_SUPPORT and CONFIG_SPL_LIBCOMMON_SUPPORT because
>> you're using puts but not printf, yes?
>>
>
> Right. If this is the case (only puts usage on Microblaze), then its
> perhaps best that I change this line to puts as well. Okay?
>
>
Changing this to puts is definitely fine. Microblaze is using just puts.

Thanks,
Michal



-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-01-27 14:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-11 18:03 [U-Boot] [PATCH v2] spl: Change debug to printf for "Unsupported boot-device" Stefan Roese
2014-11-13  6:52 ` Heiko Schocher
2014-11-24 22:10 ` [U-Boot] [U-Boot, " Tom Rini
2015-01-27 13:43   ` Michal Simek
2015-01-27 14:08     ` Stefan Roese
2015-01-27 14:22     ` Tom Rini
2015-01-27 14:38       ` Stefan Roese
2015-01-27 14:40         ` Michal Simek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.