blob: e39ecc4c733d11657c3987fe7fafa52976da98ae [file] [log] [blame]
Thomas Gleixner2874c5f2019-05-27 08:55:01 +02001/* SPDX-License-Identifier: GPL-2.0-or-later */
Aneesh Ve6b42eb2012-08-17 14:05:15 +05302/*
3 * OpenFirmware helpers for memory drivers
4 *
5 * Copyright (C) 2012 Texas Instruments, Inc.
Aneesh Ve6b42eb2012-08-17 14:05:15 +05306 */
7
8#ifndef __LINUX_MEMORY_OF_REG_H
9#define __LINUX_MEMORY_OF_REG_H
10
Stephen Warren7c304d72012-09-05 12:29:23 -060011#if defined(CONFIG_OF) && defined(CONFIG_DDR)
Aneesh Ve6b42eb2012-08-17 14:05:15 +053012extern const struct lpddr2_min_tck *of_get_min_tck(struct device_node *np,
13 struct device *dev);
14extern const struct lpddr2_timings
15 *of_get_ddr_timings(struct device_node *np_ddr, struct device *dev,
16 u32 device_type, u32 *nr_frequencies);
Lukasz Luba976897d2019-08-21 12:42:58 +020017extern const struct lpddr3_min_tck
18 *of_lpddr3_get_min_tck(struct device_node *np, struct device *dev);
19extern const struct lpddr3_timings
20 *of_lpddr3_get_ddr_timings(struct device_node *np_ddr,
21 struct device *dev, u32 device_type, u32 *nr_frequencies);
Aneesh Ve6b42eb2012-08-17 14:05:15 +053022#else
23static inline const struct lpddr2_min_tck
24 *of_get_min_tck(struct device_node *np, struct device *dev)
25{
26 return NULL;
27}
28
29static inline const struct lpddr2_timings
30 *of_get_ddr_timings(struct device_node *np_ddr, struct device *dev,
31 u32 device_type, u32 *nr_frequencies)
32{
33 return NULL;
34}
Lukasz Luba976897d2019-08-21 12:42:58 +020035
36static inline const struct lpddr3_min_tck
37 *of_lpddr3_get_min_tck(struct device_node *np, struct device *dev)
38{
39 return NULL;
40}
41
42static inline const struct lpddr3_timings
43 *of_lpddr3_get_ddr_timings(struct device_node *np_ddr,
44 struct device *dev, u32 device_type, u32 *nr_frequencies)
45{
46 return NULL;
47}
Stephen Warren7c304d72012-09-05 12:29:23 -060048#endif /* CONFIG_OF && CONFIG_DDR */
Aneesh Ve6b42eb2012-08-17 14:05:15 +053049
50#endif /* __LINUX_MEMORY_OF_REG_ */