git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tty: cyclades, don't kill FW
[safe/jmp/linux-2.6]
/
drivers
/
serial
/
21285.c
diff --git
a/drivers/serial/21285.c
b/drivers/serial/21285.c
index
6a1a568
..
cb6d85d
100644
(file)
--- a/
drivers/serial/21285.c
+++ b/
drivers/serial/21285.c
@@
-4,8
+4,6
@@
* Driver for the serial port on the 21285 StrongArm-110 core logic chip.
*
* Based on drivers/char/serial.c
* Driver for the serial port on the 21285 StrongArm-110 core logic chip.
*
* Based on drivers/char/serial.c
- *
- * $Id: 21285.c,v 1.37 2002/07/28 10:03:27 rmk Exp $
*/
#include <linux/module.h>
#include <linux/tty.h>
*/
#include <linux/module.h>
#include <linux/tty.h>
@@
-16,12
+14,12
@@
#include <linux/tty_flip.h>
#include <linux/serial_core.h>
#include <linux/serial.h>
#include <linux/tty_flip.h>
#include <linux/serial_core.h>
#include <linux/serial.h>
+#include <linux/io.h>
-#include <asm/io.h>
#include <asm/irq.h>
#include <asm/mach-types.h>
#include <asm/hardware/dec21285.h>
#include <asm/irq.h>
#include <asm/mach-types.h>
#include <asm/hardware/dec21285.h>
-#include <
asm
/hardware.h>
+#include <
mach
/hardware.h>
#define BAUD_BASE (mem_fclk_21285/64)
#define BAUD_BASE (mem_fclk_21285/64)
@@
-88,7
+86,7
@@
static void serial21285_enable_ms(struct uart_port *port)
static irqreturn_t serial21285_rx_chars(int irq, void *dev_id)
{
struct uart_port *port = dev_id;
static irqreturn_t serial21285_rx_chars(int irq, void *dev_id)
{
struct uart_port *port = dev_id;
- struct tty_struct *tty = port->info->tty;
+ struct tty_struct *tty = port->info->
port.
tty;
unsigned int status, ch, flag, rxs, max_count = 256;
status = *CSR_UARTFLG;
unsigned int status, ch, flag, rxs, max_count = 256;
status = *CSR_UARTFLG;
@@
-214,8
+212,8
@@
static void serial21285_shutdown(struct uart_port *port)
}
static void
}
static void
-serial21285_set_termios(struct uart_port *port, struct termios *termios,
- struct termios *old)
+serial21285_set_termios(struct uart_port *port, struct
k
termios *termios,
+ struct
k
termios *old)
{
unsigned long flags;
unsigned int baud, quot, h_lcr;
{
unsigned long flags;
unsigned int baud, quot, h_lcr;
@@
-237,6
+235,12
@@
serial21285_set_termios(struct uart_port *port, struct termios *termios,
baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16);
quot = uart_get_divisor(port, baud);
baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16);
quot = uart_get_divisor(port, baud);
+ if (port->info && port->info->port.tty) {
+ struct tty_struct *tty = port->info->port.tty;
+ unsigned int b = port->uartclk / (16 * quot);
+ tty_encode_baud_rate(tty, b, b);
+ }
+
switch (termios->c_cflag & CSIZE) {
case CS5:
h_lcr = 0x00;
switch (termios->c_cflag & CSIZE) {
case CS5:
h_lcr = 0x00;
@@
-488,7
+492,7
@@
static int __init serial21285_init(void)
{
int ret;
{
int ret;
- printk(KERN_INFO "Serial: 21285 driver
$Revision: 1.37 $
\n");
+ printk(KERN_INFO "Serial: 21285 driver\n");
serial21285_setup_ports();
serial21285_setup_ports();
@@
-509,5
+513,5
@@
module_init(serial21285_init);
module_exit(serial21285_exit);
MODULE_LICENSE("GPL");
module_exit(serial21285_exit);
MODULE_LICENSE("GPL");
-MODULE_DESCRIPTION("Intel Footbridge (21285) serial driver
$Revision: 1.37 $
");
+MODULE_DESCRIPTION("Intel Footbridge (21285) serial driver");
MODULE_ALIAS_CHARDEV(SERIAL_21285_MAJOR, SERIAL_21285_MINOR);
MODULE_ALIAS_CHARDEV(SERIAL_21285_MAJOR, SERIAL_21285_MINOR);