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-ppc32
Commits
48b180a0
Commit
48b180a0
authored
Dec 03, 2017
by
Philippe Gerum
Browse files
serial/xilinx: enable raw console channel
Enable the serial driver for raw_printk() output.
parent
ac92b6ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
drivers/tty/serial/xilinx_uartps.c
View file @
48b180a0
...
...
@@ -1263,6 +1263,34 @@ 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
=
readl
(
port
->
membase
+
CDNS_UART_IMR
);
writel
(
imr
,
port
->
membase
+
CDNS_UART_IDR
);
ctrl
=
readl
(
port
->
membase
+
CDNS_UART_CR
);
ctrl
&=
~
CDNS_UART_CR_TX_DIS
;
ctrl
|=
CDNS_UART_CR_TX_EN
;
writel
(
ctrl
,
port
->
membase
+
CDNS_UART_CR
);
while
(
count
--
>
0
)
{
if
(
*
s
==
'\n'
)
writel
(
'\r'
,
port
->
membase
+
CDNS_UART_FIFO
);
writel
(
*
s
++
,
port
->
membase
+
CDNS_UART_FIFO
);
}
writel
(
ctrl
,
port
->
membase
+
CDNS_UART_CR
);
writel
(
imr
,
port
->
membase
+
CDNS_UART_IER
);
}
#endif
/**
* cdns_uart_console_setup - Initialize the uart to default config
* @co: Console handle
...
...
@@ -1300,7 +1328,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