u-boot/drivers/clk/starfive/clk.h
Xingyu Wu 9adf1cf609 clk: starfive: jh7110: Add of_xlate ops and macros for clock id conversion
Modify the drivers to add of_xlate ops and transform clock id.

Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
Reviewed-by: Torsten Duwe <duwe@suse.de>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-07-24 13:21:16 +08:00

26 lines
659 B
C

/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Copyright (C) 2022 StarFive Technology Co., Ltd.
* Author: Yanhong Wang <yanhong.wang@starfivetech.com>
*/
#ifndef __CLK_STARFIVE_H
#define __CLK_STARFIVE_H
/* the number of fixed clocks in DTS */
#define JH7110_EXTCLK_END 12
#define _JH7110_CLK_OPS(_name) \
static const struct clk_ops jh7110_##_name##_clk_ops = { \
.set_rate = ccf_clk_set_rate, \
.get_rate = ccf_clk_get_rate, \
.set_parent = ccf_clk_set_parent, \
.enable = ccf_clk_enable, \
.disable = ccf_clk_disable, \
.of_xlate = jh7110_##_name##_clk_of_xlate, \
}
#define JH7110_CLK_OPS(name) _JH7110_CLK_OPS(name)
#endif