Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[linux-btrfs-devel.git] / arch / arm / plat-omap / include / plat / vram.h
blob0aa4ecd12c7d5768f74efa2d4e7977f729e2338d
1 /*
2 * VRAM manager for OMAP
4 * Copyright (C) 2009 Nokia Corporation
5 * Author: Tomi Valkeinen <tomi.valkeinen@nokia.com>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 #ifndef __OMAP_VRAM_H__
22 #define __OMAP_VRAM_H__
24 #include <linux/types.h>
26 #define OMAP_VRAM_MEMTYPE_SDRAM 0
27 #define OMAP_VRAM_MEMTYPE_SRAM 1
28 #define OMAP_VRAM_MEMTYPE_MAX 1
30 extern int omap_vram_add_region(unsigned long paddr, size_t size);
31 extern int omap_vram_free(unsigned long paddr, size_t size);
32 extern int omap_vram_alloc(int mtype, size_t size, unsigned long *paddr);
33 extern int omap_vram_reserve(unsigned long paddr, size_t size);
34 extern void omap_vram_get_info(unsigned long *vram, unsigned long *free_vram,
35 unsigned long *largest_free_block);
37 #ifdef CONFIG_OMAP2_VRAM
38 extern void omap_vram_set_sdram_vram(u32 size, u32 start);
39 extern void omap_vram_set_sram_vram(u32 size, u32 start);
41 extern void omap_vram_reserve_sdram_memblock(void);
42 extern unsigned long omap_vram_reserve_sram(unsigned long sram_pstart,
43 unsigned long sram_vstart,
44 unsigned long sram_size,
45 unsigned long pstart_avail,
46 unsigned long size_avail);
47 #else
48 static inline void omap_vram_set_sdram_vram(u32 size, u32 start) { }
49 static inline void omap_vram_set_sram_vram(u32 size, u32 start) { }
51 static inline void omap_vram_reserve_sdram_memblock(void) { }
52 static inline unsigned long omap_vram_reserve_sram(unsigned long sram_pstart,
53 unsigned long sram_vstart,
54 unsigned long sram_size,
55 unsigned long pstart_avail,
56 unsigned long size_avail)
58 return 0;
60 #endif
62 #endif