All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] x86: baytrail: Fix boot hang with a debug build
@ 2017-06-01 10:41 Bin Meng
  2017-06-01 10:41 ` [U-Boot] [PATCH 2/2] x86: fsp: Remove the call to set up internal uart in fsp_init() Bin Meng
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Bin Meng @ 2017-06-01 10:41 UTC (permalink / raw)
  To: u-boot

It was observed that when -DDEBUG is used to generate a debug build,
U-Boot does not boot on MinnowMax board. A workaround is to disable
CONFIG_DEBUG_UART. The real issue is that in order to have the debug
uart to work, BayTrail SoC needs to be configured so that its internal
uart is available to be used as the debug uart.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
---

 arch/x86/cpu/baytrail/Kconfig      | 4 ++++
 arch/x86/cpu/baytrail/early_uart.c | 5 +++++
 2 files changed, 9 insertions(+)

diff --git a/arch/x86/cpu/baytrail/Kconfig b/arch/x86/cpu/baytrail/Kconfig
index 1c8ac37..6c85186 100644
--- a/arch/x86/cpu/baytrail/Kconfig
+++ b/arch/x86/cpu/baytrail/Kconfig
@@ -17,4 +17,8 @@ config INTERNAL_UART
 	  reason, it is recommended that the UART port be used for
 	  debug purposes only, eg: U-Boot console.
 
+config DEBUG_UART
+	bool
+	select DEBUG_UART_BOARD_INIT
+
 endif
diff --git a/arch/x86/cpu/baytrail/early_uart.c b/arch/x86/cpu/baytrail/early_uart.c
index 471d592..afab21f 100644
--- a/arch/x86/cpu/baytrail/early_uart.c
+++ b/arch/x86/cpu/baytrail/early_uart.c
@@ -80,3 +80,8 @@ int setup_internal_uart(int enable)
 
 	return 0;
 }
+
+void board_debug_uart_init(void)
+{
+	setup_internal_uart(1);
+}
-- 
2.9.2

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

* [U-Boot] [PATCH 2/2] x86: fsp: Remove the call to set up internal uart in fsp_init()
  2017-06-01 10:41 [U-Boot] [PATCH 1/2] x86: baytrail: Fix boot hang with a debug build Bin Meng
@ 2017-06-01 10:41 ` Bin Meng
  2017-06-01 10:58   ` Stefan Roese
  2017-06-02  2:56   ` Simon Glass
  2017-06-01 10:57 ` [U-Boot] [PATCH 1/2] x86: baytrail: Fix boot hang with a debug build Stefan Roese
  2017-06-02  2:55 ` Simon Glass
  2 siblings, 2 replies; 8+ messages in thread
From: Bin Meng @ 2017-06-01 10:41 UTC (permalink / raw)
  To: u-boot

First of all, it's inappropriate to call setup_internal_uart() in a
generic API fsp_init(), as CONFIG_INTERNAL_UART is an option that
is only available on BayTrail platform. Secondly even for BayTrail,
there is no need to call setup_internal_uart() at all, as Intel FSP
will do this for us.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>

---

 arch/x86/lib/fsp/fsp_support.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/arch/x86/lib/fsp/fsp_support.c b/arch/x86/lib/fsp/fsp_support.c
index a480361..ab8340c 100644
--- a/arch/x86/lib/fsp/fsp_support.c
+++ b/arch/x86/lib/fsp/fsp_support.c
@@ -110,10 +110,6 @@ void fsp_init(u32 stack_top, u32 boot_mode, void *nvs_buf)
 	struct upd_region *fsp_upd;
 #endif
 
-#ifdef CONFIG_INTERNAL_UART
-	setup_internal_uart(1);
-#endif
-
 	fsp_hdr = find_fsp_header();
 	if (fsp_hdr == NULL) {
 		/* No valid FSP info header was found */
-- 
2.9.2

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

* [U-Boot] [PATCH 1/2] x86: baytrail: Fix boot hang with a debug build
  2017-06-01 10:41 [U-Boot] [PATCH 1/2] x86: baytrail: Fix boot hang with a debug build Bin Meng
  2017-06-01 10:41 ` [U-Boot] [PATCH 2/2] x86: fsp: Remove the call to set up internal uart in fsp_init() Bin Meng
@ 2017-06-01 10:57 ` Stefan Roese
  2017-06-02  2:55 ` Simon Glass
  2 siblings, 0 replies; 8+ messages in thread
From: Stefan Roese @ 2017-06-01 10:57 UTC (permalink / raw)
  To: u-boot

On 01.06.2017 12:41, Bin Meng wrote:
> It was observed that when -DDEBUG is used to generate a debug build,
> U-Boot does not boot on MinnowMax board. A workaround is to disable
> CONFIG_DEBUG_UART. The real issue is that in order to have the debug
> uart to work, BayTrail SoC needs to be configured so that its internal
> uart is available to be used as the debug uart.
> 
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

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

* [U-Boot] [PATCH 2/2] x86: fsp: Remove the call to set up internal uart in fsp_init()
  2017-06-01 10:41 ` [U-Boot] [PATCH 2/2] x86: fsp: Remove the call to set up internal uart in fsp_init() Bin Meng
@ 2017-06-01 10:58   ` Stefan Roese
  2017-06-02  2:56   ` Simon Glass
  1 sibling, 0 replies; 8+ messages in thread
From: Stefan Roese @ 2017-06-01 10:58 UTC (permalink / raw)
  To: u-boot

On 01.06.2017 12:41, Bin Meng wrote:
> First of all, it's inappropriate to call setup_internal_uart() in a
> generic API fsp_init(), as CONFIG_INTERNAL_UART is an option that
> is only available on BayTrail platform. Secondly even for BayTrail,
> there is no need to call setup_internal_uart() at all, as Intel FSP
> will do this for us.
> 
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

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

* [U-Boot] [PATCH 1/2] x86: baytrail: Fix boot hang with a debug build
  2017-06-01 10:41 [U-Boot] [PATCH 1/2] x86: baytrail: Fix boot hang with a debug build Bin Meng
  2017-06-01 10:41 ` [U-Boot] [PATCH 2/2] x86: fsp: Remove the call to set up internal uart in fsp_init() Bin Meng
  2017-06-01 10:57 ` [U-Boot] [PATCH 1/2] x86: baytrail: Fix boot hang with a debug build Stefan Roese
@ 2017-06-02  2:55 ` Simon Glass
  2017-06-02  6:50   ` Bin Meng
  2 siblings, 1 reply; 8+ messages in thread
From: Simon Glass @ 2017-06-02  2:55 UTC (permalink / raw)
  To: u-boot

On 1 June 2017 at 04:41, Bin Meng <bmeng.cn@gmail.com> wrote:
> It was observed that when -DDEBUG is used to generate a debug build,
> U-Boot does not boot on MinnowMax board. A workaround is to disable
> CONFIG_DEBUG_UART. The real issue is that in order to have the debug
> uart to work, BayTrail SoC needs to be configured so that its internal
> uart is available to be used as the debug uart.
>
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> ---
>
>  arch/x86/cpu/baytrail/Kconfig      | 4 ++++
>  arch/x86/cpu/baytrail/early_uart.c | 5 +++++
>  2 files changed, 9 insertions(+)

Great!

Reviewed-by: Simon Glass <sjg@chromium.org>

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

* [U-Boot] [PATCH 2/2] x86: fsp: Remove the call to set up internal uart in fsp_init()
  2017-06-01 10:41 ` [U-Boot] [PATCH 2/2] x86: fsp: Remove the call to set up internal uart in fsp_init() Bin Meng
  2017-06-01 10:58   ` Stefan Roese
@ 2017-06-02  2:56   ` Simon Glass
  2017-06-02  6:51     ` Bin Meng
  1 sibling, 1 reply; 8+ messages in thread
From: Simon Glass @ 2017-06-02  2:56 UTC (permalink / raw)
  To: u-boot

On 1 June 2017 at 04:41, Bin Meng <bmeng.cn@gmail.com> wrote:
> First of all, it's inappropriate to call setup_internal_uart() in a
> generic API fsp_init(), as CONFIG_INTERNAL_UART is an option that
> is only available on BayTrail platform. Secondly even for BayTrail,
> there is no need to call setup_internal_uart() at all, as Intel FSP
> will do this for us.
>
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
>
> ---
>
>  arch/x86/lib/fsp/fsp_support.c | 4 ----
>  1 file changed, 4 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

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

* [U-Boot] [PATCH 1/2] x86: baytrail: Fix boot hang with a debug build
  2017-06-02  2:55 ` Simon Glass
@ 2017-06-02  6:50   ` Bin Meng
  0 siblings, 0 replies; 8+ messages in thread
From: Bin Meng @ 2017-06-02  6:50 UTC (permalink / raw)
  To: u-boot

On Fri, Jun 2, 2017 at 10:55 AM, Simon Glass <sjg@chromium.org> wrote:
> On 1 June 2017 at 04:41, Bin Meng <bmeng.cn@gmail.com> wrote:
>> It was observed that when -DDEBUG is used to generate a debug build,
>> U-Boot does not boot on MinnowMax board. A workaround is to disable
>> CONFIG_DEBUG_UART. The real issue is that in order to have the debug
>> uart to work, BayTrail SoC needs to be configured so that its internal
>> uart is available to be used as the debug uart.
>>
>> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
>> ---
>>
>>  arch/x86/cpu/baytrail/Kconfig      | 4 ++++
>>  arch/x86/cpu/baytrail/early_uart.c | 5 +++++
>>  2 files changed, 9 insertions(+)
>
> Great!
>
> Reviewed-by: Simon Glass <sjg@chromium.org>

applied to u-boot-x86, thanks!

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

* [U-Boot] [PATCH 2/2] x86: fsp: Remove the call to set up internal uart in fsp_init()
  2017-06-02  2:56   ` Simon Glass
@ 2017-06-02  6:51     ` Bin Meng
  0 siblings, 0 replies; 8+ messages in thread
From: Bin Meng @ 2017-06-02  6:51 UTC (permalink / raw)
  To: u-boot

On Fri, Jun 2, 2017 at 10:56 AM, Simon Glass <sjg@chromium.org> wrote:
> On 1 June 2017 at 04:41, Bin Meng <bmeng.cn@gmail.com> wrote:
>> First of all, it's inappropriate to call setup_internal_uart() in a
>> generic API fsp_init(), as CONFIG_INTERNAL_UART is an option that
>> is only available on BayTrail platform. Secondly even for BayTrail,
>> there is no need to call setup_internal_uart() at all, as Intel FSP
>> will do this for us.
>>
>> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
>>
>> ---
>>
>>  arch/x86/lib/fsp/fsp_support.c | 4 ----
>>  1 file changed, 4 deletions(-)
>
> Reviewed-by: Simon Glass <sjg@chromium.org>

applied to u-boot-x86, thanks!

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

end of thread, other threads:[~2017-06-02  6:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-01 10:41 [U-Boot] [PATCH 1/2] x86: baytrail: Fix boot hang with a debug build Bin Meng
2017-06-01 10:41 ` [U-Boot] [PATCH 2/2] x86: fsp: Remove the call to set up internal uart in fsp_init() Bin Meng
2017-06-01 10:58   ` Stefan Roese
2017-06-02  2:56   ` Simon Glass
2017-06-02  6:51     ` Bin Meng
2017-06-01 10:57 ` [U-Boot] [PATCH 1/2] x86: baytrail: Fix boot hang with a debug build Stefan Roese
2017-06-02  2:55 ` Simon Glass
2017-06-02  6:50   ` Bin Meng

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.