summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/speed-imx27.c
diff options
context:
space:
mode:
authorAlexander Shiyan <shc_work@mail.ru>2012-06-07 17:00:50 +0400
committerSascha Hauer <s.hauer@pengutronix.de>2012-06-30 12:46:55 +0200
commit9ec34264f01cfe87d10efa74872e8116bdc6012a (patch)
treed734425625ca0aab4908ec261ec7428e24b7c408 /arch/arm/mach-imx/speed-imx27.c
parent3e2ed9423f9adfedb02189c91858654b4c502382 (diff)
downloadbarebox-9ec34264f01cfe87d10efa74872e8116bdc6012a.tar.gz
barebox-9ec34264f01cfe87d10efa74872e8116bdc6012a.tar.xz
i.MX clko: Added support for more than one CLKO outputs
Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-imx/speed-imx27.c')
-rw-r--r--arch/arm/mach-imx/speed-imx27.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/arm/mach-imx/speed-imx27.c b/arch/arm/mach-imx/speed-imx27.c
index aba50976f6..644fd0462a 100644
--- a/arch/arm/mach-imx/speed-imx27.c
+++ b/arch/arm/mach-imx/speed-imx27.c
@@ -16,6 +16,7 @@
*/
#include <common.h>
+#include <asm-generic/errno.h>
#include <mach/imx-regs.h>
#include <mach/generic.h>
#include <mach/clock.h>
@@ -189,9 +190,13 @@ void imx_dump_clocks(void)
* the new divider (which may be smaller
* than the desired one)
*/
-int imx_clko_set_div(int div)
+int imx_clko_set_div(int num, int div)
{
ulong pcdr;
+
+ if (num != 1)
+ return -ENODEV;
+
div--;
div &= 0x7;
@@ -205,10 +210,13 @@ int imx_clko_set_div(int div)
/*
* Set the clock source for the CLKO pin
*/
-void imx_clko_set_src(int src)
+void imx_clko_set_src(int num, int src)
{
unsigned long ccsr;
+ if (num != 1)
+ return;
+
if (src < 0) {
PCDR0 &= ~(1 << 25);
return;