Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
pti.c File Reference
#include <linux/init.h>
#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/console.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/tty.h>
#include <linux/tty_driver.h>
#include <linux/pci.h>
#include <linux/mutex.h>
#include <linux/miscdevice.h>
#include <linux/pti.h>
#include <linux/slab.h>
#include <linux/uaccess.h>

Go to the source code of this file.

Data Structures

struct  pti_tty
 
struct  pti_dev
 

Macros

#define DRIVERNAME   "pti"
 
#define PCINAME   "pciPTI"
 
#define TTYNAME   "ttyPTI"
 
#define CHARNAME   "pti"
 
#define PTITTY_MINOR_START   0
 
#define PTITTY_MINOR_NUM   2
 
#define MAX_APP_IDS   16 /* 128 channel ids / u8 bit size */
 
#define MAX_OS_IDS   16 /* 128 channel ids / u8 bit size */
 
#define MAX_MODEM_IDS   16 /* 128 channel ids / u8 bit size */
 
#define MODEM_BASE_ID   71 /* modem master ID address */
 
#define CONTROL_ID   72 /* control master ID address */
 
#define CONSOLE_ID   73 /* console master ID address */
 
#define OS_BASE_ID   74 /* base OS master ID address */
 
#define APP_BASE_ID   80 /* base App master ID address */
 
#define CONTROL_FRAME_LEN   32 /* PTI control frame maximum size */
 
#define USER_COPY_SIZE   8192 /* 8Kb buffer for user space copy */
 
#define APERTURE_14   0x3800000 /* offset to first OS write addr */
 
#define APERTURE_LEN   0x400000 /* address length */
 

Functions

struct pti_masterchannelpti_request_masterchannel (u8 type, const char *thread_name)
 
 EXPORT_SYMBOL_GPL (pti_request_masterchannel)
 
void pti_release_masterchannel (struct pti_masterchannel *mc)
 
 EXPORT_SYMBOL_GPL (pti_release_masterchannel)
 
void pti_writedata (struct pti_masterchannel *mc, u8 *buf, int count)
 
 EXPORT_SYMBOL_GPL (pti_writedata)
 
 module_init (pti_init)
 
 module_exit (pti_exit)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_AUTHOR ("Ken Mills, Jay Freyensee")
 
 MODULE_DESCRIPTION ("PTI Driver")
 

Macro Definition Documentation

#define APERTURE_14   0x3800000 /* offset to first OS write addr */

Definition at line 55 of file pti.c.

#define APERTURE_LEN   0x400000 /* address length */

Definition at line 56 of file pti.c.

#define APP_BASE_ID   80 /* base App master ID address */

Definition at line 52 of file pti.c.

#define CHARNAME   "pti"

Definition at line 42 of file pti.c.

#define CONSOLE_ID   73 /* console master ID address */

Definition at line 50 of file pti.c.

#define CONTROL_FRAME_LEN   32 /* PTI control frame maximum size */

Definition at line 53 of file pti.c.

#define CONTROL_ID   72 /* control master ID address */

Definition at line 49 of file pti.c.

#define DRIVERNAME   "pti"

Definition at line 39 of file pti.c.

#define MAX_APP_IDS   16 /* 128 channel ids / u8 bit size */

Definition at line 45 of file pti.c.

#define MAX_MODEM_IDS   16 /* 128 channel ids / u8 bit size */

Definition at line 47 of file pti.c.

#define MAX_OS_IDS   16 /* 128 channel ids / u8 bit size */

Definition at line 46 of file pti.c.

#define MODEM_BASE_ID   71 /* modem master ID address */

Definition at line 48 of file pti.c.

#define OS_BASE_ID   74 /* base OS master ID address */

Definition at line 51 of file pti.c.

#define PCINAME   "pciPTI"

Definition at line 40 of file pti.c.

#define PTITTY_MINOR_NUM   2

Definition at line 44 of file pti.c.

#define PTITTY_MINOR_START   0

Definition at line 43 of file pti.c.

#define TTYNAME   "ttyPTI"

Definition at line 41 of file pti.c.

#define USER_COPY_SIZE   8192 /* 8Kb buffer for user space copy */

Definition at line 54 of file pti.c.

Function Documentation

EXPORT_SYMBOL_GPL ( pti_request_masterchannel  )
EXPORT_SYMBOL_GPL ( pti_release_masterchannel  )
EXPORT_SYMBOL_GPL ( pti_writedata  )
MODULE_AUTHOR ( "Ken  Mills,
Jay Freyensee"   
)
MODULE_DESCRIPTION ( "PTI Driver"  )
module_exit ( pti_exit  )
module_init ( pti_init  )
MODULE_LICENSE ( "GPL"  )
void pti_release_masterchannel ( struct pti_masterchannel mc)

pti_release_masterchannel()- Kernel API function used to release a master, channel ID address used to write to PTI HW.

: master, channel apeture ID address to be released. This will de-allocate the structure via kfree().

Definition at line 344 of file pti.c.

struct pti_masterchannel* pti_request_masterchannel ( u8  type,
const char thread_name 
)
read

pti_request_masterchannel()- Kernel API function used to allocate a master, channel ID address to write to PTI HW.

: 0- request Application master, channel aperture ID write address. 1- request OS master, channel aperture ID write address. 2- request Modem master, channel aperture ID write address. Other values, error. : The thread name associated with the master / channel or 'NULL' if using the 'current' global variable.

Returns: pti_masterchannel struct 0 for error

Definition at line 304 of file pti.c.

void pti_writedata ( struct pti_masterchannel mc,
u8 buf,
int  count 
)

pti_writedata()- Kernel API function used to write trace debugging data to PTI HW.

: Master, channel aperture ID address to write to. Null value will return with no write occurring. : Trace debuging data to write to the PTI HW. Null value will return with no write occurring. : Size of buf. Value of 0 or a negative number will return with no write occuring.

Definition at line 383 of file pti.c.