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
0e49c8cf
Commit
0e49c8cf
authored
Nov 04, 2002
by
Russell King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SERIAL] Fix up ARM serial drivers
This cset makes ARM serial drivers build.
parent
e51d259e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
10 deletions
+18
-10
drivers/serial/amba.c
drivers/serial/amba.c
+2
-2
drivers/serial/anakin.c
drivers/serial/anakin.c
+8
-4
drivers/serial/clps711x.c
drivers/serial/clps711x.c
+4
-2
drivers/serial/uart00.c
drivers/serial/uart00.c
+4
-2
No files found.
drivers/serial/amba.c
View file @
0e49c8cf
...
@@ -231,7 +231,7 @@ static void ambauart_tx_chars(struct uart_port *port)
...
@@ -231,7 +231,7 @@ static void ambauart_tx_chars(struct uart_port *port)
return
;
return
;
}
}
if
(
uart_circ_empty
(
xmit
)
||
uart_tx_stopped
(
port
))
{
if
(
uart_circ_empty
(
xmit
)
||
uart_tx_stopped
(
port
))
{
ambauart_stop_tx
(
port
);
ambauart_stop_tx
(
port
,
0
);
return
;
return
;
}
}
...
@@ -248,7 +248,7 @@ static void ambauart_tx_chars(struct uart_port *port)
...
@@ -248,7 +248,7 @@ static void ambauart_tx_chars(struct uart_port *port)
uart_write_wakeup
(
port
);
uart_write_wakeup
(
port
);
if
(
uart_circ_empty
(
xmit
))
if
(
uart_circ_empty
(
xmit
))
ambauart_stop_tx
(
port
);
ambauart_stop_tx
(
port
,
0
);
}
}
static
void
ambauart_modem_status
(
struct
uart_port
*
port
)
static
void
ambauart_modem_status
(
struct
uart_port
*
port
)
...
...
drivers/serial/anakin.c
View file @
0e49c8cf
...
@@ -69,7 +69,8 @@ anakin_transmit_buffer(struct uart_port *port)
...
@@ -69,7 +69,8 @@ anakin_transmit_buffer(struct uart_port *port)
{
{
struct
circ_buf
*
xmit
=
&
port
->
info
->
xmit
;
struct
circ_buf
*
xmit
=
&
port
->
info
->
xmit
;
while
(
!
(
anakin_in
(
port
,
0x10
)
&
TXEMPTY
));
while
(
!
(
anakin_in
(
port
,
0x10
)
&
TXEMPTY
))
barrier
();
anakin_out
(
port
,
0x14
,
xmit
->
buf
[
xmit
->
tail
]);
anakin_out
(
port
,
0x14
,
xmit
->
buf
[
xmit
->
tail
]);
anakin_out
(
port
,
0x18
,
anakin_in
(
port
,
0x18
)
|
SENDREQUEST
);
anakin_out
(
port
,
0x18
,
anakin_in
(
port
,
0x18
)
|
SENDREQUEST
);
xmit
->
tail
=
(
xmit
->
tail
+
1
)
&
(
UART_XMIT_SIZE
-
1
);
xmit
->
tail
=
(
xmit
->
tail
+
1
)
&
(
UART_XMIT_SIZE
-
1
);
...
@@ -386,7 +387,8 @@ anakin_console_write(struct console *co, const char *s, unsigned int count)
...
@@ -386,7 +387,8 @@ anakin_console_write(struct console *co, const char *s, unsigned int count)
* Now, do each character
* Now, do each character
*/
*/
for
(
i
=
0
;
i
<
count
;
i
++
,
s
++
)
{
for
(
i
=
0
;
i
<
count
;
i
++
,
s
++
)
{
while
(
!
(
anakin_in
(
port
,
0x10
)
&
TXEMPTY
));
while
(
!
(
anakin_in
(
port
,
0x10
)
&
TXEMPTY
))
barrier
();
/*
/*
* Send the character out.
* Send the character out.
...
@@ -396,7 +398,8 @@ anakin_console_write(struct console *co, const char *s, unsigned int count)
...
@@ -396,7 +398,8 @@ anakin_console_write(struct console *co, const char *s, unsigned int count)
anakin_out
(
port
,
0x18
,
anakin_in
(
port
,
0x18
)
|
SENDREQUEST
);
anakin_out
(
port
,
0x18
,
anakin_in
(
port
,
0x18
)
|
SENDREQUEST
);
if
(
*
s
==
10
)
{
if
(
*
s
==
10
)
{
while
(
!
(
anakin_in
(
port
,
0x10
)
&
TXEMPTY
));
while
(
!
(
anakin_in
(
port
,
0x10
)
&
TXEMPTY
))
barrier
();
anakin_out
(
port
,
0x14
,
13
);
anakin_out
(
port
,
0x14
,
13
);
anakin_out
(
port
,
0x18
,
anakin_in
(
port
,
0x18
)
anakin_out
(
port
,
0x18
,
anakin_in
(
port
,
0x18
)
|
SENDREQUEST
);
|
SENDREQUEST
);
...
@@ -407,7 +410,8 @@ anakin_console_write(struct console *co, const char *s, unsigned int count)
...
@@ -407,7 +410,8 @@ anakin_console_write(struct console *co, const char *s, unsigned int count)
* Finally, wait for transmitter to become empty
* Finally, wait for transmitter to become empty
* and restore the interrupts
* and restore the interrupts
*/
*/
while
(
!
(
anakin_in
(
port
,
0x10
)
&
TXEMPTY
));
while
(
!
(
anakin_in
(
port
,
0x10
)
&
TXEMPTY
))
barrier
();
if
(
status
&
IRQENABLE
)
{
if
(
status
&
IRQENABLE
)
{
local_irq_save
(
flags
);
local_irq_save
(
flags
);
...
...
drivers/serial/clps711x.c
View file @
0e49c8cf
...
@@ -193,7 +193,7 @@ static void clps711xuart_int_tx(int irq, void *dev_id, struct pt_regs *regs)
...
@@ -193,7 +193,7 @@ static void clps711xuart_int_tx(int irq, void *dev_id, struct pt_regs *regs)
return
;
return
;
}
}
if
(
uart_circ_empty
(
xmit
)
||
uart_tx_stopped
(
port
))
{
if
(
uart_circ_empty
(
xmit
)
||
uart_tx_stopped
(
port
))
{
clps711xuart_stop_tx
(
port
);
clps711xuart_stop_tx
(
port
,
0
);
return
;
return
;
}
}
...
@@ -210,7 +210,7 @@ static void clps711xuart_int_tx(int irq, void *dev_id, struct pt_regs *regs)
...
@@ -210,7 +210,7 @@ static void clps711xuart_int_tx(int irq, void *dev_id, struct pt_regs *regs)
uart_write_wakeup
(
port
);
uart_write_wakeup
(
port
);
if
(
uart_circ_empty
(
xmit
))
if
(
uart_circ_empty
(
xmit
))
clps711xuart_stop_tx
(
port
);
clps711xuart_stop_tx
(
port
,
0
);
}
}
static
unsigned
int
clps711xuart_tx_empty
(
struct
uart_port
*
port
)
static
unsigned
int
clps711xuart_tx_empty
(
struct
uart_port
*
port
)
...
@@ -425,6 +425,7 @@ static struct uart_port clps711x_ports[UART_NR] = {
...
@@ -425,6 +425,7 @@ static struct uart_port clps711x_ports[UART_NR] = {
.
uartclk
=
3686400
,
.
uartclk
=
3686400
,
.
fifosize
=
16
,
.
fifosize
=
16
,
.
ops
=
&
clps711x_pops
,
.
ops
=
&
clps711x_pops
,
.
line
=
0
,
.
flags
=
ASYNC_BOOT_AUTOCONF
,
.
flags
=
ASYNC_BOOT_AUTOCONF
,
},
},
{
{
...
@@ -433,6 +434,7 @@ static struct uart_port clps711x_ports[UART_NR] = {
...
@@ -433,6 +434,7 @@ static struct uart_port clps711x_ports[UART_NR] = {
.
uartclk
=
3686400
,
.
uartclk
=
3686400
,
.
fifosize
=
16
,
.
fifosize
=
16
,
.
ops
=
&
clps711x_pops
,
.
ops
=
&
clps711x_pops
,
.
line
=
1
,
.
flags
=
ASYNC_BOOT_AUTOCONF
,
.
flags
=
ASYNC_BOOT_AUTOCONF
,
}
}
};
};
...
...
drivers/serial/uart00.c
View file @
0e49c8cf
...
@@ -193,7 +193,8 @@ static void uart00_tx_chars(struct uart_port *port)
...
@@ -193,7 +193,8 @@ static void uart00_tx_chars(struct uart_port *port)
int
count
;
int
count
;
if
(
port
->
x_char
)
{
if
(
port
->
x_char
)
{
while
((
UART_GET_TSR
(
port
)
&
UART_TSR_TX_LEVEL_MSK
)
==
15
);
while
((
UART_GET_TSR
(
port
)
&
UART_TSR_TX_LEVEL_MSK
)
==
15
)
barrier
();
UART_PUT_CHAR
(
port
,
port
->
x_char
);
UART_PUT_CHAR
(
port
,
port
->
x_char
);
port
->
icount
.
tx
++
;
port
->
icount
.
tx
++
;
port
->
x_char
=
0
;
port
->
x_char
=
0
;
...
@@ -206,7 +207,8 @@ static void uart00_tx_chars(struct uart_port *port)
...
@@ -206,7 +207,8 @@ static void uart00_tx_chars(struct uart_port *port)
count
=
port
->
fifosize
>>
1
;
count
=
port
->
fifosize
>>
1
;
do
{
do
{
while
((
UART_GET_TSR
(
port
)
&
UART_TSR_TX_LEVEL_MSK
)
==
15
);
while
((
UART_GET_TSR
(
port
)
&
UART_TSR_TX_LEVEL_MSK
)
==
15
)
barrier
();
UART_PUT_CHAR
(
port
,
xmit
->
buf
[
xmit
->
tail
]);
UART_PUT_CHAR
(
port
,
xmit
->
buf
[
xmit
->
tail
]);
xmit
->
tail
=
(
xmit
->
tail
+
1
)
&
(
UART_XMIT_SIZE
-
1
);
xmit
->
tail
=
(
xmit
->
tail
+
1
)
&
(
UART_XMIT_SIZE
-
1
);
port
->
icount
.
tx
++
;
port
->
icount
.
tx
++
;
...
...
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