![]() |
|
|||
0001 /* SPDX-License-Identifier: GPL-2.0-only */ 0002 /* 0003 * Copyright (c) 2004 Simtec Electronics 0004 * Ben Dooks <ben@simtec.co.uk> 0005 * 0006 * S3C2410 - NAND device controller platform_device info 0007 */ 0008 0009 #ifndef __MTD_NAND_S3C2410_H 0010 #define __MTD_NAND_S3C2410_H 0011 0012 #include <linux/mtd/rawnand.h> 0013 0014 /** 0015 * struct s3c2410_nand_set - define a set of one or more nand chips 0016 * @flash_bbt: Openmoko u-boot can create a Bad Block Table 0017 * Setting this flag will allow the kernel to 0018 * look for it at boot time and also skip the NAND 0019 * scan. 0020 * @options: Default value to set into 'struct nand_chip' options. 0021 * @nr_chips: Number of chips in this set 0022 * @nr_partitions: Number of partitions pointed to by @partitions 0023 * @name: Name of set (optional) 0024 * @nr_map: Map for low-layer logical to physical chip numbers (option) 0025 * @partitions: The mtd partition list 0026 * 0027 * define a set of one or more nand chips registered with an unique mtd. Also 0028 * allows to pass flag to the underlying NAND layer. 'disable_ecc' will trigger 0029 * a warning at boot time. 0030 */ 0031 struct s3c2410_nand_set { 0032 unsigned int flash_bbt:1; 0033 0034 unsigned int options; 0035 int nr_chips; 0036 int nr_partitions; 0037 char *name; 0038 int *nr_map; 0039 struct mtd_partition *partitions; 0040 struct device_node *of_node; 0041 }; 0042 0043 struct s3c2410_platform_nand { 0044 /* timing information for controller, all times in nanoseconds */ 0045 0046 int tacls; /* time for active CLE/ALE to nWE/nOE */ 0047 int twrph0; /* active time for nWE/nOE */ 0048 int twrph1; /* time for release CLE/ALE from nWE/nOE inactive */ 0049 0050 unsigned int ignore_unset_ecc:1; 0051 0052 enum nand_ecc_engine_type engine_type; 0053 0054 int nr_sets; 0055 struct s3c2410_nand_set *sets; 0056 0057 void (*select_chip)(struct s3c2410_nand_set *, 0058 int chip); 0059 }; 0060 0061 /** 0062 * s3c_nand_set_platdata() - register NAND platform data. 0063 * @nand: The NAND platform data to register with s3c_device_nand. 0064 * 0065 * This function copies the given NAND platform data, @nand and registers 0066 * it with the s3c_device_nand. This allows @nand to be __initdata. 0067 */ 0068 extern void s3c_nand_set_platdata(struct s3c2410_platform_nand *nand); 0069 0070 #endif /*__MTD_NAND_S3C2410_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |