nand_defs.h 781 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Copyright (C) 2007 Sergey Kubushyn <ksi@koi8.net>
  3. *
  4. * Parts shamelesly stolen from Linux Kernel source tree.
  5. *
  6. * ------------------------------------------------------------
  7. *
  8. * SPDX-License-Identifier: GPL-2.0+
  9. */
  10. #ifndef _NAND_DEFS_H_
  11. #define _NAND_DEFS_H_
  12. #include <asm/arch/hardware.h>
  13. #ifdef CONFIG_SOC_DM646X
  14. #define MASK_CLE 0x80000
  15. #define MASK_ALE 0x40000
  16. #else
  17. #define MASK_CLE 0x10
  18. #define MASK_ALE 0x08
  19. #endif
  20. #ifdef CONFIG_SYS_NAND_MASK_CLE
  21. #undef MASK_CLE
  22. #define MASK_CLE CONFIG_SYS_NAND_MASK_CLE
  23. #endif
  24. #ifdef CONFIG_SYS_NAND_MASK_ALE
  25. #undef MASK_ALE
  26. #define MASK_ALE CONFIG_SYS_NAND_MASK_ALE
  27. #endif
  28. #define NAND_READ_START 0x00
  29. #define NAND_READ_END 0x30
  30. #define NAND_STATUS 0x70
  31. extern void davinci_nand_init(struct nand_chip *nand);
  32. #endif