mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-11 13:56:30 +00:00
83d290c56f
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
78 lines
1.8 KiB
C
78 lines
1.8 KiB
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
/*
|
|
* Copyright (C) 2016 Socionext Inc.
|
|
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
|
|
*/
|
|
|
|
#ifndef __CLK_UNIPHIER_H__
|
|
#define __CLK_UNIPHIER_H__
|
|
|
|
#include <linux/kernel.h>
|
|
#include <linux/types.h>
|
|
|
|
#define UNIPHIER_CLK_MUX_MAX_PARENTS 8
|
|
|
|
#define UNIPHIER_CLK_TYPE_END 0
|
|
#define UNIPHIER_CLK_TYPE_FIXED_RATE 2
|
|
#define UNIPHIER_CLK_TYPE_GATE 3
|
|
#define UNIPHIER_CLK_TYPE_MUX 4
|
|
|
|
#define UNIPHIER_CLK_ID_INVALID (U8_MAX)
|
|
|
|
struct uniphier_clk_fixed_rate_data {
|
|
unsigned long fixed_rate;
|
|
};
|
|
|
|
struct uniphier_clk_gate_data {
|
|
u8 parent_id;
|
|
u16 reg;
|
|
u8 bit;
|
|
};
|
|
|
|
struct uniphier_clk_mux_data {
|
|
u8 parent_ids[UNIPHIER_CLK_MUX_MAX_PARENTS];
|
|
u8 num_parents;
|
|
u16 reg;
|
|
u32 masks[UNIPHIER_CLK_MUX_MAX_PARENTS];
|
|
u32 vals[UNIPHIER_CLK_MUX_MAX_PARENTS];
|
|
};
|
|
|
|
struct uniphier_clk_data {
|
|
u8 type;
|
|
u8 id;
|
|
union {
|
|
struct uniphier_clk_fixed_rate_data rate;
|
|
struct uniphier_clk_gate_data gate;
|
|
struct uniphier_clk_mux_data mux;
|
|
} data;
|
|
};
|
|
|
|
#define UNIPHIER_CLK_RATE(_id, _rate) \
|
|
{ \
|
|
.type = UNIPHIER_CLK_TYPE_FIXED_RATE, \
|
|
.id = (_id), \
|
|
.data.rate = { \
|
|
.fixed_rate = (_rate), \
|
|
}, \
|
|
}
|
|
|
|
#define UNIPHIER_CLK_GATE(_id, _parent, _reg, _bit) \
|
|
{ \
|
|
.type = UNIPHIER_CLK_TYPE_GATE, \
|
|
.id = (_id), \
|
|
.data.gate = { \
|
|
.parent_id = (_parent), \
|
|
.reg = (_reg), \
|
|
.bit = (_bit), \
|
|
}, \
|
|
}
|
|
|
|
#define UNIPHIER_CLK_GATE_SIMPLE(_id, _reg, _bit) \
|
|
UNIPHIER_CLK_GATE(_id, UNIPHIER_CLK_ID_INVALID, _reg, _bit)
|
|
|
|
extern const struct uniphier_clk_data uniphier_pxs2_sys_clk_data[];
|
|
extern const struct uniphier_clk_data uniphier_ld20_sys_clk_data[];
|
|
extern const struct uniphier_clk_data uniphier_pxs3_sys_clk_data[];
|
|
extern const struct uniphier_clk_data uniphier_mio_clk_data[];
|
|
|
|
#endif /* __CLK_UNIPHIER_H__ */
|