2  * drivers/mtd/maps/pq2fads.c
 
   4  * Mapping for the flash SIMM on 8272ADS and PQ2FADS board
 
   6  * Author: Vitaly Bordug <vbordug@ru.mvista.com>
 
   8  * 2005 (c) MontaVista Software, Inc. This file is licensed under
 
   9  * the terms of the GNU General Public License version 2. This program
 
  10  * is licensed "as is" without any warranty of any kind, whether express
 
  14 #include <linux/module.h>
 
  15 #include <linux/types.h>
 
  16 #include <linux/kernel.h>
 
  17 #include <linux/init.h>
 
  19 #include <asm/ppcboot.h>
 
  20 #include <linux/mtd/mtd.h>
 
  21 #include <linux/mtd/map.h>
 
  22 #include <linux/mtd/partitions.h>
 
  23 #include <linux/mtd/physmap.h>
 
  26   NOTE: bank width and interleave relative to the installed flash
 
  27   should have been chosen within MTD_CFI_GEOMETRY options.
 
  29 #define PQ2FADS_BANK_WIDTH 4
 
  31 static struct mtd_partition pq2fads_partitions[] = {
 
  37                 .mask_flags     = MTD_WRITEABLE,  /* force read-only */
 
  51                 .mask_flags     = MTD_WRITEABLE,  /* force read-only */
 
  56                 .mask_flags     = MTD_WRITEABLE,  /* force read-only */
 
  58                 .name           = "bootloader env",
 
  61                 .mask_flags     = MTD_WRITEABLE,  /* force read-only */
 
  66 /* pointer to MPC885ADS board info data */
 
  67 extern unsigned char __res[];
 
  69 static int __init init_pq2fads_mtd(void)
 
  71         bd_t *bd = (bd_t *)__res;
 
  72         physmap_configure(bd->bi_flashstart, bd->bi_flashsize, PQ2FADS_BANK_WIDTH, NULL);
 
  74         physmap_set_partitions(pq2fads_partitions,
 
  75                                 sizeof (pq2fads_partitions) /
 
  76                                 sizeof (pq2fads_partitions[0]));
 
  80 static void __exit cleanup_pq2fads_mtd(void)
 
  84 module_init(init_pq2fads_mtd);
 
  85 module_exit(cleanup_pq2fads_mtd);
 
  87 MODULE_LICENSE("GPL");
 
  88 MODULE_DESCRIPTION("MTD map and partitions for MPC8272ADS boards");