aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHåvard Skinnemoen <haavard.skinnemoen@atmel.com>2008-06-06 12:04:52 -0400
committerDavid Woodhouse <dwmw2@infradead.org>2008-06-07 03:42:51 -0400
commitd4f4c0aa8e36f69e46360b3d3569dc15d6099894 (patch)
tree758e0bcfe4be735048edcd87929beefd30c39658
parent62fd71fe710886ba449e932ad7877f4a8340c2d4 (diff)
[MTD] [NAND] rename at91_nand -> atmel_nand: file names and Kconfig
The AT91 NAND driver needs just a few tiny modifications to work on AVR32 as well. Rename it atmel_nand to reflect this. Also move the ECC register definitions into drivers/mtd/nand since they are only useful to the atmel_nand driver, and get rid of the useless filename at the top of each file. Signed-off-by: Håvard Skinnemoen <haavard.skinnemoen@atmel.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
-rw-r--r--drivers/mtd/nand/Kconfig17
-rw-r--r--drivers/mtd/nand/Makefile2
-rw-r--r--drivers/mtd/nand/atmel_nand.c (renamed from drivers/mtd/nand/at91_nand.c)10
-rw-r--r--drivers/mtd/nand/atmel_nand_ecc.h (renamed from include/asm-arm/arch-at91/at91_ecc.h)6
4 files changed, 16 insertions, 19 deletions
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index 7dea6c3a6603..cdd2952c1533 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -271,7 +271,7 @@ config MTD_NAND_CS553X
271 271
272 If you say "m", the module will be called "cs553x_nand.ko". 272 If you say "m", the module will be called "cs553x_nand.ko".
273 273
274config MTD_NAND_AT91 274config MTD_NAND_ATMEL
275 bool "Support for NAND Flash / SmartMedia on AT91" 275 bool "Support for NAND Flash / SmartMedia on AT91"
276 depends on ARCH_AT91 276 depends on ARCH_AT91
277 help 277 help
@@ -279,14 +279,15 @@ config MTD_NAND_AT91
279 on Atmel AT91 processors. 279 on Atmel AT91 processors.
280choice 280choice
281 prompt "ECC management for NAND Flash / SmartMedia on AT91" 281 prompt "ECC management for NAND Flash / SmartMedia on AT91"
282 depends on MTD_NAND_AT91 282 depends on MTD_NAND_ATMEL
283 283
284config MTD_NAND_AT91_ECC_HW 284config MTD_NAND_ATMEL_ECC_HW
285 bool "Hardware ECC" 285 bool "Hardware ECC"
286 depends on ARCH_AT91SAM9263 || ARCH_AT91SAM9260 286 depends on ARCH_AT91SAM9263 || ARCH_AT91SAM9260
287 help 287 help
288 Uses hardware ECC provided by the at91sam9260/at91sam9263 chip 288 Use hardware ECC instead of software ECC when the chip
289 instead of software ECC. 289 supports it.
290
290 The hardware ECC controller is capable of single bit error 291 The hardware ECC controller is capable of single bit error
291 correction and 2-bit random detection per page. 292 correction and 2-bit random detection per page.
292 293
@@ -296,16 +297,16 @@ config MTD_NAND_AT91_ECC_HW
296 297
297 If unsure, say Y 298 If unsure, say Y
298 299
299config MTD_NAND_AT91_ECC_SOFT 300config MTD_NAND_ATMEL_ECC_SOFT
300 bool "Software ECC" 301 bool "Software ECC"
301 help 302 help
302 Uses software ECC. 303 Use software ECC.
303 304
304 NB : hardware and software ECC schemes are incompatible. 305 NB : hardware and software ECC schemes are incompatible.
305 If you switch from one to another, you'll have to erase your 306 If you switch from one to another, you'll have to erase your
306 mtd partition. 307 mtd partition.
307 308
308config MTD_NAND_AT91_ECC_NONE 309config MTD_NAND_ATMEL_ECC_NONE
309 bool "No ECC (testing only, DANGEROUS)" 310 bool "No ECC (testing only, DANGEROUS)"
310 depends on DEBUG_KERNEL 311 depends on DEBUG_KERNEL
311 help 312 help
diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
index d95a10c51866..d772581de573 100644
--- a/drivers/mtd/nand/Makefile
+++ b/drivers/mtd/nand/Makefile
@@ -23,7 +23,7 @@ obj-$(CONFIG_MTD_NAND_TS7250) += ts7250.o
23obj-$(CONFIG_MTD_NAND_NANDSIM) += nandsim.o 23obj-$(CONFIG_MTD_NAND_NANDSIM) += nandsim.o
24obj-$(CONFIG_MTD_NAND_CS553X) += cs553x_nand.o 24obj-$(CONFIG_MTD_NAND_CS553X) += cs553x_nand.o
25obj-$(CONFIG_MTD_NAND_NDFC) += ndfc.o 25obj-$(CONFIG_MTD_NAND_NDFC) += ndfc.o
26obj-$(CONFIG_MTD_NAND_AT91) += at91_nand.o 26obj-$(CONFIG_MTD_NAND_ATMEL) += atmel_nand.o
27obj-$(CONFIG_MTD_NAND_CM_X270) += cmx270_nand.o 27obj-$(CONFIG_MTD_NAND_CM_X270) += cmx270_nand.o
28obj-$(CONFIG_MTD_NAND_BASLER_EXCITE) += excite_nandflash.o 28obj-$(CONFIG_MTD_NAND_BASLER_EXCITE) += excite_nandflash.o
29obj-$(CONFIG_MTD_NAND_PXA3xx) += pxa3xx_nand.o 29obj-$(CONFIG_MTD_NAND_PXA3xx) += pxa3xx_nand.o
diff --git a/drivers/mtd/nand/at91_nand.c b/drivers/mtd/nand/atmel_nand.c
index 2dcaeeae2068..51b703155db6 100644
--- a/drivers/mtd/nand/at91_nand.c
+++ b/drivers/mtd/nand/atmel_nand.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * drivers/mtd/nand/at91_nand.c
3 *
4 * Copyright (C) 2003 Rick Bronson 2 * Copyright (C) 2003 Rick Bronson
5 * 3 *
6 * Derived from drivers/mtd/nand/autcpu12.c 4 * Derived from drivers/mtd/nand/autcpu12.c
@@ -36,13 +34,13 @@
36 34
37#include <asm/arch/board.h> 35#include <asm/arch/board.h>
38 36
39#ifdef CONFIG_MTD_NAND_AT91_ECC_HW 37#ifdef CONFIG_MTD_NAND_ATMEL_ECC_HW
40#define hard_ecc 1 38#define hard_ecc 1
41#else 39#else
42#define hard_ecc 0 40#define hard_ecc 0
43#endif 41#endif
44 42
45#ifdef CONFIG_MTD_NAND_AT91_ECC_NONE 43#ifdef CONFIG_MTD_NAND_ATMEL_ECC_NONE
46#define no_ecc 1 44#define no_ecc 1
47#else 45#else
48#define no_ecc 0 46#define no_ecc 0
@@ -54,7 +52,7 @@
54#define ecc_writel(add, reg, value) \ 52#define ecc_writel(add, reg, value) \
55 __raw_writel((value), add + AT91_ECC_##reg) 53 __raw_writel((value), add + AT91_ECC_##reg)
56 54
57#include <asm/arch/at91_ecc.h> /* AT91SAM9260/3 ECC registers */ 55#include "atmel_nand_ecc.h" /* Hardware ECC registers */
58 56
59/* oob layout for large page size 57/* oob layout for large page size
60 * bad block info is on bytes 0 and 1 58 * bad block info is on bytes 0 and 1
@@ -588,5 +586,5 @@ module_exit(at91_nand_exit);
588 586
589MODULE_LICENSE("GPL"); 587MODULE_LICENSE("GPL");
590MODULE_AUTHOR("Rick Bronson"); 588MODULE_AUTHOR("Rick Bronson");
591MODULE_DESCRIPTION("NAND/SmartMedia driver for AT91RM9200 / AT91SAM9"); 589MODULE_DESCRIPTION("NAND/SmartMedia driver for AT91 / AVR32");
592MODULE_ALIAS("platform:at91_nand"); 590MODULE_ALIAS("platform:at91_nand");
diff --git a/include/asm-arm/arch-at91/at91_ecc.h b/drivers/mtd/nand/atmel_nand_ecc.h
index 1e5a8caca2d1..170db869aacf 100644
--- a/include/asm-arm/arch-at91/at91_ecc.h
+++ b/drivers/mtd/nand/atmel_nand_ecc.h
@@ -1,6 +1,4 @@
1/* 1/*
2 * include/asm-arm/arch-at91/at91_ecc.h
3 *
4 * Error Corrected Code Controller (ECC) - System peripherals regsters. 2 * Error Corrected Code Controller (ECC) - System peripherals regsters.
5 * Based on AT91SAM9260 datasheet revision B. 3 * Based on AT91SAM9260 datasheet revision B.
6 * 4 *
@@ -10,8 +8,8 @@
10 * option) any later version. 8 * option) any later version.
11 */ 9 */
12 10
13#ifndef AT91_ECC_H 11#ifndef ATMEL_NAND_ECC_H
14#define AT91_ECC_H 12#define ATMEL_NAND_ECC_H
15 13
16#define AT91_ECC_CR 0x00 /* Control register */ 14#define AT91_ECC_CR 0x00 /* Control register */
17#define AT91_ECC_RST (1 << 0) /* Reset parity */ 15#define AT91_ECC_RST (1 << 0) /* Reset parity */