aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/maps
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2006-12-11 11:25:30 -0500
committerDavid Woodhouse <dwmw2@infradead.org>2006-12-11 11:30:26 -0500
commit0bf3a9d82adc62fb05e3f108ddd46eb088960f26 (patch)
tree8ed32ade6cdf79837fa882888ba059b92ef07988 /drivers/mtd/maps
parent66a1e421b98edaa62c7d95cc53cb381efa3fb9bf (diff)
[MTD] Nuke IVR leftovers
Support for the ITE8172 based boards was deleted a while ago so this is dead code. The Kconfig dependency on MIPS was wrong anyway, MIPS is a processor architecture and nothing else; guesses on systems architecture are likely to be wrong ... Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'drivers/mtd/maps')
-rw-r--r--drivers/mtd/maps/Kconfig44
-rw-r--r--drivers/mtd/maps/Makefile1
-rw-r--r--drivers/mtd/maps/cstm_mips_ixx.c164
3 files changed, 0 insertions, 209 deletions
diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig
index 7aac68a62f8c..3a33b98eb93d 100644
--- a/drivers/mtd/maps/Kconfig
+++ b/drivers/mtd/maps/Kconfig
@@ -382,50 +382,6 @@ config MTD_TQM834x
382 TQ Components TQM834x boards. If you have one of these boards 382 TQ Components TQM834x boards. If you have one of these boards
383 and would like to use the flash chips on it, say 'Y'. 383 and would like to use the flash chips on it, say 'Y'.
384 384
385config MTD_CSTM_MIPS_IXX
386 tristate "Flash chip mapping on ITE QED-4N-S01B, Globespan IVR or custom board"
387 depends on MIPS && MTD_CFI && MTD_JEDECPROBE && MTD_PARTITIONS
388 help
389 This provides a mapping driver for the Integrated Technology
390 Express, Inc (ITE) QED-4N-S01B eval board and the Globespan IVR
391 Reference Board. It provides the necessary addressing, length,
392 buswidth, vpp code and addition setup of the flash device for
393 these boards. In addition, this mapping driver can be used for
394 other boards via setting of the CONFIG_MTD_CSTM_MIPS_IXX_START/
395 LEN/BUSWIDTH parameters. This mapping will provide one mtd device
396 using one partition. The start address can be offset from the
397 beginning of flash and the len can be less than the total flash
398 device size to allow a window into the flash. Both CFI and JEDEC
399 probes are called.
400
401config MTD_CSTM_MIPS_IXX_START
402 hex "Physical start address of flash mapping"
403 depends on MTD_CSTM_MIPS_IXX
404 default "0x8000000"
405 help
406 This is the physical memory location that the MTD driver will
407 use for the flash chips on your particular target board.
408 Refer to the memory map which should hopefully be in the
409 documentation for your board.
410
411config MTD_CSTM_MIPS_IXX_LEN
412 hex "Physical length of flash mapping"
413 depends on MTD_CSTM_MIPS_IXX
414 default "0x4000000"
415 help
416 This is the total length that the MTD driver will use for the
417 flash chips on your particular board. Refer to the memory
418 map which should hopefully be in the documentation for your
419 board.
420
421config MTD_CSTM_MIPS_IXX_BUSWIDTH
422 int "Bus width in octets"
423 depends on MTD_CSTM_MIPS_IXX
424 default "2"
425 help
426 This is the total bus width of the mapping of the flash chips
427 on your particular board.
428
429config MTD_OCELOT 385config MTD_OCELOT
430 tristate "Momenco Ocelot boot flash device" 386 tristate "Momenco Ocelot boot flash device"
431 depends on MIPS && MOMENCO_OCELOT 387 depends on MIPS && MOMENCO_OCELOT
diff --git a/drivers/mtd/maps/Makefile b/drivers/mtd/maps/Makefile
index df019be753e3..071d0bf922b6 100644
--- a/drivers/mtd/maps/Makefile
+++ b/drivers/mtd/maps/Makefile
@@ -12,7 +12,6 @@ obj-$(CONFIG_MTD_CDB89712) += cdb89712.o
12obj-$(CONFIG_MTD_ARM_INTEGRATOR)+= integrator-flash.o 12obj-$(CONFIG_MTD_ARM_INTEGRATOR)+= integrator-flash.o
13obj-$(CONFIG_MTD_BAST) += bast-flash.o 13obj-$(CONFIG_MTD_BAST) += bast-flash.o
14obj-$(CONFIG_MTD_CFI_FLAGADM) += cfi_flagadm.o 14obj-$(CONFIG_MTD_CFI_FLAGADM) += cfi_flagadm.o
15obj-$(CONFIG_MTD_CSTM_MIPS_IXX) += cstm_mips_ixx.o
16obj-$(CONFIG_MTD_DC21285) += dc21285.o 15obj-$(CONFIG_MTD_DC21285) += dc21285.o
17obj-$(CONFIG_MTD_DILNETPC) += dilnetpc.o 16obj-$(CONFIG_MTD_DILNETPC) += dilnetpc.o
18obj-$(CONFIG_MTD_L440GX) += l440gx.o 17obj-$(CONFIG_MTD_L440GX) += l440gx.o
diff --git a/drivers/mtd/maps/cstm_mips_ixx.c b/drivers/mtd/maps/cstm_mips_ixx.c
deleted file mode 100644
index 2ef22a5a1de2..000000000000
--- a/drivers/mtd/maps/cstm_mips_ixx.c
+++ /dev/null
@@ -1,164 +0,0 @@
1/*
2 * $Id: cstm_mips_ixx.c,v 1.14 2005/11/07 11:14:26 gleixner Exp $
3 *
4 * Mapping of a custom board with both AMD CFI and JEDEC flash in partitions.
5 * Config with both CFI and JEDEC device support.
6 *
7 * Basically physmap.c with the addition of partitions and
8 * an array of mapping info to accomodate more than one flash type per board.
9 *
10 * Copyright 2000 MontaVista Software Inc.
11 *
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version.
16 *
17 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
18 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
19 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
20 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
23 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
24 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * You should have received a copy of the GNU General Public License along
29 * with this program; if not, write to the Free Software Foundation, Inc.,
30 * 675 Mass Ave, Cambridge, MA 02139, USA.
31 */
32
33#include <linux/module.h>
34#include <linux/types.h>
35#include <linux/kernel.h>
36#include <linux/init.h>
37#include <asm/io.h>
38#include <linux/mtd/mtd.h>
39#include <linux/mtd/map.h>
40#include <linux/mtd/partitions.h>
41#include <linux/delay.h>
42
43/* board and partition description */
44
45#define MAX_PHYSMAP_PARTITIONS 8
46struct cstm_mips_ixx_info {
47 char *name;
48 unsigned long window_addr;
49 unsigned long window_size;
50 int bankwidth;
51 int num_partitions;
52};
53
54#define PHYSMAP_NUMBER 1 // number of board desc structs needed, one per contiguous flash type
55const struct cstm_mips_ixx_info cstm_mips_ixx_board_desc[PHYSMAP_NUMBER] =
56{
57 {
58 "MTD flash", // name
59 CONFIG_MTD_CSTM_MIPS_IXX_START, // window_addr
60 CONFIG_MTD_CSTM_MIPS_IXX_LEN, // window_size
61 CONFIG_MTD_CSTM_MIPS_IXX_BUSWIDTH, // bankwidth
62 1, // num_partitions
63 },
64
65};
66static struct mtd_partition cstm_mips_ixx_partitions[PHYSMAP_NUMBER][MAX_PHYSMAP_PARTITIONS] = {
67{
68 {
69 .name = "main partition",
70 .size = CONFIG_MTD_CSTM_MIPS_IXX_LEN,
71 .offset = 0,
72 },
73},
74};
75
76struct map_info cstm_mips_ixx_map[PHYSMAP_NUMBER];
77
78int __init init_cstm_mips_ixx(void)
79{
80 int i;
81 int jedec;
82 struct mtd_info *mymtd;
83 struct mtd_partition *parts;
84
85 /* Initialize mapping */
86 for (i=0;i<PHYSMAP_NUMBER;i++) {
87 printk(KERN_NOTICE "cstm_mips_ixx flash device: 0x%lx at 0x%lx\n",
88 cstm_mips_ixx_board_desc[i].window_size, cstm_mips_ixx_board_desc[i].window_addr);
89
90
91 cstm_mips_ixx_map[i].phys = cstm_mips_ixx_board_desc[i].window_addr;
92 cstm_mips_ixx_map[i].virt = ioremap(cstm_mips_ixx_board_desc[i].window_addr, cstm_mips_ixx_board_desc[i].window_size);
93 if (!cstm_mips_ixx_map[i].virt) {
94 int j = 0;
95 printk(KERN_WARNING "Failed to ioremap\n");
96 for (j = 0; j < i; j++) {
97 if (cstm_mips_ixx_map[j].virt) {
98 iounmap(cstm_mips_ixx_map[j].virt);
99 cstm_mips_ixx_map[j].virt = NULL;
100 }
101 }
102 return -EIO;
103 }
104 cstm_mips_ixx_map[i].name = cstm_mips_ixx_board_desc[i].name;
105 cstm_mips_ixx_map[i].size = cstm_mips_ixx_board_desc[i].window_size;
106 cstm_mips_ixx_map[i].bankwidth = cstm_mips_ixx_board_desc[i].bankwidth;
107 simple_map_init(&cstm_mips_ixx_map[i]);
108 //printk(KERN_NOTICE "cstm_mips_ixx: ioremap is %x\n",(unsigned int)(cstm_mips_ixx_map[i].virt));
109 }
110
111 for (i=0;i<PHYSMAP_NUMBER;i++) {
112 parts = &cstm_mips_ixx_partitions[i][0];
113 jedec = 0;
114 mymtd = (struct mtd_info *)do_map_probe("cfi_probe", &cstm_mips_ixx_map[i]);
115 //printk(KERN_NOTICE "phymap %d cfi_probe: mymtd is %x\n",i,(unsigned int)mymtd);
116 if (!mymtd) {
117 jedec = 1;
118 mymtd = (struct mtd_info *)do_map_probe("jedec_probe", &cstm_mips_ixx_map[i]);
119 printk(KERN_NOTICE "cstm_mips_ixx %d jedec: mymtd is %x\n",i,(unsigned int)mymtd);
120 }
121 if (mymtd) {
122 mymtd->owner = THIS_MODULE;
123
124 cstm_mips_ixx_map[i].map_priv_2 = (unsigned long)mymtd;
125 add_mtd_partitions(mymtd, parts, cstm_mips_ixx_board_desc[i].num_partitions);
126 }
127 else {
128 for (i = 0; i < PHYSMAP_NUMBER; i++) {
129 if (cstm_mips_ixx_map[i].virt) {
130 iounmap(cstm_mips_ixx_map[i].virt);
131 cstm_mips_ixx_map[i].virt = NULL;
132 }
133 }
134 return -ENXIO;
135 }
136 }
137 return 0;
138}
139
140static void __exit cleanup_cstm_mips_ixx(void)
141{
142 int i;
143 struct mtd_info *mymtd;
144
145 for (i=0;i<PHYSMAP_NUMBER;i++) {
146 mymtd = (struct mtd_info *)cstm_mips_ixx_map[i].map_priv_2;
147 if (mymtd) {
148 del_mtd_partitions(mymtd);
149 map_destroy(mymtd);
150 }
151 if (cstm_mips_ixx_map[i].virt) {
152 iounmap((void *)cstm_mips_ixx_map[i].virt);
153 cstm_mips_ixx_map[i].virt = 0;
154 }
155 }
156}
157
158module_init(init_cstm_mips_ixx);
159module_exit(cleanup_cstm_mips_ixx);
160
161
162MODULE_LICENSE("GPL");
163MODULE_AUTHOR("Alice Hennessy <ahennessy@mvista.com>");
164MODULE_DESCRIPTION("MTD map driver for MIPS boards");