| * Handle mapping of the flash on the RPX Lite and CLLF boards |
| #include <linux/module.h> |
| #include <linux/kernel.h> |
| #include <linux/mtd/mtd.h> |
| #include <linux/mtd/map.h> |
| #define WINDOW_ADDR 0xfe000000 |
| #define WINDOW_SIZE 0x800000 |
| static struct mtd_info *mymtd; |
| static struct map_info rpxlite_map = { |
| static int __init init_rpxlite(void) |
| printk(KERN_NOTICE "RPX Lite or CLLF flash device: %x at %x\n", WINDOW_SIZE*4, WINDOW_ADDR); |
| rpxlite_map.virt = ioremap(WINDOW_ADDR, WINDOW_SIZE * 4); |
| printk("Failed to ioremap\n"); |
| simple_map_init(&rpxlite_map); |
| mymtd = do_map_probe("cfi_probe", &rpxlite_map); |
| mymtd->owner = THIS_MODULE; |
| iounmap((void *)rpxlite_map.virt); |
| static void __exit cleanup_rpxlite(void) |
| iounmap((void *)rpxlite_map.virt); |
| module_init(init_rpxlite); |
| module_exit(cleanup_rpxlite); |
| MODULE_AUTHOR("Arnold Christensen <AKC@pel.dk>"); |
| MODULE_DESCRIPTION("MTD map driver for RPX Lite and CLLF boards"); |