linux/drivers/clk/xilinx/xlnx_vcu.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Xilinx VCU Init
 *
 * Copyright (C) 2016 - 2017 Xilinx, Inc.
 *
 * Contacts   Dhaval Shah <[email protected]>
 */
#include <linux/bitfield.h>
#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/device.h>
#include <linux/errno.h>
#include <linux/io.h>
#include <linux/mfd/syscon.h>
#include <linux/mfd/syscon/xlnx-vcu.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>

#include <dt-bindings/clock/xlnx-vcu.h>

#define VCU_PLL_CTRL
#define VCU_PLL_CTRL_RESET
#define VCU_PLL_CTRL_POR_IN
#define VCU_PLL_CTRL_PWR_POR
#define VCU_PLL_CTRL_BYPASS
#define VCU_PLL_CTRL_FBDIV
#define VCU_PLL_CTRL_CLKOUTDIV

#define VCU_PLL_CFG
#define VCU_PLL_CFG_RES
#define VCU_PLL_CFG_CP
#define VCU_PLL_CFG_LFHF
#define VCU_PLL_CFG_LOCK_CNT
#define VCU_PLL_CFG_LOCK_DLY
#define VCU_ENC_CORE_CTRL
#define VCU_ENC_MCU_CTRL
#define VCU_DEC_CORE_CTRL
#define VCU_DEC_MCU_CTRL
#define VCU_PLL_STATUS
#define VCU_PLL_STATUS_LOCK_STATUS

#define MHZ
#define FVCO_MIN
#define FVCO_MAX

/**
 * struct xvcu_device - Xilinx VCU init device structure
 * @dev: Platform device
 * @pll_ref: pll ref clock source
 * @aclk: axi clock source
 * @logicore_reg_ba: logicore reg base address
 * @vcu_slcr_ba: vcu_slcr Register base address
 * @pll: handle for the VCU PLL
 * @pll_post: handle for the VCU PLL post divider
 * @clk_data: clocks provided by the vcu clock provider
 */
struct xvcu_device {};

static const struct regmap_config vcu_settings_regmap_config =;

/**
 * struct xvcu_pll_cfg - Helper data
 * @fbdiv: The integer portion of the feedback divider to the PLL
 * @cp: PLL charge pump control
 * @res: PLL loop filter resistor control
 * @lfhf: PLL loop filter high frequency capacitor control
 * @lock_dly: Lock circuit configuration settings for lock windowsize
 * @lock_cnt: Lock circuit counter setting
 */
struct xvcu_pll_cfg {};

static const struct xvcu_pll_cfg xvcu_pll_cfg[] =;

/**
 * xvcu_read - Read from the VCU register space
 * @iomem:	vcu reg space base address
 * @offset:	vcu reg offset from base
 *
 * Return:	Returns 32bit value from VCU register specified
 *
 */
static inline u32 xvcu_read(void __iomem *iomem, u32 offset)
{}

/**
 * xvcu_write - Write to the VCU register space
 * @iomem:	vcu reg space base address
 * @offset:	vcu reg offset from base
 * @value:	Value to write
 */
static inline void xvcu_write(void __iomem *iomem, u32 offset, u32 value)
{}

#define to_vcu_pll(_hw)

struct vcu_pll {};

static int xvcu_pll_wait_for_lock(struct vcu_pll *pll)
{}

static struct clk_hw *xvcu_register_pll_post(struct device *dev,
					     const char *name,
					     const struct clk_hw *parent_hw,
					     void __iomem *reg_base)
{}

static const struct xvcu_pll_cfg *xvcu_find_cfg(int div)
{}

static int xvcu_pll_set_div(struct vcu_pll *pll, int div)
{}

static long xvcu_pll_round_rate(struct clk_hw *hw,
				unsigned long rate, unsigned long *parent_rate)
{}

static unsigned long xvcu_pll_recalc_rate(struct clk_hw *hw,
					  unsigned long parent_rate)
{}

static int xvcu_pll_set_rate(struct clk_hw *hw,
			     unsigned long rate, unsigned long parent_rate)
{}

static int xvcu_pll_enable(struct clk_hw *hw)
{}

static void xvcu_pll_disable(struct clk_hw *hw)
{}

static const struct clk_ops vcu_pll_ops =;

static struct clk_hw *xvcu_register_pll(struct device *dev,
					void __iomem *reg_base,
					const char *name, const char *parent,
					unsigned long flags)
{}

static struct clk_hw *xvcu_clk_hw_register_leaf(struct device *dev,
						const char *name,
						const struct clk_parent_data *parent_data,
						u8 num_parents,
						void __iomem *reg)
{}

static void xvcu_clk_hw_unregister_leaf(struct clk_hw *hw)
{}

static int xvcu_register_clock_provider(struct xvcu_device *xvcu)
{}

static void xvcu_unregister_clock_provider(struct xvcu_device *xvcu)
{}

/**
 * xvcu_probe - Probe existence of the logicoreIP
 *			and initialize PLL
 *
 * @pdev:	Pointer to the platform_device structure
 *
 * Return:	Returns 0 on success
 *		Negative error code otherwise
 */
static int xvcu_probe(struct platform_device *pdev)
{}

/**
 * xvcu_remove - Insert gasket isolation
 *			and disable the clock
 * @pdev:	Pointer to the platform_device structure
 *
 * Return:	Returns 0 on success
 *		Negative error code otherwise
 */
static void xvcu_remove(struct platform_device *pdev)
{}

static const struct of_device_id xvcu_of_id_table[] =;
MODULE_DEVICE_TABLE(of, xvcu_of_id_table);

static struct platform_driver xvcu_driver =;

module_platform_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();