mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-26 18:15:09 +07:00
3fde0e16d0
This patch adds CCF compliant clock driver for ZynqMP. Clock driver queries supported clock information from firmware and regiters pll and output clocks with CCF. Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com> Signed-off-by: Tejas Patel <tejasp@xilinx.com> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> Signed-off-by: Jolly Shah <jolly.shah@xilinx.com> Acked-by: Olof Johansson <olof@lixom.net> Reviewed-by: Stephen Boyd <sboyd@kernel.org> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
69 lines
1.6 KiB
C
69 lines
1.6 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Copyright (C) 2016-2018 Xilinx
|
|
*/
|
|
|
|
#ifndef __LINUX_CLK_ZYNQMP_H_
|
|
#define __LINUX_CLK_ZYNQMP_H_
|
|
|
|
#include <linux/spinlock.h>
|
|
|
|
#include <linux/firmware/xlnx-zynqmp.h>
|
|
|
|
/* Clock APIs payload parameters */
|
|
#define CLK_GET_NAME_RESP_LEN 16
|
|
#define CLK_GET_TOPOLOGY_RESP_WORDS 3
|
|
#define CLK_GET_PARENTS_RESP_WORDS 3
|
|
#define CLK_GET_ATTR_RESP_WORDS 1
|
|
|
|
enum topology_type {
|
|
TYPE_INVALID,
|
|
TYPE_MUX,
|
|
TYPE_PLL,
|
|
TYPE_FIXEDFACTOR,
|
|
TYPE_DIV1,
|
|
TYPE_DIV2,
|
|
TYPE_GATE,
|
|
};
|
|
|
|
/**
|
|
* struct clock_topology - Clock topology
|
|
* @type: Type of topology
|
|
* @flag: Topology flags
|
|
* @type_flag: Topology type specific flag
|
|
*/
|
|
struct clock_topology {
|
|
u32 type;
|
|
u32 flag;
|
|
u32 type_flag;
|
|
};
|
|
|
|
struct clk_hw *zynqmp_clk_register_pll(const char *name, u32 clk_id,
|
|
const char * const *parents,
|
|
u8 num_parents,
|
|
const struct clock_topology *nodes);
|
|
|
|
struct clk_hw *zynqmp_clk_register_gate(const char *name, u32 clk_id,
|
|
const char * const *parents,
|
|
u8 num_parents,
|
|
const struct clock_topology *nodes);
|
|
|
|
struct clk_hw *zynqmp_clk_register_divider(const char *name,
|
|
u32 clk_id,
|
|
const char * const *parents,
|
|
u8 num_parents,
|
|
const struct clock_topology *nodes);
|
|
|
|
struct clk_hw *zynqmp_clk_register_mux(const char *name, u32 clk_id,
|
|
const char * const *parents,
|
|
u8 num_parents,
|
|
const struct clock_topology *nodes);
|
|
|
|
struct clk_hw *zynqmp_clk_register_fixed_factor(const char *name,
|
|
u32 clk_id,
|
|
const char * const *parents,
|
|
u8 num_parents,
|
|
const struct clock_topology *nodes);
|
|
|
|
#endif
|