Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
f6b79544
Unverified
Commit
f6b79544
authored
Jan 16, 2019
by
Antonio Niño Díaz
Committed by
GitHub
Jan 16, 2019
Browse files
Merge pull request #1755 from Anson-Huang/lpuart
make lpuart and imx uart work for debug mode
parents
8013bb57
2e8ab4f5
Changes
4
Hide whitespace changes
Inline
Side-by-side
plat/imx/common/imx_uart_console.S
View file @
f6b79544
/*
/*
*
Copyright
(
c
)
2018
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
Copyright
(
c
)
2018
-
2019
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
*
*
SPDX
-
License
-
Identifier
:
BSD
-
3
-
Clause
*
SPDX
-
License
-
Identifier
:
BSD
-
3
-
Clause
*/
*/
...
@@ -16,10 +16,11 @@
...
@@ -16,10 +16,11 @@
#define UTS 0xb4 /* UART Test Register (mx31) */
#define UTS 0xb4 /* UART Test Register (mx31) */
#define URXD_RX_DATA (0xFF)
#define URXD_RX_DATA (0xFF)
.
globl
console_uart_register
.
globl
console_imx_uart_register
.
globl
console_uart_init
.
globl
console_imx_uart_init
.
globl
console_uart_putc
.
globl
console_imx_uart_putc
.
globl
console_uart_getc
.
globl
console_imx_uart_getc
.
globl
console_imx_uart_flush
func
console_imx_uart_register
func
console_imx_uart_register
mov
x7
,
x30
mov
x7
,
x30
...
@@ -32,7 +33,7 @@ func console_imx_uart_register
...
@@ -32,7 +33,7 @@ func console_imx_uart_register
mov
x0
,
x6
mov
x0
,
x6
mov
x30
,
x7
mov
x30
,
x7
finish_console_register
imx_uart
putc
=
1
,
getc
=
1
finish_console_register
imx_uart
putc
=
1
,
getc
=
1
,
flush
=
1
register_fail
:
register_fail
:
ret
x7
ret
x7
...
@@ -82,3 +83,8 @@ getc_error:
...
@@ -82,3 +83,8 @@ getc_error:
mov
w0
,
#-
1
mov
w0
,
#-
1
ret
ret
endfunc
console_imx_uart_getc
endfunc
console_imx_uart_getc
func
console_imx_uart_flush
mov
x0
,
#
0
ret
endfunc
console_imx_uart_flush
plat/imx/common/include/imx_uart.h
View file @
f6b79544
/*
/*
* Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2018
-2019
, ARM Limited and Contributors. All rights reserved.
*
*
* SPDX-License-Identifier: BSD-3-Clause
* SPDX-License-Identifier: BSD-3-Clause
*/
*/
...
@@ -16,7 +16,7 @@ typedef struct {
...
@@ -16,7 +16,7 @@ typedef struct {
uintptr_t
base
;
uintptr_t
base
;
}
console_uart_t
;
}
console_uart_t
;
int
console_uart_register
(
uintptr_t
baseaddr
,
uint32_t
clock
,
uint32_t
baud
,
int
console_
imx_
uart_register
(
uintptr_t
baseaddr
,
uint32_t
clock
,
uint32_t
baud
,
console_uart_t
*
console
);
console_uart_t
*
console
);
#endif
/*__ASSEMBLY__*/
#endif
/*__ASSEMBLY__*/
...
...
plat/imx/common/lpuart_console.S
View file @
f6b79544
/*
/*
*
Copyright
(
c
)
2015
-
201
8
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
Copyright
(
c
)
2015
-
201
9
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
*
*
SPDX
-
License
-
Identifier
:
BSD
-
3
-
Clause
*
SPDX
-
License
-
Identifier
:
BSD
-
3
-
Clause
*/
*/
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
.
globl
console_lpuart_init
.
globl
console_lpuart_init
.
globl
console_lpuart_putc
.
globl
console_lpuart_putc
.
globl
console_lpuart_getc
.
globl
console_lpuart_getc
.
globl
console_lpuart_flush
func
console_lpuart_register
func
console_lpuart_register
mov
x7
,
x30
mov
x7
,
x30
...
@@ -27,7 +28,7 @@ func console_lpuart_register
...
@@ -27,7 +28,7 @@ func console_lpuart_register
mov
x0
,
x6
mov
x0
,
x6
mov
x30
,
x7
mov
x30
,
x7
finish_console_register
lpuart
putc
=
1
,
getc
=
1
finish_console_register
lpuart
putc
=
1
,
getc
=
1
,
flush
=
1
register_fail
:
register_fail
:
ret
x7
ret
x7
...
@@ -70,3 +71,8 @@ getc_error:
...
@@ -70,3 +71,8 @@ getc_error:
mov
w0
,
#-
1
mov
w0
,
#-
1
ret
ret
endfunc
console_lpuart_getc
endfunc
console_lpuart_getc
func
console_lpuart_flush
mov
x0
,
#
0
ret
endfunc
console_lpuart_flush
plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
View file @
f6b79544
/*
/*
* Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2018
-2019
, ARM Limited and Contributors. All rights reserved.
*
*
* SPDX-License-Identifier: BSD-3-Clause
* SPDX-License-Identifier: BSD-3-Clause
*/
*/
...
@@ -87,7 +87,7 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
...
@@ -87,7 +87,7 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
#if DEBUG_CONSOLE
#if DEBUG_CONSOLE
static
console_uart_t
console
;
static
console_uart_t
console
;
console_uart_register
(
IMX_BOOT_UART_BASE
,
IMX_BOOT_UART_CLK_IN_HZ
,
console_
imx_
uart_register
(
IMX_BOOT_UART_BASE
,
IMX_BOOT_UART_CLK_IN_HZ
,
IMX_CONSOLE_BAUDRATE
,
&
console
);
IMX_CONSOLE_BAUDRATE
,
&
console
);
#endif
#endif
/*
/*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment