Damian | 7caa434 | 2011-05-18 11:10:07 +0000 | [diff] [blame] | 1 | #ifndef __VIDEO_SH_MOBILE_MERAM_H__ |
| 2 | #define __VIDEO_SH_MOBILE_MERAM_H__ |
| 3 | |
| 4 | /* For sh_mobile_meram_info.addr_mode */ |
| 5 | enum { |
| 6 | SH_MOBILE_MERAM_MODE0 = 0, |
| 7 | SH_MOBILE_MERAM_MODE1 |
| 8 | }; |
| 9 | |
| 10 | enum { |
| 11 | SH_MOBILE_MERAM_PF_NV = 0, |
Damian | 3fedd2a | 2011-05-18 11:10:08 +0000 | [diff] [blame] | 12 | SH_MOBILE_MERAM_PF_RGB, |
| 13 | SH_MOBILE_MERAM_PF_NV24 |
Damian | 7caa434 | 2011-05-18 11:10:07 +0000 | [diff] [blame] | 14 | }; |
| 15 | |
| 16 | |
| 17 | struct sh_mobile_meram_priv; |
| 18 | struct sh_mobile_meram_ops; |
| 19 | |
Laurent Pinchart | 4811005 | 2011-12-12 16:36:13 +0100 | [diff] [blame] | 20 | /* |
| 21 | * struct sh_mobile_meram_info - MERAM platform data |
| 22 | * @reserved_icbs: Bitmask of reserved ICBs (for instance used through UIO) |
| 23 | */ |
Damian | 7caa434 | 2011-05-18 11:10:07 +0000 | [diff] [blame] | 24 | struct sh_mobile_meram_info { |
| 25 | int addr_mode; |
Laurent Pinchart | 4811005 | 2011-12-12 16:36:13 +0100 | [diff] [blame] | 26 | u32 reserved_icbs; |
Damian | 7caa434 | 2011-05-18 11:10:07 +0000 | [diff] [blame] | 27 | struct sh_mobile_meram_ops *ops; |
| 28 | struct sh_mobile_meram_priv *priv; |
| 29 | struct platform_device *pdev; |
| 30 | }; |
| 31 | |
| 32 | /* icb config */ |
Laurent Pinchart | d272f42 | 2011-09-19 11:40:31 +0200 | [diff] [blame] | 33 | struct sh_mobile_meram_icb_cfg { |
Laurent Pinchart | d272f42 | 2011-09-19 11:40:31 +0200 | [diff] [blame] | 34 | unsigned int meram_size; /* MERAM Buffer Size to use */ |
Damian | 7caa434 | 2011-05-18 11:10:07 +0000 | [diff] [blame] | 35 | }; |
| 36 | |
| 37 | struct sh_mobile_meram_cfg { |
Laurent Pinchart | 2a618e0 | 2011-09-19 11:40:31 +0200 | [diff] [blame] | 38 | struct sh_mobile_meram_icb_cfg icb[2]; |
Damian | 7caa434 | 2011-05-18 11:10:07 +0000 | [diff] [blame] | 39 | }; |
| 40 | |
| 41 | struct module; |
| 42 | struct sh_mobile_meram_ops { |
| 43 | struct module *module; |
| 44 | /* register usage of meram */ |
Laurent Pinchart | 4811005 | 2011-12-12 16:36:13 +0100 | [diff] [blame] | 45 | void *(*meram_register)(struct sh_mobile_meram_info *meram_dev, |
| 46 | const struct sh_mobile_meram_cfg *cfg, |
| 47 | unsigned int xres, unsigned int yres, |
| 48 | unsigned int pixelformat, |
Laurent Pinchart | 4811005 | 2011-12-12 16:36:13 +0100 | [diff] [blame] | 49 | unsigned int *pitch); |
Damian | 7caa434 | 2011-05-18 11:10:07 +0000 | [diff] [blame] | 50 | |
| 51 | /* unregister usage of meram */ |
Laurent Pinchart | cdf88b9 | 2011-11-22 00:56:58 +0100 | [diff] [blame] | 52 | void (*meram_unregister)(struct sh_mobile_meram_info *meram_dev, |
| 53 | void *data); |
Damian | 7caa434 | 2011-05-18 11:10:07 +0000 | [diff] [blame] | 54 | |
| 55 | /* update meram settings */ |
Laurent Pinchart | cdf88b9 | 2011-11-22 00:56:58 +0100 | [diff] [blame] | 56 | void (*meram_update)(struct sh_mobile_meram_info *meram_dev, void *data, |
| 57 | unsigned long base_addr_y, |
| 58 | unsigned long base_addr_c, |
| 59 | unsigned long *icb_addr_y, |
| 60 | unsigned long *icb_addr_c); |
Damian | 7caa434 | 2011-05-18 11:10:07 +0000 | [diff] [blame] | 61 | }; |
| 62 | |
| 63 | #endif /* __VIDEO_SH_MOBILE_MERAM_H__ */ |