LMS 2012
|
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/serial.h>
#include <linux/serial_core.h>
#include <linux/module.h>
#include <mach/da8xx.h>
#include <linux/platform_device.h>
#include <linux/firmware.h>
#include <linux/clk.h>
#include <linux/serial_reg.h>
#include <linux/delay.h>
#include <linux/ti_omapl_pru_suart.h>
#include "omapl_suart_board.h"
#include "suart_api.h"
#include "suart_utils.h"
#include "suart_err.h"
#include "pru.h"
#include "lego_ti_omapl_pru_suart.h"
Go to the source code of this file.
Data Structures | |
struct | suart_dma |
struct | omapl_pru_suart |
Macros | |
#define | NR_SUART 2 |
#define | DRV_NAME "ti_omapl_pru_suart" |
#define | DRV_DESC "TI PRU SUART Controller Driver v0.1" |
#define | MAX_SUART_RETRIES 100 |
#define | SUART_CNTX_SZ 512 |
#define | PLATFORM_SUART_RES_SZ 5 |
#define | SUART_FIFO_TIMEOUT_DFLT 10 |
#define | SUART_FIFO_TIMEOUT_MIN 4 |
#define | SUART_FIFO_TIMEOUT_MAX 500 |
#define | __suart_debug(fmt, args...) |
#define | __ssc_debug(fmt, args...) |
#define | __suart_err(fmt, args...) printk(KERN_ERR "suart_err: " fmt, ## args) |
#define | BUFFER_SIZE 1024 /* Needs to be a 2 size */ |
#define | BUFFER_MASK (BUFFER_SIZE-1) |
#define | omapl_pru_suart_suspend NULL |
#define | omapl_pru__suart_resume NULL |
Functions | |
module_param (suart_timeout, int, S_IRUGO) | |
MODULE_PARM_DESC (suart_timeout,"fifo timeout in milli seconds (min: 4; max: 500)") | |
void | pru_suart_stop_rx (struct uart_port *port) |
void | pru_suart_stop_tx (struct uart_port *port) |
void | pru_suart_enable_ms (struct uart_port *port) |
void | pru_suart_start_tx (struct uart_port *port) |
unsigned int | pru_suart_tx_empty (struct uart_port *port) |
unsigned int | pru_suart_get_mctrl (struct uart_port *port) |
void | pru_suart_set_mctrl (struct uart_port *port, unsigned int mctrl) |
void | pru_suart_break_ctl (struct uart_port *port, int break_state) |
void | pru_suart_set_termios (struct uart_port *port, struct ktermios *termios, struct ktermios *old, unsigned int baud) |
int | pru_suart_startup (struct uart_port *port, int init) |
void | pru_suart_shutdown (struct uart_port *port, int exit) |
void | pru_suart_release_port (struct uart_port *port) |
int | pru_suart_request_port (struct uart_port *port) |
void | pru_suart_config_port (struct uart_port *port, int flags) |
int | pru_suart_verify_port (struct uart_port *port, struct serial_struct *ser) |
int __devinit | omapl_pru_suart_probe (struct platform_device *pdev) |
int __devexit | omapl_pru_suart_remove (struct platform_device *pdev) |
int | pru_suart_init (void) |
void | omapl_pru_suart_exit (void) |
int | lego_pru_uart_activate (int port) |
void | lego_pru_uart_deactivate (int port) |
int | lego_pru_uart_init (int port) |
void | lego_pru_uart_exit (int port) |
void | lego_pru_set_baudrate (int port, unsigned int baud) |
int | lego_pru_uart_get_break_state (int port) |
int | lego_pru_write_bytes (int port, unsigned char *pdata, int size) |
int | lego_pru_read_bytes (int port, unsigned char *pdata, int size) |
int | lego_pru_size_data_rx_buffer (int port) |
int | lego_pru_suart_init (void) |
void | lego_pru_suart_exit (void) |
Variables | |
struct omapl_pru_suart * | soft_uart |
#define __ssc_debug | ( | fmt, | |
args... | |||
) |
Definition at line 64 of file lego_ti_omapl_pru_suart.c.
#define __suart_debug | ( | fmt, | |
args... | |||
) |
Definition at line 57 of file lego_ti_omapl_pru_suart.c.
#define __suart_err | ( | fmt, | |
args... | |||
) | printk(KERN_ERR "suart_err: " fmt, ## args) |
Definition at line 67 of file lego_ti_omapl_pru_suart.c.
#define BUFFER_MASK (BUFFER_SIZE-1) |
Definition at line 92 of file lego_ti_omapl_pru_suart.c.
#define BUFFER_SIZE 1024 /* Needs to be a 2 size */ |
Definition at line 91 of file lego_ti_omapl_pru_suart.c.
#define DRV_DESC "TI PRU SUART Controller Driver v0.1" |
Definition at line 45 of file lego_ti_omapl_pru_suart.c.
#define DRV_NAME "ti_omapl_pru_suart" |
Definition at line 44 of file lego_ti_omapl_pru_suart.c.
#define MAX_SUART_RETRIES 100 |
Definition at line 46 of file lego_ti_omapl_pru_suart.c.
#define NR_SUART 2 |
Definition at line 43 of file lego_ti_omapl_pru_suart.c.
#define omapl_pru__suart_resume NULL |
Definition at line 1134 of file lego_ti_omapl_pru_suart.c.
#define omapl_pru_suart_suspend NULL |
Definition at line 1133 of file lego_ti_omapl_pru_suart.c.
#define PLATFORM_SUART_RES_SZ 5 |
Definition at line 48 of file lego_ti_omapl_pru_suart.c.
#define SUART_CNTX_SZ 512 |
Definition at line 47 of file lego_ti_omapl_pru_suart.c.
#define SUART_FIFO_TIMEOUT_DFLT 10 |
Definition at line 49 of file lego_ti_omapl_pru_suart.c.
#define SUART_FIFO_TIMEOUT_MAX 500 |
Definition at line 51 of file lego_ti_omapl_pru_suart.c.
#define SUART_FIFO_TIMEOUT_MIN 4 |
Definition at line 50 of file lego_ti_omapl_pru_suart.c.
int lego_pru_read_bytes | ( | int | port, |
unsigned char * | pdata, | ||
int | size | ||
) |
Definition at line 1311 of file lego_ti_omapl_pru_suart.c.
void lego_pru_set_baudrate | ( | int | port, |
unsigned int | baud | ||
) |
Definition at line 1250 of file lego_ti_omapl_pru_suart.c.
int lego_pru_size_data_rx_buffer | ( | int | port | ) |
Definition at line 1352 of file lego_ti_omapl_pru_suart.c.
void lego_pru_suart_exit | ( | void | ) |
Definition at line 1367 of file lego_ti_omapl_pru_suart.c.
int lego_pru_suart_init | ( | void | ) |
Definition at line 1361 of file lego_ti_omapl_pru_suart.c.
int lego_pru_uart_activate | ( | int | port | ) |
Definition at line 1186 of file lego_ti_omapl_pru_suart.c.
void lego_pru_uart_deactivate | ( | int | port | ) |
Definition at line 1211 of file lego_ti_omapl_pru_suart.c.
void lego_pru_uart_exit | ( | int | port | ) |
Definition at line 1240 of file lego_ti_omapl_pru_suart.c.
int lego_pru_uart_get_break_state | ( | int | port | ) |
Definition at line 1275 of file lego_ti_omapl_pru_suart.c.
int lego_pru_uart_init | ( | int | port | ) |
Definition at line 1228 of file lego_ti_omapl_pru_suart.c.
int lego_pru_write_bytes | ( | int | port, |
unsigned char * | pdata, | ||
int | size | ||
) |
Definition at line 1288 of file lego_ti_omapl_pru_suart.c.
module_param | ( | suart_timeout | , |
int | , | ||
S_IRUGO | |||
) |
MODULE_PARM_DESC | ( | suart_timeout | , |
"fifo timeout in milli seconds (min: 4; max: 500)" | |||
) |
void omapl_pru_suart_exit | ( | void | ) |
Definition at line 1173 of file lego_ti_omapl_pru_suart.c.
int __devinit omapl_pru_suart_probe | ( | struct platform_device * | pdev | ) |
Definition at line 848 of file lego_ti_omapl_pru_suart.c.
int __devexit omapl_pru_suart_remove | ( | struct platform_device * | pdev | ) |
Definition at line 1080 of file lego_ti_omapl_pru_suart.c.
void pru_suart_break_ctl | ( | struct uart_port * | port, |
int | break_state | ||
) |
Definition at line 388 of file lego_ti_omapl_pru_suart.c.
void pru_suart_config_port | ( | struct uart_port * | port, |
int | flags | ||
) |
Definition at line 777 of file lego_ti_omapl_pru_suart.c.
void pru_suart_enable_ms | ( | struct uart_port * | port | ) |
Definition at line 346 of file lego_ti_omapl_pru_suart.c.
unsigned int pru_suart_get_mctrl | ( | struct uart_port * | port | ) |
Definition at line 376 of file lego_ti_omapl_pru_suart.c.
int pru_suart_init | ( | void | ) |
Definition at line 1150 of file lego_ti_omapl_pru_suart.c.
void pru_suart_release_port | ( | struct uart_port * | port | ) |
Definition at line 653 of file lego_ti_omapl_pru_suart.c.
int pru_suart_request_port | ( | struct uart_port * | port | ) |
Definition at line 679 of file lego_ti_omapl_pru_suart.c.
void pru_suart_set_mctrl | ( | struct uart_port * | port, |
unsigned int | mctrl | ||
) |
Definition at line 382 of file lego_ti_omapl_pru_suart.c.
void pru_suart_set_termios | ( | struct uart_port * | port, |
struct ktermios * | termios, | ||
struct ktermios * | old, | ||
unsigned int | baud | ||
) |
Definition at line 407 of file lego_ti_omapl_pru_suart.c.
void pru_suart_shutdown | ( | struct uart_port * | port, |
int | exit | ||
) |
Definition at line 619 of file lego_ti_omapl_pru_suart.c.
void pru_suart_start_tx | ( | struct uart_port * | port | ) |
Definition at line 352 of file lego_ti_omapl_pru_suart.c.
int pru_suart_startup | ( | struct uart_port * | port, |
int | init | ||
) |
Definition at line 541 of file lego_ti_omapl_pru_suart.c.
void pru_suart_stop_rx | ( | struct uart_port * | port | ) |
Definition at line 325 of file lego_ti_omapl_pru_suart.c.
void pru_suart_stop_tx | ( | struct uart_port * | port | ) |
Definition at line 143 of file lego_ti_omapl_pru_suart.c.
unsigned int pru_suart_tx_empty | ( | struct uart_port * | port | ) |
Definition at line 365 of file lego_ti_omapl_pru_suart.c.
int pru_suart_verify_port | ( | struct uart_port * | port, |
struct serial_struct * | ser | ||
) |
Definition at line 792 of file lego_ti_omapl_pru_suart.c.
struct omapl_pru_suart* soft_uart |
Definition at line 88 of file lego_ti_omapl_pru_suart.c.