2008-01-15 19:37:34 +00:00
|
|
|
/*
|
|
|
|
*
|
|
|
|
* (C) Copyright 2000-2003
|
|
|
|
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2004-2007 Freescale Semiconductor, Inc.
|
|
|
|
* TsiChung Liew (Tsi-Chung.Liew@freescale.com)
|
|
|
|
*
|
2013-07-08 07:37:19 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0+
|
2008-01-15 19:37:34 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
|
|
|
#include <asm/processor.h>
|
|
|
|
|
|
|
|
#include <asm/immap.h>
|
|
|
|
|
2010-12-21 01:27:51 +00:00
|
|
|
DECLARE_GLOBAL_DATA_PTR;
|
|
|
|
|
2008-01-15 19:37:34 +00:00
|
|
|
/*
|
|
|
|
* get_clocks() fills in gd->cpu_clock and gd->bus_clk
|
|
|
|
*/
|
|
|
|
int get_clocks(void)
|
|
|
|
{
|
2008-10-16 13:01:15 +00:00
|
|
|
gd->bus_clk = CONFIG_SYS_CLK;
|
2008-01-15 19:37:34 +00:00
|
|
|
gd->cpu_clk = (gd->bus_clk * 2);
|
2008-08-18 21:01:19 +00:00
|
|
|
|
2012-10-24 11:48:22 +00:00
|
|
|
#ifdef CONFIG_SYS_I2C_FSL
|
2012-12-13 20:48:49 +00:00
|
|
|
gd->arch.i2c1_clk = gd->bus_clk;
|
2008-08-18 21:01:19 +00:00
|
|
|
#endif
|
|
|
|
|
2008-01-15 19:37:34 +00:00
|
|
|
return (0);
|
|
|
|
}
|