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

// SPDX-License-Identifier: GPL-2.0
/*
 * Cortina Systems Gemini OF physmap add-on
 * Copyright (C) 2017 Linus Walleij <[email protected]>
 *
 * This SoC has an elaborate flash control register, so we need to
 * detect and set it up when booting on this platform.
 */
#include <linux/export.h>
#include <linux/of.h>
#include <linux/mtd/map.h>
#include <linux/mtd/xip.h>
#include <linux/mfd/syscon.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/bitops.h>
#include <linux/pinctrl/consumer.h>
#include "physmap-gemini.h"

/*
 * The Flash-relevant parts of the global status register
 * These would also be relevant for a NAND driver.
 */
#define GLOBAL_STATUS
#define FLASH_TYPE_MASK
#define FLASH_TYPE_NAND_2K
#define FLASH_TYPE_NAND_512
#define FLASH_TYPE_PARALLEL
#define FLASH_TYPE_SERIAL
/* if parallel */
#define FLASH_WIDTH_16BIT
/* if serial */
#define FLASH_ATMEL

#define FLASH_SIZE_MASK
#define NAND_256M
#define NAND_128M
#define NAND_64M
#define NAND_32M
#define ATMEL_16M
#define ATMEL_8M
#define ATMEL_4M_2M
#define ATMEL_1M
#define STM_32M
#define STM_16M

#define FLASH_PARALLEL_HIGH_PIN_CNT

struct gemini_flash {};

/* Static local state */
static struct gemini_flash *gf;

static void gemini_flash_enable_pins(void)
{}

static void gemini_flash_disable_pins(void)
{}

static map_word __xipram gemini_flash_map_read(struct map_info *map,
					       unsigned long ofs)
{}

static void __xipram gemini_flash_map_write(struct map_info *map,
					    const map_word datum,
					    unsigned long ofs)
{}

static void __xipram gemini_flash_map_copy_from(struct map_info *map,
						void *to, unsigned long from,
						ssize_t len)
{}

static void __xipram gemini_flash_map_copy_to(struct map_info *map,
					      unsigned long to,
					      const void *from, ssize_t len)
{}

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