linux/drivers/reset/reset-mpfs.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * PolarFire SoC (MPFS) Peripheral Clock Reset Controller
 *
 * Author: Conor Dooley <[email protected]>
 * Copyright (c) 2022 Microchip Technology Inc. and its subsidiaries.
 *
 */
#include <linux/auxiliary_bus.h>
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/reset-controller.h>
#include <dt-bindings/clock/microchip,mpfs-clock.h>
#include <soc/microchip/mpfs.h>

/*
 * The ENVM reset is the lowest bit in the register & I am using the CLK_FOO
 * defines in the dt to make things easier to configure - so this is accounting
 * for the offset of 3 there.
 */
#define MPFS_PERIPH_OFFSET
#define MPFS_NUM_RESETS
#define MPFS_SLEEP_MIN_US
#define MPFS_SLEEP_MAX_US

/* block concurrent access to the soft reset register */
static DEFINE_SPINLOCK(mpfs_reset_lock);

struct mpfs_reset {};

static inline struct mpfs_reset *to_mpfs_reset(struct reset_controller_dev *rcdev)
{}

/*
 * Peripheral clock resets
 */
static int mpfs_assert(struct reset_controller_dev *rcdev, unsigned long id)
{}

static int mpfs_deassert(struct reset_controller_dev *rcdev, unsigned long id)
{}

static int mpfs_status(struct reset_controller_dev *rcdev, unsigned long id)
{}

static int mpfs_reset(struct reset_controller_dev *rcdev, unsigned long id)
{}

static const struct reset_control_ops mpfs_reset_ops =;

static int mpfs_reset_xlate(struct reset_controller_dev *rcdev,
			    const struct of_phandle_args *reset_spec)
{}

static int mpfs_reset_probe(struct auxiliary_device *adev,
			    const struct auxiliary_device_id *id)
{}

static void mpfs_reset_unregister_adev(void *_adev)
{}

static void mpfs_reset_adev_release(struct device *dev)
{}

static struct auxiliary_device *mpfs_reset_adev_alloc(struct device *clk_dev)
{}

int mpfs_reset_controller_register(struct device *clk_dev, void __iomem *base)
{}
EXPORT_SYMBOL_NS_GPL();

static const struct auxiliary_device_id mpfs_reset_ids[] =;
MODULE_DEVICE_TABLE(auxiliary, mpfs_reset_ids);

static struct auxiliary_driver mpfs_reset_driver =;

module_auxiliary_driver();

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_IMPORT_NS();