diff options
Diffstat (limited to 'drivers/mtd/nand/autcpu12.c')
| -rw-r--r-- | drivers/mtd/nand/autcpu12.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/mtd/nand/autcpu12.c b/drivers/mtd/nand/autcpu12.c index 4afa8ced05ad..056dfc17a075 100644 --- a/drivers/mtd/nand/autcpu12.c +++ b/drivers/mtd/nand/autcpu12.c | |||
| @@ -5,8 +5,8 @@ | |||
| 5 | * | 5 | * |
| 6 | * Derived from drivers/mtd/spia.c | 6 | * Derived from drivers/mtd/spia.c |
| 7 | * Copyright (C) 2000 Steven J. Hill (sjhill@realitydiluted.com) | 7 | * Copyright (C) 2000 Steven J. Hill (sjhill@realitydiluted.com) |
| 8 | * | 8 | * |
| 9 | * $Id: autcpu12.c,v 1.22 2004/11/04 12:53:10 gleixner Exp $ | 9 | * $Id: autcpu12.c,v 1.23 2005/11/07 11:14:30 gleixner Exp $ |
| 10 | * | 10 | * |
| 11 | * This program is free software; you can redistribute it and/or modify | 11 | * This program is free software; you can redistribute it and/or modify |
| 12 | * it under the terms of the GNU General Public License version 2 as | 12 | * it under the terms of the GNU General Public License version 2 as |
| @@ -14,7 +14,7 @@ | |||
| 14 | * | 14 | * |
| 15 | * Overview: | 15 | * Overview: |
| 16 | * This is a device driver for the NAND flash device found on the | 16 | * This is a device driver for the NAND flash device found on the |
| 17 | * autronix autcpu12 board, which is a SmartMediaCard. It supports | 17 | * autronix autcpu12 board, which is a SmartMediaCard. It supports |
| 18 | * 16MiB, 32MiB and 64MiB cards. | 18 | * 16MiB, 32MiB and 64MiB cards. |
| 19 | * | 19 | * |
| 20 | * | 20 | * |
| @@ -93,7 +93,7 @@ static struct mtd_partition partition_info128k[] = { | |||
| 93 | #define NUM_PARTITIONS32K 2 | 93 | #define NUM_PARTITIONS32K 2 |
| 94 | #define NUM_PARTITIONS64K 2 | 94 | #define NUM_PARTITIONS64K 2 |
| 95 | #define NUM_PARTITIONS128K 2 | 95 | #define NUM_PARTITIONS128K 2 |
| 96 | /* | 96 | /* |
| 97 | * hardware specific access to control-lines | 97 | * hardware specific access to control-lines |
| 98 | */ | 98 | */ |
| 99 | static void autcpu12_hwcontrol(struct mtd_info *mtd, int cmd) | 99 | static void autcpu12_hwcontrol(struct mtd_info *mtd, int cmd) |
| @@ -163,7 +163,7 @@ int __init autcpu12_init (void) | |||
| 163 | this->hwcontrol = autcpu12_hwcontrol; | 163 | this->hwcontrol = autcpu12_hwcontrol; |
| 164 | this->dev_ready = autcpu12_device_ready; | 164 | this->dev_ready = autcpu12_device_ready; |
| 165 | /* 20 us command delay time */ | 165 | /* 20 us command delay time */ |
| 166 | this->chip_delay = 20; | 166 | this->chip_delay = 20; |
| 167 | this->eccmode = NAND_ECC_SOFT; | 167 | this->eccmode = NAND_ECC_SOFT; |
| 168 | 168 | ||
| 169 | /* Enable the following for a flash based bad block table */ | 169 | /* Enable the following for a flash based bad block table */ |
| @@ -171,21 +171,21 @@ int __init autcpu12_init (void) | |||
| 171 | this->options = NAND_USE_FLASH_BBT; | 171 | this->options = NAND_USE_FLASH_BBT; |
| 172 | */ | 172 | */ |
| 173 | this->options = NAND_USE_FLASH_BBT; | 173 | this->options = NAND_USE_FLASH_BBT; |
| 174 | 174 | ||
| 175 | /* Scan to find existance of the device */ | 175 | /* Scan to find existance of the device */ |
| 176 | if (nand_scan (autcpu12_mtd, 1)) { | 176 | if (nand_scan (autcpu12_mtd, 1)) { |
| 177 | err = -ENXIO; | 177 | err = -ENXIO; |
| 178 | goto out_ior; | 178 | goto out_ior; |
| 179 | } | 179 | } |
| 180 | 180 | ||
| 181 | /* Register the partitions */ | 181 | /* Register the partitions */ |
| 182 | switch(autcpu12_mtd->size){ | 182 | switch(autcpu12_mtd->size){ |
| 183 | case SZ_16M: add_mtd_partitions(autcpu12_mtd, partition_info16k, NUM_PARTITIONS16K); break; | 183 | case SZ_16M: add_mtd_partitions(autcpu12_mtd, partition_info16k, NUM_PARTITIONS16K); break; |
| 184 | case SZ_32M: add_mtd_partitions(autcpu12_mtd, partition_info32k, NUM_PARTITIONS32K); break; | 184 | case SZ_32M: add_mtd_partitions(autcpu12_mtd, partition_info32k, NUM_PARTITIONS32K); break; |
| 185 | case SZ_64M: add_mtd_partitions(autcpu12_mtd, partition_info64k, NUM_PARTITIONS64K); break; | 185 | case SZ_64M: add_mtd_partitions(autcpu12_mtd, partition_info64k, NUM_PARTITIONS64K); break; |
| 186 | case SZ_128M: add_mtd_partitions(autcpu12_mtd, partition_info128k, NUM_PARTITIONS128K); break; | 186 | case SZ_128M: add_mtd_partitions(autcpu12_mtd, partition_info128k, NUM_PARTITIONS128K); break; |
| 187 | default: { | 187 | default: { |
| 188 | printk ("Unsupported SmartMedia device\n"); | 188 | printk ("Unsupported SmartMedia device\n"); |
| 189 | err = -ENXIO; | 189 | err = -ENXIO; |
| 190 | goto out_ior; | 190 | goto out_ior; |
| 191 | } | 191 | } |
| @@ -213,7 +213,7 @@ static void __exit autcpu12_cleanup (void) | |||
| 213 | 213 | ||
| 214 | /* unmap physical adress */ | 214 | /* unmap physical adress */ |
| 215 | iounmap((void *)autcpu12_fio_base); | 215 | iounmap((void *)autcpu12_fio_base); |
| 216 | 216 | ||
| 217 | /* Free the MTD device structure */ | 217 | /* Free the MTD device structure */ |
| 218 | kfree (autcpu12_mtd); | 218 | kfree (autcpu12_mtd); |
| 219 | } | 219 | } |
