linux/drivers/clk/baikal-t1/ccu-rst.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2021 BAIKAL ELECTRONICS, JSC
 *
 * Authors:
 *   Serge Semin <[email protected]>
 *
 * Baikal-T1 CCU Resets interface driver
 */

#define pr_fmt(fmt)

#include <linux/bits.h>
#include <linux/delay.h>
#include <linux/kernel.h>
#include <linux/of.h>
#include <linux/printk.h>
#include <linux/regmap.h>
#include <linux/reset-controller.h>
#include <linux/slab.h>

#include <dt-bindings/reset/bt1-ccu.h>

#include "ccu-rst.h"

#define CCU_AXI_MAIN_BASE
#define CCU_AXI_DDR_BASE
#define CCU_AXI_SATA_BASE
#define CCU_AXI_GMAC0_BASE
#define CCU_AXI_GMAC1_BASE
#define CCU_AXI_XGMAC_BASE
#define CCU_AXI_PCIE_M_BASE
#define CCU_AXI_PCIE_S_BASE
#define CCU_AXI_USB_BASE
#define CCU_AXI_HWA_BASE
#define CCU_AXI_SRAM_BASE

#define CCU_SYS_DDR_BASE
#define CCU_SYS_SATA_REF_BASE
#define CCU_SYS_APB_BASE
#define CCU_SYS_PCIE_BASE

#define CCU_RST_DELAY_US

#define CCU_RST_TRIG(_base, _ofs)

#define CCU_RST_DIR(_base, _ofs)

struct ccu_rst_info {};

/*
 * Each AXI-bus clock divider is equipped with the corresponding clock-consumer
 * domain reset (it's self-deasserted reset control).
 */
static const struct ccu_rst_info axi_rst_info[] =;

/*
 * SATA reference clock domain and APB-bus domain are connected with the
 * sefl-deasserted reset control, which can be activated via the corresponding
 * clock divider register. DDR and PCIe sub-domains can be reset with directly
 * controlled reset signals. Resetting the DDR controller though won't end up
 * well while the Linux kernel is working.
 */
static const struct ccu_rst_info sys_rst_info[] =;

static int ccu_rst_reset(struct reset_controller_dev *rcdev, unsigned long idx)
{}

static int ccu_rst_set(struct reset_controller_dev *rcdev,
		       unsigned long idx, bool high)
{}

static int ccu_rst_assert(struct reset_controller_dev *rcdev,
			  unsigned long idx)
{}

static int ccu_rst_deassert(struct reset_controller_dev *rcdev,
			    unsigned long idx)
{}

static int ccu_rst_status(struct reset_controller_dev *rcdev,
			  unsigned long idx)
{}

static const struct reset_control_ops ccu_rst_ops =;

struct ccu_rst *ccu_rst_hw_register(const struct ccu_rst_init_data *rst_init)
{}

void ccu_rst_hw_unregister(struct ccu_rst *rst)
{}