linux/drivers/clk/renesas/clk-mstp.c

// SPDX-License-Identifier: GPL-2.0
/*
 * R-Car MSTP clocks
 *
 * Copyright (C) 2013 Ideas On Board SPRL
 * Copyright (C) 2015 Glider bvba
 *
 * Contact: Laurent Pinchart <[email protected]>
 */

#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/clk/renesas.h>
#include <linux/device.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/pm_clock.h>
#include <linux/pm_domain.h>
#include <linux/slab.h>
#include <linux/spinlock.h>

/*
 * MSTP clocks. We can't use standard gate clocks as we need to poll on the
 * status register when enabling the clock.
 */

#define MSTP_MAX_CLOCKS

/**
 * struct mstp_clock_group - MSTP gating clocks group
 *
 * @data: clock specifier translation for clocks in this group
 * @smstpcr: module stop control register
 * @mstpsr: module stop status register (optional)
 * @lock: protects writes to SMSTPCR
 * @width_8bit: registers are 8-bit, not 32-bit
 * @clks: clocks in this group
 */
struct mstp_clock_group {};

/**
 * struct mstp_clock - MSTP gating clock
 * @hw: handle between common and hardware-specific interfaces
 * @bit_index: control bit index
 * @group: MSTP clocks group
 */
struct mstp_clock {};

#define to_mstp_clock(_hw)

static inline u32 cpg_mstp_read(struct mstp_clock_group *group,
				u32 __iomem *reg)
{}

static inline void cpg_mstp_write(struct mstp_clock_group *group, u32 val,
				  u32 __iomem *reg)
{}

static int cpg_mstp_clock_endisable(struct clk_hw *hw, bool enable)
{}

static int cpg_mstp_clock_enable(struct clk_hw *hw)
{}

static void cpg_mstp_clock_disable(struct clk_hw *hw)
{}

static int cpg_mstp_clock_is_enabled(struct clk_hw *hw)
{}

static const struct clk_ops cpg_mstp_clock_ops =;

static struct clk * __init cpg_mstp_clock_register(const char *name,
	const char *parent_name, unsigned int index,
	struct mstp_clock_group *group)
{}

static void __init cpg_mstp_clocks_init(struct device_node *np)
{}
CLK_OF_DECLARE(cpg_mstp_clks, "renesas,cpg-mstp-clocks", cpg_mstp_clocks_init);

int cpg_mstp_attach_dev(struct generic_pm_domain *unused, struct device *dev)
{}

void cpg_mstp_detach_dev(struct generic_pm_domain *unused, struct device *dev)
{}

void __init cpg_mstp_add_clk_domain(struct device_node *np)
{}