diff options
Diffstat (limited to 'drivers/mtd/maps')
-rw-r--r-- | drivers/mtd/maps/Kconfig | 7 | ||||
-rw-r--r-- | drivers/mtd/maps/Makefile | 1 | ||||
-rw-r--r-- | drivers/mtd/maps/mtx-1_flash.c | 93 | ||||
-rw-r--r-- | drivers/mtd/maps/omap_nor.c | 23 | ||||
-rw-r--r-- | drivers/mtd/maps/pcmciamtd.c | 9 |
5 files changed, 18 insertions, 115 deletions
diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig index ef1e29ea5a2c..df8e00bba07b 100644 --- a/drivers/mtd/maps/Kconfig +++ b/drivers/mtd/maps/Kconfig | |||
@@ -257,13 +257,6 @@ config MTD_ALCHEMY | |||
257 | help | 257 | help |
258 | Flash memory access on AMD Alchemy Pb/Db/RDK Reference Boards | 258 | Flash memory access on AMD Alchemy Pb/Db/RDK Reference Boards |
259 | 259 | ||
260 | config MTD_MTX1 | ||
261 | tristate "4G Systems MTX-1 Flash device" | ||
262 | depends on MIPS_MTX1 && MTD_CFI | ||
263 | help | ||
264 | Flash memory access on 4G Systems MTX-1 Board. If you have one of | ||
265 | these boards and would like to use the flash chips on it, say 'Y'. | ||
266 | |||
267 | config MTD_DILNETPC | 260 | config MTD_DILNETPC |
268 | tristate "CFI Flash device mapped on DIL/Net PC" | 261 | tristate "CFI Flash device mapped on DIL/Net PC" |
269 | depends on X86 && MTD_CONCAT && MTD_PARTITIONS && MTD_CFI_INTELEXT | 262 | depends on X86 && MTD_CONCAT && MTD_PARTITIONS && MTD_CFI_INTELEXT |
diff --git a/drivers/mtd/maps/Makefile b/drivers/mtd/maps/Makefile index b29ea5460657..6cda6df973e5 100644 --- a/drivers/mtd/maps/Makefile +++ b/drivers/mtd/maps/Makefile | |||
@@ -63,6 +63,5 @@ obj-$(CONFIG_MTD_DMV182) += dmv182.o | |||
63 | obj-$(CONFIG_MTD_SHARP_SL) += sharpsl-flash.o | 63 | obj-$(CONFIG_MTD_SHARP_SL) += sharpsl-flash.o |
64 | obj-$(CONFIG_MTD_PLATRAM) += plat-ram.o | 64 | obj-$(CONFIG_MTD_PLATRAM) += plat-ram.o |
65 | obj-$(CONFIG_MTD_OMAP_NOR) += omap_nor.o | 65 | obj-$(CONFIG_MTD_OMAP_NOR) += omap_nor.o |
66 | obj-$(CONFIG_MTD_MTX1) += mtx-1_flash.o | ||
67 | obj-$(CONFIG_MTD_INTEL_VR_NOR) += intel_vr_nor.o | 66 | obj-$(CONFIG_MTD_INTEL_VR_NOR) += intel_vr_nor.o |
68 | obj-$(CONFIG_MTD_BFIN_ASYNC) += bfin-async-flash.o | 67 | obj-$(CONFIG_MTD_BFIN_ASYNC) += bfin-async-flash.o |
diff --git a/drivers/mtd/maps/mtx-1_flash.c b/drivers/mtd/maps/mtx-1_flash.c deleted file mode 100644 index a3b651904127..000000000000 --- a/drivers/mtd/maps/mtx-1_flash.c +++ /dev/null | |||
@@ -1,93 +0,0 @@ | |||
1 | /* | ||
2 | * Flash memory access on 4G Systems MTX-1 boards | ||
3 | * | ||
4 | * (C) 2005 Bruno Randolf <bruno.randolf@4g-systems.biz> | ||
5 | * (C) 2005 Joern Engel <joern@wohnheim.fh-wedel.de> | ||
6 | * | ||
7 | */ | ||
8 | |||
9 | #include <linux/module.h> | ||
10 | #include <linux/types.h> | ||
11 | #include <linux/init.h> | ||
12 | #include <linux/kernel.h> | ||
13 | |||
14 | #include <linux/mtd/mtd.h> | ||
15 | #include <linux/mtd/map.h> | ||
16 | #include <linux/mtd/partitions.h> | ||
17 | |||
18 | #include <asm/io.h> | ||
19 | |||
20 | static struct map_info mtx1_map = { | ||
21 | .name = "MTX-1 flash", | ||
22 | .bankwidth = 4, | ||
23 | .size = 0x2000000, | ||
24 | .phys = 0x1E000000, | ||
25 | }; | ||
26 | |||
27 | static struct mtd_partition mtx1_partitions[] = { | ||
28 | { | ||
29 | .name = "filesystem", | ||
30 | .size = 0x01C00000, | ||
31 | .offset = 0, | ||
32 | },{ | ||
33 | .name = "yamon", | ||
34 | .size = 0x00100000, | ||
35 | .offset = MTDPART_OFS_APPEND, | ||
36 | .mask_flags = MTD_WRITEABLE, | ||
37 | },{ | ||
38 | .name = "kernel", | ||
39 | .size = 0x002c0000, | ||
40 | .offset = MTDPART_OFS_APPEND, | ||
41 | },{ | ||
42 | .name = "yamon env", | ||
43 | .size = 0x00040000, | ||
44 | .offset = MTDPART_OFS_APPEND, | ||
45 | } | ||
46 | }; | ||
47 | |||
48 | static struct mtd_info *mtx1_mtd; | ||
49 | |||
50 | int __init mtx1_mtd_init(void) | ||
51 | { | ||
52 | int ret = -ENXIO; | ||
53 | |||
54 | simple_map_init(&mtx1_map); | ||
55 | |||
56 | mtx1_map.virt = ioremap(mtx1_map.phys, mtx1_map.size); | ||
57 | if (!mtx1_map.virt) | ||
58 | return -EIO; | ||
59 | |||
60 | mtx1_mtd = do_map_probe("cfi_probe", &mtx1_map); | ||
61 | if (!mtx1_mtd) | ||
62 | goto err; | ||
63 | |||
64 | mtx1_mtd->owner = THIS_MODULE; | ||
65 | |||
66 | ret = add_mtd_partitions(mtx1_mtd, mtx1_partitions, | ||
67 | ARRAY_SIZE(mtx1_partitions)); | ||
68 | if (ret) | ||
69 | goto err; | ||
70 | |||
71 | return 0; | ||
72 | |||
73 | err: | ||
74 | iounmap(mtx1_map.virt); | ||
75 | return ret; | ||
76 | } | ||
77 | |||
78 | static void __exit mtx1_mtd_cleanup(void) | ||
79 | { | ||
80 | if (mtx1_mtd) { | ||
81 | del_mtd_partitions(mtx1_mtd); | ||
82 | map_destroy(mtx1_mtd); | ||
83 | } | ||
84 | if (mtx1_map.virt) | ||
85 | iounmap(mtx1_map.virt); | ||
86 | } | ||
87 | |||
88 | module_init(mtx1_mtd_init); | ||
89 | module_exit(mtx1_mtd_cleanup); | ||
90 | |||
91 | MODULE_AUTHOR("Bruno Randolf <bruno.randolf@4g-systems.biz>"); | ||
92 | MODULE_DESCRIPTION("MTX-1 flash map"); | ||
93 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/mtd/maps/omap_nor.c b/drivers/mtd/maps/omap_nor.c index c12d8056bebd..68eec6c6c517 100644 --- a/drivers/mtd/maps/omap_nor.c +++ b/drivers/mtd/maps/omap_nor.c | |||
@@ -60,13 +60,22 @@ struct omapflash_info { | |||
60 | static void omap_set_vpp(struct map_info *map, int enable) | 60 | static void omap_set_vpp(struct map_info *map, int enable) |
61 | { | 61 | { |
62 | static int count; | 62 | static int count; |
63 | 63 | u32 l; | |
64 | if (enable) { | 64 | |
65 | if (count++ == 0) | 65 | if (cpu_class_is_omap1()) { |
66 | OMAP_EMIFS_CONFIG_REG |= OMAP_EMIFS_CONFIG_WP; | 66 | if (enable) { |
67 | } else { | 67 | if (count++ == 0) { |
68 | if (count && (--count == 0)) | 68 | l = omap_readl(EMIFS_CONFIG); |
69 | OMAP_EMIFS_CONFIG_REG &= ~OMAP_EMIFS_CONFIG_WP; | 69 | l |= OMAP_EMIFS_CONFIG_WP; |
70 | omap_writel(l, EMIFS_CONFIG); | ||
71 | } | ||
72 | } else { | ||
73 | if (count && (--count == 0)) { | ||
74 | l = omap_readl(EMIFS_CONFIG); | ||
75 | l &= ~OMAP_EMIFS_CONFIG_WP; | ||
76 | omap_writel(l, EMIFS_CONFIG); | ||
77 | } | ||
78 | } | ||
70 | } | 79 | } |
71 | } | 80 | } |
72 | 81 | ||
diff --git a/drivers/mtd/maps/pcmciamtd.c b/drivers/mtd/maps/pcmciamtd.c index 8f7ca863f89d..90924fb00481 100644 --- a/drivers/mtd/maps/pcmciamtd.c +++ b/drivers/mtd/maps/pcmciamtd.c | |||
@@ -495,17 +495,14 @@ static int pcmciamtd_config(struct pcmcia_device *link) | |||
495 | int i; | 495 | int i; |
496 | config_info_t t; | 496 | config_info_t t; |
497 | static char *probes[] = { "jedec_probe", "cfi_probe" }; | 497 | static char *probes[] = { "jedec_probe", "cfi_probe" }; |
498 | cisinfo_t cisinfo; | ||
499 | int new_name = 0; | 498 | int new_name = 0; |
500 | 499 | ||
501 | DEBUG(3, "link=0x%p", link); | 500 | DEBUG(3, "link=0x%p", link); |
502 | 501 | ||
503 | DEBUG(2, "Validating CIS"); | 502 | DEBUG(2, "Validating CIS"); |
504 | ret = pcmcia_validate_cis(link, &cisinfo); | 503 | ret = pcmcia_validate_cis(link, NULL); |
505 | if(ret != CS_SUCCESS) { | 504 | if(ret != CS_SUCCESS) { |
506 | cs_error(link, GetTupleData, ret); | 505 | cs_error(link, GetTupleData, ret); |
507 | } else { | ||
508 | DEBUG(2, "ValidateCIS found %d chains", cisinfo.Chains); | ||
509 | } | 506 | } |
510 | 507 | ||
511 | card_settings(dev, link, &new_name); | 508 | card_settings(dev, link, &new_name); |
@@ -560,9 +557,7 @@ static int pcmciamtd_config(struct pcmcia_device *link) | |||
560 | DEBUG(1, "Allocated a window of %dKiB", dev->win_size >> 10); | 557 | DEBUG(1, "Allocated a window of %dKiB", dev->win_size >> 10); |
561 | 558 | ||
562 | /* Get write protect status */ | 559 | /* Get write protect status */ |
563 | CS_CHECK(GetStatus, pcmcia_get_status(link, &status)); | 560 | DEBUG(2, "window handle = 0x%8.8lx", (unsigned long)link->win); |
564 | DEBUG(2, "status value: 0x%x window handle = 0x%8.8lx", | ||
565 | status.CardState, (unsigned long)link->win); | ||
566 | dev->win_base = ioremap(req.Base, req.Size); | 561 | dev->win_base = ioremap(req.Base, req.Size); |
567 | if(!dev->win_base) { | 562 | if(!dev->win_base) { |
568 | err("ioremap(%lu, %u) failed", req.Base, req.Size); | 563 | err("ioremap(%lu, %u) failed", req.Base, req.Size); |