1 /* 2 * Copyright (C) 2016 Socionext Inc. 3 * Author: Masahiro Yamada <yamada.masahiro@socionext.com> 4 * 5 * SPDX-License-Identifier: GPL-2.0+ 6 */ 7 8 #ifndef __CLK_UNIPHIER_H__ 9 #define __CLK_UNIPHIER_H__ 10 11 #include <linux/kernel.h> 12 13 struct uniphier_clk_gate_data { 14 int index; 15 unsigned int reg; 16 u32 mask; 17 u32 data; 18 }; 19 20 struct uniphier_clk_rate_data { 21 int index; 22 unsigned int reg; 23 #define UNIPHIER_CLK_RATE_IS_FIXED UINT_MAX 24 u32 mask; 25 u32 data; 26 unsigned long rate; 27 }; 28 29 struct uniphier_clk_soc_data { 30 const struct uniphier_clk_gate_data *gate; 31 unsigned int nr_gate; 32 const struct uniphier_clk_rate_data *rate; 33 unsigned int nr_rate; 34 }; 35 36 #define UNIPHIER_CLK_FIXED_RATE(i, f) \ 37 { \ 38 .index = i, \ 39 .reg = UNIPHIER_CLK_RATE_IS_FIXED, \ 40 .rate = f, \ 41 } 42 43 extern const struct uniphier_clk_soc_data uniphier_mio_clk_data; 44 45 #endif /* __CLK_UNIPHIER_H__ */ 46