blob: c9cbfdefc938cee1893682ef40eb7fd2364b4b64 [file] [log] [blame]
Thomas Gleixnerd2912cb2019-06-04 10:11:33 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002/*
Russell King4baa9922008-08-02 10:55:55 +01003 * arch/arm/include/asm/mach/flash.h
Linus Torvalds1da177e2005-04-16 15:20:36 -07004 *
5 * Copyright (C) 2003 Russell King, All Rights Reserved.
Linus Torvalds1da177e2005-04-16 15:20:36 -07006 */
7#ifndef ASMARM_MACH_FLASH_H
8#define ASMARM_MACH_FLASH_H
9
10struct mtd_partition;
Kyungmin Park861e37a2005-11-09 15:15:10 +000011struct mtd_info;
Linus Torvalds1da177e2005-04-16 15:20:36 -070012
13/*
14 * map_name: the map probe function name
Russell King14e66f72005-10-29 16:08:31 +010015 * name: flash device name (eg, as used with mtdparts=)
Linus Torvalds1da177e2005-04-16 15:20:36 -070016 * 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
Kyungmin Park861e37a2005-11-09 15:15:10 +000020 * mmcontrol: method called to enable or disable Sync. Burst Read in OneNAND
Linus Torvalds1da177e2005-04-16 15:20:36 -070021 * parts: optional array of mtd_partitions for static partitioning
Masahiro Yamada8ab102d2017-02-27 14:28:55 -080022 * nr_parts: number of mtd_partitions for static partitioning
Linus Torvalds1da177e2005-04-16 15:20:36 -070023 */
24struct flash_platform_data {
25 const char *map_name;
Russell King14e66f72005-10-29 16:08:31 +010026 const char *name;
Linus Torvalds1da177e2005-04-16 15:20:36 -070027 unsigned int width;
28 int (*init)(void);
29 void (*exit)(void);
30 void (*set_vpp)(int on);
Kyungmin Park861e37a2005-11-09 15:15:10 +000031 void (*mmcontrol)(struct mtd_info *mtd, int sync_read);
Linus Torvalds1da177e2005-04-16 15:20:36 -070032 struct mtd_partition *parts;
33 unsigned int nr_parts;
34};
35
36#endif