blob: ef2514f553d3b3a3e22c8cabfe85fb0d1543fdc8 [file] [log] [blame]
Aneesh Ve6b42eb2012-08-17 14:05:15 +05301/*
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
12#ifndef __LINUX_MEMORY_OF_REG_H
13#define __LINUX_MEMORY_OF_REG_H
14
Stephen Warren7c304d72012-09-05 12:29:23 -060015#if defined(CONFIG_OF) && defined(CONFIG_DDR)
Aneesh Ve6b42eb2012-08-17 14:05:15 +053016extern const struct lpddr2_min_tck *of_get_min_tck(struct device_node *np,
17 struct device *dev);
18extern const struct lpddr2_timings
19 *of_get_ddr_timings(struct device_node *np_ddr, struct device *dev,
20 u32 device_type, u32 *nr_frequencies);
21#else
22static inline const struct lpddr2_min_tck
23 *of_get_min_tck(struct device_node *np, struct device *dev)
24{
25 return NULL;
26}
27
28static inline const struct lpddr2_timings
29 *of_get_ddr_timings(struct device_node *np_ddr, struct device *dev,
30 u32 device_type, u32 *nr_frequencies)
31{
32 return NULL;
33}
Stephen Warren7c304d72012-09-05 12:29:23 -060034#endif /* CONFIG_OF && CONFIG_DDR */
Aneesh Ve6b42eb2012-08-17 14:05:15 +053035
36#endif /* __LINUX_MEMORY_OF_REG_ */