linux/drivers/nvmem/brcm_nvram.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2021 Rafał Miłecki <[email protected]>
 */

#include <linux/bcm47xx_nvram.h>
#include <linux/etherdevice.h>
#include <linux/if_ether.h>
#include <linux/io.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/nvmem-consumer.h>
#include <linux/nvmem-provider.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/slab.h>

#define NVRAM_MAGIC

/**
 * struct brcm_nvram - driver state internal struct
 *
 * @dev:		NVMEM device pointer
 * @nvmem_size:		Size of the whole space available for NVRAM
 * @data:		NVRAM data copy stored to avoid poking underlaying flash controller
 * @data_len:		NVRAM data size
 * @padding_byte:	Padding value used to fill remaining space
 * @cells:		Array of discovered NVMEM cells
 * @ncells:		Number of elements in cells
 */
struct brcm_nvram {};

struct brcm_nvram_header {};

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

static int brcm_nvram_copy_data(struct brcm_nvram *priv, struct platform_device *pdev)
{}

static int brcm_nvram_read_post_process_macaddr(void *context, const char *id, int index,
						unsigned int offset, void *buf, size_t bytes)
{}

static int brcm_nvram_add_cells(struct brcm_nvram *priv, uint8_t *data,
				size_t len)
{}

static int brcm_nvram_parse(struct brcm_nvram *priv)
{}

static int brcm_nvram_probe(struct platform_device *pdev)
{}

static const struct of_device_id brcm_nvram_of_match_table[] =;

static struct platform_driver brcm_nvram_driver =;

static int __init brcm_nvram_init(void)
{}

subsys_initcall_sync(brcm_nvram_init);

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();
MODULE_DEVICE_TABLE(of, brcm_nvram_of_match_table);