diff options
| author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2013-03-15 07:57:48 -0400 |
|---|---|---|
| committer | David Woodhouse <David.Woodhouse@intel.com> | 2013-04-05 08:15:17 -0400 |
| commit | c188a141672e4e3d6428ba53c9b709b8b631d8d5 (patch) | |
| tree | e136a70fb97dfec4aa4a18594f793011ee031f90 | |
| parent | 3e6f9aff773c48fb2a589754abe6584f2bdc3095 (diff) | |
mtd: remove the h1910 NAND driver
This driver is marked as broken for 2 years, and no one cares to make it
compile and work. Now it is time to zap it.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| -rw-r--r-- | drivers/mtd/nand/Kconfig | 6 | ||||
| -rw-r--r-- | drivers/mtd/nand/Makefile | 1 | ||||
| -rw-r--r-- | drivers/mtd/nand/h1910.c | 167 |
3 files changed, 0 insertions, 174 deletions
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig index e10a66572735..1cca71208340 100644 --- a/drivers/mtd/nand/Kconfig +++ b/drivers/mtd/nand/Kconfig | |||
| @@ -73,12 +73,6 @@ config MTD_NAND_DENALI_SCRATCH_REG_ADDR | |||
| 73 | scratch register here to enable this feature. On Intel Moorestown | 73 | scratch register here to enable this feature. On Intel Moorestown |
| 74 | boards, the scratch register is at 0xFF108018. | 74 | boards, the scratch register is at 0xFF108018. |
| 75 | 75 | ||
| 76 | config MTD_NAND_H1900 | ||
| 77 | tristate "iPAQ H1900 flash" | ||
| 78 | depends on ARCH_PXA && BROKEN | ||
| 79 | help | ||
| 80 | This enables the driver for the iPAQ h1900 flash. | ||
| 81 | |||
| 82 | config MTD_NAND_GPIO | 76 | config MTD_NAND_GPIO |
| 83 | tristate "GPIO NAND Flash driver" | 77 | tristate "GPIO NAND Flash driver" |
| 84 | depends on GENERIC_GPIO && ARM | 78 | depends on GENERIC_GPIO && ARM |
diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile index ff6e72aa27a6..bb8189172f62 100644 --- a/drivers/mtd/nand/Makefile +++ b/drivers/mtd/nand/Makefile | |||
| @@ -20,7 +20,6 @@ obj-$(CONFIG_MTD_NAND_DAVINCI) += davinci_nand.o | |||
| 20 | obj-$(CONFIG_MTD_NAND_DISKONCHIP) += diskonchip.o | 20 | obj-$(CONFIG_MTD_NAND_DISKONCHIP) += diskonchip.o |
| 21 | obj-$(CONFIG_MTD_NAND_DOCG4) += docg4.o | 21 | obj-$(CONFIG_MTD_NAND_DOCG4) += docg4.o |
| 22 | obj-$(CONFIG_MTD_NAND_FSMC) += fsmc_nand.o | 22 | obj-$(CONFIG_MTD_NAND_FSMC) += fsmc_nand.o |
| 23 | obj-$(CONFIG_MTD_NAND_H1900) += h1910.o | ||
| 24 | obj-$(CONFIG_MTD_NAND_SHARPSL) += sharpsl.o | 23 | obj-$(CONFIG_MTD_NAND_SHARPSL) += sharpsl.o |
| 25 | obj-$(CONFIG_MTD_NAND_NANDSIM) += nandsim.o | 24 | obj-$(CONFIG_MTD_NAND_NANDSIM) += nandsim.o |
| 26 | obj-$(CONFIG_MTD_NAND_CS553X) += cs553x_nand.o | 25 | obj-$(CONFIG_MTD_NAND_CS553X) += cs553x_nand.o |
diff --git a/drivers/mtd/nand/h1910.c b/drivers/mtd/nand/h1910.c deleted file mode 100644 index 50166e93ba96..000000000000 --- a/drivers/mtd/nand/h1910.c +++ /dev/null | |||
| @@ -1,167 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * drivers/mtd/nand/h1910.c | ||
| 3 | * | ||
| 4 | * Copyright (C) 2003 Joshua Wise (joshua@joshuawise.com) | ||
| 5 | * | ||
| 6 | * Derived from drivers/mtd/nand/edb7312.c | ||
| 7 | * Copyright (C) 2002 Marius Gröger (mag@sysgo.de) | ||
| 8 | * Copyright (c) 2001 Thomas Gleixner (gleixner@autronix.de) | ||
| 9 | * | ||
| 10 | * This program is free software; you can redistribute it and/or modify | ||
| 11 | * it under the terms of the GNU General Public License version 2 as | ||
| 12 | * published by the Free Software Foundation. | ||
| 13 | * | ||
| 14 | * Overview: | ||
| 15 | * This is a device driver for the NAND flash device found on the | ||
| 16 | * iPAQ h1910 board which utilizes the Samsung K9F2808 part. This is | ||
| 17 | * a 128Mibit (16MiB x 8 bits) NAND flash device. | ||
| 18 | */ | ||
| 19 | |||
| 20 | #include <linux/slab.h> | ||
| 21 | #include <linux/init.h> | ||
| 22 | #include <linux/module.h> | ||
| 23 | #include <linux/mtd/mtd.h> | ||
| 24 | #include <linux/mtd/nand.h> | ||
| 25 | #include <linux/mtd/partitions.h> | ||
| 26 | #include <asm/io.h> | ||
| 27 | #include <mach/hardware.h> | ||
| 28 | #include <asm/sizes.h> | ||
| 29 | #include <mach/h1900-gpio.h> | ||
| 30 | #include <mach/ipaq.h> | ||
| 31 | |||
| 32 | /* | ||
| 33 | * MTD structure for EDB7312 board | ||
| 34 | */ | ||
| 35 | static struct mtd_info *h1910_nand_mtd = NULL; | ||
| 36 | |||
| 37 | /* | ||
| 38 | * Module stuff | ||
| 39 | */ | ||
| 40 | |||
| 41 | /* | ||
| 42 | * Define static partitions for flash device | ||
| 43 | */ | ||
| 44 | static struct mtd_partition partition_info[] = { | ||
| 45 | {name:"h1910 NAND Flash", | ||
| 46 | offset:0, | ||
| 47 | size:16 * 1024 * 1024} | ||
| 48 | }; | ||
| 49 | |||
| 50 | #define NUM_PARTITIONS 1 | ||
| 51 | |||
| 52 | /* | ||
| 53 | * hardware specific access to control-lines | ||
| 54 | * | ||
| 55 | * NAND_NCE: bit 0 - don't care | ||
| 56 | * NAND_CLE: bit 1 - address bit 2 | ||
| 57 | * NAND_ALE: bit 2 - address bit 3 | ||
| 58 | */ | ||
| 59 | static void h1910_hwcontrol(struct mtd_info *mtd, int cmd, | ||
| 60 | unsigned int ctrl) | ||
| 61 | { | ||
| 62 | struct nand_chip *chip = mtd->priv; | ||
| 63 | |||
| 64 | if (cmd != NAND_CMD_NONE) | ||
| 65 | writeb(cmd, chip->IO_ADDR_W | ((ctrl & 0x6) << 1)); | ||
| 66 | } | ||
| 67 | |||
| 68 | /* | ||
| 69 | * read device ready pin | ||
| 70 | */ | ||
| 71 | #if 0 | ||
| 72 | static int h1910_device_ready(struct mtd_info *mtd) | ||
| 73 | { | ||
| 74 | return (GPLR(55) & GPIO_bit(55)); | ||
| 75 | } | ||
| 76 | #endif | ||
| 77 | |||
| 78 | /* | ||
| 79 | * Main initialization routine | ||
| 80 | */ | ||
| 81 | static int __init h1910_init(void) | ||
| 82 | { | ||
| 83 | struct nand_chip *this; | ||
| 84 | void __iomem *nandaddr; | ||
| 85 | |||
| 86 | if (!machine_is_h1900()) | ||
| 87 | return -ENODEV; | ||
| 88 | |||
| 89 | nandaddr = ioremap(0x08000000, 0x1000); | ||
| 90 | if (!nandaddr) { | ||
| 91 | printk("Failed to ioremap nand flash.\n"); | ||
| 92 | return -ENOMEM; | ||
| 93 | } | ||
| 94 | |||
| 95 | /* Allocate memory for MTD device structure and private data */ | ||
| 96 | h1910_nand_mtd = kmalloc(sizeof(struct mtd_info) + sizeof(struct nand_chip), GFP_KERNEL); | ||
| 97 | if (!h1910_nand_mtd) { | ||
| 98 | printk("Unable to allocate h1910 NAND MTD device structure.\n"); | ||
| 99 | iounmap((void *)nandaddr); | ||
| 100 | return -ENOMEM; | ||
| 101 | } | ||
| 102 | |||
| 103 | /* Get pointer to private data */ | ||
| 104 | this = (struct nand_chip *)(&h1910_nand_mtd[1]); | ||
| 105 | |||
| 106 | /* Initialize structures */ | ||
| 107 | memset(h1910_nand_mtd, 0, sizeof(struct mtd_info)); | ||
| 108 | memset(this, 0, sizeof(struct nand_chip)); | ||
| 109 | |||
| 110 | /* Link the private data with the MTD structure */ | ||
| 111 | h1910_nand_mtd->priv = this; | ||
| 112 | h1910_nand_mtd->owner = THIS_MODULE; | ||
| 113 | |||
| 114 | /* | ||
| 115 | * Enable VPEN | ||
| 116 | */ | ||
| 117 | GPSR(37) = GPIO_bit(37); | ||
| 118 | |||
| 119 | /* insert callbacks */ | ||
| 120 | this->IO_ADDR_R = nandaddr; | ||
| 121 | this->IO_ADDR_W = nandaddr; | ||
| 122 | this->cmd_ctrl = h1910_hwcontrol; | ||
| 123 | this->dev_ready = NULL; /* unknown whether that was correct or not so we will just do it like this */ | ||
| 124 | /* 15 us command delay time */ | ||
| 125 | this->chip_delay = 50; | ||
| 126 | this->ecc.mode = NAND_ECC_SOFT; | ||
| 127 | |||
| 128 | /* Scan to find existence of the device */ | ||
| 129 | if (nand_scan(h1910_nand_mtd, 1)) { | ||
| 130 | printk(KERN_NOTICE "No NAND device - returning -ENXIO\n"); | ||
| 131 | kfree(h1910_nand_mtd); | ||
| 132 | iounmap((void *)nandaddr); | ||
| 133 | return -ENXIO; | ||
| 134 | } | ||
| 135 | |||
| 136 | /* Register the partitions */ | ||
| 137 | mtd_device_parse_register(h1910_nand_mtd, NULL, NULL, partition_info, | ||
| 138 | NUM_PARTITIONS); | ||
| 139 | |||
| 140 | /* Return happy */ | ||
| 141 | return 0; | ||
| 142 | } | ||
| 143 | |||
| 144 | module_init(h1910_init); | ||
| 145 | |||
| 146 | /* | ||
| 147 | * Clean up routine | ||
| 148 | */ | ||
| 149 | static void __exit h1910_cleanup(void) | ||
| 150 | { | ||
| 151 | struct nand_chip *this = (struct nand_chip *)&h1910_nand_mtd[1]; | ||
| 152 | |||
| 153 | /* Release resources, unregister device */ | ||
| 154 | nand_release(h1910_nand_mtd); | ||
| 155 | |||
| 156 | /* Release io resource */ | ||
| 157 | iounmap((void *)this->IO_ADDR_W); | ||
| 158 | |||
| 159 | /* Free the MTD device structure */ | ||
| 160 | kfree(h1910_nand_mtd); | ||
| 161 | } | ||
| 162 | |||
| 163 | module_exit(h1910_cleanup); | ||
| 164 | |||
| 165 | MODULE_LICENSE("GPL"); | ||
| 166 | MODULE_AUTHOR("Joshua Wise <joshua at joshuawise dot com>"); | ||
| 167 | MODULE_DESCRIPTION("NAND flash driver for iPAQ h1910"); | ||
