Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
tiocx.c File Reference
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/proc_fs.h>
#include <linux/capability.h>
#include <linux/device.h>
#include <linux/delay.h>
#include <asm/uaccess.h>
#include <asm/sn/sn_sal.h>
#include <asm/sn/addrs.h>
#include <asm/sn/io.h>
#include <asm/sn/types.h>
#include <asm/sn/shubio.h>
#include <asm/sn/tiocx.h>
#include <asm/sn/l1.h>
#include <asm/sn/module.h>
#include "tio.h"
#include "xtalk/xwidgetdev.h"
#include "xtalk/hubdev.h"

Go to the source code of this file.

Macros

#define CX_DEV_NONE   0
 
#define DEVICE_NAME   "tiocx"
 
#define WIDGET_ID   0
 
#define TIOCX_DEBUG   0
 
#define DBG(fmt...)
 
#define tio_conveyor_enable(nasid)   tio_conveyor_set(nasid, 1)
 
#define tio_conveyor_disable(nasid)   tio_conveyor_set(nasid, 0)
 

Functions

int cx_driver_register (struct cx_drv *cx_driver)
 
int cx_driver_unregister (struct cx_drv *cx_driver)
 
int cx_device_register (nasid_t nasid, int part_num, int mfg_num, struct hubdev_info *hubdev, int bt)
 
int cx_device_unregister (struct cx_dev *cx_dev)
 
struct sn_irq_infotiocx_irq_alloc (nasid_t nasid, int widget, int irq, nasid_t req_nasid, int slice)
 
void tiocx_irq_free (struct sn_irq_info *sn_irq_info)
 
u64 tiocx_dma_addr (u64 addr)
 
u64 tiocx_swin_base (int nasid)
 
 EXPORT_SYMBOL (cx_driver_register)
 
 EXPORT_SYMBOL (cx_driver_unregister)
 
 EXPORT_SYMBOL (cx_device_register)
 
 EXPORT_SYMBOL (cx_device_unregister)
 
 EXPORT_SYMBOL (tiocx_irq_alloc)
 
 EXPORT_SYMBOL (tiocx_irq_free)
 
 EXPORT_SYMBOL (tiocx_bus_type)
 
 EXPORT_SYMBOL (tiocx_dma_addr)
 
 EXPORT_SYMBOL (tiocx_swin_base)
 
 DEVICE_ATTR (cxdev_control, 0644, show_cxdev_control, store_cxdev_control)
 
 fs_initcall (tiocx_init)
 
 module_exit (tiocx_exit)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_AUTHOR ("Bruce Losure <[email protected]>")
 
 MODULE_DESCRIPTION ("TIOCX module")
 
 MODULE_SUPPORTED_DEVICE (DEVICE_NAME)
 

Variables

struct device_attribute dev_attr_cxdev_control
 
struct bus_type tiocx_bus_type
 

Macro Definition Documentation

#define CX_DEV_NONE   0

Definition at line 30 of file tiocx.c.

#define DBG (   fmt...)

Definition at line 38 of file tiocx.c.

#define DEVICE_NAME   "tiocx"

Definition at line 31 of file tiocx.c.

#define tio_conveyor_disable (   nasid)    tio_conveyor_set(nasid, 0)

Definition at line 359 of file tiocx.c.

#define tio_conveyor_enable (   nasid)    tio_conveyor_set(nasid, 1)

Definition at line 358 of file tiocx.c.

#define TIOCX_DEBUG   0

Definition at line 33 of file tiocx.c.

#define WIDGET_ID   0

Definition at line 32 of file tiocx.c.

Function Documentation

int cx_device_register ( nasid_t  nasid,
int  part_num,
int  mfg_num,
struct hubdev_info hubdev,
int  bt 
)

cx_device_register - Register a device. : device's nasid : device's part number : device's manufacturer number : hub info associated with this device : board type of the device

Definition at line 189 of file tiocx.c.

int cx_device_unregister ( struct cx_dev *  cx_dev)

cx_device_unregister - Unregister a device. : part/mfg id for the device

Definition at line 226 of file tiocx.c.

int cx_driver_register ( struct cx_drv *  cx_driver)

cx_driver_register - Register the driver. : driver table (cx_drv struct) from driver

Called from the driver init routine to register a driver. The cx_drv struct contains the driver name, a pointer to a table of part/mfg numbers and a pointer to the driver's probe/attach routine.

Definition at line 161 of file tiocx.c.

int cx_driver_unregister ( struct cx_drv *  cx_driver)

cx_driver_unregister - Unregister the driver. : driver table (cx_drv struct) from driver

Definition at line 173 of file tiocx.c.

DEVICE_ATTR ( cxdev_control  ,
0644  ,
show_cxdev_control  ,
store_cxdev_control   
)
EXPORT_SYMBOL ( cx_driver_register  )
EXPORT_SYMBOL ( cx_driver_unregister  )
EXPORT_SYMBOL ( cx_device_register  )
EXPORT_SYMBOL ( cx_device_unregister  )
EXPORT_SYMBOL ( tiocx_irq_alloc  )
EXPORT_SYMBOL ( tiocx_irq_free  )
EXPORT_SYMBOL ( tiocx_bus_type  )
EXPORT_SYMBOL ( tiocx_dma_addr  )
EXPORT_SYMBOL ( tiocx_swin_base  )
fs_initcall ( tiocx_init  )
MODULE_AUTHOR ( "Bruce Losure <[email protected]>"  )
MODULE_DESCRIPTION ( "TIOCX module )
module_exit ( tiocx_exit  )
MODULE_LICENSE ( "GPL"  )
MODULE_SUPPORTED_DEVICE ( DEVICE_NAME  )
u64 tiocx_dma_addr ( u64  addr)

Definition at line 316 of file tiocx.c.

struct sn_irq_info* tiocx_irq_alloc ( nasid_t  nasid,
int  widget,
int  irq,
nasid_t  req_nasid,
int  slice 
)
read

Definition at line 279 of file tiocx.c.

void tiocx_irq_free ( struct sn_irq_info sn_irq_info)

Definition at line 303 of file tiocx.c.

u64 tiocx_swin_base ( int  nasid)

Definition at line 321 of file tiocx.c.

Variable Documentation

struct device_attribute dev_attr_cxdev_control

Definition at line 41 of file tiocx.c.

struct bus_type tiocx_bus_type
Initial value:
= {
.name = "tiocx",
.match = tiocx_match,
.uevent = tiocx_uevent,
.probe = cx_device_probe,
.remove = cx_driver_remove,
}

Definition at line 144 of file tiocx.c.