blob: e73ae9af0761ee4326bba4d69df05e14eb9a2e64 [file] [log] [blame]
Michal Simekd903ce42024-05-29 16:47:58 +02001// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 2016 - 2022, Xilinx, Inc.
4 * Copyright (C) 2022 - 2024, Advanced Micro Devices, Inc.
5 *
6 * Michal Simek <michal.simek@amd.com>
7 */
8
9#include <init.h>
10#include <time.h>
11#include <asm/global_data.h>
12
13DECLARE_GLOBAL_DATA_PTR;
14
15#ifdef CONFIG_CLOCKS
16/**
17 * set_cpu_clk_info - Initialize clock framework
18 *
19 * Return: 0 always.
20 *
21 * This function is called from common code after relocation and sets up the
22 * clock framework. The framework must not be used before this function had been
23 * called.
24 */
25int set_cpu_clk_info(void)
26{
27 gd->cpu_clk = get_tbclk();
28
29 gd->bd->bi_arm_freq = gd->cpu_clk / 1000000;
30 gd->bd->bi_dsp_freq = 0;
31
32 return 0;
33}
34#endif