openocd/src/flash/nand/fileio.h
Antonio Borneo c270e96637 openocd: src/flash: replace the GPL-2.0-or-later license tag
Replace the FSF boilerplate with the SPDX tag.

The SPDX tag on files *.c is incorrect, as it should use the C99
single line comment using '//'. But current checkpatch doesn't
allow C99 comments, so keep using standard C comments, by now.

Change-Id: Ic7db91fe37d1139d42c99e303b3243b6c8fe3ea2
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7067
Tested-by: jenkins
2022-07-23 13:16:27 +00:00

46 lines
1.3 KiB
C

/* SPDX-License-Identifier: GPL-2.0-or-later */
/***************************************************************************
* Copyright (C) 2009 Zachary T Welch <zw@superlucidity.net> *
***************************************************************************/
#ifndef OPENOCD_FLASH_NAND_FILEIO_H
#define OPENOCD_FLASH_NAND_FILEIO_H
#include <helper/time_support.h>
#include <helper/fileio.h>
struct nand_fileio_state {
uint32_t address;
uint32_t size;
uint8_t *page;
uint32_t page_size;
enum oob_formats oob_format;
uint8_t *oob;
uint32_t oob_size;
const int *eccpos;
bool file_opened;
struct fileio *fileio;
struct duration bench;
};
void nand_fileio_init(struct nand_fileio_state *state);
int nand_fileio_start(struct command_invocation *cmd,
struct nand_device *nand, const char *filename, int filemode,
struct nand_fileio_state *state);
int nand_fileio_cleanup(struct nand_fileio_state *state);
int nand_fileio_finish(struct nand_fileio_state *state);
COMMAND_HELPER(nand_fileio_parse_args, struct nand_fileio_state *state,
struct nand_device **dev, enum fileio_access filemode,
bool need_size, bool sw_ecc);
int nand_fileio_read(struct nand_device *nand, struct nand_fileio_state *s);
#endif /* OPENOCD_FLASH_NAND_FILEIO_H */