Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
97af1128
Commit
97af1128
authored
Apr 26, 2005
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of kernel.org:/home/rmk/linux-2.6-serial.git
parents
1e14c33f
2b49abac
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
83 additions
and
110 deletions
+83
-110
drivers/serial/21285.c
drivers/serial/21285.c
+1
-1
drivers/serial/8250_hp300.c
drivers/serial/8250_hp300.c
+27
-26
drivers/serial/amba-pl010.c
drivers/serial/amba-pl010.c
+1
-1
drivers/serial/amba-pl011.c
drivers/serial/amba-pl011.c
+1
-1
drivers/serial/clps711x.c
drivers/serial/clps711x.c
+27
-38
drivers/serial/s3c2410.c
drivers/serial/s3c2410.c
+1
-1
drivers/serial/sa1100.c
drivers/serial/sa1100.c
+24
-41
drivers/serial/serial_lh7a40x.c
drivers/serial/serial_lh7a40x.c
+1
-1
No files found.
drivers/serial/21285.c
View file @
97af1128
...
@@ -110,7 +110,7 @@ static irqreturn_t serial21285_rx_chars(int irq, void *dev_id, struct pt_regs *r
...
@@ -110,7 +110,7 @@ static irqreturn_t serial21285_rx_chars(int irq, void *dev_id, struct pt_regs *r
port
->
icount
.
rx
++
;
port
->
icount
.
rx
++
;
rxs
=
*
CSR_RXSTAT
|
RXSTAT_DUMMY_READ
;
rxs
=
*
CSR_RXSTAT
|
RXSTAT_DUMMY_READ
;
if
(
rxs
&
RXSTAT_ANYERR
)
{
if
(
unlikely
(
rxs
&
RXSTAT_ANYERR
)
)
{
if
(
rxs
&
RXSTAT_PARITY
)
if
(
rxs
&
RXSTAT_PARITY
)
port
->
icount
.
parity
++
;
port
->
icount
.
parity
++
;
else
if
(
rxs
&
RXSTAT_FRAME
)
else
if
(
rxs
&
RXSTAT_FRAME
)
...
...
drivers/serial/8250_hp300.c
View file @
97af1128
...
@@ -9,15 +9,15 @@
...
@@ -9,15 +9,15 @@
#include <linux/init.h>
#include <linux/init.h>
#include <linux/string.h>
#include <linux/string.h>
#include <linux/kernel.h>
#include <linux/kernel.h>
#include <linux/tty.h>
#include <linux/serial.h>
#include <linux/serial.h>
#include <linux/serialP.h>
#include <linux/serial_core.h>
#include <linux/serial_core.h>
#include <linux/delay.h>
#include <linux/delay.h>
#include <linux/dio.h>
#include <linux/dio.h>
#include <linux/console.h>
#include <linux/console.h>
#include <asm/io.h>
#include <asm/io.h>
#include "8250.h"
#if !defined(CONFIG_HPDCA) && !defined(CONFIG_HPAPCI)
#if !defined(CONFIG_HPDCA) && !defined(CONFIG_HPAPCI)
#warning CONFIG_8250 defined but neither CONFIG_HPDCA nor CONFIG_HPAPCI defined, are you sure?
#warning CONFIG_8250 defined but neither CONFIG_HPDCA nor CONFIG_HPAPCI defined, are you sure?
#endif
#endif
...
@@ -163,7 +163,7 @@ int __init hp300_setup_serial_console(void)
...
@@ -163,7 +163,7 @@ int __init hp300_setup_serial_console(void)
static
int
__devinit
hpdca_init_one
(
struct
dio_dev
*
d
,
static
int
__devinit
hpdca_init_one
(
struct
dio_dev
*
d
,
const
struct
dio_device_id
*
ent
)
const
struct
dio_device_id
*
ent
)
{
{
struct
serial_struct
serial_req
;
struct
uart_port
port
;
int
line
;
int
line
;
#ifdef CONFIG_SERIAL_8250_CONSOLE
#ifdef CONFIG_SERIAL_8250_CONSOLE
...
@@ -172,21 +172,22 @@ static int __devinit hpdca_init_one(struct dio_dev *d,
...
@@ -172,21 +172,22 @@ static int __devinit hpdca_init_one(struct dio_dev *d,
return
0
;
return
0
;
}
}
#endif
#endif
memset
(
&
serial_req
,
0
,
sizeof
(
struct
serial_struc
t
));
memset
(
&
port
,
0
,
sizeof
(
struct
uart_por
t
));
/* Memory mapped I/O */
/* Memory mapped I/O */
serial_req
.
io_type
=
SERIAL_IO_MEM
;
port
.
iotype
=
UPIO_MEM
;
serial_req
.
flags
=
UPF_SKIP_TEST
|
UPF_SHARE_IRQ
|
UPF_BOOT_AUTOCONF
;
port
.
flags
=
UPF_SKIP_TEST
|
UPF_SHARE_IRQ
|
UPF_BOOT_AUTOCONF
;
serial_req
.
irq
=
d
->
ipl
;
port
.
irq
=
d
->
ipl
;
serial_req
.
baud_base
=
HPDCA_BAUD_BASE
;
port
.
uartclk
=
HPDCA_BAUD_BASE
*
16
;
serial_req
.
iomap_base
=
(
d
->
resource
.
start
+
UART_OFFSET
);
port
.
mapbase
=
(
d
->
resource
.
start
+
UART_OFFSET
);
serial_req
.
iomem_base
=
(
char
*
)(
serial_req
.
iomap_base
+
DIO_VIRADDRBASE
);
port
.
membase
=
(
char
*
)(
port
.
mapbase
+
DIO_VIRADDRBASE
);
serial_req
.
iomem_reg_shift
=
1
;
port
.
regshift
=
1
;
line
=
register_serial
(
&
serial_req
);
port
.
dev
=
&
d
->
dev
;
line
=
serial8250_register_port
(
&
port
);
if
(
line
<
0
)
{
if
(
line
<
0
)
{
printk
(
KERN_NOTICE
"8250_hp300: register_serial() DCA scode %d"
printk
(
KERN_NOTICE
"8250_hp300: register_serial() DCA scode %d"
" irq %d failed
\n
"
,
d
->
scode
,
serial_req
.
irq
);
" irq %d failed
\n
"
,
d
->
scode
,
port
.
irq
);
return
-
ENOMEM
;
return
-
ENOMEM
;
}
}
...
@@ -209,7 +210,7 @@ static int __init hp300_8250_init(void)
...
@@ -209,7 +210,7 @@ static int __init hp300_8250_init(void)
#ifdef CONFIG_HPAPCI
#ifdef CONFIG_HPAPCI
int
line
;
int
line
;
unsigned
long
base
;
unsigned
long
base
;
struct
serial_struct
serial_req
;
struct
uart_port
uport
;
struct
hp300_port
*
port
;
struct
hp300_port
*
port
;
int
i
;
int
i
;
#endif
#endif
...
@@ -251,25 +252,25 @@ static int __init hp300_8250_init(void)
...
@@ -251,25 +252,25 @@ static int __init hp300_8250_init(void)
if
(
!
port
)
if
(
!
port
)
return
-
ENOMEM
;
return
-
ENOMEM
;
memset
(
&
serial_req
,
0
,
sizeof
(
struct
serial_struc
t
));
memset
(
&
uport
,
0
,
sizeof
(
struct
uart_por
t
));
base
=
(
FRODO_BASE
+
FRODO_APCI_OFFSET
(
i
));
base
=
(
FRODO_BASE
+
FRODO_APCI_OFFSET
(
i
));
/* Memory mapped I/O */
/* Memory mapped I/O */
serial_req
.
io_type
=
SERIAL_
IO_MEM
;
uport
.
iotype
=
UP
IO_MEM
;
serial_req
.
flags
=
UPF_SKIP_TEST
|
UPF_SHARE_IRQ
|
UPF_BOOT_AUTOCONF
;
uport
.
flags
=
UPF_SKIP_TEST
|
UPF_SHARE_IRQ
|
UPF_BOOT_AUTOCONF
;
/* XXX - no interrupt support yet */
/* XXX - no interrupt support yet */
serial_req
.
irq
=
0
;
uport
.
irq
=
0
;
serial_req
.
baud_base
=
HPAPCI_BAUD_BASE
;
uport
.
uartclk
=
HPAPCI_BAUD_BASE
*
16
;
serial_req
.
iomap_
base
=
base
;
uport
.
map
base
=
base
;
serial_req
.
iomem_base
=
(
char
*
)(
serial_req
.
iomap_
base
+
DIO_VIRADDRBASE
);
uport
.
membase
=
(
char
*
)(
base
+
DIO_VIRADDRBASE
);
serial_req
.
iomem_reg_
shift
=
2
;
uport
.
reg
shift
=
2
;
line
=
register_serial
(
&
serial_req
);
line
=
serial8250_register_port
(
&
uport
);
if
(
line
<
0
)
{
if
(
line
<
0
)
{
printk
(
KERN_NOTICE
"8250_hp300: register_serial() APCI %d"
printk
(
KERN_NOTICE
"8250_hp300: register_serial() APCI %d"
" irq %d failed
\n
"
,
i
,
serial_req
.
irq
);
" irq %d failed
\n
"
,
i
,
uport
.
irq
);
kfree
(
port
);
kfree
(
port
);
continue
;
continue
;
}
}
...
@@ -299,7 +300,7 @@ static void __devexit hpdca_remove_one(struct dio_dev *d)
...
@@ -299,7 +300,7 @@ static void __devexit hpdca_remove_one(struct dio_dev *d)
/* Disable board-interrupts */
/* Disable board-interrupts */
out_8
(
d
->
resource
.
start
+
DIO_VIRADDRBASE
+
DCA_IC
,
0
);
out_8
(
d
->
resource
.
start
+
DIO_VIRADDRBASE
+
DCA_IC
,
0
);
}
}
unregister_serial
(
line
);
serial8250_unregister_port
(
line
);
}
}
#endif
#endif
...
@@ -309,7 +310,7 @@ static void __exit hp300_8250_exit(void)
...
@@ -309,7 +310,7 @@ static void __exit hp300_8250_exit(void)
struct
hp300_port
*
port
,
*
to_free
;
struct
hp300_port
*
port
,
*
to_free
;
for
(
port
=
hp300_ports
;
port
;
)
{
for
(
port
=
hp300_ports
;
port
;
)
{
unregister_serial
(
port
->
line
);
serial8250_unregister_port
(
port
->
line
);
to_free
=
port
;
to_free
=
port
;
port
=
port
->
next
;
port
=
port
->
next
;
kfree
(
to_free
);
kfree
(
to_free
);
...
...
drivers/serial/amba-pl010.c
View file @
97af1128
...
@@ -172,7 +172,7 @@ pl010_rx_chars(struct uart_port *port)
...
@@ -172,7 +172,7 @@ pl010_rx_chars(struct uart_port *port)
* out of the main execution path
* out of the main execution path
*/
*/
rsr
=
UART_GET_RSR
(
port
)
|
UART_DUMMY_RSR_RX
;
rsr
=
UART_GET_RSR
(
port
)
|
UART_DUMMY_RSR_RX
;
if
(
rsr
&
UART01x_RSR_ANY
)
{
if
(
unlikely
(
rsr
&
UART01x_RSR_ANY
)
)
{
if
(
rsr
&
UART01x_RSR_BE
)
{
if
(
rsr
&
UART01x_RSR_BE
)
{
rsr
&=
~
(
UART01x_RSR_FE
|
UART01x_RSR_PE
);
rsr
&=
~
(
UART01x_RSR_FE
|
UART01x_RSR_PE
);
port
->
icount
.
brk
++
;
port
->
icount
.
brk
++
;
...
...
drivers/serial/amba-pl011.c
View file @
97af1128
...
@@ -137,7 +137,7 @@ pl011_rx_chars(struct uart_amba_port *uap)
...
@@ -137,7 +137,7 @@ pl011_rx_chars(struct uart_amba_port *uap)
* out of the main execution path
* out of the main execution path
*/
*/
rsr
=
readw
(
uap
->
port
.
membase
+
UART01x_RSR
)
|
UART_DUMMY_RSR_RX
;
rsr
=
readw
(
uap
->
port
.
membase
+
UART01x_RSR
)
|
UART_DUMMY_RSR_RX
;
if
(
rsr
&
UART01x_RSR_ANY
)
{
if
(
unlikely
(
rsr
&
UART01x_RSR_ANY
)
)
{
if
(
rsr
&
UART01x_RSR_BE
)
{
if
(
rsr
&
UART01x_RSR_BE
)
{
rsr
&=
~
(
UART01x_RSR_FE
|
UART01x_RSR_PE
);
rsr
&=
~
(
UART01x_RSR_FE
|
UART01x_RSR_PE
);
uap
->
port
.
icount
.
brk
++
;
uap
->
port
.
icount
.
brk
++
;
...
...
drivers/serial/clps711x.c
View file @
97af1128
...
@@ -116,54 +116,43 @@ static irqreturn_t clps711xuart_int_rx(int irq, void *dev_id, struct pt_regs *re
...
@@ -116,54 +116,43 @@ static irqreturn_t clps711xuart_int_rx(int irq, void *dev_id, struct pt_regs *re
* Note that the error handling code is
* Note that the error handling code is
* out of the main execution path
* out of the main execution path
*/
*/
if
(
ch
&
UART_ANY_ERR
)
if
(
unlikely
(
ch
&
UART_ANY_ERR
))
{
goto
handle_error
;
if
(
ch
&
UARTDR_PARERR
)
port
->
icount
.
parity
++
;
else
if
(
ch
&
UARTDR_FRMERR
)
port
->
icount
.
frame
++
;
if
(
ch
&
UARTDR_OVERR
)
port
->
icount
.
overrun
++
;
if
(
uart_handle_sysrq_char
(
port
,
ch
,
regs
))
ch
&=
port
->
read_status_mask
;
goto
ignore_char
;
error_return:
if
(
ch
&
UARTDR_PARERR
)
tty_insert_flip_char
(
tty
,
ch
,
flg
);
flg
=
TTY_PARITY
;
ignore_char:
else
if
(
ch
&
UARTDR_FRMERR
)
status
=
clps_readl
(
SYSFLG
(
port
));
flg
=
TTY_FRAME
;
}
out:
tty_flip_buffer_push
(
tty
);
return
IRQ_HANDLED
;
handle_error:
#ifdef SUPPORT_SYSRQ
if
(
ch
&
UARTDR_PARERR
)
port
->
sysrq
=
0
;
port
->
icount
.
parity
++
;
#endif
else
if
(
ch
&
UARTDR_FRMERR
)
}
port
->
icount
.
frame
++
;
if
(
ch
&
UARTDR_OVERR
)
port
->
icount
.
overrun
++
;
if
(
ch
&
port
->
ignore_status_mask
)
{
if
(
++
ignored
>
100
)
goto
out
;
goto
ignore_char
;
}
ch
&=
port
->
read_status_mask
;
if
(
ch
&
UARTDR_PARERR
)
if
(
uart_handle_sysrq_char
(
port
,
ch
,
regs
))
flg
=
TTY_PARITY
;
goto
ignore_char
;
else
if
(
ch
&
UARTDR_FRMERR
)
flg
=
TTY_FRAME
;
if
(
ch
&
UARTDR_OVERR
)
{
/*
/*
* CHECK: does overrun affect the current character?
* CHECK: does overrun affect the current character?
* ASSUMPTION: it does not.
* ASSUMPTION: it does not.
*/
*/
tty_insert_flip_char
(
tty
,
ch
,
flg
);
if
((
ch
&
port
->
ignore_status_mask
&
~
RXSTAT_OVERRUN
)
==
0
)
ch
=
0
;
tty_insert_flip_char
(
tty
,
ch
,
flg
);
flg
=
TTY_OVERRUN
;
if
((
ch
&
~
port
->
ignore_status_mask
&
RXSTAT_OVERRUN
)
==
0
)
tty_insert_flip_char
(
tty
,
0
,
TTY_OVERRUN
);
ignore_char:
status
=
clps_readl
(
SYSFLG
(
port
));
}
}
#ifdef SUPPORT_SYSRQ
tty_flip_buffer_push
(
tty
);
port
->
sysrq
=
0
;
return
IRQ_HANDLED
;
#endif
goto
error_return
;
}
}
static
irqreturn_t
clps711xuart_int_tx
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
static
irqreturn_t
clps711xuart_int_tx
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
...
...
drivers/serial/s3c2410.c
View file @
97af1128
...
@@ -364,7 +364,7 @@ s3c24xx_serial_rx_chars(int irq, void *dev_id, struct pt_regs *regs)
...
@@ -364,7 +364,7 @@ s3c24xx_serial_rx_chars(int irq, void *dev_id, struct pt_regs *regs)
flag
=
TTY_NORMAL
;
flag
=
TTY_NORMAL
;
port
->
icount
.
rx
++
;
port
->
icount
.
rx
++
;
if
(
u
erstat
&
S3C2410_UERSTAT_ANY
)
{
if
(
u
nlikely
(
uerstat
&
S3C2410_UERSTAT_ANY
)
)
{
dbg
(
"rxerr: port ch=0x%02x, rxs=0x%08x
\n
"
,
dbg
(
"rxerr: port ch=0x%02x, rxs=0x%08x
\n
"
,
ch
,
uerstat
);
ch
,
uerstat
);
...
...
drivers/serial/sa1100.c
View file @
97af1128
...
@@ -214,56 +214,39 @@ sa1100_rx_chars(struct sa1100_port *sport, struct pt_regs *regs)
...
@@ -214,56 +214,39 @@ sa1100_rx_chars(struct sa1100_port *sport, struct pt_regs *regs)
* note that the error handling code is
* note that the error handling code is
* out of the main execution path
* out of the main execution path
*/
*/
if
(
status
&
UTSR1_TO_SM
(
UTSR1_PRE
|
UTSR1_FRE
|
UTSR1_ROR
))
if
(
status
&
UTSR1_TO_SM
(
UTSR1_PRE
|
UTSR1_FRE
|
UTSR1_ROR
))
{
goto
handle_error
;
if
(
status
&
UTSR1_TO_SM
(
UTSR1_PRE
))
sport
->
port
.
icount
.
parity
++
;
else
if
(
status
&
UTSR1_TO_SM
(
UTSR1_FRE
))
sport
->
port
.
icount
.
frame
++
;
if
(
status
&
UTSR1_TO_SM
(
UTSR1_ROR
))
sport
->
port
.
icount
.
overrun
++
;
status
&=
sport
->
port
.
read_status_mask
;
if
(
status
&
UTSR1_TO_SM
(
UTSR1_PRE
))
flg
=
TTY_PARITY
;
else
if
(
status
&
UTSR1_TO_SM
(
UTSR1_FRE
))
flg
=
TTY_FRAME
;
#ifdef SUPPORT_SYSRQ
sport
->
port
.
sysrq
=
0
;
#endif
}
if
(
uart_handle_sysrq_char
(
&
sport
->
port
,
ch
,
regs
))
if
(
uart_handle_sysrq_char
(
&
sport
->
port
,
ch
,
regs
))
goto
ignore_char
;
goto
ignore_char
;
error_return:
if
((
status
&
port
->
ignore_status_mask
&
~
UTSR1_TO_SM
(
UTSR1_ROR
))
==
0
)
tty_insert_flip_char
(
tty
,
ch
,
flg
);
tty_insert_flip_char
(
tty
,
ch
,
flg
);
if
(
status
&
~
port
->
ignore_status_mask
&
UTSR1_TO_SM
(
UTSR1_ROR
))
tty_insert_flip_char
(
tty
,
0
,
TTY_OVERRUN
);
ignore_char:
ignore_char:
status
=
UTSR1_TO_SM
(
UART_GET_UTSR1
(
sport
))
|
status
=
UTSR1_TO_SM
(
UART_GET_UTSR1
(
sport
))
|
UTSR0_TO_SM
(
UART_GET_UTSR0
(
sport
));
UTSR0_TO_SM
(
UART_GET_UTSR0
(
sport
));
}
}
out:
tty_flip_buffer_push
(
tty
);
tty_flip_buffer_push
(
tty
);
return
;
handle_error:
if
(
status
&
UTSR1_TO_SM
(
UTSR1_PRE
))
sport
->
port
.
icount
.
parity
++
;
else
if
(
status
&
UTSR1_TO_SM
(
UTSR1_FRE
))
sport
->
port
.
icount
.
frame
++
;
if
(
status
&
UTSR1_TO_SM
(
UTSR1_ROR
))
sport
->
port
.
icount
.
overrun
++
;
if
(
status
&
sport
->
port
.
ignore_status_mask
)
{
if
(
++
ignored
>
100
)
goto
out
;
goto
ignore_char
;
}
status
&=
sport
->
port
.
read_status_mask
;
if
(
status
&
UTSR1_TO_SM
(
UTSR1_PRE
))
flg
=
TTY_PARITY
;
else
if
(
status
&
UTSR1_TO_SM
(
UTSR1_FRE
))
flg
=
TTY_FRAME
;
if
(
status
&
UTSR1_TO_SM
(
UTSR1_ROR
))
{
/*
* overrun does *not* affect the character
* we read from the FIFO
*/
tty_insert_flip_char
(
tty
,
ch
,
flg
);
ch
=
0
;
flg
=
TTY_OVERRUN
;
}
#ifdef SUPPORT_SYSRQ
sport
->
port
.
sysrq
=
0
;
#endif
goto
error_return
;
}
}
static
void
sa1100_tx_chars
(
struct
sa1100_port
*
sport
)
static
void
sa1100_tx_chars
(
struct
sa1100_port
*
sport
)
...
...
drivers/serial/serial_lh7a40x.c
View file @
97af1128
...
@@ -162,7 +162,7 @@ lh7a40xuart_rx_chars (struct uart_port* port)
...
@@ -162,7 +162,7 @@ lh7a40xuart_rx_chars (struct uart_port* port)
flag
=
TTY_NORMAL
;
flag
=
TTY_NORMAL
;
++
port
->
icount
.
rx
;
++
port
->
icount
.
rx
;
if
(
data
&
RxError
)
{
/* Quick check, short-circuit */
if
(
unlikely
(
data
&
RxError
)
)
{
/* Quick check, short-circuit */
if
(
data
&
RxBreak
)
{
if
(
data
&
RxBreak
)
{
data
&=
~
(
RxFramingError
|
RxParityError
);
data
&=
~
(
RxFramingError
|
RxParityError
);
++
port
->
icount
.
brk
;
++
port
->
icount
.
brk
;
...
...
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