nand.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /* arch/arm/mach-s3c2410/include/mach/nand.h
  2. *
  3. * Copyright (c) 2004 Simtec Electronics
  4. * Ben Dooks <ben@simtec.co.uk>
  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.
  11. */
  12. /**
  13. * struct s3c2410_nand_set - define a set of one or more nand chips
  14. * @disable_ecc: Entirely disable ECC - Dangerous
  15. * @flash_bbt: Openmoko u-boot can create a Bad Block Table
  16. * Setting this flag will allow the kernel to
  17. * look for it at boot time and also skip the NAND
  18. * scan.
  19. * @nr_chips: Number of chips in this set
  20. * @nr_partitions: Number of partitions pointed to by @partitions
  21. * @name: Name of set (optional)
  22. * @nr_map: Map for low-layer logical to physical chip numbers (option)
  23. * @partitions: The mtd partition list
  24. *
  25. * define a set of one or more nand chips registered with an unique mtd. Also
  26. * allows to pass flag to the underlying NAND layer. 'disable_ecc' will trigger
  27. * a warning at boot time.
  28. */
  29. struct s3c2410_nand_set {
  30. unsigned int disable_ecc:1;
  31. unsigned int flash_bbt:1;
  32. int nr_chips;
  33. int nr_partitions;
  34. char *name;
  35. int *nr_map;
  36. struct mtd_partition *partitions;
  37. struct nand_ecclayout *ecc_layout;
  38. };
  39. struct s3c2410_platform_nand {
  40. /* timing information for controller, all times in nanoseconds */
  41. int tacls; /* time for active CLE/ALE to nWE/nOE */
  42. int twrph0; /* active time for nWE/nOE */
  43. int twrph1; /* time for release CLE/ALE from nWE/nOE inactive */
  44. unsigned int ignore_unset_ecc:1;
  45. int nr_sets;
  46. struct s3c2410_nand_set *sets;
  47. void (*select_chip)(struct s3c2410_nand_set *,
  48. int chip);
  49. };