Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
reform-boundary-uboot
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jack Humbert
reform-boundary-uboot
Commits
54705016
Commit
54705016
authored
6 years ago
by
Alexey Brodkin
Browse files
Options
Downloads
Patches
Plain Diff
serial/serial_arc: Implement debug serial
Signed-off-by:
Alexey Brodkin
<
abrodkin@synopsys.com
>
parent
d7ac185f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
drivers/serial/Kconfig
+9
-0
9 additions, 0 deletions
drivers/serial/Kconfig
drivers/serial/serial_arc.c
+26
-0
26 additions, 0 deletions
drivers/serial/serial_arc.c
with
35 additions
and
0 deletions
drivers/serial/Kconfig
+
9
−
0
View file @
54705016
...
...
@@ -197,6 +197,15 @@ config DEBUG_UART_AR933X
driver will be available until the real driver model serial is
running.
config DEBUG_ARC_SERIAL
bool "ARC UART"
depends on ARC_SERIAL
help
Select this to enable a debug UART using the ARC UART driver.
You will need to provide parameters to make this work. The
driver will be available until the real driver model serial is
running.
config DEBUG_UART_ATMEL
bool "Atmel USART"
help
...
...
This diff is collapsed.
Click to expand it.
drivers/serial/serial_arc.c
+
26
−
0
View file @
54705016
...
...
@@ -130,3 +130,29 @@ U_BOOT_DRIVER(serial_arc) = {
.
ops
=
&
arc_serial_ops
,
.
flags
=
DM_FLAG_PRE_RELOC
,
};
#ifdef CONFIG_DEBUG_ARC_SERIAL
#include
<debug_uart.h>
static
inline
void
_debug_uart_init
(
void
)
{
struct
arc_serial_regs
*
regs
=
(
struct
arc_serial_regs
*
)
CONFIG_DEBUG_UART_BASE
;
int
arc_console_baud
=
CONFIG_DEBUG_UART_CLOCK
/
(
CONFIG_BAUDRATE
*
4
)
-
1
;
writeb
(
arc_console_baud
&
0xff
,
&
regs
->
baudl
);
writeb
((
arc_console_baud
&
0xff00
)
>>
8
,
&
regs
->
baudh
);
}
static
inline
void
_debug_uart_putc
(
int
c
)
{
struct
arc_serial_regs
*
regs
=
(
struct
arc_serial_regs
*
)
CONFIG_DEBUG_UART_BASE
;
while
(
!
(
readb
(
&
regs
->
status
)
&
UART_TXEMPTY
))
;
writeb
(
c
,
&
regs
->
data
);
}
DEBUG_UART_FUNCS
#endif
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment