linux/drivers/clk/qcom/clk-branch.h

/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (c) 2013, The Linux Foundation. All rights reserved. */

#ifndef __QCOM_CLK_BRANCH_H__
#define __QCOM_CLK_BRANCH_H__

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

#include "clk-regmap.h"

/**
 * struct clk_branch - gating clock with status bit and dynamic hardware gating
 *
 * @hwcg_reg: dynamic hardware clock gating register
 * @hwcg_bit: ORed with @hwcg_reg to enable dynamic hardware clock gating
 * @halt_reg: halt register
 * @halt_bit: ANDed with @halt_reg to test for clock halted
 * @halt_check: type of halt checking to perform
 * @clkr: handle between common and hardware-specific interfaces
 *
 * Clock which can gate its output.
 */
struct clk_branch {};

/**
 * struct clk_mem_branch - gating clock which are associated with memories
 *
 * @mem_enable_reg: branch clock memory gating register
 * @mem_ack_reg: branch clock memory ack register
 * @mem_enable_ack_mask: branch clock memory enable and ack field in @mem_ack_reg
 * @branch: branch clock gating handle
 *
 * Clock which can gate its memories.
 */
struct clk_mem_branch {};

/* Branch clock common bits for HLOS-owned clocks */
#define CBCR_CLK_OFF
#define CBCR_NOC_FSM_STATUS
 #define FSM_STATUS_ON
#define CBCR_FORCE_MEM_CORE_ON
#define CBCR_FORCE_MEM_PERIPH_ON
#define CBCR_FORCE_MEM_PERIPH_OFF
#define CBCR_WAKEUP
#define CBCR_SLEEP
#define CBCR_CLOCK_ENABLE

static inline void qcom_branch_set_force_mem_core(struct regmap *regmap,
						  struct clk_branch clk, bool on)
{}

static inline void qcom_branch_set_force_periph_on(struct regmap *regmap,
						   struct clk_branch clk, bool on)
{}

static inline void qcom_branch_set_force_periph_off(struct regmap *regmap,
						    struct clk_branch clk, bool on)
{}

static inline void qcom_branch_set_wakeup(struct regmap *regmap, struct clk_branch clk, u32 val)
{}

static inline void qcom_branch_set_sleep(struct regmap *regmap, struct clk_branch clk, u32 val)
{}

static inline void qcom_branch_set_clk_en(struct regmap *regmap, u32 cbcr)
{}

extern const struct clk_ops clk_branch_ops;
extern const struct clk_ops clk_branch2_ops;
extern const struct clk_ops clk_branch_simple_ops;
extern const struct clk_ops clk_branch2_aon_ops;
extern const struct clk_ops clk_branch2_mem_ops;
extern const struct clk_ops clk_branch2_prepare_ops;

#define to_clk_branch(_hw)

#define to_clk_mem_branch(_hw)

#endif