diff options
Diffstat (limited to 'recipes-bsp/u-boot/u-boot/2011.09/0002-OMAP3-Update-SDRC-dram_init-to-always-call-make_cs1_.patch')
-rw-r--r-- | recipes-bsp/u-boot/u-boot/2011.09/0002-OMAP3-Update-SDRC-dram_init-to-always-call-make_cs1_.patch | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/recipes-bsp/u-boot/u-boot/2011.09/0002-OMAP3-Update-SDRC-dram_init-to-always-call-make_cs1_.patch b/recipes-bsp/u-boot/u-boot/2011.09/0002-OMAP3-Update-SDRC-dram_init-to-always-call-make_cs1_.patch new file mode 100644 index 00000000..cb128738 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot/2011.09/0002-OMAP3-Update-SDRC-dram_init-to-always-call-make_cs1_.patch | |||
@@ -0,0 +1,66 @@ | |||
1 | From 42db3ebdd76628017e7ab83752e9b288ec4f26a0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tom Rini <trini@ti.com> | ||
3 | Date: Fri, 18 Nov 2011 12:47:59 +0000 | ||
4 | Subject: [PATCH 02/21] OMAP3: Update SDRC dram_init to always call make_cs1_contiguous() | ||
5 | |||
6 | We update the comment in make_cs1_contiguous() to be a little bit | ||
7 | more clear (it's been copy/pasted from other silicons) and then | ||
8 | explain in dram_init() why we need to always try this. | ||
9 | |||
10 | Note that in the previous behavior we were always calling this on | ||
11 | boards that never had cs1 populated anyhow so making sure we do | ||
12 | this always is fine and will correct things like omap3evm detecting | ||
13 | an invalid amount of memory (384MB). | ||
14 | |||
15 | Signed-off-by: Tom Rini <trini@ti.com> | ||
16 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
17 | --- | ||
18 | arch/arm/cpu/armv7/omap3/sdrc.c | 23 +++++++++++------------ | ||
19 | 1 files changed, 11 insertions(+), 12 deletions(-) | ||
20 | |||
21 | diff --git a/arch/arm/cpu/armv7/omap3/sdrc.c b/arch/arm/cpu/armv7/omap3/sdrc.c | ||
22 | index 0dd1955..66ce33f 100644 | ||
23 | --- a/arch/arm/cpu/armv7/omap3/sdrc.c | ||
24 | +++ b/arch/arm/cpu/armv7/omap3/sdrc.c | ||
25 | @@ -58,10 +58,9 @@ u32 is_mem_sdr(void) | ||
26 | |||
27 | /* | ||
28 | * make_cs1_contiguous - | ||
29 | - * - For es2 and above remap cs1 behind cs0 to allow command line | ||
30 | - * mem=xyz use all memory with out discontinuous support compiled in. | ||
31 | - * Could do it at the ATAG, but there really is two banks... | ||
32 | - * - Called as part of 2nd phase DDR init. | ||
33 | + * - When we have CS1 populated we want to have it mapped after cs0 to allow | ||
34 | + * command line mem=xyz use all memory with out discontinuous support | ||
35 | + * compiled in. We could do it in the ATAG, but there really is two banks... | ||
36 | */ | ||
37 | void make_cs1_contiguous(void) | ||
38 | { | ||
39 | @@ -207,16 +206,16 @@ int dram_init(void) | ||
40 | |||
41 | size0 = get_sdr_cs_size(CS0); | ||
42 | /* | ||
43 | - * If a second bank of DDR is attached to CS1 this is | ||
44 | - * where it can be started. Early init code will init | ||
45 | - * memory on CS0. | ||
46 | + * We always need to have cs_cfg point at where the second | ||
47 | + * bank would be, if present. Failure to do so can lead to | ||
48 | + * strange situations where memory isn't detected and | ||
49 | + * configured correctly. CS0 will already have been setup | ||
50 | + * at this point. | ||
51 | */ | ||
52 | - if ((sysinfo.mtype == DDR_COMBO) || (sysinfo.mtype == DDR_STACKED)) { | ||
53 | - do_sdrc_init(CS1, NOT_EARLY); | ||
54 | - make_cs1_contiguous(); | ||
55 | + make_cs1_contiguous(); | ||
56 | + do_sdrc_init(CS1, NOT_EARLY); | ||
57 | + size1 = get_sdr_cs_size(CS1); | ||
58 | |||
59 | - size1 = get_sdr_cs_size(CS1); | ||
60 | - } | ||
61 | gd->ram_size = size0 + size1; | ||
62 | |||
63 | return 0; | ||
64 | -- | ||
65 | 1.7.2.5 | ||
66 | |||