18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0+ */ 28c2ecf20Sopenharmony_ci// 38c2ecf20Sopenharmony_ci// OWL fixed factor clock driver 48c2ecf20Sopenharmony_ci// 58c2ecf20Sopenharmony_ci// Copyright (c) 2014 Actions Semi Inc. 68c2ecf20Sopenharmony_ci// Author: David Liu <liuwei@actions-semi.com> 78c2ecf20Sopenharmony_ci// 88c2ecf20Sopenharmony_ci// Copyright (c) 2018 Linaro Ltd. 98c2ecf20Sopenharmony_ci// Author: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci#ifndef _OWL_FIXED_FACTOR_H_ 128c2ecf20Sopenharmony_ci#define _OWL_FIXED_FACTOR_H_ 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci#include "owl-common.h" 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ci#define OWL_FIX_FACT(_struct, _name, _parent, _mul, _div, _flags) \ 178c2ecf20Sopenharmony_ci struct clk_fixed_factor _struct = { \ 188c2ecf20Sopenharmony_ci .mult = _mul, \ 198c2ecf20Sopenharmony_ci .div = _div, \ 208c2ecf20Sopenharmony_ci .hw.init = CLK_HW_INIT(_name, \ 218c2ecf20Sopenharmony_ci _parent, \ 228c2ecf20Sopenharmony_ci &clk_fixed_factor_ops, \ 238c2ecf20Sopenharmony_ci _flags), \ 248c2ecf20Sopenharmony_ci } 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ciextern const struct clk_ops clk_fixed_factor_ops; 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ci#endif /* _OWL_FIXED_FACTOR_H_ */ 29