diff options
Diffstat (limited to 'include/linux/mtd/spear_smi.h')
-rw-r--r-- | include/linux/mtd/spear_smi.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/include/linux/mtd/spear_smi.h b/include/linux/mtd/spear_smi.h new file mode 100644 index 000000000000..4e26b4e38da3 --- /dev/null +++ b/include/linux/mtd/spear_smi.h | |||
@@ -0,0 +1,60 @@ | |||
1 | /* | ||
2 | * Copyright © 2010 ST Microelectronics | ||
3 | * Shiraz Hashim <shiraz.hashim@st.com> | ||
4 | * | ||
5 | * This file is licensed under the terms of the GNU General Public | ||
6 | * License version 2. This program is licensed "as is" without any | ||
7 | * warranty of any kind, whether express or implied. | ||
8 | */ | ||
9 | |||
10 | #ifndef __MTD_SPEAR_SMI_H | ||
11 | #define __MTD_SPEAR_SMI_H | ||
12 | |||
13 | #include <linux/types.h> | ||
14 | #include <linux/mtd/mtd.h> | ||
15 | #include <linux/mtd/partitions.h> | ||
16 | #include <linux/platform_device.h> | ||
17 | |||
18 | /* macro to define partitions for flash devices */ | ||
19 | #define DEFINE_PARTS(n, of, s) \ | ||
20 | { \ | ||
21 | .name = n, \ | ||
22 | .offset = of, \ | ||
23 | .size = s, \ | ||
24 | } | ||
25 | |||
26 | /** | ||
27 | * struct spear_smi_flash_info - platform structure for passing flash | ||
28 | * information | ||
29 | * | ||
30 | * name: name of the serial nor flash for identification | ||
31 | * mem_base: the memory base on which the flash is mapped | ||
32 | * size: size of the flash in bytes | ||
33 | * partitions: parition details | ||
34 | * nr_partitions: number of partitions | ||
35 | * fast_mode: whether flash supports fast mode | ||
36 | */ | ||
37 | |||
38 | struct spear_smi_flash_info { | ||
39 | char *name; | ||
40 | unsigned long mem_base; | ||
41 | unsigned long size; | ||
42 | struct mtd_partition *partitions; | ||
43 | int nr_partitions; | ||
44 | u8 fast_mode; | ||
45 | }; | ||
46 | |||
47 | /** | ||
48 | * struct spear_smi_plat_data - platform structure for configuring smi | ||
49 | * | ||
50 | * clk_rate: clk rate at which SMI must operate | ||
51 | * num_flashes: number of flashes present on board | ||
52 | * board_flash_info: specific details of each flash present on board | ||
53 | */ | ||
54 | struct spear_smi_plat_data { | ||
55 | unsigned long clk_rate; | ||
56 | int num_flashes; | ||
57 | struct spear_smi_flash_info *board_flash_info; | ||
58 | }; | ||
59 | |||
60 | #endif /* __MTD_SPEAR_SMI_H */ | ||