I/O and interrupt arch under Linux
It is the serial struct plus some driver specific things in a private
extension. These driver private bits hold a shadow copy of all 8530
registers. Maybe there's some stuff to deal with the BRG programming
too, I've not looked at the serial code in a while.
The tty struct is used in the higer level tty driver and may reference
the serial struct
it uses, but we're talking low level driver here, tty is a line
discipline and the serial driver may be used by other code as well
(SLIP, PPP) so it's kept separate.
probe_sccs() is called during serial init on kernel startup and queries
the OF device tree for information about the serial hardware, then goes
and populates the serial struct.
During kernel init, which is before init(1) ever runs. /etc/rc.d/ stuff
must open a serial device to talk to the hardware, so look for the
serial_open() stuff and follow the flow from there.
No idea, I've not even looked at PPC interrupt code. I've looked at the
macserial driver while writing the m68k Mac SCC driver mainly.
I/O space in the Intel sense doesn't exist for PPC; it's all memory
There's the OF device tree with associated access functions in the
kernel, there's /proc/
device-tree to look at from user space, and PRAM would be nvram which is
in the device
tree as well.
ioctls is what you need to look at I guess. I'm not sure you can
independently toggle control lines that way though. DCD is an input
line, you seem a bit confused here. RTS and CTS are handled by the
serial driver if your tty settings (via ioctl, or via stty from the
shell) request that. /RTS can be asserted by setting bit 1 in write
register 5, add a new ioctl if you feel like modifying the registers
directly. Changing registers on the serial chip while the line is in use
may have undesired side effects.