| Matt Wagantall | d55b90f | 2012-02-23 23:27:44 -0800 | [diff] [blame] | 1 | /* | 
| Duy Truong | e833aca | 2013-02-12 13:35:08 -0800 | [diff] [blame] | 2 | * Copyright (c) 2012, 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 { | 
|  | 29 | struct clk_lookup *table; | 
|  | 30 | size_t size; | 
| Matt Wagantall | b64888f | 2012-04-02 21:35:07 -0700 | [diff] [blame] | 31 | void (*pre_init)(void); | 
|  | 32 | void (*post_init)(void); | 
| Stephen Boyd | bb600ae | 2011-08-02 20:11:40 -0700 | [diff] [blame] | 33 | int (*late_init)(void); | 
|  | 34 | }; | 
|  | 35 |  | 
| Vikram Mulukutla | 489e39e | 2011-08-31 18:04:05 -0700 | [diff] [blame] | 36 | extern struct clock_init_data msm9615_clock_init_data; | 
| Tianyi Gou | 41515e2 | 2011-09-01 19:37:43 -0700 | [diff] [blame] | 37 | extern struct clock_init_data apq8064_clock_init_data; | 
| Stephen Boyd | bb600ae | 2011-08-02 20:11:40 -0700 | [diff] [blame] | 38 | extern struct clock_init_data fsm9xxx_clock_init_data; | 
|  | 39 | extern struct clock_init_data msm7x01a_clock_init_data; | 
|  | 40 | extern struct clock_init_data msm7x27_clock_init_data; | 
|  | 41 | extern struct clock_init_data msm7x27a_clock_init_data; | 
|  | 42 | extern struct clock_init_data msm7x30_clock_init_data; | 
|  | 43 | extern struct clock_init_data msm8960_clock_init_data; | 
| Stephen Boyd | bb600ae | 2011-08-02 20:11:40 -0700 | [diff] [blame] | 44 | extern struct clock_init_data msm8x60_clock_init_data; | 
|  | 45 | extern struct clock_init_data qds8x50_clock_init_data; | 
| Taniya Das | 7c9f051 | 2011-12-02 14:26:46 +0530 | [diff] [blame] | 46 | extern struct clock_init_data msm8625_dummy_clock_init_data; | 
| Tianyi Gou | e3d4f54 | 2012-03-15 17:06:45 -0700 | [diff] [blame] | 47 | extern struct clock_init_data msm8930_clock_init_data; | 
| Patrick Daly | c9f51b9 | 2012-08-27 16:10:26 -0700 | [diff] [blame] | 48 | extern struct clock_init_data msm8930_pm8917_clock_init_data; | 
| Abhimanyu Kapur | 90ced6e | 2012-06-26 17:41:25 -0700 | [diff] [blame] | 49 | extern struct clock_init_data msm8974_clock_init_data; | 
| Vikram Mulukutla | 19245e0 | 2012-07-23 15:58:04 -0700 | [diff] [blame] | 50 | extern struct clock_init_data msm8974_rumi_clock_init_data; | 
| Stephen Boyd | bb600ae | 2011-08-02 20:11:40 -0700 | [diff] [blame] | 51 |  | 
| Matt Wagantall | c776419 | 2012-02-27 15:54:43 -0800 | [diff] [blame] | 52 | int msm_clock_init(struct clock_init_data *data); | 
| Patrick Daly | 0a78a0e | 2012-07-23 13:18:59 -0700 | [diff] [blame] | 53 | int find_vdd_level(struct clk *clk, unsigned long rate); | 
| Brian Swetland | 600f7cf | 2008-09-09 11:04:14 -0700 | [diff] [blame] | 54 |  | 
| Matt Wagantall | d64560fe | 2011-01-26 16:20:54 -0800 | [diff] [blame] | 55 | #ifdef CONFIG_DEBUG_FS | 
| Matt Wagantall | c776419 | 2012-02-27 15:54:43 -0800 | [diff] [blame] | 56 | int clock_debug_init(void); | 
|  | 57 | int clock_debug_register(struct clk_lookup *t, size_t s); | 
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 58 | void clock_debug_print_enabled(void); | 
| Matt Wagantall | d64560fe | 2011-01-26 16:20:54 -0800 | [diff] [blame] | 59 | #else | 
| Matt Wagantall | c776419 | 2012-02-27 15:54:43 -0800 | [diff] [blame] | 60 | static inline int clock_debug_init(void) { return 0; } | 
|  | 61 | static inline int clock_debug_register(struct clk_lookup *t, size_t s) | 
|  | 62 | { | 
|  | 63 | return 0; | 
|  | 64 | } | 
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 65 | static inline void clock_debug_print_enabled(void) { return; } | 
| Matt Wagantall | d64560fe | 2011-01-26 16:20:54 -0800 | [diff] [blame] | 66 | #endif | 
|  | 67 |  | 
| Brian Swetland | 600f7cf | 2008-09-09 11:04:14 -0700 | [diff] [blame] | 68 | #endif |