~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to drivers/video/sh_mobile_meram.h

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef __sh_mobile_meram_h__
 
2
#define __sh_mobile_meram_h__
 
3
 
 
4
#include <linux/mutex.h>
 
5
#include <video/sh_mobile_meram.h>
 
6
 
 
7
/*
 
8
 * MERAM private
 
9
 */
 
10
 
 
11
#define MERAM_ICB_Y 0x1
 
12
#define MERAM_ICB_C 0x2
 
13
 
 
14
/* MERAM cache size */
 
15
#define SH_MOBILE_MERAM_ICB_NUM         32
 
16
 
 
17
#define SH_MOBILE_MERAM_CACHE_OFFSET(p) ((p) >> 16)
 
18
#define SH_MOBILE_MERAM_CACHE_SIZE(p)   ((p) & 0xffff)
 
19
 
 
20
struct sh_mobile_meram_priv {
 
21
        void __iomem    *base;
 
22
        struct mutex    lock;
 
23
        unsigned long   used_icb;
 
24
        int             used_meram_cache_regions;
 
25
        unsigned long   used_meram_cache[SH_MOBILE_MERAM_ICB_NUM];
 
26
};
 
27
 
 
28
int sh_mobile_meram_alloc_icb(const struct sh_mobile_meram_cfg *cfg,
 
29
                   int xres,
 
30
                   int yres,
 
31
                   unsigned int base_addr,
 
32
                   int yuv_mode,
 
33
                   int *marker_icb,
 
34
                   int *out_pitch);
 
35
 
 
36
void sh_mobile_meram_free_icb(int marker_icb);
 
37
 
 
38
#define SH_MOBILE_MERAM_START(ind, ab) \
 
39
        (0xC0000000 | ((ab & 0x1) << 23) | ((ind & 0x1F) << 24))
 
40
 
 
41
#endif /* !__sh_mobile_meram_h__ */