Thomas Gleixner | d2912cb | 2019-06-04 10:11:33 +0200 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | /* |
Russell King | 4baa992 | 2008-08-02 10:55:55 +0100 | [diff] [blame] | 3 | * arch/arm/include/asm/mach/flash.h |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4 | * |
| 5 | * Copyright (C) 2003 Russell King, All Rights Reserved. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 6 | */ |
| 7 | #ifndef ASMARM_MACH_FLASH_H |
| 8 | #define ASMARM_MACH_FLASH_H |
| 9 | |
| 10 | struct mtd_partition; |
Kyungmin Park | 861e37a | 2005-11-09 15:15:10 +0000 | [diff] [blame] | 11 | struct mtd_info; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 12 | |
| 13 | /* |
| 14 | * map_name: the map probe function name |
Russell King | 14e66f7 | 2005-10-29 16:08:31 +0100 | [diff] [blame] | 15 | * name: flash device name (eg, as used with mtdparts=) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 |
Kyungmin Park | 861e37a | 2005-11-09 15:15:10 +0000 | [diff] [blame] | 20 | * mmcontrol: method called to enable or disable Sync. Burst Read in OneNAND |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 | * parts: optional array of mtd_partitions for static partitioning |
Masahiro Yamada | 8ab102d | 2017-02-27 14:28:55 -0800 | [diff] [blame] | 22 | * nr_parts: number of mtd_partitions for static partitioning |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 23 | */ |
| 24 | struct flash_platform_data { |
| 25 | const char *map_name; |
Russell King | 14e66f7 | 2005-10-29 16:08:31 +0100 | [diff] [blame] | 26 | const char *name; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 27 | unsigned int width; |
| 28 | int (*init)(void); |
| 29 | void (*exit)(void); |
| 30 | void (*set_vpp)(int on); |
Kyungmin Park | 861e37a | 2005-11-09 15:15:10 +0000 | [diff] [blame] | 31 | void (*mmcontrol)(struct mtd_info *mtd, int sync_read); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 32 | struct mtd_partition *parts; |
| 33 | unsigned int nr_parts; |
| 34 | }; |
| 35 | |
| 36 | #endif |