xref: /openbmc/linux/arch/arm/include/asm/mach/flash.h (revision 806b5228)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  *  arch/arm/include/asm/mach/flash.h
4  *
5  *  Copyright (C) 2003 Russell King, All Rights Reserved.
6  */
7 #ifndef ASMARM_MACH_FLASH_H
8 #define ASMARM_MACH_FLASH_H
9 
10 struct mtd_partition;
11 struct mtd_info;
12 
13 /*
14  * map_name:	the map probe function name
15  * name:	flash device name (eg, as used with mtdparts=)
16  * width:	width of mapped device
17  * init:	method called at driver/device initialisation
18  * exit:	method called at driver/device removal
19  * set_vpp:	method called to enable or disable VPP
20  * mmcontrol:	method called to enable or disable Sync. Burst Read in OneNAND
21  * parts:	optional array of mtd_partitions for static partitioning
22  * nr_parts:	number of mtd_partitions for static partitioning
23  */
24 struct flash_platform_data {
25 	const char	*map_name;
26 	const char	*name;
27 	unsigned int	width;
28 	int		(*init)(void);
29 	void		(*exit)(void);
30 	void		(*set_vpp)(int on);
31 	void		(*mmcontrol)(struct mtd_info *mtd, int sync_read);
32 	struct mtd_partition *parts;
33 	unsigned int	nr_parts;
34 };
35 
36 #endif
37