diff options
author | Paul Walmsley <paul@pwsan.com> | 2009-01-28 14:27:31 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-02-08 12:50:38 -0500 |
commit | f8de9b2c45c4506702da4bd3a5bc7630754077f9 (patch) | |
tree | f375f808bfdc0ef8c83671aca66f3150b08e44e5 /arch | |
parent | fed415e48f07799b278cd4353385fee1464d4aca (diff) |
[ARM] OMAP2 SDRC: move mach-omap2/memory.h into mach/sdrc.h
Move the contents of the arch/arm/mach-omap2/memory.h file to the
existing mach/sdrc.h file, and remove memory.h. Modify files which
include memory.h to include asm/arch/sdrc.h instead.
linux-omap source commit is e7ae2d89921372fc4b9712a32cc401d645597807.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap2/clock.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/clock24xx.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/clock34xx.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/io.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap2/memory.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-omap2/memory.h | 43 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/gpmc.h | 2 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/sdrc.h | 21 |
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 | |||
35 | void __iomem *omap2_sdrc_base; | 42 | void __iomem *omap2_sdrc_base; |
36 | void __iomem *omap2_sms_base; | 43 | void __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 | |||
26 | struct 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 | |||
34 | extern void omap2_init_memory_params(u32 force_lock_to_unlock_mode); | ||
35 | extern u32 omap2_memory_get_slow_dll_ctrl(void); | ||
36 | extern u32 omap2_memory_get_fast_dll_ctrl(void); | ||
37 | extern u32 omap2_memory_get_type(void); | ||
38 | u32 omap2_dll_force_needed(void); | ||
39 | u32 omap2_reprogram_sdrc(u32 level, u32 force); | ||
40 | void __init omap2_init_memory(void); | ||
41 | void __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); | |||
103 | extern void gpmc_cs_free(int cs); | 103 | extern void gpmc_cs_free(int cs); |
104 | extern int gpmc_cs_set_reserved(int cs, int reserved); | 104 | extern int gpmc_cs_set_reserved(int cs, int reserved); |
105 | extern int gpmc_cs_reserved(int cs); | 105 | extern int gpmc_cs_reserved(int cs); |
106 | extern void gpmc_init(void); | 106 | extern 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 | |||
79 | struct 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 | |||
87 | extern void omap2_init_memory_params(u32 force_lock_to_unlock_mode); | ||
88 | extern u32 omap2_memory_get_slow_dll_ctrl(void); | ||
89 | extern u32 omap2_memory_get_fast_dll_ctrl(void); | ||
90 | extern u32 omap2_memory_get_type(void); | ||
91 | u32 omap2_dll_force_needed(void); | ||
92 | u32 omap2_reprogram_sdrc(u32 level, u32 force); | ||
93 | void __init omap2_init_memory(void); | ||
94 | |||
95 | #endif | ||
96 | |||
97 | |||
77 | #endif | 98 | #endif |