diff mbox

[u-boot,v2016.07-aspeed-openbmc] Aspeed: ast-g5 change configuration order to allow 2-nd boot

Message ID 20170602091701.189794-1-c_mykolak@mellanox.com
State Accepted, archived
Headers show

Commit Message

Mykola Kostenok June 2, 2017, 9:17 a.m. UTC
Add configuration for FIRMWARE_2ND_BOOT.
Change SYS_CONFIG_NAME default order to use ast-g5-ncsi-2boot
if FIRMWARE_2ND_BOOT is set.

Signed-off-by: Mykola Kostenok <c_mykolak@mellanox.com>
---
 board/aspeed/ast-g5/Kconfig | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Joel Stanley June 26, 2017, 10:15 a.m. UTC | #1
On Fri, Jun 2, 2017 at 6:47 PM, Mykola Kostenok <c_mykolak@mellanox.com> wrote:
> +config FIRMWARE_2ND_BOOT
> +       bool "Firmware second boot WD2 enable."
> +       default n

Looking at the most recent platform.S for the G5:

/******************************************************************************
 Disable WDT2 for 2nd boot function
 ******************************************************************************/
/*
#ifndef CONFIG_FIRMWARE_2ND_BOOT
    ldr   r0, =0x1e78502c
    mov   r1, #0
    str   r1, [r0]
#endif

By setting this option we disable this code, so we do not clear the
WDT2 status register.

The help text for your Kconfig option is confusing; I would think that
it means we enable WDT2.

Can you clarify?

Cheers,

Joel
Mykola Kostenok June 26, 2017, 1:46 p.m. UTC | #2
Thanks for your attention.

Best regards. Mykola Kostenok.

> -----Original Message-----

> From: joel.stan@gmail.com [mailto:joel.stan@gmail.com] On Behalf Of Joel

> Stanley

> Sent: Monday, June 26, 2017 1:15 PM

> To: Mykola Kostenok <c_mykolak@mellanox.com>

> Cc: OpenBMC Maillist <openbmc@lists.ozlabs.org>

> Subject: Re: [PATCH u-boot v2016.07-aspeed-openbmc] Aspeed: ast-g5

> change configuration order to allow 2-nd boot

> 

> On Fri, Jun 2, 2017 at 6:47 PM, Mykola Kostenok

> <c_mykolak@mellanox.com> wrote:

> > +config FIRMWARE_2ND_BOOT

> > +       bool "Firmware second boot WD2 enable."

> > +       default n

> 

> Looking at the most recent platform.S for the G5:

> 

> /**********************************************************

> ********************

>  Disable WDT2 for 2nd boot function

> 

> **********************************************************

> ********************/

> /*

> #ifndef CONFIG_FIRMWARE_2ND_BOOT

>     ldr   r0, =0x1e78502c

>     mov   r1, #0

>     str   r1, [r0]

> #endif

> 

> By setting this option we disable this code, so we do not clear the

> WDT2 status register.

> 

> The help text for your Kconfig option is confusing; I would think that it means

> we enable WDT2.

> 

> Can you clarify?

>


We can change help text to "Firmware second boot support enable".
By default after power up WDT2 enabled. This code disable WDT2 in u-boot.
So when CONFIG_FIRMWARE_2ND_BOOT defined - WDT2 not disabled in u-boot.

 
> Cheers,

> 

> Joel
Joel Stanley June 26, 2017, 1:49 p.m. UTC | #3
On Mon, Jun 26, 2017 at 11:16 PM, Mykola Kostenok
<c_mykolak@mellanox.com> wrote:
> Thanks for your attention.
>
> Best regards. Mykola Kostenok.
>
>> -----Original Message-----
>> From: joel.stan@gmail.com [mailto:joel.stan@gmail.com] On Behalf Of Joel
>> Stanley
>> Sent: Monday, June 26, 2017 1:15 PM
>> To: Mykola Kostenok <c_mykolak@mellanox.com>
>> Cc: OpenBMC Maillist <openbmc@lists.ozlabs.org>
>> Subject: Re: [PATCH u-boot v2016.07-aspeed-openbmc] Aspeed: ast-g5
>> change configuration order to allow 2-nd boot
>>
>> On Fri, Jun 2, 2017 at 6:47 PM, Mykola Kostenok
>> <c_mykolak@mellanox.com> wrote:
>> > +config FIRMWARE_2ND_BOOT
>> > +       bool "Firmware second boot WD2 enable."
>> > +       default n
>>
>> Looking at the most recent platform.S for the G5:
>>
>> /**********************************************************
>> ********************
>>  Disable WDT2 for 2nd boot function
>>
>> **********************************************************
>> ********************/
>> /*
>> #ifndef CONFIG_FIRMWARE_2ND_BOOT
>>     ldr   r0, =0x1e78502c
>>     mov   r1, #0
>>     str   r1, [r0]
>> #endif
>>
>> By setting this option we disable this code, so we do not clear the
>> WDT2 status register.
>>
>> The help text for your Kconfig option is confusing; I would think that it means
>> we enable WDT2.
>>
>> Can you clarify?
>>
>
> We can change help text to "Firmware second boot support enable".
> By default after power up WDT2 enabled. This code disable WDT2 in u-boot.
> So when CONFIG_FIRMWARE_2ND_BOOT defined - WDT2 not disabled in u-boot.

Ok. The current version of platform.S has this entire chunk commented
out, so the state of CONFIG_FIRMWARE_2ND_BOOT is irrelevant.

 https://github.com/openbmc/u-boot/blob/ed9e4abbf3f0aab348bc64d5439aadda03f42e4c/arch/arm/mach-aspeed/platform_g5.S#L612

Do you need WDT2 disabled in u-boot? With your other changes applied
you should be able to drop to the prompt, etc, and the watchdog is
serviced.
Mykola Kostenok June 26, 2017, 2:13 p.m. UTC | #4
> -----Original Message-----

> From: joel.stan@gmail.com [mailto:joel.stan@gmail.com] On Behalf Of Joel

> Stanley

> Sent: Monday, June 26, 2017 4:49 PM

> To: Mykola Kostenok <c_mykolak@mellanox.com>

> Cc: OpenBMC Maillist <openbmc@lists.ozlabs.org>

> Subject: Re: [PATCH u-boot v2016.07-aspeed-openbmc] Aspeed: ast-g5

> change configuration order to allow 2-nd boot

> 

> On Mon, Jun 26, 2017 at 11:16 PM, Mykola Kostenok

> <c_mykolak@mellanox.com> wrote:

> > Thanks for your attention.

> >

> > Best regards. Mykola Kostenok.

> >

> >> -----Original Message-----

> >> From: joel.stan@gmail.com [mailto:joel.stan@gmail.com] On Behalf Of

> >> Joel Stanley

> >> Sent: Monday, June 26, 2017 1:15 PM

> >> To: Mykola Kostenok <c_mykolak@mellanox.com>

> >> Cc: OpenBMC Maillist <openbmc@lists.ozlabs.org>

> >> Subject: Re: [PATCH u-boot v2016.07-aspeed-openbmc] Aspeed: ast-g5

> >> change configuration order to allow 2-nd boot

> >>

> >> On Fri, Jun 2, 2017 at 6:47 PM, Mykola Kostenok

> >> <c_mykolak@mellanox.com> wrote:

> >> > +config FIRMWARE_2ND_BOOT

> >> > +       bool "Firmware second boot WD2 enable."

> >> > +       default n

> >>

> >> Looking at the most recent platform.S for the G5:

> >>

> >>

> /**********************************************************

> >> ********************

> >>  Disable WDT2 for 2nd boot function

> >>

> >>

> **********************************************************

> >> ********************/

> >> /*

> >> #ifndef CONFIG_FIRMWARE_2ND_BOOT

> >>     ldr   r0, =0x1e78502c

> >>     mov   r1, #0

> >>     str   r1, [r0]

> >> #endif

> >>

> >> By setting this option we disable this code, so we do not clear the

> >> WDT2 status register.

> >>

> >> The help text for your Kconfig option is confusing; I would think

> >> that it means we enable WDT2.

> >>

> >> Can you clarify?

> >>

> >

> > We can change help text to "Firmware second boot support enable".

> > By default after power up WDT2 enabled. This code disable WDT2 in u-

> boot.

> > So when CONFIG_FIRMWARE_2ND_BOOT defined - WDT2 not disabled in

> u-boot.

> 

> Ok. The current version of platform.S has this entire chunk commented out,

> so the state of CONFIG_FIRMWARE_2ND_BOOT is irrelevant.

> 

> 

> https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit

> hub.com%2Fopenbmc%2Fu-

> boot%2Fblob%2Fed9e4abbf3f0aab348bc64d5439aadda03f42e4c%2Farch%2F

> arm%2Fmach-

> aspeed%2Fplatform_g5.S%23L612&data=02%7C01%7Cc_mykolak%40mellan

> ox.com%7C1d1b9acc0c6a4c6d19cc08d4bc9a3585%7Ca652971c7d2e4d9ba6a4d

> 149256f461b%7C0%7C0%7C636340817923910931&sdata=7hb5WicBSG06b1%2

> FNsLgBg1dN%2BGiwAyjuCrzsccgkN%2B8%3D&reserved=0

> 

> Do you need WDT2 disabled in u-boot? With your other changes applied you

> should be able to drop to the prompt, etc, and the watchdog is serviced.


Sorry, I missed that this code was commented out.
No, we need WDT2 enabled. So its ok for us.
Thanks.

Best regards. Mykola Kostenok.
diff mbox

Patch

diff --git a/board/aspeed/ast-g5/Kconfig b/board/aspeed/ast-g5/Kconfig
index 0a8b38b9db..f5613ac297 100644
--- a/board/aspeed/ast-g5/Kconfig
+++ b/board/aspeed/ast-g5/Kconfig
@@ -15,9 +15,13 @@  config SYS_VENDOR
 config SYS_SOC
 	default "aspeed"
 
+config FIRMWARE_2ND_BOOT
+	bool "Firmware second boot WD2 enable."
+	default n
+
 config SYS_CONFIG_NAME
 	default "ast-g5-phy" if ASPEED_NET_PHY
-	default "ast-g5-ncsi" if ASPEED_NET_NCSI
 	default "ast-g5-ncsi-2boot" if ASPEED_NET_NCSI && FIRMWARE_2ND_BOOT
+	default "ast-g5-ncsi" if ASPEED_NET_NCSI
 
 endif