Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 1 | /* arch/arm/mach-s3c2410/include/mach/nand.h |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | * |
Ben Dooks | f056076 | 2006-12-17 19:59:20 +0100 | [diff] [blame] | 3 | * Copyright (c) 2004 Simtec Electronics |
| 4 | * Ben Dooks <ben@simtec.co.uk> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5 | * |
| 6 | * S3C2410 - NAND device controller platfrom_device info |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License version 2 as |
| 10 | * published by the Free Software Foundation. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 11 | */ |
| 12 | |
Michel Pollet | a4536b1 | 2009-05-13 16:54:13 +0100 | [diff] [blame^] | 13 | /** |
| 14 | * struct s3c2410_nand_set - define a set of one or more nand chips |
| 15 | * @disable_ecc: Entirely disable ECC - Dangerous |
| 16 | * @nr_chips: Number of chips in this set |
| 17 | * @nr_partitions: Number of partitions pointed to by @partitions |
| 18 | * @name: Name of set (optional) |
| 19 | * @nr_map: Map for low-layer logical to physical chip numbers (option) |
| 20 | * @partitions: The mtd partition list |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 | * |
Michel Pollet | a4536b1 | 2009-05-13 16:54:13 +0100 | [diff] [blame^] | 22 | * define a set of one or more nand chips registered with an unique mtd. Also |
| 23 | * allows to pass flag to the underlying NAND layer. 'disable_ecc' will trigger |
| 24 | * a warning at boot time. |
| 25 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 26 | struct s3c2410_nand_set { |
Nelson Castillo | fb6ea32 | 2009-05-10 15:41:32 -0500 | [diff] [blame] | 27 | unsigned int disable_ecc:1; |
Ben Dooks | 37e5ffa | 2008-04-15 11:36:22 +0100 | [diff] [blame] | 28 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 29 | int nr_chips; |
| 30 | int nr_partitions; |
| 31 | char *name; |
| 32 | int *nr_map; |
| 33 | struct mtd_partition *partitions; |
Ben Dooks | 1c21ab6 | 2008-04-15 11:36:21 +0100 | [diff] [blame] | 34 | struct nand_ecclayout *ecc_layout; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 35 | }; |
| 36 | |
| 37 | struct s3c2410_platform_nand { |
| 38 | /* timing information for controller, all times in nanoseconds */ |
| 39 | |
| 40 | int tacls; /* time for active CLE/ALE to nWE/nOE */ |
| 41 | int twrph0; /* active time for nWE/nOE */ |
| 42 | int twrph1; /* time for release CLE/ALE from nWE/nOE inactive */ |
| 43 | |
Nelson Castillo | fb6ea32 | 2009-05-10 15:41:32 -0500 | [diff] [blame] | 44 | unsigned int ignore_unset_ecc:1; |
Ben Dooks | c45c6c6 | 2008-04-15 11:36:20 +0100 | [diff] [blame] | 45 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 46 | int nr_sets; |
| 47 | struct s3c2410_nand_set *sets; |
| 48 | |
| 49 | void (*select_chip)(struct s3c2410_nand_set *, |
| 50 | int chip); |
| 51 | }; |
| 52 | |