aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mtd/pmc551.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/linux/mtd/pmc551.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/linux/mtd/pmc551.h')
-rw-r--r--include/linux/mtd/pmc551.h79
1 files changed, 79 insertions, 0 deletions
diff --git a/include/linux/mtd/pmc551.h b/include/linux/mtd/pmc551.h
new file mode 100644
index 000000000000..113e3087f68a
--- /dev/null
+++ b/include/linux/mtd/pmc551.h
@@ -0,0 +1,79 @@
1/*
2 * $Id: pmc551.h,v 1.5 2003/01/24 16:49:53 dwmw2 Exp $
3 *
4 * PMC551 PCI Mezzanine Ram Device
5 *
6 * Author:
7 * Mark Ferrell
8 * Copyright 1999,2000 Nortel Networks
9 *
10 * License:
11 * As part of this driver was derrived from the slram.c driver it falls
12 * under the same license, which is GNU General Public License v2
13 */
14
15#ifndef __MTD_PMC551_H__
16#define __MTD_PMC551_H__
17
18#include <linux/mtd/mtd.h>
19
20#define PMC551_VERSION "$Id: pmc551.h,v 1.5 2003/01/24 16:49:53 dwmw2 Exp $\n"\
21 "Ramix PMC551 PCI Mezzanine Ram Driver. (C) 1999,2000 Nortel Networks.\n"
22
23/*
24 * Our personal and private information
25 */
26struct mypriv {
27 struct pci_dev *dev;
28 u_char *start;
29 u32 base_map0;
30 u32 curr_map0;
31 u32 asize;
32 struct mtd_info *nextpmc551;
33};
34
35/*
36 * Function Prototypes
37 */
38static int pmc551_erase(struct mtd_info *, struct erase_info *);
39static void pmc551_unpoint(struct mtd_info *, u_char *, loff_t, size_t);
40static int pmc551_point (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char **mtdbuf);
41static int pmc551_read(struct mtd_info *, loff_t, size_t, size_t *, u_char *);
42static int pmc551_write(struct mtd_info *, loff_t, size_t, size_t *, const u_char *);
43
44
45/*
46 * Define the PCI ID's if the kernel doesn't define them for us
47 */
48#ifndef PCI_VENDOR_ID_V3_SEMI
49#define PCI_VENDOR_ID_V3_SEMI 0x11b0
50#endif
51
52#ifndef PCI_DEVICE_ID_V3_SEMI_V370PDC
53#define PCI_DEVICE_ID_V3_SEMI_V370PDC 0x0200
54#endif
55
56
57#define PMC551_PCI_MEM_MAP0 0x50
58#define PMC551_PCI_MEM_MAP1 0x54
59#define PMC551_PCI_MEM_MAP_MAP_ADDR_MASK 0x3ff00000
60#define PMC551_PCI_MEM_MAP_APERTURE_MASK 0x000000f0
61#define PMC551_PCI_MEM_MAP_REG_EN 0x00000002
62#define PMC551_PCI_MEM_MAP_ENABLE 0x00000001
63
64#define PMC551_SDRAM_MA 0x60
65#define PMC551_SDRAM_CMD 0x62
66#define PMC551_DRAM_CFG 0x64
67#define PMC551_SYS_CTRL_REG 0x78
68
69#define PMC551_DRAM_BLK0 0x68
70#define PMC551_DRAM_BLK1 0x6c
71#define PMC551_DRAM_BLK2 0x70
72#define PMC551_DRAM_BLK3 0x74
73#define PMC551_DRAM_BLK_GET_SIZE(x) (524288<<((x>>4)&0x0f))
74#define PMC551_DRAM_BLK_SET_COL_MUX(x,v) (((x) & ~0x00007000) | (((v) & 0x7) << 12))
75#define PMC551_DRAM_BLK_SET_ROW_MUX(x,v) (((x) & ~0x00000f00) | (((v) & 0xf) << 8))
76
77
78#endif /* __MTD_PMC551_H__ */
79