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
9793e035
Unverified
Commit
9793e035
authored
Nov 13, 2018
by
Antonio Niño Díaz
Committed by
GitHub
Nov 13, 2018
Browse files
Merge pull request #1677 from acolinisi/PR--drivers-cadence-uart-prototype
cadence: uart: comply to console_register prototype
parents
91ece4e2
23b6fa4e
Changes
2
Hide whitespace changes
Inline
Side-by-side
drivers/cadence/uart/aarch64/cdns_console.S
View file @
9793e035
...
...
@@ -56,21 +56,23 @@ endfunc console_cdns_core_init
.
globl
console_cdns_register
/
*
-----------------------------------------------
*
int
console_cdns_register
(
uint
64
_t
baseaddr
,
*
int
console_cdns_register
(
uint
ptr
_t
baseaddr
,
*
uint32_t
clock
,
uint32_t
baud
,
*
console_cdns_t
*
console
)
;
*
Function
to
initialize
and
register
a
new
CDNS
*
console
.
Storage
passed
in
for
the
console
struct
*
*
must
*
be
persistent
(
i
.
e
.
not
from
the
stack
)
.
*
In
:
x0
-
UART
register
base
address
*
x1
-
pointer
to
empty
console_cdns_t
struct
*
w1
-
UART
clock
in
Hz
*
w2
-
Baud
rate
*
x3
-
pointer
to
empty
console_16550_t
struct
*
Out
:
return
1
on
success
,
0
on
error
*
Clobber
list
:
x0
,
x1
,
x2
,
x6
,
x7
,
x14
*
-----------------------------------------------
*/
func
console_cdns_register
mov
x7
,
x30
mov
x6
,
x
1
mov
x6
,
x
3
cbz
x6
,
register_fail
str
x0
,
[
x6
,
#
CONSOLE_T_CDNS_BASE
]
...
...
@@ -78,7 +80,7 @@ func console_cdns_register
cbz
x0
,
register_fail
mov
x0
,
x6
mov
x30
,
v
7
mov
x30
,
x
7
finish_console_register
cdns
putc
=
1
,
getc
=
1
,
flush
=
1
register_fail
:
...
...
include/drivers/cadence/cdns_uart.h
View file @
9793e035
...
...
@@ -42,7 +42,7 @@ typedef struct {
* for the lifetime of the console, such as a global or static local variable.
* Its contents will be reinitialized from scratch.
*/
int
console_cdns_register
(
uint
64
_t
baseaddr
,
uint32_t
clock
,
uint32_t
baud
,
int
console_cdns_register
(
uint
ptr
_t
baseaddr
,
uint32_t
clock
,
uint32_t
baud
,
console_cdns_t
*
console
);
#endif
/*__ASSEMBLY__*/
...
...
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