linux/drivers/mtd/spi-nor/atmel.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) 2005, Intec Automation Inc.
 * Copyright (C) 2014, Freescale Semiconductor, Inc.
 */

#include <linux/mtd/spi-nor.h>

#include "core.h"

#define ATMEL_SR_GLOBAL_PROTECT_MASK

/*
 * The Atmel AT25FS010/AT25FS040 parts have some weird configuration for the
 * block protection bits. We don't support them. But legacy behavior in linux
 * is to unlock the whole flash array on startup. Therefore, we have to support
 * exactly this operation.
 */
static int at25fs_nor_lock(struct spi_nor *nor, loff_t ofs, u64 len)
{}

static int at25fs_nor_unlock(struct spi_nor *nor, loff_t ofs, u64 len)
{}

static int at25fs_nor_is_locked(struct spi_nor *nor, loff_t ofs, u64 len)
{}

static const struct spi_nor_locking_ops at25fs_nor_locking_ops =;

static int at25fs_nor_late_init(struct spi_nor *nor)
{}

static const struct spi_nor_fixups at25fs_nor_fixups =;

/**
 * atmel_nor_set_global_protection - Do a Global Protect or Unprotect command
 * @nor:	pointer to 'struct spi_nor'
 * @ofs:	offset in bytes
 * @len:	len in bytes
 * @is_protect:	if true do a Global Protect otherwise it is a Global Unprotect
 *
 * Return: 0 on success, -error otherwise.
 */
static int atmel_nor_set_global_protection(struct spi_nor *nor, loff_t ofs,
					   u64 len, bool is_protect)
{}

static int atmel_nor_global_protect(struct spi_nor *nor, loff_t ofs, u64 len)
{}

static int atmel_nor_global_unprotect(struct spi_nor *nor, loff_t ofs, u64 len)
{}

static int atmel_nor_is_global_protected(struct spi_nor *nor, loff_t ofs,
					 u64 len)
{}

static const struct spi_nor_locking_ops atmel_nor_global_protection_ops =;

static int atmel_nor_global_protection_late_init(struct spi_nor *nor)
{}

static const struct spi_nor_fixups atmel_nor_global_protection_fixups =;

static const struct flash_info atmel_nor_parts[] =;

const struct spi_nor_manufacturer spi_nor_atmel =;