summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2009-01-07 17:07:48 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2009-01-13 14:30:56 +0100
commit1a3c1d3de1b5d92ed430b01855fe30d01f092e83 (patch)
treef536e07663e3c87725d366e89684ec0c1e741b24 /arch
parentf96f2d8e01a7c859622cac0883b104e431d6ab06 (diff)
downloadbarebox-1a3c1d3de1b5d92ed430b01855fe30d01f092e83.tar.gz
barebox-1a3c1d3de1b5d92ed430b01855fe30d01f092e83.tar.xz
i.MX: introduce imx_get_uartclk function
We need this function for MX35 support since the uart clock is not equal to perclk1 anymore. Uh, it's really time to implement some real clock API instead of this cruft. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-imx/speed-imx1.c5
-rw-r--r--arch/arm/mach-imx/speed-imx27.c5
-rw-r--r--arch/arm/mach-imx/speed-imx31.c5
3 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/speed-imx1.c b/arch/arm/mach-imx/speed-imx1.c
index de593a9e3b..22f953b8a9 100644
--- a/arch/arm/mach-imx/speed-imx1.c
+++ b/arch/arm/mach-imx/speed-imx1.c
@@ -69,6 +69,11 @@ ulong imx_get_perclk3(void)
return imx_get_spllclk() / (((PCDR>>16) & 0x7f)+1);
}
+ulong imx_get_uartclk(void)
+{
+ return imx_get_perclk1(void);
+}
+
#if 0
typedef enum imx_cookies {
PARAM_CPUCLK,
diff --git a/arch/arm/mach-imx/speed-imx27.c b/arch/arm/mach-imx/speed-imx27.c
index 06c69b597d..94d00e5ceb 100644
--- a/arch/arm/mach-imx/speed-imx27.c
+++ b/arch/arm/mach-imx/speed-imx27.c
@@ -134,6 +134,11 @@ ulong imx_get_perclk4(void)
return imx_decode_perclk(((PCDR1 >> 24) & 0x3f) + 1);
}
+ulong imx_get_uartclk(void)
+{
+ return imx_get_perclk1();
+}
+
int imx_dump_clocks(void)
{
uint32_t cid = CID;
diff --git a/arch/arm/mach-imx/speed-imx31.c b/arch/arm/mach-imx/speed-imx31.c
index ae39392730..a626692d3e 100644
--- a/arch/arm/mach-imx/speed-imx31.c
+++ b/arch/arm/mach-imx/speed-imx31.c
@@ -60,4 +60,9 @@ int imx_dump_clocks(void)
return 0;
}
+ulong imx_get_uartclk(void)
+{
+ return imx_get_perclk1();
+}
+
late_initcall(imx_dump_clocks);