summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/speed-imx21.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-imx21.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-imx21.c')
-rw-r--r--arch/arm/mach-imx/speed-imx21.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/arm/mach-imx/speed-imx21.c b/arch/arm/mach-imx/speed-imx21.c
index 6ab1dca3f3..4729583693 100644
--- a/arch/arm/mach-imx/speed-imx21.c
+++ b/arch/arm/mach-imx/speed-imx21.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>
@@ -162,9 +163,13 @@ void imx_dump_clocks(void)
* Returns 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;
@@ -178,11 +183,11 @@ 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 (src < 0) {
+ if (src < 0 || num != 1) {
return;
}