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

Go to the source code of this file.

Data Structures

struct  ipack_addr_space
 
struct  ipack_device
 
struct  ipack_driver_ops
 
struct  ipack_driver
 
struct  ipack_bus_ops
 
struct  ipack_bus_device
 

Macros

#define IPACK_IDPROM_OFFSET_I   0x01
 
#define IPACK_IDPROM_OFFSET_P   0x03
 
#define IPACK_IDPROM_OFFSET_A   0x05
 
#define IPACK_IDPROM_OFFSET_C   0x07
 
#define IPACK_IDPROM_OFFSET_MANUFACTURER_ID   0x09
 
#define IPACK_IDPROM_OFFSET_MODEL   0x0B
 
#define IPACK_IDPROM_OFFSET_REVISION   0x0D
 
#define IPACK_IDPROM_OFFSET_RESERVED   0x0F
 
#define IPACK_IDPROM_OFFSET_DRIVER_ID_L   0x11
 
#define IPACK_IDPROM_OFFSET_DRIVER_ID_H   0x13
 
#define IPACK_IDPROM_OFFSET_NUM_BYTES   0x15
 
#define IPACK_IDPROM_OFFSET_CRC   0x17
 
#define DEFINE_IPACK_DEVICE_TABLE(_table)   const struct ipack_device_id _table[] __devinitconst
 
#define IPACK_DEVICE(_format, vend, dev)
 

Enumerations

enum  ipack_space { IPACK_IO_SPACE = 0, IPACK_ID_SPACE = 1, IPACK_MEM_SPACE = 2, IPACK_INT_SPACE }
 

Functions

struct ipack_bus_deviceipack_bus_register (struct device *parent, int slots, const struct ipack_bus_ops *ops)
 
int ipack_bus_unregister (struct ipack_bus_device *bus)
 
int ipack_driver_register (struct ipack_driver *edrv, struct module *owner, const char *name)
 
void ipack_driver_unregister (struct ipack_driver *edrv)
 
struct ipack_deviceipack_device_register (struct ipack_bus_device *bus, int slot)
 
void ipack_device_unregister (struct ipack_device *dev)
 

Macro Definition Documentation

#define DEFINE_IPACK_DEVICE_TABLE (   _table)    const struct ipack_device_id _table[] __devinitconst

DEFINE_IPACK_DEVICE_TABLE - macro used to describe a IndustryPack table : device table name

This macro is used to create a struct ipack_device_id array (a device table) in a generic manner.

Definition at line 202 of file ipack.h.

#define IPACK_DEVICE (   _format,
  vend,
  dev 
)
Value:
.format = (_format), \
.vendor = (vend), \
.device = (dev)

IPACK_DEVICE - macro used to describe a specific IndustryPack device : the format version (currently either 1 or 2, 8 bit value) : the 8 or 24 bit IndustryPack Vendor ID : the 8 or 16 bit IndustryPack Device ID

This macro is used to create a struct ipack_device_id that matches a specific device.

Definition at line 214 of file ipack.h.

#define IPACK_IDPROM_OFFSET_A   0x05

Definition at line 20 of file ipack.h.

#define IPACK_IDPROM_OFFSET_C   0x07

Definition at line 21 of file ipack.h.

#define IPACK_IDPROM_OFFSET_CRC   0x17

Definition at line 29 of file ipack.h.

#define IPACK_IDPROM_OFFSET_DRIVER_ID_H   0x13

Definition at line 27 of file ipack.h.

#define IPACK_IDPROM_OFFSET_DRIVER_ID_L   0x11

Definition at line 26 of file ipack.h.

#define IPACK_IDPROM_OFFSET_I   0x01

Definition at line 18 of file ipack.h.

#define IPACK_IDPROM_OFFSET_MANUFACTURER_ID   0x09

Definition at line 22 of file ipack.h.

#define IPACK_IDPROM_OFFSET_MODEL   0x0B

Definition at line 23 of file ipack.h.

#define IPACK_IDPROM_OFFSET_NUM_BYTES   0x15

Definition at line 28 of file ipack.h.

#define IPACK_IDPROM_OFFSET_P   0x03

Definition at line 19 of file ipack.h.

#define IPACK_IDPROM_OFFSET_RESERVED   0x0F

Definition at line 25 of file ipack.h.

#define IPACK_IDPROM_OFFSET_REVISION   0x0D

Definition at line 24 of file ipack.h.

Enumeration Type Documentation

Enumerator:
IPACK_IO_SPACE 
IPACK_ID_SPACE 
IPACK_MEM_SPACE 
IPACK_INT_SPACE 

Definition at line 34 of file ipack.h.

Function Documentation

struct ipack_bus_device* ipack_bus_register ( struct device parent,
int  slots,
const struct ipack_bus_ops ops 
)
read

ipack_bus_register – register a new ipack bus

: pointer to the parent device, if any. : number of slots available in the bus device. : bus operations for the mezzanine drivers.

The carrier board device should call this function to register itself as available bus device in ipack.

Definition at line 208 of file ipack.c.

int ipack_bus_unregister ( struct ipack_bus_device bus)

ipack_bus_unregister – unregister an ipack bus

Definition at line 243 of file ipack.c.

struct ipack_device* ipack_device_register ( struct ipack_bus_device bus,
int  slot 
)
read

ipack_device_register – register a new mezzanine device

: ipack bus device it is plugged to. : slot position in the bus device.

Register a new ipack device (mezzanine device). The call is done by the carrier device driver.

Definition at line 429 of file ipack.c.

void ipack_device_unregister ( struct ipack_device dev)

Definition at line 478 of file ipack.c.

int ipack_driver_register ( struct ipack_driver edrv,
struct module owner,
const char name 
)

ipack_driver_register – Register a new driver

Called by a ipack driver to register itself as a driver that can manage ipack devices.

Definition at line 252 of file ipack.c.

void ipack_driver_unregister ( struct ipack_driver edrv)

Definition at line 262 of file ipack.c.