2 * linux/arch/arm/mach-omap/clock.h
4 * Copyright (C) 2004 Nokia corporation
5 * Written by Tuukka Tikkanen <tuukka.tikkanen@elektrobit.com>
6 * Based on clocks.h by Tony Lindgren, Gordon McNutt and RidgeRun, Inc
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
13 #ifndef __ARCH_ARM_OMAP_CLOCK_H
14 #define __ARCH_ARM_OMAP_CLOCK_H
19 struct list_head node;
29 void (*recalc)(struct clk *);
30 int (*set_rate)(unsigned long);
31 long (*round_rate)(unsigned long);
38 unsigned long pll_rate;
47 #define RATE_PROPAGATES 4
48 #define VIRTUAL_CLOCK 8
49 #define ALWAYS_ENABLED 16
50 #define ENABLE_REG_32BIT 32
51 #define CLOCK_IN_OMAP16XX 64
52 #define CLOCK_IN_OMAP1510 128
54 /* ARM_CKCTL bit shifts */
55 #define CKCTL_PERDIV_OFFSET 0
56 #define CKCTL_LCDDIV_OFFSET 2
57 #define CKCTL_ARMDIV_OFFSET 4
58 #define CKCTL_DSPDIV_OFFSET 6
59 #define CKCTL_TCDIV_OFFSET 8
60 #define CKCTL_DSPMMUDIV_OFFSET 10
61 /*#define ARM_TIMXO 12*/
63 /*#define ARM_INTHCK_SEL 14*/ /* Divide-by-2 for mpu inth_ck */
65 /* ARM_IDLECT1 bit shifts */
66 /*#define IDLWDT_ARM 0*/
67 /*#define IDLXORP_ARM 1*/
68 /*#define IDLPER_ARM 2*/
69 /*#define IDLLCD_ARM 3*/
70 /*#define IDLLB_ARM 4*/
71 /*#define IDLHSAB_ARM 5*/
72 /*#define IDLIF_ARM 6*/
73 /*#define IDLDPLL_ARM 7*/
74 /*#define IDLAPI_ARM 8*/
75 /*#define IDLTIM_ARM 9*/
76 /*#define SETARM_IDLE 11*/
78 /* ARM_IDLECT2 bit shifts */
83 #define EN_LBCK 4 /* Not on 1610/1710 */
84 /*#define EN_HSABCK 5*/
88 #define EN_GPIOCK 9 /* Not on 1610/1710 */
89 /*#define EN_LBFREECK 10*/
90 #define EN_CKOUT_ARM 11
92 /* ARM_IDLECT3 bit shifts */
97 /* Various register defines for clock controls scattered around OMAP chip */
98 #define USB_MCLK_EN 4 /* In ULPD_CLKC_CTRL */
99 #define USB_HOST_HHC_UHOST_EN 9 /* In MOD_CONF_CTRL_0 */
102 int clk_register(struct clk *clk);
103 void clk_unregister(struct clk *clk);