mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-13 04:26:40 +07:00
8cc7f5338e
Move the existing clock code in mach-msm to the common clock framework. We lose our capability to set the rate of and enable a clock through debugfs. This is ok though because the debugfs features are mainly used for testing and development of new clock code. To maintain compatibility with the original MSM clock code we make a wrapper for clk_reset() that calls the struct msm_clk specific reset function. This is necessary for the usb and sdcc devices on MSM until a better suited API is made available. Cc: Saravana Kannan <skannan@codeaurora.org> Acked-by: Mike Turquette <mturquette@linaro.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: David Brown <davidb@codeaurora.org>
44 lines
1.2 KiB
C
44 lines
1.2 KiB
C
/* arch/arm/mach-msm/clock.h
|
|
*
|
|
* Copyright (C) 2007 Google, Inc.
|
|
* 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
|
|
* 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
|
|
|
|
#include <linux/clk-provider.h>
|
|
#include <mach/clk.h>
|
|
|
|
#define CLK_FIRST_AVAILABLE_FLAG 0x00000100
|
|
#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;
|
|
};
|
|
|
|
static inline struct msm_clk *to_msm_clk(struct clk_hw *hw)
|
|
{
|
|
return container_of(hw, struct msm_clk, hw);
|
|
}
|
|
|
|
#endif
|