blob: 2bc4c44247f7618dc63cd4b49677aee6f6ef5707 [file] [log] [blame]
TsiChungLiew8999e6b2008-01-15 13:37:34 -06001/*
2 *
3 * (C) Copyright 2000-2003
4 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5 *
6 * Copyright (C) 2004-2007 Freescale Semiconductor, Inc.
7 * TsiChung Liew (Tsi-Chung.Liew@freescale.com)
8 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02009 * SPDX-License-Identifier: GPL-2.0+
TsiChungLiew8999e6b2008-01-15 13:37:34 -060010 */
11
12#include <common.h>
13#include <asm/processor.h>
14
15#include <asm/immap.h>
16
John Rigby0d21ed02010-12-20 18:27:51 -070017DECLARE_GLOBAL_DATA_PTR;
18
TsiChungLiew8999e6b2008-01-15 13:37:34 -060019/*
20 * get_clocks() fills in gd->cpu_clock and gd->bus_clk
21 */
22int get_clocks(void)
23{
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020024 gd->bus_clk = CONFIG_SYS_CLK;
TsiChungLiew8999e6b2008-01-15 13:37:34 -060025 gd->cpu_clk = (gd->bus_clk * 2);
TsiChung Liew0c1e3252008-08-19 03:01:19 +060026
Heiko Schocherf2850742012-10-24 13:48:22 +020027#ifdef CONFIG_SYS_I2C_FSL
Simon Glassc2baaec2012-12-13 20:48:49 +000028 gd->arch.i2c1_clk = gd->bus_clk;
TsiChung Liew0c1e3252008-08-19 03:01:19 +060029#endif
30
TsiChungLiew8999e6b2008-01-15 13:37:34 -060031 return (0);
32}