[PATCH u-boot] Move UART setup outside DRAM init

Joel Stanley joel at jms.id.au
Mon Feb 22 11:57:41 AEDT 2016


Hey Norm,

On Sat, Feb 20, 2016 at 5:41 AM, OpenBMC Patches
<openbmc-patches at stwcx.xyz> wrote:
> From: Norman James <njames at us.ibm.com>
>
> Signed-off-by: Norman James <nkskjames at gmail.com>

We need a commit message here explaining why this change is being
made. Is there a bug you can reference?

Cheers,

Joel


> ---
>  board/aspeed/ast2400/platform.S | 81 +++++++++++++++++++++--------------------
>  1 file changed, 42 insertions(+), 39 deletions(-)
>
> diff --git a/board/aspeed/ast2400/platform.S b/board/aspeed/ast2400/platform.S
> index dd94da0..5e048a5 100644
> --- a/board/aspeed/ast2400/platform.S
> +++ b/board/aspeed/ast2400/platform.S
> @@ -184,6 +184,48 @@ LPC_Patch_E:
>
>  .globl lowlevel_init
>  lowlevel_init:
> +    /* setup UART */
> +    ldr r0, =CONFIG_ASPEED_COM_LCR
> +    mov r1, #0x83
> +    str r1, [r0]
> +
> +    ldr r0, =0x1e6e202c
> +    ldr r1, =0x00000010
> +    str r1, [r0]
> +
> +    ldr r2, [r0]
> +    mov r2, r2, lsr #12
> +    tst r2, #0x01
> +    ldr r0, =CONFIG_ASPEED_COM
> +#if CONFIG_BAUDRATE == 115200
> +    moveq r1, #0x0D                              @ Baudrate 115200
> +    movne r1, #0x01                              @ Baudrate 115200, div13
> +#endif
> +#if CONFIG_BAUDRATE == 57600
> +    moveq r1, #0x1A                              @ Baudrate 57600
> +    movne r1, #0x02                              @ Baudrate 57600, div13
> +#endif
> +#if CONFIG_BAUDRATE == 38400
> +    moveq r1, #0x27                              @ Baudrate 38400
> +    movne r1, #0x03                              @ Baudrate 38400 , div13
> +#endif
> +#if CONFIG_BAUDRATE == 9600
> +    moveq r1, #0x9c                              @ Baudrate 9600
> +    movne r1, #0x0C                              @ Baudrate 9600 , div13
> +#endif
> +    str r1, [r0]
> +
> +    ldr r0, =CONFIG_ASPEED_COM_IER
> +    mov r1, #0x00
> +    str r1, [r0]
> +
> +    ldr r0, =CONFIG_ASPEED_COM_LCR
> +    mov r1, #0x03
> +    str r1, [r0]
> +
> +    ldr r0, =CONFIG_ASPEED_COM_IIR
> +    mov r1, #0x07
> +    str r1, [r0]
>
>  init_dram:
>      /* save lr */
> @@ -338,45 +380,6 @@ set_MPLL:
>      ldr r1, =0xFFFF0000                          @ enable UART3 and UART4
>      str r1, [r0]
>
> -    ldr r0, =CONFIG_ASPEED_COM_LCR
> -    mov r1, #0x83
> -    str r1, [r0]
> -
> -    ldr r0, =0x1e6e202c
> -    ldr r2, [r0]
> -    mov r2, r2, lsr #12
> -    tst r2, #0x01
> -    ldr r0, =CONFIG_ASPEED_COM
> -#if CONFIG_BAUDRATE == 115200
> -    moveq r1, #0x0D                              @ Baudrate 115200
> -    movne r1, #0x01                              @ Baudrate 115200, div13
> -#endif
> -#if CONFIG_BAUDRATE == 57600
> -    moveq r1, #0x1A                              @ Baudrate 57600
> -    movne r1, #0x02                              @ Baudrate 57600, div13
> -#endif
> -#if CONFIG_BAUDRATE == 38400
> -    moveq r1, #0x27                              @ Baudrate 38400
> -    movne r1, #0x03                              @ Baudrate 38400 , div13
> -#endif
> -#if CONFIG_BAUDRATE == 9600
> -    moveq r1, #0x9c                              @ Baudrate 9600
> -    movne r1, #0x0C                              @ Baudrate 9600 , div13
> -#endif
> -    str r1, [r0]
> -
> -    ldr r0, =CONFIG_ASPEED_COM_IER
> -    mov r1, #0x00
> -    str r1, [r0]
> -
> -    ldr r0, =CONFIG_ASPEED_COM_LCR
> -    mov r1, #0x03
> -    str r1, [r0]
> -
> -    ldr r0, =CONFIG_ASPEED_COM_IIR
> -    mov r1, #0x07
> -    str r1, [r0]
> -
>      ldr r0, =CONFIG_ASPEED_COM
>      mov r1, #0x0D                                @ '\r'
>      str r1, [r0]
> --
> 2.7.1
>
>
> _______________________________________________
> openbmc mailing list
> openbmc at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/openbmc


More information about the openbmc mailing list