1 #ifndef __VIDEO_SH_MOBILE_MERAM_H__
2 #define __VIDEO_SH_MOBILE_MERAM_H__
4 /* For sh_mobile_meram_info.addr_mode */
6 SH_MOBILE_MERAM_MODE0 = 0,
11 SH_MOBILE_MERAM_PF_NV = 0,
12 SH_MOBILE_MERAM_PF_RGB,
13 SH_MOBILE_MERAM_PF_NV24
17 struct sh_mobile_meram_priv;
20 * struct sh_mobile_meram_info - MERAM platform data
21 * @reserved_icbs: Bitmask of reserved ICBs (for instance used through UIO)
23 struct sh_mobile_meram_info {
26 struct sh_mobile_meram_priv *priv;
27 struct platform_device *pdev;
31 struct sh_mobile_meram_icb_cfg {
32 unsigned int meram_size; /* MERAM Buffer Size to use */
35 struct sh_mobile_meram_cfg {
36 struct sh_mobile_meram_icb_cfg icb[2];
39 #if defined(CONFIG_FB_SH_MOBILE_MERAM) || \
40 defined(CONFIG_FB_SH_MOBILE_MERAM_MODULE)
41 void *sh_mobile_meram_cache_alloc(struct sh_mobile_meram_info *dev,
42 const struct sh_mobile_meram_cfg *cfg,
43 unsigned int xres, unsigned int yres,
44 unsigned int pixelformat,
46 void sh_mobile_meram_cache_free(struct sh_mobile_meram_info *dev, void *data);
47 void sh_mobile_meram_cache_update(struct sh_mobile_meram_info *dev, void *data,
48 unsigned long base_addr_y,
49 unsigned long base_addr_c,
50 unsigned long *icb_addr_y,
51 unsigned long *icb_addr_c);
54 sh_mobile_meram_cache_alloc(struct sh_mobile_meram_info *dev,
55 const struct sh_mobile_meram_cfg *cfg,
56 unsigned int xres, unsigned int yres,
57 unsigned int pixelformat,
60 return ERR_PTR(-ENODEV);
64 sh_mobile_meram_cache_free(struct sh_mobile_meram_info *dev, void *data)
69 sh_mobile_meram_cache_update(struct sh_mobile_meram_info *dev, void *data,
70 unsigned long base_addr_y,
71 unsigned long base_addr_c,
72 unsigned long *icb_addr_y,
73 unsigned long *icb_addr_c)
78 #endif /* __VIDEO_SH_MOBILE_MERAM_H__ */