summaryrefslogtreecommitdiff
path: root/arch/arm/plat-mxc/clock.c
diff options
context:
space:
mode:
authorFrank Li <Frank.Li@freescale.com>2011-02-22 17:34:58 +0800
committerJason Liu <r64343@freescale.com>2012-01-09 19:53:48 +0800
commitf9a8a5549d5dbab830370f5aabce4549bb4847d0 (patch)
tree7b40ec7604521609976c1bab0ff5704b14468025 /arch/arm/plat-mxc/clock.c
parent23b9078bbe8f46b103fe831dcfb8858dbd587982 (diff)
ENGR00141217-3 MX53 MSL part upgrade to 2.6.38
imx51_babbage: imx53_smd: add i2c device imx53_smd: add i2c board device info imx53_smd: add esdhc device support imx53_smd: Add SRTC devices imx53_smd: enable the AHCI SATA imx53_smd: Add GPIO Keypad support imx53_ard: enable ARD board bootup imx53_ard: add ethernet pin mux imx53_ard: add smsc911x device imx53_loco: add i2c device imx53_loco: change sii902x i2c device imx53_loco: register v4l2 output device imx53_loco: add srtc device imx53_loco: enable the AHCI SATA imx53_loco: Add GPIO Keypad support imx53_evk: add evk and arm2 boards io setting and set up display imx5: add ipu\vpu imx5: clock.c: remove RATE_PROPAGATES imx5: Add clock, dvfs, busfreq, sdram_autogating support. imx5: fix warnings on boot imx5: add v4l2 device imx5: add board_is_rev support imx5: Add sdma support for i.Mx53 and i.Mx51 imx5: add p1003 imx5: add ipuv3 imx5: add sata imx5: add pmic board files imx5: add pm function imx5: add iram config imx5: add gpu imx5: fix clock debug enable_count error imx53: add gpio irq support for mx53 imx53: change PWM backlight device register method to dynamic imx53: change v4l2 device register method to dynamic imx53: add vpu devices support imx53: add dvfs-core and busfreq devices register method imx53: Add usb devices imx53: add i2c pad settings imx53: add ssi support Signed-off-by: Richard Zhao <richard.zhao@freescale.com> Signed-off-by: Frank Li <Frank.Li@freescale.com> Signed-off-by: Jason Chen <b02280@freescale.com> Signed-off-by: Zeng Zhaoming <b32542@freescale.com> Signed-off-by: Richard Zhu <r65037@freescale.com> Signed-off-by: Zhou Jingyu <Jingyu.Zhou@freescale.com> Signed-off-by: Zhang Yan <b34916@freescale.com>
Diffstat (limited to 'arch/arm/plat-mxc/clock.c')
-rwxr-xr-x[-rw-r--r--]arch/arm/plat-mxc/clock.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/arch/arm/plat-mxc/clock.c b/arch/arm/plat-mxc/clock.c
index 2ed3ab173add..2c9bfa13db96 100644..100755
--- a/arch/arm/plat-mxc/clock.c
+++ b/arch/arm/plat-mxc/clock.c
@@ -4,7 +4,7 @@
* Copyright (C) 2004 - 2005 Nokia corporation
* Written by Tuukka Tikkanen <tuukka.tikkanen@elektrobit.com>
* Modified for omap shared clock framework by Tony Lindgren <tony@atomide.com>
- * Copyright 2007 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright 2007-2011 Freescale Semiconductor, Inc. All Rights Reserved.
* Copyright 2008 Juergen Beisert, kernel@pengutronix.de
*
* This program is free software; you can redistribute it and/or
@@ -110,6 +110,25 @@ void clk_disable(struct clk *clk)
}
EXPORT_SYMBOL(clk_disable);
+/*!
+ * @brief Function to get the usage count for the requested clock.
+ *
+ * This function returns the reference count for the clock.
+ *
+ * @param clk Handle to clock to disable.
+ *
+ * @return Returns the usage count for the requested clock.
+ */
+int clk_get_usecount(struct clk *clk)
+{
+ if (clk == NULL || IS_ERR(clk))
+ return 0;
+
+ return clk->usecount;
+}
+
+EXPORT_SYMBOL(clk_get_usecount);
+
/* Retrieve the *current* clock rate. If the clock itself
* does not provide a special calculation routine, ask
* its parent and so on, until one is able to return