linux/drivers/memory/renesas-rpc-if.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Renesas RPC-IF core driver
 *
 * Copyright (C) 2018-2019 Renesas Solutions Corp.
 * Copyright (C) 2019 Macronix International Co., Ltd.
 * Copyright (C) 2019-2020 Cogent Embedded, Inc.
 */

#include <linux/bitops.h>
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/of.h>
#include <linux/regmap.h>
#include <linux/reset.h>

#include <memory/renesas-rpc-if.h>

#define RPCIF_CMNCR
#define RPCIF_CMNCR_MD
#define RPCIF_CMNCR_MOIIO3(val)
#define RPCIF_CMNCR_MOIIO2(val)
#define RPCIF_CMNCR_MOIIO1(val)
#define RPCIF_CMNCR_MOIIO0(val)
#define RPCIF_CMNCR_MOIIO(val)
#define RPCIF_CMNCR_IO3FV(val)
#define RPCIF_CMNCR_IO2FV(val)
#define RPCIF_CMNCR_IO0FV(val)
#define RPCIF_CMNCR_IOFV(val)
#define RPCIF_CMNCR_BSZ(val)

#define RPCIF_SSLDR
#define RPCIF_SSLDR_SPNDL(d)
#define RPCIF_SSLDR_SLNDL(d)
#define RPCIF_SSLDR_SCKDL(d)

#define RPCIF_DRCR
#define RPCIF_DRCR_SSLN
#define RPCIF_DRCR_RBURST(v)
#define RPCIF_DRCR_RCF
#define RPCIF_DRCR_RBE
#define RPCIF_DRCR_SSLE

#define RPCIF_DRCMR
#define RPCIF_DRCMR_CMD(c)
#define RPCIF_DRCMR_OCMD(c)

#define RPCIF_DREAR
#define RPCIF_DREAR_EAV(c)
#define RPCIF_DREAR_EAC(c)

#define RPCIF_DROPR

#define RPCIF_DRENR
#define RPCIF_DRENR_CDB(o)
#define RPCIF_DRENR_OCDB(o)
#define RPCIF_DRENR_ADB(o)
#define RPCIF_DRENR_OPDB(o)
#define RPCIF_DRENR_DRDB(o)
#define RPCIF_DRENR_DME
#define RPCIF_DRENR_CDE
#define RPCIF_DRENR_OCDE
#define RPCIF_DRENR_ADE(v)
#define RPCIF_DRENR_OPDE(v)

#define RPCIF_SMCR
#define RPCIF_SMCR_SSLKP
#define RPCIF_SMCR_SPIRE
#define RPCIF_SMCR_SPIWE
#define RPCIF_SMCR_SPIE

#define RPCIF_SMCMR
#define RPCIF_SMCMR_CMD(c)
#define RPCIF_SMCMR_OCMD(c)

#define RPCIF_SMADR

#define RPCIF_SMOPR
#define RPCIF_SMOPR_OPD3(o)
#define RPCIF_SMOPR_OPD2(o)
#define RPCIF_SMOPR_OPD1(o)
#define RPCIF_SMOPR_OPD0(o)

#define RPCIF_SMENR
#define RPCIF_SMENR_CDB(o)
#define RPCIF_SMENR_OCDB(o)
#define RPCIF_SMENR_ADB(o)
#define RPCIF_SMENR_OPDB(o)
#define RPCIF_SMENR_SPIDB(o)
#define RPCIF_SMENR_DME
#define RPCIF_SMENR_CDE
#define RPCIF_SMENR_OCDE
#define RPCIF_SMENR_ADE(v)
#define RPCIF_SMENR_OPDE(v)
#define RPCIF_SMENR_SPIDE(v)

#define RPCIF_SMRDR0
#define RPCIF_SMRDR1
#define RPCIF_SMWDR0
#define RPCIF_SMWDR1

#define RPCIF_CMNSR
#define RPCIF_CMNSR_SSLF
#define RPCIF_CMNSR_TEND

#define RPCIF_DRDMCR
#define RPCIF_DMDMCR_DMCYC(v)

#define RPCIF_DRDRENR
#define RPCIF_DRDRENR_HYPE(v)
#define RPCIF_DRDRENR_ADDRE
#define RPCIF_DRDRENR_OPDRE
#define RPCIF_DRDRENR_DRDRE

#define RPCIF_SMDMCR
#define RPCIF_SMDMCR_DMCYC(v)

#define RPCIF_SMDRENR
#define RPCIF_SMDRENR_HYPE(v)
#define RPCIF_SMDRENR_ADDRE
#define RPCIF_SMDRENR_OPDRE
#define RPCIF_SMDRENR_SPIDRE

#define RPCIF_PHYADD
#define RPCIF_PHYWR

#define RPCIF_PHYCNT
#define RPCIF_PHYCNT_CAL
#define RPCIF_PHYCNT_OCTA(v)
#define RPCIF_PHYCNT_EXDS
#define RPCIF_PHYCNT_OCT
#define RPCIF_PHYCNT_DDRCAL
#define RPCIF_PHYCNT_HS
#define RPCIF_PHYCNT_CKSEL(v)
#define RPCIF_PHYCNT_STRTIM(v)

#define RPCIF_PHYCNT_WBUF2
#define RPCIF_PHYCNT_WBUF
#define RPCIF_PHYCNT_PHYMEM(v)
#define RPCIF_PHYCNT_PHYMEM_MASK

#define RPCIF_PHYOFFSET1
#define RPCIF_PHYOFFSET1_DDRTMG(v)

#define RPCIF_PHYOFFSET2
#define RPCIF_PHYOFFSET2_OCTTMG(v)

#define RPCIF_PHYINT
#define RPCIF_PHYINT_WPVAL

static const struct regmap_range rpcif_volatile_ranges[] =;

static const struct regmap_access_table rpcif_volatile_table =;

struct rpcif_info {};

struct rpcif_priv {};

static const struct rpcif_info rpcif_info_r8a7796 =;

static const struct rpcif_info rpcif_info_gen3 =;

static const struct rpcif_info rpcif_info_rz_g2l =;

static const struct rpcif_info rpcif_info_gen4 =;

/*
 * Custom accessor functions to ensure SM[RW]DR[01] are always accessed with
 * proper width.  Requires rpcif_priv.xfer_size to be correctly set before!
 */
static int rpcif_reg_read(void *context, unsigned int reg, unsigned int *val)
{}

static int rpcif_reg_write(void *context, unsigned int reg, unsigned int val)
{}

static const struct regmap_config rpcif_regmap_config =;

int rpcif_sw_init(struct rpcif *rpcif, struct device *dev)
{}
EXPORT_SYMBOL();

static void rpcif_rzg2l_timing_adjust_sdr(struct rpcif_priv *rpc)
{}

int rpcif_hw_init(struct device *dev, bool hyperflash)
{}
EXPORT_SYMBOL();

static int wait_msg_xfer_end(struct rpcif_priv *rpc)
{}

static u8 rpcif_bits_set(struct rpcif_priv *rpc, u32 nbytes)
{}

static u8 rpcif_bit_size(u8 buswidth)
{}

void rpcif_prepare(struct device *dev, const struct rpcif_op *op, u64 *offs,
		   size_t *len)
{}
EXPORT_SYMBOL();

int rpcif_manual_xfer(struct device *dev)
{}
EXPORT_SYMBOL();

static void memcpy_fromio_readw(void *to,
				const void __iomem *from,
				size_t count)
{}

ssize_t rpcif_dirmap_read(struct device *dev, u64 offs, size_t len, void *buf)
{}
EXPORT_SYMBOL();

static int rpcif_probe(struct platform_device *pdev)
{}

static void rpcif_remove(struct platform_device *pdev)
{}

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

static struct platform_driver rpcif_driver =;
module_platform_driver();

MODULE_DESCRIPTION();
MODULE_LICENSE();