aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/sram.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-10-25 16:46:56 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-25 16:46:56 -0400
commit7b6181e06841f5ad15c4ff708b967b4db65a64de (patch)
treebdfcf5b74b692f76581156e452d268b64c795200 /arch/arm/plat-omap/sram.c
parent72e58063d63c5f0a7bf65312f1e3a5ed9bb5c2ff (diff)
parentbc487fb341af05120bccb9f59ce76302391dcc77 (diff)
Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6
* 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6: (163 commits) omap: complete removal of machine_desc.io_pg_offst and .phys_io omap: UART: fix wakeup registers for OMAP24xx UART2 omap: Fix spotty MMC voltages ASoC: OMAP4: MCPDM: Remove unnecessary include of plat/control.h serial: omap-serial: fix signess error OMAP3: DMA: Errata i541: sDMA FIFO draining does not finish omap: dma: Fix buffering disable bit setting for omap24xx omap: serial: Fix the boot-up crash/reboot without CONFIG_PM OMAP3: PM: fix scratchpad memory accesses for off-mode omap4: pandaboard: enable the ehci port on pandaboard omap4: pandaboard: Fix the init if CONFIG_MMC_OMAP_HS is not set omap4: pandaboard: remove unused hsmmc definition OMAP: McBSP: Remove null omap44xx ops comment OMAP: McBSP: Swap CLKS source definition OMAP: McBSP: Fix CLKR and FSR signal muxing OMAP2+: clock: reduce the amount of standard debugging while disabling unused clocks OMAP: control: move plat-omap/control.h to mach-omap2/control.h OMAP: split plat-omap/common.c OMAP: McBSP: implement functional clock switching via clock framework OMAP: McBSP: implement McBSP CLKR and FSR signal muxing via mach-omap2/mcbsp.c ... Fixed up trivial conflicts in arch/arm/mach-omap2/ {board-zoom-peripherals.c,devices.c} as per Tony
Diffstat (limited to 'arch/arm/plat-omap/sram.c')
-rw-r--r--arch/arm/plat-omap/sram.c37
1 files changed, 11 insertions, 26 deletions
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c
index 10b3b4c63372..e2c8eebe6b3a 100644
--- a/arch/arm/plat-omap/sram.c
+++ b/arch/arm/plat-omap/sram.c
@@ -19,6 +19,7 @@
19#include <linux/kernel.h> 19#include <linux/kernel.h>
20#include <linux/init.h> 20#include <linux/init.h>
21#include <linux/io.h> 21#include <linux/io.h>
22#include <linux/omapfb.h>
22 23
23#include <asm/tlb.h> 24#include <asm/tlb.h>
24#include <asm/cacheflush.h> 25#include <asm/cacheflush.h>
@@ -30,8 +31,8 @@
30#include <plat/cpu.h> 31#include <plat/cpu.h>
31#include <plat/vram.h> 32#include <plat/vram.h>
32 33
33#include <plat/control.h> 34#include "sram.h"
34 35#include "fb.h"
35#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) 36#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
36# include "../mach-omap2/prm.h" 37# include "../mach-omap2/prm.h"
37# include "../mach-omap2/cm.h" 38# include "../mach-omap2/cm.h"
@@ -53,7 +54,7 @@
53#define OMAP4_SRAM_PUB_PA (OMAP4_SRAM_PA + 0x4000) 54#define OMAP4_SRAM_PUB_PA (OMAP4_SRAM_PA + 0x4000)
54#define OMAP4_SRAM_PUB_VA (OMAP4_SRAM_VA + 0x4000) 55#define OMAP4_SRAM_PUB_VA (OMAP4_SRAM_VA + 0x4000)
55 56
56#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) 57#if defined(CONFIG_ARCH_OMAP2PLUS)
57#define SRAM_BOOTLOADER_SZ 0x00 58#define SRAM_BOOTLOADER_SZ 0x00
58#else 59#else
59#define SRAM_BOOTLOADER_SZ 0x80 60#define SRAM_BOOTLOADER_SZ 0x80
@@ -68,7 +69,6 @@
68#define OMAP34XX_VA_WRITEPERM0 OMAP2_L3_IO_ADDRESS(0x68012858) 69#define OMAP34XX_VA_WRITEPERM0 OMAP2_L3_IO_ADDRESS(0x68012858)
69#define OMAP34XX_VA_ADDR_MATCH2 OMAP2_L3_IO_ADDRESS(0x68012880) 70#define OMAP34XX_VA_ADDR_MATCH2 OMAP2_L3_IO_ADDRESS(0x68012880)
70#define OMAP34XX_VA_SMS_RG_ATT0 OMAP2_L3_IO_ADDRESS(0x6C000048) 71#define OMAP34XX_VA_SMS_RG_ATT0 OMAP2_L3_IO_ADDRESS(0x6C000048)
71#define OMAP34XX_VA_CONTROL_STAT OMAP2_L4_IO_ADDRESS(0x480022F0)
72 72
73#define GP_DEVICE 0x300 73#define GP_DEVICE 0x300
74 74
@@ -79,12 +79,6 @@ static unsigned long omap_sram_base;
79static unsigned long omap_sram_size; 79static unsigned long omap_sram_size;
80static unsigned long omap_sram_ceil; 80static unsigned long omap_sram_ceil;
81 81
82extern unsigned long omapfb_reserve_sram(unsigned long sram_pstart,
83 unsigned long sram_vstart,
84 unsigned long sram_size,
85 unsigned long pstart_avail,
86 unsigned long size_avail);
87
88/* 82/*
89 * Depending on the target RAMFS firewall setup, the public usable amount of 83 * Depending on the target RAMFS firewall setup, the public usable amount of
90 * SRAM varies. The default accessible size for all device types is 2k. A GP 84 * SRAM varies. The default accessible size for all device types is 2k. A GP
@@ -93,16 +87,7 @@ extern unsigned long omapfb_reserve_sram(unsigned long sram_pstart,
93 */ 87 */
94static int is_sram_locked(void) 88static int is_sram_locked(void)
95{ 89{
96 int type = 0; 90 if (OMAP2_DEVICE_TYPE_GP == omap_type()) {
97
98 if (cpu_is_omap44xx())
99 /* Not yet supported */
100 return 0;
101
102 if (cpu_is_omap242x())
103 type = omap_rev() & OMAP2_DEVICETYPE_MASK;
104
105 if (type == GP_DEVICE) {
106 /* RAMFW: R/W access to all initiators for all qualifier sets */ 91 /* RAMFW: R/W access to all initiators for all qualifier sets */
107 if (cpu_is_omap242x()) { 92 if (cpu_is_omap242x()) {
108 __raw_writel(0xFF, OMAP24XX_VA_REQINFOPERM0); /* all q-vects */ 93 __raw_writel(0xFF, OMAP24XX_VA_REQINFOPERM0); /* all q-vects */
@@ -127,7 +112,7 @@ static int is_sram_locked(void)
127 * to secure SRAM will hang the system. Also the SRAM is not 112 * to secure SRAM will hang the system. Also the SRAM is not
128 * yet mapped at this point. 113 * yet mapped at this point.
129 */ 114 */
130void __init omap_detect_sram(void) 115static void __init omap_detect_sram(void)
131{ 116{
132 unsigned long reserved; 117 unsigned long reserved;
133 118
@@ -213,7 +198,7 @@ static struct map_desc omap_sram_io_desc[] __initdata = {
213/* 198/*
214 * Note that we cannot use ioremap for SRAM, as clock init needs SRAM early. 199 * Note that we cannot use ioremap for SRAM, as clock init needs SRAM early.
215 */ 200 */
216void __init omap_map_sram(void) 201static void __init omap_map_sram(void)
217{ 202{
218 unsigned long base; 203 unsigned long base;
219 204
@@ -330,7 +315,7 @@ u32 omap2_set_prcm(u32 dpll_ctrl_val, u32 sdrc_rfr_val, int bypass)
330#endif 315#endif
331 316
332#ifdef CONFIG_ARCH_OMAP2420 317#ifdef CONFIG_ARCH_OMAP2420
333int __init omap242x_sram_init(void) 318static int __init omap242x_sram_init(void)
334{ 319{
335 _omap2_sram_ddr_init = omap_sram_push(omap242x_sram_ddr_init, 320 _omap2_sram_ddr_init = omap_sram_push(omap242x_sram_ddr_init,
336 omap242x_sram_ddr_init_sz); 321 omap242x_sram_ddr_init_sz);
@@ -351,7 +336,7 @@ static inline int omap242x_sram_init(void)
351#endif 336#endif
352 337
353#ifdef CONFIG_ARCH_OMAP2430 338#ifdef CONFIG_ARCH_OMAP2430
354int __init omap243x_sram_init(void) 339static int __init omap243x_sram_init(void)
355{ 340{
356 _omap2_sram_ddr_init = omap_sram_push(omap243x_sram_ddr_init, 341 _omap2_sram_ddr_init = omap_sram_push(omap243x_sram_ddr_init,
357 omap243x_sram_ddr_init_sz); 342 omap243x_sram_ddr_init_sz);
@@ -407,7 +392,7 @@ void omap3_sram_restore_context(void)
407} 392}
408#endif /* CONFIG_PM */ 393#endif /* CONFIG_PM */
409 394
410int __init omap34xx_sram_init(void) 395static int __init omap34xx_sram_init(void)
411{ 396{
412 _omap3_sram_configure_core_dpll = 397 _omap3_sram_configure_core_dpll =
413 omap_sram_push(omap3_sram_configure_core_dpll, 398 omap_sram_push(omap3_sram_configure_core_dpll,
@@ -423,7 +408,7 @@ static inline int omap34xx_sram_init(void)
423#endif 408#endif
424 409
425#ifdef CONFIG_ARCH_OMAP4 410#ifdef CONFIG_ARCH_OMAP4
426int __init omap44xx_sram_init(void) 411static int __init omap44xx_sram_init(void)
427{ 412{
428 printk(KERN_ERR "FIXME: %s not implemented\n", __func__); 413 printk(KERN_ERR "FIXME: %s not implemented\n", __func__);
429 414