1
#ifndef __sh_mobile_meram_h__
2
#define __sh_mobile_meram_h__
4
#include <linux/mutex.h>
5
#include <video/sh_mobile_meram.h>
11
#define MERAM_ICB_Y 0x1
12
#define MERAM_ICB_C 0x2
14
/* MERAM cache size */
15
#define SH_MOBILE_MERAM_ICB_NUM 32
17
#define SH_MOBILE_MERAM_CACHE_OFFSET(p) ((p) >> 16)
18
#define SH_MOBILE_MERAM_CACHE_SIZE(p) ((p) & 0xffff)
20
struct sh_mobile_meram_priv {
23
unsigned long used_icb;
24
int used_meram_cache_regions;
25
unsigned long used_meram_cache[SH_MOBILE_MERAM_ICB_NUM];
28
int sh_mobile_meram_alloc_icb(const struct sh_mobile_meram_cfg *cfg,
31
unsigned int base_addr,
36
void sh_mobile_meram_free_icb(int marker_icb);
38
#define SH_MOBILE_MERAM_START(ind, ab) \
39
(0xC0000000 | ((ab & 0x1) << 23) | ((ind & 0x1F) << 24))
41
#endif /* !__sh_mobile_meram_h__ */