diff options
author | Tom Rini <trini@konsulko.com> | 2024-07-01 13:17:56 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-07-01 15:00:56 -0600 |
commit | 65fbdab27224ee3943a89496b21862db83c34da2 (patch) | |
tree | 775a0a54066c2e9a6bbba201676e3d896b5cb0e2 /arch/arm/mach-versal2/clk.c | |
parent | 3f772959501c99fbe5aa0b22a36efe3478d1ae1c (diff) | |
parent | b4cbd1a257d4027038b4f997d73bdb0a066db045 (diff) |
Merge branch 'next'
Diffstat (limited to 'arch/arm/mach-versal2/clk.c')
-rw-r--r-- | arch/arm/mach-versal2/clk.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/arch/arm/mach-versal2/clk.c b/arch/arm/mach-versal2/clk.c new file mode 100644 index 00000000000..e73ae9af076 --- /dev/null +++ b/arch/arm/mach-versal2/clk.c @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2016 - 2022, Xilinx, Inc. + * Copyright (C) 2022 - 2024, Advanced Micro Devices, Inc. + * + * Michal Simek <michal.simek@amd.com> + */ + +#include <init.h> +#include <time.h> +#include <asm/global_data.h> + +DECLARE_GLOBAL_DATA_PTR; + +#ifdef CONFIG_CLOCKS +/** + * set_cpu_clk_info - Initialize clock framework + * + * Return: 0 always. + * + * This function is called from common code after relocation and sets up the + * clock framework. The framework must not be used before this function had been + * called. + */ +int set_cpu_clk_info(void) +{ + gd->cpu_clk = get_tbclk(); + + gd->bd->bi_arm_freq = gd->cpu_clk / 1000000; + gd->bd->bi_dsp_freq = 0; + + return 0; +} +#endif |