diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-02-22 14:38:22 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-02-22 14:38:22 -0500 |
commit | e30aee9e10bb5168579e047f05c3d13d09e23356 (patch) | |
tree | 12371bdcd52d2427cad838201997479e31b6a9c9 /drivers/misc/sram.h | |
parent | 8ff546b801e5cca0337c0f0a7234795d0a6309a1 (diff) | |
parent | 6cf18e6927c0b224f972e3042fb85770d63cb9f8 (diff) |
Merge tag 'char-misc-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc driver updates from Greg KH:
"Here is the big char/misc driver patchset for 4.11-rc1.
Lots of different driver subsystems updated here: rework for the
hyperv subsystem to handle new platforms better, mei and w1 and extcon
driver updates, as well as a number of other "minor" driver updates.
All of these have been in linux-next for a while with no reported
issues"
* tag 'char-misc-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (169 commits)
goldfish: Sanitize the broken interrupt handler
x86/platform/goldfish: Prevent unconditional loading
vmbus: replace modulus operation with subtraction
vmbus: constify parameters where possible
vmbus: expose hv_begin/end_read
vmbus: remove conditional locking of vmbus_write
vmbus: add direct isr callback mode
vmbus: change to per channel tasklet
vmbus: put related per-cpu variable together
vmbus: callback is in softirq not workqueue
binder: Add support for file-descriptor arrays
binder: Add support for scatter-gather
binder: Add extra size to allocator
binder: Refactor binder_transact()
binder: Support multiple /dev instances
binder: Deal with contexts in debugfs
binder: Support multiple context managers
binder: Split flat_binder_object
auxdisplay: ht16k33: remove private workqueue
auxdisplay: ht16k33: rework input device initialization
...
Diffstat (limited to 'drivers/misc/sram.h')
-rw-r--r-- | drivers/misc/sram.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/drivers/misc/sram.h b/drivers/misc/sram.h new file mode 100644 index 000000000000..c181ce4c8fca --- /dev/null +++ b/drivers/misc/sram.h | |||
@@ -0,0 +1,58 @@ | |||
1 | /* | ||
2 | * Defines for the SRAM driver | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | #ifndef __SRAM_H | ||
9 | #define __SRAM_H | ||
10 | |||
11 | struct sram_partition { | ||
12 | void __iomem *base; | ||
13 | |||
14 | struct gen_pool *pool; | ||
15 | struct bin_attribute battr; | ||
16 | struct mutex lock; | ||
17 | struct list_head list; | ||
18 | }; | ||
19 | |||
20 | struct sram_dev { | ||
21 | struct device *dev; | ||
22 | void __iomem *virt_base; | ||
23 | |||
24 | struct gen_pool *pool; | ||
25 | struct clk *clk; | ||
26 | |||
27 | struct sram_partition *partition; | ||
28 | u32 partitions; | ||
29 | }; | ||
30 | |||
31 | struct sram_reserve { | ||
32 | struct list_head list; | ||
33 | u32 start; | ||
34 | u32 size; | ||
35 | bool export; | ||
36 | bool pool; | ||
37 | bool protect_exec; | ||
38 | const char *label; | ||
39 | }; | ||
40 | |||
41 | #ifdef CONFIG_SRAM_EXEC | ||
42 | int sram_check_protect_exec(struct sram_dev *sram, struct sram_reserve *block, | ||
43 | struct sram_partition *part); | ||
44 | int sram_add_protect_exec(struct sram_partition *part); | ||
45 | #else | ||
46 | static inline int sram_check_protect_exec(struct sram_dev *sram, | ||
47 | struct sram_reserve *block, | ||
48 | struct sram_partition *part) | ||
49 | { | ||
50 | return -ENODEV; | ||
51 | } | ||
52 | |||
53 | static inline int sram_add_protect_exec(struct sram_partition *part) | ||
54 | { | ||
55 | return -ENODEV; | ||
56 | } | ||
57 | #endif /* CONFIG_SRAM_EXEC */ | ||
58 | #endif /* __SRAM_H */ | ||