Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
Russell King | 4baa992 | 2008-08-02 10:55:55 +0100 | [diff] [blame] | 2 | * arch/arm/include/asm/mach/flash.h |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3 | * |
| 4 | * Copyright (C) 2003 Russell King, All Rights Reserved. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License version 2 as |
| 8 | * published by the Free Software Foundation. |
| 9 | */ |
| 10 | #ifndef ASMARM_MACH_FLASH_H |
| 11 | #define ASMARM_MACH_FLASH_H |
| 12 | |
| 13 | struct mtd_partition; |
Kyungmin Park | 861e37a | 2005-11-09 15:15:10 +0000 | [diff] [blame] | 14 | struct mtd_info; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 15 | |
Sujit Reddy Thumma | ec9b325 | 2012-04-23 15:53:45 +0530 | [diff] [blame] | 16 | enum sw_version { |
| 17 | VERSION_1 = 0, |
| 18 | VERSION_2, |
| 19 | }; |
| 20 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 | /* |
| 22 | * map_name: the map probe function name |
Russell King | 14e66f7 | 2005-10-29 16:08:31 +0100 | [diff] [blame] | 23 | * name: flash device name (eg, as used with mtdparts=) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 24 | * width: width of mapped device |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 25 | * interleave: interleave mode feature support |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 26 | * init: method called at driver/device initialisation |
| 27 | * exit: method called at driver/device removal |
| 28 | * set_vpp: method called to enable or disable VPP |
Kyungmin Park | 861e37a | 2005-11-09 15:15:10 +0000 | [diff] [blame] | 29 | * mmcontrol: method called to enable or disable Sync. Burst Read in OneNAND |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 30 | * parts: optional array of mtd_partitions for static partitioning |
| 31 | * nr_parts: number of mtd_partitions for static partitoning |
Sujit Reddy Thumma | ec9b325 | 2012-04-23 15:53:45 +0530 | [diff] [blame] | 32 | * version: software register interface version |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 33 | */ |
| 34 | struct flash_platform_data { |
| 35 | const char *map_name; |
Russell King | 14e66f7 | 2005-10-29 16:08:31 +0100 | [diff] [blame] | 36 | const char *name; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 37 | unsigned int width; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 38 | unsigned int interleave; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 39 | int (*init)(void); |
| 40 | void (*exit)(void); |
| 41 | void (*set_vpp)(int on); |
Kyungmin Park | 861e37a | 2005-11-09 15:15:10 +0000 | [diff] [blame] | 42 | void (*mmcontrol)(struct mtd_info *mtd, int sync_read); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 43 | struct mtd_partition *parts; |
| 44 | unsigned int nr_parts; |
Sujit Reddy Thumma | ec9b325 | 2012-04-23 15:53:45 +0530 | [diff] [blame] | 45 | enum sw_version version; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 46 | }; |
| 47 | |
| 48 | #endif |