treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / drivers / memory / of_memory.h
blobe39ecc4c733d11657c3987fe7fafa52976da98ae
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3 * OpenFirmware helpers for memory drivers
5 * Copyright (C) 2012 Texas Instruments, Inc.
6 */
8 #ifndef __LINUX_MEMORY_OF_REG_H
9 #define __LINUX_MEMORY_OF_REG_H
11 #if defined(CONFIG_OF) && defined(CONFIG_DDR)
12 extern const struct lpddr2_min_tck *of_get_min_tck(struct device_node *np,
13 struct device *dev);
14 extern const struct lpddr2_timings
15 *of_get_ddr_timings(struct device_node *np_ddr, struct device *dev,
16 u32 device_type, u32 *nr_frequencies);
17 extern const struct lpddr3_min_tck
18 *of_lpddr3_get_min_tck(struct device_node *np, struct device *dev);
19 extern 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);
22 #else
23 static inline const struct lpddr2_min_tck
24 *of_get_min_tck(struct device_node *np, struct device *dev)
26 return NULL;
29 static 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)
33 return NULL;
36 static inline const struct lpddr3_min_tck
37 *of_lpddr3_get_min_tck(struct device_node *np, struct device *dev)
39 return NULL;
42 static 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)
46 return NULL;
48 #endif /* CONFIG_OF && CONFIG_DDR */
50 #endif /* __LINUX_MEMORY_OF_REG_ */