Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
pmc551.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <asm/uaccess.h>
#include <linux/types.h>
#include <linux/init.h>
#include <linux/ptrace.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/timer.h>
#include <linux/major.h>
#include <linux/fs.h>
#include <linux/ioctl.h>
#include <asm/io.h>
#include <linux/pci.h>
#include <linux/mtd/mtd.h>

Go to the source code of this file.

Data Structures

struct  mypriv
 

Macros

#define PMC551_VERSION   "Ramix PMC551 PCI Mezzanine Ram Driver. (C) 1999,2000 Nortel Networks.\n"
 
#define PCI_VENDOR_ID_V3_SEMI   0x11b0
 
#define PCI_DEVICE_ID_V3_SEMI_V370PDC   0x0200
 
#define PMC551_PCI_MEM_MAP0   0x50
 
#define PMC551_PCI_MEM_MAP1   0x54
 
#define PMC551_PCI_MEM_MAP_MAP_ADDR_MASK   0x3ff00000
 
#define PMC551_PCI_MEM_MAP_APERTURE_MASK   0x000000f0
 
#define PMC551_PCI_MEM_MAP_REG_EN   0x00000002
 
#define PMC551_PCI_MEM_MAP_ENABLE   0x00000001
 
#define PMC551_SDRAM_MA   0x60
 
#define PMC551_SDRAM_CMD   0x62
 
#define PMC551_DRAM_CFG   0x64
 
#define PMC551_SYS_CTRL_REG   0x78
 
#define PMC551_DRAM_BLK0   0x68
 
#define PMC551_DRAM_BLK1   0x6c
 
#define PMC551_DRAM_BLK2   0x70
 
#define PMC551_DRAM_BLK3   0x74
 
#define PMC551_DRAM_BLK_GET_SIZE(x)   (524288 << ((x >> 4) & 0x0f))
 
#define PMC551_DRAM_BLK_SET_COL_MUX(x, v)   (((x) & ~0x00007000) | (((v) & 0x7) << 12))
 
#define PMC551_DRAM_BLK_SET_ROW_MUX(x, v)   (((x) & ~0x00000f00) | (((v) & 0xf) << 8))
 

Functions

 MODULE_LICENSE ("GPL")
 
 MODULE_AUTHOR ("Mark Ferrell <[email protected]>")
 
 MODULE_DESCRIPTION (PMC551_VERSION)
 
 module_param (msize, int, 0)
 
 MODULE_PARM_DESC (msize,"memory size in MiB [1 - 1024]")
 
 module_param (asize, int, 0)
 
 MODULE_PARM_DESC (asize,"aperture size, must be <= memsize [1-1024]")
 
 module_init (init_pmc551)
 
 module_exit (cleanup_pmc551)
 

Macro Definition Documentation

#define PCI_DEVICE_ID_V3_SEMI_V370PDC   0x0200

Definition at line 103 of file pmc551.c.

#define PCI_VENDOR_ID_V3_SEMI   0x11b0

Definition at line 102 of file pmc551.c.

#define PMC551_DRAM_BLK0   0x68

Definition at line 117 of file pmc551.c.

#define PMC551_DRAM_BLK1   0x6c

Definition at line 118 of file pmc551.c.

#define PMC551_DRAM_BLK2   0x70

Definition at line 119 of file pmc551.c.

#define PMC551_DRAM_BLK3   0x74

Definition at line 120 of file pmc551.c.

#define PMC551_DRAM_BLK_GET_SIZE (   x)    (524288 << ((x >> 4) & 0x0f))

Definition at line 121 of file pmc551.c.

#define PMC551_DRAM_BLK_SET_COL_MUX (   x,
  v 
)    (((x) & ~0x00007000) | (((v) & 0x7) << 12))

Definition at line 122 of file pmc551.c.

#define PMC551_DRAM_BLK_SET_ROW_MUX (   x,
  v 
)    (((x) & ~0x00000f00) | (((v) & 0xf) << 8))

Definition at line 123 of file pmc551.c.

#define PMC551_DRAM_CFG   0x64

Definition at line 114 of file pmc551.c.

#define PMC551_PCI_MEM_MAP0   0x50

Definition at line 105 of file pmc551.c.

#define PMC551_PCI_MEM_MAP1   0x54

Definition at line 106 of file pmc551.c.

#define PMC551_PCI_MEM_MAP_APERTURE_MASK   0x000000f0

Definition at line 108 of file pmc551.c.

#define PMC551_PCI_MEM_MAP_ENABLE   0x00000001

Definition at line 110 of file pmc551.c.

#define PMC551_PCI_MEM_MAP_MAP_ADDR_MASK   0x3ff00000

Definition at line 107 of file pmc551.c.

#define PMC551_PCI_MEM_MAP_REG_EN   0x00000002

Definition at line 109 of file pmc551.c.

#define PMC551_SDRAM_CMD   0x62

Definition at line 113 of file pmc551.c.

#define PMC551_SDRAM_MA   0x60

Definition at line 112 of file pmc551.c.

#define PMC551_SYS_CTRL_REG   0x78

Definition at line 115 of file pmc551.c.

#define PMC551_VERSION   "Ramix PMC551 PCI Mezzanine Ram Driver. (C) 1999,2000 Nortel Networks.\n"

Definition at line 99 of file pmc551.c.

Function Documentation

MODULE_AUTHOR ( "Mark Ferrell <[email protected]>"  )
MODULE_DESCRIPTION ( PMC551_VERSION  )
module_exit ( cleanup_pmc551  )
module_init ( init_pmc551  )
MODULE_LICENSE ( "GPL"  )
module_param ( msize  ,
int  ,
 
)
module_param ( asize  ,
int  ,
 
)
MODULE_PARM_DESC ( msize  ,
"memory size in MiB [1-1024] 
)
MODULE_PARM_DESC ( asize  ,
"aperture  size,
must be<=memsize [1-1024] 
)