1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * OpenFirmware helpers for memory drivers
5 * Copyright (C) 2012 Texas Instruments, Inc.
6 * Copyright (C) 2020 Krzysztof Kozlowski <krzk@kernel.org>
9 #ifndef __LINUX_MEMORY_OF_REG_H
10 #define __LINUX_MEMORY_OF_REG_H
12 #if defined(CONFIG_OF) && defined(CONFIG_DDR)
13 const struct lpddr2_min_tck
*of_get_min_tck(struct device_node
*np
,
15 const struct lpddr2_timings
*of_get_ddr_timings(struct device_node
*np_ddr
,
17 u32 device_type
, u32
*nr_frequencies
);
18 const struct lpddr3_min_tck
*of_lpddr3_get_min_tck(struct device_node
*np
,
20 const struct lpddr3_timings
*
21 of_lpddr3_get_ddr_timings(struct device_node
*np_ddr
,
22 struct device
*dev
, u32 device_type
, u32
*nr_frequencies
);
24 const struct lpddr2_info
*of_lpddr2_get_info(struct device_node
*np
,
27 static inline const struct lpddr2_min_tck
28 *of_get_min_tck(struct device_node
*np
, struct device
*dev
)
33 static inline const struct lpddr2_timings
34 *of_get_ddr_timings(struct device_node
*np_ddr
, struct device
*dev
,
35 u32 device_type
, u32
*nr_frequencies
)
40 static inline const struct lpddr3_min_tck
41 *of_lpddr3_get_min_tck(struct device_node
*np
, struct device
*dev
)
46 static inline const struct lpddr3_timings
47 *of_lpddr3_get_ddr_timings(struct device_node
*np_ddr
,
48 struct device
*dev
, u32 device_type
, u32
*nr_frequencies
)
53 static inline const struct lpddr2_info
54 *of_lpddr2_get_info(struct device_node
*np
, struct device
*dev
)
58 #endif /* CONFIG_OF && CONFIG_DDR */
60 #endif /* __LINUX_MEMORY_OF_REG_ */