#include "serial_io.h"
#include "axis_pci.h"
Include dependency graph for serial_io.c:

Functions | |
| int | get_int_from_text (const char *buffer, const struct text_to_int *table, unsigned long *oldvalue) |
| Searchs a table associating integers and strings for a match. | |
| const char * | get_text_from_int (const struct text_to_int *table, unsigned long value) |
| Do reverse lookup. | |
| const char * | get_route_name (unsigned long i) |
| looks up the name of a route | |
| int | get_route_command (const char *name, unsigned long *target) |
| looks up command to write to routing register given a route name | |
| int | get_enable_command (const char *name, unsigned long *target) |
| search string for enable command | |
| const char * | get_enable_string (unsigned long i) |
| returns text string to represent current enable state | |
| void | output_serial_routing (struct axis_pci_device_entry *device) |
| writes routing mirrot to hardware | |
| void | input_serial_routing (struct axis_pci_device_entry *device) |
| copy hardware serial route register to mirror | |
| void | set_default_routing (struct axis_pci_device_entry *device) |
| sets up a sensible default for routing | |
| void | enable_uarts (struct axis_pci_device_entry *device) |
| register Axis 16550's with kernel serial module | |
| void | disable_uarts (struct axis_pci_device_entry *device) |
| Cleanup code for 16550's. | |
| int | proc_routing_dump (char *buf, char **start, off_t offset, int count, int *eof, void *data) |
| Dump the routing table to /proc. | |
| int | proc_write_route_table_entry (struct file *file, const char *buffer, unsigned long count, void *data) |
| write a new value into the rs232 routing table | |
| int | proc_write_serial_enable_entry (struct file *file, const char *buffer, unsigned long count, void *data) |
| allow enable/disable of serial routing destinations | |
| int | proc_read_serial_enable_entry (char *buf, char **start, off_t offset, int count, int *eof, void *data) |
| Allow a user mode program to query the enable state of specified route destinations. | |
| int | proc_read_route_table_entry (char *buf, char **start, off_t offset, int count, int *eof, void *data) |
| Allow a user mode program to query the current route for a specific UART. | |
| void | create_proc_serial_entries (struct axis_pci_device_entry *device) |
| Create /proc entries assoicated with serial routing. | |
| void | delete_proc_serial_entries (struct axis_pci_device_entry *device) |
| Remove serial routing /proc entries. | |
Variables | |
| const char * | uart_route_format = "tty%d_Route" |
| text_to_int | enable_texts [] |
| const struct text_to_int | serial_output_enable_table [] |
| const struct text_to_int | serial_route_lookup_tables [] |
| const int | uart_address_offsets [] = {0,8,16,24,32,40,48,56} |
|
|
Create /proc entries assoicated with serial routing.
Called by the PCI probe function creates a directory full of entries to allow queries and reconfiguration of the serial port routing |
Here is the call graph for this function:

|
|
Remove serial routing /proc entries.
Remove all the entries in the /proc file system related to serial routing |
|
|
Cleanup code for 16550's.
Tell the serial subsystem that we are about to unload so ask it to return control of the 16550's |
Here is the call graph for this function:

|
|
register Axis 16550's with kernel serial module
Enable uart interrupts setup the PCI region (1) map a chip select and then register the uarts with the kernel serial driver |
Here is the call graph for this function:

|
||||||||||||
|
search string for enable command
Find if enable state should change |
Here is the call graph for this function:

|
|
returns text string to represent current enable state
Gets a text string to describe the current state of an serial route |
Here is the call graph for this function:

|
||||||||||||||||
|
Searchs a table associating integers and strings for a match.
Searchs a table associating integers and strings for a match, if the passed in string matches the table entry the function sets the pointer to the integer value |
|
||||||||||||
|
looks up command to write to routing register given a route name
Given a name lookup the bit pattern we need to write to the Axis to set up the route |
Here is the call graph for this function:

|
|
looks up the name of a route
Given an Axis route command convert it to a text string |
Here is the call graph for this function:

|
||||||||||||
|
Do reverse lookup.
Given a integer value looks for a table entry containing value and returns a pointer to the string associated with that entry |
|
|
copy hardware serial route register to mirror
Get the current serial routing from the Axis hardware |
|
|
writes routing mirrot to hardware
write the serial routing out to the Axis |
|
||||||||||||||||||||||||||||
|
Allow a user mode program to query the current route for a specific UART.
A callback function for a /proc entry. Outputs a text version of a UARTS current output route |
Here is the call graph for this function:

|
||||||||||||||||||||||||||||
|
Allow a user mode program to query the enable state of specified route destinations.
A callback function for a /proc entry. Outputs the enable state of specified route destinations |
Here is the call graph for this function:

|
||||||||||||||||||||||||||||
|
Dump the routing table to /proc.
A callback function for a /proc entry. Dumps a human friendly version of the current serial routing configuration |
Here is the call graph for this function:

|
||||||||||||||||||||
|
write a new value into the rs232 routing table
A callback function to handle writes from a /proc entry. Allows the serial routing to be configured via the /proc filesystem. |
Here is the call graph for this function:

|
||||||||||||||||||||
|
allow enable/disable of serial routing destinations
A callback function to handle writes from a /proc entry. Allows the serial routing destinations to be enabled/disabled via the /proc filesystem. |
Here is the call graph for this function:

|
|
sets up a sensible default for routing
Setup a sensible set of defaults for the AXIS UART routing |
Here is the call graph for this function:

|
|
Initial value:
{
{"active", 1 },
{"enable", 1 },
{"disable", 0 },
{"1",1},
{"0",0},
{"true",1},
{"false",0},
{NULL,0},
}
|
|
|
Initial value:
{
{ "RS232_A" , 16 },
{ "TTL_A" , 18 },
{ "CCTALK_A" , 20 },
{ "RS485_A" , 22 },
{ "RS232_B" , 17 },
{ "TTL_B" , 19 },
{ "CCTALK_B" , 21 },
{ "RS485_B" , 23 },
{NULL,0},
}
|
|
|
Initial value:
{
{ "RS232", 0 },
{ "TTL", 1 },
{ "CCTALK", 2 },
{ "RS485", 3 },
{NULL,0}
}
|
|
|
|
|
|
|
1.3.6