blob: 935651664969f876c9d7091ff836cd3e7f30f5fd [file] [log] [blame]
Russell Kinga09e64f2008-08-05 16:14:15 +01001/* arch/arm/mach-s3c2410/include/mach/nand.h
Linus Torvalds1da177e2005-04-16 15:20:36 -07002 *
Ben Dooksf0560762006-12-17 19:59:20 +01003 * Copyright (c) 2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
Linus Torvalds1da177e2005-04-16 15:20:36 -07005 *
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 Torvalds1da177e2005-04-16 15:20:36 -070011*/
12
Michel Polleta4536b12009-05-13 16:54:13 +010013/**
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 Torvalds1da177e2005-04-16 15:20:36 -070021 *
Michel Polleta4536b12009-05-13 16:54:13 +010022 * 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 Torvalds1da177e2005-04-16 15:20:36 -070026struct s3c2410_nand_set {
Nelson Castillofb6ea322009-05-10 15:41:32 -050027 unsigned int disable_ecc:1;
Ben Dooks37e5ffa2008-04-15 11:36:22 +010028
Linus Torvalds1da177e2005-04-16 15:20:36 -070029 int nr_chips;
30 int nr_partitions;
31 char *name;
32 int *nr_map;
33 struct mtd_partition *partitions;
Ben Dooks1c21ab62008-04-15 11:36:21 +010034 struct nand_ecclayout *ecc_layout;
Linus Torvalds1da177e2005-04-16 15:20:36 -070035};
36
37struct 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 Castillofb6ea322009-05-10 15:41:32 -050044 unsigned int ignore_unset_ecc:1;
Ben Dooksc45c6c62008-04-15 11:36:20 +010045
Linus Torvalds1da177e2005-04-16 15:20:36 -070046 int nr_sets;
47 struct s3c2410_nand_set *sets;
48
49 void (*select_chip)(struct s3c2410_nand_set *,
50 int chip);
51};
52