2 * linux/arch/arm/plat-omap/common.c
4 * Code common to all OMAP machines.
5 * The file is created by Tony Lindgren <tony@atomide.com>
7 * Copyright (C) 2009 Texas Instruments
8 * Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@ti.com>
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
14 #include <linux/kernel.h>
15 #include <linux/init.h>
17 #include <linux/dma-mapping.h>
18 #include <linux/omapfb.h>
20 #include <plat/common.h>
21 #include <plat/board.h>
22 #include <plat/vram.h>
25 #include <plat/omap-secure.h>
28 #define NO_LENGTH_CHECK 0xffffffff
30 struct omap_board_config_kernel
*omap_board_config __initdata
;
31 int omap_board_config_size
;
33 static const void *__init
get_config(u16 tag
, size_t len
,
34 int skip
, size_t *len_out
)
36 struct omap_board_config_kernel
*kinfo
= NULL
;
39 /* Try to find the config from the board-specific structures
41 for (i
= 0; i
< omap_board_config_size
; i
++) {
42 if (omap_board_config
[i
].tag
== tag
) {
44 kinfo
= &omap_board_config
[i
];
56 const void *__init
__omap_get_config(u16 tag
, size_t len
, int nr
)
58 return get_config(tag
, len
, nr
, NULL
);
61 const void *__init
omap_get_var_config(u16 tag
, size_t *len
)
63 return get_config(tag
, NO_LENGTH_CHECK
, 0, len
);
66 void __init
omap_reserve(void)
68 omapfb_reserve_sdram_memblock();
69 omap_vram_reserve_sdram_memblock();
70 omap_dsp_reserve_sdram_memblock();
71 omap_secure_ram_reserve_memblock();
72 omap_barrier_reserve_memblock();
75 void __init
omap_init_consistent_dma_size(void)
77 #ifdef CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE
78 init_consistent_dma_size(CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE
<< 20);