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
Kirill Smelkov
linux
Commits
42f70b95
Commit
42f70b95
authored
Aug 29, 2004
by
Russell King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SERIAL] Move XR16C850 Tx/Rx trigger level setup to startup code
parent
f5b17e99
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
17 deletions
+17
-17
drivers/serial/8250.c
drivers/serial/8250.c
+17
-17
No files found.
drivers/serial/8250.c
View file @
42f70b95
...
...
@@ -1258,6 +1258,23 @@ static int serial8250_startup(struct uart_port *port)
return
-
ENODEV
;
}
/*
* For a XR16C850, we need to set the trigger levels
*/
if
(
up
->
port
.
type
==
PORT_16850
)
{
unsigned
char
fctr
;
serial_outp
(
up
,
UART_LCR
,
0xbf
);
fctr
=
serial_inp
(
up
,
UART_FCTR
)
&
~
(
UART_FCTR_RX
|
UART_FCTR_TX
);
serial_outp
(
up
,
UART_FCTR
,
fctr
|
UART_FCTR_TRGD
|
UART_FCTR_RX
);
serial_outp
(
up
,
UART_TRG
,
UART_TRG_96
);
serial_outp
(
up
,
UART_FCTR
,
fctr
|
UART_FCTR_TRGD
|
UART_FCTR_TX
);
serial_outp
(
up
,
UART_TRG
,
UART_TRG_96
);
serial_outp
(
up
,
UART_LCR
,
0
);
}
/*
* If the "interrupt" for this port doesn't correspond with any
* hardware interrupt, we use a timer-based system. The original
...
...
@@ -1593,23 +1610,6 @@ serial8250_pm(struct uart_port *port, unsigned int state,
*/
serial_outp
(
up
,
UART_LCR
,
0xBF
);
serial_outp
(
up
,
UART_EFR
,
0
);
/*
* For a XR16C850, we need to set the trigger levels
*/
if
(
up
->
port
.
type
==
PORT_16850
)
{
unsigned
char
fctr
;
fctr
=
serial_inp
(
up
,
UART_FCTR
)
&
~
(
UART_FCTR_RX
|
UART_FCTR_TX
);
serial_outp
(
up
,
UART_FCTR
,
fctr
|
UART_FCTR_TRGD
|
UART_FCTR_RX
);
serial_outp
(
up
,
UART_TRG
,
UART_TRG_96
);
serial_outp
(
up
,
UART_FCTR
,
fctr
|
UART_FCTR_TRGD
|
UART_FCTR_TX
);
serial_outp
(
up
,
UART_TRG
,
UART_TRG_96
);
}
serial_outp
(
up
,
UART_LCR
,
0
);
}
...
...
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