Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
core.h File Reference

Go to the source code of this file.

Macros

#define I2O_IRQ_STATUS   0x30
 
#define I2O_IRQ_MASK   0x34
 
#define I2O_IN_PORT   0x40
 
#define I2O_OUT_PORT   0x44
 
#define I2O_MOTOROLA_PORT_OFFSET   0x10400
 
#define I2O_IRQ_OUTBOUND_POST   0x00000008
 

Functions

int i2o_exec_lct_get (struct i2o_controller *)
 
int __init i2o_exec_init (void)
 
void i2o_exec_exit (void)
 
int i2o_driver_dispatch (struct i2o_controller *, u32)
 
int __init i2o_driver_init (void)
 
void i2o_driver_exit (void)
 
int __init i2o_pci_init (void)
 
void __exit i2o_pci_exit (void)
 
void i2o_device_remove (struct i2o_device *)
 
int i2o_device_parse_lct (struct i2o_controller *)
 
int i2o_parm_issue (struct i2o_device *i2o_dev, int cmd, void *oplist, int oplen, void *reslist, int reslen)
 
struct i2o_controlleri2o_iop_alloc (void)
 
int i2o_iop_add (struct i2o_controller *)
 
void i2o_iop_remove (struct i2o_controller *)
 

Variables

struct i2o_driver i2o_exec_driver
 
struct bus_type i2o_bus_type
 
struct device_attribute i2o_device_attrs []
 

Macro Definition Documentation

#define I2O_IN_PORT   0x40

Definition at line 63 of file core.h.

#define I2O_IRQ_MASK   0x34

Definition at line 62 of file core.h.

#define I2O_IRQ_OUTBOUND_POST   0x00000008

Definition at line 69 of file core.h.

#define I2O_IRQ_STATUS   0x30

Definition at line 61 of file core.h.

#define I2O_MOTOROLA_PORT_OFFSET   0x10400

Definition at line 67 of file core.h.

#define I2O_OUT_PORT   0x44

Definition at line 64 of file core.h.

Function Documentation

int i2o_device_parse_lct ( struct i2o_controller c)

i2o_device_parse_lct - Parse a previously fetched LCT and create devices : I2O controller from which the LCT should be parsed.

The Logical Configuration Table tells us what we can talk to on the board. For every entry we create an I2O device, which is registered in the I2O core.

Returns 0 on success or negative error code on failure.

Definition at line 348 of file device.c.

void i2o_device_remove ( struct i2o_device i2o_dev)

i2o_device_remove - remove an I2O device from the I2O core : I2O device which should be released

Is used on I2O controller removal or LCT modification, when the device is removed from the system. Note that the device could still hang around until the refcount reaches 0.

Definition at line 317 of file device.c.

int i2o_driver_dispatch ( struct i2o_controller c,
u32  m 
)

i2o_driver_dispatch - dispatch an I2O reply message : I2O controller of the message : I2O message number

The reply is delivered to the driver from which the original message was. This function is only called from interrupt context.

Returns 0 on success and the message should not be flushed. Returns > 0 on success and if the message should be flushed afterwords. Returns negative error code on failure (the message will be flushed too).

Definition at line 185 of file driver.c.

void i2o_driver_exit ( void  )

i2o_driver_exit - clean up I2O drivers (OSMs)

Unregisters the I2O bus and frees driver array.

Definition at line 367 of file driver.c.

int __init i2o_driver_init ( void  )

i2o_driver_init - initialize I2O drivers (OSMs)

Registers the I2O bus and allocate memory for the array of OSMs.

Returns 0 on success or negative error code on failure.

Definition at line 336 of file driver.c.

void i2o_exec_exit ( void  )

i2o_exec_exit - Removes the Exec OSM

Unregisters the Exec OSM from the I2O core.

Definition at line 606 of file exec-osm.c.

int __init i2o_exec_init ( void  )

i2o_exec_init - Registers the Exec OSM

Registers the Exec OSM in the I2O core.

Returns 0 on success or negative error code on failure.

Definition at line 596 of file exec-osm.c.

int i2o_exec_lct_get ( struct i2o_controller c)

i2o_exec_lct_get - Get the IOP's Logical Configuration Table : I2O controller from which the LCT should be fetched

Send a LCT NOTIFY request to the controller, and wait I2O_TIMEOUT_LCT_GET seconds until arrival of response. If the LCT is to large, retry it.

Returns 0 on success or negative error code on failure.

Definition at line 544 of file exec-osm.c.

int i2o_iop_add ( struct i2o_controller c)

i2o_iop_add - Initialize the I2O controller and add him to the I2O core : controller

Initialize the I2O controller and if no error occurs add him to the I2O core.

Returns 0 on success or negative error code on failure.

Definition at line 1096 of file iop.c.

struct i2o_controller* i2o_iop_alloc ( void  )
read

i2o_iop_alloc - Allocate and initialize a i2o_controller struct

Allocate the necessary memory for a i2o_controller struct and initialize the lists and message mempool.

Returns a pointer to the I2O controller or a negative error code on failure.

Definition at line 1044 of file iop.c.

void i2o_iop_remove ( struct i2o_controller c)

i2o_iop_remove - Remove the I2O controller from the I2O core : I2O controller

Remove the I2O controller from the I2O core. If devices are attached to the controller remove these also and finally reset the controller.

Definition at line 792 of file iop.c.

int i2o_parm_issue ( struct i2o_device i2o_dev,
int  cmd,
void oplist,
int  oplen,
void reslist,
int  reslen 
)

Definition at line 456 of file device.c.

void __exit i2o_pci_exit ( void  )

i2o_pci_exit - unregisters I2O PCI driver from PCI subsystem

Definition at line 493 of file pci.c.

int __init i2o_pci_init ( void  )

i2o_pci_init - registers I2O PCI driver in PCI subsystem

Returns > 0 on success or negative error code on failure.

Definition at line 485 of file pci.c.

Variable Documentation

struct bus_type i2o_bus_type

Definition at line 62 of file driver.c.

struct device_attribute i2o_device_attrs[]

Definition at line 176 of file device.c.

struct i2o_driver i2o_exec_driver
Initial value:
= {
.name = OSM_NAME,
.reply = i2o_exec_reply,
.event = i2o_exec_event,
.classes = i2o_exec_class_id,
.driver = {
.probe = i2o_exec_probe,
.remove = i2o_exec_remove,
},
}

Definition at line 578 of file exec-osm.c.