diff options
Diffstat (limited to 'drivers/mtd/maps/mtx-1_flash.c')
-rw-r--r-- | drivers/mtd/maps/mtx-1_flash.c | 93 |
1 files changed, 0 insertions, 93 deletions
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"); | ||