of_memory.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * OpenFirmware helpers for memory drivers
  3. *
  4. * Copyright (C) 2012 Texas Instruments, Inc.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. */
  11. #ifndef __LINUX_MEMORY_OF_REG_H
  12. #define __LINUX_MEMORY_OF_REG_H
  13. #if defined(CONFIG_OF) && defined(CONFIG_DDR)
  14. extern const struct lpddr2_min_tck *of_get_min_tck(struct device_node *np,
  15. struct device *dev);
  16. extern const struct lpddr2_timings
  17. *of_get_ddr_timings(struct device_node *np_ddr, struct device *dev,
  18. u32 device_type, u32 *nr_frequencies);
  19. #else
  20. static inline const struct lpddr2_min_tck
  21. *of_get_min_tck(struct device_node *np, struct device *dev)
  22. {
  23. return NULL;
  24. }
  25. static inline const struct lpddr2_timings
  26. *of_get_ddr_timings(struct device_node *np_ddr, struct device *dev,
  27. u32 device_type, u32 *nr_frequencies)
  28. {
  29. return NULL;
  30. }
  31. #endif /* CONFIG_OF && CONFIG_DDR */
  32. #endif /* __LINUX_MEMORY_OF_REG_ */