fsl_upm.h 862 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * FSL UPM NAND driver
  3. *
  4. * Copyright (C) 2007 MontaVista Software, Inc.
  5. * Anton Vorontsov <avorontsov@ru.mvista.com>
  6. *
  7. * SPDX-License-Identifier: GPL-2.0+
  8. */
  9. #ifndef __LINUX_MTD_NAND_FSL_UPM
  10. #define __LINUX_MTD_NAND_FSL_UPM
  11. #include <linux/mtd/rawnand.h>
  12. #define FSL_UPM_WAIT_RUN_PATTERN 0x1
  13. #define FSL_UPM_WAIT_WRITE_BYTE 0x2
  14. #define FSL_UPM_WAIT_WRITE_BUFFER 0x4
  15. struct fsl_upm {
  16. void __iomem *mdr;
  17. void __iomem *mxmr;
  18. void __iomem *mar;
  19. void __iomem *io_addr;
  20. };
  21. struct fsl_upm_nand {
  22. struct fsl_upm upm;
  23. int width;
  24. int upm_cmd_offset;
  25. int upm_addr_offset;
  26. int upm_mar_chip_offset;
  27. int wait_flags;
  28. int (*dev_ready)(int chip_nr);
  29. int chip_delay;
  30. int chip_offset;
  31. int chip_nr;
  32. /* no need to fill */
  33. int last_ctrl;
  34. };
  35. extern int fsl_upm_nand_init(struct nand_chip *chip, struct fsl_upm_nand *fun);
  36. #endif