forked from mirrors/linux
		
	clk: meson: remove superseded aoclk_gate_regmap
aoclk_gate_regmap has been replaced by meson's clk_regmap. It is no longer necessary so, remove it Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
This commit is contained in:
		
							parent
							
								
									81c7fcac9b
								
							
						
					
					
						commit
						1f932d9971
					
				
					 2 changed files with 0 additions and 56 deletions
				
			
		| 
						 | 
					@ -1,46 +0,0 @@
 | 
				
			||||||
/*
 | 
					 | 
				
			||||||
 * Copyright (c) 2017 BayLibre, SAS.
 | 
					 | 
				
			||||||
 * Author: Neil Armstrong <narmstrong@baylibre.com>
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * SPDX-License-Identifier: GPL-2.0+
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include <linux/clk-provider.h>
 | 
					 | 
				
			||||||
#include <linux/bitfield.h>
 | 
					 | 
				
			||||||
#include <linux/regmap.h>
 | 
					 | 
				
			||||||
#include "gxbb-aoclk.h"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static int aoclk_gate_regmap_enable(struct clk_hw *hw)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	struct aoclk_gate_regmap *gate = to_aoclk_gate_regmap(hw);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return regmap_update_bits(gate->regmap, AO_RTI_GEN_CNTL_REG0,
 | 
					 | 
				
			||||||
				  BIT(gate->bit_idx), BIT(gate->bit_idx));
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static void aoclk_gate_regmap_disable(struct clk_hw *hw)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	struct aoclk_gate_regmap *gate = to_aoclk_gate_regmap(hw);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	regmap_update_bits(gate->regmap, AO_RTI_GEN_CNTL_REG0,
 | 
					 | 
				
			||||||
			   BIT(gate->bit_idx), 0);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static int aoclk_gate_regmap_is_enabled(struct clk_hw *hw)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	struct aoclk_gate_regmap *gate = to_aoclk_gate_regmap(hw);
 | 
					 | 
				
			||||||
	unsigned int val;
 | 
					 | 
				
			||||||
	int ret;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	ret = regmap_read(gate->regmap, AO_RTI_GEN_CNTL_REG0, &val);
 | 
					 | 
				
			||||||
	if (ret)
 | 
					 | 
				
			||||||
		return ret;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return (val & BIT(gate->bit_idx)) != 0;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
const struct clk_ops meson_aoclk_gate_regmap_ops = {
 | 
					 | 
				
			||||||
	.enable = aoclk_gate_regmap_enable,
 | 
					 | 
				
			||||||
	.disable = aoclk_gate_regmap_disable,
 | 
					 | 
				
			||||||
	.is_enabled = aoclk_gate_regmap_is_enabled,
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
| 
						 | 
					@ -17,16 +17,6 @@
 | 
				
			||||||
#define AO_RTC_ALT_CLK_CNTL0	0x94
 | 
					#define AO_RTC_ALT_CLK_CNTL0	0x94
 | 
				
			||||||
#define AO_RTC_ALT_CLK_CNTL1	0x98
 | 
					#define AO_RTC_ALT_CLK_CNTL1	0x98
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct aoclk_gate_regmap {
 | 
					 | 
				
			||||||
	struct clk_hw hw;
 | 
					 | 
				
			||||||
	unsigned bit_idx;
 | 
					 | 
				
			||||||
	struct regmap *regmap;
 | 
					 | 
				
			||||||
	spinlock_t *lock;
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#define to_aoclk_gate_regmap(_hw) \
 | 
					 | 
				
			||||||
	container_of(_hw, struct aoclk_gate_regmap, hw)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
extern const struct clk_ops meson_aoclk_gate_regmap_ops;
 | 
					extern const struct clk_ops meson_aoclk_gate_regmap_ops;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct aoclk_cec_32k {
 | 
					struct aoclk_cec_32k {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue