18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Copyright (c) 2013, The Linux Foundation. All rights reserved.
48c2ecf20Sopenharmony_ci */
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ci#ifndef __QCOM_CLK_RESET_H__
78c2ecf20Sopenharmony_ci#define __QCOM_CLK_RESET_H__
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci#include <linux/reset-controller.h>
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_cistruct qcom_reset_map {
128c2ecf20Sopenharmony_ci	unsigned int reg;
138c2ecf20Sopenharmony_ci	u8 bit;
148c2ecf20Sopenharmony_ci	u8 udelay;
158c2ecf20Sopenharmony_ci	u32 bitmask;
168c2ecf20Sopenharmony_ci};
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_cistruct regmap;
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_cistruct qcom_reset_controller {
218c2ecf20Sopenharmony_ci	const struct qcom_reset_map *reset_map;
228c2ecf20Sopenharmony_ci	struct regmap *regmap;
238c2ecf20Sopenharmony_ci	struct reset_controller_dev rcdev;
248c2ecf20Sopenharmony_ci};
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ci#define to_qcom_reset_controller(r) \
278c2ecf20Sopenharmony_ci	container_of(r, struct qcom_reset_controller, rcdev);
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_ciextern const struct reset_control_ops qcom_reset_ops;
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ci#endif
32