Dave Gerlach | cdd1737 | 2017-01-12 14:52:18 -0600 | [diff] [blame^] | 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 | const char *label; |
| 38 | }; |
| 39 | #endif /* __SRAM_H */ |