Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
08437cc3
Commit
08437cc3
authored
Aug 29, 2004
by
Russell King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SERIAL] 8250: add UART_CAP_SLEEP capability.
parent
e04f6ab5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
17 deletions
+18
-17
drivers/serial/8250.c
drivers/serial/8250.c
+17
-17
drivers/serial/8250.h
drivers/serial/8250.h
+1
-0
No files found.
drivers/serial/8250.c
View file @
08437cc3
...
...
@@ -164,13 +164,13 @@ static const struct serial8250_config uart_config[PORT_MAX_8250+1] = {
{
"16550"
,
1
,
1
,
0
},
{
"16550A"
,
16
,
16
,
UART_CAP_FIFO
},
{
"Cirrus"
,
1
,
1
,
0
},
{
"ST16650"
,
1
,
1
,
UART_CAP_FIFO
|
UART_STARTECH
},
{
"ST16650V2"
,
32
,
16
,
UART_CAP_FIFO
|
UART_STARTECH
},
{
"TI16750"
,
64
,
64
,
UART_CAP_FIFO
},
{
"ST16650"
,
1
,
1
,
UART_CAP_FIFO
|
UART_
CAP_SLEEP
|
UART_
STARTECH
},
{
"ST16650V2"
,
32
,
16
,
UART_CAP_FIFO
|
UART_
CAP_SLEEP
|
UART_
STARTECH
},
{
"TI16750"
,
64
,
64
,
UART_CAP_FIFO
|
UART_CAP_SLEEP
},
{
"Startech"
,
1
,
1
,
0
},
{
"16C950/954"
,
128
,
128
,
UART_CAP_FIFO
},
{
"ST16654"
,
64
,
32
,
UART_CAP_FIFO
|
UART_STARTECH
},
{
"XR16850"
,
128
,
128
,
UART_CAP_FIFO
|
UART_STARTECH
},
{
"ST16654"
,
64
,
32
,
UART_CAP_FIFO
|
UART_
CAP_SLEEP
|
UART_
STARTECH
},
{
"XR16850"
,
128
,
128
,
UART_CAP_FIFO
|
UART_
CAP_SLEEP
|
UART_
STARTECH
},
{
"RSA"
,
2048
,
2048
,
UART_CAP_FIFO
},
{
"NS16550A"
,
16
,
16
,
UART_CAP_FIFO
|
UART_NATSEMI
},
{
"XScale"
,
32
,
32
,
UART_CAP_FIFO
},
...
...
@@ -262,18 +262,18 @@ static inline void serial8250_clear_fifos(struct uart_8250_port *p)
*/
static
inline
void
serial8250_set_sleep
(
struct
uart_8250_port
*
p
,
int
sleep
)
{
if
(
up
->
capabilities
&
UART_STARTECH
)
{
serial_outp
(
up
,
UART_LCR
,
0xBF
);
serial_outp
(
up
,
UART_EFR
,
UART_EFR_ECB
);
serial_outp
(
up
,
UART_LCR
,
0
);
serial_outp
(
up
,
UART_IER
,
sleep
?
UART_IERX_SLEEP
:
0
);
serial_outp
(
up
,
UART_LCR
,
0xBF
);
serial_outp
(
up
,
UART_EFR
,
0
);
serial_outp
(
up
,
UART_LCR
,
0
);
if
(
p
->
capabilities
&
UART_CAP_SLEEP
)
{
if
(
p
->
capabilities
&
UART_STARTECH
)
{
serial_outp
(
p
,
UART_LCR
,
0xBF
);
serial_outp
(
p
,
UART_EFR
,
UART_EFR_ECB
);
serial_outp
(
p
,
UART_LCR
,
0
);
}
serial_outp
(
p
,
UART_IER
,
sleep
?
UART_IERX_SLEEP
:
0
);
if
(
p
->
capabilities
&
UART_STARTECH
)
{
serial_outp
(
p
,
UART_LCR
,
0xBF
);
serial_outp
(
p
,
UART_EFR
,
0
);
serial_outp
(
p
,
UART_LCR
,
0
);
}
if
(
up
->
port
.
type
==
PORT_16750
)
{
/* Arrange to enter sleep mode */
serial_outp
(
up
,
UART_IER
,
sleep
?
UART_IERX_SLEEP
:
0
);
}
}
...
...
drivers/serial/8250.h
View file @
08437cc3
...
...
@@ -44,6 +44,7 @@ struct serial8250_config {
};
#define UART_CAP_FIFO (1 << 8)
/* UART has FIFO */
#define UART_CAP_SLEEP (1 << 10)
/* UART has IER sleep */
#undef SERIAL_DEBUG_PCI
...
...
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