92fe58f07f
This patch converts tegra clock code to generic clock framework in following way: - Implement clk_ops as required by generic clk framework. (tegraXX_clocks.c) - Use platform specific struct clk_tegra in clk_ops implementation instead of struct clk. - Initialize all clock data statically. (tegraXX_clocks_data.c) Legacy framework did not have recalc_rate and is_enabled functions. Implemented these functions. Removed init function. It's functionality is splitted into recalc_rate and is_enabled. Static initialization is used since slab is not up in .init_early and clock is needed to be initialized before clockevent/clocksource initialization. Macros redefined for clk_tegra. Also, single struct clk_tegra is used for all type of clocks (PLL, peripheral etc.). This is to move quickly to generic common clock framework so that other dependent features will not be blocked (such as DT binding). Enabling COMMON_CLOCK config moved to ARCH_TEGRA since it is enabled for both Tegra20 and Tegra30. Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com> Signed-off-by: Stephen Warren <swarren@nvidia.com>
42 lines
1.5 KiB
C
42 lines
1.5 KiB
C
/*
|
|
* Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
* under the terms and conditions of the GNU General Public License,
|
|
* version 2, as published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope 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.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef __MACH_TEGRA20_CLOCK_H
|
|
#define __MACH_TEGRA20_CLOCK_H
|
|
|
|
extern struct clk_ops tegra_clk_32k_ops;
|
|
extern struct clk_ops tegra_pll_ops;
|
|
extern struct clk_ops tegra_clk_m_ops;
|
|
extern struct clk_ops tegra_pll_div_ops;
|
|
extern struct clk_ops tegra_pllx_ops;
|
|
extern struct clk_ops tegra_plle_ops;
|
|
extern struct clk_ops tegra_clk_double_ops;
|
|
extern struct clk_ops tegra_cdev_clk_ops;
|
|
extern struct clk_ops tegra_audio_sync_clk_ops;
|
|
extern struct clk_ops tegra_super_ops;
|
|
extern struct clk_ops tegra_cpu_ops;
|
|
extern struct clk_ops tegra_cop_ops;
|
|
extern struct clk_ops tegra_bus_ops;
|
|
extern struct clk_ops tegra_blink_clk_ops;
|
|
extern struct clk_ops tegra_emc_clk_ops;
|
|
extern struct clk_ops tegra_periph_clk_ops;
|
|
extern struct clk_ops tegra_clk_shared_bus_ops;
|
|
|
|
void tegra2_periph_clk_reset(struct clk_hw *hw, bool assert);
|
|
void tegra2_cop_clk_reset(struct clk_hw *hw, bool assert);
|
|
|
|
#endif
|