linux/drivers/mtd/maps/physmap-versatile.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Versatile OF physmap driver add-on
 *
 * Copyright (c) 2016, Linaro Limited
 * Author: Linus Walleij <[email protected]>
 */
#include <linux/export.h>
#include <linux/io.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/mtd/map.h>
#include <linux/mfd/syscon.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/bitops.h>
#include "physmap-versatile.h"

static struct regmap *syscon_regmap;

enum versatile_flashprot {};

static const struct of_device_id syscon_match[] =;

/*
 * Flash protection handling for the Integrator/AP
 */
#define INTEGRATOR_SC_CTRLS_OFFSET
#define INTEGRATOR_SC_CTRLC_OFFSET
#define INTEGRATOR_SC_CTRL_FLVPPEN
#define INTEGRATOR_SC_CTRL_FLWP

#define INTEGRATOR_EBI_CSR1_OFFSET
/* The manual says bit 2, the code says bit 3, trust the code */
#define INTEGRATOR_EBI_WRITE_ENABLE
#define INTEGRATOR_EBI_LOCK_OFFSET
#define INTEGRATOR_EBI_LOCK_VAL

static const struct of_device_id ebi_match[] =;

static int ap_flash_init(struct platform_device *pdev)
{}

static void ap_flash_set_vpp(struct map_info *map, int on)
{}

/*
 * Flash protection handling for the Integrator/CP
 */

#define INTCP_FLASHPROG_OFFSET
#define CINTEGRATOR_FLVPPEN
#define CINTEGRATOR_FLWREN
#define CINTEGRATOR_FLMASK

static void cp_flash_set_vpp(struct map_info *map, int on)
{}

/*
 * Flash protection handling for the Versatiles and RealViews
 */

#define VERSATILE_SYS_FLASH_OFFSET

static void versatile_flash_set_vpp(struct map_info *map, int on)
{}

int of_flash_probe_versatile(struct platform_device *pdev,
			     struct device_node *np,
			     struct map_info *map)
{}