aboutsummaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--drivers/mtd/devices/pmc551.c40
-rw-r--r--include/linux/mtd/pmc551.h77
2 files changed, 38 insertions, 79 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;
diff --git a/include/linux/mtd/pmc551.h b/include/linux/mtd/pmc551.h
deleted file mode 100644
index da8b98d1b330..000000000000
--- a/include/linux/mtd/pmc551.h
+++ /dev/null
@@ -1,77 +0,0 @@
1/*
2 * PMC551 PCI Mezzanine Ram Device
3 *
4 * Author:
5 * Mark Ferrell
6 * Copyright 1999,2000 Nortel Networks
7 *
8 * License:
9 * As part of this driver was derrived from the slram.c driver it falls
10 * under the same license, which is GNU General Public License v2
11 */
12
13#ifndef __MTD_PMC551_H__
14#define __MTD_PMC551_H__
15
16#include <linux/mtd/mtd.h>
17
18#define PMC551_VERSION \
19 "Ramix PMC551 PCI Mezzanine Ram Driver. (C) 1999,2000 Nortel Networks.\n"
20
21/*
22 * Our personal and private information
23 */
24struct mypriv {
25 struct pci_dev *dev;
26 u_char *start;
27 u32 base_map0;
28 u32 curr_map0;
29 u32 asize;
30 struct mtd_info *nextpmc551;
31};
32
33/*
34 * Function Prototypes
35 */
36static int pmc551_erase(struct mtd_info *, struct erase_info *);
37static int pmc551_point(struct mtd_info *mtd, loff_t from, size_t len,
38 size_t *retlen, void **virt, resource_size_t *phys);
39static int pmc551_read(struct mtd_info *, loff_t, size_t, size_t *, u_char *);
40static int pmc551_write(struct mtd_info *, loff_t, size_t, size_t *, const u_char *);
41
42
43/*
44 * Define the PCI ID's if the kernel doesn't define them for us
45 */
46#ifndef PCI_VENDOR_ID_V3_SEMI
47#define PCI_VENDOR_ID_V3_SEMI 0x11b0
48#endif
49
50#ifndef PCI_DEVICE_ID_V3_SEMI_V370PDC
51#define PCI_DEVICE_ID_V3_SEMI_V370PDC 0x0200
52#endif
53
54
55#define PMC551_PCI_MEM_MAP0 0x50
56#define PMC551_PCI_MEM_MAP1 0x54
57#define PMC551_PCI_MEM_MAP_MAP_ADDR_MASK 0x3ff00000
58#define PMC551_PCI_MEM_MAP_APERTURE_MASK 0x000000f0
59#define PMC551_PCI_MEM_MAP_REG_EN 0x00000002
60#define PMC551_PCI_MEM_MAP_ENABLE 0x00000001
61
62#define PMC551_SDRAM_MA 0x60
63#define PMC551_SDRAM_CMD 0x62
64#define PMC551_DRAM_CFG 0x64
65#define PMC551_SYS_CTRL_REG 0x78
66
67#define PMC551_DRAM_BLK0 0x68
68#define PMC551_DRAM_BLK1 0x6c
69#define PMC551_DRAM_BLK2 0x70
70#define PMC551_DRAM_BLK3 0x74
71#define PMC551_DRAM_BLK_GET_SIZE(x) (524288<<((x>>4)&0x0f))
72#define PMC551_DRAM_BLK_SET_COL_MUX(x,v) (((x) & ~0x00007000) | (((v) & 0x7) << 12))
73#define PMC551_DRAM_BLK_SET_ROW_MUX(x,v) (((x) & ~0x00000f00) | (((v) & 0xf) << 8))
74
75
76#endif /* __MTD_PMC551_H__ */
77