pxa3xx_nand.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #ifndef __ASM_ARCH_PXA3XX_NAND_H
  2. #define __ASM_ARCH_PXA3XX_NAND_H
  3. #include <linux/mtd/mtd.h>
  4. #include <linux/mtd/partitions.h>
  5. struct pxa3xx_nand_timing {
  6. unsigned int tCH; /* Enable signal hold time */
  7. unsigned int tCS; /* Enable signal setup time */
  8. unsigned int tWH; /* ND_nWE high duration */
  9. unsigned int tWP; /* ND_nWE pulse time */
  10. unsigned int tRH; /* ND_nRE high duration */
  11. unsigned int tRP; /* ND_nRE pulse width */
  12. unsigned int tR; /* ND_nWE high to ND_nRE low for read */
  13. unsigned int tWHR; /* ND_nWE high to ND_nRE low for status read */
  14. unsigned int tAR; /* ND_ALE low to ND_nRE low delay */
  15. };
  16. struct pxa3xx_nand_flash {
  17. uint32_t chip_id;
  18. unsigned int flash_width; /* Width of Flash memory (DWIDTH_M) */
  19. unsigned int dfc_width; /* Width of flash controller(DWIDTH_C) */
  20. struct pxa3xx_nand_timing *timing; /* NAND Flash timing */
  21. };
  22. /*
  23. * Current pxa3xx_nand controller has two chip select which
  24. * both be workable.
  25. *
  26. * Notice should be taken that:
  27. * When you want to use this feature, you should not enable the
  28. * keep configuration feature, for two chip select could be
  29. * attached with different nand chip. The different page size
  30. * and timing requirement make the keep configuration impossible.
  31. */
  32. /* The max num of chip select current support */
  33. #define NUM_CHIP_SELECT (2)
  34. struct pxa3xx_nand_platform_data {
  35. /* the data flash bus is shared between the Static Memory
  36. * Controller and the Data Flash Controller, the arbiter
  37. * controls the ownership of the bus
  38. */
  39. int enable_arbiter;
  40. /* allow platform code to keep OBM/bootloader defined NFC config */
  41. int keep_config;
  42. /* indicate how many chip selects will be used */
  43. int num_cs;
  44. /* use an flash-based bad block table */
  45. bool flash_bbt;
  46. /* requested ECC strength and ECC step size */
  47. int ecc_strength, ecc_step_size;
  48. const struct mtd_partition *parts[NUM_CHIP_SELECT];
  49. unsigned int nr_parts[NUM_CHIP_SELECT];
  50. const struct pxa3xx_nand_flash *flash;
  51. size_t num_flash;
  52. };
  53. #endif /* __ASM_ARCH_PXA3XX_NAND_H */