aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-msm/clock.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-msm/clock.h')
-rw-r--r--arch/arm/mach-msm/clock.h43
1 files changed, 19 insertions, 24 deletions
diff --git a/arch/arm/mach-msm/clock.h b/arch/arm/mach-msm/clock.h
index f875e1544e5..42d29dd7aaf 100644
--- a/arch/arm/mach-msm/clock.h
+++ b/arch/arm/mach-msm/clock.h
@@ -1,7 +1,7 @@
/* arch/arm/mach-msm/clock.h
*
* Copyright (C) 2007 Google, Inc.
- * Copyright (c) 2007 QUALCOMM Incorporated
+ * Copyright (c) 2007-2012, The Linux Foundation. All rights reserved.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
@@ -17,32 +17,27 @@
#ifndef __ARCH_ARM_MACH_MSM_CLOCK_H
#define __ARCH_ARM_MACH_MSM_CLOCK_H
-#include <linux/list.h>
-
-#define CLKFLAG_INVERT 0x00000001
-#define CLKFLAG_NOINVERT 0x00000002
-#define CLKFLAG_NONEST 0x00000004
-#define CLKFLAG_NORESET 0x00000008
+#include <linux/clk-provider.h>
+#include <mach/clk.h>
#define CLK_FIRST_AVAILABLE_FLAG 0x00000100
-#define CLKFLAG_USE_MIN_MAX_TO_SET 0x00000200
-#define CLKFLAG_AUTO_OFF 0x00000400
-
-struct clk {
- uint32_t id;
- uint32_t count;
- uint32_t flags;
- const char *name;
- struct list_head list;
- struct device *dev;
+#define CLKFLAG_AUTO_OFF 0x00000200
+#define CLKFLAG_MIN 0x00000400
+#define CLKFLAG_MAX 0x00000800
+
+#define OFF CLKFLAG_AUTO_OFF
+#define CLK_MIN CLKFLAG_MIN
+#define CLK_MAX CLKFLAG_MAX
+#define CLK_MINMAX (CLK_MIN | CLK_MAX)
+
+struct msm_clk {
+ int (*reset)(struct clk_hw *hw, enum clk_reset_action action);
+ struct clk_hw hw;
};
-#define A11S_CLK_CNTL_ADDR (MSM_CSR_BASE + 0x100)
-#define A11S_CLK_SEL_ADDR (MSM_CSR_BASE + 0x104)
-#define A11S_VDD_SVS_PLEVEL_ADDR (MSM_CSR_BASE + 0x124)
-
-extern struct clk msm_clocks[];
-extern unsigned msm_num_clocks;
+static inline struct msm_clk *to_msm_clk(struct clk_hw *hw)
+{
+ return container_of(hw, struct msm_clk, hw);
+}
#endif
-