Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Chin Liang See | cb35060 | 2014-03-04 22:13:53 -0600 | [diff] [blame] | 2 | /* |
Ley Foon Tan | ec6f882 | 2017-04-26 02:44:33 +0800 | [diff] [blame] | 3 | * Copyright (C) 2013-2017 Altera Corporation <www.altera.com> |
Chin Liang See | cb35060 | 2014-03-04 22:13:53 -0600 | [diff] [blame] | 4 | */ |
| 5 | |
Ley Foon Tan | ec6f882 | 2017-04-26 02:44:33 +0800 | [diff] [blame] | 6 | #ifndef _CLOCK_MANAGER_H_ |
| 7 | #define _CLOCK_MANAGER_H_ |
Chin Liang See | cb35060 | 2014-03-04 22:13:53 -0600 | [diff] [blame] | 8 | |
Ley Foon Tan | 2669591 | 2019-11-08 10:38:21 +0800 | [diff] [blame] | 9 | phys_addr_t socfpga_get_clkmgr_addr(void); |
| 10 | |
Simon Glass | 559f1a8 | 2020-05-10 11:40:12 -0600 | [diff] [blame] | 11 | #ifndef __ASSEMBLY__ |
Ley Foon Tan | ec6f882 | 2017-04-26 02:44:33 +0800 | [diff] [blame] | 12 | void cm_wait_for_lock(u32 mask); |
| 13 | int cm_wait_for_fsm(void); |
| 14 | void cm_print_clock_quick_summary(void); |
Siew Chin Lim | fa2cc49 | 2021-03-24 17:16:49 +0800 | [diff] [blame] | 15 | unsigned int cm_get_qspi_controller_clk_hz(void); |
Siew Chin Lim | c1888b0 | 2021-03-24 17:16:50 +0800 | [diff] [blame] | 16 | |
| 17 | #if defined(CONFIG_TARGET_SOCFPGA_SOC64) |
| 18 | int cm_set_qspi_controller_clk_hz(u32 clk_hz); |
| 19 | #endif |
Pavel Machek | 7c8d5a6 | 2014-09-08 14:08:45 +0200 | [diff] [blame] | 20 | #endif |
| 21 | |
Ley Foon Tan | ec6f882 | 2017-04-26 02:44:33 +0800 | [diff] [blame] | 22 | #if defined(CONFIG_TARGET_SOCFPGA_GEN5) |
| 23 | #include <asm/arch/clock_manager_gen5.h> |
Ley Foon Tan | ca40f29 | 2017-04-26 02:44:39 +0800 | [diff] [blame] | 24 | #elif defined(CONFIG_TARGET_SOCFPGA_ARRIA10) |
| 25 | #include <asm/arch/clock_manager_arria10.h> |
Ley Foon Tan | 6751e7d | 2018-05-18 22:05:22 +0800 | [diff] [blame] | 26 | #elif defined(CONFIG_TARGET_SOCFPGA_STRATIX10) |
| 27 | #include <asm/arch/clock_manager_s10.h> |
Ley Foon Tan | b7d95b7 | 2019-11-27 15:55:23 +0800 | [diff] [blame] | 28 | #elif defined(CONFIG_TARGET_SOCFPGA_AGILEX) |
| 29 | #include <asm/arch/clock_manager_agilex.h> |
Ley Foon Tan | ec6f882 | 2017-04-26 02:44:33 +0800 | [diff] [blame] | 30 | #endif |
Ley Foon Tan | ca40f29 | 2017-04-26 02:44:39 +0800 | [diff] [blame] | 31 | |
Chin Liang See | cb35060 | 2014-03-04 22:13:53 -0600 | [diff] [blame] | 32 | #endif /* _CLOCK_MANAGER_H_ */ |