Commit | Line | Data |
---|---|---|
e6b42eb6 A |
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 | ||
12 | #ifndef __LINUX_MEMORY_OF_REG_H | |
13 | #define __LINUX_MEMORY_OF_REG_H | |
14 | ||
7c304d7e | 15 | #if defined(CONFIG_OF) && defined(CONFIG_DDR) |
e6b42eb6 A |
16 | extern const struct lpddr2_min_tck *of_get_min_tck(struct device_node *np, |
17 | struct device *dev); | |
18 | extern 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 | |
22 | static inline const struct lpddr2_min_tck | |
23 | *of_get_min_tck(struct device_node *np, struct device *dev) | |
24 | { | |
25 | return NULL; | |
26 | } | |
27 | ||
28 | static 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 | } | |
7c304d7e | 34 | #endif /* CONFIG_OF && CONFIG_DDR */ |
e6b42eb6 A |
35 | |
36 | #endif /* __LINUX_MEMORY_OF_REG_ */ |