Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
vlynq.c File Reference
#include <linux/init.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/device.h>
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/platform_device.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/slab.h>
#include <linux/irq.h>
#include <linux/vlynq.h>

Go to the source code of this file.

Data Structures

struct  vlynq_regs
 

Macros

#define VLYNQ_CTRL_PM_ENABLE   0x80000000
 
#define VLYNQ_CTRL_CLOCK_INT   0x00008000
 
#define VLYNQ_CTRL_CLOCK_DIV(x)   (((x) & 7) << 16)
 
#define VLYNQ_CTRL_INT_LOCAL   0x00004000
 
#define VLYNQ_CTRL_INT_ENABLE   0x00002000
 
#define VLYNQ_CTRL_INT_VECTOR(x)   (((x) & 0x1f) << 8)
 
#define VLYNQ_CTRL_INT2CFG   0x00000080
 
#define VLYNQ_CTRL_RESET   0x00000001
 
#define VLYNQ_CTRL_CLOCK_MASK   (0x7 << 16)
 
#define VLYNQ_INT_OFFSET   0x00000014
 
#define VLYNQ_REMOTE_OFFSET   0x00000080
 
#define VLYNQ_STATUS_LINK   0x00000001
 
#define VLYNQ_STATUS_LERROR   0x00000080
 
#define VLYNQ_STATUS_RERROR   0x00000100
 
#define VINT_ENABLE   0x00000100
 
#define VINT_TYPE_EDGE   0x00000080
 
#define VINT_LEVEL_LOW   0x00000040
 
#define VINT_VECTOR(x)   ((x) & 0x1f)
 
#define VINT_OFFSET(irq)   (8 * ((irq) % 4))
 
#define VLYNQ_AUTONEGO_V2   0x00010000
 

Functions

int __vlynq_register_driver (struct vlynq_driver *driver, struct module *owner)
 
 EXPORT_SYMBOL (__vlynq_register_driver)
 
void vlynq_unregister_driver (struct vlynq_driver *driver)
 
 EXPORT_SYMBOL (vlynq_unregister_driver)
 
int vlynq_enable_device (struct vlynq_device *dev)
 
 EXPORT_SYMBOL (vlynq_enable_device)
 
void vlynq_disable_device (struct vlynq_device *dev)
 
 EXPORT_SYMBOL (vlynq_disable_device)
 
int vlynq_set_local_mapping (struct vlynq_device *dev, u32 tx_offset, struct vlynq_mapping *mapping)
 
 EXPORT_SYMBOL (vlynq_set_local_mapping)
 
int vlynq_set_remote_mapping (struct vlynq_device *dev, u32 tx_offset, struct vlynq_mapping *mapping)
 
 EXPORT_SYMBOL (vlynq_set_remote_mapping)
 
int vlynq_set_local_irq (struct vlynq_device *dev, int virq)
 
 EXPORT_SYMBOL (vlynq_set_local_irq)
 
int vlynq_set_remote_irq (struct vlynq_device *dev, int virq)
 
 EXPORT_SYMBOL (vlynq_set_remote_irq)
 
 EXPORT_SYMBOL (vlynq_bus_type)
 
 module_init (vlynq_init)
 
 module_exit (vlynq_exit)
 

Variables

struct bus_type vlynq_bus_type
 

Macro Definition Documentation

#define VINT_ENABLE   0x00000100

Definition at line 56 of file vlynq.c.

#define VINT_LEVEL_LOW   0x00000040

Definition at line 58 of file vlynq.c.

#define VINT_OFFSET (   irq)    (8 * ((irq) % 4))

Definition at line 60 of file vlynq.c.

#define VINT_TYPE_EDGE   0x00000080

Definition at line 57 of file vlynq.c.

#define VINT_VECTOR (   x)    ((x) & 0x1f)

Definition at line 59 of file vlynq.c.

#define VLYNQ_AUTONEGO_V2   0x00010000

Definition at line 62 of file vlynq.c.

#define VLYNQ_CTRL_CLOCK_DIV (   x)    (((x) & 7) << 16)

Definition at line 40 of file vlynq.c.

#define VLYNQ_CTRL_CLOCK_INT   0x00008000

Definition at line 39 of file vlynq.c.

#define VLYNQ_CTRL_CLOCK_MASK   (0x7 << 16)

Definition at line 47 of file vlynq.c.

#define VLYNQ_CTRL_INT2CFG   0x00000080

Definition at line 44 of file vlynq.c.

#define VLYNQ_CTRL_INT_ENABLE   0x00002000

Definition at line 42 of file vlynq.c.

#define VLYNQ_CTRL_INT_LOCAL   0x00004000

Definition at line 41 of file vlynq.c.

#define VLYNQ_CTRL_INT_VECTOR (   x)    (((x) & 0x1f) << 8)

Definition at line 43 of file vlynq.c.

#define VLYNQ_CTRL_PM_ENABLE   0x80000000

Definition at line 38 of file vlynq.c.

#define VLYNQ_CTRL_RESET   0x00000001

Definition at line 45 of file vlynq.c.

#define VLYNQ_INT_OFFSET   0x00000014

Definition at line 49 of file vlynq.c.

#define VLYNQ_REMOTE_OFFSET   0x00000080

Definition at line 50 of file vlynq.c.

#define VLYNQ_STATUS_LERROR   0x00000080

Definition at line 53 of file vlynq.c.

#define VLYNQ_STATUS_LINK   0x00000001

Definition at line 52 of file vlynq.c.

#define VLYNQ_STATUS_RERROR   0x00000100

Definition at line 54 of file vlynq.c.

Function Documentation

int __vlynq_register_driver ( struct vlynq_driver driver,
struct module owner 
)

Definition at line 368 of file vlynq.c.

EXPORT_SYMBOL ( __vlynq_register_driver  )
EXPORT_SYMBOL ( vlynq_unregister_driver  )
EXPORT_SYMBOL ( vlynq_enable_device  )
EXPORT_SYMBOL ( vlynq_disable_device  )
EXPORT_SYMBOL ( vlynq_set_local_mapping  )
EXPORT_SYMBOL ( vlynq_set_remote_mapping  )
EXPORT_SYMBOL ( vlynq_set_local_irq  )
EXPORT_SYMBOL ( vlynq_set_remote_irq  )
EXPORT_SYMBOL ( vlynq_bus_type  )
module_exit ( vlynq_exit  )
module_init ( vlynq_init  )
void vlynq_disable_device ( struct vlynq_device dev)

Definition at line 588 of file vlynq.c.

int vlynq_enable_device ( struct vlynq_device dev)

Definition at line 569 of file vlynq.c.

int vlynq_set_local_irq ( struct vlynq_device dev,
int  virq 
)

Definition at line 632 of file vlynq.c.

int vlynq_set_local_mapping ( struct vlynq_device dev,
u32  tx_offset,
struct vlynq_mapping mapping 
)

Definition at line 598 of file vlynq.c.

int vlynq_set_remote_irq ( struct vlynq_device dev,
int  virq 
)

Definition at line 650 of file vlynq.c.

int vlynq_set_remote_mapping ( struct vlynq_device dev,
u32  tx_offset,
struct vlynq_mapping mapping 
)

Definition at line 615 of file vlynq.c.

void vlynq_unregister_driver ( struct vlynq_driver driver)

Definition at line 376 of file vlynq.c.

Variable Documentation

struct bus_type vlynq_bus_type
Initial value:
= {
.name = "vlynq",
.match = vlynq_device_match,
.probe = vlynq_device_probe,
.remove = vlynq_device_remove,
}

Definition at line 778 of file vlynq.c.