flinkLinux
flink Linux Kernel Modules
 All Data Structures Files Functions Variables Macros Pages
flink_lpb.c File Reference

MPC5200 Local Plus Bus communication module. More...

#include <linux/init.h>
#include <linux/delay.h>
#include <linux/firmware.h>
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/fcntl.h>
#include <linux/fs.h>
#include <linux/of.h>
#include <linux/of_platform.h>
#include <linux/slab.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <asm/io.h>
#include <asm/mpc52xx.h>
#include "../flink.h"
Include dependency graph for flink_lpb.c:

Data Structures

struct  flink_lpb_data
 Local Plus Bus device data. More...
 
struct  mpc52xx_cs_ctl
 

Macros

#define MODULE_NAME   THIS_MODULE->name
 

Functions

 module_param (dev_mem_length, uint, 0444)
 
 MODULE_PARM_DESC (dev_mem_length,"device memory length")
 
 MODULE_AUTHOR ("Urs Graf")
 
 MODULE_DESCRIPTION ("fLink local plus bus module for mpc5200")
 
 MODULE_SUPPORTED_DEVICE ("fLink LPB devices")
 
 MODULE_LICENSE ("Dual BSD/GPL")
 
u8 lpb_read8 (struct flink_device *fdev, u32 addr)
 
u16 lpb_read16 (struct flink_device *fdev, u32 addr)
 
u32 lpb_read32 (struct flink_device *fdev, u32 addr)
 
int lpb_write8 (struct flink_device *fdev, u32 addr, u8 val)
 
int lpb_write16 (struct flink_device *fdev, u32 addr, u16 val)
 
int lpb_write32 (struct flink_device *fdev, u32 addr, u32 val)
 
u32 lpb_address_space_size (struct flink_device *fdev)
 
 MODULE_DEVICE_TABLE (of, flink_device_ids)
 
 module_init (mod_init)
 
 module_exit (mod_exit)
 

Variables

struct flink_lpb_datalpb_data
 
struct flink_bus_ops lpb_bus_ops
 

Detailed Description

MPC5200 Local Plus Bus communication module.

Implements read and write functions over Local Plus Bus.

Author
Marco Tinner
Urs Graf

Macro Definition Documentation

#define MODULE_NAME   THIS_MODULE->name

Function Documentation

u32 lpb_address_space_size ( struct flink_device fdev)
u16 lpb_read16 ( struct flink_device fdev,
u32  addr 
)
u32 lpb_read32 ( struct flink_device fdev,
u32  addr 
)
u8 lpb_read8 ( struct flink_device fdev,
u32  addr 
)
int lpb_write16 ( struct flink_device fdev,
u32  addr,
u16  val 
)
int lpb_write32 ( struct flink_device fdev,
u32  addr,
u32  val 
)
int lpb_write8 ( struct flink_device fdev,
u32  addr,
u8  val 
)
MODULE_AUTHOR ( "Urs Graf"  )
MODULE_DESCRIPTION ( "fLink local plus bus module for mpc5200"  )
MODULE_DEVICE_TABLE ( of  ,
flink_device_ids   
)
module_exit ( mod_exit  )
module_init ( mod_init  )
MODULE_LICENSE ( "Dual BSD/GPL"  )
module_param ( dev_mem_length  ,
uint  ,
0444   
)
MODULE_PARM_DESC ( dev_mem_length  ,
"device memory length"   
)
MODULE_SUPPORTED_DEVICE ( "fLink LPB devices"  )

Variable Documentation

struct flink_bus_ops lpb_bus_ops
Initial value:
= {
.read8 = lpb_read8,
.read16 = lpb_read16,
.read32 = lpb_read32,
.write8 = lpb_write8,
.write16 = lpb_write16,
.write32 = lpb_write32,
.address_space_size = lpb_address_space_size
}
struct flink_lpb_data* lpb_data