Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions | Variables
ap_bus.h File Reference
#include <linux/device.h>
#include <linux/mod_devicetable.h>
#include <linux/types.h>

Go to the source code of this file.

Data Structures

struct  ap_queue_status
 
struct  ap_driver
 
struct  ap_device
 
struct  ap_message
 
struct  ap_config_info
 

Macros

#define AP_DEVICES   64 /* Number of AP devices. */
 
#define AP_DOMAINS   16 /* Number of AP domains. */
 
#define AP_MAX_RESET   90 /* Maximum number of resets. */
 
#define AP_RESET_TIMEOUT   (HZ/2) /* Time in ticks for reset timeouts. */
 
#define AP_CONFIG_TIME   30 /* Time in seconds between AP bus rescans. */
 
#define AP_POLL_TIME   1 /* Time in ticks between receive polls. */
 
#define AP_MKQID(_device, _queue)   (((_device) & 63) << 8 | ((_queue) & 15))
 
#define AP_QID_DEVICE(_qid)   (((_qid) >> 8) & 63)
 
#define AP_QID_QUEUE(_qid)   ((_qid) & 15)
 
#define AP_QUEUE_STATUS_INVALID   { 1, 1, 1, 0xF, 1, 0xFF, 0xFFFF }
 
#define AP_MAX_BITS   31
 
#define AP_RESPONSE_NORMAL   0x00
 
#define AP_RESPONSE_Q_NOT_AVAIL   0x01
 
#define AP_RESPONSE_RESET_IN_PROGRESS   0x02
 
#define AP_RESPONSE_DECONFIGURED   0x03
 
#define AP_RESPONSE_CHECKSTOPPED   0x04
 
#define AP_RESPONSE_BUSY   0x05
 
#define AP_RESPONSE_INVALID_ADDRESS   0x06
 
#define AP_RESPONSE_OTHERWISE_CHANGED   0x07
 
#define AP_RESPONSE_Q_FULL   0x10
 
#define AP_RESPONSE_NO_PENDING_REPLY   0x10
 
#define AP_RESPONSE_INDEX_TOO_BIG   0x11
 
#define AP_RESPONSE_NO_FIRST_PART   0x13
 
#define AP_RESPONSE_MESSAGE_TOO_BIG   0x15
 
#define AP_RESPONSE_REQ_FAC_NOT_INST   0x16
 
#define AP_DEVICE_TYPE_PCICC   3
 
#define AP_DEVICE_TYPE_PCICA   4
 
#define AP_DEVICE_TYPE_PCIXCC   5
 
#define AP_DEVICE_TYPE_CEX2A   6
 
#define AP_DEVICE_TYPE_CEX2C   7
 
#define AP_DEVICE_TYPE_CEX3A   8
 
#define AP_DEVICE_TYPE_CEX3C   9
 
#define AP_DEVICE_TYPE_CEX4   10
 
#define AP_FUNC_MEX4K   1
 
#define AP_FUNC_CRT4K   2
 
#define AP_FUNC_COPRO   3
 
#define AP_FUNC_ACCEL   4
 
#define AP_RESET_IGNORE   0 /* request timeout will be ignored */
 
#define AP_RESET_ARMED   1 /* request timeout timer is active */
 
#define AP_RESET_DO   2 /* AP reset required */
 
#define to_ap_drv(x)   container_of((x), struct ap_driver, driver)
 
#define to_ap_dev(x)   container_of((x), struct ap_device, device)
 
#define AP_DEVICE(dt)
 

Typedefs

typedef unsigned int ap_qid_t
 

Functions

int ap_driver_register (struct ap_driver *, struct module *, char *)
 
void ap_driver_unregister (struct ap_driver *)
 
int ap_send (ap_qid_t, unsigned long long, void *, size_t)
 
int ap_recv (ap_qid_t, unsigned long long *, void *, size_t)
 
void ap_queue_message (struct ap_device *ap_dev, struct ap_message *ap_msg)
 
void ap_cancel_message (struct ap_device *ap_dev, struct ap_message *ap_msg)
 
void ap_flush_queue (struct ap_device *ap_dev)
 
void ap_bus_force_rescan (void)
 
int ap_module_init (void)
 
void ap_module_exit (void)
 

Variables

int ap_domain_index
 
struct ap_queue_status __packed
 

Macro Definition Documentation

#define AP_CONFIG_TIME   30 /* Time in seconds between AP bus rescans. */

Definition at line 37 of file ap_bus.h.

#define AP_DEVICE (   dt)
Value:
.dev_type=(dt), \

Definition at line 206 of file ap_bus.h.

#define AP_DEVICE_TYPE_CEX2A   6

Definition at line 115 of file ap_bus.h.

#define AP_DEVICE_TYPE_CEX2C   7

Definition at line 116 of file ap_bus.h.

#define AP_DEVICE_TYPE_CEX3A   8

Definition at line 117 of file ap_bus.h.

#define AP_DEVICE_TYPE_CEX3C   9

Definition at line 118 of file ap_bus.h.

#define AP_DEVICE_TYPE_CEX4   10

Definition at line 119 of file ap_bus.h.

#define AP_DEVICE_TYPE_PCICA   4

Definition at line 113 of file ap_bus.h.

#define AP_DEVICE_TYPE_PCICC   3

Definition at line 112 of file ap_bus.h.

#define AP_DEVICE_TYPE_PCIXCC   5

Definition at line 114 of file ap_bus.h.

#define AP_DEVICES   64 /* Number of AP devices. */

Definition at line 33 of file ap_bus.h.

#define AP_DOMAINS   16 /* Number of AP domains. */

Definition at line 34 of file ap_bus.h.

#define AP_FUNC_ACCEL   4

Definition at line 127 of file ap_bus.h.

#define AP_FUNC_COPRO   3

Definition at line 126 of file ap_bus.h.

#define AP_FUNC_CRT4K   2

Definition at line 125 of file ap_bus.h.

#define AP_FUNC_MEX4K   1

Definition at line 124 of file ap_bus.h.

#define AP_MAX_BITS   31

Definition at line 86 of file ap_bus.h.

#define AP_MAX_RESET   90 /* Maximum number of resets. */

Definition at line 35 of file ap_bus.h.

#define AP_MKQID (   _device,
  _queue 
)    (((_device) & 63) << 8 | ((_queue) & 15))

Definition at line 48 of file ap_bus.h.

#define AP_POLL_TIME   1 /* Time in ticks between receive polls. */

Definition at line 38 of file ap_bus.h.

#define AP_QID_DEVICE (   _qid)    (((_qid) >> 8) & 63)

Definition at line 49 of file ap_bus.h.

#define AP_QID_QUEUE (   _qid)    ((_qid) & 15)

Definition at line 50 of file ap_bus.h.

#define AP_QUEUE_STATUS_INVALID   { 1, 1, 1, 0xF, 1, 0xFF, 0xFFFF }

Definition at line 76 of file ap_bus.h.

#define AP_RESET_ARMED   1 /* request timeout timer is active */

Definition at line 133 of file ap_bus.h.

#define AP_RESET_DO   2 /* AP reset required */

Definition at line 134 of file ap_bus.h.

#define AP_RESET_IGNORE   0 /* request timeout will be ignored */

Definition at line 132 of file ap_bus.h.

#define AP_RESET_TIMEOUT   (HZ/2) /* Time in ticks for reset timeouts. */

Definition at line 36 of file ap_bus.h.

#define AP_RESPONSE_BUSY   0x05

Definition at line 99 of file ap_bus.h.

#define AP_RESPONSE_CHECKSTOPPED   0x04

Definition at line 98 of file ap_bus.h.

#define AP_RESPONSE_DECONFIGURED   0x03

Definition at line 97 of file ap_bus.h.

#define AP_RESPONSE_INDEX_TOO_BIG   0x11

Definition at line 104 of file ap_bus.h.

#define AP_RESPONSE_INVALID_ADDRESS   0x06

Definition at line 100 of file ap_bus.h.

#define AP_RESPONSE_MESSAGE_TOO_BIG   0x15

Definition at line 106 of file ap_bus.h.

#define AP_RESPONSE_NO_FIRST_PART   0x13

Definition at line 105 of file ap_bus.h.

#define AP_RESPONSE_NO_PENDING_REPLY   0x10

Definition at line 103 of file ap_bus.h.

#define AP_RESPONSE_NORMAL   0x00

Definition at line 94 of file ap_bus.h.

#define AP_RESPONSE_OTHERWISE_CHANGED   0x07

Definition at line 101 of file ap_bus.h.

#define AP_RESPONSE_Q_FULL   0x10

Definition at line 102 of file ap_bus.h.

#define AP_RESPONSE_Q_NOT_AVAIL   0x01

Definition at line 95 of file ap_bus.h.

#define AP_RESPONSE_REQ_FAC_NOT_INST   0x16

Definition at line 107 of file ap_bus.h.

#define AP_RESPONSE_RESET_IN_PROGRESS   0x02

Definition at line 96 of file ap_bus.h.

#define to_ap_dev (   x)    container_of((x), struct ap_device, device)

Definition at line 180 of file ap_bus.h.

#define to_ap_drv (   x)    container_of((x), struct ap_driver, driver)

Definition at line 148 of file ap_bus.h.

Typedef Documentation

typedef unsigned int ap_qid_t

The ap_qid_t identifier of an ap queue. It contains a 6 bit device index and a 4 bit queue index (domain).

Definition at line 46 of file ap_bus.h.

Function Documentation

void ap_bus_force_rescan ( void  )

Definition at line 955 of file ap_bus.c.

void ap_cancel_message ( struct ap_device ap_dev,
struct ap_message ap_msg 
)

ap_cancel_message(): Cancel a crypto request. : The AP device that has the message queued : The message that is to be removed

Cancel a crypto request. This is done by removing the request from the device pending or request queue. Note that the request stays on the AP queue. When it finishes the message reply will be discarded because the psmid can't be found.

Definition at line 1644 of file ap_bus.c.

int ap_driver_register ( struct ap_driver ,
struct module ,
char  
)

Definition at line 935 of file ap_bus.c.

void ap_driver_unregister ( struct ap_driver )

Definition at line 949 of file ap_bus.c.

void ap_flush_queue ( struct ap_device ap_dev)

Definition at line 909 of file ap_bus.c.

void ap_module_exit ( void  )

ap_modules_exit(): The module termination code

Terminates the module.

Definition at line 1978 of file ap_bus.c.

int ap_module_init ( void  )

ap_module_init(): The module initialization code.

Initializes the module.

Definition at line 1866 of file ap_bus.c.

void ap_queue_message ( struct ap_device ap_dev,
struct ap_message ap_msg 
)

Definition at line 1605 of file ap_bus.c.

int ap_recv ( ap_qid_t  ,
unsigned long long ,
void ,
size_t   
)

Definition at line 482 of file ap_bus.c.

int ap_send ( ap_qid_t  ,
unsigned long  long,
void ,
size_t   
)

Definition at line 422 of file ap_bus.c.

Variable Documentation

int ap_domain_index

Definition at line 78 of file ap_bus.c.