diff options
-rw-r--r-- | arch/arm/mach-omap1/clock.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap1/clock_data.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap1/devices.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap1/pm.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap2/clkt2xxx_dpllcore.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap2/clkt34xx_dpll3m2.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap2/io.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap4-common.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap2/pm24xx.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap2/pm34xx.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap2/sdrc.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/sdrc2xxx.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap2/sleep34xx.S | 2 | ||||
-rw-r--r-- | arch/arm/plat-omap/common.h | 2 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/sram.h | 105 | ||||
-rw-r--r-- | arch/arm/plat-omap/sram.c | 1 | ||||
-rw-r--r-- | arch/arm/plat-omap/sram.h | 109 |
18 files changed, 131 insertions, 126 deletions
diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c index 638f4070fc7..b15d4ee7efa 100644 --- a/arch/arm/mach-omap1/clock.c +++ b/arch/arm/mach-omap1/clock.c | |||
@@ -24,11 +24,12 @@ | |||
24 | #include <plat/cpu.h> | 24 | #include <plat/cpu.h> |
25 | #include <plat/usb.h> | 25 | #include <plat/usb.h> |
26 | #include <plat/clock.h> | 26 | #include <plat/clock.h> |
27 | #include <plat/sram.h> | ||
28 | #include <plat/clkdev_omap.h> | 27 | #include <plat/clkdev_omap.h> |
29 | 28 | ||
30 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
31 | 30 | ||
31 | #include "../plat-omap/sram.h" | ||
32 | |||
32 | #include "iomap.h" | 33 | #include "iomap.h" |
33 | #include "clock.h" | 34 | #include "clock.h" |
34 | #include "opp.h" | 35 | #include "opp.h" |
diff --git a/arch/arm/mach-omap1/clock_data.c b/arch/arm/mach-omap1/clock_data.c index 9b45f4b0ee2..4337586195a 100644 --- a/arch/arm/mach-omap1/clock_data.c +++ b/arch/arm/mach-omap1/clock_data.c | |||
@@ -25,11 +25,12 @@ | |||
25 | #include <plat/clock.h> | 25 | #include <plat/clock.h> |
26 | #include <plat/cpu.h> | 26 | #include <plat/cpu.h> |
27 | #include <plat/clkdev_omap.h> | 27 | #include <plat/clkdev_omap.h> |
28 | #include <plat/sram.h> /* for omap_sram_reprogram_clock() */ | ||
29 | 28 | ||
30 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
31 | #include <mach/usb.h> /* for OTG_BASE */ | 30 | #include <mach/usb.h> /* for OTG_BASE */ |
32 | 31 | ||
32 | #include "../plat-omap/sram.h" | ||
33 | |||
33 | #include "iomap.h" | 34 | #include "iomap.h" |
34 | #include "clock.h" | 35 | #include "clock.h" |
35 | 36 | ||
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c index 22116084c9a..645668e2b1d 100644 --- a/arch/arm/mach-omap1/devices.c +++ b/arch/arm/mach-omap1/devices.c | |||
@@ -26,6 +26,8 @@ | |||
26 | #include <mach/camera.h> | 26 | #include <mach/camera.h> |
27 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
28 | 28 | ||
29 | #include "../plat-omap/sram.h" | ||
30 | |||
29 | #include "common.h" | 31 | #include "common.h" |
30 | #include "clock.h" | 32 | #include "clock.h" |
31 | #include "dma.h" | 33 | #include "dma.h" |
diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c index bf11784b295..fa8e672a26c 100644 --- a/arch/arm/mach-omap1/pm.c +++ b/arch/arm/mach-omap1/pm.c | |||
@@ -51,7 +51,6 @@ | |||
51 | 51 | ||
52 | #include <plat/cpu.h> | 52 | #include <plat/cpu.h> |
53 | #include <plat/clock.h> | 53 | #include <plat/clock.h> |
54 | #include <plat/sram.h> | ||
55 | #include <mach/tc.h> | 54 | #include <mach/tc.h> |
56 | #include <mach/mux.h> | 55 | #include <mach/mux.h> |
57 | #include <plat-omap/dma-omap.h> | 56 | #include <plat-omap/dma-omap.h> |
@@ -59,6 +58,8 @@ | |||
59 | 58 | ||
60 | #include <mach/irqs.h> | 59 | #include <mach/irqs.h> |
61 | 60 | ||
61 | #include "../plat-omap/sram.h" | ||
62 | |||
62 | #include "iomap.h" | 63 | #include "iomap.h" |
63 | #include "pm.h" | 64 | #include "pm.h" |
64 | 65 | ||
diff --git a/arch/arm/mach-omap2/clkt2xxx_dpllcore.c b/arch/arm/mach-omap2/clkt2xxx_dpllcore.c index 35076592189..6a02f9bcb0f 100644 --- a/arch/arm/mach-omap2/clkt2xxx_dpllcore.c +++ b/arch/arm/mach-omap2/clkt2xxx_dpllcore.c | |||
@@ -26,7 +26,8 @@ | |||
26 | #include <linux/io.h> | 26 | #include <linux/io.h> |
27 | 27 | ||
28 | #include <plat/clock.h> | 28 | #include <plat/clock.h> |
29 | #include <plat/sram.h> | 29 | |
30 | #include "../plat-omap/sram.h" | ||
30 | 31 | ||
31 | #include "clock.h" | 32 | #include "clock.h" |
32 | #include "clock2xxx.h" | 33 | #include "clock2xxx.h" |
diff --git a/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c b/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c index 0cf63e7c610..cf16655b298 100644 --- a/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c +++ b/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c | |||
@@ -34,7 +34,8 @@ | |||
34 | #include <linux/slab.h> | 34 | #include <linux/slab.h> |
35 | 35 | ||
36 | #include <plat/clock.h> | 36 | #include <plat/clock.h> |
37 | #include <plat/sram.h> | 37 | |
38 | #include "../plat-omap/sram.h" | ||
38 | 39 | ||
39 | #include "soc.h" | 40 | #include "soc.h" |
40 | #include "clock.h" | 41 | #include "clock.h" |
diff --git a/arch/arm/mach-omap2/clkt34xx_dpll3m2.c b/arch/arm/mach-omap2/clkt34xx_dpll3m2.c index aff6ca4fd3a..da38e7e46d6 100644 --- a/arch/arm/mach-omap2/clkt34xx_dpll3m2.c +++ b/arch/arm/mach-omap2/clkt34xx_dpll3m2.c | |||
@@ -22,7 +22,8 @@ | |||
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | 23 | ||
24 | #include <plat/clock.h> | 24 | #include <plat/clock.h> |
25 | #include <plat/sram.h> | 25 | |
26 | #include "../plat-omap/sram.h" | ||
26 | 27 | ||
27 | #include "clock.h" | 28 | #include "clock.h" |
28 | #include "clock3xxx.h" | 29 | #include "clock3xxx.h" |
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index f71e51bfbe2..0bc8f66c4b7 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c | |||
@@ -25,13 +25,14 @@ | |||
25 | #include <asm/tlb.h> | 25 | #include <asm/tlb.h> |
26 | #include <asm/mach/map.h> | 26 | #include <asm/mach/map.h> |
27 | 27 | ||
28 | #include <plat/sram.h> | ||
29 | #include <plat/serial.h> | 28 | #include <plat/serial.h> |
30 | #include <plat/omap-pm.h> | 29 | #include <plat/omap-pm.h> |
31 | #include <plat/omap_hwmod.h> | 30 | #include <plat/omap_hwmod.h> |
32 | #include <plat/multi.h> | 31 | #include <plat/multi.h> |
33 | #include <plat-omap/dma-omap.h> | 32 | #include <plat-omap/dma-omap.h> |
34 | 33 | ||
34 | #include "../plat-omap/sram.h" | ||
35 | |||
35 | #include "soc.h" | 36 | #include "soc.h" |
36 | #include "iomap.h" | 37 | #include "iomap.h" |
37 | #include "voltage.h" | 38 | #include "voltage.h" |
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c index de89d382f52..05d55fb3f8f 100644 --- a/arch/arm/mach-omap2/omap4-common.c +++ b/arch/arm/mach-omap2/omap4-common.c | |||
@@ -25,11 +25,11 @@ | |||
25 | #include <asm/mach/map.h> | 25 | #include <asm/mach/map.h> |
26 | #include <asm/memblock.h> | 26 | #include <asm/memblock.h> |
27 | 27 | ||
28 | #include <plat/sram.h> | ||
29 | #include <plat/omap-secure.h> | 28 | #include <plat/omap-secure.h> |
30 | 29 | ||
31 | #include "omap-wakeupgen.h" | 30 | #include "../plat-omap/sram.h" |
32 | 31 | ||
32 | #include "omap-wakeupgen.h" | ||
33 | #include "soc.h" | 33 | #include "soc.h" |
34 | #include "common.h" | 34 | #include "common.h" |
35 | #include "mmc.h" | 35 | #include "mmc.h" |
diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c index 601a49bc264..94c838e0175 100644 --- a/arch/arm/mach-omap2/pm24xx.c +++ b/arch/arm/mach-omap2/pm24xx.c | |||
@@ -37,9 +37,10 @@ | |||
37 | #include <asm/system_misc.h> | 37 | #include <asm/system_misc.h> |
38 | 38 | ||
39 | #include <plat/clock.h> | 39 | #include <plat/clock.h> |
40 | #include <plat/sram.h> | ||
41 | #include <plat-omap/dma-omap.h> | 40 | #include <plat-omap/dma-omap.h> |
42 | 41 | ||
42 | #include "../plat-omap/sram.h" | ||
43 | |||
43 | #include "common.h" | 44 | #include "common.h" |
44 | #include "prm2xxx_3xxx.h" | 45 | #include "prm2xxx_3xxx.h" |
45 | #include "prm-regbits-24xx.h" | 46 | #include "prm-regbits-24xx.h" |
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index bbe15cb1b87..a08e87eafbe 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c | |||
@@ -35,12 +35,13 @@ | |||
35 | #include <asm/suspend.h> | 35 | #include <asm/suspend.h> |
36 | #include <asm/system_misc.h> | 36 | #include <asm/system_misc.h> |
37 | 37 | ||
38 | #include <plat/sram.h> | ||
39 | #include "clockdomain.h" | 38 | #include "clockdomain.h" |
40 | #include "powerdomain.h" | 39 | #include "powerdomain.h" |
41 | #include <plat/prcm.h> | 40 | #include <plat/prcm.h> |
42 | #include <plat-omap/dma-omap.h> | 41 | #include <plat-omap/dma-omap.h> |
43 | 42 | ||
43 | #include "../plat-omap/sram.h" | ||
44 | |||
44 | #include "common.h" | 45 | #include "common.h" |
45 | #include "cm2xxx_3xxx.h" | 46 | #include "cm2xxx_3xxx.h" |
46 | #include "cm-regbits-34xx.h" | 47 | #include "cm-regbits-34xx.h" |
diff --git a/arch/arm/mach-omap2/sdrc.c b/arch/arm/mach-omap2/sdrc.c index 761a781a99c..c5554372986 100644 --- a/arch/arm/mach-omap2/sdrc.c +++ b/arch/arm/mach-omap2/sdrc.c | |||
@@ -25,7 +25,7 @@ | |||
25 | 25 | ||
26 | #include "common.h" | 26 | #include "common.h" |
27 | #include <plat/clock.h> | 27 | #include <plat/clock.h> |
28 | #include <plat/sram.h> | 28 | #include "../plat-omap/sram.h" |
29 | 29 | ||
30 | #include "sdrc.h" | 30 | #include "sdrc.h" |
31 | 31 | ||
diff --git a/arch/arm/mach-omap2/sdrc2xxx.c b/arch/arm/mach-omap2/sdrc2xxx.c index f7074ff1d08..c131f1ee6ef 100644 --- a/arch/arm/mach-omap2/sdrc2xxx.c +++ b/arch/arm/mach-omap2/sdrc2xxx.c | |||
@@ -25,7 +25,8 @@ | |||
25 | #include <linux/io.h> | 25 | #include <linux/io.h> |
26 | 26 | ||
27 | #include <plat/clock.h> | 27 | #include <plat/clock.h> |
28 | #include <plat/sram.h> | 28 | |
29 | #include "../plat-omap/sram.h" | ||
29 | 30 | ||
30 | #include "soc.h" | 31 | #include "soc.h" |
31 | #include "iomap.h" | 32 | #include "iomap.h" |
diff --git a/arch/arm/mach-omap2/sleep34xx.S b/arch/arm/mach-omap2/sleep34xx.S index 506987979c1..75afe11207f 100644 --- a/arch/arm/mach-omap2/sleep34xx.S +++ b/arch/arm/mach-omap2/sleep34xx.S | |||
@@ -26,7 +26,7 @@ | |||
26 | 26 | ||
27 | #include <asm/assembler.h> | 27 | #include <asm/assembler.h> |
28 | 28 | ||
29 | #include <plat/sram.h> | 29 | #include "../plat-omap/sram.h" |
30 | 30 | ||
31 | #include "omap34xx.h" | 31 | #include "omap34xx.h" |
32 | #include "iomap.h" | 32 | #include "iomap.h" |
diff --git a/arch/arm/plat-omap/common.h b/arch/arm/plat-omap/common.h index e196d130015..8ae0542a37d 100644 --- a/arch/arm/plat-omap/common.h +++ b/arch/arm/plat-omap/common.h | |||
@@ -33,6 +33,4 @@ extern void omap_reserve(void); | |||
33 | struct omap_hwmod; | 33 | struct omap_hwmod; |
34 | extern int omap_dss_reset(struct omap_hwmod *); | 34 | extern int omap_dss_reset(struct omap_hwmod *); |
35 | 35 | ||
36 | void omap_sram_init(void); | ||
37 | |||
38 | #endif /* __ARCH_ARM_MACH_OMAP_COMMON_H */ | 36 | #endif /* __ARCH_ARM_MACH_OMAP_COMMON_H */ |
diff --git a/arch/arm/plat-omap/include/plat/sram.h b/arch/arm/plat-omap/include/plat/sram.h deleted file mode 100644 index 227ae265755..00000000000 --- a/arch/arm/plat-omap/include/plat/sram.h +++ /dev/null | |||
@@ -1,105 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/plat-omap/include/mach/sram.h | ||
3 | * | ||
4 | * Interface for functions that need to be run in internal SRAM | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #ifndef __ARCH_ARM_OMAP_SRAM_H | ||
12 | #define __ARCH_ARM_OMAP_SRAM_H | ||
13 | |||
14 | #ifndef __ASSEMBLY__ | ||
15 | #include <asm/fncpy.h> | ||
16 | |||
17 | extern void *omap_sram_push_address(unsigned long size); | ||
18 | |||
19 | /* Macro to push a function to the internal SRAM, using the fncpy API */ | ||
20 | #define omap_sram_push(funcp, size) ({ \ | ||
21 | typeof(&(funcp)) _res = NULL; \ | ||
22 | void *_sram_address = omap_sram_push_address(size); \ | ||
23 | if (_sram_address) \ | ||
24 | _res = fncpy(_sram_address, &(funcp), size); \ | ||
25 | _res; \ | ||
26 | }) | ||
27 | |||
28 | extern void omap_sram_reprogram_clock(u32 dpllctl, u32 ckctl); | ||
29 | |||
30 | extern void omap2_sram_ddr_init(u32 *slow_dll_ctrl, u32 fast_dll_ctrl, | ||
31 | u32 base_cs, u32 force_unlock); | ||
32 | extern void omap2_sram_reprogram_sdrc(u32 perf_level, u32 dll_val, | ||
33 | u32 mem_type); | ||
34 | extern u32 omap2_set_prcm(u32 dpll_ctrl_val, u32 sdrc_rfr_val, int bypass); | ||
35 | |||
36 | extern u32 omap3_configure_core_dpll( | ||
37 | u32 m2, u32 unlock_dll, u32 f, u32 inc, | ||
38 | u32 sdrc_rfr_ctrl_0, u32 sdrc_actim_ctrl_a_0, | ||
39 | u32 sdrc_actim_ctrl_b_0, u32 sdrc_mr_0, | ||
40 | u32 sdrc_rfr_ctrl_1, u32 sdrc_actim_ctrl_a_1, | ||
41 | u32 sdrc_actim_ctrl_b_1, u32 sdrc_mr_1); | ||
42 | extern void omap3_sram_restore_context(void); | ||
43 | |||
44 | /* Do not use these */ | ||
45 | extern void omap1_sram_reprogram_clock(u32 ckctl, u32 dpllctl); | ||
46 | extern unsigned long omap1_sram_reprogram_clock_sz; | ||
47 | |||
48 | extern void omap24xx_sram_reprogram_clock(u32 ckctl, u32 dpllctl); | ||
49 | extern unsigned long omap24xx_sram_reprogram_clock_sz; | ||
50 | |||
51 | extern void omap242x_sram_ddr_init(u32 *slow_dll_ctrl, u32 fast_dll_ctrl, | ||
52 | u32 base_cs, u32 force_unlock); | ||
53 | extern unsigned long omap242x_sram_ddr_init_sz; | ||
54 | |||
55 | extern u32 omap242x_sram_set_prcm(u32 dpll_ctrl_val, u32 sdrc_rfr_val, | ||
56 | int bypass); | ||
57 | extern unsigned long omap242x_sram_set_prcm_sz; | ||
58 | |||
59 | extern void omap242x_sram_reprogram_sdrc(u32 perf_level, u32 dll_val, | ||
60 | u32 mem_type); | ||
61 | extern unsigned long omap242x_sram_reprogram_sdrc_sz; | ||
62 | |||
63 | |||
64 | extern void omap243x_sram_ddr_init(u32 *slow_dll_ctrl, u32 fast_dll_ctrl, | ||
65 | u32 base_cs, u32 force_unlock); | ||
66 | extern unsigned long omap243x_sram_ddr_init_sz; | ||
67 | |||
68 | extern u32 omap243x_sram_set_prcm(u32 dpll_ctrl_val, u32 sdrc_rfr_val, | ||
69 | int bypass); | ||
70 | extern unsigned long omap243x_sram_set_prcm_sz; | ||
71 | |||
72 | extern void omap243x_sram_reprogram_sdrc(u32 perf_level, u32 dll_val, | ||
73 | u32 mem_type); | ||
74 | extern unsigned long omap243x_sram_reprogram_sdrc_sz; | ||
75 | |||
76 | extern u32 omap3_sram_configure_core_dpll( | ||
77 | u32 m2, u32 unlock_dll, u32 f, u32 inc, | ||
78 | u32 sdrc_rfr_ctrl_0, u32 sdrc_actim_ctrl_a_0, | ||
79 | u32 sdrc_actim_ctrl_b_0, u32 sdrc_mr_0, | ||
80 | u32 sdrc_rfr_ctrl_1, u32 sdrc_actim_ctrl_a_1, | ||
81 | u32 sdrc_actim_ctrl_b_1, u32 sdrc_mr_1); | ||
82 | extern unsigned long omap3_sram_configure_core_dpll_sz; | ||
83 | |||
84 | #ifdef CONFIG_PM | ||
85 | extern void omap_push_sram_idle(void); | ||
86 | #else | ||
87 | static inline void omap_push_sram_idle(void) {} | ||
88 | #endif /* CONFIG_PM */ | ||
89 | |||
90 | #endif /* __ASSEMBLY__ */ | ||
91 | |||
92 | /* | ||
93 | * OMAP2+: define the SRAM PA addresses. | ||
94 | * Used by the SRAM management code and the idle sleep code. | ||
95 | */ | ||
96 | #define OMAP2_SRAM_PA 0x40200000 | ||
97 | #define OMAP3_SRAM_PA 0x40200000 | ||
98 | #ifdef CONFIG_OMAP4_ERRATA_I688 | ||
99 | #define OMAP4_SRAM_PA 0x40304000 | ||
100 | #define OMAP4_SRAM_VA 0xfe404000 | ||
101 | #else | ||
102 | #define OMAP4_SRAM_PA 0x40300000 | ||
103 | #endif | ||
104 | #define AM33XX_SRAM_PA 0x40300000 | ||
105 | #endif | ||
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c index 28acb383e7d..dc2d800d959 100644 --- a/arch/arm/plat-omap/sram.c +++ b/arch/arm/plat-omap/sram.c | |||
@@ -25,7 +25,6 @@ | |||
25 | 25 | ||
26 | #include <asm/mach/map.h> | 26 | #include <asm/mach/map.h> |
27 | 27 | ||
28 | #include <plat/sram.h> | ||
29 | #include <plat/cpu.h> | 28 | #include <plat/cpu.h> |
30 | 29 | ||
31 | #include "sram.h" | 30 | #include "sram.h" |
diff --git a/arch/arm/plat-omap/sram.h b/arch/arm/plat-omap/sram.h index 29b43ef97f2..cefda2e0986 100644 --- a/arch/arm/plat-omap/sram.h +++ b/arch/arm/plat-omap/sram.h | |||
@@ -1,6 +1,107 @@ | |||
1 | #ifndef __PLAT_OMAP_SRAM_H__ | 1 | /* |
2 | #define __PLAT_OMAP_SRAM_H__ | 2 | * arch/arm/plat-omap/include/mach/sram.h |
3 | * | ||
4 | * Interface for functions that need to be run in internal SRAM | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
3 | 10 | ||
4 | extern int __init omap_sram_init(void); | 11 | #ifndef __ARCH_ARM_OMAP_SRAM_H |
12 | #define __ARCH_ARM_OMAP_SRAM_H | ||
5 | 13 | ||
6 | #endif /* __PLAT_OMAP_SRAM_H__ */ | 14 | #ifndef __ASSEMBLY__ |
15 | #include <asm/fncpy.h> | ||
16 | |||
17 | int __init omap_sram_init(void); | ||
18 | |||
19 | extern void *omap_sram_push_address(unsigned long size); | ||
20 | |||
21 | /* Macro to push a function to the internal SRAM, using the fncpy API */ | ||
22 | #define omap_sram_push(funcp, size) ({ \ | ||
23 | typeof(&(funcp)) _res = NULL; \ | ||
24 | void *_sram_address = omap_sram_push_address(size); \ | ||
25 | if (_sram_address) \ | ||
26 | _res = fncpy(_sram_address, &(funcp), size); \ | ||
27 | _res; \ | ||
28 | }) | ||
29 | |||
30 | extern void omap_sram_reprogram_clock(u32 dpllctl, u32 ckctl); | ||
31 | |||
32 | extern void omap2_sram_ddr_init(u32 *slow_dll_ctrl, u32 fast_dll_ctrl, | ||
33 | u32 base_cs, u32 force_unlock); | ||
34 | extern void omap2_sram_reprogram_sdrc(u32 perf_level, u32 dll_val, | ||
35 | u32 mem_type); | ||
36 | extern u32 omap2_set_prcm(u32 dpll_ctrl_val, u32 sdrc_rfr_val, int bypass); | ||
37 | |||
38 | extern u32 omap3_configure_core_dpll( | ||
39 | u32 m2, u32 unlock_dll, u32 f, u32 inc, | ||
40 | u32 sdrc_rfr_ctrl_0, u32 sdrc_actim_ctrl_a_0, | ||
41 | u32 sdrc_actim_ctrl_b_0, u32 sdrc_mr_0, | ||
42 | u32 sdrc_rfr_ctrl_1, u32 sdrc_actim_ctrl_a_1, | ||
43 | u32 sdrc_actim_ctrl_b_1, u32 sdrc_mr_1); | ||
44 | extern void omap3_sram_restore_context(void); | ||
45 | |||
46 | /* Do not use these */ | ||
47 | extern void omap1_sram_reprogram_clock(u32 ckctl, u32 dpllctl); | ||
48 | extern unsigned long omap1_sram_reprogram_clock_sz; | ||
49 | |||
50 | extern void omap24xx_sram_reprogram_clock(u32 ckctl, u32 dpllctl); | ||
51 | extern unsigned long omap24xx_sram_reprogram_clock_sz; | ||
52 | |||
53 | extern void omap242x_sram_ddr_init(u32 *slow_dll_ctrl, u32 fast_dll_ctrl, | ||
54 | u32 base_cs, u32 force_unlock); | ||
55 | extern unsigned long omap242x_sram_ddr_init_sz; | ||
56 | |||
57 | extern u32 omap242x_sram_set_prcm(u32 dpll_ctrl_val, u32 sdrc_rfr_val, | ||
58 | int bypass); | ||
59 | extern unsigned long omap242x_sram_set_prcm_sz; | ||
60 | |||
61 | extern void omap242x_sram_reprogram_sdrc(u32 perf_level, u32 dll_val, | ||
62 | u32 mem_type); | ||
63 | extern unsigned long omap242x_sram_reprogram_sdrc_sz; | ||
64 | |||
65 | |||
66 | extern void omap243x_sram_ddr_init(u32 *slow_dll_ctrl, u32 fast_dll_ctrl, | ||
67 | u32 base_cs, u32 force_unlock); | ||
68 | extern unsigned long omap243x_sram_ddr_init_sz; | ||
69 | |||
70 | extern u32 omap243x_sram_set_prcm(u32 dpll_ctrl_val, u32 sdrc_rfr_val, | ||
71 | int bypass); | ||
72 | extern unsigned long omap243x_sram_set_prcm_sz; | ||
73 | |||
74 | extern void omap243x_sram_reprogram_sdrc(u32 perf_level, u32 dll_val, | ||
75 | u32 mem_type); | ||
76 | extern unsigned long omap243x_sram_reprogram_sdrc_sz; | ||
77 | |||
78 | extern u32 omap3_sram_configure_core_dpll( | ||
79 | u32 m2, u32 unlock_dll, u32 f, u32 inc, | ||
80 | u32 sdrc_rfr_ctrl_0, u32 sdrc_actim_ctrl_a_0, | ||
81 | u32 sdrc_actim_ctrl_b_0, u32 sdrc_mr_0, | ||
82 | u32 sdrc_rfr_ctrl_1, u32 sdrc_actim_ctrl_a_1, | ||
83 | u32 sdrc_actim_ctrl_b_1, u32 sdrc_mr_1); | ||
84 | extern unsigned long omap3_sram_configure_core_dpll_sz; | ||
85 | |||
86 | #ifdef CONFIG_PM | ||
87 | extern void omap_push_sram_idle(void); | ||
88 | #else | ||
89 | static inline void omap_push_sram_idle(void) {} | ||
90 | #endif /* CONFIG_PM */ | ||
91 | |||
92 | #endif /* __ASSEMBLY__ */ | ||
93 | |||
94 | /* | ||
95 | * OMAP2+: define the SRAM PA addresses. | ||
96 | * Used by the SRAM management code and the idle sleep code. | ||
97 | */ | ||
98 | #define OMAP2_SRAM_PA 0x40200000 | ||
99 | #define OMAP3_SRAM_PA 0x40200000 | ||
100 | #ifdef CONFIG_OMAP4_ERRATA_I688 | ||
101 | #define OMAP4_SRAM_PA 0x40304000 | ||
102 | #define OMAP4_SRAM_VA 0xfe404000 | ||
103 | #else | ||
104 | #define OMAP4_SRAM_PA 0x40300000 | ||
105 | #endif | ||
106 | #define AM33XX_SRAM_PA 0x40300000 | ||
107 | #endif | ||