13fde0e16SJolly Shah /* SPDX-License-Identifier: GPL-2.0 */ 23fde0e16SJolly Shah /* 33fde0e16SJolly Shah * Copyright (C) 2016-2018 Xilinx 43fde0e16SJolly Shah */ 53fde0e16SJolly Shah 63fde0e16SJolly Shah #ifndef __LINUX_CLK_ZYNQMP_H_ 73fde0e16SJolly Shah #define __LINUX_CLK_ZYNQMP_H_ 83fde0e16SJolly Shah 93fde0e16SJolly Shah #include <linux/spinlock.h> 103fde0e16SJolly Shah 113fde0e16SJolly Shah #include <linux/firmware/xlnx-zynqmp.h> 123fde0e16SJolly Shah 133fde0e16SJolly Shah enum topology_type { 143fde0e16SJolly Shah TYPE_INVALID, 153fde0e16SJolly Shah TYPE_MUX, 163fde0e16SJolly Shah TYPE_PLL, 173fde0e16SJolly Shah TYPE_FIXEDFACTOR, 183fde0e16SJolly Shah TYPE_DIV1, 193fde0e16SJolly Shah TYPE_DIV2, 203fde0e16SJolly Shah TYPE_GATE, 213fde0e16SJolly Shah }; 223fde0e16SJolly Shah 233fde0e16SJolly Shah /** 243fde0e16SJolly Shah * struct clock_topology - Clock topology 253fde0e16SJolly Shah * @type: Type of topology 263fde0e16SJolly Shah * @flag: Topology flags 273fde0e16SJolly Shah * @type_flag: Topology type specific flag 283fde0e16SJolly Shah */ 293fde0e16SJolly Shah struct clock_topology { 303fde0e16SJolly Shah u32 type; 313fde0e16SJolly Shah u32 flag; 323fde0e16SJolly Shah u32 type_flag; 33*e605fa9cSRajan Vaja u8 custom_type_flag; 343fde0e16SJolly Shah }; 353fde0e16SJolly Shah 363fde0e16SJolly Shah struct clk_hw *zynqmp_clk_register_pll(const char *name, u32 clk_id, 373fde0e16SJolly Shah const char * const *parents, 383fde0e16SJolly Shah u8 num_parents, 393fde0e16SJolly Shah const struct clock_topology *nodes); 403fde0e16SJolly Shah 413fde0e16SJolly Shah struct clk_hw *zynqmp_clk_register_gate(const char *name, u32 clk_id, 423fde0e16SJolly Shah const char * const *parents, 433fde0e16SJolly Shah u8 num_parents, 443fde0e16SJolly Shah const struct clock_topology *nodes); 453fde0e16SJolly Shah 463fde0e16SJolly Shah struct clk_hw *zynqmp_clk_register_divider(const char *name, 473fde0e16SJolly Shah u32 clk_id, 483fde0e16SJolly Shah const char * const *parents, 493fde0e16SJolly Shah u8 num_parents, 503fde0e16SJolly Shah const struct clock_topology *nodes); 513fde0e16SJolly Shah 523fde0e16SJolly Shah struct clk_hw *zynqmp_clk_register_mux(const char *name, u32 clk_id, 533fde0e16SJolly Shah const char * const *parents, 543fde0e16SJolly Shah u8 num_parents, 553fde0e16SJolly Shah const struct clock_topology *nodes); 563fde0e16SJolly Shah 573fde0e16SJolly Shah struct clk_hw *zynqmp_clk_register_fixed_factor(const char *name, 583fde0e16SJolly Shah u32 clk_id, 593fde0e16SJolly Shah const char * const *parents, 603fde0e16SJolly Shah u8 num_parents, 613fde0e16SJolly Shah const struct clock_topology *nodes); 623fde0e16SJolly Shah 633fde0e16SJolly Shah #endif 64