linux/drivers/clk/sophgo/clk-cv18xx-common.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright (C) 2023 Inochi Amaoto <[email protected]>
 */

#ifndef _CLK_SOPHGO_CV18XX_IP_H_
#define _CLK_SOPHGO_CV18XX_IP_H_

#include <linux/compiler.h>
#include <linux/clk-provider.h>
#include <linux/bitfield.h>

struct cv1800_clk_common {};

#define CV1800_CLK_COMMON(_name, _parents, _op, _flags)

static inline struct cv1800_clk_common *
hw_to_cv1800_clk_common(struct clk_hw *hw)
{}

struct cv1800_clk_regbit {};

struct cv1800_clk_regfield {};

#define CV1800_CLK_BIT(_reg, _shift)

#define CV1800_CLK_REG(_reg, _shift, _width, _initval, _flags)

#define cv1800_clk_regfield_genmask(_reg)
#define cv1800_clk_regfield_get(_val, _reg)
#define cv1800_clk_regfield_set(_val, _new, _reg)

#define _CV1800_SET_FIELD(_reg, _val, _field)

int cv1800_clk_setbit(struct cv1800_clk_common *common,
		      struct cv1800_clk_regbit *field);
int cv1800_clk_clearbit(struct cv1800_clk_common *common,
			struct cv1800_clk_regbit *field);
int cv1800_clk_checkbit(struct cv1800_clk_common *common,
			struct cv1800_clk_regbit *field);

void cv1800_clk_wait_for_lock(struct cv1800_clk_common *common,
			      u32 reg, u32 lock);

#endif // _CLK_SOPHGO_CV18XX_IP_H_