linux/drivers/nvmem/vf610-ocotp.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2015 Toradex AG.
 *
 * Author: Sanchayan Maity <[email protected]>
 *
 * Based on the barebox ocotp driver,
 * Copyright (c) 2010 Baruch Siach <[email protected]>
 *	Orex Computed Radiography
 */

#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/nvmem-provider.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/slab.h>

/* OCOTP Register Offsets */
#define OCOTP_CTRL_REG
#define OCOTP_CTRL_SET
#define OCOTP_CTRL_CLR
#define OCOTP_TIMING
#define OCOTP_DATA
#define OCOTP_READ_CTRL_REG
#define OCOTP_READ_FUSE_DATA

/* OCOTP Register bits and masks */
#define OCOTP_CTRL_WR_UNLOCK
#define OCOTP_CTRL_WR_UNLOCK_KEY
#define OCOTP_CTRL_WR_UNLOCK_MASK
#define OCOTP_CTRL_ADDR
#define OCOTP_CTRL_ADDR_MASK
#define OCOTP_CTRL_RELOAD_SHADOWS
#define OCOTP_CTRL_ERR
#define OCOTP_CTRL_BUSY

#define OCOTP_TIMING_STROBE_READ
#define OCOTP_TIMING_STROBE_READ_MASK
#define OCOTP_TIMING_RELAX
#define OCOTP_TIMING_RELAX_MASK
#define OCOTP_TIMING_STROBE_PROG
#define OCOTP_TIMING_STROBE_PROG_MASK

#define OCOTP_READ_CTRL_READ_FUSE

#define VF610_OCOTP_TIMEOUT

#define BF(value, field)

#define DEF_RELAX

static const int base_to_fuse_addr_mappings[][2] =;

struct vf610_ocotp {};

static int vf610_ocotp_wait_busy(void __iomem *base)
{}

static int vf610_ocotp_calculate_timing(struct vf610_ocotp *ocotp_dev)
{}

static int vf610_get_fuse_address(int base_addr_offset)
{}

static int vf610_ocotp_read(void *context, unsigned int offset,
			void *val, size_t bytes)
{}

static struct nvmem_config ocotp_config =;

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

static int vf610_ocotp_probe(struct platform_device *pdev)
{}

static struct platform_driver vf610_ocotp_driver =;
module_platform_driver();
MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();