Release 4.7 drivers/mtd/maps/solutionengine.c
/*
* Flash and EPROM on Hitachi Solution Engine and similar boards.
*
* (C) 2001 Red Hat, Inc.
*
* GPL'd
*/
#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <asm/io.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/map.h>
#include <linux/mtd/partitions.h>
#include <linux/errno.h>
static struct mtd_info *flash_mtd;
static struct mtd_info *eprom_mtd;
struct map_info soleng_eprom_map = {
.name = "Solution Engine EPROM",
.size = 0x400000,
.bankwidth = 4,
};
struct map_info soleng_flash_map = {
.name = "Solution Engine FLASH",
.size = 0x400000,
.bankwidth = 4,
};
static const char * const probes[] = { "RedBoot", "cmdlinepart", NULL };
static int __init init_soleng_maps(void)
{
/* First probe at offset 0 */
soleng_flash_map.phys = 0;
soleng_flash_map.virt = (void __iomem *)P2SEGADDR(0);
soleng_eprom_map.phys = 0x01000000;
soleng_eprom_map.virt = (void __iomem *)P1SEGADDR(0x01000000);
simple_map_init(&soleng_eprom_map);
simple_map_init(&soleng_flash_map);
printk(KERN_NOTICE "Probing for flash chips at 0x00000000:\n");
flash_mtd = do_map_probe("cfi_probe", &soleng_flash_map);
if (!flash_mtd) {
/* Not there. Try swapping */
printk(KERN_NOTICE "Probing for flash chips at 0x01000000:\n");
soleng_flash_map.phys = 0x01000000;
soleng_flash_map.virt = P2SEGADDR(0x01000000);
soleng_eprom_map.phys = 0;
soleng_eprom_map.virt = P1SEGADDR(0);
flash_mtd = do_map_probe("cfi_probe", &soleng_flash_map);
if (!flash_mtd) {
/* Eep. */
printk(KERN_NOTICE "Flash chips not detected at either possible location.\n");
return -ENXIO;
}
}
printk(KERN_NOTICE "Solution Engine: Flash at 0x%08lx, EPROM at 0x%08lx\n",
soleng_flash_map.phys & 0x1fffffff,
soleng_eprom_map.phys & 0x1fffffff);
flash_mtd->owner = THIS_MODULE;
eprom_mtd = do_map_probe("map_rom", &soleng_eprom_map);
if (eprom_mtd) {
eprom_mtd->owner = THIS_MODULE;
mtd_device_register(eprom_mtd, NULL, 0);
}
mtd_device_parse_register(flash_mtd, probes, NULL, NULL, 0);
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
linus torvalds | linus torvalds | 151 | 68.33% | 1 | 14.29% |
david woodhouse | david woodhouse | 51 | 23.08% | 1 | 14.29% |
thomas gleixner | thomas gleixner | 10 | 4.52% | 1 | 14.29% |
jamie iles | jamie iles | 5 | 2.26% | 1 | 14.29% |
paul bolle | paul bolle | 2 | 0.90% | 1 | 14.29% |
artem bityutskiy | artem bityutskiy | 1 | 0.45% | 1 | 14.29% |
dmitry eremin-baryshkov | dmitry eremin-baryshkov | 1 | 0.45% | 1 | 14.29% |
| Total | 221 | 100.00% | 7 | 100.00% |
static void __exit cleanup_soleng_maps(void)
{
if (eprom_mtd) {
mtd_device_unregister(eprom_mtd);
map_destroy(eprom_mtd);
}
mtd_device_unregister(flash_mtd);
map_destroy(flash_mtd);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
linus torvalds | linus torvalds | 33 | 94.29% | 1 | 50.00% |
jamie iles | jamie iles | 2 | 5.71% | 1 | 50.00% |
| Total | 35 | 100.00% | 2 | 100.00% |
module_init(init_soleng_maps);
module_exit(cleanup_soleng_maps);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>");
MODULE_DESCRIPTION("MTD map driver for Hitachi SolutionEngine (and similar) boards");
Overall Contributors
| Person | Tokens | Prop | Commits | CommitProp |
linus torvalds | linus torvalds | 269 | 70.98% | 1 | 9.09% |
david woodhouse | david woodhouse | 75 | 19.79% | 2 | 18.18% |
art haas | art haas | 12 | 3.17% | 1 | 9.09% |
thomas gleixner | thomas gleixner | 10 | 2.64% | 1 | 9.09% |
jamie iles | jamie iles | 7 | 1.85% | 1 | 9.09% |
artem bityutskiy | artem bityutskiy | 2 | 0.53% | 2 | 18.18% |
paul bolle | paul bolle | 2 | 0.53% | 1 | 9.09% |
dmitry eremin-baryshkov | dmitry eremin-baryshkov | 1 | 0.26% | 1 | 9.09% |
adrian bunk | adrian bunk | 1 | 0.26% | 1 | 9.09% |
| Total | 379 | 100.00% | 11 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.