From 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sat, 16 Apr 2005 15:20:36 -0700 Subject: Linux-2.6.12-rc2 Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip! --- drivers/mtd/maps/pnc2000.c | 93 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 drivers/mtd/maps/pnc2000.c (limited to 'drivers/mtd/maps/pnc2000.c') diff --git a/drivers/mtd/maps/pnc2000.c b/drivers/mtd/maps/pnc2000.c new file mode 100644 index 00000000000..a0f43dad898 --- /dev/null +++ b/drivers/mtd/maps/pnc2000.c @@ -0,0 +1,93 @@ +/* + * pnc2000.c - mapper for Photron PNC-2000 board. + * + * Copyright (C) 2000 Crossnet Co. + * + * This code is GPL + * + * $Id: pnc2000.c,v 1.17 2004/11/16 18:29:02 dwmw2 Exp $ + */ + +#include +#include +#include +#include + +#include +#include +#include + + +#define WINDOW_ADDR 0xbf000000 +#define WINDOW_SIZE 0x00400000 + +/* + * MAP DRIVER STUFF + */ + + +static struct map_info pnc_map = { + .name = "PNC-2000", + .size = WINDOW_SIZE, + .bankwidth = 4, + .phys = 0xFFFFFFFF, + .virt = (void __iomem *)WINDOW_ADDR, +}; + + +/* + * MTD 'PARTITIONING' STUFF + */ +static struct mtd_partition pnc_partitions[3] = { + { + .name = "PNC-2000 boot firmware", + .size = 0x20000, + .offset = 0 + }, + { + .name = "PNC-2000 kernel", + .size = 0x1a0000, + .offset = 0x20000 + }, + { + .name = "PNC-2000 filesystem", + .size = 0x240000, + .offset = 0x1c0000 + } +}; + +/* + * This is the master MTD device for which all the others are just + * auto-relocating aliases. + */ +static struct mtd_info *mymtd; + +static int __init init_pnc2000(void) +{ + printk(KERN_NOTICE "Photron PNC-2000 flash mapping: %x at %x\n", WINDOW_SIZE, WINDOW_ADDR); + + simple_map_init(&pnc_map); + + mymtd = do_map_probe("cfi_probe", &pnc_map); + if (mymtd) { + mymtd->owner = THIS_MODULE; + return add_mtd_partitions(mymtd, pnc_partitions, 3); + } + + return -ENXIO; +} + +static void __exit cleanup_pnc2000(void) +{ + if (mymtd) { + del_mtd_partitions(mymtd); + map_destroy(mymtd); + } +} + +module_init(init_pnc2000); +module_exit(cleanup_pnc2000); + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Crossnet Co. "); +MODULE_DESCRIPTION("MTD map driver for Photron PNC-2000 board"); -- cgit v1.2.3