linux/drivers/clk/sunxi-ng/ccu-sun8i-de2.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2017 Icenowy Zheng <[email protected]>
 */

#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/reset.h>

#include "ccu_common.h"
#include "ccu_div.h"
#include "ccu_gate.h"
#include "ccu_reset.h"

#include "ccu-sun8i-de2.h"

static SUNXI_CCU_GATE(bus_mixer0_clk,	"bus-mixer0",	"bus-de",
		      0x04, BIT(0), 0);
static SUNXI_CCU_GATE(bus_mixer1_clk,	"bus-mixer1",	"bus-de",
		      0x04, BIT(1), 0);
static SUNXI_CCU_GATE(bus_wb_clk,	"bus-wb",	"bus-de",
		      0x04, BIT(2), 0);
static SUNXI_CCU_GATE(bus_rot_clk,	"bus-rot",	"bus-de",
		      0x04, BIT(3), 0);

static SUNXI_CCU_GATE(mixer0_clk,	"mixer0",	"mixer0-div",
		      0x00, BIT(0), CLK_SET_RATE_PARENT);
static SUNXI_CCU_GATE(mixer1_clk,	"mixer1",	"mixer1-div",
		      0x00, BIT(1), CLK_SET_RATE_PARENT);
static SUNXI_CCU_GATE(wb_clk,		"wb",		"wb-div",
		      0x00, BIT(2), CLK_SET_RATE_PARENT);
static SUNXI_CCU_GATE(rot_clk,		"rot",		"rot-div",
		      0x00, BIT(3), CLK_SET_RATE_PARENT);

static SUNXI_CCU_M(mixer0_div_clk, "mixer0-div", "de", 0x0c, 0, 4,
		   CLK_SET_RATE_PARENT);
static SUNXI_CCU_M(mixer1_div_clk, "mixer1-div", "de", 0x0c, 4, 4,
		   CLK_SET_RATE_PARENT);
static SUNXI_CCU_M(wb_div_clk, "wb-div", "de", 0x0c, 8, 4,
		   CLK_SET_RATE_PARENT);
static SUNXI_CCU_M(rot_div_clk, "rot-div", "de", 0x0c, 0x0c, 4,
		   CLK_SET_RATE_PARENT);

static SUNXI_CCU_M(mixer0_div_a83_clk, "mixer0-div", "pll-de", 0x0c, 0, 4,
		   CLK_SET_RATE_PARENT);
static SUNXI_CCU_M(mixer1_div_a83_clk, "mixer1-div", "pll-de", 0x0c, 4, 4,
		   CLK_SET_RATE_PARENT);
static SUNXI_CCU_M(wb_div_a83_clk, "wb-div", "pll-de", 0x0c, 8, 4,
		   CLK_SET_RATE_PARENT);
static SUNXI_CCU_M(rot_div_a83_clk, "rot-div", "pll-de", 0x0c, 0x0c, 4,
		   CLK_SET_RATE_PARENT);

static struct ccu_common *sun8i_de2_ccu_clks[] =;

static struct clk_hw_onecell_data sun8i_a83t_de2_hw_clks =;

static struct clk_hw_onecell_data sun8i_h3_de2_hw_clks =;

static struct clk_hw_onecell_data sun8i_v3s_de2_hw_clks =;

static struct clk_hw_onecell_data sun50i_a64_de2_hw_clks =;

static struct ccu_reset_map sun8i_a83t_de2_resets[] =;

static struct ccu_reset_map sun8i_h3_de2_resets[] =;

static struct ccu_reset_map sun50i_a64_de2_resets[] =;

static struct ccu_reset_map sun50i_h5_de2_resets[] =;

static const struct sunxi_ccu_desc sun8i_a83t_de2_clk_desc =;

static const struct sunxi_ccu_desc sun8i_h3_de2_clk_desc =;

static const struct sunxi_ccu_desc sun8i_r40_de2_clk_desc =;

static const struct sunxi_ccu_desc sun8i_v3s_de2_clk_desc =;

static const struct sunxi_ccu_desc sun50i_a64_de2_clk_desc =;

static const struct sunxi_ccu_desc sun50i_h5_de2_clk_desc =;

static int sunxi_de2_clk_probe(struct platform_device *pdev)
{}

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

static struct platform_driver sunxi_de2_clk_driver =;
module_platform_driver();

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