aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-11-02 00:32:46 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-02 00:32:46 -0500
commitec33b309101bb2904e9fe20252f7760e254d05ec (patch)
tree13cde551f2ef845801d9e59081258572e1ac222a
parent7f36b1e9582c06d0ddef5f2416c9b17017647d1f (diff)
parent913ade51eca369553a8ffbdaf1f426fade84f6ae (diff)
Merge master.kernel.org:/home/rmk/linux-2.6-serial
-rw-r--r--Documentation/serial/driver66
-rw-r--r--drivers/serial/serial_core.c4
-rw-r--r--include/linux/serial_core.h7
3 files changed, 64 insertions, 13 deletions
diff --git a/Documentation/serial/driver b/Documentation/serial/driver
index 87856d3cfb67..42ef9970bc86 100644
--- a/Documentation/serial/driver
+++ b/Documentation/serial/driver
@@ -116,12 +116,15 @@ hardware.
116 line becoming inactive or the tty layer indicating we want 116 line becoming inactive or the tty layer indicating we want
117 to stop transmission due to an XOFF character. 117 to stop transmission due to an XOFF character.
118 118
119 The driver should stop transmitting characters as soon as
120 possible.
121
119 Locking: port->lock taken. 122 Locking: port->lock taken.
120 Interrupts: locally disabled. 123 Interrupts: locally disabled.
121 This call must not sleep 124 This call must not sleep
122 125
123 start_tx(port) 126 start_tx(port)
124 start transmitting characters. 127 Start transmitting characters.
125 128
126 Locking: port->lock taken. 129 Locking: port->lock taken.
127 Interrupts: locally disabled. 130 Interrupts: locally disabled.
@@ -281,26 +284,31 @@ hardware.
281Other functions 284Other functions
282--------------- 285---------------
283 286
284uart_update_timeout(port,cflag,quot) 287uart_update_timeout(port,cflag,baud)
285 Update the FIFO drain timeout, port->timeout, according to the 288 Update the FIFO drain timeout, port->timeout, according to the
286 number of bits, parity, stop bits and quotient. 289 number of bits, parity, stop bits and baud rate.
287 290
288 Locking: caller is expected to take port->lock 291 Locking: caller is expected to take port->lock
289 Interrupts: n/a 292 Interrupts: n/a
290 293
291uart_get_baud_rate(port,termios) 294uart_get_baud_rate(port,termios,old,min,max)
292 Return the numeric baud rate for the specified termios, taking 295 Return the numeric baud rate for the specified termios, taking
293 account of the special 38400 baud "kludge". The B0 baud rate 296 account of the special 38400 baud "kludge". The B0 baud rate
294 is mapped to 9600 baud. 297 is mapped to 9600 baud.
295 298
299 If the baud rate is not within min..max, then if old is non-NULL,
300 the original baud rate will be tried. If that exceeds the
301 min..max constraint, 9600 baud will be returned. termios will
302 be updated to the baud rate in use.
303
304 Note: min..max must always allow 9600 baud to be selected.
305
296 Locking: caller dependent. 306 Locking: caller dependent.
297 Interrupts: n/a 307 Interrupts: n/a
298 308
299uart_get_divisor(port,termios,oldtermios) 309uart_get_divisor(port,baud)
300 Return the divsor (baud_base / baud) for the selected baud rate 310 Return the divsor (baud_base / baud) for the specified baud
301 specified by termios. If the baud rate is out of range, try 311 rate, appropriately rounded.
302 the original baud rate specified by oldtermios (if non-NULL).
303 If that fails, try 9600 baud.
304 312
305 If 38400 baud and custom divisor is selected, return the 313 If 38400 baud and custom divisor is selected, return the
306 custom divisor instead. 314 custom divisor instead.
@@ -308,6 +316,46 @@ uart_get_divisor(port,termios,oldtermios)
308 Locking: caller dependent. 316 Locking: caller dependent.
309 Interrupts: n/a 317 Interrupts: n/a
310 318
319uart_match_port(port1,port2)
320 This utility function can be used to determine whether two
321 uart_port structures describe the same port.
322
323 Locking: n/a
324 Interrupts: n/a
325
326uart_write_wakeup(port)
327 A driver is expected to call this function when the number of
328 characters in the transmit buffer have dropped below a threshold.
329
330 Locking: port->lock should be held.
331 Interrupts: n/a
332
333uart_register_driver(drv)
334 Register a uart driver with the core driver. We in turn register
335 with the tty layer, and initialise the core driver per-port state.
336
337 drv->port should be NULL, and the per-port structures should be
338 registered using uart_add_one_port after this call has succeeded.
339
340 Locking: none
341 Interrupts: enabled
342
343uart_unregister_driver()
344 Remove all references to a driver from the core driver. The low
345 level driver must have removed all its ports via the
346 uart_remove_one_port() if it registered them with uart_add_one_port().
347
348 Locking: none
349 Interrupts: enabled
350
351uart_suspend_port()
352
353uart_resume_port()
354
355uart_add_one_port()
356
357uart_remove_one_port()
358
311Other notes 359Other notes
312----------- 360-----------
313 361
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index 401d94a7fe2e..0745ce782974 100644
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -1967,7 +1967,9 @@ uart_report_port(struct uart_driver *drv, struct uart_port *port)
1967 break; 1967 break;
1968 } 1968 }
1969 1969
1970 printk(KERN_INFO "%s%d at %s (irq = %d) is a %s\n", 1970 printk(KERN_INFO "%s%s%s%d at %s (irq = %d) is a %s\n",
1971 port->dev ? port->dev->bus_id : "",
1972 port->dev ? ": " : "",
1971 drv->dev_name, port->line, address, port->irq, uart_type(port)); 1973 drv->dev_name, port->line, address, port->irq, uart_type(port));
1972} 1974}
1973 1975
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index 2b0401b93f2b..9d2579230689 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -39,8 +39,7 @@
39#define PORT_RSA 13 39#define PORT_RSA 13
40#define PORT_NS16550A 14 40#define PORT_NS16550A 14
41#define PORT_XSCALE 15 41#define PORT_XSCALE 15
42#define PORT_IP3106 16 42#define PORT_MAX_8250 15 /* max port ID */
43#define PORT_MAX_8250 16 /* max port ID */
44 43
45/* 44/*
46 * ARM specific type numbers. These are not currently guaranteed 45 * ARM specific type numbers. These are not currently guaranteed
@@ -118,7 +117,9 @@
118#define PORT_M32R_SIO 68 117#define PORT_M32R_SIO 68
119 118
120/*Digi jsm */ 119/*Digi jsm */
121#define PORT_JSM 65 120#define PORT_JSM 69
121
122#define PORT_IP3106 70
122 123
123#ifdef __KERNEL__ 124#ifdef __KERNEL__
124 125