Thomas Gleixner | 2874c5f | 2019-05-27 08:55:01 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
Aneesh V | e6b42eb | 2012-08-17 14:05:15 +0530 | [diff] [blame] | 2 | /* |
| 3 | * OpenFirmware helpers for memory drivers |
| 4 | * |
| 5 | * Copyright (C) 2012 Texas Instruments, Inc. |
Aneesh V | e6b42eb | 2012-08-17 14:05:15 +0530 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | #ifndef __LINUX_MEMORY_OF_REG_H |
| 9 | #define __LINUX_MEMORY_OF_REG_H |
| 10 | |
Stephen Warren | 7c304d7 | 2012-09-05 12:29:23 -0600 | [diff] [blame] | 11 | #if defined(CONFIG_OF) && defined(CONFIG_DDR) |
Aneesh V | e6b42eb | 2012-08-17 14:05:15 +0530 | [diff] [blame] | 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 | #else |
| 18 | static inline const struct lpddr2_min_tck |
| 19 | *of_get_min_tck(struct device_node *np, struct device *dev) |
| 20 | { |
| 21 | return NULL; |
| 22 | } |
| 23 | |
| 24 | static inline const struct lpddr2_timings |
| 25 | *of_get_ddr_timings(struct device_node *np_ddr, struct device *dev, |
| 26 | u32 device_type, u32 *nr_frequencies) |
| 27 | { |
| 28 | return NULL; |
| 29 | } |
Stephen Warren | 7c304d7 | 2012-09-05 12:29:23 -0600 | [diff] [blame] | 30 | #endif /* CONFIG_OF && CONFIG_DDR */ |
Aneesh V | e6b42eb | 2012-08-17 14:05:15 +0530 | [diff] [blame] | 31 | |
| 32 | #endif /* __LINUX_MEMORY_OF_REG_ */ |