aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-02-06 06:44:27 -0500
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-03-26 19:30:08 -0400
commitc3faac4a74c2126e2b68f39d6e8791e88b5f7dbe (patch)
treef02c1a820de27bd666b17f148a5089081e738a3b /drivers
parent834247ec7e281dee839fe4a04bc1bbf0c7395172 (diff)
mtd: remove junk pmc551.h
This header is tiny and contains only pmc551-private stuff, so it should not live in 'include/linux' - let's just merge it with pmc551.c. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/devices/pmc551.c40
1 files changed, 38 insertions, 2 deletions
diff --git a/drivers/mtd/devices/pmc551.c b/drivers/mtd/devices/pmc551.c
index d394e06e4279..6269a434f304 100644
--- a/drivers/mtd/devices/pmc551.c
+++ b/drivers/mtd/devices/pmc551.c
@@ -95,12 +95,48 @@
95#include <asm/io.h> 95#include <asm/io.h>
96#include <asm/system.h> 96#include <asm/system.h>
97#include <linux/pci.h> 97#include <linux/pci.h>
98
99#include <linux/mtd/mtd.h> 98#include <linux/mtd/mtd.h>
100#include <linux/mtd/pmc551.h> 99
100#define PMC551_VERSION \
101 "Ramix PMC551 PCI Mezzanine Ram Driver. (C) 1999,2000 Nortel Networks.\n"
102
103#define PCI_VENDOR_ID_V3_SEMI 0x11b0
104#define PCI_DEVICE_ID_V3_SEMI_V370PDC 0x0200
105
106#define PMC551_PCI_MEM_MAP0 0x50
107#define PMC551_PCI_MEM_MAP1 0x54
108#define PMC551_PCI_MEM_MAP_MAP_ADDR_MASK 0x3ff00000
109#define PMC551_PCI_MEM_MAP_APERTURE_MASK 0x000000f0
110#define PMC551_PCI_MEM_MAP_REG_EN 0x00000002
111#define PMC551_PCI_MEM_MAP_ENABLE 0x00000001
112
113#define PMC551_SDRAM_MA 0x60
114#define PMC551_SDRAM_CMD 0x62
115#define PMC551_DRAM_CFG 0x64
116#define PMC551_SYS_CTRL_REG 0x78
117
118#define PMC551_DRAM_BLK0 0x68
119#define PMC551_DRAM_BLK1 0x6c
120#define PMC551_DRAM_BLK2 0x70
121#define PMC551_DRAM_BLK3 0x74
122#define PMC551_DRAM_BLK_GET_SIZE(x) (524288 << ((x >> 4) & 0x0f))
123#define PMC551_DRAM_BLK_SET_COL_MUX(x, v) (((x) & ~0x00007000) | (((v) & 0x7) << 12))
124#define PMC551_DRAM_BLK_SET_ROW_MUX(x, v) (((x) & ~0x00000f00) | (((v) & 0xf) << 8))
125
126struct mypriv {
127 struct pci_dev *dev;
128 u_char *start;
129 u32 base_map0;
130 u32 curr_map0;
131 u32 asize;
132 struct mtd_info *nextpmc551;
133};
101 134
102static struct mtd_info *pmc551list; 135static struct mtd_info *pmc551list;
103 136
137static int pmc551_point(struct mtd_info *mtd, loff_t from, size_t len,
138 size_t *retlen, void **virt, resource_size_t *phys);
139
104static int pmc551_erase(struct mtd_info *mtd, struct erase_info *instr) 140static int pmc551_erase(struct mtd_info *mtd, struct erase_info *instr)
105{ 141{
106 struct mypriv *priv = mtd->priv; 142 struct mypriv *priv = mtd->priv;