#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[] = …;
#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 …
#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)
{ … }
#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)
{ … }
#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)
{ … }