aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-omap2/clock.c2
-rw-r--r--arch/arm/mach-omap2/clock24xx.c2
-rw-r--r--arch/arm/mach-omap2/clock34xx.c2
-rw-r--r--arch/arm/mach-omap2/io.c4
-rw-r--r--arch/arm/mach-omap2/memory.c9
-rw-r--r--arch/arm/mach-omap2/memory.h43
-rw-r--r--arch/arm/plat-omap/include/mach/gpmc.h2
-rw-r--r--arch/arm/plat-omap/include/mach/sdrc.h21
8 files changed, 35 insertions, 50 deletions
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
index 5d7d4c52f37e..18fddb660ff9 100644
--- a/arch/arm/mach-omap2/clock.c
+++ b/arch/arm/mach-omap2/clock.c
@@ -29,7 +29,7 @@
29#include <mach/cpu.h> 29#include <mach/cpu.h>
30#include <asm/div64.h> 30#include <asm/div64.h>
31 31
32#include "memory.h" 32#include <mach/sdrc.h>
33#include "sdrc.h" 33#include "sdrc.h"
34#include "clock.h" 34#include "clock.h"
35#include "prm.h" 35#include "prm.h"
diff --git a/arch/arm/mach-omap2/clock24xx.c b/arch/arm/mach-omap2/clock24xx.c
index b9902666e4b7..83911ad48733 100644
--- a/arch/arm/mach-omap2/clock24xx.c
+++ b/arch/arm/mach-omap2/clock24xx.c
@@ -33,7 +33,7 @@
33#include <asm/div64.h> 33#include <asm/div64.h>
34#include <asm/clkdev.h> 34#include <asm/clkdev.h>
35 35
36#include "memory.h" 36#include <mach/sdrc.h>
37#include "clock.h" 37#include "clock.h"
38#include "prm.h" 38#include "prm.h"
39#include "prm-regbits-24xx.h" 39#include "prm-regbits-24xx.h"
diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c
index 3d756babb2f4..52385b1506e0 100644
--- a/arch/arm/mach-omap2/clock34xx.c
+++ b/arch/arm/mach-omap2/clock34xx.c
@@ -32,7 +32,7 @@
32#include <asm/div64.h> 32#include <asm/div64.h>
33#include <asm/clkdev.h> 33#include <asm/clkdev.h>
34 34
35#include "memory.h" 35#include <mach/sdrc.h>
36#include "clock.h" 36#include "clock.h"
37#include "prm.h" 37#include "prm.h"
38#include "prm-regbits-34xx.h" 38#include "prm-regbits-34xx.h"
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 5ea64f926ed5..2b5f28a3c4b4 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -27,8 +27,8 @@
27#include <mach/mux.h> 27#include <mach/mux.h>
28#include <mach/omapfb.h> 28#include <mach/omapfb.h>
29#include <mach/sram.h> 29#include <mach/sram.h>
30 30#include <mach/sdrc.h>
31#include "memory.h" 31#include <mach/gpmc.h>
32 32
33#include "clock.h" 33#include "clock.h"
34 34
diff --git a/arch/arm/mach-omap2/memory.c b/arch/arm/mach-omap2/memory.c
index 882c70224292..93cb25715bac 100644
--- a/arch/arm/mach-omap2/memory.c
+++ b/arch/arm/mach-omap2/memory.c
@@ -29,9 +29,16 @@
29 29
30#include "prm.h" 30#include "prm.h"
31 31
32#include "memory.h" 32#include <mach/sdrc.h>
33#include "sdrc.h" 33#include "sdrc.h"
34 34
35/* Memory timing, DLL mode flags */
36#define M_DDR 1
37#define M_LOCK_CTRL (1 << 2)
38#define M_UNLOCK 0
39#define M_LOCK 1
40
41
35void __iomem *omap2_sdrc_base; 42void __iomem *omap2_sdrc_base;
36void __iomem *omap2_sms_base; 43void __iomem *omap2_sms_base;
37 44
diff --git a/arch/arm/mach-omap2/memory.h b/arch/arm/mach-omap2/memory.h
deleted file mode 100644
index bb3db80a7c46..000000000000
--- a/arch/arm/mach-omap2/memory.h
+++ /dev/null
@@ -1,43 +0,0 @@
1/*
2 * linux/arch/arm/mach-omap2/memory.h
3 *
4 * Interface for memory timing related functions for OMAP24XX
5 *
6 * Copyright (C) 2005 Texas Instruments Inc.
7 * Richard Woodruff <r-woodruff2@ti.com>
8 *
9 * Copyright (C) 2005 Nokia Corporation
10 * Tony Lindgren <tony@atomide.com>
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
15 */
16
17#ifndef ARCH_ARM_MACH_OMAP2_MEMORY_H
18#define ARCH_ARM_MACH_OMAP2_MEMORY_H
19
20/* Memory timings */
21#define M_DDR 1
22#define M_LOCK_CTRL (1 << 2)
23#define M_UNLOCK 0
24#define M_LOCK 1
25
26struct memory_timings {
27 u32 m_type; /* ddr = 1, sdr = 0 */
28 u32 dll_mode; /* use lock mode = 1, unlock mode = 0 */
29 u32 slow_dll_ctrl; /* unlock mode, dll value for slow speed */
30 u32 fast_dll_ctrl; /* unlock mode, dll value for fast speed */
31 u32 base_cs; /* base chip select to use for calculations */
32};
33
34extern void omap2_init_memory_params(u32 force_lock_to_unlock_mode);
35extern u32 omap2_memory_get_slow_dll_ctrl(void);
36extern u32 omap2_memory_get_fast_dll_ctrl(void);
37extern u32 omap2_memory_get_type(void);
38u32 omap2_dll_force_needed(void);
39u32 omap2_reprogram_sdrc(u32 level, u32 force);
40void __init omap2_init_memory(void);
41void __init gpmc_init(void);
42
43#endif
diff --git a/arch/arm/plat-omap/include/mach/gpmc.h b/arch/arm/plat-omap/include/mach/gpmc.h
index 45b678439bb7..921b16532ff5 100644
--- a/arch/arm/plat-omap/include/mach/gpmc.h
+++ b/arch/arm/plat-omap/include/mach/gpmc.h
@@ -103,6 +103,6 @@ extern int gpmc_cs_request(int cs, unsigned long size, unsigned long *base);
103extern void gpmc_cs_free(int cs); 103extern void gpmc_cs_free(int cs);
104extern int gpmc_cs_set_reserved(int cs, int reserved); 104extern int gpmc_cs_set_reserved(int cs, int reserved);
105extern int gpmc_cs_reserved(int cs); 105extern int gpmc_cs_reserved(int cs);
106extern void gpmc_init(void); 106extern void __init gpmc_init(void);
107 107
108#endif 108#endif
diff --git a/arch/arm/plat-omap/include/mach/sdrc.h b/arch/arm/plat-omap/include/mach/sdrc.h
index a98c6c3beb2c..c905b5268e56 100644
--- a/arch/arm/plat-omap/include/mach/sdrc.h
+++ b/arch/arm/plat-omap/include/mach/sdrc.h
@@ -74,4 +74,25 @@
74#define SMS_SYSCONFIG 0x010 74#define SMS_SYSCONFIG 0x010
75/* REVISIT: fill in other SMS registers here */ 75/* REVISIT: fill in other SMS registers here */
76 76
77#ifndef __ASSEMBLER__
78
79struct memory_timings {
80 u32 m_type; /* ddr = 1, sdr = 0 */
81 u32 dll_mode; /* use lock mode = 1, unlock mode = 0 */
82 u32 slow_dll_ctrl; /* unlock mode, dll value for slow speed */
83 u32 fast_dll_ctrl; /* unlock mode, dll value for fast speed */
84 u32 base_cs; /* base chip select to use for calculations */
85};
86
87extern void omap2_init_memory_params(u32 force_lock_to_unlock_mode);
88extern u32 omap2_memory_get_slow_dll_ctrl(void);
89extern u32 omap2_memory_get_fast_dll_ctrl(void);
90extern u32 omap2_memory_get_type(void);
91u32 omap2_dll_force_needed(void);
92u32 omap2_reprogram_sdrc(u32 level, u32 force);
93void __init omap2_init_memory(void);
94
95#endif
96
97
77#endif 98#endif