2008-09-09 12:04:14 -06:00
|
|
|
/* arch/arm/mach-msm/clock.h
|
|
|
|
*
|
|
|
|
* Copyright (C) 2007 Google, Inc.
|
2013-06-17 11:43:19 -06:00
|
|
|
* Copyright (c) 2007-2012, The Linux Foundation. All rights reserved.
|
2008-09-09 12:04:14 -06:00
|
|
|
*
|
|
|
|
* This software is licensed under the terms of the GNU General Public
|
|
|
|
* License version 2, as published by the Free Software Foundation, and
|
|
|
|
* may be copied, distributed, and modified under those terms.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ARCH_ARM_MACH_MSM_CLOCK_H
|
|
|
|
#define __ARCH_ARM_MACH_MSM_CLOCK_H
|
|
|
|
|
2013-06-17 11:43:19 -06:00
|
|
|
#include <linux/clk-provider.h>
|
2010-05-12 14:43:28 -06:00
|
|
|
#include <mach/clk.h>
|
|
|
|
|
2008-09-09 12:04:14 -06:00
|
|
|
#define CLK_FIRST_AVAILABLE_FLAG 0x00000100
|
2010-05-12 14:43:28 -06:00
|
|
|
#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)
|
2008-09-09 12:04:14 -06:00
|
|
|
|
2013-06-17 11:43:19 -06:00
|
|
|
struct msm_clk {
|
|
|
|
int (*reset)(struct clk_hw *hw, enum clk_reset_action action);
|
|
|
|
struct clk_hw hw;
|
|
|
|
};
|
2011-01-26 17:20:54 -07:00
|
|
|
|
2013-06-17 11:43:19 -06:00
|
|
|
static inline struct msm_clk *to_msm_clk(struct clk_hw *hw)
|
|
|
|
{
|
|
|
|
return container_of(hw, struct msm_clk, hw);
|
|
|
|
}
|
2013-06-17 11:43:18 -06:00
|
|
|
|
2008-09-09 12:04:14 -06:00
|
|
|
#endif
|