Update of /cvsroot/linuxconsole/ruby/linux/drivers/serial
In directory usw-pr-cvs1:/tmp/cvs-serv27629
Added Files:
README
Log Message:
First docs on the new serial stuff I have been coming up with. Will discuss with Russell King about this.
--- NEW FILE: README ---
The new serial design
After much toying with the various ideas and Russell King's code I have formed
the start of what to do. The basic idea is simple. To create a serial core where
we can register a device interface to a specific port. This gives use the power
to do things like have a serial console without a tty on port 1, input interface
on port 2, and a tty interface on port 3. Here are the ideas I have come up with
to deal with this.
1) We need to break up what we setup. The primary this we want to do are:
I. Register and setup hardware ports in a device independent way. The
function to do this is
int uart_register_port(struct uart_port *port);
II. The next step is to register the various device interfaces i.e tty,
input etc. This function sets up devfs, minor numbers etc. It has
nothing to do with the hardware.
int uart_register_driver(struct uart_driver *uart);
III. The final step is when a device is detected that we map it to a specific
port. For example if the bus detects a modem then it would only make
sense to map the struct uart_driver that represents the tty interface
to the port that the modem wants to use.
int uart_register_device(struct uart_driver *reg,struct uart_port *port);
2) The structures to represent the hardware and device interfaces. Now with the
data we want to have data structs that define the hardware state and be able
to change that state. We also want to make those structs visible to the
higher level device interface layers. The second set of data is the device
layer structs. We don't want them visible to the lower layers. Only the
specific device interface would have access to it. At present we have the
following data structs:
I. struct uart_port. This struct represents a serial port. All the data in
it defines the current hardware state. Both low level and device level
use this data.
II. struct uart_ops. This structure describes all the operations that can be
done on the physical hardware. It is apart of struct uart_port.
III. struct uart_driver. The data here presents the device interface used to
represent the hardware. This struct should be interface independent.
A void field would be added to this struct which could be cast in the
higher device level. That data field would depend on the device
interface.
|