hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/memory/of_memory.h
....@@ -1,23 +1,25 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * OpenFirmware helpers for memory drivers
34 *
45 * 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.
6
+ * Copyright (C) 2020 Krzysztof Kozlowski <krzk@kernel.org>
107 */
118
129 #ifndef __LINUX_MEMORY_OF_REG_H
1310 #define __LINUX_MEMORY_OF_REG_H
1411
1512 #if defined(CONFIG_OF) && defined(CONFIG_DDR)
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);
13
+const struct lpddr2_min_tck *of_get_min_tck(struct device_node *np,
14
+ struct device *dev);
15
+const struct lpddr2_timings *of_get_ddr_timings(struct device_node *np_ddr,
16
+ struct device *dev,
17
+ u32 device_type, u32 *nr_frequencies);
18
+const struct lpddr3_min_tck *of_lpddr3_get_min_tck(struct device_node *np,
19
+ struct device *dev);
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);
2123 #else
2224 static inline const struct lpddr2_min_tck
2325 *of_get_min_tck(struct device_node *np, struct device *dev)
....@@ -31,6 +33,19 @@
3133 {
3234 return NULL;
3335 }
36
+
37
+static inline const struct lpddr3_min_tck
38
+ *of_lpddr3_get_min_tck(struct device_node *np, struct device *dev)
39
+{
40
+ return NULL;
41
+}
42
+
43
+static inline const struct lpddr3_timings
44
+ *of_lpddr3_get_ddr_timings(struct device_node *np_ddr,
45
+ struct device *dev, u32 device_type, u32 *nr_frequencies)
46
+{
47
+ return NULL;
48
+}
3449 #endif /* CONFIG_OF && CONFIG_DDR */
3550
3651 #endif /* __LINUX_MEMORY_OF_REG_ */