8 #include <linux/module.h>
9 #include <linux/types.h>
10 #include <linux/kernel.h>
13 #include <linux/slab.h>
26 #ifdef CONFIG_ARCH_NETWINDER
43 spin_unlock_irqrestore(&nw_gpio_lock, flags);
51 #define nw_en_write() do { } while (0)
75 static void dc21285_copy_from(
struct map_info *map,
void *to,
unsigned long from,
ssize_t len)
80 static void dc21285_write8(
struct map_info *map,
const map_word d,
unsigned long adr)
89 static void dc21285_write16(
struct map_info *map,
const map_word d,
unsigned long adr)
98 static void dc21285_write32(
struct map_info *map,
const map_word d,
unsigned long adr)
105 static void dc21285_copy_to_32(
struct map_info *map,
unsigned long to,
const void *from,
ssize_t len)
110 dc21285_write32(map, d, to);
117 static void dc21285_copy_to_16(
struct map_info *map,
unsigned long to,
const void *from,
ssize_t len)
122 dc21285_write16(map, d, to);
129 static void dc21285_copy_to_8(
struct map_info *map,
unsigned long to,
const void *from,
ssize_t len)
133 dc21285_write8(map, d, to);
139 static struct map_info dc21285_map = {
140 .name =
"DC21285 flash",
142 .size = 16*1024*1024,
143 .copy_from = dc21285_copy_from,
148 static const char *probes[] = {
"RedBoot",
"cmdlinepart",
NULL };
150 static int __init init_dc21285(
void)
156 dc21285_map.read = dc21285_read8;
157 dc21285_map.write = dc21285_write8;
158 dc21285_map.copy_to = dc21285_copy_to_8;
162 dc21285_map.read = dc21285_read16;
163 dc21285_map.write = dc21285_write16;
164 dc21285_map.copy_to = dc21285_copy_to_16;
168 dc21285_map.read = dc21285_read32;
169 dc21285_map.write = dc21285_write32;
170 dc21285_map.copy_to = dc21285_copy_to_32;
181 if (!dc21285_map.
virt) {
182 printk(
"Failed to ioremap\n");
186 if (machine_is_ebsa285()) {
189 dc21285_mtd =
do_map_probe(
"jedec_probe", &dc21285_map);
201 if(machine_is_ebsa285()) {
219 static void __exit cleanup_dc21285(
void)