Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
xenomai
ipipe
Commits
6ea4ff28
Commit
6ea4ff28
authored
Dec 02, 2015
by
Philippe Gerum
Browse files
serial: xuartps: enable raw_printk() helper
parent
5e49e1d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
drivers/tty/serial/xilinx_uartps.c
View file @
6ea4ff28
...
...
@@ -1137,6 +1137,33 @@ static void cdns_uart_console_write(struct console *co, const char *s,
spin_unlock_irqrestore
(
&
port
->
lock
,
flags
);
}
#ifdef CONFIG_RAW_PRINTK
static
void
cdns_uart_console_write_raw
(
struct
console
*
co
,
const
char
*
s
,
unsigned
int
count
)
{
struct
uart_port
*
port
=
&
cdns_uart_port
[
co
->
index
];
unsigned
int
imr
,
ctrl
;
imr
=
cdns_uart_readl
(
CDNS_UART_IMR_OFFSET
);
cdns_uart_writel
(
imr
,
CDNS_UART_IDR_OFFSET
);
ctrl
=
cdns_uart_readl
(
CDNS_UART_CR_OFFSET
);
cdns_uart_writel
((
ctrl
&
~
CDNS_UART_CR_TX_DIS
)
|
CDNS_UART_CR_TX_EN
,
CDNS_UART_CR_OFFSET
);
while
(
count
--
>
0
)
{
if
(
*
s
==
'\n'
)
cdns_uart_writel
(
'\r'
,
CDNS_UART_FIFO_OFFSET
);
cdns_uart_writel
(
*
s
++
,
CDNS_UART_FIFO_OFFSET
);
}
cdns_uart_writel
(
ctrl
,
CDNS_UART_CR_OFFSET
);
cdns_uart_writel
(
imr
,
CDNS_UART_IER_OFFSET
);
}
#endif
/**
* cdns_uart_console_setup - Initialize the uart to default config
* @co: Console handle
...
...
@@ -1174,7 +1201,12 @@ static struct console cdns_uart_console = {
.
write
=
cdns_uart_console_write
,
.
device
=
uart_console_device
,
.
setup
=
cdns_uart_console_setup
,
#ifdef CONFIG_RAW_PRINTK
.
write_raw
=
cdns_uart_console_write_raw
,
.
flags
=
CON_PRINTBUFFER
|
CON_RAW
,
#else
.
flags
=
CON_PRINTBUFFER
,
#endif
.
index
=
-
1
,
/* Specified on the cmdline (e.g. console=ttyPS ) */
.
data
=
&
cdns_uart_uart_driver
,
};
...
...
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