2016-02-02 12:11:32 +00:00
|
|
|
/*
|
2016-07-19 12:56:13 +00:00
|
|
|
* Copyright (C) 2016 Socionext Inc.
|
|
|
|
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
|
2016-02-02 12:11:32 +00:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: GPL-2.0+
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __CLK_UNIPHIER_H__
|
|
|
|
#define __CLK_UNIPHIER_H__
|
|
|
|
|
|
|
|
#include <linux/kernel.h>
|
|
|
|
|
|
|
|
struct uniphier_clk_gate_data {
|
|
|
|
int index;
|
|
|
|
unsigned int reg;
|
|
|
|
u32 mask;
|
|
|
|
u32 data;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct uniphier_clk_rate_data {
|
|
|
|
int index;
|
|
|
|
unsigned int reg;
|
|
|
|
#define UNIPHIER_CLK_RATE_IS_FIXED UINT_MAX
|
|
|
|
u32 mask;
|
|
|
|
u32 data;
|
|
|
|
unsigned long rate;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct uniphier_clk_soc_data {
|
2016-09-21 22:42:20 +00:00
|
|
|
const struct uniphier_clk_gate_data *gate;
|
2016-02-02 12:11:32 +00:00
|
|
|
unsigned int nr_gate;
|
2016-09-21 22:42:20 +00:00
|
|
|
const struct uniphier_clk_rate_data *rate;
|
2016-02-02 12:11:32 +00:00
|
|
|
unsigned int nr_rate;
|
|
|
|
};
|
|
|
|
|
|
|
|
#define UNIPHIER_CLK_FIXED_RATE(i, f) \
|
|
|
|
{ \
|
|
|
|
.index = i, \
|
|
|
|
.reg = UNIPHIER_CLK_RATE_IS_FIXED, \
|
|
|
|
.rate = f, \
|
|
|
|
}
|
|
|
|
|
2016-09-21 22:42:21 +00:00
|
|
|
extern const struct uniphier_clk_soc_data uniphier_mio_clk_data;
|
2016-02-02 12:11:32 +00:00
|
|
|
|
|
|
|
#endif /* __CLK_UNIPHIER_H__ */
|