fsl_upm.h 862 B

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