[
  [
    "linux-2.6.23.orig/drivers/mtd/maps/Kconfig", 
    "linux-2.6.23/drivers/mtd/maps/Kconfig", 
    [
      "Index: linux-2.6.23/drivers/mtd/maps/Kconfig", 
      "===================================================================", 
      "--- linux-2.6.23.orig/drivers/mtd/maps/Kconfig", 
      "+++ linux-2.6.23/drivers/mtd/maps/Kconfig", 
      "@@ -614,5 +614,11 @@ config MTD_PLATRAM", 
      "", 
      "This selection automatically selects the map_ram driver.", 
      "", 
      "+config MTD_VIP19XX_NOR", 
      "+       tristate \"Map driver for Motorola VIP19xx board\"", 
      "+       depends on SH_MOTOROLA_VIP19XX && MTD_CFI_INTELEXT", 
      "+       help", 
      "+         Map driver for the NOR flash on Motorola VIP19xx boards.", 
      "+", 
      "endmenu", 
      ""
    ]
  ], 
  [
    "linux-2.6.23.orig/drivers/mtd/maps/Makefile", 
    "linux-2.6.23/drivers/mtd/maps/Makefile", 
    [
      "Index: linux-2.6.23/drivers/mtd/maps/Makefile", 
      "===================================================================", 
      "--- linux-2.6.23.orig/drivers/mtd/maps/Makefile", 
      "+++ linux-2.6.23/drivers/mtd/maps/Makefile", 
      "@@ -71,3 +71,4 @@ obj-$(CONFIG_MTD_PLATRAM)\t+= plat-ram.o", 
      "obj-$(CONFIG_MTD_OMAP_NOR)\t+= omap_nor.o", 
      "obj-$(CONFIG_MTD_MTX1)\t\t+= mtx-1_flash.o", 
      "obj-$(CONFIG_MTD_TQM834x)\t+= tqm834x.o", 
      "+obj-$(CONFIG_MTD_VIP19XX_NOR)\t+= vip19xx_nor.o"
    ]
  ], 
  [
    "dev/null", 
    "linux-2.6.23/drivers/mtd/maps/vip19xx_nor.c", 
    [
      "Index: linux-2.6.23/drivers/mtd/maps/vip19xx_nor.c", 
      "===================================================================", 
      "--- dev/null", 
      "+++ linux-2.6.23/drivers/mtd/maps/vip19xx_nor.c", 
      "@@ -0,0 +1,174 @@", 
      "+/*", 
      "+ *---------------------------------------------------------------------------", 
      "+ *", 
      "+ * vip19xx_nor.c", 
      "+ *", 
      "+ * Copyright (c) 2008-2011 Motorola, Inc.", 
      "+ * All rights reserved.", 
      "+ *", 
      "+ * Redistribution and use in source and binary forms, with or without", 
      "+ * modification, are permitted provided that the following conditions", 
      "+ * are met:", 
      "+ * 1. Redistributions of source code must retain the above copyright", 
      "+ * notice, this list of conditions and the following disclaimer.", 
      "+ * 2. Redistributions in binary form must reproduce the above copyright", 
      "+ * notice, this list of conditions and the following disclaimer in the", 
      "+ * documentation and/or other materials provided with the distribution.", 
      "+ * 3. The name of the author may not be used to endorse or promote products", 
      "+ * derived from this software without specific prior written permission.", 
      "+ *", 
      "+ * Alternatively, this software may be distributed under the terms of the", 
      "+ * GNU General Public License (\"GPL\") version 2 as published by the Free", 
      "+ * Software Foundation.", 
      "+ *", 
      "+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR", 
      "+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES", 
      "+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.", 
      "+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,", 
      "+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT", 
      "+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,", 
      "+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY", 
      "+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT", 
      "+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF", 
      "+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.", 
      "+ *", 
      "+ *---------------------------------------------------------------------------", 
      "+ */", 
      "+", 
      "+#include <asm/vip19xx.h>", 
      "+#include <linux/module.h>", 
      "+#include <linux/kernel.h>", 
      "+#include <linux/init.h>", 
      "+#include <linux/ioport.h>", 
      "+#include <linux/mtd/cfi.h>", 
      "+#include <linux/mtd/mtd.h>", 
      "+#include <linux/mtd/map.h>", 
      "+#include <linux/mtd/physmap.h>", 
      "+#include <linux/mtd/partitions.h>", 
      "+#include <linux/notifier.h>", 
      "+", 
      "+int register_machine_restart_notifier(struct notifier_block * nb);", 
      "+", 
      "+static struct map_info onboard_map = {", 
      "+\t.name = \"Onboard_Flash\",", 
      "+\t.phys = VIP19XX_NOR_FLASH_BASE,", 
      "+\t.size = VIP19XX_NOR_FLASH_SIZE,", 
      "+\t.bankwidth = VIP19XX_NOR_FLASH_BANKWIDTH", 
      "+};", 
      "+", 
      "+static struct mtd_partition onboard_partitions[2] = {", 
      "+\t{", 
      "+\t .name = \"FFS area\",", 
      "+\t .size = VIP19XX_NOR_FLASH_FFS_SIZE,", 
      "+\t .offset = (VIP19XX_NOR_FLASH_SIZE - VIP19XX_NOR_FLASH_FFS_SIZE),", 
      "+\t},", 
      "+\t{", 
      "+\t .name = \"Raw area\",", 
      "+\t .size = (VIP19XX_NOR_FLASH_SIZE - VIP19XX_NOR_FLASH_FFS_SIZE),", 
      "+\t .offset = 0x00000000,", 
      "+\t}", 
      "+};", 
      "+", 
      "+static void set_emi_cs(int active)", 
      "+{", 
      "+\tvoid __iomem *emi = ioremap_nocache(VIP19XX_EMI_CONFIG_BASE, VIP19XX_EMI_CONFIG_SIZE);", 
      "+\tif (active) {", 
      "+\t\tVIP19XX_EMI_ENABLE_CS(emi, VIP19XX_NOR_FLASH_EMI_BANK);", 
      "+\t}", 
      "+\telse {", 
      "+\t\tVIP19XX_EMI_DISABLE_CS(emi, VIP19XX_NOR_FLASH_EMI_BANK);", 
      "+\t}", 
      "+\tiounmap(emi);", 
      "+}", 
      "+", 
      "+/*", 
      "+ * Set chip to FL_READY state before restarting", 
      "+ * Similar to do_read_onechip (cfi_cmdset_0001.c), minus mutexing.", 
      "+ * Enables and disables the Chip select pulse on the EMI.", 
      "+ */", 
      "+static int machine_restart_notifier(struct notifier_block *nb,", 
      "+                                    unsigned long val,", 
      "+                                    void *v)", 
      "+{", 
      "+\tstruct map_info *map = &onboard_map;", 
      "+\tstruct cfi_private *cfi = map->fldrv_priv;", 
      "+", 
      "+\tset_emi_cs(1);", 
      "+\tmap_write(map, CMD(0xff), 0);", 
      "+\tset_emi_cs(0);", 
      "+\treturn NOTIFY_OK;", 
      "+}", 
      "+", 
      "+static struct notifier_block restart_notifier_block = {", 
      "+\tmachine_restart_notifier, NULL, 0", 
      "+};", 
      "+", 
      "+static struct mtd_info *onboard_mtd;", 
      "+static struct mtd_partition *parsed_parts;", 
      "+static const char *probes[] = { \"cmdlinepart\", NULL };", 
      "+", 
      "+static int __init init(void)", 
      "+{", 
      "+\tint nr_parts = 0;", 
      "+", 
      "+\t/* Enable writing to Flash */", 
      "+\tset_emi_cs(1);", 
      "+", 
      "+\tregister_machine_restart_notifier(&restart_notifier_block);", 
      "+", 
      "+\tprintk(KERN_NOTICE \"VIP19xx onboard flash device\\n\");", 
      "+", 
      "+\tonboard_map.virt =", 
      "+\t\t(unsigned long *)ioremap_nocache(onboard_map.phys, onboard_map.size);", 
      "+\tif (onboard_map.virt == 0) {", 
      "+\t\tprintk(KERN_ERR \"Failed to ioremap onboard flash\\n\");", 
      "+\t}", 
      "+\telse {", 
      "+#ifndef CONFIG_MTD_COMPLEX_MAPPINGS", 
      "+\t\tsimple_map_init(&onboard_map);", 
      "+#endif", 
      "+\t\tonboard_mtd = do_map_probe(\"cfi_probe\", &onboard_map);", 
      "+\t\tif (onboard_mtd != NULL) {", 
      "+\t\t\tonboard_mtd->owner = THIS_MODULE;", 
      "+#ifdef CONFIG_MTD_CMDLINE_PARTS", 
      "+\t\t\t\tnr_parts = parse_mtd_partitions(onboard_mtd, probes,", 
      "+\t\t\t\t\t\t\t\t&parsed_parts, 0);", 
      "+#endif", 
      "+\t\t\t\tif (nr_parts <= 0) {", 
      "+\t\t\t\t\tadd_mtd_partitions(onboard_mtd,", 
      "+\t\t\t\t\t\t\t   onboard_partitions,", 
      "+\t\t\t\t\t\t\t   ARRAY_SIZE", 
      "+\t\t\t\t\t\t\t   (onboard_partitions));", 
      "+\t\t\t\t}", 
      "+\t\t\t\telse {", 
      "+\t\t\t\t\tadd_mtd_partitions(onboard_mtd, parsed_parts,", 
      "+\t\t\t\t\t\t\t   nr_parts);", 
      "+\t\t\t\t}", 
      "+\t\t}", 
      "+\t\telse {", 
      "+\t\t\tiounmap((void *)onboard_map.virt);", 
      "+\t\t}", 
      "+\t}", 
      "+", 
      "+\treturn 0;", 
      "+}", 
      "+", 
      "+static void __exit cleanup(void)", 
      "+{", 
      "+\tif (onboard_mtd != NULL) {", 
      "+\t\tdel_mtd_partitions(onboard_mtd);", 
      "+\t\tmap_destroy(onboard_mtd);", 
      "+\t}", 
      "+", 
      "+\tif (onboard_map.virt != 0) {", 
      "+\t\tiounmap((void *)onboard_map.virt);", 
      "+\t\tonboard_map.virt = 0;", 
      "+\t}", 
      "+}", 
      "+", 
      "+module_init(init);", 
      "+module_exit(cleanup);", 
      "+", 
      "+MODULE_LICENSE(\"GPL\");", 
      "+MODULE_AUTHOR(\"Erik Johansson <erik.johansson@motorola.com>\");", 
      "+MODULE_DESCRIPTION(\"MTD map and partitions for Motorola VIP19xx boards\");"
    ]
  ]
]