aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/maps
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2012-06-26 15:54:28 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-07-06 13:20:38 -0400
commitfae255253b393d5e4f0d77d5afa103bfc8b47a97 (patch)
tree5aa4451549d53fa444d7b5535cc5b293fce8cc49 /drivers/mtd/maps
parentf3bae3df764737a168fbc51484b277cf0187933e (diff)
mtd: delete SBC82xx/SBC8560 MTD mapping support
The SBC8260 support was dropped back when we moved from ppc to powerpc. We are now also dropping the support for the EOL SBC8560, so we can also delete this mapping support, as they were the only users of it. Artem: also remove the symbol from the Makefile. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/maps')
-rw-r--r--drivers/mtd/maps/Kconfig12
-rw-r--r--drivers/mtd/maps/Makefile1
-rw-r--r--drivers/mtd/maps/wr_sbc82xx_flash.c174
3 files changed, 0 insertions, 187 deletions
diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig
index 5ba2458e799a..53850f19db8c 100644
--- a/drivers/mtd/maps/Kconfig
+++ b/drivers/mtd/maps/Kconfig
@@ -447,18 +447,6 @@ config MTD_UCLINUX
447 help 447 help
448 Map driver to support image based filesystems for uClinux. 448 Map driver to support image based filesystems for uClinux.
449 449
450config MTD_WRSBC8260
451 tristate "Map driver for WindRiver PowerQUICC II MPC82xx board"
452 depends on (SBC82xx || SBC8560)
453 select MTD_MAP_BANK_WIDTH_4
454 select MTD_MAP_BANK_WIDTH_1
455 select MTD_CFI_I1
456 select MTD_CFI_I4
457 help
458 Map driver for WindRiver PowerQUICC II MPC82xx board. Drives
459 all three flash regions on CS0, CS1 and CS6 if they are configured
460 correctly by the boot loader.
461
462config MTD_DMV182 450config MTD_DMV182
463 tristate "Map driver for Dy-4 SVME/DMV-182 board." 451 tristate "Map driver for Dy-4 SVME/DMV-182 board."
464 depends on DMV182 452 depends on DMV182
diff --git a/drivers/mtd/maps/Makefile b/drivers/mtd/maps/Makefile
index 68a9a91d344f..deb43e9a1e7f 100644
--- a/drivers/mtd/maps/Makefile
+++ b/drivers/mtd/maps/Makefile
@@ -47,7 +47,6 @@ obj-$(CONFIG_MTD_SCB2_FLASH) += scb2_flash.o
47obj-$(CONFIG_MTD_H720X) += h720x-flash.o 47obj-$(CONFIG_MTD_H720X) += h720x-flash.o
48obj-$(CONFIG_MTD_IXP4XX) += ixp4xx.o 48obj-$(CONFIG_MTD_IXP4XX) += ixp4xx.o
49obj-$(CONFIG_MTD_IXP2000) += ixp2000.o 49obj-$(CONFIG_MTD_IXP2000) += ixp2000.o
50obj-$(CONFIG_MTD_WRSBC8260) += wr_sbc82xx_flash.o
51obj-$(CONFIG_MTD_DMV182) += dmv182.o 50obj-$(CONFIG_MTD_DMV182) += dmv182.o
52obj-$(CONFIG_MTD_PLATRAM) += plat-ram.o 51obj-$(CONFIG_MTD_PLATRAM) += plat-ram.o
53obj-$(CONFIG_MTD_INTEL_VR_NOR) += intel_vr_nor.o 52obj-$(CONFIG_MTD_INTEL_VR_NOR) += intel_vr_nor.o
diff --git a/drivers/mtd/maps/wr_sbc82xx_flash.c b/drivers/mtd/maps/wr_sbc82xx_flash.c
deleted file mode 100644
index e7534c82f93a..000000000000
--- a/drivers/mtd/maps/wr_sbc82xx_flash.c
+++ /dev/null
@@ -1,174 +0,0 @@
1/*
2 * Map for flash chips on Wind River PowerQUICC II SBC82xx board.
3 *
4 * Copyright (C) 2004 Red Hat, Inc.
5 *
6 * Author: David Woodhouse <dwmw2@infradead.org>
7 *
8 */
9
10#include <linux/module.h>
11#include <linux/types.h>
12#include <linux/kernel.h>
13#include <linux/init.h>
14#include <linux/slab.h>
15#include <asm/io.h>
16#include <linux/mtd/mtd.h>
17#include <linux/mtd/map.h>
18#include <linux/mtd/partitions.h>
19
20#include <asm/immap_cpm2.h>
21
22static struct mtd_info *sbcmtd[3];
23
24struct map_info sbc82xx_flash_map[3] = {
25 {.name = "Boot flash"},
26 {.name = "Alternate boot flash"},
27 {.name = "User flash"}
28};
29
30static struct mtd_partition smallflash_parts[] = {
31 {
32 .name = "space",
33 .size = 0x100000,
34 .offset = 0,
35 }, {
36 .name = "bootloader",
37 .size = MTDPART_SIZ_FULL,
38 .offset = MTDPART_OFS_APPEND,
39 }
40};
41
42static struct mtd_partition bigflash_parts[] = {
43 {
44 .name = "bootloader",
45 .size = 0x00100000,
46 .offset = 0,
47 }, {
48 .name = "file system",
49 .size = 0x01f00000,
50 .offset = MTDPART_OFS_APPEND,
51 }, {
52 .name = "boot config",
53 .size = 0x00100000,
54 .offset = MTDPART_OFS_APPEND,
55 }, {
56 .name = "space",
57 .size = 0x01f00000,
58 .offset = MTDPART_OFS_APPEND,
59 }
60};
61
62static const char *part_probes[] __initconst = {"cmdlinepart", "RedBoot", NULL};
63
64#define init_sbc82xx_one_flash(map, br, or) \
65do { \
66 (map).phys = (br & 1) ? (br & 0xffff8000) : 0; \
67 (map).size = (br & 1) ? (~(or & 0xffff8000) + 1) : 0; \
68 switch (br & 0x00001800) { \
69 case 0x00000000: \
70 case 0x00000800: (map).bankwidth = 1; break; \
71 case 0x00001000: (map).bankwidth = 2; break; \
72 case 0x00001800: (map).bankwidth = 4; break; \
73 } \
74} while (0);
75
76static int __init init_sbc82xx_flash(void)
77{
78 volatile memctl_cpm2_t *mc = &cpm2_immr->im_memctl;
79 int bigflash;
80 int i;
81
82#ifdef CONFIG_SBC8560
83 mc = ioremap(0xff700000 + 0x5000, sizeof(memctl_cpm2_t));
84#else
85 mc = &cpm2_immr->im_memctl;
86#endif
87
88 bigflash = 1;
89 if ((mc->memc_br0 & 0x00001800) == 0x00001800)
90 bigflash = 0;
91
92 init_sbc82xx_one_flash(sbc82xx_flash_map[0], mc->memc_br0, mc->memc_or0);
93 init_sbc82xx_one_flash(sbc82xx_flash_map[1], mc->memc_br6, mc->memc_or6);
94 init_sbc82xx_one_flash(sbc82xx_flash_map[2], mc->memc_br1, mc->memc_or1);
95
96#ifdef CONFIG_SBC8560
97 iounmap((void *) mc);
98#endif
99
100 for (i=0; i<3; i++) {
101 int8_t flashcs[3] = { 0, 6, 1 };
102 int nr_parts;
103 struct mtd_partition *defparts;
104
105 printk(KERN_NOTICE "PowerQUICC II %s (%ld MiB on CS%d",
106 sbc82xx_flash_map[i].name,
107 (sbc82xx_flash_map[i].size >> 20),
108 flashcs[i]);
109 if (!sbc82xx_flash_map[i].phys) {
110 /* We know it can't be at zero. */
111 printk("): disabled by bootloader.\n");
112 continue;
113 }
114 printk(" at %08lx)\n", sbc82xx_flash_map[i].phys);
115
116 sbc82xx_flash_map[i].virt = ioremap(sbc82xx_flash_map[i].phys,
117 sbc82xx_flash_map[i].size);
118
119 if (!sbc82xx_flash_map[i].virt) {
120 printk("Failed to ioremap\n");
121 continue;
122 }
123
124 simple_map_init(&sbc82xx_flash_map[i]);
125
126 sbcmtd[i] = do_map_probe("cfi_probe", &sbc82xx_flash_map[i]);
127
128 if (!sbcmtd[i])
129 continue;
130
131 sbcmtd[i]->owner = THIS_MODULE;
132
133 /* No partitioning detected. Use default */
134 if (i == 2) {
135 defparts = NULL;
136 nr_parts = 0;
137 } else if (i == bigflash) {
138 defparts = bigflash_parts;
139 nr_parts = ARRAY_SIZE(bigflash_parts);
140 } else {
141 defparts = smallflash_parts;
142 nr_parts = ARRAY_SIZE(smallflash_parts);
143 }
144
145 mtd_device_parse_register(sbcmtd[i], part_probes, NULL,
146 defparts, nr_parts);
147 }
148 return 0;
149}
150
151static void __exit cleanup_sbc82xx_flash(void)
152{
153 int i;
154
155 for (i=0; i<3; i++) {
156 if (!sbcmtd[i])
157 continue;
158
159 mtd_device_unregister(sbcmtd[i]);
160
161 map_destroy(sbcmtd[i]);
162
163 iounmap((void *)sbc82xx_flash_map[i].virt);
164 sbc82xx_flash_map[i].virt = 0;
165 }
166}
167
168module_init(init_sbc82xx_flash);
169module_exit(cleanup_sbc82xx_flash);
170
171
172MODULE_LICENSE("GPL");
173MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>");
174MODULE_DESCRIPTION("Flash map driver for WindRiver PowerQUICC II");