blob: 5ba6426c454787002051ec8357cda295ca06761c [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
TsiChungLiew8999e6b2008-01-15 13:37:34 -06002/*
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)
TsiChungLiew8999e6b2008-01-15 13:37:34 -06009 */
10
11#include <common.h>
12#include <asm/processor.h>
13
14#include <asm/immap.h>
15
John Rigby0d21ed02010-12-20 18:27:51 -070016DECLARE_GLOBAL_DATA_PTR;
17
TsiChungLiew8999e6b2008-01-15 13:37:34 -060018/*
19 * get_clocks() fills in gd->cpu_clock and gd->bus_clk
20 */
21int get_clocks(void)
22{
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020023 gd->bus_clk = CONFIG_SYS_CLK;
TsiChungLiew8999e6b2008-01-15 13:37:34 -060024 gd->cpu_clk = (gd->bus_clk * 2);
TsiChung Liew0c1e3252008-08-19 03:01:19 +060025
Heiko Schocherf2850742012-10-24 13:48:22 +020026#ifdef CONFIG_SYS_I2C_FSL
Simon Glassc2baaec2012-12-13 20:48:49 +000027 gd->arch.i2c1_clk = gd->bus_clk;
TsiChung Liew0c1e3252008-08-19 03:01:19 +060028#endif
29
TsiChungLiew8999e6b2008-01-15 13:37:34 -060030 return (0);
31}