blob: 9184714e4756d0705f3477676d7a7a00b675d3d9 [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.
4 * Michal Simek <michal.simek@xilinx.com>
5 */
6
7#include <common.h>
Simon Glassa9dc0682019-12-28 10:44:59 -07008#include <time.h>
Michal Simek4b066a12018-08-22 14:55:27 +02009
10DECLARE_GLOBAL_DATA_PTR;
11
12#ifdef CONFIG_CLOCKS
13/**
14 * set_cpu_clk_info - Initialize clock framework
15 *
16 * Return: 0 always.
17 *
18 * This function is called from common code after relocation and sets up the
19 * clock framework. The framework must not be used before this function had been
20 * called.
21 */
22int set_cpu_clk_info(void)
23{
24 gd->cpu_clk = get_tbclk();
25
26 gd->bd->bi_arm_freq = gd->cpu_clk / 1000000;
27 gd->bd->bi_dsp_freq = 0;
28
29 return 0;
30}
31#endif