diff options
author | Maxim Levitsky <maximlevitsky@gmail.com> | 2010-03-19 11:22:54 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2010-03-26 11:26:27 -0400 |
commit | e5f710cfc6947e64672b7205f7992515868c7782 (patch) | |
tree | c72c3262e6a65b59f067b61cd910697edc071ecb /drivers/mtd | |
parent | ca7081d96e39ea276892f0577f9cf37568547e88 (diff) |
mtd: nand: split out ECC module
This way drivers could use ecc routines without depedency on whole nand
Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/Kconfig | 3 | ||||
-rw-r--r-- | drivers/mtd/nand/Kconfig | 19 | ||||
-rw-r--r-- | drivers/mtd/nand/Makefile | 3 |
3 files changed, 16 insertions, 9 deletions
diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig index dbee14d37224..e652080bce5d 100644 --- a/drivers/mtd/Kconfig +++ b/drivers/mtd/Kconfig | |||
@@ -307,8 +307,9 @@ config SSFDC | |||
307 | 307 | ||
308 | config SM_FTL | 308 | config SM_FTL |
309 | tristate "SmartMedia/xD new translation layer" | 309 | tristate "SmartMedia/xD new translation layer" |
310 | depends on EXPERIMENTAL && BLOCK && MTD_NAND | 310 | depends on EXPERIMENTAL && BLOCK |
311 | select MTD_BLKDEVS | 311 | select MTD_BLKDEVS |
312 | select MTD_NAND_ECC | ||
312 | help | 313 | help |
313 | This enables new and very EXPERMENTAL support for SmartMedia/xD | 314 | This enables new and very EXPERMENTAL support for SmartMedia/xD |
314 | FTL (Flash translation layer). | 315 | FTL (Flash translation layer). |
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig index 164bd56b9d1a..b712aedd89fb 100644 --- a/drivers/mtd/nand/Kconfig +++ b/drivers/mtd/nand/Kconfig | |||
@@ -2,11 +2,23 @@ menuconfig MTD_NAND | |||
2 | tristate "NAND Device Support" | 2 | tristate "NAND Device Support" |
3 | depends on MTD | 3 | depends on MTD |
4 | select MTD_NAND_IDS | 4 | select MTD_NAND_IDS |
5 | select MTD_NAND_ECC | ||
5 | help | 6 | help |
6 | This enables support for accessing all type of NAND flash | 7 | This enables support for accessing all type of NAND flash |
7 | devices. For further information see | 8 | devices. For further information see |
8 | <http://www.linux-mtd.infradead.org/doc/nand.html>. | 9 | <http://www.linux-mtd.infradead.org/doc/nand.html>. |
9 | 10 | ||
11 | config MTD_NAND_ECC | ||
12 | tristate | ||
13 | |||
14 | config MTD_NAND_ECC_SMC | ||
15 | bool "NAND ECC Smart Media byte order" | ||
16 | depends on MTD_NAND_ECC | ||
17 | default n | ||
18 | help | ||
19 | Software ECC according to the Smart Media Specification. | ||
20 | The original Linux implementation had byte 0 and 1 swapped. | ||
21 | |||
10 | if MTD_NAND | 22 | if MTD_NAND |
11 | 23 | ||
12 | config MTD_NAND_VERIFY_WRITE | 24 | config MTD_NAND_VERIFY_WRITE |
@@ -18,13 +30,6 @@ config MTD_NAND_VERIFY_WRITE | |||
18 | device thinks the write was successful, a bit could have been | 30 | device thinks the write was successful, a bit could have been |
19 | flipped accidentally due to device wear or something else. | 31 | flipped accidentally due to device wear or something else. |
20 | 32 | ||
21 | config MTD_NAND_ECC_SMC | ||
22 | bool "NAND ECC Smart Media byte order" | ||
23 | default n | ||
24 | help | ||
25 | Software ECC according to the Smart Media Specification. | ||
26 | The original Linux implementation had byte 0 and 1 swapped. | ||
27 | |||
28 | config MTD_SM_COMMON | 33 | config MTD_SM_COMMON |
29 | tristate | 34 | tristate |
30 | default n | 35 | default n |
diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile index 5fbd1f83afb6..04bccf9d7b53 100644 --- a/drivers/mtd/nand/Makefile +++ b/drivers/mtd/nand/Makefile | |||
@@ -2,7 +2,8 @@ | |||
2 | # linux/drivers/nand/Makefile | 2 | # linux/drivers/nand/Makefile |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-$(CONFIG_MTD_NAND) += nand.o nand_ecc.o | 5 | obj-$(CONFIG_MTD_NAND) += nand.o |
6 | obj-$(CONFIG_MTD_NAND_ECC) += nand_ecc.o | ||
6 | obj-$(CONFIG_MTD_NAND_IDS) += nand_ids.o | 7 | obj-$(CONFIG_MTD_NAND_IDS) += nand_ids.o |
7 | obj-$(CONFIG_MTD_SM_COMMON) += sm_common.o | 8 | obj-$(CONFIG_MTD_SM_COMMON) += sm_common.o |
8 | 9 | ||