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
138307b4
Commit
138307b4
authored
Sep 02, 2005
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge HEAD from master.kernel.org:/home/rmk/linux-2.6-serial
parents
66f37673
bc49a661
Changes
41
Hide whitespace changes
Inline
Side-by-side
Showing
41 changed files
with
200 additions
and
393 deletions
+200
-393
Documentation/serial/driver
Documentation/serial/driver
+4
-11
drivers/char/mwave/mwavedd.c
drivers/char/mwave/mwavedd.c
+12
-9
drivers/misc/Kconfig
drivers/misc/Kconfig
+1
-1
drivers/net/Kconfig
drivers/net/Kconfig
+1
-1
drivers/serial/21285.c
drivers/serial/21285.c
+4
-6
drivers/serial/8250.c
drivers/serial/8250.c
+7
-82
drivers/serial/8250.h
drivers/serial/8250.h
+1
-5
drivers/serial/Kconfig
drivers/serial/Kconfig
+1
-1
drivers/serial/amba-pl010.c
drivers/serial/amba-pl010.c
+4
-4
drivers/serial/amba-pl011.c
drivers/serial/amba-pl011.c
+4
-4
drivers/serial/au1x00_uart.c
drivers/serial/au1x00_uart.c
+4
-4
drivers/serial/clps711x.c
drivers/serial/clps711x.c
+4
-6
drivers/serial/cpm_uart/cpm_uart_core.c
drivers/serial/cpm_uart/cpm_uart_core.c
+4
-4
drivers/serial/dz.c
drivers/serial/dz.c
+5
-5
drivers/serial/icom.c
drivers/serial/icom.c
+5
-7
drivers/serial/imx.c
drivers/serial/imx.c
+23
-5
drivers/serial/ioc4_serial.c
drivers/serial/ioc4_serial.c
+2
-4
drivers/serial/ip22zilog.c
drivers/serial/ip22zilog.c
+2
-2
drivers/serial/jsm/jsm_tty.c
drivers/serial/jsm/jsm_tty.c
+2
-2
drivers/serial/m32r_sio.c
drivers/serial/m32r_sio.c
+4
-4
drivers/serial/mpc52xx_uart.c
drivers/serial/mpc52xx_uart.c
+4
-4
drivers/serial/mpsc.c
drivers/serial/mpsc.c
+4
-4
drivers/serial/mux.c
drivers/serial/mux.c
+4
-6
drivers/serial/pmac_zilog.c
drivers/serial/pmac_zilog.c
+3
-4
drivers/serial/pxa.c
drivers/serial/pxa.c
+4
-4
drivers/serial/s3c2410.c
drivers/serial/s3c2410.c
+4
-6
drivers/serial/sa1100.c
drivers/serial/sa1100.c
+4
-4
drivers/serial/serial_core.c
drivers/serial/serial_core.c
+6
-138
drivers/serial/serial_lh7a40x.c
drivers/serial/serial_lh7a40x.c
+2
-3
drivers/serial/serial_txx9.c
drivers/serial/serial_txx9.c
+4
-4
drivers/serial/sh-sci.c
drivers/serial/sh-sci.c
+6
-6
drivers/serial/sn_console.c
drivers/serial/sn_console.c
+3
-5
drivers/serial/sunsab.c
drivers/serial/sunsab.c
+4
-4
drivers/serial/sunsu.c
drivers/serial/sunsu.c
+21
-11
drivers/serial/sunzilog.c
drivers/serial/sunzilog.c
+2
-2
drivers/serial/uart00.c
drivers/serial/uart00.c
+4
-4
drivers/serial/v850e_uart.c
drivers/serial/v850e_uart.c
+3
-3
drivers/serial/vr41xx_siu.c
drivers/serial/vr41xx_siu.c
+4
-4
include/linux/serial.h
include/linux/serial.h
+0
-4
include/linux/serial_8250.h
include/linux/serial_8250.h
+16
-0
include/linux/serial_core.h
include/linux/serial_core.h
+4
-6
No files found.
Documentation/serial/driver
View file @
138307b4
...
@@ -111,24 +111,17 @@ hardware.
...
@@ -111,24 +111,17 @@ hardware.
Interrupts: locally disabled.
Interrupts: locally disabled.
This call must not sleep
This call must not sleep
stop_tx(port
,tty_stop
)
stop_tx(port)
Stop transmitting characters. This might be due to the CTS
Stop transmitting characters. This might be due to the CTS
line becoming inactive or the tty layer indicating we want
line becoming inactive or the tty layer indicating we want
to stop transmission.
to stop transmission due to an XOFF character.
tty_stop: 1 if this call is due to the TTY layer issuing a
TTY stop to the driver (equiv to rs_stop).
Locking: port->lock taken.
Locking: port->lock taken.
Interrupts: locally disabled.
Interrupts: locally disabled.
This call must not sleep
This call must not sleep
start_tx(port,tty_start)
start_tx(port)
start transmitting characters. (incidentally, nonempty will
start transmitting characters.
always be nonzero, and shouldn't be used - it will be dropped).
tty_start: 1 if this call was due to the TTY layer issuing
a TTY start to the driver (equiv to rs_start)
Locking: port->lock taken.
Locking: port->lock taken.
Interrupts: locally disabled.
Interrupts: locally disabled.
...
...
drivers/char/mwave/mwavedd.c
View file @
138307b4
...
@@ -57,6 +57,7 @@
...
@@ -57,6 +57,7 @@
#include <linux/sched.h>
#include <linux/sched.h>
#include <linux/spinlock.h>
#include <linux/spinlock.h>
#include <linux/delay.h>
#include <linux/delay.h>
#include <linux/serial_8250.h>
#include "smapi.h"
#include "smapi.h"
#include "mwavedd.h"
#include "mwavedd.h"
#include "3780i.h"
#include "3780i.h"
...
@@ -410,8 +411,8 @@ static ssize_t mwave_write(struct file *file, const char __user *buf,
...
@@ -410,8 +411,8 @@ static ssize_t mwave_write(struct file *file, const char __user *buf,
static
int
register_serial_portandirq
(
unsigned
int
port
,
int
irq
)
static
int
register_serial_portandirq
(
unsigned
int
port
,
int
irq
)
{
{
struct
serial_struct
serial
;
struct
uart_port
uart
;
switch
(
port
)
{
switch
(
port
)
{
case
0x3f8
:
case
0x3f8
:
case
0x2f8
:
case
0x2f8
:
...
@@ -442,12 +443,14 @@ static int register_serial_portandirq(unsigned int port, int irq)
...
@@ -442,12 +443,14 @@ static int register_serial_portandirq(unsigned int port, int irq)
}
/* switch */
}
/* switch */
/* irq is okay */
/* irq is okay */
memset
(
&
serial
,
0
,
sizeof
(
serial
));
memset
(
&
uart
,
0
,
sizeof
(
struct
uart_port
));
serial
.
port
=
port
;
serial
.
irq
=
irq
;
uart
.
uartclk
=
1843200
;
serial
.
flags
=
ASYNC_SHARE_IRQ
;
uart
.
iobase
=
port
;
uart
.
irq
=
irq
;
return
register_serial
(
&
serial
);
uart
.
iotype
=
UPIO_PORT
;
uart
.
flags
=
UPF_SHARE_IRQ
;
return
serial8250_register_port
(
&
uart
);
}
}
...
@@ -523,7 +526,7 @@ static void mwave_exit(void)
...
@@ -523,7 +526,7 @@ static void mwave_exit(void)
#endif
#endif
if
(
pDrvData
->
sLine
>=
0
)
{
if
(
pDrvData
->
sLine
>=
0
)
{
unregister_serial
(
pDrvData
->
sLine
);
serial8250_unregister_port
(
pDrvData
->
sLine
);
}
}
if
(
pDrvData
->
bMwaveDevRegistered
)
{
if
(
pDrvData
->
bMwaveDevRegistered
)
{
misc_deregister
(
&
mwave_misc_dev
);
misc_deregister
(
&
mwave_misc_dev
);
...
...
drivers/misc/Kconfig
View file @
138307b4
...
@@ -6,7 +6,7 @@ menu "Misc devices"
...
@@ -6,7 +6,7 @@ menu "Misc devices"
config IBM_ASM
config IBM_ASM
tristate "Device driver for IBM RSA service processor"
tristate "Device driver for IBM RSA service processor"
depends on X86 && PCI && EXPERIMENTAL
depends on X86 && PCI && EXPERIMENTAL
&& BROKEN
---help---
---help---
This option enables device driver support for in-band access to the
This option enables device driver support for in-band access to the
IBM RSA (Condor) service processor in eServer xSeries systems.
IBM RSA (Condor) service processor in eServer xSeries systems.
...
...
drivers/net/Kconfig
View file @
138307b4
...
@@ -447,7 +447,7 @@ config NET_SB1250_MAC
...
@@ -447,7 +447,7 @@ config NET_SB1250_MAC
config SGI_IOC3_ETH
config SGI_IOC3_ETH
bool "SGI IOC3 Ethernet"
bool "SGI IOC3 Ethernet"
depends on NET_ETHERNET && PCI && SGI_IP27
depends on NET_ETHERNET && PCI && SGI_IP27
&& BROKEN
select CRC32
select CRC32
select MII
select MII
help
help
...
...
drivers/serial/21285.c
View file @
138307b4
...
@@ -58,8 +58,7 @@ static const char serial21285_name[] = "Footbridge UART";
...
@@ -58,8 +58,7 @@ static const char serial21285_name[] = "Footbridge UART";
* int((BAUD_BASE - (baud >> 1)) / baud)
* int((BAUD_BASE - (baud >> 1)) / baud)
*/
*/
static
void
static
void
serial21285_stop_tx
(
struct
uart_port
*
port
)
serial21285_stop_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_stop
)
{
{
if
(
tx_enabled
(
port
))
{
if
(
tx_enabled
(
port
))
{
disable_irq
(
IRQ_CONTX
);
disable_irq
(
IRQ_CONTX
);
...
@@ -67,8 +66,7 @@ serial21285_stop_tx(struct uart_port *port, unsigned int tty_stop)
...
@@ -67,8 +66,7 @@ serial21285_stop_tx(struct uart_port *port, unsigned int tty_stop)
}
}
}
}
static
void
static
void
serial21285_start_tx
(
struct
uart_port
*
port
)
serial21285_start_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_start
)
{
{
if
(
!
tx_enabled
(
port
))
{
if
(
!
tx_enabled
(
port
))
{
enable_irq
(
IRQ_CONTX
);
enable_irq
(
IRQ_CONTX
);
...
@@ -148,7 +146,7 @@ static irqreturn_t serial21285_tx_chars(int irq, void *dev_id, struct pt_regs *r
...
@@ -148,7 +146,7 @@ static irqreturn_t serial21285_tx_chars(int irq, void *dev_id, struct pt_regs *r
goto
out
;
goto
out
;
}
}
if
(
uart_circ_empty
(
xmit
)
||
uart_tx_stopped
(
port
))
{
if
(
uart_circ_empty
(
xmit
)
||
uart_tx_stopped
(
port
))
{
serial21285_stop_tx
(
port
,
0
);
serial21285_stop_tx
(
port
);
goto
out
;
goto
out
;
}
}
...
@@ -164,7 +162,7 @@ static irqreturn_t serial21285_tx_chars(int irq, void *dev_id, struct pt_regs *r
...
@@ -164,7 +162,7 @@ static irqreturn_t serial21285_tx_chars(int irq, void *dev_id, struct pt_regs *r
uart_write_wakeup
(
port
);
uart_write_wakeup
(
port
);
if
(
uart_circ_empty
(
xmit
))
if
(
uart_circ_empty
(
xmit
))
serial21285_stop_tx
(
port
,
0
);
serial21285_stop_tx
(
port
);
out:
out:
return
IRQ_HANDLED
;
return
IRQ_HANDLED
;
...
...
drivers/serial/8250.c
View file @
138307b4
...
@@ -1001,7 +1001,7 @@ static inline void __stop_tx(struct uart_8250_port *p)
...
@@ -1001,7 +1001,7 @@ static inline void __stop_tx(struct uart_8250_port *p)
}
}
}
}
static
void
serial8250_stop_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_stop
)
static
void
serial8250_stop_tx
(
struct
uart_port
*
port
)
{
{
struct
uart_8250_port
*
up
=
(
struct
uart_8250_port
*
)
port
;
struct
uart_8250_port
*
up
=
(
struct
uart_8250_port
*
)
port
;
...
@@ -1018,7 +1018,7 @@ static void serial8250_stop_tx(struct uart_port *port, unsigned int tty_stop)
...
@@ -1018,7 +1018,7 @@ static void serial8250_stop_tx(struct uart_port *port, unsigned int tty_stop)
static
void
transmit_chars
(
struct
uart_8250_port
*
up
);
static
void
transmit_chars
(
struct
uart_8250_port
*
up
);
static
void
serial8250_start_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_start
)
static
void
serial8250_start_tx
(
struct
uart_port
*
port
)
{
{
struct
uart_8250_port
*
up
=
(
struct
uart_8250_port
*
)
port
;
struct
uart_8250_port
*
up
=
(
struct
uart_8250_port
*
)
port
;
...
@@ -1158,7 +1158,11 @@ static _INLINE_ void transmit_chars(struct uart_8250_port *up)
...
@@ -1158,7 +1158,11 @@ static _INLINE_ void transmit_chars(struct uart_8250_port *up)
up
->
port
.
x_char
=
0
;
up
->
port
.
x_char
=
0
;
return
;
return
;
}
}
if
(
uart_circ_empty
(
xmit
)
||
uart_tx_stopped
(
&
up
->
port
))
{
if
(
uart_tx_stopped
(
&
up
->
port
))
{
serial8250_stop_tx
(
&
up
->
port
);
return
;
}
if
(
uart_circ_empty
(
xmit
))
{
__stop_tx
(
up
);
__stop_tx
(
up
);
return
;
return
;
}
}
...
@@ -2586,82 +2590,3 @@ module_param_array(probe_rsa, ulong, &probe_rsa_count, 0444);
...
@@ -2586,82 +2590,3 @@ module_param_array(probe_rsa, ulong, &probe_rsa_count, 0444);
MODULE_PARM_DESC
(
probe_rsa
,
"Probe I/O ports for RSA"
);
MODULE_PARM_DESC
(
probe_rsa
,
"Probe I/O ports for RSA"
);
#endif
#endif
MODULE_ALIAS_CHARDEV_MAJOR
(
TTY_MAJOR
);
MODULE_ALIAS_CHARDEV_MAJOR
(
TTY_MAJOR
);
/**
* register_serial - configure a 16x50 serial port at runtime
* @req: request structure
*
* Configure the serial port specified by the request. If the
* port exists and is in use an error is returned. If the port
* is not currently in the table it is added.
*
* The port is then probed and if necessary the IRQ is autodetected
* If this fails an error is returned.
*
* On success the port is ready to use and the line number is returned.
*
* Note: this function is deprecated - use serial8250_register_port
* instead.
*/
int
register_serial
(
struct
serial_struct
*
req
)
{
struct
uart_port
port
;
port
.
iobase
=
req
->
port
;
port
.
membase
=
req
->
iomem_base
;
port
.
irq
=
req
->
irq
;
port
.
uartclk
=
req
->
baud_base
*
16
;
port
.
fifosize
=
req
->
xmit_fifo_size
;
port
.
regshift
=
req
->
iomem_reg_shift
;
port
.
iotype
=
req
->
io_type
;
port
.
flags
=
req
->
flags
|
UPF_BOOT_AUTOCONF
;
port
.
mapbase
=
req
->
iomap_base
;
port
.
dev
=
NULL
;
if
(
share_irqs
)
port
.
flags
|=
UPF_SHARE_IRQ
;
if
(
HIGH_BITS_OFFSET
)
port
.
iobase
|=
(
long
)
req
->
port_high
<<
HIGH_BITS_OFFSET
;
/*
* If a clock rate wasn't specified by the low level driver, then
* default to the standard clock rate. This should be 115200 (*16)
* and should not depend on the architecture's BASE_BAUD definition.
* However, since this API will be deprecated, it's probably a
* better idea to convert the drivers to use the new API
* (serial8250_register_port and serial8250_unregister_port).
*/
if
(
port
.
uartclk
==
0
)
{
printk
(
KERN_WARNING
"Serial: registering port at [%08x,%08lx,%p] irq %d with zero baud_base
\n
"
,
port
.
iobase
,
port
.
mapbase
,
port
.
membase
,
port
.
irq
);
printk
(
KERN_WARNING
"Serial: see %s:%d for more information
\n
"
,
__FILE__
,
__LINE__
);
dump_stack
();
/*
* Fix it up for now, but this is only a temporary measure.
*/
port
.
uartclk
=
BASE_BAUD
*
16
;
}
return
serial8250_register_port
(
&
port
);
}
EXPORT_SYMBOL
(
register_serial
);
/**
* unregister_serial - remove a 16x50 serial port at runtime
* @line: serial line number
*
* Remove one serial port. This may not be called from interrupt
* context. We hand the port back to our local PM control.
*
* Note: this function is deprecated - use serial8250_unregister_port
* instead.
*/
void
unregister_serial
(
int
line
)
{
serial8250_unregister_port
(
line
);
}
EXPORT_SYMBOL
(
unregister_serial
);
drivers/serial/8250.h
View file @
138307b4
...
@@ -16,11 +16,7 @@
...
@@ -16,11 +16,7 @@
*/
*/
#include <linux/config.h>
#include <linux/config.h>
#include <linux/serial_8250.h>
int
serial8250_register_port
(
struct
uart_port
*
);
void
serial8250_unregister_port
(
int
line
);
void
serial8250_suspend_port
(
int
line
);
void
serial8250_resume_port
(
int
line
);
struct
old_serial_port
{
struct
old_serial_port
{
unsigned
int
uart
;
unsigned
int
uart
;
...
...
drivers/serial/Kconfig
View file @
138307b4
...
@@ -830,7 +830,7 @@ config SERIAL_M32R_PLDSIO
...
@@ -830,7 +830,7 @@ config SERIAL_M32R_PLDSIO
config SERIAL_TXX9
config SERIAL_TXX9
bool "TMPTX39XX/49XX SIO support"
bool "TMPTX39XX/49XX SIO support"
depends HAS_TXX9_SERIAL
depends HAS_TXX9_SERIAL
&& BROKEN
select SERIAL_CORE
select SERIAL_CORE
default y
default y
...
...
drivers/serial/amba-pl010.c
View file @
138307b4
...
@@ -105,7 +105,7 @@ struct uart_amba_port {
...
@@ -105,7 +105,7 @@ struct uart_amba_port {
unsigned
int
old_status
;
unsigned
int
old_status
;
};
};
static
void
pl010_stop_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_stop
)
static
void
pl010_stop_tx
(
struct
uart_port
*
port
)
{
{
unsigned
int
cr
;
unsigned
int
cr
;
...
@@ -114,7 +114,7 @@ static void pl010_stop_tx(struct uart_port *port, unsigned int tty_stop)
...
@@ -114,7 +114,7 @@ static void pl010_stop_tx(struct uart_port *port, unsigned int tty_stop)
UART_PUT_CR
(
port
,
cr
);
UART_PUT_CR
(
port
,
cr
);
}
}
static
void
pl010_start_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_start
)
static
void
pl010_start_tx
(
struct
uart_port
*
port
)
{
{
unsigned
int
cr
;
unsigned
int
cr
;
...
@@ -219,7 +219,7 @@ static void pl010_tx_chars(struct uart_port *port)
...
@@ -219,7 +219,7 @@ static void pl010_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
))
{
pl010_stop_tx
(
port
,
0
);
pl010_stop_tx
(
port
);
return
;
return
;
}
}
...
@@ -236,7 +236,7 @@ static void pl010_tx_chars(struct uart_port *port)
...
@@ -236,7 +236,7 @@ static void pl010_tx_chars(struct uart_port *port)
uart_write_wakeup
(
port
);
uart_write_wakeup
(
port
);
if
(
uart_circ_empty
(
xmit
))
if
(
uart_circ_empty
(
xmit
))
pl010_stop_tx
(
port
,
0
);
pl010_stop_tx
(
port
);
}
}
static
void
pl010_modem_status
(
struct
uart_port
*
port
)
static
void
pl010_modem_status
(
struct
uart_port
*
port
)
...
...
drivers/serial/amba-pl011.c
View file @
138307b4
...
@@ -74,7 +74,7 @@ struct uart_amba_port {
...
@@ -74,7 +74,7 @@ struct uart_amba_port {
unsigned
int
old_status
;
unsigned
int
old_status
;
};
};
static
void
pl011_stop_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_stop
)
static
void
pl011_stop_tx
(
struct
uart_port
*
port
)
{
{
struct
uart_amba_port
*
uap
=
(
struct
uart_amba_port
*
)
port
;
struct
uart_amba_port
*
uap
=
(
struct
uart_amba_port
*
)
port
;
...
@@ -82,7 +82,7 @@ static void pl011_stop_tx(struct uart_port *port, unsigned int tty_stop)
...
@@ -82,7 +82,7 @@ static void pl011_stop_tx(struct uart_port *port, unsigned int tty_stop)
writew
(
uap
->
im
,
uap
->
port
.
membase
+
UART011_IMSC
);
writew
(
uap
->
im
,
uap
->
port
.
membase
+
UART011_IMSC
);
}
}
static
void
pl011_start_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_start
)
static
void
pl011_start_tx
(
struct
uart_port
*
port
)
{
{
struct
uart_amba_port
*
uap
=
(
struct
uart_amba_port
*
)
port
;
struct
uart_amba_port
*
uap
=
(
struct
uart_amba_port
*
)
port
;
...
@@ -184,7 +184,7 @@ static void pl011_tx_chars(struct uart_amba_port *uap)
...
@@ -184,7 +184,7 @@ static void pl011_tx_chars(struct uart_amba_port *uap)
return
;
return
;
}
}
if
(
uart_circ_empty
(
xmit
)
||
uart_tx_stopped
(
&
uap
->
port
))
{
if
(
uart_circ_empty
(
xmit
)
||
uart_tx_stopped
(
&
uap
->
port
))
{
pl011_stop_tx
(
&
uap
->
port
,
0
);
pl011_stop_tx
(
&
uap
->
port
);
return
;
return
;
}
}
...
@@ -201,7 +201,7 @@ static void pl011_tx_chars(struct uart_amba_port *uap)
...
@@ -201,7 +201,7 @@ static void pl011_tx_chars(struct uart_amba_port *uap)
uart_write_wakeup
(
&
uap
->
port
);
uart_write_wakeup
(
&
uap
->
port
);
if
(
uart_circ_empty
(
xmit
))
if
(
uart_circ_empty
(
xmit
))
pl011_stop_tx
(
&
uap
->
port
,
0
);
pl011_stop_tx
(
&
uap
->
port
);
}
}
static
void
pl011_modem_status
(
struct
uart_amba_port
*
uap
)
static
void
pl011_modem_status
(
struct
uart_amba_port
*
uap
)
...
...
drivers/serial/au1x00_uart.c
View file @
138307b4
...
@@ -200,7 +200,7 @@ static void autoconfig(struct uart_8250_port *up, unsigned int probeflags)
...
@@ -200,7 +200,7 @@ static void autoconfig(struct uart_8250_port *up, unsigned int probeflags)
DEBUG_AUTOCONF
(
"type=%s
\n
"
,
uart_config
[
up
->
port
.
type
].
name
);
DEBUG_AUTOCONF
(
"type=%s
\n
"
,
uart_config
[
up
->
port
.
type
].
name
);
}
}
static
void
serial8250_stop_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_stop
)
static
void
serial8250_stop_tx
(
struct
uart_port
*
port
)
{
{
struct
uart_8250_port
*
up
=
(
struct
uart_8250_port
*
)
port
;
struct
uart_8250_port
*
up
=
(
struct
uart_8250_port
*
)
port
;
...
@@ -210,7 +210,7 @@ static void serial8250_stop_tx(struct uart_port *port, unsigned int tty_stop)
...
@@ -210,7 +210,7 @@ static void serial8250_stop_tx(struct uart_port *port, unsigned int tty_stop)
}
}
}
}
static
void
serial8250_start_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_start
)
static
void
serial8250_start_tx
(
struct
uart_port
*
port
)
{
{
struct
uart_8250_port
*
up
=
(
struct
uart_8250_port
*
)
port
;
struct
uart_8250_port
*
up
=
(
struct
uart_8250_port
*
)
port
;
...
@@ -337,7 +337,7 @@ static _INLINE_ void transmit_chars(struct uart_8250_port *up)
...
@@ -337,7 +337,7 @@ static _INLINE_ void transmit_chars(struct uart_8250_port *up)
return
;
return
;
}
}
if
(
uart_circ_empty
(
xmit
)
||
uart_tx_stopped
(
&
up
->
port
))
{
if
(
uart_circ_empty
(
xmit
)
||
uart_tx_stopped
(
&
up
->
port
))
{
serial8250_stop_tx
(
&
up
->
port
,
0
);
serial8250_stop_tx
(
&
up
->
port
);
return
;
return
;
}
}
...
@@ -356,7 +356,7 @@ static _INLINE_ void transmit_chars(struct uart_8250_port *up)
...
@@ -356,7 +356,7 @@ static _INLINE_ void transmit_chars(struct uart_8250_port *up)
DEBUG_INTR
(
"THRE..."
);
DEBUG_INTR
(
"THRE..."
);
if
(
uart_circ_empty
(
xmit
))
if
(
uart_circ_empty
(
xmit
))
serial8250_stop_tx
(
&
up
->
port
,
0
);
serial8250_stop_tx
(
&
up
->
port
);
}
}
static
_INLINE_
void
check_modem_status
(
struct
uart_8250_port
*
up
)
static
_INLINE_
void
check_modem_status
(
struct
uart_8250_port
*
up
)
...
...
drivers/serial/clps711x.c
View file @
138307b4
...
@@ -69,8 +69,7 @@
...
@@ -69,8 +69,7 @@
#define tx_enabled(port) ((port)->unused[0])
#define tx_enabled(port) ((port)->unused[0])
static
void
static
void
clps711xuart_stop_tx
(
struct
uart_port
*
port
)
clps711xuart_stop_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_stop
)
{
{
if
(
tx_enabled
(
port
))
{
if
(
tx_enabled
(
port
))
{
disable_irq
(
TX_IRQ
(
port
));
disable_irq
(
TX_IRQ
(
port
));
...
@@ -78,8 +77,7 @@ clps711xuart_stop_tx(struct uart_port *port, unsigned int tty_stop)
...
@@ -78,8 +77,7 @@ clps711xuart_stop_tx(struct uart_port *port, unsigned int tty_stop)
}
}
}
}
static
void
static
void
clps711xuart_start_tx
(
struct
uart_port
*
port
)
clps711xuart_start_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_start
)
{
{
if
(
!
tx_enabled
(
port
))
{
if
(
!
tx_enabled
(
port
))
{
enable_irq
(
TX_IRQ
(
port
));
enable_irq
(
TX_IRQ
(
port
));
...
@@ -165,7 +163,7 @@ static irqreturn_t clps711xuart_int_tx(int irq, void *dev_id, struct pt_regs *re
...
@@ -165,7 +163,7 @@ static irqreturn_t clps711xuart_int_tx(int irq, void *dev_id, struct pt_regs *re
return
IRQ_HANDLED
;
return
IRQ_HANDLED
;
}
}
if
(
uart_circ_empty
(
xmit
)
||
uart_tx_stopped
(
port
))
{
if
(
uart_circ_empty
(
xmit
)
||
uart_tx_stopped
(
port
))
{
clps711xuart_stop_tx
(
port
,
0
);
clps711xuart_stop_tx
(
port
);
return
IRQ_HANDLED
;
return
IRQ_HANDLED
;
}
}
...
@@ -182,7 +180,7 @@ static irqreturn_t clps711xuart_int_tx(int irq, void *dev_id, struct pt_regs *re
...
@@ -182,7 +180,7 @@ static irqreturn_t clps711xuart_int_tx(int irq, void *dev_id, struct pt_regs *re
uart_write_wakeup
(
port
);
uart_write_wakeup
(
port
);
if
(
uart_circ_empty
(
xmit
))
if
(
uart_circ_empty
(
xmit
))
clps711xuart_stop_tx
(
port
,
0
);
clps711xuart_stop_tx
(
port
);
return
IRQ_HANDLED
;
return
IRQ_HANDLED
;
}
}
...
...
drivers/serial/cpm_uart/cpm_uart_core.c
View file @
138307b4
...
@@ -124,7 +124,7 @@ static unsigned int cpm_uart_get_mctrl(struct uart_port *port)
...
@@ -124,7 +124,7 @@ static unsigned int cpm_uart_get_mctrl(struct uart_port *port)
/*
/*
* Stop transmitter
* Stop transmitter
*/
*/
static
void
cpm_uart_stop_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_stop
)
static
void
cpm_uart_stop_tx
(
struct
uart_port
*
port
)
{
{
struct
uart_cpm_port
*
pinfo
=
(
struct
uart_cpm_port
*
)
port
;
struct
uart_cpm_port
*
pinfo
=
(
struct
uart_cpm_port
*
)
port
;
volatile
smc_t
*
smcp
=
pinfo
->
smcp
;
volatile
smc_t
*
smcp
=
pinfo
->
smcp
;
...
@@ -141,7 +141,7 @@ static void cpm_uart_stop_tx(struct uart_port *port, unsigned int tty_stop)
...
@@ -141,7 +141,7 @@ static void cpm_uart_stop_tx(struct uart_port *port, unsigned int tty_stop)
/*
/*
* Start transmitter
* Start transmitter
*/
*/
static
void
cpm_uart_start_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_start
)
static
void
cpm_uart_start_tx
(
struct
uart_port
*
port
)
{
{
struct
uart_cpm_port
*
pinfo
=
(
struct
uart_cpm_port
*
)
port
;
struct
uart_cpm_port
*
pinfo
=
(
struct
uart_cpm_port
*
)
port
;
volatile
smc_t
*
smcp
=
pinfo
->
smcp
;
volatile
smc_t
*
smcp
=
pinfo
->
smcp
;
...
@@ -623,7 +623,7 @@ static int cpm_uart_tx_pump(struct uart_port *port)
...
@@ -623,7 +623,7 @@ static int cpm_uart_tx_pump(struct uart_port *port)
}
}
if
(
uart_circ_empty
(
xmit
)
||
uart_tx_stopped
(
port
))
{
if
(
uart_circ_empty
(
xmit
)
||
uart_tx_stopped
(
port
))
{
cpm_uart_stop_tx
(
port
,
0
);
cpm_uart_stop_tx
(
port
);
return
0
;
return
0
;
}
}
...
@@ -656,7 +656,7 @@ static int cpm_uart_tx_pump(struct uart_port *port)
...
@@ -656,7 +656,7 @@ static int cpm_uart_tx_pump(struct uart_port *port)
uart_write_wakeup
(
port
);
uart_write_wakeup
(
port
);
if
(
uart_circ_empty
(
xmit
))
{
if
(
uart_circ_empty
(
xmit
))
{
cpm_uart_stop_tx
(
port
,
0
);
cpm_uart_stop_tx
(
port
);
return
0
;
return
0
;
}
}
...
...
drivers/serial/dz.c
View file @
138307b4
...
@@ -112,7 +112,7 @@ static inline void dz_out(struct dz_port *dport, unsigned offset,
...
@@ -112,7 +112,7 @@ static inline void dz_out(struct dz_port *dport, unsigned offset,
* ------------------------------------------------------------
* ------------------------------------------------------------
*/
*/
static
void
dz_stop_tx
(
struct
uart_port
*
uport
,
unsigned
int
tty_stop
)
static
void
dz_stop_tx
(
struct
uart_port
*
uport
)
{
{
struct
dz_port
*
dport
=
(
struct
dz_port
*
)
uport
;
struct
dz_port
*
dport
=
(
struct
dz_port
*
)
uport
;
unsigned
short
tmp
,
mask
=
1
<<
dport
->
port
.
line
;
unsigned
short
tmp
,
mask
=
1
<<
dport
->
port
.
line
;
...
@@ -125,7 +125,7 @@ static void dz_stop_tx(struct uart_port *uport, unsigned int tty_stop)
...
@@ -125,7 +125,7 @@ static void dz_stop_tx(struct uart_port *uport, unsigned int tty_stop)
spin_unlock_irqrestore
(
&
dport
->
port
.
lock
,
flags
);
spin_unlock_irqrestore
(
&
dport
->
port
.
lock
,
flags
);
}
}
static
void
dz_start_tx
(
struct
uart_port
*
uport
,
unsigned
int
tty_start
)
static
void
dz_start_tx
(
struct
uart_port
*
uport
)
{
{
struct
dz_port
*
dport
=
(
struct
dz_port
*
)
uport
;
struct
dz_port
*
dport
=
(
struct
dz_port
*
)
uport
;
unsigned
short
tmp
,
mask
=
1
<<
dport
->
port
.
line
;
unsigned
short
tmp
,
mask
=
1
<<
dport
->
port
.
line
;
...
@@ -290,7 +290,7 @@ static inline void dz_transmit_chars(struct dz_port *dport)
...
@@ -290,7 +290,7 @@ static inline void dz_transmit_chars(struct dz_port *dport)
}
}
/* if nothing to do or stopped or hardware stopped */
/* if nothing to do or stopped or hardware stopped */
if
(
uart_circ_empty
(
xmit
)
||
uart_tx_stopped
(
&
dport
->
port
))
{
if
(
uart_circ_empty
(
xmit
)
||
uart_tx_stopped
(
&
dport
->
port
))
{
dz_stop_tx
(
&
dport
->
port
,
0
);
dz_stop_tx
(
&
dport
->
port
);
return
;
return
;
}
}
...
@@ -308,7 +308,7 @@ static inline void dz_transmit_chars(struct dz_port *dport)
...
@@ -308,7 +308,7 @@ static inline void dz_transmit_chars(struct dz_port *dport)
/* Are we done */
/* Are we done */
if
(
uart_circ_empty
(
xmit
))
if
(
uart_circ_empty
(
xmit
))
dz_stop_tx
(
&
dport
->
port
,
0
);
dz_stop_tx
(
&
dport
->
port
);
}
}
/*
/*
...
@@ -440,7 +440,7 @@ static int dz_startup(struct uart_port *uport)
...
@@ -440,7 +440,7 @@ static int dz_startup(struct uart_port *uport)
*/
*/
static
void
dz_shutdown
(
struct
uart_port
*
uport
)
static
void
dz_shutdown
(
struct
uart_port
*
uport
)
{
{
dz_stop_tx
(
uport
,
0
);
dz_stop_tx
(
uport
);
}
}
/*
/*
...
...
drivers/serial/icom.c
View file @
138307b4
...
@@ -989,18 +989,16 @@ static unsigned int icom_get_mctrl(struct uart_port *port)
...
@@ -989,18 +989,16 @@ static unsigned int icom_get_mctrl(struct uart_port *port)
return
result
;
return
result
;
}
}
static
void
icom_stop_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_stop
)
static
void
icom_stop_tx
(
struct
uart_port
*
port
)
{
{
unsigned
char
cmdReg
;
unsigned
char
cmdReg
;
if
(
tty_stop
)
{
trace
(
ICOM_PORT
,
"STOP"
,
0
);
trace
(
ICOM_PORT
,
"STOP"
,
0
);
cmdReg
=
readb
(
&
ICOM_PORT
->
dram
->
CmdReg
);
cmdReg
=
readb
(
&
ICOM_PORT
->
dram
->
CmdReg
);
writeb
(
cmdReg
|
CMD_HOLD_XMIT
,
&
ICOM_PORT
->
dram
->
CmdReg
);
writeb
(
cmdReg
|
CMD_HOLD_XMIT
,
&
ICOM_PORT
->
dram
->
CmdReg
);
}
}
}
static
void
icom_start_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_start
)
static
void
icom_start_tx
(
struct
uart_port
*
port
)
{
{
unsigned
char
cmdReg
;
unsigned
char
cmdReg
;
...
...
drivers/serial/imx.c
View file @
138307b4
...
@@ -124,7 +124,7 @@ static void imx_timeout(unsigned long data)
...
@@ -124,7 +124,7 @@ static void imx_timeout(unsigned long data)
/*
/*
* interrupts disabled on entry
* interrupts disabled on entry
*/
*/
static
void
imx_stop_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_stop
)
static
void
imx_stop_tx
(
struct
uart_port
*
port
)
{
{
struct
imx_port
*
sport
=
(
struct
imx_port
*
)
port
;
struct
imx_port
*
sport
=
(
struct
imx_port
*
)
port
;
UCR1
((
u32
)
sport
->
port
.
membase
)
&=
~
UCR1_TXMPTYEN
;
UCR1
((
u32
)
sport
->
port
.
membase
)
&=
~
UCR1_TXMPTYEN
;
...
@@ -165,13 +165,13 @@ static inline void imx_transmit_buffer(struct imx_port *sport)
...
@@ -165,13 +165,13 @@ static inline void imx_transmit_buffer(struct imx_port *sport)
}
while
(
!
(
UTS
((
u32
)
sport
->
port
.
membase
)
&
UTS_TXFULL
));
}
while
(
!
(
UTS
((
u32
)
sport
->
port
.
membase
)
&
UTS_TXFULL
));
if
(
uart_circ_empty
(
xmit
))
if
(
uart_circ_empty
(
xmit
))
imx_stop_tx
(
&
sport
->
port
,
0
);
imx_stop_tx
(
&
sport
->
port
);
}
}
/*
/*
* interrupts disabled on entry
* interrupts disabled on entry
*/
*/
static
void
imx_start_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_start
)
static
void
imx_start_tx
(
struct
uart_port
*
port
)
{
{
struct
imx_port
*
sport
=
(
struct
imx_port
*
)
port
;
struct
imx_port
*
sport
=
(
struct
imx_port
*
)
port
;
...
@@ -196,7 +196,7 @@ static irqreturn_t imx_txint(int irq, void *dev_id, struct pt_regs *regs)
...
@@ -196,7 +196,7 @@ static irqreturn_t imx_txint(int irq, void *dev_id, struct pt_regs *regs)
}
}
if
(
uart_circ_empty
(
xmit
)
||
uart_tx_stopped
(
&
sport
->
port
))
{
if
(
uart_circ_empty
(
xmit
)
||
uart_tx_stopped
(
&
sport
->
port
))
{
imx_stop_tx
(
&
sport
->
port
,
0
);
imx_stop_tx
(
&
sport
->
port
);
goto
out
;
goto
out
;
}
}
...
@@ -291,13 +291,31 @@ static unsigned int imx_tx_empty(struct uart_port *port)
...
@@ -291,13 +291,31 @@ static unsigned int imx_tx_empty(struct uart_port *port)
return
USR2
((
u32
)
sport
->
port
.
membase
)
&
USR2_TXDC
?
TIOCSER_TEMT
:
0
;
return
USR2
((
u32
)
sport
->
port
.
membase
)
&
USR2_TXDC
?
TIOCSER_TEMT
:
0
;
}
}
/*
* We have a modem side uart, so the meanings of RTS and CTS are inverted.
*/
static
unsigned
int
imx_get_mctrl
(
struct
uart_port
*
port
)
static
unsigned
int
imx_get_mctrl
(
struct
uart_port
*
port
)
{
{
return
TIOCM_CTS
|
TIOCM_DSR
|
TIOCM_CAR
;
struct
imx_port
*
sport
=
(
struct
imx_port
*
)
port
;
unsigned
int
tmp
=
TIOCM_DSR
|
TIOCM_CAR
;
if
(
USR1
((
u32
)
sport
->
port
.
membase
)
&
USR1_RTSS
)
tmp
|=
TIOCM_CTS
;
if
(
UCR2
((
u32
)
sport
->
port
.
membase
)
&
UCR2_CTS
)
tmp
|=
TIOCM_RTS
;
return
tmp
;
}
}
static
void
imx_set_mctrl
(
struct
uart_port
*
port
,
unsigned
int
mctrl
)
static
void
imx_set_mctrl
(
struct
uart_port
*
port
,
unsigned
int
mctrl
)
{
{
struct
imx_port
*
sport
=
(
struct
imx_port
*
)
port
;
if
(
mctrl
&
TIOCM_RTS
)
UCR2
((
u32
)
sport
->
port
.
membase
)
|=
UCR2_CTS
;
else
UCR2
((
u32
)
sport
->
port
.
membase
)
&=
~
UCR2_CTS
;
}
}
/*
/*
...
...
drivers/serial/ioc4_serial.c
View file @
138307b4
...
@@ -2373,10 +2373,9 @@ static unsigned int ic4_tx_empty(struct uart_port *the_port)
...
@@ -2373,10 +2373,9 @@ static unsigned int ic4_tx_empty(struct uart_port *the_port)
/**
/**
* ic4_stop_tx - stop the transmitter
* ic4_stop_tx - stop the transmitter
* @port: Port to operate on
* @port: Port to operate on
* @tty_stop: Set to 1 if called via uart_stop
*
*
*/
*/
static
void
ic4_stop_tx
(
struct
uart_port
*
the_port
,
unsigned
int
tty_stop
)
static
void
ic4_stop_tx
(
struct
uart_port
*
the_port
)
{
{
}
}
...
@@ -2471,10 +2470,9 @@ static unsigned int ic4_get_mctrl(struct uart_port *the_port)
...
@@ -2471,10 +2470,9 @@ static unsigned int ic4_get_mctrl(struct uart_port *the_port)
/**
/**
* ic4_start_tx - Start transmitter, flush any output
* ic4_start_tx - Start transmitter, flush any output
* @port: Port to operate on
* @port: Port to operate on
* @tty_stop: Set to 1 if called via uart_start
*
*
*/
*/
static
void
ic4_start_tx
(
struct
uart_port
*
the_port
,
unsigned
int
tty_stop
)
static
void
ic4_start_tx
(
struct
uart_port
*
the_port
)
{
{
struct
ioc4_port
*
port
=
get_ioc4_port
(
the_port
);
struct
ioc4_port
*
port
=
get_ioc4_port
(
the_port
);
unsigned
long
flags
;
unsigned
long
flags
;
...
...
drivers/serial/ip22zilog.c
View file @
138307b4
...
@@ -592,7 +592,7 @@ static void ip22zilog_set_mctrl(struct uart_port *port, unsigned int mctrl)
...
@@ -592,7 +592,7 @@ static void ip22zilog_set_mctrl(struct uart_port *port, unsigned int mctrl)
}
}
/* The port lock is held and interrupts are disabled. */
/* The port lock is held and interrupts are disabled. */
static
void
ip22zilog_stop_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_stop
)
static
void
ip22zilog_stop_tx
(
struct
uart_port
*
port
)
{
{
struct
uart_ip22zilog_port
*
up
=
(
struct
uart_ip22zilog_port
*
)
port
;
struct
uart_ip22zilog_port
*
up
=
(
struct
uart_ip22zilog_port
*
)
port
;
...
@@ -600,7 +600,7 @@ static void ip22zilog_stop_tx(struct uart_port *port, unsigned int tty_stop)
...
@@ -600,7 +600,7 @@ static void ip22zilog_stop_tx(struct uart_port *port, unsigned int tty_stop)
}
}
/* The port lock is held and interrupts are disabled. */
/* The port lock is held and interrupts are disabled. */
static
void
ip22zilog_start_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_start
)
static
void
ip22zilog_start_tx
(
struct
uart_port
*
port
)
{
{
struct
uart_ip22zilog_port
*
up
=
(
struct
uart_ip22zilog_port
*
)
port
;
struct
uart_ip22zilog_port
*
up
=
(
struct
uart_ip22zilog_port
*
)
port
;
struct
zilog_channel
*
channel
=
ZILOG_CHANNEL_FROM_PORT
(
port
);
struct
zilog_channel
*
channel
=
ZILOG_CHANNEL_FROM_PORT
(
port
);
...
...
drivers/serial/jsm/jsm_tty.c
View file @
138307b4
...
@@ -113,7 +113,7 @@ static void jsm_tty_set_mctrl(struct uart_port *port, unsigned int mctrl)
...
@@ -113,7 +113,7 @@ static void jsm_tty_set_mctrl(struct uart_port *port, unsigned int mctrl)
udelay
(
10
);
udelay
(
10
);
}
}
static
void
jsm_tty_start_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_start
)
static
void
jsm_tty_start_tx
(
struct
uart_port
*
port
)
{
{
struct
jsm_channel
*
channel
=
(
struct
jsm_channel
*
)
port
;
struct
jsm_channel
*
channel
=
(
struct
jsm_channel
*
)
port
;
...
@@ -125,7 +125,7 @@ static void jsm_tty_start_tx(struct uart_port *port, unsigned int tty_start)
...
@@ -125,7 +125,7 @@ static void jsm_tty_start_tx(struct uart_port *port, unsigned int tty_start)
jsm_printk
(
IOCTL
,
INFO
,
&
channel
->
ch_bd
->
pci_dev
,
"finish
\n
"
);
jsm_printk
(
IOCTL
,
INFO
,
&
channel
->
ch_bd
->
pci_dev
,
"finish
\n
"
);
}
}
static
void
jsm_tty_stop_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_stop
)
static
void
jsm_tty_stop_tx
(
struct
uart_port
*
port
)
{
{
struct
jsm_channel
*
channel
=
(
struct
jsm_channel
*
)
port
;
struct
jsm_channel
*
channel
=
(
struct
jsm_channel
*
)
port
;
...
...
drivers/serial/m32r_sio.c
View file @
138307b4
...
@@ -275,7 +275,7 @@ serial_out(struct uart_sio_port *up, int offset, int value)
...
@@ -275,7 +275,7 @@ serial_out(struct uart_sio_port *up, int offset, int value)
__sio_out
(
value
,
offset
);
__sio_out
(
value
,
offset
);
}
}
static
void
m32r_sio_stop_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_stop
)
static
void
m32r_sio_stop_tx
(
struct
uart_port
*
port
)
{
{
struct
uart_sio_port
*
up
=
(
struct
uart_sio_port
*
)
port
;
struct
uart_sio_port
*
up
=
(
struct
uart_sio_port
*
)
port
;
...
@@ -285,7 +285,7 @@ static void m32r_sio_stop_tx(struct uart_port *port, unsigned int tty_stop)
...
@@ -285,7 +285,7 @@ static void m32r_sio_stop_tx(struct uart_port *port, unsigned int tty_stop)
}
}
}
}
static
void
m32r_sio_start_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_start
)
static
void
m32r_sio_start_tx
(
struct
uart_port
*
port
)
{
{
#ifdef CONFIG_SERIAL_M32R_PLDSIO
#ifdef CONFIG_SERIAL_M32R_PLDSIO
struct
uart_sio_port
*
up
=
(
struct
uart_sio_port
*
)
port
;
struct
uart_sio_port
*
up
=
(
struct
uart_sio_port
*
)
port
;
...
@@ -425,7 +425,7 @@ static _INLINE_ void transmit_chars(struct uart_sio_port *up)
...
@@ -425,7 +425,7 @@ static _INLINE_ void transmit_chars(struct uart_sio_port *up)
return
;
return
;
}
}
if
(
uart_circ_empty
(
xmit
)
||
uart_tx_stopped
(
&
up
->
port
))
{
if
(
uart_circ_empty
(
xmit
)
||
uart_tx_stopped
(
&
up
->
port
))
{
m32r_sio_stop_tx
(
&
up
->
port
,
0
);
m32r_sio_stop_tx
(
&
up
->
port
);
return
;
return
;
}
}
...
@@ -446,7 +446,7 @@ static _INLINE_ void transmit_chars(struct uart_sio_port *up)
...
@@ -446,7 +446,7 @@ static _INLINE_ void transmit_chars(struct uart_sio_port *up)
DEBUG_INTR
(
"THRE..."
);
DEBUG_INTR
(
"THRE..."
);
if
(
uart_circ_empty
(
xmit
))
if
(
uart_circ_empty
(
xmit
))
m32r_sio_stop_tx
(
&
up
->
port
,
0
);
m32r_sio_stop_tx
(
&
up
->
port
);
}
}
/*
/*
...
...
drivers/serial/mpc52xx_uart.c
View file @
138307b4
...
@@ -119,7 +119,7 @@ mpc52xx_uart_get_mctrl(struct uart_port *port)
...
@@ -119,7 +119,7 @@ mpc52xx_uart_get_mctrl(struct uart_port *port)
}
}
static
void
static
void
mpc52xx_uart_stop_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_stop
)
mpc52xx_uart_stop_tx
(
struct
uart_port
*
port
)
{
{
/* port->lock taken by caller */
/* port->lock taken by caller */
port
->
read_status_mask
&=
~
MPC52xx_PSC_IMR_TXRDY
;
port
->
read_status_mask
&=
~
MPC52xx_PSC_IMR_TXRDY
;
...
@@ -127,7 +127,7 @@ mpc52xx_uart_stop_tx(struct uart_port *port, unsigned int tty_stop)
...
@@ -127,7 +127,7 @@ mpc52xx_uart_stop_tx(struct uart_port *port, unsigned int tty_stop)
}
}
static
void
static
void
mpc52xx_uart_start_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_start
)
mpc52xx_uart_start_tx
(
struct
uart_port
*
port
)
{
{
/* port->lock taken by caller */
/* port->lock taken by caller */
port
->
read_status_mask
|=
MPC52xx_PSC_IMR_TXRDY
;
port
->
read_status_mask
|=
MPC52xx_PSC_IMR_TXRDY
;
...
@@ -485,7 +485,7 @@ mpc52xx_uart_int_tx_chars(struct uart_port *port)
...
@@ -485,7 +485,7 @@ mpc52xx_uart_int_tx_chars(struct uart_port *port)
/* Nothing to do ? */
/* Nothing to do ? */
if
(
uart_circ_empty
(
xmit
)
||
uart_tx_stopped
(
port
))
{
if
(
uart_circ_empty
(
xmit
)
||
uart_tx_stopped
(
port
))
{
mpc52xx_uart_stop_tx
(
port
,
0
);
mpc52xx_uart_stop_tx
(
port
);
return
0
;
return
0
;
}
}
...
@@ -504,7 +504,7 @@ mpc52xx_uart_int_tx_chars(struct uart_port *port)
...
@@ -504,7 +504,7 @@ mpc52xx_uart_int_tx_chars(struct uart_port *port)
/* Maybe we're done after all */
/* Maybe we're done after all */
if
(
uart_circ_empty
(
xmit
))
{
if
(
uart_circ_empty
(
xmit
))
{
mpc52xx_uart_stop_tx
(
port
,
0
);
mpc52xx_uart_stop_tx
(
port
);
return
0
;
return
0
;
}
}
...
...
drivers/serial/mpsc.c
View file @
138307b4
...
@@ -1072,18 +1072,18 @@ mpsc_get_mctrl(struct uart_port *port)
...
@@ -1072,18 +1072,18 @@ mpsc_get_mctrl(struct uart_port *port)
}
}
static
void
static
void
mpsc_stop_tx
(
struct
uart_port
*
port
,
uint
tty_start
)
mpsc_stop_tx
(
struct
uart_port
*
port
)
{
{
struct
mpsc_port_info
*
pi
=
(
struct
mpsc_port_info
*
)
port
;
struct
mpsc_port_info
*
pi
=
(
struct
mpsc_port_info
*
)
port
;
pr_debug
(
"mpsc_stop_tx[%d]
: tty_start: %d
\n
"
,
port
->
line
,
tty_start
);
pr_debug
(
"mpsc_stop_tx[%d]
\n
"
,
port
->
line
);
mpsc_freeze
(
pi
);
mpsc_freeze
(
pi
);
return
;
return
;
}
}
static
void
static
void
mpsc_start_tx
(
struct
uart_port
*
port
,
uint
tty_start
)
mpsc_start_tx
(
struct
uart_port
*
port
)
{
{
struct
mpsc_port_info
*
pi
=
(
struct
mpsc_port_info
*
)
port
;
struct
mpsc_port_info
*
pi
=
(
struct
mpsc_port_info
*
)
port
;
...
@@ -1091,7 +1091,7 @@ mpsc_start_tx(struct uart_port *port, uint tty_start)
...
@@ -1091,7 +1091,7 @@ mpsc_start_tx(struct uart_port *port, uint tty_start)
mpsc_copy_tx_data
(
pi
);
mpsc_copy_tx_data
(
pi
);
mpsc_sdma_start_tx
(
pi
);
mpsc_sdma_start_tx
(
pi
);
pr_debug
(
"mpsc_start_tx[%d]
: tty_start: %d
\n
"
,
port
->
line
,
tty_start
);
pr_debug
(
"mpsc_start_tx[%d]
\n
"
,
port
->
line
);
return
;
return
;
}
}
...
...
drivers/serial/mux.c
View file @
138307b4
...
@@ -111,22 +111,20 @@ static unsigned int mux_get_mctrl(struct uart_port *port)
...
@@ -111,22 +111,20 @@ static unsigned int mux_get_mctrl(struct uart_port *port)
/**
/**
* mux_stop_tx - Stop transmitting characters.
* mux_stop_tx - Stop transmitting characters.
* @port: Ptr to the uart_port.
* @port: Ptr to the uart_port.
* @tty_stop: tty layer issue this command?
*
*
* The Serial MUX does not support this function.
* The Serial MUX does not support this function.
*/
*/
static
void
mux_stop_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_stop
)
static
void
mux_stop_tx
(
struct
uart_port
*
port
)
{
{
}
}
/**
/**
* mux_start_tx - Start transmitting characters.
* mux_start_tx - Start transmitting characters.
* @port: Ptr to the uart_port.
* @port: Ptr to the uart_port.
* @tty_start: tty layer issue this command?
*
*
* The Serial Mux does not support this function.
* The Serial Mux does not support this function.
*/
*/
static
void
mux_start_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_start
)
static
void
mux_start_tx
(
struct
uart_port
*
port
)
{
{
}
}
...
@@ -181,7 +179,7 @@ static void mux_write(struct uart_port *port)
...
@@ -181,7 +179,7 @@ static void mux_write(struct uart_port *port)
}
}
if
(
uart_circ_empty
(
xmit
)
||
uart_tx_stopped
(
port
))
{
if
(
uart_circ_empty
(
xmit
)
||
uart_tx_stopped
(
port
))
{
mux_stop_tx
(
port
,
0
);
mux_stop_tx
(
port
);
return
;
return
;
}
}
...
@@ -202,7 +200,7 @@ static void mux_write(struct uart_port *port)
...
@@ -202,7 +200,7 @@ static void mux_write(struct uart_port *port)
uart_write_wakeup
(
port
);
uart_write_wakeup
(
port
);
if
(
uart_circ_empty
(
xmit
))
if
(
uart_circ_empty
(
xmit
))
mux_stop_tx
(
port
,
0
);
mux_stop_tx
(
port
);
}
}
/**
/**
...
...
drivers/serial/pmac_zilog.c
View file @
138307b4
...
@@ -630,11 +630,10 @@ static unsigned int pmz_get_mctrl(struct uart_port *port)
...
@@ -630,11 +630,10 @@ static unsigned int pmz_get_mctrl(struct uart_port *port)
/*
/*
* Stop TX side. Dealt like sunzilog at next Tx interrupt,
* Stop TX side. Dealt like sunzilog at next Tx interrupt,
* though for DMA, we will have to do a bit more. What is
* though for DMA, we will have to do a bit more.
* the meaning of the tty_stop bit ? XXX
* The port lock is held and interrupts are disabled.
* The port lock is held and interrupts are disabled.
*/
*/
static
void
pmz_stop_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_stop
)
static
void
pmz_stop_tx
(
struct
uart_port
*
port
)
{
{
to_pmz
(
port
)
->
flags
|=
PMACZILOG_FLAG_TX_STOPPED
;
to_pmz
(
port
)
->
flags
|=
PMACZILOG_FLAG_TX_STOPPED
;
}
}
...
@@ -643,7 +642,7 @@ static void pmz_stop_tx(struct uart_port *port, unsigned int tty_stop)
...
@@ -643,7 +642,7 @@ static void pmz_stop_tx(struct uart_port *port, unsigned int tty_stop)
* Kick the Tx side.
* Kick the Tx side.
* The port lock is held and interrupts are disabled.
* The port lock is held and interrupts are disabled.
*/
*/
static
void
pmz_start_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_start
)
static
void
pmz_start_tx
(
struct
uart_port
*
port
)
{
{
struct
uart_pmac_port
*
uap
=
to_pmz
(
port
);
struct
uart_pmac_port
*
uap
=
to_pmz
(
port
);
unsigned
char
status
;
unsigned
char
status
;
...
...
drivers/serial/pxa.c
View file @
138307b4
...
@@ -80,7 +80,7 @@ static void serial_pxa_enable_ms(struct uart_port *port)
...
@@ -80,7 +80,7 @@ static void serial_pxa_enable_ms(struct uart_port *port)
serial_out
(
up
,
UART_IER
,
up
->
ier
);
serial_out
(
up
,
UART_IER
,
up
->
ier
);
}
}
static
void
serial_pxa_stop_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_stop
)
static
void
serial_pxa_stop_tx
(
struct
uart_port
*
port
)
{
{
struct
uart_pxa_port
*
up
=
(
struct
uart_pxa_port
*
)
port
;
struct
uart_pxa_port
*
up
=
(
struct
uart_pxa_port
*
)
port
;
...
@@ -185,7 +185,7 @@ static void transmit_chars(struct uart_pxa_port *up)
...
@@ -185,7 +185,7 @@ static void transmit_chars(struct uart_pxa_port *up)
return
;
return
;
}
}
if
(
uart_circ_empty
(
xmit
)
||
uart_tx_stopped
(
&
up
->
port
))
{
if
(
uart_circ_empty
(
xmit
)
||
uart_tx_stopped
(
&
up
->
port
))
{
serial_pxa_stop_tx
(
&
up
->
port
,
0
);
serial_pxa_stop_tx
(
&
up
->
port
);
return
;
return
;
}
}
...
@@ -203,10 +203,10 @@ static void transmit_chars(struct uart_pxa_port *up)
...
@@ -203,10 +203,10 @@ static void transmit_chars(struct uart_pxa_port *up)
if
(
uart_circ_empty
(
xmit
))
if
(
uart_circ_empty
(
xmit
))
serial_pxa_stop_tx
(
&
up
->
port
,
0
);
serial_pxa_stop_tx
(
&
up
->
port
);
}
}
static
void
serial_pxa_start_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_start
)
static
void
serial_pxa_start_tx
(
struct
uart_port
*
port
)
{
{
struct
uart_pxa_port
*
up
=
(
struct
uart_pxa_port
*
)
port
;
struct
uart_pxa_port
*
up
=
(
struct
uart_pxa_port
*
)
port
;
...
...
drivers/serial/s3c2410.c
View file @
138307b4
...
@@ -246,8 +246,7 @@ static void s3c24xx_serial_rx_disable(struct uart_port *port)
...
@@ -246,8 +246,7 @@ static void s3c24xx_serial_rx_disable(struct uart_port *port)
spin_unlock_irqrestore
(
&
port
->
lock
,
flags
);
spin_unlock_irqrestore
(
&
port
->
lock
,
flags
);
}
}
static
void
static
void
s3c24xx_serial_stop_tx
(
struct
uart_port
*
port
)
s3c24xx_serial_stop_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_stop
)
{
{
if
(
tx_enabled
(
port
))
{
if
(
tx_enabled
(
port
))
{
disable_irq
(
TX_IRQ
(
port
));
disable_irq
(
TX_IRQ
(
port
));
...
@@ -257,8 +256,7 @@ s3c24xx_serial_stop_tx(struct uart_port *port, unsigned int tty_stop)
...
@@ -257,8 +256,7 @@ s3c24xx_serial_stop_tx(struct uart_port *port, unsigned int tty_stop)
}
}
}
}
static
void
static
void
s3c24xx_serial_start_tx
(
struct
uart_port
*
port
)
s3c24xx_serial_start_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_start
)
{
{
if
(
!
tx_enabled
(
port
))
{
if
(
!
tx_enabled
(
port
))
{
if
(
port
->
flags
&
UPF_CONS_FLOW
)
if
(
port
->
flags
&
UPF_CONS_FLOW
)
...
@@ -424,7 +422,7 @@ static irqreturn_t s3c24xx_serial_tx_chars(int irq, void *id, struct pt_regs *re
...
@@ -424,7 +422,7 @@ static irqreturn_t s3c24xx_serial_tx_chars(int irq, void *id, struct pt_regs *re
*/
*/
if
(
uart_circ_empty
(
xmit
)
||
uart_tx_stopped
(
port
))
{
if
(
uart_circ_empty
(
xmit
)
||
uart_tx_stopped
(
port
))
{
s3c24xx_serial_stop_tx
(
port
,
0
);
s3c24xx_serial_stop_tx
(
port
);
goto
out
;
goto
out
;
}
}
...
@@ -443,7 +441,7 @@ static irqreturn_t s3c24xx_serial_tx_chars(int irq, void *id, struct pt_regs *re
...
@@ -443,7 +441,7 @@ static irqreturn_t s3c24xx_serial_tx_chars(int irq, void *id, struct pt_regs *re
uart_write_wakeup
(
port
);
uart_write_wakeup
(
port
);
if
(
uart_circ_empty
(
xmit
))
if
(
uart_circ_empty
(
xmit
))
s3c24xx_serial_stop_tx
(
port
,
0
);
s3c24xx_serial_stop_tx
(
port
);
out:
out:
return
IRQ_HANDLED
;
return
IRQ_HANDLED
;
...
...
drivers/serial/sa1100.c
View file @
138307b4
...
@@ -145,7 +145,7 @@ static void sa1100_timeout(unsigned long data)
...
@@ -145,7 +145,7 @@ static void sa1100_timeout(unsigned long data)
/*
/*
* interrupts disabled on entry
* interrupts disabled on entry
*/
*/
static
void
sa1100_stop_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_stop
)
static
void
sa1100_stop_tx
(
struct
uart_port
*
port
)
{
{
struct
sa1100_port
*
sport
=
(
struct
sa1100_port
*
)
port
;
struct
sa1100_port
*
sport
=
(
struct
sa1100_port
*
)
port
;
u32
utcr3
;
u32
utcr3
;
...
@@ -158,7 +158,7 @@ static void sa1100_stop_tx(struct uart_port *port, unsigned int tty_stop)
...
@@ -158,7 +158,7 @@ static void sa1100_stop_tx(struct uart_port *port, unsigned int tty_stop)
/*
/*
* interrupts may not be disabled on entry
* interrupts may not be disabled on entry
*/
*/
static
void
sa1100_start_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_start
)
static
void
sa1100_start_tx
(
struct
uart_port
*
port
)
{
{
struct
sa1100_port
*
sport
=
(
struct
sa1100_port
*
)
port
;
struct
sa1100_port
*
sport
=
(
struct
sa1100_port
*
)
port
;
unsigned
long
flags
;
unsigned
long
flags
;
...
@@ -264,7 +264,7 @@ static void sa1100_tx_chars(struct sa1100_port *sport)
...
@@ -264,7 +264,7 @@ static void sa1100_tx_chars(struct sa1100_port *sport)
sa1100_mctrl_check
(
sport
);
sa1100_mctrl_check
(
sport
);
if
(
uart_circ_empty
(
xmit
)
||
uart_tx_stopped
(
&
sport
->
port
))
{
if
(
uart_circ_empty
(
xmit
)
||
uart_tx_stopped
(
&
sport
->
port
))
{
sa1100_stop_tx
(
&
sport
->
port
,
0
);
sa1100_stop_tx
(
&
sport
->
port
);
return
;
return
;
}
}
...
@@ -284,7 +284,7 @@ static void sa1100_tx_chars(struct sa1100_port *sport)
...
@@ -284,7 +284,7 @@ static void sa1100_tx_chars(struct sa1100_port *sport)
uart_write_wakeup
(
&
sport
->
port
);
uart_write_wakeup
(
&
sport
->
port
);
if
(
uart_circ_empty
(
xmit
))
if
(
uart_circ_empty
(
xmit
))
sa1100_stop_tx
(
&
sport
->
port
,
0
);
sa1100_stop_tx
(
&
sport
->
port
);
}
}
static
irqreturn_t
sa1100_int
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
static
irqreturn_t
sa1100_int
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
...
...
drivers/serial/serial_core.c
View file @
138307b4
...
@@ -80,7 +80,7 @@ static void uart_stop(struct tty_struct *tty)
...
@@ -80,7 +80,7 @@ static void uart_stop(struct tty_struct *tty)
unsigned
long
flags
;
unsigned
long
flags
;
spin_lock_irqsave
(
&
port
->
lock
,
flags
);
spin_lock_irqsave
(
&
port
->
lock
,
flags
);
port
->
ops
->
stop_tx
(
port
,
1
);
port
->
ops
->
stop_tx
(
port
);
spin_unlock_irqrestore
(
&
port
->
lock
,
flags
);
spin_unlock_irqrestore
(
&
port
->
lock
,
flags
);
}
}
...
@@ -91,7 +91,7 @@ static void __uart_start(struct tty_struct *tty)
...
@@ -91,7 +91,7 @@ static void __uart_start(struct tty_struct *tty)
if
(
!
uart_circ_empty
(
&
state
->
info
->
xmit
)
&&
state
->
info
->
xmit
.
buf
&&
if
(
!
uart_circ_empty
(
&
state
->
info
->
xmit
)
&&
state
->
info
->
xmit
.
buf
&&
!
tty
->
stopped
&&
!
tty
->
hw_stopped
)
!
tty
->
stopped
&&
!
tty
->
hw_stopped
)
port
->
ops
->
start_tx
(
port
,
1
);
port
->
ops
->
start_tx
(
port
);
}
}
static
void
uart_start
(
struct
tty_struct
*
tty
)
static
void
uart_start
(
struct
tty_struct
*
tty
)
...
@@ -542,7 +542,7 @@ static void uart_send_xchar(struct tty_struct *tty, char ch)
...
@@ -542,7 +542,7 @@ static void uart_send_xchar(struct tty_struct *tty, char ch)
port
->
x_char
=
ch
;
port
->
x_char
=
ch
;
if
(
ch
)
{
if
(
ch
)
{
spin_lock_irqsave
(
&
port
->
lock
,
flags
);
spin_lock_irqsave
(
&
port
->
lock
,
flags
);
port
->
ops
->
start_tx
(
port
,
0
);
port
->
ops
->
start_tx
(
port
);
spin_unlock_irqrestore
(
&
port
->
lock
,
flags
);
spin_unlock_irqrestore
(
&
port
->
lock
,
flags
);
}
}
}
}
...
@@ -1146,7 +1146,7 @@ static void uart_set_termios(struct tty_struct *tty, struct termios *old_termios
...
@@ -1146,7 +1146,7 @@ static void uart_set_termios(struct tty_struct *tty, struct termios *old_termios
spin_lock_irqsave
(
&
state
->
port
->
lock
,
flags
);
spin_lock_irqsave
(
&
state
->
port
->
lock
,
flags
);
if
(
!
(
state
->
port
->
ops
->
get_mctrl
(
state
->
port
)
&
TIOCM_CTS
))
{
if
(
!
(
state
->
port
->
ops
->
get_mctrl
(
state
->
port
)
&
TIOCM_CTS
))
{
tty
->
hw_stopped
=
1
;
tty
->
hw_stopped
=
1
;
state
->
port
->
ops
->
stop_tx
(
state
->
port
,
0
);
state
->
port
->
ops
->
stop_tx
(
state
->
port
);
}
}
spin_unlock_irqrestore
(
&
state
->
port
->
lock
,
flags
);
spin_unlock_irqrestore
(
&
state
->
port
->
lock
,
flags
);
}
}
...
@@ -1869,7 +1869,7 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *port)
...
@@ -1869,7 +1869,7 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *port)
struct
uart_ops
*
ops
=
port
->
ops
;
struct
uart_ops
*
ops
=
port
->
ops
;
spin_lock_irq
(
&
port
->
lock
);
spin_lock_irq
(
&
port
->
lock
);
ops
->
stop_tx
(
port
,
0
);
ops
->
stop_tx
(
port
);
ops
->
set_mctrl
(
port
,
0
);
ops
->
set_mctrl
(
port
,
0
);
ops
->
stop_rx
(
port
);
ops
->
stop_rx
(
port
);
spin_unlock_irq
(
&
port
->
lock
);
spin_unlock_irq
(
&
port
->
lock
);
...
@@ -1935,7 +1935,7 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *port)
...
@@ -1935,7 +1935,7 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *port)
uart_change_speed
(
state
,
NULL
);
uart_change_speed
(
state
,
NULL
);
spin_lock_irq
(
&
port
->
lock
);
spin_lock_irq
(
&
port
->
lock
);
ops
->
set_mctrl
(
port
,
port
->
mctrl
);
ops
->
set_mctrl
(
port
,
port
->
mctrl
);
ops
->
start_tx
(
port
,
0
);
ops
->
start_tx
(
port
);
spin_unlock_irq
(
&
port
->
lock
);
spin_unlock_irq
(
&
port
->
lock
);
}
}
...
@@ -2289,143 +2289,11 @@ int uart_match_port(struct uart_port *port1, struct uart_port *port2)
...
@@ -2289,143 +2289,11 @@ int uart_match_port(struct uart_port *port1, struct uart_port *port2)
}
}
EXPORT_SYMBOL
(
uart_match_port
);
EXPORT_SYMBOL
(
uart_match_port
);
/*
* Try to find an unused uart_state slot for a port.
*/
static
struct
uart_state
*
uart_find_match_or_unused
(
struct
uart_driver
*
drv
,
struct
uart_port
*
port
)
{
int
i
;
/*
* First, find a port entry which matches. Note: if we do
* find a matching entry, and it has a non-zero use count,
* then we can't register the port.
*/
for
(
i
=
0
;
i
<
drv
->
nr
;
i
++
)
if
(
uart_match_port
(
drv
->
state
[
i
].
port
,
port
))
return
&
drv
->
state
[
i
];
/*
* We didn't find a matching entry, so look for the first
* free entry. We look for one which hasn't been previously
* used (indicated by zero iobase).
*/
for
(
i
=
0
;
i
<
drv
->
nr
;
i
++
)
if
(
drv
->
state
[
i
].
port
->
type
==
PORT_UNKNOWN
&&
drv
->
state
[
i
].
port
->
iobase
==
0
&&
drv
->
state
[
i
].
count
==
0
)
return
&
drv
->
state
[
i
];
/*
* That also failed. Last resort is to find any currently
* entry which doesn't have a real port associated with it.
*/
for
(
i
=
0
;
i
<
drv
->
nr
;
i
++
)
if
(
drv
->
state
[
i
].
port
->
type
==
PORT_UNKNOWN
&&
drv
->
state
[
i
].
count
==
0
)
return
&
drv
->
state
[
i
];
return
NULL
;
}
/**
* uart_register_port: register uart settings with a port
* @drv: pointer to the uart low level driver structure for this port
* @port: uart port structure describing the port
*
* Register UART settings with the specified low level driver. Detect
* the type of the port if UPF_BOOT_AUTOCONF is set, and detect the
* IRQ if UPF_AUTO_IRQ is set.
*
* We try to pick the same port for the same IO base address, so that
* when a modem is plugged in, unplugged and plugged back in, it gets
* allocated the same port.
*
* Returns negative error, or positive line number.
*/
int
uart_register_port
(
struct
uart_driver
*
drv
,
struct
uart_port
*
port
)
{
struct
uart_state
*
state
;
int
ret
;
down
(
&
port_sem
);
state
=
uart_find_match_or_unused
(
drv
,
port
);
if
(
state
)
{
/*
* Ok, we've found a line that we can use.
*
* If we find a port that matches this one, and it appears
* to be in-use (even if it doesn't have a type) we shouldn't
* alter it underneath itself - the port may be open and
* trying to do useful work.
*/
if
(
uart_users
(
state
)
!=
0
)
{
ret
=
-
EBUSY
;
goto
out
;
}
/*
* If the port is already initialised, don't touch it.
*/
if
(
state
->
port
->
type
==
PORT_UNKNOWN
)
{
state
->
port
->
iobase
=
port
->
iobase
;
state
->
port
->
membase
=
port
->
membase
;
state
->
port
->
irq
=
port
->
irq
;
state
->
port
->
uartclk
=
port
->
uartclk
;
state
->
port
->
fifosize
=
port
->
fifosize
;
state
->
port
->
regshift
=
port
->
regshift
;
state
->
port
->
iotype
=
port
->
iotype
;
state
->
port
->
flags
=
port
->
flags
;
state
->
port
->
line
=
state
-
drv
->
state
;
state
->
port
->
mapbase
=
port
->
mapbase
;
uart_configure_port
(
drv
,
state
,
state
->
port
);
}
ret
=
state
->
port
->
line
;
}
else
ret
=
-
ENOSPC
;
out:
up
(
&
port_sem
);
return
ret
;
}
/**
* uart_unregister_port - de-allocate a port
* @drv: pointer to the uart low level driver structure for this port
* @line: line index previously returned from uart_register_port()
*
* Hang up the specified line associated with the low level driver,
* and mark the port as unused.
*/
void
uart_unregister_port
(
struct
uart_driver
*
drv
,
int
line
)
{
struct
uart_state
*
state
;
if
(
line
<
0
||
line
>=
drv
->
nr
)
{
printk
(
KERN_ERR
"Attempt to unregister "
);
printk
(
"%s%d"
,
drv
->
dev_name
,
line
);
printk
(
"
\n
"
);
return
;
}
state
=
drv
->
state
+
line
;
down
(
&
port_sem
);
uart_unconfigure_port
(
drv
,
state
);
up
(
&
port_sem
);
}
EXPORT_SYMBOL
(
uart_write_wakeup
);
EXPORT_SYMBOL
(
uart_write_wakeup
);
EXPORT_SYMBOL
(
uart_register_driver
);
EXPORT_SYMBOL
(
uart_register_driver
);
EXPORT_SYMBOL
(
uart_unregister_driver
);
EXPORT_SYMBOL
(
uart_unregister_driver
);
EXPORT_SYMBOL
(
uart_suspend_port
);
EXPORT_SYMBOL
(
uart_suspend_port
);
EXPORT_SYMBOL
(
uart_resume_port
);
EXPORT_SYMBOL
(
uart_resume_port
);
EXPORT_SYMBOL
(
uart_register_port
);
EXPORT_SYMBOL
(
uart_unregister_port
);
EXPORT_SYMBOL
(
uart_add_one_port
);
EXPORT_SYMBOL
(
uart_add_one_port
);
EXPORT_SYMBOL
(
uart_remove_one_port
);
EXPORT_SYMBOL
(
uart_remove_one_port
);
...
...
drivers/serial/serial_lh7a40x.c
View file @
138307b4
...
@@ -112,13 +112,12 @@ struct uart_port_lh7a40x {
...
@@ -112,13 +112,12 @@ struct uart_port_lh7a40x {
unsigned
int
statusPrev
;
/* Most recently read modem status */
unsigned
int
statusPrev
;
/* Most recently read modem status */
};
};
static
void
lh7a40xuart_stop_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_stop
)
static
void
lh7a40xuart_stop_tx
(
struct
uart_port
*
port
)
{
{
BIT_CLR
(
port
,
UART_R_INTEN
,
TxInt
);
BIT_CLR
(
port
,
UART_R_INTEN
,
TxInt
);
}
}
static
void
lh7a40xuart_start_tx
(
struct
uart_port
*
port
,
static
void
lh7a40xuart_start_tx
(
struct
uart_port
*
port
)
unsigned
int
tty_start
)
{
{
BIT_SET
(
port
,
UART_R_INTEN
,
TxInt
);
BIT_SET
(
port
,
UART_R_INTEN
,
TxInt
);
...
...
drivers/serial/serial_txx9.c
View file @
138307b4
...
@@ -253,7 +253,7 @@ sio_quot_set(struct uart_txx9_port *up, int quot)
...
@@ -253,7 +253,7 @@ sio_quot_set(struct uart_txx9_port *up, int quot)
sio_out
(
up
,
TXX9_SIBGR
,
0xff
|
TXX9_SIBGR_BCLK_T6
);
sio_out
(
up
,
TXX9_SIBGR
,
0xff
|
TXX9_SIBGR_BCLK_T6
);
}
}
static
void
serial_txx9_stop_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_stop
)
static
void
serial_txx9_stop_tx
(
struct
uart_port
*
port
)
{
{
struct
uart_txx9_port
*
up
=
(
struct
uart_txx9_port
*
)
port
;
struct
uart_txx9_port
*
up
=
(
struct
uart_txx9_port
*
)
port
;
unsigned
long
flags
;
unsigned
long
flags
;
...
@@ -263,7 +263,7 @@ static void serial_txx9_stop_tx(struct uart_port *port, unsigned int tty_stop)
...
@@ -263,7 +263,7 @@ static void serial_txx9_stop_tx(struct uart_port *port, unsigned int tty_stop)
spin_unlock_irqrestore
(
&
up
->
port
.
lock
,
flags
);
spin_unlock_irqrestore
(
&
up
->
port
.
lock
,
flags
);
}
}
static
void
serial_txx9_start_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_start
)
static
void
serial_txx9_start_tx
(
struct
uart_port
*
port
)
{
{
struct
uart_txx9_port
*
up
=
(
struct
uart_txx9_port
*
)
port
;
struct
uart_txx9_port
*
up
=
(
struct
uart_txx9_port
*
)
port
;
unsigned
long
flags
;
unsigned
long
flags
;
...
@@ -372,7 +372,7 @@ static inline void transmit_chars(struct uart_txx9_port *up)
...
@@ -372,7 +372,7 @@ static inline void transmit_chars(struct uart_txx9_port *up)
return
;
return
;
}
}
if
(
uart_circ_empty
(
xmit
)
||
uart_tx_stopped
(
&
up
->
port
))
{
if
(
uart_circ_empty
(
xmit
)
||
uart_tx_stopped
(
&
up
->
port
))
{
serial_txx9_stop_tx
(
&
up
->
port
,
0
);
serial_txx9_stop_tx
(
&
up
->
port
);
return
;
return
;
}
}
...
@@ -389,7 +389,7 @@ static inline void transmit_chars(struct uart_txx9_port *up)
...
@@ -389,7 +389,7 @@ static inline void transmit_chars(struct uart_txx9_port *up)
uart_write_wakeup
(
&
up
->
port
);
uart_write_wakeup
(
&
up
->
port
);
if
(
uart_circ_empty
(
xmit
))
if
(
uart_circ_empty
(
xmit
))
serial_txx9_stop_tx
(
&
up
->
port
,
0
);
serial_txx9_stop_tx
(
&
up
->
port
);
}
}
static
irqreturn_t
serial_txx9_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
static
irqreturn_t
serial_txx9_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
...
...
drivers/serial/sh-sci.c
View file @
138307b4
...
@@ -79,8 +79,8 @@ static struct sci_port *serial_console_port = 0;
...
@@ -79,8 +79,8 @@ static struct sci_port *serial_console_port = 0;
#endif
/* CONFIG_SERIAL_SH_SCI_CONSOLE */
#endif
/* CONFIG_SERIAL_SH_SCI_CONSOLE */
/* Function prototypes */
/* Function prototypes */
static
void
sci_stop_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_stop
);
static
void
sci_stop_tx
(
struct
uart_port
*
port
);
static
void
sci_start_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_start
);
static
void
sci_start_tx
(
struct
uart_port
*
port
);
static
void
sci_start_rx
(
struct
uart_port
*
port
,
unsigned
int
tty_start
);
static
void
sci_start_rx
(
struct
uart_port
*
port
,
unsigned
int
tty_start
);
static
void
sci_stop_rx
(
struct
uart_port
*
port
);
static
void
sci_stop_rx
(
struct
uart_port
*
port
);
static
int
sci_request_irq
(
struct
sci_port
*
port
);
static
int
sci_request_irq
(
struct
sci_port
*
port
);
...
@@ -455,7 +455,7 @@ static void sci_transmit_chars(struct uart_port *port)
...
@@ -455,7 +455,7 @@ static void sci_transmit_chars(struct uart_port *port)
if
(
uart_circ_chars_pending
(
xmit
)
<
WAKEUP_CHARS
)
if
(
uart_circ_chars_pending
(
xmit
)
<
WAKEUP_CHARS
)
uart_write_wakeup
(
port
);
uart_write_wakeup
(
port
);
if
(
uart_circ_empty
(
xmit
))
{
if
(
uart_circ_empty
(
xmit
))
{
sci_stop_tx
(
port
,
0
);
sci_stop_tx
(
port
);
}
else
{
}
else
{
local_irq_save
(
flags
);
local_irq_save
(
flags
);
ctrl
=
sci_in
(
port
,
SCSCR
);
ctrl
=
sci_in
(
port
,
SCSCR
);
...
@@ -900,7 +900,7 @@ static unsigned int sci_get_mctrl(struct uart_port *port)
...
@@ -900,7 +900,7 @@ static unsigned int sci_get_mctrl(struct uart_port *port)
return
TIOCM_DTR
|
TIOCM_RTS
|
TIOCM_DSR
;
return
TIOCM_DTR
|
TIOCM_RTS
|
TIOCM_DSR
;
}
}
static
void
sci_start_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_start
)
static
void
sci_start_tx
(
struct
uart_port
*
port
)
{
{
struct
sci_port
*
s
=
&
sci_ports
[
port
->
line
];
struct
sci_port
*
s
=
&
sci_ports
[
port
->
line
];
...
@@ -909,7 +909,7 @@ static void sci_start_tx(struct uart_port *port, unsigned int tty_start)
...
@@ -909,7 +909,7 @@ static void sci_start_tx(struct uart_port *port, unsigned int tty_start)
enable_irq
(
s
->
irqs
[
SCIx_TXI_IRQ
]);
enable_irq
(
s
->
irqs
[
SCIx_TXI_IRQ
]);
}
}
static
void
sci_stop_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_stop
)
static
void
sci_stop_tx
(
struct
uart_port
*
port
)
{
{
unsigned
long
flags
;
unsigned
long
flags
;
unsigned
short
ctrl
;
unsigned
short
ctrl
;
...
@@ -978,7 +978,7 @@ static void sci_shutdown(struct uart_port *port)
...
@@ -978,7 +978,7 @@ static void sci_shutdown(struct uart_port *port)
struct
sci_port
*
s
=
&
sci_ports
[
port
->
line
];
struct
sci_port
*
s
=
&
sci_ports
[
port
->
line
];
sci_stop_rx
(
port
);
sci_stop_rx
(
port
);
sci_stop_tx
(
port
,
1
);
sci_stop_tx
(
port
);
sci_free_irq
(
s
);
sci_free_irq
(
s
);
#if defined(__H8300S__)
#if defined(__H8300S__)
...
...
drivers/serial/sn_console.c
View file @
138307b4
...
@@ -259,10 +259,9 @@ static unsigned int snp_tx_empty(struct uart_port *port)
...
@@ -259,10 +259,9 @@ static unsigned int snp_tx_empty(struct uart_port *port)
/**
/**
* snp_stop_tx - stop the transmitter - no-op for us
* snp_stop_tx - stop the transmitter - no-op for us
* @port: Port to operat eon - we ignore - no-op function
* @port: Port to operat eon - we ignore - no-op function
* @tty_stop: Set to 1 if called via uart_stop
*
*
*/
*/
static
void
snp_stop_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_stop
)
static
void
snp_stop_tx
(
struct
uart_port
*
port
)
{
{
}
}
...
@@ -325,10 +324,9 @@ static void snp_stop_rx(struct uart_port *port)
...
@@ -325,10 +324,9 @@ static void snp_stop_rx(struct uart_port *port)
/**
/**
* snp_start_tx - Start transmitter
* snp_start_tx - Start transmitter
* @port: Port to operate on
* @port: Port to operate on
* @tty_stop: Set to 1 if called via uart_start
*
*
*/
*/
static
void
snp_start_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_stop
)
static
void
snp_start_tx
(
struct
uart_port
*
port
)
{
{
if
(
sal_console_port
.
sc_ops
->
sal_wakeup_transmit
)
if
(
sal_console_port
.
sc_ops
->
sal_wakeup_transmit
)
sal_console_port
.
sc_ops
->
sal_wakeup_transmit
(
&
sal_console_port
,
sal_console_port
.
sc_ops
->
sal_wakeup_transmit
(
&
sal_console_port
,
...
@@ -615,7 +613,7 @@ static void sn_transmit_chars(struct sn_cons_port *port, int raw)
...
@@ -615,7 +613,7 @@ static void sn_transmit_chars(struct sn_cons_port *port, int raw)
uart_write_wakeup
(
&
port
->
sc_port
);
uart_write_wakeup
(
&
port
->
sc_port
);
if
(
uart_circ_empty
(
xmit
))
if
(
uart_circ_empty
(
xmit
))
snp_stop_tx
(
&
port
->
sc_port
,
0
);
/* no-op for us */
snp_stop_tx
(
&
port
->
sc_port
);
/* no-op for us */
}
}
/**
/**
...
...
drivers/serial/sunsab.c
View file @
138307b4
...
@@ -245,7 +245,7 @@ receive_chars(struct uart_sunsab_port *up,
...
@@ -245,7 +245,7 @@ receive_chars(struct uart_sunsab_port *up,
return
tty
;
return
tty
;
}
}
static
void
sunsab_stop_tx
(
struct
uart_port
*
,
unsigned
int
);
static
void
sunsab_stop_tx
(
struct
uart_port
*
);
static
void
sunsab_tx_idle
(
struct
uart_sunsab_port
*
);
static
void
sunsab_tx_idle
(
struct
uart_sunsab_port
*
);
static
void
transmit_chars
(
struct
uart_sunsab_port
*
up
,
static
void
transmit_chars
(
struct
uart_sunsab_port
*
up
,
...
@@ -301,7 +301,7 @@ static void transmit_chars(struct uart_sunsab_port *up,
...
@@ -301,7 +301,7 @@ static void transmit_chars(struct uart_sunsab_port *up,
uart_write_wakeup
(
&
up
->
port
);
uart_write_wakeup
(
&
up
->
port
);
if
(
uart_circ_empty
(
xmit
))
if
(
uart_circ_empty
(
xmit
))
sunsab_stop_tx
(
&
up
->
port
,
0
);
sunsab_stop_tx
(
&
up
->
port
);
}
}
static
void
check_status
(
struct
uart_sunsab_port
*
up
,
static
void
check_status
(
struct
uart_sunsab_port
*
up
,
...
@@ -448,7 +448,7 @@ static unsigned int sunsab_get_mctrl(struct uart_port *port)
...
@@ -448,7 +448,7 @@ static unsigned int sunsab_get_mctrl(struct uart_port *port)
}
}
/* port->lock held by caller. */
/* port->lock held by caller. */
static
void
sunsab_stop_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_stop
)
static
void
sunsab_stop_tx
(
struct
uart_port
*
port
)
{
{
struct
uart_sunsab_port
*
up
=
(
struct
uart_sunsab_port
*
)
port
;
struct
uart_sunsab_port
*
up
=
(
struct
uart_sunsab_port
*
)
port
;
...
@@ -476,7 +476,7 @@ static void sunsab_tx_idle(struct uart_sunsab_port *up)
...
@@ -476,7 +476,7 @@ static void sunsab_tx_idle(struct uart_sunsab_port *up)
}
}
/* port->lock held by caller. */
/* port->lock held by caller. */
static
void
sunsab_start_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_start
)
static
void
sunsab_start_tx
(
struct
uart_port
*
port
)
{
{
struct
uart_sunsab_port
*
up
=
(
struct
uart_sunsab_port
*
)
port
;
struct
uart_sunsab_port
*
up
=
(
struct
uart_sunsab_port
*
)
port
;
struct
circ_buf
*
xmit
=
&
up
->
port
.
info
->
xmit
;
struct
circ_buf
*
xmit
=
&
up
->
port
.
info
->
xmit
;
...
...
drivers/serial/sunsu.c
View file @
138307b4
...
@@ -255,21 +255,27 @@ static void disable_rsa(struct uart_sunsu_port *up)
...
@@ -255,21 +255,27 @@ static void disable_rsa(struct uart_sunsu_port *up)
}
}
#endif
/* CONFIG_SERIAL_8250_RSA */
#endif
/* CONFIG_SERIAL_8250_RSA */
static
void
sunsu_stop_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_stop
)
static
inline
void
__stop_tx
(
struct
uart_sunsu_port
*
p
)
{
if
(
p
->
ier
&
UART_IER_THRI
)
{
p
->
ier
&=
~
UART_IER_THRI
;
serial_out
(
p
,
UART_IER
,
p
->
ier
);
}
}
static
void
sunsu_stop_tx
(
struct
uart_port
*
port
)
{
{
struct
uart_sunsu_port
*
up
=
(
struct
uart_sunsu_port
*
)
port
;
struct
uart_sunsu_port
*
up
=
(
struct
uart_sunsu_port
*
)
port
;
if
(
up
->
ier
&
UART_IER_THRI
)
{
__stop_tx
(
up
);
up
->
ier
&=
~
UART_IER_THRI
;
serial_out
(
up
,
UART_IER
,
up
->
ier
);
if
(
up
->
port
.
type
==
PORT_16C950
&&
tty_stop
/*FIXME*/
)
{
}
if
(
up
->
port
.
type
==
PORT_16C950
&&
tty_stop
)
{
up
->
acr
|=
UART_ACR_TXDIS
;
up
->
acr
|=
UART_ACR_TXDIS
;
serial_icr_write
(
up
,
UART_ACR
,
up
->
acr
);
serial_icr_write
(
up
,
UART_ACR
,
up
->
acr
);
}
}
}
}
static
void
sunsu_start_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_start
)
static
void
sunsu_start_tx
(
struct
uart_port
*
port
)
{
{
struct
uart_sunsu_port
*
up
=
(
struct
uart_sunsu_port
*
)
port
;
struct
uart_sunsu_port
*
up
=
(
struct
uart_sunsu_port
*
)
port
;
...
@@ -280,7 +286,7 @@ static void sunsu_start_tx(struct uart_port *port, unsigned int tty_start)
...
@@ -280,7 +286,7 @@ static void sunsu_start_tx(struct uart_port *port, unsigned int tty_start)
/*
/*
* We only do this from uart_start
* We only do this from uart_start
*/
*/
if
(
tty_start
&&
up
->
port
.
type
==
PORT_16C950
)
{
if
(
tty_start
&&
up
->
port
.
type
==
PORT_16C950
/*FIXME*/
)
{
up
->
acr
&=
~
UART_ACR_TXDIS
;
up
->
acr
&=
~
UART_ACR_TXDIS
;
serial_icr_write
(
up
,
UART_ACR
,
up
->
acr
);
serial_icr_write
(
up
,
UART_ACR
,
up
->
acr
);
}
}
...
@@ -413,8 +419,12 @@ static _INLINE_ void transmit_chars(struct uart_sunsu_port *up)
...
@@ -413,8 +419,12 @@ static _INLINE_ void transmit_chars(struct uart_sunsu_port *up)
up
->
port
.
x_char
=
0
;
up
->
port
.
x_char
=
0
;
return
;
return
;
}
}
if
(
uart_circ_empty
(
xmit
)
||
uart_tx_stopped
(
&
up
->
port
))
{
if
(
uart_tx_stopped
(
&
up
->
port
))
{
sunsu_stop_tx
(
&
up
->
port
,
0
);
sunsu_stop_tx
(
&
up
->
port
);
return
;
}
if
(
uart_circ_empty
(
xmit
))
{
__stop_tx
(
up
);
return
;
return
;
}
}
...
@@ -431,7 +441,7 @@ static _INLINE_ void transmit_chars(struct uart_sunsu_port *up)
...
@@ -431,7 +441,7 @@ static _INLINE_ void transmit_chars(struct uart_sunsu_port *up)
uart_write_wakeup
(
&
up
->
port
);
uart_write_wakeup
(
&
up
->
port
);
if
(
uart_circ_empty
(
xmit
))
if
(
uart_circ_empty
(
xmit
))
sunsu_stop_tx
(
&
up
->
port
,
0
);
__stop_tx
(
up
);
}
}
static
_INLINE_
void
check_modem_status
(
struct
uart_sunsu_port
*
up
)
static
_INLINE_
void
check_modem_status
(
struct
uart_sunsu_port
*
up
)
...
...
drivers/serial/sunzilog.c
View file @
138307b4
...
@@ -684,7 +684,7 @@ static void sunzilog_set_mctrl(struct uart_port *port, unsigned int mctrl)
...
@@ -684,7 +684,7 @@ static void sunzilog_set_mctrl(struct uart_port *port, unsigned int mctrl)
}
}
/* The port lock is held and interrupts are disabled. */
/* The port lock is held and interrupts are disabled. */
static
void
sunzilog_stop_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_stop
)
static
void
sunzilog_stop_tx
(
struct
uart_port
*
port
)
{
{
struct
uart_sunzilog_port
*
up
=
(
struct
uart_sunzilog_port
*
)
port
;
struct
uart_sunzilog_port
*
up
=
(
struct
uart_sunzilog_port
*
)
port
;
...
@@ -692,7 +692,7 @@ static void sunzilog_stop_tx(struct uart_port *port, unsigned int tty_stop)
...
@@ -692,7 +692,7 @@ static void sunzilog_stop_tx(struct uart_port *port, unsigned int tty_stop)
}
}
/* The port lock is held and interrupts are disabled. */
/* The port lock is held and interrupts are disabled. */
static
void
sunzilog_start_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_start
)
static
void
sunzilog_start_tx
(
struct
uart_port
*
port
)
{
{
struct
uart_sunzilog_port
*
up
=
(
struct
uart_sunzilog_port
*
)
port
;
struct
uart_sunzilog_port
*
up
=
(
struct
uart_sunzilog_port
*
)
port
;
struct
zilog_channel
__iomem
*
channel
=
ZILOG_CHANNEL_FROM_PORT
(
port
);
struct
zilog_channel
__iomem
*
channel
=
ZILOG_CHANNEL_FROM_PORT
(
port
);
...
...
drivers/serial/uart00.c
View file @
138307b4
...
@@ -87,7 +87,7 @@
...
@@ -87,7 +87,7 @@
#define UART_TX_READY(s) (((s) & UART_TSR_TX_LEVEL_MSK) < 15)
#define UART_TX_READY(s) (((s) & UART_TSR_TX_LEVEL_MSK) < 15)
//#define UART_TX_EMPTY(p) ((UART_GET_FR(p) & UART00_UARTFR_TMSK) == 0)
//#define UART_TX_EMPTY(p) ((UART_GET_FR(p) & UART00_UARTFR_TMSK) == 0)
static
void
uart00_stop_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_stop
)
static
void
uart00_stop_tx
(
struct
uart_port
*
port
)
{
{
UART_PUT_IEC
(
port
,
UART_IEC_TIE_MSK
);
UART_PUT_IEC
(
port
,
UART_IEC_TIE_MSK
);
}
}
...
@@ -199,7 +199,7 @@ static void uart00_tx_chars(struct uart_port *port)
...
@@ -199,7 +199,7 @@ static void uart00_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
))
{
uart00_stop_tx
(
port
,
0
);
uart00_stop_tx
(
port
);
return
;
return
;
}
}
...
@@ -218,10 +218,10 @@ static void uart00_tx_chars(struct uart_port *port)
...
@@ -218,10 +218,10 @@ static void uart00_tx_chars(struct uart_port *port)
uart_write_wakeup
(
port
);
uart_write_wakeup
(
port
);
if
(
uart_circ_empty
(
xmit
))
if
(
uart_circ_empty
(
xmit
))
uart00_stop_tx
(
port
,
0
);
uart00_stop_tx
(
port
);
}
}
static
void
uart00_start_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_start
)
static
void
uart00_start_tx
(
struct
uart_port
*
port
)
{
{
UART_PUT_IES
(
port
,
UART_IES_TIE_MSK
);
UART_PUT_IES
(
port
,
UART_IES_TIE_MSK
);
uart00_tx_chars
(
port
);
uart00_tx_chars
(
port
);
...
...
drivers/serial/v850e_uart.c
View file @
138307b4
...
@@ -240,7 +240,7 @@ console_initcall(v850e_uart_console_init);
...
@@ -240,7 +240,7 @@ console_initcall(v850e_uart_console_init);
/* TX/RX interrupt handlers. */
/* TX/RX interrupt handlers. */
static
void
v850e_uart_stop_tx
(
struct
uart_port
*
port
,
unsigned
tty_stop
);
static
void
v850e_uart_stop_tx
(
struct
uart_port
*
port
);
void
v850e_uart_tx
(
struct
uart_port
*
port
)
void
v850e_uart_tx
(
struct
uart_port
*
port
)
{
{
...
@@ -339,14 +339,14 @@ static unsigned v850e_uart_get_mctrl (struct uart_port *port)
...
@@ -339,14 +339,14 @@ static unsigned v850e_uart_get_mctrl (struct uart_port *port)
return
mctrl
;
return
mctrl
;
}
}
static
void
v850e_uart_start_tx
(
struct
uart_port
*
port
,
unsigned
tty_start
)
static
void
v850e_uart_start_tx
(
struct
uart_port
*
port
)
{
{
v850e_intc_disable_irq
(
V850E_UART_TX_IRQ
(
port
->
line
));
v850e_intc_disable_irq
(
V850E_UART_TX_IRQ
(
port
->
line
));
v850e_uart_tx
(
port
);
v850e_uart_tx
(
port
);
v850e_intc_enable_irq
(
V850E_UART_TX_IRQ
(
port
->
line
));
v850e_intc_enable_irq
(
V850E_UART_TX_IRQ
(
port
->
line
));
}
}
static
void
v850e_uart_stop_tx
(
struct
uart_port
*
port
,
unsigned
tty_stop
)
static
void
v850e_uart_stop_tx
(
struct
uart_port
*
port
)
{
{
v850e_intc_disable_irq
(
V850E_UART_TX_IRQ
(
port
->
line
));
v850e_intc_disable_irq
(
V850E_UART_TX_IRQ
(
port
->
line
));
}
}
...
...
drivers/serial/vr41xx_siu.c
View file @
138307b4
...
@@ -284,7 +284,7 @@ static unsigned int siu_get_mctrl(struct uart_port *port)
...
@@ -284,7 +284,7 @@ static unsigned int siu_get_mctrl(struct uart_port *port)
return
mctrl
;
return
mctrl
;
}
}
static
void
siu_stop_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_stop
)
static
void
siu_stop_tx
(
struct
uart_port
*
port
)
{
{
unsigned
long
flags
;
unsigned
long
flags
;
uint8_t
ier
;
uint8_t
ier
;
...
@@ -298,7 +298,7 @@ static void siu_stop_tx(struct uart_port *port, unsigned int tty_stop)
...
@@ -298,7 +298,7 @@ static void siu_stop_tx(struct uart_port *port, unsigned int tty_stop)
spin_unlock_irqrestore
(
&
port
->
lock
,
flags
);
spin_unlock_irqrestore
(
&
port
->
lock
,
flags
);
}
}
static
void
siu_start_tx
(
struct
uart_port
*
port
,
unsigned
int
tty_start
)
static
void
siu_start_tx
(
struct
uart_port
*
port
)
{
{
unsigned
long
flags
;
unsigned
long
flags
;
uint8_t
ier
;
uint8_t
ier
;
...
@@ -458,7 +458,7 @@ static inline void transmit_chars(struct uart_port *port)
...
@@ -458,7 +458,7 @@ static inline void transmit_chars(struct uart_port *port)
}
}
if
(
uart_circ_empty
(
xmit
)
||
uart_tx_stopped
(
port
))
{
if
(
uart_circ_empty
(
xmit
)
||
uart_tx_stopped
(
port
))
{
siu_stop_tx
(
port
,
0
);
siu_stop_tx
(
port
);
return
;
return
;
}
}
...
@@ -474,7 +474,7 @@ static inline void transmit_chars(struct uart_port *port)
...
@@ -474,7 +474,7 @@ static inline void transmit_chars(struct uart_port *port)
uart_write_wakeup
(
port
);
uart_write_wakeup
(
port
);
if
(
uart_circ_empty
(
xmit
))
if
(
uart_circ_empty
(
xmit
))
siu_stop_tx
(
port
,
0
);
siu_stop_tx
(
port
);
}
}
static
irqreturn_t
siu_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
static
irqreturn_t
siu_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
...
...
include/linux/serial.h
View file @
138307b4
...
@@ -176,10 +176,6 @@ struct serial_icounter_struct {
...
@@ -176,10 +176,6 @@ struct serial_icounter_struct {
#ifdef __KERNEL__
#ifdef __KERNEL__
#include <linux/compiler.h>
#include <linux/compiler.h>
/* Export to allow PCMCIA to use this - Dave Hinds */
extern
int
__deprecated
register_serial
(
struct
serial_struct
*
req
);
extern
void
__deprecated
unregister_serial
(
int
line
);
/* Allow architectures to override entries in serial8250_ports[] at run time: */
/* Allow architectures to override entries in serial8250_ports[] at run time: */
struct
uart_port
;
/* forward declaration */
struct
uart_port
;
/* forward declaration */
extern
int
early_serial_setup
(
struct
uart_port
*
port
);
extern
int
early_serial_setup
(
struct
uart_port
*
port
);
...
...
include/linux/serial_8250.h
View file @
138307b4
...
@@ -14,6 +14,9 @@
...
@@ -14,6 +14,9 @@
#include <linux/serial_core.h>
#include <linux/serial_core.h>
#include <linux/device.h>
#include <linux/device.h>
/*
* This is the platform device platform_data structure
*/
struct
plat_serial8250_port
{
struct
plat_serial8250_port
{
unsigned
long
iobase
;
/* io base address */
unsigned
long
iobase
;
/* io base address */
void
__iomem
*
membase
;
/* ioremap cookie or NULL */
void
__iomem
*
membase
;
/* ioremap cookie or NULL */
...
@@ -26,4 +29,17 @@ struct plat_serial8250_port {
...
@@ -26,4 +29,17 @@ struct plat_serial8250_port {
unsigned
int
flags
;
/* UPF_* flags */
unsigned
int
flags
;
/* UPF_* flags */
};
};
/*
* This should be used by drivers which want to register
* their own 8250 ports without registering their own
* platform device. Using these will make your driver
* dependent on the 8250 driver.
*/
struct
uart_port
;
int
serial8250_register_port
(
struct
uart_port
*
);
void
serial8250_unregister_port
(
int
line
);
void
serial8250_suspend_port
(
int
line
);
void
serial8250_resume_port
(
int
line
);
#endif
#endif
include/linux/serial_core.h
View file @
138307b4
...
@@ -142,8 +142,8 @@ struct uart_ops {
...
@@ -142,8 +142,8 @@ struct uart_ops {
unsigned
int
(
*
tx_empty
)(
struct
uart_port
*
);
unsigned
int
(
*
tx_empty
)(
struct
uart_port
*
);
void
(
*
set_mctrl
)(
struct
uart_port
*
,
unsigned
int
mctrl
);
void
(
*
set_mctrl
)(
struct
uart_port
*
,
unsigned
int
mctrl
);
unsigned
int
(
*
get_mctrl
)(
struct
uart_port
*
);
unsigned
int
(
*
get_mctrl
)(
struct
uart_port
*
);
void
(
*
stop_tx
)(
struct
uart_port
*
,
unsigned
int
tty_stop
);
void
(
*
stop_tx
)(
struct
uart_port
*
);
void
(
*
start_tx
)(
struct
uart_port
*
,
unsigned
int
tty_start
);
void
(
*
start_tx
)(
struct
uart_port
*
);
void
(
*
send_xchar
)(
struct
uart_port
*
,
char
ch
);
void
(
*
send_xchar
)(
struct
uart_port
*
,
char
ch
);
void
(
*
stop_rx
)(
struct
uart_port
*
);
void
(
*
stop_rx
)(
struct
uart_port
*
);
void
(
*
enable_ms
)(
struct
uart_port
*
);
void
(
*
enable_ms
)(
struct
uart_port
*
);
...
@@ -360,8 +360,6 @@ struct tty_driver *uart_console_device(struct console *co, int *index);
...
@@ -360,8 +360,6 @@ struct tty_driver *uart_console_device(struct console *co, int *index);
*/
*/
int
uart_register_driver
(
struct
uart_driver
*
uart
);
int
uart_register_driver
(
struct
uart_driver
*
uart
);
void
uart_unregister_driver
(
struct
uart_driver
*
uart
);
void
uart_unregister_driver
(
struct
uart_driver
*
uart
);
void
__deprecated
uart_unregister_port
(
struct
uart_driver
*
reg
,
int
line
);
int
__deprecated
uart_register_port
(
struct
uart_driver
*
reg
,
struct
uart_port
*
port
);
int
uart_add_one_port
(
struct
uart_driver
*
reg
,
struct
uart_port
*
port
);
int
uart_add_one_port
(
struct
uart_driver
*
reg
,
struct
uart_port
*
port
);
int
uart_remove_one_port
(
struct
uart_driver
*
reg
,
struct
uart_port
*
port
);
int
uart_remove_one_port
(
struct
uart_driver
*
reg
,
struct
uart_port
*
port
);
int
uart_match_port
(
struct
uart_port
*
port1
,
struct
uart_port
*
port2
);
int
uart_match_port
(
struct
uart_port
*
port1
,
struct
uart_port
*
port2
);
...
@@ -468,13 +466,13 @@ uart_handle_cts_change(struct uart_port *port, unsigned int status)
...
@@ -468,13 +466,13 @@ uart_handle_cts_change(struct uart_port *port, unsigned int status)
if
(
tty
->
hw_stopped
)
{
if
(
tty
->
hw_stopped
)
{
if
(
status
)
{
if
(
status
)
{
tty
->
hw_stopped
=
0
;
tty
->
hw_stopped
=
0
;
port
->
ops
->
start_tx
(
port
,
0
);
port
->
ops
->
start_tx
(
port
);
uart_write_wakeup
(
port
);
uart_write_wakeup
(
port
);
}
}
}
else
{
}
else
{
if
(
!
status
)
{
if
(
!
status
)
{
tty
->
hw_stopped
=
1
;
tty
->
hw_stopped
=
1
;
port
->
ops
->
stop_tx
(
port
,
0
);
port
->
ops
->
stop_tx
(
port
);
}
}
}
}
}
}
...
...
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