1 diff -Nur linux-2.6.17/drivers/mtd/maps/Kconfig linux-2.6.17-owrt/drivers/mtd/maps/Kconfig
2 --- linux-2.6.17/drivers/mtd/maps/Kconfig 2006-06-18 03:49:35.000000000 +0200
3 +++ linux-2.6.17-owrt/drivers/mtd/maps/Kconfig 2006-08-25 23:33:05.000000000 +0200
5 Walnut board. If you have one of these boards and would like to
6 use the flash chips on it, say 'Y'.
9 + tristate "Flash device mapped on IBM 405EP MagicBox"
10 + depends on MTD_CFI && MTD_PARTITIONS && 40x && MAGICBOX
12 + This enables access routines for the flash chips on the IBM 405EP
13 + MagicBox board. If you have one of these boards and would like to
14 + use the flash chips on it, say 'Y'.
18 tristate "Flash devices mapped on IBM 440GP Ebony"
19 depends on MTD_JEDECPROBE && EBONY
20 diff -Nur linux-2.6.17/drivers/mtd/maps/magicmap.c linux-2.6.17-owrt/drivers/mtd/maps/magicmap.c
21 --- linux-2.6.17/drivers/mtd/maps/magicmap.c 1970-01-01 01:00:00.000000000 +0100
22 +++ linux-2.6.17-owrt/drivers/mtd/maps/magicmap.c 2006-08-25 23:33:05.000000000 +0200
25 + * magicmap.c: Copyleft 2005 Karol Lewandowski
27 + * Mapping for MagicBox flash.
28 + * Based on walnut.c.
30 + * Heikki Lindholm <holindho@infradead.org>
33 + * This program is free software; you can redistribute it and/or modify it
34 + * under the terms of the GNU General Public License as published by the
35 + * Free Software Foundation; either version 2 of the License, or (at your
36 + * option) any later version.
39 +#include <linux/module.h>
40 +#include <linux/types.h>
41 +#include <linux/kernel.h>
42 +#include <linux/init.h>
43 +#include <linux/mtd/mtd.h>
44 +#include <linux/mtd/map.h>
45 +#include <linux/mtd/partitions.h>
46 +#include <linux/config.h>
49 +static struct mtd_info *flash;
51 +static struct map_info magic_map = {
52 + .name = "Magically mapped flash",
58 +static struct mtd_partition magic_partitions[] = {
70 + .name = "persistent",
75 + .name = "bootloader",
78 + .mask_flags = MTD_WRITEABLE,
82 +int __init init_magic(void)
85 + (void __iomem *)ioremap(magic_map.phys, magic_map.size);
87 + if (!magic_map.virt) {
88 + printk("Failed to ioremap flash.\n");
92 + simple_map_init(&magic_map);
94 + flash = do_map_probe("cfi_probe", &magic_map);
96 + flash->owner = THIS_MODULE;
97 + add_mtd_partitions(flash, magic_partitions,
98 + ARRAY_SIZE(magic_partitions));
100 + printk("map probe failed for flash\n");
107 +static void __exit cleanup_magic(void)
110 + del_mtd_partitions(flash);
111 + map_destroy(flash);
114 + if (magic_map.virt) {
115 + iounmap((void *)magic_map.virt);
116 + magic_map.virt = NULL;
120 +module_init(init_magic);
121 +module_exit(cleanup_magic);
123 +MODULE_LICENSE("GPL");
124 +MODULE_AUTHOR("Karol Lewandowski");
125 +MODULE_DESCRIPTION("MTD map and partitions for IBM 405EP MagicBox boards");
126 diff -Nur linux-2.6.17/drivers/mtd/maps/Makefile linux-2.6.17-owrt/drivers/mtd/maps/Makefile
127 --- linux-2.6.17/drivers/mtd/maps/Makefile 2006-06-18 03:49:35.000000000 +0200
128 +++ linux-2.6.17-owrt/drivers/mtd/maps/Makefile 2006-08-25 23:33:05.000000000 +0200
130 obj-$(CONFIG_MTD_BEECH) += beech-mtd.o
131 obj-$(CONFIG_MTD_ARCTIC) += arctic-mtd.o
132 obj-$(CONFIG_MTD_WALNUT) += walnut.o
133 +obj-$(CONFIG_MTD_MAGICMAP) += magicmap.o
134 obj-$(CONFIG_MTD_H720X) += h720x-flash.o
135 obj-$(CONFIG_MTD_SBC8240) += sbc8240.o
136 obj-$(CONFIG_MTD_NOR_TOTO) += omap-toto-flash.o