Serocco PEB/PEF 20532 Linux 2.6.12 driver.
This is a device driver for the chip called "Serocco-M 2 Channel
Serial Optimized Communication Controller (PEB/PEF 20532)". It was
developed on a Linux 2.6.12 kernel running on a custom PXA255 board.
The driver supports both ports on the serocco and each one can be
configured in async or HDLC mode. Async mode was tested both with a PC
and an ISDN modem. The throughput is as expected. Hardware flow
control is supported too but standard Linux way of doing it is used
(no specific HW support for flow-control is used). HDLC mode was
tested between 2 serocco based boards (for now, further testing with
third party devices is planned ASAP). The standard Linux
sethdlc utility may be used for tuning the communications
parameters.
The platform data needed is rather simple, I had no control over the
main kernel:
static struct resource serocco_resource = {
.start = SEROCCO_PHYS,
.end = (SEROCCO_PHYS + SEROCCO_SIZE),
.flags = IORESOURCE_MEM,
};
static struct platform_device serocco_device = {
.name = "serocco",
.id = 0,
.num_resources = 1,
.resource = &serocco_resource,
};
The configuration of the driver is done "the old way" with some
defines and some module parameters.
- The defines which start with DEBUG activate various debugging
information. If you find problems with this driver please recompile the
module with at least some of these activated and send me the debugging trace.
- SEROCCO_BUS_MULT defines the factor by which multiply the
register address when accessing them.
- SEROCCO_RESET_PIN and SEROCCO_IRQ_PIN define the gpio number for
the reset and the irq pin of the serocco.
- UART_CLOCK is the frequency (in Hz) of the crystal connected to
the serocco.
- The module parameters serocco_port_a_mode and serocco_port_b_mode
define the mode for the 2 ports present on the chip. 0 is off, 1 is
async and 2 is sync.
- The structs serocco_pins_port_a and serocco_pins_port_b define
the pins used when implementing the RS232 standard interface.
There are other parameters and defines used mostly for debugging
purposes. Have a look at the comments if you want to know about them.
Last but not least I wish to thank:
- Sandro Mascetti and Nicola Perrino from At Lab
(http://www.atlab.it/) that helped me in debugging the driver. And, of
course, At Lab itself that commissioned the driver.
- Rodolfo Giometti that wrote a driver for the HDLC part of the
serocco for the Linux 2.4 kernel. You can find it at his site
http://www.enneenne.com.
Download the driver here.
chripell@gmail.com