linux/drivers/reset/reset-npcm.c

// SPDX-License-Identifier: GPL-2.0
// Copyright (c) 2019 Nuvoton Technology corporation.

#include <linux/delay.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/init.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/property.h>
#include <linux/reboot.h>
#include <linux/reset-controller.h>
#include <linux/spinlock.h>
#include <linux/mfd/syscon.h>
#include <linux/regmap.h>
#include <linux/of_address.h>

/* NPCM7xx GCR registers */
#define NPCM_MDLR_OFFSET
#define NPCM7XX_MDLR_USBD0
#define NPCM7XX_MDLR_USBD1
#define NPCM7XX_MDLR_USBD2_4
#define NPCM7XX_MDLR_USBD5_9

/* NPCM8xx MDLR bits */
#define NPCM8XX_MDLR_USBD0_3
#define NPCM8XX_MDLR_USBD4_7
#define NPCM8XX_MDLR_USBD8
#define NPCM8XX_MDLR_USBD9

#define NPCM_USB1PHYCTL_OFFSET
#define NPCM_USB2PHYCTL_OFFSET
#define NPCM_USB3PHYCTL_OFFSET
#define NPCM_USBXPHYCTL_RS

/* NPCM7xx Reset registers */
#define NPCM_SWRSTR
#define NPCM_SWRST

#define NPCM_IPSRST1
#define NPCM_IPSRST1_USBD1
#define NPCM_IPSRST1_USBD2
#define NPCM_IPSRST1_USBD3
#define NPCM_IPSRST1_USBD4
#define NPCM_IPSRST1_USBD5
#define NPCM_IPSRST1_USBD6

#define NPCM_IPSRST2
#define NPCM_IPSRST2_USB_HOST

#define NPCM_IPSRST3
#define NPCM_IPSRST3_USBD0
#define NPCM_IPSRST3_USBD7
#define NPCM_IPSRST3_USBD8
#define NPCM_IPSRST3_USBD9
#define NPCM_IPSRST3_USBPHY1
#define NPCM_IPSRST3_USBPHY2

#define NPCM_IPSRST4
#define NPCM_IPSRST4_USBPHY3
#define NPCM_IPSRST4_USB_HOST2

#define NPCM_RC_RESETS_PER_REG
#define NPCM_MASK_RESETS

enum {};

static const u32 npxm7xx_ipsrst[] =;
static const u32 npxm8xx_ipsrst[] =;

struct npcm_reset_info {};

static const struct npcm_reset_info npxm7xx_reset_info[] =;
static const struct npcm_reset_info npxm8xx_reset_info[] =;

struct npcm_rc_data {};

#define to_rc_data(p)

static int npcm_rc_restart(struct notifier_block *nb, unsigned long mode,
			   void *cmd)
{}

static int npcm_rc_setclear_reset(struct reset_controller_dev *rcdev,
				  unsigned long id, bool set)
{}

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

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

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

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

static const struct of_device_id npcm_rc_match[] =;

static void npcm_usb_reset_npcm7xx(struct npcm_rc_data *rc)
{}

static void npcm_usb_reset_npcm8xx(struct npcm_rc_data *rc)
{}

/*
 *  The following procedure should be observed in USB PHY, USB device and
 *  USB host initialization at BMC boot
 */
static int npcm_usb_reset(struct platform_device *pdev, struct npcm_rc_data *rc)
{}

static const struct reset_control_ops npcm_rc_ops =;

static int npcm_rc_probe(struct platform_device *pdev)
{}

static struct platform_driver npcm_rc_driver =;
builtin_platform_driver();