mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-19 03:08:31 +00:00
102e318777
Move U_BOOT_DRIVER() entry from the data file (clk-uniphier-mio.c) to the core support file (clk-uniphier-core.c) because I do not want to repeat the driver boilerplate when I add more clock data. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
45 lines
871 B
C
45 lines
871 B
C
/*
|
|
* Copyright (C) 2016 Socionext Inc.
|
|
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
|
|
*
|
|
* 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 {
|
|
const struct uniphier_clk_gate_data *gate;
|
|
unsigned int nr_gate;
|
|
const struct uniphier_clk_rate_data *rate;
|
|
unsigned int nr_rate;
|
|
};
|
|
|
|
#define UNIPHIER_CLK_FIXED_RATE(i, f) \
|
|
{ \
|
|
.index = i, \
|
|
.reg = UNIPHIER_CLK_RATE_IS_FIXED, \
|
|
.rate = f, \
|
|
}
|
|
|
|
extern const struct uniphier_clk_soc_data uniphier_mio_clk_data;
|
|
|
|
#endif /* __CLK_UNIPHIER_H__ */
|