blob: 111315a69354943450be64243490a697bb1e3f23 [file] [log] [blame]
Tony Lindgren5e1c5ff2005-07-10 19:58:15 +01001/*
2 * linux/arch/arm/plat-omap/common.c
3 *
4 * Code common to all OMAP machines.
Santosh Shilimkar44169072009-05-28 14:16:04 -07005 * The file is created by Tony Lindgren <tony@atomide.com>
6 *
7 * Copyright (C) 2009 Texas Instruments
8 * Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@ti.com>
Tony Lindgren5e1c5ff2005-07-10 19:58:15 +01009 *
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.
13 */
Tony Lindgren5e1c5ff2005-07-10 19:58:15 +010014#include <linux/kernel.h>
15#include <linux/init.h>
Russell Kingfced80c2008-09-06 12:10:45 +010016#include <linux/io.h>
Tony Lindgren16edc3df2011-12-06 05:45:37 +010017#include <linux/dma-mapping.h>
Tony Lindgren5e1c5ff2005-07-10 19:58:15 +010018
Tony Lindgrence491cf2009-10-20 09:40:47 -070019#include <plat/common.h>
Russell King71ee7da2010-05-23 10:18:16 +010020#include <plat/vram.h>
Arnd Bergmann22037472012-08-24 15:21:06 +020021#include <linux/platform_data/dsp-omap.h>
Paul Walmsleye2ed89f2012-04-13 06:34:26 -060022#include <plat/dma.h>
Tony Lindgren5e1c5ff2005-07-10 19:58:15 +010023
Santosh Shilimkar259ee572011-06-06 20:28:23 +053024#include <plat/omap-secure.h>
25
Russell King71ee7da2010-05-23 10:18:16 +010026void __init omap_reserve(void)
27{
Russell King98864ff2010-05-22 23:59:11 +010028 omap_vram_reserve_sdram_memblock();
Felipe Contreras90173882010-10-04 19:09:14 +030029 omap_dsp_reserve_sdram_memblock();
Santosh Shilimkar259ee572011-06-06 20:28:23 +053030 omap_secure_ram_reserve_memblock();
Santosh Shilimkar2ec1fc42012-02-02 19:33:55 +053031 omap_barrier_reserve_memblock();
Russell King71ee7da2010-05-23 10:18:16 +010032}
Nicolas Pitre71461822011-09-14 17:06:22 -040033
34void __init omap_init_consistent_dma_size(void)
35{
36#ifdef CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE
37 init_consistent_dma_size(CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE << 20);
38#endif
39}
R Sricharane7998402012-05-10 21:27:20 +053040
41/*
42 * Stub function for OMAP2 so that common files
43 * continue to build when custom builds are used
44 */
45int __weak omap_secure_ram_reserve_memblock(void)
46{
47 return 0;
48}