aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap1/clock.c
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2010-07-26 18:34:28 -0400
committerPaul Walmsley <paul@pwsan.com>2010-07-26 18:34:28 -0400
commitfb2fc9204f8ce060d239ab41f09cf6fc6de5ad4b (patch)
tree925c6e8ce2ea6bb997cf71238c06e5f51bfe8ceb /arch/arm/mach-omap1/clock.c
parent936305a96ce1611093ad7a5591a62f9d7142be7c (diff)
OMAP1: clock: some cleanup
Convert most of the magic numbers in mach-omap1/clock_data.c to use macros. Clean up a few comments to conform with Documentation/CodingStyle. Mark the current clkops_uart as being OMAP16xx-only, and add some comments to indicate that it does not belong there, for future cleanup. This patch should not cause any functional changes. Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/mach-omap1/clock.c')
-rw-r--r--arch/arm/mach-omap1/clock.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c
index 6bbb1b8b8294..b8c7fb9d7921 100644
--- a/arch/arm/mach-omap1/clock.c
+++ b/arch/arm/mach-omap1/clock.c
@@ -11,7 +11,6 @@
11 * it under the terms of the GNU General Public License version 2 as 11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation. 12 * published by the Free Software Foundation.
13 */ 13 */
14#include <linux/module.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/list.h> 15#include <linux/list.h>
17#include <linux/errno.h> 16#include <linux/errno.h>
@@ -34,9 +33,9 @@
34__u32 arm_idlect1_mask; 33__u32 arm_idlect1_mask;
35struct clk *api_ck_p, *ck_dpll1_p, *ck_ref_p; 34struct clk *api_ck_p, *ck_dpll1_p, *ck_ref_p;
36 35
37/*------------------------------------------------------------------------- 36/*
38 * Omap1 specific clock functions 37 * Omap1 specific clock functions
39 *-------------------------------------------------------------------------*/ 38 */
40 39
41unsigned long omap1_uart_recalc(struct clk *clk) 40unsigned long omap1_uart_recalc(struct clk *clk)
42{ 41{
@@ -523,7 +522,8 @@ const struct clkops clkops_dspck = {
523 .disable = omap1_clk_disable_dsp_domain, 522 .disable = omap1_clk_disable_dsp_domain,
524}; 523};
525 524
526static int omap1_clk_enable_uart_functional(struct clk *clk) 525/* XXX SYSC register handling does not belong in the clock framework */
526static int omap1_clk_enable_uart_functional_16xx(struct clk *clk)
527{ 527{
528 int ret; 528 int ret;
529 struct uart_clk *uclk; 529 struct uart_clk *uclk;
@@ -539,7 +539,8 @@ static int omap1_clk_enable_uart_functional(struct clk *clk)
539 return ret; 539 return ret;
540} 540}
541 541
542static void omap1_clk_disable_uart_functional(struct clk *clk) 542/* XXX SYSC register handling does not belong in the clock framework */
543static void omap1_clk_disable_uart_functional_16xx(struct clk *clk)
543{ 544{
544 struct uart_clk *uclk; 545 struct uart_clk *uclk;
545 546
@@ -550,9 +551,10 @@ static void omap1_clk_disable_uart_functional(struct clk *clk)
550 omap1_clk_disable_generic(clk); 551 omap1_clk_disable_generic(clk);
551} 552}
552 553
553const struct clkops clkops_uart = { 554/* XXX SYSC register handling does not belong in the clock framework */
554 .enable = omap1_clk_enable_uart_functional, 555const struct clkops clkops_uart_16xx = {
555 .disable = omap1_clk_disable_uart_functional, 556 .enable = omap1_clk_enable_uart_functional_16xx,
557 .disable = omap1_clk_disable_uart_functional_16xx,
556}; 558};
557 559
558long omap1_clk_round_rate(struct clk *clk, unsigned long rate) 560long omap1_clk_round_rate(struct clk *clk, unsigned long rate)
@@ -572,9 +574,9 @@ int omap1_clk_set_rate(struct clk *clk, unsigned long rate)
572 return ret; 574 return ret;
573} 575}
574 576
575/*------------------------------------------------------------------------- 577/*
576 * Omap1 clock reset and init functions 578 * Omap1 clock reset and init functions
577 *-------------------------------------------------------------------------*/ 579 */
578 580
579#ifdef CONFIG_OMAP_RESET_CLOCKS 581#ifdef CONFIG_OMAP_RESET_CLOCKS
580 582