Matt Wagantall | 33d01f5 | 2012-02-23 23:27:44 -0800 | [diff] [blame] | 1 | /* |
Syed Rameez Mustafa | 3971c14 | 2013-01-09 19:04:53 -0800 | [diff] [blame] | 2 | * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. |
Brian Swetland | 600f7cf | 2008-09-09 11:04:14 -0700 | [diff] [blame] | 3 | * |
| 4 | * This software is licensed under the terms of the GNU General Public |
| 5 | * License version 2, as published by the Free Software Foundation, and |
| 6 | * may be copied, distributed, and modified under those terms. |
| 7 | * |
| 8 | * This program is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. |
| 12 | * |
| 13 | */ |
| 14 | |
| 15 | #ifndef __ARCH_ARM_MACH_MSM_CLOCK_H |
| 16 | #define __ARCH_ARM_MACH_MSM_CLOCK_H |
| 17 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 18 | #include <linux/clkdev.h> |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 19 | |
Stephen Boyd | bb600ae | 2011-08-02 20:11:40 -0700 | [diff] [blame] | 20 | /** |
| 21 | * struct clock_init_data - SoC specific clock initialization data |
| 22 | * @table: table of lookups to add |
| 23 | * @size: size of @table |
Matt Wagantall | b64888f | 2012-04-02 21:35:07 -0700 | [diff] [blame] | 24 | * @pre_init: called before initializing the clock driver. |
| 25 | * @post_init: called after registering @table. clock APIs can be called inside. |
Stephen Boyd | bb600ae | 2011-08-02 20:11:40 -0700 | [diff] [blame] | 26 | * @late_init: called during late init |
| 27 | */ |
| 28 | struct clock_init_data { |
Vikram Mulukutla | 4785ab6 | 2012-12-10 20:51:22 -0800 | [diff] [blame] | 29 | struct list_head list; |
Stephen Boyd | bb600ae | 2011-08-02 20:11:40 -0700 | [diff] [blame] | 30 | struct clk_lookup *table; |
| 31 | size_t size; |
Matt Wagantall | b64888f | 2012-04-02 21:35:07 -0700 | [diff] [blame] | 32 | void (*pre_init)(void); |
| 33 | void (*post_init)(void); |
Stephen Boyd | bb600ae | 2011-08-02 20:11:40 -0700 | [diff] [blame] | 34 | int (*late_init)(void); |
| 35 | }; |
| 36 | |
Vikram Mulukutla | 489e39e | 2011-08-31 18:04:05 -0700 | [diff] [blame] | 37 | extern struct clock_init_data msm9615_clock_init_data; |
Tianyi Gou | 389ba43 | 2012-10-01 13:58:38 -0700 | [diff] [blame] | 38 | extern struct clock_init_data msm9625_clock_init_data; |
Tianyi Gou | 41515e2 | 2011-09-01 19:37:43 -0700 | [diff] [blame] | 39 | extern struct clock_init_data apq8064_clock_init_data; |
Stephen Boyd | bb600ae | 2011-08-02 20:11:40 -0700 | [diff] [blame] | 40 | extern struct clock_init_data fsm9xxx_clock_init_data; |
| 41 | extern struct clock_init_data msm7x01a_clock_init_data; |
| 42 | extern struct clock_init_data msm7x27_clock_init_data; |
| 43 | extern struct clock_init_data msm7x27a_clock_init_data; |
| 44 | extern struct clock_init_data msm7x30_clock_init_data; |
| 45 | extern struct clock_init_data msm8960_clock_init_data; |
Stephen Boyd | bb600ae | 2011-08-02 20:11:40 -0700 | [diff] [blame] | 46 | extern struct clock_init_data msm8x60_clock_init_data; |
| 47 | extern struct clock_init_data qds8x50_clock_init_data; |
Taniya Das | 7c9f051 | 2011-12-02 14:26:46 +0530 | [diff] [blame] | 48 | extern struct clock_init_data msm8625_dummy_clock_init_data; |
Tianyi Gou | e3d4f54 | 2012-03-15 17:06:45 -0700 | [diff] [blame] | 49 | extern struct clock_init_data msm8930_clock_init_data; |
Patrick Daly | 1a3859f | 2012-08-27 16:10:26 -0700 | [diff] [blame] | 50 | extern struct clock_init_data msm8930_pm8917_clock_init_data; |
Abhimanyu Kapur | 90ced6e | 2012-06-26 17:41:25 -0700 | [diff] [blame] | 51 | extern struct clock_init_data msm8974_clock_init_data; |
Vikram Mulukutla | 19245e0 | 2012-07-23 15:58:04 -0700 | [diff] [blame] | 52 | extern struct clock_init_data msm8974_rumi_clock_init_data; |
Syed Rameez Mustafa | 3971c14 | 2013-01-09 19:04:53 -0800 | [diff] [blame] | 53 | extern struct clock_init_data msm8610_clock_init_data; |
| 54 | extern struct clock_init_data msm8610_rumi_clock_init_data; |
Patrick Daly | eb370ea | 2012-10-23 11:57:50 -0700 | [diff] [blame] | 55 | extern struct clock_init_data msm8226_clock_init_data; |
| 56 | extern struct clock_init_data msm8226_rumi_clock_init_data; |
Tianyi Gou | 30e19b8 | 2013-05-06 20:53:24 -0700 | [diff] [blame] | 57 | extern struct clock_init_data msm8084_clock_init_data; |
Taniya Das | 890bc7d | 2013-05-15 15:44:27 +0530 | [diff] [blame] | 58 | extern struct clock_init_data mpq8092_clock_init_data; |
Patrick Daly | 565b65a | 2013-06-07 16:09:12 -0700 | [diff] [blame] | 59 | extern struct clock_init_data msmkrypton_clock_init_data; |
Stephen Boyd | bb600ae | 2011-08-02 20:11:40 -0700 | [diff] [blame] | 60 | |
Matt Wagantall | 665f0cf | 2012-02-27 15:54:43 -0800 | [diff] [blame] | 61 | int msm_clock_init(struct clock_init_data *data); |
Patrick Daly | 0a78a0e | 2012-07-23 13:18:59 -0700 | [diff] [blame] | 62 | int find_vdd_level(struct clk *clk, unsigned long rate); |
Brian Swetland | 600f7cf | 2008-09-09 11:04:14 -0700 | [diff] [blame] | 63 | |
Matt Wagantall | d64560fe | 2011-01-26 16:20:54 -0800 | [diff] [blame] | 64 | #ifdef CONFIG_DEBUG_FS |
Matt Wagantall | 665f0cf | 2012-02-27 15:54:43 -0800 | [diff] [blame] | 65 | int clock_debug_register(struct clk_lookup *t, size_t s); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 66 | void clock_debug_print_enabled(void); |
Matt Wagantall | d64560fe | 2011-01-26 16:20:54 -0800 | [diff] [blame] | 67 | #else |
Matt Wagantall | 665f0cf | 2012-02-27 15:54:43 -0800 | [diff] [blame] | 68 | static inline int clock_debug_register(struct clk_lookup *t, size_t s) |
| 69 | { |
| 70 | return 0; |
| 71 | } |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 72 | static inline void clock_debug_print_enabled(void) { return; } |
Matt Wagantall | d64560fe | 2011-01-26 16:20:54 -0800 | [diff] [blame] | 73 | #endif |
| 74 | |
Brian Swetland | 600f7cf | 2008-09-09 11:04:14 -0700 | [diff] [blame] | 75 | #endif |