blob: 19943dfdd4ca6300d24445efff5a74cf7fb5e52a [file] [log] [blame]
Michal Simek4b066a12018-08-22 14:55:27 +02001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * (C) Copyright 2016 - 2018 Xilinx, Inc.
Michal Simeka8c94362023-07-10 14:35:49 +02004 * Michal Simek <michal.simek@amd.com>
Michal Simek4b066a12018-08-22 14:55:27 +02005 */
6
Simon Glass97589732020-05-10 11:40:02 -06007#include <init.h>
Simon Glassa9dc0682019-12-28 10:44:59 -07008#include <time.h>
Simon Glass3ba929a2020-10-30 21:38:53 -06009#include <asm/global_data.h>
Michal Simek4b066a12018-08-22 14:55:27 +020010
11DECLARE_GLOBAL_DATA_PTR;
12
13#ifdef CONFIG_CLOCKS
14/**
15 * set_cpu_clk_info - Initialize clock framework
16 *
17 * Return: 0 always.
18 *
19 * This function is called from common code after relocation and sets up the
20 * clock framework. The framework must not be used before this function had been
21 * called.
22 */
23int set_cpu_clk_info(void)
24{
25 gd->cpu_clk = get_tbclk();
26
27 gd->bd->bi_arm_freq = gd->cpu_clk / 1000000;
28 gd->bd->bi_dsp_freq = 0;
29
30 return 0;
31}
32#endif