SPDX: Convert all of our single license tags to Linux Kernel style
[platform/kernel/u-boot.git] / arch / m68k / cpu / mcf547x_8x / speed.c
1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3  *
4  * (C) Copyright 2000-2003
5  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
6  *
7  * Copyright (C) 2004-2007 Freescale Semiconductor, Inc.
8  * TsiChung Liew (Tsi-Chung.Liew@freescale.com)
9  */
10
11 #include <common.h>
12 #include <asm/processor.h>
13
14 #include <asm/immap.h>
15
16 DECLARE_GLOBAL_DATA_PTR;
17
18 /*
19  * get_clocks() fills in gd->cpu_clock and gd->bus_clk
20  */
21 int get_clocks(void)
22 {
23         gd->bus_clk = CONFIG_SYS_CLK;
24         gd->cpu_clk = (gd->bus_clk * 2);
25
26 #ifdef CONFIG_SYS_I2C_FSL
27         gd->arch.i2c1_clk = gd->bus_clk;
28 #endif
29
30         return (0);
31 }