#include <linux/device.h>
#include <linux/errno.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/types.h>
#include "vme.h"
#include "vme_bridge.h"
#define FAKE_MAX_MASTER …
#define FAKE_MAX_SLAVE …
struct fake_slave_window { … };
struct fake_master_window { … };
struct fake_driver { … };
static int geoid;
static const char driver_name[] = …;
static struct vme_bridge *exit_pointer;
static struct device *vme_root;
static void fake_VIRQ_tasklet(unsigned long data)
{ … }
static void fake_irq_set(struct vme_bridge *fake_bridge, int level,
int state, int sync)
{ … }
static void *fake_pci_to_ptr(dma_addr_t addr)
{ … }
static dma_addr_t fake_ptr_to_pci(void *addr)
{ … }
static int fake_irq_generate(struct vme_bridge *fake_bridge, int level,
int statid)
{ … }
static int fake_slave_set(struct vme_slave_resource *image, int enabled,
unsigned long long vme_base, unsigned long long size,
dma_addr_t buf_base, u32 aspace, u32 cycle)
{ … }
static int fake_slave_get(struct vme_slave_resource *image, int *enabled,
unsigned long long *vme_base, unsigned long long *size,
dma_addr_t *buf_base, u32 *aspace, u32 *cycle)
{ … }
static int fake_master_set(struct vme_master_resource *image, int enabled,
unsigned long long vme_base, unsigned long long size,
u32 aspace, u32 cycle, u32 dwidth)
{ … }
static int __fake_master_get(struct vme_master_resource *image, int *enabled,
unsigned long long *vme_base, unsigned long long *size,
u32 *aspace, u32 *cycle, u32 *dwidth)
{ … }
static int fake_master_get(struct vme_master_resource *image, int *enabled,
unsigned long long *vme_base, unsigned long long *size,
u32 *aspace, u32 *cycle, u32 *dwidth)
{ … }
static void fake_lm_check(struct fake_driver *bridge, unsigned long long addr,
u32 aspace, u32 cycle)
{ … }
static noinline_for_stack u8 fake_vmeread8(struct fake_driver *bridge,
unsigned long long addr,
u32 aspace, u32 cycle)
{ … }
static noinline_for_stack u16 fake_vmeread16(struct fake_driver *bridge,
unsigned long long addr,
u32 aspace, u32 cycle)
{ … }
static noinline_for_stack u32 fake_vmeread32(struct fake_driver *bridge,
unsigned long long addr,
u32 aspace, u32 cycle)
{ … }
static ssize_t fake_master_read(struct vme_master_resource *image, void *buf,
size_t count, loff_t offset)
{ … }
static noinline_for_stack void fake_vmewrite8(struct fake_driver *bridge,
u8 *buf, unsigned long long addr,
u32 aspace, u32 cycle)
{ … }
static noinline_for_stack void fake_vmewrite16(struct fake_driver *bridge,
u16 *buf, unsigned long long addr,
u32 aspace, u32 cycle)
{ … }
static noinline_for_stack void fake_vmewrite32(struct fake_driver *bridge,
u32 *buf, unsigned long long addr,
u32 aspace, u32 cycle)
{ … }
static ssize_t fake_master_write(struct vme_master_resource *image, void *buf,
size_t count, loff_t offset)
{ … }
static unsigned int fake_master_rmw(struct vme_master_resource *image,
unsigned int mask, unsigned int compare,
unsigned int swap, loff_t offset)
{ … }
static int fake_lm_set(struct vme_lm_resource *lm, unsigned long long lm_base,
u32 aspace, u32 cycle)
{ … }
static int fake_lm_get(struct vme_lm_resource *lm,
unsigned long long *lm_base,
u32 *aspace, u32 *cycle)
{ … }
static int fake_lm_attach(struct vme_lm_resource *lm, int monitor,
void (*callback)(void *), void *data)
{ … }
static int fake_lm_detach(struct vme_lm_resource *lm, int monitor)
{ … }
static int fake_slot_get(struct vme_bridge *fake_bridge)
{ … }
static void *fake_alloc_consistent(struct device *parent, size_t size,
dma_addr_t *dma)
{ … }
static void fake_free_consistent(struct device *parent, size_t size,
void *vaddr, dma_addr_t dma)
{ … }
static int fake_crcsr_init(struct vme_bridge *fake_bridge)
{ … }
static void fake_crcsr_exit(struct vme_bridge *fake_bridge)
{ … }
static int __init fake_init(void)
{ … }
static void __exit fake_exit(void)
{ … }
MODULE_PARM_DESC(…) …;
module_param(geoid, int, 0);
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
module_init(…) …;
module_exit(fake_exit);