162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci *  arch/arm/include/asm/mach/flash.h
462306a36Sopenharmony_ci *
562306a36Sopenharmony_ci *  Copyright (C) 2003 Russell King, All Rights Reserved.
662306a36Sopenharmony_ci */
762306a36Sopenharmony_ci#ifndef ASMARM_MACH_FLASH_H
862306a36Sopenharmony_ci#define ASMARM_MACH_FLASH_H
962306a36Sopenharmony_ci
1062306a36Sopenharmony_cistruct mtd_partition;
1162306a36Sopenharmony_cistruct mtd_info;
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci/*
1462306a36Sopenharmony_ci * map_name:	the map probe function name
1562306a36Sopenharmony_ci * name:	flash device name (eg, as used with mtdparts=)
1662306a36Sopenharmony_ci * width:	width of mapped device
1762306a36Sopenharmony_ci * init:	method called at driver/device initialisation
1862306a36Sopenharmony_ci * exit:	method called at driver/device removal
1962306a36Sopenharmony_ci * set_vpp:	method called to enable or disable VPP
2062306a36Sopenharmony_ci * mmcontrol:	method called to enable or disable Sync. Burst Read in OneNAND
2162306a36Sopenharmony_ci * parts:	optional array of mtd_partitions for static partitioning
2262306a36Sopenharmony_ci * nr_parts:	number of mtd_partitions for static partitioning
2362306a36Sopenharmony_ci */
2462306a36Sopenharmony_cistruct flash_platform_data {
2562306a36Sopenharmony_ci	const char	*map_name;
2662306a36Sopenharmony_ci	const char	*name;
2762306a36Sopenharmony_ci	unsigned int	width;
2862306a36Sopenharmony_ci	int		(*init)(void);
2962306a36Sopenharmony_ci	void		(*exit)(void);
3062306a36Sopenharmony_ci	void		(*set_vpp)(int on);
3162306a36Sopenharmony_ci	void		(*mmcontrol)(struct mtd_info *mtd, int sync_read);
3262306a36Sopenharmony_ci	struct mtd_partition *parts;
3362306a36Sopenharmony_ci	unsigned int	nr_parts;
3462306a36Sopenharmony_ci};
3562306a36Sopenharmony_ci
3662306a36Sopenharmony_ci#endif
37