pxa3xx_nand.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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_cmdset {
  17. uint16_t read1;
  18. uint16_t read2;
  19. uint16_t program;
  20. uint16_t read_status;
  21. uint16_t read_id;
  22. uint16_t erase;
  23. uint16_t reset;
  24. uint16_t lock;
  25. uint16_t unlock;
  26. uint16_t lock_status;
  27. };
  28. struct pxa3xx_nand_flash {
  29. const struct pxa3xx_nand_timing *timing; /* NAND Flash timing */
  30. const struct pxa3xx_nand_cmdset *cmdset;
  31. uint32_t page_per_block;/* Pages per block (PG_PER_BLK) */
  32. uint32_t page_size; /* Page size in bytes (PAGE_SZ) */
  33. uint32_t flash_width; /* Width of Flash memory (DWIDTH_M) */
  34. uint32_t dfc_width; /* Width of flash controller(DWIDTH_C) */
  35. uint32_t num_blocks; /* Number of physical blocks in Flash */
  36. uint32_t chip_id;
  37. };
  38. struct pxa3xx_nand_platform_data {
  39. /* the data flash bus is shared between the Static Memory
  40. * Controller and the Data Flash Controller, the arbiter
  41. * controls the ownership of the bus
  42. */
  43. int enable_arbiter;
  44. /* allow platform code to keep OBM/bootloader defined NFC config */
  45. int keep_config;
  46. const struct mtd_partition *parts;
  47. unsigned int nr_parts;
  48. const struct pxa3xx_nand_flash * flash;
  49. size_t num_flash;
  50. };
  51. extern void pxa3xx_set_nand_info(struct pxa3xx_nand_platform_data *info);
  52. #endif /* __ASM_ARCH_PXA3XX_NAND_H */