linux/drivers/clk/sunxi-ng/ccu-sun6i-rtc.c

// SPDX-License-Identifier: GPL-2.0-only
//
// Copyright (c) 2021 Samuel Holland <[email protected]>
//

#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/device.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_device.h>

#include <linux/clk/sunxi-ng.h>

#include "ccu_common.h"

#include "ccu_div.h"
#include "ccu_gate.h"
#include "ccu_mux.h"

#include "ccu-sun6i-rtc.h"

#define IOSC_ACCURACY
#define IOSC_RATE

#define LOSC_RATE
#define LOSC_RATE_SHIFT

#define LOSC_CTRL_REG
#define LOSC_CTRL_KEY

#define IOSC_32K_CLK_DIV_REG
#define IOSC_32K_CLK_DIV
#define IOSC_32K_PRE_DIV

#define IOSC_CLK_CALI_REG
#define IOSC_CLK_CALI_DIV_ONES
#define IOSC_CLK_CALI_EN
#define IOSC_CLK_CALI_SRC_SEL

#define LOSC_OUT_GATING_REG

#define DCXO_CTRL_REG
#define DCXO_CTRL_CLK16M_RC_EN

struct sun6i_rtc_match_data {};

static bool have_iosc_calibration;

static int ccu_iosc_enable(struct clk_hw *hw)
{}

static void ccu_iosc_disable(struct clk_hw *hw)
{}

static int ccu_iosc_is_enabled(struct clk_hw *hw)
{}

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

static unsigned long ccu_iosc_recalc_accuracy(struct clk_hw *hw,
					      unsigned long parent_accuracy)
{}

static const struct clk_ops ccu_iosc_ops =;

static struct ccu_common iosc_clk =;

static int ccu_iosc_32k_prepare(struct clk_hw *hw)
{}

static void ccu_iosc_32k_unprepare(struct clk_hw *hw)
{}

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

static unsigned long ccu_iosc_32k_recalc_accuracy(struct clk_hw *hw,
						  unsigned long parent_accuracy)
{}

static const struct clk_ops ccu_iosc_32k_ops =;

static struct ccu_common iosc_32k_clk =;

static const struct clk_hw *ext_osc32k[] =; /* updated during probe */

static SUNXI_CCU_GATE_HWS(ext_osc32k_gate_clk, "ext-osc32k-gate",
			  ext_osc32k, 0x0, BIT(4), 0);

static const struct clk_hw *osc32k_parents[] =;

static struct clk_init_data osc32k_init_data =;

static struct ccu_mux osc32k_clk =;

/* This falls back to the global name for fwnodes without a named reference. */
static const struct clk_parent_data osc24M[] =;

static struct ccu_gate osc24M_32k_clk =;

static const struct clk_hw *rtc_32k_parents[] =;

static struct clk_init_data rtc_32k_init_data =;

static struct ccu_mux rtc_32k_clk =;

static struct clk_init_data osc32k_fanout_init_data =;

static struct ccu_mux osc32k_fanout_clk =;

static struct ccu_common *sun6i_rtc_ccu_clks[] =;

static struct clk_hw_onecell_data sun6i_rtc_ccu_hw_clks =;

static const struct sunxi_ccu_desc sun6i_rtc_ccu_desc =;

static const struct clk_parent_data sun50i_h616_osc32k_fanout_parents[] =;

static const struct clk_parent_data sun50i_r329_osc32k_fanout_parents[] =;

static const struct sun6i_rtc_match_data sun50i_h616_rtc_ccu_data =;

static const struct sun6i_rtc_match_data sun50i_r329_rtc_ccu_data =;

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

int sun6i_rtc_ccu_probe(struct device *dev, void __iomem *reg)
{}

MODULE_IMPORT_NS();
MODULE_DESCRIPTION();
MODULE_LICENSE();