fsl_upm.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * FSL UPM NAND driver
  3. *
  4. * Copyright (C) 2007 MontaVista Software, Inc.
  5. * Anton Vorontsov <avorontsov@ru.mvista.com>
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation; either version 2 of
  10. * the License, or (at your option) any later version.
  11. */
  12. #ifndef __LINUX_MTD_NAND_FSL_UPM
  13. #define __LINUX_MTD_NAND_FSL_UPM
  14. #include <linux/mtd/nand.h>
  15. #define FSL_UPM_WAIT_RUN_PATTERN 0x1
  16. #define FSL_UPM_WAIT_WRITE_BYTE 0x2
  17. #define FSL_UPM_WAIT_WRITE_BUFFER 0x4
  18. struct fsl_upm {
  19. void __iomem *mdr;
  20. void __iomem *mxmr;
  21. void __iomem *mar;
  22. void __iomem *io_addr;
  23. };
  24. struct fsl_upm_nand {
  25. struct fsl_upm upm;
  26. int width;
  27. int upm_cmd_offset;
  28. int upm_addr_offset;
  29. int upm_mar_chip_offset;
  30. int wait_flags;
  31. int (*dev_ready)(int chip_nr);
  32. int chip_delay;
  33. int chip_offset;
  34. int chip_nr;
  35. /* no need to fill */
  36. int last_ctrl;
  37. };
  38. extern int fsl_upm_nand_init(struct nand_chip *chip, struct fsl_upm_nand *fun);
  39. #endif