2 * Pseudo-device to access IPL memory.
6 * Author: Luke Kenneth Casson Leighton, Copyright(C) 2004
8 * Copyright(C) 2004, Luke Kenneth Casson Leighton.
12 * 2004-02-19 Luke Kenneth Casson Leighton created.
16 #include <linux/module.h>
17 #include <linux/dma-mapping.h>
18 #include <linux/mtd/mtd.h>
19 #include <linux/mtd/map.h>
20 #include <asm/mach-types.h>
23 #define FLASH_ADDR1 0x00000000
24 #define FLASH_ADDR2 0x00000000
25 #define WINDOW_SIZE 0x800
27 static struct map_info sable_map
= {
34 static struct mtd_info
*mymtd
;
36 static int sable_rom_init (void)
40 #if defined(CONFIG_MACH_BLUEANGEL)
41 if (! machine_is_sable() )
45 sable_map
.virt
= ioremap(sable_map
.phys
, sable_map
.size
);
46 if (!sable_map
.virt
) {
47 printk(KERN_WARNING
"Failed to ioremap %s\n", sable_map
.name
);
50 sable_map
.cached
= ioremap_cached(sable_map
.phys
, sable_map
.size
);
51 if (!sable_map
.cached
)
52 printk(KERN_WARNING
"Failed to ioremap cached %s\n", sable_map
.name
);
53 simple_map_init(&sable_map
);
55 printk(KERN_NOTICE
"Probing %s at physical address 0x%08lx (%d-bit bankwidth)\n",
56 sable_map
.name
, sable_map
.phys
,
57 sable_map
.bankwidth
* 8);
59 mymtd
= do_map_probe("cfi_probe", &sable_map
);
60 printk("mymtd=%p\n", mymtd
);
62 add_mtd_device(mymtd
);
66 static void sable_rom_exit (void)
68 del_mtd_device(mymtd
);
71 iounmap((void *)sable_map
.virt
);
73 iounmap(sable_map
.cached
);
76 module_init (sable_rom_init
);
77 module_exit (sable_rom_exit
);