linux/drivers/peci/controller/peci-npcm.c

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

#include <linux/bitfield.h>
#include <linux/clk.h>
#include <linux/interrupt.h>
#include <linux/jiffies.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/peci.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/reset.h>

/* NPCM GCR module */
#define NPCM_INTCR3_OFFSET
#define NPCM_INTCR3_PECIVSEL

/* NPCM PECI Registers */
#define NPCM_PECI_CTL_STS
#define NPCM_PECI_RD_LENGTH
#define NPCM_PECI_ADDR
#define NPCM_PECI_CMD
#define NPCM_PECI_CTL2
#define NPCM_PECI_WR_LENGTH
#define NPCM_PECI_PDDR
#define NPCM_PECI_DAT_INOUT(n)

#define NPCM_PECI_MAX_REG

/* NPCM_PECI_CTL_STS - 0x00 : Control Register */
#define NPCM_PECI_CTRL_DONE_INT_EN
#define NPCM_PECI_CTRL_ABRT_ERR
#define NPCM_PECI_CTRL_CRC_ERR
#define NPCM_PECI_CTRL_DONE
#define NPCM_PECI_CTRL_START_BUSY

/* NPCM_PECI_RD_LENGTH - 0x04 : Command Register */
#define NPCM_PECI_RD_LEN_MASK

/* NPCM_PECI_CMD - 0x10 : Command Register */
#define NPCM_PECI_CTL2_MASK

/* NPCM_PECI_WR_LENGTH - 0x1C : Command Register */
#define NPCM_PECI_WR_LEN_MASK

/* NPCM_PECI_PDDR - 0x2C : Command Register */
#define NPCM_PECI_PDDR_MASK

#define NPCM_PECI_INT_MASK

#define NPCM_PECI_IDLE_CHECK_TIMEOUT_USEC
#define NPCM_PECI_IDLE_CHECK_INTERVAL_USEC
#define NPCM_PECI_CMD_TIMEOUT_MS_DEFAULT
#define NPCM_PECI_CMD_TIMEOUT_MS_MAX
#define NPCM_PECI_HOST_NEG_BIT_RATE_DEFAULT
#define NPCM_PECI_PULL_DOWN_DEFAULT

struct npcm_peci {};

static int npcm_peci_xfer(struct peci_controller *controller, u8 addr, struct peci_request *req)
{}

static irqreturn_t npcm_peci_irq_handler(int irq, void *arg)
{}

static int npcm_peci_init_ctrl(struct npcm_peci *priv)
{}

static const struct regmap_config npcm_peci_regmap_config =;

static struct peci_controller_ops npcm_ops =;

static int npcm_peci_probe(struct platform_device *pdev)
{}

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

static struct platform_driver npcm_peci_driver =;
module_platform_driver();

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